Instruction file imported from Cytel-Software/AdaptiveGMCP (
.github/instructions/issue_management.instructions.md). Copyright stays with the author.
Issue Management Instructions
Follow these rules when creating, updating, or reviewing issues, epics, and project items in this repository:
- When creating a new epic issue, always apply the
epiclabel. - When creating any new issue, classify it as
Feature,Task, orBugand set the issue Type accordingly. - As work progresses, update issue state correctly (for example: open, in progress, closed) so tracking remains accurate.
- Use explicit parent-child relationships between issues where they exist. Stories or tasks intended to belong to an epic should be created or added as sub-issues of that epic.
- Do not add or use a markdown checkbox list of child issues inside an epic description to track epic progress. Manual checkbox lists drift as child issue status changes, so they are not a reliable source of truth.
- Use real sub-issue relationships as the source of truth for hierarchy and rollup progress.
- Verify the parent link and project membership before marking issue-management work complete.
- Keep epics and their children in the same Project so automation and reporting stay consistent and visible in one place.
Reliable Issue Creation and Linking Workflow
Use this sequence first when creating issues and linking sub-issues. This order is mandatory because it has been consistently reliable in this repository.
Try First (Known to Work)
- Create the issue with GitHub CLI, not via MCP issue-create retries:
gh issue create --repo Cytel-Software/AdaptiveGMCP --title "..." --body "..." --label ...
- Verify creation immediately:
gh issue view <issue_number> --repo Cytel-Software/AdaptiveGMCP --json number,title,state,url
- For parent-child linking, use GraphQL variables (never inline quoted owner/repo payloads in PowerShell):
- Query IDs with variables:
gh api graphql -f query="query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){parent:issue(number:87){id number} child:issue(number:108){id number}}}" -F owner='Cytel-Software' -F repo='AdaptiveGMCP'
- Link with variables:
gh api graphql -f query="mutation($parentId:ID!,$childId:ID!){addSubIssue(input:{issueId:$parentId,subIssueId:$childId}){issue{number} subIssue{number}}}" -F parentId='<parent_node_id>' -F childId='<child_node_id>'
- Query IDs with variables:
- Verify link and governance fields:
gh issue view <issue_number> --repo Cytel-Software/AdaptiveGMCP --json number,title,state,parent,labels,projectItems,url
- If issue type must be set, use GraphQL updateIssue with
IDscalar forissueTypeId:gh api graphql -f query="mutation($issueId:ID!,$issueTypeId:ID!){updateIssue(input:{id:$issueId,issueTypeId:$issueTypeId}){issue{number issueType{name}}}}" -F issueId='<issue_node_id>' -F issueTypeId='<issue_type_id>'
Do Not Try First (Known Failure-Prone Patterns)
- Do not start with repeated MCP issue-create attempts when the first call behaves unexpectedly.
- Switch immediately to
gh issue createafter the first MCP failure/hiccup.
- Switch immediately to
- Do not use placeholder or unrelated fallback calls (for example, Copilot job-status checks) to recover issue creation flow.
- They do not create issues and add noise/confusion.
- Do not embed complex GraphQL with heavily escaped inline quotes in PowerShell command strings.
- This frequently breaks parsing for owner/repo/query payload.
- Do not proceed without immediate post-action verification (
gh issue view ... --json ...).- Missing verification causes hidden failures in hierarchy/project metadata.
Recovery Rule
If issue creation or linking fails once in the preferred path, report the exact failing command and error, then retry once with corrected variables/IDs. If it fails again, stop and ask for direction instead of chaining unrelated recovery attempts.