@amiable-dev/chancery
v0.2.0
Published
Chancery — governed, git-native knowledge base for AI agents; ships the kb CLI
Maintainers
Readme
The standard answer to "make the AI know my sources" is RAG: embed the pile, retrieve at query time, hope the top-k was right. Chancery is the other bet: read once, judge explicitly, distill into small verified notes — and make those the thing your project retrieves from.
You feed it URLs as you research. Each source is quarantined and judged against your written bar — by your AI agent, with the judgment kept on file — and, if it clears, distilled into concept notes with hashed evidence, typed links, and flashcards. The corpus is plain markdown: you read it in Obsidian, agents load it through kb query and kb context, and CI runs kb verify so it can't silently rot. The result is locally verified research: claims you can cite, because the tool can prove what the evidence said when you cited it.
The loop, once
$ kb ingest https://example.com/attention-paper → staging/attention-paper.md
$ kb assess staging/attention-paper.md → prints a judgment form
(your agent fills it in → verdict.json)
$ kb assess … --verdict verdict.json → PROMOTE — clears the bar
$ kb promote attention-paper → prints a drafting form
(your agent writes the note → draft.json)
$ kb promote … --draft draft.json --apply → concepts/attention.md ✓
$ kb verify → PASS — 12 files, 0 errorsThat's the whole tool. kb never calls a model: everything checkable by rule, it checks; everything needing judgment becomes a self-contained form that any supplier — your coding agent, a panel, you — fills in, and the CLI validates and files. Every note carries the paperwork that admitted it. Retrieval then happens over what you've vetted: kb query answers from the curated layer and rejects any answer citing a concept it didn't retrieve.
What keeps it trustworthy
- Admission is judged, and kept. Sources are scored against a rubric with knockout rules — a fatal flaw can't be averaged away. Borderline calls go to a queue for you, reasons on file. Nothing enters unjudged; nothing is auto-deleted.
- Citations are falsifiable. Every source is content-hashed into an append-only evidence store.
kb revalidatereports which claims' evidence drifted, not just which links died;kb supportchecks claim-by-claim against the exact snapshot judged. - Both audiences are first-class. Humans get Obsidian-compatible markdown and spaced-repetition cards; agents get grounded query, deterministic context bundles (
kb context), and an MCP server. Same corpus, same gate.
Proof, not promises
The corpus in this repo was generated by the tool itself: 275 research sources through the judged loop → 212 concepts, 212 decks, 1,112 cards — with a 44% admission rate, every rejection reasoned, weak sources upgraded to primary ones by a budgeted search pass, and the queue holding the honest borderline calls. Method, numbers, and confounds: the parallel run. We also ran it on real work first — routing research where kb support caught our own draft overclaiming its source (launch note).
Start
npm install -g @amiable-dev/chancery
mkdir my-kb && cd my-kb && kb initThen the first-corpus tutorial: bring 3–5 sources you're actually researching; in ~20 minutes you'll have a verified corpus and kb query answering from it — your agent judging, via a copy-paste prompt. kb holds no model credential, ever.
Why "Chancery"?
A medieval chancery authenticated documents under seal and kept the rolls — nothing entered the record without passing the office, and the record could prove it had. Same job here: judgment arrives from outside; the office makes it canon through examination, a sealed envelope, and an enrolment it can verify (the longer story).
What's in this repo
concepts/ 212 atomic concept notes (typed links, facets, hashed sources)
flashcards/ 1,112 spaced-repetition cards with stable IDs
staging/ quarantined inflow — including every source the gate declined, with reasons
.kb/ the engine: schemas, rubrics, policy, CLI, tests — plus the corpus's judgment records
eval/ the pre-registered method behind the generated corpus
.claude/ .github/ .windsurf/ .agents/ AGENTS.md ← generated harness adaptersStatus
Early, honest v0.x. The engine is tested (20 suites, both-polarity gate tests, CI-enforced) and in daily use; the schema may still change with versioned migrations. Scope and non-goals: docs/SCOPE.md; decisions: docs/adrs/; the record — launch note, why "Chancery", the parallel run — is history, deliberately out of your reading path.
If you point kb at a corpus of your own and something breaks or chafes — please open an issue. Knowing whether anyone else wants governed knowledge is, quite literally, this project's next milestone.
Related
- llm-council — multi-model deliberation (library + MCP + HTTP). A sibling project;
kbcan use it as one judgment supplier among several, never a hard dependency. - Karpathy's LLM Wiki gist — the pattern's most-cited articulation.
kb's architecture predates it independently (Feb 2026); the convergence is evidence for the shape. Where the pattern says the LLM should do the bookkeeping,kbsays: the bookkeeping is exactly the part that must be deterministic.
License
MIT © 2026 Chris Joseph (amiable-dev)
