agentleFS
GustavoAlecioGustavoAlecio/claude-setup/skills/adr/SKILL.md

adr

Skill0 starsChanged 27 days agoMITView on GitHub

Gerencia Architecture Decision Records do repo em docs/adr/ — new, supersede, deprecate, list, show, reindex, propose (a partir de decisões do ciclo). ADRs são imutáveis; mudança de decisão = supersede.

90 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fdr, runbook and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • thiagofgfSkill

    fdr

    Use when creating, changing, reviewing, retiring, auditing, or backfilling implemented user-visible feature behavior, permissions, feature-specific rationale, tradeoffs, or relationships to architectural decisions.

    Also in 3 projects that use this

  • AnthropicSkill

    runbook

    Create or update an operational runbook for a recurring task or procedure. Use when documenting a task that on-call or ops needs to run repeatably, turning tribal knowledge into exact step-by-step commands, adding troubleshooting and rollback steps to an existing procedure, or writing escalation paths for when things go wrong.

    Also in 5 projects that use this

  • drewdrewthisSkill

    sweep

    Search for similar patterns, anti-patterns, or issues elsewhere in the codebase after a fix or feature. Use after implementing a fix to catch the same bug in other places, or proactively to audit for a known pattern.

    Also in 4 projects that use this

  • vndeeSkill

    product-spec

    Use when starting a new feature, product, or project — before any architecture or code, to define what to build and why

    Also in 3 projects that use this

  • OpenAISkill

    threat-model

    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.

    Also in 6 projects that use this

  • montymiSkill

    tech-spec

    Parse and review Technical Specification documents for completeness, consistency, and implementation readiness

    Also in 3 projects that use this

The file

Files
SKILL.md

Uso: /adr <subcomando> [args]. Sem subcomando → list.

REPO=$(git rev-parse --show-toplevel)
ADR_DIR="$REPO/docs/adr"
source ~/.claude/bin/get-project.sh
WF_DIR="$HOME/.claude/workflow/$(get-project-name)"
SUBMODULE=$(git -C "$ADR_DIR" rev-parse --show-superproject-working-tree 2>/dev/null)

Submódulo: SUBMODULE não vazio significa que docs/adr é um submódulo (ADR vive em outro repo). Aí new, supersede e reindex recusam com uma linha explicando; propose não escreve ADR: grava as candidatas em $WF_DIR/adr-candidates.md (o /pr-open --from-complete anexa esse arquivo ao PR).

Formato

docs/adr/NNNN-<slug>.md:

---
id: NNNN
title: <decisão em uma frase>
status: proposed | accepted | deprecated | superseded
date: YYYY-MM-DD
affects: ["lib/features/**/bloc/**"]
supersedes: []
superseded_by: []
tags: []
---

# NNNN — <título>

## Contexto
<forças em jogo; o que tornou a decisão necessária>

## Decisão
<o que foi decidido, no imperativo>

## Alternativas consideradas
- **<alternativa>** — <por que não>

## Consequências
- <o que fica mais fácil / mais difícil; o que os gates passam a cobrar>

## Relacionados
- [[NNNN-outro-adr]]

affects é o que liga o ADR ao fluxo: o /plan, o G1 e o dev-implementer só leem ADRs accepted cujos globs casam com os arquivos tocados. ADR sem affects não é encontrado por ninguém — sempre preencha.

Subcomandos

  • new <título> — python3 ~/.claude/bin/adr-index.py next-id "$REPO" para o id. Pergunte contexto, decisão, alternativas e affects (proponha os globs a partir do código). Status proposed. Reindex.
  • accept <id> — proposed → accepted. Reindex.
  • supersede <id> <novo título> — cria o novo ADR com supersedes: [<id>]; no antigo, só troca status: superseded e superseded_by. Não edite o corpo do antigo. Reindex.
  • deprecate <id> — status: deprecated + uma linha em Consequências com o motivo. Reindex.
  • list — mostre o INDEX.md (reindex antes se estiver desatualizado).
  • show <id> — conteúdo + ADRs ligados por wikilink/supersedes.
  • reindex — python3 ~/.claude/bin/adr-index.py reindex "$REPO".
  • propose — usado pelo /complete: recebe decisões candidatas (do tot-plan e dos decisions do dev-implementer), descarta as triviais ou já cobertas por ADR existente, e cria as restantes como proposed. Mostre a lista e peça OK antes de gravar. Em submódulo, grave a lista em $WF_DIR/adr-candidates.md em vez de criar ADRs.

Regras

  • Nunca edite Decisão/Contexto de ADR accepted. Mudou → supersede.
  • Bootstrap num repo sem docs/adr/: crie a pasta e o INDEX.md vazio via reindex; não invente ADRs retroativos sem o usuário apontar as decisões.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.