|
1 |
| -When you're assigned an issue that's labeled "breaking-change", or when you're given a link to an issue with this prompt file as context and asked to create a new breaking change document, follow these guidelines: |
| 1 | +# Copilot-Optimized Instructions: Breaking Change Documentation |
2 | 2 |
|
3 |
| -The document should be in Markdown format. |
| 3 | +## When to use this prompt |
4 | 4 |
|
5 |
| -Ignore all breaking change documentation under https://github.com/dotnet/docs/tree/main/docs/framework/migration-guide - that's for legacy .NET Framework breaking changes. Modern .NET breaking changes live in the https://github.com/dotnet/docs/tree/main/docs/core/compatibility folder and its subfolders. |
| 5 | +- If assigned an issue labeled `breaking-change` |
| 6 | +- If given a link to an issue referencing this prompt and asked to create a breaking change document |
6 | 7 |
|
7 |
| -Rephrase all content to be clear and concise, if necessary. |
| 8 | +## General rules |
8 | 9 |
|
9 |
| -Describe previous behavior in past tense and new behavior in present tense. |
| 10 | +- **Format:** Use Markdown |
| 11 | +- **Scope:** |
| 12 | + - Ignore docs under [`docs/framework/migration-guide`](https://github.com/dotnet/docs/tree/main/docs/framework/migration-guide) (for legacy .NET Framework) |
| 13 | + - Document ONLY modern .NET breaking changes |
| 14 | +- **Writing style:** |
| 15 | + - Make content clear and concise |
| 16 | + - Previous behavior: **past tense** |
| 17 | + - New behavior: **present tense** |
10 | 18 |
|
11 |
| -The document should start with the following header, including --- characters. Placeholder text is shown in angle brackets. |
| 19 | +## Document structure |
12 | 20 |
|
13 |
| - --- |
14 |
| - title: "Breaking change - <A concise descriptive title of the breaking change>" |
15 |
| - description: "Learn about the breaking change in <product/version without the preview number> where <very brief description>." |
16 |
| - ms.date: <Today's date> |
17 |
| - ai-usage: ai-assisted |
18 |
| - ms.custom: <URL of the issue> |
19 |
| - --- |
| 21 | +Start with this header (replace placeholders): |
20 | 22 |
|
21 |
| -After the header, include the following sections in this order. Use the description in parentheses as a guide for the content of each section. |
| 23 | +``` |
| 24 | +--- |
| 25 | +title: "Breaking change - <Concise descriptive title>" |
| 26 | +description: "Learn about the breaking change in <product/version without preview> where <brief description>." |
| 27 | +ms.date: <Today's date in MM/DD/YYYY format> |
| 28 | +ai-usage: ai-assisted |
| 29 | +ms.custom: <URL of the issue> |
| 30 | +--- |
| 31 | +``` |
| 32 | +> **Note:** Use today's date in the format MM/DD/YYYY. This date cannot be earlier than 9/29/2025. |
22 | 33 |
|
23 |
| -h1: "(The same title used in the document header, sans 'Breaking Change - ')" |
| 34 | +Then include these sections in this order: |
24 | 35 |
|
25 |
| - (An introductory paragraph summarizing the breaking change. Include the major version but not the preview number.) |
| 36 | +### 1. H1 Title |
26 | 37 |
|
27 |
| -h2: Version introduced |
| 38 | +- Use the header title, **removing "Breaking change - "**. |
28 | 39 |
|
29 |
| - (The version in which the breaking change was introduced. Include the preview number here, if given.) |
| 40 | +**Intro paragraph:** |
| 41 | +Summarize the breaking change. Include the major version (omit preview number). |
30 | 42 |
|
31 |
| -h2: Previous behavior |
| 43 | +### 2. Version introduced |
32 | 44 |
|
33 |
| - (A brief description of the behavior before the change, including an example code snippet if applicable.) |
| 45 | +- Version where change was introduced (include preview number if applicable). |
34 | 46 |
|
35 |
| -h2: New behavior |
| 47 | +### 3. Previous behavior |
36 | 48 |
|
37 |
| - (A brief description of the behavior after the change, including an example code snippet if applicable.) |
| 49 | +- Briefly describe past behavior. |
| 50 | +- Include example code snippets if relevant. |
38 | 51 |
|
39 |
| -h2: Type of breaking change |
| 52 | +### 4. New behavior |
40 | 53 |
|
41 |
| - If the type of breaking change is "behavioral change", add the following sentence (without the backticks): `This is a [behavioral change](../../categories.md#behavioral-change).` |
| 54 | +- Briefly describe new behavior. |
| 55 | +- Include example code snippets if relevant. |
42 | 56 |
|
43 |
| - If the type of breaking change is "source incompatible" or "binary incompatible", add the following sentence (without the backticks): `This change can affect [source compatibility](../../categories.md#source-compatibility).` or `This change can affect [binary compatibility](../../categories.md#binary-compatibility).` |
| 57 | +### 5. Type of breaking change |
44 | 58 |
|
45 |
| - If the issue lists multiple types of breaking changes, create a single sentence that links to each applicable type, such as "This is both a []() and []() change.". If there is no type of breaking change selected in the issue, write "TODO: Add type of breaking change." |
| 59 | +- If **behavioral change**: |
| 60 | + `This is a [behavioral change](../../categories.md#behavioral-change).` |
| 61 | +- If **source or binary incompatible**: |
| 62 | + `This change can affect [source compatibility](../../categories.md#source-incompatible) and/or [binary compatibility](../../categories.md#binary-incompatible).` |
| 63 | +- If multiple types: |
| 64 | + Link to each type in a single sentence. |
| 65 | +- If none specified: |
| 66 | + State "No specific type listed." |
46 | 67 |
|
47 |
| -h2: Reason for change |
| 68 | +### 6. Reason for change |
48 | 69 |
|
49 |
| - (The complete reasoning behind the change, including any relevant links.) |
| 70 | +- Explain why the change was made. |
| 71 | +- Include relevant links. |
50 | 72 |
|
51 |
| -h2: Recommended action |
| 73 | +### 7. Recommended action |
52 | 74 |
|
53 |
| - (A brief description of the action or actions that users should take, including example code snippets if applicable.) |
| 75 | +- Describe what users should do to adapt. |
| 76 | +- Include code examples if helpful. |
54 | 77 |
|
55 |
| -h2: Affected APIs |
| 78 | +### 8. Affected APIs |
56 | 79 |
|
57 |
| - (A bullet list of APIs that are affected by the change. If there are no affected APIs (or "No response") write "None.". Use xref-style links as described in the copilot-instructions.md file. At the end of each doc ID, add "?displayProperty=fullName", for example "<xref:System.String?displayProperty=fullName>".) |
| 80 | +- Bullet list of affected APIs. |
| 81 | +- Use **xref-style links** as described in `copilot-instructions.md`. |
| 82 | +- If none: Write "None." |
58 | 83 |
|
59 |
| -Then, add the new document to the TOC file located at https://github.com/dotnet/docs/blob/main/docs/core/compatibility/toc.yml. Also add an entry to the index file under the appropriate area H2 heading in the https://github.com/dotnet/docs/blob/main/docs/core/compatibility/10.0.md file by adding a row to the table (create a new heading/table if it doesn't exist yet). |
| 84 | +## Final steps |
60 | 85 |
|
61 |
| -Next, create a pull request. In the description, include the text "Fixes #\<issue-number>", where "issue-number" is the GitHub issue number. |
| 86 | +- **Add the new doc to the [TOC file](https://github.com/dotnet/docs/blob/main/docs/core/compatibility/toc.yml).** |
| 87 | +- **Add an entry to the index file under the appropriate area H2 heading.** |
| 88 | +- **Create a pull request.** |
| 89 | + - In the description, include: `Fixes #<issue-number>` (replace with the correct number). |
| 90 | + - Request review on the pull request from the person who opened the issue. |
| 91 | +- Also check the relevant API docs, if applicable, and update them in the https://github.com/dotnet/dotnet-api-docs repo to reflect the breaking change. |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +**Copilot optimization notes:** |
| 96 | +- All steps and formatting are condensed and clarified for rapid, accurate document drafting. |
| 97 | +- Section ordering and linking instructions are explicit for automation. |
| 98 | +- Xref/linking and PR closing instructions are surfaced for easy action. |
0 commit comments