
Handles the full archiving workflow when a change proposal is done and deployed. You tell it to archive, and it walks through eight steps: verifies implementation is complete, reviews the spec deltas (ADDED/MODIFIED/REMOVED requirements), creates a timestamped archive directory, merges each type of delta into your living specs, moves the change directory to archive, and validates the structure. The merge logic is specific: append for ADDED, replace entire blocks for MODIFIED, delete with optional comments for REMOVED. It's built for the openspec change management pattern where proposals live in spec/changes during development and get archived with their deltas merged back into spec/specs when shipped. Includes git commit strategies and troubleshooting for conflicts.
$ npx -y skills add forztf/open-skilled-sdd --skill openspec-archiving-cn --agent claude-codeInstalls into .claude/skills of the current project.
归档已完成的变更提案,并将其规范差异合并到常驻规范文档中。
归档包含两项主要操作:
关键规则:在归档前验证所有任务已完成。归档意味着已部署且完成。
复制此清单并跟踪进度:
归档进度:
- [ ] 第 1 步:验证实施完成
- [ ] 第 2 步:审阅待合并的规范差异
- [ ] 第 3 步:创建带时间戳的归档目录
- [ ] 第 4 步:合并 ADDED 需求到常驻规范
- [ ] 第 5 步:合并 MODIFIED 需求到常驻规范
- [ ] 第 6 步:合并 REMOVED 需求到常驻规范
- [ ] 第 7 步:移动变更目录到归档
- [ ] 第 8 步:验证常驻规范结构
在归档前确认所有工作已完成:
# 检查 IMPLEMENTED 标记
test -f spec/changes/{change-id}/IMPLEMENTED && echo "✓ 已实施" || echo "✗ 未实施"
# 查看任务
cat spec/changes/{change-id}/tasks.json
# 使用 git 检查未提交工作
git status
询问用户:
所有任务是否已完成并通过测试?
该变更是否已部署到生产?
是否继续归档?
了解需要合并的内容:
# 列出所有规范差异文件
find spec/changes/{change-id}/specs -name "*.md" -type f
# 读取每个差异文件
for file in spec/changes/{change-id}/specs/**/*.md; do
echo "=== $file ==="
cat "$file"
done
识别:
# 以当天日期创建归档目录
TIMESTAMP=$(date +%Y-%m-%d)
mkdir -p spec/archive/${TIMESTAMP}-{change-id}
Sponsors