Build a 24/7 trading desk with statistical rejection gates and a live market gate before every new entry. Claude Code builds. Grok Bot runs research and audits. Python computes statistics and controls execution. Jev supplies narrow, typed market judgments.
00. CONFIGURE THE DESK
Supply a strategy or backtest. Default market: ETH/USD, 15-minute candles. Set the venue, funded capital, costs, research criteria, exposure/loss limits and decision deadlines. Ask only for missing essential inputs. Read current venue and TypeSafe API docs. Load credentials from the environment.
01. LOCK THE PLAYBOOK
Use the supplied strategy; default to compression breakout: closed candle above the prior 20-bar high; ATR(14) below its trailing 100-bar mean. Define exits, sizing and next-tradable execution first. Freeze the version. Pre-register at most 100 variations and log every trial, including failures.
02. ATTACK THE BACKTEST
Python calculates net expectancy, payoff ratio, profit factor, Sharpe and drawdown with correct annualization. Include fees, spreads, slippage and model costs. Stress costs at 2x and 4x. Check leakage, multiple testing, parameter fragility and concentration in a few large winners.
03. TEST UNSEEN PERIODS
Select parameters on past data and freeze them for the next chronological block. Validate the full strategy plus Jev gate together. Keep a final holdout untouched. Prevent leakage across overlapping trades. Compare with cash and buy-and-hold. Record failures without changing the acceptance rules.
04. BUILD THE JEV LIVE GATE
Pin jev-1.13.0. Send the locked playbook and a timestamped market snapshot. Batch independent questions: Choice for regime, Noul for evidence supporting this entry, Score for setup quality. Define options and rubrics; calibrate thresholds on held-out labeled states. Confidence describes the answer distribution, not trade win probability.
05. CODE OWNS THE VERDICT
Require research acceptance, the live Jev gate, fresh data and current account limits.
■ Failed setup: BLOCK.
■ Missing evidence, late answer or API error: HOLD.
■ All entry checks pass: ENTER.
Log every candidate, answer and rejection. Existing exits and risk controls run independently of AI.
06. EXECUTE ON THE LIVE VENUE
Connect the authenticated production API. Check order-size, total exposure, daily loss and drawdown before every order. Include pending orders in exposure. Use unique client order IDs, reconcile partial fills and prevent duplicate entries after reconnects. The kill switch follows the configured cancel-and-flatten policy.
07. GROK BOT RUNS THE AUDIT
Run Data Bot, Research Bot and Audit Bot as persistent workers. Each night reconcile orders, balances, fees and confirmed fills. Measure net PnL, execution slippage, regime changes and gate performance. Version every proposed change and rerun validation before release.
08. CLAUDE CODE DELIVERS THE BUILD
Deliver the working repository, data adapters, research pipeline, typed Jev client, risk/execution modules, Grok Bot jobs, configuration and trade ledger. Verify causal features, order reconciliation and risk-limit enforcement. Report measured latency and performance from confirmed fills.