Receber por email
← Voltar para o catálogo

architectural-decision-record

Create, extract, or convert an ADR (architectural decision record) using the ADR template. Use when creating new ADRs, extracting an ADR from existing documentation, converting a document into an ADR, recording an architecture or design decision, or updating the status of an existing ADR. Does not create or update enforceable coding standards or conventions — use coding-standard for that. Does not

88estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add testdouble/han

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/architectural-decision-record/svg)](https://www.skillteca.com.br/skills/architectural-decision-record)
#ai

Skills relacionadas

Ver todas de Documentos →

Alerta por categoria

Receba novas skills de Documentos toda segunda

1 email curto, só com as skills novas de Documentos. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Create ADR

Operating Principles

  • YAGNI applies to ADRs themselves. Apply the evidence-based YAGNI rule from [../../references/yagni-rule.md](../../references/yagni-rule.md). An ADR is worth recording only when there is a concrete forcing function today — a real decision the team is actively making, an existing code path or architectural choice that will be locked in by this record, an applicable regulation, a customer commitment, or a documented incident that drove the choice. ADRs about decisions that don't have to be made yet, "for future flexibility", "best practice says we should pick X", or symmetry with other ADRs ("we have one for auth, so we should have one for billing") are YAGNI candidates and the ADR should not be written. When proposed, recommend deferral with the trigger that would justify writing the ADR (a real decision arising, a real incident, a real regulation taking effect). The user always wins; the rule's job is to make the cost of writing speculative architectural records visible — every ADR is a future-reader's load and a pattern future agents will treat as committed.
  • The companion evidence rule applies to the ADR's supporting evidence. Apply the evidence rule from [../../references/evidence-rule.md](../../references/evidence-rule.md) to the citations that justify the ADR's decision and rejected alternatives. Name the trust class of each citation (codebase, web, provided); mark single-source web claims that drive the chosen option; and when no evidence at any tier supports a claimed trade-off, label it rather than presenting it as a weak preference.

Project Context

  • Git user: !git config user.name (!git config user.email)
  • OS username: !whoami
  • CLAUDE.md: !find . -maxdepth 1 -name "CLAUDE.md" -type f
  • project-discovery.md: !find . -maxdepth 3 -name "project-discovery.md" -type f

Step 1: Determine Mode

Determine which mode to operate in based on the user's request:

| Mode | When | Initial Status | Then | |------|------|----------------|------| | Creating new | Building an ADR from scratch for a new or recent decision | proposed | → Step 2 | | Converting existing | User provides an existing document to convert into an ADR | accepted | → Step 2 | | Updating existing | Modifying an existing ADR (status change, superseding, adding notes) | — | Read the existing ADR, → Step 3 |

Step 2: Discover Project Structure

  1. Retrieve project config: Resolve project config: read CLAUDE.md's ## Project Discovery section for docs and ADR directories; fall back to project-discovery.md; fall back to Glob defaults (docs/, docs/adr/). Continue without any keys that remain unfound.
  1. Determine the ADR directory: Use the ADR directory if found; otherwise use {docs-dir}/adr/ if a docs directory was found; otherwise use docs/adr/. Run mkdir -p on the resolved directory to ensure it exists.
  1. Enumerate existing ADRs: Use Glob to find existing .md files in the ADR directory.
  1. Resolve author information: If git user or email is empty in the project context above, ask the user for their name and email.
  1. Check existing ADR format: If existing ADRs were found, read one to understand the project's format. If it differs from [template.md](references/template.md), ask the user whether to match the existing format or use this skill's template.
  1. Discover the filename hierarchy taxonomy: ADRs are organized by a one- or two-level hierarchy encoded in the filename so related decisions sort together in a directory listing. Discover the taxonomy that applies to this project — never hardcode it.
  2. From existing filenames: If existing ADRs were enumerated, parse their filenames to extract the leading hierarchy segments already in use (e.g., auth-session-storage.md → top-level auth; auth-tokens-rotation.md → top-level auth, second-level tokens). Build a list of top-level prefixes and known second-level prefixes per top-level.
  3. From project context: Read CLAUDE.md and project-discovery.md (paths from project context above) to identify the project's languages, frameworks, runtimes, subsystems, and bounded contexts. Each is a candidate top-level hierarchy (e.g., auth, billing, api, worker, postgres, terraform).
  4. Carry forward to Step 4: the discovered top-level prefixes (existing + candidate) and any second-level prefixes already in use under each.

Step 3: Gather Context

  1. From the arguments and conversation, determine:
  2. Topic/title — What is the ADR about?
  3. Decision — What was decided and why?
  4. Alternatives — What other options were considered?
  5. Forcing function — What concrete trigger requires this decision now? Per [../../references/yagni-rule.md](../../references/yagni-rule.md), an ADR requires evidence that the decision must be made today: an active engineering choice, a code path locking in, a regulation taking effect, a customer commitment, a documented incident driving the choice. If no forcing function exists, recommend deferring the ADR rather than writing it; surface the recommendation to the user with the trigger that would justify revisiting.
  6. If any of these are unclear or missing, use AskUserQuestion to clarify before writing. If the forcing function is the unclear one, surface that explicitly — "I don't see a current trigger forcing this decision; recommend deferring the ADR until {trigger}. Override?"

Explore the Codebase

Skip agent exploration if the user has already provided full context (converting or updating). When creating a new ADR with sparse context, launch 1-2 codebase-explorer agents to discover evidence. Use 1 agent for narrow decisions, 2 when the decision crosses multiple system areas. Explorer 1 focuses on code affected by the decision topic (current patterns, entry points, core logic). Explorer 2 focuses on existing ADRs, coding standards, and project docs (starting from the docs directory found in Step 2).

Compile Evidence

After agents complete (or if skipped), merge findings with user-provided context. Agent discovery items map to Context (current state of the codebase), Decision (why the chosen option fits), and Notes (key files table, cross-references). Merge duplicates and resolve conflicts between agents.

Dispatch Architectural Review

Skip this sub-step in update mode when only status is changing. Otherwise, launch review agents in parallel against the compiled evidence, the proposed decision, and the considered alternatives. Pass each agent the topic, the proposed decision, the alternatives, and the evidence compiled above.

  1. Launch architect agent — use software-architect when the decision is scoped to a single codebase or bounded context (module boundaries, class and interface design, abstraction points, refactoring paths). Use system-architect when the decision crosses service or bounded-context seams (integration patterns, data ownership across services, failure-domain topology, context-map relationships). If uncertain, prefer system-architect. Prompt: "Review the proposed decision against the compiled evidence. For the chosen option, identify structural or topological risks that the ADR's Consequences section should name. For each rejected alternative, identify the strongest case for it that the ADR's Decision section needs to rebut or concede. Return findings keyed to the ADR's Decision, Decision Drivers, and Consequences sections."
  1. Launch risk-analyst agent — prompt: "Assess the risk of adopting the chosen option versus staying with the current approach or adopting each rejected alternative. Score each on likelihood, severity, blast radius, and reversibility. Return findings keyed to the ADR's Consequences section, and flag any dimension where a rejected alternative scores better than the chosen option — the ADR needs to explain why."
  1. **Launch junior-developer agent in artifact-review mod
Compartilhar X LinkedIn