Create GitHub Issue
Create well-structured GitHub issues from user descriptions through interactive clarification.
Repository Detection
Detect the repository from the current git remote using your platform's CLI. Examples:
# GitHub lane (CODE_HOST=github):
REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner')
# GitLab lane (CODE_HOST=gitlab):
REPO=$(glab repo view -F json | jq -r '.path_with_namespace')
Both split into OWNER and REPO_NAME (or NAMESPACE and PROJECT on GitLab). If detection fails, ask the user for the target repository.
Process
Step 1: Understand the Request
When the user describes a feature or bug, gather context through clarifying questions. Do NOT create the issue immediately.
For features, clarify:
- What is the user-facing goal? (not implementation details)
- What are the acceptance criteria? (how to verify it works)
- For each acceptance criterion, is it pre-merge verifiable? Can its evidence
be obtained before the PR merges, from a surface the autonomous dev/review agents
can reach — a CI job, a PR-preview URL, a staging command, a local repro? Prefer
pre-merge-verifiable ACs and have the author name the surface + expected
evidence. If a criterion is not pre-merge verifiable (needs deploy/prod, real
users, a time soak, an external approval, prod telemetry, or credentials the bot
lacks), first check whether an existing PR-preview/staging path already covers the
same code path with the same input; if it genuinely cannot be verified pre-merge,
split it into a separate non-blocking, non-
autonomous follow-up (see
references/ac-verification.md). A blocking AC the loop cannot satisfy
pre-merge is a known driver of non-terminating dev↔review loops.
- Are there UI/UX implications?
- What existing functionality does this relate to?
- Priority and scope constraints
For bugs, clarify:
- Steps to reproduce
- Expected vs actual behavior
- Environment (prod, staging, PR preview)
- Severity (blocking, degraded, cosmetic)
- Any error messages or logs
- For each acceptance criterion of the fix, is it pre-merge verifiable? A bug
fix usually has more than one AC — classify every one, not just the headline
"the regression test fails before the fix and passes after" (that one is the
pre-merge default — name the surface: the CI
unit/E2E job). Beware framing any
criterion as a post-merge/prod replay ("verify by replaying the failing batch
through the deployed pipeline"): if an existing PR-preview/staging path already
exercises the same code path with the same input, point that criterion at that
surface instead. If a criterion genuinely can only be confirmed post-deploy, split
it into a separate non-blocking, non-autonomous follow-up (see
references/ac-verification.md). This per-criterion classification applies to
bug fixes exactly as it does to features — a blocking AC the loop cannot satisfy
pre-merge is a known driver of non-terminating dev↔review loops regardless of issue
type. (Note: the bug ## Environment field may legitimately be prod — that's the
repro environment, not an acceptance criterion.)
Ask 2-3 focused questions per round. Stop when there is enough information to write a clear issue.
The per-AC pre-merge-verifiable classification above applies to both issue
types — features and bugs. Do not collect a bug report with a blocking prod-only
acceptance criterion any more than you would for a feature.
Step 2: Draft the Issue
Use the appropriate template based on issue type. For full template content, consult references/issue-templates.md.
Both templates include these required sections:
- Summary / Motivation (feature) or Steps to Reproduce (bug)
- Requirements with checkboxes (feature) or Expected/Actual Behavior (bug)
- Testing Requirements (mandatory TDD section: test cases doc, unit tests, E2E tests)
- Acceptance Criteria with checkboxes
- Dependencies section for issue ordering
Step 3: Detect & Attach Workspace Changes
After drafting the issue, check the workspace for local changes that may provide useful context for the autonomous dev agent. For the complete detection, attachment, and cleanup procedure, consult references/workspace-changes.md.
Summary:
- Run
git status --short — skip if no changes
- Summarize changes and ask user for confirmation
- Choose strategy based on diff size: inline (< 500 lines), branch push (>= 500 lines), or file list fallback
- Add a
## Pre-existing Changes section to the issue body
- Optionally clean up local changes after attachment
Step 4: Confirm with User
Present the draft issue to the user with:
- Proposed title (concise, descriptive)
- Full issue body (including Pre-existing Changes section if applicable)
- Proposed labels
- Whether to add
autonomous label
Use AskUserQuestion to confirm:
- "Does this issue look correct? Should I create it?"
- Ask about autonomous label: whether AI should handle this automatically
Advisory pre-merge-verifiability self-scan (you are the linter — no runtime
script): self-scan the draft's AC checkbox lines only (the - [ ] lines under
## Acceptance Criteria, NOT other fields — this avoids false positives on the bug
template's ## Environment field, whose Stage: value may legitimately be prod)
for phrasing that signals a not-pre-merge AC:
post-merge, after merge, in production, and the long tail — live users,
soak, rollout, approver, prod telemetry, manual smoke. If a blocking AC
matches and there is no paired follow-up split, warn the author (advisory, not
blocking) and offer to split it per references/ac-verification.md §3 (create
a non-blocking, non-autonomous follow-up; reference it under ## Out of Scope,
never under ## Dependencies). Do not hard-fail the draft on a match.
Advisory agent-unwritable-surface self-scan (same AC-checkbox-lines-only
scope, a second pass over the same lines): also scan for phrasing that names a
verification surface the dev agent's scoped token cannot write to — at
minimum in (the )?PR (body|description|title) and PR metadata. Such an AC
can be fully pre-merge verifiable and still guarantee a dev-actionable=false
stall, because the scoped token can post PR/issue comments and commit files but
cannot edit PR metadata (Resource not accessible by integration, by design
per the two-token split — see references/ac-verification.md §5). On a
match, warn the author (advisory, not blocking) and suggest rewording to
name an agent-writable surface instead — e.g. "…in PR body" →
"…as a PR comment". Do not hard-fail the draft on a match.
Step 5: Create the Issue
Use GitHub MCP tools or gh CLI to create the issue with:
title: The confirmed title
body: The confirmed body
labels: Appropriate labels (see Label Guide below)
Report the created issue URL to the user.
If branch push was deferred (large diff strategy):
After the issue is created and the issue number is known:
- Execute the branch push commands from Step 3 using the actual issue number
- Update the issue body to include the branch reference section
Label Guide
| Label |
When to Apply |
bug |
Bug reports |
enhancement |
Feature requests |
autonomous |
User confirms AI should handle dev/test/review/merge automatically |
no-auto-close |
Used with autonomous -- AI handles dev/test/review but stops before merge, requiring manual approval |
documentation |
Documentation-only changes |
good first issue |
Simple, well-scoped tasks |
Autonomous Label Decision
After drafting the issue, explicitly ask the user whether to add the autonomous label.
Provide guidance on when autonomous is appropriate:
- Good fit: Well-defined scope, clear acceptance criteria, follows existing patterns, no ambiguous design decisions
- Poor fit: Requires significant architecture decisions, needs user input during development, involves sensitive infrastructure changes, exploratory/research tasks
Frame the question as:
"Should this issue be handled by the autonomous development pipeline? The AI will automatically develop, test, review, and merge the changes. This works best for well-defined tasks with clear acceptance criteria."
If the user selects autonomous, also ask about no-auto-close:
"Should this issue also have the no-auto-close label? With this label, the AI will handle development, testing, and review, but will stop before merging -- you'll be notified to make the final merge decision. This is recommended for sensitive infrastructure changes, features needing product sign-off, or experimental work."
Label interaction summary:
autonomous alone = AI handles dev/test/review and auto-merges on pass
autonomous + no-auto-close = AI handles dev/test/review but stops before merge, notifying the owner for manual approval
Writing Guidelines
- Title: Start with verb, be specific. "Add pagination to plans list page" not "Plans page improvement"
- Body: Write for an AI developer who has access to the full codebase but no verbal context from this conversation
- Acceptance criteria: Must be objectively verifiable, not subjective
- AC verification surface: For each acceptance criterion, classify it as pre-merge verifiable (evidence obtainable before merge — name the surface: CI job, PR-preview URL, staging command, or local repro — plus the expected evidence) vs not pre-merge verifiable (needs deploy/prod, real users, time soak, external approval, prod telemetry, or credentials the bot lacks). Prefer the former, and always name the surface + expected evidence rather than asserting the outcome alone. A genuinely not-pre-merge criterion belongs in a separate non-blocking, non-
autonomous follow-up (reference it under ## Out of Scope, never ## Dependencies) — leaving it as a blocking AC is a known driver of non-terminating dev↔review loops. Full rubric, reuse-existing-preview guidance, the split procedure, and worked examples: references/ac-verification.md.
- Scope: Prefer smaller, focused issues over large multi-part ones
- References: Link to related issues, PRD sections, or code paths when relevant
- Dependencies: The
## Dependencies section must contain only issues that must be closed/merged before this issue can be started. Do NOT include: parent epics referenced for context, issues this one unblocks, or any #NNN reference that isn't a true blocker. The autonomous dispatcher parses this section literally — any open list-item ref causes this issue to be silently skipped until it closes/merges. Parsing scope: list-item lines only (lines starting with -, *, or 1.); prose and blockquotes between ## Dependencies and the next ## are ignored. On a list item, both #N (same-repo) and owner/repo#N (cross-repo) are recognized. If there are no blockers, write exactly None. Create issues in dependency order so earlier issue numbers are known when writing later ones.
- Testing Requirements: ALWAYS include the "Testing Requirements" section. The dev agent follows the project's TDD workflow but has been observed to skip E2E tests or test-case docs when the issue doesn't explicitly call them out. Be specific about:
- Key scenarios each test type must cover (2-4 bullet points)
- For bugs: the regression test must fail before the fix and pass after
Multi-Issue Creation
When breaking a large feature into multiple issues:
- Create issues in dependency order — issues with no dependencies first, then issues that depend on them. This ensures issue numbers are known when writing dependency references.
- Populate the
## Dependencies section in each issue body with #N (same-repo) or owner/repo#N (cross-repo) list-item links to directly blocking issues only. Do not reference parent epics, context issues, or issues this one unblocks — the dispatcher treats every list-item ref in that section as a hard blocker. Refs in prose or blockquotes are ignored.
- Use a consistent naming scheme — prefix titles with the project/feature name for easy filtering (e.g., "MyProject: Add DynamoDB infrastructure").
- Cross-reference the plan — if an implementation plan exists, link each issue to the relevant plan tasks/chunks.
- The dispatcher skips blocked issues — issues with open dependencies in the
## Dependencies section are ignored by the autonomous dispatcher until all dependencies are resolved (closed/merged).
References
For detailed content, consult:
references/issue-templates.md -- Full feature and bug issue templates with all required sections
references/ac-verification.md -- Pre-merge-vs-not-pre-merge AC classification rubric, reuse-existing-preview guidance, the split-to-non-blocking-follow-up procedure, the no-auto-close clarification, and two worked examples (loop prevention)
references/workspace-changes.md -- Complete workspace change detection, attachment strategies, and cleanup procedure
1---2name: create-issue3description: Use when the user asks to create a GitHub issue, file a bug, request a feature, open a tracking issue, or break a feature into multiple sub-issues. Guides interactive issue drafting with structured templates, workspace-change attachment, dependency linking, and the optional `autonomous` label for the automated dev pipeline.4---56# Create GitHub Issue78Create well-structured GitHub issues from user descriptions through interactive clarification.910## Repository Detection1112Detect the repository from the current git remote using your platform's CLI. Examples:1314```bash15# GitHub lane (CODE_HOST=github):16REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner')1718# GitLab lane (CODE_HOST=gitlab):19REPO=$(glab repo view -F json | jq -r '.path_with_namespace')20```2122Both split into `OWNER` and `REPO_NAME` (or `NAMESPACE` and `PROJECT` on GitLab). If detection fails, ask the user for the target repository.2324## Process2526### Step 1: Understand the Request2728When the user describes a feature or bug, gather context through clarifying questions. Do NOT create the issue immediately.2930**For features, clarify:**31- What is the user-facing goal? (not implementation details)32- What are the acceptance criteria? (how to verify it works)33- **For each acceptance criterion, is it _pre-merge verifiable_?** Can its evidence34 be obtained before the PR merges, from a surface the autonomous dev/review agents35 can reach — a CI job, a PR-preview URL, a staging command, a local repro? Prefer36 pre-merge-verifiable ACs and have the author **name the surface + expected37 evidence**. If a criterion is *not* pre-merge verifiable (needs deploy/prod, real38 users, a time soak, an external approval, prod telemetry, or credentials the bot39 lacks), first check whether an existing PR-preview/staging path already covers the40 same code path with the same input; if it genuinely cannot be verified pre-merge,41 split it into a separate **non-blocking, non-`autonomous` follow-up** (see42 **`references/ac-verification.md`**). A blocking AC the loop cannot satisfy43 pre-merge is a known driver of non-terminating dev↔review loops.44- Are there UI/UX implications?45- What existing functionality does this relate to?46- Priority and scope constraints4748**For bugs, clarify:**49- Steps to reproduce50- Expected vs actual behavior51- Environment (prod, staging, PR preview)52- Severity (blocking, degraded, cosmetic)53- Any error messages or logs54- **For each acceptance criterion of the fix, is it _pre-merge verifiable_?** A bug55 fix usually has more than one AC — classify **every** one, not just the headline56 "the regression test fails before the fix and passes after" (that one is the57 pre-merge default — name the surface: the CI `unit`/E2E job). Beware framing any58 criterion as a *post-merge/prod replay* ("verify by replaying the failing batch59 through the deployed pipeline"): if an existing PR-preview/staging path already60 exercises the same code path with the same input, point that criterion at that61 surface instead. If a criterion genuinely can only be confirmed post-deploy, split62 it into a separate **non-blocking, non-`autonomous` follow-up** (see63 **`references/ac-verification.md`**). This per-criterion classification applies to64 bug fixes exactly as it does to features — a blocking AC the loop cannot satisfy65 pre-merge is a known driver of non-terminating dev↔review loops regardless of issue66 type. (Note: the bug `## Environment` field may legitimately be `prod` — that's the67 *repro* environment, not an acceptance criterion.)6869Ask 2-3 focused questions per round. Stop when there is enough information to write a clear issue.7071> The per-AC **pre-merge-verifiable** classification above applies to **both** issue72> types — features *and* bugs. Do not collect a bug report with a blocking prod-only73> acceptance criterion any more than you would for a feature.7475### Step 2: Draft the Issue7677Use the appropriate template based on issue type. For full template content, consult **`references/issue-templates.md`**.7879Both templates include these required sections:80- **Summary** / **Motivation** (feature) or **Steps to Reproduce** (bug)81- **Requirements** with checkboxes (feature) or **Expected/Actual Behavior** (bug)82- **Testing Requirements** (mandatory TDD section: test cases doc, unit tests, E2E tests)83- **Acceptance Criteria** with checkboxes84- **Dependencies** section for issue ordering8586### Step 3: Detect & Attach Workspace Changes8788After drafting the issue, check the workspace for local changes that may provide useful context for the autonomous dev agent. For the complete detection, attachment, and cleanup procedure, consult **`references/workspace-changes.md`**.8990Summary:911. Run `git status --short` — skip if no changes922. Summarize changes and ask user for confirmation933. Choose strategy based on diff size: inline (< 500 lines), branch push (>= 500 lines), or file list fallback944. Add a `## Pre-existing Changes` section to the issue body955. Optionally clean up local changes after attachment9697### Step 4: Confirm with User9899Present the draft issue to the user with:1001. Proposed title (concise, descriptive)1012. Full issue body (including Pre-existing Changes section if applicable)1023. Proposed labels1034. Whether to add `autonomous` label104105Use AskUserQuestion to confirm:106- "Does this issue look correct? Should I create it?"107- Ask about autonomous label: whether AI should handle this automatically108109**Advisory pre-merge-verifiability self-scan** (you are the linter — no runtime110script): self-scan the draft's **AC checkbox lines only** (the `- [ ]` lines under111`## Acceptance Criteria`, NOT other fields — this avoids false positives on the bug112template's `## Environment` field, whose `Stage:` value may legitimately be `prod`)113for phrasing that signals a not-pre-merge AC:114`post-merge`, `after merge`, `in production`, **and the long tail** — `live users`,115`soak`, `rollout`, `approver`, `prod telemetry`, `manual smoke`. If a **blocking** AC116matches and there is no paired follow-up split, **warn the author (advisory, not117blocking)** and offer to split it per **`references/ac-verification.md`** §3 (create118a non-blocking, non-`autonomous` follow-up; reference it under `## Out of Scope`,119never under `## Dependencies`). Do not hard-fail the draft on a match.120121**Advisory agent-unwritable-surface self-scan** (same AC-checkbox-lines-only122scope, a second pass over the same lines): also scan for phrasing that names a123verification surface the dev agent's **scoped token** cannot write to — at124minimum `in (the )?PR (body|description|title)` and `PR metadata`. Such an AC125can be fully pre-merge verifiable and still guarantee a `dev-actionable=false`126stall, because the scoped token can post PR/issue comments and commit files but127cannot edit PR metadata (`Resource not accessible by integration`, by design128per the two-token split — see **`references/ac-verification.md`** §5). On a129match, **warn the author (advisory, not blocking)** and suggest rewording to130name an agent-writable surface instead — e.g. "…in PR body" →131"…as a PR comment". Do not hard-fail the draft on a match.132133### Step 5: Create the Issue134135Use GitHub MCP tools or `gh` CLI to create the issue with:136- `title`: The confirmed title137- `body`: The confirmed body138- `labels`: Appropriate labels (see Label Guide below)139140Report the created issue URL to the user.141142**If branch push was deferred (large diff strategy):**143144After the issue is created and the issue number is known:1451. Execute the branch push commands from Step 3 using the actual issue number1462. Update the issue body to include the branch reference section147148## Label Guide149150| Label | When to Apply |151|-------|-------------|152| `bug` | Bug reports |153| `enhancement` | Feature requests |154| `autonomous` | User confirms AI should handle dev/test/review/merge automatically |155| `no-auto-close` | Used with `autonomous` -- AI handles dev/test/review but stops before merge, requiring manual approval |156| `documentation` | Documentation-only changes |157| `good first issue` | Simple, well-scoped tasks |158159## Autonomous Label Decision160161After drafting the issue, explicitly ask the user whether to add the `autonomous` label.162163Provide guidance on when `autonomous` is appropriate:164- **Good fit**: Well-defined scope, clear acceptance criteria, follows existing patterns, no ambiguous design decisions165- **Poor fit**: Requires significant architecture decisions, needs user input during development, involves sensitive infrastructure changes, exploratory/research tasks166167Frame the question as:168> "Should this issue be handled by the autonomous development pipeline? The AI will automatically develop, test, review, and merge the changes. This works best for well-defined tasks with clear acceptance criteria."169170**If the user selects `autonomous`, also ask about `no-auto-close`:**171172> "Should this issue also have the `no-auto-close` label? With this label, the AI will handle development, testing, and review, but will **stop before merging** -- you'll be notified to make the final merge decision. This is recommended for sensitive infrastructure changes, features needing product sign-off, or experimental work."173174**Label interaction summary:**175- `autonomous` alone = AI handles dev/test/review **and** auto-merges on pass176- `autonomous` + `no-auto-close` = AI handles dev/test/review but **stops before merge**, notifying the owner for manual approval177178## Writing Guidelines179180- **Title**: Start with verb, be specific. "Add pagination to plans list page" not "Plans page improvement"181- **Body**: Write for an AI developer who has access to the full codebase but no verbal context from this conversation182- **Acceptance criteria**: Must be objectively verifiable, not subjective183- **AC verification surface**: For each acceptance criterion, classify it as **pre-merge verifiable** (evidence obtainable before merge — name the surface: CI job, PR-preview URL, staging command, or local repro — plus the expected evidence) vs **not pre-merge verifiable** (needs deploy/prod, real users, time soak, external approval, prod telemetry, or credentials the bot lacks). Prefer the former, and always **name the surface + expected evidence** rather than asserting the outcome alone. A genuinely not-pre-merge criterion belongs in a separate **non-blocking, non-`autonomous` follow-up** (reference it under `## Out of Scope`, never `## Dependencies`) — leaving it as a blocking AC is a known driver of non-terminating dev↔review loops. Full rubric, reuse-existing-preview guidance, the split procedure, and worked examples: **`references/ac-verification.md`**.184- **Scope**: Prefer smaller, focused issues over large multi-part ones185- **References**: Link to related issues, PRD sections, or code paths when relevant186- **Dependencies**: The `## Dependencies` section must contain **only** issues that must be closed/merged before this issue can be started. Do NOT include: parent epics referenced for context, issues this one unblocks, or any `#NNN` reference that isn't a true blocker. The autonomous dispatcher parses this section literally — any open list-item ref causes this issue to be silently skipped until it closes/merges. Parsing scope: **list-item lines only** (lines starting with `-`, `*`, or `1.`); prose and blockquotes between `## Dependencies` and the next `## ` are ignored. On a list item, both `#N` (same-repo) and `owner/repo#N` (cross-repo) are recognized. If there are no blockers, write exactly `None`. Create issues in dependency order so earlier issue numbers are known when writing later ones.187- **Testing Requirements**: ALWAYS include the "Testing Requirements" section. The dev agent follows the project's TDD workflow but has been observed to skip E2E tests or test-case docs when the issue doesn't explicitly call them out. Be specific about:188 - Key scenarios each test type must cover (2-4 bullet points)189 - For bugs: the regression test must fail before the fix and pass after190191## Multi-Issue Creation192193When breaking a large feature into multiple issues:1941951. **Create issues in dependency order** — issues with no dependencies first, then issues that depend on them. This ensures issue numbers are known when writing dependency references.1962. **Populate the `## Dependencies` section** in each issue body with `#N` (same-repo) or `owner/repo#N` (cross-repo) list-item links to **directly blocking** issues only. Do not reference parent epics, context issues, or issues this one unblocks — the dispatcher treats every list-item ref in that section as a hard blocker. Refs in prose or blockquotes are ignored.1973. **Use a consistent naming scheme** — prefix titles with the project/feature name for easy filtering (e.g., "MyProject: Add DynamoDB infrastructure").1984. **Cross-reference the plan** — if an implementation plan exists, link each issue to the relevant plan tasks/chunks.1995. **The dispatcher skips blocked issues** — issues with open dependencies in the `## Dependencies` section are ignored by the autonomous dispatcher until all dependencies are resolved (closed/merged).200201---202203## References204205For detailed content, consult:206- **`references/issue-templates.md`** -- Full feature and bug issue templates with all required sections207- **`references/ac-verification.md`** -- Pre-merge-vs-not-pre-merge AC classification rubric, reuse-existing-preview guidance, the split-to-non-blocking-follow-up procedure, the `no-auto-close` clarification, and two worked examples (loop prevention)208- **`references/workspace-changes.md`** -- Complete workspace change detection, attachment strategies, and cleanup procedure