.claude/skills/gwt-arch-review/SKILL.md
Use proactively after completing a major feature or weekly to maintain code quality. Scans domain boundaries (DDD), module depth (Ousterhout), testability, and agent-friendliness. Outputs prioritized improvement report. Triggers: 'review architecture', 'codebase review', 'コードレビュー'.
npx skillsauth add akiojin/gwt gwt-arch-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Perform a structured architectural review of any codebase and produce a prioritized improvement report. This skill is read-only — it analyzes and reports but never modifies code.
"If you have a garbage code base, the AI will produce garbage within that code base." — aihero.dev
Regular architectural review directly improves agent output quality. This skill closes the feedback loop:
gwt-discussion → gwt-plan-spec → gwt-build-spec → gwt-arch-review
↑ |
└────────────────────────────────────┘
Before starting, determine the review scope with the user:
git diff --name-only <base>..HEAD)Exclude from analysis: test fixtures, generated code, vendored dependencies, build artifacts.
Goal: Build a structural map of the codebase.
## Phase 1: Codebase Scan
Modules: <count>
Total source files: <count>
Median file size: <lines> lines
Files > 300 lines: <list with paths>
Files > 500 lines: <list with paths>
Dependency direction:
<module-a> → <module-b> (N imports)
...
Entry points:
- <path>: <purpose>
Goal: Evaluate whether Bounded Contexts are respected and domain logic is properly contained.
Reference: references/domain-analysis.md
Goal: Evaluate module design quality using John Ousterhout's Deep Module theory.
Reference: references/module-depth.md
10 public methods
5 direct dependencies
Goal: Assess how well the codebase supports both automated testing and AI agent comprehension.
Reference: references/agent-friendliness.md
Goal: Produce a single, actionable improvement report.
Reference: references/report-format.md
# Architecture Review Report
**Repository**: <name>
**Scope**: <full | subset description>
**Date**: <date>
**Reviewed by**: gwt-arch-review
## Executive Summary
<2-3 sentences: overall health, top concern, recommended first action>
## Metrics
| Metric | Value | Status |
|--------|-------|--------|
| Total modules | N | — |
| Files > 300 lines | N | <ok/warn/critical> |
| Files > 500 lines | N | <ok/warn/critical> |
| Circular dependencies | N | <ok/warn/critical> |
| God objects | N | <ok/warn/critical> |
| Untested public APIs | N | <ok/warn/critical> |
## Findings
### Critical
- **[C1]** <title>
- Files: <paths>
- Issue: <description>
- Impact: <why it matters>
- Suggested action: <what to do>
### High
- **[H1]** ...
### Medium
- **[M1]** ...
### Low
- **[L1]** ...
## Improvement Proposals
Priority-ordered list of concrete improvements:
1. **<proposal title>** — Addresses [C1], [H2]
- Estimated effort: <small/medium/large>
- Suggested approach: <1-2 sentences>
- Create SPEC via: `gwt-discussion`
2. ...
## Feedback Loop
To act on these findings:
1. Pick the top 1-3 proposals
2. Use `gwt-discussion` to create improvement SPECs
3. Follow the normal gwt-plan-spec → gwt-build-spec pipeline
4. Run `gwt-arch-review` again after implementation to verify improvement
tools
Create distinctive, production-grade terminal user interfaces. Use when building TUI components with ratatui, CLI output styling, or xterm.js terminal rendering. Triggers: 'design TUI', 'terminal UI', 'TUIデザイン', 'ターミナルUI', 'ratatui widget'
testing
Semantic search over SPEC Issues (GitHub Issue cache at ~/.gwt/cache/issues/) using vector embeddings. Use when searching for existing specs, finding related specs, checking for duplicate specs, or determining which spec owns a scope. Mandatory preflight before gwt-discussion when the work may need a SPEC owner. Use when user says 'search specs', 'find related specs', 'check for duplicate specs', or asks which spec owns a scope.
testing
Mandatory preflight before gwt-discussion, gwt-register-issue, and gwt-fix-issue. Use proactively before creating any SPEC or Issue owner or before reusing an existing one. Searches SPEC Issues, GitHub Issues, and project files via ChromaDB. Triggers: 'search', 'find related', 'check duplicates'.
business
Use when the user wants to register new work from a bug report, idea, or task description and an existing GitHub Issue number is not already known.