dot_claude/skills/architecture-decision-records/SKILL.md
Use when making any significant architectural decision - framework selection, infrastructure change, API design choice, database selection, pattern adoption - to record the decision in MADR format with full context, alternatives, and rationale so future engineers understand WHY | 重要なアーキテクチャ上の意思決定(フレームワーク選定、インフラ変更、API設計選択、データベース選定、パターン採用)を行う際に使用 - MADR形式で完全なコンテキスト、代替案、根拠を記録し、将来のエンジニアがなぜその決定をしたか理解できるようにする
npx skillsauth add lv416e/dotfiles architecture-decision-recordsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Architectural decisions made in hallways, Slack threads, and "let's just go with X" moments vanish. Six months later nobody remembers why PostgreSQL over DynamoDB, why REST over gRPC, why that particular auth pattern. Engineers reverse-engineer intent from code that was never designed to explain itself.
Core principle: EVERY architectural decision gets written down with context, alternatives, and consequences. No exceptions.
If you didn't record it, you didn't decide it. You just happened to do something.
Announce at start: "I'm using the architecture-decision-records skill to document this decision."
Save ADRs to: docs/adr/NNNN-title-in-kebab-case.md
EVERY ARCHITECTURAL DECISION GETS RECORDED WITH ALTERNATIVES AND RATIONALE
If there were no alternatives considered, you didn't make a decision. You drifted.
Write an ADR for ANY of these:
Use this ESPECIALLY when:
Don't skip when:
Use Markdown Architecture Decision Records. Every ADR follows this structure exactly.
# NNNN: [Decision Title]
**Status:** [Proposed | Accepted | Deprecated | Superseded by NNNN]
**Date:** YYYY-MM-DD
**Deciders:** [List people involved in the decision]
## Context
[What is the issue? What forces are at play? What constraints exist?
Write this so someone with ZERO project context understands the problem.
2-4 paragraphs. No jargon without explanation.]
## Decision
[What is the change being proposed or decided?
State it clearly in 1-3 paragraphs. Be specific about WHAT, not just "we chose X."
Include configuration, integration points, migration path if relevant.]
## Consequences
### Positive
- [What becomes easier or better]
- [What problems does this solve]
### Negative
- [What becomes harder]
- [What new constraints does this create]
- [What operational burden does this add]
### Neutral
- [Trade-offs that are neither clearly good nor bad]
- [Things that change but don't improve or worsen]
## Alternatives Considered
### Alternative 1: [Name]
- **Description:** [What this option would look like]
- **Pros:** [Why this was attractive]
- **Cons:** [Why we didn't choose this]
- **Reason rejected:** [One clear sentence]
### Alternative 2: [Name]
- **Description:** [What this option would look like]
- **Pros:** [Why this was attractive]
- **Cons:** [Why we didn't choose this]
- **Reason rejected:** [One clear sentence]
### Alternative 3: Do Nothing
- **Description:** [Keep current approach]
- **Pros:** [No migration cost, known behavior]
- **Cons:** [Why status quo is insufficient]
- **Reason rejected:** [One clear sentence]
## References
- [Links to relevant docs, RFCs, benchmarks, prior art]
- [Related ADRs: NNNN, NNNN]
ADRs are immutable records. They move through states, never get deleted.
Proposed → Accepted → [Deprecated | Superseded]
| Status | Meaning | |--------|---------| | Proposed | Under discussion, not yet agreed upon | | Accepted | Team agreed, this is the current approach | | Deprecated | No longer relevant (technology retired, feature removed) | | Superseded by NNNN | Replaced by a newer decision; link to the new ADR |
Rules:
docs/adr/0001-use-postgresql-for-primary-datastore.md
docs/adr/0002-adopt-rest-over-grpc-for-public-api.md
docs/adr/0003-migrate-ci-from-jenkins-to-github-actions.md
Rules:
docs/adr/index.md listing all ADRs with status# Architecture Decision Records
| ADR | Title | Status | Date |
|-----|-------|--------|------|
| [0001](0001-use-postgresql-for-primary-datastore.md) | Use PostgreSQL for primary datastore | Accepted | 2025-03-15 |
| [0002](0002-adopt-rest-over-grpc-for-public-api.md) | Adopt REST over gRPC for public API | Accepted | 2025-04-02 |
| [0003](0003-migrate-ci-from-jenkins-to-github-actions.md) | Migrate CI from Jenkins to GitHub Actions | Proposed | 2025-04-10 |
Decisions mean nothing if engineers can't find them when working on the code they govern.
# Architecture: See ADR-0001 for why PostgreSQL over DynamoDB
connection = psycopg2.connect(...)
# Architecture: See ADR-0007 for retry strategy rationale
@retry(max_attempts=3, backoff=exponential)
def call_external_service():
...
feat: add Redis caching layer for user sessions
Implements caching strategy from ADR-0012.
Uses write-through pattern with 15-minute TTL.
## Related ADRs
- Implements ADR-0012 (Redis caching strategy)
- Relates to ADR-0008 (session management approach)
# Architecture: ADR-0003 - GitHub Actions chosen over Jenkins
# See docs/adr/0003-migrate-ci-from-jenkins-to-github-actions.md
name: CI Pipeline
on: [push, pull_request]
Before writing anything:
Is this actually an architectural decision?
Check existing ADRs
docs/adr/index.mdGather context
You MUST consider at least two alternatives plus "do nothing":
Research genuinely viable options
Evaluate honestly
Always include "Do Nothing"
BAD: Ship feature → months later → "we should document why we chose X"
GOOD: Identify decision point → write ADR → implement decision
The ADR is written BEFORE or DURING implementation, never after. Memory is unreliable. Context is lost. Alternatives are forgotten.
BAD: "We decided to use Kafka." (Why? Over what? What did you consider?)
GOOD: "We decided to use Kafka over RabbitMQ and SQS because..."
An ADR without alternatives is a press release, not a decision record.
BAD: "We need a message queue."
GOOD: "Our order processing pipeline currently processes events synchronously,
causing 500ms p99 latency. We need asynchronous event processing that
handles 5,000 events/second with at-least-once delivery guarantees."
Context must include specific constraints, numbers, and requirements. If you can't articulate the problem precisely, you're not ready to make the decision.
BAD: Writing the ADR after the decision is already implemented and irreversible
GOOD: Writing the ADR when the decision is still open for discussion
If the ADR is Proposed but everyone knows the code is already merged, the process is theater. Write ADRs when they can still influence the outcome.
BAD: Consequences: "This will work well for our use case."
GOOD: Consequences:
Positive: Handles our 5K events/sec requirement with headroom
Negative: Adds operational complexity (ZooKeeper cluster management),
team has no Kafka experience (2-week ramp-up estimated)
Every decision has negative consequences. If you can't list any, you haven't thought hard enough.
| Excuse | Reality | |--------|---------| | "Everyone knows why we chose this" | They won't in 6 months. New hires never will. | | "It's obvious, no need to document" | If it's obvious, the ADR takes 10 minutes. Write it. | | "We can always change it later" | Without the ADR, nobody will know when or why to change it. | | "Too busy shipping features" | Re-debating undocumented decisions wastes more time than writing ADRs. | | "It's just a library choice" | Libraries shape architecture. If you debated it, record it. | | "We'll document it in the wiki" | Wikis are where decisions go to die. ADRs live with the code. | | "The PR description explains it" | PRs explain WHAT changed. ADRs explain WHY this approach over others. | | "Only two of us, we'll remember" | You won't. And you won't always be two. |
| Phase | Key Activities | Success Criteria | |-------|---------------|------------------| | 1. Identify | Confirm decision point, check existing ADRs, gather context | Clear problem statement with constraints | | 2. Research | Evaluate alternatives, gather evidence, include "do nothing" | At least 3 options fairly evaluated | | 3. Write | Draft ADR, review for completeness, get team input | New engineer could understand without asking questions |
This skill works with:
Workflow:
Brainstorm → ADR (capture decision) → Plan (implement decision) → Documentation (explain system)
From teams that adopted ADRs:
development
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization | 新しいスキルの作成、既存スキルの編集、またはデプロイ前にスキルが機能するか検証する際に使用 - プロセスドキュメントにTDDを適用し、記述前にサブエージェントでテストし、合理化に対して堅牢になるまで反復
development
Use when design is complete and you need detailed implementation tasks for engineers with zero codebase context - creates comprehensive implementation plans with exact file paths, complete code examples, and verification steps assuming engineer has minimal domain knowledge | 設計が完了し、コードベースの知識がゼロのエンジニア向けに詳細な実装タスクが必要な場合に使用 - 正確なファイルパス、完全なコード例、検証ステップを含む包括的な実装計画を作成。エンジニアの領域知識が最小限であることを前提
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.