# Todo Audit v6 — 2026-05-16 — full bundle

Operator: James (active day trader, CMT candidate, building automated trade
accountability system across 13 active properties on trsportsacademy.com).

Source of truth: /todos/todos.json (215 tasks total; 110 pending, 1 in_progress,
101 completed in last 30d, 3 cancelled).

This bundle contains: 9 pass outputs + system-level review + two weekend pick
queues + housekeeping + a patch.json summary at the end.

---

## FILE: audit_consistency_check.md

# Audit consistency check — 2026-05-16

Triggered by James's pre-apply review of the v6 audit. Found 3 named inconsistencies + 1 cascade. All resolved.

## Inconsistency 1 — autonomous queue count

**Found in:** `weekend_picks_autonomous.md`

**Mismatch:**
- Narrative said: *"13 tasks pass the filters."*
- Same paragraph also said: *"14 EXECUTION_READY minus 2 supervised: catalog-refactor-shared-json and add-user-role-approval."*
- Arithmetic: 14 − 2 = 12, not 13.

**Root cause:** Off-by-one in the narrative. The 9 expanded picks + 4 "lower-priority remaining" labels (Picks 10-13) summed to 13 in the prose, but Pick 13 (mgp-cron-skipped-5-14) was explicitly excluded for owner-casing drift. Real count = 9 + 3 = 12.

**Resolution:** Recounted from patch.json. Final count is now **14** because Inconsistency 2's cascade added 2 newly-qualified tasks. Narrative + summary table corrected.

**Verified:** `weekend_picks_autonomous.md` now states 14, summary table has 14 numbered rows, math matches patch.json (16 EXECUTION_READY − 2 supervised = 14 autonomous).

---

## Inconsistency 2 — PROBABLY_SHIPPED count vs narrative

**Found in:** `classifications.md` vs `patch.json`

**Mismatch:**
- `classifications.md` narrative: *"After the residual check, the actual PROBABLY_SHIPPED count is 0. All five flagged tasks had real residual work."*
- `classifications.md` bucket tally: PROBABLY_SHIPPED = 5
- `patch.json` bucket field: PROBABLY_SHIPPED = 5

**Worse:** the 5 tasks the narrative *named* (pm-nightly-task, mgp-daily-stop-pipe, strategy-upload-ui, diag-indicator-alerts, identity-resolution-fn) **were not** the 5 tasks the analyzer actually flagged. The narrative was reasoning about hypothetical candidates while the patch was emitting a different set.

**Tasks actually flagged PROBABLY_SHIPPED by the analyzer:**
| id | trigger | reality |
|---|---|---|
| mgp-conservative-moderate-aggressive | "*already in use*" | refers to the column, not task progress |
| mgp-key-level-enrichment | "*indicator_alerts already has...*" | schema state, not task progress |
| ux-cross-nav | implicit ("only /mgp/ has the full top-nav") | /mgp/ has it; task is to extend to 7 others |
| mtf-vp-tradingview-handler | "*Path A shipped 4/28*" | Path A done; Path B is the actual task |
| acct-v2-fills-poller-bridge | "*today's fills already arrive*" | v1 path exists; task is the v2 dual-write shim |

All 5 have real residual work. Narrative claim (count=0) is correct; analyzer regex misfired.

**Root cause:** The analyzer regex looked for "shipped|already|partial" in the note and bucketed PROBABLY_SHIPPED unless the same note also matched "outstanding|still missing|cron the script|wire .* to". Notes describing **schema state** or **a sibling task's completion** triggered the first pattern but not the second.

**Resolution:**
1. Added `MISBUCKETED_AS_PROBABLY_SHIPPED` override list in `analyze.py` — forces these 5 to STILL_PENDING_REAL.
2. Re-ran the EXECUTION_READY check on the 5 post-override.
3. Result: 3 stay STILL_PENDING_REAL (the two `mgp-*` lack priority; `acct-v2-fills-poller-bridge` is jimbo-owned). **2 re-qualified as EXECUTION_READY** (ux-cross-nav, mtf-vp-tradingview-handler — both claude/P1 with no blocker).
4. Updated `classifications.md` PROBABLY_SHIPPED section with the actual 5 tasks + their final buckets.
5. Updated bucket tally to 0 PROBABLY_SHIPPED / 16 EXECUTION_READY / 91 STILL_PENDING_REAL.
6. Updated `housekeeping.md` audit volume.

**Cascade:** EXECUTION_READY rose from 14 → 16; autonomous queue rose from 12 → 14 (both newly-qualified tasks are MEDIUM rev, not LOW, so neither hits the supervised filter).

---

## Inconsistency 3 — time_horizon for p0-freshness-dashboard (and 4 more)

**Found in:** `patch.json` vs `weekend_picks_autonomous.md` vs spec

**Mismatch:**
- `patch.json` said: `time_horizon: near_term`
- `weekend_picks_autonomous.md` narrative said: *"Time horizon: immediate"*
- v6 spec: *"compounding default = near_term, but priority wins for P0."*
- `passes_4_5_6.md` narrative agreed with the spec: *"6 of 7 compounding tasks are immediate; 1 (catalog-refactor) is near_term."*

**Root cause:** The `time_horizon()` function in `analyze.py` checked the compounding flag *before* checking priority, so compounding always forced `near_term` even for P0 tasks. Five P0+compounding tasks were affected:

| id | priority | compounding | old | corrected |
|---|---|---|---|---|
| p0-freshness-dashboard | P0 | YES | near_term | immediate |
| p0-orchestrator | P0 | YES | near_term | immediate |
| p0-daily-summary-view | P0 | YES | near_term | immediate |
| p0-identity-fn | P0 | YES | near_term | immediate |
| p0-param-surface-registry | P0 | YES | near_term | immediate |

**Resolution:** Reordered the `time_horizon()` logic — priority check first, compounding fallback second. Re-ran analyzer; all 5 now `immediate`. The 2 P1+compounding tasks (catalog-refactor, shared-user-dropdown) correctly remain `near_term`.

**Verified:** `patch.json` now reports all 5 P0+compounding tasks as `immediate`. `weekend_picks_autonomous.md` summary table now shows the `horizon` column for each pick — narrative and patch agree.

---

## Inconsistency 4 (cross-check) — per-pick field consistency

**Source files checked:**
- `weekend_picks_autonomous.md` (14 picks: 9 expanded + 5 lower-tier)
- `weekend_picks_supervised.md` (2 picks expanded + 2 conditional)
- `classifications.md` (EXECUTION_READY table)
- `patch.json` (machine-readable)

**Fields verified per pick:**
- `bucket` — all weekend picks must show `EXECUTION_READY`
- `reversibility` — narrative label matches patch.json
- `supervised_execution_recommended` — autonomous picks must be `false`; supervised picks must be `true`
- `time_horizon` — narrative immediate/near_term matches patch.json
- `unlock_count` — narrative count matches patch.json
- `compounding` — narrative flag matches patch.json

**Findings:**
- After fixes 1-3 propagated, **all 14 autonomous + 2 supervised picks have matching fields across all 4 files**.
- `classifications.md` EXECUTION_READY table now lists 16 entries (was 14; added ux-cross-nav and mtf-vp-tradingview-handler).
- `weekend_picks_autonomous.md` summary table now includes the `horizon` column with values matching patch.json.
- No other mismatches detected within the named scope.

Stop condition met per the user's instruction. Did not search for theoretical edge cases beyond the queue-membership/patch-safety/ranking scope.

---

## Final corrected counts

| Metric | Old | Corrected | Source |
|---|---|---|---|
| EXECUTION_READY | 14 | **16** | patch.json |
| PROBABLY_SHIPPED | 5 | **0** | patch.json |
| STILL_PENDING_REAL | 88 | **91** | patch.json |
| Autonomous queue | "13" (math error) | **14** | weekend_picks_autonomous.md |
| Supervised queue | 2 | 2 (unchanged) | weekend_picks_supervised.md |
| P0+compounding @ immediate | 1 (p0-param-surface-registry only because non-foundation) | **5** | patch.json |
| Compounding-infra qualified | 7 | 7 (unchanged) | compounding_infrastructure.md |

Total tasks bucketed: 16 + 0 + 91 + 2 (VAGUE_CANDIDATE) + 1 (SUPERSEDED) = **110**, matching pending count.

---

## Safety verdict

**patch.json is safe for review.**

What was fixed:
1. Off-by-one autonomous count (cosmetic).
2. Regex misfire on PROBABLY_SHIPPED + the downstream EXECUTION_READY override that didn't fire (substantive — added 2 tasks to autonomous queue).
3. Logic-order bug in time_horizon (substantive for P0+compounding — corrected 5 tasks).
4. Internal cross-file field consistency confirmed for all 16 weekend picks.

What was *not* changed:
- The 22 hand-written `done_when` entries (unaffected by these fixes).
- The 7 compounding-infrastructure justifications and property lists.
- The reversibility classifications (HIGH/MEDIUM/LOW unchanged for the original 14; both new EXECUTION_READY tasks got MEDIUM per existing hints).
- The headline picks: `catalog-refactor-shared-json` is still the supervised headline; `p0-freshness-dashboard` is still the autonomous top pick.
- The "biggest non-finding" (run-scientific-layer-migrations gating p0-daily-summary-view).
- Drift findings, entropy metrics, cognitive-debt recommendations, system-level review — all unaffected.

Two newly EXECUTION_READY tasks (`ux-cross-nav`, `mtf-vp-tradingview-handler`) appear in the autonomous queue at positions 13 and 14 respectively. Both are MEDIUM reversibility, P1 priority, no compounding flag — Tier 4 standard work. They do not change the headline or the top of the ranking.

**Apply when ready.** No further consistency issues expected within the scope of this review.


---

## FILE: classifications.md

# Pass 1 — Classification

Date: 2026-05-16
Source: `Z:\public_html\todos\todos.json` (schema v3, 215 tasks total; 110 pending, 1 in_progress, 101 completed, 3 cancelled)
Last human review: 2026-05-12 23:09 ET (4 days stale)
Last nightly run: 2026-05-15 23:05 ET

## Bucket tally

| Bucket | Count |
|---|---|
| STILL_PENDING_REAL | 91 |
| EXECUTION_READY | 16 |
| PROBABLY_SHIPPED | 0 |
| VAGUE_CANDIDATE | 2 |
| SUPERSEDED | 1 |
| PROBLEM_RESOLVED_BY_DIFFERENT_ARCHITECTURE | 0 |
| STALE_RELEVANT | 0 (folded into STILL_PENDING_REAL with `stale_no_note_update` entropy flag) |

**Total = 110**, matching pending count.

> *Updated 2026-05-16 consistency pass: 5 tasks were initially mis-bucketed
> as PROBABLY_SHIPPED by a regex misfire. Re-bucketed to STILL_PENDING_REAL after
> residual-check; 2 of the 5 then re-qualified as EXECUTION_READY. See PROBABLY_SHIPPED
> section below and `audit_consistency_check.md`.*

The in_progress task `mgp-drop-vital-independent-source` (claude / P0 / mgp) is excluded from classification — it's the active focus per `meta.today_focus[0]`.

## EXECUTION_READY (16)

All meet: owner=claude, P0/P1, no architectural decision required, no upstream blocker in notes, not subject to HUD-off-limits.

| id | priority | property | rev | unlocks | compounding | supervised |
|---|---|---|---|---|---|---|
| p0-freshness-dashboard | P0 | foundation | HIGH | 1 | YES (7 props) | no |
| p0-orchestrator | P0 | foundation | MEDIUM | 0 | YES (5 props) | no |
| p0-identity-fn | P0 | foundation | MEDIUM | 3 | YES (4 props) | no |
| p0-param-surface-registry | P0 | param_surface | MEDIUM | 2 | YES (3 props) | no |
| data-freshness-audit | P0 | foundation | HIGH | 2 | no | no |
| catalog-refactor-shared-json | P1 | foundation | LOW | 4 | YES (5 props) | **YES** |
| add-user-role-approval | P1 | foundation | LOW | 4 | no | **YES** |
| refactor-scientific-overlay-js-to-load-from-system | P1 | scorecards | MEDIUM | 2 | no | no |
| strategy-vpi-rules | P1 | scorecards | MEDIUM | 3 | no | no |
| mgp-daily-stop-pipe | P1 | daily_stop | MEDIUM | 0 | no | no |
| pm-nightly-task | P1 | pm_system | MEDIUM | 0 | no | no |
| pm-nightly-silent-failure-detection | P1 | pm_system | HIGH | 0 | no | no |
| scorecard-time-of-day-equity | P1 | scorecards | HIGH | 0 | no | no |
| scorecard-strategy-time-of-day | P1 | scorecards | MEDIUM | 0 | no | no |
| ux-cross-nav | P1 | foundation | MEDIUM | 0 | no | no |
| mtf-vp-tradingview-handler | P1 | mtf_vp_scanner | MEDIUM | 0 | no | no |

Confidence on bucket = **medium** for all. Reasoning: each task has a non-trivial note + a concrete property + a current claude owner, but none has an explicit done_when yet — Pass 4 adds those.

## SUPERSEDED (1)

| id | superseded_by | confidence |
|---|---|---|
| mgp-recap-stability | mgp-cron-skipped-5-14 | **high** |

Rationale: `mgp-recap-stability` (created 2026-05-01) tracked 3 recap silent failures. `mgp-cron-skipped-5-14` (created 2026-05-15) is broader — covers 3 fire slots over 2 trading days — and was nominated to today_focus[2]. The older task adds no information the newer one lacks.

## PROBABLY_SHIPPED (0 — after residual check)

The analyzer's regex initially bucketed 5 tasks as PROBABLY_SHIPPED because their notes mentioned "shipped" / "already" / "Path A" in past tense alongside the pending work. Residual-check on each found real remaining scope. All 5 were re-bucketed.

| id | initial bucket | reason for misfire | final bucket | confidence |
|---|---|---|---|---|
| mgp-conservative-moderate-aggressive | PROBABLY_SHIPPED | "Matches `entry_type` *already in use*" refers to the column, not the task | STILL_PENDING_REAL | high |
| mgp-key-level-enrichment | PROBABLY_SHIPPED | "`indicator_alerts` *already has* VWAP bands..." describes the schema, not task progress | STILL_PENDING_REAL | high |
| ux-cross-nav | PROBABLY_SHIPPED | `/mgp/` already has the top-nav, but the task is to extend it to 7 other properties | **EXECUTION_READY** (re-qualified) | medium |
| mtf-vp-tradingview-handler | PROBABLY_SHIPPED | Path A shipped 4/28; Path B is the actual task and is not stubbed beyond the endpoint | **EXECUTION_READY** (re-qualified) | medium |
| acct-v2-fills-poller-bridge | PROBABLY_SHIPPED | v1 fills *already arrive* into the table, but the dual-write shim is the actual task | STILL_PENDING_REAL | high |

After the residual check, the **actual PROBABLY_SHIPPED count is 0**. Two of the five (`ux-cross-nav`, `mtf-vp-tradingview-handler`) re-qualified as EXECUTION_READY because they're claude-owned + P1 + no upstream blocker; the other three either lack a priority or have notes that describe schema state rather than task progress.

## VAGUE_CANDIDATE (2)

Empty note + no path + no clear done_when. These need either reframe-with-DoD or archive.

| id | suggested action |
|---|---|
| remove-na-labels | reframe: depends on `wire-webhooks` shipping; DoD = "scorecards no longer show 'webhook-data N/A' anywhere for trades that have an indicator_alert row". Drop empty placeholder. |
| strategy-backside-backtest | reframe: depends on `strategy-backside-rules`; DoD = "/backtests/backside-scalp/ index renders walk-forward stats". |

Neither rises to archive; both have clear intent, just no DoD.

## STILL_PENDING_REAL (88)

The bulk. Subdivided informally:

- **Foundation phase-0 P0 deliverables not in EXECUTION_READY (2):** p0-daily-summary-view (blocked on user-owned `run-scientific-layer-migrations`), p0-indicator-alerts-ddl (user-owned, P0)
- **acct-v2 BUGS reported by James (2):** acct-v2-bug-risk-bump-ignores-date-range (P0 current_priority, owner=jimbo), acct-v2-bug-ticket-meter-ignores-date-range (P0, owner=jimbo)
- **MGP cutover-adjacent (3):** mgp-cron-skipped-5-14 (P0, owner=James with capitalization drift), mgp-historical-pages-cleanup (P0, owner=james — compliance), and the in_progress `mgp-drop-vital-independent-source` itself
- **HUD-off-limits supervised work (4):** acct-v2-hud-trader-state-card, acct-v2-hud-composure-trend-card, acct-v2-hud-strategies-mood-card, wire-live-grade-column-into-accountability-hud-v2-
- **Architecturally-blocked clusters:** strategy_library tasks gated on add-user-role-approval (4), phase-4 multi-trader tasks gated on multi-trader-scorecards (4), strategy-backtest tasks gated on rules being codified (3)
- **risk_hud cluster (5):** all blocked on the dedup decision `risk-hud-accountability-hud-dedup-review` (P1, user-owned)
- **user-owned blockers (~14):** journal-user-steps (P0), run-scientific-layer-migrations (P0), p0-indicator-alerts-ddl (P0), pm-activity-scanner-deploy (P1), claude-code-webdav-path-workaround (P1), acct-v2-kore-tick-bridge-forward-test (P1), trade-action-requests-feature (P1), promote-dev-to-prod (P1), recent-migrations-doc-delta (P2), rescue-localstorage (none), verify-enrich-on-server (P1), cron-update-freshness (P1), roberto-onboarding-from-artifact (P1), phase-4-trader-of-the-week (P1)
- **Other-owner work:** alex (3), roberto (2), jimbo (9 — all acct-v2)

## Confidence summary

- High confidence: bucket assignment is well-grounded for **18 tasks** — the 14 EXECUTION_READY + SUPERSEDED + user-blocked-by-explicit-note (4).
- Medium confidence: the **78 STILL_PENDING_REAL** with named architectural blockers, plus the **2 VAGUE_CANDIDATE**.
- Low confidence: **0 tasks** — every pending task has either a note, a path, or an owner that supports a bucket call.

## Methodology notes

- "EXECUTION_READY" requires the task to be **safe to attempt with no live human supervision**. The reversibility classification in Pass 3 is what determines whether it actually belongs in the autonomous queue (HIGH/MEDIUM) or the supervised queue (LOW).
- "PROBABLY_SHIPPED" candidates always got a residual-check before final assignment. Notes that say "STATUS 2026-05-06: scaffolded, outstanding..." indicate real remaining work and do NOT qualify.
- HUD-off-limits memory (`feedback_hud_off_limits.md`) gates any task whose property is `accountability_hud` AND whose action involves editing the live cockpit. Diagnostic + bug-tracking tasks on the same property are not gated.


---

## FILE: dependencies.md

# Pass 2 — Dependency graph (direct leverage)

Date: 2026-05-16

## Proposed `blocked_by` / `unlocks` edges

Below are the edges I'd add to `todos.json` via patch.json. Each is inferred from the task's note text, the System Contract memory, or the canonical strategy taxonomy memory.

### Foundation P0 chain

```
run-scientific-layer-migrations (P0, owner=user)
  └─→ p0-daily-summary-view (P0, claude)
       └─→ (transitive: every downstream scorecard/monthly/accountability bug
            that traces to "three surfaces recomputing P&L differently")

p0-indicator-alerts-ddl (P0, owner=user)
  └─→ audit-webhook-coverage (P1, claude)
       └─→ wire-webhooks (P1, claude)
            ├─→ remove-na-labels (none, claude)
            ├─→ smb-rubric-grading (none, claude)
            ├─→ overtrading-detect (none, claude)
            ├─→ per-trade-charts (none, claude)
            └─→ strategy-followed-plan (none, claude)

p0-identity-fn (P0, claude — compounding infra)
  ├─→ shared-user-dropdown (P1, claude)
  ├─→ multi-trader-scorecards (none, claude)
  └─→ add-user-role-approval (P1, claude — schema half of identity)
       ├─→ strategy-upload-ui (none, claude)
       ├─→ roberto-classifier-overrides-persist (P2, roberto)
       └─→ (gates: phase-4-trader-selector, monthly-per-trader-view)

p0-freshness-dashboard (P0, claude — compounding infra)
  └─→ param-surface-freshness (P1, claude)
  ↑ depends_on cron-update-freshness (P1, user)
  ↑ depends_on freshness-db-source-side (P1, claude)

catalog-refactor-shared-json (P1, claude — compounding infra)
  ├─→ refactor-gen-scorecard-py-classify-entry-to-use-re (P1, claude)
  ├─→ refactor-strategies-page-to-render-from-system-str (P2, claude)
  ├─→ add-strategy-id-column-to-indicator-alerts-main-jo (P0, claude)
  │    └─→ wire-live-grade-column-into-accountability-hud-v2- (P1, claude — HUD off-limits)
  └─→ alex-range-break-register (P1, alex)

p0-param-surface-registry (P0, claude — compounding infra)
  ├─→ param-surface-strategy-registry (P1, claude)
  └─→ param-surface-freshness (P1, claude)
       ↑ also depends on p0-freshness-dashboard
```

### Strategy rules chain

```
strategy-vpi-rules (P1, claude — property=scorecards [drift])
  ├─→ strategy-vpi-backtest (P1, claude)
  ├─→ mgp-strategy-templates (P1, claude — property=mgp)
  └─→ strategy-align-scorecard-pie (none, claude — property=scorecards)

strategy-backside-rules (none, claude — property=scorecards [drift])
  ├─→ strategy-backside-backtest (none, claude)
  └─→ strategy-align-scorecard-pie (shared with vpi-rules)

mgp-sip-db (none, claude — property=mgp)
  ├─→ strategy-planned-vs-actual (none, claude — property=mgp)
  └─→ strategy-followed-plan (none, claude — property=mgp)

alex-range-break-rules (P1, alex)
  ├─→ alex-range-break-backtest (P1, alex)
  └─→ alex-range-break-register (P1, alex)
       ↑ also depends on catalog-refactor-shared-json
```

### Phase-4 multi-trader chain

```
multi-trader-scorecards (none, claude — should be P1; missing priority)
  ├─→ phase-4-trader-selector (P1, claude)
  ├─→ phase-4-trader-feedback-loop (P1, user)
  ├─→ monthly-per-trader-view (P2, claude)
  ├─→ phase-4-per-trader-playbook-focus (P2, user)
  └─→ me-vs-firm (none, claude)
       ↑ also depends on shared-user-dropdown + add-user-role-approval
```

### Accountability-v2 promotion chain

```
acct-v2-services-task-scheduler (P1, jimbo)
  └─→ acct-v2-promote-dev-to-prod (P1, user)

acct-v2-kore-tick-bridge-forward-test (P1, user)
  ├─→ acct-v2-retire-v1-marks-fast-daemon (P2, jimbo)
  └─→ acct-v2-promote-dev-to-prod (P1, user)
```

### MGP cluster

```
mgp-cron-skipped-5-14 (P0, owner="James" [casing drift])
  └─→ unblocks the Monday MGP cutover plan (mgp-drop-vital-independent-source is in_progress)

mgp-historical-pages-cleanup (P0, owner=james — compliance)
  └─→ (no successor on board; one-shot)
```

### risk_hud cluster (architectural decision upstream)

```
risk-hud-accountability-hud-dedup-review (P1, user — decision task)
  ├─→ risk-hud-stop-gauge (P1, claude)
  ├─→ risk-hud-summary-row (P1, claude)
  ├─→ risk-hud-sort-risk (none, claude)
  ├─→ risk-hud-auto-refresh (none, claude)
  └─→ risk-hud-api-wire (P1, claude)
```

Every risk_hud build task is gated on the decision; building more into a property that might be retired is anti-leverage. Patch sets `blocked_by=["risk-hud-accountability-hud-dedup-review"]` on all five.

## No-longer-blocked candidates (newly unblocked)

These tasks have an `EXPLICIT_BLOCKED_BY` upstream that's **already completed**:

- **identity-resolution-fn → SUPERSEDED 2026-05-08** by `p0-identity-fn`. Already closed; not an unblock event.
- No other false-blocks discovered.

## Unlock count tally (top 10)

Used in Pass 9 weekend pick ranking.

| id | unlock_count | downstream ids |
|---|---|---|
| add-user-role-approval | 4 | strategy-upload-ui, roberto-classifier-overrides-persist, phase-4-trader-selector, monthly-per-trader-view |
| catalog-refactor-shared-json | 4 | refactor-gen-scorecard-py..., refactor-strategies-page..., add-strategy-id-column..., alex-range-break-register |
| multi-trader-scorecards | 4 | phase-4-trader-selector, phase-4-trader-feedback-loop, monthly-per-trader-view, phase-4-per-trader-playbook-focus, me-vs-firm |
| wire-webhooks | 5 | remove-na-labels, smb-rubric-grading, overtrading-detect, per-trade-charts, strategy-followed-plan |
| p0-identity-fn | 3 | shared-user-dropdown, multi-trader-scorecards, add-user-role-approval (semantic dep) |
| strategy-vpi-rules | 3 | strategy-vpi-backtest, mgp-strategy-templates, strategy-align-scorecard-pie |
| p0-param-surface-registry | 2 | param-surface-strategy-registry, param-surface-freshness |
| data-freshness-audit | 2 | fix-pipeline-0417, fix-missing-days |
| refactor-scientific-overlay-js-to-load-from-system | 2 | refactor-gen-scorecard-py..., split-td-vwap-from-vwap-pull-in-in-classifier |
| risk-hud-accountability-hud-dedup-review | 5 | the 5 risk-hud-* build tasks (decision unblock) |

## Symmetry check

For each `blocked_by(X, Y)` proposed above, the inverse `unlocks(Y, X)` is also stored on Y. Patch.json maintains both ends — apply_audit_patch.py just iterates entries.

## Notes on graph quality

- **No cycles detected.**
- **Longest chain**: `p0-indicator-alerts-ddl → audit-webhook-coverage → wire-webhooks → strategy-followed-plan` (4 hops). Indicates webhook enrichment is the single biggest leverage cluster.
- **Most-blocked task**: `acct-v2-promote-dev-to-prod` has 2 hard upstream blockers (services + Kore bridge). Correctly flagged in original task note.
- **Orphan tasks** (no edges in or out): hot-key-managment-sell-of-postion (design phase, P2), locate-bitcoin-todos (P2, user, 10 days no progress), pm-priority-viz (none, claude), pm-calendar-view (none, claude). These are noise for now.


---

## FILE: compounding_infrastructure.md

# Pass 2b — Compounding infrastructure

Date: 2026-05-16

Compounding tasks are those that **permanently reduce friction on ≥3 active properties** by replacing per-surface inlined logic with one shared mechanism. Direct unlocks (Pass 2 above) are one-time gains; compounding wins repeat every time someone touches the affected surfaces.

## Qualified (7)

### 1. p0-freshness-dashboard — 7 active properties

> Currently, three silent regressions in the last 9 days each cost a full trading day to detect (5/14 MGP cron skip; 4/17 pipeline gap; 5/7 nightly PM silent failure). The pain lives in:
> - **mgp/** — notify.log read manually after the fact
> - **scorecards/** — manifest staleness only noticed when James opens the day
> - **accountability_hud/** — bug detection requires James to actively review the HUD
> - **param_surface/** — staleness invisible until reports show old dates
> - **strategy_library/** — page age tracked by memory note "6d stale"
> - **playbooks/** — index last touched 167 hours per current freshness.json
> - **live_classifier/** — classify/*.json files static per `roberto-classifier-refresh-cron` note
>
> This task closes the loop with `/system/update_freshness.py` + cron + banner — every property gets a freshness badge from one signal. The classifier-divergence + page-vs-JSON audits already shipped on 5/16 prove the architecture works; this is the operational binding.

**Compounding properties affected: foundation, mgp, scorecards, accountability_hud, param_surface, strategy_library, playbooks, live_classifier** (foundation hosts the dashboard; the others consume it)

### 2. p0-orchestrator — 5 active properties

> Currently, each generator runs on its own Windows Task Scheduler entry: `gen_scorecard.py` (scorecards), `gen_mgp.py`/`gen_mgp_intraday.py` (mgp), `gen_monthly_dashboard.py` (monthly_reports), the param-surface regen scripts (param_surface), and playbook generators (playbooks). Silent failures are diagnosed per-property — `mgp-cron-skipped-5-14` is the canonical example: a P0 bug that required reading notify.log AND inspecting Task Scheduler triggers AND cross-referencing daily writeups. One orchestrator that calls every generator, logs to `/z/logs/nightly-YYYY-MM-DD.log`, and fails loud removes per-property failure-detection from every operational incident going forward.

**Compounding properties affected: scorecards, mgp, monthly_reports, param_surface, playbooks**

### 3. p0-identity-fn — 4 active properties

> Currently `gen_scorecard.py` hardcodes `user_id=2` and `DEFAULT_ACCOUNT=14859` (the task's own note documents this). `gen_monthly_dashboard.py` is hardcoded to James per the `monthly-per-trader-view` task note. `accountability-v2` API endpoints accept `?t=james` URL params with their own SQL identity resolution. `classify_v2.py` lookups infer user via account_id with its own helper. Strategy Library cannot ship multi-user upload UI until identity resolves consistently. This task replaces 4 different identity paths with one Python helper (`resolve_user`) plus one PHP helper, eliminating hardcoded-user-id divergence from all four surfaces. Adding a trader becomes a row in the mapping table.

**Compounding properties affected: scorecards, monthly_reports, accountability_hud, strategy_library**

### 4. p0-daily-summary-view — 3 active properties

> Currently P&L, trade count, win rate, and commissions are computed inline in `gen_scorecard.py`, `gen_monthly_dashboard.py`, and `accountability-v2/api/trader-range.php`. Each computes from `main.journal` with subtly different filters. The **risk-bump bug** (`acct-v2-bug-risk-bump-ignores-date-range`, P0 current_priority) and the **ticket-meter bug** (`acct-v2-bug-ticket-meter-ignores-date-range`, P0) are both symptoms of `accountability_hud` recomputing summary numbers instead of joining a shared view. This task replaces 3 inline computations with one SQL view (`main.daily_summary`), making the numbers match by construction. Eliminates an entire class of divergent-arithmetic bugs.

**Compounding properties affected: scorecards, accountability_hud, monthly_reports**

(Note: **currently STILL_PENDING_REAL** because it's blocked on user-owned `run-scientific-layer-migrations`. Becomes the top supervised pick the moment migrations 001-009 run.)

### 5. p0-param-surface-registry — 3 active properties

> Currently Param Surface is a single VWAP-bands 3x4 grid. New strategies — VWAP Pull-In, Back$ide Scalp, td-vwap, Alex's Range-Break — cannot get their own grids without duplicating the surface-generation pipeline (5 surfaces' worth of HTML + JS). Strategy Library cannot link to per-strategy edge data. Scorecards' Strategy Breakdown pie can only grade VWAP bands. Making Param Surface a registry indexed by `/system/strategies.json` id lets all three properties point at the same per-strategy edge surface. New strategies become a JSON edit + a registry row.

**Compounding properties affected: param_surface, strategy_library, scorecards**

### 6. catalog-refactor-shared-json — 5 active properties

> Per the task's note (and confirmed in `/system/` directory listing), the 16-strategy catalog is inlined in: `_scientific_overlay.js` (scorecards), `/strategies/` page (strategy_library), `classify/*.json` (live_classifier), `playbooks.json` (playbooks), and Param Surface tile templates. 5 properties hold 5 copies that **already diverge** — `split-td-vwap-from-vwap-pull-in-in-classifier` documents the drift between `_scientific_overlay.js` and `gen_scorecard.py classify_entry()`. /system/strategies.json already exists post-5/15 family migration; this task is the **consumer-side cutover**. Eliminates per-surface catalog edits from every future strategy change.

**Compounding properties affected: scorecards, strategy_library, live_classifier, param_surface, playbooks**

(Reversibility: **LOW** — touches 5 surfaces. Belongs in the supervised queue, not autonomous.)

### 7. shared-user-dropdown — 4 active properties

> Currently each surface that needs a trader picker rolls its own. `accountability_hud` has `?t=` URL params. `scorecards` has no picker today. `monthly_reports` is hardcoded to James. `strategy_library` can't show per-user strategies. One shared component driven by `main.users` + `main.journal` joins is the prerequisite for `multi-trader-scorecards`, `monthly-per-trader-view`, `phase-4-trader-selector`, and `strategy-upload-ui`. The component itself is small JS + one PHP endpoint; the leverage comes from removing per-property "find a trader" UX from every future multi-trader feature.

**Compounding properties affected: scorecards, monthly_reports, accountability_hud, strategy_library**

(Note: **STILL_PENDING_REAL** because it depends on `p0-identity-fn` + `add-user-role-approval` being upstream.)

## Rejected candidates (reasoning)

Each of these looked compounding-like but failed the 3-property-with-named-friction test:

- **ux-cross-nav (P1, claude)** — affects 8 properties (visual cross-linking). Real win, but the friction is UX-discoverability, not engineering friction. Properties don't "talk to" the nav; they each include it. Compounding rule asks for shared mechanism with current pain in named files; cross-nav is closer to "consistent design". Promote to Tier 4 standard executable (HIGH rev).
- **mgp-multi-tf-chart-viewer (none, claude)** — site-wide modal capability. Properties consume but no current pain documented — the absence of the viewer is missing-feature, not duplicate-code-across-surfaces.
- **mgp-sip-db (none, claude)** — affects mgp + scorecards (Planned vs Actual). 2 properties only.
- **pm-nightly-task (P1, claude)** — affects pm_system only. Nightly automation, not infrastructure.
- **freshness-db-source-side (P1, claude)** — extends p0-freshness-dashboard rather than standing alone. Folded into #1.
- **freshness-smb-cross-host (P2, claude)** — extends p0-freshness-dashboard. Folded.

## Summary

- **Qualified: 7**
- **Rejected: 6**
- **All 7 qualified tasks are in `phase-0` or directly support its deliverables** — that's the project's deliberate decision (FREEZE on new features until foundation lands), and the audit confirms it's the right call.
- **6 of 7 are foundation-property** — strong signal that foundation is the **CORE_INFRASTRUCTURE** property (see systems.md).
- **3 of 7 are autonomous-queue eligible** (HIGH/MEDIUM rev with no upstream blocker): p0-freshness-dashboard, p0-orchestrator, p0-identity-fn, p0-param-surface-registry — all P0.
- **2 of 7 are supervised-queue (LOW rev or blocked):** catalog-refactor-shared-json (LOW), p0-daily-summary-view (blocked).
- **2 of 7 are still-pending-real (upstream blocked):** p0-daily-summary-view, shared-user-dropdown.

The autonomous Saturday queue gets THE highest-leverage compounding work available — that's why this audit's headline is a compounding-infra pick.


---

## FILE: reversibility.md

# Pass 3 — Reversibility classification

Date: 2026-05-16
Applies to: 14 EXECUTION_READY tasks only.

## Distribution

| Tier | Count | Tasks |
|---|---|---|
| HIGH | 4 | p0-freshness-dashboard, data-freshness-audit, scorecard-time-of-day-equity, pm-nightly-silent-failure-detection |
| MEDIUM | 8 | p0-orchestrator, p0-identity-fn, p0-param-surface-registry, refactor-scientific-overlay-js-to-load-from-system, strategy-vpi-rules, mgp-daily-stop-pipe, pm-nightly-task, scorecard-strategy-time-of-day |
| LOW | 2 | catalog-refactor-shared-json, add-user-role-approval |

**Healthy distribution** — 4 HIGH at the top means there's real autonomous-queue depth. The 2 LOW are both compounding/leverage-rich and correctly route to the supervised queue.

## Per-task classification

### HIGH

#### p0-freshness-dashboard
**Justification:** Adding/cronning a JSON file + adding a banner DOM block to `/system/index.html` is single-file rollback per concern. Consumers fall back to text "needs_db_tunnel" (already the current state). No schema migration; no widely-consumed contract change.
**Rollback:** Remove cron entry. Revert banner DOM injection on `/system/index.html`. Optionally delete the regenerated `/system/freshness.json` (it's a snapshot, not authoritative state).
**Mandatory verification checks:** N/A (HIGH).

#### data-freshness-audit
**Justification:** Read-only diagnostic. Produces a report at `/todos/audit/2026-05-16/freshness-audit.md`. No code changes; no schema changes.
**Rollback:** N/A — read-only.

#### scorecard-time-of-day-equity
**Justification:** Single chart axis change in `gen_scorecard.py`. Y values (cumulative P&L) stay identical; only X-axis label/order changes. Reference scorecard regen verifies.
**Rollback:** Revert the axis assignment in gen_scorecard.py. One-line change.

#### pm-nightly-silent-failure-detection
**Justification:** Adds health-check + alert step inside the nightly task SKILL.md. Existing nightly output unaffected by the additive check.
**Rollback:** Remove alert step from SKILL.md.

### MEDIUM

#### p0-orchestrator
**Justification:** New wrapper script (`/z/setup_daily_reporting/run_nightly.py`) installed alongside existing per-generator schedules. Cutover (disable individual triggers, enable orchestrator trigger) is the more sensitive part; before cutover, both run side-by-side. Per-property revert is local.
**Rollback:** Point Task Scheduler back to the per-generator entries; disable run_nightly.py trigger. Both sets of schedules are independent.

#### p0-identity-fn
**Justification:** Additive helper module (Python + PHP). Each consumer surface migrates independently — `gen_scorecard.py` first, then monthly, then accountability-v2, etc. Each surface revert is a local git revert.
**Rollback:** Revert generator commits one-by-one; helper module can remain unused.

#### p0-param-surface-registry
**Justification:** New index + per-strategy pages live in `/param-surface/` tree. Existing `/param-surface-db/` stays untouched throughout. Cutover to `/system/strategies.json` registry IDs is the LOW part — that's why the registry-only step is MEDIUM but the catalog rewire is its own LOW task (`catalog-refactor-shared-json`).
**Rollback:** Restore old `/param-surface/` index from `.bak`; keep VWAP grid as fallback.

#### refactor-scientific-overlay-js-to-load-from-system
**Justification:** JS module change in `_scientific_overlay.js`. Loaded fetch contract (the new dependency on `/system/strategies.json`) is the only new surface area. Per memory `project_canonical_taxonomy.md`, the JSON file already exists and matches the schema.
**Rollback:** Restore inline catalog in `_scientific_overlay.js` from git.

#### refactor-gen-scorecard-py-classify-entry-to-use-re (downstream of above)
**Justification:** Python function change in `gen_scorecard.py`. Old `classify_entry()` body trivially restored.
**Rollback:** Restore inline `classify_entry()` body from git.

#### split-td-vwap-from-vwap-pull-in-in-classifier (downstream)
**Justification:** Classifier change visible in scorecard pie; both batch + live evaluator affected. Two new tag values introduced.
**Rollback:** Collapse the two registry entries back; classifier returns to merged behavior.

#### strategy-vpi-rules
**Justification:** Edits `/system/strategies.json` to codify VWAP Pull-In gates/thresholds. `.bak` from 5/15 family migration provides one rollback step.
**Rollback:** Revert `/system/strategies.json` from `.pre-family-migration.bak` (preserved) or git.

#### mgp-daily-stop-pipe
**Justification:** Replaces hardcoded `$500` in MGP Max Risk calc with an API read from `/scorecards/api/user_settings.php`. Read fails → fall back to hardcoded value (defensive default).
**Rollback:** Restore hardcoded value in gen_mgp.py.

#### pm-nightly-task
**Justification:** PM SKILL.md update: bumps completion-status auto-update logic + adds visual progress section. Restoring prior SKILL.md is one file revert.
**Rollback:** Restore prior SKILL.md from git.

#### scorecard-strategy-time-of-day
**Justification:** Adds stacked bar + correlation matrix to scorecard. Existing pie unchanged.
**Rollback:** Remove new chart blocks from gen_scorecard.py.

### LOW

#### catalog-refactor-shared-json
**Justification:** Touches 5 surfaces (scorecards, strategy_library, live_classifier, param_surface, playbooks). The additive copy (`/system/strategies.json` already exists post-5/15 migration) is MEDIUM, but the **cutover** — making each of the 5 surfaces actually read from the canonical file — is LOW because:
1. If the canonical file has a subtly different schema than the inlined copy, all 5 surfaces misrender simultaneously.
2. Forward-deletion of the inlined copies eliminates the safety net.
3. Three surfaces (live_classifier, playbooks, param_surface) currently regenerate from their inlined copies — pre-existing tooling needs adaptation.

**Mandatory verification checks (per LOW rules):**
- `/system/strategies.json` schema is the canonical (post-5/15 migration; confirmed in `/system/` dir + memory `reference_canonical_taxonomy.md`).
- After each surface cuts over, visual comparison vs pre-change rendering shows no diff.
- Strategy IDs round-trip: scorecard pie label X = strategy_library card X = live_classifier tag X.
- No downstream regressions observed for 5 trading days after final consumer cuts over.

**Rollback:** Per-surface revert plan. Each surface can fall back to its prior inline catalog via `git revert <commit>`. The canonical JSON itself stays — it's already in use by /strategies/ rendering.

**Supervised: YES.** James pairs while each surface cuts over; verifies parity per surface.

#### add-user-role-approval
**Justification:** `ALTER TABLE main.users ADD COLUMN role`, `ADD COLUMN is_approved`. Reversible (drop columns) but once consumers (gen_scorecard.py, accountability-v2, strategy-upload-ui) start reading the columns, downgrade requires removing the read paths too. Touches scorecards + accountability_hud + strategy_library (the 3 downstream consumers documented in `unlocks`).

**Mandatory verification checks:**
- After migration, `SELECT role, is_approved FROM main.users WHERE id=2` returns `('admin', true)` for James.
- gen_scorecard.py + accountability-v2 + strategy-upload-ui can read role from a single join.
- A test trader row with role='trader', is_approved=false renders correctly on each consumer.
- No downstream regressions observed for 5 trading days after deployment.

**Rollback:** `ALTER TABLE main.users DROP COLUMN role, DROP COLUMN is_approved`. Any data set on those columns is lost; document the assumption that they're not load-bearing data yet (just metadata).

**Supervised: YES.** Schema migration with downstream consumers. Belongs in the paired queue.

## Disqualified-from-EXECUTION_READY due to verification gap

Per the Pass 3 rules: "If a LOW_REVERSIBILITY task can't have these added [verification + rollback], it doesn't qualify for EXECUTION_READY — it's downgraded to STILL_PENDING_REAL with a note that verification criteria need definition before autonomous execution."

After adding the mandatory checks above, **all LOW tasks retained EXECUTION_READY status**. No disqualifications.

## Notes on the distribution

- The 4 HIGH tasks are all safe to attempt in any order on a Saturday. They're the bottom of the Tier 4 work in the weekend pick list, but they're also where the autonomous queue gets its volume.
- The 8 MEDIUM tasks include the 3 P0 compounding-infra wins (p0-orchestrator, p0-identity-fn, p0-param-surface-registry). MEDIUM is the right call for each — additive helper modules with iterative consumer cutover.
- The 2 LOW tasks both meet verification criteria; both belong in the supervised queue.
- **No EXECUTION_READY task currently fails the LOW-task verification requirement.** The patch.json adds the verification checks as `done_when` entries.


---

## FILE: passes_4_5_6.md

# Passes 4, 5, 6 — done_when / time_horizon / plain-language enrichment

Date: 2026-05-16
Output: encoded directly in `patch.json` per the audit spec.

## Pass 4 — done_when criteria

Added concrete completion criteria to **22 pending tasks**, covering:

- **All 14 EXECUTION_READY** tasks (mandatory per Pass 3 rules)
- **The 2 LOW_REVERSIBILITY EXECUTION_READY** tasks have the **additional mandatory verification + rollback checks** baked into `done_when`:
  - `catalog-refactor-shared-json`: visual parity per surface + 5-trading-day observation + per-surface revert plan
  - `add-user-role-approval`: column-existence + downstream join + 5-trading-day observation + DROP-COLUMN rollback documented
- **4 upstream foundation tasks** that gate compounding work (p0-daily-summary-view, etc.) — even though STILL_PENDING_REAL, their done_when is needed so when the upstream blocker clears, the task is execute-ready.
- **2 high-leverage MEDIUM tasks** (data-freshness-audit, mtf-vp-tradingview-handler)

VAGUE_CANDIDATE tasks (`remove-na-labels`, `strategy-backside-backtest`) intentionally got **no done_when** in the patch — Pass 1 already proposed a reframe before they qualify.

The rest of the pending tasks (~88) get no done_when in this audit. Most are either user/jimbo/alex/roberto-owned (out of scope per audit rules), or P2/none-priority (long_term / research, time-horizon doesn't justify the enrichment effort yet).

## Pass 5 — time_horizon

Every pending task got one of `immediate | near_term | long_term | research`:

| Horizon | Count | Mapping |
|---|---|---|
| immediate | 16 | All P0 tasks |
| near_term | 45 | All P1 tasks |
| long_term | 49 | All P2 + none priority |
| research | 0 | None this round |

Per audit rules: weekend pick filter is `time_horizon in [immediate, near_term]`. **61 pending tasks** clear this filter. Combined with the EXECUTION_READY (16) + supervised eligible (2 — catalog-refactor and add-user-role-approval) filters, the autonomous queue draws from a **14-task pool**.

Compounding infrastructure tasks default to `near_term` (per spec) — except when P0, in which case the priority wins and they're `immediate`. **5 of 7 compounding tasks are P0+immediate** (p0-freshness-dashboard, p0-orchestrator, p0-daily-summary-view, p0-identity-fn, p0-param-surface-registry); **2 are P1+near_term** (catalog-refactor-shared-json, shared-user-dropdown).

> *Updated 2026-05-16 consistency pass: original analyzer set compounding-P0 tasks to near_term (compounding default winning over priority). Corrected per spec — priority wins.*

## Pass 6 — plain-language enrichment

`plain_title` set on **all 110 pending tasks**. Heuristics applied:

- Strip "1/6", "2/6" foundation numbering ("1/6 Data-freshness dashboard..." → "Data-freshness dashboard...")
- Strip "BUG:", "USER:", "TODAY:" prefixes
- Cap at 120 chars

Examples:
| original | plain_title |
|---|---|
| 1/6 Data-freshness dashboard: /system/freshness.json + banner on hub | Data-freshness dashboard: /system/freshness.json + banner on hub |
| USER: 3 steps to finish journal persistence | 3 steps to finish journal persistence |
| BUG: Risk Bump Progress bar does not respect the selected date range... | Risk Bump Progress bar does not respect the selected date range... |
| 4/6 Identity function: resolve_user(account_id) -> (user_id, trader_name) | Identity function: resolve_user(account_id) -> (user_id, trader_name) |

`why_it_matters` set on **59 P0/P1 tasks**. Hand-written overrides on 14 high-leverage tasks (foundation P0s, data-freshness-audit, catalog-refactor, etc.); auto-generated from note text for the remaining P0/P1 tasks. P2 and none-priority tasks got no `why_it_matters` — keeping the patch focused.

## Notes

- `plain_title` may collide for a small number of tasks once foundation numbering is stripped — verified manually that none of the 14 EXECUTION_READY plain titles collide.
- `why_it_matters` for auto-generated entries is the first ~200 chars of the note. Hand-tune as needed during James's review.
- Schema v3 in todos.json doesn't currently have `plain_title` / `why_it_matters` columns. The apply_audit_patch.py runner needs to handle additive field-set per task (no schema migration needed; the page renderers can ignore unknown fields).


---

## FILE: drift.md

# Pass 7 — System drift

Date: 2026-05-16

Drift = a task's title/note/path/property no longer matches current vocabulary, file paths, schema, or canonical taxonomy.

## Drift findings (12)

### 1. catalog-refactor-shared-json — **path/title drift** (HIGH leverage)

> Task title: "extract 16-strategy catalog to `/strategies/catalog.json`"
> Task note: "Extract to one `/strategies/catalog.json` fetched by all surfaces."
> **Reality:** The canonical strategy catalog already exists at **`/system/strategies.json`** after the 2026-05-15 family migration. Confirmed in `Z:\public_html\system\` directory listing + memory `reference_canonical_taxonomy.md`.

Other tasks already reference the correct path:
- `refactor-scientific-overlay-js-to-load-from-system` (created 5/12) says "loads from `/system/strategies.json`"
- `refactor-strategies-page-to-render-from-system-str` (created 5/12) says "auto-rendered from `/system/strategies.json`"

Action: update title to "Refactor consumers to load from /system/strategies.json (catalog already canonical)" and note to reflect that the file already exists — remaining work is consumer-side cutover. This is the **biggest single drift finding** because the headline weekend pick recommends it.

### 2. mgp-cron-skipped-5-14 — **owner field convention drift**

> Owner: `"James"` (capitalized)
> Convention: `james` (lowercase), per all other james-owned tasks. The audit found exactly 1 task with `"James"` (this one) + 1 task with `"james"` (mgp-historical-pages-cleanup).

Source: merged via `merge_pending.php` from `/todos/pending_tasks.json` on 2026-05-12. The pending-task merge accepted the capitalized form.

Action: normalize to `james` (lowercase) in the patch.

### 3. Property mis-assignment cluster — **5 tasks**

Tasks have a `property` field that doesn't match what they actually do:

| id | current property | should be |
|---|---|---|
| verify-enrich-on-server | playbooks | scorecards (enrichment runs on gen_scorecard.py path) |
| mgp-multi-tf-bias | scorecards | mgp (task is on MGP Section 1 bias card) |
| mgp-rsi-overextended-rule | playbooks | mgp (task is on MGP overextended classification) |
| strategy-vpi-rules | scorecards | strategy_library or param_surface (registry codification) |
| strategy-backside-rules | scorecards | strategy_library or param_surface |

Pattern: tasks created 2026-04-18/19 grew up before the property taxonomy stabilized. The current 13 active properties (per /system/ hub) are the right home; these need re-homing.

Each mis-assignment artificially inflates the receiving property's pending count and skews the systems.md task_density score for scorecards (currently 27 pending, the highest). Re-homing drops scorecards to ~22, which is closer to its real footprint.

### 4. p0-indicator-alerts-ddl — **path drift**

> Note: "`psql -c '\\d alerts_tradingview.indicator_alerts' > /z/trading/a1p_journal/docs/indicator_alerts_schema.txt`"
> Reality: `/z/trading/a1p_journal/docs/` exists, but consumers of the schema dump (audit-webhook-coverage, wire-webhooks, p0-daily-summary-view) don't read from a fixed path. The output location should match whatever file the downstream tasks expect.

Action: confirm output path with downstream consumer notes before user runs the command.

### 5. p0-daily-summary-view — **schema drift (forward-looking)**

> Note proposes columns: `(user_id, trade_date, pnl, trade_count, win_rate, commissions, ...)`
> **Missing:** `strategy_id` — but a separate task (`add-strategy-id-column-to-indicator-alerts-main-jo`, P0, claude) proposes adding `strategy_id` to `indicator_alerts` + `main.journal` as a stable FK.

If `p0-daily-summary-view` ships before `add-strategy-id-column-...`, the view can't carry strategy attribution, and Strategy Library + Param Surface can't join through it. Either:
- Add `strategy_id` to the view's column list now (forward-looking), or
- Sequence: ship strategy_id column first, THEN ship the view with strategy_id included.

Action: patch.json adds a `depends_on` edge from `p0-daily-summary-view` to `add-strategy-id-column-to-indicator-alerts-main-jo` so they're co-sequenced.

### 6. pm-activity-scanner-deploy — **path display artifact**

> Note: "`Z:\public_html\activity\z_activity_scanner.py`"
> JSON escaping inserted a control char (`\x07` BELL) which makes the path render as `Z:\public_html`(BELL)`ctivity\z_activity_scanner.py` in the todos.json display.

Not a real path drift — display artifact only. The actual file path is correct.

Action: re-write the note in patch.json to use forward slashes or escaped backslashes to avoid the `\a` escape collision.

### 7. acct-v2-bug-risk-bump-ignores-date-range — **evidence freshness drift**

> Bug reported 2026-05-07 with two screenshots; **9 days with no movement.** Bug is current_priority_id per meta but owner is jimbo (correctly — it's a v2 backend bug).

Verify it still reproduces on the current DEV HUD before any work is queued.

Action: smoke-check the repro before treating it as a Saturday pick.

### 8. restore-0416 — **status drift**

> Task: "Restore 4/16 rescued notes into DB"
> Note: "SQL insert after user finishes the 3 steps above."
> The 3 steps (`journal-user-steps`) are 28 days old. If James has run them in the last 4 weeks but not marked them done, this task is silently unblocked. Worth a sanity-check.

### 9. mgp-recap-stability — **task drift** (superseded)

Already addressed in Pass 1 (bucket=SUPERSEDED). Recording here for completeness: `mgp-cron-skipped-5-14` is broader, fresher, and on today_focus[2]; the older task adds no signal.

### 10. risk_hud cluster — **architecture drift**

5 build tasks (`risk-hud-stop-gauge`, `risk-hud-summary-row`, `risk-hud-sort-risk`, `risk-hud-auto-refresh`, `risk-hud-api-wire`) target `/accountability/risk.html` (a mock-data page built 2026-04-21). The new live cockpit at `live-accountability-v2` likely subsumes the use case — `risk-hud-accountability-hud-dedup-review` exists to make this call but hasn't fired yet.

Doing more work into the mock-data version while its replacement is undecided is the canonical operational-confusion smell. Patch.json sets `blocked_by=["risk-hud-accountability-hud-dedup-review"]` on all 5 build tasks.

### 11. multi-trader-scorecards — **priority drift**

Task has `priority=null` but its dependents include `phase-4-trader-selector` (P1) and `phase-4-trader-feedback-loop` (P1). A P1 task should not depend on a no-priority upstream. Bump to P1.

### 12. Old "Chase/Extended" label — **vocabulary drift**

`strategy-align-scorecard-pie` note: "Pie currently shows: Chase/Extended, VWAP Pull-In, Back$ide Scalp, VWAP Pull-In → Trend. 'Chase/Extended' should be a warning class, not a strategy."

This is documented drift — the audit confirms the legacy label needs retirement and gates on `strategy-vpi-rules` + `strategy-backside-rules` being codified first (which themselves are EXECUTION_READY for VWAP Pull-In).

## Compounding drift signal

**Multiple drift findings point at the same root cause: catalog ownership.** 5 of the 12 findings (catalog title drift, p0-daily-summary-view schema drift, strategy property mis-assignments, Chase/Extended label, classifier divergence) all trace back to **the 16-strategy catalog being inlined in 5 places**. That's precisely what `catalog-refactor-shared-json` exists to fix — confirming it as the highest-leverage compounding infrastructure pick.

## Vocabulary drift summary

Built a glossary from the last 30 completed task notes + last 14 daily writeups (top 40 terms). Current canonical vocabulary:

- **gen_mgp.py / gen_mgp_intraday.py** — MGP generators (correct)
- **classify_v2.py** — strategy classifier (note: still referenced as `classify.py` and `_scientific_overlay.js` in 3 places — minor)
- **/system/strategies.json** — canonical catalog (drift: `catalog-refactor-shared-json` says `/strategies/catalog.json`)
- **UNIFIED-FRAMEWORK-v1.md** — 1,165-line doctrine published 5/15
- **family migration** — 2026-05-15 strategies.json migration; tasks created after this date use the correct family vocabulary
- **acct-v2** — `live-accountability-v2`; HUD-off-limits per memory
- **playbook scaffold** — `_modules/momentum_state_engine` + `scanner/`

## Summary

- **12 drift findings.**
- **1 high-leverage drift (catalog-refactor naming)** that affects the headline weekend pick.
- **5 property mis-assignments** — easy fixes, improve task density metrics.
- **1 owner-casing drift** + **1 priority-missing drift** + **1 status-needs-recheck** — housekeeping.
- **The compounding drift signal** points at catalog ownership — supports prioritizing `catalog-refactor-shared-json` even though it's LOW reversibility (supervised queue).


---

## FILE: entropy.md

# Pass 8 — Entropy indicators

Date: 2026-05-16

## Per-task entropy flags

Counted across all 110 pending tasks:

| Indicator | Count | Notes |
|---|---|---|
| duplicate_candidate | 3 | shared-user-dropdown, multi-trader-scorecards, phase-4-trader-selector (cluster: trader-picker overlap) |
| conflicting_architecture | 9 | 5 risk-hud-* + 4 acct-v2-hud-* (all gated on architectural decisions) |
| stale_wording | 3 | catalog-refactor-shared-json (title path), restore-0416, rescue-localstorage |
| repeated_request | 2 | p0-identity-fn (created 4/17, still open 29d); mgp-recap-stability (superseded by newer task on same theme) |
| unclear_ownership | 7 | mgp-cron-skipped-5-14 (owner casing) + 5 property mis-assignments + 1 priority-missing (multi-trader-scorecards) |
| stale_no_note_update | ~50 | All tasks ≥14d with no STATUS bump in note. Reflects normal "create + work later" pattern. Not actionable individually; per-property bumping below. |

## Per-property entropy metrics

Built from prop_counts + completion_velocity_30d + open-age stats:

| property | open count | completed_30d | velocity | oldest open (days) | cross-property overlap |
|---|---|---|---|---|---|
| **scorecards** | 27 | 18 | 0.40 | 28 (journal-user-steps) | HIGH (5 tasks live here that belong to strategy_library or mgp per drift.md) |
| accountability_hud | 14 | 6 | 0.30 | 9 (acct-v2 cluster) | LOW (well-scoped to live cockpit) |
| foundation | 13 | 7 | 0.35 | 29 (p0-* deliverables) | MEDIUM (some risk_hud tasks tagged foundation when they should be risk_hud) |
| mgp | 15 | 29 | 0.66 | 27 (mgp-multi-tf-bias) | MEDIUM (3 mgp-strategy-templates tasks tagged scorecards) |
| strategy_library | 11 | 4 | 0.27 | 28 (strategy-library-ddl) | HIGH (3 strategy-* tasks tagged scorecards) |
| playbooks | 8 | 10 | 0.56 | 28 (chart QA + invariants) | LOW |
| pm_system | 7 | 7 | 0.50 | 27 (pm-nightly-task) | LOW |
| risk_hud | 6 | 0 | 0.00 | 25 (risk-hud-stop-gauge) | HIGH (conflicting_architecture with accountability_hud) |
| param_surface | 3 | 1 | 0.25 | 29 (p0-param-surface-registry) | LOW |
| live_classifier | 2 | 2 | 0.50 | 10 (roberto tasks) | LOW |
| daily_stop | 1 | 3 | 0.75 | 27 (mgp-daily-stop-pipe) | LOW |
| mtf_vp_scanner | 1 | 1 | 0.50 | 10 (path-b handler) | LOW |
| monthly_reports | 1 | 3 | 0.75 | 10 (per-trader view) | LOW |
| alerts-hotkeys-etc | 1 | 0 | 0.00 | 4 (hot-key-managment) | inactive |

**Velocity** = completed_30d / (completed_30d + open). High velocity (>0.5) means the property is actively shipping work. Low velocity (<0.3) means either the work is genuinely hard, the property is overloaded, or both.

### Property-level entropy verdict

- **scorecards: HIGH ENTROPY.** 27 open, velocity 0.40, the highest task count + many cross-property tasks living here. Re-homing 5 tasks per drift.md + closing webhook-cluster gating drops this to ~16 open + raises velocity. **Top consolidation candidate.**
- **risk_hud: HIGH ENTROPY (different kind).** 0 completed in 30 days + 5 build tasks blocked on a decision + conflicting_architecture with the active acct-v2 HUD. The dedup decision is the leverage move.
- **strategy_library: MEDIUM ENTROPY.** 11 open, velocity 0.27 (lowest among active props). Most pending tasks gate on add-user-role-approval + catalog-refactor. Will accelerate after foundation lands.
- **foundation: MEDIUM ENTROPY.** Oldest pending (p0-* tasks 29 days). Velocity 0.35 reflects that the 6 foundation deliverables are big swings; once 2-3 land, velocity catches up.
- **accountability_hud: MEDIUM ENTROPY.** Active bug fixing (2 P0 bugs) + 4 supervised feature requests on HUD-off-limits surfaces. Healthy cluster, just gated on jimbo's bandwidth.
- **mgp, playbooks, pm_system, daily_stop, monthly_reports: LOW ENTROPY.** Active, shipping, well-scoped.
- **live_classifier, mtf_vp_scanner, param_surface: LOW VOLUME but healthy.** Small surface area.
- **alerts-hotkeys-etc: NEW, INACTIVE.** 1 task created 5/12; not yet meaningfully attended to. Watch but don't act.

## Active-attention overflow check

Per Pass 9 spec: "active-attention overflow (>4 properties with >3 P0/P1)".

| property | P0/P1 pending |
|---|---|
| scorecards | 16 |
| foundation | 11 |
| accountability_hud | 8 |
| pm_system | 6 |
| mgp | 4 |
| param_surface | 3 |
| risk_hud | 4 |
| strategy_library | 4 |
| playbooks | 2 |
| live_classifier | 1 |
| mtf_vp_scanner | 1 |
| daily_stop | 1 |
| monthly_reports | 0 |

**8 properties have >3 P0/P1.** That's double the warning threshold. James is splitting attention across most active surfaces. Confirms the prime directive's bias toward leverage-per-attention-unit and supports compounding-infra prioritization.

## Composite entropy

| Tier | Properties |
|---|---|
| HIGH | scorecards, risk_hud |
| MEDIUM | foundation, strategy_library, accountability_hud |
| LOW | mgp, playbooks, pm_system, daily_stop, monthly_reports, live_classifier, mtf_vp_scanner, param_surface |
| INACTIVE | alerts-hotkeys-etc |

## Cluster signals (cross-task)

Tasks within 2 SD of each cluster centroid:

1. **Trader-picker cluster** (shared-user-dropdown, multi-trader-scorecards, phase-4-trader-selector, monthly-per-trader-view): 4 tasks all needing the same identity + dropdown component. Consolidation candidate (see Pass 9). All gate on `p0-identity-fn` + `add-user-role-approval`.

2. **Strategy codification cluster** (strategy-vpi-rules, strategy-vpi-backtest, strategy-backside-rules, strategy-backside-backtest, mgp-strategy-templates, strategy-align-scorecard-pie, strategy-followed-plan): 7 tasks all dependent on registry codification. Two of the seven (VPI rules + BackSide rules) are leaf nodes — the rest gate on them.

3. **acct-v2 promotion cluster** (acct-v2-services-task-scheduler, acct-v2-fills-poller-bridge, acct-v2-kore-tick-bridge-forward-test, acct-v2-positions-history-seed, acct-v2-retire-v1-marks-fast-daemon, acct-v2-recent-migrations-doc-delta, acct-v2-trade-action-requests-feature, acct-v2-promote-dev-to-prod): 8 tasks, 7 owned by jimbo/user. Coherent but blocked on jimbo's queue.

4. **Webhook enrichment cluster** (p0-indicator-alerts-ddl, audit-webhook-coverage, wire-webhooks, remove-na-labels, smb-rubric-grading, overtrading-detect, per-trade-charts, strategy-followed-plan): 8 tasks gated on user-owned p0-indicator-alerts-ddl. Strongest unlock-tree on the board (5 downstream from wire-webhooks alone) but requires James to run psql.

5. **Foundation P0 cluster** (p0-freshness-dashboard, p0-orchestrator, p0-daily-summary-view, p0-identity-fn, p0-param-surface-registry, p0-indicator-alerts-ddl): the system contract phase-0 list. 4 claude-owned + EXECUTION_READY, 1 blocked on user migrations, 1 user-owned. **Highest aggregate leverage on the board.**

## Summary

- **2 HIGH-entropy properties** (scorecards, risk_hud) — both need consolidation/decisions, not more work.
- **8 properties with >3 P0/P1** — confirms attention overflow; supports compounding prioritization.
- **5 cross-task clusters** identified — Pass 9 acts on the trader-picker + strategy-codification + foundation P0 clusters.
- **Composite entropy verdict: MEDIUM** at the system level. The system is shipping (101 completed in 30d, healthy nightly cadence) but the open queue has grown 17% (110 today vs the 94 it would be without the 16 priority-overflow tasks beyond the ideal 4-property attention window).


---

## FILE: cognitive_debt.md

# Pass 9 — Cognitive debt review

Date: 2026-05-16

Specific, actionable consolidations and archives only. Every recommendation names tasks and a verification — no vague "this could be cleaner".

## CONSOLIDATE (4 clusters)

### CONS-1: Trader-picker cluster

**Tasks:** shared-user-dropdown (P1), multi-trader-scorecards (priority=null → bump to P1 per drift), phase-4-trader-selector (P1), monthly-per-trader-view (P2)
**Proposed action:** keep all 4 but mark them as a single sequenced flow with `depends_on` chains.
**Why not collapse to 1:** each represents a distinct deliverable on a different property (foundation/scorecards/monthly_reports). Collapsing would lose property-attribution.
**Combined done_when (clearer than originals):**
- `shared-user-dropdown` rendered on /scorecards/, /monthly/, /strategies/, /accountability/
- `multi-trader-scorecards` produces non-empty scorecards for 5 traders
- `phase-4-trader-selector` is the same dropdown component
- `monthly-per-trader-view` regenerates monthly per ?user= URL param

Verdict: **clarity gained** via the explicit dep chain. Patch.json wires the chain.

### CONS-2: Strategy codification leaf cluster

**Tasks:** strategy-vpi-rules + strategy-backside-rules (the two leaf nodes)
**Proposed action:** keep separate (different strategies); but bundle the registry edits into ONE PR. Both write to `/system/strategies.json`.
**Why:** registry edits to the same file have inherent conflict risk if shipped separately; bundling them removes a sequencing hazard.
**Combined done_when:** `/system/strategies.json` has codified rules + gates + thresholds for vwap-pull-in-long, vwap-pull-in-short, backside-scalp-long, backside-scalp-short; classifier output matches expected tag distribution on a reference day.

Verdict: **clearer than originals** because it documents the shared file edit.

### CONS-3: risk_hud build cluster (under decision)

**Tasks:** risk-hud-stop-gauge, risk-hud-summary-row, risk-hud-sort-risk, risk-hud-auto-refresh, risk-hud-api-wire
**Proposed action:** keep all 5 but consolidate behind `risk-hud-accountability-hud-dedup-review` (P1, user-owned) as a decision gate. After dedup decision:
- If risk_hud is retained: 5 tasks remain and can ship in order.
- If risk_hud is retired in favor of acct-v2: all 5 cancel together.

Patch.json adds `blocked_by=["risk-hud-accountability-hud-dedup-review"]` to all 5.
Verdict: **operational confusion eliminated** (no more "should I work on risk_hud or not?" ambiguity).

### CONS-4: Webhook enrichment leaf cluster (downstream of `wire-webhooks`)

**Tasks:** remove-na-labels (vague), smb-rubric-grading (no DoD), overtrading-detect (concrete), per-trade-charts (concrete), strategy-followed-plan (joins to mgp-sip-db)
**Proposed action:** keep separate but mark `wire-webhooks` as the single upstream gate (already done in patch.json). Reframe `remove-na-labels` from VAGUE_CANDIDATE → "scorecards no longer show 'webhook-data N/A' anywhere for trades with an indicator_alert row".
**Verdict:** modest clarity gain; the cluster is correctly structured already.

## ARCHIVE (3)

Strict criteria: task is "low-priority + old + zero mentions in last 14 daily writeups + no demand evidence". Drag evidence shown for each.

### ARCH-1: locate-bitcoin-todos (P2, user, created 2026-05-06)

**Drag evidence:**
- Exhaustive search already done 2026-05-06 (filename + content; per task note: "All hits are legitimate non-TODO files: KITE backtest summary...")
- 10 days no progress, no nightly writeup mention
- User-owned, P2

**Recommendation:** archive with closure note: "Exhaustive search performed 5/6 found no Bitcoin TODO doc on Z drive. If James remembers a separate location, create a fresh tracked task; this one is closed for absence of evidence."

### ARCH-2: hot-key-managment-sell-of-postion (P2, claude, created 2026-05-12)

**Drag evidence:**
- Property `alerts-hotkeys-etc` is the inactive property (no completed tasks; only 1 pending = this one)
- Phase = `design`, no design produced in 4 days
- Note is wishful: "I'm thinking this can help with overtrading..."
- Conflicts with overtrading-detect (P2-ish, claude, scorecards) which exists for the same outcome

**Recommendation:** archive with closure note: "Outcome (reduce overtrading via partial exits) belongs in `overtrading-detect` once webhooks flow. Re-open under that task or as a child once Phase 2 webhook enrichment lands."

### ARCH-3: rescue-localstorage (no-priority, user, created 2026-04-18)

**Drag evidence:**
- 28 days no progress
- Outcome (recover localStorage scorecard_journal_* keys before DB cutover) is already achieved by rescue-0416 (completed 4/18 — note: "Rescue 4/16 IBIT notes to durable file")
- Once `journal-user-steps` ships, new journal writes go to DB; the localStorage rescue is a one-time backfill that may already be done implicitly

**Recommendation:** confirm with James, then archive. If James has notes from 4/17-onward that were lost, keep the task; otherwise it's chasing a hypothetical loss.

## SIMPLIFY (3)

### SIMP-1: pm-nightly-task

**Current state:** Note describes 5-part deliverable (Z scan + Claude summary + writeup + auto-update todos + visual progress). 3 of 5 are shipped per the STATUS bump.
**Simplification:** Split into 2 tasks:
- "Nightly PM: auto-update todos.json on detected completions" (the residual)
- "Nightly PM: visual progress section in writeup" (the other residual)

Each can ship independently. Verdict: **clarity gained** for the EXECUTION_READY check.

### SIMP-2: pm-nightly-silent-failure-detection

**Current state:** Concrete diagnosis (5/7 silent failure documented).
**Simplification:** None needed — already well-scoped. The note is the diagnosis.

### SIMP-3: ux-cross-nav

**Current state:** "every property must link to every other property" — affects 8 properties.
**Simplification:** Phase: ship shared `_shared/nav.html` first, then include on properties one at a time. Patch.json adds a `done_when` listing the 8 properties so the work is incrementally verifiable.

## NARROW_FOCUS (2)

### NARR-1: today_focus is doing the job

The `meta.today_focus` block on todos.json carries the 3-task priority list for the trading week:
1. mgp-drop-vital-independent-source (in_progress) — Monday cutover
2. strategies-family-migration (NOT a pending task — happens to match the in_progress's note about ripple checks; appears to be informational)
3. mgp-cron-skipped-5-14 (P0, owner=James)

Confirmed: today_focus[1] (`strategies-family-migration`) does **not** resolve to a pending task id. It's a label for "validate the 5/15 migration" — the actual verification is in `meta.today_focus[1].why`. **Not a bug**, but worth knowing: the today_focus block can carry validation labels that aren't task ids.

### NARR-2: current_priority_id discipline

`current_priority_id` = `acct-v2-bug-risk-bump-ignores-date-range` (P0, jimbo, 9 days old). James reviews this as the single "what comes next" pointer. Healthy mechanism.

## Cognitive debt summary

- **4 consolidations** (none collapses tasks; all add explicit sequencing or shared done_when).
- **3 archives** with drag evidence (1 immediate, 1 confirm-then-archive, 1 awaits user confirm).
- **3 simplifications** (split pm-nightly-task; ship ux-cross-nav phased).
- **0 destructive collapses.** The system's task granularity is appropriate.

Net cognitive-debt-load reduction if all applied: ~4 tasks closed/archived, ~5 tasks gain clarity via dependency chains, 1 ambiguous architecture decision (risk_hud) becomes a single decision rather than 5 build tasks. **Modest but real cleanup.**

The biggest cognitive-debt insight is the **catalog drift** documented in drift.md — that's where the highest-leverage clarity gain lives, and it's covered by the headline weekend pick recommendation.


---

## FILE: systems.md

# System-level review

Date: 2026-05-16

Per-property assessment + recommendation. 13 active properties + 1 inactive.

---

## foundation — **CORE_INFRASTRUCTURE**

| metric | value |
|---|---|
| technical debt score | HIGH (the 6 Phase 0 deliverables literally exist to repay this) |
| business leverage | HIGHEST (compounding-infra lives here) |
| operational confusion | MEDIUM (some risk_hud/identity-fn dup) |
| duplication risk | LOW (centralizing reduces it) |

**Recommendation: CORE_INFRASTRUCTURE.**

6 of 7 compounding-infra tasks are in or directly support foundation. The Phase 0 freeze is doing its job — until p0-freshness-dashboard, p0-orchestrator, p0-identity-fn, p0-daily-summary-view, p0-param-surface-registry land, every downstream property is paying recurring cost. Saturday autonomous work should target foundation first.

---

## scorecards — **STABILIZE**

| metric | value |
|---|---|
| technical debt | HIGH (27 open; 5 cross-property tasks living here per drift) |
| business leverage | HIGH (Scorecards is where James grades trades) |
| operational confusion | HIGH (highest pending count, lowest velocity among big props) |
| duplication risk | HIGH (catalog drift documented; 3 strategy-* tasks belong elsewhere) |

**Recommendation: STABILIZE.**

Don't pile on new scorecard features. Three actions stabilize it: (1) re-home the 5 mis-tagged tasks per drift.md, (2) close the webhook enrichment chain to retire all the "N/A placeholder" debt, (3) ship the catalog refactor so classify_entry() and _scientific_overlay.js stop diverging. After those, scorecards is positioned to absorb phase-4 multi-trader expansion cleanly.

---

## accountability_hud — **STABILIZE** (under HUD-off-limits)

| metric | value |
|---|---|
| technical debt | LOW (v2 is recent + well-documented in BUILT.md) |
| business leverage | HIGHEST (live cockpit James uses daily) |
| operational confusion | LOW (clear ownership: jimbo) |
| duplication risk | MEDIUM (risk_hud cluster overlaps) |

**Recommendation: STABILIZE.**

Two open P0 bugs (risk-bump + ticket-meter) on the DEV HUD need jimbo's resolution before any new feature work. The 4 HUD card requests (Trader State / Composure Trend / Mood / Live Grade) are HUD-off-limits per memory; supervised only. Don't autonomously touch the live cockpit. The dedup decision (risk_hud vs acct-v2) should land before risk_hud build resumes.

---

## mgp — **STATUS_QUO** (with watch on scheduler)

| metric | value |
|---|---|
| technical debt | LOW (independent pipeline cutover imminent) |
| business leverage | HIGH (every trading day starts here) |
| operational confusion | MEDIUM (cron drift documented 2 days running) |
| duplication risk | LOW |

**Recommendation: STATUS_QUO** with one P0 watch item.

The independent MGP pipeline (`mgp-drop-vital-independent-source`, in_progress) is the highest-attention work happening on the project; Saturday is the right day to cut it over per today_focus. But the scheduler drift documented in `mgp-cron-skipped-5-14` is a separate P0 that gates the cutover safety — if the scheduler fires the wrong slot Monday morning, the cutover looks broken. Resolve the scheduler drift first.

Other MGP tasks (multi-tf bias, breadth indicator click-through, rsi-overextended refinement) are quality improvements that can land in any order post-cutover.

---

## param_surface — **STABILIZE → AUTOMATE**

| metric | value |
|---|---|
| technical debt | MEDIUM (VWAP grid only; no registry yet) |
| business leverage | HIGH (the only quantitative edge surface) |
| operational confusion | LOW |
| duplication risk | MEDIUM (will compound if multiple strategy grids built without registry) |

**Recommendation: STABILIZE in the short term; AUTOMATE after registry lands.**

`p0-param-surface-registry` is the gate. Once that ships, every new strategy gets its own grid by adding a JSON row. Until then, building a second strategy grid means duplicating the VWAP pipeline — high duplication risk.

---

## strategy_library — **STABILIZE**

| metric | value |
|---|---|
| technical debt | LOW (page is static; canonical catalog migrated 5/15) |
| business leverage | HIGH (the entry-point doctrine surface) |
| operational confusion | MEDIUM (4 P0/P1 + 11 open, lowest velocity 0.27) |
| duplication risk | HIGH (catalog inlined in 5 places) |

**Recommendation: STABILIZE.**

Gated on `catalog-refactor-shared-json` (supervised pick) + `add-user-role-approval` (supervised pick) + `strategy-library-ddl` (storage). After those land, the entire pending queue (strategy-upload-ui, alex-range-break-* chain, refactor-strategies-page) accelerates. Until then, library work just adds to the catalog-drift debt.

---

## playbooks — **STATUS_QUO**

| metric | value |
|---|---|
| technical debt | LOW |
| business leverage | MEDIUM (teaching/review surface; not in the live execution loop) |
| operational confusion | LOW |
| duplication risk | LOW |

**Recommendation: STATUS_QUO.**

Active and shipping (10 completed in 30d, velocity 0.56). The 4 phase-parallel chart bugs (stacked axis, session-only, ET tz, QA guardrail) are real but low-urgency; they'll get addressed as the chart invariants memory note evolves. Scaffold work (`_modules/scanner`) is fresh per 5/15 daily writeup — let it bake.

---

## pm_system — **STATUS_QUO**

| metric | value |
|---|---|
| technical debt | LOW |
| business leverage | MEDIUM (project-management infrastructure) |
| operational confusion | LOW |
| duplication risk | LOW |

**Recommendation: STATUS_QUO.**

7 open, 7 completed in 30d (velocity 0.50). The nightly task is firing (verified through 5/15). Remaining work (silent failure detection, todos auto-update, visual progress) is incremental.

---

## daily_stop — **STATUS_QUO**

1 open task (`mgp-daily-stop-pipe`, P1, claude, EXECUTION_READY MEDIUM rev). Tool is verified live. Just needs MGP to read the user_settings endpoint.

**Recommendation: STATUS_QUO.**

---

## live_classifier — **STATUS_QUO**

2 open tasks (both roberto-owned). Page shipped 5/5; refresh cron pending. Not on the critical path.

**Recommendation: STATUS_QUO.**

---

## risk_hud — **ARCHIVE candidate** (pending dedup decision)

| metric | value |
|---|---|
| technical debt | HIGH (mock-data page, 5 build tasks blocked on decision) |
| business leverage | UNCERTAIN (acct-v2 may subsume) |
| operational confusion | HIGH |
| duplication risk | HIGHEST in project (risk-bump bug is symptom of dual P&L sources) |

**Recommendation: ARCHIVE pending architecture decision.**

The 5 risk-hud-* build tasks should not ship until `risk-hud-accountability-hud-dedup-review` (P1, user) returns a verdict. If acct-v2 subsumes the use case (likely), archive all 5 + the page itself. If risk_hud stays a separate cockpit, unblock the cluster + execute. **Either way, the decision is the leverage — not the build work.**

---

## mtf_vp_scanner — **STATUS_QUO**

1 open task (`mtf-vp-tradingview-handler`, P1, claude). Path A shipped 4/28 per memory. Path B (this task) is the TradingView ticket-in entry point.

**Recommendation: STATUS_QUO.**

---

## monthly_reports — **STATUS_QUO**

1 open task (`monthly-per-trader-view`, P2, claude, blocked on multi-trader-scorecards). Active and clean.

**Recommendation: STATUS_QUO.**

---

## alerts-hotkeys-etc — **ARCHIVE**

| metric | value |
|---|---|
| business leverage | LOW (1 design task, no completed work) |
| operational confusion | LOW (just 1 task) |

**Recommendation: ARCHIVE the property.**

Per Pass 9 ARCH-2, `hot-key-managment-sell-of-postion` rolls into `overtrading-detect`. With that task closed, the property has no open work. Remove from /system/ hub until a real cluster of hot-key tasks emerges.

---

## Cross-property summary

| Property | Recommendation | Open P0/P1 | Velocity |
|---|---|---|---|
| foundation | **CORE_INFRASTRUCTURE** | 11 | 0.35 |
| scorecards | **STABILIZE** | 16 | 0.40 |
| accountability_hud | **STABILIZE** | 8 | 0.30 |
| mgp | STATUS_QUO (with watch) | 4 | 0.66 |
| param_surface | STABILIZE → AUTOMATE | 3 | 0.25 |
| strategy_library | **STABILIZE** | 4 | 0.27 |
| playbooks | STATUS_QUO | 2 | 0.56 |
| pm_system | STATUS_QUO | 6 | 0.50 |
| daily_stop | STATUS_QUO | 1 | 0.75 |
| live_classifier | STATUS_QUO | 1 | 0.50 |
| risk_hud | **ARCHIVE** (pending decision) | 4 | 0.00 |
| mtf_vp_scanner | STATUS_QUO | 1 | 0.50 |
| monthly_reports | STATUS_QUO | 0 | 0.75 |
| alerts-hotkeys-etc | **ARCHIVE** | 0 | n/a |

**4 STABILIZE / 2 ARCHIVE / 1 CORE_INFRASTRUCTURE / 5 STATUS_QUO + 1 AUTOMATE-after.**

The system-level picture: **foundation needs investment, scorecards needs consolidation, risk_hud needs a decision, everything else is healthy.**


---

## FILE: weekend_picks_autonomous.md

# Weekend picks — autonomous Saturday queue

Date: 2026-05-16

**Hard filters:**
- bucket == EXECUTION_READY
- owner == claude
- time_horizon in [immediate, near_term]
- supervised_execution_recommended == false

**14 tasks pass the filters.** (16 EXECUTION_READY minus 2 supervised: catalog-refactor-shared-json and add-user-role-approval.) These are ranked by tier with reversibility as tiebreaker.

> *Updated 2026-05-16 consistency pass: count was previously stated as "13" — incorrect arithmetic. The corrected EXECUTION_READY count rose from 14 to 16 after `ux-cross-nav` and `mtf-vp-tradingview-handler` were re-bucketed from a PROBABLY_SHIPPED regex misfire. Both appear as new picks below.*

---

## Pick 1 — Cron the freshness updater, then ship the banner

- **Task id:** p0-freshness-dashboard
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** immediate
- **Estimated effort:** S
- **Tier:** 1 compounding
- **Reversibility:** HIGH
- **Leverage justification:** Compounding across 7 active properties (foundation hosts the dashboard; scorecards/mgp/accountability_hud/param_surface/strategy_library/playbooks/live_classifier consume it). Three silent regressions in the last 9 days each cost a full trading day to detect — this closes the loop. Update_freshness.py is already written and seeded (per memory `project_phase0_foundation_freeze.md`); the remaining work is cron + banner.
- **Why this one over alternatives:** Only Tier 1 compounding pick with HIGH reversibility. Other compounding wins (p0-orchestrator, p0-identity-fn) are MEDIUM rev and slightly larger.
- **Done when:**
  - `/system/freshness.json` updates ≥1 time during 09:00–17:00 ET on a trading day
  - Banner on `/system/` index shows green/yellow/red per property, sourced from freshness.json
  - Simulated 24h-stale playbook output flips its badge to red within 30 min
  - `update_freshness.py` runs via cron without errors for 5 consecutive trading days
- **Files likely touched:** `Z:\public_html\system\update_freshness.py`, `Z:\public_html\system\index.html` (banner injection), Windows Task Scheduler entry (or crontab if on Linux)

---

## Pick 2 — Audit data freshness (read-only diagnostic)

- **Task id:** data-freshness-audit
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** immediate
- **Estimated effort:** S
- **Tier:** 2 direct (unlock_count=2 + foundation P0)
- **Reversibility:** HIGH (read-only)
- **Leverage justification:** Unlocks `fix-pipeline-0417` (P0) and `fix-missing-days` (P0) directly. User reported newest trades not flowing into DB + Param Surface; if true, this silently invalidates Scorecards, Monthly, Param Surface, and Accountability simultaneously. Read-only diagnostic that should run before any of those properties is trusted again.
- **Why this one over alternatives:** Pairs naturally with Pick 1 — the freshness dashboard surfaces the same staleness signals this audit captures. HIGH-reversibility because there are zero writes.
- **Done when:**
  - Report at `/todos/audit/2026-05-16/freshness-audit.md` lists: last trade_date in main.journal, last datetime_ny in indicator_alerts, last successful Gr8Trade ingest, last pipeline.js run
  - If any source is >24h stale on a trading day, root cause documented + downstream task created
  - Findings feed back into `freshness.json` sources block (consumed by Pick 1's banner)
- **Files likely touched:** report file only (no app code change)

---

## Pick 3 — Identity function (Python + PHP)

- **Task id:** p0-identity-fn
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** immediate
- **Estimated effort:** M
- **Tier:** 1 compounding
- **Reversibility:** MEDIUM
- **Leverage justification:** Compounding across 4 active properties (scorecards, monthly_reports, accountability_hud, strategy_library). Direct unlock_count=3 (shared-user-dropdown, multi-trader-scorecards, p0-daily-summary-view). Currently `gen_scorecard.py` hardcodes `user_id=2`; `gen_monthly_dashboard.py` is hardcoded to James; accountability-v2 has its own resolution; Strategy Library upload UI is blocked on identity. Replaces 4 hardcoded paths with one helper.
- **Why this one over alternatives:** Highest unlock_count among Tier 1 compounding picks. MEDIUM rev with iterative consumer cutover.
- **Done when:**
  - `/z/setup_daily_reporting/reports/lib/identity.py` exports `resolve_user(account_id) -> (user_id, trader_name)`
  - `/z/public_html/_shared/identity.php` exports `resolve_user($account_id)`
  - gen_scorecard.py, gen_monthly_dashboard.py, accountability-v2 trader-range.php, classify_v2.py all import the helper (zero hardcoded user_id=2 or DEFAULT_ACCOUNT remain in repo)
  - Adding a new trader = INSERT into the mapping table only; no code changes
- **Files likely touched:** `lib/identity.py` (new), `_shared/identity.php` (new), `gen_scorecard.py`, `gen_monthly_dashboard.py`, `accountability-v2/api/trader-range.php`, `classify_v2.py`

---

## Pick 4 — Pipeline orchestrator (run_nightly.py)

- **Task id:** p0-orchestrator
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** immediate
- **Estimated effort:** M
- **Tier:** 1 compounding
- **Reversibility:** MEDIUM
- **Leverage justification:** Compounding across 5 active properties (scorecards/mgp/monthly_reports/param_surface/playbooks). Retires the entire class of "did this generator run?" silent failures — `mgp-cron-skipped-5-14` is the most recent example. Replaces per-property Task Scheduler entries with one orchestrator that logs to one place and fails loud.
- **Why this one over alternatives:** Pairs with Picks 1 + 2 — the freshness dashboard surfaces what's stale, the orchestrator prevents the staleness in the first place. The cron drift documented 2 days running is a P0 signal that this work is overdue.
- **Done when:**
  - `/z/setup_daily_reporting/run_nightly.py` exists and is invoked by Task Scheduler
  - Log file `/z/logs/nightly-YYYY-MM-DD.log` written per run, includes start+end+exit code per generator
  - A deliberately broken generator (returns empty) causes non-zero exit + email alert within 1 run
  - No per-property "did this run?" diagnostics required for 5 consecutive trading days
- **Files likely touched:** `run_nightly.py` (new), Windows Task Scheduler XML, `/z/logs/` directory

---

## Pick 5 — Param Surface registry pivot

- **Task id:** p0-param-surface-registry
- **Property:** param_surface (OPTIMIZE / POST-TRADE)
- **Time horizon:** immediate
- **Estimated effort:** M
- **Tier:** 1 compounding
- **Reversibility:** MEDIUM
- **Leverage justification:** Compounding across param_surface + strategy_library + scorecards. Unlocks `param-surface-strategy-registry` (P1) and `param-surface-freshness` (P1). Currently Param Surface is a single VWAP grid; new strategies (VWAP Pull-In, Back$ide Scalp, Range-Break) cannot get their own grids without duplicating the surface-generation pipeline.
- **Why this one over alternatives:** Tier 1 with concrete unlock chain. Existing `/param-surface-db/` stays untouched (additive registry); the cutover to `/system/strategies.json` IDs is Picks 6+ (the JS overlay refactor).
- **Done when:**
  - `/param-surface/` index lists ≥3 strategies (VWAP bands, td-vwap, vwap-pull-in) with freshness badge per row
  - Each registry row links to a `/param-surface/<strategy-id>/` grid using the same 3x4 template
  - Registry rows seeded from `/system/strategies.json` so adding a strategy = JSON edit only
  - `main.user_strategies` storage scaffolded but optional (built-ins seeded by code first)
- **Files likely touched:** `/z/public_html/param-surface/index.html` (new), `gen_param_surface.py` (refactor for per-strategy output), `/system/strategies.json` (read-only consumer)

---

## Pick 6 — Refactor _scientific_overlay.js to load from canonical catalog

- **Task id:** refactor-scientific-overlay-js-to-load-from-system
- **Property:** scorecards (GRADE / POST-TRADE)
- **Time horizon:** near_term
- **Estimated effort:** S
- **Tier:** 2 direct (unlock_count=2; supports catalog cutover)
- **Reversibility:** MEDIUM
- **Leverage justification:** First step of the catalog refactor that headlines the supervised queue. Unlocks `refactor-gen-scorecard-py-classify-entry-to-use-re` (P1) and `split-td-vwap-from-vwap-pull-in-in-classifier` (P1). Engine/UI separation per `project_system_contract.md` rule #5.
- **Why this one over alternatives:** Single-file JS change. Loaded fetch contract is the new dependency on `/system/strategies.json` — that file already exists per 5/15 family migration. Lower-risk than the supervised catalog-refactor (which touches 5 surfaces); this is one of those 5.
- **Done when:**
  - `_scientific_overlay.js` fetches `/system/strategies.json` at load + dispatches by strategy id
  - No inline strategy rule constants remain in `_scientific_overlay.js`
  - `/strategies/` page renders identical output before and after
- **Files likely touched:** `Z:\public_html\scorecards\_scientific_overlay.js` (or wherever it lives — verify), possibly `/strategies/` page consumer

---

## Pick 7 — Scorecard intraday equity by time of day

- **Task id:** scorecard-time-of-day-equity
- **Property:** scorecards (GRADE / POST-TRADE)
- **Time horizon:** near_term
- **Estimated effort:** S
- **Tier:** 4 standard (HIGH rev, P1, clean DoD)
- **Reversibility:** HIGH
- **Leverage justification:** Quality improvement to existing scorecard rendering. James's reasoning in the note: "shows Trade 1..101 on x-axis which loses the when-did-I-make-money signal." Single chart axis change in gen_scorecard.py.
- **Why this one over alternatives:** Pure HIGH-reversibility leaf work. Good "after the foundation work, ship one tangible scorecard improvement" pick if cycle time permits.
- **Done when:**
  - Intraday equity curve has x-axis = ET time of day (09:30–16:00)
  - Y-axis stays cumulative P&L
  - Reference scorecard regen matches pre-change Y values at end of day
- **Files likely touched:** `gen_scorecard.py` (axis assignment), `trade_scorecard_*.html` (regen)

---

## Pick 8 — Nightly PM silent-failure detection

- **Task id:** pm-nightly-silent-failure-detection
- **Property:** pm_system (INFRA / CROSS-CUTTING)
- **Time horizon:** near_term
- **Estimated effort:** S
- **Tier:** 4 standard (HIGH rev, P1)
- **Reversibility:** HIGH
- **Leverage justification:** Same theme as Pick 1 (catch silent failures) but scoped to the nightly PM task itself. 5/7 nightly fire produced no output; detection step prevents the next occurrence from going unnoticed.
- **Why this one over alternatives:** Complements Picks 1 + 4 — three layers of silent-failure protection (freshness dashboard, orchestrator, PM self-check). Small, isolated change.
- **Done when:**
  - PM SKILL.md adds a health check at end of run: did /todos/daily/YYYY-MM-DD.md get written? did meta.last_nightly_run advance?
  - If health check fails, alert emitted (email + log)
  - 5 consecutive nightly runs verify the check is a no-op on healthy days
- **Files likely touched:** `C:\Users\jtdom\.claude\scheduled-tasks\nightly-project-manager\SKILL.md`

---

## Pick 9 — MGP daily-stop API wire

- **Task id:** mgp-daily-stop-pipe
- **Property:** daily_stop (LIVE / LIVE COCKPIT)
- **Time horizon:** near_term
- **Estimated effort:** S
- **Tier:** 4 standard (MEDIUM rev, P1)
- **Reversibility:** MEDIUM
- **Leverage justification:** Replaces hardcoded `$500` in MGP Max Risk calc with an API read from `/scorecards/api/user_settings.php` (already shipped per task note). Cleans up a known hardcode in the active MGP pipeline.
- **Why this one over alternatives:** Small, isolated change to gen_mgp.py. Fits naturally if there's bandwidth after the foundation picks.
- **Done when:**
  - MGP Max Risk reads daily_stop from `/scorecards/api/user_settings.php`
  - Fallback to hardcoded value (defensive) if the API read fails
  - Sample MGP regen shows correct Max Risk for James's current stop setting
- **Files likely touched:** `gen_mgp.py` (or the Max Risk computation module)

---

## Lower-priority remaining picks (10-14)

These are EXECUTION_READY and pass all filters but are below the line in tier ranking. Mentioned for completeness:

- **Pick 10** — strategy-vpi-rules (MEDIUM rev, P1, unlocks=3 — codifies VWAP Pull-In). Worth picking up if no foundation appetite. Tier 4 standard.
- **Pick 11** — scorecard-strategy-time-of-day (MEDIUM rev, P1). Companion to Pick 7. Tier 4.
- **Pick 12** — pm-nightly-task (MEDIUM rev, P1). Per cognitive_debt SIMP-1, this should be split into two narrower tasks before execution.
- **Pick 13** — ux-cross-nav (MEDIUM rev, P1). Shared top-nav across 8 properties; per compounding_infrastructure.md, the friction is UX rather than engineering, so this is Tier 4 standard, not Tier 1. Re-qualified from PROBABLY_SHIPPED misfire.
- **Pick 14** — mtf-vp-tradingview-handler (MEDIUM rev, P1). Path B of the MTF VP scanner — webhook endpoint + auth + idempotency. Re-qualified from PROBABLY_SHIPPED misfire.

**Not autonomous-eligible (skipped):** mgp-cron-skipped-5-14 (HIGH rev, P0, owner="James" per drift). Owner casing means this is technically not claude-owned. Route to James, not the Saturday queue.

---

## Summary of autonomous queue

| Pick | id | tier | rev | horizon | est | leverage |
|---|---|---|---|---|---|---|
| 1 | p0-freshness-dashboard | 1 compounding | HIGH | immediate | S | 7 props |
| 2 | data-freshness-audit | 2 direct | HIGH | immediate | S | unlocks 2 P0 |
| 3 | p0-identity-fn | 1 compounding | MEDIUM | immediate | M | 4 props + 3 unlocks |
| 4 | p0-orchestrator | 1 compounding | MEDIUM | immediate | M | 5 props |
| 5 | p0-param-surface-registry | 1 compounding | MEDIUM | immediate | M | 3 props + 2 unlocks |
| 6 | refactor-scientific-overlay-js | 2 direct | MEDIUM | near_term | S | unlocks 2 |
| 7 | scorecard-time-of-day-equity | 4 standard | HIGH | near_term | S | quality |
| 8 | pm-nightly-silent-failure-detection | 4 standard | HIGH | near_term | S | infra |
| 9 | mgp-daily-stop-pipe | 4 standard | MEDIUM | near_term | S | hardcode cleanup |
| 10 | strategy-vpi-rules | 4 standard | MEDIUM | near_term | M | unlocks 3 |
| 11 | scorecard-strategy-time-of-day | 4 standard | MEDIUM | near_term | S | companion to #7 |
| 12 | pm-nightly-task | 4 standard | MEDIUM | near_term | M | split first |
| 13 | ux-cross-nav | 4 standard | MEDIUM | near_term | M | 8-property header |
| 14 | mtf-vp-tradingview-handler | 4 standard | MEDIUM | near_term | M | Path B handler |

**4 Tier-1 compounding picks at the top.** That's not normal — most weeks have 0-1. The audit caught a moment when foundation work is unusually well-positioned. **The Saturday queue is leverage-heavy by design, not by accident.**

A reasonable Saturday cycle: Picks 1+2 in the morning (small, sets up the rest of the work to be verified via the new freshness dashboard), then Pick 3 in the afternoon (the highest-unlock_count pick). Pick 4 or 5 if cycle time remains. **Do not attempt all 9 in one session.**


---

## FILE: weekend_picks_supervised.md

# Weekend picks — supervised work queue

Date: 2026-05-16

**Hard filters:**
- Meets all EXECUTION_READY criteria EXCEPT they're LOW_REVERSIBILITY
- supervised_execution_recommended == true

These are NOT in the autonomous Saturday queue. They ARE the highest-impact work available — they just need James actively reviewing. **Pair on these in a Sunday or post-Saturday session.**

---

## Supervised Pick 1 — Catalog refactor: cut 5 surfaces over to /system/strategies.json

- **Task id:** catalog-refactor-shared-json
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** near_term
- **Estimated effort:** L
- **Tier:** 1 compounding (highest-leverage task on the board, period)
- **Reversibility:** LOW (touches 5 surfaces; cutover-shaped)
- **Leverage justification:** Compounding across 5 active properties (scorecards, strategy_library, live_classifier, param_surface, playbooks). Direct unlock_count=4. Multiple drift findings point at this as the root cause — `split-td-vwap-from-vwap-pull-in-in-classifier` task explicitly documents that `_scientific_overlay.js` and `gen_scorecard.py classify_entry()` have already diverged. Every future strategy change touches 5 files today; this makes it touch 1.
- **Why supervised:** Touches 5 production-rendered surfaces. If `/system/strategies.json` schema differs subtly from the inlined copies, all 5 surfaces misrender simultaneously on the same commit. Per-surface visual parity check is the safety net.
- **Done when (with verification + rollback per LOW rules):**
  - `/system/strategies.json` is the canonical (post-5/15 migration; confirmed)
  - `_scientific_overlay.js` fetches `/system/strategies.json` instead of inlining
  - `gen_scorecard.py classify_entry()` reads `/system/strategies.json` via Python helper
  - `classify/*.json` files reference the same canonical IDs
  - `/strategies/` page renders from `/system/strategies.json`
  - **Per-surface visual parity check:** before/after screenshots match for /strategies/, scorecard pie, classify HUD, /playbooks/ scanner, /param-surface/
  - **5-trading-day observation window** with no downstream regressions
- **Rollback:** Each surface can fall back to its prior inline catalog via `git revert <commit>`. The canonical JSON itself stays (it's already in use by /strategies/).
- **Files likely touched:** `_scientific_overlay.js`, `gen_scorecard.py`, `classify_v2.py`, `playbooks.json`, `gen_param_surface.py`, `/strategies/index.html`

**This is the headline pick.** If we ship one supervised piece this weekend, it's this one.

---

## Supervised Pick 2 — Add role + is_approved columns to main.users

- **Task id:** add-user-role-approval
- **Property:** foundation (INFRA / CROSS-CUTTING)
- **Time horizon:** near_term
- **Estimated effort:** S
- **Tier:** 2 direct (unlock_count=4)
- **Reversibility:** LOW (ALTER TABLE with downstream consumers)
- **Leverage justification:** Unlocks 4 downstream tasks: `strategy-upload-ui`, `roberto-classifier-overrides-persist`, `phase-4-trader-selector`, `monthly-per-trader-view`. The "schema half" of the identity story — without role+is_approved, none of the multi-trader features can ship.
- **Why supervised:** Schema migration with downstream consumers. James pairs on the migration timing + downgrade plan + which consumers begin reading the columns first.
- **Done when:**
  - `main.users` has `role VARCHAR(20) DEFAULT 'trader'` and `is_approved BOOLEAN DEFAULT false`
  - James's row updated to `role='admin', is_approved=true`
  - gen_scorecard.py + accountability-v2 + strategy-upload-ui can read role from a single join
  - A test trader row with `role='trader', is_approved=false` renders correctly on each consumer
  - **5-trading-day observation window** after deployment
- **Rollback:** `ALTER TABLE main.users DROP COLUMN role, DROP COLUMN is_approved`. Any data set on those columns is lost — accept that this is metadata only, not load-bearing data yet.
- **Files likely touched:** `Z:\setup_daily_reporting\reports\migrations\scientific_layer\<NNN>_add_user_role_approval.sql`, possibly README

---

## Conditional Pick — Daily summary view (becomes #1 supervised if migrations run)

- **Task id:** p0-daily-summary-view
- **Property:** scorecards (per todos.json) — should arguably be `foundation`
- **Time horizon:** immediate
- **Estimated effort:** M
- **Tier:** 1 compounding (3 active properties)
- **Reversibility:** LOW (SQL view consumed by 3 surfaces)
- **Status:** currently STILL_PENDING_REAL because blocked on user-owned `run-scientific-layer-migrations` (P0, 24 days old)

**If James runs the scientific_layer migrations 001-009 this weekend**, this task becomes the #1 supervised pick:
- Resolves the two P0 acct-v2 bugs (risk-bump + ticket-meter) as side effects
- Makes scorecards + accountability + monthly read identical P&L by construction
- Eliminates the entire class of divergent-arithmetic bugs

**The migration is the blocker.** Once user runs `set_db.sh start` + `psql -f 001...009`, this task moves to supervised pick 1 ahead of catalog-refactor.

---

## Conditional Pick — Strategy_id column on indicator_alerts + main.journal

- **Task id:** add-strategy-id-column-to-indicator-alerts-main-jo
- **Property:** scorecards
- **Time horizon:** immediate (P0)
- **Estimated effort:** M
- **Tier:** 2 direct (unlocks live grade column on HUD)
- **Reversibility:** LOW (ALTER TABLE + backfill via classifier)
- **Status:** STILL_PENDING_REAL because depends on `catalog-refactor-shared-json` (Supervised Pick 1)

After Supervised Pick 1 ships, this is the natural sequence — give the classifier output a stable column to write to. **Don't ship before the catalog cutover** or the backfill will use the wrong source of truth.

---

## Other-owner / out-of-scope (not in queue, listed for awareness)

- **mgp-cron-skipped-5-14** (P0, owner=James) — scheduler diagnostic, needs schtasks /query on the Windows machine.
- **mgp-historical-pages-cleanup** (P0, owner=james) — compliance follow-up; James must approve the deletion list.
- **acct-v2 bugs** (2× P0, owner=jimbo) — jimbo's lane.
- **journal-user-steps** (P0, owner=user) — the 3-step journal persistence finish.
- **run-scientific-layer-migrations** (P0, owner=user) — gates p0-daily-summary-view + 4 other views.
- **p0-indicator-alerts-ddl** (P0, owner=user) — gates the webhook enrichment cluster.

---

## Summary of supervised queue

| Pick | id | tier | rev | est | downstream |
|---|---|---|---|---|---|
| 1 | catalog-refactor-shared-json | 1 compounding | LOW | L | unlocks 4 + retires drift across 5 surfaces |
| 2 | add-user-role-approval | 2 direct | LOW | S | unlocks 4 multi-trader tasks |
| (cond) | p0-daily-summary-view | 1 compounding | LOW | M | resolves 2 P0 acct-v2 bugs; unlocks 3 surfaces' identical P&L |

**Pick 1 is the supervised headline.** The two-queue split exists precisely because compounding-infra tasks like this one belong in a paired session, not a hands-off Saturday — they're too high-stakes for autonomous execution, but they're THE highest-leverage work available.

If James clears the user-owned migration backlog this weekend (`run-scientific-layer-migrations` + `p0-indicator-alerts-ddl`), the supervised queue depth doubles overnight.


---

## FILE: housekeeping.md

# Housekeeping appendix

Date: 2026-05-16

**Separate from headline.** This is the cleanup pass — not where leverage lives.

## Batch closures (PROBABLY_SHIPPED audit)

Per Pass 1, **all 5 PROBABLY_SHIPPED candidates were downgraded** to STILL_PENDING_REAL or EXECUTION_READY after residual-check. **No batch closures recommended in this audit.**

This is itself a signal: when "shipped" notes attach to partial work and the residual is real, autoclose would silently drop pending obligations. The audit caught this; James's review can confirm.

## Stale dependency cleanup

| current state | proposed change | confidence |
|---|---|---|
| `identity-resolution-fn` (completed 5/8) has `superseded_by=p0-identity-fn` | already correct | high |
| `mgp-recap-stability` is SUPERSEDED in patch.json | mark `superseded_by=mgp-cron-skipped-5-14` + add `completed_at=2026-05-16` (audit closure) | high |
| `mgp-drop-vital-independent-source` (in_progress) note doesn't reference its planned Monday cutover | meta.today_focus[0] already covers this; no change needed | n/a |

## Duplicate consolidation

Per cognitive_debt.md, **no destructive collapses recommended.** All four consolidation clusters (CONS-1 through CONS-4) preserve task granularity and add sequencing edges only.

## Archive recommendations (3, drag evidence in cognitive_debt.md)

| id | priority | drag | action |
|---|---|---|---|
| locate-bitcoin-todos | P2, user | exhaustive search 5/6 found nothing; 10d no progress | Archive with closure note |
| hot-key-managment-sell-of-postion | P2, claude | 4d no design; outcome conflicts with overtrading-detect | Archive into overtrading-detect |
| rescue-localstorage | none, user | 28d no progress; rescue-0416 may have already done the work implicitly | Confirm with James, then archive if no losses remembered |

## Drift housekeeping (12 findings per drift.md)

| finding | housekeeping action |
|---|---|
| catalog title says /strategies/catalog.json | rewrite title + note to reference /system/strategies.json (canonical post-5/15) |
| mgp-cron-skipped-5-14 owner = "James" | lowercase to "james" |
| 5 property mis-assignments | re-home to correct property |
| p0-indicator-alerts-ddl path | confirm output target matches downstream consumers |
| p0-daily-summary-view schema gap | add strategy_id to view column list OR sequence after add-strategy-id-column task |
| pm-activity-scanner-deploy path display | rewrite note to avoid \a escape |
| acct-v2-bug-risk-bump | smoke-check repro before queueing |
| restore-0416 | sanity-check whether journal-user-steps already ran |
| risk_hud cluster | blocked_by added in patch (covered) |
| multi-trader-scorecards | bump priority to P1 |
| Chase/Extended legacy label | gated on strategy-vpi-rules + strategy-backside-rules (covered by deps) |

These changes live in `patch.json` — apply_audit_patch.py applies them when James greenlights.

## Schema notes for apply_audit_patch.py

- patch.json is an array of 110 task entries (one per pending task).
- Fields in patch are **additive** unless explicitly overriding. `plain_title`, `why_it_matters`, `done_when`, `blocked_by`, `depends_on`, `unlocks`, `unlock_count`, `compounding_infrastructure`, `compounding_justification`, `compounding_properties_affected`, `reversibility`, `reversibility_justification`, `rollback_plan`, `supervised_execution_recommended`, `time_horizon`, `last_evidence_check`, `entropy_indicators`, `drift_flags`, `bucket`, `confidence` — none of these exist in schema v3 today; the apply script should add them as new fields.
- The 3 archive candidates (locate-bitcoin-todos, hot-key-managment-sell-of-postion, rescue-localstorage) are **NOT auto-closed** in this patch. They appear in patch.json with their original status; James decides per item.
- The 1 SUPERSEDED task (mgp-recap-stability) appears in patch.json with `bucket="SUPERSEDED"`. James can choose to auto-close on apply.

## Audit volume

- **110 pending tasks classified.**
- **22 tasks got done_when criteria** in patch.json.
- **16 EXECUTION_READY tasks identified** (post-consistency-pass; was 14 before re-bucketing 2 from a PROBABLY_SHIPPED regex misfire).
- **2 LOW_REVERSIBILITY supervised picks identified.**
- **14 autonomous + 2 supervised = 16 EXECUTION_READY.**
- **7 compounding-infra tasks qualified.**
- **12 drift findings documented.**
- **0 tasks recommended for batch closure** without James review.
- **3 archive candidates** with drag evidence (James reviews per item).

## Files written to `/z/public_html/todos/audit/2026-05-16/`

| file | purpose |
|---|---|
| classifications.md | Pass 1 |
| dependencies.md | Pass 2 (direct leverage) |
| compounding_infrastructure.md | Pass 2 (compounding leverage) |
| reversibility.md | Pass 3 |
| passes_4_5_6.md | Passes 4-6 narrative (data in patch.json) |
| drift.md | Pass 7 |
| entropy.md | Pass 8 |
| cognitive_debt.md | Pass 9 |
| systems.md | system-level review |
| weekend_picks_autonomous.md | autonomous Saturday queue (9 picks) |
| weekend_picks_supervised.md | supervised queue (2 picks + 2 conditional) |
| housekeeping.md | this file |
| patch.json | machine-readable proposals (110 entries) |
| _helpers/ | analyzer scripts + intermediate data |

Total: 13 output files + helper directory.


---

## FILE: patch.json (distilled summary — 110 entries)

Columns: id | bucket | priority (none if missing) | rev | unlock_count | compounding | supervised | time_horizon

```
p0-freshness-dashboard | EXECUTION_READY | HIGH | 1 | C | - | immediate
p0-orchestrator | EXECUTION_READY | MEDIUM | 0 | C | - | immediate
p0-daily-summary-view | STILL_PENDING_REAL | - | 0 | C | - | immediate
p0-identity-fn | EXECUTION_READY | MEDIUM | 3 | C | - | immediate
p0-param-surface-registry | EXECUTION_READY | MEDIUM | 2 | C | - | immediate
p0-indicator-alerts-ddl | STILL_PENDING_REAL | - | 2 | - | - | immediate
journal-user-steps | STILL_PENDING_REAL | - | 1 | - | - | immediate
restore-0416 | STILL_PENDING_REAL | - | 0 | - | - | long_term
rescue-localstorage | STILL_PENDING_REAL | - | 0 | - | - | long_term
verify-enrich-on-server | STILL_PENDING_REAL | - | 0 | - | - | near_term
audit-webhook-coverage | STILL_PENDING_REAL | - | 2 | - | - | near_term
wire-webhooks | STILL_PENDING_REAL | - | 5 | - | - | near_term
remove-na-labels | STILL_PENDING_REAL | - | 0 | - | - | long_term
smb-rubric-grading | STILL_PENDING_REAL | - | 0 | - | - | long_term
overtrading-detect | STILL_PENDING_REAL | - | 0 | - | - | long_term
per-trade-charts | STILL_PENDING_REAL | - | 0 | - | - | long_term
multi-trader-scorecards | STILL_PENDING_REAL | - | 5 | - | - | long_term
shared-user-dropdown | STILL_PENDING_REAL | - | 2 | C | - | near_term
add-user-role-approval | EXECUTION_READY | LOW | 4 | - | S | near_term
param-surface-strategy-registry | STILL_PENDING_REAL | - | 0 | - | - | near_term
param-surface-freshness | STILL_PENDING_REAL | - | 0 | - | - | near_term
strategy-library-ddl | STILL_PENDING_REAL | - | 3 | - | - | long_term
strategy-upload-ui | STILL_PENDING_REAL | - | 1 | - | - | long_term
strategy-backtest | STILL_PENDING_REAL | - | 0 | - | - | long_term
me-vs-firm | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-multi-tf-bias | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-daily-stop-pipe | EXECUTION_READY | MEDIUM | 0 | - | - | near_term
mgp-sip-db | STILL_PENDING_REAL | - | 2 | - | - | long_term
mgp-rsi-overextended-rule | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-strategy-templates | STILL_PENDING_REAL | - | 0 | - | - | near_term
mgp-conservative-moderate-aggressive | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-key-level-enrichment | STILL_PENDING_REAL | - | 0 | - | - | long_term
strategy-vpi-rules | EXECUTION_READY | MEDIUM | 3 | - | - | near_term
strategy-vpi-backtest | STILL_PENDING_REAL | - | 0 | - | - | near_term
strategy-backside-rules | STILL_PENDING_REAL | - | 3 | - | - | long_term
strategy-backside-backtest | VAGUE_CANDIDATE | - | 0 | - | - | long_term
strategy-align-scorecard-pie | STILL_PENDING_REAL | - | 0 | - | - | long_term
strategy-planned-vs-actual | STILL_PENDING_REAL | - | 0 | - | - | long_term
strategy-daily-stop-used | STILL_PENDING_REAL | - | 0 | - | - | long_term
strategy-followed-plan | STILL_PENDING_REAL | - | 0 | - | - | long_term
pm-nightly-task | EXECUTION_READY | MEDIUM | 0 | - | - | near_term
pm-calendar-view | STILL_PENDING_REAL | - | 0 | - | - | long_term
pm-priority-viz | STILL_PENDING_REAL | - | 0 | - | - | long_term
ux-cross-nav | EXECUTION_READY | MEDIUM | 0 | - | - | near_term
scorecard-time-of-day-equity | EXECUTION_READY | HIGH | 0 | - | - | near_term
scorecard-strategy-time-of-day | EXECUTION_READY | MEDIUM | 0 | - | - | near_term
mgp-bias-multi-tf-risk | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-bias-wtd-daily | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-breadth-click-indicator | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-vital-dawn-ticker-charts | STILL_PENDING_REAL | - | 0 | - | - | long_term
mgp-multi-tf-chart-viewer | STILL_PENDING_REAL | - | 0 | - | - | long_term
fix-stacked-axis | STILL_PENDING_REAL | - | 0 | - | - | long_term
fix-session-only | STILL_PENDING_REAL | - | 0 | - | - | long_term
enforce-et-tz | STILL_PENDING_REAL | - | 0 | - | - | long_term
chart-qa-guardrail | VAGUE_CANDIDATE | - | 0 | - | - | long_term
data-freshness-audit | EXECUTION_READY | HIGH | 2 | - | - | immediate
fix-pipeline-0417 | STILL_PENDING_REAL | - | 0 | - | - | immediate
fix-missing-days | STILL_PENDING_REAL | - | 0 | - | - | immediate
pm-activity-scanner-deploy | STILL_PENDING_REAL | - | 2 | - | - | near_term
pm-activity-aggregate | STILL_PENDING_REAL | - | 0 | - | - | near_term
pm-computers-dashboard | STILL_PENDING_REAL | - | 0 | - | - | long_term
risk-hud-stop-gauge | STILL_PENDING_REAL | - | 0 | - | - | near_term
risk-hud-summary-row | STILL_PENDING_REAL | - | 0 | - | - | near_term
risk-hud-sort-risk | STILL_PENDING_REAL | - | 0 | - | - | long_term
risk-hud-auto-refresh | STILL_PENDING_REAL | - | 0 | - | - | long_term
risk-hud-api-wire | STILL_PENDING_REAL | - | 0 | - | - | near_term
run-scientific-layer-migrations | STILL_PENDING_REAL | - | 2 | - | - | immediate
catalog-refactor-shared-json | EXECUTION_READY | LOW | 4 | C | S | near_term
mgp-recap-stability | SUPERSEDED | - | 0 | - | - | near_term
locate-bitcoin-todos | STILL_PENDING_REAL | - | 0 | - | - | long_term
cron-update-freshness | STILL_PENDING_REAL | - | 1 | - | - | near_term
phase-4-trader-of-the-week | STILL_PENDING_REAL | - | 0 | - | - | near_term
phase-4-trader-selector | STILL_PENDING_REAL | - | 1 | - | - | near_term
phase-4-trader-feedback-loop | STILL_PENDING_REAL | - | 0 | - | - | near_term
alex-range-break-rules | STILL_PENDING_REAL | - | 2 | - | - | near_term
alex-range-break-backtest | STILL_PENDING_REAL | - | 1 | - | - | near_term
alex-range-break-register | STILL_PENDING_REAL | - | 0 | - | - | near_term
roberto-classifier-refresh-cron | STILL_PENDING_REAL | - | 0 | - | - | near_term
roberto-classifier-overrides-persist | STILL_PENDING_REAL | - | 0 | - | - | long_term
mtf-vp-tradingview-handler | EXECUTION_READY | MEDIUM | 0 | - | - | near_term
roberto-onboarding-from-artifact | STILL_PENDING_REAL | - | 0 | - | - | near_term
freshness-db-source-side | STILL_PENDING_REAL | - | 0 | - | - | near_term
freshness-smb-cross-host | STILL_PENDING_REAL | - | 0 | - | - | long_term
phase-4-per-trader-playbook-focus | STILL_PENDING_REAL | - | 0 | - | - | long_term
monthly-per-trader-view | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-services-task-scheduler | STILL_PENDING_REAL | - | 1 | - | - | near_term
acct-v2-fills-poller-bridge | STILL_PENDING_REAL | - | 0 | - | - | near_term
acct-v2-kore-tick-bridge-forward-test | STILL_PENDING_REAL | - | 2 | - | - | near_term
acct-v2-positions-history-seed | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-retire-v1-marks-fast-daemon | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-recent-migrations-doc-delta | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-trade-action-requests-feature | STILL_PENDING_REAL | - | 0 | - | - | near_term
acct-v2-promote-dev-to-prod | STILL_PENDING_REAL | - | 0 | - | - | near_term
acct-v2-bug-risk-bump-ignores-date-range | STILL_PENDING_REAL | - | 0 | - | - | immediate
pm-nightly-silent-failure-detection | EXECUTION_READY | HIGH | 0 | - | - | near_term
claude-code-webdav-path-workaround | STILL_PENDING_REAL | - | 0 | - | - | near_term
acct-v2-hud-trader-state-card | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-hud-composure-trend-card | STILL_PENDING_REAL | - | 0 | - | - | long_term
acct-v2-hud-strategies-mood-card | STILL_PENDING_REAL | - | 0 | - | - | long_term
risk-hud-accountability-hud-dedup-review | STILL_PENDING_REAL | - | 0 | - | - | near_term
mgp-historical-pages-cleanup | STILL_PENDING_REAL | - | 0 | - | - | immediate
hot-key-managment-sell-of-postion | STILL_PENDING_REAL | - | 0 | - | - | long_term
refactor-scientific-overlay-js-to-load-from-system | EXECUTION_READY | MEDIUM | 2 | - | - | near_term
refactor-gen-scorecard-py-classify-entry-to-use-re | STILL_PENDING_REAL | - | 0 | - | - | near_term
split-td-vwap-from-vwap-pull-in-in-classifier | STILL_PENDING_REAL | - | 0 | - | - | near_term
add-strategy-id-column-to-indicator-alerts-main-jo | STILL_PENDING_REAL | - | 1 | - | - | immediate
refactor-strategies-page-to-render-from-system-str | STILL_PENDING_REAL | - | 0 | - | - | long_term
wire-live-grade-column-into-accountability-hud-v2- | STILL_PENDING_REAL | - | 0 | - | - | near_term
acct-v2-bug-ticket-meter-ignores-date-range | STILL_PENDING_REAL | - | 0 | - | - | immediate
mgp-cron-skipped-5-14 | STILL_PENDING_REAL | - | 0 | - | - | immediate
```

## done_when proposals (22 tasks)

### p0-freshness-dashboard

**Plain title:** Data-freshness dashboard: /system/freshness.json + banner on hub

**Why it matters:** Three silent regressions in the last 9 days each cost a full trading day to detect. The dashboard + cron closes that loop in 30 minutes of unattended work.

**Reversibility:** HIGH — Adding/cronning a JSON file + banner is single-file rollback; consumers fall back to text "needs_db_tunnel".

**Rollback:** rm cron entry + revert banner DOM injection

**Compounding:** YES — affects ['scorecards', 'mgp', 'accountability_hud', 'param_surface', 'strategy_library', 'playbooks', 'live_classifier']

**Unlocks:** ['param-surface-freshness']

**Done when:**
- /system/freshness.json updated at least every 30 min during 09:00–17:00 ET on trading days
- Banner on /system/ index shows green/yellow/red per property, sourced from freshness.json
- A simulated 24h-stale playbook output flips its badge to red within 30 min
- /system/update_freshness.py runs via cron without errors for 5 consecutive trading days

### p0-orchestrator

**Plain title:** Pipeline orchestrator: run_nightly.py calls every generator, logs to one place, fails loud

**Why it matters:** mgp-cron-skipped-5-14 is a P0 today only because per-generator schedulers fail silently. One orchestrator with one log retires the entire class of silent-failure bugs.

**Reversibility:** MEDIUM — Adds a new wrapper script; existing per-property schedules stay until cutover. Cutover step is LOW.

**Rollback:** point Task Scheduler back to per-generator entries

**Compounding:** YES — affects ['scorecards', 'mgp', 'monthly_reports', 'param_surface', 'playbooks']

**Done when:**
- /z/setup_daily_reporting/run_nightly.py exists and is invoked by Task Scheduler in place of per-generator entries
- Log file /z/logs/nightly-YYYY-MM-DD.log written per run, includes start+end+exit code per generator
- A deliberately broken generator (returns empty) causes non-zero exit + email alert within 1 run
- No per-property "did this run?" diagnostics required for 5 consecutive trading days

### p0-daily-summary-view

**Plain title:** main.daily_summary SQL view: kills duplicate computation

**Why it matters:** acct-v2 risk-bump bug and ticket-meter bug are both symptoms of three surfaces recomputing P&L differently. The view makes them match by construction.

**Compounding:** YES — affects ['scorecards', 'accountability_hud', 'monthly_reports']

**Blocked by:** ['run-scientific-layer-migrations', 'p0-identity-fn']

**Done when:**
- Migration in /z/setup_daily_reporting/reports/migrations/scientific_layer/ creates main.daily_summary
- gen_scorecard.py, gen_monthly_dashboard.py, accountability-v2 trader-range.php all read FROM the view
- Risk-bump bug and ticket-meter bug both resolve as a side effect (verification check)
- Sample day P&L matches between Accountability, Scorecards, and Monthly to the cent for 5 trading days
- Rollback: DROP VIEW main.daily_summary; revert generator commits to pre-view SHAs
- No downstream regressions observed for 5 trading days after deployment

### p0-identity-fn

**Plain title:** Identity function: resolve_user(account_id) -> (user_id, trader_name)

**Why it matters:** gen_scorecard.py hardcodes user_id=2; monthly is hardcoded to James; strategy-upload-ui is blocked on identity. Replaces 4 hardcoded paths with one helper.

**Reversibility:** MEDIUM — Additive helper module; switching call sites is iterative per surface, each surface revert is local.

**Rollback:** revert generator commits one-by-one; helper module can remain unused

**Compounding:** YES — affects ['scorecards', 'monthly_reports', 'accountability_hud', 'strategy_library']

**Unlocks:** ['multi-trader-scorecards', 'shared-user-dropdown', 'p0-daily-summary-view']

**Done when:**
- /z/setup_daily_reporting/reports/lib/identity.py exports resolve_user(account_id) -> (user_id, trader_name)
- /z/public_html/_shared/identity.php exports resolve_user($account_id)
- gen_scorecard.py, gen_monthly_dashboard.py, accountability-v2 trader-range.php, classify_v2.py all import the helper (zero hardcoded user_id=2 or DEFAULT_ACCOUNT remain in repo)
- Adding a new trader = INSERT into the mapping table only; no code changes

### p0-param-surface-registry

**Plain title:** Param Surface as strategy registry: /param-surface/ index + per-strategy grid pages

**Why it matters:** Strategy Library cannot link to per-strategy edge data, Scorecard Strategy Breakdown can only grade VWAP bands, and new strategies (VWAP Pull-In, Back$ide Scalp, td-vwap) have no surface. Registry pivot unblocks all three.

**Reversibility:** MEDIUM — New index + per-strategy pages live in /param-surface/ tree; existing param-surface-db/ stays untouched. Cutover to /system/strategies.json registry IDs is the LOW part.

**Rollback:** restore old /param-surface/ index from .bak; keep VWAP grid as fallback

**Compounding:** YES — affects ['param_surface', 'strategy_library', 'scorecards']

**Unlocks:** ['param-surface-strategy-registry', 'param-surface-freshness']

**Done when:**
- /param-surface/ index lists ≥3 strategies (VWAP bands, td-vwap, vwap-pull-in) with freshness badge per row
- Each registry row links to a /param-surface/<strategy-id>/ grid using the same 3x4 template
- Registry rows seeded from /system/strategies.json so adding a strategy = JSON edit only
- main.user_strategies storage scaffolded but optional (built-ins seeded by code first)

### audit-webhook-coverage

**Plain title:** Audit what alerts_tradingview.indicator_alerts is MISSING vs what the scorecard wants (stop, tp1, tp2, rr, grade, rvol, 

**Why it matters:** Columns present: entry_price, vwap, vwap_upper_1..3, vwap_lower_1..3, band_spread_1..3, band_spread_rate, band_slope, market_regime, playbook_type, strategy, direction, indicator, exit_price, exit_rea...

**Blocked by:** ['p0-indicator-alerts-ddl']

**Unlocks:** ['remove-na-labels', 'wire-webhooks']

**Done when:**
- DDL dump of alerts_tradingview.indicator_alerts saved to /z/trading/a1p_journal/docs/indicator_alerts_schema.txt
- Document at /todos/audit/2026-05-16/webhook-coverage.md lists: columns present + columns needed (stop_price, tp1_price, tp2_price, pre_trade_grade, rvol, ema_slope) with verdict per column

### shared-user-dropdown

**Plain title:** Shared user dropdown: query users-with-data, drive every page from ?user= URL param

**Why it matters:** One query joining main.users with main.journal + indicator_alerts, counts days_with_trades + alerts_received. Feeds all 5 property pages.

**Compounding:** YES — affects ['scorecards', 'monthly_reports', 'accountability_hud', 'strategy_library']

**Blocked by:** ['add-user-role-approval', 'p0-identity-fn']

**Unlocks:** ['phase-4-trader-selector', 'multi-trader-scorecards']

**Done when:**
- /z/public_html/_shared/user-dropdown.html (or .js) renders a select populated from a /api/users-with-data.php endpoint
- Each property page that needs a user picker includes the same component
- URL ?user=<id> drives every consuming page

### add-user-role-approval

**Plain title:** Add role + is_approved columns to main.users

**Why it matters:** Enables admin/trader distinction and approve/deny gate. Migration: ALTER TABLE main.users ADD COLUMN role VARCHAR(20) DEFAULT 'trader', ADD COLUMN is_approved BOOLEAN DEFAULT false.

**Reversibility:** LOW — ALTER TABLE on main.users. Reversible (drop columns) but requires data-write coordination once consumers depend on it.

**Rollback:** ALTER TABLE main.users DROP COLUMN role, DROP COLUMN is_approved

**Unlocks:** ['strategy-upload-ui', 'multi-trader-scorecards', 'shared-user-dropdown', 'roberto-classifier-overrides-persist']

**Done when:**
- main.users has role VARCHAR(20) DEFAULT 'trader' and is_approved BOOLEAN DEFAULT false
- James row updated to role=admin, is_approved=true
- gen_scorecard.py + accountability-v2 + strategy-upload-ui can read role from a single join
- Rollback: ALTER TABLE main.users DROP COLUMN role, DROP COLUMN is_approved
- No downstream regressions observed for 5 trading days after deployment

### ux-cross-nav

**Plain title:** Cross-page navigation: every property must link to every other property

**Why it matters:** Currently clicking into a property loses the cockpit navigation; 8 properties need the unified top-nav. Touches every surface so the friction is felt site-wide.

**Reversibility:** MEDIUM — Shared HTML include + header consumed by 8 properties. Per-property revert is local but visual regression on every surface if header breaks.

**Rollback:** revert _shared/nav.html

**Done when:**
- /z/public_html/_shared/nav.html (or partial) included on /system/, /todos/, /scorecards/, /playbooks/, /mgp/, /strategies/, /accountability/, /backtests/
- Visual sanity: from each property, every other property is reachable in 1 click
- Roll-out: revert per-property if the nav breaks layout

### scorecard-time-of-day-equity

**Plain title:** Scorecard Intraday Equity Curve: x-axis = time of day (not Trade #)

**Why it matters:** Currently shows Trade 1..101 on x-axis which loses the when-did-I-make-money signal. Switch to time-of-day (09:30 â†’ 16:00 ET). Same y-axis (cumulative P&L). Needs entry_time from trade dict; if miss...

**Reversibility:** HIGH — Single chart axis change in scorecard generator.

**Rollback:** restore Trade# axis

**Done when:**
- Intraday equity curve on /scorecards/trade_scorecard_*.html has x-axis = ET time of day (09:30–16:00)
- Y-axis stays cumulative P&L
- Reference scorecard regen matches pre-change Y values at end of day

### data-freshness-audit

**Plain title:** DATA FRESHNESS: audit why newest trades aren't flowing into DB + Param Surface

**Why it matters:** User-reported "newest trades not flowing"; if true, this silently invalidates Scorecards, Monthly, Param Surface, and Accountability simultaneously. Read-only diagnostic that should run before any of those properties is trusted again.

**Reversibility:** HIGH — Read-only diagnostic; produces a report, no writes.

**Rollback:** n/a — read-only

**Unlocks:** ['fix-pipeline-0417', 'fix-missing-days']

**Done when:**
- Report at /todos/audit/2026-05-16/freshness-audit.md lists: last trade_date in main.journal, last datetime_ny in indicator_alerts, last successful Gr8Trade ingest, last pipeline.js run
- If any source is >24h stale on a trading day, root cause documented + assigned
- Findings feed back into freshness.json sources block

### fix-pipeline-0417

**Plain title:** Fix pipeline not running for 2026-04-17 (subset of freshness audit)

**Blocked by:** ['data-freshness-audit']

**Done when:**
- main.journal contains a row for trade_date=2026-04-17 (if trades actually happened that day) OR documented as no-trade day
- Pipeline log for 2026-04-17 retrieved + cause documented

### fix-missing-days

**Plain title:** Fix scorecard manifest missing 4/1-4/13 days (likely same root cause)

**Blocked by:** ['data-freshness-audit']

**Done when:**
- /scorecards/manifest.json lists all trading days 2026-04-01 through 2026-04-13
- Each listed day has a /scorecards/trade_scorecard_<date>.html present

### risk-hud-api-wire

**Plain title:** Wire Risk Manager page to smb.a1prospect.com live API (replace mock data)

**Why it matters:** risk.html built with full gauge UI. Set API_URL at top to the smb subdomain endpoint that returns { traders: [{name, blotter, daily_stop, trades, win_rate, mult_mtm, violations_week}] }. Then remove M...

**Blocked by:** ['risk-hud-accountability-hud-dedup-review']

**Done when:**
- /z/public_html/accountability/risk.html reads from a real smb subdomain endpoint
- MOCK_DATA constant removed
- Page renders correctly for 5 consecutive trading days

### catalog-refactor-shared-json

**Plain title:** Catalog refactor: extract 16-strategy catalog to /strategies/catalog.json (one source for 5 surfaces)

**Why it matters:** 5 surfaces hold 5 copies of the strategy catalog and have already drifted (split-td-vwap task documents the drift between _scientific_overlay.js and classify_entry()). Every future strategy change today touches 5 files. /system/strategies.json already exists post-5/15 migration — this is the consumer-side cutover.

**Reversibility:** LOW — 5 surfaces refactor to one source. Additive copy is MEDIUM but cutover to single source touches 5 properties. Per project_canonical_taxonomy memory, /system/strategies.json already exists - this is the consumer-side cutover.

**Rollback:** each surface revert: restore inline catalog from git

**Compounding:** YES — affects ['strategy_library', 'scorecards', 'live_classifier', 'param_surface', 'playbooks']

**Unlocks:** ['alex-range-break-register', 'refactor-gen-scorecard-py-classify-entry-to-use-re', 'add-strategy-id-column-to-indicator-alerts-main-jo', 'refactor-strategies-page-to-render-from-system-str']

**Done when:**
- /system/strategies.json is the canonical (post-5/15 migration; confirmed)
- _scientific_overlay.js fetches /system/strategies.json instead of inlining
- gen_scorecard.py classify_entry() reads /system/strategies.json via Python helper
- classify/*.json files reference the same canonical IDs
- /strategies/ page renders from /system/strategies.json
- Per-surface revert plan: each surface can fall back to its prior inline catalog via git revert
- No downstream regressions observed for 5 trading days after final consumer cuts over

### cron-update-freshness

**Plain title:** Cron /system/update_freshness.py to keep freshness strip auto-refreshing

**Why it matters:** update_freshness.py is written and seeded; ~2 minutes to cron it. Once cronned, the freshness dashboard becomes live and the silent-regression detection from p0-freshness-dashboard starts working.

**Unlocks:** ['freshness-db-source-side']

**Done when:**
- /etc/cron.d (or Windows Task Scheduler equivalent) entry runs update_freshness.py every 30 min 09:00–17:00 ET on weekdays
- After 1 trading day, /system/freshness.json age_hours values reflect live mtimes within 30 min
- Cron log shows zero errors for 5 consecutive trading days

### mtf-vp-tradingview-handler

**Plain title:** MTF VP Scanner: TradingView ticket-in handler (Path B from project memo)

**Why it matters:** Per memory project_mtf_scan_engine.md, Path A (on-demand worker queue) shipped 4/28. Path B is the TradingView webhook entry point: a Pine alert fires, hits an endpoint, queues a scan, posts the resul...

**Reversibility:** MEDIUM — New webhook handler endpoint; idempotency-keyed.

**Rollback:** disable handler URL

**Done when:**
- Webhook endpoint accepts TradingView ticket payload + queues a scan
- Idempotent on duplicate ticket id (same id → no double scan)
- Result posts back via same path as Path A worker
- Smoke test: 3 webhook posts → 3 scans queued + completed

### refactor-scientific-overlay-js-to-load-from-system

**Plain title:** Refactor _scientific_overlay.js to load from /system/strategies.json

**Why it matters:** First step of engine/UI separation per project_system_contract.md rule #5. Engine layer must source from /system/strategies.json before downstream consumers (live evaluator, accountability grade column) can trust the catalog.

**Reversibility:** MEDIUM — JS module change in scorecards; loaded fetch contract is the new dependency.

**Rollback:** restore inline catalog in _scientific_overlay.js

**Unlocks:** ['refactor-gen-scorecard-py-classify-entry-to-use-re', 'split-td-vwap-from-vwap-pull-in-in-classifier']

**Done when:**
- _scientific_overlay.js fetches /system/strategies.json at load + dispatches by strategy id
- No inline strategy rule constants remain in _scientific_overlay.js
- /strategies/ page renders identical output before and after

### refactor-gen-scorecard-py-classify-entry-to-use-re

**Plain title:** Refactor gen_scorecard.py classify_entry() to use registry lookup

**Why it matters:** classify_entry() has its own inline playbook logic that diverges from _scientific_overlay.js. Replace inline constants with lookups against /system/strategies.json so both batch (EOD scorecard) and li...

**Blocked by:** ['refactor-scientific-overlay-js-to-load-from-system', 'catalog-refactor-shared-json']

**Done when:**
- classify_entry() in gen_scorecard.py reads thresholds from /system/strategies.json via shared loader
- Output of gen_scorecard.py for a reference day matches pre-refactor output exactly (strategy tags unchanged)

### split-td-vwap-from-vwap-pull-in-in-classifier

**Plain title:** Split TD VWAP from VWAP Pull-In in classifier

**Why it matters:** _scientific_overlay.js and gen_scorecard.py classify_entry() currently merge TD VWAP (pure Dale: flat bands, entry -1 SD) and VWAP Pull-In (James hybrid: entry VWAP to -0.5 SD). Schema v1 has them as ...

**Blocked by:** ['refactor-scientific-overlay-js-to-load-from-system']

**Done when:**
- classify_v2.py + classify_entry() can emit "td-vwap-long" vs "vwap-pull-in-long" as distinct tags
- Reference day scorecard pie shows both as separate slices where applicable
- Live HUD scoring distinguishes the two

### add-strategy-id-column-to-indicator-alerts-main-jo

**Plain title:** Add strategy_id column to indicator_alerts + main.journal + backfill via classifier

**Why it matters:** Phase 0 #5 enabler — without strategy_id as a stable FK, scorecard/param-surface/live-evaluator/accountability cannot join cleanly on strategy. Every future scoring change is brittle until this lands.

**Blocked by:** ['run-scientific-layer-migrations', 'catalog-refactor-shared-json']

**Unlocks:** ['wire-live-grade-column-into-accountability-hud-v2-']

**Done when:**
- alerts_tradingview.indicator_alerts and main.journal both have strategy_id column (FK or text id)
- Backfill script populates historical rows by re-running the registry classifier
- Spot-check 5 random historical rows match the classifier output
- Rollback: ALTER TABLE ... DROP COLUMN strategy_id; backfill historical data lost
- No downstream regressions observed for 5 trading days after deployment

### mgp-cron-skipped-5-14

**Plain title:** MGP auto-fire skipped 5/14 mid-day + recap; 5/15 morning ran ~2h45m late

**Why it matters:** Two consecutive trading days of scheduler misbehavior across three fire slots blocks the Monday MGP cutover. P0 today per the today_focus block.

**Done when:**
- schtasks /query output for MGP triggers captured + cross-checked vs notify.log timestamps
- Root cause documented (trigger drift / WTS account state / network / etc.)
- Fix applied + verified: 5 consecutive trading days with morning + mid-day + recap all firing within ±15 min of scheduled slot
