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/prompts/author-api-docs/common.md
+31-22Lines changed: 31 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ If a conflict is significant, flag it to the author in the final summary but fol
31
31
Gather both values in a **single upfront step** to minimize round-trips with the author:
32
32
33
33
1.**Attempt auto-detection first:**
34
-
-`author`: Use the GitHub login of the signed-in user
34
+
-`author`: Use the `get_me` tool to get the GitHub Login of the signed-in user
35
35
-`ms.subservice`: Inspect existing API/resource files being updated and use their `ms.subservice` value (exclude enum files)
36
36
37
37
2.**If either value cannot be inferred**, ask the author for both at once:
@@ -45,17 +45,7 @@ Gather both values in a **single upfront step** to minimize round-trips with the
45
45
46
46
### temp-docstubs Folder
47
47
48
-
Before beginning any documentation process, instruct the author to add all required files to the `temp-docstubs` folder in this workspace:
49
-
50
-
**For Scenario 1 (Fresh APIs / beta changes):**
51
-
- Autogenerated doc stubs (*.md files)
52
-
- API.md file describing the capabilities being added/changed
53
-
- Autogenerated changelog file (changelog_*.json)
54
-
55
-
**For Scenario 2 (Promotion from beta to v1.0):**
56
-
- Documentation Plan documenting what is being promoted
57
-
-**Optional:** Autogenerated doc stubs (*.md files for v1.0)
58
-
- Autogenerated changelog file (changelog_*.json)
48
+
Before beginning any documentation process, instruct the author to add all required files to the `temp-docstubs` folder in this workspace. The specific files needed depend on the scenario — see the **Inputs** section of the relevant scenario file for details.
59
49
60
50
**Important notes about temp-docstubs:**
61
51
- This folder is temporary storage for input files needed during authoring
@@ -86,7 +76,7 @@ After authoring documentation, update the appropriate changelog file in the `cha
**Note:** Cloud is always "prd" - no need to ask the author.
172
+
**Note:** Cloud is "Prod" for new entries - no need to ask the author. Older changelogs may use "prd", which is also valid.
183
173
184
174
**Step 3: Generate GUID and timestamp**
185
175
@@ -259,7 +249,7 @@ After updating What's new, update the appropriate TOC mapping file to make new d
259
249
260
250
**For new files:** Include only HTTP request examples using `msgraph-interactive` (for URLs without an ID placeholder, e.g., `https://graph.microsoft.com/v1.0/users`) or `http` language identifier. No tabs or SDK includes.
261
251
262
-
**For existing files:** Follow the established pattern. If the file has no SDK snippets, add only HTTP examples. Do not introduce SDK snippets to files lacking them.
252
+
**For existing files:** Follow the established pattern. If the file has no SDK snippets, add only HTTP examples. Do not introduce SDK snippets to files or examples lacking them.
263
253
264
254
**Example HTTP-only format:**
265
255
@@ -399,11 +389,12 @@ Fully qualify any type (including enum types) that is defined in a subnamespace
399
389
- Remove beta disclaimer when promoting to v1.0
400
390
401
391
**National cloud include statement:**
402
-
- API method files in beta include an autogenerated national cloud support statement immediately before the `## Permissions` header. Example include statement for all clouds support:
392
+
- API method files in beta include an autogenerated national cloud support statement immediately before the `## Permissions` header. Example:
- Remove this include statement when promoting to v1.0
396
+
-**Do not add** this statement when authoring new API method files — it is added automatically by a downstream process
397
+
-**Delete** this statement from files copied from beta when promoting to v1.0
407
398
408
399
## Documentation Standards
409
400
@@ -416,6 +407,7 @@ Fully qualify any type (including enum types) that is defined in a subnamespace
416
407
**Permissions:**
417
408
- Must start with the standard boilerplate text
418
409
- Must include link to a permissions table
410
+
-**(Optional) RBAC include:** If the documentation plan or author specifies required Entra admin roles, add an RBAC include statement immediately after the permissions table include. See [RBAC for APIs include file templates](../../../templates/rbac-for-apis-include.md) for file conventions, naming, and content templates.
419
411
420
412
**HTTP request:**
421
413
- Use relative URLs (e.g., `/users` not `https://graph.microsoft.com/beta/users`)
@@ -611,6 +603,19 @@ Use the following format when reporting file processing results, so output is co
611
603
⚠️ Blocked: [list with reasons, or "None"]
612
604
```
613
605
606
+
**Mid-phase validation** (required at every ⏸ phase gate, before moving to the next phase):
607
+
608
+
Re-read each file completed in the current phase and verify it meets expectations for its file type. Output a validation checklist:
Fix any failures before proceeding to the next phase. Do not defer fixes to end-of-session.
618
+
614
619
## State Tracking
615
620
616
621
Maintain a running progress tracker throughout the session. After each file or batch of files, update and display:
@@ -633,8 +638,9 @@ For Documentation Plans with many files (10+):
633
638
1.**Group by type:** resources, API methods, enumerations, permissions, supporting files
634
639
2.**Process in batches of 5 files** — complete all steps for each file before moving to the next
635
640
3.**After each batch**, output a phase status summary (see [Structured Output Format](#structured-output-format))
636
-
4.**Present the execution plan upfront** and proceed unless the author objects — avoid blocking confirmations for each batch when the Documentation Plan is clear
637
-
5.**If the plan exceeds 20 files**, create a numbered task list at the start, group into batches, and checkpoint progress after each batch
641
+
4.**Verify each batch before proceeding:** Re-read every file in the completed batch and confirm it contains the expected sections (e.g., H1, namespace, Permissions, HTTP request, Examples for API files; H1, namespace, Properties table, JSON representation for resource files). Fix any issues before starting the next batch.
642
+
5.**Present the execution plan upfront** and proceed unless the author objects — avoid blocking confirmations for each batch when the Documentation Plan is clear
643
+
6.**If the plan exceeds 20 files**, after the first batch completes and is verified, **stop and ask the author to confirm quality** before continuing. This catches systematic errors early.
638
644
639
645
## Decision Trees for Ambiguous Cases
640
646
@@ -700,15 +706,18 @@ After processing all files in a documentation session, verify cross-file consist
700
706
2.**API file ↔ resource link:** Every API file's description should link back to its parent resource, and that resource file should exist
701
707
3.**Enum references ↔ definitions:** Every enum type referenced in Properties tables should be defined in the appropriate enums file, parent resource, or separate topic
702
708
4.**Permissions files:** Every permissions include reference in API files should have a corresponding file in the `includes/permissions/` folder
709
+
5.**RBAC files:** If any API file has an RBAC include reference, verify the corresponding file exists in `includes/rbac-for-apis/`
703
710
5.**JSON representation ↔ Properties table:** Properties listed in the JSON representation section should match the Properties table
704
-
6.**Polymorphic collections:** If a Documentation Plan flagged polymorphic types, verify: (a) no operation files were created using derived type names, (b) all shared operation files use the base type name, (c) base type resource page has the Methods table (including base-type-only operations for concrete bases), (d) derived type resource pages reference the base type for operations, (e) `@odata.type` guidance is included in POST/PATCH request body sections
711
+
6.**Polymorphic collections:** If a Documentation Plan flagged polymorphic types, verify: (a) no operation files were created using derived type names, (b) all shared operation files use the base type name, (c) base type resource page has the Methods table (including base-type-only operations for concrete bases), (d) derived type resource pages have a `## Methods` section with only a polymorphic note (no Methods table — the table lives only on the base type page), (e) `@odata.type` guidance is included in POST/PATCH request body sections
705
712
706
713
Report any inconsistencies in the final summary to the author.
707
714
708
715
## Base Quality Checklist
709
716
710
717
The following checks apply to every documentation scenario. Scenario-specific checklists add additional items on top of these.
711
718
719
+
> **IMPORTANT:** For each checklist item, re-read the actual file content to confirm — do not check items from memory.
720
+
712
721
**For all files (new and updated):**
713
722
-[ ] All required sections are present and in correct order
0 commit comments