Loading...
Loading...
Analyzes code for software architecture fitness, producing scores (1-10) across coupling, cohesion, layering, modularity, naming, API design, and maintainability. Use when the user says /review:review-architecture, requests an architecture review, asks about coupling and cohesion, wants to analyze design or check code structure, asks to review naming or API design, or needs architecture fitness scores. Triggers on "architecture review", "coupling and cohesion", "analyze design", "check code structure", "review naming", "API design". Only reports findings with confidence >= 7/10.
npx skill4agent add jeffabailey/skills review-architecturereferences/rubric.mdreferences/checklist.mdreferences/wisdom.mdgrep -n '^#' references/wisdom.mdscripts/import_graph.pyfitness-config.jsonpython3 "${CLAUDE_SKILL_DIR}/../../scripts/fitness-config.py" show --path <target>${CLAUDE_SKILL_DIR}scripts/SKILL.md<target>Config:Effective weights:statusThresholdseffective<!-- BEGIN_EFFECTIVE_CONFIG_JSON --><!-- END_EFFECTIVE_CONFIG_JSON -->references/rubric.mdreferences/checklist.mdclaude_client.pypython3 "${CLAUDE_SKILL_DIR}/scripts/import_graph.py" <target-dir>--include-tests--jsonchecklist.mdreferences/rubric.mdreferences/rubric.mdreferences/checklist.mddocs/architecture-review.mdgit -C <target> rev-parse --show-topleveldocs/architecture-review-<scope-slug>.mddocs/architecture-review-scripts-fitness-config.md# Software Architecture Fitness Review# Software Architecture Fitness Review
**Target:** <path(s) or scope reviewed>
Config: <copied from resolver output>
Effective weights: <copied from resolver output>
## Direct Answer
(Only when the user asked a specific question. Answer it in 2-5 sentences with file:line evidence, e.g. fan-in/fan-out numbers from import_graph.py.)
## Summary
Overall fitness score: X.X / 10 — <status band> (mean of <list of scored dimensions>; <CRITICAL cap applied / not applied>)
| Dimension | Score | Status | Key Finding |
|-----------|-------|--------|-------------|
| Coupling | X/10 | Healthy / Needs Attention / Critical | ... |
| Cohesion | X/10 | ... | ... |
| Layering | N/A — reason | — | ... |
| Modularity | X/10 | ... | ... |
| Naming | X/10 | ... | ... |
| API Design | X/10 | ... | ... |
| Maintainability | X/10 | ... | ... |
Dependency graph: <N modules, cycles, hubs, max fan-in/fan-out from import_graph.py>.
Candidates dropped below confidence 7: <count> (<one-line gist each, or "none">).
## Detailed Findings
### Finding 1: [Title]
- **Severity:** CRITICAL / HIGH / MEDIUM / LOW
- **Confidence:** X/10
- **Dimension:** [which scoring dimension]
- **Location:** file:line
- **Description:** What the issue is and why it matters.
- **Evidence:** The specific code pattern found.
- **Impact:** What could go wrong as the codebase evolves, and how you verified it (read path X -> Y, or ran Z).
- **Remediation:** Concrete fix with code example or specific steps.
(repeat for each finding, ordered by severity)
### Coupling (X/10)
- Evidence: file:line references (or the place something is missing)
- Issues found
- Recommendations
(repeat for each dimension; N/A dimensions get one line with the reason)
## Top Action Items (by impact)
Up to 5, fewer is fine. Every dimension scored below 6 needs at least one item; add items beyond 5 only for that.
1. [CRITICAL/HIGH/MEDIUM] Description -- file:line (Dimension)
2. ...
## Checklist Reference
See references/checklist.md for the full architecture checklist and references/rubric.md for the scoring anchors.
## Reference
Based on [Fundamentals of Software Architecture](https://jeffbailey.us/blog/2025/10/19/fundamentals-of-software-architecture/), [Fundamentals of Software Design](https://jeffbailey.us/blog/2025/11/05/fundamentals-of-software-design/), [Fundamentals of API Design and Contracts](https://jeffbailey.us/blog/2026/01/16/fundamentals-of-api-design-and-contracts/), and guidance from https://jeffbailey.us/categories/fundamentals/