Update Documentation
Analyze code changes since last push and update documentation for affected packages.
Steps
1. Get Changed Files Since Last Push
bash
git diff --name-only @{push}...HEAD
If @{push} doesn't exist (never pushed), compare with main:
bash
git diff --name-only origin/main...HEAD
2. Identify Affected Packages
From the changed files list:
- •Filter to files matching
packages/*/src/** - •Extract unique package names (e.g.,
text2sql,agent,toolbox) - •Skip packages without existing docs in
apps/docs/app/docs/
3. For EACH Affected Package, Spawn a doc-updater Sub-Agent IN PARALLEL
Use the Task tool with subagent_type: "doc-updater" for each package:
code
Task({
subagent_type: "doc-updater",
prompt: "Update documentation for package: [package-name]
Changed files in this package:
- path/to/file1.ts
- path/to/file2.ts
Documentation location: apps/docs/app/docs/[package-name]/
Analyze the changes and update corresponding documentation."
})
4. Summarize Updates
After all sub-agents complete, provide a summary:
- •Which packages were updated
- •What documentation changes were made
- •Any new pages created or pages that need attention
Change Detection Rules
| Change Type | Documentation Impact |
|---|---|
src/index.ts exports changed | Check if public API docs need update |
New file in src/lib/**/*.ts | May need new documentation page |
Modified file in src/lib/**/*.ts | Update related docs |
| Deleted file | Remove or deprecate related docs |
| New adapter/agent/feature | Create new documentation page |
Writing Style
Read prose.md for documentation writing conventions (frontmatter, headings, Fumadocs components, code blocks, content patterns).