Orchestrata Ultimate › Plans › templates › feature-plan-template
Feature plan — SPEC-<NNN> <feature name>
Source: plans/templates/feature-plan-template.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-06 · 63 lines.
Prose pending.
Plan text
Feature plan — SPEC-
Instantiate this template for EVERY spec feature before implementation starts (user ruling, 2026-07-06). A feature is NOT done when its modules exist and their unit tests pass — it is done when the code is CONSTRUCTED at a composition root, REACHABLE from an entrypoint, TRACED, and the RTM displays exactly that. Phases 4–6 exist because 96 modules (~26K LOC) were once built, tested, and never wired.
1. Requirements
- Spec:
specs/<NNN-.../spec.md>; checklist:checklists/requirements.md - REQ ids this feature satisfies: REQ-
-…, … - Prior decisions that constrain design: D
(plans/decisions-*.md)
2. Design
- Approach (2–5 sentences); genuine forks surfaced as D-entries BEFORE coding
- Twin check:
python scripts/serialize_codebase_ast.py symbols/refs— does ANY existing module already trace these REQs? If yes: consolidation ruling first, never a parallel implementation.
3. Implementation units
| Module | Classes/functions | @traces reqs | Tests |
|---|---|---|---|
| src/… | … | REQ-… | tests/… |
4. WIRING PLAN (mandatory — the phase that was historically skipped)
- Composition root: exact file:line where each class is CONSTRUCTED in production (kernel boot, gateway server init, volk init, CLI main, DI container, plugin manager — name it precisely).
- Consumer path: entrypoint → … → this feature (the import/call chain a packet/request/command actually travels). If no production path exists, the feature is NOT wireable as designed — back to §2, not forward to §7.
- Lifecycle: who starts/stops/owns it (startup order, shutdown, error containment).
- Config: env vars / YAML / feature flag; staged (AUDIT-ONLY) wiring if risk warrants, with the promotion criterion stated.
5. Wiring proof (tests that fail if the wiring is removed)
- Construction test: the composition root actually builds the object (real infra, no mocks).
- Reachability test: drive the ENTRYPOINT (real request/packet/CLI run) and assert the feature's observable effect. A unit test importing the module directly does NOT count as wiring proof.
6. Traceability gate
- Wiring seams carry @traces with this feature's REQ ids (wiring IS requirement satisfaction).
python scripts/serialize_codebase_ast.py check-tracesgreen.- RTM regenerated in the same commit (
scripts/generate_traced_rtm_simple.py); the REQ rows must visibly move. The RTM is the scoreboard.
7. Quality gates
- Coverage ≥90% on every new/touched module (subprocess-visible).
- ruff, pyright (or ratchet), test-review clean; suite lane green.
- No new orphans:
who-importsnon-empty for every new module.
8. Definition of done
- [ ] All REQ ids implemented and traced
- [ ] Constructed at the named composition root (file:line in this doc)
- [ ] Reachability test passes; removing the wiring fails it
- [ ] check-traces green; RTM shows the REQs implemented+tested
- [ ] Coverage/lint/type gates green; suite lane green
- [ ] This plan's table updated with final file:line references