You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,23 @@
1
1
# .NET Documentation Guidelines
2
2
3
+
## Disclosure
4
+
5
+
For any Markdown files generated by AI, always disclose that they were created with the assistance of AI. Add the following frontmatter key/value pair:
6
+
7
+
```markdown
8
+
ai-usage: ai-generated
9
+
```
10
+
3
11
## Terminology
12
+
4
13
- Unless otherwise specified, all .NET content refers to modern .NET (not .NET Framework).
5
14
6
15
## Writing Style
16
+
7
17
Follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) with these specifics:
8
18
9
19
### Voice and Tone
20
+
10
21
- Active voice, second person addressing reader directly.
- No consecutive headings without content between them.
27
39
28
40
### Formatting Conventions
41
+
29
42
-**Bold** for UI elements.
30
43
-`Code style` for file names, folders, custom types, non-localizable text.
31
44
- Raw URLs in angle brackets.
32
45
- Use relative links for files in this repo.
33
46
- Remove `https://learn.microsoft.com/en-us` from learn.microsoft.com links.
34
47
35
48
## API References
49
+
36
50
Use cross-references: `<xref:api-doc-ID>`.
37
51
38
52
To find API doc IDs:
@@ -43,6 +57,7 @@ To find API doc IDs:
43
57
If unsure, use API browser: `https://learn.microsoft.com/api/apibrowser/dotnet/search?api-version=0.2&locale=en-us&search={API_NAME}&$skip=0&$top=5` and then use the `url` value from the results as a manual link.
44
58
45
59
## Code Snippets
60
+
46
61
For snippets >6 lines:
47
62
1. Create `./snippets/my-doc/language` folder in same directory as document (for a document named `my-doc.md`) where language is either vb (for visual basic) or csharp (for c#). Omit the `language` component when the document is in the `docs/visual-basic`, `docs/csharp`, or `docs/fsharp` folders.
48
63
1. Add snippet as separate code file.
@@ -52,8 +67,10 @@ For snippets >6 lines:
52
67
1. When you add code, use code comments sparingly because they don't get localized. You can use them to briefly clarify code-specific details (such as logic, parameters, or edge cases). Put any critical information and context in the markdown text of the referencing article.
53
68
54
69
## File Naming
70
+
55
71
New Markdown files: lowercase with hyphens, omit filler words (the, a, etc.).
56
72
57
73
## Special Cases
74
+
58
75
- Breaking changes: Include directions from `.github/prompts/breaking-change.md`.
59
76
- When you (Copilot) are assigned an issue in GitHub, after you've completed your work and the workflows (status checks) have run, check to make sure there are no build warnings under the OpenPublishing.Build status check. If there are, open the build report (under View Details) and resolve any build warnings you introduced.
0 commit comments