Files
momentum-system/plans
momentum devandClaude Fable 5 e2b3c1ceae operator-plane: headless smoke + effective-config panel + ledger + unpin ruff
Step 6: tests/smoke_dashboard_headless.py renders the real page in a headless
browser and fails on any JS console/pageerror (standalone script, not
pytest-collected; CI non-blocking first). admin_api gains GET /api/config/effective
(per-key masked value + source: overrides.env vs compose, missing .env.example
keys flagged as drift) + an admin.html table (values XSS-escaped). dashboard.html
gains the Experiment Ledger panel reading the plan-006 verdicts from the snapshot
(empty-state until the tables exist). Removes the last CI ruff per-file pin
(api/main.py:F821) now that os/hmac are imported; scoped ruff is green unpinned.
Marks plan 007 DONE in plans/README.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 00:36:00 -04:00
..

Implementation Plans — next enhancement milestone

Generated by the improve skill on 2026-07-13 at commit d54a2a9, from an 8-cluster recon sweep (~95 evidence-cited findings), a 5-frame ideation pass (48 raw ideas → 14 merged candidates, all 14 verified sound by a fresh-context spot-check against HEAD), and a design-fit review of the dashboard additions. Companion design artifacts: docs/ideation/2026-07-13-next-milestone-ideation.html (ranked ideas + bases), docs/ideation/momentum-architecture-current.{drawio,png}, docs/ideation/momentum-milestone-featureset.{drawio,png}.

Execute in the order below unless dependencies say otherwise. Each executor: read the plan fully before starting, honor its STOP conditions, and update your row when done.

Execution order & status

Plan Title Priority Effort Depends on Status
001 Production safety rails — CI test gate, dead-man's switch, pg_dump backup P1 S — DONE
002 Dead-weight deletion — schwab/, grafana/, dead modules/tables/projections P2 S 001 DONE
003 Money-path hardening — daily self-restart, positive-evidence contract, reconcile, cage count P1 M 001 DONE
004 Learning flywheel — one population module, scheduled eod_replay + nightly_tune, atomic writes P1 M 001 (002 rec.) DONE
005 Entry-path unification + decision receipts P2 M 001, 003, 004 DONE
006 Experiment OS — pre-registered counterfactual experiments over logged fires (flagship) P1 L 004 (005 rec.) DONE
007 Operator control plane — dashboard truth + kill switch + effective config (step 1 = prod bug fix, ship early) P2 M 001, 003 (006 for ledger data) DONE

Status values: TODO | IN PROGRESS | DONE | BLOCKED (with one-line reason) | REJECTED (with one-line rationale)

Expected drift (read before running any plan's drift check)

Every plan stamps d54a2a9 and its drift check diffs against that commit. Executed in order, later plans WILL see diffs from earlier ones (compose scheduler/db-backup blocks from 001/003/004/006, workflow test job from 001, trading_execution/ run_live_paper changes from 003/004/005, telegram_bot from 001). That is EXPECTED drift: verify only that the plan's quoted code excerpts still exist semantically (line numbers may shift); STOP only on changes NOT attributable to a completed plan in this series (check the status table above).

Dependency notes

  • 001 first, always: it is the gate that makes every other plan's image push test-verified. 007's step 1 (the POST NameError import fix) is a production bug fix that may be cherry-picked ahead of everything.
  • 002 before the refactor-heavy plans (004/005) so they diff against a smaller surface; its production DROP TABLE section runs only after 001's backup exists.
  • 003 before 005/007: both build on its clean-shutdown/flatten semantics. Note the documented interaction: 007's flatten_all command must not trigger 003's daily-restart exit (see 007 STOP conditions).
  • 004 before 006: every experiment population MUST come from strategy/population.py — running experiments against a look-ahead population re-creates the exact artifact class (vr1/liq1) this milestone exists to kill.
  • 005 before 006 is recommended (receipts enrich replay + rank_one_bullet needs rank), but 006's bar-path replay works without it — the rank experiment just starts underpowered.
  • Postgres provisioning (owner): the only new DDL in the milestone is plan 006's experiments / experiment_runs / experiment_verdicts tables (full DDL in plans/006-experiment-os.md). Plans 001–005/007 add no tables. The owner said they will provision the database once the plan is solid — that means: apply 006's DDL (or let the harness's idempotent schema-apply do it on first run), and after 002 lands, optionally run its operator DROP TABLE list post-backup.

Findings considered and rejected (do not re-audit)

  • Retest/pullback entry logic, scale-out partials, close-above-trigger confirmation from folklore — refuted in docs/research/entry_conversion_research.md (external evidence + in-house tests); the research doc's "explicit do-nots".
  • Selection levers (confirmation-speed gate, float gating, liquidity floors, VWAP-reclaim promotion, liquid-breakout, leading-gainer detector, premarket-volume slices) — refuted at year scale per project memory; the validated population stays as-is.
  • Reviving the NiceGUI controlroom — owner preference: :8765 is the dashboard.
  • LISTEN/NOTIFY for dashboard change detection — deferred, not rejected: the shared cached signal (007 step 2) is the sufficient lazy fix; NOTIFY is the named upgrade path.
  • TimescaleDB / pg extensions — not required at current scale (README's own assessment); revisit only if event/bar volume grows past what the hot-path index handles.
  • strategy/regime.py deletion — already deleted at HEAD; recon reference was stale.
  • Schwab account sync revival for human-vs-bot comparison — the only non-delete rationale for schwab/; owner may veto 002's schwab deletion if that comparison is still wanted (plan 002 grep-gates it either way).