Archibald — Software Architecture Quality Assessment
Assess the structural health of a software architecture through smell detection,
quantitative metrics, antipattern identification, dependency structure evaluation,
risk/trade-off analysis, and technical debt measurement.
This skill operates at the architecture level — components, modules, packages,
services, layers, and their relationships. It complements class-level SOLID checks
and system-level design principle checks by focusing on observable structural
quality rather than adherence to specific design principles.
Key insight: architectural smells are independent from code smells (less than 30%
correlation), making dedicated architecture-level assessment essential.
Subcommands
Request a full assessment or focus on a single dimension:
| Command |
Dimension |
References |
archibald / archibald full |
Full assessment (all dimensions) |
All references |
archibald smells |
Architectural smell detection |
references/cyclic-dependency.md, references/unstable-dependency.md, references/hub-like-dependency.md, references/god-component.md, references/feature-concentration.md, references/scattered-functionality.md, references/ambiguous-interface.md |
archibald antipatterns |
Antipattern identification |
references/antipatterns.md |
archibald metrics |
Quantitative metrics analysis |
references/metrics.md |
archibald dependencies |
Dependency structure analysis |
references/dependency-structure.md |
archibald risks |
Risk & trade-off analysis |
references/risk-analysis.md |
archibald debt |
Technical debt assessment |
references/technical-debt.md |
When no subcommand is specified, default to a full assessment.
When a specific concept is mentioned by name (e.g., "cyclic dependency", "CBO",
"DSM"), match it to the appropriate dimension and load the relevant references.
Workflow
1. Identify Target Architecture
Determine what to analyze:
- When files or a directory are provided, use those.
- When a service, module, or component is referenced by name, locate it.
- When ambiguous, ask which files, directories, or services to scan.
Before diving in, establish context that affects severity calibration:
- Project scale: small app, medium codebase, large platform, distributed system?
- Team size: solo developer, small team, multiple teams?
- Lifecycle stage: prototype, active development, mature production, legacy?
- Architecture style: monolith, modular monolith, microservices, serverless, etc.?
Use whatever context is available from the codebase itself (directory structure,
build files, deployment configs, README) rather than asking unnecessary questions.
2. Load References
Before analyzing, read the reference file(s) for the requested dimension(s).
For smell detection, read the individual smell references needed:
references/cyclic-dependency.md
references/unstable-dependency.md
references/hub-like-dependency.md
references/god-component.md
references/feature-concentration.md
references/scattered-functionality.md
references/ambiguous-interface.md
For other dimensions:
references/antipatterns.md
references/metrics.md
references/dependency-structure.md
references/risk-analysis.md
references/technical-debt.md
For a full assessment (archibald full), read all twelve reference files.
3. Gather Architectural Artifacts
Before applying assessment patterns, build a picture of the current architecture:
From the codebase:
- Component/module/package structure (directory layout, build modules)
- Import/dependency graph (who depends on whom)
- Public API surface of each component (exports, interfaces, endpoints)
- Size indicators (approximate LOC per component, class counts)
From documentation (if available):
- Architecture diagrams or design documents
- Architecture Decision Records (ADRs)
- Dependency maps or component catalogs
- Quality attribute requirements
From version control (if available):
- Files that change together (logical coupling)
- Change frequency per component (hotspots)
- Growth trends over time
4. Analyze
Apply the detection heuristics from the loaded references. Each dimension has
its own analysis approach:
- Smells: Match structural patterns against the seven smell definitions.
Check dependency graphs for cycles, compute fan-in/fan-out, assess component
sizes, evaluate interface clarity, and identify scattered/concentrated features.
- Antipatterns: Look for recurring flawed decision patterns — technology
choices driving architecture, cargo cult adoption, over/under-engineering.
- Metrics: Compute or estimate coupling (CBO, Ca, Ce, instability),
cohesion (LCOM, cohesion type), and complexity (CC, LOC, nesting depth).
Compare against established thresholds.
- Dependencies: Construct a mental or actual DSM. Identify layering patterns,
cycles, hub components, and problematic backward dependencies.
- Risks: Identify architectural decisions with potentially undesirable
consequences, sensitivity points where small changes have outsized impact,
and trade-off points where quality attributes conflict.
- Debt: Assess accumulated structural problems using the severity/centrality/
trend framework. Map smells to the prioritization matrix.
Think carefully about each finding. Not every heuristic match is a true problem.
Consider context, scale, team maturity, and conscious trade-offs.
5. Report Findings
Present findings using this structure:
Per Finding
**[DIMENSION] Finding — Severity: CRITICAL | HIGH | MEDIUM | LOW**
Location: `component/module/service`, files or paths involved
Finding: Clear description of the structural issue and why it matters.
Evidence: What observable patterns led to this finding.
Impact: How this affects maintainability, evolvability, reliability, or velocity.
Recommendation: Concrete remediation approach with effort estimate if possible.
Severity guidelines:
- CRITICAL: Immediate structural risk — cascading failures, complete inability
to evolve a component independently, or blocking parallel development.
- HIGH: Active maintenance pain, significant coupling drag, or measurable
impact on development velocity.
- MEDIUM: Architecture smell that will compound as the system grows or as
more teams contribute.
- LOW: Minor structural impurity, worth noting but fine to defer.
Assessment Summary
After all findings, provide:
Findings table: | Dimension | CRITICAL | HIGH | MEDIUM | LOW |
Architecture health score: Rate each dimension on a simple scale:
- Smells: HEALTHY / CONCERNING / DEGRADED
- Metrics: WITHIN THRESHOLDS / APPROACHING LIMITS / EXCEEDING THRESHOLDS
- Dependencies: CLEAN / TANGLED / CYCLIC
- Antipatterns: NONE DETECTED / MINOR / SYSTEMIC
- Risk posture: LOW / MODERATE / HIGH
- Technical debt: MANAGEABLE / ACCUMULATING / CRITICAL
Top 3 priorities: Which findings to address first and why, considering
both impact and effort.
Improvement roadmap: Categorize all recommendations as:
- Critical — Immediate action required (high-severity risks)
- Important — Address in near term (quality attribute deficiencies)
- Beneficial — Opportunistic improvements (debt reduction)
Overall assessment: One paragraph synthesizing the architecture's
structural health, key strengths, and primary risks.
6. Remediation Mode (Optional)
When a fix or refactoring is requested, produce concrete remediation proposals:
- For smells: specific refactoring steps following the mitigation strategies
in the smell references.
- For antipatterns: architectural change proposals with migration approach.
- For metric violations: targeted interventions to bring metrics within thresholds.
- For dependency issues: restructuring proposals with before/after dependency maps.
- For debt: a prioritized backlog of remediation work items.
Use incremental approaches (Strangler Fig, Façade pattern) for large-scale changes
rather than proposing big-bang rewrites.
Pragmatism Guidelines
These are diagnostic findings, not mandates. Apply judgment:
- Scale calibration: A weekend project doesn't need the same structural rigor
as a platform serving millions. Adjust severity to match the context.
- Conscious trade-offs: Some structural impurities are deliberate. When
rationale exists (in ADRs, comments, or documentation), acknowledge it.
- Competing concerns: Architectural quality attributes have productive
tensions — loose coupling vs. DRY across service boundaries, simplicity vs.
resilience patterns, YAGNI vs. evolvability. Flag the tension and offer
judgment, not dogma.
- Trend matters more than snapshot: A codebase with moderate smells but
improving trends is healthier than one with few smells but deteriorating.
- Actionable over exhaustive: Five findings with clear remediation paths
beat twenty observations without actionable next steps.
- No architecture is perfect: The goal is continuous improvement, not
theoretical purity. Prioritize findings that deliver the most maintainability
benefit per unit of remediation effort.
Example Interactions
User: archibald smells (with a codebase directory)
Claude:
- Reads all seven smell reference files
- Maps the component/module structure from the directory
- Analyzes dependency graphs for cycles, fan-in/fan-out, stability
- Assesses component sizes, interface clarity, feature distribution
- Reports findings with locations, severity, evidence, and recommendations
- Provides summary with health scores and priorities
User: archibald metrics (with specific files)
Claude:
- Reads
references/metrics.md
- Computes or estimates CBO, Ca/Ce, instability, LCOM, CC for target code
- Compares against established thresholds
- Reports outliers and threshold violations with severity
- Provides summary with metric dashboard and refactoring candidates
User: archibald (full assessment of a project)
Claude:
- Reads all twelve reference files
- Gathers architectural artifacts from codebase
- Runs all six dimensions of analysis
- Reports findings organized by dimension
- Provides comprehensive summary with health scores, priorities, and roadmap
1---2name: archibald3description: This skill should be used when the user asks to "assess architecture quality", "check for architectural smells", "analyze dependencies", "evaluate technical debt", "review architecture health", "find antipatterns", or "measure coupling/cohesion/complexity". Also triggers when the user mentions specific concepts by name (e.g., "cyclic dependency", "god component", "hub-like dependency", "dependency structure matrix", "DSM", "instability metric", "LCOM", "CBO", "Big Ball of Mud", "cargo cult", "golden hammer"). Supports a full architecture assessment or focused analysis of individual dimensions.4---56# Archibald — Software Architecture Quality Assessment78Assess the structural health of a software architecture through smell detection,9quantitative metrics, antipattern identification, dependency structure evaluation,10risk/trade-off analysis, and technical debt measurement.1112This skill operates at the architecture level — components, modules, packages,13services, layers, and their relationships. It complements class-level SOLID checks14and system-level design principle checks by focusing on **observable structural15quality** rather than adherence to specific design principles.1617Key insight: architectural smells are independent from code smells (less than 30%18correlation), making dedicated architecture-level assessment essential.1920## Subcommands2122Request a full assessment or focus on a single dimension:2324| Command | Dimension | References |25|---------|-----------|------------|26| `archibald` / `archibald full` | Full assessment (all dimensions) | All references |27| `archibald smells` | Architectural smell detection | `references/cyclic-dependency.md`, `references/unstable-dependency.md`, `references/hub-like-dependency.md`, `references/god-component.md`, `references/feature-concentration.md`, `references/scattered-functionality.md`, `references/ambiguous-interface.md` |28| `archibald antipatterns` | Antipattern identification | `references/antipatterns.md` |29| `archibald metrics` | Quantitative metrics analysis | `references/metrics.md` |30| `archibald dependencies` | Dependency structure analysis | `references/dependency-structure.md` |31| `archibald risks` | Risk & trade-off analysis | `references/risk-analysis.md` |32| `archibald debt` | Technical debt assessment | `references/technical-debt.md` |3334When no subcommand is specified, default to a full assessment.35When a specific concept is mentioned by name (e.g., "cyclic dependency", "CBO",36"DSM"), match it to the appropriate dimension and load the relevant references.3738## Workflow3940### 1. Identify Target Architecture4142Determine what to analyze:43- When files or a directory are provided, use those.44- When a service, module, or component is referenced by name, locate it.45- When ambiguous, ask which files, directories, or services to scan.4647Before diving in, establish context that affects severity calibration:48- **Project scale**: small app, medium codebase, large platform, distributed system?49- **Team size**: solo developer, small team, multiple teams?50- **Lifecycle stage**: prototype, active development, mature production, legacy?51- **Architecture style**: monolith, modular monolith, microservices, serverless, etc.?5253Use whatever context is available from the codebase itself (directory structure,54build files, deployment configs, README) rather than asking unnecessary questions.5556### 2. Load References5758Before analyzing, read the reference file(s) for the requested dimension(s).5960For smell detection, read the individual smell references needed:61- [`references/cyclic-dependency.md`](references/cyclic-dependency.md)62- [`references/unstable-dependency.md`](references/unstable-dependency.md)63- [`references/hub-like-dependency.md`](references/hub-like-dependency.md)64- [`references/god-component.md`](references/god-component.md)65- [`references/feature-concentration.md`](references/feature-concentration.md)66- [`references/scattered-functionality.md`](references/scattered-functionality.md)67- [`references/ambiguous-interface.md`](references/ambiguous-interface.md)6869For other dimensions:70- [`references/antipatterns.md`](references/antipatterns.md)71- [`references/metrics.md`](references/metrics.md)72- [`references/dependency-structure.md`](references/dependency-structure.md)73- [`references/risk-analysis.md`](references/risk-analysis.md)74- [`references/technical-debt.md`](references/technical-debt.md)7576For a full assessment (`archibald full`), read all twelve reference files.7778### 3. Gather Architectural Artifacts7980Before applying assessment patterns, build a picture of the current architecture:8182**From the codebase:**83- Component/module/package structure (directory layout, build modules)84- Import/dependency graph (who depends on whom)85- Public API surface of each component (exports, interfaces, endpoints)86- Size indicators (approximate LOC per component, class counts)8788**From documentation (if available):**89- Architecture diagrams or design documents90- Architecture Decision Records (ADRs)91- Dependency maps or component catalogs92- Quality attribute requirements9394**From version control (if available):**95- Files that change together (logical coupling)96- Change frequency per component (hotspots)97- Growth trends over time9899### 4. Analyze100101Apply the detection heuristics from the loaded references. Each dimension has102its own analysis approach:103104- **Smells**: Match structural patterns against the seven smell definitions.105 Check dependency graphs for cycles, compute fan-in/fan-out, assess component106 sizes, evaluate interface clarity, and identify scattered/concentrated features.107- **Antipatterns**: Look for recurring flawed decision patterns — technology108 choices driving architecture, cargo cult adoption, over/under-engineering.109- **Metrics**: Compute or estimate coupling (CBO, Ca, Ce, instability),110 cohesion (LCOM, cohesion type), and complexity (CC, LOC, nesting depth).111 Compare against established thresholds.112- **Dependencies**: Construct a mental or actual DSM. Identify layering patterns,113 cycles, hub components, and problematic backward dependencies.114- **Risks**: Identify architectural decisions with potentially undesirable115 consequences, sensitivity points where small changes have outsized impact,116 and trade-off points where quality attributes conflict.117- **Debt**: Assess accumulated structural problems using the severity/centrality/118 trend framework. Map smells to the prioritization matrix.119120Think carefully about each finding. Not every heuristic match is a true problem.121Consider context, scale, team maturity, and conscious trade-offs.122123### 5. Report Findings124125Present findings using this structure:126127#### Per Finding128129```130**[DIMENSION] Finding — Severity: CRITICAL | HIGH | MEDIUM | LOW**131Location: `component/module/service`, files or paths involved132Finding: Clear description of the structural issue and why it matters.133Evidence: What observable patterns led to this finding.134Impact: How this affects maintainability, evolvability, reliability, or velocity.135Recommendation: Concrete remediation approach with effort estimate if possible.136```137138Severity guidelines:139- **CRITICAL**: Immediate structural risk — cascading failures, complete inability140 to evolve a component independently, or blocking parallel development.141- **HIGH**: Active maintenance pain, significant coupling drag, or measurable142 impact on development velocity.143- **MEDIUM**: Architecture smell that will compound as the system grows or as144 more teams contribute.145- **LOW**: Minor structural impurity, worth noting but fine to defer.146147#### Assessment Summary148149After all findings, provide:1501511. **Findings table**: `| Dimension | CRITICAL | HIGH | MEDIUM | LOW |`1521532. **Architecture health score**: Rate each dimension on a simple scale:154 - Smells: HEALTHY / CONCERNING / DEGRADED155 - Metrics: WITHIN THRESHOLDS / APPROACHING LIMITS / EXCEEDING THRESHOLDS156 - Dependencies: CLEAN / TANGLED / CYCLIC157 - Antipatterns: NONE DETECTED / MINOR / SYSTEMIC158 - Risk posture: LOW / MODERATE / HIGH159 - Technical debt: MANAGEABLE / ACCUMULATING / CRITICAL1601613. **Top 3 priorities**: Which findings to address first and why, considering162 both impact and effort.1631644. **Improvement roadmap**: Categorize all recommendations as:165 - **Critical** — Immediate action required (high-severity risks)166 - **Important** — Address in near term (quality attribute deficiencies)167 - **Beneficial** — Opportunistic improvements (debt reduction)1681695. **Overall assessment**: One paragraph synthesizing the architecture's170 structural health, key strengths, and primary risks.171172### 6. Remediation Mode (Optional)173174When a fix or refactoring is requested, produce concrete remediation proposals:175- For smells: specific refactoring steps following the mitigation strategies176 in the smell references.177- For antipatterns: architectural change proposals with migration approach.178- For metric violations: targeted interventions to bring metrics within thresholds.179- For dependency issues: restructuring proposals with before/after dependency maps.180- For debt: a prioritized backlog of remediation work items.181182Use incremental approaches (Strangler Fig, Façade pattern) for large-scale changes183rather than proposing big-bang rewrites.184185## Pragmatism Guidelines186187These are diagnostic findings, not mandates. Apply judgment:188189- **Scale calibration**: A weekend project doesn't need the same structural rigor190 as a platform serving millions. Adjust severity to match the context.191- **Conscious trade-offs**: Some structural impurities are deliberate. When192 rationale exists (in ADRs, comments, or documentation), acknowledge it.193- **Competing concerns**: Architectural quality attributes have productive194 tensions — loose coupling vs. DRY across service boundaries, simplicity vs.195 resilience patterns, YAGNI vs. evolvability. Flag the tension and offer196 judgment, not dogma.197- **Trend matters more than snapshot**: A codebase with moderate smells but198 improving trends is healthier than one with few smells but deteriorating.199- **Actionable over exhaustive**: Five findings with clear remediation paths200 beat twenty observations without actionable next steps.201- **No architecture is perfect**: The goal is continuous improvement, not202 theoretical purity. Prioritize findings that deliver the most maintainability203 benefit per unit of remediation effort.204205## Example Interactions206207**User**: `archibald smells` (with a codebase directory)208209**Claude**:2101. Reads all seven smell reference files2112. Maps the component/module structure from the directory2123. Analyzes dependency graphs for cycles, fan-in/fan-out, stability2134. Assesses component sizes, interface clarity, feature distribution2145. Reports findings with locations, severity, evidence, and recommendations2156. Provides summary with health scores and priorities216217**User**: `archibald metrics` (with specific files)218219**Claude**:2201. Reads `references/metrics.md`2212. Computes or estimates CBO, Ca/Ce, instability, LCOM, CC for target code2223. Compares against established thresholds2234. Reports outliers and threshold violations with severity2245. Provides summary with metric dashboard and refactoring candidates225226**User**: `archibald` (full assessment of a project)227228**Claude**:2291. Reads all twelve reference files2302. Gathers architectural artifacts from codebase2313. Runs all six dimensions of analysis2324. Reports findings organized by dimension2335. Provides comprehensive summary with health scores, priorities, and roadmap