Orchestrata Ultimate › Plans › spec-audit › reverify-2026-10-18 › A-core-runtime
Cluster A — Core runtime & protocol (SPEC-000…005) — REVERIFY 2026-10-18
Source: plans/spec-audit/reverify-2026-10-18/A-core-runtime.md at 8a2cb42ad · last changed 2026-10-18 · first committed 2026-10-18 · 237 lines.
Prose pending.
Plan text
Cluster A — Core runtime & protocol (SPEC-000…005) — REVERIFY 2026-10-18
Read-only reverification against current code (branch components, 337 commits ahead of the
session-195 audit). Evidence via the AST toolkit only (symbols/refs/who-imports/source);
.md specs read with the Read tool. Checklist - [ ] markers ignored per _METHOD.md.
Headline: the session-195 "keystones" (K4 CLI scaffold, K1 gateway HTTP) have landed and the
cluster has shifted materially. SPEC-000 is no longer a large stub-CLI gap — 9 of 10 user stories
are implemented and wired to the live gateway. SPEC-003's orphaned IntentBroker facade is now
booted. Several session-195 orphans are deleted (WorkflowEngine, EscalationEngine) or newly
wired (PolicyEvaluator, EscalationHandler). The D1 "quarantine to experimental/" decision is
still unexecuted — no src/orchestrata_ultimate/experimental/ directory exists.
SPEC-000 Orchestrata CLI — PARTIAL (only US-009 session subcommands remain)
- Specifies: a unified
orchestrataClick tree (init / start·stop·status / intent·respond / agents·packets / review·approve·reject / governance / verify / knowledge / session) delegating to live subsystems, with anorchestrataconsole entry point. - Verified:
- ✅ Console entry point —
orchestrata = "orchestrata_ultimate.kernel.cli_main:main"atpyproject.toml:122([project.scripts]). The session-195 "no entry point" gap is closed. - ✅ All four previously-absent verbs now exist and delegate live:
intent(kernel/cli_main.py:1403→gateway_rpc("orchestrator.intent")),respond(:1415→cxp.send),review(:1527→knowledge.volk_work_context),approve(:1442→cxp.sendwork_status=resolved).reject(:1464). - ✅ Former stubs are real:
init(:922, creates dirs/context.json/orchestrata.yaml/ governance.pl/KG-register/first-session),stop(:1036, archives session + SIGTERM gateway/ kernel via PID files),status(:1160, gateway.ping + volk.list + session.active),config team(:1275),agents list/health(:1314/:1333),packets(:1353),governance check/log/policies(:1551/:1567/:1586),verify(:1615),knowledge query(:1666), plus a NEWwatch(:1495, streams thread events over WS). - ✅ Backend RPC methods are registered on the gateway —
gateway/method_table.py:gateway.ping(:69),cxp.send/cxp.status(:138/:154),volk.list(:161),session.active(:187),governance.evaluate/decisions/rules(:226/:211/:232),knowledge.query/volk_work_context/rtm_progress(:240/:261/:282),orchestrator.intent(:308). The CLI is a genuine thin client (kernel/cli_client.py::gateway_rpc), not stubbed. - ❌
sessiongroup is still a redirect stub —kernel/cli_main.py:1677-1682prints "use orchestrata-session CLI" and declares no subcommands. Spec US-009 requiressession status/list/end/resume/facts. The backend exists (session.list/active/open/close/events/facts.subscribein method_table.py:178-207) and a standalonesessionconsole script ships (pyproject.toml:130); only theorchestrata session *wrapper is missing.
- ✅ Console entry point —
- Remaining work / plan:
- Scope: add the
orchestrata sessionsubcommand group (status/list/end/resume/facts). - Target files:
kernel/cli_main.py(thesession()group at :1677); reusegateway_rpcagainst the already-registeredsession.*RPCs (or shell tosession/controller). - Approach: mirror the existing command pattern —
@session.command(name="status")→gateway_rpc("session.active"),list→session.list,end→session.close,resume→session.open,facts→session.facts.subscribe. - Dependencies: none new (gateway session RPCs +
session/controlleralready exist). - Effort: S (<0.5d). Risk: low — additive subcommands on an existing group.
- Scope: add the
- Evidence log:
source kernel.cli_main(1697 lines, command inventory);source kernel.cli_main.{intent,respond,review,approve,reject,init,stop,status,agents_list,agents_health, packets,check,log,policies,verify,query,team,watch,main,session};source kernel.cli_client; grep ofsource gateway.method_tablefor RPC names;sed -n '121,135p' pyproject.toml.
SPEC-001 Orchestration Kernel (U:KR) — PARTIAL (orphans to quarantine + spec divergence)
- Specifies: central kernel: Volk registry, message routing, Prolog governance, session lifecycle, escalation, workflow orchestration, resource mgmt, audit, config hot-reload.
- Verified: the spec's monolith is decomposed into siblings; the live kernel is a thin
coordinator, and the generic capability modules are partly wired, partly orphaned, partly deleted:
- ⚠️
OrchestrationKernel(kernel/kernel.py:28) is still only a component registry + service discovery + EventBus (capabilities literally["component_registry","service_discovery", "event_bus"],kernel.py:42). It does not route/govern/escalate. - ✅ Volk registry —
VolkRegistry(agents/volk_registry.py:364) wired intoagents/runtime.py,kernel/cli_main.py:248,orchestrator/pipeline_runner.py:52. - ✅ Audit —
AuditLogger(kernel/audit/logger.py:44) used bykernel/audit_bootstrap.py:52/65andkernel/pipeline_escalation.py:48. - ✅ Governance live path —
PolicyEngine(governance/policy_engine.py:47→gateway/server.py:571)ConstitutionalEnforcer(governance/constitutional.py:129→policy_engine.py:58/69andkernel/dispatcher.py:161/203/318/354).
- ✅
PolicyEvaluator(kernel/policy_evaluator.py:285) — now wired (session-195 said 0 refs): imported bykernel/dispatcher.py:61, used:71/109/317/353.MessageDispatcheris on the self-healing harness path (harness/executor.py:19,harness/healing.py:30,harness/runner.py:41). - ❌
WorkflowEngine(US-006) — deleted:refs WorkflowEngine→0 def; nokernel/workflow_engine.pyin the tree. Live orchestration = fixedPipelineRunner. - ❌
ResourceMonitor(US-007) — orphaned:kernel/resource_monitor.py:96, 0 src uses (test-onlytests/kernel/test_resource_monitor.py). - ❌
SessionManager— orphaned:kernel/session_manager.py:198, 0 src uses (live session issession/controller). - ❌
EscalationManager— orphaned:kernel/pam/escalation.py:48, exported inkernel/pam/ __init__.py:11/14but 0 src uses. - ❌
ConfigManager(US-009) — now orphaned (session-195 said wired):kernel/config_manager.py:207,who-imports kernel.config_manager= 1 (test). Live config is the minimalkernel/cli_main.py::_load_config(:42) — no schema validation / hot-reload on the live path. - ❌
kernel/router.py— fully orphaned:who-imports kernel.router= 0 import sites; itsCXPRouter(kernel/router.py:179) has 0 src uses. Live router =cxp/router.py:52(cxp/dispatcher.py:66).
- ⚠️
- Remaining work / plan:
- Scope: execute the already-decided D1 quarantine (session 195: "move 0-ref generics to
experimental/, preserve, don't delete") forResourceMonitor,SessionManager,EscalationManager,ConfigManager,kernel/router.py; then update the spec text for the decompositions (US-006 = PipelineRunner; US-007 resource quotas unbuilt; thin-registry kernel; US-009 hot-reload unbuilt). - Target files:
kernel/resource_monitor.py,kernel/session_manager.py,kernel/pam/escalation.py(+pam/__init__.pyre-export),kernel/config_manager.py,kernel/router.py;specs/001-kernel/spec.md. - Approach: mechanical move +
standards/check-depsexclusion forexperimental/(already specified in D1); no behaviour change. A separate product call decides whether US-007 (per-volk quotas) and US-009 (hot-reload) are wanted-for-real (then L), vs documented as out-of-scope. - Dependencies: shared with SPEC-003/005 canonical-engine theme (D1);
experimental/gate exclusion wiring. - Effort: M (0.5–1d quarantine + spec rewrite; L only if US-007/US-009 must be built).
Risk: med — moving tested modules needs the
experimental/gate exclusion to avoidstandards/check-depsbreakage.
- Scope: execute the already-decided D1 quarantine (session 195: "move 0-ref generics to
- Evidence log:
refs OrchestrationKernel|WorkflowEngine|ResourceMonitor|PolicyEvaluator| SessionManager|EscalationManager|CXPRouter|VolkRegistry|AuditLogger|ConfigManager|PolicyEngine| ConstitutionalEnforcer;who-imports kernel.{dispatcher,router,session_manager,resource_monitor, config_manager,pam.escalation,pipeline,pipeline_escalation,performance.manager};source kernel.kernel.OrchestrationKernel;ls kernel/.
SPEC-002 Postman Message Broker (U:PS) — DONE
- Specifies: reliable delivery, topics/subscriptions, queues (FIFO/priority/DLQ/TTL), priorities, filtering/routing, persistence/replay, delivery guarantees, metrics, config.
- Verified: trusted clean per main-session (no re-verify mandated). Session-195 confirmed
Postmanwired intoorchestrator/pipeline_runner.py,agents/volks/base.py,kernel/pipeline.py;DeliveryGuaranteeManager(AT_MOST_ONCE/AT_LEAST_ONCE/EXACTLY_ONCE + dedup); full subsystem set inpostman/. Perf targets (5000 msg/s) are runtime SLAs, not code gaps. - Remaining work / plan: none material.
- Evidence log: (session-195)
ls postman/;refs Postman;refs DeliveryGuaranteeManager.
SPEC-003 Intent Broker (U:Intents) — DONE (prior "orphaned facade" is now wired)
- Specifies: parse NL → structured intent, Prolog-validate, route to volks, lifecycle, history, templates, multi-intent workflows, metrics, security.
- Verified: trusted clean per main-session; updated nuance — the session-195 "orphaned
IntentBrokerfacade" is now booted:- ✅
IntentBroker(orchestrator/intent_broker.py:85) imported byorchestrator/ intent_broker_factory.py:20, used:51/:126. - ✅
build_intent_brokerwired into the boot path:kernel/cli_main.py::_boot_intent_broker(:400) is called from_boot_monolithic(:35), constructing the broker from the real Postman transport +VolkRegistry+ Prolog bridge and registering it as a discoverable kernel component. - ✅ Gateway
orchestrator.intenthandler (gateway/handlers/orchestrator.py::handle_intent:108) shares one NL parser with the IntentBroker and dispatches pipeline work.
- ✅
- Remaining work / plan: none functional. (Optional S8 Scribe: refresh the spec wording to state the IntentBroker is booted alongside the PipelineRunner, not a competing facade.)
- Evidence log:
refs IntentBroker|IntentBrokerFactory;source kernel.cli_main._boot_intent_broker;source kernel.cli_main._boot_monolithic;source gateway.handlers.orchestrator.
SPEC-004 CXP Protocol — DONE
- Specifies: 11-field
CXPPacket, header mgmt, JSON/binary payload, delivery-status & work-status state machines, JSON+MessagePack (de)serialization, validation/schema, thread correlation, priority/ordering, versioning,fix_issuesreview subject. - Verified: trusted clean per main-session (no re-verify mandated). Session-195 confirmed
CXPPacket+ enforced transitions (cxp/delivery_status.py,cxp/work_status.py), serializers, threads, versioning, validation;fix_issuesvalid by construction (free-formsubject≤200 chars). The only note is a spec-wording divergence (subject is a free string, not an enum). - Remaining work / plan: none material. (Optional S8 Scribe: subject-enum wording.)
- Evidence log: (session-195)
symbols check_compatibility|to_bytes|from_bytes|get_thread_packets; subject-validation grep;fix_issuesconsumption viacodedirector/volk.py.
SPEC-005 Multi-Agent Coordination — DONE (2 orphan duplicates + 3 spec divergences)
- Specifies: lightweight agent spawn, escalation, lifespan/cleanup, monitoring, constitutional
constraints, junior-volk drivers (CLI/API/Browser via
ACPDriver), senior→junior CXP delegation, parallel delegation + synthesis, browser free-tier LLMs, U:Qa↔U:Vz review loop. - Verified:
- ✅ Live path =
PipelineRunner—kernel/pipeline.py:106(used byagents/kernel_handler.py:59,kernel/cli_main.py:684,pipeline_cli.py:10) andorchestrator/pipeline_runner.py:175(used byorchestrator/pipeline_kernel.py:217,session/cli/pipeline.py:43). - ✅ Constitutional constraints —
ConstitutionalConstraints(agents/constraints.py:121→agents/lifecycle.py:102/106); hierarchyAgentHierarchy(agents/hierarchy.py:69→communication.py:47,escalation.py:84,lifecycle.py:103/107). - ✅ Junior volks + drivers —
JuniorVolk(agents/volks/junior/volk.py:101→codedirector/,kernel/pipeline.py:237);drivers/(claude_code_driver.py,aider_driver.py,deepseek_coder_driver.py,qwen_driver.py,browser_driver.py+browser_providers.py,claude_api_driver.py,driver_factory.py). - ✅ Parallel delegation —
SwarmCoordinator(agents/swarm/coordinator.py:91→codedirector/implementation.py:308);get_fan_out_decision(:247) +execute_swarm_path(:283). - ✅ Review loop —
_handle_fix_issues(codedirector/volk.py:307); capability routing(TESTING, IMPLEMENTATION) → "fix_issues"(orchestrator/pipeline_router.py). - ✅
EscalationHandler(verification/escalation_handler.py:28) — now wired (session-195 said orphaned): imported byorchestrator/verification_gate.py:60, used:452/:468. - ❌ Orphan duplicates (0 src uses):
AgentCoordinator(agents/coordinator.py:291),AgentEscalation(agents/escalation.py:74).EscalationEngineis deleted (refs→ 0 def). - ⚠️ Divergence 1 — driver interface:
AsyncCodeDriver(drivers/base.py:20) with singleexecute(task, files, is_fix) -> (success, output); the spec'sACPDrivername has 0 defs. - ⚠️ Divergence 2 —
MAX_REVIEW_CYCLEShas 0 defs; cycles capped byMAX_SELF_REVIEW_CYCLES(codedirector/prompts.py:6, value 3), not the spec's kernel-trackedreview_cyclemetadata. - ⚠️ Divergence 3 — delegation is file-sharded (each junior gets different files), not the spec's competitive "same task to N juniors, select best".
- ✅ Live path =
- Remaining work / plan:
- Scope: quarantine the 2 remaining orphans (
AgentCoordinator,AgentEscalation) per D1; updatespecs/005-multi-agent/spec.mdfor the three divergences (driver interface, sharded-vs- competitive, cycle mechanics). - Target files:
agents/coordinator.py,agents/escalation.py;specs/005-multi-agent/spec.md. - Approach: S8 Scribe spec edit + D1 quarantine. Competitive "select-best" delegation is net-new (M/L) only if the product actually wants it.
- Dependencies: SPEC-004 (
fix_issuessubject), SPEC-029 (cycle cap 3-vs-99), SPEC-013 QA. - Effort: S (spec + quarantine). Risk: low.
- Scope: quarantine the 2 remaining orphans (
- Evidence log:
refs AgentCoordinator|AgentEscalation|EscalationEngine|EscalationHandler| SwarmCoordinator|ConstitutionalConstraints|AgentHierarchy|JuniorVolk|PipelineRunner| _handle_fix_issues|get_fan_out_decision|execute_swarm_path|ACPDriver|AsyncCodeDriver|MAX_REVIEW_CYCLES| MAX_SELF_REVIEW_CYCLES;source drivers.base;ls drivers/.
Cluster summary table
| Spec | Class | Effort | Hard deps |
|---|---|---|---|
| SPEC-000 CLI | PARTIAL (only session subcommands missing; entry point + 4 verbs + ~8 stubs all now real) |
S | gateway session.* RPCs (already present) |
| SPEC-001 Kernel | PARTIAL (orphans ResourceMonitor/SessionManager/EscalationManager/ConfigManager/kernel-router; WorkflowEngine deleted, PolicyEvaluator wired) | M (L if US-007/009 built) | D1 experimental/ quarantine + gate exclusion |
| SPEC-002 Postman | DONE | — | — |
| SPEC-003 Intent | DONE (IntentBroker now booted, prior orphan resolved) | — | — |
| SPEC-004 CXP | DONE | — | — |
| SPEC-005 Multi-agent | DONE (2 orphans + 3 divergences; EscalationHandler wired, EscalationEngine deleted) | S | SPEC-004 subject, SPEC-029 cycles, SPEC-013 QA |
Real remaining work
- SPEC-000 — the one genuine functional gap:
orchestrata session status/list/end/resume/facts(US-009) is still a redirect stub (kernel/cli_main.py:1677). Small, additive; backend RPCs exist. - SPEC-001 — D1 quarantine is unexecuted (no
experimental/dir). Orphans to move:ResourceMonitor,SessionManager,EscalationManager,ConfigManager(newly orphaned),kernel/router.py; then a spec rewrite for the decomposed/fixed-pipeline reality. - SPEC-005 — D1 quarantine for
AgentCoordinator/AgentEscalation+ a spec edit for the three divergences (driver interface, sharded delegation, cycle mechanics). No functional hole.
Cross-cluster dependencies noticed
- SPEC-000
sessiondepends only on the gatewaysession.*RPCs (cluster G, already present). - SPEC-001/003/005 share the single D1 "canonical engine → quarantine to
experimental/" decision. It is already decided (session 195) but not executed; theexperimental/directory and itsstandards/check-depsexclusion must be created before any quarantine move, and it must land consistently across all three specs (plus SPEC-006's kernel session-manager, cluster B). - SPEC-005 review loop couples to SPEC-004 (
fix_issuessubject) and SPEC-029 (MAX_SELF_REVIEW_CYCLES3-vs-99, an open register call) and SPEC-013 QA. - SPEC-001 ConfigManager/US-009 orphan newly overlaps the SPEC-010/024 DI-orphan theme (cluster C) and the SPEC-014 config-surface work (cluster G) — a config-authority consolidation call.