|
| 1 | +# GitHub Issue Analysis and Action Plan Prompt for ASP.NET Core Documentation |
| 2 | + |
| 3 | +## Goal |
| 4 | +Analyze the GitHub issue and provide a **structured report** determining: |
| 5 | +1. Whether the issue is valid and actionable |
| 6 | +2. The exact documentation changes required (if applicable) |
| 7 | +3. A clear action plan that can guide PR creation |
| 8 | + |
| 9 | +The report should be suitable for posting directly in the issue discussion. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Analysis Steps |
| 14 | + |
| 15 | +### 1. Information Gathering |
| 16 | +Collect and review: |
| 17 | +- The **issue title, description, and all comments** |
| 18 | +- The **published documentation** (via the provided URL) |
| 19 | +- The **source file(s)** in the repository |
| 20 | +- Any **linked issues, PRs, or external references** |
| 21 | +- **Environment details**: .NET version, tooling versions (VS, VS Code, CLI, EF Core, etc.) |
| 22 | +- **Code samples or error messages** mentioned in the issue |
| 23 | + |
| 24 | +### 1.5 Source File Analysis |
| 25 | +When examining source files: |
| 26 | +- **Provide direct GitHub permalinks** to specific lines or sections |
| 27 | +- **Note exact line numbers** for proposed changes |
| 28 | +- **Include line number ranges** in GitHub URLs using `#L<start>-L<end>` format |
| 29 | +- **Quote current content** from specific lines before proposing changes |
| 30 | +- **Use permalinks with commit SHA** when referencing specific versions |
| 31 | + |
| 32 | +Example format for file references: |
| 33 | +- Single line: `https://github.com/owner/repo/blob/main/file.md#L123` |
| 34 | +- Line range: `https://github.com/owner/repo/blob/main/file.md#L123-L145` |
| 35 | +- Permalink: `https://github.com/owner/repo/blob/<commit-sha>/file.md#L123` |
| 36 | + |
| 37 | +### 2. Validation Criteria |
| 38 | +Determine if the issue is: |
| 39 | +- **In scope**: Related to ASP.NET Core documentation (not product bugs) |
| 40 | +- **Accurate**: The reported problem genuinely exists |
| 41 | +- **Clear**: Sufficient information to take action |
| 42 | +- **Current**: Applies to supported .NET versions |
| 43 | + |
| 44 | +### 3. Translation Requirements |
| 45 | +If any content is not in English: |
| 46 | +- Include the original text in a quote block |
| 47 | +- Provide complete English translation |
| 48 | +- Label clearly as "Original" and "Translation" |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Output Format |
| 53 | + |
| 54 | +### File Naming |
| 55 | +`<issue-number>-analysis-report.md` |
| 56 | + |
| 57 | +### Report Structure |
| 58 | + |
| 59 | +#### Header |
| 60 | +```markdown |
| 61 | +## AI Analysis Report |
| 62 | +**Analyzed by:** @<github-username> |
| 63 | +**Date:** <YYYY-MM-DD> |
| 64 | +**Issue:** #<issue-number> |
| 65 | +**Model:** GitHub Copilot |
| 66 | +--- |
| 67 | +``` |
| 68 | + |
| 69 | +#### For Valid Issues |
| 70 | + |
| 71 | +```markdown |
| 72 | +# Issue Analysis: <Concise Issue Title> |
| 73 | + |
| 74 | +## ✅ Issue Validation |
| 75 | +**Status:** Valid and actionable |
| 76 | + |
| 77 | +## 📋 Issue Summary |
| 78 | +<Brief description of the problem and why it needs to be addressed> |
| 79 | + |
| 80 | +## 📁 Affected Files |
| 81 | +| File | Path | Lines | Section | |
| 82 | +|------|------|-------|---------| |
| 83 | +| Main article | [`aspnetcore/path/to/file.md`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/path/to/file.md#L123-L145) | 123-145 | "Section Heading" | |
| 84 | +| Code sample | [`aspnetcore/path/to/sample.cs`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/path/to/sample.cs#L45-L67) | 45-67 | `MethodName()` method | |
| 85 | + |
| 86 | +## 📝 Proposed Changes |
| 87 | + |
| 88 | +### Documentation Updates |
| 89 | +**File:** [`aspnetcore/path/to/file.md`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/path/to/file.md#L123-L145) |
| 90 | +**Location:** Lines 123-145 (after the paragraph containing "[specific anchor text]") |
| 91 | +**Type:** [New paragraph / Note block / Code example / Replacement] |
| 92 | + |
| 93 | +**Current content (lines 123-125):** |
| 94 | +```markdown |
| 95 | +[Current text that will be replaced or followed] |
| 96 | +``` |
| 97 | + |
| 98 | +**Proposed change:** |
| 99 | +```markdown |
| 100 | +[Proposed documentation text here] |
| 101 | +``` |
| 102 | + |
| 103 | +### Code Sample Updates (if applicable) |
| 104 | +**File:** [`sample.cs`](https://github.com/dotnet/AspNetCore.Docs/blob/main/path/to/sample.cs#L45-L67) |
| 105 | +**Lines:** 45-67 |
| 106 | +**Change:** [Add/Modify/Remove] |
| 107 | + |
| 108 | +**Current code:** |
| 109 | +```csharp |
| 110 | +// Current code at specified lines |
| 111 | +``` |
| 112 | + |
| 113 | +**Proposed code:** |
| 114 | +```csharp |
| 115 | +// Proposed code changes |
| 116 | +``` |
| 117 | + |
| 118 | +## 🎯 Action Plan |
| 119 | +1. **Edit file:** [`aspnetcore/path/to/file.md`](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/path/to/file.md) |
| 120 | + - Navigate to: [Line 123](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/path/to/file.md#L123) |
| 121 | + - Find section: "Exact Section Heading" |
| 122 | + - After text: "last sentence before insertion point" |
| 123 | + - Insert: [!NOTE] block with explanation |
| 124 | + |
| 125 | +2. **Update sample:** [`path/to/sample.cs`](https://github.com/dotnet/AspNetCore.Docs/blob/main/path/to/sample.cs) |
| 126 | + - Navigate to: [Lines 45-67](https://github.com/dotnet/AspNetCore.Docs/blob/main/path/to/sample.cs#L45-L67) |
| 127 | + - Modify method: `MethodName()` |
| 128 | + - Change: Update to use new pattern |
| 129 | + |
| 130 | +## ⚠️ Considerations |
| 131 | +- Verify change applies to .NET [version] |
| 132 | +- Check if similar updates needed in related articles |
| 133 | +- Consider adding cross-references to [related topic] |
| 134 | + |
| 135 | +## 🔗 References |
| 136 | +- Published article: [URL] |
| 137 | +- Related issue: #[number] |
| 138 | +- Microsoft Learn docs: [relevant MS docs link] |
| 139 | +``` |
| 140 | +
|
| 141 | +#### For Invalid Issues |
| 142 | +
|
| 143 | +```markdown |
| 144 | +# Issue Analysis: <Issue Title> |
| 145 | +
|
| 146 | +## ❌ Issue Validation |
| 147 | +**Status:** Not actionable as is |
| 148 | +**Reason:** [Out of scope / Insufficient information / Product issue / Already addressed] |
| 149 | +
|
| 150 | +## 📋 Explanation |
| 151 | +<Clear explanation of why the issue cannot be addressed as documentation> |
| 152 | +
|
| 153 | +## 💡 Recommendation |
| 154 | +- [Close with explanation] |
| 155 | +- [Redirect to appropriate repository] |
| 156 | +- [Request additional information] |
| 157 | +- [Convert to discussion] |
| 158 | +
|
| 159 | +## 🔗 Alternative Resources |
| 160 | +- [Link to relevant documentation] |
| 161 | +- [Link to appropriate repository for product issues] |
| 162 | +``` |
| 163 | + |
| 164 | +--- |
| 165 | + |
| 166 | +## Special Instructions |
| 167 | + |
| 168 | +### Line Number Guidelines |
| 169 | +- **Always inspect the actual source file** to determine accurate line numbers |
| 170 | +- **Provide line ranges** rather than single lines when changes affect multiple lines |
| 171 | +- **Use GitHub's line highlighting** format in URLs (#L123 for single, #L123-L145 for range) |
| 172 | +- **Quote the existing content** at those lines to confirm accuracy |
| 173 | +- **Consider context lines** - include a few lines before/after for clarity |
| 174 | +- **Update line numbers** if the file has changed since issue creation |
| 175 | + |
| 176 | +### Content Block Usage |
| 177 | +Only recommend using special blocks when truly appropriate, they should not be overused: |
| 178 | +- `[!IMPORTANT]`: Security issues, breaking changes, data loss risks |
| 179 | +- `[!WARNING]`: Common mistakes, deprecation notices |
| 180 | +- `[!NOTE]`: Helpful clarifications, version-specific info |
| 181 | +- `[!TIP]`: Best practices, productivity hints |
| 182 | + |
| 183 | +### Code Samples |
| 184 | +- Use appropriate language identifier for syntax highlighting |
| 185 | +- Include necessary `using` statements or imports |
| 186 | +- Add comments for complex logic |
| 187 | +- Ensure samples are complete and runnable |
| 188 | + |
| 189 | +### Scope Boundaries |
| 190 | +**DO:** |
| 191 | +- Focus on documentation clarity and accuracy |
| 192 | +- Address missing information |
| 193 | +- Fix technical inaccuracies |
| 194 | +- Improve code samples |
| 195 | + |
| 196 | +**DON'T:** |
| 197 | +- Attempt to fix product bugs through documentation |
| 198 | +- Make architectural recommendations |
| 199 | +- Add opinions or preferences |
| 200 | +- Modify unrelated sections |
| 201 | + |
| 202 | +## Issue labels |
| 203 | +- Upon completion of the report, set the `ai-reviewed-issue-reported-action-plan` label for the issue. |
| 204 | + |
| 205 | +### Common Issue Types |
| 206 | +1. **Missing information**: Add clarifying content |
| 207 | +2. **Outdated content**: Update to current version |
| 208 | +3. **Broken samples**: Fix or replace code |
| 209 | +4. **Unclear instructions**: Rewrite for clarity |
| 210 | +5. **Missing prerequisites**: Add setup steps |
| 211 | + |
| 212 | +--- |
| 213 | + |
| 214 | +## Quick Decision Tree |
| 215 | + |
| 216 | +``` |
| 217 | +Is this a documentation issue? |
| 218 | +├── NO → Redirect to product repo |
| 219 | +└── YES → Is the information accurate? |
| 220 | + ├── NO → Provide correction |
| 221 | + └── YES → Is it clear enough? |
| 222 | + ├── NO → Clarify/expand |
| 223 | + └── YES → Is it complete? |
| 224 | + ├── NO → Add missing info |
| 225 | + └── YES → Consider if enhancement improves value |
| 226 | +``` |
0 commit comments