# Suite9 Competitive Responsibility Residual MoE 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 Suite9 experiment that discovers specialists through sparse detached row responsibilities, then trains a router to predict those responsibilities, with exact Suite7 fallback.

**Architecture:** Reuse Suite7 checkpoints and Suite8 latent views. Phase 1 freezes the Suite7 shared/private representation and router while experts learn on sparse responsibility-weighted counterfactual losses. Phase 2 freezes experts and distills the sparse responsibility targets into the router; deployment is accepted only if temporal validation beats Suite7.

**Tech Stack:** Python, PyTorch, NumPy, pandas, scikit-learn-compatible metrics, existing Suite7 cache/evaluation utilities.

**Spec:** `SUITE9_DESIGN.md`

## Global Constraints
- Reuse existing cross-faculty cache; never retrain Committee models.
- Load the actual Suite7 per-fold checkpoint as initialization.
- Keep Committee/faculty embedding/shared encoder/faculty adapters frozen during specialist discovery.
- Sparse responsibilities include an explicit NULL option.
- Final deployment must have exact Suite7 fallback when temporal validation does not improve.
- Oracle responsibility is diagnostic only.

---

### Task 1: Responsibility mechanics and model
**Files:** Create `suite9_competitive_responsibility_moe.py`; test `tests/test_suite9_responsibility.py`.
- [ ] Write failing tests for sparse responsibility construction, NULL fallback, top-k sparsity, detached expert loss, and Suite7 checkpoint loading.
- [ ] Run tests and confirm failure because Suite9 module is missing.
- [ ] Implement the model and responsibility/loss functions.
- [ ] Run tests and confirm pass.

### Task 2: Specialist/router diagnostics
**Files:** Create `suite9_diagnostics.py`; test `tests/test_suite9_diagnostics.py`.
- [ ] Write failing tests for responsibility mass/entropy, assigned-vs-unassigned utility, router-target agreement, oracle score, and top-20 transition counts.
- [ ] Run tests and confirm failure.
- [ ] Implement diagnostic functions.
- [ ] Run tests and confirm pass.

### Task 3: Phased training and temporal fallback
**Files:** Create `train_suite9_competitive_responsibility.py`; test `tests/test_suite9_smoke.py`.
- [ ] Write a synthetic two-faculty cache + Suite7 checkpoint smoke test.
- [ ] Run test and confirm failure because trainer is missing.
- [ ] Implement Phase-1 discovery, Phase-2 router distillation, optional Phase-3 refinement, validation selection, exact Suite7 fallback, result serialization, and baseline comparisons.
- [ ] Run smoke test and confirm generated fold/model/metric/diagnostic files.

### Task 4: Documentation and verification
**Files:** Create `README_suite9.txt`; update tests as needed.
- [ ] Document full command and output interpretation.
- [ ] Run `pytest -q`.
- [ ] Run `python -m py_compile` on Suite9 Python files.
- [ ] Run CLI `--help`.
- [ ] Run a fresh synthetic end-to-end smoke test.
- [ ] Package `/mnt/data/suite9_competitive_responsibility.zip` and verify archive integrity.
