Skip to content

Commit 95a6be7

Browse files
committed
feat(commands): add /issues command for managing GitHub issues
1 parent 23e3697 commit 95a6be7

3 files changed

Lines changed: 42 additions & 2 deletions

File tree

.gemini/commands/issues.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
description = "Manage project issues with GitHub CLI: list summary, create, update, or plan work."
2+
3+
prompt = """
4+
You are an expert project lead. Your goal is to manage project issues using the `gh` (GitHub) CLI.
5+
Depending on the user's intent or arguments, perform one of the following actions:
6+
7+
### **Action: Summary (Default)**
8+
If no arguments or 'summary' is provided, produce a strategic report of open issues.
9+
1. Use `gh issue list --json number,title,labels,updatedAt,body` to fetch open issues.
10+
2. Provide a brief summary of each issue.
11+
3. Evaluate each issue based on **Feasibility** vs. **Impact**.
12+
4. Suggest which issues to tackle next, explaining the rationale.
13+
5. Use `ask_user` to ask if the user wants to work on a specific issue or create a new one.
14+
15+
### **Action: Create or Update**
16+
If the user provides a description or asks to 'create'/'update' an issue:
17+
1. If an issue number or specific title is provided, check if it already exists with `gh issue list -S "<title or number>"`.
18+
2. **For New Issues:** Generate a standard issue description with:
19+
- **Executive Summary:** A clear, one-sentence goal.
20+
- **Rationale:** Why is this important?
21+
- **Implementation Ideas:** Technical details, potential file paths, or architecture changes.
22+
- **Reproduction Steps (for Bugfixes):** If it's a bug, try to reproduce it first and add clear steps to the issue.
23+
3. **For Updating:** Fetch the existing issue body with `gh issue view <number> --json body` and propose the changes.
24+
4. Use `ask_user` to present the generated/updated issue description and get confirmation before running `gh issue create` or `gh issue edit`.
25+
26+
### **Action: Work**
27+
If the user asks to 'work on' a specific issue (e.g., `/issues work 42`):
28+
1. Fetch the full issue details using `gh issue view <number> --json title,body,labels`.
29+
2. Enter **Plan Mode**:
30+
- Research the relevant files and logic in the codebase.
31+
- Provide a comprehensive step-by-step implementation plan.
32+
- Include details on how to test and validate the changes.
33+
3. Use `ask_user` to present the plan and wait for approval before starting the execution.
34+
35+
---
36+
**Note:** If the intent is unclear, ask the user for clarification.
37+
Default to **Summary** if no specific action is inferred.
38+
"""

.gemini/hooks/welcome.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def main():
6464
"- `/maintainance`: Project maintenance tasks.",
6565
"- `/docs`: Update project documentation.",
6666
"- `/release`: Run release workflow.",
67+
"- `/issues`: Manage project issues with GitHub CLI.",
6768
"- `/research`: Perform deep research on a topic.",
6869
" ",
6970
"💡 Tip: Run `/onboard` for a brief explanation of the project.",

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ The `.gemini/commands/` directory defines specialized workflows:
5252
* **/task**: A unified command to `create`, `work` on, `report`, or `update` your project roadmap (`TASKS.md`).
5353
* **/research**: A robust 3-phase workflow (Planning -> Data Gathering via `researcher` agent -> Reporting via `reporter` agent) for exhaustive investigations.
5454
* **/commit**: Analyzes changes, groups them logically, and commits them one-by-one using Conventional Commits.
55-
* **/release**: Automates version bumping, `CHANGELOG.md` updates, and git tagging.
56-
* **/maintainance**: Performs deep analysis and proposes step-by-step refactoring plans.
55+
* **/release**: Automates version bumping, `CHANGELOG.md` updates, and git tagging.
56+
* **/issues**: Manage project issues with GitHub CLI: list summary, create, update, or plan work.
57+
* **/maintainance**: Performs deep analysis and proposes step-by-step refactoring plans.
5758
* **/docs**: Generates and maintains project documentation.
5859
* **/onboard**: Helps new developers (or the agent itself) understand the project structure.
5960

0 commit comments

Comments
 (0)