.claude/skills/review-architecture/SKILL.md
--- name: review-architecture description: Architecture-level code review — traces changes across DB→Service→Controller→DTO→Hook→Component→Cache layers, verifying cross-module pattern consistency, CAS coherence, cache invalidation correctness, security layers, and performance anti-patterns. Unlike verify-* skills (rule-based automated checks), this provides senior architect-level design judgment. Use after adding new modules, implementing complex state-change logic, multi-step approval flows, or
npx skillsauth add junnv93/equipment_management_system .claude/skills/review-architectureInstall 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.
이 스킬은 *verify- 스킬과 상호보완적**입니다:
인수가 제공되면 해당 도메인/파일만, 아니면 git diff --name-only HEAD + git status --short로 식별.
변경 파일을 3개 스트림으로 분류:
| 스트림 | 대상 파일 패턴 | 리뷰 영역 |
|---|---|---|
| Backend | modules/*/, common/, database/, packages/db/ | CAS, 캐시, 보안, 성능 |
| Frontend | app/, components/, hooks/, lib/ | 상태 아키텍처, 캐시 무효화, 에러 전파 |
| Cross-cutting | 양쪽 모두 변경된 도메인 | 계층 관통, 모듈 패턴 일관성 |
변경이 존재하는 스트림만 Agent tool로 동시 실행합니다.
상세 Agent 프롬프트 템플릿: references/review-agent-prompts.md
모든 Agent 스트림 완료 후, 통합 보고서로 병합합니다.
## 아키텍처 리뷰 보고서
### 요약
| 영역 | 상태 | 발견 사항 |
|---|---|---|
| 계층 관통 | OK / N개 누락 | 요약 |
| CAS 일관성 | OK / N개 이슈 | 요약 |
| 캐시 코히어런스 | OK / N개 이슈 | 요약 |
| ...
### 발견된 이슈 (심각도순)
#### [Critical|Warning|Info] 제목
- **파일**: `path:line`
- **문제/영향/수정안/참고 패턴**
리뷰 후 체크리스트/예외 개선 학습을 점검합니다.
상세: references/review-agent-prompts.md Step 4
| 심각도 | 기준 | 예시 | |---|---|---| | Critical | 프로덕션 버그, 데이터 정합성, 보안 취약점 | CAS 누락, userId body 신뢰 | | Warning | 패턴 불일치, 캐시 누락, 성능 영향 | 교차 캐시 무효화 누락 | | Info | 개선 제안, 일관성 향상 | 반환 타입 명시 |
다음은 이슈로 보고하지 않습니다:
@UseGuards(JwtAuthGuard) — 방어적 코딩으로 허용proxy.ts 파일명 + proxy 함수명 — Next.js 16.1.6 정상 패턴| File | Purpose |
|---|---|
| references/review-checklist.md | 도메인별 상세 체크리스트 (8개 섹션) |
| references/review-learnings.md | 리뷰 학습 기록 |
| references/review-agent-prompts.md | Agent 프롬프트 템플릿 + 자체 학습 절차 |
| apps/backend/src/common/base/versioned-base.service.ts | CAS 기본 클래스 |
| apps/backend/src/common/cache/cache-invalidation.helper.ts | 캐시 교차 무효화 |
| apps/frontend/hooks/use-optimistic-mutation.ts | 프론트엔드 CAS 처리 |
| apps/frontend/lib/api/cache-invalidation.ts | 프론트엔드 캐시 무효화 |
| apps/frontend/lib/errors/equipment-errors.ts | 에러 코드 매핑 |
testing
Verifies Zod validation pattern compliance — ZodValidationPipe usage (no class-validator), versionedSchema inclusion in state-change DTOs, controller pipe application, query DTO consistency. Run after adding/modifying DTOs or controller endpoints.
testing
Verifies cross-feature workflow E2E test coverage against critical-workflows.md checklist. Checks WF-01~WF-35 coverage, step completeness, role correctness, side-effect verification, and status transition assertions. Run after adding workflow tests or before PR.
testing
SSOT(Single Source of Truth) 임포트 소스를 검증합니다. 타입/enum/상수가 올바른 패키지에서 임포트되는지 확인. 타입/enum 추가/수정 후 사용.
development
Verifies SQL safety — LIKE wildcard escaping, N+1 query pattern detection, COUNT(DISTINCT) for fan-out JOINs, RBAC INNER JOIN enforcement. Run after adding/modifying search or list API endpoints.