Skip to content

Commit 0798d69

Browse files
Copilottedhudek
andcommitted
Enhance copilot-instructions.md with additional details and examples
Co-authored-by: tedhudek <14337110+tedhudek@users.noreply.github.com>
1 parent 9899999 commit 0798d69

1 file changed

Lines changed: 54 additions & 2 deletions

File tree

copilot-instructions.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,24 @@ ai-usage: {ai-assisted|ai-generated}
103103

104104
This metadata automatically adds a customer-facing AI disclosure to the published content.
105105

106+
### Common Metadata Patterns
107+
108+
#### API Types by Prefix:
109+
- **Enumerations (ne)**: `req.construct-type: enumeration`
110+
- **Callbacks (nc)**: `req.construct-type: function`
111+
- **IOCTLs (ni)**: `api_type: HeaderDef`
112+
- **Structures (ns)**: `req.construct-type: structure`
113+
- **Classes (nl)**: `api_type: HeaderDef` or `LibDef`
114+
- **Interfaces (nn)**: `api_type: HeaderDef`
115+
- **Functions (nf)**: `api_type: DllExport` or `HeaderDef`
116+
117+
#### Technology Roots (tech.root):
118+
Common values include: `netvista`, `ifsk`, `kernel`, `audio`, `display`, `image`, `battery`, etc.
119+
120+
#### Version Requirements:
121+
- Use specific Windows versions: `Windows 11`, `Windows 10, version 1903`, etc.
122+
- Server versions: `Windows Server 2022`, `Windows Server 2019`, etc.
123+
106124
### Content Sections
107125

108126
#### Standard Sections (in order):
@@ -114,13 +132,21 @@ This metadata automatically adds a customer-facing AI disclosure to the publishe
114132
6. `## -remarks` - Additional usage notes, examples, and important information
115133
7. `## -see-also` - Related API references
116134

135+
#### Special Section Types:
136+
- `## -ioctlparameters` - For IOCTL documentation (ni- files)
137+
- `## -syntax` - Function/method syntax (automatically generated, do not edit)
138+
- `## -inheritance` - For interface/class inheritance (nn-/nl- files)
139+
117140
#### Parameter/Field Format:
118141
```markdown
119142
### -param ParameterName
120143
Brief description of the parameter.
121144

122145
### -field FieldName
123146
Brief description of the field.
147+
148+
### -field EnumValue:ValueNumber
149+
Brief description of the enumeration value.
124150
```
125151

126152
## Link Formatting Guidelines
@@ -166,6 +192,30 @@ External links (non-learn.microsoft.com) should use full URLs:
166192
- Include practical usage examples in -remarks when helpful
167193
- Cross-reference related APIs in -see-also sections
168194
- Verify technical accuracy of all information
195+
- Follow Microsoft Writing Style Guide for technical documentation
196+
- Use consistent terminology with existing documentation
197+
198+
### Code Examples
199+
When including code examples:
200+
- Use proper C/C++ syntax highlighting
201+
- Include necessary header files
202+
- Provide context for when/why the code would be used
203+
- Keep examples concise but complete
204+
205+
```cpp
206+
// Example code block
207+
#include <wificx.h>
208+
209+
NTSTATUS
210+
EvtWifiDeviceCreateAdapter(
211+
_In_ WDFDEVICE Device,
212+
_Inout_ WIFI_ADAPTER_INIT* AdapterInit
213+
)
214+
{
215+
// Implementation here
216+
return STATUS_SUCCESS;
217+
}
218+
```
169219
170220
### Common Patterns
171221
- Functions: Focus on purpose, parameters, return values, and usage patterns
@@ -184,14 +234,16 @@ The repository uses DocFX for building documentation. Key configuration is in `d
184234
- Validate that required metadata is present
185235
186236
### Content Review Checklist
187-
- [ ] Correct filename prefix used
237+
- [ ] Correct filename prefix used (ne/nc/ni/ns/nl/nn)
188238
- [ ] YAML frontmatter complete and valid
189239
- [ ] AI usage metadata included if AI was used
190240
- [ ] Site-relative links used for learn.microsoft.com content
191-
- [ ] All required sections present
241+
- [ ] All required sections present (-description, -parameters/-struct-fields/-enum-fields as appropriate, -remarks, -see-also)
192242
- [ ] Technical accuracy verified
193243
- [ ] Cross-references added to related APIs
194244
- [ ] Examples provided where helpful
245+
- [ ] Consistent with Microsoft Writing Style Guide
246+
- [ ] All parameters/fields documented completely
195247
196248
## Categories and Technology Areas
197249

0 commit comments

Comments
 (0)