Skip to content

Artifact links on stories and experiences (vault contract revision 1.6, additive)#96

Merged
claude-dataviking merged 2 commits into
mainfrom
feat/artifact-links
Jul 17, 2026
Merged

Artifact links on stories and experiences (vault contract revision 1.6, additive)#96
claude-dataviking merged 2 commits into
mainfrom
feat/artifact-links

Conversation

@claude-dataviking

Copy link
Copy Markdown
Contributor

Provenance ladder P1a (coordination spec: traitprint-cloud docs/specs/provenance-ladder.md, §Rung 1 shape). Follows the revision-1.5 scope-block pattern (#90) exactly.

What

stories[] and experiences[] each gain an optional top-level artifact_links: a list of {url, label?} evidence pointers (repo, PR, talk, press, published artifact) — rung 1, "artifact-supported".

  • Validation: url https-only (http/ftp/js/etc. rejected), ≤ 500 chars; label optional, ≤ 120; max 8 links per entity. Enforced in ArtifactLink / the entity models, so proposal apply-time validation rides them for free.
  • Byte-identical round-trip: the list defaults to empty and is omitted from frontmatter when empty (_OMIT_WHEN_EMPTY); an unset label never serializes as label: null. Pre-1.6 vaults rewrite with exact bytes — proven by new round-trip tests on both entity types.
  • Proposals: artifact_links added to BOTH _EXPERIENCE_KEYS and _STORY_KEYS in the same PR — lock-step with cloud vault_propose from day one (the scope PR's lesson, learned).
  • MCP: get_profile_summary(depth="detailed") signature experiences and find_story stories include artifact_links when present, key-absent-when-empty like scope.
  • Docs: vault-v1 README rule 10 + revision 1.6 history entry, JSON schema $defs/artifactLink + experienceFrontmatter/storyFrontmatter properties + $comment; AGENTS.md revision claim (test_doc_truth pin) and frontmatter key lists; CHANGELOG [Unreleased].

Experience links are deliberately top-level (role-level evidence), NOT inside scope, per the spec.

Coordination

Cloud sibling PR (P1b) lands the 1:1 mirror: storage columns + vault-commit projection + edit-UI link fields + provenance chips + publish embed.

Gates

  • pytest -q: 1054 passed, 3 skipped
  • ruff check src/ tests/: clean
  • mypy src/: clean

🤖 Generated with Claude Code

…6, additive)

Provenance ladder rung 1 ("artifact-supported", P1a): StorySchema and
ExperienceSchema gain optional top-level artifact_links — a list of
ArtifactLink {url, label?} evidence pointers (repo, PR, talk, press,
published artifact). URLs are https-only (http and every other scheme
rejected) and capped at 500 chars, labels at 120, at most 8 links per
entity. Only set fields serialize (an unset label is never label: null)
and an empty list never reaches frontmatter (_OMIT_WHEN_EMPTY), so
pre-1.6 vaults round-trip byte-identically — proven by new round-trip
tests on both entity types.

Proposals: artifact_links joins BOTH _EXPERIENCE_KEYS and _STORY_KEYS
(lock-step with cloud vault_propose from day one); apply-time validation
rides the entity models. MCP: get_profile_summary(depth="detailed") and
find_story include an entity's artifact_links when present, same
key-absent-when-empty discipline as the revision-1.5 scope block.

Contract docs (vault-v1 README rule 10 + revision history, JSON schema
$defs/artifactLink + frontmatter properties + $comment), AGENTS.md
revision claim/key lists, and CHANGELOG updated. Cloud mirrors the field
1:1 per the provenance-ladder coordination spec (P1b sibling PR).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…SON schema

Adversarial review findings on #96: (1) a typo'd key inside a link
entry (e.g. 'lable') was silently swallowed, losing the label — extra
keys now hard-reject, matching the schema's additionalProperties:
false; (2) the JSON schema accepted a bare 'https://' url that the
reader rejects — minLength: 9 closes the contract drift.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude-dataviking
claude-dataviking merged commit 3fbffb1 into main Jul 17, 2026
@claude-dataviking
claude-dataviking deleted the feat/artifact-links branch July 17, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants