AgentSkillsCN

spec-adr-rollup

将规范条目文件(`spec.md`)与子规范 Markdown 文件合并为一个 ADR 文档,统一存放在 `docs/adr` 目录下,并为每个文件标注状态(“已完成”或“放弃”)及日期。当用户希望将 `docs/specs/<name>` 中的内容整合为一份可供审阅的 ADR 输出时,可使用此技能。

SKILL.md
--- frontmatter
name: spec-adr-rollup
description: Merge a spec entry file (`spec.md`) and child spec markdown files into one ADR document under `docs/adr`, with per-file status (`Done` or `放弃`) and date. Use when the user asks to consolidate `docs/specs/<name>` into a single reviewable ADR output.

Spec ADR Rollup

Overview

Consolidate one spec folder into one ADR markdown file with a deterministic status table.

Workflow

  1. Identify the spec directory, usually docs/specs/<spec-name>.
  2. Run the merge script:
bash
python skills/spec-adr-rollup/scripts/merge_spec_to_adr.py --spec-dir docs/specs/<spec-name> --adr-root docs/adr
  1. Confirm output exists at docs/adr/<spec-name>.md.
  2. Verify the status table:
  • Done (YYYY-MM-DD): file exists and is merged.
  • 放弃 (YYYY-MM-DD): file missing, unreadable, or unsafe path.

Notes

  • Keep execution idempotent: reruns overwrite the same ADR file.
  • Preserve merge order: spec.md first, then referenced child docs, then remaining markdown files.
  • Avoid logging secrets.

Script

  • scripts/merge_spec_to_adr.py: merges spec docs and writes one ADR markdown.