From 68df56626254886796c22ae4337596a4f402bf13 Mon Sep 17 00:00:00 2001 From: Morgan Joyce Date: Fri, 1 Aug 2025 12:58:22 -0500 Subject: [PATCH] feat(procedures): enhance GitHub issue creation with smart template selection Add comprehensive GitHub issue creation workflow that: - Auto-detects issue type from request keywords - Maps to appropriate issue templates - Links relevant procedures based on context - Provides /create-issue slash command Updates ai-index.md to reference new procedure for discoverability. Closes #1100 Principle: systems-stewardship --- .claude/command-templates/create-issue.md | 25 +++++++++ knowledge/ai-index.md | 1 + knowledge/procedures/github-issue-creation.md | 56 +++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .claude/command-templates/create-issue.md create mode 100644 knowledge/procedures/github-issue-creation.md diff --git a/.claude/command-templates/create-issue.md b/.claude/command-templates/create-issue.md new file mode 100644 index 00000000..572cf3e6 --- /dev/null +++ b/.claude/command-templates/create-issue.md @@ -0,0 +1,25 @@ +--- +name: create-issue +description: Create GitHub issue with intelligent type detection and template selection +--- + +# Create GitHub Issue + +I'll help you create a GitHub issue with the appropriate template and context. + +{{ INJECT:procedures/github-issue-creation.md }} + +## Request Analysis + +Please provide: +1. **What you want to create an issue for** +2. **Any specific details or context** +3. **Whether this is for dotfiles or another repository** + +I'll: +- Auto-detect the issue type +- Suggest the best template +- Link relevant procedures +- Include appropriate labels + +What would you like to create an issue for? \ No newline at end of file diff --git a/knowledge/ai-index.md b/knowledge/ai-index.md index 7d898eba..0137a441 100644 --- a/knowledge/ai-index.md +++ b/knowledge/ai-index.md @@ -20,6 +20,7 @@ Your starting point for understanding and working with this dotfiles repository. - Apply [Tracer Bullets](principles/tracer-bullets.md) - Iterative development ### Handle GitHub Tasks +- Create issues with [GitHub Issue Creation](procedures/github-issue-creation.md) - Smart template selection - See [Issue to PR Workflow](procedures/issue-to-pr-workflow.md) - High-level flow - Follow [Close Issue Procedure](procedures/close-issue-procedure.md) - Detailed steps - Use GitHub MCP server for all GitHub operations diff --git a/knowledge/procedures/github-issue-creation.md b/knowledge/procedures/github-issue-creation.md new file mode 100644 index 00000000..3e4b00a5 --- /dev/null +++ b/knowledge/procedures/github-issue-creation.md @@ -0,0 +1,56 @@ +# GitHub Issue Creation + +Intelligent issue creation that auto-detects type, suggests templates, and links relevant procedures. + +## When to Use This + +When users request "create a GitHub issue for..." or need to document a new task, bug, or enhancement. + +## Decision Tree + +1. **Analyze the request** to determine issue type: + - Bug report → Use bug template + - Feature request → Use feature template + - MCP tool error → Use mcp-tool-error template + - Procedure documentation → Use procedure-documentation template + - General enhancement → Use enhancement template + +2. **Scan for keywords** to link relevant procedures: + - "MCP" → Link MCP-related procedures + - "worktree" → Link worktree-workflow + - "retro" → Link post-pr-mini-retro + - "git" → Link git-workflow + +3. **Auto-populate context**: + - Related principles from knowledge/principles/ + - Existing procedures that might help + - Recent similar issues (if any) + +## Template Mapping + +| Request Contains | Suggested Template | Key Fields | +|-----------------|-------------------|------------| +| "error", "fails", "broken", "bug" | issue.md (bug report) | Steps to reproduce, expected behavior | +| "feature", "add", "implement", "enhance" | issue.md (enhancement) | Problem statement, proposed solution | +| "mcp__git", "mcp__github", "tool error" | mcp-tool-error.md | Tool name, error message, reproduction | +| "procedure", "document process", "ghost" | procedure-documentation.md | Procedure name, steps, trigger | +| General request | issue.md | Flexible format for any issue type | + +## Available Templates + +- **issue.md** - General purpose template for bugs, features, questions +- **mcp-tool-error.md** - Specific to MCP tool failures (auto-assigns) +- **procedure-documentation.md** - For capturing ghost procedures + +## Implementation + +Use `mcp__github__create_issue` with: +- Appropriate labels based on type +- Cross-referenced procedures in body +- Clear title following conventions +- Assignee if specified + +## See Also + +- [Issue to PR Workflow](issue-to-pr-workflow.md) +- [Close Issue Procedure](close-issue-procedure.md) \ No newline at end of file