Skip to content

Commit 9c10230

Browse files
authored
/author + /reviewAPIDocs edits (#28507)
- Handling long-running operations.
1 parent 5a2b0f4 commit 9c10230

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/prompts/author-api-docs/common.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,19 @@ Use the following format when reporting file processing results, so output is co
603603
⚠️ Blocked: [list with reasons, or "None"]
604604
```
605605

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:
609+
610+
```
611+
✅ Phase [N] Validation
612+
- [file1.md]: H1 ✓ | Namespace ✓ | Properties table ✓ | JSON representation ✓
613+
- [file2.md]: H1 ✓ | Namespace ✓ | Permissions ✓ | HTTP request ✓ | Examples ✓
614+
- [file3.md]: H1 ✓ | Namespace ✓ | Properties table ✗ (missing "newProperty") — FIXING
615+
```
616+
617+
Fix any failures before proceeding to the next phase. Do not defer fixes to end-of-session.
618+
606619
## State Tracking
607620

608621
Maintain a running progress tracker throughout the session. After each file or batch of files, update and display:
@@ -625,8 +638,9 @@ For Documentation Plans with many files (10+):
625638
1. **Group by type:** resources, API methods, enumerations, permissions, supporting files
626639
2. **Process in batches of 5 files** — complete all steps for each file before moving to the next
627640
3. **After each batch**, output a phase status summary (see [Structured Output Format](#structured-output-format))
628-
4. **Present the execution plan upfront** and proceed unless the author objects — avoid blocking confirmations for each batch when the Documentation Plan is clear
629-
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.
630644

631645
## Decision Trees for Ambiguous Cases
632646

@@ -702,6 +716,8 @@ Report any inconsistencies in the final summary to the author.
702716

703717
The following checks apply to every documentation scenario. Scenario-specific checklists add additional items on top of these.
704718

719+
> **IMPORTANT:** For each checklist item, re-read the actual file content to confirm — do not check items from memory.
720+
705721
**For all files (new and updated):**
706722
- [ ] All required sections are present and in correct order
707723
- [ ] Headings match the expected format

.github/prompts/review-api-docs.prompt.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ Group files by type:
297297

298298
For each file, apply the appropriate review checklist from above.
299299

300+
**For PRs with 15+ changed files:** Review in batches of 10 files. After each batch, output findings so far before continuing to the next batch. This keeps context focused and prevents quality degradation on later files.
301+
300302
### Step 4: Run Validation Scripts
301303

302304
Run automated validation scripts to ensure compliance (see [Common Process: Validation](#common-process-validation)):
@@ -318,6 +320,8 @@ Use these criteria consistently when categorizing findings:
318320

319321
### Step 6: Report Findings
320322

323+
> **IMPORTANT:** Before finalizing the report, re-read each reviewed file to confirm your findings. Do not report issues or approvals from memory alone.
324+
321325
Provide a structured review report:
322326

323327
**Summary:**

0 commit comments

Comments
 (0)