adr-writer
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/mathews-tom/praxis-skills --skill adr-writer
Agent 安装分布
amp
1
cline
1
pi
1
opencode
1
cursor
1
kimi-cli
1
Skill 文档
ADR Writer
Captures architecture decisions in a lightweight, structured format that preserves context, rationale, alternatives, and consequences. Produces numbered ADR documents with proper status lifecycle â preventing the “why did we do it this way?” problem when revisiting decisions months later.
Reference Files
| File | Contents | Load When |
|---|---|---|
references/adr-template.md |
Standard ADR template with field explanations and examples | Always |
references/status-lifecycle.md |
Status transitions, supersession rules, deprecation process | ADR references existing decisions |
references/context-capture.md |
Techniques for eliciting and documenting decision context | Complex or multi-stakeholder decision |
references/alternatives-analysis.md |
Framework for evaluating and documenting rejected alternatives | Multiple options being considered |
Prerequisites
- A decisions directory (typically
docs/adr/ordocs/decisions/) - Understanding of the decision being made (may require clarifying questions)
Workflow
Phase 1: Identify the Decision
- What choice was made? â Extract the core architectural decision. If the user describes a problem, help them articulate the decision that resolves it.
- Is this decision-worthy? â ADRs are for decisions that:
- Affect system structure (component boundaries, data flow, API design)
- Are hard to reverse (technology choice, database schema, protocol)
- Have non-obvious tradeoffs (multiple viable alternatives)
- Will be questioned later (the “why” will be forgotten)
- What triggered this decision? â New requirement, performance issue, scaling concern, security audit finding, tech debt, team growth.
Phase 2: Capture Context
Document the forces that shaped this decision:
- Requirements â What functional or non-functional requirements drive this?
- Constraints â What limits the solution space? (budget, timeline, team expertise, existing infrastructure, regulatory requirements)
- Current state â What exists today? What is the pain point?
- Stakeholders â Who is affected by this decision? Who needs to agree?
Phase 3: Enumerate Alternatives
For each alternative considered:
- Name it clearly â “PostgreSQL” not “Option A”
- List concrete pros â Specific, measurable benefits
- List concrete cons â Specific, measurable drawbacks
- State the rejection reason â Why this alternative was not chosen. Be specific: “Does not support our required throughput of 10K ops/sec” not “Too slow.”
Phase 4: Document the Decision
State the chosen option and why it was selected given the context and constraints. The decision should follow logically from the context + alternatives analysis.
Phase 5: Project Consequences
Document what this decision makes easier and harder:
- Positive consequences â What improves?
- Negative consequences â What tradeoffs are accepted? What tech debt is incurred?
- Neutral consequences â Side effects that are neither good nor bad.
Phase 6: Assign Metadata
- Number â Sequential: ADR-001, ADR-002, etc. Check existing ADRs for the next number.
- Status â Initial status is usually “Proposed” or “Accepted”
- Date â Date the ADR was written
- Author â Who authored this ADR
- Supersedes/Superseded-by â Link to related ADRs if this replaces an earlier decision
Output Format
# ADR-{NNN}: {Descriptive Title}
**Status:** {Proposed | Accepted | Deprecated | Superseded by ADR-XXX}
**Date:** {YYYY-MM-DD}
**Author:** {name}
**Supersedes:** {ADR-XXX (if applicable)}
## Context
{What situation requires a decision? What constraints exist? What forces are at play?
Write in present tense â describe the situation as it exists at decision time.}
## Decision
{State the decision clearly and concisely. "We will use X for Y because Z."
One to three sentences. The reader should understand the decision without reading
the rest of the document.}
## Alternatives Considered
### {Alternative 1 Name}
- **Pros:** {specific benefits}
- **Cons:** {specific drawbacks}
- **Rejected because:** {concrete, specific reason tied to context}
### {Alternative 2 Name}
- **Pros:** {specific benefits}
- **Cons:** {specific drawbacks}
- **Rejected because:** {concrete, specific reason tied to context}
## Consequences
### Positive
- {Concrete benefit 1}
- {Concrete benefit 2}
### Negative
- {Concrete tradeoff 1 â acknowledged and accepted}
- {Technical debt incurred â with plan to address if applicable}
### Neutral
- {Side effect that is neither positive nor negative}
## References
- {Link to related issue, discussion, document, or prior ADR}
Calibration Rules
- Context is king. The Context section is the most important part. A decision without context is just an assertion. Future readers need to understand WHY, not just WHAT.
- Specific rejection reasons. “Not suitable” is not a rejection reason. “Does not support transactions across partitions, which we need for order processing” is.
- Honest consequences. Every decision has downsides. If the Negative section is empty, the analysis is incomplete. Push the user to articulate tradeoffs.
- Present tense for context. Write the Context section in present tense â it captures the world as it was when the decision was made.
- One decision per ADR. If multiple decisions are interrelated, write separate ADRs and cross-reference them. Do not bundle unrelated decisions.
- Immutable after acceptance. Accepted ADRs are not edited. If a decision changes, write a new ADR that supersedes the old one. This preserves the historical record.
Error Handling
| Problem | Resolution |
|---|---|
| User cannot articulate alternatives | Help them brainstorm by asking: “What else could you have done? What did you consider and reject?” |
| Decision is trivial (no real alternatives) | Suggest it doesn’t need an ADR. ADRs are for non-obvious decisions with tradeoffs. |
| Decision already made, no context remembered | Reconstruct context from code, PRs, commit history. Note reconstructed context as “best available.” |
| Existing ADR numbering scheme unknown | Check docs/adr/ or docs/decisions/. If no directory exists, suggest creating one and starting at 001. |
| Decision scope is too broad | Split into multiple focused ADRs. One for the database choice, one for the caching strategy, etc. |
When NOT to Write an ADR
Push back if:
- The decision is easily reversible (library version, code formatting rules) â use a comment or config instead
- The decision is a standard practice with no alternatives (use HTTPS, validate input) â not decision-worthy
- The user wants to document implementation details â ADRs are for WHY decisions, not HOW implementations
- The decision has already been superseded â write the new ADR, not the old one