# Break a feature into work several agents can pick up at once

**Say what a piece truly waits on and nothing else, and the order tells you how many agents you can start right now.**

There is no sub-task here, and that is the point. A piece names a blocker only where starting early would produce work that has to be thrown away; everything else about where it belongs is a tag, which groups without pretending to hold anything up. A tracker with only the sub-issue forces the two into one list, and a list can only be read as four waves of one — a plan that keeps three agents idle. Left as dependencies, the waves are the dispatch batches: everything inside one runs at the same time, and finishing a wave frees the next with no label for anyone to remember to update.

Driven by an agent. Every step below is a step in
`packages/server/tests/e2e`, run against a listening server on every pull
request; the calls under each one are what that run executed.

The same flow is playable at https://flow.ttoss.dev/docs/examples/break-a-feature-into-waves.

## 1. Ana points her agent at the repository she works in

- `POST /api/v1/projects` → `201`

## 2. It files the shared foundation the feature needs

- `POST /api/v1/tasks/batch` → `200`

## 3. So do three pieces that all need it, each naming the dependency as it is written

- `POST /api/v1/tasks/batch` → `200`
- `POST /api/v1/tasks/batch` → `200`
- `POST /api/v1/tasks/batch` → `200`

## 4. The order separates the one thing that must go first from the three that can go at once

- `GET /api/v1/order` → `200`

## 5. The foundation leads the queue, because it is what frees the other three

- `GET /api/v1/next?tag=user-progress` → `200`

## 6. The three say what they are waiting on, by name

- `GET /api/v1/next?tag=user-progress&slice=active_held` → `200`

## 7. Once its pull request merges, the agent closes the foundation with the PR as its cause, and all three are free at once, with no label to update

- `PATCH /api/v1/tasks/task_427710rp22` → `200`
- `GET /api/v1/next?tag=user-progress&limit=10` → `200`

## 8. A piece that falls out of the work is filed, attached to what produced it

- `POST /api/v1/tasks/batch` → `200`
- `GET /api/v1/order` → `200`
