一键导入
arch-review
Use when validating code for circular imports, layer violations, or design doc logic errors before merging architecture-level changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when validating code for circular imports, layer violations, or design doc logic errors before merging architecture-level changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| allowed-tools | ["Read","Grep","Glob","Bash"] |
| description | Use when validating code for circular imports, layer violations, or design doc logic errors before merging architecture-level changes. |
| name | arch-review |
| trigger | 아키텍처 검토, 레이어 위반 확인, 순환 의존성, 설계 문서 검토, 설계 모순 검사, review architecture, check layer violations, before merging structural changes, design review, design contradiction check, 구조 검증, 코드 구조 점검, 아키텍처 일관성 확인, 과거 아키텍처 결정 검토, memory recall architecture, boundary compliance check, 경계 준수 확인, 복잡도 검사, shellcheck 구조 분석, 설계 실현 가능성 검증, 엣지 케이스 아키텍처, severity 평가, arch review before merge, validate code structure, circular import check, layer isolation check, design doc consistency |
| version | 4.0.0 |
md-recall-memory.sh 로 과거 아키텍처 결정과 일관성 필수 검증아키텍처 리뷰 전 과거 결정 사항을 recall하여 일관성을 검증한다:
bash .hxsk/hooks/md-recall-memory.sh "architecture" "." 5 compact
또는 네이티브 도구:
Grep(pattern: "architecture|arch.*decision", path: ".hxsk/memories/architecture-decision/", output_mode: "files_with_matches")
Grep/Glob을 사용하여 구조 검증:
# 순환 import 후보 검출 (같은 디렉토리 내 상호 참조)
Grep(pattern: "from \\.\\. import|from \\. import", path: "src/", output_mode: "files_with_matches")
# 레이어 위반 검출 (예: UI가 Repository를 직접 호출)
Grep(pattern: "from.*repository.*import|import.*repository", path: "src/ui/", output_mode: "files_with_matches")
Grep(pattern: "from.*ui.*import|import.*ui", path: "src/repository/", output_mode: "files_with_matches")
복잡도 검사 (shellcheck 기반):
shellcheck .hxsk/hooks/*.sh 2>&1 || true
Cross-check against defined boundaries:
| Boundary | Check |
|---|---|
| Layer isolation | UI → Service → Repository only |
| Circular deps | No cycles in call graph |
| External calls | Only via approved adapters |
설계 문서(design doc, PLAN.md, SPEC.md 등)가 대상인 경우 아래 체크리스트를 수행:
논리적 일관성 검증:
실현 가능성 검증:
엣지 케이스 검증:
Severity 기준:
Compile findings into a structured report. 중요한 아키텍처 결정은 메모리에 저장:
bash .hxsk/hooks/md-store-memory.sh \
"Architecture Decision: {title}" \
"{context and decision}" \
"architecture,decision" \
"architecture-decision"
{
"status": "PASS | WARN | FAIL",
"violations": [
{
"type": "layer_violation",
"source": "src/ui/Dashboard.tsx",
"target": "src/repository/UserRepo.ts",
"severity": "HIGH",
"recommendation": "Add service layer"
}
],
"patterns_matched": ["repository-pattern", "facade-pattern"]
}
| Severity | Action |
|---|---|
| LOW | Log warning, proceed |
| MEDIUM | Require acknowledgment in DECISIONS.md |
| HIGH | Block and require human approval |
| CRITICAL | Stop all work, escalate to tech lead |
(없음 — shellcheck, Grep, Glob 등 에이전트 네이티브 도구로 직접 수행)
NO ARCHITECTURE REVIEW WITHOUT MEMORY RECALL FIRST NO LAYER VIOLATION WITHOUT UNIDIRECTIONAL FLOW (UI -> SERVICE -> REPOSITORY) NO CIRCULAR DEPENDENCY WITHOUT GRAPH CYCLE DETECTION NO DESIGN IMPLEMENTATION WITHOUT LOGIC AND FEASIBILITY VERIFICATION NO CRITICAL VIOLATION RESOLUTION WITHOUT STOPPING ALL WORK NO HIGH SEVERITY BLOCK RESOLUTION WITHOUT HUMAN APPROVAL NO REPORT GENERATION WITHOUT STRUCTURED VIOLATION LOGGING
Use when Ground Truth alignment finds memory contamination and the user explicitly requests scoped cleanup with /cleanse.
Use when registering, reviewing, merging, or rebuilding HXSK glossary term definitions after glossary-detect suggests a candidate or the user invokes /define.
Use when staged changes exist requiring qlty checks, logical split detection, or HXSK phase-scoped conventional commit creation.
Use when .hxsk/.bootstrap-version is missing (fresh install) or exists (verify/update) to initialize HExoskeleton.
Use when shell scripts need linting/formatting before execution or commit to ensure code quality.
Use when analyzing an existing codebase to generate ARCHITECTURE.md and STACK.md, or when mapping project structure, dependencies, patterns, integrations, and technical debt before planning.