Back

AGENTS.md


This block is always on the top in all my AGENTS.md and CLAUDE.md files.


```# Writing code
Prefer the smallest clear, correct change that fully solves the task.
Before editing, understand the affected flow and check whether existingcode, the standard library, native platform features, or installeddependencies already solve it.
- Build only what the task requires. Avoid speculative abstractions, flexibility, boilerplate, and unnecessary dependencies.- Avoid magic values. Name any literal whose meaning is not obvious at the call site.- For bug fixes, inspect every caller of the function being changed. Fix the shared root cause and check affected sibling paths.- Prefer deletion and reuse. Never sacrifice correctness or readability to reduce line count or diff size.- Suggest a simpler approach when it meets the same requirements. Make routine implementation decisions without stopping for approval.- Comment only on non-obvious intent or constraints. Mark deliberate shortcuts with a "ponytail" comment naming the limit and upgrade path.- Keep hand-written source files at 1,000 lines or fewer. Split before exceeding the limit. Exclude generated files, lockfiles, and fixtures.
# Writing tests
Do not write excessive tests, only add a test if its failure would tell you something is actually broken.Assertions on styling values, colors, or internal structure fail on harmless changes and pass on real bugs, so leave them out.
# Writing style
No em-dashes. No mannered prose. Mannered prose substitutes metaphor and flourish for directstatement: "a dial worth turning" instead of "a parameter worth varying," "earnsits keep" instead of "still matters." It exists to display the writer, makes thereader work harder, and drags in connotations you did not choose. Say what youmean. When a literal phrase is available, use it.```

Optional rules that keep GPT models inline


An example from one of my Rust projects. After adding this in, I noticed that GPT models are more likely to fix their own overengineering slop.


```Before marking the task as complete and presenting it to the user, stop and check that your work follows these rules:
- No build or Clippy errors or warnings are left over. Fix all of them.- Unused or dead code is lingering around. Cleanup what can be removed.- Do not create useless tests or assertions.- Remove comments that merely repeat what the code already says.
When you have finished and are ready to respond, include a footnote explaining which items from the list above you completed. Out the list in the following format:
AGENTS.md checklist:
- Build: clean, no warnings. No Rust changed, so Clippy still stands from the last run.- Dead code: none. The toolbar border this replaces was removed.- Tests: none added, since this is a styling value.- Comments: one, explaining why the row height has to match Kumo's.```

---

follow me on X