Home · Architecture · Authority · Execution Trace · Dogma

Execution Trace

A single, bounded execution from request to termination.

This page walks through one complete Controller execution. Every step shown here corresponds directly to code paths in Controller.__call__.

Input

Each execution begins with exactly one explicit task. The Controller accepts no collections, no implicit queues, and no background work.


ControllerRequest {
  domain: {
    task: <DomainTask>
  }
}
            

State 1 — PLAN

The Controller invokes the Planner once to determine which worker should handle the task.


{
  state: "PLAN",
  agent_id: "<planner-id>",
  output: {
    task: <DomainTask>,
    worker_id: "<worker-name>"
  }
}
            

State 2 — WORK

The selected Worker is invoked with a strictly typed WorkerInput. The Worker must choose exactly one path:


{
  state: "WORK",
  agent_id: "<worker-id>",
  output: {
    result: <WorkerResult>
    // OR
    tool_request: {
      tool_name: "...",
      args: <TypedArgs>
    }
  }
}
            

State 3 — TOOL (optional)

If a tool is requested, the Controller invokes it exactly once via the ToolRegistry.


{
  state: "TOOL",
  tool_name: "<tool>",
  input: <ToolArgs>,
  output: <ToolResult>
}
            

After the tool completes, the Worker is invoked once more with the tool result.

State 4 — CRITIC

The Critic evaluates the Worker’s result against the original plan. It does not modify state or retry execution.


{
  state: "CRITIC",
  agent_id: "<critic-id>",
  output: {
    decision: "ACCEPT" | "REJECT",
    feedback: { ... } // required on REJECT
  }
}
            

State 5 — END

The Controller terminates unconditionally. The result is an immutable response object.


ControllerResponse {
  task: <DomainTask>,
  worker_id: "<worker-name>",
  worker_output: <WorkerOutput>,
  critic_decision: <Decision>,
  trace: [ ... ]
}
            

Key Guarantees

Why This Matters

This traceability makes the system:

The trace is not a debugging artifact — it is a first-class architectural output.