# Next session resume prompt

Copy-paste this into a new Claude Code session to pick up Phase 7c F4 oracle pretrain work:

---

Resume foxhunt Phase 7c F4 oracle pretraining work.

Branch: `ml-alpha-regime-observer` at HEAD `7376b1c67` (6 commits ahead; pushed). F2 (slot 817) + F5 (slot 823) + Option A gate-patches engaged. F2+F5+OptA = SOTA local at eval_pnl=-$415,237 (best-of-session, +$29k vs Phase 5). Cluster sk2z9 bled 3× faster than F2-alone with 6:1 Short:Long directional bias → killed at step 519 → F4 oracle pretrain is the escalation per spec §5.3 outcome 3.

**Read these memory pearls first** (in this order):
1. `project_phase7_state_2026_06_05.md` — full Phase 7 state, branch + slots + verdicts
2. `pearl_f2_q_centered_distill_necessary_not_sufficient.md` — why F2 alone failed
3. `pearl_f5_state_mask_neutralized_by_downstream_gates.md` — F5 gate-interop pattern
4. `pearl_f2_plus_f5_unlock_q_signal.md` — why combined helps; cluster bleed
5. `reference_outcome_head_supervised_pattern.md` — `outcome_head.rs` is the F4 Phase 7c.2 precedent
6. `feedback_investigation_first_falsification_methodology.md` — methodology that broke 64-commit going-in-circles

**Read this spec next**:
- `docs/superpowers/specs/2026-06-05-f4-oracle-pretraining-infrastructure.md` (733 lines, 6 phases 7c.0-7c.5, ~7-14 days bounded)

**Next step**: write the F4 implementation plan at `docs/superpowers/plans/2026-06-05-f4-oracle-pretraining-implementation.md` (similar 1500-LOC structure to F2 plan), then dispatch Phase 7c.0 oracle pipeline coder (2-3 days).

**Top 3 risks per F4 spec §7**:
1. Oracle heuristic itself wrong → F4-G1 Pearson < 0.7 → STOP at Phase 7c.0
2. Reward function identity drift → MUST use realistic-Rust+CUDA oracle (NOT Python)
3. Q drift undoes warm-start → F4-G4/G6 are detection gates

**Key code references**:
- F2 kernel: `crates/ml-alpha/cuda/rl_q_pi_distill_grad.cu` Step 2 hinge (lines ~101-150)
- F5 kernel: `crates/ml-alpha/cuda/rl_state_action_mask.cu`
- OutcomeHead pattern: `crates/ml-alpha/src/rl/outcome_head.rs`
- F2 plan template: `docs/superpowers/plans/2026-06-04-f2-q-centered-distill-implementation.md`

**Open questions for the plan** (resolve before dispatching coder):
- Reward function versioning hash protocol (Phase 5 slots + Phase 7a/7b slots + γ + K → filename embedding)
- Held-out subset for F4-G3 (last 10% of fold-1 train OR fold-1 eval discarded)
- Encoder LR for pretraining (same as RL fine-tune for MVP simplicity OR separate higher LR)

Proceed with writing the F4 implementation plan, then begin Phase 7c.0.
