sim-one-alpha

D11: Share One Graph Engine Across Orchestrator And Coding Worker

Status: accepted for specification; implementation pending.

Question

Should the main orchestrator and Coding Worker have unrelated task loops, or should they use one graph runtime with different definitions?

Decision

Use one task-graph engine with separate validated definitions and private state schemas:

The current Coding Worker loop becomes the initial coding graph topology. The main graph invokes it through an explicit parent-to-child input projection and receives a structured result and evidence projection.

Project graph engineering remains a Coding Worker capability. When a coding task is bound to a DLG node, the graph engine uses a dedicated governed adapter to claim, complete, fail, or interrupt that node. The adapter binds the exact Development Lifecycle Graph definition and checksum, branch-local run state and run version, append-only event history, acting authority, and evidence records. Every claim, complete, fail, or interrupt operation has a unique idempotent operation ID and commits through atomic compare-and-swap; a stale run version is rejected. After an unknown timeout or restart outcome, the adapter reads the ledger by operation ID before retrying and never reapplies an already committed transition. Any DLG definition mutation is a separate operation that is previewed, approved, validated, recorded, and reversible. The main orchestrator does not directly mutate the DLG definition, run state, or event history.

Rationale

One engine gives both agents the same checkpoint, interrupt, context, observability, and task-state semantics while preserving their different ownership and capabilities.

Rejected Alternatives

Consequences

Affected Graph Consumers

Revisit Trigger

Revisit if a worker needs execution semantics that cannot be represented by typed nodes, subgraphs, interrupts, and bounded feedback without weakening its authority boundary.