---
title: Status Label State Machine
description: >-
  How labels transition in todo→doing→review→done order, and the rules for who
  can change them
seo:
  image: /ogp.png
---
The four skills `export-backlog` → `implement-backlog` → `review-issue` → `merge-issue` use
labels attached to GitLab/GitHub Issues (status labels) as a shared state machine—a mechanism where states change in a fixed sequence.

```mermaid
stateDiagram-v2
  [*] --> todo
  todo --> doing: implement-backlog
  doing --> review: implement-backlog / review-issue
  review --> done: merge-issueだけ
  review --> blocked: review-issue(収束しない場合)
  done --> [*]
```

Which skill can trigger each transition is defined per transition.

| Transition | Skill that changes the label | When |
|---|---|---|
| `todo → doing` | `implement-backlog` | When implementation starts |
| `doing → review` | `implement-backlog` / `review-issue` | `implement-backlog` advances to `review` at most, once implementation is complete. `review-issue` does so when all blockers reach zero and a PR/MR (a submission requesting a code change review) is created |
| `review → blocked` | `review-issue` | When the auto-fix loop hits its retry limit without resolving the issue |
| `review → done` | **`merge-issue` only** | Only when the PR/MR is actually merged |

:::warning[PR/MR creation is review-issue's responsibility]
`implement-backlog` is responsible only for writing code and committing it to a branch. It does not create a PR/MR.
PR/MR creation is handled by `review-issue`, and only once all blockers reach zero.
If implementation is complete but no PR/MR can be found, the cause is that `/architect:review-issue` has not been run yet.
:::

:::note[Why implement-backlog does not set done]
Setting the status to `done` as soon as implementation finishes would make the issue appear complete even though it has not been merged yet.
To prevent this, only `merge-issue` is allowed to transition to `done`. Even after implementation is finished,
the status does not become `done` until the change has passed review and been merged.
:::
