Factories > Blueprints
Routing work between Blueprint stages
Configure entry points, ordered conditions, and revision loops in a Warp Factories Blueprint, then check the paths with concrete requests.
Use routes to decide what happens after a stage. For an issue-to-PR workflow, review findings can return to implementation while an accepted change moves to human handoff.
Prerequisites
Section titled “Prerequisites”- An editable factory definition with stages and workers.
- A disposable test repository and permission to run the workflow there.
Set the entry route
Section titled “Set the entry route”In factory.yaml, blueprint.start.to chooses where new work enters. For one starting stage, use a scalar:
start: to: planFor multiple paths, use ordered objects with stage and when. For example, if your Blueprint declares plan and implement:
start: to: - stage: plan when: The request has unresolved decisions or explicitly requires a plan. - stage: implement when: The request is fully defined.The worker driving the workflow judges these prose conditions and takes the first match. Put the more specific condition first. Conditions are not Boolean expressions evaluated by a rules engine.
Return review findings for revision
Section titled “Return review findings for revision”-
In
blueprint.stages.implement, setto: review. -
In the
reviewstage, require outputs that distinguish findings from acceptance of a particular head. -
Replace review’s unconditional exit with:
Routes inside the review stage to:- stage: implementwhen: Review found actionable changes for implementation.- stage: endwhen: Review accepted the current PR head with no changes required.
Every item in a conditional list needs when. For one unconditional route, use to: review or to: end, not a list entry with a missing condition.
The destination must be a sibling stage or end. The order of stage declarations does not set execution order. If no condition fits, the coordinator asks for the missing decision rather than silently treating the work as complete.
Keep the PR and branch in the implementation stage’s inputs and prompt so a revision updates the existing change. A return route does not mean “open another PR.”
Keep intake separate from workflow routing
Section titled “Keep intake separate from workflow routing”Automations decide which external events start or continue work. Their filters do not replace the Blueprint’s route conditions. Two automations matching the same event can still start two runs.
An automation can target a named Blueprint stage with stage instead of agent. The foreman receives the event and enters the workflow at that stage; the stage’s worker configuration supplies execution settings. Do not combine a stage target with agent or per-run execution overrides. See automation syntax.
Follow-ups to existing work resume the stage they concern. They do not repeat the entry rules as if every review reply were a new request.
Test the paths
Section titled “Test the paths”After validation and application, start new test work for a changed Blueprint. Existing tasks keep the definition selected when they started.
| Test input or outcome | What to check |
|---|---|
| A request with an unresolved product decision | Planning runs before implementation |
| A well-defined fix that also explicitly requires a plan | The first entry condition selects planning, not the broader implementation path |
| Actionable independent-review findings | The existing implementation conversation updates the same PR, then returns to review |
| An outcome that satisfies neither review condition | The coordinator asks for a decision and does not finish |
| An event outside the automation’s repository or label filters | That automation does not start work; check other matching automations separately |
| A definition edit followed by a reply to an existing task | The existing task keeps its earlier workflow; separate new work uses the applied change |
Inspect the conversations, PR identity, and tested commits. A completed run alone does not prove that the intended route was taken.
Related pages
Section titled “Related pages”- Defining Blueprint stages - Supply the outputs conditions use
- Adding human gates to a Blueprint - Route approval and requested changes separately
- Factory automations - Configure event matching without widening intake