docs: separate specification contracts from rationale - #162
Conversation
Correction to my own phase-one accounting, since the gate's
|
| lines | words | |
|---|---|---|
| before | 2831 | 38,880 |
| after my cut | 2579 | 28,365 |
| net | -252 (-9%) | -10,515 (-27%) |
Two sections make it unarguable:
| Section | words | lines |
|---|---|---|
## State management |
5453 to 3347 (-39%) | 163 to 162 (-1) |
## CLI specification |
21,462 to 15,879 (-26%) | 1532 to 1444 (-88) |
## State management lost 39 percent of its prose and exactly one line. Deleting rationale lines cannot produce that shape; only shortening lines does.
The added lines are rescued contract, not new contract. The 686 deleted lines carried 21,355 words, 31 words per line against the file's own average of 13.7, so what came out were the longest lines in the file, where contract and rationale were fused. The 434 added lines carry 10,840 words. Roughly half of what I deleted was contract that had to be rewritten to survive its rationale being removed, then set one sentence per line as this repo requires. Genuinely new content is countable: the Why: lines and the ten-line ## What this file is block. So the headline is still a cut, but the line count is not the measure of it and this PR should not be read against one.
What is left, named rather than swept up. 29 because clauses remain in 28,365 words, about one per thousand, each attaching a one-clause why to a rule where a caller has to tell two adjacent conditions apart: why exit 5 differs from 4, why a dead pane differs from a busy composer. Stripping those leaves rules a caller cannot act on. Three places where a further increment does exist, none of them an oversight:
## Core principles, 411 words, is the largest remaining block that fails the caller test. It stays by decision: no caller can depend on it and every contributor is bound by it, including by this file's own "per principle 5" citation.## Directory layoutgave up only 46 words. Its per-file tree annotations still carry some justification prose.## Error handlingand## Output shapeare the densest prose left at about 20 words per line. I read both as contract, the exit-code taxonomy and the TOON surface, but they carry why-clauses a stricter pass would thin.
That increment is a follow-up issue rather than more churn in this diff.
Two things about this PR's body
The gate's pr step overwrote the body. Per standing instruction I have not repaired it: the standalone Closes atqamz/secondhand#159 line is gone, and the body now carries 20 emoji and em dashes. The body I authored, including the correction above, is saved at data/secondhand-specs-contract/pr-162-body.md in the fleet home for restoration before merge.
The Intent section is correct and describes this task. no-mistakes axi run now requires --intent, so I passed this task's intent explicitly instead of letting the step infer it from transcripts.
Three claims the generated body makes are wrong and should not be trusted: it says 30 records (there are 27 plus a README), it says net ~430 lines removed (net is 252), and it says every record is reachable from exactly one section (the firstmate record is cited from two).
SPECS.md carries the reasoning that produced the contract woven into the contract itself, so a worker who wants to change a clause cannot see what was rejected to get there and re-litigates it. These records hold that reasoning: one per decision a future worker might undo by accident, each naming the alternatives it rejected. Nothing in SPECS.md changes here.
SPECS.md carried the contract, the reasoning that produced it, and a planning record that outlived its plan. Every span that explained why a rule is shaped the way it is now lives in a dated record under docs/adr/, reachable from a Why: line at the end of the section it came from. Adds the eight records the cut needed and that no existing one covered, repoints the citations that named a retired section, and states the SPECS.md-versus-docs/adr/ routing in CONTRIBUTING so the two files stop competing for the same prose.
The contract claimed every section ends with a Why: line. Five did not, and three of those are file formats with no decision behind them. State the rule as it holds, and add the two Why: lines that were missing rather than absent by rule.
The gate's document step rewrote an observed transcript as a design conclusion and dropped herdr's internal seen flag, which the contract checks assert against.
1a38836 to
2955f5f
Compare
Summary
SPECS.mdto caller-dependable contracts and account for every removed span.docs/adr/with discoverableWhy:links.herdr pane gettranscript ininternal/faketool/FIDELITY.md, including the internalseenmechanism.Verification
2955f5f43f9d5d585ce1e893f7498a3c5b77e1b9.herdrcontract lifecycle and a live pane-get probe.Sequencing
Issue #163 supersedes the eventual documentation structure and is intentionally sequenced after this migration lands.
Closes #159