AgentSkillsCN

codex-docs-change-sync

利用 git diff 与映射规则,将代码变更与候选文档更新一一对应。在文档编写阶段使用此功能,可在不自动编辑文档的情况下,及时上报 MVP 中受影响的文档。

SKILL.md
--- frontmatter
name: codex-docs-change-sync
description: Map code changes to candidate documentation updates using git diff and mapping rules. Use during docs steps to report impacted docs in MVP without auto-editing documentation.

Codex Docs Change Sync

Purpose

Identify documentation that is likely affected by code changes.

Activation

  1. Activate during workflow docs steps.
  2. Activate on explicit $codex-docs-change-sync.

Script Invocation

  • Windows: python "$env:USERPROFILE\.codex\skills\codex-docs-change-sync\scripts\map_changes_to_docs.py" --project-root <path> --diff-scope <scope>
  • macOS/Linux: python "$HOME/.codex/skills/codex-docs-change-sync/scripts/map_changes_to_docs.py" --project-root <path> --diff-scope <scope>

Enhanced Diff Scope

If scope is not specified, use auto mode:

  1. staged changes
  2. unstaged changes
  3. last commit

Report which scope was selected.

Behavior

  1. Run script and parse JSON output.
  2. Report changed files and candidate docs with reason/confidence.
  3. Keep MVP in report-only mode; do not auto-edit docs unless user requests it.

Fallback

If script cannot run, inspect diffs manually and report likely docs: docs/, README.md, CHANGELOG.md, and module-specific docs.