home / skills / basher83 / lunar-claude / adr-methodology

This skill helps you create and evaluate architecture decisions using ADR methodologies, generating criteria, options matrices, and MADR-compliant ADRs.

npx playbooks add skill basher83/lunar-claude --skill adr-methodology

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
5.0 KB
---
name: adr-methodology
description: This skill should be used when the user asks to "create an ADR", "document an architecture decision", "compare architectural options", "generate assessment criteria", "analyze trade-offs", or mentions Architecture Decision Records, MADR templates, or decision matrices.
---

# ADR Methodology

Structured frameworks for documenting architectural decisions with human-in-the-loop AI assistance.

## Core Principle

AI handles drafting, formatting, and enumeration. Humans provide project-specific context, stakeholder awareness, and final decision accountability.

**AI assists with:**

- Research and enumeration of options
- Consistent formatting
- Risk/trade-off summarization
- Matrix generation

**Humans provide:**

- Project-specific context and constraints
- Stakeholder empathy and political nuance
- Final decision accountability

## Workflow Stages

### Stage 1: Context to Criteria (`/adr-assistant:new`)

Gather decision context and generate assessment criteria.

1. Ask for problem description, constraints, stakeholders, initial options
2. Select appropriate framework (Salesforce Well-Architected or Technical Trade-off)
3. Generate criteria grouped by framework pillars
4. For each criterion: name, rationale for this decision, definition of "good"
5. Write criteria to `.claude/adr-session.yaml`
6. Prompt user to refine criteria before analysis

### Stage 2: Options Matrix (`/adr-assistant:analyze`)

Evaluate options against criteria with risk ratings.

1. Read criteria from `.claude/adr-session.yaml`
2. For each option, rate against each criterion (Low/Medium/High risk)
3. Include rationale for each rating
4. Generate comparison matrix table
5. Write analysis to state file
6. Prompt user to refine ratings before generation

### Stage 3: ADR Generation (`/adr-assistant:generate`)

Output final ADR document using MADR template.

1. Read criteria and analysis from state file
2. Ask user which option they're choosing and why
3. Generate ADR with AI disclosure
4. Auto-detect next ADR number from `docs/adr/`
5. Write ADR file
6. Clear state file

## Assessment Frameworks

### Salesforce Well-Architected (Trusted/Easy/Adaptable)

Use for enterprise decisions with security, UX, and scale concerns.

**Trusted**: Data security, compliance, access control, audit/governance
**Easy**: User experience, deployment complexity, integration effort, maintenance
**Adaptable**: Scalability, future flexibility, cost trajectory, team skill alignment

### Technical Trade-off Framework

Use for infrastructure and tooling decisions.

**Operational**: Setup complexity, maintenance burden, monitoring, failure modes
**Development**: Learning curve, velocity, testing approach, documentation quality
**Integration**: Ecosystem compatibility, migration path, dependency management, lock-in risk

### Custom Framework

When neither standard framework fits:

1. Extract 3-5 key decision drivers from context
2. Create criteria that directly measure those drivers
3. Ensure criteria are evaluatable (not vague)
4. Include at least one "reversibility" criterion

## Risk Ratings

| Rating | Definition | Governance |
|--------|------------|------------|
| **Low** | Minimal risk to requirements, performance, or scale | Standard review |
| **Medium** | Manageable risk with proper governance | Documented mitigation |
| **High** | Significant risk without active mitigation | Explicit acceptance |

**Assign Low when**: Option aligns naturally, no significant trade-offs, team has experience, reversible
**Assign Medium when**: Trade-offs exist but manageable, requires discipline, some learning curve, partially reversible
**Assign High when**: Conflicts with requirement, requires significant mitigation, team lacks experience, hard to reverse

**Consistency rule**: At least one option should be Low or Medium for each criterion. If all options are High, the criterion may be a blocker rather than a trade-off.

## State File Format

State persists to `.claude/adr-session.yaml`:

```yaml
topic: "Database selection for user service"
status: "analyzed"  # new | criteria_defined | analyzed
framework: "technical"  # salesforce | technical | custom
criteria:
  - name: "Data consistency"
    pillar: "Operational"
    rationale: "ACID compliance needed for financial data"
    good_looks_like: "Full transaction support with rollback"
options:
  - name: "PostgreSQL"
    ratings:
      "Data consistency":
        risk: "Low"
        rationale: "Full ACID support, mature transaction handling"
```

## ADR Output Format

Use MADR template. Include AI disclosure section:

```markdown
## AI Disclosure

This ADR was drafted with AI assistance (Claude). Assessment criteria and
rationale were reviewed by decision-makers listed above. Final decision
made by humans.
```

## Additional Resources

### Reference Files

For detailed templates and frameworks, consult:

- **`references/templates.md`** - Complete ADR templates (MADR, Nygard, Y-statement)
- **`references/criteria-frameworks.md`** - Detailed assessment criteria by framework
- **`references/risk-ratings.md`** - Comprehensive risk rating guidelines

Overview

This skill helps teams create, analyze, and generate Architecture Decision Records (ADRs) using a structured, human-in-the-loop methodology. It standardizes criteria generation, option comparison, and final ADR drafting using MADR templates while preserving human accountability. The workflow supports reusable state across sessions to iterate on criteria, matrices, and the final decision document.

How this skill works

Start by collecting problem context, constraints, stakeholders, and candidate options. The skill selects an assessment framework (Salesforce Well-Architected, Technical Trade-off, or a custom set), generates evaluable criteria, and persists them to a session file. It then rates options against those criteria with risk levels and rationales, produces a comparison matrix, and finally generates a MADR-formatted ADR including an AI disclosure section. Humans are prompted to refine criteria, ratings, and the final choice at each stage.

When to use it

  • When asked to create an ADR or document an architectural decision
  • When comparing multiple architectural options or technologies
  • When you need structured assessment criteria or a decision matrix
  • When you want a MADR-compliant ADR draft with AI-assisted content
  • When you need to analyze trade-offs and assign risk ratings

Best practices

  • Provide clear project context, constraints, and stakeholder lists before analysis
  • Choose the framework that matches the decision scope (enterprise vs tooling)
  • Keep criteria specific and evaluable; include a reversibility criterion
  • Iterate: refine criteria first, then ratings, then finalize the ADR
  • Record rationale for every rating so decisions remain auditable

Example use cases

  • Selecting a primary database for a user service with ACID requirements
  • Evaluating managed cloud services vs self-hosted alternatives
  • Choosing a front-end framework balancing UX, developer velocity, and vendor lock-in
  • Creating organizational ADRs for security and compliance patterns
  • Generating assessment criteria for a migration or vendor selection project

FAQ

Who makes the final decision?

Humans do. The skill drafts analyses and ADRs; stakeholders must review and accept the final choice.

What frameworks are available?

Salesforce Well-Architected for enterprise concerns, a Technical Trade-off framework for infrastructure/tooling, and a Custom option to extract 3–5 decision drivers from context.

How are risks expressed?

Risks use Low/Medium/High ratings with documented rationale. At least one option should be Low or Medium per criterion to avoid blockers.