# Delivery Loop

The delivery loop takes one change from a task to a shipped release. Every step shows in iKanban: on the board, in the sprint, in the release, in **iKAgent → Pipelines** and in **iKAgent → Roadmap**.

The agent does the steps. You decide when to merge and when to ship.

```
task (key) ─► sprint ─► release ─► branch + PR "KEY: …" ─► pipeline stages ─► merge ─► ship release
     └──────────────── Roadmap follows the plan file (multi-step work) ────────────────┘
```

The `ikanban-delivery-loop` skill in your repository's `.iKanban/` folder tells the agent how. Agent setup writes it for you, with `.iKanban/runbooks/delivery-loop.md`: the same loop for you, with what you do and what you see at each step.

## The steps

| Step | What the agent does | MCP tool |
|---|---|---|
| Where the work goes | Finds your team, the active sprint, the open release and the feature. | `get_me`, `list_sprints`, `list_releases`, `list_features` |
| Task | Uses the key you name, or creates one task for the change. | `get_issue_by_key` or `create_task` |
| Sprint | Puts the task in the active sprint. | `assign_task_to_sprint` |
| Release | Files the task under the open release. | `assign_tasks_to_release` |
| Branch and pull request | Names the branch `abc-123-short-name` and the pull request `ABC-123: what changed`. The key links the pull request to the task. | `update_task` (status `in-progress`, then `in-review`) |
| Pipeline stages | Your CI reports each stage with the task key. The agent reads the lane. | `get_pipeline` |
| Merge | Merges after the checks pass and you say so. | `update_task` (status `done`) |
| Ship | Checks that every task is done, cancelled or moved, then ships the release when you say so. | `get_release`, `update_release` (status `shipped`) |
| Roadmap | For multi-step work, publishes the plan file before the work starts and syncs it after each change. | `sync_roadmap_plan` |

A step your CI does not run, for example a manual deploy, gets one event: `npx -y ikanban pipeline event --task ABC-123@pr-45 --stage release --status passed --detail "v1.4 on prod"`. Set up CI reports with the `ikanban-pipelines` skill. See [Pipelines](/docs/ai-chat/agent-pipelines) and [Roadmap](/docs/ai-chat/agent-roadmap).

## The agent asks first

The agent asks you before it:

- merges a pull request,
- ships a release,
- creates a sprint or a release.

## Where the MCP tools come from

| Where the agent runs | iKanban MCP server |
|---|---|
| Laptop runner session (the desktop app runs the agent) | The runner gives it, from desktop 0.1.12. |
| Claude Code, Copilot CLI or Gemini CLI on its own | Register `<api_url>/sse` once, transport http, header `Authorization: Bearer <key>`. See [Claude Code](/docs/mcp/claude-code). |
| CI (GitHub Actions, GitLab, any) | None. CI only reports stages, with `npx -y ikanban pipeline event`. |

With no iKanban tools in the session, the agent says so and stops. Update the desktop app, or register the server.

## Gates

| Gate | Value | What you see | Change it |
|---|---|---|---|
| Pipelines | Pro and Pro+ | On Starter, Pipelines answer 402. The agent skips the pipeline step and says "Pipelines need Pro". It never fails the build for this. | Upgrade the plan |
| Tasks per team | Starter 2,000 · Pro 5,000 · Pro+ 10,000 | `create_task` answers 402 | Upgrade the plan |
| Pipeline history | Starter 3 months · Pro 6 · Pro+ 12 | Older runs are gone | **Agent settings → Pipelines** |
| Wait for checks | 10 minutes, in the foreground | The report shows the checks as pending | Send a follow-up: "Read the checks and the pipeline lane, then give the report table." |
| Sprints, releases, Roadmap | Every plan | — | — |

## When it does not work

| Symptom | Cause | Fix |
|---|---|---|
| No iKanban tools in the session | Desktop app older than 0.1.12, or no MCP server registered | Update the app, or register the server |
| The pull request is not on the task | No key in the branch or the title | Rename the pull request to `ABC-123: …` |
| No lane in Pipelines | CI does not report, or the plan is Starter | Use the `ikanban-pipelines` skill; Starter has no Pipelines |
| `create_task` answers 400 | Missing `feature_id`, `priority`, `estimate` or `task_type` | Find the feature with `list_features`, then add the four fields |
| `create_task` answers 402 | The team reached its plan's task limit | Upgrade, or ask the owner |
