PaperBroker — a paper-trading broker with a discipline engine (AI-built, Kane CLI-verified)
by DuoSherpas
PaperBroker is a paper-trading stock broker with a discipline engine — the "tilt locker." Every broker lets you trade; this one decides when you're done for the day. Five hard rules physically refuse bad trades instead of nagging: a $10,000 daily-loss kill switch, a 10-trade daily cap, a forced 30-minute cooldown after three straight losses, a 20% position-size cap, and a 5-open-position limit. Orders that break a rule simply do not go through. BUILT BY AN AGENT, VERIFIED BY KANE CLI This app was built solo by an AI coding agent (OpenCode) in a closed verification loop: after every change, the agent ran eight plain-English flows in a real browser with Kane CLI, read the failures from the NDJSON output, fixed the code, and re-ran until green. The video shows the loop's best catch: the kill-switch flow failed because 20 hours of uptime let the simulated market drift so far that the demo persona's "panic" sells filled at gains — the kill switch was silently disarmed. Kane's red assertion ("Trading locked until tomorrow." not found) forced a mean-reversion fix in the price engine, and the same flow re-ran green with the receipt committed. ALL 8 VERIFICATION FLOWS PASS GREEN: signup → buy fills → oversized order rejected → sell round trip → daily-loss kill switch → overtrade cap → position-size cap → unknown symbol — every recording and evidence pack committed to the repo.
This flow verifies PaperBroker's kill switch: the rule that locks trading after ten thousand dollars of daily losses. Watch the last assertion. Kane checked for the message: Trading locked until tomorrow. It failed. Kane's own diagnosis: the Discipline page showed seven thousand, nine hundred and fifty-one dollars remaining under the loss limit — the lock never fired. The cause was real, and invisible to humans. Over twenty hours of uptime, the simulated market drifted so far that the demo account's panic sells filled at gains. The losses never crossed the limit. The kill switch was silently disarmed.The AI coding agent read this failure, fixed the price engine, and re-ran the exact same flow. Green. The receipts — the failed run and the passing run — are both committed to the repo.
Built in two weeks for the KaneCLI Online Hackathon.
See the hackathon →