Backthread

Backthread captures how your codebase works from your AI agent sessions — the why behind every change — and teaches it back to the team as a living 'How it works' view you can actually query.
npx backthread
One command, the whole setup: signs you in (one browser click), connects this repo, wires up automatic capture, and hands you the link to your live "How it works" view. Re-run it anytime — it's idempotent.
In Claude Code? /plugin marketplace add backthread/backthread → /plugin install backthread@backthread → /backthread:start. The plugin bundles the CLI, so there's no separate npm step.
What it is
You delegate code to an agent (Claude Code, Cursor, Codex). It ships. You skim the diff, approve, move on. Three or four weeks later you own a codebase full of decisions you nominally made but never actually internalized — and now debugging is slow and every refactor is a coin flip.
Backthread captures the why behind each change straight from your agent sessions — the trade-offs, the rejected approaches, the "we did it this way because…" — and turns it into a living "How it works" view of your system: a diagram + changelog at app.backthread.dev, plus a how command you can ask right from the terminal. Try the live demo.
Your source code never leaves your machine unredacted — that's the whole point, and it's auditable right here.
When to use Backthread
- You're a founder or CTO who's been vibecoding with an agent for weeks and can no longer fully explain your own system.
- Your team ships agent PRs faster than anyone can actually review them, and nobody holds the whole architecture in their head anymore.
- You're about to refactor or debug a part of the codebase you didn't write by hand and need the why before you touch it.
- You want to onboard a teammate (or your future self) to how a system works without a week of PR archaeology.
- You want to ask "how does auth work?" or "why is billing structured this way?" and get a cited answer from your own history — not a fresh guess.
Backthread vs. the alternatives
You already have ways to reconstruct the why. They just don't keep up with agent velocity:
- vs. re-reading PRs & commit archaeology — the diff shows what changed, never why — and at agent speed there are far too many to read. Backthread captures the why as it happens.
- vs. re-interrogating the agent — a fresh session doesn't remember last month's reasoning; it re-derives (and re-hallucinates) it. Backthread keeps the actual decision, dated and cited.
- vs. docs that rot the day they're written — hand-maintained docs drift the moment the next PR lands. Backthread's view is rebuilt from your real history, so it tracks the code instead of lying about it.
Backthread isn't a code-review tool — it lives above the diff, on the architecture.
Quickstart
npx backthread # sign in + connect this repo + wire up capture (~60 seconds)
That's the whole setup. From then on Backthread captures the why behind each session automatically. Then, whenever you're lost:
backthread how "how does auth work?" # a grounded, cited answer from your own decision log
…and open your live "How it works" view at app.backthread.dev.
Not sure what's wired up? npx backthread doctor tells you exactly what's set up and what isn't.
Commands