feat: implement Fowler gap analysis — evaluations, pace layers, conceptual mass, negative knowledge, replacement audit
Five gaps identified from Chad Fowler's 'The Phoenix Architecture':
1. Evaluation vs. Implementation Test Separation
- Evaluation model (durable behavioral assertions at IU boundaries)
- EvaluationStore with coverage analysis and gap detection
- Evaluations bind to boundary_contract, domain_rule, invariant, failure_mode
- Survive regeneration; implementation tests don't
2. Conservation Layers & Pace Layers
- PaceLayer type: surface → service → domain → foundation
- Layer crossing detection (slow-depends-on-fast = violation)
- Pace-appropriate regeneration cadence enforcement
- Conservation flag for surfaces where external trust accumulates
3. Conceptual Mass Budget
- Mass = contract concepts + dependencies + side channels + canon nodes
- Interaction potential: n*(n-1)/2 combinatorial burden
- Ratchet rule: mass cannot grow without justification
- Thresholds: healthy(7), warning(12), danger(20)
4. Replacement Audit (phoenix audit)
- 7-dimension assessment: boundary clarity, evaluation coverage,
blast radius, deletion safety, pace layer, conceptual mass,
negative knowledge
- Readiness gradient: opaque → observable → evaluable → regenerable
- Weighted composite scoring with concrete blockers/recommendations
- New CLI command with formatted output
5. Negative Knowledge (immune memory)
- Records failed generations, rejected approaches, incident constraints
- NegativeKnowledgeStore with active/stale lifecycle
- Consulted during audit; surfaced in recommendations
- Preserved across compaction
Also includes:
- Letter to Chad Fowler re: implementation insights and book gaps
- Gap-filling plan document
- 36 new tests (341 total, all passing)
- Full public API exports in index.ts