RetroCode

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.

IngestTraces
ReflectAnalyze
PlaybookRules

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.

Core

Auto-Updating Playbooks

Automatically generates and maintains project-specific rules from your agent sessions. The more you use your agent, the smarter it gets.

Analytics

Hypothesis Generation

Statistically identifies behavior patterns that predict user rejection using chi-squared tests and odds ratios. Discover why your agent fails.

Monitoring

Blast Radius Monitoring

Web dashboard that estimates code edit impact by building dependency graphs and classifying files by risk tier.

Integration

Multi-Agent Support

Ingests traces from Claude Code, Cursor, and Codex. Outputs rules to any configured agent's config file seamlessly.

Developer Experience

Simple CLI

One command to start. Run as a background daemon or one-shot. Supports offline mode, YAML config, and flexible provider selection.

Community

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.

Step 1

Install

git clone https://github.com/RetroCode-Org/RetroCode cd RetroCode && pip install -e .
Step 2

Set API Key

export COMMONSTACK_API_KEY=your_key
Step 3

Run

cd ~/my-project retro --offline --dir .

All Commands

retro --offline --dir .Run once, update rules, exit
retro --up --dir .Start background daemon
retro --down --dir .Stop daemon
retro --hypogen --dir .Find behavior patterns
retro --monitor --port 8585Start blast radius dashboard
retro --submit --dir .Submit discoveries to community
retro --pull --dir .Verify community hypotheses locally

Works With Your Stack

Read traces from any supported agent. Write rules to any output. Choose your LLM provider.

Agent Compatibility

Claude Code
CLAUDE.md
Cursor
.cursor/rules/retro.mdc
Codex
AGENTS.md

LLM Providers

CommonStackFree credits for members
OpenAI
Anthropic
Google Gemini
OpenRouter
RetroCode Pilot

Join the Community

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