Troubleshooting Common Issues
Common problems when creating AGENTS.md files and their solutions.
Issue: Unclear Monorepo Structure
Problem: Complex repository with unclear package boundaries or mixed patterns Symptoms:
- Packages have different tech stacks
- Unclear which directories need own AGENTS.md
- Multiple build systems in use
Solution:
- Start with root AGENTS.md only
- Add sub-files iteratively based on usage
- Use JIT index approach to defer complexity
- Focus on most-used packages first
Fallback: Create minimal root file pointing to package-specific documentation
Issue: Too Many Local Skills to Reference
Problem: Project has 10+ local skills, overwhelming to list all Symptoms:
- Skills list dominates AGENTS.md content
- Unclear which skills apply to which scenarios
- Maintenance burden keeping list updated
Solution:
- Group skills by category (testing, deployment, etc.)
- Create skill index files in a local index directory (e.g.,
docs/agents/) - Reference index files, not individual skills
- Use conditional loading based on file types
Example:
## Local Skills
- Frontend: See `docs/agents/frontend-index.md`
- Backend: See `docs/agents/backend-index.md`
- DevOps: Use `deployment` skill for CI/CD tasks
Issue: Mixed Technology Stacks
Problem: Repository contains Python, Node.js, Go, etc. with different patterns Symptoms:
- Universal conventions don’t apply
- Different package managers and build tools
- Language-specific patterns conflict
Solution:
- Create language-specific subdirectory AGENTS.md files
- Keep root file minimal with routing only
- Use technology-specific templates from references/
- Avoid forcing universal patterns
Structure:
AGENTS.md (routing only)
services/api-go/AGENTS.md (Go-specific)
services/web-node/AGENTS.md (Node.js-specific)
Issue: Existing Documentation Conflicts
Problem: Project already has README files, wiki pages, or other docs Symptoms:
- Information duplication
- Conflicting instructions
- Unclear which source is authoritative
Solution:
- Reference existing docs, don’t duplicate
- Focus AGENTS.md on AI-specific needs
- Link to authoritative sources
- Avoid project overview content
Pattern:
## Architecture
See [Architecture Decision Records](docs/adr/) for design decisions
## API Documentation
Authoritative API docs: [OpenAPI spec](api/openapi.yaml)
Issue: Frequent Changes Break Documentation
Problem: AGENTS.md becomes outdated quickly due to rapid development Symptoms:
- File paths in examples no longer exist
- Commands don’t work
- Build process changed but docs didn’t update
Solution:
- Use patterns instead of specific examples where possible
- Reference configuration files instead of hardcoding values
- Focus on stable patterns, not volatile implementation details
- Add validation checks to CI/CD
Stable patterns:
# Good - pattern-based
- Components: `src/components/**/*.tsx`
- Tests: Colocated `*.test.tsx`
# Bad - specific examples that break
- Button: `src/components/Button/Button.tsx`
- Modal: `src/components/Modal/Modal.tsx`
Issue: Team Disagreement on Conventions
Problem: Team members want different approaches documented Symptoms:
- Conflicting style guides
- Multiple “right ways” to do things
- AGENTS.md becomes battleground for opinions
Solution:
- Document current patterns, not ideal patterns
- Show examples from existing codebase
- Avoid prescriptive language (“should”, “must”)
- Focus on consistency over perfection
Approach:
## Current Patterns
- New components: Follow `src/components/Button/` structure
- Legacy components: See `src/legacy/` - avoid this pattern
- State management: Redux Toolkit (see `src/store/`)