Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Multi-Step Pipelines

13.5. Multi-Step Pipelines — Multi-Stage Work Chains

Kanban is the right tool for multi-role pipelines

This is the “Engineering pipelines” pattern mentioned in 13.3: decomposition → parallel implementation across multiple worktrees (15.2) → review → retry → open PR — a multi-stage chain where each stage can be handled by a different profile/role, and every stage transition is a traceable row.

Tasks carry full metadata for coordination

Each Kanban task carries: its assignee (a profile name), optional dependency links (task B only starts once task A completes), a workspace type (scratch / worktree / dir:<path>), and an optional tenant namespace — enough information for a dispatcher to automatically route the right work to the right worker in the right dependency order.

Automatic dispatcher — no human pressing every step

A background dispatcher continuously and atomically claims ready tasks (those whose dependencies are satisfied), then spawns the assigned profile as an independent operating-system process — not a fragile swarm of subagents in the same process that breaks on an incident.

A review-reject-retry loop with a full audit trail

This is exactly the PM → engineer → reviewer pipeline example mentioned in 13.3: the engineer finishes implementing and calls kanban_request_review; the reviewer is not satisfied and calls kanban_request_changes; the engineer fixes it and requests review again; and so on — the complete history of every attempt is fully preserved in task_comments/task_events, not compressed away over time like a normal context window.

Notes

  • For multi-stage coding pipelines (chapter 15), combine worktrees (15.1/15.2) directly as the workspace type of each Kanban task — each implementation stage runs in its own worktree, avoiding collisions when many stages/tasks run in parallel on the same repo.
  • Use explicit dependency links between tasks instead of manually coordinating the order — let the dispatcher handle “when is this task ready to start”, reducing the risk of a human forgetting a step or running things in the wrong order.
  • For pipelines that need a full audit (for example compliance review, financial approval workflows), Kanban is the right choice precisely because the history of every request-review/request-changes is never compressed or lost — unlike normal conversation history, which can be compressed over time (mentioned in 19.3).