duet-agent
AGENTS.md46 starsChanged 58 days agoApache-2.0View on GitHub
Read README.md first: what the product is, how the repo fits together, and how to build and check it. Active plans live with their specs, and each one says what to do next. If a folder you're working in has a readme, read it before continuing. The readmes are written for you. These are the principles. Commands, flags and paths live with the code that owns them: the readmes, the manifests, and each tool's own usage text. The user is…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository26 other files it gives its agents.
- audit-agentsSkill
- audit-choicesSkill
- audit-testsSkill
- claudeSkill
- close-specSkill
- code-reviewSkill
- codexSkill
- compare-screenshotsSkill
- debug-memorySkill
- design-with-imagesSkill
- eli5Skill
- eval-skillsSkill
- explore-unknownsSkill
- handoff-specSkill
- implement-specSkill
- implement-spec-with-codexSkill
- preview-shotsSkill
- refactor-cleanSkill
- releaseSkill
- reviewSkill
- screenshot-critiqueSkill
- write-docsSkill
- write-evalSkill
- write-skillsSkill
- write-specSkill
- write-testsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run the narrowest check that answers your question: one test, then one file, then one eval.
- Very specific: line 27
Write the test first. Before changing behaviour or fixing a bug, invoke write-tests and follow its red/green workflow.
- Very specific: line 35
When memory misbehaves, reproduce it in an eval from a dump of the real store.
- Distinctive: line 39
Never loosen a requirement to make a check pass.
- Distinctive: line 41
Don't wait on a long run. Start it in the background and keep working.
- Distinctive: line 45
Look at the actual output.
- Distinctive: line 65
Never silence a signal from the compiler or the linter.
- Distinctive: line 67
Keep prompt and fixture text readable in source without letting source indentation leak into the content.
- Distinctive: line 73
Use what the repo already chose before writing your own.
- Distinctive: line 75
Import an upstream API directly.
- Distinctive: line 77
Check the one condition that matters.
- Distinctive: line 79
Prefer one general rule to a special case, and a simple structure to an abstraction nobody needs yet.
- Distinctive: line 85
Every parallel checkout is a full copy, and installed dependencies and build output multiply with each one.
- Distinctive: line 88
Never share build output between checkouts whose sources differ.
- Distinctive: line 89
Remove a checkout and its build output when its branch is merged.
- Very specific: line 95
Before changing this file, invoke audit-agents.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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 in this repo
Read README.md first: what the product is, how the repo fits together, and how to build and check it. Active plans live with their specs, and each one says what to do next. If a folder you're working in has a readme, read it before continuing. The readmes are written for you.
These are the principles. Commands, flags and paths live with the code that owns them: the readmes, the manifests, and each tool's own usage text.
Talking to the user
The user is very technical but doesn't read the code day to day. Pointing at code is fine; introduce a variable, function or module briefly the first time you mention it.
Lead with contracts. When work touches an interface between components (a command or the events it emits, the protocol a host speaks to the runner, a config field, a saved state shape, a module boundary), say what the contract looks like and how it changed before anything else.
Answer routine questions from the evidence. Ask the user only when the answer changes a decision that matters and can't be settled any other way.
Proving a change
Optimize for iteration speed. The measure is the time to feedback you can trust, not the amount of process you ran.
Run the narrowest check that answers your question: one test, then one file, then one eval. That is the proof for everyday work, including a commit, a merge and a push.
Run everything once, when a spec's implementation is finished. Running everything is slow and saturates the machine. Until then a change is checked by what it can move: its own tests and the output it touches. That is enough for a commit, a merge, a push and a finished feature. A failure that only the full run finds is fixed at the end; that is cheaper than gating every step.
A change that reaches the whole system (the turn runner, a saved state shape) does not bring that run forward on its own. While more work is coming, the full run still waits for the end. Run it sooner only when the next piece of work can't be trusted without it.
Every expensive run must answer a question a cheaper one can't. Live evals, which call real models and cost money, and the whole suite in its container are the expensive runs here; do only the ones a change can move. Iterate on one eval, never the whole set. Reuse a result that is still valid, and rerun only what a change could have invalidated. Docs and data that no code reads need no run at all.
Write the test first. Before changing behaviour or fixing a bug, invoke write-tests and follow its red/green workflow. Test what the product does and how it fails, not how the code is shaped.
An eval counts only once you have seen it fail for the right reason. Before writing or changing a live eval, invoke write-eval.
Prove behaviour through the command line when it can be reached there. It is the path users run, and it catches faults a lower-level call misses.
Tests and evals that write files, create databases or touch the home directory run in the disposable container, never on the host. If a focused host run leaves artifacts behind, fix the boundary; don't clean up after it or commit them.
When memory misbehaves, reproduce it in an eval from a dump of the real store. Never debug against a user's live store. Invoke debug-memory.
A change that shouldn't alter behaviour (a refactor, a performance change) must leave the output unchanged, or be a named decision.
Never loosen a requirement to make a check pass. A narrow pass proves a narrow claim: say what you verified, what you assumed and what is unfinished.
Don't wait on a long run. Start it in the background and keep working. Give it a visible sign of progress and a point where you stop, and never repeat a failure unchanged.
What the user sees
Look at the actual output. Run the command and read what a person at the terminal would see; a passing check is not evidence that it reads well.
For any visual change:
- get an unprimed second opinion with
screenshot-critique; - judge before against after with
compare-screenshots; - show the user with
preview-shots.
How the harness is built
The runtime does not own persistence policy. Persistence fills the runtime's store before use, then listens for its changes.
Install scripts set up prerequisites. Runtime commands do runtime work.
The readme's design principles decide what belongs in the harness. Read them before adding a capability.
Code that explains itself
Exported types and config fields are public documentation. Comment a field where it is declared: how it is used, what its values mean in operation, and what changes when it is set. Don't restate the type.
Never silence a signal from the compiler or the linter. Fix its cause.
Keep prompt and fixture text readable in source without letting source indentation leak into the content.
The finished code reads as if it was written from scratch by someone who already knew the current design: no stale names, no comments about earlier attempts, no leftover scaffolding. Before calling work done, invoke review.
One owner per concept
Use what the repo already chose before writing your own. Find the existing owner of a concept before creating another.
Import an upstream API directly. A local helper earns its place by adding this project's behaviour, not by re-exporting someone else's.
Check the one condition that matters. When a value becomes guaranteed, remove the fallbacks and null checks downstream of it. Unshipped scaffolding is replaced outright, with no compatibility shim.
Prefer one general rule to a special case, and a simple structure to an abstraction nobody needs yet.
Spend margin on simplicity. When something has room to spare against its budget (response time, startup, memory, bandwidth), use that room to keep the design simple. Don't add machinery to make a thing faster than it needs to be, and take such machinery out when the margin shows it wasn't needed. When something replaces an old mechanism, delete the old one. When a change exposes a duplicate or a stale owner, invoke refactor-clean.
Parallel work stays cheap
Every parallel checkout is a full copy, and installed dependencies and build output multiply with each one.
- Share what doesn't change between checkouts. Don't make another copy.
- Never share build output between checkouts whose sources differ. They overwrite each other's builds, and the symptom is an error from someone else's change.
- Remove a checkout and its build output when its branch is merged.
Skills
Skills hold the procedures behind these principles. Load the one that covers your work before you start.
Before changing this file, invoke audit-agents.
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.

