|
| 1 | +--- |
| 2 | +name: analyze-issue |
| 3 | +description: Deep analysis of a GitHub issue. Reads the issue, all comments, and the codebase to classify the issue, reproduce bugs, and produce a full implementation plan with breaking-change assessment. |
| 4 | +argument-hint: <github-issue-url> |
| 5 | +allowed-tools: Bash Read Glob Grep Agent mcp__playwright__browser_navigate mcp__playwright__browser_snapshot mcp__playwright__browser_take_screenshot mcp__playwright__browser_click mcp__playwright__browser_select_option mcp__playwright__browser_fill_form mcp__playwright__browser_press_key mcp__playwright__browser_hover mcp__playwright__browser_tabs mcp__playwright__browser_close mcp__playwright__browser_console_messages mcp__playwright__browser_wait_for mcp__playwright__browser_resize |
| 6 | +--- |
| 7 | + |
| 8 | +# Analyze GitHub Issue |
| 9 | + |
| 10 | +Given a GitHub issue URL, perform a thorough analysis and produce a complete, actionable plan. |
| 11 | + |
| 12 | +**Repository:** `xrutayisire/react-js-cron` |
| 13 | +**Issue URL:** `$ARGUMENTS` |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Phase 1 — Gather context |
| 18 | + |
| 19 | +### 1.1 Read the issue |
| 20 | + |
| 21 | +Use the GitHub CLI to extract everything about the issue: |
| 22 | + |
| 23 | +```bash |
| 24 | +# Extract the issue number from the URL |
| 25 | +gh issue view <number> --repo xrutayisire/react-js-cron --json title,body,state,labels,assignees,milestone,createdAt,updatedAt,author,closedAt |
| 26 | + |
| 27 | +# Read every comment with author and timestamp |
| 28 | +gh issue view <number> --repo xrutayisire/react-js-cron --comments |
| 29 | +``` |
| 30 | + |
| 31 | +Record: |
| 32 | +- Title and full description |
| 33 | +- Every comment (author, date, content) |
| 34 | +- Labels, state, milestone, assignees |
| 35 | +- Timeline of events (opened, labeled, referenced, closed) |
| 36 | +- Any linked pull requests or related issues |
| 37 | + |
| 38 | +### 1.2 Identify the reporter's intent |
| 39 | + |
| 40 | +From the description and comments, determine: |
| 41 | +- What is the reporter asking for? |
| 42 | +- What behavior did they expect? |
| 43 | +- What behavior did they observe? |
| 44 | +- Did they provide a reproduction (code snippet, cron expression, screenshot)? |
| 45 | +- Did they specify a version? |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## Phase 2 — Classify the issue |
| 50 | + |
| 51 | +Assign exactly one primary classification: |
| 52 | + |
| 53 | +| Classification | Criteria | |
| 54 | +|---|---| |
| 55 | +| **Bug** | The library behaves differently from what the documentation or API contract promises. Something that worked before is now broken, or a specific input produces an incorrect output. | |
| 56 | +| **Feature request** | A new capability that does not exist today. The current behavior is correct but the reporter wants more. | |
| 57 | +| **Enhancement** | An improvement to existing behavior (better UX, performance, accessibility) without adding a new feature. | |
| 58 | +| **Question / Support** | The reporter is asking how to use something. The library may already support what they need. | |
| 59 | +| **Not actionable** | Insufficient information, cannot reproduce, outside the scope of this library, or a duplicate. | |
| 60 | + |
| 61 | +Explain the classification with evidence from the issue text. If the issue is ambiguous, state the ambiguity and provide the most likely classification. |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## Phase 3 — Analyze the codebase |
| 66 | + |
| 67 | +### 3.1 Locate relevant code |
| 68 | + |
| 69 | +Based on the issue content, search the codebase to find every file that is related: |
| 70 | + |
| 71 | +- Components (`src/Cron.tsx`, `src/fields/*.tsx`, `src/components/*.tsx`) |
| 72 | +- Types and interfaces (`src/types.ts`) |
| 73 | +- Conversion logic (`src/converter.ts`) |
| 74 | +- Utilities (`src/utils.ts`) |
| 75 | +- Locale definitions (`src/locale.ts`) |
| 76 | +- Styles (`src/styles.css`) |
| 77 | +- Stories and tests (`src/stories/`, `src/tests/`) |
| 78 | + |
| 79 | +Read the relevant sections. Understand the current behavior and why it works the way it does. |
| 80 | + |
| 81 | +### 3.2 Trace the code path |
| 82 | + |
| 83 | +For bugs or enhancements, trace the exact code path involved: |
| 84 | + |
| 85 | +1. Identify which props, state variables, and callbacks are involved. |
| 86 | +2. Follow the data flow from user interaction to rendered output. |
| 87 | +3. Identify where the current behavior diverges from the expected behavior. |
| 88 | +4. Note any edge cases or related logic that could be affected by a change. |
| 89 | + |
| 90 | +### 3.3 Check existing tests |
| 91 | + |
| 92 | +```bash |
| 93 | +# Run the test suite to see current state |
| 94 | +yarn test --run |
| 95 | +``` |
| 96 | + |
| 97 | +Review test files in `src/tests/` to understand what is already covered and what gaps exist relative to this issue. |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## Phase 4 — Reproduce (if bug) |
| 102 | + |
| 103 | +If the issue is classified as a bug: |
| 104 | + |
| 105 | +### 4.1 Write a failing test |
| 106 | + |
| 107 | +If possible, write a minimal test case that demonstrates the bug. Do not commit it yet — just confirm the reproduction. |
| 108 | + |
| 109 | +### 4.2 Reproduce visually |
| 110 | + |
| 111 | +If the bug is visual or interaction-based: |
| 112 | + |
| 113 | +1. Start local Storybook (`yarn storybook` on port 9009) if not already running. |
| 114 | +2. Navigate to the relevant story using Playwright MCP. |
| 115 | +3. Reproduce the exact steps described in the issue. |
| 116 | +4. Take screenshots documenting the current (broken) behavior. |
| 117 | +5. Compare with production (`https://xrutayisire.github.io/react-js-cron/`) if the bug is a regression. |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## Phase 5 — Assess impact |
| 122 | + |
| 123 | +### 5.1 Breaking-change analysis |
| 124 | + |
| 125 | +Evaluate whether fixing or implementing this would break existing users: |
| 126 | + |
| 127 | +| Impact level | Definition | |
| 128 | +|---|---| |
| 129 | +| **None** | Internal refactor, new additive prop, or bug fix that restores documented behavior. No user code changes needed. | |
| 130 | +| **Minor** | Default behavior changes slightly but the previous behavior is available via a new prop or option. Migration is trivial. | |
| 131 | +| **Breaking** | Existing user code would produce different results or fail to compile. Requires a semver major bump. | |
| 132 | + |
| 133 | +For each impact level, explain specifically what would change for a user upgrading. |
| 134 | + |
| 135 | +### 5.2 User experience assessment |
| 136 | + |
| 137 | +Consider both: |
| 138 | +- **Existing users**: Will their current cron expressions, configurations, or UIs change? |
| 139 | +- **New users**: Will the change make the library easier to adopt, harder, or neutral? |
| 140 | + |
| 141 | +### 5.3 Scope of code changes |
| 142 | + |
| 143 | +List every file that would need to change, and estimate the complexity (trivial / moderate / significant). |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## Phase 6 — Produce the plan |
| 148 | + |
| 149 | +### 6.1 Recommendation |
| 150 | + |
| 151 | +State one of: |
| 152 | + |
| 153 | +- **Do nothing** — Explain why (not a bug, out of scope, already works as intended, duplicate). |
| 154 | +- **Respond to the issue** — If it is a question, draft a helpful reply. |
| 155 | +- **Implement** — Proceed with the plan below. |
| 156 | + |
| 157 | +### 6.2 Implementation plan |
| 158 | + |
| 159 | +If the recommendation is to implement, provide: |
| 160 | + |
| 161 | +#### Summary |
| 162 | + |
| 163 | +One paragraph describing what will be done and why. |
| 164 | + |
| 165 | +#### Steps |
| 166 | + |
| 167 | +A numbered list of concrete steps. Each step should specify: |
| 168 | + |
| 169 | +1. The file to modify |
| 170 | +2. What to change (add, modify, or remove) |
| 171 | +3. Why this change is needed |
| 172 | +4. Any edge cases to handle |
| 173 | + |
| 174 | +#### Props / API changes |
| 175 | + |
| 176 | +If new props or API surface is added: |
| 177 | + |
| 178 | +- Prop name and type |
| 179 | +- Default value (must preserve backward compatibility) |
| 180 | +- Description |
| 181 | +- Example usage |
| 182 | + |
| 183 | +#### Tests to add |
| 184 | + |
| 185 | +List specific test cases that should be written: |
| 186 | + |
| 187 | +- What input |
| 188 | +- What expected output |
| 189 | +- What edge cases |
| 190 | + |
| 191 | +#### Stories to add or update |
| 192 | + |
| 193 | +If the change affects the UI, specify which Storybook stories need updating or adding. |
| 194 | + |
| 195 | +#### Visual verification |
| 196 | + |
| 197 | +Describe how to visually verify the change using `/visual-test` to confirm no regressions. |
| 198 | + |
| 199 | +### 6.3 Breaking-change justification (if applicable) |
| 200 | + |
| 201 | +If the plan involves a breaking change, provide: |
| 202 | + |
| 203 | +1. **What breaks** — Exact behavior that changes. |
| 204 | +2. **Who is affected** — What user configurations would see different behavior. |
| 205 | +3. **Why it is necessary** — Why a non-breaking alternative is not feasible. |
| 206 | +4. **Migration path** — Step-by-step guide for users to update their code. |
| 207 | +5. **Semver impact** — This requires a major version bump. |
| 208 | + |
| 209 | +--- |
| 210 | + |
| 211 | +## Phase 7 — Draft the response |
| 212 | + |
| 213 | +Draft a comment to post on the GitHub issue that: |
| 214 | + |
| 215 | +1. Thanks the reporter. |
| 216 | +2. Confirms or corrects the classification. |
| 217 | +3. Summarizes the findings (bug confirmed/not confirmed, feature feasibility). |
| 218 | +4. Outlines the plan at a high level (without internal implementation details). |
| 219 | +5. Sets expectations (timeline, next steps, whether a PR will follow). |
| 220 | + |
| 221 | +Do not post the comment. Present it for review. |
| 222 | + |
| 223 | +--- |
| 224 | + |
| 225 | +## Output format |
| 226 | + |
| 227 | +Present the full analysis as a structured report with these sections: |
| 228 | + |
| 229 | +``` |
| 230 | +## Issue analysis: #<number> — <title> |
| 231 | +
|
| 232 | +### Classification: <Bug | Feature request | Enhancement | Question | Not actionable> |
| 233 | +<Evidence and reasoning> |
| 234 | +
|
| 235 | +### Reproduction |
| 236 | +<Steps taken, whether reproduced, screenshots if applicable> |
| 237 | +
|
| 238 | +### Impact assessment |
| 239 | +<Breaking-change level, user experience impact, scope of changes> |
| 240 | +
|
| 241 | +### Recommendation: <Do nothing | Respond | Implement> |
| 242 | +<Reasoning> |
| 243 | +
|
| 244 | +### Implementation plan |
| 245 | +<Full plan as described in Phase 6.2, or "N/A" if not implementing> |
| 246 | +
|
| 247 | +### Suggested GitHub response |
| 248 | +<Draft comment for the issue> |
| 249 | +``` |
0 commit comments