run / then run
Syntax
run "<file.loop>"
then run "<file.loop>"
โฆ with the result of <step>
What it does
A flow step. run "x.loop" runs every definition in that file; then run chains the next and receives the previous step's text summary; with the result of <step> pulls the handoff from a named earlier step instead of the previous one.
Where a loop self-corrects on one goal and a pipeline sequences stages inside a single file, a flow composes at the file level: each run executes a whole .loop โ its full planโactโobserve cycle, its own done when โ and passes a short text summary forward as context for the next step. Reach for it when a job spans units you already built and tested separately: a build loop, then a test loop, then a deploy loop. The chain is fail-fast โ a step that ends unsatisfied halts the rest, so a broken build never reaches deploy. By default each step auto-carries the previous step's summary; with the result of <step> overrides that when a later step needs an earlier output instead (release notes that reference the build, not the test that ran after it). Paths are relative to the flow file. Add a human approves first under a step to gate it โ the flow blocks until a person signs off before that file runs, which is how you put a hand on irreversible steps like a deploy.
Example
flow "release":
run "build.loop"
then run "test.loop"
then run "notes.loop" with the result of buildnamed handoff
How it runs
Common mistakes
- Using
runoutside aflow.run/then runare flow steps, not a way to invoke a loop from inside alooporstage. To sequence stories in one file, use apipelinewithstages; use a flow only to chain whole files. - Wrong relative path. The quoted file resolves relative to the flow file, not your shell. A path that works from the terminal can still fail inside the flow โ write it relative to where the
.looplives. - Assuming state carries, not just a summary. Only a short text summary passes between steps โ not the file tree diff or variables. If a later step needs a specific earlier output, name it with
with the result of <step>rather than hoping it survived the auto-carry. - Forgetting fail-fast. A step whose
done whennever goes green halts the entire flow. Make sure every chained file has a real, runnable check, or the chain stalls at the first weak link.