| name | create-issue | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Guide for creating GitHub issues in the torrust-tracker project. Covers the full workflow from specification drafting, user review, to GitHub issue creation with proper documentation and file naming. Supports task, bug, feature, and epic issue types. Use when creating issues, opening tickets, filing bugs, proposing tasks, or adding features. Triggers on "create issue", "open issue", "new issue", "file bug", "add task", "create epic", or "open ticket". | ||||||||||
| metadata |
|
| Type | Label | When to Use |
|---|---|---|
| Task | task |
Single implementable unit of work |
| Bug | bug |
Something broken that needs fixing |
| Feature | feature |
New capability or enhancement |
| Epic | epic |
Major feature area containing multiple tasks |
The process is spec-first: write and review a specification before creating the GitHub issue.
Lifecycle docs:
- Open issue specs:
docs/issues/open/README.md - Closed issue buffer:
docs/issues/closed/README.md
- Draft specification document in
docs/issues/drafts/using the repository templates appropriate to the issue type (docs/templates/ISSUE.mdfor Task/Bug/Feature,docs/templates/EPIC.mdfor Epic) - User reviews the draft specification
- Create GitHub issue
- Move spec file to
docs/issues/open/and include the issue number - Pre-commit checks and commit the spec
For complex or high-impact issues, a spec-first PR is recommended:
- Open a branch containing only issue-spec/EPIC documentation changes
- Submit and merge that PR into
developfirst - Start implementation only after the specification PR has been reviewed and merged
- Use
Related to #<number>(notCloses #<number>) in the spec-only PR body to avoid auto-closing the issue on merge (see theopen-pull-requestskill)
This improves visibility and allows maintainers/contributors to review scope and acceptance criteria before code changes begin.
Never create the GitHub issue before the user reviews and approves the specification.
Create a specification file with a temporary name (no issue number yet):
touch docs/issues/drafts/{short-description}.mdSelect the template by issue type:
- Task/Bug/Feature: docs/templates/ISSUE.md
- Epic: docs/templates/EPIC.md
Before presenting the draft for review, initialize these sections so progress can be tracked explicitly during implementation:
- YAML frontmatter metadata (including
status,github-issue,spec-path, andlast-updated-utc) Implementation Plan(orSubissuesfor epics) with explicit status valuesProgress Tracking(Workflow Checkpointsand firstProgress Logentry)Acceptance CriteriaandAcceptance Verification
The draft must also include a verification policy that is explicit and enforceable:
- Automatic checks to run after implementation (
linter all, relevant tests, pre-push checks when applicable) - Manual verification scenarios with status + evidence tracking (mandatory)
- A post-implementation acceptance criteria review step
Use placeholders for the issue number until after creation (for example github-issue: null
or [To be assigned] in the heading/body content).
After drafting, run linters:
linter markdown
linter cspellSTOP HERE — present the draft to the user. Iterate until approved.
After user approval, format the issue body and create the issue.
Before calling the GitHub API or CLI, review and reformat the issue body following the
write-markdown-docs checklist for GitHub surfaces:
- Write each paragraph as a single continuous line — do not hard-wrap at any fixed column width
- Use GitHub Flavored Markdown (GFM) conventions
- Check for accidental
#NUMBERautolinks (only use#NUMBERfor intentional issue/PR references)
GitHub CLI:
gh issue create \
--repo torrust/torrust-tracker \
--title "{title}" \
--body "{body}" \
--label "{label}"MCP GitHub tools (if available): use mcp_github_github_issue_write with title, body, and labels.
Move from drafts/ to open/ using the assigned issue number:
git mv docs/issues/drafts/{short-description}.md \
docs/issues/open/{number}-{short-description}.mdUpdate any issue number placeholders inside the file.
linter all # Must pass
git add docs/issues/
git commit -S -m "docs(issues): add issue specification for #{number}"
git push {your-fork-remote} {branch}When the issue is complex, cross-cutting, or likely to need scope negotiation, open a PR that contains only the issue specification changes:
- Branch from
develop - Commit only spec changes (
docs/issues/, and if needed templates/skills) - Push branch to your fork remote (for example
josecelano) - Open PR in the upstream repository (
torrust/torrust-tracker) targetingdevelop - If using fork-based workflow, set head as
{fork-owner}:{branch}(for examplejosecelano:1771-spec-first-pr-workflow) - Do not open the PR in the fork repository unless explicitly requested
- Merge PR after review
- Start implementation work in a separate branch/PR
Important — do NOT auto-close the issue from a spec-only PR. Use
Related to #<number>in the PR body, neverCloses #<number>/Fixes #<number>/Resolves #<number>. Those keywords trigger GitHub auto-close on merge. The issue must remain open until the implementation is merged. See theopen-pull-requestskill for the full issue-linking rules.
Policy notes:
- Never push directly to
developormain. - To merge into
developormain, open a PR intorrust/torrust-trackerfrom a fork branch (<fork-owner>:<branch>). - Remote names are contributor-specific (
josecelano,origin,torrust, etc.); use your configured fork remote.
Recommended GitHub CLI command for fork-based PRs:
gh pr create \
--repo torrust/torrust-tracker \
--base develop \
--head {fork-owner}:{branch} \
--title "{title}" \
--body-file {body-file}When creating or updating issue/epic specs, ensure these requirements are present in the spec before implementation starts:
- Automatic verification: list required automated checks.
- Manual verification: define concrete manual scenarios with commands/steps and expected results.
- Evidence tracking: include status/evidence fields for manual scenarios.
- Post-implementation AC review: explicitly require acceptance criteria to be re-reviewed against observed behavior before closing the issue.
Do not treat an issue as complete only because automated tests pass; manual validation is required.
File name format: {number}-{short-description}.md
Examples:
1697-ai-agent-configuration.md42-add-peer-expiry-grace-period.md523-internal-linting-tool.md