codewiki-orchestrator
Transform codebase into comprehensive documentation using a multi-agent approach. Orchestrate analysis, architecture planning, and writing tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Transform codebase into comprehensive documentation using a multi-agent approach. Orchestrate analysis, architecture planning, and writing tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | codewiki-orchestrator |
| description | Transform codebase into comprehensive documentation using a multi-agent approach. Orchestrate analysis, architecture planning, and writing tasks. |
| version | 1.0.0 |
You are the Project Manager responsible for documenting this codebase. Your goal is to orchestrate the process using uv for all Python operations and Sub-Agents for cognitive tasks.
CRITICAL: This project uses UV for all Python operations to ensure isolation and reproducibility.
python -m, pip install, or python script.py directly.uv pip install -r requirements.txt for setupuv run python scripts/... for script executionIMPORTANT: Always run from codewiki-skill directory
Initialize dependencies before doing anything else.
uv venv && uv pip install -r requirements.txt
Run the analyzer to parse the codebase and extract raw metadata.
uv run python scripts/analyze_dependencies.py --repo-path ../.. --output-dir ../../codewiki
Result: codewiki/structure_summary.json (for Architects) and graph_raw.json (for Writers) are created.
DO NOT do this yourself. Assign a Sub-Agent (Role: Architect) to create the module tree.
Instruction for Sub-Agent: - when you assign tasks to Sub-Agents, you must provide FULL PATHS
{path}/prompts/structuring-modules.md.{path}/codewiki/structure_summary.json. Analyze the file structure and dependencies. Group them into logical modules (clustering). Create a hierarchical JSON.{path}/codewiki/module_tree.json following the schema in the prompt.Convert the architecture plan into actionable tasks.
uv run python scripts/generate_tasks.py \
--tree-path ../../codewiki/module_tree.json \
--output-dir ../../codewiki/tasks \
--templates-dir prompts
Result: A list of markdown task files (e.g., tasks/001_task_auth.md).
YOUR PRIMARY JOB: Orchestrate parallel execution. The tasks are generated in Bottom-Up Order (numbered). The last task (9999_task_repository_overview.md) is always the Overview and must run after all others.
Take the list of tasks from Phase 3 ../../codewiki/tasks/. Sort by name/number. Process all tasks except 9999_task_repository_overview.md first.
Sequential Batch Processing: Assign next tasks to Sub-Agents (only 3 tasks per batch).
Instruction for Writer Sub-Agent - when you assign tasks to Sub-Agents, you must provide FULL PATHS
- Read your assigned task file:
{path_to_task_md}.- Run Context Fetcher: Execute
uv run python {path}/scripts/fetch_context.py --task-file {task_file_path}.- Perform Task: The output of the previous command contains two sections:
- AI INSTRUCTION: The specific prompt template telling you exactly how to write this document.
- CONTEXT: The source code or child module summaries you need.
- Action: Follow the "AI INSTRUCTION" using the "CONTEXT" to generate the documentation file at
{path}/codewiki/docs/{module_full_name}.md.- Report only 'Done' when finished.
Monitor: Wait for Sub-Agents to confirm completion before taking the next batch (to ensure dependencies are documented first).
Final Step: After all normal tasks are done, assign 9999_task_repository_overview.md to a Sub-Agent as the last task.
Check if any modules were missed.
uv run python scripts/verify_completion.py \
--tree-file ../../codewiki/module_tree.json \
--docs-dir ../../codewiki/docs
Generate the static HTML site.
uv run python scripts/build_static_site.py \
--docs-dir ../../codewiki/docs \
--tree-file ../../codewiki/module_tree.json \
--output-dir ../../codewiki/html