Short Closure Phase Plan (Final Hardening)
Last Updated: 2026-02-28
Duration Target: 1 short phase Goal: Close remaining anti-drift and future-proofing gaps so stabilization can be formally marked CLOSED.
Scope
This phase is intentionally limited to the 5 remaining closure items:
- Legacy path consolidation
- Observability completeness
- Env/config single-source convergence
- Release-gate test strategy hardening
- Prompt/runtime contract hardening
No new product features in this phase.
Workstream 1: Legacy path consolidation
Objective: Eliminate or strictly constrain non-canonical runtime/tool paths.
Deliverables:
- Legacy tool gateway is either:
- retired, or
- reduced to a thin adapter that always delegates to canonical executor path.
- Explicit boundary doc updated with what remains and why.
- Drift test proving parity where compatibility path still exists.
Exit criteria:
- No behavior divergence between canonical path and allowed compatibility path.
- Deprecation status is clear and test-backed.
Workstream 2: Observability completeness
Objective: Make operational risk visible with explicit counters/signals.
Deliverables:
- Metrics/log fields for:
- queue health/backlog/failure
- tool denials by reason
- per-stage turn latency
- embedding calls per turn
- One concise runbook section mapping alert symptoms to likely root causes.
Exit criteria:
- On-call can diagnose top failure classes without code spelunking.
Workstream 3: Env/config convergence
Objective: Ensure one validated config contract across runtime.
Deliverables:
- Verify env usage aligns with validation schema and examples.
- Remove scattered direct env-loading side paths where still present.
- Add a lightweight drift check script/test (validation vs example vs usage).
Exit criteria:
- Config onboarding and runtime behavior are deterministic across environments.
Workstream 4: Release-gate test strategy hardening
Objective: Standardize release confidence around maintained critical-path suites.
Deliverables:
- Documented required gate commands for high-risk PRs.
- Clear policy that known-unmaintained suites are non-blocking until repaired.
- Stable curated gate remains green and repeatable.
Exit criteria:
- Release decisions no longer depend on flaky/unowned legacy suites.
Workstream 5: Prompt/runtime contract hardening
Objective: Remove brittle parsing/string surgery from active runtime paths.
Deliverables:
- Replace fragile extraction or stripping logic in active flow with explicit structured contract.
- Add regression tests for malformed/edge formatting cases.
Exit criteria:
- Prompt/runtime behavior remains stable under template edits and unusual inputs.
Final done definition for this closure phase
This phase is complete when all are true:
- P0 remains PASS
- P1 becomes PASS
- P2 becomes PASS or at most one clearly bounded PARTIAL with owner/date
- Required curated gate commands pass
SYSTEM-CLOSURE-DONE-DEFINITION.mdupdated toFinal decision: CLOSED
Execution order
- Legacy path consolidation
- Env/config convergence
- Observability completeness
- Prompt/runtime hardening
- Final gate run + closure record update
This order reduces drift first, then tightens operability, then seals runtime contracts.