AgentSkillsCN

create-adr

将可行的调研成果整合为简洁明了的 ADR 提案。当用户说“为 {feature-name} 创建 ADR”时,可使用此技能。系统将遍历所有调研记录,筛选出可行的方案,并按“背景/选项/决策/后果”等板块生成 ADR 草案。

SKILL.md
--- frontmatter
name: create-adr
description: >
  Synthesize viable investigations into a concise proposed ADR.
  Use when user says "create ADR for {feature-name}".
  Reads all investigations, identifies viable ones, generates ADR with Context/Options/Decision/Consequences sections.

Create ADR from Investigations

Synthesize viable investigations into a concise proposed ADR.

Usage: When user says "create ADR for {feature-name}"

Instructions

  1. Read all investigations in docs/features/{feature-name}/investigations/

  2. Identify viable investigations: Status should be "Viable" or "In Progress" (not "Rejected")

  3. Generate ADR number: Use format {YYMM} based on current date (e.g., 2512 for Dec 2025)

  4. Create ADR at docs/features/{feature-name}/adr-{YYMM}-{topic}.md:

markdown
# ADR-{YYMM}: {Title}

**Status**: Proposed
**Date**: {YYYY-MM-DD}
**Feature**: {feature-name}

## Context
{1-2 paragraphs: The problem from _feature.md, key constraints}

## Options Considered

1. **{Approach A}** - {one line summary} *(rejected: brief reason)*
2. **{Approach B}** - {one line summary} *(viable)*
3. **{Approach C}** - {one line summary} *(viable)*

## Decision

{1-2 paragraphs: What approach we chose and why. Reference the winning investigation(s).}

## Consequences

- {Impact on codebase}
- {What becomes easier}
- {What becomes harder or needs follow-up}
  1. Keep it concise: No code snippets, no implementation checklists, no phase tracking. Just the decision and rationale.

  2. Update readme.md:

    • Change status to "Decided"
    • Add link to ADR in Decision section
    • Mark synthesized investigations as "Merged"
  3. Output: Show the ADR content and confirm next steps (implement, then accept ADR)

ADR Principles

  • Context: Why we needed to decide (not how we'll implement)
  • Decision: What we chose and why (not the full investigation details)
  • Consequences: What changes as a result (both positive and negative)