Organized around one constraint: several surfaces share review semantics and none may reimplement them. Also carries a verification section that maps each kind of change to its specific test command, and a naming section defining three words.
Quoted passages are verbatim. Open one to see it in the source.
01 / Architecture as narrative
The seam drawn as a pipeline
Two ASCII flows show how a diff becomes a review document and how an intent becomes a surface projection. Each stage names the module that owns it and the facts a renderer is to consume rather than recompute.
Source excerpt starting at line 49.
49 parity manifests. Consume them; never re-derive those facts in a renderer.
02 / Ratchets
Shrink-only baselines and append-only tombstones
The known-violations baseline may only shrink and the tombstone lists may only grow. Paying off a violation has a defined sequence: delete the copies, add a tombstone and an adversarial fixture, register the consumers, update the audit document.
Source excerpt starting at line 104.
104 explicit `@hunk/vcs/*` leaves. The known-violations baseline is shrink-only: fix an edge, rerun105 `bun run deps:baseline`, and never add to it.
03 / Verification by change type
Checks selected by kind of change
Rendering changes take a typecheck, tests, integration, TTY smoke and one real terminal run. Interaction and scrolling changes take PTY coverage. Broker changes take the Node adapter suite. The section also states which four suites the default test command excludes.
Source excerpt starting at line 149.
149- `bun run test` does not include review conformance, PTY, TTY smoke, or real-Node adapter150 conformance under `test/session-broker-node/`. Run the dedicated command documented in
04 / House vocabulary
A stated voice for comments
Header comments are written in active voice and lead with what the module does. Two phrasings are named as the ones to avoid, both of which describe the architecture's opinion of itself rather than its behavior.
Source excerpt starting at line 158.
158 invariants. Avoid passive or self-important framing ("The one place where…", "the single159 source of truth for…") — name the behavior, not the architecture's opinion of itself.
05 / House vocabulary
Three words defined
layout for structural arrangement, geometry for aggregate spatial data, bounds for one concrete visible extent. Three definitions that settle naming for everything in that area.
06 / Generated file guards
Generated files named with their generators
The agent-facing skill document, the theme colors, the changelog page and the session wire fixtures are each identified as generated, with the source to edit and the command to run. One of them requires a protocol version bump and deleting the previous fixture in the same change.
Put it to work
Borrow this for your repo
01If several surfaces share semantics, draw the pipeline and name the owner of each stage.
02Give every known-violations baseline a stated direction of travel, and enforce it in CI.
03If your default test command excludes suites, say which ones. Agents run the obvious command.
04Define the three or four words your domain keeps arguing about.
hunk's file tells an agent how the codebase works. It cannot tell it which bug three customers hit this week. Modem keeps that context current and attaches it to the work.