Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

adr-ops

БесплатноЗапускает вложенные скриптыНе проверен

Author, index, and lint Architecture Decision Records — append-only memory that recovers the WHY behind a system's shape. Triggers on: adr, architecture…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

ADR Ops

An Architecture Decision Record (ADR) captures one architectural decision: what was decided, why, what was rejected, and what it costs. ADRs are append-only project memory — they exist so a future maintainer touching a subsystem can recover the reasoning behind its shape without archaeology through git history or chat logs.

This skill encapsulates a battle-tested ADR protocol and generalizes it to any repo. The default location is docs/adr/, but every script takes --dir so a repo can keep records anywhere (docs/decisions/, architecture/adr/, …).


When to write an ADR

Write one when a change has any of these properties:

  • It constrains future options — a boundary, an invariant, a "we will always / never do X" rule that later work must respect.
  • Multiple alternatives were seriously evaluated and the choice is not obvious in hindsight.
  • The rationale is non-obvious from the code — the code shows what, the ADR preserves why.

Write one decision per ADR. If a change bundles two separable decisions, write two.

When NOT to write one

  • A bug fix, refactor, or feature that follows existing architecture without changing it — that is a commit message.
  • A reversible, low-stakes choice — that is a code comment.
  • A point-in-time event with no forward constraint (a benchmark run, an incident write-up) — that is an audit/log entry, not an ADR.

Rule of thumb: if someone could plausibly undo this next month without re-litigating a trade-off, it is not an ADR.


Naming, location, numbering

  • Path: <adr-dir>/ADR-NNN-slug.md (default <adr-dir> = docs/adr).
  • Repos already using MADR's NNNN-slug.md (exactly four digits) are read by adr-touching.py too, so discovery works there; adr-new, adr-index and adr-lint handle only ADR-NNN-slug.md.
  • NNN is zero-padded three digits, assigned sequentially: the next number is highest existing + 1. Numbers are never reused, never reordered — a superseded ADR keeps its number forever.
  • slug is short kebab-case naming the subject (oauth-only-auth, per-trial-container).
  • A protocol/how-to file (e.g. 00_*) sorts above the numbered records and is not part of the sequence.

The directory IS the index

Do not maintain a hand-curated numbered list as the source of truth — it drifts from the filesystem. The authoritative list is the directory itself; adr-index.sh is just a clean parse of it. Any prose list elsewhere (README, AGENTS.md) is a convenience pointer that may lag and must say so.


Canonical format (compact view)

Full template in assets/ADR-template.md; full rules in references/canonical-format.md. The shape:

---
status: accepted
date: YYYY-MM-DD
supersedes: []
superseded-by: []
touches:
  - "path/one.py"
---

# ADR-NNN: Title in Title Case

## Decision (one sentence)
<BLUF — one present-tense sentence stating the standing rule; greppable, stands alone.>

## Context
## Alternatives considered
## Consequences
### Positive / ### Negative / ### Non-goals
## See also

Fixed section order: Decision → Context → Alternatives considered → Consequences → See also. Extra sections (Migration path, Enforcement, Implementation summary) go after Consequences. For a multi-part decision, keep the one-sentence BLUF and add a ## Decision (detail) section lower down.

Frontmatter fields

Field Required Rule
status yes proposed / accepted / superseded / deprecated (lowercase).
date yes Decision date, YYYY-MM-DD.
supersedes yes YAML list of ADR ids this replaces ([] if none).
superseded-by yes YAML list of ADR ids that replace this ([] until superseded).
touches yes YAML list of paths / globs / config keys this governs. Quote each. The grep discovery surface — grep touches: answers "is there an ADR about the thing I'm changing?"
extends optional ADR ids this builds on without replacing.
related optional Companion ADR ids (not parents).
deciders optional Who made the call.

A new field is a protocol change — record it in a new ADR, don't invent per-record keys.


Status lifecycle & immutability

proposed ──► accepted ──► superseded   (superseded-by: [ADR-NNN])
                │
                └────────► deprecated  (withdrawn; nothing replaces it)

ADRs are append-only. Once accepted, you do not rewrite the Decision or Context. Three change modes (full detail in references/lifecycle-and-supersession.md):

  1. Supersede — the rule itself changes. Write a new ADR with supersedes: [ADR-OLD]; flip the old record's frontmatter to status: superseded + superseded-by: [ADR-NEW] in the same commit. Body stays intact (obsolete reasoning is itself a record). Supersession is bidirectional — a one-sided link is a lint error.
  2. Addendum — new
Полный SKILL.md на GitHub

Установить adr-ops в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Bash
Glob
Grep

Вложенные файлы

assets/ADR-template.mdreferences/canonical-format.mdreferences/lifecycle-and-supersession.mdscripts/adr-index.shscripts/adr-init.shscripts/adr-lint.pyscripts/adr-new.shscripts/adr-touching.py

FAQ

Что делает скилл adr-ops?

Author, index, and lint Architecture Decision Records — append-only memory that recovers the WHY behind a system's shape. Triggers on: adr, architecture decision record, decision log, record this decision, supersede an adr, why was this decided, adr template, next adr number.

Как установить скилл adr-ops?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл adr-ops запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить adr-ops с