원클릭으로
arch-audit
Architecture dependency analysis to ensure proper feature isolation and composition root pattern.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Architecture dependency analysis to ensure proper feature isolation and composition root pattern.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Comprehensive static code analysis to enforce architectural patterns, conventions, and code quality standards.
Comprehensive documentation generation through automated codebase analysis, pattern detection, and diagram creation.
Dependency health analysis to detect outdated packages and unused dependencies.
Safe minor dependency updates with validation (lint/test/build) and automatic rollback on failure.
Security vulnerability analysis to detect hardcoded secrets, dangerous patterns, and unsafe code practices.
Test coverage analysis to ensure adequate testing, Storybook coverage, and test quality.
| name | arch-audit |
| description | Architecture dependency analysis to ensure proper feature isolation and composition root pattern. |
Enforce architectural boundaries and dependency rules across the codebase.
What it checks (8 checks, each with its own script):
What it doesn't check:
code-audit skillThis template uses core/domain separation and composition root pattern:
Composition Root (src/config/)
Core Features (src/core/features/)
Domain Features (src/domain/features/)
All checks:
node ./.claude/skills/arch-audit/scripts/run_all_checks.mjs
Generate report:
node ./.claude/skills/arch-audit/scripts/generate_report.mjs
Individual checks:
node ./.claude/skills/arch-audit/scripts/check_core_to_domain.mjs
node ./.claude/skills/arch-audit/scripts/check_service_imports.mjs
node ./.claude/skills/arch-audit/scripts/check_service_boundaries.mjs
node ./.claude/skills/arch-audit/scripts/check_pages_boundaries.mjs
node ./.claude/skills/arch-audit/scripts/check_model_internals.mjs
node ./.claude/skills/arch-audit/scripts/check_slice_imports.mjs
node ./.claude/skills/arch-audit/scripts/check_sagas_imports.mjs
node ./.claude/skills/arch-audit/scripts/check_circular_deps.mjs
RULE: Core features (infrastructure) MUST NOT depend on domain features (business logic).
Allowed:
Violations:
Exception:
src/config/ is composition root, can import anythingCheck: check_core_to_domain.mjs
RULE: Services (@/services/*) MUST ONLY be imported in composition root (src/config/).
Allowed:
src/config/services.ts (root services)src/config/{feature}/services.ts (feature-specific services)Violations:
src/config/ importing @/services/*Why: Enforces dependency injection pattern - features receive services through interfaces.
Check: check_service_imports.mjs
RULE: Services can ONLY import interfaces, types, and config from features.
Allowed:
@/(core|domain)/features/{feature}/I{Feature}Api.ts (interfaces)@/(core|domain)/features/{feature}/types/* (feature types)@/(core|domain)/features/{feature}/models/{model}/types/* (model types)@/(core|domain)/features/{feature}/config (feature config)@/services/* (other services)Violations:
@/pages/*@/hooks/*@/(core|domain)/features/{feature}/models/{model}/actions.ts@/(core|domain)/features/{feature}/models/{model}/slice.ts@/(core|domain)/features/{feature}/models/{model}/actionEffects/*@/(core|domain)/features/{feature}/hooks/*@/(core|domain)/features/{feature}/components/*Why: Services implement interfaces - they work with data contracts (interfaces + types + config), not implementation details.
Check: check_service_boundaries.mjs
RULE: Pages can ONLY import presentation layer (components, hooks, hocs) from features.
Allowed:
@/(core|domain)/features/{feature}/components/*@/(core|domain)/features/{feature}/hooks/*@/(core|domain)/features/{feature}/hocs/*@/(core|domain)/features/{feature}/config@/hooks/* (root hooks)Violations:
@/services/*@/(core|domain)/features/{feature}/models/*@/(core|domain)/features/{feature}/types/*@/(core|domain)/features/{feature}/slice.ts@/(core|domain)/features/{feature}/sagas.ts@/(core|domain)/features/{feature}/I{Feature}Api.tsWhy: Pages are presentation layer - they orchestrate UI, not business logic. All business logic should be in feature hooks.
Check: check_pages_boundaries.mjs
RULE: Cross-feature imports CANNOT access model internals (actions, slice, actionEffects).
Allowed (cross-feature):
@/(core|domain)/features/{feature}/models/{model}/types/* (types only)@/(core|domain)/features/{feature}/hooks/* (feature hooks)@/(core|domain)/features/{feature}/components/*@/(core|domain)/features/{feature}/hocs/*Violations (cross-feature):
@/(core|domain)/features/{feature}/models/{model}/actions.ts@/(core|domain)/features/{feature}/models/{model}/slice.ts@/(core|domain)/features/{feature}/models/{model}/actionEffects/*@/(core|domain)/features/{feature}/models/{model}/IModelApi.tsWhy: Models are private implementation details. Features expose APIs through hooks, not direct model access.
Note: Within same feature, you can import model internals freely.
Check: check_model_internals.mjs
RULE: Feature slice.ts files MUST ONLY be imported in src/config/features.ts.
Allowed:
src/config/features.tsViolations:
@/(core|domain)/features/{feature}/sliceWhy: Slices are registered in composition root for Redux store setup.
Check: check_slice_imports.mjs
RULE: Feature sagas.ts files MUST ONLY be imported in src/config/features.ts.
Allowed:
src/config/features.tsViolations:
@/(core|domain)/features/{feature}/sagasWhy: Sagas are registered in composition root for Redux Saga middleware setup.
Check: check_sagas_imports.mjs
RULE: Module dependencies must form a DAG (Directed Acyclic Graph). No circular imports.
Detected:
Why: Circular dependencies cause bundling issues, hard to understand, difficult to test.
Check: check_circular_deps.mjs
┌──────────────────────────────────────────┐
│ Composition Root (src/config/) │ ← Wires everything together
├──────────────────────────────────────────┤
│ Core Features (src/core/features/) │ ← Infrastructure
│ Domain Features (src/domain/features/) │ ← Business Logic
├──────────────────────────────────────────┤
│ Service Layer (src/services/) │ ← External integrations
└──────────────────────────────────────────┘
Benefits:
Each check reports:
Reports are saved to reports/{date}/arch-audit-report.md when using generate_report.mjs.