All skills
vercel avatar

/adr-skill

@e23d0b5 official
by vercelvercel/ai27k stars
5,232

Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses Socratic questioning to capture intent before drafting, and validates output against an agent-readiness checklist.

Use this Skill: https://skilld.dev/gh/vercel/ai/adr-skill

This session only. Nothing lands on disk.

referencesreview-checklist.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

ADR Review Checklist

Use this checklist in Phase 3 to validate an ADR before finalizing. The goal: could a coding agent read this ADR and start implementing the decision immediately, without asking any clarifying questions?

Agent-Readiness Checks

Context & Problem

  • A reader with no prior context can understand why this decision exists
  • The trigger is clear (what changed, broke, or is about to break)
  • No tribal knowledge is assumed — acronyms are defined, systems are named explicitly
  • Links to relevant issues, PRs, or prior ADRs are included

Decision

  • The decision is specific enough to act on (not "use a better approach" but "use X for Y")
  • Scope is bounded — what's in AND what's out (non-goals)
  • Constraints are explicit and measurable where possible (e.g., "< 200ms p95" not "fast enough")

Consequences

  • Each consequence is concrete and actionable, not aspirational
  • Follow-up tasks are identified (migrations, config changes, documentation, new tests)
  • Risks are stated with mitigation strategies or acceptance rationale
  • No consequence is a disguised restatement of the decision

Implementation Plan

  • Affected files/directories are named explicitly (not "the database code" but "src/db/client.ts")
  • Dependencies to add/remove are specified with version constraints
  • Patterns to follow reference existing code (not abstract descriptions)
  • Patterns to avoid are stated (what NOT to do)
  • Configuration changes are listed (env vars, config files, feature flags)
  • If replacing something, migration steps are described

Verification

  • Criteria are checkboxes, not prose
  • Each criterion is testable — an agent could write a test or run a command to check it
  • Criteria cover both "it works" (functional) and "it's done right" (structural/architectural)
  • No criterion is vague ("it performs well" → "p95 latency < 200ms under 100 concurrent requests")

Options (MADR template)

  • At least two options were genuinely considered (not just "do the thing" vs "do nothing")
  • Each option has real pros AND cons (not a straw-man comparison)
  • The justification for the chosen option references specific drivers or tradeoffs
  • Rejected options explain WHY they were rejected, not just what they are

Meta

  • Status is set correctly (usually proposed for new ADRs)
  • Date is set
  • Decision-makers are listed
  • Title is a verb phrase describing the decision (not the problem)
  • Filename follows repo conventions

Quick Scoring

Count the checked items. This isn't a gate — it's a conversation tool.

  • All checked: Ship it.
  • 1–3 unchecked: Discuss the gaps with the human. Most can be fixed in a minute.
  • 4+ unchecked: The ADR needs more work. Go back to Phase 1 for the fuzzy areas.

Common Failure Modes

Symptom Root Cause Fix
"Improve performance" as a consequence Vague intent Ask: "improve which metric, by how much, measured how?"
Only one option listed Decision already made, ADR is post-hoc Ask: "what did you reject and why?" — capture the reasoning
Context reads like a solution pitch Skipped problem framing Rewrite context as the problem, move solution to Decision
Consequences are all positive Cherry-picking Ask: "what gets harder? what's the maintenance cost?"
"We decided to use X" with no why Missing justification Ask: "why X over Y?" — the 'over Y' forces comparison
Implementation Plan says "update the code" Too abstract Ask: "which files, which functions, what pattern?"
Verification says "it works" Not testable Ask: "what command would you run to prove it works?"
No affected paths listed Implementation Plan is hand-wavy Agent should scan the codebase and propose specific paths

Source: SKILL.md on GitHub

1 warning4mo5 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill provides a structured framework and local utility scripts for maintaining Architecture Decision Records (ADRs) within a repository. It facilitates documentation through a specialized workflow and uses built-in Node.js modules for file management, operating entirely within the project's local environment without external dependencies or network activity.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

  • Runlayer6mo

    4/11 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e23d0b5. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 17 hours ago.

Activeupdated 5 months ago
metadata
{
  "internal": true
}

README badge

README badge for vercel/ai/adr-skill

Creates and maintains Architecture Decision Records optimized for AI coding agents, using Socratic questioning to capture intent and validating against an agent-readiness checklist. Use this when proposing architectural changes, bootstrapping an ADR folder, consulting existing decisions before implementing, or enforcing ADR conventions in agentic workflows.

Generated from the current SKILL.md.

What's the difference between this skill and a generic ADR template?
This skill optimizes ADRs specifically for agentic coding workflows by requiring an Implementation Plan with concrete file paths, patterns, and verification criteria that an AI agent can act on without follow-up questions. It includes a four-phase workflow with Socratic questioning and an agent-readiness review checklist.
When should I propose an ADR instead of just writing code?
Propose an ADR before introducing new dependencies, creating architectural patterns others will follow, choosing between real alternatives with non-obvious tradeoffs, or changing something that contradicts an existing ADR. Do not write ADRs for routine implementation choices, bug fixes, or decisions already captured elsewhere.
What happens if I skip a phase in the workflow?
Do not skip phases. Phase 0 gathers codebase context to prevent contradicting existing decisions. Phase 1 captures intent so you can fill every ADR section without guessing. Phase 2 drafts with the confirmed summary. Phase 3 validates against a checklist before finalizing.
How do I know when Phase 1 questioning is complete?
Stop when you can fill every ADR section—including the Implementation Plan—without making things up. Present an Intent Summary for the human to confirm or correct before moving to Phase 2.
What should the Implementation Plan contain?
The Implementation Plan must specify which files and directories are affected, which existing patterns to follow, what to avoid, which tests prove correctness, and how to verify the decision was implemented—so an agent can execute the decision without tribal knowledge.

Generated from the current SKILL.md. These answers refresh after source changes.