
Turn Agent Traces Into
Auto-Updating Playbooks
RetroCode reads your AI coding agent sessions and generates project-specific rules, statistical insights, and blast radius analysis -- automatically.
How RetroCode Works
A three-stage pipeline that turns raw agent conversations into actionable project-specific rules.
1. Ingest Traces
RetroCode reads session traces from Claude Code, Cursor, and Codex. It parses conversations into structured rounds, tracking every tool call, edit, and decision the agent made.
2. Reflect & Curate
Each session is analyzed individually by a Reflector that extracts patterns, mistakes, and strategies. A Curator then synthesizes insights across all sessions, adding, modifying, or removing playbook bullets.
3. Update Playbook
The curated insights are written back into your agent's config file (CLAUDE.md, .cursor/rules, or AGENTS.md) between safe markers. Your agent gets smarter with every session, automatically.
Everything You Need to Improve Your Agent
Three powerful capabilities that work together to make your AI coding agent learn from experience.
Auto-Updating Playbooks
Automatically generates and maintains project-specific rules from your agent sessions. The more you use your agent, the smarter it gets.
Hypothesis Generation
Statistically identifies behavior patterns that predict user rejection using chi-squared tests and odds ratios. Discover why your agent fails.
Blast Radius Monitoring
Web dashboard that estimates code edit impact by building dependency graphs and classifying files by risk tier.
Multi-Agent Support
Ingests traces from Claude Code, Cursor, and Codex. Outputs rules to any configured agent's config file seamlessly.
Simple CLI
One command to start. Run as a background daemon or one-shot. Supports offline mode, YAML config, and flexible provider selection.
Community Hypotheses
Submit discoveries, pull community-verified patterns, and contribute verification stats. Learn from every developer's agent experience.
Get Started in 30 Seconds
Three commands. That's all it takes. RetroCode works with your existing agent setup out of the box.
Install
git clone
https://github.com/RetroCode-Org/RetroCode
cd RetroCode && pip install -e .Set API Key
export COMMONSTACK_API_KEY=your_keyRun
cd ~/my-project
retro --offline --dir .All Commands
retro --offline --dir .Run once, update rules, exitretro --up --dir .Start background daemonretro --down --dir .Stop daemonretro --hypogen --dir .Find behavior patternsretro --monitor --port 8585Start blast radius dashboardretro --submit --dir .Submit discoveries to communityretro --pull --dir .Verify community hypotheses locallyWorks With Your Stack
Read traces from any supported agent. Write rules to any output. Choose your LLM provider.
Agent Compatibility
LLM Providers

Join the Community
Share hypotheses, contribute verification stats, and help build a collective understanding of what makes AI agents succeed.