TL;DR
Map code changes to affected documentation via map_changes_to_docs.py. Report-only by default, no auto-edit. Scope: auto-detect staged -> unstaged -> last commit. Fallback: manual diff inspection.
Codex Docs Change Sync
Purpose
Identify documentation that is likely affected by code changes.
Activation
- Activate during workflow
docssteps. - Activate on explicit
$codex-docs-change-sync.
Script Invocation
- Use
map_changes_to_docs.pyfor report-only docs impact mapping. - Xem
skills/.system/REGISTRY.mdđể biết đường dẫn đầy đủ.
Script Invocation Discipline
- Always run
--helpbefore invokingmap_changes_to_docs.py. - Treat the script as a black-box mapper and prefer direct execution over source inspection.
- Read script source only when customization or bug fixing is required.
Enhanced Diff Scope
If scope is not specified, use auto mode:
- staged changes
- unstaged changes
- last commit
Report which scope was selected.
Behavior
- Run script and parse JSON output.
- Report changed files and candidate docs with reason/confidence.
- 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.
Reference Files
references/docs-sync-spec.md: script behavior, output format, and fallback protocol.