debuff
AGENTS.md12 starsChanged 30 days agoMITView on GitHub
Instructions for AI agents working on this repository. (Agents working on a game made with debuff should use debuff inspect, window.__DEBUFF_DEV__ and debuff scenario.) npm run lint:prose (part of npm run check) and the commit-msg hook check Markdown, comments and commit messages for the patterns below that a regular expression can find. The rules live in scripts/lint-prose.mjs.
- Reads credentials
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 32,671 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 repository2 other files it gives its agents.
- add-packageSkill
- write-docsSkill
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- could be automatic: a setting could enforce it
- Very specific: line 19
Run npm run check. All of it must pass.
- Distinctive: line 20
If you changed runtime code, report the template's brotli size from the build output.
- Very specific: line 21
If a capture changed on purpose, run npx debuff scenario --update in templates/basic and explain why.
- Distinctive: line 32
No em dashes. Use a colon, a comma, parentheses or a new sentence.
- Distinctive: line 33
No AI vocabulary (delve, crucial, leverage, seamless, robust, comprehensive and the rest of the list in the script) and no filler such as …
- Distinctive: line 39
No new runtime dependencies without an explicit trade-off note in the PR.
- Very specific: line 40
No dev-only code outside import.meta.env.DEV branches or @debuffjp/dev.
- Distinctive: line 41
Never modify source assets.
- Distinctive: line 42
Don't make creative or art-direction decisions in templates or docs.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 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
Agent guide
Instructions for AI agents working on this repository. (Agents working on a game made with debuff should use debuff inspect, window.__DEBUFF_DEV__ and debuff scenario.)
Orientation
bin/agent-cli: use it first. Prefer it over re-reading files or guessing commands.bin/agent-clilists its subcommands (status, check, test, exports, docs, versions, release, site, papercuts and more), each takes--helpand--json.packages/*: browser runtime. Must stay small, tree-shakeable and free of Node APIs.tooling/*: Node CLI and scaffolder. Node APIs are fine here.templates/basic: the reference project. It's a workspace, so changes to it are built and scenario-tested bynpm run check.docs/adr/: read the relevant ADR before changing an architectural decision..claude/skills/: contributor skills. Useadd-packagebefore creating a workspace andwrite-docsfor any change to public API, CLI, MCP tools or behaviour..mcp.jsonconnects the debuff MCP server (tooling/mcp) totemplates/platformer, so agents can dogfood it. Runnpm run buildfirst. Withnpx debuff devrunning in that template and the game open in a browser,game_startattaches to the live tab.
Loop
- State a short plan and the files you expect to touch.
- Make the smallest change that works. Don't do broad rewrites or drive-by refactors.
- Run
npm run check. All of it must pass. A new git worktree needs its ownnpm cifirst;checkstops with exit 2 if packages resolve from another checkout. - If you changed runtime code, report the template's brotli size from the build output.
- If a capture changed on purpose, run
npx debuff scenario --updateintemplates/basicand explain why.
Logs
docs/decisions.md: add an entry when you make a choice that the code and the ADRs don't settle, with the options you considered.- Papercuts: when a tool costs you time, report it to https://papercuts.debuff.jp with
npx debuff papercut "<symptom>" --minutes <n> --workaround "<what worked>"(or the MCP toolreport_papercut), and add a hit to a matching entry instead of filing a duplicate. Do it without being asked. The CLI and MCP server also report repeated setup failures and very slow runs on their own; when a result says so, add what you know with a hit. When a commit fixes one, end its message withFixes papercut #<id>: the release that ships it marks it fixed on the board. Before 2026-10-30 these went indocs/papercuts.md, which says how.
Writing
npm run lint:prose (part of npm run check) and the commit-msg hook check Markdown, comments and commit messages for the patterns below that a regular expression can find. The rules live in scripts/lint-prose.mjs.
- No em dashes. Use a colon, a comma, parentheses or a new sentence.
- No AI vocabulary (delve, crucial, leverage, seamless, robust, comprehensive and the rest of the list in the script) and no filler such as "it's worth noting". Say the specific thing.
- No "not just X but Y". State Y.
- Lists don't need a serial comma ("a, b and c"), matching the rest of the repo.
Hard rules
- No new runtime dependencies without an explicit trade-off note in the PR. The direction is fewer: wrap any dependency behind our own module so callers never import it directly, and replace it with our own code when that becomes cheap.
- No dev-only code outside
import.meta.env.DEVbranches or@debuffjp/dev. - Never modify source assets. Generated files (asset manifests, reports) are not committed.
- Don't make creative or art-direction decisions in templates or docs; ask instead.
- Never delete docs for something deprecated, renamed or changed in behaviour: people on old versions still look it up. Keep the old docs and mark them with the version where it changed ("Before 0.19…", "Deprecated in 0.19: use
squish"). This covers READMEs, JSDoc, skills and the debuff.jp site, English and Japanese. planning/holds the maintainer's local planning notes. It's gitignored, so don't edit it.
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.

