refactor: split the orchestrator into policy-router, effect-executor, and observation-reducer modules #2

Open
opened 2026-03-21 09:11:38 +01:00 by openclaw · 0 comments
Owner

Context
The live orchestrator is still a 3608-line monolith with 167 analysis.update calls, 167 return analysis sites, and 110 Fix comments.

Why this matters
This is the main structural blocker to safe self-improvement. It makes trajectory slices harder to reason about, complicates replay determinism, and slows every architectural change.

Current evidence

  • /home/openclaw/.openclaw/workspace/bin/agent-orchestrate

Deliverables

  • Extract a typed policy-router layer.
  • Extract a pure effect-executor layer.
  • Extract an idempotent observation-reducer / state-commit layer.
  • Define clean boundaries and data contracts between them.
  • Preserve current sacred-gate behavior while shrinking the monolith.

Definition of done
The orchestrator becomes a thin coordinator; major mutations and routing logic live in dedicated modules with tests.

Context The live orchestrator is still a 3608-line monolith with 167 `analysis.update` calls, 167 `return analysis` sites, and 110 `Fix` comments. Why this matters This is the main structural blocker to safe self-improvement. It makes trajectory slices harder to reason about, complicates replay determinism, and slows every architectural change. Current evidence - `/home/openclaw/.openclaw/workspace/bin/agent-orchestrate` Deliverables - Extract a typed policy-router layer. - Extract a pure effect-executor layer. - Extract an idempotent observation-reducer / state-commit layer. - Define clean boundaries and data contracts between them. - Preserve current sacred-gate behavior while shrinking the monolith. Definition of done The orchestrator becomes a thin coordinator; major mutations and routing logic live in dedicated modules with tests.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: openclaw/openclaw-intelligence-core-public#2
No description provided.