From solution-audit
This skill should be used when the user asks to "audit architecture", "check architecture drift", "find module coupling", "detect boundary violations", "review code structure", "check dependency direction", or needs to verify that declared architecture matches actual code organization and dependencies.
How this skill is triggered — by the user, by Claude, or both
Slash command
/solution-audit:architecture-coherenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Detect drift between a solution's declared or intended architecture and its actual code structure. Architecture drift is silent — it accumulates gradually and creates maintenance nightmares.
Detect drift between a solution's declared or intended architecture and its actual code structure. Architecture drift is silent — it accumulates gradually and creates maintenance nightmares.
Architecture coherence means module boundaries are respected, dependencies flow in the declared direction, responsibilities are correctly distributed, and abstractions serve real needs. Violations indicate structural debt.
Identify the intended architecture from available sources:
If no explicit architecture docs exist, infer intent from directory naming and package structure. Note this as a finding (missing architecture documentation).
Analyze the codebase to understand real module relationships:
Build the actual dependency graph by analyzing imports:
Use Grep with language-appropriate patterns:
import .* from, require\(from .* import, import .*import ", import \(use, modCompare actual imports against intended architecture:
Evaluate the degree of coupling between modules:
Flag modules with unusually high coupling in either direction.
Verify modules do what their names suggest:
Assess abstraction quality:
Identify accumulated structural issues:
| Severity | Criteria | Example |
|---|---|---|
| Critical | Core boundary violation or circular dependency | Domain module importing from UI layer |
| Warning | Coupling issue or responsibility drift | Utility module growing into business logic |
| Info | Minor structural inconsistency | Slightly inconsistent naming between modules |
For each finding, report:
[SEVERITY] Category: Brief description
Location: module-a → module-b (or file:line)
Expected: Declared/intended relationship
Actual: What the code shows
Fix: Specific refactoring action
Start at 100, subtract per finding:
Score reflects structural integrity of the codebase.
references/import-patterns.md — Language-specific import/dependency detection patternsnpx claudepluginhub nsalvacao/nsalvacao-claude-code-plugins --plugin solution-auditAnalyzes codebase architecture via multi-agent specialists on structure, coupling, integration, error handling, security; verifies findings, reports strengths and flaws with evidence.
Sweeps codebase architecture periodically by reading ADRs, mapping module/dependency graphs, surfacing 5-10 smells with severity, and generating refactor proposals for /refactor. Triggered by '/architecture-review'.
Maps module dependencies, checks layering integrity, and flags structural decay across a codebase. Includes onboarding mode for codebase tours.