Consolidated architecture spec. 44 numbered decisions across 12 sections. Captures the 2026-05-27 grilling-session conversation that re-baselined V2 against the collapsed architecture and Karpathy's LLM Wiki pattern.
V2 is the next-generation migration from collapsed, not from V1-original. The shape, milestones, gates, state machine, and review UX are already locked in 08-milestone-architecture.md. What V2 changes is the substrate: collapsed's brittle JSONB tables are replaced with markdown files in a per-course git repo, stored in Supabase Storage. Specialized agent TypeScript classes are replaced with one Task primitive + N markdown prompts (the Claude-Code-style harness). The Knowledge Base becomes a per-teacher LLM Wiki (Karpathy 2026-04-04) that compounds across courses. V2 has since cut over on the default branch; this page preserves the historical design rationale behind that migration.
Conflated V1-original (42 agents, 12 HITL) with Collapsed (8 agents). Then overshot the simplification by deleting the Evaluator in commit 0e0703d on the rationale that “Claude Code uses one LLM”. Both wrong.
Operator-confirmed pain: workflow_node_states + spec_files coordination breaks too often. Schema drift, opaque diffs, RLS complexity, debugging difficulty. Filesystem substrate eliminates these by construction.
08-milestone-architecture.md already defines milestones, gates, lifecycle, and 3-zone UI. V2's job is to implement that shape on a new substrate — not redesign it.
The five load-bearing ADRs (0004–0008) with full context, alternatives, and consequences.
Milestone state machine, dispatch flow, linear review apply, KB structure.
The 18-round grilling session that produced this spec, captured as a narrative.