# 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.
