# Phase 4 Execution Plan

Phase 4 milestone: `#3` - AAA SaaS Productization and UX Polish.

## Objectives

- Move Schemeta from prototype ergonomics to production-grade UX/UI quality.
- Enforce measurable quality gates for beta and GA releases.
- Sequence high-risk engine work (layout/routing) behind stable UX foundations.

## Workstream Order

1. `#23` AAA-00: Plan and quality gates
2. `#15` AAA-01: Visual system redesign
3. `#16` AAA-02: Fit-to-view and viewport behavior
4. `#17` AAA-03: Layout engine v3
5. `#18` AAA-04: Routing engine v3
6. `#19` AAA-05: In-canvas editing overhaul
7. `#20` AAA-06: Diagnostics UX 2.0
8. `#21` AAA-07: Accessibility/responsive/keyboard pass
9. `#22` AAA-08: SaaS + MCP production hardening

## Dependency Graph

- `#15` is prerequisite for high-fidelity baseline updates and consistent UI controls.
- `#16` depends on `#15` token/layout primitives.
- `#17` depends on `#16` viewport/fit behavior to evaluate perceived quality.
- `#18` depends on `#17` placement decisions and semantic lanes.
- `#19` depends on `#15` and should begin in parallel with late `#17` work where safe.
- `#20` depends on `#19` interaction model for click-to-fix workflows.
- `#21` runs continuously but final pass must occur after `#15/#19/#20`.
- `#22` can run in parallel, but final contract freeze occurs after `#19/#20`.

## Critical Path

`#15 -> #16 -> #17 -> #18 -> #19 -> #20 -> #21 -> #22`

## Risk Register

1. Layout/routing regressions on dense circuits.
   - Mitigation: expand fixture corpus, snapshot + metric thresholds, staged rollout.
2. Visual redesign causing interaction regressions.
   - Mitigation: preserve interaction test suite, baseline review checklist.
3. Editor complexity inflation.
   - Mitigation: keep single source of truth for selection/edit state, strict undo invariants.
4. API/MCP compatibility drift.
   - Mitigation: contract tests and explicit schema/api version policy enforcement.

## Definition of Done (Phase 4)

- All issues `#15-#23` closed with acceptance criteria verified.
- Release checklist passes all beta and GA quality gates.
- Browser regression and baseline review pass on representative fixtures (including dense analog).
- API/MCP contract tests pass with versioned compatibility notes.
