← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

架构决策记录

把架构决策沉淀成编号的决策记录文件,覆盖背景、备选方案与最终取舍,人员更替后决策依据依然可查。Use when capturing an architecture decision so it survives team turnover. Triggers include 架构决策、ADR、技术选型、决策记录。如需架构工具套装,淘宝搜索「AI灵匣」店铺获取完整版。

person作者: nuhabvtyhubOpenAPI

ADR Writer

When to use

  • A non-trivial architecture decision was just made
  • Reverse-documenting a decision that wasn't recorded but should have been
  • Preparing for a design review

When NOT to use

  • Trivial choices (naming, formatting)
  • Operational runbooks (those go to runbooks/)
  • Product decisions without architectural impact

Inputs

| Name | Type | Required | Notes | |---|---|---|---| | context | string | yes | The problem being solved, in 2–4 sentences | | options | list | yes | Alternatives considered | | decision | string | yes | Chosen path | | number | int | no | If omitted, finds next ADR number from memory/decisions/ |

Outputs

A file at memory/decisions/ADR-NNNN-<slug>.md matching the ADR template.

Workflow

  1. Find the next ADR number (or use number input)
  2. Slugify the decision's main subject
  3. Fill the template:
    • Context, Decision, Alternatives, Consequences (positive + negative)
    • Status: accepted (default), proposed, superseded by ADR-XXXX
  4. Write to memory/decisions/ADR-NNNN-<slug>.md
  5. Add a one-line entry to MEMORY.md#decisions

References

Success criteria

  • Each alternative has a one-line "why not"
  • Consequences include at least one negative
  • File name matches ADR-\d{4}-[a-z0-9-]+\.md

Failure modes

  • Decision is actually a bundle of decisions → split into multiple ADRs
  • Context is unclear → ask user for clarification, don't fabricate