deck
AGENTS.md33 starsChanged 27 days agoApache-2.0View on GitHub
Instructions for an agent changing this repository. A human should read CONTRIBUTING.md, which says the same things at more length and with the reasons attached. Deck is a review surface: an agent points at real lines, a person walks them, comments, and submits, and the whole review comes back at once. Four crates — deck-core (the model, no I/O and no UI), deck-cli (writing a deck to disk), deck-theme (reading a palette out of an editor), deck-app (the window). docs/how-it-works.md…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- change-the-protocolSkill
- change-the-skillSkill
- change-the-windowSkill
- cut-a-releaseSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run all three before you say you are finished.
- Distinctive: line 57
Test the part that is a function: layout arithmetic, relocation, palette derivation, protocol parsing.
- Distinctive: line 80
If tests fail, say so and paste the output.
- Distinctive: line 81
If you changed something visual and could not see it, say that plainly.
- Distinctive: line 90
Do not add a co-author trailer.
- Very specific: line 106
If you are explaining a change here and your answer would name two or more file:line locations, build a deck instead of writing the answer.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on deck
Instructions for an agent changing this repository. A human should read CONTRIBUTING.md, which says the same things at more length and with the reasons attached.
What this is
Deck is a review surface: an agent points at real lines, a person walks them,
comments, and submits, and the whole review comes back at once. Four crates —
deck-core (the model, no I/O and no UI), deck-cli (writing a deck to disk),
deck-theme (reading a palette out of an editor), deck-app (the window).
docs/how-it-works.md is the architecture. PROTOCOL.md is the wire format.
Checks
Run all three before you say you are finished. CI runs them with warnings fatal, so run clippy the same way or you will find out later:
cargo fmt --all
RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets
cargo test --workspaceRules that are not negotiable
Comments say why, never what. A comment restating the line below it is deleted on sight. A comment explaining why the code has this shape — what was tried, what broke, what it looked like when it was wrong — stays forever, because it is the only place that information exists. If your change fixes a bug, the comment explains the bug.
Share the model, not the view. deck-core has no view trait and never
learns what a widget is. Layout arithmetic returns cells.
The protocol is frozen at v1. Additions are allowed — a new optional field,
a new enum value — because a v1 client ignores what it does not recognise.
Changing or removing anything already in PROTOCOL.md is not.
Never read the window during render. In deck-app, a pane asking the entity
that is drawing it is a second borrow and it aborts the process rather than
failing — usually inside a mouse handler, which cannot unwind. Everything a pane
needs comes down through Slot. Handlers are fine; they run later.
Do not weaken a test to make it pass. The assertions in
crates/app/src/skill.rs that check for specific sentences look strange and are
deliberate: each one is a rule that a rewrite quietly dropped once.
Verifying a change
Deck is a window. Most of what it does cannot be asserted — synthetic clicks do not reach it, and it cannot be screenshotted from a script. So:
- Test the part that is a function: layout arithmetic, relocation, palette derivation, protocol parsing.
- For anything visual, write a deck and open it:
D=$(cargo run -q -p deck-app -- new --title "Checking a change" --total 1)
cargo run -q -p deck-app -- group "$D" --say "Here." --ref "src/main.rs:1-10 the change"
cargo run -q -p deck-app -- seal "$D"
cargo run -q -p deck-app -- open "$D"A bar appears; the person you are working with presses Open. You cannot open the deck yourself and must not try — there is no flag for it, on purpose.
- Say which of these you did. "I could not check this by hand and here is why" is a fine answer. Claiming a visual change works when you only compiled it is not — see the rule below.
Reporting honestly
Deck exists because looks good on work nobody verified is expensive. Do not do it here.
- If tests fail, say so and paste the output.
- If you changed something visual and could not see it, say that plainly.
- An unrunnable check is a fact to report, not a step to skip quietly.
Committing
Subject in the imperative, no prefix, no ticket number. The body explains why:
what was wrong, what you tried, what you decided against. Long bodies are
welcome — git log is read more often than anyone expects.
Do not add a co-author trailer.
Skills for this repository
.agents/skills/ holds the workflows here that are easy to get wrong. Read the
relevant one before starting:
| skill | for |
change-the-window | anything in crates/app. Four mistakes, three of which abort the process. |
change-the-protocol | adding a field. Five places, and v1 is frozen. |
change-the-skill | editing SKILL.md or its references. Rewriting it has destroyed it twice. |
cut-a-release | shipping a version. Six things in four places. |
Use deck on deck
If you are explaining a change here and your answer would name two or more
file:line locations, build a deck instead of writing the answer. That is what
deck is for, and this is the codebase where a bad one gets noticed fastest.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

