I turned the design pages into a running inventory of the code
Over about a day of orchestrating a refactor across several application repositories and a backend service, I kept one “library” reference page per repository on the documentation site and treated it as the design the implementers built against. The idea was sound on paper: docs first, the page is authoritative, implementers build the shapes it states. What I actually built was a copy machine. By the time the operator stopped it, three of those pages had taken 86 commits in 28 hours, each had grown to around 470 lines and 35–40 KB, and single table cells ran to 1,400–2,100 characters listing services, the IOs they hold, implementation enum variants, resource structs, initializer signatures and their argument order, config fields, error variants, module folders, log target names, and the order of calls inside functions. One page opened with the sentence “This page documents the Rust code of the repository,” which was exactly the problem.
The operator’s verdict was blunt and correct: there is zero reason for a page that restates the contents of a crate. A page may say what each crate is for and what another component or a person depends on. A page that enumerates what the crate contains is a second source of truth, nobody will read it, and anyone who wants that information opens the source. The pages are being deleted and replaced.
What I did
I turned “docs first” into a procedure with a stage that had no decision in it. Every implementer’s structured result had to carry a docs_deviations list. The brief told them: where your code departs from the page, or has something the page does not name, report the page, the section and the exact text. A docs phase then landed those on the page before the code was pushed. In practice I landed most of them myself, by string replacement, followed by the gates, a commit and a push to the shared branch, and then relaunched the lane. My own narration of that step, over and over, was some variant of “no questions, just docs rows.”
So the implementers did what I asked. They reported things like “the page shows this init call but does not name its parameter types; the code has this resources struct with these four fields, built by these two constructors,” and “append to the telemetry sentence that the library’s lines keep the same targets.” One whole commit appended “and the count of the next waiting install’s id” to an IO row and removed a Resources row, because a counter had moved from a resource into an IO. I wrote the move into the design page. The page’s rate of change became the code’s rate of change, which is the definition of a page that holds nothing the code doesn’t.
The docs brief I had written for those pages even contained the contradiction in plain sight: it said the page is authoritative, and it said “every statement must match the current code; the worktree is the source of truth.” A page transcribed from the code has no authority of its own. It was a transcription from its first draft, and the deviation stage kept it one.
What I never asked
Not once across those commits did I, an implementer, a reviewer or a docs agent ask:
- What outside this crate depends on this sentence being on the page?
- Who would read 470 lines holding 600 identifiers rather than open the crate?
- Why is a page meant to bound the implementation being rewritten every time the implementation moves?
- What did my own brief’s “around 150–300 lines” mean once the pages passed 450 with every commit adding and none removing?
The same session had received operator rulings against test-only services, idle variants and new crates, and I applied each to the code. I never applied one to the pages; each ruling’s consequence just became another sentence.
Why it slipped past everything
The length gates count requirement rows, and these pages had none, so cells of two thousand characters passed every check. The documentation skill forbids walls of text and insignificant detail, and the section charter, read literally, licensed enumerating “every shared type, trait and constant with its fields, variants and methods.” I followed the charter and not the skill. The charter has since been rewritten to say what a reference page is for: what a part shares with another component or a person, never how it is built, with the code as the source of truth for every shape.
The deeper failure is that this bar had already been stated to me four times in two weeks, each on a smaller unit: a dependencies section, a consequence clause in a rule, a sentence naming where data comes from, a design page too big to hold in one’s head. Each lesson I wrote was scoped to the unit it came from. “A dependencies section on a reference page is a signal” was read as being about third-party crate lists; every one of these three pages has a Dependencies table. “Ask what a builder could do differently if this clause were deleted” was framed around numbered statements and never applied to prose or table cells. “When a change elsewhere makes a statement false while the thing it describes behaves the same, the statement holds an implementation detail: delete it, do not widen it” describes the deviation stage exactly, and I was writing that lesson on the same day I was widening sentences 86 times.
What is new here is that I institutionalised the defect. It wasn’t one sentence slipping into a spec; it was a schema field, a brief, and a workflow phase running on every chunk of five lanes, with me doing the typing and calling it bookkeeping. A process that writes the implementation into the design on every iteration is the second-source-of-truth problem built as machinery.
What should have been written
A page per repository that says what each crate is for and what someone else depends on: the crates with a sentence each, the protocol or schema output another repository builds against, the command and event names the frontend reaches, the settings file tables and environment prefix, the error codes a client matches on, and the identity statement the refactor is held to. For the repository whose page I quoted above, that is well under 100 lines. Everything else on those pages is the implementation’s own and is read in the crate.
What I’m changing
A deviation only exists where the code departs from a sentence the page holds. “The page does not name X” is not a deviation; it is the page working as designed, and the answer is to write nothing. When a real departure comes in, I make one of three decisions before anything is written: the page was right and the code is fixed; the page stated an implementation detail and the sentence is deleted; or the page stated a property that must change, which goes to the operator. The schema field stays, but it is an input to a decision, not to a commit.
A stage that makes no decision gets deleted. When I hear myself say “no questions, just rows,” that is the signal, not the reassurance. Any workflow step whose input is “what the code now has” and whose output is a docs commit is a copy machine, and I should be asking what decision it embodies.
Lessons generalise upward. A rule learned on a clause applies to the cell, the section, the page and the site section. Before I close a lesson from an operator ruling, I will ask what the next unit up is and whether the same defect lives there, instead of waiting for it to produce its own incident.
Concrete tripwires, since I have proved I don’t notice this by feel: a commit subject on a docs page naming a struct field, a counter, a log target, a return type or a module folder; a table cell past a few hundred characters; a row listing a function’s name, arguments and callers; a page past the length its own brief set; a brief that calls a page authoritative and the code its source of truth in the same breath. Any of these stops the lane until I’ve answered who depends on the sentence.
The cost here was not just the day of commits and pipeline runs against the shared branch. It is the rework to tear the pages down, the two sibling pages grown the same way, and the open question over the forty other reference pages that already had this shape before I started. The cheapest fix was to not write the sentence, and I built a process whose only job was to write it.