docs: make AGENTS.md the only agent guide, restructured into five sections

AGENTS.md now holds the instructions and CLAUDE.md and GEMINI.md are
pointers to it. Three files of instructions become three files that
disagree; one file every agent reads cannot.

The content is reorganised rather than rewritten, into: the invariants,
the guards that fail the build, the validation this codebase deliberately
does not perform, the environment, and where to read next. Every guard
now names the test that catches it, and the two rules with no test behind
them are called out as such, because "only review catches this" is
information the reader needs.

Restructuring surfaced one rule that was missing here entirely — sw.js
must stay unhashed and be served no-cache — which had only ever been
written down in ARCHITECTURE.md.

Dropped: the `bun init` boilerplate code samples. Every rule they carried
is still stated; the hello-world test and the three frontend snippets are
not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lucas Winther
2026-09-02 21:57:38 +02:00
co-authored by Claude Opus 5
parent d83edccc79
commit 824c2f5f59
13 changed files with 227 additions and 263 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ interface Props {
* Shape AND range, matching the import validator. `setRuleFrom` sorts the
* series with `compareMonths`, which THROWS on a malformed MonthId; useMutate
* would catch it and show an error, but a disabled button is the better
* answer, and CLAUDE.md requires guarding a throwing domain call at the site
* answer, and AGENTS.md requires guarding a throwing domain call at the site
* that invokes it from a handler.
*/
const MONTH_ID = /^\d{4}-(0[1-9]|1[0-2])$/;