一键导入
update-docs
Update all project documentation to reflect recent changes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update all project documentation to reflect recent changes
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Conduct a decision-tree interview with the user to lock in requirements, motivation, scope, and non-goals before planning.
Stage 3 of three-stage planning pipeline. Produce a file-level implementation plan via detail-planner/detail-reviewer loop, then get user approval. Inputs are confirmed intent (<session-id>-intent.md) and outline (<session-id>-outline.md) from prior stages.
Edit source code for the current task. Delegates editing and lint/typecheck/self-repair to a subagent.
Plan and write test cases with high reasoning effort. Test iteration runs in a subagent to minimize confirmations.
Explore the codebase to understand existing patterns, constraints, and relevant files before planning.
Investigate git history, docs/history.md, and GitHub issue/PR timeline since the relevant issue opened, to surface changes that may invalidate the issue's premises.
| name | update-docs |
| description | Update all project documentation to reflect recent changes |
| model | sonnet |
| user-invocable | false |
Update all project documentation to reflect recent changes.
Docs directory: docs/ within the current project root.
Target files: all .md files in docs/ that already exist, plus README.md in the project root.
UD-1. Gather recent changes:
git diff and git diff --cached to capture uncommitted and staged changes (current session's work, not yet in git log)git log --oneline -20 for committed history
UD-2. Read current docs: Read all target docs files.README.md (repo root) is required for all repos. Create it first if missing — highest priority.
ops.mdCHANGELOG.md (repo root) for public repos. Create if missing (no manual seed needed — first run starts from here).
UD-3. Identify gaps: Compare git log against each document's content. Look for:README.md: Update when a user-visible feature is added or changed, install/usage steps shift, or an existing bullet no longer accurately reflects real behavior.
UD-4. Propose updates: For each file that needs updating, present:DOCS_LANG_HISTORY_PUBLIC / DOCS_LANG_HISTORY_PRIVATE for history, DOCS_LANG_CHANGELOG_PUBLIC / DOCS_LANG_CHANGELOG_PRIVATE for changelog; routed by repo visibilitybash -c 'cd "$AGENTS_CONFIG_DIR" && bash "$AGENTS_CONFIG_DIR/bin/confirm-off" CONFIRM_DOCS on'ON or ERROR: present the UD-4 proposal via AskUserQuestion and wait for approval before applying edits.OFF: apply the edits and continue to step UD-6 without waiting.
UD-6. Propagate to parent docs: If the project has a parent-level summary doc (e.g. an engineering hub), update it too. Skip for repo-local docs/.infrastructure.md — delegate to /update-infrastructure instead.
UD-7. Commit separately: If docs are in a separate repo, commit each repo independentlyrules/docs.mdDOCS_LANG_HISTORY_* / DOCS_LANG_CHANGELOG_* settings in .env for History/Changelog entry languageCONFIRM_DOCS — when off, the proposal is shown but no AskUserQuestion is raisedAfter completing this skill, choose Path A or Path B based on ENFORCE_WORKTREE.
UD-8. Complete delivery (Path A — ENFORCE_WORKTREE=on mandatory).
UD-8a. Append history bullets to <worktree>/WORKTREE_NOTES.md ## History Notes. Replace - (none) on first append.
closes_issues is non-empty: write one bullet per closed issue (matching the closes_issues count). /worktree-end Step WE-21 is the canonical writer of docs/history.md (Approach C, #690) and consumes these bullets via compose-doc-append-entry --closes-issues-count N. The CLI fail-fasts (non-zero exit) when closes_issues > 0 AND ## History Notes is absent / contains only - (none).closes_issues count, the CLI emits a soft warning to stderr but proceeds.
UD-8b. For public repos: append user-facing bullets to ## Changelog Notes. Replace - (none) on first append.
UD-8c. Do NOT write docs/history.md or CHANGELOG.md directly — deferred to /worktree-end Step WE-21 (single canonical writer for both files).
UD-8d. Stage: git add docs/ README.md (intentionally omits CHANGELOG.md and docs/history.md).
UD-8e. Commit gate is satisfied by docs/ staged entries (architecture.md, ops.md, README.md, etc.).
UD-8f. Emit: echo "<<WORKFLOW_MARK_STEP_docs_complete>>" — satisfies the workflow gate. Do NOT emit WORKFLOW_USER_VERIFIED here; next-step owns user_verification (deferred to /worktree-end under ENFORCE_WORKTREE=on).UD-9. Complete delivery (Path B — ENFORCE_WORKTREE=off).
UD-9a. Delegate history entry to doc-append-worker:
Agent({ subagent_type: "doc-append-worker", prompt: JSON.stringify({ mode: "history", category: CATEGORY, subject: "...", commits: "HASH", background: "...", changes: "...", cwd: CWD, agents_config_dir: AGENTS_CONFIG_DIR, artifact_dir: PLANS_DIR }) })
UD-9b. For public repos — delegate changelog entry to doc-append-worker:
Agent({ subagent_type: "doc-append-worker", prompt: JSON.stringify({ mode: "changelog", category: CATEGORY, subject: "...", background: "...", changes: "...", cwd: CWD, agents_config_dir: AGENTS_CONFIG_DIR, artifact_dir: PLANS_DIR }) })
On failed status: surface artifact_path to the user and stop.
UD-9c. git add docs/ README.md CHANGELOG.md
UD-9d. Emit: echo "<<WORKFLOW_MARK_STEP_docs_complete>>" — satisfies the workflow gate. Do NOT emit WORKFLOW_USER_VERIFIED here; next-step owns user_verification (emitted just before /commit-push under ENFORCE_WORKTREE=off).