| name | validate-architecture |
| description | Validate DDD 4-layer architecture compliance. Use when (1) after implementation completion, (2) during verification phase, (3) before PR creation, (4) architecture refactoring validation, (5) Constitution Principle I/II compliance check. |
| tools | Bash, Read, Grep |
π μμ€ν λ©μμ§: μ΄ Skillμ΄ νΈμΆλλ©΄
[SEMO] Skill: validate-architecture νΈμΆ - {λλ©μΈ/λ²μ}μμ€ν λ©μμ§λ₯Ό 첫 μ€μ μΆλ ₯νμΈμ.
Validate Architecture Skill
@./../_shared/ddd-patterns.md @./../_shared/ssr-rules.md
Purpose: Ensure DDD 4-layer architecture compliance and pattern adherence
Quick Start
When to Use
- After implementation completion
- During verification phase (Phase 5)
- Before PR creation
- Architecture refactoring validation
What It Does
| Check | Description |
|---|---|
| Structure | All 4 layers exist with proper naming |
| Repository | Server-side only, uses createServerSupabaseClient |
| API Client | Factory Pattern, singleton exported |
| Hooks | React Query, calls API client |
| Components | Uses hooks, no direct API/Supabase |
| SSR | Minimal 'use client', server-first |
4-Layer Structure
app/{domain}/
βββ _repositories/ β Server-side data access
βββ _api-clients/ β Factory Pattern singleton
βββ _hooks/ β React Query wrappers
βββ _components/ β UI only, uses hooks
Usage
// Full architecture validation
skill: validateArchitecture();
// Validate specific domain
skill: validateArchitecture("posts");
// Quick check (structure only)
skill: validateArchitecture({ quick: true });
Severity Levels
| Level | Examples | PR Impact |
|---|---|---|
| π΄ Critical | Missing layers, Repository 'use client' | Blocks PR |
| π‘ Warning | Unnecessary 'use client', missing tests | Should fix |
| π’ Info | Naming improvements | Nice to have |
Constitution Compliance
SoT μ°Έμ‘°: Constitution μμΉμ
semo-core/PRINCIPLES.mdμμ κ΄λ¦¬λ©λλ€.
- Principle I: DDD Architecture (NON-NEGOTIABLE)
- Principle II: SSR-First Development
Related
- Output Format - Skill-specific output
Related Skills
verify- Uses this for architecture validationscaffold-domain- Creates validated structureimplement- Ensures compliance during implementation