Orchestrata Ultimate › Plans › wiring-campaign-2026-07-06
Wiring campaign — construct and wire ALL unwired code (user order, 2026-07-06)
Source: plans/wiring-campaign-2026-07-06.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-06 · 124 lines.
Prose pending.
Plan text
Wiring campaign — construct and wire ALL unwired code (user order, 2026-07-06)
Ruling: every implemented, spec-traced module with zero production construction gets WIRED (D14/D15 ruling generalized). Retirement is not an option; the only allowed exception is a proven same-REQ twin, which gets an individual consolidation ruling (absorb the better implementation into the live path — never delete capability).
Source of truth: module-granularity orphan audit (2026-07-06, 128 orphans = 10 entrypoints + 1 dynamic + 9 shims + 4 dead twins + 96 unwired + 8 misc). Entrypoints/shims/dynamic are NOT on this list (they are wired by process boundary or documented design). The 96 + ruled D13 items are the campaign.
Wave A — surgical quick wires (D13 already ruled) — MOSTLY LANDED (b44426a1)
- [x] A1 claude_code_driver → driver_factory dispatch (claude_code branch + claude_cli profile; NOTE: spec never defined a REQ for the routing key)
- [x] A2 openai_adapter → llm/client _register_openai (gated on OPENAI_API_KEY)
- [x] A3 plugin VolkRegistry → constructed in PluginSDK, threaded into PluginManager (was a silent no-op; alias-conflict guards now reachable)
- [ ] A4 dynamic_policy + resource_access — STOPPED: genuine multi-owner design fork (3 live governance surfaces, no analogous seam like D3). Needs a ruling: which surface gains the dependency, what non-blocking wiring means for admin-style rule mutation / resource-typed checks.
- [x] A5 pm goal_registry/goal_report → PMVolk (staged, context_path-gated; records goal progress on progress_update). NOTE: 012-vs-023 two-goal reconciliation still owed before deepening.
- [ ] A6 kernel/router.py CXPRouter → D3 consolidation (mine, pending)
- [ ] A7 DomainEntity name-collision twin → consolidation ruling (mine)
- [x] A8 deleted architect/{context_builder,project_init} + ux/{js_mixin, ux_js_scaffold} + tests (UX-scaffold mandate absent from ALL specs → DELETE branch confirmed, not WIRE)
Wave B — verification subsystem (D14) — PLAN LANDED (see D16)
22 modules / 2,975 LOC, SPEC-007b. Stages A–E per D16: A) audit-only QA Gate 4 via VerificationEngine (D3 precedent); B) author prolog/verification.pl + fix ConstraintEvaluator to consult Prolog; C) max_attempts 5 + ESCALATED→EscalationInterruptMixin (G226 reconciled: two counters, two scopes); D) replace 4 model-wrapper stubs with real call_llm + rewrite their stub-asserting tests; E) IntentConstraint adapter.
- [ ] B-A - [ ] B-B - [ ] B-C - [ ] B-D - [ ] B-E
Wave C — postman engine layer (D15) — ABSORPTION PLAN LANDED
16 modules / 6,172 LOC, SPEC-002. 12 phases; first seam = Postman.route() constructs DeliveryManager (+RoutingEngine+EnvelopeHandler) via a packet↔envelope adapter (to_instance handled pre-engine). BLOCKER to fix first: delivery.py:336-382 _deliver_to_recipient is a stub that lies DELIVERED. True twins to consolidate: Postman's local DeliveryStatus/ QueueEntry/DeliveryResult vs types.py supersets (same REQ ids). Phase 7 (message_store/replay sqlite + self-made redis) violates D12 — needs factory routing + storage decision BEFORE landing. Phase 12 governance.py is an island (never calls real PolicyEngine) — rewrite to delegate before absorbing. postman/queue.py (934 LOC near-twin of queue_manager) + EventEmittingPostman flagged for follow-up audit.
- [ ] C1 delivery seam (fix stub, wire DeliveryManager) - [ ] C2 guarantees
- [ ] C3 receipts - [ ] C4 routing rules - [ ] C5 queue+priority
- [ ] C6 topics/subscriptions - [ ] C7 store/replay (D12 fix first)
- [ ] C8 error handler - [ ] C9 config - [ ] C10 metrics - [ ] C11 admin
- [ ] C12 governance (delegate to real PolicyEngine first)
Wave D — knowledge_graph analysis layer (10 modules, 1,698 LOC)
ast_analyzer, dependency_analyzer, history, pam_integration, portfolio, relationships, search, temporal, test_results_store, versioning. Natural consumers: gateway/handlers/knowledge.py RPC surface, the KG gRPC server, session/kg_context. test_results_store additionally converges with gateway/test_runner.py writers (D12 P2 canonical writer).
Wave E — orchestrator managers (9 modules, 3,135 LOC)
ambiguity_resolver, fact_store, impact/cli, intent_broker, intent_dispatcher, intent_template, intent_workflow, nlp, policy_registry. Natural consumers: orchestrator/engine.py intent path (parse → validate → broker → dispatch → workflow), U:Ox governance surface.
Wave F — kernel composition bundle (D17 ruled) + managers
F1 (ruled, D17): compose into OrchestrationKernel.init/start(): AuditLogger (SPEC-001 US-008), PAMEnforcer → dispatcher path (US-003), ResourceMonitor → health loop (US-007), performance package. Fold kernel/pam/escalation.py's unique behavior into the already-wired governance.escalation_handler, then delete the wrapper (true twin). kernel/cli.py: no action (lazy-import coverage artifact).
- [ ] F1-audit - [ ] F1-pam - [ ] F1-resource - [ ] F1-perf - [ ] F1-escalation-fold F2 (twin check still required): config_manager vs core/config/manager, session_manager/session_context vs session/controller, queue_manager vs postman queueing, console_cli (documented stub).
Wave G — agents old runtime layer (9 modules, 2,196 LOC)
coordinator, cxp_adapter, escalation, intent_adapter, lifecycle, postman_adapter, prompt_builder, spec_writer, uml_generator. TWIN CHECK REQUIRED: these predate the volks/ generation; each module's REQs checked for a live volks/-side implementation before wiring (audit W1.6 flagged AgentPool/AgentRuntime/CXPVolkAdapter unresolved since e3b4317b).
Wave H — session managers (8 modules + 2 examples, 2,113 LOC)
recovery, sync, mcp_tools, prolog_facts, fireflies_tools, hooks/{session_auto_start_hook,session_fact_hook,session_pre_close_hook}. Natural consumers: session/controller lifecycle + CLI; hooks wire into the hook_registry. examples/{basic_usage,portfolio_usage} are doc-smoke targets (already pytest-smoked) — reclassify, not wire.
Wave I — misc singles
core/isolation.py (Isolation), core/patterns/error_handling.py, cxp/{ws_client,ws_server} (parallel WS transport vs gateway/server.py — TWIN CHECK), integrations/fireflies_sync.py (consumer: knowledge_graph/fireflies write path + gateway/handlers/fireflies.py).
Traceability gate (user ruling: "make sure they are traced — the RTM
should display exactly that")
Every wave's definition of done includes:
- Every wired module KEEPS/GAINS correct
@traces(spec=, story=, reqs=[…])— and the NEW construction/wiring seam itself carries a @traces for the REQ it satisfies (wiring IS requirement satisfaction). python scripts/serialize_codebase_ast.py check-tracespasses — no orphaned REQs, no reqs claimed by deleted code.- RTM regenerated (
scripts/generate_traced_rtm_simple.py→ docs/rtm.md + rtm.json) in the same commit; the wave's REQ ids must visibly move to implemented+tested in the RTM diff. The RTM is the campaign's public scoreboard: unwired spec code shows up there, wired code shows exactly where it is constructed and which tests prove it.
Sequencing / load management
One wave of agents at a time alongside the coverage swarm; Wave A now (single wirer), B+C on plan arrival, D–I as slots free. Every wave: worktree isolation, twin-check before construction, no-mocks tests proving the wiring (construction + call path + observable effect), gates green, merge to main serially. Progress tracked by checkboxes here.