Context
About twenty repos at the company had no current architecture map. Knowledge lived in engineers' heads and in AI coding sessions that ended without a record. I designed a wiki that coding sessions feed and an LLM maintains, and I own it.
The problem
Nobody could answer which service talked to which, or what a change would touch, without asking the one person who remembered. AI sessions made it worse: they produced useful findings and then lost them when the session closed.
A wiki written by a model is only useful if you can trust it, so provenance and contradictions had to be handled from the start.
What I did
I wrote the schema: typed relationship fields such as depends_on, consumed_by, publishes and subscribes, with a lint that checks inverse links match. Callouts mark implicit contracts and contradictions, and a (?) marks any claim that is not verified.
I built the feed. A deterministic SessionEnd hook writes a breadcrumb after every coding session, and a global rule makes sessions leave a handoff note in an inbox.
A headless Claude run acts as the librarian. It processes the inbox with limited tools and records where each page came from.
I ran a bootstrap with checkpoints so I could correct it, then a backlog sync of 334 notes from 22 repos. That added 39 pages, updated about 60 and fixed contradictions left by the bootstrap.
Key decision
I kept the librarian narrow and the rules deterministic. The hook is plain shell, not a model, so a breadcrumb is never skipped. I curate and direct, and the model writes the content.
The cost is that every page depends on session authors writing honest notes, so the schema forces provenance rather than trusting the text.
Result
The wiki holds 103 pages built from about 1,030 session notes across 22 repos. It surfaced a ranked list of top risks and produced concept pages for implicit contracts between services.
What I learned
I would keep provenance and symmetric links again, since they are what make a model-written wiki checkable. Next I would measure usage, because today I can show that pages exist but not that they are read.
Stack
- Claude Code
- Bash
- jq
- Markdown
- Obsidian
