Compile product Markdown into executable Kane CLI browser checks, inspect sealed .evidence archives, and repair documentation drift and backend regressions in one loop.
Live App: claimcheck-nu.vercel.app
Product documentation rots quietly. A frontend PR renames "Generate API Token" to "Create Secret Key", or a backend deploy breaks POST /api/sandbox/export with an HTTP 500 error. Your CI suite stays green because unit tests mock the API, and your README.md stays untouched until a new developer follows the quickstart and hits a dead button.
Existing test runners tell you a step failed. They do not tell you whether the documentation fell behind a working UI change (Doc Drift) or the application code broke underneath accurate docs (Code Regression).
ClaimCheck pairs a line-anchored Markdown compiler with a forensic .evidence archive inspector and patch generator:
-
Compiles Markdown into
*_test.mdSpecs (src/core/claimCompiler.ts) Reads numbered and bulleted onboarding steps directly fromREADME.mdordocs/*.md, records the exact 1-based line number of every claim, and emits a runnablekane-cli testmd runspecification with YAML frontmatter and browser assertions. -
Unpacks Sealed
.evidenceArchives (src/core/evidenceParser.ts) Parses real.evidencezip archives produced bykane-cli v0.10.5in headless Chrome (run.yaml,failure.yaml,result.yaml,steps/*/step.json,annotated.png,*-network.har,*-console.ndjson, and*-actions.ndjson). -
Separates Doc Drift from Code Regressions (
src/core/evidenceParser.ts) Compares the intended Markdown target againstactions.ndjsonselector records, step-levelfailure.yamlroot-cause analysis, and HAR network status codes:- Doc Drift: The browser step succeeded against a renamed UI control (
"Create Secret Key"instead of"Generate API Token"on line 6). ClaimCheck prepares a line-anchored Markdown PR diff. - Code Regression: The browser step triggered an HTTP 5xx response (
POST /api/sandbox/export -> 500) or an uncaught console error. ClaimCheck packages the failing endpoint, HAR payload, console trace, and DOM locator into a coding-agent repair prompt.
- Doc Drift: The browser step succeeded against a renamed UI control (
-
Verifies Closure (
Exit 1 -> Exit 0) (src/core/patchEngine.ts) Applies the documentation patch and target route fix, re-runs verification against the live target, and records a Before/After closure receipt.
Edit product Markdown on the left, inspect extracted line-anchored claims, and copy or download the compiled *_test.md specification on the right. Drop any .evidence zip from disk onto the archive dropzone to parse and inspect it immediately.
Step through every browser action captured in the .evidence archive. Each step links back to its source line in README.md and displays the extracted annotated.png frame. Enable the 2.0x Optical Reticle to inspect target selectors at pixel level, or switch across the synchronized network.har, console.ndjson, run.yaml / failure.yaml, and executed test.md tabs. HTTP 4xx/5xx faults sort to the top of network.har automatically.
Review the split diagnosis for any failing run:
- Left column (Doc Drift Patch): Unified diff for
README.mdreplacing stale button labels with the verified live selector and embedding the step screenshot reference. - Right column (Code Regression Repair Bundle): Ready-to-run prompt for Claude Code, Cursor, or Windsurf containing the exact failing route, HTTP status, HAR response body, and acceptance criteria.
Click Apply Closed-Loop Repair & Re-Verify to patch the suite, fix the sandbox regression, and run live re-verification to confirm Exit 1 -> Exit 0.
ClaimCheck ships with a self-contained light-mode target application (Vellum Cloud Console) at /sandbox. Use the fault control bar at the top of /sandbox to toggle UI label drift ("Create Secret Key" vs "Generate API Token") or trigger the POST /api/sandbox/export HTTP 500 serializer fault, then run Kane CLI against it to watch the full detection and repair cycle.
- Node.js
20+ - Optional for local headless browser execution: Google Chrome or Chromium, plus a TestMu AI KaneCLI profile (
kane-cli loginorLT_USERNAMEandLT_ACCESS_KEYexported in your shell).
# Clone the repository
git clone https://github.com/Pizzylee001/ClaimCheck.git
cd ClaimCheck
# Install dependencies
npm install
# Run the unit and real .evidence archive test suite (6 tests)
npm test
# Type-check and build the production bundle
npm run lint && npm run build
# Start the full-stack Express + Vite server on http://localhost:3000
npm run devExport your TestMu AI credentials in your terminal before starting the server (never commit credentials to .env or git):
export LT_USERNAME="your_testmu_username"
export LT_ACCESS_KEY="your_testmu_access_key"
# Optional if Chrome/Chromium is installed in a non-standard path:
export KANE_CLI_CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
npm run devWhen /api/health detects both Chrome and Kane CLI credentials (runtimeMode: "local-cdp"), clicking Run Kane Check in the top bar executes:
npx --yes @testmuai/kane-cli@0.10.5 testmd run <suite_test.md> \
--headless --agent \
--bug-detection continue \
--assertion-failure-mode continue \
--no-adaptive-healClaimCheck streams the live CLI output over NDJSON, locates the newly sealed .evidence archive in ~/.testmuai/kaneai/sessions, and loads it directly into the Run Inspector.
ClaimCheck/
├── api/
│ └── index.ts # Vercel serverless Express entry point
├── docs/
│ └── screenshots/ # 1440x900 captures of all 4 routes
├── public/
│ └── samples/
│ ├── baseline-fail.evidence # Real kane-cli v0.10.5 Exit 1 archive (drift + 500 fault)
│ └── repaired-pass.evidence # Real kane-cli v0.10.5 Exit 0 archive (verified pass)
├── server/
│ ├── api.ts # REST endpoints & NDJSON runner stream (/api/*)
│ └── store.ts # In-memory suite, run, and sandbox state store
├── src/
│ ├── components/
│ │ ├── AppShell.tsx # Header navigation & live NDJSON stream dialog
│ │ ├── ClaimTopology.tsx # Interactive 5-stage SVG signal schematic
│ │ └── OpticalReticleFrame.tsx # Step frame viewer with 2.0x pixel loupe
│ ├── core/
│ │ ├── claimCompiler.ts # Line-anchored Markdown -> _test.md compiler
│ │ ├── evidenceParser.ts # JSZip + js-yaml .evidence archive parser
│ │ ├── patchEngine.ts # Unified PR diff & agent repair prompt builder
│ │ ├── types.ts # Shared TypeScript interfaces
│ │ └── claimcheck.test.ts # Node test suite (pure logic + real .evidence zips)
│ └── pages/
│ ├── SuitesPage.tsx # /suites route
│ ├── RunInspectorPage.tsx # /runs/:runId route
│ ├── PatchStudioPage.tsx # /repair/:runId route
│ └── SandboxPage.tsx # /sandbox target console route
├── server.ts # Express + Vite server entry point (port 3000)
├── vercel.json # Vercel build and SPA/API rewrite configuration
└── LICENSE # MIT License
vercel.json and api/index.ts configure both the React SPA and the Express /api/* endpoints for Vercel:
- Import
Pizzylee001/ClaimCheckin Vercel. - Keep the default build command (
npm run build) and output directory (dist). - Click Deploy. On Vercel serverless functions (where a local Chrome binary is not present), ClaimCheck parses the bundled and uploaded
.evidencearchives and runs live HTTP + DOM contract probes against/sandbox.
Built by Pizzy Lee for the KaneCLI Online Hackathon.
Released under the MIT License.



