# Issues Each task has one issue. The issue states the scope that the pull request and the review check. The [start-issue](../skills/start-issue/SKILL.md) skill applies these rules. ## Rules - One task, one issue. Before you open an issue, search the open issues for the same task. Use the issue that exists. Open a new issue only when none exists. Reason: two issues for one task split the record and the review. - An issue has one task. If a request has more than one task, open one issue for each task and link them with [relations](#relations). Reason: each issue becomes one branch and one pull request. See [review-and-merge.md](review-and-merge.md). - An issue has a goal and acceptance criteria. Reason: the review checks the change against them. - Set exactly one type label: `type:bug`, `type:feature`, `type:chore`, `type:refactor`, `type:docs` or `type:research`. Reason: the type tells the reader what kind of change to expect. - A priority label is optional: `priority:p0` (the most urgent) to `priority:p3` (the least urgent). Reason: the owner sets the order of the work. - Use only labels that exist in the project. Do not create, change or delete a label without the owner's OK. Reason: labels are shared project settings. - Assign the issue to the account that you are logged in as only when you start to work on it. To work on an issue is to do its task: code, docs or research. Do not assign an issue when you only open, triage or review it. Reason: an assignment tells other people and agents that the work on the issue has started. - An assignment is a marker only. It is not an approval, a claim or a review. Reason: agents that share the owner's account show as the owner. See [owner](safety.md#owner). - If a different account is assigned, do not start the work. Ask the owner. Reason: someone else can already do the work. - If you stop before you open a pull request, remove your assignment and write a comment that says where the work stopped. Reason: the next person sees that the issue is free. - Link the issue in the pull request, for example `Closes #12`. Reason: the merge closes the issue and the record stays complete. ## Relations Use the relations of the issue tracker to record how issues connect. Do not record them only in text, for example "Plan item P17 of #154" or "Order: after P02". - A task that has parts is a parent issue. Each part is a sub-issue. Reason: the parent shows the progress of the whole task, and each part keeps its own branch and pull request. - When one issue must wait for another, set "blocked by" on the issue that waits. Reason: the tracker shows the order and shows when a blocker closes. A line of text does not change when the blocker closes. - Before you start work on an issue, check its blockers. Do not start while a blocker is open. Tell the owner. Reason: the work can depend on a change that does not exist yet. - If the tracker has no relations, write them at the top of the issue body as `Parent: #154` and `Blocked by: #160`. Reason: the next reader finds them in one place. On GitHub, use `gh`. These commands were verified with `gh` 2.97.0: ```bash # Open an issue as a sub-issue of #154 that waits for #160. gh issue create --title "