AGENT SKILL

adr-writer

Use when the user explicitly invokes /adr or asks to "record an architecture decision" / "write an ADR." Produces an MADR-format Architecture Decision Record. Pattern from adr.github.io and the AgDR (Agent Decision Record) extension at me2resh/agent-decision-record. Lightweight, in-repo, future-engineer-readable.

License 许可
Apache-2.0
最近更新
2026-11-09
Stars
★ 0
Forks
0

01 前言 Front Matter

name
adr-writer
description
Use when the user explicitly invokes /adr or asks to "record an architecture decision" / "write an ADR." Produces an MADR-format Architecture Decision Record. Pattern from adr.github.io and the AgDR (Agent Decision Record) extension at me2resh/agent-decision-record. Lightweight, in-repo, future-engineer-readable.
disable-model-invocation
true

03 SKILL.md 正文

ADR writer

You are recording an Architecture Decision Record (ADR) — a permanent, in-repo document of a decision made and why. ADRs are how teams remember "why did we pick X" three years later.

Output format (MADR)

Save to ${CLAUDE_PROJECT_DIR}/adr/NNNN-<slug>.md where NNNN is the next-numbered ADR (look at existing files; start at 0001).

# NNNN. <Decision title — short, declarative>

Date: YYYY-MM-DD
Status: Proposed | Accepted | Deprecated | Superseded by [NNNN]

## Context and Problem Statement

What's the situation? What forces are at play? What problem are we
trying to solve? 2-4 sentences.

## Decision Drivers

- Driver 1 (constraint, requirement, or quality attribute)
- Driver 2
- ...

## Considered Options

- **Option A**: short description
- **Option B**: short description
- **Option C**: short description (often: "do nothing")

## Decision Outcome

Chosen option: **Option X**, because [reason].

### Consequences

- **Positive**: ...
- **Negative**: ...
- **Neutral**: ...

## Pros and Cons of the Options (optional, when nuance matters)

### Option A
- Pro: ...
- Con: ...

### Option B
- Pro: ...
- Con: ...

## More Information (optional)

- Links to related design docs, RFCs, prototypes.
- Reference to the spec this ADR supports (if any).
- Reference to the PR that implements it (added later).

When to write an ADR

  • Picking a library / framework that locks the codebase in.
  • Choosing between architectural patterns (event-driven vs request-response, monorepo vs polyrepo, REST vs GraphQL).
  • Database schema decisions that are hard to reverse.
  • Authentication / authorization model.
  • Anything where future-you would ask "why did we do X?"

When NOT to write an ADR

  • Code style choices (those go in CONVENTIONS.md).
  • Bug fixes (those are commit messages).
  • Feature additions following an existing pattern (those are PR descriptions).
  • Tiny choices ("which date library" if it's reversible).

Process

  1. Identify the decision. What was actually chosen, vs the alternatives that were rejected?
  2. Survey existing ADRs (ls adr/*.md). Number the new one sequentially. If the decision supersedes an older one, mark the older as Status: Superseded by NNNN.
  3. Write the draft. Keep it under 1 page. The point is durable context, not exhaustive prose.
  4. Show the user. Ask: APPROVED / REVISE / ABORT.
  5. On APPROVED: commit on its own (docs(adr): NNNN <title>). Suggest linking the ADR from the relevant code (file header comment or README).

Agent-Decision-Record (AgDR) variant

For decisions made BY an AI agent (library pick, pattern choice during implementation), prefix the title with [AgDR] and add an "AI involvement" section mirroring the PR template:

## AI involvement

- **Prompt / task**: [what was asked]
- **Agent**: [tdd-driver, /feature, etc.]
- **Why this option**: the model's stated reasoning
- **Author review**: I read the alternatives and confirmed the
  pick. ✅

This makes AI-made architectural decisions traceable and reviewable later, which is the modern (2026) governance norm.

04 同仓库更多 Skills

drumfiend21
drumfiend21/claude-tdd-pro

test-first-extract

Use when the user asks to EXTRACT or RELOCATE existing code into its own file, module, or component ("extract X", "split out Y", "pull Z into its own file", "decompose god-file"). NOT for net-new features (use tdd-feature-build) or behavior changes (use fix-bug). Enforces the 9-step extraction with isolated unit tests + integration regression tests as a two-tier safety net.

★ 0
drumfiend21
drumfiend21/claude-tdd-pro

tdd-feature-build

Use when the user describes a NEW feature to add ("add X to Y", "implement Z", "build a feature that…", "make it possible to…"). Enforces TDD — failing test first, minimum code to pass, refactor. Refuses to ship code without a test that demonstrably catches its absence. Does NOT trigger on bug fixes (use bug-fix-discipline) or refactors (use test-first-extract). Will ask 1-3 clarifying questions before writing any code; safe to delegate from /feature command.

★ 0
drumfiend21
drumfiend21/claude-tdd-pro

sync

Multi-machine git-backed sync of local TDD Pro state via the `tdd-pro-sync` branch. Use when operators run claude-tdd-pro on more than one machine and want their FAILURE-LOG, decisions, audit checkpoints, workflow state, operator-curated URL registries, operator/community trees, and paywalled attestations to follow them between hosts.

★ 0
drumfiend21
drumfiend21/claude-tdd-pro

strict-component-tests

Use when writing or reviewing test files. Enforces strict assertions that actually catch regressions (getByRole, exact counts, jest-dom matchers) in contrast to permissive tests (queryAllByText length > 0) that pass against broken UIs. References QUALITY-BAR.md for the canonical strictness rules.

★ 0
drumfiend21
drumfiend21/claude-tdd-pro

spec

暂无简介

★ 0
drumfiend21
drumfiend21/claude-tdd-pro

spec-first

Use when the user describes a non-trivial feature or system that should be specified in writing before any code is written. Pattern from Geoffrey Huntley's "Ralph" loop, OpenSpec, intent-driven.dev, and Kent Beck's "augmented coding" framing — specs+tests are the durable artifact, code is the disposable one. Produces a Markdown spec document that the user reviews; only after approval does any code get written (typically via tdd-feature-build or /feature).

★ 0