Architecture review that finds deepening opportunities - shallow modules, duplicated logic, leaking seams, hand-kept lists - ranks them with evidence in a visual report, then grills the owner on the one they pick and hands a decided design to vspec and vrefactor.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Varchitect?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vocsong-varchitect)
---
name: varchitect
description: Architecture review that finds deepening opportunities - shallow modules, duplicated logic, leaking seams, hand-kept lists - ranks them with evidence in a visual report, then grills the owner on the one they pick and hands a decided design to vspec and vrefactor.
disable-model-invocation: true
---
# varchitect — find where the architecture fights you
Read `../vcore/SKILL.md` first (overlay, gates, asking, run record). Use the vocabulary in
[VOCABULARY.md](VOCABULARY.md) exactly — **module, interface, depth, seam, adapter, leverage,
locality** — in every card and question. Use the repo glossary from `vcore` for the project's
own domain names; the architecture vocabulary describes the design, not the product.
The goal is **deep modules**: a lot of behaviour behind a small interface at a clean seam, so a
change lands in one place (locality), callers learn less (leverage), and tests cross the same
seam callers do.
## 1. Scope (YAGNI)
Deepening pays off where code keeps changing. Decide where to look before looking:
- The owner named an area or pain point → start there.
- Otherwise rank **hotspots = size × churn**: list commits per file in the last six months (below),
then multiply each count by the file's line count (`wc -l` / `(Get-Content <file>).Count`). Widen
only if there is no clear hotspot.
```bash
git log --since=6.months --name-only --format= -- <src dirs> | sort | uniq -c | sort -rn | head -30
```
```powershell
git log --since=6.months --name-only --format= -- <src dirs> | Where-Object { $_ } | Group-Object | Sort-Object Count -Descending | Select-Object -First 30 Count, Name
```
Read what was already decided so you don't re-suggest it: the project's wiki or decision records
(`standards.md` in the overlay says where — e.g. `knowledge_search`), ADRs, and any earlier
architecture reviews.
## 2. Explore
Gather facts yourself; spawn a fresh-context subagent for the walk so its file reading stays out
of the conversation. Include the glossary path if present and relevant newly settled terms.
Use a code graph when the repo has one (e.g. GitNexus `query` → `context` →
`impact`): callers, blast radius and execution flows beat grep. Look for friction:
- one concept that needs a tour of many small modules to understand;
- **shallow** modules — the interface is nearly as big as the implementation;
- the same logic implemented several times, drifting apart (parsers, path checks, resolvers);
- a fact kept in several hand-maintained lists that must agree (allowlists, registries, gates);
- several implementations of one role with no shared contract test;
- pure helpers extracted for testability while the bugs live in how they are called (no locality);
- invariants that exist only in comments or docs;
- code that is hard to test through its current interface.
Apply the **deletion test** to every suspect: delete it in your head — does complexity
concentrate (it earned its keep) or reappear across N callers (it was a pass-through)?
## 3. Report
Never write report HTML yourself. In a new `architecture-review-<timestamp>/` folder in the OS temp
dir (`$TMPDIR`, `/tmp`, or `%TEMP%`), copy the fixed template `report/report.html` unchanged and
write only its `report-data.js`. Open `report.html` (`start` / `open` / `xdg-open`), fix the data
until no **Report data problems** banner shows, and give the absolute path. Data shape and diagram
types: [REPORT.md](REPORT.md). Each candidate carries **evidence**:
| Field | Source |
| --- | --- |
| Files | the modules involved |
| Problem / Solution | one sentence each |
| Before / After diagram | the centrepiece |
| Evidence | lines, commits in 6 months, duplicates or list count, blast radius (code graph `impact` d=1 count), current tests at the seam |
| Invariant it would enforce | what becomes impossible to get wrong |
| Dependency category | in-process / local-substitutable / ports & adapters / mock ([DEEPENING.md](DEEPENING.md)) |
| Risk | permission gating, persistence, a public contract — anything the overlay holds for review |
| Strength | Strong / Worth exploring / Speculative |
End with a **Top recommendation** and why. Do **not** propose interfaces yet. Then ask, as a
single question: "Which of these would you like to explore?"
## 4. Grill the pick
Run `../vgrill/SKILL.md` on the chosen candidate: constraints, dependencies, what sits behind
the seam, the shape of the deepened module, which tests survive, migration order. Facts stay
yours to look up.
When the shape of the interface is the open question, use [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md):
parallel designers with different constraints, on different model families where available.
Record as you go:
- a candidate the owner **rejects for a reason a future review would need** → offer to record it
where the project keeps decisions (e.g. a wiki draft via `knowledge_record` with `draft: true`),
so the next review doesn't suggest it again; skip "not now" reasons;
- a settled, durable domain term → update the repo glossary as described in `vcore`.
## 5. Hand off
The settled decisions go to `../vspec/SKILL.md` (spec + slices via `../vslice/SKILL.md`), and
each slice is built with `../vrefactor/SKILL.md` (pins first, stated gain) or
`../vfeature/SKILL.md` when behaviour changes. Changes the overlay holds for review (permission
gating, secrets) keep their hold.
## Done means
- The report exists and its path was given; the owner picked (or declined) a candidate.
- For a pick: settled decisions written, rejected alternatives recorded where durable.
- Run record written.
Credits: process and vocabulary adapted from Matt Pocock's `improve-codebase-architecture` and
`codebase-design` (MIT) — see `../vcore/CREDITS.md`.