ckb/wiki/index.md
Michał Kopeć 474630e2bb Adopt seven ideas from trailhq/Graft; schema 1.4 -> 1.5
Graft keeps a derived, disposable code graph in sync with a content hash
rather than a calendar, and keeps a protected block on every regenerated
node. This KB is the opposite kind of store — durable, curated, built from
material that cannot be regenerated — but several of Graft's mechanisms
port cleanly, and two of them close real gaps here.

Schema 1.5 is additive: every 1.4 page remains valid.

1. `## Crux` — verbatim source excerpts alongside the synthesis. A summary
   can drift silently; a quote either still matches its source or it does
   not. Lets `ckb-retrieve` ground an answer without a round-trip to the
   archive, and makes drift mechanically detectable.
2. `## Notes` — human-authored and protected everywhere. Closes a real
   gap: `ckb-index-external` regenerates connector pages wholesale, so an
   annotation written there was previously destroyed on the next refresh.
3. `source_fingerprint`/`source_checked` — a digest of the material a page
   was built from. Freshness by date says a page has aged; a fingerprint
   says whether its evidence moved. Most valuable for connector-backed
   libs, where documents change with no notice.
4. `lint_report.py --quick` — a deterministic one-line session-start
   signal, wired into Rule E next to the existing `git status` check.
5. In-degree as a rank-fusion signal in `ckb-retrieve`, weighted below 1.0:
   centrality is a prior, not evidence.
6. Blast radius — a new `ckb-ingest` step walking the graph backwards from
   touched entities to find what the incoming material contradicts, before
   writing anything. Ingest was additive-first, which is how a wiki
   accumulates two pages that quietly disagree.
7. Edge vocabulary in `wiki/graph/index.md` rewritten as a question per
   verb, and completed: `part_of` was written by `ckb-code-map` but never
   declared. Added `produces`, `configures`, `validates`, `implements`.

Lint gains checks 12 (fingerprint drift), 13 (crux verbatimness) and 14
(the protected-Notes rule), verified against a synthetic fixture covering
stale digests, missing sources, fabricated quotes and paraphrased evidence.

Not adopted: the gitignored regenerable store, the MCP server and CLI
daemon, tree-sitter parsing, statusline hooks, telemetry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 22:44:26 +02:00

2 KiB

kb_schema_version
1.5

Knowledge Base Index

Routing table: read the Use when column to decide if a page is relevant.

Page Description Use when
Overview High-level map of the knowledge base Getting started, understanding the structure
Log Chronological record of root-level changes Reviewing recent modifications
Error Book Known compilation errors and fixes Debugging a bad ingest or lint issue
Projects Optional local query scopes grouping related wiki pages, sources, libs, and graph areas Narrowing search to a team, topic, client, system, or initiative
Query Gaps Questions the wiki could not answer yet, used to drive demand-driven ingest Tracking failed searches, missing knowledge, future ingest targets
Decisions Numbered decision records — what was decided, by whom, when, why, and what it superseded Asking why something is the way it is, who decided it, when, what changed it, or what is still open
Entities Typed entity pages (people, projects, libraries, concepts) Looking up a specific person, project, library, or concept
Graph Edge lists and relationship data between entities Finding what depends on / relates to a given entity

Entity Pages

Pages in entities/ describe typed entities (people, projects, libraries, concepts) extracted during ingest. See Entities index / entities/index for the full list. Each links to related entities via the graph index.

(Agent populates this as entities are extracted.)

Decision Records

Pages in decisions/ are numbered decision records (NNNN-slug.md). Unlike entity pages, they are append-only: a decision is never rewritten to match a later change of mind — a new decision supersedes it and both stay on the record. See Decisions index / decisions/index. Say "record a decision" to add one.