The cart contains three shirts. The header reports one.

Closed-loop repair / Kane native
Kane finds the bug.onred fixes it.
When checks go red, Onred repairs. Then Kane proves the fix.
02 / The failure
The code looked finished.
The browser disagreed.
Kane adds the same product three times. The total is correct. The header still reports one.
T-Shirt
$20
Your cart is empty.
03 / The diagnosis
Kane does not send logs.
It sends a repair brief.
The failed requirement becomes structured evidence: what happened, what should have happened, and why.
Header count must equal the sum of all product quantities.
The header adds one per product row instead of using each row's quantity.
app/cart/page.tsx · 01 file · no dependencies · no refactor
04 / The repair
One failure.
One file. One line.
The agent receives Kane's evidence and a hard boundary. Anything outside that boundary blocks the repair.
const cartTotal = cart.reduce(
(sum, item) => sum + item.price * item.qty,
0
);
const cartCount = cart.reduce(
(sum, item) => sum + 1item.qty,
0
);05 / The proof
A patch is a claim.
Green is proof.
Kane repeats the same browser requirements against the repaired product. Nothing is accepted until the product behaves correctly.
First add from empty cart
queuedRepeat add quantity and header
queuedTwo distinct products aggregate
queuedRun the guarded specimen to create a real repair receipt.
Exact patch appears here after the scoped agent writes it.
06 / The control room
The loop,
under your control.
Run Kane, inspect the evidence, constrain the repair, and watch the same requirements judge the result.
First add preserves price
queuedRepeat add updates quantity
queuedDistinct products aggregate
queuedRun the guarded specimen to begin.
07 / Ship the loop
Clone it. Run the proof.
Inspect every line.
Onred runs Kane in real Chrome, then gives a bounded task to its repair agent. This reference build uses opencode. The agent can change. Kane's proof contract does not.
Built in the open.
- Next.js 16
- TypeScript
- Kane CLI
- opencode / reference
- Chromium
$ git clone github.com/emmaGH1/onred $ npm install $ kane-cli login --oauth $ npm run demo
Local target 127.0.0.1:3000/dashboard
Ready to configure.
- Chromium
- Included
- Kane CLI
- Included
- Persistence
- Required
- Access token
- Required
- Replicas
- 01