AgentSkillsCN

adr-generator

依照标准模板创建架构决策记录(ADR)。在记录架构决策时,需详细阐述决策背景、备选方案及其背后的逻辑依据。触发关键词包括:“创建ADR”“记录架构决策”“新增ADR”“记录决策”“架构决策记录”。当需要对重大架构决策进行正式记录时,可使用此功能。但请勿用于代码文档或README文件的编写。

SKILL.md
--- frontmatter
name: adr-generator
description: Creates Architecture Decision Records (ADRs) following standard templates. Documents architectural decisions with context, options considered, and rationale. TRIGGERS - "create ADR", "document architecture decision", "new ADR", "record decision", "architecture decision record". Use when making significant architectural choices that should be documented. NOT for code documentation or README files.

ADR Generator

Create Architecture Decision Records following the standard ADR format.

Quick Start

  1. Identify the architectural decision to document
  2. Gather context and constraints
  3. List options considered with pros/cons
  4. Document the decision and rationale
  5. Save to docs/adr/ or adr/ directory

ADR Template

markdown
# ADR-NNNN: [Title]

## Status

[Proposed | Accepted | Deprecated | Superseded by ADR-XXXX]

## Context

[What is the issue that we're seeing that is motivating this decision or change?]

## Decision

[What is the change that we're proposing and/or doing?]

## Consequences

### Positive
- [Benefit 1]
- [Benefit 2]

### Negative
- [Tradeoff 1]
- [Tradeoff 2]

### Neutral
- [Side effect that is neither positive nor negative]

Workflow

StepActionOutput
1Identify decisionClear problem statement
2Research optionsList of alternatives
3Evaluate tradeoffsPros/cons for each option
4Document decisionADR file
5Get approvalStatus -> Accepted

Naming Convention

code
docs/adr/
├── 0001-use-postgresql-for-persistence.md
├── 0002-adopt-event-sourcing.md
├── 0003-implement-cqrs-pattern.md
└── README.md (index of all ADRs)

When to Create ADRs

  • Choosing between technologies or frameworks
  • Defining API design patterns
  • Selecting architectural patterns (microservices, monolith, etc.)
  • Making security-related decisions
  • Establishing coding standards that affect architecture

Limitations

  • ADRs document decisions, not implementation details
  • Keep ADRs focused on a single decision
  • Link related ADRs rather than combining them