ADR-033: Chains as Runtime Workflows
Date: 2026-11-15
Status: Accepted
Context
chains.yaml shipped with the repository describing how members sequence
(build: tester → builder → reviewer → doorman). Nothing read it. TheWorkflowEngine existed too, but only the built-in review-pr used it, with
protocols that print a delegation notice rather than run a member.
So the composition story lived in a file that was effectively a comment.
Decision
chains.yaml becomes a runtime input.
agenthood workflow list
agenthood workflow run build "implement issue #42"
- Each chain step is an engine step carrying
{member, task}and aMemberProtocolthat callsMemberRunner.runMemberTask. Decisions, provenance, events and traces therefore behave exactly as a direct run. - Sequential steps only. Parallel and conditional steps are deliberately out of scope for 4.0.
guards.stop_on_blockingmaps to the reviewer/doorman convention: a member output containing[blocking]stops the chain.max_roundsre-runs the sequence while budget remains, which is the build→review→revise loop expressed as data.review-prstays a built-in workflow; chains are additive.
doorman_before_merge and scribe_before_commit are parsed and preserved as
policy for the live orchestrator, but the CLI runner cannot intercept commits
or merges, so it does not claim to enforce them.
Consequences
- A host can compose a workflow without writing TypeScript.
- Malformed chains fail closed with the file and index named.
- A chain that blocks costs the round, not the run;
max_roundscaps the retry. - Chain runs are as expensive as the members involved; there is no dry run.