v1.1 · Agent Skill

You've built something awesome.

Now get the documentation in order.


RetroPRD reads your git history and agent session transcripts, then generates PRDs, ADRs, and sets up a builder OS, all in one pass.

$ npx skills add yagneshlp/retroprd

Works with Claude Code · Codex CLI · Cursor · Gemini CLI

You code faster than you document.

That's not a flaw. It's how good builders work. RetroPRD fills the gap retroactively, from evidence that already exists in your repo.

01

Context leaks between sessions

You sit down tomorrow and spend 30 minutes reconstructing what you were thinking today. Multiply that by every session, every project. It compounds into real time lost.

02

AI agents start cold every time

Claude Code, Cursor, and Codex read your code, not your intent. Without structured context files, every new session hands your agent a blank slate. The more you build, the more gets left behind.

03

The "why" disappears on handoff

Tradeoffs, rejected approaches, architecture decisions: they live in your head during the build. Handoffs start without them. The code survives. The reasoning doesn't.

RetroPRD treats your git history and session transcripts as primary sources. One command reads, classifies, and reconstructs: the PRDs, ADRs, and context files your project should have had from day one. No rewriting history. Just surfacing it.

AI continuity Each new agent session picks up exactly where the last one ended. No re-explaining, no re-reading.

Onboarding in hours New contributors read the PRD trail and understand the project's full arc — decisions, tradeoffs, and all.

Permanent decision trail Every architectural choice is documented with context, alternatives considered, and consequences. The "why" never gets lost.

One run. Complete coverage.

Every artifact a well-documented codebase should have — generated from what already exists.

PRD .prd/NNN-*.md

Product Requirements Docs

One per feature, bug fix, or infra change. Chronological, with reconstruction confidence markers.

ADR .dev/decisions.md

Architectural Decisions

Every technical decision with context, alternatives considered, and consequences. Reconstructed from code and commits.

Session .context/session.md

Session Handoff

Current product state, open items, and suggested next priorities — ready for the next agent to pick up.

Backlog .context/backlog.md

Backlog

Deferred items, known bugs, and ideas surfaced during the archaeological dig. Nothing gets lost.

AGENTS AGENTS.md

AGENTS.md Fill-in

Populates your builder OS scaffold with real product context: build phases, conventions, and key learnings.

Index .prd/README.md

PRD Index

A master changelog of everything shipped, typed and dated — built for both agent and human readability.

Run it once. Every session after starts warm.

RetroPRD doesn't just generate docs. It wires up the infrastructure that makes every future agent session context-aware from the first message — automatically, permanently.

Without RetroPRD

  • Agent starts with zero context
  • You re-explain the architecture
  • You re-explain why decisions were made
  • You re-explain what's done and what's next
  • Agent finally starts building

Repeated every session, forever.

vs

After one /retroprd run

  • Agent reads AGENTS.md — full product context
  • Agent reads .context/session.md — current state
  • Agent reads .dev/decisions.md — decision trail
  • Agent reads .prd/ — complete feature history
  • Agent starts building immediately

Every session, without any extra work.

Why it's permanent

Claude Code, Cursor, Codex, and Gemini CLI all read AGENTS.md and the context files in your repo at session start — it's a shared convention across all major coding agents. RetroPRD fills those files with real content from your actual build history. That's the entire mechanism. One run, and documentation capability is baked into every agent session going forward.

Harness switching

Hit a token limit. Switch agents. Keep building.

Context lives in your repo, not in any model's window. When one agent's context window fills, switch to another — it reads the same files and picks up exactly where the last one stopped. Burn through limits freely. Nothing is lost between handoffs.

Claude Code
context limit reached
Cursor
context limit reached
Codex CLI
context limit reached
Gemini CLI
building...
repo context complete throughout: .context/session.md · .prd/ · .dev/decisions.md · AGENTS.md

Five phases. No guesswork.

A structured process designed to surface evidence before writing anything.

0

Orient

Reads existing scaffold files — AGENTS.md, README, .prd/ — before touching anything. Understands your conventions first.

1

Archaeological Dig

Three evidence layers: git log and diffs, agent session transcripts (Claude Code, Codex CLI), and direct code reading for intent.

2

Classify

Groups related commits into PRD-sized units. A feature spread across four commits becomes one PRD, not four.

3

Write PRDs

Produces dated, typed PRDs with problem, change, and files sections. Each carries a confidence marker: High, Medium, or Low.

4

Populate Scaffold

Fills in session.md, backlog.md, decisions.md, and AGENTS.md TODO sections with real context from the dig.

5

Debrief

Summarises what was reconstructed, confidence levels, gaps, and what needs builder verification — then reminds you to commit.

Works where you work

Reads each agent's native transcript format. No manual export required.

Agent Transcript location Notes
Claude Code ~/.claude/projects/<hash>/sessions/*.jsonl Full support · --synthesize flag
Codex CLI ~/.codex/sessions/**/*.jsonl Also reads ~/.codex/memories/
Any agent --transcript /path/to/file.jsonl Generic JSONL parser

Get started in 30 seconds

Via npx

npx skills add yagneshlp/retroprd

Manual — project-local

cp -r skills/retroprd .claude/skills/

Manual — global

cp -r skills/retroprd ~/.claude/skills/

Then use it in your agent

/retroprd                   # Full run — git dig + PRDs + all scaffold files
/retroprd --prds-only       # Just generate PRDs
/retroprd --scaffold-only   # Just populate AGENTS.md and context files

Or just say: "Document what I've built so far"