agentleFS
debuffjpdebuffjp/debuff/AGENTS.md

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.

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
  1. Very specific:

    Run npm run check. All of it must pass.

    line 19
  2. Distinctive:

    If you changed runtime code, report the template's brotli size from the build output.

    line 20
  3. Very specific:

    If a capture changed on purpose, run npx debuff scenario --update in templates/basic and explain why.

    line 21
  4. Distinctive:

    No em dashes. Use a colon, a comma, parentheses or a new sentence.

    line 32
  5. Distinctive:

    No AI vocabulary (delve, crucial, leverage, seamless, robust, comprehensive and the rest of the list in the script) and no filler such as …

    line 33
  6. Distinctive:

    No new runtime dependencies without an explicit trade-off note in the PR.

    line 39
  7. Very specific:

    No dev-only code outside import.meta.env.DEV branches or @debuffjp/dev.

    line 40
  8. Distinctive:

    Never modify source assets.

    line 41
  9. Distinctive:

    Don't make creative or art-direction decisions in templates or docs.

    line 42

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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-cli lists its subcommands (status, check, test, exports, docs, versions, release, site, papercuts and more), each takes --help and --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 by npm run check.
  • docs/adr/: read the relevant ADR before changing an architectural decision.
  • .claude/skills/: contributor skills. Use add-package before creating a workspace and write-docs for any change to public API, CLI, MCP tools or behaviour.
  • .mcp.json connects the debuff MCP server (tooling/mcp) to templates/platformer, so agents can dogfood it. Run npm run build first. With npx debuff dev running in that template and the game open in a browser, game_start attaches to the live tab.

Loop

  1. State a short plan and the files you expect to touch.
  2. Make the smallest change that works. Don't do broad rewrites or drive-by refactors.
  3. Run npm run check. All of it must pass. A new git worktree needs its own npm ci first; check stops with exit 2 if packages resolve from another checkout.
  4. If you changed runtime code, report the template's brotli size from the build output.
  5. If a capture changed on purpose, run npx debuff scenario --update in templates/basic and 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 tool report_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 with Fixes papercut #<id>: the release that ships it marks it fixed on the board. Before 2026-10-30 these went in docs/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.DEV branches 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.