一键导入
source-command-dev-docs-sync
Sync documentation with project state using ICAV workflow. Usage: /dev-docs-sync [cleanup=true]
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sync documentation with project state using ICAV workflow. Usage: /dev-docs-sync [cleanup=true]
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Bump Heron version via the VERSION-file SSOT. Delegates to `just bump` which syncs server/Cargo.toml (workspace.package.version) and console/package.json. Also updates CHANGELOG.md and creates a bump commit + tag. Usage: /dev-bump <type> where type=patch|minor|major|tag
Bump Heron version via the VERSION-file SSOT. Delegates to `just bump` which syncs server/Cargo.toml (workspace.package.version) and console/package.json. Also updates CHANGELOG.md and creates a bump commit + tag. Usage: /dev-bump <type> where type=patch|minor|major|tag
| name | source-command-dev-docs-sync |
| description | Sync documentation with project state using ICAV workflow. Usage: /dev-docs-sync [cleanup=true] |
Use this skill when the user asks to run the migrated source command dev-docs-sync.
Synchronize documentation with actual project state using the ICAV (Inventory-Compare-Adapt-Validate) workflow.
INVENTORY → COMPARE → ADAPT → VALIDATE → COMMIT
Core principle: Project state is truth. Docs follow reality. Every doc claim must trace to an artifact.
| Task | Primary Tool | Fallback |
|---|---|---|
| Find files | Glob | ls |
| Search patterns | Grep | - |
| List directories | ls | - |
| Read files | Read | - |
| Parameter | Values | Default | Description |
|---|---|---|---|
cleanup | true, false | false | Remove completed TODOs and obsolete content |
Goal: Collect project facts and list documentation files.
cat VERSION
git log --oneline -20
Read project.yaml for the documentation language:
language:
docs: English # or Chinese / 中文
Default if missing: English. Aliases: Chinese ≡ 中文. All documentation content written or edited in Phase 3 MUST be in language.docs. File names remain English regardless.
# Documentation files
ls docs/
# Repository references
ls repos/
# Repo metadata
ls repos-meta/ 2>/dev/null
# Slash commands
ls .Codex/commands/*.md
# Skills
ls -d .Codex/skills/*/ 2>/dev/null
# Project files
ls *.md VERSION .gitignore
| File | Purpose |
|---|---|
AGENTS.md | AI dev guide — conventions, structure, rules |
README.md | Project overview — purpose, structure |
docs/XXX-*.md | Design documents — technical specs, architecture |
CHANGELOG.md | Release history (managed by /dev-bump) |
Excluded from sync:
CHANGELOG.md (managed by /dev-bump)repos/ and repos-meta/ (external references, protected)Goal: Find mismatches between docs and reality.
CRITICAL: Each comparison must run a concrete command against a specific doc section. Do NOT skip any row.
| Doc Section | Source of Truth | Command |
|---|---|---|
| File naming convention | filesystem | ls docs/ — verify all follow XXX-name.md pattern |
| Protected directories | filesystem | ls repos/ repos-meta/ — verify they exist |
| Git commit rules | git log | git log --oneline -5 — verify conventions followed |
| Doc Section | Source of Truth | Command |
|---|---|---|
| Project description | docs/ contents | Compare README overview with actual doc topics |
| Directory structure | filesystem | ls -la vs README tree listing |
| Version | VERSION file | cat VERSION vs README version mention |
| Doc Section | Source of Truth | Command |
|---|---|---|
| File numbering | filesystem | ls docs/ — verify sequential, no gaps |
| Cross-references | docs content | grep -r 'docs/' docs/ — verify internal links valid |
| Referenced repos | repos/ | ls repos/ vs repo mentions in docs |
git diff --name-only $(git describe --tags --abbrev=0 2>/dev/null || echo HEAD~20)..HEAD
Use to prioritize which rows to check first, but always check all rows.
Goal: Fix every mismatch found in Phase 2.
For each mismatch:
Rules:
project.yaml → language.docs (default: English). File names remain English regardless of docs language.Goal: Verify sync succeeded.
For every mismatch fixed in Phase 3, re-run the comparison command to verify the fix.
# Find all markdown links in docs/
grep -rohP '\[.*?\]\(([^)]+)\)' docs/*.md | grep -oP '\(([^)]+)\)' | tr -d '()'
Verify each relative link target exists.
Documentation Sync Report
==========================
Comparisons Run: [N]
Mismatches Found: [N]
Mismatches Fixed: [N]
Changes:
- [file]: [what changed]
- [file]: [what changed]
Verified: [all fixed / N remaining]
/dev-commit "sync docs with project state"
INVENTORY
[ ] VERSION, git log loaded
[ ] Documentation files listed
[ ] Repository references inventoried
[ ] Slash commands listed
COMPARE (Source-of-Truth Map — every row)
[ ] AGENTS.md: naming convention, protected dirs, git rules
[ ] README.md: description, structure, version
[ ] docs/ files: numbering, cross-references, repo mentions
ADAPT
[ ] All mismatches fixed
[ ] Cleanup applied (if requested)
VALIDATE
[ ] Fixed comparisons re-verified
[ ] Internal links valid
[ ] Report generated
[ ] Changes committed