|
1 | 1 | --- |
2 | | -description: Analyze a GitHub issue and create a comprehensive plan to fix it |
| 2 | +description: Analyze a documentation issue and create a plan to fix it. |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | # Usage |
6 | | -# /fix-issue <issue-number> |
7 | 6 |
|
8 | | -You will analyze GitHub issue #{{arg}} and create a comprehensive plan to fix it. |
| 7 | +`/fix-issue <issue-number>` |
9 | 8 |
|
10 | | -## Step 1: Gather Issue Details |
| 9 | +Analyze GitHub issue #{{arg}} and create a comprehensive plan to address it. You are acting as a technical content engineer focused on improving documentation quality. |
11 | 10 |
|
12 | | -Use `gh issue view {{arg}}` to retrieve the full issue description, labels, comments, and any related context. |
| 11 | +--- |
| 12 | + |
| 13 | +## Process |
| 14 | + |
| 15 | +### 1. Gather issue details |
| 16 | + |
| 17 | +Use `gh issue view {{arg}}` to retrieve the complete issue information: |
| 18 | +- Read the full issue description to understand the problem |
| 19 | +- Review labels to identify issue type (bug, enhancement, clarification, etc.) |
| 20 | +- Read all comments and discussion to understand user pain points |
| 21 | +- Note any related issues or PRs mentioned |
| 22 | +- Identify the affected product area or documentation section |
| 23 | + |
| 24 | +### 2. Research current documentation |
| 25 | + |
| 26 | +Use semantic search and file tools to thoroughly investigate: |
| 27 | +- Locate the specific documentation files mentioned or affected |
| 28 | +- Read the current content to understand what's written today |
| 29 | +- Identify what's missing, incorrect, outdated, or unclear |
| 30 | +- Review related documentation pages for consistency and cross-references |
| 31 | +- Search for similar patterns elsewhere in the docs that might have the same issue |
| 32 | +- Check if code examples exist and whether they're tested |
| 33 | + |
| 34 | +### 3. Review guidelines |
| 35 | + |
| 36 | +Before proposing changes, verify compliance with: |
| 37 | +- `AGENTS.md` — Repository conventions, build/test workflow, file movement rules, SEO requirements |
| 38 | +- `STYLE-GUIDE.md` — Writing style, heading capitalization, code formatting, terminology |
| 39 | +- Existing documentation patterns in the same section to maintain consistency |
| 40 | +- Google Developer Documentation Style Guide for topics not covered in STYLE-GUIDE.md |
| 41 | + |
| 42 | +### 4. Create implementation plan |
| 43 | + |
| 44 | +Develop a detailed plan with these components: |
13 | 45 |
|
14 | | -## Step 2: Understand the Codebase |
| 46 | +1. **Analysis** — Clearly explain: |
| 47 | + - What the current documentation says (or doesn't say) |
| 48 | + - Why it's problematic for users |
| 49 | + - What impact this has on the user experience |
| 50 | + - The root cause of the issue |
15 | 51 |
|
16 | | -Based on the issue details: |
17 | | -- Search for relevant files, functions, or patterns mentioned in the issue |
18 | | -- Understand the current implementation and identify the root cause |
19 | | -- Review related code sections to understand dependencies and impacts |
20 | | -- Check for similar issues or related functionality |
| 52 | +2. **Solution** — Describe the specific changes: |
| 53 | + - New content to write (with outline of key points) |
| 54 | + - Sections to restructure (with proposed new organization) |
| 55 | + - Text to clarify (with examples of better wording) |
| 56 | + - Outdated content to remove |
| 57 | + - Code examples to add or fix |
21 | 58 |
|
22 | | -## Step 3: Consult Repository Guidelines |
| 59 | +3. **Files to modify** — List exact file paths and locations: |
| 60 | + - Full paths from repository root (e.g., `content/docs/clouds/aws/get-started.md`) |
| 61 | + - Specific section headings where changes occur |
| 62 | + - Line numbers if known |
23 | 63 |
|
24 | | -Review and follow: |
25 | | -- `AGENTS.md` - Repository conventions and build/test workflow |
26 | | -- `STYLE-GUIDE.md` - Style and formatting requirements |
27 | | -- Related documentation to ensure any proposed changes align with existing patterns |
| 64 | +4. **Implementation steps** — Break work into logical, ordered tasks: |
| 65 | + - Update section headings and structure |
| 66 | + - Rewrite or add explanatory content |
| 67 | + - Add, update, or fix code examples in `/static/programs` |
| 68 | + - Add cross-references and internal links |
| 69 | + - Update or create diagrams/images (if needed - Be wary of images due to maintenance overhead) |
| 70 | + - Add aliases if moving files (critical for SEO) |
| 71 | + - Update related documentation for consistency |
28 | 72 |
|
29 | | -## Step 4: Formulate a Comprehensive Plan |
| 73 | +5. **Verification** — Define how to validate the fix: |
| 74 | + - Run `make lint` to check for errors |
| 75 | + - Run `make serve` to preview rendering at http://localhost:1313 |
| 76 | + - Test any code examples using program tests |
| 77 | + - Verify all links work (internal and external) |
| 78 | + - Confirm technical accuracy with subject matter experts if needed |
| 79 | + - Check readability and clarity from user perspective |
30 | 80 |
|
31 | | -Create a detailed, step-by-step plan that includes: |
| 81 | +6. **Considerations** — Note special requirements or impacts: |
| 82 | + - Version-specific changes needed across multiple doc versions |
| 83 | + - Related docs that need updates for consistency |
| 84 | + - Breaking changes or deprecations to communicate |
| 85 | + - SEO implications (aliases, redirects) if moving or deleting content |
| 86 | + - Localization impacts if docs are translated |
| 87 | + - Whether this reveals a larger documentation gap to address separately |
32 | 88 |
|
33 | | -1. **Analysis**: Clearly identify the desired outcome in the docs based on the issue description and current implementation |
34 | | -1. **Proposed Solution**: Describe the approach to fix the issue |
35 | | -1. **Files to Modify**: List specific files and line numbers that need changes |
36 | | -1. **Implementation Steps**: Break down the work into logical, sequential tasks |
37 | | -1. **Testing Strategy**: How to verify the fix works correctly |
38 | | -1. **Edge Cases**: Identify any edge cases or potential complications |
39 | | -1. **Verification Steps**: Commands to run (lint, build, test) to ensure the fix is complete |
| 89 | +### 5. Present for approval |
40 | 90 |
|
41 | | -## Step 5: Present the Plan |
| 91 | +**IMPORTANT: Do NOT implement without user approval.** |
42 | 92 |
|
43 | | -Present the plan to the user using the `ExitPlanMode` tool. Include: |
44 | | -- Clear, concise steps |
45 | | -- Relevant file paths with line numbers |
46 | | -- Commands that will be run |
47 | | -- Any assumptions or decisions that may need user input |
| 93 | +Present the complete plan to the user including: |
| 94 | +- Clear, numbered steps in logical order |
| 95 | +- Exact file paths with section headings or line numbers |
| 96 | +- Specific commands that will be run (e.g., `make lint`, `make serve`) |
| 97 | +- Any assumptions made or decisions that need user input |
| 98 | +- Estimated scope (minor fix vs. major restructuring) |
48 | 99 |
|
49 | | -**Important**: |
50 | | -- Do NOT start implementing without user approval |
51 | | -- If the issue is ambiguous, ask clarifying questions before planning |
52 | | -- If multiple approaches are viable, present options and ask for the user's preference |
53 | | -- Be specific about what will change and why |
54 | | -- Ensure all changes comply with `STYLE-GUIDE.md` and `AGENTS.md` |
| 100 | +If the issue is ambiguous, ask clarifying questions before creating the plan. If multiple valid approaches exist, present options with pros/cons and ask for the user's preference. |
0 commit comments