Recording the codebase
Built for TestSprite Season 47 turns · 28 samples

See what the AI builds.Know when it breaks it.

Ghost records every agent turn, blames the exact prompt that introduced the regression, and rolls the file back in one click.

Session
sess-demo-001
Agent
OpenCode
Turns
07
Memory
+38 MB / sample
Blame
turn 4
Scroll to record
The bottleneck

AI moved the bottleneck from writing code to understanding it.

A pull request can be green on types and still leak memory, spin the CPU, or add 400ms to p95 latency. Existing tools each answer one question.

Ghost answers the one that matters after the fact.

01 / CI · types

Does it compile?

Green. The regression still ships.

Types · lint · build
02 / TestSprite

Does the PR break the app?

Red. You know something broke. The suite stops the merge.

Required check · deployed URL
03 / Ghost

Which turn broke it — and how do I undo it?

The prompt, the diff, and the rollback. In one recording.

Blamed on turn 4 · healed

One tower flickers. That is the regression.

The loop

Record. Attribute.
Reverse.

01 / Record

Record

A shadow git commit per change burst. Runtime metrics sampled from /api/health. An HTTP probe for latency and errors.

  • Shadow commit
  • HEAD untouched
  • 7 turns · 28 samples
02 / Attribute

Attribute

Threshold check. Trend slope. A per-turn bisect. Ghost names the exact turn that introduced the regression.

  • Turn 4 · invoices.ts
  • +38 MB per sample
  • leak · high
03 / Reverse

Reverse

Roll the blamed file back to the pre-regression commit. Re-measure. Watch the curve flatten.

  • One click
  • Re-measured
  • healed
record / shadow gitsess-demo-001
07turns recorded
28 samples · 4 / turn
t1
t2
t3
t4
t5
t6
t7
shadow commitsHEAD untouched
Scroll to advance
Autopsy

The timeline is the interface.

Seven turns, one red line, one file to roll back. Every number comes from the app, not from what the agent says it did.

7 turns · 28 samples · blamed on turn 4

session / 7 turnssess-demo-001
t1Add a REST endpoint to list invoices for the current user.user
t2Created GET /api/invoices returning owner-scoped invoices. Added the route handler and a typed store.AI
t3Invoice lookups are slow under load. Add an in-memory cache to speed them up.user
t4Added a module-level Map cache in front of the invoice store. Hits bypass the DB read.regression
t5The server keeps running out of memory after a few minutes. Diagnose and fix it.user
t6Root cause: the cache grows unbounded. Added a max-size LRU eviction so memory stays flat.AI
t7Now render the codebase as a 3D city so I can see what you built.user
t4 / 7
runtime / rssleak
+38MB / sample

turn 4 · src/store/invoices.ts

peak rss396 MB
peak cpu40%
source/api/health
diff / blamed turn+4 −0
src/store/invoices.tst4 · assistant
const cache = new Map<string, Invoice>();
export function getInvoice(id: string, userId: string) {
if (cache.has(id)) return cache.get(id)!;
const inv = store.get(id); cache.set(id, inv); return inv;
}
fix promptcopy / replay

Add a bounded LRU eviction (e.g. clear or shift when size exceeds a cap) to src/store/invoices.ts and re-run the memory regression check.

turn 4 · file restored
Resident memory climbs ~38 MB per sample with no plateau after the cache landed.
The same recording, rendered as a city. Height is churn. Color is health.Open the live playground

Agent-agnostic by design

CursorClaude CodeCodexOpenCodeor a human with a keyboard
Proof

The check at the merge is not the autopsy.

TestSprite tells you the PR is red. Ghost tells you which prompt turned it red. Both belong in the loop.

23 backend tests + 1 integration flow. Every pull request. The deployed URL.

Which tool answers which question
QuestionCI / typesTestSpriteGhost
Does it compile?GreenNot its jobNot the question
Does the PR break the app?UnknownRed or greenRed or green
Which turn broke it — and how do I undo it?NoNoThe prompt, the diff, the rollback
TestSprite 3.0Required check
0/24
Green · suite passes
  • 24 tests: 23 backend tests + 1 integration flow.
  • The PR check reruns the backend set on every pull request, against the deployed URL.
  • PR #1 shipped a BOLA hole. PR #2 fixed it. Same suite, green.
PR #1 · BOLA caughtPR #2 · fixed · suite green
Quickstart

Point it at the repo.
Press record.

No agent SDK. No lock-in. Ghost watches the filesystem and the process, so every tool produces the same recording.

01Install the recorder
One curl line (macOS, Linux, Windows) drops the ghost CLI into ~/.ghost without npm. Requires Node ≥ 18.
02Connect OpenCode (Mode A)
Two commands (typed by the terminal on the right): create the plugin folder, copy the one-file adapter in. OpenCode then reports every turn boundary to the recorder, so the timeline uses real turn ids.
03Watch yourself record
Run ghost watch (and run your app separately - the recorder probes its /api/health). Ghost Studio opens instantly at localhost:5417: real turns, files + churn, runtime samples. With the 3D playground too: npm run dev in the dashboard repo and open /playground?live=1 - your recording builds the code city live.
04Inspect, blame, heal
Scrub the tape in the playground, read the autopsy verdict naming the turn that broke it, copy the heal prompt to your agent - or roll the file back in one click. ghost setup pairs your device for metadata-only sync to Ghost Cloud.
Facts from /api/healthShadow git onlyLocal by defaultMetadata-only sync
Skip setup, open the replayFull setup docs
ghost — ~/ghostinthecodebasezsh
No agent SDK. No lock-in. Ctrl+C to stop.
The layer behind the maker

Every regression
has a turn.
Find it.

See what the AI builds. Know when it breaks it. Then roll the file back and watch the curve flatten.

Built for TestSprite Season 4 · 24-test suite required check