TRACE
TRACE is a living PRD for Claude Code.
Core trick
A PostToolUse hook logs each action, then a Stop hook runs three parallel sub-agents that propose confidence-scored PRD updates for review.
Description
TRACE is a living PRD for Claude Code.
Every engineer who uses Claude Code writes a plan, starts building, and watches the plan go stale within the hour. The PRD becomes a tombstone. The code is the only source of truth, and the why behind every tradeoff disappears into commit messages.
TRACE closes that loop. A PostToolUse hook captures every Claude Code action into a per-session log. After every turn, a Stop hook fires three Opus 4.7 sub-agents in parallel — one looks for decisions, one for assumptions validated or contradicted, one for open questions. Each returns a confidence-scored proposal. Confidence ≥ 0.5 lands in a review queue. The user accepts or skips in a minimal TUI, and accepted proposals write themselves into the right section of the PRD.
This repo's TRACE.md was written by TRACE itself — commit 797daaf is the moment TRACE first used TRACE to document itself.
README excerpt
<p align="center"> <img src="./trace-banner.png" alt="TRACE — Every decision traced from intent to ship. A Claude Code plugin." width="100%" /> </p> # TRACE **Every decision traced from intent to ship.** TRACE is a Claude Code plugin that turns your PRD into a living document. You scaffold intent at the start of a project. Claude Code executes against it, and the PRD writes itself back — logging decisions, surfacing contradicted assumptions, flagging new open questions as the build progresses. At the end of the session, the document matches what shipped, not what you hoped. Built for the [Built with Opus 4.7 hackathon](https://cerebralvalley.ai/e/built-with-4-7-hackathon). --- ## How it works TRACE runs as a set of Claude Code hooks: 1. **PostToolUse** captures every tool event into a per-session log. 2. **Stop** (fires after every turn) triggers a proposer that synthesizes the turn into proposed PRD edits. 3. The proposer runs **three Opus 4.7 sub-agents in parallel**, each reading the same events through a different lens: - **Decision** → Decision Log - **Assumption** → Assumption Ledger - **Question** → Open Questions 4. Proposals with confidence ≥ 0.5 land in `.trace/pending.jsonl`. 5. `trace-prd review` shows each proposal one at a time. `[a]` writes it into the right section of `TRACE.md`. `[s]` skips. Pure read-only turns produce no proposals. Each turn is watermarked, so the same events are never synthesized twice. --- ## Requirements - **Node.j