Concurrency
Flow-Next supports parallel work because task state is repo-local and tasks declare dependencies.
Safe parallelism
Section titled “Safe parallelism”- Different specs on different branches
- Independent tasks from the same spec
- Worktrees for isolation
- Soft claims to avoid duplicate work
Worker isolation
Section titled “Worker isolation”/flow-next:work dispatches worker subagents with fresh context per task. Each worker re-anchors against the spec, task, and git state before editing.
Coordination rule
Section titled “Coordination rule”If two tasks touch the same high-churn module, prefer serial execution or split the module boundary first.
Solo developer
Section titled “Solo developer”Solo concurrency is mostly about not losing context:
/flow-next:work fn-1/flow-next:impl-review fn-1/flow-next:work fn-2Keep one spec in active implementation unless the second spec is truly isolated. If you switch, re-anchor before editing: read the spec, ready tasks, branch diff, and current review receipts.
Team execution
Section titled “Team execution”Teams can run multiple workers when the graph supports it:
flowchart LR Spec["Reviewed spec"] --> API["Worker 1: API"] Spec --> UI["Worker 2: UI"] Spec --> Docs["Worker 3: docs"] API --> Review["Impl review"] UI --> Review Docs --> Review
The tech lead should decide boundaries before launching parallel work. Product should not need to coordinate merge conflicts; product should review whether the implemented behavior matches the spec.
Worktree pattern
Section titled “Worktree pattern”Use a worktree per independent task cluster when multiple agents need to edit simultaneously:
| Worktree | Scope |
|---|---|
fn-12-api | Server contract, tests |
fn-12-ui | Client integration using agreed contract |
fn-12-docs | Docs and examples |
Merge back through the same spec branch and run /flow-next:spec-completion-review after integration. The completion review is where cross-task drift is caught.
Signals to stop parallelizing
Section titled “Signals to stop parallelizing”- Two workers repeatedly touch the same files.
- Review findings mention conflicting assumptions.
- A task needs a product answer that is not in the spec.
- Tests only pass in one worktree.
- The PR body cannot explain acceptance coverage cleanly.
When these show up, serialize the risky part and improve the spec before restarting.