feat: vault v1.1 — experience–skill links (contract + model + CLI + MCP + audit)#46
Conversation
Adds skill_ids[] to $defs/experienceFrontmatter — the skills exercised in that role, same UUID-array reference style as story skill_ids. Dangling refs follow rule 2 / Layer 1: warn locally, accept + quarantine at cloud ingest. Older vaults remain valid; schema_version stays 1. Revision history added to the contract README. https://claude.ai/code/session_01E28AybHo6BucViH4PZSvCU
- ExperienceSchema.skill_ids (default []) — contract revision 1.1 - experiences/*.md frontmatter carries skill_ids (allowlisted key) - VaultStore.add_experience accepts skill_ids - vault audit: experience.dangling_skill (major warning, mirrors story.dangling_skill / D10) and experience.no_skills (minor gap, mirrors story.no_skills) - tests: schema defaults/validation, v1 frontmatter round-trip, pre-1.1 files without the key still load, v0 migration yields empty links, audit findings https://claude.ai/code/session_01E28AybHo6BucViH4PZSvCU
- vault show --verbose prints experience skill_ids (story style); vault show --json carries them via the model dump - vault list experiences gains a Skills count column (story style) - vault add-experience: --skill-id (repeatable), interactive prompt, and skill_ids in --from-json batch items - proposals: skill_ids allowlisted in the experience payload shape (add_experience / update_experience), matching the contract $defs - MCP get_profile_summary (detailed): signature_experiences now carry related_skills (names, dangling refs skipped — mirrors find_story); local server deliberately ahead of cloud until parity ships https://claude.ai/code/session_01E28AybHo6BucViH4PZSvCU
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2d5f2a597
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "--skill-id", | ||
| "skill_ids_opt", | ||
| multiple=True, | ||
| type=UUID_PARAM, |
There was a problem hiding this comment.
Reject --skill-id in batch mode
When --from-json is provided, the handler only rejects --title, so a command like traitprint vault add-experience --from-json exp.json --skill-id <uuid> accepts this new option, immediately dispatches to _batch_add_experiences, and exits successfully while silently dropping the requested skill link. The documented batch contract says --from-json cannot be combined with single-item arguments, so this should fail with usage code 2 (or define explicit semantics) instead of ignoring the new flag.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 1a33007 — --from-json now rejects --skill-id with usage exit 2 (same contract as --title), pointing the user at per-item skill_ids in the batch JSON instead. Test added mirroring the existing add-education guard test.
Generated by Claude Code
Codex P2 on #46: --from-json silently dropped --skill-id instead of failing usage like --title does. Batch items carry their own skill_ids. https://claude.ai/code/session_01E28AybHo6BucViH4PZSvCU
Summary
Vault contract revision 1.1: experiences gain formal skill links, closing the "experience_skills needs a contract extension" gap. Fully additive — older vaults and pre-1.1 files load unchanged.
Contract (docs/schema/vault-v1/)
skill_ids(optional UUID array) on$defs/experienceFrontmatter, exact reference style stories useschema_versionstays1per the contract's own rule for additive changes; the revision marker lives in the README header + schema$comment.Local product
ExperienceSchema.skill_ids, frontmatter round-trip (missing key reads as empty)experience.dangling_skill(major, mirrorsstory.dangling_skill) +experience.no_skills(minor gap report) in the existing audit mechanismvault show --verbose,list experiencesSkills column,add-experience --skill-id(+ interactive prompt +--from-json)skill_idsallowlisted foradd/update_experienceget_profile_summaryaddsrelated_skillstosignature_experiences(dangling refs skipped)Testing
mining.py(untouched by this PR; thetype: ignore[import-not-found]guards read as unused only when optional deps are installed, which CI's[dev]env doesn't do)Cloud parity (ships as the next wave)
Ingest validation for the new key, D10 quarantine for dangling refs, projection persistence,
vault_proposeallowlist, hostedrelated_skillsparity, web display/edit, audit finding codes.https://claude.ai/code/session_01E28AybHo6BucViH4PZSvCU
Generated by Claude Code