architecture-design
Use to produce a Software Architecture Document for a feature — Arc42 12 sections + C4 L1/L2 inline + ADRs spawned on a blast-radius gate — once PRD.md and…
от genkovich★ 17 звёзд на GitHub
Установить architecture-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Skill: architecture-design (SDLC stages 04-05 🚪 GATE)
Generator of the Software Architecture Document (docs/features/<slug>/sad.md — Arc42 12 sections, C4 Context inline in §3 and C4 Container inline in §5) plus supporting ADRs (docs/features/<slug>/adr/NNNN-*.md). It drafts all 12 sections in memory, walks them Socratically one section at a time, spawns an ADR only when a decision's blast radius (масштаб удару — how painful it is to reverse the decision later) crosses the gate, writes each resolved section and its ADRs as one atomic commit, and runs a clean-context critic over the finished SAD. The document itself is the state — resuming after an interrupt is free. L3 Component / L4 Code are out of scope. This file is the spine; detail lives in references/.
The Socratic machine, the critic, the size matrix, and the ask-style are shared — this skill keeps only its deltas:
→ ../_shared/socratic-loop.md · ../_shared/critic.md · ../_shared/size-matrix.md · ../_shared/ask-style.md
Depth governs the per-section question volume + autonomy → ../_shared/interview-depth.md. C4 diagrams are confirmed in prose, never as raw source → ../_shared/diagram-presentation.md. architecture-design is also where the feature's target surface(s) are chosen — the first §4 decision, written to sad.md frontmatter target_surfaces and read (never re-derived) by every downstream stage → ../_shared/surfaces.md.
Як це читати (короткий вступ)
Це інструкція для агента, який запускає skill. У ній 7-крокова процедура (Protocol нижче) — крок за кроком, як з PRD дістатися до готового sad.md з 5-12 ADR.
Якщо вперше відкриваєш файл — почни з: ## When to use + ## Inputs (коли skill застосовний), потім ## Protocol (7 кроків), потім References (деталі на кожен крок), і ## Definition of Done (що має бути виконано до завершення).
Словничок термінів (англо-термін → що означає UA одним рядком):
- target surface — таргет-сёрфейс: що саме ми будуємо (бекенд-сервіс / веб-фронт / мобільний застосунок / CLI / worker / library-sdk). Обирається тут, у §4, і записується у
target_surfaces:frontmatter SAD →../_shared/surfaces.md. - depth dial — депт-діал: регулятор easy/medium/hard на запуск — скільки skill питає vs вирішує сам →
../_shared/interview-depth.md. - blast radius — масштаб удару: наскільки боляче буде передумати рішення.
- Socratic loop — режим діалогу з користувачем питаннями про рішення (одна
AskUserQuestionза раз). - blast-radius gate — перевірка з 3 критеріями: незворотнє (≥3 днів переробки), зачіпає ≥2 модулі, є чесна альтернатива. 2 з 3 → ADR.
- 4-state machine — 4 можливі дії з рішенням: Прийняти / Виправити / Винести у відкрите питання / Викинути.
- Save-as-OQ — рішення не приймається зараз, переноситься у §11 SAD як відкрите питання з власником і дедлайном.
- MADR — формат файлу ADR (markdown з заголовком, контекстом, опціями, наслідками).
- clean-context critic — окремий subagent (
sdlc:critic), який бачить лише фінальний файл (а не діалог), і шукає внутрішні протиріччя.
Owner
Architect / Tech Lead (drives everything). PM is consulted only on §10 Quality goals and §11 Risk severities.
When to use
- After
sdlc:write-prdproduceddocs/features/<slug>/PRD.md(ideally aftersdlc:clarify-prdtightened it). - Brownfield repo (existing code the feature changes) OR greenfield with a PRD only.
/sdlc:architecture-design <slug>as explicit invocation.- Skip if
docs/features/<slug>/sad.mdalready has all 12 sections filled (content or<!-- N/A: reason -->) ANDadr/has ≥1 file — suggest review instead.
Inputs
<slug>— same feature slug used by every earlier stage.- Gate (hard-refuse if missing):
docs/features/<slug>/PRD.md. If absent → STOP and point: «run/sdlc:write-prd <slug>first — architecture-design reads the PRD's goals/NFRs as canonical».CONTEXT.md(## Glossary) is read when present — it wins over anything that contradicts; absent → derive roles from PRD §4 and note it. - (Optional)
docs/features/<slug>/.size— depth hint (MVP vs Full + expected ADR count per the size matrix). Absent → default to M (full set) and say so loudly in the handoff. - (Optional)
docs/architecture-map.md— the current-architecture source (produced bysdlc:map-architecture). Read it; re-scan only if absent/stale. - A git repo — so the Step-3 brownfield scan can read code when the map is missing.
Protocol
- Gate + size + set interview depth.
test -f docs/features/<slug>/PRD.md→ missing = refuse with the pointer above. Read.sizeif present (shapes ADR count + §6 flow count — see the size matrix; absent →
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/ask-examples.md
- references/blast-radius-heuristic.md
- references/c4-mermaid-syntax.md
- references/checklist.md
- references/critic-phase.md
- references/critic-prompt.md
- references/draft-generation.md
- references/socratic-cadence.md
- references/socratic-loop.md
- templates/adr-template.md
- templates/c4-container.md
- templates/c4-context.md
- templates/deployment.md
- templates/sad-template.md
FAQ
Что делает скилл architecture-design?
Use to produce a Software Architecture Document for a feature — Arc42 12 sections + C4 L1/L2 inline + ADRs spawned on a blast-radius gate — once PRD.md and CONTEXT.md exist. The feature's target surface(s) are chosen here (the first §4 decision → SAD frontmatter target_surfaces, read by every downstream stage). Drafts §1–§12 in-memory, batch-validates each section Socratically (4-state machine), spawns an ADR only when a decision crosses the blast-radius threshold (irreversible / multi-module / has legitimate alternatives), writes each resolved section + its ADRs atomically, then runs a clean-context critic before finalizing. Brownfield: reads docs/architecture-map.md (re-scans only if absent/stale). Triggers on "architecture for {slug}", "design architecture for {slug}", "SAD for {slug}", "arc42 for {slug}", "C4 context+container for {slug}", "/sdlc:architecture-design {slug}", "спроектуй архітектуру {slug}", "SAD для {slug}", "архітектурний документ {slug}". Hard-refuse if docs/features/{slug}/PRD.md is missing. Triggers: /sdlc:architecture-design {slug}. Output: docs/features/{slug}/sad.md + adr/NNNN-*.md.
Как установить скилл architecture-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл architecture-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse 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…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…