architecture-deepener
Surface opportunities to deepen a codebase. Finds modules that are shallow (thin pass-throughs, anemic types, missing domain modeling) and proposes how to…
от Andersonlimahw★ 19 звёзд на GitHub
Установить architecture-deepener в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Architecture Deepener
Turn shallow modules into deep ones. Make the codebase navigable for humans and AI agents alike.
Based on improve-codebase-architecture by Matt Pocock (https://github.com/mattpocock/skills).
Core Idea: Shallow vs Deep Modules
A shallow module has a broad interface relative to the complexity it hides. It passes data through, delegates immediately, or carries no domain knowledge. It is a wiring artifact, not an abstraction.
A deep module has a narrow interface over a large implementation. It hides a hard decision behind a small surface, co-locates behavior with the data it owns, and gives callers something meaningful to say.
SHALLOW DEEP
┌──────────────────────┐ ┌──────────┐
│ interface (wide) │ │ interface│
│ - validate() │ │ - run() │
│ - transform() │ └────┬─────┘
│ - persist() │ │
│ - notify() │ ▼
└──────────────────────┘ ┌──────────┐
implementation (thin) │ complex │
- return this.repo.save(x) │ impl that│
│ truly │
│ hides X │
└──────────┘
Deepening is not about adding code. It is about moving behavior to where the data lives, so the rest of the system can stay shallow.
Quick Start
/architecture-deepener — analyze cwd, write report, start grilling
/architecture-deepener --dir src/domain — scope to a directory
/architecture-deepener --report-only — skip grilling, just emit HTML
/architecture-deepener --grill src/checkout — skip exploration, grill a known module
Three Phases
Phase 1 — Explore (read-only)
Goal: build an evidence-backed map of shallowness across the target scope.
- Bound the scope. Default: project root (respect
.gitignore). Override with--dir. - Enumerate modules. A "module" is a file or cohesive directory that exports a unit (class, factory, service, component, route handler).
- For each module, collect signals:
- Interface surface: count exported members. Wide surface + thin body = shallow.
- Pass-through ratio: how many functions just forward args to the next call (
return this.x.foo(...args)). - Anemic types: types/interfaces that only declare shape and carry zero methods/functions.
- Domain logic in the wrong layer: business rules living in controllers, UI components, or CLI handlers instead of domain modules.
- Primitive obsession at boundaries:
string,number, bare arrays used where a value object would carry meaning and invariants. - AI-navigability: can an agent jump to this module from a symptom ("where is the rule for X?") without reading 5 wiring files? Score 1-5.
- Classify each module:
deep,balanced,shallow,anemic,leaky. - Rank by deepening payoff = (impact of the hidden complexity) x (effort to move it). Prefer changes that unblock tests and AI navigation.
- Persist raw findings to memory/context for the report phase. Do not emit prose yet.
Exit criteria: every module tagged, top 5-10 opportunities ranked with one-line rationale each.
Phase 2 — HTML Report (artifact)
Goal: produce a single self-contained architecture-deepener-report.html that a human can scan in 60 seconds and an agent can cite.
Write the file with the native Write tool. The report MUST contain:
- Header: project name, scope, date, counts (modules scanned, shallow count, deep count).
- Shallowness heatmap: a table or grid where each row is a module, columns are the signals from Phase 1, cells are color-coded:
- green = deep / healthy
- yellow = balanced / watch
- red = shallow / anemic / leaky
- Top opportunities: the ranked list with, for each:
- module path
- current shape (one sentence + the signal that proves it)
- proposed deep shape (one sentence: what moves where)
- payoff score + effort estimate (S/M/L)
- testability delta: what becomes testable after the change that is not testable today
- AI-navigability delta: what an agent can now locate directly
- Before/After sketch: an ASCII or
<svg>diagram for the top 1-2 opportunities showing behavior moving from a controller/wiring layer into the domain module. - Integration notes: explicit hooks into
domain-modeling,codebase-design, and ADR workflows (see below). - Footer: credit line —
Based on improve-codebase-architecture by Matt Pocock (https://github.com/mattpocock/skills).
Keep it dependency-free: inline <style>, no external scripts, no network calls. It must render by opening the file directly.
Phase 3 — Grilling Loop (interactive)
Goal: pressure-test each top opportunity before anyone writes code. Do not trust the first proposal.
For each ranked opportunity, run this loop (max 3 rounds per item, then move on):
- **
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- plugin.json
FAQ
Что делает скилл architecture-deepener?
Surface opportunities to deepen a codebase. Finds modules that are shallow (thin pass-throughs, anemic types, missing domain modeling) and proposes how to make them deep (rich domain types, co-located behavior, testable seams). Outputs a visual HTML report and then runs an interactive grilling loop that pressure-tests each opportunity. Use when the codebase feels "flat", domain logic leaks into controllers/UI, types carry no behavior, or AI agents struggle to navigate the module boundaries. Integrates with domain-modeling, codebase-design, and ADR workflows.
Как установить скилл architecture-deepener?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл architecture-deepener запускает скрипты?
Нет, скилл состоит только из инструкций (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…