yonatankarp/software-design-skills

arch-adr

Use when recording an architectural decision so future maintainers know why — phrases like "ADR", "architecture decision record", "why did we pick X", "lightweight architecture documentation", "decision log", "should this be an ADR", "tribal knowledge", "we…

Vedi sorgente

Come usare

  1. Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
  2. Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
  3. Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/yonatankarp/software-design-skills --skill arch-adr

Prima di iniziare

  • L’installazione non include abbonamenti, quote API o accesso ai file.
  • Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

One-line summary

A short, structured document capturing one architectural decision: what was decided, why, what alternatives were rejected, and what consequences follow. Written at the moment of decision, lives in the repo forever.

When to use this skill

  • Any architectural choice that future maintainers will second-guess if they don't know the reasoning. Examples: picking a database, picking a messaging system, choosing hexagonal vs layered, picking microservices over monolith.
  • A decision whose alternatives were genuinely considered and rejected — capturing why is most valuable.
  • Onboarding: new joiners can read the ADR set to understand how the architecture got to its current state.

When NOT to use this skill

  • Tactical code-level decisions (using data class vs class, file organization) — these are too granular; the cost-of-writing exceeds the benefit.
  • Decisions that have no real alternatives (Java vs Python on a Python-only team is not a decision).
  • After-the-fact "let me write an ADR for this decision we made two years ago and don't remember the reasoning for" — the value is in the timestamp; back-dating is worth less.

Core content

Standard ADR structure (Michael Nygard's original template):

  • Title. A short noun phrase. "Use PostgreSQL as the primary store" or "Adopt hexagonal architecture for the order service".
  • Status. proposed / accepted / deprecated / superseded by ADR-NNN.
  • Context. What's the situation, the forces, the constraints? Why is this decision needed now?
  • Decision. What did we decide. Stated as a positive assertion ("We will…"), not as discussion ("We're thinking about…").
  • Consequences. What follows from this decision — good and bad. Forces it commits us to. New problems it creates.
  • (Optional) Alternatives considered. What else was on the table; why each was rejected.

File layout.

docs/adr/
├── 0001-use-postgresql.md
├── 0002-adopt-hexagonal-architecture.md
├── 0003-event-bus-via-rabbitmq.md
├── 0004-replace-rabbitmq-with-kafka.md  (supersedes 0003)
└── README.md      ← index of ADRs

Numbering is sequential and never reused. When an ADR is replaced, the new ADR references the old one and the old one's status becomes superseded by ADR-NNN. The old ADR stays in the tree — the history is the point.

Length. A single page. If an ADR is two pages, it's probably making two decisions and should be split.

Tooling. adr-tools (shell), adr-manager, MADR template, Log4brains — all generate / index ADRs. Useful at scale; markdown by hand works fine for small teams.

Living document vs decision log. ADRs are decision logs — immutable once accepted. The "living document" is something else (the README, the architecture diagram). Don't update an ADR's decision text; supersede it with a new ADR.

Decision heuristics

  • Write the ADR before implementing the decision. Forces clarity.
  • Write the ADR even if the decision feels obvious — "obvious" often means "I'm not thinking carefully about it".
  • Keep alternatives short but specific. "We considered Kafka but rejected it because we don't have streaming use cases yet."
  • Numbers are sequential and immutable. Don't re-number. Don't reuse a deleted number.
  • ADRs live in the repo, not a wiki. They're versioned, reviewed, and travel with the code.

Anti-patterns

  • Architecture wiki page. Drifts immediately. Doesn't survive team turnover. Reviewers don't read it.
  • ADRs written after the fact, for decisions nobody remembers. Time-stamps matter. Backfilling has limited value.
  • ADRs that hide the alternatives section. Most of the value is in why we rejected X. Without it, the ADR is just a declaration.
  • Updating an old ADR's decision text. Breaks the historical record. Supersede instead.
  • Hundreds of ADRs for tactical decisions. ADRs are architectural; not every file-organization choice deserves one. Keep the bar high enough that the set stays readable.

See also

  • arch-fitness-functions — fitness functions enforce what; ADRs document why. Pair them.
  • All other arch-* skills — most architectural decisions deserve an ADR.

References

  • Michael Nygard, "Documenting Architecture Decisions" (2011 essay) — original ADR articulation.
  • MADR template — modern markdown ADR template.
  • adr-tools — Joel Parker Henderson's shell tool.
  • Richards & Ford, Fundamentals of Software Architecture, Ch. 19 (Architecture Decisions).

Correlati per attività

dallo stesso repository

Altri Skills

Tutti gli Skills
yonatankarp
Community

arch-fitness-functions

Use when enforcing architectural characteristics through automation — phrases like "architecture fitness function", "evolutionary architecture", "architecture tests", "ArchUnit", "dependency rules in CI", "automated architecture checks", "guardrails", "drift detection". Defines fitness functions as automated checks that verify architectural characteristics on every change, catching drift before it accumulates.

installazioni
2
GitHub Stars
1
Aggiornato
19 mag
yonatankarp
Community

arch-microservices

Use when designing or reviewing a microservices architecture — phrases like "microservices", "should we split this service", "service boundaries", "bounded context per service", "API gateway", "backend for frontend", "BFF", "service mesh", "microservices vs monolith", "database per service", "data ownership". Defines microservices as independently deployable services aligned with business capabilities — and the discipline of resisting the style until the monolith proves inadequate.

installazioni
2
GitHub Stars
1
Aggiornato
19 mag
yonatankarp
Community

arch-strangler-fig

Use when migrating a legacy system incrementally — phrases like "strangler fig", "strangler pattern", "incremental migration", "monolith to microservices", "rewrite without big bang", "replace legacy in place", "facade in front of the legacy system", "anticorruption layer". Defines Fowler's Strangler Fig as the migration discipline of gradually replacing legacy functionality behind a stable facade, never doing a big-bang rewrite.

installazioni
2
GitHub Stars
1
Aggiornato
19 mag
yonatankarp
Community

ddd-aggregate

Use when designing or critiquing aggregate boundaries — phrases like "aggregate", "aggregate root", "should these be one entity or two", "consistency boundary", "transactional consistency", "this aggregate is huge", "should I reference by ID or by object". Defines aggregates as transactional consistency boundaries and the rules for entity references within and across them.

installazioni
2
GitHub Stars
1
Aggiornato
19 mag