# Requirements: v1.5 L2 Knowledge Compiler And Hygiene

**Defined:** 2026-04-05
**Status:** Shipped 2026-04-05
**Core Value:** AITP must turn vague but meaningful research starts into
bounded, durable, and explainable runtime state without pretending uncertainty
is already resolved.

## v1.5 Requirements

### L2 Compiled Knowledge

- [x] **L2KB-01**: `L2` now materializes compiled, link-rich, inspectable
  knowledge surfaces derived from canonical units rather than relying only on a
  flat unit catalog.
- [x] **L2KB-04**: Non-trivial `L2` consultation can now reference
  bounded compiled surfaces or compiler summaries when that improves
  explainability over raw unit lists alone.
- [x] **L2KB-05**: Compiler outputs remain explicitly derived and
  non-authoritative relative to canonical units, promotion decisions, and
  backend writeback records.

### L2 Hygiene And Isolation

- [x] **L2KB-02**: `L2` hygiene passes now surface stale summaries, missing
  concept bridges or links, contradictory trusted notes, and weakly connected
  canonical knowledge for review.
- [x] **L2KB-03**: Agent-generated scratch or provisional writeback now stays
  separated from trusted `L2` until review and promotion rules are satisfied.

### Docs And Integration

- [x] **DOC-04**: Docs and regression coverage now explain the
  compiled-versus-canonical-versus-staging `L2` model and keep consultation and
  promotion semantics honest.

### Human-readable Topic Replay

- [x] **REPLAY-01**: AITP can now materialize an on-demand,
  human-readable topic replay bundle from durable topic artifacts without
  inventing new scientific claims.
- [x] **REPLAY-02**: The replay bundle now provides an ordered learning path
  that points back to authoritative runtime, `L1`, `L4`, and reusable `L2`
  artifacts.
- [x] **REPLAY-03**: Replay output stays explicitly derived and
  non-authoritative; missing artifacts should be reported honestly instead of
  being patched by prose.

### Future Publication Layer

- [ ] **PUB-01**: `L5` should consume only completed topic outputs and relevant
  `L2` memory, not invent new scientific truth.
- [ ] **PUB-02**: `L5` should produce paper-grade structured outputs such as
  claim-evidence maps, outlines, figure plans, and manuscript drafts.
- [ ] **PUB-03**: `L5` should reject overclaiming or missing-evidence writing
  states by reopening topic work instead of patching them inside the writing
  layer.

## Future Requirements

- **AUTO-03**: Only after protocol-native reuse and compiled `L2` knowledge are
  proven should AITP consider adapter-facing bootstrap hints or generated skill
  wrappers.
- **GRAPH-01**: Cross-topic graph visualization may come later once compiled
  surfaces and hygiene semantics are stable.

## Out of Scope

| Feature | Reason |
|---------|--------|
| Replacing `L2` with a generic wiki or personal notebook | Canonical promoted knowledge must stay governed |
| Treating compiled summaries as canonical truth | Derived surfaces should not outrank `L2` units or promotion records |
| Auto-promoting scratch or compiler output into `L2` | Review and promotion gates remain mandatory |
| Implementing `L5` in this milestone | `L5` is intentionally the later final output layer |

## Traceability

| Requirement | Phase | Status |
|-------------|-------|--------|
| L2KB-01 | Phase 20 / Phase 21 | Complete |
| L2KB-04 | Phase 20 / Phase 21 | Complete |
| L2KB-05 | Phase 20 / Phase 23 | Complete |
| REPLAY-01 | Phase 21.1 | Complete |
| REPLAY-02 | Phase 21.1 | Complete |
| REPLAY-03 | Phase 21.1 | Complete |
| L2KB-02 | Phase 22 | Complete |
| L2KB-03 | Phase 23 | Complete |
| DOC-04 | Phase 24 | Complete |
| PUB-01 | Phase 999.1 | Backlog |
| PUB-02 | Phase 999.1 | Backlog |
| PUB-03 | Phase 999.1 | Backlog |

**Coverage:**

- v1.5 + future-horizon requirements: 12 total
- Mapped to phases: 12
- Unmapped: 0

---
*Requirements defined: 2026-04-05*
*Last updated: 2026-04-05 after shipping v1.5*
