一键导入
document-project
Generate or update project component documentation (README and API docs) by reading source code. Enforces the documentation verification workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate or update project component documentation (README and API docs) by reading source code. Enforces the documentation verification workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Lead reviewer that orchestrates specialist sub-reviews (static analysis, governance, plan drift, adversarial) to evaluate a PR. Scales review depth to change risk. Produces a unified structured report.
Claude Code only — create or enter the worktree for an issue/skill and switch the session into it via the native EnterWorktree tool. Wraps worktree_create.sh / worktree_enter.sh so all project policy (issue checks, branch naming, skill allowlist, --plan-file draft PR, --workflow scaffolding) still applies.
Evaluate PR review comments (human and bot) against local code, principles, and ADRs. Includes CI check status. Classifies each as valid or false positive and presents a fix plan.
Generate a principles-aware work plan for an issue. Saves to `.agent/work-plans/` in the repo that owns the issue and commits as the first step on the feature branch.
Scan project repositories for GitHub issues, categorize them, flag stale items, and cross-reference with workspace tracking.
Read ROADMAP.md files, cross-reference with GitHub issues, detect staleness, and suggest prioritized next work.
| name | document-project |
| description | Generate or update project component documentation (README and API docs) by reading source code. Enforces the documentation verification workflow. |
/document-project [<component-path>]
If no path is given, use the current directory.
Lifecycle position: Utility — use after audit-project flags documentation
gaps, or when asked to "document a component", "update the README", or "write
API docs".
Generates both user-facing component documentation (README with interfaces, configuration, usage) and developer-facing API documentation (class/function reference) by reading the actual source code.
Cardinal rule: No fact without reading the source. Every parameter name,
interface name, type, and default value must come from the code, not
assumptions. See .agent/knowledge/documentation_verification.md.
# Detect project type and list source files
find <component_path> -name '*.py' -o -name '*.cpp' -o -name '*.hpp' \
-o -name '*.h' -o -name '*.ts' -o -name '*.js' -o -name '*.go' \
-o -name '*.rs' | sort
# Interface/schema definitions
find <component_path> -name '*.proto' -o -name '*.thrift' \
-o -name '*.graphql' -o -name '*.json' -name 'schema*' | sort
# Configuration files
find <component_path> -name '*.yaml' -o -name '*.toml' -o -name '*.json' \
-name 'config*' | sort
Record the component name, description, maintainer, license, and dependencies
from the project manifest (package.json, pyproject.toml, Cargo.toml,
go.mod, etc.).
Follow the command cookbook in .agent/knowledge/documentation_verification.md
to grep for every:
Record each finding with its file path and line number.
Read every entry point file (main file, index file, handler file). Note:
For C++ libraries (headers in include/<component_name>/):
struct, enum, typedef)For Python modules:
__init__ signaturesFor TypeScript/JavaScript:
For Go packages:
For Rust crates:
pub functions, structs, enums, and traitsUse the template at .agent/templates/component_documentation.md (or
.agent/templates/package_documentation.md if available):
Typical README sections for a component:
If the component contains libraries or modules with public APIs (not just a standalone executable):
docs/API.md in the component root.Skip this step if the component only contains application executables with no reusable library code.
Run through the verification checklist:
.agent/knowledge/documentation_verification.md — Verification workflow
and command cookbook.agent/templates/component_documentation.md — README template with
verification checklist