/aimate:review-architecture Optional: path or module to limit the review to, a history window such as 6 months, and known pain points or upcoming workfrom aimate
Read-only architecture and design-quality review that identifies hot spots from git churn, complexity, and coupling, then checks layering, SOLID, dependency direction, and platform support. Produces a findings report with a refactoring roadmap.
Ships in aimate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Find where a codebase's design is hurting the team, prove it from the code, and say what to fix first. The review is aimed at the places that change most, because a design flaw in a file edited every week costs every week. It also lists the large, complex files nobody touches, because code is often left alone for the reason that it is frightening, and it checks whether the runtime and dependencies are still supported.
It does not cover runtime performance, scale, reliability or the build and deploy pipeline, and it does not look for security vulnerabilities. Say that in "Method and limits".
The review is read-only. Do not edit, stage, commit, branch, git fetch or install anything. The only file you write is the report, and it goes into the reviewed repo's docs/ folder (see Phase 3), as an untracked file. Every subagent you start gets the same rule, in the briefing in Phase 2.
--path. List the others as not reviewed.Ask a question only if the target repo cannot be found. Everything else has a default.
Leave out third-party and generated code: node_modules/, vendor/, dist/, build/, out/, target/, .next/, minified bundles, generated clients, migrations and lock files. The churn and dependency scripts skip these and test files. Because migration folders are skipped, schema churn is not measured. The platform script still reads manifests and lockfiles, because that is where versions and deprecation flags live.
Do not open .env, .env.*, key files, credential files or secrets.*. Never copy a secret into the report.
Before any analysis, learn what the codebase is trying to be. You need this to judge it fairly.
Profile the stack: language, framework, database, how it is deployed. Read the manifest files (package.json, composer.json, pyproject.toml, *.csproj, go.mod, and so on) and the README. Then run the platform script:
python3 <skill-dir>/scripts/packages.py --repo <target-repo> [--path <scope>]
It lists the runtimes, frameworks and base images the repo declares (from version files, manifests, lockfiles, Dockerfiles, compose files and CI workflows), with end-of-life status from endoflife.date. It also lists packages the lockfile marks as deprecated or abandoned, unpinned versions, lockfile age and update automation. Keep its output; Phase 2 uses it. It makes one request per product to endoflife.date and sends nothing from the repo but the product name. Use --offline if the network is off limits; the status is then "not checked". Never fill in an end-of-life date from memory.
Establish the intended architecture. Look for a declared one: folders named Domain, Application, Infrastructure, core, adapters, ports; ADRs; an architecture section in the README or docs/. Then map the actual folders onto the three layers from design-rules.md (Domain, Application, Infrastructure). For a frontend or mobile app, use the mapping at the top of section 1 of the rules file. Write the mapping down; the dependency script in Phase 2 needs it. Section 5 of the rules file says what counts as "declared".
Name the design patterns the code really uses, from the code and not from the README: layered, hexagonal, MVC, Active Record, repository, CQRS, event-driven, plugin registry, strategy, and so on. Note where each one lives. Open about ten files for this at most (an entry point, one use case, one model, one repository, the place dependencies are wired); the history picks the rest of the files in Phase 1. Phase 2 checks whether the code keeps to the patterns, and section 1 of the report names them.
Look for rules the team already enforces: deptrac.yaml, .dependency-cruiser.js, .importlinter, import-linter settings in pyproject.toml, ArchUnit or NetArchTest tests, ESLint boundary rules, Nx module-boundary tags. They state the intended architecture better than folder names do. If the tool is already installed, run it read-only and use its output as evidence.
Look for a previous review: docs/*-architecture-review-*.md in the repo root. If there is one, read its Summary, its findings (title, files, rule) and its Appendix F, and keep them for the comparison in Phase 3. Do not let it steer Phases 1 and 2. Do the review with fresh eyes, then compare.
Record git rev-parse --short HEAD, the branch, today's date, and whether the working tree is dirty. The churn script reads HEAD; if the tree is dirty, line numbers from files on disk may not match it, so say so in "Method and limits".
The rules describe a layered, domain-centred design. Hold a codebase to the architecture it declared. For the rest, flag mixing only where it causes pain you can show, such as in a hot spot, a rule that cannot be tested, or a file edited again and again.
Do not start by reading files at random. Let the history tell you where to look.
Run the bundled script from the skill directory against the target repo:
python3 <skill-dir>/scripts/hotspots.py --repo <target-repo> [--path <scope>] [--months <n>]
It needs only Python 3 and git. It prints, for the window:
A "change" is one entry on the first-parent history: a merged PR, a squash-merged PR, or a direct commit. On merge and squash workflows the coupling numbers mean "changed in the same PR"; on direct-to-trunk work they mean "changed in the same commit". Branch syncs, release merges, and changes that touch more than 200 source files (formatter runs, mass renames) are left out and counted in the header. Renamed files keep their history. Authors are people, counted as a number, bots left out; never put names in the report. Run --help for the thresholds. Add --json if you want to process the output.
Complexity is a count of decision keywords per file, with comments, docstrings and string contents removed. Compare files within one language, not across languages. It is not a real cyclomatic number. When lizard is installed, the output also names the most complex function in each file.
Read the script's warnings and act on them before you interpret anything:
migrate, external, target, or a test-like name such as spec or testing): re-run with --keep-dir <name>. Real code in other file types (proto, graphql, html): re-run with --ext proto,graphql. A repo whose logic is mostly templates, config or markdown: --all-files.--max-changes: the window is shorter than you asked for. Re-run with the higher cap the warning suggests. If it still hits the cap, say so in "Method and limits".--months 24, then --months 36. If it is still thin, or there is no git history, rank files by size and complexity alone and say so in "Method and limits".develop) instead, or say that the churn numbers are rough.--module-depth 1. In a repo organised by layer (controllers/, services/, entities/) a module is a layer, so "cross-module" says little: use the "Share a name" column.Then interpret the output:
git log that the changes were about the same thing.Evaluate the codebase against the rules in design-rules.md. Read it now. Each rule there comes with signals, cases not to flag, and the usual fix; the "don't flag" notes keep the report from drowning real problems in framework idiom.
Work in this order:
Repo-wide dependency check. Dependency leaks are cheap to find everywhere, so don't limit this to hot spots. Run the bundled script with the layer mapping from Phase 0:
python3 <skill-dir>/scripts/deps.py --repo <target-repo> [--path <scope>] \
--layer domain=<path> --layer application=<path> --layer infrastructure=<path>
Repeat --layer for several folders. * works for modular layouts such as src/*/Domain. Leave --layer out when no layers can be mapped (a script collection, a small Rails app) and skip the layer checks. The script reads Python, JavaScript and TypeScript (with tsconfig paths and workspace packages), Java, Kotlin, Scala, Groovy, PHP, C# and Go. It prints:
Read the coverage table first. Imports it cannot match are treated as external, so a cycle through one is not seen. Under about 90% for a language, say its results are partial. For languages it does not read (Ruby, Rust, Swift, C and C++, Elixir and others), search by hand: grep the domain folders for the leak patterns in the rules file, and trace the imports of the hot spots and their partners. Write in "Method and limits" what you checked. Write "no cycles found" only for what was covered. Keep the count and the first three file:line per pattern in your notes; the full list is in --json. If the repo has its own checker (madge, dependency-cruiser, import-linter, deptrac), run it read-only as a second source.
Hot spot reading. Ranks 1 to 5: read the whole file, its imports and its main callers. Ranks 6 to 10: read the imports and the parts that git log -p shows change most. For all ten, run git log --format=%s -- <file>: unrelated commit subjects on one file are strong evidence of more than one reason to change. For coupled pairs you kept, read both sides and find what they share. Read the top 3 large, complex, rarely changed files the way you read ranks 6 to 10.
Platform and dependencies. Take the output of packages.py from Phase 0 and apply section 4 of the rules file (Supported Platform, Dependency Health). Evidence for a finding is the file and line the script gives, plus the end-of-life date it fetched. If the status says "not checked", say so; do not substitute a date from memory. Opening the manifest line and confirming the version counts as reading it, so a platform finding can be High. Do not mix severities in one finding: report the components that make it High together, and the rest as a separate finding (see Supported Platform). Known vulnerabilities are out of scope; if they matter, tell the reader to run the package manager's audit command or the asvs-audit skill.
Testing check. From the Phase 1 numbers (tests by name per hot spot and per top module), read the tests of the top 3 hot spots and answer: do the tests for domain rules run without the framework, a database or the network? Would a test fail if the main business rule changed? Note what you saw. A hot spot or module with no tests at all is a finding under Tested Where It Changes.
Check every rule against what you read. When two rules disagree, such as a single-implementation interface, use section 5 of the rules file. When one problem fits several rules, cite the one whose fix you propose.
Keep notes on what holds, not only what breaks. For each pattern from Phase 0, write down where the code keeps to it and the evidence: the file you read, or the search that found nothing. Also write one sentence, with a number or a file behind it, on whether the architecture fits the size and change rate of the code: over-built (layers with one thing in them) or under-built (everything in one folder, and the hot spots show it). Section 1 of the report is a short overview built from these notes, and it needs the good news as well as the problems.
The rules are not tied to a pattern. They apply to a clean MVC app, a hexagonal one and a plain script collection alike. So check them on top of the patterns: a codebase can follow its pattern faithfully and still break a rule, or bend its pattern and keep the rules.
On a large codebase, you may hand each hot spot, or a group of related ones, to a subagent so file contents stay out of your own context. Give every subagent this briefing:
git fetch or install anything. Do not open .env, key or credential files.Then open every file:line a subagent cites before you use the finding. Drop any that does not say what the subagent claims.
A finding needs all of the following, or it does not go in the report:
Give every finding an ID and a short plain-words title: H1, H2 for High, M1, M2 for Medium, L1 for Low, numbered in report order. Group repeats of one pattern into a single finding with several locations. A few well-evidenced findings help more than many thin ones. Do not pad: if the design is healthy, say so and report what you found, even if that is one finding or none. If the user named pain points, a finding in that area says so under "Why it matters".
Severity. "Hot spot" means the top 10 by score plus any files named by the team, "top hot spots" the first 5 by score.
A top-10 hot spot with no tests moves a finding up one level (Low to Medium, Medium to High) when the missing tests are what make the file unsafe to change. A High stays High; say "no tests" under "Why it matters". Do not move a finding that is already High because it blocks testing, and do not move a finding that cites Tested Where It Changes.
Fill in REPORT-TEMPLATE.md. Keep its sections and order, and drop the HTML comments; they say how to fill each part, including the finding format, the roadmap rules, the verdict words and the comparison with a previous review. Section 1 is a short overview: the patterns the code is built on, its current state, the main breaking points and where the roadmap should aim. Use short sentences, short lists and regular headings in the report, not tables. The two exceptions are the hot spot table in Appendix A and the vital-signs table in Appendix F, and every cell in them stays short. The order is: the answer first (Summary), then the reasons (sections 1 and 2), then the plan (section 3), then the evidence (Appendix). Write the Summary last.
If Phase 0 found a previous review, compare: match findings by file and rule, not by ID, and say what is resolved, still open and new. If there is none, leave the comparison out.
Write the report once, to <repo-root>/docs/<project-name>-architecture-review-<YYYY-MM-DD>.md. <repo-root> is the repository's top folder, even when you reviewed a scope. Create docs/ if it does not exist. The report goes into the reviewed repo on purpose: it sits next to the code it describes, and the reader finds it there. Take the project name from the manifest or the repo folder name. If that file already exists, add -2 (then -3) instead of overwriting it. If you cannot write there, write the report to the current directory and say where. The report is an untracked file; say in chat that it is there and that you did not stage or commit it.
Then reply in chat with the report path, the one-paragraph summary, and the top three findings. Keep the details in the file.
| Situation | Action |
|---|---|
| Target path is not a git repo, or has no commits | The churn script ranks by size and complexity on its own. Skip the coupling steps, the stable list and the author counts, and say so in "Method and limits". The dependency and platform scripts still work |
| Shallow clone | Say so. Suggest git fetch --unshallow in the report, but do not run it yourself |
| Churn script fails | Show the error and fix the cause (python3 missing, git too old, unreadable repo). If it cannot run, rank files by git log --name-only counts, say the ranking is rough, and skip scores and coupling |
| Dependency script does not read the main language | Search by hand as described in Phase 2, step 1, and say what you checked |
| No layer can be mapped (no domain folder) | Run the dependency script without --layer, skip the layer checks, and say so |
packages.py cannot reach endoflife.date | The script says which products failed. Report the versions with "not checked". Do not fill dates from memory. Re-run with --offline to silence the warnings |
| No package manifest found | Say so in "Method and limits" and skip the platform and dependency findings |
| A folder you expected is missing from the hot spots | Check the script's "Left out" line, and re-run with --keep-dir |
| No source files match | The script falls back to all files. If the repo holds no code, say so and stop |
| Hot spots are all config, routes or generated types | Keep them in Appendix A as registries, then go down the list to the first real code files for Phase 2 |
| Too large to read every hot spot | Delegate per hot spot, or read the top 5 fully and list the rest as not read |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub dawn-technology/aicelerate --plugin aimate22 skills in this plugin
/asvs-auditStatic OWASP ASVS 5.0 Level 1 security audit of a codebase. Checks all 70 Level 1 requirements plus other security issues found on the way, verifies every finding against the code to remove false positives, runs the package manager's dependency audit, and writes a report to docs/. Use this when asked for a security audit, ASVS audit, security compliance review, or a code-level vulnerability scan. It reads code only; it is not a live penetration test./code-reviewReusable review core for structured findings on supplied code or diffs. Invoked by review-pr, review-local, and the pre-push self-review in resolve-pr-feedback; not for reviewing a PR/MR or local working tree directly, use those skills instead./configure-mcpValidate and configure project- or client-specific GitHub, GitLab, Jira/Confluence, Figma, Sentry, and Playwright tooling through a short interactive wizard, choosing CLI or MCP where both support the capability. Use when a user asks to install, set up, configure, repair, change, or onboard Aimate integrations or save project tool routing./estimate-sizeEstimate software tickets and work items with a configurable relative-sizing workflow. Respect dedicated estimators and local project rules, and use the built-in defaults when no local rules are provided./estimate-timeAdd a time estimate in hours to an existing implementation plan. Use when the user asks to estimate a plan or task list, or asks how long the work will take./fetch-ticketReusable ticket reader that resolves a Jira work item, GitHub Issue, or GitLab Issue through the project's saved route and returns it as one provider-neutral ticket with every comment verbatim. Invoked by prepare-ticket and implement-ticket; not for validating or implementing a ticket directly, use those skills instead.Other plugins' skills for the same job