一键导入
consolidate-docs
Consolidate shipped specs into durable design docs and clean up stale documents. Dry-run by default; pass --apply to create a branch and open a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Consolidate shipped specs into durable design docs and clean up stale documents. Dry-run by default; pass --apply to create a branch and open a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | consolidate-docs |
| description | Consolidate shipped specs into durable design docs and clean up stale documents. Dry-run by default; pass --apply to create a branch and open a PR. |
Automates the extraction of durable rationale from shipped specs (docs/superpowers/specs/, docs/superpowers/plans/) into long-lived design reference docs (docs/design/), then deletes the spent specs.
--dry-run): Report only. Show what would be consolidated and deleted. No file changes.--apply: Execute the consolidation — create branch, edit design docs, delete specs, open PR.Parse the argument from the skill invocation. If the user typed /consolidate-docs --apply, run in apply mode. Otherwise dry-run.
Run the inventory script from the repo root:
./scripts/docs/inventory.sh
Display the output as a formatted table to the user. Group by status:
If there are no READY specs, report "Nothing to consolidate — all specs are still pending." and stop.
For each READY spec, run:
./scripts/docs/domain-map.sh <path-to-spec>
This gives you domain keyword scores and the table of contents of each design doc. Use this to determine:
For each READY spec:
For durable content, determine the target:
grep -n to read the specific section.Present a consolidation plan to the user:
## Consolidation Plan
### spec-name.md → audio-voicing-engine.md
**Extract:**
- Decision about X → §2.3 String-set selection
- Rationale for Y → §4.1 Structural variation
**Discard:**
- Implementation steps (task list)
- File structure table
- Scope check section
### another-spec.md → DELETE ONLY
No durable content found. Pure implementation spec.
### no-match-spec.md → NEEDS INPUT
Domain scores: visual:0 audio:0 theory:0
Options: (1) Create new design doc, (2) Discard
In dry-run mode: Print the plan and stop. Say: "Run /consolidate-docs --apply to execute this plan."
In apply mode: Present the plan and ask: "Proceed with this consolidation? (yes/no)" Wait for confirmation before making any changes.
After user confirms:
Create branch:
git checkout -b docs/consolidate-YYYY-MM-DD
Use today's date.
For each extraction:
For NO_MATCH specs (if user chose "create new design doc"):
docs/design/<domain-name>.md following the structure of existing design docs:
docs/design/README.md tableDelete consolidated specs:
git rev-parse HEADConsolidated from docs/superpowers/specs/<filename> (SHA: <sha>)Commit:
git add -A docs/
git commit -m "docs: consolidate specs into design refs"
Open PR:
gh pr create --title "docs: consolidate specs into design refs" --body "<body>"
PR body structure:
## Consolidation Summary
### Extracted (durable rationale merged into design docs)
- `spec-name.md` → `audio-voicing-engine.md` §2.3, §4.1
- `other-spec.md` → `fretboard-visual-language.md` §3.A
### Deleted (no durable content)
- `impl-spec.md` — pure implementation, no rationale to preserve
### Provenance
All deleted specs are recoverable via `git show <sha>:<path>`.
SHA before deletion: `<sha>`
Follow these strictly: