andrewbrown-usda/aigb-skills-usda/adr-distillation
Claude Code and agent skill by andrewbrown-usda/aigb-skills-usda
- community
Checking that the SKILL.md file is still in the repository.
Distills enduring architectural decisions and design rationale from wave orchestration plans or historical git changes into structured, tracked Architecture Decision Records (ADRs). Use pre-wave to resolve active architectural constraints or post-wave to record enduring decisions in docs/decisions/.
Install
npx vskill@latest install andrewbrown-usda/aigb-skills-usda/adr-distillationSKILL.md
The same SKILL.md was published earlier as andrewbrown-usda/aigb-skills-usda/adr-distillation.
ADR Distillation: Formalize Living Architecture Decisions
Captures and formalizes enduring system architecture decisions into tracked, standardized Architecture Decision Records (ADRs). Bridges the gap between incremental, often disposable planning artifacts (planning/) and the long-term repository truth recorded under docs/decisions/.
Inspired by Michael Nygard's ADR format, Markdown Architectural Decision Records (MADR), and Martin Fowler's ADR guidance.
When to Use
- Pre-Implementation (Reconnaissance & Pre-Step): During
plan-waveor task inception, to inspect active architectural decisions and resolve conflicts or explicit superseding intent before code is written. - Post-Implementation (Wave Completion & Post-Step): After a wave completes or milestone is reached, to extract enduring architectural choices from grilling logs (
EXECUTION_PLAN_N.md), runtime deviations (STATE_N.md), or git history before context compaction or plan cleanup. - Repository History Mining (Scaffold-Free Mode): In projects without
planning/scaffolds, by clustering commit histories, diffs, and PR discussions across milestones to construct a retroactive architectural timeline.
The Heuristic Filter: Architecture vs. Transient Churn
ADRs must represent living, long-term system design rather than task checklists. Before minting an ADR, ensure the decision satisfies at least two criteria:
- High Reversibility Cost: Changing or undoing this choice requires substantial multi-module refactoring or data migration (e.g., database selection, framework change, CLI dispatch paradigm).
- Pattern-Setting: The decision establishes a precedent or convention that future waves and agents must adhere to (e.g., standardizing on YAML frontmatter, Node >=18 engine constraints, zero-network user installation).
- Cross-Cutting Boundary: Affects multiple components, public APIs, shared data contracts, or repository boundaries.
- Evaluated Trade-Offs: Consciously accepted specific downsides to gain strategic benefits (e.g., increased disk usage for offline availability).
What NOT to Record in an ADR:
- Checkbox completions from task micro-plans (
tasks/N.W.id.todo.md). - Targeted test run logs, failure counts, or execution times.
- Local refactoring of private helper functions or variable naming.
- Temporary worker model escalations (e.g., Haiku to Sonnet).
Operational Modes
Mode A: Planning Scaffold Mode (planning/ Artifacts)
Used when working within plan-wave and wave-orchestration:
- Inputs:
planning/EXECUTION_PLAN_N.md: Phase 1 Goal & Scope, Phase 3 Grilling Decision Log.planning/STATE_N.md: Deviations from approved plan, gotchas, unexpected edge cases.planning/tasks/N.W.id.todo.md: Micro-plan structural discoveries.
- Extraction:
- Extract the problem context from Phase 1.
- Extract options considered and chosen rationale from Phase 3 dated decision lines.
- Incorporate unexpected runtime discoveries from
STATE_N.mdwave reports.
Mode B: Git History Mode (Scaffold-Free Mining)
Used in repositories that do not use incremental planning documents, or for retroactive documentation:
- Inputs:
- Commit history:
git log --reverse --patch [rev-range] - Dependency manifests (
package.json,Cargo.toml,go.mod,pyproject.toml). - PR discussion summaries and commit message bodies.
- Extraction:
- Cluster commits by architectural pivot points (new dependencies, structural reorganizations, interface changes).
- Mine commit message bodies for the problem context and rationale.
- Formulate ADR drafts based on the structural diffs.
Bidirectional Lifecycle: Pre-Step and Post-Step
1. Pre-Step: Reconnaissance & Resolution (plan-wave)
Before writing code or locking task DAGs:
- Ingest Active Decisions: Read
docs/decisions/README.mdand inspect all records wherestatus: Accepted. - Inject Constraints: Feed active ADR requirements directly into task specs as non-negotiable constraints.
- Resolve Divergences Upfront: If the user's request conflicts with an active ADR, do not silently proceed. Grill the user:
> "ADR-[ID] specifies [Current Choice]. The proposed goal requires [New Choice]. Does this plan supersede ADR-[ID], or should we adapt the plan to comply with ADR-[ID]?"
- Record Superseding Intent: If the user intends to supersede, document it in
EXECUTION_PLAN_N.mdso the post-step knows to update the link.
2. Post-Step: Distillation & Living Index Update (wave-orchestration)
After wave execution passes verification and before compaction:
- Filter & Draft: Pass wave state and diffs through the Heuristic Filter.
- Mint Sequential ADR: Create
docs/decisions/NNNN-<kebab-case-title>.md. - Update Superseded Records:
- In the newly created ADR: set
supersedes: "[OLD-ID]". - In the prior ADR: set
status: Superseded,superseded_by: "[NEW-ID]".
- Update Index: Re-render the living catalog table in
docs/decisions/README.md. - Commit: Ensure
docs/decisions/changes are committed to version control.
ADR Document Format
Records are stored in docs/decisions/NNNN-<slug>.md using standard YAML frontmatter and MADR-compatible sections:
Living Catalog Index (docs/decisions/README.md)
Maintain an at-a-glance status table representing the current state of system architecture:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/adr-distillation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/andrewbrown-usda/aigb-skills-usda/adr-distillation)