Skip to content

feat(orchestrate): substrate cluster — ADR-0079..0082 + #1210 routing slice#1267

Open
ohdearquant wants to merge 4 commits into
mainfrom
show/lionagi-sweep/orch-substrate
Open

feat(orchestrate): substrate cluster — ADR-0079..0082 + #1210 routing slice#1267
ohdearquant wants to merge 4 commits into
mainfrom
show/lionagi-sweep/orch-substrate

Conversation

@ohdearquant

@ohdearquant ohdearquant commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Orchestration substrate: 4 ADRs + a thin #1210 routing slice

The orch-substrate play delivered the full set (the earlier 2-ADR state of this PR was a mid-run snapshot — now complete).

ADR Issue What it proposes
ADR-0079 #1196 Typed executor-provider contract: ExecutorProvider protocol + shared ExecutionTarget. Retrofits existing claude_code/codex/API endpoints; adds an arbitrary-process provider. No parallel registry.
ADR-0080 #1195 Remote sandbox execution: extend existing sandbox.py + daytona.py behind the same ExecutionTarget; flow/play ops run remotely + stream typed events. Local path unchanged.
ADR-0081 #1197 Configurable planning: expose planner model/strategy/pattern + custom/pre-authored plans, injected at the real flow.py:513 plan(...) call (preserves #1236 empty-plan retry).
ADR-0082 #1210 Role→substrate routing: route workers by role via the casts pack RoleConfig.model/effort (judgment→strong, bulk→cheap). Keeps authority out of casts — Profile stays pure config, Role stays behavioral.

Shared lionagi/substrate/types.py (ExecutionTarget/SubstrateStreamEvent) so executor + sandbox + routing speak one vocabulary.

Includes a tested #1210 slice

A thin reference slice (flow.py/fanout.py/_orchestration.py --pack routing display + __init__.py) with tests. Independently re-verified: tests/cli/orchestrate/test_flow_planning.py16 passed; critic ran the wider set → 30 passed, ruff clean. Does not hardcode a provider into the shipped default pack.

Gate

critic verdict: APPROVE-WITH-FIXES — CRIT:0 MAJ:1 MIN:2. The single MAJ was an ADR-numbering collision; resolved here. Designs spot-checked against 8 real file:line citations, alternatives are genuine, all four carry Open-Questions-for-Ocean.

Numbering note (why 0079-0082, not 0077-0080)

The play (and its critic, which could only see its own worktree) numbered these 0077-0080. But on sibling open PRs ADR-0077 is taken by orch-emissions (lifecycle-signal-contract) and ADR-0078 by #1264 (knowledge-layer). I shifted the cluster +2 with cross-PR visibility so it merges collision-free; all inter-ADR links updated.

Status

Design ADRs are Proposed — awaits your sign-off. The slice is small, in-scope, tested.

Refs #1195 #1196 #1197 #1210

🤖 Generated with Claude Code

ohdearquant and others added 3 commits June 3, 2026 15:22
…seam

Two design ADRs (Status: Proposed) for the orchestration substrate:

- ADR-0079 (#1196): typed executor-provider contract — an ExecutorProvider
  protocol + a shared ExecutionTarget data type, retrofitting the existing
  claude_code / codex / API endpoints and adding an arbitrary-process provider.
  No parallel executor registry; reuses EndpointRegistry/iModel/run().
- ADR-0080 (#1195): remote sandbox substrate execution — extend the existing
  lionagi/tools/sandbox.py + daytona.py behind the same ExecutionTarget so a
  flow/play op can run remotely (Daytona) and stream typed events back. Local
  default path stays byte-for-byte unchanged.

Grounded in real primitives (iModel, EndpointRegistry, AgenticEndpoint,
SandboxSession, DaytonaSandbox) with cited file:line; shared
lionagi/substrate/types.py contract; alternatives + failure modes + migration.

Refs #1195 #1196. Related #1197 (configurable planning) and #1210 (casts
role→substrate routing) — inventoried by this play but no ADR written yet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lice

Design ADRs for the heterogeneous orchestration substrate, with the
executor/sandbox ADRs renumbered 0079/0080 → 0077/0078 to resolve a
numbering collision and validate cross-references:

- ADR-0077 substrate executor provider interface (#1196)
- ADR-0078 remote sandbox substrate execution (#1195)
- ADR-0079 configurable flow planning (#1197)
- ADR-0080 role→substrate routing policy (#1210)

Also ships the #1210 thin reference slice: roles carry an optional
--pack routing target consumed by flow/fanout DAG planning, with a
focused test (tests/cli/orchestrate/test_flow_planning.py).

Refs #1195 #1196 #1197 #1210

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ollision)

The play numbered its 4 ADRs 0077-0080, but on sibling open PRs ADR-0077 is
taken by orch-emissions (lifecycle-signal-contract) and ADR-0078 by #1264
(first-class-knowledge-layer). Shift the whole cluster +2 so it merges without
colliding:

- ADR-0079 substrate-executor-provider-interface (#1196)
- ADR-0080 remote-sandbox-substrate-execution (#1195)
- ADR-0081 configurable-flow-planning (#1197)
- ADR-0082 role-substrate-routing-policy (#1210)

All inter-ADR cross-references updated; ADR-0074/0072/0057 (on main) unchanged.
The #1210 routing slice (flow/fanout --pack routing display + tests) is carried
from the prior commit; tests/cli/orchestrate/test_flow_planning.py → 16 passed.

Refs #1195 #1196 #1197 #1210

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ohdearquant ohdearquant changed the title docs(adr): ADR-0079 + ADR-0080 — orchestration substrate (executor providers + remote sandbox) feat(orchestrate): substrate cluster — ADR-0079..0082 + #1210 routing slice Jun 3, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant