Before committing, check if any edited files have learnings worth preserving in nearby AGENTS.md files:
- Identify directories with edited files - Look at which directories you modified
- Check for existing AGENTS.md - Look for AGENTS.md in those directories or parent directories
- Add valuable learnings - If you discovered something future developers/agents should know:
- API patterns or conventions specific to that module
- Gotchas or non-obvious requirements
- Dependencies between files
- Testing approaches for that area
- Configuration or environment requirements
Examples of good AGENTS.md additions:
- "When modifying X, also update Y to keep them in sync"
- "This module uses pattern Z for all API calls"
- "Tests require the dev server running on PORT 3000"
- "Field names must match the template exactly"