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