type: rule
status: active
timestamp: 2026-07-02
tags: [agent, agents-md, hygiene, living-doc, workflow]

AGENTS.md is a living doc — update when patterns recur

AGENTS.md is not written-once. When a recurring issue surfaces during development (tool quirk, banned pattern, style rule), update AGENTS.md before moving on. Solve once, document, forget.

AGENTS.md is a living doc

The rule

AGENTS.md is not a one-time write. When a pattern recurs during development, UPDATE AGENTS.md before moving on to the next feature.

Solve once → document → forget. Never fight the same issue twice.

Trigger: what counts as “recurring”

Update AGENTS.md when:

The update mechanic

  1. Note the issue as it happens (in a scratch section or inline)
  2. At the natural stopping point (end of feature, before next prompt), edit AGENTS.md
  3. Add a one-liner under the relevant section (Style Rules / Stack Rules / Anti-Patterns)
  4. Continue the next feature — the AI now reads the updated AGENTS.md and skips the issue

Example

Situation: NativeWind class-name prop doesn’t work on <SafeAreaView>. AI keeps generating class-name-only styles that silently fail.

Update: Add to AGENTS.md under Style Rules:

### Style Rules
- Use NativeWind classes (className prop) for all styling
- EXCEPTION: SafeAreaView does not support className. Use StyleSheet for it.

Now: AI reads this every prompt. Issue never returns.

Anti-patterns

When to also propagate to knowledge/

If the recurring pattern is:

AGENTS.md size discipline

AGENTS.md should grow slowly. If it’s ballooning past ~500 lines:

Target: AGENTS.md is skimmable in 60 seconds by a new agent.

Cross-refs


Edit on GitHub · Back to index