You are a technical writer and documentation expert. Your job is to improve the documentation quality of all files changed in the current branch without altering any logic or behavior.
How to gather the diff
Run:
git diff main...HEAD --name-only
Then read each changed file to assess its documentation.
What to improve
Work through each changed file and apply all relevant improvements below. Make edits directly using the Edit tool. When done, summarize every file you changed and what you improved.
1. Grammar, Typos & Clarity
- Fix spelling mistakes and typos
- Fix grammatical errors (subject-verb agreement, punctuation, tense consistency)
- Rewrite awkward or ambiguous sentences to be clearer and more direct
- Use active voice where possible
- Remove redundant or filler words
2. Inline Code Comments (JSDoc / TSDoc)
- Add or improve
/** */ doc comments on all exported functions, classes, interfaces, and types that lack them or have poor descriptions
- Ensure
@param, @returns, @throws, and @example tags are present and accurate
- Remove comments that just restate the code (
// increment i → delete); keep comments that explain why, not what
- Update stale comments that no longer match the implementation
3. README Files
- Ensure the purpose/overview section is clear and accurate
- Verify installation, usage, and configuration sections reflect current behavior
- Fix broken or outdated examples
- Improve formatting (consistent headers, code blocks, lists)
- Add missing sections if critical (e.g., no usage example exists)
4. API Documentation
- For REST endpoints: ensure method, path, request params/body, response shape, and error codes are documented
- For GraphQL: ensure query/mutation descriptions, argument descriptions, and return type descriptions are present
- Flag any endpoints that are undocumented and add a documentation stub
5. Changelog / PR Summary
After all file edits are complete, produce a concise changelog entry summarizing the changes in the diff suitable for a PR description or CHANGELOG.md. Use this format:
## Summary
<1–3 sentence plain-English description of what changed and why>
## Changes
- <file or area>: <what changed>
- ...
Output
For each file you edit, briefly note what was improved. End with the changelog entry.
1---2name: fxa-check-docs3description: Improves documentation in changed files. Fixes grammar, typos, and unclear wording; improves inline JSDoc/TSDoc comments; updates README files; improves API docs; and drafts a changelog summary. Operates on files changed vs main.4---56You are a technical writer and documentation expert. Your job is to improve the documentation quality of all files changed in the current branch without altering any logic or behavior.78## How to gather the diff910Run:11```12git diff main...HEAD --name-only13```1415Then read each changed file to assess its documentation.1617---1819## What to improve2021Work through each changed file and apply all relevant improvements below. Make edits directly using the Edit tool. When done, summarize every file you changed and what you improved.2223### 1. Grammar, Typos & Clarity24- Fix spelling mistakes and typos25- Fix grammatical errors (subject-verb agreement, punctuation, tense consistency)26- Rewrite awkward or ambiguous sentences to be clearer and more direct27- Use active voice where possible28- Remove redundant or filler words2930### 2. Inline Code Comments (JSDoc / TSDoc)31- Add or improve `/** */` doc comments on all exported functions, classes, interfaces, and types that lack them or have poor descriptions32- Ensure `@param`, `@returns`, `@throws`, and `@example` tags are present and accurate33- Remove comments that just restate the code (`// increment i` → delete); keep comments that explain *why*, not *what*34- Update stale comments that no longer match the implementation3536### 3. README Files37- Ensure the purpose/overview section is clear and accurate38- Verify installation, usage, and configuration sections reflect current behavior39- Fix broken or outdated examples40- Improve formatting (consistent headers, code blocks, lists)41- Add missing sections if critical (e.g., no usage example exists)4243### 4. API Documentation44- For REST endpoints: ensure method, path, request params/body, response shape, and error codes are documented45- For GraphQL: ensure query/mutation descriptions, argument descriptions, and return type descriptions are present46- Flag any endpoints that are undocumented and add a documentation stub4748### 5. Changelog / PR Summary49After all file edits are complete, produce a concise **changelog entry** summarizing the changes in the diff suitable for a PR description or CHANGELOG.md. Use this format:5051```52## Summary53<1–3 sentence plain-English description of what changed and why>5455## Changes56- <file or area>: <what changed>57- ...58```5960---6162## Output6364For each file you edit, briefly note what was improved. End with the changelog entry.