Skip to content

Vault card schemas v2: extension fields, memory families, tension/tombstone + validator - #517

Merged
aarontrowbridge merged 3 commits into
mainfrom
496-vault-card-schemas-v2
Aug 23, 2026
Merged

Vault card schemas v2: extension fields, memory families, tension/tombstone + validator#517
aarontrowbridge merged 3 commits into
mainfrom
496-vault-card-schemas-v2

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #496.

The open contract for the vault distillation pass (spec-20260821-090401, incl. Amendments 1–3). 124 new tests; full suite 101 files / 1,315 tests green; typecheck clean.

What ships:

  • vault-schemas/ — 18 card schemas as standalone JSON Schema (12 legacy + 4 memory families + tension + tombstone), generated from one canonical table; evidence-plane record schema; plane-residency table. Generated files are the committed contract.
  • src/vault_card_validator.ts — zero-dependency JSON-Schema-subset validator with named violated paths, frontmatter file validation, tombstone pointer existence check, canonical JSON.
  • test/fixtures/vault-cards/ — 45 valid (all 18 types, canonical round-trip), 18 invalid (named-path refusals incl. sentinel conflicts, tombstone conditionals, the masquerade class), 1 markdown card.

Design notes:

  • additionalProperties: true throughout — unknown-field flagging is the schema-check skill's job, not a schema-level refusal (legacy cards carry platform extras).
  • The reviewed-sentinel rule (provenance_unrecoverable ⟹ empty provenance + reviewed_after) is enforced on every card type via if/then.
  • Tombstone conditionals: pointer-bearing justifications require pointer; expired_ttl requires original_review_by; provenance_unrecoverable requires review_pointer. filed_to pointers may be repo: URIs (existence resolved by the dev gate, not the vault).
  • Records vs cards (the Amendment-2 distinction) is structural: records get a minimal schema; cards get the full machinery.

Reviewer note (authorship gate): the fixture corpus is implementer-generated — the README records the obligation for the reviewer to spot-check refusals and add adversarial variants before merge.

#496)

The distillation-pass open contract, first slice: an insight card validates
through a type-dispatching validator with field-precise path errors. The
schema file is the published open contract (any JSON Schema tool can check
a card); the module is amicode's seam.
…sion/tombstone, records, validator

The open contract for the vault distillation pass's schema layer
(amicode#496, spec-20260821-090401 incl. Amendments 1-3):

- 18 card schemas (12 legacy types + 4 memory families + tension +
  tombstone) as standalone JSON Schema files, generated from one
  canonical table (vault-schemas/generate.mjs)
- extension fields (provenance, confidence, review_by, subject) optional
  on all card types; the reviewed-sentinel rule enforced via if/then
- tombstone closed vocabulary (superseded_by, expired_ttl,
  provenance_unrecoverable, redundant_with, filed_to, lifecycle_complete)
  with justification-conditional required fields
- evidence-plane record schema (records, not cards: minimal frontmatter)
- plane-residency table (knowledge/evidence/work per type)
- minimal zero-dependency JSON-Schema-subset validator with named
  violated paths; file-level (frontmatter) validation; tombstone pointer
  existence check; canonical JSON helper
- fixture corpora: 45 valid (all 18 types, round-trip), 18 invalid
  (named-path refusals), 1 markdown card — 124 tests

Closes #496.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ffc044d2-da10-4236-a978-a3c9b88318d3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 23, 2026 12:22
@aarontrowbridge
aarontrowbridge merged commit ec46fe9 into main Aug 23, 2026
8 checks passed
@aarontrowbridge
aarontrowbridge deleted the 496-vault-card-schemas-v2 branch August 23, 2026 12:22
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.

Vault card schemas v2: extension fields, memory families, tension/tombstone + validator

1 participant