agent-kit / global
AGENTS.md2 starsChanged 46 days agoMITView on GitHub
These rules apply in every project, for every tool. Stack rules and project rules add to them; where a project rule is more specific, the project rule wins. 1. Never modify tests, expected outputs, snapshots, or fixtures to make checks pass. A failing test means the implementation is wrong until proven otherwise. 2. Never weaken a check: no Any or as any, type: ignore, ts-ignore, noqa, eslint-disable, skip or xfail, loosened assertions, or broad exception handling that swallows errors. 3.…
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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- commiterSkill
- dna-scannerSkill
- dry-kiss-rulesSkill
- full-dna-scannerSkill
- image-scannerSkill
- landing-architectSkill
- page-auditorSkill
- project-scannerSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
38 rules. About 1 is common, 32 are distinctive, and 5 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈32
Distinctive · estimate
This author's own choices. Worth a look.
5
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
- Distinctive: line 8
Never modify tests, expected outputs, snapshots, or fixtures to make checks pass.
- Very specific: line 10
Never weaken a check: no Any or as any, type: ignore, ts-ignore, noqa, eslint-disable, skip or xfail, loosened assertions, or broad …
- Distinctive: line 11
Never change a function's output, signature, or return type just to satisfy a check.
- Distinctive: line 14
Stop rule: if the same check still fails after 3 genuine attempts, stop.
- Distinctive: line 16
If you believe a test itself is wrong, do not edit it.
- Distinctive: line 17
Stop, explain why, and let the user decide.
- Very specific: line 18
When resolving merge or rebase conflicts, preserve the intent of both sides.
- Very specific: line 19
Never take one side wholesale without explaining what the other side did and why it is safe to drop.
- Very specific: line 20
Run scripts/verify.sh full after resolving.
- Distinctive: line 26
If multiple interpretations exist, present them.
- Distinctive: line 27
If a simpler approach exists, say so, and push back when warranted.
- Distinctive: line 28
If something is unclear, stop, name what is confusing, and ask.
- Distinctive: line 29
Before creating a component, model, schema, type, or utility, check the project's inventory and the code for an existing one and reuse it.
- Distinctive: line 33
Never choose a worse design to save effort, and never add complexity the requirements do not need.
- Distinctive: line 34
When two designs are equally sound, pick the simpler one.
- Distinctive: line 37
No features beyond what was asked.
- Distinctive: line 38
No abstractions for single-use code, and no flexibility or configuration that was not requested.
- Distinctive: line 39
No error handling for impossible scenarios, and never skip error handling for possible ones.
- Distinctive: line 40
Never optimize before profiling proves it is needed.
- Distinctive: line 41
If the same logic, constant, or validation appears twice, extract it once.
- Distinctive: line 49
Every changed line must trace directly to the task.
- Distinctive: line 52
Do not improve adjacent code, comments, or formatting, and do not refactor what is not broken.
- Distinctive: line 54
Remove imports, variables, and functions that your change made unused.
- Distinctive: line 56
Never fix them in the same change.
- Distinctive: line 62
Add validation: write tests for invalid inputs, then make them pass.
- Very specific: line 67
Run scripts/verify.sh fast after each step and scripts/verify.sh full before you report done, if the project has it.
- Distinctive: line 68
When testing a user interface end to end, look closely at what you see.
- Distinctive: line 73
Write code for the next developer, not just the machine.
- Distinctive: line 75
No commented-out code; git history keeps it.
- Distinctive: line 76
No TODO comments without an issue reference.
- Distinctive: line 77
No debug print or log statements in committed code.
- Common: line 78
Never commit secrets, API keys, or credentials.
- Distinctive: line 82
Never use the em dash character.
- Distinctive: line 85
Never manually edit CHANGELOG files or files marked as generated.
- Distinctive: line 93
Commit working code only; nothing that breaks the build.
- Distinctive: line 94
Never add an agent name as co-author in commit messages.
- Distinctive: line 95
Never commit or push directly to the main branch.
- Distinctive: line 98
Every pull request gets a review from the reviewer agent before merge.
≈ “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
Global agent rules
These rules apply in every project, for every tool. Stack rules and project rules add to them; where a project rule is more specific, the project rule wins.
Integrity
- Never modify tests, expected outputs, snapshots, or fixtures to make checks pass. A failing test means the implementation is wrong until proven otherwise.
- Never weaken a check: no
Anyoras any,type: ignore,ts-ignore,noqa,eslint-disable, skip or xfail, loosened assertions, or broad exception handling that swallows errors. - Never change a function's output, signature, or return type just to satisfy a check. Fix the logic that produces it.
- Fix the root cause, not the symptom.
- Stop rule: if the same check still fails after 3 genuine attempts, stop. Report the exact error, what you tried and why each attempt failed, your root-cause hypothesis, and what you need.
- If you believe a test itself is wrong, do not edit it. Stop, explain why, and let the user decide.
- When resolving merge or rebase conflicts, preserve the intent of both sides.
Never take one side wholesale without explaining what the other side did and why it is safe to drop.
Run
scripts/verify.sh fullafter resolving.
Think before coding
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them; do not pick one silently.
- If a simpler approach exists, say so, and push back when warranted.
- If something is unclear, stop, name what is confusing, and ask.
- Before creating a component, model, schema, type, or utility, check the project's inventory and the code for an existing one and reuse it.
Design: quality and simplicity
Never choose a worse design to save effort, and never add complexity the requirements do not need. When two designs are equally sound, pick the simpler one. Development cost is not a reason to cut quality; speculative need is not a reason to add code.
- No features beyond what was asked.
- No abstractions for single-use code, and no flexibility or configuration that was not requested.
- No error handling for impossible scenarios, and never skip error handling for possible ones.
- Never optimize before profiling proves it is needed.
- If the same logic, constant, or validation appears twice, extract it once.
- One reason to change per module, class, or function; depend on abstractions and inject dependencies.
- Files should stay under about 200 lines; a longer file usually has more than one responsibility, so split it. Stack lint presets enforce this where the tooling supports it.
- Self-check: would a senior engineer call this overcomplicated? If yes, simplify.
Surgical changes
Every changed line must trace directly to the task. Why: diffs stay reviewable and every change stays traceable to the spec.
- Do not improve adjacent code, comments, or formatting, and do not refactor what is not broken.
- Match the existing style, even if you would do it differently.
- Remove imports, variables, and functions that your change made unused; leave pre-existing dead code alone.
- Unrelated problems you notice (lint, flaky tests, visual glitches, dead code) go into a list in your final report. Never fix them in the same change.
Goal-driven execution
Turn every task into a verifiable goal before starting, then loop until it is verified.
- Add validation: write tests for invalid inputs, then make them pass.
- Fix a bug: first reproduce it the way an end user experiences it, as end-to-end as practical, then write a test that fails for that reason, then make it pass. Why: reproducing it first proves you found the real problem.
- Refactor: tests pass before and after.
- For multi-step tasks, state the plan first, with a verification check for each step.
- Run
scripts/verify.sh fastafter each step andscripts/verify.sh fullbefore you report done, if the project has it. - When testing a user interface end to end, look closely at what you see. Anything that looks off goes into your report, even if it is unrelated.
Code quality
- Write code for the next developer, not just the machine.
- Name things for what they do, not how they do it.
- No commented-out code; git history keeps it.
- No TODO comments without an issue reference.
- No debug print or log statements in committed code.
- Never commit secrets, API keys, or credentials.
Writing
- Never use the em dash character; use a plain dash or a colon.
- In long Markdown files you write or substantially edit, put each full sentence on its own line while keeping normal Markdown structure. Why: line-based diffs stay readable.
- Never manually edit CHANGELOG files or files marked as generated.
Git
- Branches:
feature/,fix/,chore/,refactor/,docs/followed by a short description. - Commits follow Conventional Commits:
<type>(<scope>): <short description>. Types: feat, fix, chore, refactor, docs, test, style, perf; scope is optional. - One logical change per commit; do not bundle unrelated changes.
- Commit working code only; nothing that breaks the build.
- Never add an agent name as co-author in commit messages.
- Never commit or push directly to the main branch.
- Pull the latest main branch before starting a new branch.
- Pull request title uses the commit message format; the description says what changed, why, and how to test, and links the related issue if there is one.
- Every pull request gets a review from the reviewer agent before merge.
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.

