Unified entry point for project memory (CLAUDE.md) updates and documentation (API.md/README.md) generation. Routes to specialized sub-commands via arguments or interactive needs assessment.
Based on routing result, read and execute the corresponding phase:
Phase Reference Documents
(read on-demand when phase executes):
Mode
Document
Purpose
update-full
phases/01-update-full.md
Full CLAUDE.md update, 3-layer architecture, batched agents
update-related
phases/02-update-related.md
Git-changed CLAUDE.md update, depth-first
update-single
phases/03-update-single.md
Single module CLAUDE.md, Explore + handbook style
docs-full
phases/04-docs-full.md
Full API.md + README.md generation
docs-related
phases/05-docs-related.md
Git-changed docs generation, incremental
Shared Configuration
Tool Fallback Hierarchy
All sub-commands share the same fallback:
--tool gemini → [gemini, qwen, codex] // default
--tool qwen → [qwen, gemini, codex]
--tool codex → [codex, gemini, qwen]
Common Parameters
Parameter
Description
Default
Used By
--tool
Primary CLI tool
gemini
All
--path
Target directory
.
update-full, docs-full
(positional)
Module path
(required)
update-single
Batching Thresholds
Sub-Command
Direct Execution
Agent Batch
Batch Size
update-full
<20 modules
≥20 modules
4/agent
update-related
<15 modules
≥15 modules
4/agent
update-single
always single
N/A
1
docs-full
<20 modules
≥20 modules
4/agent
docs-related
<15 modules
≥15 modules
4/agent
Core Rules
Route before execute
Determine sub-command before any execution
Phase doc is truth
All execution logic lives in phase docs, router only dispatches
Read on-demand
Only read the selected phase doc, never load all
Pass arguments through
Forward remaining args unchanged to sub-command
User confirmation
Each sub-command handles its own plan presentation and y/n confirmation
Error Handling
Error
Resolution
Unknown sub-command
Fall through to interactive flow
Phase doc not found
Abort with file path error
Missing path for update-single
Prompt via Q3
Sub-command execution fails
Follow phase doc's own error handling