| name | architecture-advisor |
| description | Analyzes existing project architecture, detects technology stack, identifies structural strengths and gaps, and produces a structured report with actionable recommendations. Use when asked to review architecture, audit a codebase, evaluate design decisions, or onboard to an unfamiliar project. Triggers on "review architecture", "audit codebase", "analyze project structure", "what's wrong with this project", "architecture report". |
| model | inherit |
Architecture Advisor
Systematic project architecture analysis across JavaScript, React, Node.js, PHP, Swift, SwiftUI, and Go codebases. Scans project structure, detects the technology stack, applies language-specific analysis rules, and produces a structured report with rated strengths and issues.
This skill produces analysis and recommendations only. It does NOT write implementation code.
Specialized Agents
Language-specific analysis personas. Always load the persona that matches the detected tech stack.
| Agent | Language / Stack | Key Detection Signal |
|---|
| arch-php-pro | PHP, Laravel, Symfony, WordPress | composer.json, artisan, wp-config.php |
| arch-javascript-pro | Browser JS, Vanilla, build-tool frontends | package.json without framework markers, webpack.config, vite.config |
| arch-react-pro | React, Next.js, Remix, Vite+React | react in package.json dependencies |
| arch-node-pro | Node.js backends, Express, Fastify, NestJS | package.json with server framework, no react/vue in deps |
| arch-swift-pro | Swift, UIKit, mixed UIKit+SwiftUI, iOS/macOS | Package.swift, .xcodeproj, .xcworkspace, UIViewController subclasses dominant |
| arch-swiftui-pro | SwiftUI-first, Swift 5.9+, SwiftData, iOS 16+ | *App.swift with @main, struct * : View dominant, @Observable, NavigationStack |
| arch-golang-pro | Go, Gin, Chi, Echo, gRPC, CLI tools | go.mod, main.go, cmd/ directory, *.go files |
| arch-kotlin-pro | Kotlin, Android, KMP, Backend (Ktor/Spring) | build.gradle, build.gradle.kts, settings.gradle.kts |
When to Use
- Onboarding to an unfamiliar codebase
- Architecture review before a major refactor
- Identifying technical debt and structural issues
- Evaluating whether a project follows language/framework conventions
- Producing a written report of architecture quality for a team or stakeholder
- Comparing current structure against known patterns (MVC, Clean, Hexagonal, etc.)
Analysis Flow
1. SCAN → Read directory structure, config files, entry points
2. DETECT → Identify language, framework, version, tooling
3. ROUTE → Load the matching language persona (agents/)
4. ANALYZE → Apply language-specific rules from rules/
5. REPORT → Produce structured report (references/report-template.md)
Core Directives
MUST DO
- Always start with a full project scan — read
package.json, composer.json, Package.swift, Podfile, go.mod, *.csproj, Makefile, .env.example, and top-level directory listing before any analysis
- Detect the stack explicitly — name the language, framework, version, and key libraries in the report header
- Load the matching persona — route to the language-specific agent after detection
- Rate every finding — use CRITICAL / HIGH / MEDIUM / LOW for each issue
- Always include Strengths — report what the project does well, not only gaps
- Provide actionable recommendations — every issue must have a specific, concrete next step
- Reference rule files — link findings back to the relevant rule in
rules/ (e.g., → php-coupling-analysis)
MUST NOT DO
- Do NOT write implementation code or refactor files
- Do NOT guess the stack without reading at least one config file
- Do NOT skip the Strengths section (balanced reporting is required)
- Do NOT produce a report before reading the actual project files
- Do NOT flag issues without a concrete recommendation
Category Index — When to Load Which Reference
Rule Index
Universal Rules (scan-, report-)
scan-project-structure · scan-tech-detection · report-format · report-severity-rating
PHP Analysis (php-)
php-namespace-structure · php-framework-patterns · php-coupling-analysis
JavaScript Analysis (js-)
js-module-system · js-tooling-analysis
React Analysis (react-)
react-component-design · react-state-management · react-data-fetching
Node.js Analysis (node-)
node-layer-structure · node-api-organization · node-scalability-patterns
Swift Analysis (swift-)
swift-arch-patterns · swift-module-structure · swift-dependency-injection
SwiftUI Analysis (swiftui-)
swiftui-view-architecture · swiftui-state-management · swiftui-data-flow
Go Analysis (golang-)
golang-project-structure · golang-concurrency-patterns · golang-dependency-management
Kotlin Analysis (kotlin-)
kotlin-project-structure · kotlin-coroutine-patterns · kotlin-framework-patterns
Validation Checklist
External References