Static review first / optional rerun second

Agents create diffs. Surgeon creates proof.

Forensic Repo Surgeon turns a reproducible frontend bug report into a reviewer-trustworthy repair package: before evidence, a deterministic negative control, source localization, patch, after verification, run timeline, and a scorecard your CI can read.

Review First, Rerun Second

Start with static artifacts. Only run commands if you want to regenerate the proof bundle on a compatible machine.

Static review
1. Open the validation dossier
2. Read PR.md, reasoner.md, and evidence-manifest.md
3. Confirm scorecard.json, run.json, and doctor.json

Optional rerun
pnpm install
pnpm demo
Before evidence screenshot
Before evidence
After verification screenshot
After verification

Real User

A frontend engineer receives a bug report with a screenshot: the UI is visibly wrong, but the owner file and safe fix are not obvious.

  • Reproduce the state in browser
  • Map UI evidence back to source
  • Patch only the relevant component
  • Attach before/after proof to review

Proven Now

The current locked case is a real authenticated mobile drawer bug in cypress-realworld-app.

  • Top candidate: src/components/TransactionDateRangeFilter.tsx
  • Verification pass rate: 100%
  • Before negative control: passed
  • Artifact completeness: 100%
  • Reasoner provider: anthropic-messages-api (live model)
  • Reasoner model: claude-opus-4-7
  • Reasoner request id: req_011CaRqNdjdr9PnP8Au1qZWN
  • Verified same-target cases: 2
  • Cleanup: passed
  • Score is scoped to this case and these proof gates

Model Authorship — Date Range Drawer

Opus 4.7 ran inside the target repository through a Claude Code agent loop and authored a candidate patch using Read, Glob, Grep, and Edit tools. The deterministic verifier evaluated this patch against the same gates as the fixture patch.

Fixture Patch
passing
score 100 / human-authored baseline
Model Patch
passing
score 100 / claude-opus-4-7 via Claude Code SDK
  • Agent turns: 6
  • Tool calls: 2
  • Files read: 1 / Files edited: 1
  • Tokens: input 8 / output 3680
  • Wall clock: 49.6s / cost: $0.2292
  • Provider: claude-agent-sdk / model: claude-opus-4-7

Model Authorship — Onboarding Dialog

Opus 4.7 ran inside the target repository through a Claude Code agent loop and authored a candidate patch using Read, Glob, Grep, and Edit tools. The deterministic verifier evaluated this patch against the same gates as the fixture patch.

Fixture Patch
passing
score 100 / human-authored baseline
Model Patch
failing
score 92 / claude-opus-4-7 via Claude Code SDK
  • Agent turns: 6
  • Tool calls: 2
  • Files read: 1 / Files edited: 1
  • Tokens: input 8 / output 1853
  • Wall clock: 22.9s / cost: $0.1699
  • Provider: claude-agent-sdk / model: claude-opus-4-7

Honest Scope

One case is not enough to claim generality. Two same-target cases are enough to show the architecture expands without dropping the proof boundary.

  • Do not claim arbitrary repo support
  • Do not trust screenshots without assertions
  • Disclose the recorded reasoner provider truthfully
  • Models advise, verifiers decide
  • Do not add agents before phase boundaries
  • Do add cases through contracts and adapters

Capability Pipeline

1. CaseRoute, viewport, auth, repro steps, expected proof.
2. ReproducePlaywright reaches the failing browser state.
3. Fail FirstBefore-state assertions record the expected failure.
4. LocalizeRank files with inspectable evidence.
5. RepairApply a focused patch to the candidate file.
6. VerifyRerun assertions and score proof gates.

Expansion Without Breaking

Case contracts

Every new demo starts as a case file with target, workflow, viewport, auth, evidence, and assertions.

Target adapters

Repo-specific start, stop, patch, and health behavior stays behind adapters.

Assertion registry

New bug classes add reusable checks such as inside viewport, no overlap, visible, and no console regressions.

Reasoner phase

The reasoner explains evidence and proposes a fix, but deterministic proof gates still decide acceptance.

Scorecard gate

A case is not accepted unless artifacts, negative control, after verification, doctor checks, run status, and cleanup all pass.

Case Catalog

verified Authenticated mobile date-range drawer

Viewport clipping and scroll containment in a real React/MUI app.

verified New-user mobile onboarding dialog overflow

Second same-target case passed the same artifact, verification, doctor, and scorecard gates.

later Second React repo

Only after assertion registry and target adapter seams are stable.

Models Advise, Verifiers Decide

The reasoner proposes and explains. Deterministic verification, doctor, run timeline, and scorecard decide acceptance.

This recorded run used the Anthropic Messages API to generate the reasoner diagnosis from summarized evidence artifacts.

Recorded Run Environment

These checks describe the machine that produced this artifact bundle. They do not inspect the reviewer's current machine.

  • demo ports: Ports 3000, 3001 are free.
  • workspace drive: D:\Repo\ALL HACKATHONS\Cerebral Valley & Anthropic - Built with Opus 4.7 Claude Code hackathon has 17.2 GiB free.
  • target drive: D:\Repo\ALL HACKATHONS\Cerebral Valley & Anthropic - Built with Opus 4.7 Claude Code hackathon\.surgeon-targets\cypress-realworld-app has 17.2 GiB free.
  • target patch state: Target is in before-state and patch can be applied.