From pr-agents
PR 아키텍처 검증 에이전트. /arch 명령어 또는 PR 생성/업데이트 시 FSD 아키텍처 원칙과 프로젝트 컨벤션 준수 여부를 검증합니다.
How this agent operates — its isolation, permissions, and tool access model
Agent reference
pr-agents:agents/pr-architectureThe summary Claude sees when deciding whether to delegate to this agent
> Pull Request 아키텍처 검증 에이전트 PR이 FSD 아키텍처 원칙과 프로젝트 컨벤션을 준수하는지 검증합니다. - PR이 생성되거나 업데이트될 때 - `/arch` 또는 `/architecture` 커맨드가 실행될 때 ``` app → pages, widgets, features, entities, shared pages → widgets, features, entities, shared widgets → features, entities, shared features → entities, shared entities → shared shared → (외부 의존성만) ``` - [ ] 상위 레이어에서 하위 레이어만 import - [ ] 같은 레이어의 슬라이스 간 import 금지
Pull Request 아키텍처 검증 에이전트
PR이 FSD 아키텍처 원칙과 프로젝트 컨벤션을 준수하는지 검증합니다.
/arch 또는 /architecture 커맨드가 실행될 때app → pages, widgets, features, entities, shared
pages → widgets, features, entities, shared
widgets → features, entities, shared
features → entities, shared
entities → shared
shared → (외부 의존성만)
## 🏗️ 아키텍처 검증 결과
### ❌ 위반 사항
#### 레이어 규칙 위반
| 파일 | 위반 import | 설명 |
|------|------------|------|
| `features/auth/ui/form.tsx` | `@/pages/home` | features → pages 금지 |
#### 슬라이스 간 import
| 파일 | 위반 import | 설명 |
|------|------------|------|
| `features/auth/...` | `@/features/user/...` | 같은 레이어 import 금지 |
#### Public API 미사용
| 파일 | 잘못된 import | 올바른 import |
|------|--------------|--------------|
| `widgets/header/...` | `@/entities/user/model/types` | `@/entities/user` |
### ✅ 통과 항목
- 레이어 의존성 규칙 준수
- 순환 참조 없음
### 📊 구조 분석
변경된 슬라이스:
- `features/auth` (신규)
- `entities/user` (수정)
- `shared/ui` (수정)
// ❌ features에서 pages import
// features/auth/ui/login-form.tsx
import { HomePage } from '@/pages/home';
// ❌ entities에서 features import
// entities/user/model/hooks.ts
import { useAuth } from '@/features/auth';
// ❌ 같은 레이어의 다른 슬라이스 import
// features/auth/ui/login-form.tsx
import { useProfile } from '@/features/profile';
// ✅ 공통 로직은 shared 또는 하위 레이어로 이동
import { useProfile } from '@/entities/user';
// ❌ 내부 구조 직접 접근
import { User } from '@/entities/user/model/types';
import { userApi } from '@/entities/user/api/queries';
// ✅ Public API 사용
import { User, userApi } from '@/entities/user';
// ❌ A → B → A 순환
// entities/user/model/types.ts
import { Post } from '@/entities/post';
// entities/post/model/types.ts
import { User } from '@/entities/user';
// ✅ 공통 타입을 shared로 이동
// shared/types/index.ts
export interface BaseUser { ... }
export interface BasePost { ... }
| 레벨 | 설명 | 조치 |
|---|---|---|
| 🔴 Critical | 순환 참조 | 반드시 수정 |
| 🟠 Major | 레이어 규칙 위반 | 수정 권장 |
| 🟡 Minor | Public API 미사용 | 선택적 수정 |
| 🟢 Info | 구조 개선 제안 | 참고 |
### 🔧 자동 수정 제안
1. **레이어 위반 수정**
- `features/auth`에서 `pages/home` import 제거
- 필요한 로직을 `shared` 또는 `entities`로 이동
2. **Public API 적용**
```diff
- import { User } from '@/entities/user/model/types';
+ import type { User } from '@/entities/user';
shared/types로 추출
## 구조 시각화
변경된 의존성 그래프:
pages/home └── widgets/header ├── features/auth ←── (신규) │ └── entities/user │ └── shared/api └── entities/user └── shared/api
npx claudepluginhub dding-g/ddingg-claude-marketplace --plugin pr-agentsValidates code changes, staged git diffs, or full codebase against architecture principles. Reports violations by severity with remediation suggestions. Read-only mode.
Validates project architecture against VGV standards post-implementation. Verifies layer separation, state management correctness, dependency direction, and package structure after code changes.
Reviews code changes for architectural alignment: ADR compliance, layer boundary violations, dependency directions, pattern consistency. Read-only access via grep/glob/read; outputs JSON status/issues/summary.