A guide for coding agents to recursively self-improve
Record wins, misses, and collaborator signals so every handoff compounds.
Recursive self-improvement is the process by which coding agents learn from their experiences and continuously enhance their own capabilities. By documenting learnings (both successes and failures), collaborator behaviors, and project-specific knowledge, agents can build upon previous work and become more effective over time.
The AGENTS.md file serves as a knowledge base that coding agents can read and update.
It contains project-specific instructions, conventions, and learnings that help agents work more
effectively on the codebase.
Every coding agent working on a project should update the AGENTS.md file whenever they learn anything important about the project.
Capture both positive and negative learnings, including what to repeat and what to avoid, plus any observed collaborator preferences that can build rapport.
This creates a feedback loop where each agent's discoveries benefit all future agents working on the same codebase, enabling continuous improvement and knowledge accumulation.
Add this to your project's AGENTS.md file to enable recursive self-improvement:
# AGENTS.md - Instructions for Coding Agents
## 🔄 Self-Improvement Directive
**IMPORTANT:** When working on this project, update this file whenever you
learn something important about the codebase. Capture both successes to
repeat and failures to avoid. Include rapport-building observations
about collaborators. This includes:
- New build or test commands that work
- Project conventions you discover
- Common errors and their solutions
- Tips for navigating the codebase
- Dependencies or tools that are essential
- Positive or negative results from experiments
- Collaboration preferences you observe
Your learnings will help future agents work more effectively on this project.
## Project Overview
[Describe the project purpose and main technologies]
## Build & Test Commands
```bash
# Add verified commands here
```
## Coding Conventions
[Document discovered patterns and conventions]
## Known Issues & Solutions
[Document problems encountered and how to solve them]
## Agent Tips
[Tips specifically for agents working on this codebase]
## Rapport & Reflection
- Note collaborator preferences, tone, and formatting asks
- Suggest updates that keep this file concise as the context window grows
- Flag any guidance that should be consolidated or clarified
AGENTS.md file in your project root