Установка
SKILL.md
ADR Skill
Philosophy
ADRs created with this skill are executable specifications for coding agents. A human approves the decision; an agent implements it. The ADR must contain everything the agent needs to write correct code without asking follow-up questions.
This means:
- Constraints must be explicit and measurable, not vibes
- Decisions must be specific enough to act on ("use PostgreSQL 16 with pgvector" not "use a database")
- Consequences must map to concrete follow-up tasks
- Non-goals must be stated to prevent scope creep
- The ADR must be self-contained — no tribal knowledge assumptions
- The ADR must include an implementation plan — which files to touch, which patterns to follow, which tests to write, and how to verify the decision was implemented correctly
When to Write an ADR
Write an ADR when a decision:
- Changes how the system is built or operated (new dependency, architecture pattern, infrastructure choice, API design)
- Is hard to reverse once code is written against it
- Affects other people or agents who will work in this codebase later
- Has real alternatives that were considered and rejected
Do NOT write an ADR for:
- Routine implementation choices within an established pattern
- Bug fixes or typo corrections
- Decisions already captured in an existing ADR (update it instead)
- Style preferences already covered by linters or formatters
When in doubt: if a future agent working in this codebase would benefit from knowing why this choice was made, write the ADR.
Proactive ADR Triggers (For Agents)
If you are an agent coding in a repo and you encounter any of these situations, stop and propose an ADR before continuing:
- You are about to introduce a new dependency that doesn't already exist in the project
- You are about to create a new architectural pattern (new way of handling errors, new data access layer, new API convention) that other code will need to follow
- You are about to make a choice between two or more real alternatives and the tradeoffs are non-obvious
- You are about to change something that contradicts an existing accepted ADR
- You realize you're writing a long code comment explaining "why" — that reasoning belongs in an ADR
How to propose: Tell the human what decision you've hit, why it matters, and ask if they want to capture it as an ADR. If yes, run the full four-phase workflow. If no, note the decision in a code comment and move on.
Creating an ADR: Four-Phase Workflow
Every ADR goes through four phases. Do not skip phases.
Phase 0: Scan the Codebase
Before asking any questions, gather context from the repo:
-
Find existing ADRs. Check
contributing/decisions/,docs/decisions/,adr/,docs/adr/,decisions/for existing records. Read them. Note:- Existing conventions (directory, naming, template style)
- Decisions that relate to or constrain the current one
- Any ADRs this new decision might supersede
-
Check the tech stack. Read
package.json,go.mod,requirements.txt,Cargo.toml, or equivalent. Note relevant dependencies and versions. -
Find related code patterns. If the decision involves a specific area (e.g., "how we handle auth"), scan for existing implementations. Identify the specific files, directories, and patterns that will be affected by the decision.
-
Check for ADR references in code. Look for ADR references in comments and docs (see "Code ↔ ADR Linking" below). This reveals which existing decisions govern which parts of the codebase.
-
Note what you found. Carry this context into Phase 1 — it will sharpen your questions and prevent the ADR from contradicting existing decisions.
Phase 1: Capture Intent (Socratic)
Interview the human to understand the decision space. Ask questions one at a time, building on previous answers. Do not dump a list of questions.
Core questions (ask in roughly this order, skip what's already clear from context or Phase 0):
- What are you deciding? — Get a short, specific title. Push for a verb phrase ("Choose X", "Adopt Y", "Replace Z with W").
- Why now? — What broke, what's changing, or what will break if you do nothing? This is the trigger.
- What constraints exist? — Tech stack, timeline, budget, team size, existing code, compliance. Be concrete. Reference what you found in Phase 0 ("I see you're already using X — does that constrain this?").
- What does success look like? — Measurable outcomes. Push past "it works" to specifics (latency, throughput, DX, maintenance burden).
- What options have you considered? — At least two. For each: what's the core tradeoff? If they only have one option, help them articulate why alternatives were rejected.
- What's your current lean? — Capture gut intuition early. Often reveals unstated priorities.
- Who needs to know or approve? — Decision-makers, consulted experts, informed stakeholders.
- What would an agent need to implement this? — Which files/directories are affected? What existing patterns should it follow? What should it avoid? What tests would prove it's working? This directly feeds the Implementation Plan.
Adaptive follow-ups: Based on answers, probe deeper where the decision is fuzzy. Common follow-ups:
- "What's the worst-case outcome if this decision is wrong?"
- "What would make you revisit this in 6 months?"
- "Is there anything you're explicitly choosing NOT to do?"
- "What prior art or existing patterns in the codebase does this relate to?"
- "I found [existing ADR/pattern] — does this new decision interact with it?"
When to stop: You have enough when you can fill every section of the ADR — including the Implementation Plan — without making things up. If you're guessing at any section, ask another question.
Intent Summary Gate: Before moving to Phase 2, present a structured summary of what you captured and ask the human to confirm or correct it:
Here's what I'm capturing for the ADR:
- Title: {title}
- Trigger: {why now}
- Constraints: {list}
- Options: {option 1} vs {option 2} [vs ...]
- Lean: {which option and why}
- Non-goals: {what's explicitly out of scope}
- Related ADRs/code: {what exists that this interacts with}
- Affected files/areas: {where in the codebase this lands}
- Verification: {how we'll know it's implemented correctly}
Does this capture your intent? Anything to add or correct?
Do NOT proceed to Phase 2 until the human confirms the summary.
Phase 2: Draft the ADR
-
Choose the ADR directory.
- If one exists (found in Phase 0), use it.
- If none exists, create
contributing/decisions/(ifcontributing/exists),docs/decisions/(MADR default), oradr/(simpler repos).
-
Choose a filename strategy.
- If existing ADRs use date prefixes (
YYYY-MM-DD-...), continue that. - Otherwise use slug-only filenames (
choose-database.md).
- If existing ADRs use date prefixes (
-
Choose a template.
- Use
assets/templates/adr-simple.mdfor straightforward decisions (one clear winner, minimal tradeoffs). - Use
assets/templates/adr-madr.mdwhen you need to document multiple options with structured pros/cons/drivers. - See
references/template-variants.mdfor guidance.
- Use
-
Fill every section from the confirmed intent summary. Do not leave placeholder text. Every section should contain real content or be removed (optional sections only).
-
Write the Implementation Plan. This is the most important section for agent-first ADRs. It tells the next agent exactly what to do. See the template for structure.
-
Write Verification criteria as checkboxes. These must be specific enough that an agent can programmatically or manually check each one.
-
Generate the file.
- Preferred: run
scripts/new_adr.js(handles directory, naming, and optional index updates). - If you can't run scripts, copy a template from
assets/templates/and fill it manually.
- Preferred: run
Phase 3: Review Against Checklist
After drafting, review the ADR against the agent-readiness checklist in references/review-checklist.md.
Present the review as a summary, not a raw checklist dump. Format:
ADR Review
✅ Passes: {list what's solid — e.g., "context is self-contained, implementation plan covers affected files, verification criteria are checkable"}
⚠️ Gaps found:
- {specific gap 1 — e.g., "Implementation Plan doesn't mention test files — which test suite should cover this?"}
- {specific gap 2}
Recommendation: {Ship it / Fix the gaps first / Needs more Phase 1 work}
Only surface failures and notable strengths — do not recite every passing checkbox.
If there are gaps, propose specific fixes. Do not just flag problems — offer solutions and ask the human to approve.
Do not finalize until the ADR passes the checklist or the human explicitly accepts the gaps.
Consulting ADRs (Read Workflow)
Agents should read existing ADRs before implementing changes in a codebase that has them. This is not part of the create-an-ADR workflow — it's a standalone operation any agent should do.
When to Consult ADRs
- Before starting work on a feature that touches architecture (auth, data layer, API design, infrastructure)
- When you encounter a pattern in the code and wonder "why is it done this way?"
- Before proposing a change that might contradict an existing decision
- When a human says "check the ADRs" or "there's a decision about this"
- When you find an ADR reference in a code comment
How to Consult ADRs
-
Find the ADR directory. Check
contributing/decisions/,docs/decisions/,adr/,docs/adr/,decisions/. Also check for an index file (README.mdorindex.md). -
Scan titles and statuses. Read the index or list filenames. Focus on
acceptedADRs — these are active decisions. -
Read relevant ADRs fully. Don't just read the title — read context, decision, consequences, non-goals, AND the Implementation Plan. The Implementation Plan tells you what patterns to follow and what files are governed by this decision.
-
Respect the decisions. If an accepted ADR says "use PostgreSQL," don't propose switching to MongoDB without creating a new ADR that supersedes it. If you find a conflict between what the code does and what the ADR says, flag it to the human.
-
Follow the Implementation Plan. When implementing code in an area governed by an ADR, follow the patterns specified in its Implementation Plan. If the plan says "all new queries go through the data-access layer in
src/db/," do that. -
Reference ADRs in your work. Add ADR references in code comments and PR descriptions (see "Code ↔ ADR Linking" below).
Code ↔ ADR Linking
ADRs should be bidirectionally linked to the code they govern.
ADR → Code (in the Implementation Plan)
The Implementation Plan section names specific files, directories, and patterns:
## Implementation Plan
- **Affected paths**: `src/db/`, `src/config/database.ts`, `tests/integration/`
- **Pattern**: all database queries go through `src/db/client.ts`
Code → ADR (in comments)
When implementing code guided by an ADR, add a comment referencing it:
// ADR: Using better-sqlite3 for test database
// See: docs/decisions/2025-06-15-use-sqlite-for-test-database.md
import Database from 'better-sqlite3';
Keep these lightweight — one comment at the entry point, not on every line. The goal is discoverability: when a future agent reads this code, they can find the reasoning.
Why This Matters
- An agent working in
src/db/can find which ADRs govern that area - An agent reading an ADR can find the code that implements it
- When an ADR is superseded, the code references make it easy to find all code that needs updating
Other Operations
Update an Existing ADR
-
Identify the intent:
- Accept / reject: change status, add any final context.
- Deprecate: status →
deprecated, explain replacement path. - Supersede: create a new ADR, link both ways (old → new, new → old).
- Add learnings: append to
## More Informationwith a date stamp. Do not rewrite history.
-
Use
scripts/set_adr_status.jsfor status changes (supports YAML front matter, bullet status, and section status).
Post-Acceptance Lifecycle
После принятия ADR:
- Создайте задачи на реализацию. Каждый пункт в Implementation Plan и каждый follow-up в Consequences должен стать отслеживаемой задачей (issue, тикет или TODO).
- Ссылайтесь на ADR в PR. Указывайте ссылку на ADR в описаниях PR, например "Implements
contributing/decisions/2025-06-15-use-sqlite-for-test-database.md." - Добавьте ссылки в коде. Добавляйте комментарии с путём к ADR в ключевых точках реализации.
- Проверьте критерии верификации. После завершения реализации пройдитесь по чекбоксам Verification. Обновите ADR результатами в
## More Information. - Возвращайтесь к ADR при срабатывании триггеров. Если в ADR указаны условия пересмотра ("если произойдёт X, пересмотреть"), следите за этими условиями.
Индекс
Если в репозитории есть файл индекса/журнала ADR (часто README.md or index.md в каталоге ADR), поддерживайте его в актуальном состоянии.
Предпочтительно: позволить scripts/new_adr.js --update-index сделать это. Иначе:
- Добавьте пункт списка для нового ADR.
- Соблюдайте единообразие порядка (числовой, если нумерация; дата или алфавитный, если слаги).
Инициализация
При внедрении ADR в репозиторий, где их нет:
node /path/to/adr-skill/scripts/bootstrap_adr.js
Это создаёт каталог, файл индекса и заполненный первый ADR ("Adopt architecture decision records") с реальным содержимым, объясняющим, почему команда использует ADR. Используйте --json для машиночитаемого вывода. Используйте --dir чтобы переопределить имя каталога.
Категории (крупные проекты)
Для репозиториев с большим количеством ADR организуйте их по подкаталогам:
docs/decisions/
backend/
2025-06-15-use-postgres.md
frontend/
2025-06-20-use-react.md
infrastructure/
2025-07-01-use-terraform.md
Префиксы дат локальны для каждой категории. Выберите схему категоризации заранее (по слою, по домену, по команде) и задокументируйте её в индексе.
Ресурсы
scripts/
scripts/new_adr.js— создать новый файл ADR из шаблона, используя соглашения репозитория.scripts/set_adr_status.js— обновить статус ADR на месте (YAML front matter или inline). Используйте--jsonдля машинного вывода.scripts/bootstrap_adr.js— создать каталог ADR,README.md, и начальное решение "Adopt ADRs".
references/
references/review-checklist.md— чек-лист готовности агента для проверки на фазе 3.references/adr-conventions.md— соглашения о каталоге, именах файлов, статусах и жизненном цикле.references/template-variants.md— когда использовать простые шаблоны, а когда шаблоны в стиле MADR.references/examples.md— заполненные примеры коротких и длинных ADR с планами реализации.
assets/
assets/templates/adr-simple.md— лаконичный шаблон для простых решений.assets/templates/adr-madr.md— шаблон MADR 4.0 для решений с несколькими вариантами и структурированными компромиссами.assets/templates/adr-readme.md— заготовка индекса ADR по умолчанию, используемаяscripts/bootstrap_adr.js.
Использование скриптов
Из корня целевого репозитория:
# Simple ADR
node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --status proposed
# MADR-style with options
node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --template madr --status proposed
# With index update
node /path/to/adr-skill/scripts/new_adr.js --title "Choose database" --status proposed --update-index
# Bootstrap a new repo
node /path/to/adr-skill/scripts/bootstrap_adr.js --dir docs/decisions
Примечания:
- Скрипты автоматически определяют каталог ADR и стратегию именования файлов.
- Используйте
--dirи--strategyчтобы переопределить. - Используйте
--jsonдля вывода в машиночитаемом формате.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: adr-skill](https://darkplay.ru/ai/skills/vercel-ai-adr-skill)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
mattpocock-skillsmattpocock · Агентские навыки Matt Pocock для настоящей инженерии: разбор задач, потоки спецификаций и…
superpowersobra · Базовая библиотека навыков для Claude Code: TDD, отладка, паттерны совместной работы и…
eccaffaan-m · Нативный для harness операторский слой ECC: 67 агентов, 278 навыков, 94 шима устаревших…
andrej-karpathy-skillsmultica-ai · Правила поведения для снижения типичных ошибок LLM при программировании: думай перед…
Agent Evaluatoraffaan-m · Оценивает результат агента по рубрике качества из 5 критериев (точность, полнота…
Network Architectaffaan-m · Проектирует корпоративные и распределённые сети с маршрутизацией и автоматизацией.
Opensource Forkeraffaan-m · Форкает проект для open-source: чистит секреты, ссылки и историю git.
Opensource Packageraffaan-m · Готовит open-source упаковку: CLAUDE.md, README, LICENSE, CONTRIBUTING и шаблоны.
Opensource Sanitizeraffaan-m · Проверяет open-source форк на утечки секретов, PII и опасные файлы перед релизом.
Skill Createaffaan-m · Анализирует локальную историю Git, извлекает паттерны кодирования и генерирует файлы…Лучшие ИИ-инструменты для автоматизации и ассистентов
Подборка ИИ-ассистентов для автоматизации рутины и ускорения рабочих процессов. Сервисы, которые берут на себя переписку, анализ данных, ведение базы знаний и подготовку продаж, эк
Give Me Public
AITunnelAitunnel
STIVAStiva
Wikibot (Викибот)Wikibot
mymeet.aiMymeet
InsighterInsighter
TGHuntTghunt
LegiscanLegiscan
RouterAIRouterai
Wikibot 1.0 (Викибот)WikibotЛучшие ИИ-инструменты для программирования
Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные
GenAPIGenapi
Notepad++ AINotepad-plus-plus
Creatium MaxCremax
Emacs AIGnu
KiteKite
Amazon Q DeveloperAmazonЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-maker