Parent
#799. Design record: .scratch/render-execution-unit/spec.md — read it before starting; it records why this shape was chosen over two alternatives.
What to build
A single core-owned seam that enters an execution unit: it renders the unit's description, prompt, and command against the loop frame, observes the entry, and classifies what the caller must do next. The execution loop becomes its only caller.
The result is a discriminated union with three arms — nothing to run, a command to run, or a child runbook to compose inline. That replaces the loop's current reliance on an undefined rendered-command field as its control-flow signal.
Rendering moves off the CLI entirely: the loop stops merging effective variables, building the step frame, choosing which expander applies to which field, and assembling the metadata. It sends state and steps, and reads back a classified entry.
No new dependency injection is required. The actor service already accepts a helper registry and already holds a canonicalised working directory.
Behaviour is unchanged in this ticket — collect still builds its own entry, and the divergence pinned in the characterisation ticket is still green.
Acceptance criteria
Blocked by
Parent
#799. Design record:
.scratch/render-execution-unit/spec.md— read it before starting; it records why this shape was chosen over two alternatives.What to build
A single core-owned seam that enters an execution unit: it renders the unit's description, prompt, and command against the loop frame, observes the entry, and classifies what the caller must do next. The execution loop becomes its only caller.
The result is a discriminated union with three arms — nothing to run, a command to run, or a child runbook to compose inline. That replaces the loop's current reliance on an undefined rendered-command field as its control-flow signal.
Rendering moves off the CLI entirely: the loop stops merging effective variables, building the step frame, choosing which expander applies to which field, and assembling the metadata. It sends state and steps, and reads back a classified entry.
No new dependency injection is required. The actor service already accepts a helper registry and already holds a canonicalised working directory.
Behaviour is unchanged in this ticket — collect still builds its own entry, and the divergence pinned in the characterisation ticket is still green.
Acceptance criteria
undefined-as-signal remaining in the loop.hasCommandis derived from the parsed unit rather than from whether a rendered command happens to be present.pnpm run verifygreen;pnpm run test:mutate:changedreports no survivors in the changed ranges.Blocked by