원클릭으로
update-docs
// Update documentation pages to match source code changes on the current branch
// Update documentation pages to match source code changes on the current branch
| name | update-docs |
| description | Update documentation pages to match source code changes on the current branch |
Update documentation pages to reflect source code changes on the current branch. Analyzes the diff against main, maps changed source files to their corresponding doc pages, and makes targeted edits.
/update-docs [DOCS_PATH]
DOCS_PATH (optional): Path to the docs repository root. If not provided, ask the user.Examples:
/update-docs /Users/me/src/docs/update-docsIf DOCS_PATH was provided as an argument, use it. Otherwise, ask the user for the path to their docs repository.
Verify the path exists and contains subagents/ and api-reference/pipecat-subagents/ subdirectories.
Get the current pipecat-subagents branch name:
git rev-parse --abbrev-ref HEAD
In the docs repo, create a new branch off main with a matching name:
cd DOCS_PATH && git checkout main && git pull && git checkout -b {branch-name}-docs
For example, if the pipecat-subagents branch is feat/new-feature, the docs branch becomes feat/new-feature-docs.
All doc edits in subsequent steps are made on this branch.
Run:
git diff main..HEAD --name-only
Filter to files that could affect documentation:
src/pipecat_subagents/agents/**/*.py (agent implementations)src/pipecat_subagents/bus/**/*.py (bus, bridge, messages, serializers)src/pipecat_subagents/runner/**/*.py (agent runner)src/pipecat_subagents/registry/**/*.py (agent registry)src/pipecat_subagents/types.py (shared types)Ignore __init__.py, __pycache__, test files, clowder/**, and bus/queue.py.
For each changed source file, find the corresponding doc page. Read the mapping file at .claude/skills/update-docs/SOURCE_DOC_MAPPING.md and look up the file in the direct mapping table. If not found, use the search fallback.
For each mapped pair:
git diff main..HEAD -- <source_file>Identify what changed by comparing source to docs:
__init__ signature to the Configuration section's <ParamField> entries@property definitions to the Properties sectionFor each doc page that needs updates, edit only the sections that need changes. Preserve all other content exactly as-is.
<ParamField> tags, use them; if it uses tables, use tablesConfiguration (constructor params):
<ParamField path="name" type="type" default="value"> format if the page already uses itProperties:
### prop_name heading + code block showing agent.prop -> Type + description paragraph@property definitions in the source fileMethods:
### method_name heading + code block with full method signature + description + parameter table (| Parameter | Type | Default | Description |)_)Bus messages (messages.mdx):
bus/messages.pyTypes (types.mdx):
types.py, task_context.py, and registry/registry.pyDecorators (decorators.mdx):
<ParamField> entries for decorator parameters + usage examplesagents/llm/tool_decorator.py, task_decorator.py, watch_decorator.pyUsage (code examples):
Notes:
Overview / Key Features / Prerequisites:
Guides reference specific class names, parameters, imports, and code patterns. After completing reference doc edits, check if any guides need updates too.
For each changed source file, collect the class names, renamed parameters, and changed imports from the diff. Search the guide directories:
grep -rl "ClassName\|old_param_name" DOCS_PATH/subagents/
For each guide that references changed code:
Guide directories:
subagents/learn/ -- learning guides (agents, handoff, tasks, flows, distributed, proxy, etc.)subagents/fundamentals/ -- fundamentals pages (agent bus, registry, bus bridge)subagents/examples/ -- example overviewAfter processing all mapped pairs, check for gaps:
Missing pages: Source files that had no doc page mapping and are not on the skip list. For each, report:
Missing sections: Mapped doc pages that are missing standard sections compared to the source. Flag these for manual doc creation.
Do NOT auto-create new doc pages. Subagents doc pages have varied structures (e.g., base-agent.mdx has 8+ sections, decorators.mdx has 3 independent sections). Auto-generated pages would be inconsistent. Flag gaps and let a human create new pages.
Do NOT modify docs.json or any navigation files. Subagents has a stable nav structure. New components should be flagged for manual addition.
After all edits are complete, print a summary:
## Documentation Updates
### Updated reference pages
- `api-reference/pipecat-subagents/base-agent.mdx` -- Updated Methods (added `new_method`), Properties (updated `active` type)
- `api-reference/pipecat-subagents/decorators.mdx` -- Updated @tool section (added `parallel` param)
### Updated guides
- `subagents/learn/agents-and-runner.mdx` -- Updated code example (renamed `old_param` to `new_param`)
### Unmapped source files
- `src/pipecat_subagents/agents/new_thing.py` -- NewThing class (no doc page exists)
### Skipped files
- `src/pipecat_subagents/clowder/agent.py` -- observability tool, no docs coverage
Before finishing, verify: