# Roadmap: AITP Runtime And Knowledge Foundations

## Milestones

- ✅ **v1.7 Kernel Decomposition And Maintainability Guard** — Phases 30-33 (shipped 2026-04-05)
- ✅ **v1.6 Runtime Front-Door Parity Hardening** — Phases 25-29 (shipped 2026-04-05)
- ✅ **v1.5 L2 Knowledge Compiler And Hygiene** — Phases 20-24 (shipped 2026-04-05)
- ✅ **v1.4 Runtime Simplification And Reuse Foundations** — Phases 15-19 (shipped 2026-04-04)
- ✅ **v1.3 Multi-Topic Parallel Execution** — Phases 10-14 (shipped 2026-04-04)
- ✅ **v1.2 Projection-First Formal-Theory Seed** — Phases 06-09 (shipped 2026-04-01)
- ✅ **v1.1 L2 Topic-Skill Projection** — retrospective ship capture in commit `6445c59` (shipped 2026-04-01)
- ✅ **v1.0 Runtime Hardening** — Phases 1-5 (shipped 2026-03-31)

## Overview

`v1.7` is now shipped.

It reduced hotspot-file risk in the kernel itself by:

1. extracting real responsibilities out of `aitp_service.py`,
2. beginning `aitp_cli.py` handler decomposition,
3. tightening explicit maintainability budgets as extractions landed,
4. closing with docs/tests that lock the new boundaries.

No post-`v1.7` milestone is active yet. The explicit future-horizon item
remains `L5 Publication Factory`.

## Phases

- [x] **Phase 30: Frontdoor Support Boundary Extraction** - Extract the
  front-door/doctor/migrate cluster out of `aitp_service.py` into a focused
  helper module and tighten the first budget.
- [x] **Phase 31: AITPService Core Boundary Extraction** - Extract another
  coherent `aitp_service.py` slice so the main façade shrinks further.
- [x] **Phase 32: AITP CLI Handler Decomposition** - Begin splitting
  `aitp_cli.py` command dispatch into dedicated handlers.
- [x] **Phase 33: Maintainability Budget And Regression Closure** - Close the
  milestone by tightening budgets, documenting the new boundaries, and locking
  them with regression tests.

## Phase Details

### Phase 30: Frontdoor Support Boundary Extraction
**Goal**: Extract one real responsibility cluster out of `aitp_service.py`
without changing public behavior.
**Depends on**: `v1.6` shipped baseline
**Requirements**: [MTN-01, MTN-03]
**Success Criteria** (what must be TRUE):
  1. Front-door/doctor/migrate support moves to a focused module.
  2. `AITPService` keeps the same public methods as thin wrappers.
  3. `aitp_service.py` line count drops and the budget tightens accordingly.
  4. Existing runtime/install tests still pass.
**Plans**: 1 plan

Plans:
- [x] 30-01: Extract front-door support and migration helpers into a focused
  module, then tighten the first maintainability budget.

### Phase 31: AITPService Core Boundary Extraction
**Goal**: Extract another coherent `aitp_service.py` slice so the core façade
shrinks further.
**Depends on**: Phase 30
**Requirements**: [MTN-01]
**Success Criteria** (what must be TRUE):
  1. Another major responsibility boundary leaves `aitp_service.py`.
  2. The extracted module has a clearer ownership boundary than the giant file.
  3. Public behavior remains stable under regression tests.
**Plans**: 1 plan

Plans:
- [x] 31-01: Extract the agent-install/bootstrap cluster into a focused module
  and tighten the maintainability budget again.

### Phase 32: AITP CLI Handler Decomposition
**Goal**: Start decomposing `aitp_cli.py` so new subcommands do not keep
accumulating in one dispatcher file.
**Depends on**: Phase 31
**Requirements**: [MTN-02]
**Success Criteria** (what must be TRUE):
  1. At least one coherent CLI command family moves into a dedicated handler.
  2. CLI behavior remains stable.
  3. `aitp_cli.py` line-count risk stops growing unchecked.
**Plans**: 1 plan

Plans:
- [x] 32-01: Extract the front-door command family into a dedicated CLI
  handler and tighten the CLI maintainability budget.

### Phase 33: Maintainability Budget And Regression Closure
**Goal**: Close the milestone with tighter budgets and docs/tests that explain
the new boundaries.
**Depends on**: Phase 32
**Requirements**: [MTN-03, DOC-06]
**Success Criteria** (what must be TRUE):
  1. Budget files reflect the new smaller hotspots.
  2. Docs/tests point at the new module boundaries.
  3. The milestone closes with explicit maintainability guardrails.
**Plans**: 1 plan

Plans:
- [x] 33-01: Document the extracted kernel boundaries and lock them with
  regression tests, then close `v1.7`.

## Progress

| Phase | Plans Complete | Status | Completed |
|-------|----------------|--------|-----------|
| 30. Frontdoor Support Boundary Extraction | 1/1 | Complete | 2026-04-05 |
| 31. AITPService Core Boundary Extraction | 1/1 | Complete | 2026-04-05 |
| 32. AITP CLI Handler Decomposition | 1/1 | Complete | 2026-04-05 |
| 33. Maintainability Budget And Regression Closure | 1/1 | Complete | 2026-04-05 |

## Backlog

### Phase 999.1: L5 Publication Factory (BACKLOG)
**Goal:** Add a final `L5` publication/output layer that turns a completed
topic into a paper-grade writing package without changing scientific truth.
**Requirements:** [PUB-01, PUB-02, PUB-03]
**Plans:** 0 plans

Plans:
- [ ] TBD (promote only when explicitly selected as a new milestone)
