Compile in

Ingest adapters

An adapter compiles a source format into blocks.v1. That is its entire job. It never writes the wiki, never builds packages, never talks to agents — the graph is the only door into the system, which is what keeps every source honest.

Adapter registry

AdapterInputStatusOwner
scanRepo workspace (components, CSS vars, exports)✅ ReferenceBlockSmith
markdownPaste / upload .md✅ ReferenceBlockSmith
governanceWiki finalize (rules, roles, do/don't)✅ ReferenceBlockSmith
storybookstorybook-static (index.json / stories.json)✅ ReferenceBlockSmith
figmaFigma export JSON⬜ Open—
tokens-studioTokens Studio JSON⬜ Open—
agent-templateCLAUDE.md / AGENTS.md chunks⬜ Research—

The adapter contract

#Every adapter MUST
1Output a BlocksmithGraphV1 (standalone) or blocks for recordIngest() (registry mode)
2Compute contentHash with the canonical algorithm — golden vectors must reproduce
3Pass protocol:conformance for its output (incl. verifyHashes)
4Never write wiki or Pulse directly — blocks.v1 is the only door
5Ingest as partial when contributing alongside a primary scan — never stale blocks it doesn't own
6Surface disagreement as conflict — same id, different source, different content; a human resolves in the wiki

Reference: the Storybook adapter

terminal
# from a static Storybook build (storybook build)
npm run ingest:storybook -- ./storybook-static --doc upload:my-app.md
#   components: 2 · graph sha256:…
#   registry → upload:my-app.md: 1 created, 0 bumped, 1 conflicts
#   ⚠ conflicts (resolve in wiki Pipeline): component:button

# or emit a standalone graph, no registry:
npm run ingest:storybook -- ./storybook-static --graph-only --out graph.json

The interesting line is the conflict: the repo scan already owns component:button with different content, so the Storybook version lands as a red card in the Pipeline staging lane — both truths preserved, a human picks. Source: src/lib/ingest/storybook.ts (~150 lines — that's the weekend-project bar for an adapter).

Listing requirement: an adapter gets a row in this registry when its output passes the conformance suite and its conflict behavior is demonstrated. Open a PR with your adapter + fixtures.