Generate or update documentation for changed and new files
Delegates to the documentation-specialist agent to generate or update documentation for files that have changed. Ensures that new APIs, components, and modules are properly documented.
/docs # Generate docs for all changed files
/docs path/to/file.ts # Generate docs for a specific file
/docs --update # Update existing docs only (no new files)
Identify changed files. Run git diff --name-only against the base
branch to find files that have been added or modified.
Classify documentation needs. For each changed file, determine what documentation is needed:
Delegate to the documentation-specialist agent. Use the Task tool to invoke the sub-agent with:
.agent-pipeline/ (implementation notes, etc.)Generate documentation. The documentation-specialist produces:
Report results. The documentation-specialist returns:
## Documentation Report
**Files Documented:** 5
**New Docs Created:** 2
**Docs Updated:** 3
### Changes
- src/api/users.ts -- Added JSDoc for 3 new functions
- src/components/UserCard.tsx -- Updated props documentation
- docs/api/users.md -- Created API reference for /users endpoints
Write pipeline artefact. Save to .agent-pipeline/docs.md if running
in a sequential pipeline.
The documentation-specialist follows these conventions:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer