|
| 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 | +""" |
0 commit comments