/garage:arch-reviewfrom garage
Reviews Java/Spring Boot code against architecture invariants: dependency direction, transaction boundaries, domain leakage, and module rules. Produces findings and optional fix plans.
Ships in garage. 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.
Reviews a Java/Spring module against its architecture invariants: dependency direction, transaction and external-effect boundaries, API and persistence boundaries, resilience semantics, and module rules. Read-only: it produces findings and, on request, a fix plan, never inline fixes.
report-only unless the user asks for fix-plan.package-info.java. Judge against what the repository accepted, not a textbook
layout. Package names below (api, application, domain, infrastructure) are examples; map
them to the repo's real layout.For a CRITICAL or HIGH finding, explain why the violation exists (shortcut, legacy constraint,
missing port, unclear boundary) before recommending a fix. Fixes go through the implementation
skill for the area (api-first, temporal-workflow, fintech-ledger) and a review before merge.
Dependency direction. Domain behavior does not depend on HTTP, persistence clients, messaging, provider clients, or framework configuration. Application use cases coordinate the domain and depend on ports; infrastructure implements ports; API code validates transport input, calls a use case, and maps the result. Some repositories deliberately keep Spring Data mapping annotations on aggregates: when the local architecture accepts that, it is not a finding.
Transactions and external effects.
this. calls) do not get a proxied transaction boundary.Resilience, chosen per operation from failure semantics.
API and persistence boundaries. No request binding to entities and no entities returned from controllers. Controller thinness is judged by responsibilities (transport only), not a line count. Repositories persist and load; business decisions and cross-aggregate orchestration live in use cases or domain services. Public identifiers never expose internal keys (TSIDs stay internal; external IDs are UUIDv7); errors are RFC 9457 Problem Details.
Value objects. Use them when a concept carries validation, units, comparison, formatting,
security, or repeated business meaning (Money wrapping BigDecimal with a currency, tenant IDs,
operation references). Money is never double; time is Instant/OffsetDateTime. Do not wrap
every primitive to satisfy a pattern.
Events and modules. Use events when consumers cross a real boundary, need an independent
lifecycle or delivery, or the event is part of the audit trail. Prefer a direct call for simple
in-process coordination with one owner. Apply Spring Modulith rules only when the repository uses
Modulith; then verify declared dependencies, cycles, public interfaces, and
ApplicationModules.verify() coverage.
| Lead | What to verify |
|---|---|
| Spring or provider imports in the domain package | Domain behavior now depends on infrastructure, versus an accepted mapping annotation |
| Repository injected into a controller | API bypasses authorization, use-case rules, or transaction ownership |
| Entity returned from or bound in a controller | Persistence fields or internal IDs leak into the public contract |
@Transactional on a private method, or a this. call to one | Boundary is ineffective under proxy mode |
@Transactional on a controller | Transaction spans transport concerns |
| Remote client call inside a transaction | Lock duration and partial failure are explicitly designed |
Resilience annotation with a fallbackMethod | Fallback is honest for the operation, not a fabricated result |
catch (Exception e) in a service | Code hides an unknown state or maps errors too broadly |
| Raw amount or ID primitives in the domain | Repeated business rules justify a value object |
| Static calls or persistence access across feature modules | Ownership or module boundaries are bypassed |
Severity: read references/clean-architecture-patterns.md for the severity guide and good and bad
dependency examples. Assign severity only after proving reachable impact; the same pattern can be
accepted in one repository and critical in another.
Save to claudedocs/<module>-arch-review-<timestamp>.md:
# Architecture Review - <module>
Date: <timestamp> Mode: report-only | fix-plan
Scope: <packages, file count> Accepted architecture sources: <ADRs, ArchUnit, AGENTS.md or "none">
Verification run: <ArchUnit/Modulith command -> result, or "none present">
## Summary
CRITICAL <n> | HIGH <n> | MEDIUM <n> | LOW <n>
## Findings
### [CRIT-001] <title>
Invariant: <which one>
Location: <file:line>
Evidence: <quote, grep output, or test result>
Impact: <reachable consequence>
Fix: <smallest corrective action>
## Dependency graph
<actual direction found, violations marked with finding IDs>
## Recommendations
<ordered; ArchUnit rules only for accepted, recurring boundaries>
A clean review is valid when the evidence supports it.
Fix-plan mode additionally writes claudedocs/<module>-arch-fix-plan-<timestamp>.md: ordered
tickets, each with severity, effort, files, dependencies on other tickets, and a "done when"
check (for example "domain package has no org.springframework imports; ArchUnit rule passes").
To propose an executable rule, read references/archunit-setup.md.
code-audit.security-review; SLO-driven latency or throughput work to performance-review.ticket-breakdown for remediation tickets, tech-debt-assessment for deferred items.produces:
- type: "arch-review"
format: "markdown"
path: "claudedocs/<module>-arch-review-<timestamp>.md"
- type: "tickets"
format: "markdown"
path: "claudedocs/<module>-arch-fix-plan-<timestamp>.md" # only in fix-plan mode
- type: "code"
format: "java"
paths: ["src/test/java/.../<Module>ArchTest.java"] # suggested ArchUnit test
handoff: "Write claudedocs/handoff-arch-review-<timestamp>.yaml - suggest: ticket-breakdown, tech-debt-assessment"
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub omexit/claude-skills-pack --plugin garage48 skills in this plugin
/adrUse when the user wants to record an architecture decision, write an ADR or decision record, or explain why a technology, data model, boundary, or pattern was chosen over alternatives./api-designUse when the user is designing, reviewing, or changing an API contract (REST, GraphQL, or RPC): endpoint shape, naming, errors, versioning, pagination, or developer experience, before or apart from implementing it./api-firstUse when the user wants to scaffold or implement a REST endpoint or resource in a Spring Boot project, especially from an OpenAPI snippet or spec: create endpoint, add API, add CRUD, generate controller, or implement POST/GET/PUT/PATCH/DELETE on a resource./code-auditUse when existing implementation code needs a rigorous review: code audit, code review, code quality, code smells, SOLID or duplication concerns, security or performance of a module, production readiness, or a second opinion on code that already exists./competitive-analysisUse when the user asks for a competitive analysis, competitor review, market landscape, feature comparison against rivals, or who else solves this problem./data-designUse when the user is designing a data layer or schema across PostgreSQL, MongoDB, Elasticsearch, or Typesense: data model, indexing, query patterns, consistency, or keeping several stores in sync.Other plugins' skills for the same job