@su-record/vibe 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +35 -35
- package/.claude/settings.local.json +30 -24
- package/.claude/vibe/constitution.md +184 -184
- package/.claude/vibe/rules/core/communication-guide.md +104 -104
- package/.claude/vibe/rules/core/development-philosophy.md +52 -52
- package/.claude/vibe/rules/core/quick-start.md +120 -120
- package/.claude/vibe/rules/languages/dart-flutter.md +509 -509
- package/.claude/vibe/rules/languages/go.md +396 -396
- package/.claude/vibe/rules/languages/java-spring.md +586 -586
- package/.claude/vibe/rules/languages/kotlin-android.md +491 -491
- package/.claude/vibe/rules/languages/python-django.md +371 -371
- package/.claude/vibe/rules/languages/python-fastapi.md +386 -386
- package/.claude/vibe/rules/languages/rust.md +425 -425
- package/.claude/vibe/rules/languages/swift-ios.md +516 -516
- package/.claude/vibe/rules/languages/typescript-nextjs.md +441 -441
- package/.claude/vibe/rules/languages/typescript-node.md +375 -375
- package/.claude/vibe/rules/languages/typescript-nuxt.md +521 -521
- package/.claude/vibe/rules/languages/typescript-react-native.md +446 -446
- package/.claude/vibe/rules/languages/typescript-react.md +525 -525
- package/.claude/vibe/rules/languages/typescript-vue.md +353 -353
- package/.claude/vibe/rules/quality/bdd-contract-testing.md +388 -388
- package/.claude/vibe/rules/quality/checklist.md +276 -276
- package/.claude/vibe/rules/quality/testing-strategy.md +437 -437
- package/.claude/vibe/rules/standards/anti-patterns.md +369 -369
- package/.claude/vibe/rules/standards/code-structure.md +291 -291
- package/.claude/vibe/rules/standards/complexity-metrics.md +312 -312
- package/.claude/vibe/rules/standards/naming-conventions.md +198 -198
- package/.claude/vibe/setup.sh +31 -31
- package/.claude/vibe/templates/constitution-template.md +184 -184
- package/.claude/vibe/templates/contract-backend-template.md +517 -517
- package/.claude/vibe/templates/contract-frontend-template.md +594 -594
- package/.claude/vibe/templates/feature-template.md +96 -96
- package/.claude/vibe/templates/spec-template.md +199 -199
- package/CLAUDE.md +345 -345
- package/LICENSE +21 -21
- package/README.md +817 -744
- package/agents/compounder.md +261 -261
- package/agents/diagrammer.md +178 -178
- package/agents/e2e-tester.md +266 -266
- package/agents/explorer.md +48 -48
- package/agents/implementer.md +53 -53
- package/agents/research/best-practices-agent.md +139 -139
- package/agents/research/codebase-patterns-agent.md +147 -147
- package/agents/research/framework-docs-agent.md +181 -181
- package/agents/research/security-advisory-agent.md +167 -167
- package/agents/review/architecture-reviewer.md +107 -107
- package/agents/review/complexity-reviewer.md +116 -116
- package/agents/review/data-integrity-reviewer.md +88 -88
- package/agents/review/git-history-reviewer.md +103 -103
- package/agents/review/performance-reviewer.md +86 -86
- package/agents/review/python-reviewer.md +152 -152
- package/agents/review/rails-reviewer.md +139 -139
- package/agents/review/react-reviewer.md +144 -144
- package/agents/review/security-reviewer.md +80 -80
- package/agents/review/simplicity-reviewer.md +140 -140
- package/agents/review/test-coverage-reviewer.md +116 -116
- package/agents/review/typescript-reviewer.md +127 -127
- package/agents/searcher.md +54 -54
- package/agents/simplifier.md +119 -119
- package/agents/tester.md +49 -49
- package/agents/ui-previewer.md +137 -137
- package/commands/vibe.analyze.md +260 -199
- package/commands/vibe.reason.md +223 -183
- package/commands/vibe.review.md +213 -160
- package/commands/vibe.run.md +842 -836
- package/commands/vibe.spec.md +405 -383
- package/commands/vibe.utils.md +101 -101
- package/commands/vibe.verify.md +282 -241
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +422 -385
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/MemoryManager.d.ts.map +1 -1
- package/dist/lib/MemoryManager.js +119 -114
- package/dist/lib/MemoryManager.js.map +1 -1
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/gemini-mcp.js +15 -15
- package/dist/lib/gemini-oauth.js +35 -35
- package/dist/lib/gpt-mcp.js +17 -17
- package/dist/lib/gpt-oauth.js +44 -44
- package/dist/orchestrator/agentDiscovery.d.ts +18 -0
- package/dist/orchestrator/agentDiscovery.d.ts.map +1 -0
- package/dist/orchestrator/agentDiscovery.js +174 -0
- package/dist/orchestrator/agentDiscovery.js.map +1 -0
- package/dist/orchestrator/backgroundAgent.d.ts +31 -0
- package/dist/orchestrator/backgroundAgent.d.ts.map +1 -0
- package/dist/orchestrator/backgroundAgent.js +325 -0
- package/dist/orchestrator/backgroundAgent.js.map +1 -0
- package/dist/orchestrator/index.d.ts +58 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +115 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/orchestrator.d.ts +82 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/orchestrator.js +257 -0
- package/dist/orchestrator/orchestrator.js.map +1 -0
- package/dist/orchestrator/parallelResearch.d.ts +19 -0
- package/dist/orchestrator/parallelResearch.d.ts.map +1 -0
- package/dist/orchestrator/parallelResearch.js +214 -0
- package/dist/orchestrator/parallelResearch.js.map +1 -0
- package/dist/orchestrator/types.d.ts +109 -0
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/orchestrator/types.js +5 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/dist/tools/analytics/getUsageAnalytics.js +12 -12
- package/dist/tools/index.d.ts +50 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +61 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/memory/createMemoryTimeline.js +10 -10
- package/dist/tools/memory/getMemoryGraph.js +12 -12
- package/dist/tools/memory/getSessionContext.js +9 -9
- package/dist/tools/memory/linkMemories.js +14 -14
- package/dist/tools/memory/listMemories.js +4 -4
- package/dist/tools/memory/recallMemory.js +4 -4
- package/dist/tools/memory/saveMemory.js +4 -4
- package/dist/tools/memory/searchMemoriesAdvanced.js +22 -22
- package/dist/tools/planning/generatePrd.js +46 -46
- package/dist/tools/prompt/enhancePromptGemini.js +160 -160
- package/dist/tools/reasoning/applyReasoningFramework.js +56 -56
- package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
- package/hooks/hooks.json +121 -103
- package/package.json +75 -69
- package/skills/git-worktree.md +178 -178
- package/skills/priority-todos.md +236 -236
|
@@ -1,276 +1,276 @@
|
|
|
1
|
-
# ✅ 최종 검증 체크리스트
|
|
2
|
-
|
|
3
|
-
## 5.1 향상된 코드 품질 체크
|
|
4
|
-
|
|
5
|
-
### 최우선 순위
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
const topPriority = {
|
|
9
|
-
obeysTheGoldenRule: true, // ✅ 요청 범위만 수정
|
|
10
|
-
preservesWorkingCode: true, // ✅ 기존 코드 보존
|
|
11
|
-
respectsExistingStyle: true, // ✅ 기존 스타일 유지
|
|
12
|
-
};
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 타입 안전성
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
const typeSafety = {
|
|
19
|
-
noAnyType: true, // ✅ any 타입 사용 금지
|
|
20
|
-
strictNullCheck: true, // ✅ null/undefined 체크
|
|
21
|
-
properTypeGuards: true, // ✅ 타입 가드 사용
|
|
22
|
-
genericTypesWhenNeeded: true, // ✅ 제네릭 타입 활용
|
|
23
|
-
};
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 코드 구조 & 복잡도
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
const codeStructure = {
|
|
30
|
-
singleResponsibility: true, // ✅ 단일 책임 원칙
|
|
31
|
-
functionUnder20Lines: true, // ✅ 함수 20줄 이하
|
|
32
|
-
maxNesting3Levels: true, // ✅ 최대 중첩 3단계
|
|
33
|
-
cyclomaticComplexity: 10, // ✅ 순환 복잡도 ≤ 10
|
|
34
|
-
cognitiveComplexity: 15, // ✅ 인지 복잡도 ≤ 15
|
|
35
|
-
maxParameters: 5, // ✅ 매개변수 최대 5개
|
|
36
|
-
componentUnder50Lines: true, // ✅ 컴포넌트 JSX 50줄 이하
|
|
37
|
-
};
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Halstead 메트릭
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
const halsteadMetrics = {
|
|
44
|
-
vocabulary: true, // ✅ 연산자/피연산자 다양성
|
|
45
|
-
difficulty: true, // ✅ 코드 이해 난이도
|
|
46
|
-
effort: true, // ✅ 정신적 노력
|
|
47
|
-
lowComplexity: true, // ✅ 낮은 복잡도 유지
|
|
48
|
-
};
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 결합도 & 응집도
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
const couplingCohesion = {
|
|
55
|
-
looseCoupling: true, // ✅ 느슨한 결합 (≤ 7 dependencies)
|
|
56
|
-
highCohesion: true, // ✅ 높은 응집도 (관련 기능만 모음)
|
|
57
|
-
noCircularDeps: true, // ✅ 순환 의존성 없음
|
|
58
|
-
dependencyInjection: true, // ✅ 의존성 주입 패턴
|
|
59
|
-
};
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 에러 처리
|
|
63
|
-
|
|
64
|
-
```typescript
|
|
65
|
-
const errorHandling = {
|
|
66
|
-
hasErrorHandling: true, // ✅ try-catch/error state
|
|
67
|
-
hasLoadingState: true, // ✅ 로딩 상태
|
|
68
|
-
hasFallbackUI: true, // ✅ 폴백 UI
|
|
69
|
-
properErrorMessages: true, // ✅ 명확한 에러 메시지
|
|
70
|
-
errorBoundaries: true, // ✅ Error Boundary 사용
|
|
71
|
-
};
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 접근성 (Accessibility)
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
const accessibility = {
|
|
78
|
-
hasAriaLabels: true, // ✅ ARIA 레이블
|
|
79
|
-
keyboardAccessible: true, // ✅ 키보드 접근성
|
|
80
|
-
semanticHTML: true, // ✅ 시맨틱 HTML
|
|
81
|
-
focusManagement: true, // ✅ 포커스 관리
|
|
82
|
-
screenReaderFriendly: true, // ✅ 스크린 리더 지원
|
|
83
|
-
};
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### 성능
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
const performance = {
|
|
90
|
-
noUnnecessaryRenders: true, // ✅ 불필요한 리렌더 방지
|
|
91
|
-
memoizedExpensive: true, // ✅ 무거운 연산 메모이제이션
|
|
92
|
-
lazyLoading: true, // ✅ 지연 로딩
|
|
93
|
-
batchOperations: true, // ✅ API 호출 배치 처리
|
|
94
|
-
optimizedImages: true, // ✅ 이미지 최적화
|
|
95
|
-
codesplitting: true, // ✅ 코드 스플리팅
|
|
96
|
-
};
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 유지보수성
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
const maintainability = {
|
|
103
|
-
hasJSDoc: true, // ✅ 주요 함수 문서화
|
|
104
|
-
noMagicNumbers: true, // ✅ 매직 넘버 없음
|
|
105
|
-
consistentNaming: true, // ✅ 일관된 네이밍
|
|
106
|
-
properComments: true, // ✅ 적절한 주석
|
|
107
|
-
testable: true, // ✅ 테스트 가능한 구조
|
|
108
|
-
};
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 보안
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
const security = {
|
|
115
|
-
noHardcodedSecrets: true, // ✅ 비밀 정보 하드코딩 금지
|
|
116
|
-
inputValidation: true, // ✅ 입력값 검증
|
|
117
|
-
xssPrevention: true, // ✅ XSS 방지
|
|
118
|
-
csrfProtection: true, // ✅ CSRF 보호
|
|
119
|
-
sqlInjectionPrevention: true, // ✅ SQL Injection 방지
|
|
120
|
-
};
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## 5.2 프로젝트 체크
|
|
124
|
-
|
|
125
|
-
### 의존성 관리
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
const dependencies = {
|
|
129
|
-
noUnusedDeps: true, // ✅ 미사용 패키지 없음
|
|
130
|
-
noDuplicateDeps: true, // ✅ 중복 기능 패키지 없음
|
|
131
|
-
upToDateDeps: true, // ✅ 최신 버전 유지
|
|
132
|
-
securePackages: true, // ✅ 보안 취약점 없음
|
|
133
|
-
};
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### 파일 구조
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
const fileStructure = {
|
|
140
|
-
consistentStructure: true, // ✅ 일관된 폴더 구조
|
|
141
|
-
noCircularDeps: true, // ✅ 순환 참조 없음
|
|
142
|
-
logicalGrouping: true, // ✅ 논리적 그룹핑
|
|
143
|
-
clearNaming: true, // ✅ 명확한 파일명
|
|
144
|
-
};
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### 번들 최적화
|
|
148
|
-
|
|
149
|
-
```typescript
|
|
150
|
-
const bundleOptimization = {
|
|
151
|
-
treeShaking: true, // ✅ Tree shaking
|
|
152
|
-
codeSplitting: true, // ✅ Code splitting
|
|
153
|
-
lazyLoading: true, // ✅ Lazy loading
|
|
154
|
-
minification: true, // ✅ 최소화
|
|
155
|
-
compression: true, // ✅ 압축 (gzip/brotli)
|
|
156
|
-
};
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## 체크리스트 사용법
|
|
160
|
-
|
|
161
|
-
### 코드 작성 전
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
[ ] 요구사항 명확히 이해
|
|
165
|
-
[ ] 기존 코드 패턴 파악
|
|
166
|
-
[ ] 영향 범위 확인
|
|
167
|
-
[ ] 테스트 계획 수립
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### 코드 작성 중
|
|
171
|
-
|
|
172
|
-
```
|
|
173
|
-
[ ] 단일 책임 원칙 준수
|
|
174
|
-
[ ] 함수 길이 20줄 이하 유지
|
|
175
|
-
[ ] 중첩 깊이 3단계 이하
|
|
176
|
-
[ ] 매직 넘버 상수화
|
|
177
|
-
[ ] 타입 안전성 확보
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### 코드 작성 후
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
[ ] 타입 체크 통과
|
|
184
|
-
[ ] 린터 경고 없음
|
|
185
|
-
[ ] 테스트 작성 및 통과
|
|
186
|
-
[ ] 문서화 완료
|
|
187
|
-
[ ] 코드 리뷰 준비
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### 커밋 전
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
[ ] 불필요한 코드 제거
|
|
194
|
-
[ ] 콘솔 로그 제거
|
|
195
|
-
[ ] 주석 정리
|
|
196
|
-
[ ] 포맷팅 적용
|
|
197
|
-
[ ] 의미 있는 커밋 메시지 작성
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## 자동 검증 도구
|
|
201
|
-
|
|
202
|
-
### ESLint 설정
|
|
203
|
-
|
|
204
|
-
```javascript
|
|
205
|
-
// .eslintrc.js
|
|
206
|
-
module.exports = {
|
|
207
|
-
rules: {
|
|
208
|
-
'complexity': ['error', 10],
|
|
209
|
-
'max-depth': ['error', 3],
|
|
210
|
-
'max-lines-per-function': ['error', 20],
|
|
211
|
-
'max-params': ['error', 5],
|
|
212
|
-
'no-magic-numbers': ['warn', { ignore: [0, 1, -1] }],
|
|
213
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### TypeScript 설정
|
|
219
|
-
|
|
220
|
-
```json
|
|
221
|
-
// tsconfig.json
|
|
222
|
-
{
|
|
223
|
-
"compilerOptions": {
|
|
224
|
-
"strict": true,
|
|
225
|
-
"noImplicitAny": true,
|
|
226
|
-
"strictNullChecks": true,
|
|
227
|
-
"noUnusedLocals": true,
|
|
228
|
-
"noUnusedParameters": true,
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### Git Hooks (pre-commit)
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
#!/bin/sh
|
|
237
|
-
# .husky/pre-commit
|
|
238
|
-
|
|
239
|
-
# 타입 체크
|
|
240
|
-
npm run type-check
|
|
241
|
-
|
|
242
|
-
# 린팅
|
|
243
|
-
npm run lint
|
|
244
|
-
|
|
245
|
-
# 테스트
|
|
246
|
-
npm run test
|
|
247
|
-
|
|
248
|
-
# 포맷팅 확인
|
|
249
|
-
npm run format:check
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
## 등급 기준
|
|
253
|
-
|
|
254
|
-
| 등급 | 점수 | 설명 |
|
|
255
|
-
|------|------|------|
|
|
256
|
-
| A+ | 95-100 | 완벽한 코드 품질 |
|
|
257
|
-
| A | 90-94 | 우수한 품질 |
|
|
258
|
-
| B+ | 85-89 | 양호한 품질 |
|
|
259
|
-
| B | 80-84 | 개선 권장 |
|
|
260
|
-
| C+ | 75-79 | 개선 필요 |
|
|
261
|
-
| C | 70-74 | 즉시 개선 필요 |
|
|
262
|
-
| F | < 70 | 리팩토링 필요 |
|
|
263
|
-
|
|
264
|
-
## 빠른 체크 (1분)
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
✅ 요청 범위만 수정했는가?
|
|
268
|
-
✅ any 타입이 없는가?
|
|
269
|
-
✅ 함수가 20줄 이하인가?
|
|
270
|
-
✅ 중첩이 3단계 이하인가?
|
|
271
|
-
✅ 에러 처리를 했는가?
|
|
272
|
-
✅ 매직 넘버를 상수화했는가?
|
|
273
|
-
✅ 테스트를 작성했는가?
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
7개 모두 Yes → 배포 가능 ✅
|
|
1
|
+
# ✅ 최종 검증 체크리스트
|
|
2
|
+
|
|
3
|
+
## 5.1 향상된 코드 품질 체크
|
|
4
|
+
|
|
5
|
+
### 최우선 순위
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
const topPriority = {
|
|
9
|
+
obeysTheGoldenRule: true, // ✅ 요청 범위만 수정
|
|
10
|
+
preservesWorkingCode: true, // ✅ 기존 코드 보존
|
|
11
|
+
respectsExistingStyle: true, // ✅ 기존 스타일 유지
|
|
12
|
+
};
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### 타입 안전성
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
const typeSafety = {
|
|
19
|
+
noAnyType: true, // ✅ any 타입 사용 금지
|
|
20
|
+
strictNullCheck: true, // ✅ null/undefined 체크
|
|
21
|
+
properTypeGuards: true, // ✅ 타입 가드 사용
|
|
22
|
+
genericTypesWhenNeeded: true, // ✅ 제네릭 타입 활용
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 코드 구조 & 복잡도
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
const codeStructure = {
|
|
30
|
+
singleResponsibility: true, // ✅ 단일 책임 원칙
|
|
31
|
+
functionUnder20Lines: true, // ✅ 함수 20줄 이하
|
|
32
|
+
maxNesting3Levels: true, // ✅ 최대 중첩 3단계
|
|
33
|
+
cyclomaticComplexity: 10, // ✅ 순환 복잡도 ≤ 10
|
|
34
|
+
cognitiveComplexity: 15, // ✅ 인지 복잡도 ≤ 15
|
|
35
|
+
maxParameters: 5, // ✅ 매개변수 최대 5개
|
|
36
|
+
componentUnder50Lines: true, // ✅ 컴포넌트 JSX 50줄 이하
|
|
37
|
+
};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Halstead 메트릭
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
const halsteadMetrics = {
|
|
44
|
+
vocabulary: true, // ✅ 연산자/피연산자 다양성
|
|
45
|
+
difficulty: true, // ✅ 코드 이해 난이도
|
|
46
|
+
effort: true, // ✅ 정신적 노력
|
|
47
|
+
lowComplexity: true, // ✅ 낮은 복잡도 유지
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 결합도 & 응집도
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
const couplingCohesion = {
|
|
55
|
+
looseCoupling: true, // ✅ 느슨한 결합 (≤ 7 dependencies)
|
|
56
|
+
highCohesion: true, // ✅ 높은 응집도 (관련 기능만 모음)
|
|
57
|
+
noCircularDeps: true, // ✅ 순환 의존성 없음
|
|
58
|
+
dependencyInjection: true, // ✅ 의존성 주입 패턴
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 에러 처리
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const errorHandling = {
|
|
66
|
+
hasErrorHandling: true, // ✅ try-catch/error state
|
|
67
|
+
hasLoadingState: true, // ✅ 로딩 상태
|
|
68
|
+
hasFallbackUI: true, // ✅ 폴백 UI
|
|
69
|
+
properErrorMessages: true, // ✅ 명확한 에러 메시지
|
|
70
|
+
errorBoundaries: true, // ✅ Error Boundary 사용
|
|
71
|
+
};
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 접근성 (Accessibility)
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
const accessibility = {
|
|
78
|
+
hasAriaLabels: true, // ✅ ARIA 레이블
|
|
79
|
+
keyboardAccessible: true, // ✅ 키보드 접근성
|
|
80
|
+
semanticHTML: true, // ✅ 시맨틱 HTML
|
|
81
|
+
focusManagement: true, // ✅ 포커스 관리
|
|
82
|
+
screenReaderFriendly: true, // ✅ 스크린 리더 지원
|
|
83
|
+
};
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 성능
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
const performance = {
|
|
90
|
+
noUnnecessaryRenders: true, // ✅ 불필요한 리렌더 방지
|
|
91
|
+
memoizedExpensive: true, // ✅ 무거운 연산 메모이제이션
|
|
92
|
+
lazyLoading: true, // ✅ 지연 로딩
|
|
93
|
+
batchOperations: true, // ✅ API 호출 배치 처리
|
|
94
|
+
optimizedImages: true, // ✅ 이미지 최적화
|
|
95
|
+
codesplitting: true, // ✅ 코드 스플리팅
|
|
96
|
+
};
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 유지보수성
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
const maintainability = {
|
|
103
|
+
hasJSDoc: true, // ✅ 주요 함수 문서화
|
|
104
|
+
noMagicNumbers: true, // ✅ 매직 넘버 없음
|
|
105
|
+
consistentNaming: true, // ✅ 일관된 네이밍
|
|
106
|
+
properComments: true, // ✅ 적절한 주석
|
|
107
|
+
testable: true, // ✅ 테스트 가능한 구조
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 보안
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
const security = {
|
|
115
|
+
noHardcodedSecrets: true, // ✅ 비밀 정보 하드코딩 금지
|
|
116
|
+
inputValidation: true, // ✅ 입력값 검증
|
|
117
|
+
xssPrevention: true, // ✅ XSS 방지
|
|
118
|
+
csrfProtection: true, // ✅ CSRF 보호
|
|
119
|
+
sqlInjectionPrevention: true, // ✅ SQL Injection 방지
|
|
120
|
+
};
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## 5.2 프로젝트 체크
|
|
124
|
+
|
|
125
|
+
### 의존성 관리
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
const dependencies = {
|
|
129
|
+
noUnusedDeps: true, // ✅ 미사용 패키지 없음
|
|
130
|
+
noDuplicateDeps: true, // ✅ 중복 기능 패키지 없음
|
|
131
|
+
upToDateDeps: true, // ✅ 최신 버전 유지
|
|
132
|
+
securePackages: true, // ✅ 보안 취약점 없음
|
|
133
|
+
};
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 파일 구조
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
const fileStructure = {
|
|
140
|
+
consistentStructure: true, // ✅ 일관된 폴더 구조
|
|
141
|
+
noCircularDeps: true, // ✅ 순환 참조 없음
|
|
142
|
+
logicalGrouping: true, // ✅ 논리적 그룹핑
|
|
143
|
+
clearNaming: true, // ✅ 명확한 파일명
|
|
144
|
+
};
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 번들 최적화
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
const bundleOptimization = {
|
|
151
|
+
treeShaking: true, // ✅ Tree shaking
|
|
152
|
+
codeSplitting: true, // ✅ Code splitting
|
|
153
|
+
lazyLoading: true, // ✅ Lazy loading
|
|
154
|
+
minification: true, // ✅ 최소화
|
|
155
|
+
compression: true, // ✅ 압축 (gzip/brotli)
|
|
156
|
+
};
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 체크리스트 사용법
|
|
160
|
+
|
|
161
|
+
### 코드 작성 전
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
[ ] 요구사항 명확히 이해
|
|
165
|
+
[ ] 기존 코드 패턴 파악
|
|
166
|
+
[ ] 영향 범위 확인
|
|
167
|
+
[ ] 테스트 계획 수립
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 코드 작성 중
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
[ ] 단일 책임 원칙 준수
|
|
174
|
+
[ ] 함수 길이 20줄 이하 유지
|
|
175
|
+
[ ] 중첩 깊이 3단계 이하
|
|
176
|
+
[ ] 매직 넘버 상수화
|
|
177
|
+
[ ] 타입 안전성 확보
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 코드 작성 후
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
[ ] 타입 체크 통과
|
|
184
|
+
[ ] 린터 경고 없음
|
|
185
|
+
[ ] 테스트 작성 및 통과
|
|
186
|
+
[ ] 문서화 완료
|
|
187
|
+
[ ] 코드 리뷰 준비
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 커밋 전
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
[ ] 불필요한 코드 제거
|
|
194
|
+
[ ] 콘솔 로그 제거
|
|
195
|
+
[ ] 주석 정리
|
|
196
|
+
[ ] 포맷팅 적용
|
|
197
|
+
[ ] 의미 있는 커밋 메시지 작성
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## 자동 검증 도구
|
|
201
|
+
|
|
202
|
+
### ESLint 설정
|
|
203
|
+
|
|
204
|
+
```javascript
|
|
205
|
+
// .eslintrc.js
|
|
206
|
+
module.exports = {
|
|
207
|
+
rules: {
|
|
208
|
+
'complexity': ['error', 10],
|
|
209
|
+
'max-depth': ['error', 3],
|
|
210
|
+
'max-lines-per-function': ['error', 20],
|
|
211
|
+
'max-params': ['error', 5],
|
|
212
|
+
'no-magic-numbers': ['warn', { ignore: [0, 1, -1] }],
|
|
213
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### TypeScript 설정
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
// tsconfig.json
|
|
222
|
+
{
|
|
223
|
+
"compilerOptions": {
|
|
224
|
+
"strict": true,
|
|
225
|
+
"noImplicitAny": true,
|
|
226
|
+
"strictNullChecks": true,
|
|
227
|
+
"noUnusedLocals": true,
|
|
228
|
+
"noUnusedParameters": true,
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Git Hooks (pre-commit)
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
#!/bin/sh
|
|
237
|
+
# .husky/pre-commit
|
|
238
|
+
|
|
239
|
+
# 타입 체크
|
|
240
|
+
npm run type-check
|
|
241
|
+
|
|
242
|
+
# 린팅
|
|
243
|
+
npm run lint
|
|
244
|
+
|
|
245
|
+
# 테스트
|
|
246
|
+
npm run test
|
|
247
|
+
|
|
248
|
+
# 포맷팅 확인
|
|
249
|
+
npm run format:check
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## 등급 기준
|
|
253
|
+
|
|
254
|
+
| 등급 | 점수 | 설명 |
|
|
255
|
+
|------|------|------|
|
|
256
|
+
| A+ | 95-100 | 완벽한 코드 품질 |
|
|
257
|
+
| A | 90-94 | 우수한 품질 |
|
|
258
|
+
| B+ | 85-89 | 양호한 품질 |
|
|
259
|
+
| B | 80-84 | 개선 권장 |
|
|
260
|
+
| C+ | 75-79 | 개선 필요 |
|
|
261
|
+
| C | 70-74 | 즉시 개선 필요 |
|
|
262
|
+
| F | < 70 | 리팩토링 필요 |
|
|
263
|
+
|
|
264
|
+
## 빠른 체크 (1분)
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
✅ 요청 범위만 수정했는가?
|
|
268
|
+
✅ any 타입이 없는가?
|
|
269
|
+
✅ 함수가 20줄 이하인가?
|
|
270
|
+
✅ 중첩이 3단계 이하인가?
|
|
271
|
+
✅ 에러 처리를 했는가?
|
|
272
|
+
✅ 매직 넘버를 상수화했는가?
|
|
273
|
+
✅ 테스트를 작성했는가?
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
7개 모두 Yes → 배포 가능 ✅
|