Example pipelines
The built-in pipeline (implement, review, verify, deliver) is one shape.
The built-in pipeline (implement, review, verify, deliver) is one shape. These four examples are complete factories built only from custom command steps, kusaw agent-args, kusaw extract, and effects. They show that the factory is neutral: you copy a shape, you do not have to keep the defaults.
The examples live under examples/pipelines/ in the Kusaw source tree. Copy one into your factory folder. Each example is self-contained, so do not build one example on another example's files.
| Shape | What it runs |
|---|---|
simple-loop | Loop (max 3): implement (agent, edit preset), check (the spec's test command, findings as feedback); then built-in deliver |
sequential-reviewer | Loop: implement, then review (agent, read_only, findings through kusaw extract); fails the iteration on findings; then deliver |
parallel-planner | One plan step: the agent returns up to four independent sub-tasks; the step returns them as demo.task_add effects; kusaw add queues them |
parallel-planner-with-review | The planner; each sub-task spec names the sequential-reviewer pipeline |
Each example also ships as workflows.<shape> so you can copy it into a multi-workflow factory. See Workflows and routing.
Every agent-invoking script calls "$KUSAW_BIN" agent-args ... and never a provider CLI, so the same example follows KUSAW_AGENT_PROVIDER on Claude Code and Cursor. See Use an agent inside your step.
Parallel in the queue
The planner examples get parallelism from separate tasks in the queue, each with its own run, branch and delivery. A pipeline can also run work in parallel inside one run: a parallel group, fanout subtasks, or a best-of-N candidates stage, all capped by worker.max_parallel. There is no merge step (the factory never merges or pushes). Dependent sub-tasks can stack branches with depends_on on the spec. The examples never use secrets: demo.task_add only runs kusaw add on files inside the factory folder.
In a source checkout, make e2e-examples runs each example on a demo repo with fake agent CLIs, so you can try them without a model account.
The step protocol (handshake, request, progress, result) is the same as Write your first step. More examples lists the smaller custom-step programs.