Self-verifying poll app where Kane CLI judges every commit in Chromium, traces app faults, and gates a 3-agent fix race before main merges.
Why It Broke is a browser-verified closed-loop workflow for a Node.js poll app, built for developers using AI coding agents who want proof that shipped changes actually work in a real browser—not just passing unit tests. The problem: AI agents pass unit tests in seconds yet still ship real browser bugs (double-click races, broken DOM state, stale docs). Worse, when a check fails without structured fault attribution, asking an agent to "make CI green" often weakens the test instead of fixing the app. How Kane CLI drives the loop: * A builder agent changes code under app/, updates source-hashed function explanations (AST-enforced npm run explain + npm run drift across 41 functions), and commits. * A Stop hook automatically runs npm run verify, booting a fresh local server and executing 4 owner-approved plain-English Kane CLI flows in real Chromium. * Kane seals every run with screenshots, HAR network logs, action logs, DAG diagrams, and a structured fault verdict (application_issue vs test/agent fault). * Only when Kane classifies a failure as an application_issue does the runner lock the repo and launch a 3-agent Factory Droid fix race in isolated git worktrees. Flows are locked so racers cannot cheat. * Kane verifies every racer independently across all 4 flows + drift, and nothing merges to main until Kane verifies the winning commit green again.
How the agent & Kane CLI talk to each other: * Commit → Stop hook runs npm run verify → Kane CLI executes flows/poll-create.md, poll-vote.md, poll-vote-once.md, and poll-create-once.md in Chromium while Node collects V8 coverage. * On an application_issue verdict, npm run race generates reports/races/0001/brief.md embedding Kane's exact verdict, root cause, culprit step, and 36-function V8 trace, then dispatches 3 Factory Droid racers (race/0001-a, b, c) in separate git worktrees. * Racers may only touch app/ and explain/. When finished, the runner verifies every branch with Kane CLI + npm run drift and writes comparison.md. npm run race:pick merges the winner and runs a final Kane verification before advancing main and releasing the lock. What Kane CLI actually caught (committed live run): * Report 0009 (commit b35d27f): All 166 unit tests passed and 3/4 flows passed, yet poll-create-once.md failed when double-clicking "Create poll". Kane returned application_issue / functional_defect / major at 0.98 confidence (culprit_step: 0-6). * Committed 0-network.har proved 2× POST /api/polls → 201 fired 0.58 ms apart (11:50:53.735581 & 11:50:53.736164), with 36 V8 functions traced directly to explain/. * Race 0001 produced 3 distinct green fixes: Attempt A (per-form submissionId idempotency + button lock), B (global 2s dedupe), C (per-voter 2s dedupe). Picking Attempt A (cb8d7c4) triggered green Report 0010 (4/4 flows pass, 73.05 credits, 1× POST /api/polls → 201). How judges can run it locally (zero credentials required): git clone [https://github.com/etvjay/broke](https://github.com/etvjay/broke) && cd broke && npm install && npm test && npm run drift && npm run site Fallback: All 10 committed verify reports (0001-0010), HAR/action/DAG artifacts, and race 0001 diffs are committed in-repo and live at https://etvjay.github.io/broke/. What's next: Support multi-browser matrices, automatic PR comment summaries with HAR timing diffs, and pluggable agent backends (Claude Code, Codex, Droid) racing side-by-side in the same worktree harness.
Built in two weeks for the KaneCLI Online Hackathon.
See the hackathon →