|
| 1 | +--- |
| 2 | +name: github-issues |
| 3 | +applyTo: "**/*" |
| 4 | +description: "Use when creating or managing GitHub issues for this repository. Enforces the repo's issue creation workflow and required metadata." |
| 5 | +--- |
| 6 | + |
| 7 | +## GitHub Issue Creation Guidelines |
| 8 | + |
| 9 | +Follow the repository's issue workflow exactly when opening new GitHub issues. |
| 10 | + |
| 11 | +- Check for existing relevant issues first using `gh issue list` to avoid duplicates. |
| 12 | +- Clarify scope with the user before creating the issue. |
| 13 | +- Use `gh issue create` to open the issue before starting implementation. |
| 14 | + |
| 15 | +### Required issue body format |
| 16 | + |
| 17 | +Each issue body must include: |
| 18 | + |
| 19 | +- `Objective`: A short statement of what the issue is intended to accomplish. |
| 20 | +- `Context & Symptoms`: A developer-focused description of the current problem or goal, including relevant files or behavior. Avoid prescribing a rigid technical solution. |
| 21 | +- `Expected Outcome`: A concise description of the wanted end state and acceptance outcome, without technical implementation details unless explicitly discussed. |
| 22 | + |
| 23 | +Do not store Priority and Size in the issue body. Manage them through GitHub Project fields. |
| 24 | + |
| 25 | +### Markdown formatting and template |
| 26 | + |
| 27 | +- Write issue bodies in GitHub Flavored Markdown. |
| 28 | +- Keep section order fixed: `Objective`, `Context & Symptoms`, `Expected Outcome`. |
| 29 | +- Use one blank line between sections and avoid trailing whitespace. |
| 30 | +- Use concise bullet points when listing symptoms or acceptance outcomes. |
| 31 | +- Keep tone human-written, specific, and repository-aware. |
| 32 | + |
| 33 | +Use this template: |
| 34 | + |
| 35 | +```markdown |
| 36 | +## Objective |
| 37 | + |
| 38 | +<1-3 lines describing the goal> |
| 39 | + |
| 40 | +## Context & Symptoms |
| 41 | + |
| 42 | +- <current behavior or problem> |
| 43 | +- <where it appears: route/module/component> |
| 44 | +- <impact on users/developers> |
| 45 | + |
| 46 | +## Expected Outcome |
| 47 | + |
| 48 | +- <observable end state> |
| 49 | +- <acceptance-oriented result> |
| 50 | +``` |
| 51 | + |
| 52 | +### Newlines and special formatting in CLI |
| 53 | + |
| 54 | +- Prefer `gh issue create --body-file <file>` for multi-line content. |
| 55 | +- If creating from shell inline, prefer a heredoc with a quoted delimiter to preserve formatting exactly: |
| 56 | + |
| 57 | +```bash |
| 58 | +cat > /tmp/issue-body.md <<'EOF' |
| 59 | +## Objective |
| 60 | +
|
| 61 | +... |
| 62 | +EOF |
| 63 | + |
| 64 | +gh issue create --title "..." --body-file /tmp/issue-body.md |
| 65 | +``` |
| 66 | + |
| 67 | +- Avoid packing multi-line Markdown into a single `--body` string when possible. |
| 68 | +- When issue text includes special characters (for example `` ` ``, `$`, `*`, `_`, or `#`), use `--body-file` to avoid shell escaping errors. |
| 69 | + |
| 70 | +### Project field updates (Priority and Size) |
| 71 | + |
| 72 | +- After issue creation, set Priority and Size in the linked GitHub Project item. |
| 73 | +- Allowed `Size` values: `S`, `M`, `L`. |
| 74 | +- Assign `Size` using these measurable criteria: |
| 75 | + - `S`: small scoped change, usually one flow/module, up to about 3 files touched, with localized edits or small additions. |
| 76 | + - `M`: medium scoped change, usually up to 2 related flows/modules, about 4-8 files touched, with moderate additions/refactors. |
| 77 | + - `L`: largest allowed single-issue scope, usually up to 3 related flows/modules, about 9-15 files touched, with substantial but cohesive changes. |
| 78 | +- If scope exceeds `L` (for example more than 15 files touched, more than 3 flows/modules, or would require more than one PR), split it into cohesive sub-issues before creation. |
| 79 | +- Allowed `Priority` values: |
| 80 | + - `Urgent & Important` |
| 81 | + - `Not Urgent & Important` |
| 82 | + - `Urgent & Not Important` |
| 83 | + - `Not Urgent & Not Important` |
| 84 | +- Use these exact option names when mapping to project single-select options. |
| 85 | +- Use CLI commands in this sequence: |
| 86 | + - `gh project field-list <project-number> --owner <owner> --format json` |
| 87 | + - `gh project item-list <project-number> --owner <owner> --format json` |
| 88 | + - `gh project item-edit --id <item-id> --project-id <project-id> --field-id <field-id> --single-select-option-id <option-id>` |
| 89 | +- Use one `gh project item-edit` invocation per field update. |
| 90 | + |
| 91 | +### Multi-Issue Discussion and Creation |
| 92 | + |
| 93 | +- When multiple problems or improvement ideas are discussed in one conversation, group them into cohesive issues first. |
| 94 | +- Grouping and drafting are a single workflow pass: create grouped issues in the same phase once scope is clear. |
| 95 | +- Keep issue scope balanced: avoid very small issues and avoid giant umbrella issues. |
| 96 | +- Ask clarifying questions before creating issues, not after. |
| 97 | +- Before creating, request explicit confirmation of both: |
| 98 | + - the proposed grouping |
| 99 | + - the proposed issue titles and bodies |
| 100 | + - the proposed Priority and Size for each issue (to be set in the project fields) |
| 101 | + |
| 102 | +### Labels and milestone |
| 103 | + |
| 104 | +- Assign type and domain labels on the Issue only. |
| 105 | +- Use one type label: `bug`, `enhancement`, `refactor`, or `documentation`. |
| 106 | +- Use one or more domain labels: `frontend`, `backend`, `performance`. |
| 107 | +- Assign the appropriate milestone when creating the issue. |
| 108 | + |
| 109 | +### Other workflow rules |
| 110 | + |
| 111 | +- Keep issue text objective, professional, and developer-to-developer. |
| 112 | +- Keep issue text concise and human-written; avoid generic AI-style phrasing. |
| 113 | +- Issue title and issue body must always be written in English. |
| 114 | +- Technical plan comments posted on GitHub must always be written in English. |
| 115 | +- After creating issues, do not automatically transition to technical planning unless the user explicitly asks to start planning/implementation. |
| 116 | +- Before coding begins for an issue, prepare a technical plan but post it as a comment only after explicit user approval. |
| 117 | +- If the approved plan changes later, update the existing plan comment instead of adding a new one. |
0 commit comments