Use this template before writing a workflow file. Fill it out, review it with a human, and only then start the JavaScript.
- Workflow name:
- What outcome should this workflow produce?
- Why is a workflow the right tool instead of one
agent()call or a plain skill?
- What does one subagent do once?
- Name the unit concretely:
- Is the count known up front or discovered dynamically?
- Where do the items come from?
- Input shape (
args, file, nested workflow, generated list):
- Topology:
fan-out|pipeline|loop-until-target|loop-until-budget|loop-until-dry|nested|hybrid - Why this topology fits the job:
- Does any later stage need the entire prior result set at once?
yes/no - If yes, which stage needs it and why?
- If no, why is
pipeline()the right default?
| Stage | Input | Output | Needs schema? | Model | Notes |
|---|---|---|---|---|---|
- How will this workflow verify its results automatically?
- Validation type:
tests|compiler/lint|skeptic vote|cross-check|human checkpoint between runs - What is the cheapest falsifying check?
- Which stages are good
model: 'haiku'candidates? - Where could prompt bloat happen?
- What are the loop stop conditions and hard caps?
- Does any stage need
isolation: 'worktree'? - Inter-stage compression:
none|summarize-between-stages|offload-large-payloads
- What fields must the workflow return?
- What artifacts should it externalize to disk, if any?
- Recalls prior runs:
yes/no - If yes, what store does it read from? (e.g.,
.planning/memory/index.jsonl) - What prior context matters? (e.g., "findings from last 3 runs", "all unresolved items")
- Persists a summary after completion:
yes/no - If yes, what fields are persisted? (match memory-entry.schema.json)
- Retention policy:
keep-all/keep-last-N/consolidate-after-N
- The workflow shape is explicit.
- The barrier decision is explicit.
- Every structured stage has a schema plan.
- The verification method is explicit.
- The stop conditions are explicit.
- Memory and retention decisions are explicit (or marked N/A).
- A human has reviewed this spec before coding starts.