chore: checkpoint remaining pre-gate worktree changes

- governance: stage v7.0 review prompts, run book, roadmap/current-status/decision updates, and sprint board state

- adapters: capture DASH/trailing-drawdown/state-telemetry strategy work already present in the worktree

- tools: capture dashboard console/KPI parser updates, logtriage notes, and runnersweep output

Build: previously clean | Tests: previously 511 passing | Includes all open staged files
This commit is contained in:
2026-08-21 14:53:15 -04:00
parent 28c30bca82
commit d84949caa3
31 changed files with 4844 additions and 142 deletions

View File

@@ -0,0 +1,120 @@
# NT8-SDK — Today's Run Book
**Date:** 2026-08-19
**Prepared by:** Claude (Senior PM role, v7.0 review follow-through)
**Scope:** Execute the six staged `TASK_*.md` prompts and four proposed decisions from the 2026-08-18 v7.0 review, in a sequence that gets zero-risk items done first and gates every exit-logic or risk-parameter change behind an explicit Mo decision.
**Governing constraint carried into today:** nothing in this run book authorizes Claude to touch `src/`. Every "run" step below is Kilocode's job, triggered by you handing it the named prompt file after you've made the paired decision.
Source documents this run book operationalizes: `SPRINT_BOARD.md` (blockers section), `docs/00-governance/active_work.md` (staged section), `docs/00-governance/decisions.md` (DEC-20260818-18 through -21), and the six `TASK_*.md` prompts at repo root.
---
## 0. Before you touch anything
1. `git status --short` — working tree should show only the governance/doc files from the 2026-08-18/19 review as modified. If `src/` shows changes you didn't make, stop and find out why before Kilocode runs anything.
2. Confirm no live position is open. GAP-054 and GAP-055 both touch behavior that matters mid-trade; don't start either while a position is live.
3. Confirm which account Kilocode's test/sim runs will use — per gate discipline this should NOT be the frozen live account used for gate evidence.
**STATUS 2026-08-19: 🛑 HALTED HERE.** The operator ran this checklist and correctly stopped on all
three items. Findings (full detail in `docs/00-governance/current_status.md` § 2026-08-19):
1. `src/` showed two modified files. Investigated and identified as known DASH-002 work-in-progress
(trailing-drawdown monitor + state telemetry, both already-accepted decisions) sitting uncommitted
— not unauthorized, but must be reconciled (recommend: commit DASH-002 as its own commit) before
GAP-054 lands on top of it, so each fix's diff stays isolated and reviewable.
2. Position status: today's last session log (ended 09:13:39 ET) shows zero entries/exits, consistent
with flat — but that's a static file from an already-ended session, not a live query, and does not
substitute for checking the actual NT8 Account/Positions tab now that NinjaTrader is confirmed running.
3. Account: today's session log labels the configured account **"gate account SimSimple ORB"** in its
own warning line. This is the opposite of confirmed-non-gate — needs explicit operator resolution
before any SIM/test activity touches NT8, to avoid contaminating gate-run cleanliness the way Gate
Run #2 was contaminated (HIST-45).
**Nothing past this point in the run book proceeds until items 1-3 above are explicitly resolved by
the operator.** Plays 2-4 (GAP-048, GAP-047 Part 1) are the exception — zero risk, no account
interaction, no `src/` conflict with DASH-002 — and remain clear to run.
**UPDATE 2026-08-19, later same day — 2 of 3 cleared.** Operator confirmed: position flat,
NinjaTrader closed, and the account question is moot for now — `SimSimple ORB` isn't gate
evidence; a distinctly `gate3`-named account will be stood up for the real Gate Run #3. Items 2
and 3 are resolved. **Item 1 (uncommitted DASH-002 diff in `src/`) is still open** — NinjaTrader
being closed makes this a safe window to commit it, but that's an explicit go/no-go for the
operator, not something to do by default. Play 5 (GAP-054) should still hold until this is
answered, so the fix lands as an isolated, reviewable diff rather than on top of DASH-002's
881-line uncommitted change.
---
## 1. Decision gate — CLEARED 2026-08-19
All five decisions were made today. `decisions.md` has been updated to `accepted` for each, and a new entry `DEC-20260819-01` was added to sequence the MNQ cutover as a separate follow-on step.
| Decision | Ask | Your call (2026-08-19) | Stakes |
|---|---|---|---|
| **DEC-20260818-18** | Stop applying auto-breakeven to the runner leg (Option 0) | **Accepted.** Parameter-scoping sub-question (flag vs. unconditional skip) resolved by default to unconditional skip, no new flag — flag if you want it different. | High — changes live exit behavior |
| **DEC-20260818-19a** | Resolve MaxTradeRisk/MaxStopTicks collision | **Accepted — (c) move to MNQ.** | High — changes risk envelope |
| **DEC-20260818-19b** | Is MaxTradeRisk per-contract or per-position? | **Accepted — per-position (total).** Requires the Tier 1 check to move to after sizing; now written into `TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md` Part 3. | Medium |
| **DEC-20260818-20** | Approve the split reject-reason taxonomy vocabulary | **Accepted**, as proposed. | Zero |
| **DEC-20260818-21** | Approve MaxDailyTrades restart-persistence design | **Accepted**, as proposed. | Low-medium |
| **DEC-20260819-01** *(new)* | Sequencing: land all code fixes on NQ first, cut over to MNQ as a separate later step with a fresh Gate 3 freeze | **Accepted** — this is my recommendation, written up as its own decision entry so the MNQ switch doesn't get conflated with defect-fix validation. Flag if you'd rather cut over sooner. | Medium — affects order, not outcome |
All six `TASK_*.md` prompts are now unblocked. Nothing is waiting on you to clear Section 2 anymore — every Play below can run today.
---
## 2. Play by play
**Play 1 — Decide. DONE 2026-08-19.** All five decisions recorded in `decisions.md`.
**Play 2 — Kick off the two zero-risk tracks in parallel.**
- Hand `TASK_GAP048_REJECT_TAXONOMY_PROMPT.md` to Kilocode.
- Hand `TASK_GAP047_WEIGHT_RESCORE_PROMPT.md` to Kilocode.
Both can run at the same time; neither touches runtime behavior.
**Play 3 — Review GAP-048 output.** Confirm the four overloaded KillSwitch paths and four overloaded GradeFilter paths now log distinguishable reasons, that existing log-line formats are unchanged (only the reason string), and that the existing test suite still passes. Mark SPRINT_BOARD entry done.
**Play 4 — Review GAP-047 output.** This is a study, not a change — read the re-scoring report (equal-weight vs. designed-weight composite against historical STATE:/SIGNAL_DETAIL: lines). Confirm it reports the pre/post GAP-049 telemetry populations separately, per the task's caveat. Do NOT apply any weight change from this yet; it's an input to a future decision, not an approved fix.
**Play 5 — Runner trail fix (DEC-18 accepted). DONE 2026-08-21, source-verified.**
Kilocode implemented Option 0: removed the `OnBarUpdate()` `SetStopLoss` call on the runner signal, added no new `SetTrailStop` call, removed the stale `Diag_Breakeven` draw, cited NT8's own API docs on the mutual-exclusivity behavior. Independently re-read the changed code directly (not just the report) — confirmed. Build/tests/deploy all passed, hash matches. Two low-priority follow-ups logged in the process (GAP-056: breakeven params now fully inert, not scaler-scoped as previously assumed; GAP-057: no test seam for NT8 managed-order call assertions) — see `decisions.md` DEC-20260821-01. **Not committed yet** — sits on top of the still-unreconciled DASH-002 diff from Section 0; recommend two separate commits (DASH-002 first, GAP-054 second) when the operator is ready to commit.
**Play 6 — Validate GAP-054 before any live exposure. STILL PENDING — this is the next actual step.**
NinjaTrader needs to be reopened for a manual NinjaScript compile, then a SIM trade run reaching +25 ticks or more, confirming no `BREAKEVEN runner stop ->` line appears and the runner's exit is materially better than entry + 1 tick (a trail stop in the execution grid, not a fixed stop), and that the scaler leg's target behavior is unchanged. Only after this passes is GAP-054 done and RUNNER-001 unblocked.
**Play 7 — Risk guards, all three parts (DEC-19a/19b accepted).**
Hand `TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md` to Kilocode in full — Part 3 is now written as directly actionable: implement the Tier 1 check reordering (post-sizing, `Qty`-aware) and confirm MNQ is present and correctly valued in both `GetTickValue` tables (GAP-052) as prep for the later cutover. **Do this on the current NQ configuration — do not switch the traded instrument as part of this task.** That's Play 11.
**Play 8 — MaxDailyTrades persistence (DEC-21 accepted).**
Hand `TASK_GAP055_MAXDAILYTRADES_PERSIST_PROMPT.md` to Kilocode. Validate with a manual restart test spanning a simulated 18:00 ET rollover boundary — confirm the count persists across a restart within the same trading day and resets across the boundary.
**Play 9 — GAP-049 telemetry direction fix.**
No decision gate — this is dashboard/telemetry accuracy only. Hand `TASK_GAP049_TELEMETRY_DIRECTION_PROMPT.md` to Kilocode any time today. Validate by re-checking the implausible -523.25 point gap value the task flags; confirm it resolves to a sane number after the fix.
**Play 10 — Close out today's six items.**
For every item completed today: flip its `decisions.md` Status to `implemented` as appropriate, update `SPRINT_BOARD.md` and `active_work.md` to move it out of the blockers section, and commit the governance-doc changes. Leave anything not completed today explicitly marked with what's left and why.
**Play 11 — MNQ cutover (DEC-20260819-01), only after Plays 5-8 all pass validation.**
This is a separate, later step — not part of today's six tasks. Once GAP-054, GAP-045/046, and GAP-055 have landed and validated on NQ: stage a new `TASK_MNQ_CUTOVER_PROMPT.md` (not yet written), reconfigure the strategy instance to trade MNQ, retune `MaxTradeRisk`/`MaxStopTicks`/`MaxContracts` for MNQ's $0.50/tick economics rather than carrying over NQ-era values unexamined, then run `preflight.ps1 --freeze` and record a new `DEC-GATE3-CONFIG` before collecting any gate-run evidence on MNQ. Don't compress this into the same session as the code fixes — if something breaks, you want to know whether it was a defect fix or the instrument switch.
---
## 3. Stop conditions — halt and escalate rather than push through
- Any existing test fails after a Kilocode change.
- Kilocode touches a file outside the task's explicit DO list.
- Anything in Play 5-6 (GAP-054) is tested against the live frozen account before sim/replay validation passes.
- Play 11 (MNQ cutover) starts before Plays 5-8 have all validated on NQ.
- Kilocode changes the traded instrument as a side effect of Play 7 — that's explicitly out of scope for `TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md`.
---
## 4. End-of-day checklist
- [x] Section 1 decisions recorded — all accepted 2026-08-19
- [ ] GAP-048 taxonomy: implemented, tested, SPRINT_BOARD updated
- [ ] GAP-047 Part 1: study delivered, read, weight-change decision explicitly deferred (not silently applied)
- [ ] GAP-054 runner trail: implemented, validated on sim/replay before any live gate run
- [ ] GAP-055 persistence: implemented, restart/rollover-boundary test passed
- [ ] GAP-045/046 all three parts: implemented on NQ, including the post-sizing Tier 1 reorder and the MNQ tick-table check
- [ ] GAP-049 telemetry: implemented, -523.25 anomaly re-checked and resolved
- [ ] `git status --short` re-checked: confirm exactly the files each TASK prompt's DO list authorized, nothing else
- [ ] SPRINT_BOARD.md, active_work.md, decisions.md all reflect end-of-day state
- [ ] MNQ cutover (Play 11) explicitly NOT started until the six items above are validated — confirm it's still pending, not skipped