Orchestrata Ultimate › Plans › architecture-review-2026-07-18

Orchestrata Ultimate — Architecture Review & Gap-Closure Design

Source: plans/architecture-review-2026-07-18.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-18 · 202 lines.

Prose pending.

Plan text

Orchestrata Ultimate — Architecture Review & Gap-Closure Design

Method: the system-design skill applied to the actual system (Phase 0 = ground truth first). Evidence gathered with the repo's own AST tooling (plans/ast-ultimate.json, direct query) for structure + grep for call-sites (the AST dependency graph is unreliable for instantiation, per kernel-consolidation-plan.md). Graded against live code @ master 3b15967 (2026-07-18), not spec checklists / @traces / the auto-audit (all unmaintained). Companion: ORCHESTRATA_UNDERSTANDING.md. Governing constraint (Mohamed): unimplemented FRs are implementation GAPS to be WIRED — never removed. This document proposes zero deletions of spec-mandated capability. Where a duplicate implementation exists, the recommendation is wire-or-quarantine-to-experimental/ (the repo's own D1 pattern), never delete.


0. Ground truth (Phase 0)

Spec-driven multi-agent SWE runtime; single-package modular monolith orchestrata_ultimate; Python 3.14t (free-threaded, GIL off); uv. AST snapshot: 695 modules · 1,322 classes · 5,252 methods · 180,604 LOC. Six layers (0 Vocabulary → 5 Interface), "down only, sideways through protocols only." The kernel is the never-retired Layer-4 runtime the volks execute on; PipelineRunner (kernel/pipeline.py:96) is the canonical engine. Fixed deterministic pipeline; all inter-agent comms via CXP→Postman→Redis; governance via PAM++ Prolog (PrologGate, janus). Three-tier durable memory: Neo4j (operational) + Memgraph-HA orchgraph (semantic/RAG) + Wiki.js. Full validated model in the companion doc §1–§19.

Diagram source shown as text: Mermaid could not parse it (Error: Parse error on line 34:).

flowchart TB
  H([Human intent]) --> CX
  subgraph L5[Layer 5 · Interface]
    CLI[orchestrata CLI]:::i
    GW[WebSocket Gateway<br/>+ DI container · IMemoryEngine singleton]:::i
    VZ[VizInt UI]:::i
  end
  subgraph L4[Layer 4 · Orchestration]
    PR[PipelineRunner<br/>kernel/pipeline.py:96 · canonical engine]:::k
    ORCH[orchestrator/pipeline_runner.py<br/>+ PipelineVerificationGate enforce=False]:::k
    SESS[Session + Memory<br/>checkpoint/recovery/migrate_to_cold]:::k
    KRN[[KERNEL runtime · boot/registry/gRPC :50053/PrologGate/audit]]:::heart
  end
  subgraph L3[Layer 3 · Domain Services]
    VOLKS[Volks: Cx→BA→PM→Ar→Cd→Qa→Cp<br/>+ Ux cond. · never import each other]:::s
    GOV[Governance · PrologGate/PAM++ · janus]:::s
    KG[Knowledge · Neo4j + Memgraph-HA + Wiki.js]:::s
    PROV[Providers · Circuit Breaker + fallback]:::s
    VER[Verification · VerificationCoordinator]:::s
  end
  subgraph L2[Layer 2 · Communication]
    CXP[CXP packets]:::c --> POST[Postman] --> RDS[(Redis)]
  end
  CX[U:Cx Concierge] --> VOLKS
  CLI --> PR
  GW --> PR
  PR --> KRN
  PR -.governs each stage.-> GOV
  VOLKS -->|CXP only| CXP
  ORCH -.verdicts computed, not enforced.-> VER
  SESS --> KG
  VOLKS --> PROV
  classDef heart fill:#b91c1c,color:#fff,stroke:#7f1d1d,stroke-width:3px;
  classDef k fill:#1e3a8a,color:#fff; classDef s fill:#065f46,color:#fff;
  classDef c fill:#92400e,color:#fff; classDef i fill:#374151,color:#fff;

1. Headline finding — the gap list is a MOVING TARGET; the wire-not-retire program is working

The most important review result: several capabilities flagged "orphan / 0-use" by the spec-audit and the spec-synthesis have since been WIRED. Confirmed by grep against current src/:

Previously "orphan" Current call-site (grep) Status now
VerificationCoordinator (D3/S10) orchestrator/verification_gate.py:462 wired (shadow mode)
migrate_to_cold (memory hot→cold) gateway/handlers/session.py:451 wired (fires on session close)
IMemoryEngine DI singleton (K3) gateway/server.py:413 register_instance(IMemoryEngine,…) wired (keystone landed)
CheckpointManager session/recovery.py:30 wired for recovery (partial: edit-path TBD)

Implication for the design: do not drive gap-closure from the audit/synthesis lists — they lag the code. Re-verify each candidate against live source (as below) before scheduling work. This is precisely why AST+grep review beats reading the planning artifacts: the artifacts describe intent at a past session; the code is now.


2. Genuinely-open gaps (verified current) — each a WIRE, none a retire

Ordered by leverage. Each: the gap (evidence), the wiring design, the named pattern, the seam (file:line), the trade-off, and alignment with the repo's own swarm/keystone plan.

G1 — SPEC-072 ToolSearchTool is registered/dispatchable but not exposed to any volk ✅ WIRED in this change

G2 — Verification gate is wired but non-enforcing (enforce=False)

G3 — Compliance gate is a default no-op

G4 — CheckpointManager not proven on the CheetahClaws edit/rollback UX path

G5 — PAMEnforcer is a superseded duplicate, not a governance hole


3. Cross-cutting review — Well-Architected pillars (Phase 5 lens)


4. Decision records (repo convention — plans/decisions-*.md D-numbering; append-only)

The repo records decisions as D-numbered entries (decisions-2026-07-06.md, spec-audit/01-DECISIONS.md), not docs/adr/. These follow that convention and are one-way-door calls for Mohamed to ratify.