Skip to content
Development
Command

/ia-adr

Create Architecture Decision Records with format selection and lifecycle management

From plugin
whetstone
3038 skills19 agents38 commands
Install
$ npx -y skills add iliaal/whetstone --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/ia-adr

Context preview

What this command does when you run it.

Create Architecture Decision Records with format selection and lifecycle management

Command definition

ia-adr.md
name: ia-adr
description: Create Architecture Decision Records with format selection and lifecycle management
argument-hint: "[title or 'list' to view existing ADRs]"

Architecture Decision Records

Create, list, or update ADRs in the repository's ADR directory (auto-detected; default `docs/decisions/`).

**Input:** #$ARGUMENTS

Argument handling

  • **Empty** (no argument): scan the detected ADR directory and present existing ADRs as a numbered list with status, title, and date. Then ask: "Create a new ADR? Provide a title."
  • **`list`**: same as empty — scan and list existing ADRs. Do not create anything.
  • **A short title** (≤8 words): create a new ADR with that title. Ask the user to pick a format (Y-statement, Lightweight, Full MADR, RFC, Deprecation) using the **AskUserQuestion tool** before generating.
  • **A longer topic or question** (>8 words): treat as context for a Full MADR or RFC. Extract the decision subject from the input, confirm the extracted title with the user, then proceed.
  • **`deprecate <NNNN>`**: create a Deprecation ADR superseding the referenced ADR number. Read the superseded ADR first to capture its context.

Process

**Detect the repository's ADR convention before listing or creating anything.** Inspect for an established scheme — existing ADR files (common locations: `docs/decisions/`, `docs/adr/`, `doc/adr/`, `adr/`), an `.adr-dir` marker or `adr-tools` config, and project instructions (`CLAUDE.md`/`AGENTS.md`/`CONTRIBUTING.md`). Match the detected location, filename/numbering scheme, and section headings. Keep detection repository-local — do not reach into `.github/` or open PRs. If two schemes conflict, surface the conflict and ask which to follow rather than silently adding a third. Absent any convention, default to `docs/decisions/` with the formats below.

1. Determine action

  • If input is `list` or empty: scan the detected ADR directory and present existing ADRs with status
  • If input is a title or topic: create a new ADR
  • If input starts with `deprecate`: create a Deprecation ADR (see Argument handling above)

2. Choose format

Ask which format fits the decision, using the **AskUserQuestion tool**:

| Format | When to use | Size | |--------|------------|------| | **Y-statement** | Quick, uncontroversial decisions | 1 line | | **Lightweight** | Clear decisions with minimal context needed | ~20 lines | | **Full MADR** | Significant decisions with multiple alternatives | ~50 lines | | **RFC** | Decisions needing broad input or discussion | ~80 lines | | **Deprecation** | Superseding a previous ADR | ~30 lines |

3. Gather context

Ask about, using the **AskUserQuestion tool**:

  • What decision was made (or needs to be made)
  • What alternatives were considered
  • What constraints drove the choice
  • What consequences are accepted

For deprecation ADRs: which ADR is being superseded and why.

4. Generate the ADR

**Directory**: the detected convention (default `docs/decisions/`; create with `mkdir -p` if needed)

**Naming**: match the detected numbering/naming scheme; absent one, `NNNN-kebab-case-title.md` where NNNN is the next sequential number. Check existing files to determine the next number.

**Lifecycle states**: proposed, accepted, deprecated, superseded

Use the template for the chosen format from [adr-templates.md](references/adr-templates.md).

5. Review checklist

Before saving:

  • [ ] Context is complete -- a reader unfamiliar with the discussion can understand why
  • [ ] Alternatives were genuinely considered (not just the chosen option)
  • [ ] Consequences state real trade-offs, not just benefits
  • [ ] Status is correct (proposed if needs review, accepted if decided)

Constraints

  • Never modify existing accepted ADRs without asking -- create a deprecation ADR instead
  • Keep ADRs focused on one decision each
  • Link related ADRs to each other when relevant
Read more
Ships withwhetstone

A Claude Code plugin that makes AI coding agents follow engineering discipline. Plan before coding. Verify before claiming done. Find root cause before patching. Review before merge. Skills activate based on file type and task signals, not manual toggling.

Get the whole plugin, auto-invoked
Stats
30
Stars
0
Views
3
Forks
Active
Maintenance
Python
Language
MIT
License
3d ago
Last commit
5mo ago
Created

Repo: iliaal/whetstone