AGENTS.md
Language & Communication
- All documentation, code, comments, and interaction must be in English
- Even if user communicates in Spanish, respond in English
Project Structure
Credentials
- Store all secrets in
.envat project root - Never commit credentials -
.envmust be in.gitignore
Knowledge Base
- Project-specific discoveries go in
doc/resources.md - Update it when you learn something new about the codebase or dependencies
Workflow Orchestration
1. Plan Mode Default
- Enter plan mode for ANY non-trivial task or architectural decision
- Write plan to
tasks/todo.mdwith checkable items - If something goes sideways, STOP and re-plan - don't keep pushing
- Check in with user before starting implementation
2. Subagent Strategy
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis
- One coherent scope per subagent for focused execution
- For complex problems, throw more compute at it
3. Self-Improvement Loop
- After ANY correction from user: update
tasks/lessons.mdwith the pattern - Write rules that prevent the same mistake recurring
- Review lessons at session start
4. Verification Before Done
- Never mark a task complete without proving it works
- Run tests, check logs, demonstrate correctness
- Verify no Pylance/linter errors before finishing
- Diff behavior between main and your changes when relevant
5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky, implement the proper solution
- Skip this for simple, obvious fixes - don't over-engineer
6. Autonomous Bug Fixing
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests - then resolve them
- Fix failing CI tests without being told how
Testing
- Modify test scripts whenever you change functionality
- Never consider a task done without running tests
- Zero tolerance for skipped verification
Task Management
- Plan First: Write plan to
tasks/todo.mdwith checkable items - Verify Plan: Check in before starting implementation
- Track Progress: Mark items complete as you go
- Explain Changes: High-level summary at each step
- Document Results: Add review section to
tasks/todo.md - Capture Lessons: Update
tasks/lessons.mdafter corrections
Core Principles
- Simplicity First: Make every change as simple as possible
- No Laziness: Find root causes. No temporary fixes. Senior developer standards.
- Minimal Impact: Changes should only touch what's necessary
- Prove It Works: Verification is mandatory, not optional