Golden Rules
These rules define the minimum repository hygiene expected for agent-first development in Routa.js.
Documentation Rules
- Put durable knowledge in
docs/, not in chat transcripts or oversizedAGENTS.mdprose. - Keep one canonical home for each type of knowledge.
- Update indexes when creating a new durable documentation area.
- Prefer short, stable documents over sprawling mixed-purpose notes.
- When migrating older material, preserve provenance and avoid parallel copies.
Architecture Rules
- Treat
docs/ARCHITECTURE.mdas the top-level architecture contract unless a narrower canonical doc supersedes a subsection. - Preserve dual-backend semantic parity unless an intentional divergence is documented.
- Favor explicit system boundaries and contracts over implicit behavior.
- Encode recurring architectural constraints in code checks when possible.
Delivery Rules
- Break broad epics into implementation-sized plans before coding.
- Record failures in
docs/issues/before or alongside fixes when the issue is non-trivial. - Keep execution plans short-lived and move them to
completed/when shipped. - Prefer baby-step changes that reduce drift rather than large speculative reorganizations.
Agent Readability Rules
- Use descriptive filenames and direct paths.
- Use headings that describe intent, not vague themes.
- Put actionable constraints near the top of the document.
- Avoid mixing normative guidance, brainstorming, and historical notes in the same file unless sections are clearly separated.
Enforcement Direction
Some rules are social today and should become mechanical over time.
Candidate follow-up checks:
- detect missing
docs/index links for new durable doc areas - detect stale references to moved canonical documents
- detect legacy
.kiro/specs/copies that were duplicated intodocs/without provenance - score doc freshness and architecture coverage as part of fitness