Skip to content

Commit 59ce836

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 3a66251 + df0c27e commit 59ce836

File tree

3 files changed

+382
-96
lines changed

3 files changed

+382
-96
lines changed

.github/copilot-instructions.md

Lines changed: 158 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,183 @@
1-
When writing documentation, follow these guidelines:
2-
3-
## General style tips
4-
5-
* Get to the point fast. Be concise and clear.
6-
* Talk like a person.
7-
* Simpler is better.
8-
* Be brief. Give customers just enough information to make decisions confidently. Prune excess words.
9-
* Break up long sentences.
10-
* Follow the style of the [Microsoft Writing Style Guide](https://learn.microsoft.com/style-guide/welcome/). If there's a conflict between the following guidelines and the Microsoft Writing Style Guide, ask how to resolve it.
11-
12-
## Grammar
13-
14-
* Avoid "we"/"our" referring to documentation authors
15-
* Use present tense verbs (is, open) instead of past tense (was, opened). For example, "The method returns a value" instead of "The method will return a value."
16-
* Write factual statements and direct commands. Avoid hypotheticals.
17-
* Use active voice where the subject performs the action.
18-
* Write in second person (you) to speak directly to readers.
19-
* Use gender-neutral language.
20-
* Avoid multiple -ing words that could create ambiguity.
21-
* Keep prepositional phrases simple and clear.
22-
* Place modifiers close to what they modify.
23-
* Use a conversational tone with contractions.
24-
* Don't use "we" or "our" to refer to the authors of the documentation.
25-
* Use the imperative mood for instructions. For example, "Call the method" instead of "You should call the method."
26-
* Use "might" instead of "may" to indicate possibility. For example, "This method might throw an exception" instead of "This method may throw an exception."
27-
* Use the Oxford comma in lists of three or more items.
1+
# Copilot Instructions for `cpp-docs-pr`
2+
3+
## Introduction
4+
5+
This document contains general and repository-specific instructions for GitHub Copilot when assisting with the `cpp-docs-pr` repository.
6+
7+
## Priority Levels
8+
9+
This document uses the following markers to indicate instruction priority:
10+
11+
- **[REQUIRED]** - Must be followed. May cause build failures or PR blocks if violated
12+
- **[STYLE]** - Microsoft Writing Style Guide requirement for consistency
13+
- **[C++-SPECIFIC]** - C++ documentation convention that overrides general guidance
14+
- No marker - Best practice recommendation; use judgment based on context
15+
16+
## General Guidelines
17+
18+
### 1. Issue Handling
19+
When creating a PR for an issue:
20+
- [ ] Read the full issue and all linked references
21+
- [ ] **new-feature:** State which version introduced the feature
22+
- [ ] **bug:** Focus on correcting technical inaccuracies
23+
- [ ] When you're assigned an issue, after you've completed your work and the workflows (status checks) have run, ensure 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.
24+
- [ ] When starting work on an issue, document your understanding in a comment: state the issue's purpose, expected outcome, and your implementation approach.
25+
26+
### 2. Issue Discussion Analysis
27+
When working on an issue:
28+
- [ ] **Read the complete issue discussion** - Don't rely solely on the initial issue description
29+
- [ ] **Prioritize maintainer guidance** - Comments from repository maintainers (especially those with "MEMBER" association) should take precedence over the original issue description
30+
- [ ] **Look for updated analysis** - Later comments may contain revised understanding, additional context, or modified resolution approaches
31+
- [ ] **Check for explicit instructions** - Look for phrases like "Action required by GitHub Copilot" or direct "@copilot" mentions that provide specific guidance
32+
- [ ] **Validate your understanding** - If the discussion seems to contradict the initial issue description, follow the most recent maintainer guidance
33+
34+
### 3. File Naming and Organization
35+
**Naming conventions:**
36+
- [ ] Name new Markdown files in all lowercase with hyphens separating words
37+
- [ ] Omit filler words like "the" or "a" from file names
38+
39+
**Folder structure:**
40+
- [ ] Linux topics → `docs/linux/`
41+
- [ ] C++ STL → `docs/standard-library/`
42+
- [ ] C runtime → `docs/c-runtime-library/`
43+
- [ ] C++ language → `docs/cpp/`
44+
- [ ] Visual Studio IDE features → `docs/ide/`
45+
- [ ] Build process/modules → `docs/build/reference/`
46+
- [ ] Build Insights → `docs/build-insights/`
47+
48+
### 4. Links and References
49+
- [ ] Add links to related topics and resources where appropriate.
50+
- [ ] Use relative links for files in this repo
51+
- [ ] **[REQUIRED]** Links to other documentation articles should be relative, not absolute. Start relative links with `/docs/` and include the `.md` suffix. If you add a link to another page on learn.microsoft.com that's not in this repo, remove https://learn.microsoft.com/en-us from the link.
52+
- [ ] **[REQUIRED]** Links to bookmarks within the same article should be relative and start with `#`.
53+
- [ ] **[REQUIRED]** Link descriptions should be descriptive and make sense on their own. Don't use "click here" or "this link" or "here".
54+
- [ ] **[STYLE]** When you are going to refer to another file or an article on the web, use this format: "For more information, see [descriptive name of link](link path)." The exception to this is the See Also links at the end of an article. Those should be markdown links and contain the title of the article you link to as the descriptive portion of the link.
55+
- [ ] For external links to non-Microsoft sites:
56+
- [ ] **[REQUIRED]** Use absolute URLs
57+
- [ ] **[REQUIRED]** Remove any language or culture segment from the URL path (such as `/en-us/`, `/fr-fr/`, `/en/`, etc.)
58+
- [ ] Example (MDN):
59+
- [ ] Original: `https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event`
60+
- [ ] Correct: `https://developer.mozilla.org/docs/Web/API/Element/click_event`
61+
62+
- [ ] For links to Microsoft Learn content in other repositories:
63+
- [ ] **[REQUIRED]** Use the relative URL starting with a forward slash
64+
- [ ] Don't include the scheme and the host (example: `https://learn.microsoft.com`) and don't include the locale (example: `en-us`)
65+
- [ ] Example: For the target Learn website URL `https://learn.microsoft.com/en-us/dotnet/core/introduction`, use the relative URL `/dotnet/core/introduction` for the link destination
66+
67+
## Repository-Specific Guidelines
68+
- [ ] **[REQUIRED]** Follow the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/)
69+
- [ ] Use contractions following the guidance in [Use contractions](https://learn.microsoft.com/en-us/style-guide/word-choice/use-contractions)
70+
- [ ] **Repository Exceptions**:
71+
- [ ] **[REQUIRED]** Use **bold** text for UI elements like menu items, dialog names, and names of text boxes.
72+
- [ ] **[REQUIRED]** Number ordered lists as "1." for every item (don't use sequential numbers)
73+
- [ ] **[REQUIRED]** Use backticks around content specifically for file names (`file.txt`), folders (`folder`), file paths (`folder/file.txt`), custom types (`myVariable`, `MyClass`), raw URLs in the text (`https://www.contoso.com`), file extensions (`.cpp`), and code like method names, property names, and language keywords. Also use for text that should never be localized.
74+
- [ ] **[REQUIRED]** Use `code style` for resource names (like virtual machine names) that shouldn't be localized.
75+
- [ ] **[C++-SPECIFIC]** Use `code style` for command-line commands. The style in some articles uses **bold** for command-line commands, but use `code style` instead.
76+
- [ ] **[STYLE]** Use placeholders with braces in the format `{PLACEHOLDER NAME}` when used code examples and other contexts where placeholders are used. Use uppercase letters with spaces between words for the placeholder name inside the braces.
77+
- [ ] Wrong: "Launch the app and navigate to `https://localhost:<port>/openapi/v1.json` to view the generated OpenAPI document."
78+
- [ ] Correct: "Launch the app and navigate to `https://localhost:{PORT}/openapi/v1.json` to view the generated OpenAPI document, where the `{PORT}` placeholder is the port."
79+
- [ ] For any new or updated .md file added to the repository, ensure the following frontmatter (metadata) is included as specified in [Metadata for Microsoft Learn documentation.](https://learn.microsoft.com/en-us/contribute/content/metadata):
80+
- [ ] **[REQUIRED]** Metadata `ai-usage: ai-assisted` if any AI assistance was used.
81+
- [ ] **[REQUIRED]** When updating a topic that has the ms.assetid: metadata, remove the entire ms.assetid line.
82+
- [ ] **[REQUIRED]** Place the title metadata first, followed by the remaining metadata lines as shown in the following example:
83+
**Example:**
84+
```yaml
85+
---
86+
title: "Understanding C++ modules"
87+
description: "Learn how to use C++ modules in Visual Studio"
88+
author: github-username
89+
ms.author: ms-alias
90+
ms.date: 12/11/2025
91+
ms.topic: conceptual
92+
ai-usage: ai-assisted
93+
---
94+
```
95+
96+
### 5. Content Writing Guidelines
97+
- [ ] **[STYLE]** Get to the point fast. Be concise and clear.
98+
- [ ] **[STYLE]** Talk like a person.
99+
- [ ] **[STYLE]** Simpler is better.
100+
- [ ] **[STYLE]** Be brief. Give customers just enough information to make decisions confidently. Prune excess words.
101+
- [ ] **[STYLE]** Break up long sentences.
102+
- [ ] **[STYLE]** Use present tense verbs (is, open) instead of past tense (was, opened). For example, "The method returns a value" instead of "The method will return a value."
103+
- [ ] **[STYLE]** Write factual statements and direct commands. Avoid hypotheticals.
104+
- [ ] **[STYLE]** Use active voice where the subject performs the action.
105+
- [ ] **[STYLE]** Write in second person (you) to speak directly to readers.
106+
- [ ] **[STYLE]** Use gender-neutral language.
107+
- [ ] **[STYLE]** Avoid multiple -ing words that could create ambiguity.
108+
- [ ] **[STYLE]** Keep prepositional phrases simple and clear.
109+
- [ ] **[STYLE]** Place modifiers close to what they modify.
110+
- [ ] **[STYLE]** Use a conversational tone with contractions.
111+
- [ ] **[STYLE]** Don't use "we" or "our" to refer to the authors of the documentation.
112+
- [ ] **[STYLE]** Use the imperative mood for instructions. For example, "Call the method" instead of "You should call the method."
113+
- [ ] **[STYLE]** Use "might" instead of "may" to indicate possibility. For example, "This method might throw an exception" instead of "This method may throw an exception."
114+
- [ ] **[STYLE]** Use the Oxford comma in lists of three or more items.
115+
- [ ] Introductory paragraph:
116+
- [ ] When drafting the first paragraph of any new article, or when significantly updating an existing article:
117+
- [ ] Explain why and when the topic matters in practical C++ development scenarios.
118+
- [ ] Give a concise summary of what the article covers or enables, so readers know what to expect.
119+
- [ ] When significantly updating, revise the introductory paragraph to match the new scope and content.
120+
121+
### 6. PR Description Requirements
122+
- [ ] ALWAYS include "Fixes #[issue-number]" in the PR description, at the first line of the description to link back to the original issue
123+
- [ ] Include a clear summary of changes made
124+
- [ ] List all files that were modified with brief descriptions
28125

29126
## Capitalization
30127

31-
* Use sentence-style capitalization for everything except proper nouns.
32-
* Always capitalize proper nouns.
33-
* Don’t capitalize the spelled-out form of an acronym unless it's a proper noun.
34-
* Use title-style capitalization for product and service names.
35-
* Don't use all uppercase for emphasis.
128+
- [ ] Use sentence-style capitalization for everything except proper nouns.
129+
- [ ] Always capitalize proper nouns.
130+
- [ ] Don’t capitalize the spelled-out form of an acronym unless it's a proper noun.
131+
- [ ] Use title-style capitalization for product and service names.
132+
- [ ] Don't use all uppercase for emphasis.
36133

37134
## Numbers
38135

39-
* Spell out numbers for zero through nine, unless space is limited. Use numerals for 10 and above.
40-
* Spell out numbers at the beginning of a sentence.
41-
* Spell out ordinal numbers such as first, second, and third. Don't add -ly to form adverbs from ordinal numbers.
42-
* Number ordered list items all as "1." instead of "1.", "2.", etc. Use bullets for unordered lists.
136+
The following does NOT apply to step numbers but applies to all other numbers:
137+
- [ ] Spell out numbers for zero through nine, unless space is limited. Use numerals for 10 and above.
138+
- [ ] Spell out numbers at the beginning of a sentence.
139+
- [ ] Spell out ordinal numbers such as first, second, and third. Don't add -ly to form adverbs from ordinal numbers.
140+
- [ ] Number ordered list items all as 1. instead of sequentially as 1., 2., etc. Use bullets for unordered lists.
43141

44142
## Punctuation
45143

46-
* Use short, simple sentences.
47-
* End all sentences with a period.
48-
* Use one space after punctuation marks.
49-
* After a colon, capitalize only proper nouns.
50-
* Avoid semicolons - use separate sentences instead.
51-
* Use question marks sparingly.
52-
* Don't use slashes (/) - use "or" instead.
53-
54-
## Text formatting
55-
56-
* UI elements, like menu items, dialog names, and names of text boxes, should be in **bold** text.
57-
* Use `code style` for:
58-
* Code elements, like method names, property names, and language keywords.
59-
* SQL commands.
60-
* NuGet package names.
61-
* Command-line commands. The style in some articles uses **bold** for command-line commands, but use `code style` instead.
62-
* Database table and column names.
63-
* Resource names (like virtual machine names) that shouldn't be localized.
64-
* URLs that you don't want to be selectable.
65-
* File names and folders, custom types, and other text that should never be localized.
66-
* For code placeholders, if you want users to replace part of an input string with their own values, use angle brackets (less than < and greater than > characters) on that placeholder text.
144+
- [ ] Use short, simple sentences.
145+
- [ ] End all sentences with a period.
146+
- [ ] Use one space after punctuation marks.
147+
- [ ] After a colon, capitalize only proper nouns.
148+
- [ ] Avoid semicolons - use separate sentences instead.
149+
- [ ] Use question marks sparingly.
150+
- [ ] Don't use slashes (/) - use "or" instead.
67151

68152
## Headings
69153

70-
* Headings should be in sentence case, not title case. Don't use gerunds in titles.
71-
* Don't apply an inline style like italic, or bold to headings. But do use inline code style for headings that are code elements, like method names or property names.
154+
- [ ] Headings should be in sentence case, not title case. Don't use gerunds in titles.
155+
- [ ] Don't apply an inline style like italic, or bold to headings. But do use inline code style for headings that are code elements, like method names or property names.
72156

73157
## Alerts
74158

75-
* Alerts are a Markdown extension to create block quotes that render with colors and icons that indicate the significance of the content. The following alert types are supported:
159+
- [ ] Alerts are a Markdown extension to create block quotes that render with colors and icons that indicate the significance of the content. The following alert types are supported:
76160

77-
* `[!NOTE]` Information the user should notice even if skimming.
78-
* `[!TIP]` Optional information to help a user be more successful.
79-
* `[!IMPORTANT]` Essential information required for user success.
80-
* `[!CAUTION]` Negative potential consequences of an action.
81-
* `[!WARNING]` Dangerous certain consequences of an action.
82-
83-
## Adding links
84-
85-
* Add links to related topics and resources where appropriate.
86-
* Use relative links for files in this repo
87-
* Links to other documentation articles should be relative, not absolute. Start relative links with `/docs/` and include the `.md` suffix. If you add a link to another page on learn.microsoft.com that's not in this repo, remove https://learn.microsoft.com/en-us from the link.
88-
* Links to bookmarks within the same article should be relative and start with `#`.
89-
* Link descriptions should be descriptive and make sense on their own. Don't use "click here" or "this link" or "here".
90-
* When you are going to refer to another file or an article on the web, use this format: "For more information, see [descriptive name of link](link path)." The exception to this is the See Also links at the end of an article. Those should be markdown links and contain the title of the article you link to as the descriptive portion of the link.
91-
92-
## Adding new files
93-
94-
* If you add a new Markdown file, it should be named in all lowercase with hyphens separating words. Also, omit any filler words such as "the" or "a" from the file name.
95-
* If you're adding a new Markdown file, the following indicates where it should go the folder structure. If you aren't sure, ask.
96-
If the new file is about Linux, put it in the docs/linux folder.
97-
If the new file is about the C++ Standard Template Library (STL), put it in the docs/standard-library folder.
98-
If the new file is about the C runtime, put it in the docs/c-runtime-library folder.
99-
If the new file is about the C++ language, put it in the docs/cpp folder.
100-
If the new file is about a C++ feature specific to the Visual Studio IDE, put it in the docs/ide folder.
101-
If the new file is about the build process or modules, put it in the docs/build\reference folder.
102-
If the new file is about Build Insights, put it in the docs/build-insights folder.
161+
- [ ] `[!NOTE]` Information the user should notice even if skimming.
162+
- [ ] `[!TIP]` Optional information to help a user be more successful.
163+
- [ ] `[!IMPORTANT]` Essential information required for user success.
164+
- [ ] `[!CAUTION]` Negative potential consequences of an action.
165+
- [ ] `[!WARNING]` Dangerous certain consequences of an action.
103166

104167
## Images
105168

106-
* Use images only when they add value.
107-
* Images have a descriptive and meaningful alt text that starts with "Screenshot showing" and ends with ".".
108-
* Videos have a descriptive and meaningful alt text or title that starts with "Video showing" and ends with ".".
169+
- [ ] Use images only when they add value.
170+
- [ ] Images have a descriptive and meaningful alt text that starts with "Screenshot showing" and ends with ".".
171+
- [ ] Videos have a descriptive and meaningful alt text or title that starts with "Video showing" and ends with ".".
109172

110173
## Numbered steps
111174

112-
* Write complete sentences with capitalization and periods
113-
* Use imperative verbs
114-
* Clearly indicate where actions take place (UI location)
115-
* For single steps, use a bullet instead of a number
116-
* When allowed, use angle brackets for menu sequences (File > Open)
175+
- [ ] Write complete sentences with capitalization and periods
176+
- [ ] Use imperative verbs
177+
- [ ] Clearly indicate where actions take place (UI location)
178+
- [ ] For single steps, use a bullet instead of a number
179+
- [ ] When allowed, use angle brackets for menu sequences (File > Open)
117180

118181
## Terminology
119182

120-
* Use "Select" instead of "Click" for UI elements like buttons, menu items, links, dropdowns, and checkboxes.
183+
- [ ] Use "Select" instead of "Click" for UI elements like buttons, menu items, links, dropdowns, and checkboxes.

0 commit comments

Comments
 (0)