# Suite15 Conditional Information Audit Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** Build a chronology-safe 16-state conditional-information audit that determines which raw structured views add predictive value beyond frozen E0 and Committee anchors.

**Architecture:** Reuse the Suite14 canonical/structured-cache loader but replace MoE collaboration with identity-preserving conditional residual probes over deterministic raw-view matrices. Generate strict walk-forward E0 OOF scores, evaluate every view subset, add matched Committee/tree controls, and derive Shapley/synergy/bootstrap diagnostics.

**Tech Stack:** Python 3, NumPy, pandas, PyTorch, scikit-learn, joblib, pytest.

**Spec:** `docs/superpowers/specs/2026-08-30-suite15-conditional-information-audit.md`

## Global Constraints
- No gating, MoE, authority prediction, evidence exchange, GRANDE/NODE/TEL, or sequential boosting in Suite15.
- Raw pre-encoder structured views are the primary evidence inputs.
- E0 audit-training scores must be strictly chronology-safe and cross-fitted by temporal block.
- E0 is frozen during conditional probe training.
- Every residual probe must have an exact no-op initialization.
- AP is the primary selection/evaluation metric; F1 and F2 are secondary core outcomes.
- Holdout uncertainty must use student-cluster bootstrap by IDSV.

---

### Task 1: Raw-view matrix contracts
**Files:** Create `suite15_views.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `ViewMatrixBuilder.fit(bundle, mask)`; `transform(bundle, subset, include_full_context=False)`; `all_view_subsets()`.
- [ ] Write tests proving there are exactly 16 unique subsets and core V1-V4 matrices include masks/types while excluding specialist context.
- [ ] Run focused tests and confirm RED because Suite15 view code is absent.
- [ ] Implement deterministic numeric/mask/categorical-one-hot view flattening and matched controls.
- [ ] Run focused tests and confirm GREEN.

### Task 2: Identity-preserving residual probe
**Files:** Create `suite15_models.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `CommitteePreservingGlobalExpert`; `ConditionalResidualProbe(input_dim, hidden=(256,128), residual_bound=2.0)`.
- [ ] Write tests for exact zero-initialized identity and bounded correction.
- [ ] Verify RED.
- [ ] Implement E0 architecture and residual probe.
- [ ] Verify GREEN.

### Task 3: Chronology-safe E0 and probe training
**Files:** Create `suite15_training.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `walk_forward_splits(blocks)`; `train_crossfit_e0(...)`; `train_residual_probe(...)`; `predict_residual_probe(...)`.
- [ ] Write tests that every E0 prediction block uses only strictly earlier blocks and that earliest uncovered rows are explicit.
- [ ] Verify RED.
- [ ] Implement effective faculty/class sampling, AP-robust checkpoint selection, nested historical E0 selection/refit, and residual-probe training.
- [ ] Verify GREEN.

### Task 4: Information diagnostics
**Files:** Create `suite15_information.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `exact_shapley`; `pairwise_synergy`; `absorption_index`; `cluster_bootstrap_delta_ap`; `optimal_threshold_metrics`; `classify_view_verdict`.
- [ ] Write analytic toy tests for Shapley, synergy, absorption, and clustered bootstrap behavior.
- [ ] Verify RED.
- [ ] Implement diagnostics and threshold metrics.
- [ ] Verify GREEN.

### Task 5: Tree confirmation probe
**Files:** Add to `suite15_training.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `fit_tree_probe(train_X, y, val_X, ...)`; `tree_probe_pair(...)`.
- [ ] Write test showing a view feature with real signal improves a matched HGB controls-only baseline.
- [ ] Verify RED.
- [ ] Implement capped-row HistGradientBoosting confirmation with deterministic seeds.
- [ ] Verify GREEN.

### Task 6: Canonical data pipeline
**Files:** Create `suite15_data.py`, `suite15_pipeline.py`; copy/adapt `suite15_structured_cache.py`; Test `tests/test_suite15_core.py`.
**Interfaces:** `load_fold_bundle(...)` returning chronology-safe Committee teacher probabilities plus raw structured tensors and IDs.
- [ ] Write bundle/context tests including no absolute-semester control leakage and structured/canonical row alignment.
- [ ] Verify RED.
- [ ] Implement/adapt Suite14 bundle/cache loading under Suite15 names.
- [ ] Verify GREEN.

### Task 7: Experiment runner and reporting
**Files:** Create `train_suite15_conditional_information_audit.py`, `suite15_reporting.py`, `run_suite15.sh`, `README.md`.
**Interfaces:** CLI produces per-fold score files and aggregate `information_lattice.csv`, `view_shapley.csv`, `pairwise_synergy.csv`, `absorption.csv`, `bootstrap_ci.csv`, `information_verdict.json`.
- [ ] Write launcher/output-contract tests.
- [ ] Verify RED.
- [ ] Implement all 16 E0 lattice fits, Committee anchor probes, full-context single-view probes, optional tree confirmations, holdout bootstrap, and concise diagnostic printing.
- [ ] Verify GREEN.

### Task 8: End-to-end verification
**Files:** `tests/test_suite15_smoke.py`.
- [ ] Add a tiny synthetic bundle smoke test that completes E0 anchor creation, two conditional probes, lattice diagnostics, and report generation.
- [ ] Run full pytest.
- [ ] Run `python -m compileall` over Suite15.
- [ ] Run `bash -n run_suite15.sh` and trainer `--help`.
- [ ] Run a synthetic CLI smoke test.
- [ ] Package Suite15 ZIP and re-run tests from the extracted archive.
