AGENTS.md directory

hunk

Review-first terminal diff viewer built for reading agent-authored changesets.

Documents a shared review seam as two ASCII data flows, then forbids re-deriving it in a renderer.

Documents it routes to

This file points the agent at 13 other documents in the repository. Open any of them to read it here, as it was at this commit.


├── .changeset
│   └── 
├── docs
│   ├── 
│   ├── 
│   ├── 
│   ├── 
│   ├── 
│   └── 
├── packages
│   └── hunk
│       └── skills
│           ├── hunk-extensions
│           │   └── 
│           └── hunk-review
│               └── 
├── skills
│   └── hunk-release
│       └── 
├── test
│   └── 
├── 
└── 

By the numbers

224
Lines
2,059
Words
about 9 min read
16.1kB
File size
18
Headings
77
Bullet rules
6
Code blocks
0
Links to other docs
9.3k
Repo stars

File measured on main at commit 392cb7f. Analysis written 2026-09-14. Star count is a snapshot from September 2026.

What kind of file this is

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.

Techniques in this file

Quoted lines are verbatim from the file. Open one to see it where it sits.

The seam drawn as a pipeline

Architecture as narrative

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.

Shrink-only baselines and append-only tombstones

Ratchets

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.

Checks selected by kind of change

Verification by change type

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.

A stated voice for comments

House vocabulary

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.

Three words defined

House vocabulary

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.

Generated files named with their generators

Generated file guards

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.

Takeaways for your own repo

  • If several surfaces share semantics, draw the pipeline and name the owner of each stage.
  • Give every known-violations baseline a stated direction of travel, and enforce it in CI.
  • If your default test command excludes suites, say which ones. Agents run the obvious command.
  • Define the three or four words your domain keeps arguing about.

How the file is organized

  1. 01purpose
  2. 02architecture and workspace map
  3. 03shared review seam
  4. 04architectural rules
  5. 05component guidance
  6. 06theme guidance
  7. 07testing
  8. 08code comments
  9. 09naming
  10. 10review behavior
  11. 11verification
  12. 12cross-platform support
  13. 13releases
Read the full file on GitHub

Context your AGENTS.md cannot carry

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.