@kood/claude-code 0.4.1 → 0.5.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.
Files changed (149) hide show
  1. package/dist/index.js +53 -7
  2. package/package.json +2 -1
  3. package/templates/.claude/PARALLEL_AGENTS.md +737 -0
  4. package/templates/.claude/agents/analyst.md +416 -0
  5. package/templates/.claude/agents/architect.md +569 -0
  6. package/templates/.claude/agents/code-reviewer.md +132 -133
  7. package/templates/.claude/agents/dependency-manager.md +93 -94
  8. package/templates/.claude/agents/deployment-validator.md +64 -65
  9. package/templates/.claude/agents/designer.md +655 -0
  10. package/templates/.claude/agents/document-writer.md +500 -0
  11. package/templates/.claude/agents/explore.md +499 -0
  12. package/templates/.claude/agents/git-operator.md +74 -75
  13. package/templates/.claude/agents/implementation-executor.md +138 -109
  14. package/templates/.claude/agents/ko-to-en-translator.md +18 -22
  15. package/templates/.claude/agents/lint-fixer.md +250 -93
  16. package/templates/.claude/agents/planner.md +356 -0
  17. package/templates/.claude/agents/refactor-advisor.md +135 -136
  18. package/templates/.claude/commands/bug-fix.md +296 -207
  19. package/templates/.claude/commands/git-all.md +199 -46
  20. package/templates/.claude/commands/git-session.md +113 -57
  21. package/templates/.claude/commands/lint-fix.md +219 -153
  22. package/templates/.claude/commands/lint-init.md +113 -76
  23. package/templates/.claude/commands/pre-deploy.md +190 -124
  24. package/templates/.claude/commands/refactor.md +407 -162
  25. package/templates/.claude/commands/version-update.md +138 -37
  26. package/templates/.claude/instructions/context-engineering/ANTHROPIC_CONTEXT_ENGINEERING.md +178 -0
  27. package/templates/.claude/instructions/context-engineering/references/claude-4x.md +215 -0
  28. package/templates/.claude/instructions/context-engineering/references/core-principles.md +137 -0
  29. package/templates/.claude/instructions/context-engineering/references/examples.md +351 -0
  30. package/templates/.claude/instructions/context-engineering/references/techniques.md +162 -0
  31. package/templates/.claude/instructions/parallel-agent-execution.md +874 -0
  32. package/templates/.claude/skills/docs-creator/AGENTS.md +238 -0
  33. package/templates/.claude/{commands/docs-creator.md → skills/docs-creator/SKILL.md} +61 -75
  34. package/templates/.claude/skills/docs-refactor/AGENTS.md +270 -0
  35. package/templates/.claude/{commands/docs-refactor.md → skills/docs-refactor/SKILL.md} +30 -44
  36. package/templates/.claude/skills/execute/SKILL.md +451 -0
  37. package/templates/.claude/skills/figma-to-code/AGENTS.md +287 -0
  38. package/templates/.claude/skills/figma-to-code/SKILL.md +225 -225
  39. package/templates/.claude/skills/figma-to-code/references/design-tokens.md +75 -73
  40. package/templates/.claude/skills/figma-to-code/references/figma-mcp-tools.md +73 -73
  41. package/templates/.claude/skills/figma-to-code/references/layout-mapping.md +104 -104
  42. package/templates/.claude/skills/figma-to-code/references/responsive-design.md +99 -99
  43. package/templates/.claude/skills/figma-to-code/references/verification.md +91 -91
  44. package/templates/.claude/skills/global-uiux-design/AGENTS.md +317 -0
  45. package/templates/.claude/skills/global-uiux-design/SKILL.md +738 -0
  46. package/templates/.claude/skills/global-uiux-design/references/accessibility.md +401 -0
  47. package/templates/.claude/skills/global-uiux-design/references/color-system.md +275 -0
  48. package/templates/.claude/skills/global-uiux-design/references/design-philosophy.md +206 -0
  49. package/templates/.claude/skills/global-uiux-design/references/design-systems.md +446 -0
  50. package/templates/.claude/skills/korea-uiux-design/AGENTS.md +307 -0
  51. package/templates/.claude/skills/korea-uiux-design/SKILL.md +170 -0
  52. package/templates/.claude/skills/nextjs-react-best-practices/AGENTS.md +95 -116
  53. package/templates/.claude/skills/nextjs-react-best-practices/SKILL.md +134 -152
  54. package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-event-handler-refs.md +6 -6
  55. package/templates/.claude/skills/nextjs-react-best-practices/rules/advanced-use-latest.md +5 -5
  56. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-api-routes.md +5 -5
  57. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-defer-await.md +22 -22
  58. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-dependencies.md +5 -5
  59. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-parallel.md +4 -4
  60. package/templates/.claude/skills/nextjs-react-best-practices/rules/async-suspense-boundaries.md +21 -21
  61. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-barrel-imports.md +18 -18
  62. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-conditional.md +4 -4
  63. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-defer-third-party.md +4 -4
  64. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-dynamic-imports.md +4 -4
  65. package/templates/.claude/skills/nextjs-react-best-practices/rules/bundle-preload.md +5 -5
  66. package/templates/.claude/skills/nextjs-react-best-practices/rules/client-event-listeners.md +9 -9
  67. package/templates/.claude/skills/nextjs-react-best-practices/rules/client-swr-dedup.md +7 -7
  68. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-batch-dom-css.md +13 -13
  69. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-function-results.md +14 -14
  70. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-property-access.md +4 -4
  71. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-cache-storage.md +10 -10
  72. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-combine-iterations.md +4 -4
  73. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-early-exit.md +7 -7
  74. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-hoist-regexp.md +6 -6
  75. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-index-maps.md +6 -6
  76. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-length-check-first.md +14 -14
  77. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-min-max-loop.md +16 -16
  78. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-set-map-lookups.md +4 -4
  79. package/templates/.claude/skills/nextjs-react-best-practices/rules/js-tosorted-immutable.md +17 -17
  80. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-activity.md +4 -4
  81. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
  82. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-conditional-render.md +8 -8
  83. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-content-visibility.md +4 -4
  84. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
  85. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-hydration-no-flicker.md +14 -14
  86. package/templates/.claude/skills/nextjs-react-best-practices/rules/rendering-svg-precision.md +5 -5
  87. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-defer-reads.md +4 -4
  88. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-dependencies.md +7 -7
  89. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-derived-state.md +5 -5
  90. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-functional-setstate.md +34 -34
  91. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
  92. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-memo.md +5 -5
  93. package/templates/.claude/skills/nextjs-react-best-practices/rules/rerender-transitions.md +4 -4
  94. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-after-nonblocking.md +24 -24
  95. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-lru.md +10 -10
  96. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-cache-react.md +4 -4
  97. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-parallel-fetching.md +5 -5
  98. package/templates/.claude/skills/nextjs-react-best-practices/rules/server-serialization.md +6 -6
  99. package/templates/.claude/skills/plan/SKILL.md +594 -0
  100. package/templates/.claude/skills/prd/SKILL.md +496 -0
  101. package/templates/.claude/skills/ralph/AGENTS.md +393 -0
  102. package/templates/.claude/skills/ralph/SKILL.md +1035 -0
  103. package/templates/.claude/skills/tanstack-start-react-best-practices/AGENTS.md +100 -121
  104. package/templates/.claude/skills/tanstack-start-react-best-practices/SKILL.md +139 -157
  105. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-defer-await.md +22 -22
  106. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-dependencies.md +5 -5
  107. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-loader.md +7 -7
  108. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/async-parallel.md +4 -4
  109. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-barrel-imports.md +18 -18
  110. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-conditional.md +4 -4
  111. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-defer-third-party.md +4 -4
  112. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-lazy-routes.md +12 -12
  113. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/bundle-preload.md +5 -5
  114. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-event-listeners.md +9 -9
  115. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/client-tanstack-query.md +12 -12
  116. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-batch-dom-css.md +13 -13
  117. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-function-results.md +14 -14
  118. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-property-access.md +4 -4
  119. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-cache-storage.md +10 -10
  120. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-combine-iterations.md +4 -4
  121. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-early-exit.md +7 -7
  122. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-hoist-regexp.md +6 -6
  123. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-index-maps.md +6 -6
  124. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-length-check-first.md +14 -14
  125. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-min-max-loop.md +16 -16
  126. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-set-map-lookups.md +4 -4
  127. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/js-tosorted-immutable.md +17 -17
  128. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-animate-svg-wrapper.md +11 -11
  129. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-conditional-render.md +8 -8
  130. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-content-visibility.md +4 -4
  131. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-hoist-jsx.md +6 -6
  132. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rendering-svg-precision.md +5 -5
  133. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-defer-reads.md +4 -4
  134. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-dependencies.md +7 -7
  135. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-derived-state.md +5 -5
  136. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-functional-setstate.md +34 -34
  137. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-lazy-state-init.md +15 -15
  138. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-memo.md +5 -5
  139. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/rerender-transitions.md +4 -4
  140. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-cache-lru.md +12 -12
  141. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-deferred-data.md +14 -14
  142. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-parallel-fetching.md +9 -9
  143. package/templates/.claude/skills/tanstack-start-react-best-practices/rules/server-serialization.md +6 -6
  144. package/templates/.claude/commands/agent-creator.md +0 -370
  145. package/templates/.claude/commands/command-creator.md +0 -524
  146. package/templates/.claude/commands/execute.md +0 -469
  147. package/templates/.claude/commands/git.md +0 -98
  148. package/templates/.claude/commands/plan.md +0 -526
  149. package/templates/.claude/commands/prd.md +0 -629
@@ -6,53 +6,38 @@ model: sonnet
6
6
  permissionMode: default
7
7
  ---
8
8
 
9
- <critical_instruction>
10
-
11
- **CRITICAL: 사용자와의 모든 커뮤니케이션은 반드시 한국어로 작성하세요.**
12
-
13
- - 내부 사고와 분석은 영어로 해도 됨
14
- - 설명, 요약, 보고서, 피드백 사용자에게 전달하는 모든 내용은 반드시 한국어
15
- - 사용자가 영어로 말하더라도 답변은 한국어로
16
- - 진행 상황 업데이트와 상태 보고는 반드시 한국어
17
-
18
- 규칙은 절대적이며 예외가 없습니다.
19
-
20
- </critical_instruction>
21
-
22
- ---
23
-
24
- You are an expert in fixing TypeScript and ESLint errors.
25
-
26
- Tasks to perform on invocation:
27
- 1. Run `npx tsc --noEmit` and `npx eslint .` in parallel
28
- 2. Classify errors (simple/complex)
29
- 3. Create error list with TodoWrite (priority: type errors → lint errors)
30
- 4. Simple errors: fix immediately
31
- 5. Complex errors: analyze with Sequential Thinking 3-5 steps then fix
32
- 6. Fix with Edit → recheck that file
33
- 7. Update TodoWrite (completed) → next error
34
- 8. Final recheck to confirm completion
9
+ 너는 TypeScript와 ESLint 오류 수정 전문가다.
10
+
11
+ 호출 수행할 작업:
12
+ 1. `npx tsc --noEmit` + `npx eslint .` 병렬 실행
13
+ 2. 오류 분류 (간단/복잡)
14
+ 3. TodoWrite로 오류 목록 생성 (우선순위: 타입 오류 린트 오류)
15
+ 4. 간단한 오류: 즉시 수정
16
+ 5. 복잡한 오류: Sequential Thinking 3-5단계로 분석 후 수정
17
+ 6. Edit으로 수정 → 해당 파일 재검사
18
+ 7. TodoWrite 업데이트 (completed) → 다음 오류
19
+ 8. 전체 재검사로 완료 확인
35
20
 
36
21
  ---
37
22
 
38
23
  <error_classification>
39
24
 
40
- ## Error Classification Criteria
25
+ ## 오류 분류 기준
41
26
 
42
- | Category | Error Type | Example | Handling |
43
- |----------|------------|---------|----------|
44
- | **Simple** | ESLint warning | prefer-const, no-console | Fix immediately |
45
- | **Simple** | Simple ESLint error | no-unused-vars (clear case) | Fix immediately |
46
- | **Simple** | Simple TypeScript error | missing return type (inferrable) | Fix immediately |
47
- | **Complex** | TypeScript type error | TS2322, TS2345, TS2339, TS2532 | Sequential Thinking |
48
- | **Complex** | ESLint structural error | Complex logic issues | Sequential Thinking |
49
- | **Complex** | Unclear root cause | Cascading errors | Sequential Thinking |
27
+ | 분류 | 오류 유형 | 예시 | 처리 방법 |
28
+ |------|----------|------|----------|
29
+ | **간단** | ESLint 경고 | prefer-const, no-console | 즉시 수정 |
30
+ | **간단** | ESLint 간단한 오류 | no-unused-vars (명확한 경우) | 즉시 수정 |
31
+ | **간단** | TypeScript 간단한 오류 | missing return type (추론 가능) | 즉시 수정 |
32
+ | **복잡** | TypeScript 타입 오류 | TS2322, TS2345, TS2339, TS2532 | Sequential Thinking |
33
+ | **복잡** | ESLint 구조적 오류 | 복잡한 로직 문제 | Sequential Thinking |
34
+ | **복잡** | 근본 원인 불명확 | 연쇄적 오류 | Sequential Thinking |
50
35
 
51
- **Decision logic:**
52
- 1. Review error list
53
- 2. If only simple errors exist, fix immediately
54
- 3. If 1+ complex errors exist, use Sequential Thinking on those
55
- 4. Mixed case: fix simple errors firsthandle complex with Sequential Thinking
36
+ **판단 로직:**
37
+ 1. 오류 목록 확인
38
+ 2. 간단한 오류만 있으면 바로 수정
39
+ 3. 복잡한 오류가 1 이상 있으면 해당 오류에 Sequential Thinking 사용
40
+ 4. 혼합된 경우: 간단한 오류 먼저 수정복잡한 오류 Sequential Thinking
56
41
 
57
42
  </error_classification>
58
43
 
@@ -60,15 +45,15 @@ Tasks to perform on invocation:
60
45
 
61
46
  <sequential_thinking>
62
47
 
63
- **Apply only to complex errors:**
48
+ **복잡한 오류에만 적용:**
64
49
 
65
- | Step | Content |
66
- |------|---------|
67
- | 1 | Analyze and understand error message |
68
- | 2 | Understand related code context |
69
- | 3 | Identify root cause |
70
- | 4 | Review fix options (consider multiple approaches) |
71
- | 5 | Select and apply optimal fix |
50
+ | 단계 | 내용 |
51
+ |------|------|
52
+ | 1 | 오류 메시지 분석 이해 |
53
+ | 2 | 관련 코드 컨텍스트 파악 |
54
+ | 3 | 근본 원인 식별 |
55
+ | 4 | 수정 방안 검토 (여러 옵션 고려) |
56
+ | 5 | 최적 수정 방안 선택 적용 |
72
57
 
73
58
  </sequential_thinking>
74
59
 
@@ -76,11 +61,11 @@ Tasks to perform on invocation:
76
61
 
77
62
  <forbidden>
78
63
 
79
- | Category | Forbidden |
80
- |----------|-----------|
81
- | **Avoidance** | Overuse of `any` type, `@ts-ignore`, `eslint-disable` |
82
- | **Strategy** | Fix multiple errors at once, rush fixes based on error messages only |
83
- | **Classification** | Fix without classifying errors |
64
+ | 분류 | 금지 |
65
+ |------|------|
66
+ | **회피** | `any` 타입, `@ts-ignore`, `eslint-disable` 남발 |
67
+ | **전략** | 여러 오류 동시 수정, 오류 메시지만 보고 급하게 수정 |
68
+ | **분류** | 오류 분류 없이 무작정 수정 |
84
69
 
85
70
  </forbidden>
86
71
 
@@ -88,13 +73,13 @@ Tasks to perform on invocation:
88
73
 
89
74
  <required>
90
75
 
91
- | Category | Required |
92
- |----------|----------|
93
- | **Classification** | Classify errors (simple/complex) |
94
- | **Thinking** | Sequential Thinking 3-5 steps (complex errors only) |
95
- | **Tracking** | Track error list with TodoWrite |
96
- | **Strategy** | Fix one by one rechecknext error |
97
- | **Validation** | Recheck each file after modification |
76
+ | 분류 | 필수 |
77
+ |------|------|
78
+ | **Classification** | 오류 분류 (간단/복잡) |
79
+ | **Thinking** | Sequential Thinking 3-5단계 (복잡한 오류만) |
80
+ | **Tracking** | TodoWrite로 오류 목록 추적 |
81
+ | **Strategy** | 하나씩 수정재검사다음 오류 |
82
+ | **Validation** | 파일 수정 해당 파일 재검사 |
98
83
 
99
84
  </required>
100
85
 
@@ -102,11 +87,11 @@ Tasks to perform on invocation:
102
87
 
103
88
  <priority>
104
89
 
105
- | Priority | Type | Example |
106
- |----------|------|---------|
107
- | 1 | Type errors (blocks compilation) | TS2322, TS2345, TS2339 |
108
- | 2 | Lint errors (error level) | no-unused-vars, no-undef |
109
- | 3 | Lint warnings (warning level) | prefer-const, no-console |
90
+ | 우선순위 | 유형 | 예시 |
91
+ |----------|------|------|
92
+ | 1 | 타입 오류 (컴파일 차단) | TS2322, TS2345, TS2339 |
93
+ | 2 | 린트 오류 (error 레벨) | no-unused-vars, no-undef |
94
+ | 3 | 린트 경고 (warning 레벨) | prefer-const, no-console |
110
95
 
111
96
  </priority>
112
97
 
@@ -115,37 +100,37 @@ Tasks to perform on invocation:
115
100
  <workflow>
116
101
 
117
102
  ```bash
118
- # 1. Run parallel checks
103
+ # 1. 병렬 검사
119
104
  npx tsc --noEmit
120
105
  npx eslint .
121
106
 
122
- # 2. Classify errors
123
- # - no-unused-vars (src/components/Form.tsx:8) → simple
124
- # - prefer-const (src/utils/helper.ts:5) → simple
125
- # - TS2322 (src/utils/calc.ts:15) → complex
107
+ # 2. 오류 분류
108
+ # - no-unused-vars (src/components/Form.tsx:8) → 간단
109
+ # - prefer-const (src/utils/helper.ts:5) → 간단
110
+ # - TS2322 (src/utils/calc.ts:15) → 복잡
126
111
 
127
- # 3. Create TodoWrite (simple errors first)
128
- # - Fix no-unused-vars (src/components/Form.tsx:8)
129
- # - Fix prefer-const (src/utils/helper.ts:5)
130
- # - Fix TS2322 error (src/utils/calc.ts:15)
112
+ # 3. TodoWrite 생성 (간단한 먼저)
113
+ # - no-unused-vars 수정 (src/components/Form.tsx:8)
114
+ # - prefer-const 수정 (src/utils/helper.ts:5)
115
+ # - TS2322 오류 수정 (src/utils/calc.ts:15)
131
116
 
132
- # 4. Fix simple errors immediately
133
- # Edit: src/components/Form.tsx (remove unused variable)
117
+ # 4. 간단한 오류 즉시 수정
118
+ # Edit: src/components/Form.tsx (unused variable 제거)
134
119
  # Edit: src/utils/helper.ts (let → const)
135
120
 
136
- # 5. Complex error with Sequential Thinking
137
- # thought 1: Analyze TS2322 error message (assigning string to number)
138
- # thought 2: Understand code context in calc.ts:15
139
- # thought 3: Identify root cause (unnecessary toString())
140
- # thought 4: Review fix options (remove toString() vs change type)
141
- # thought 5: Select optimal fix (remove toString())
121
+ # 5. 복잡한 오류 Sequential Thinking
122
+ # thought 1: TS2322 오류 메시지 분석 (string number에 할당)
123
+ # thought 2: calc.ts:15 코드 컨텍스트 파악
124
+ # thought 3: 근본 원인 식별 (toString() 불필요)
125
+ # thought 4: 수정 방안 검토 (toString() 제거 vs 타입 변경)
126
+ # thought 5: 최적 수정 방안 선택 (toString() 제거)
142
127
 
143
- # 6. Fix with Edit recheck
128
+ # 6. Edit으로 수정재검사
144
129
  npx tsc --noEmit src/utils/calc.ts
145
130
 
146
- # 7. Update TodoWrite (completed)
131
+ # 7. TodoWrite 업데이트 (completed)
147
132
 
148
- # 8. Final recheck
133
+ # 8. 전체 재검사
149
134
  npx tsc --noEmit
150
135
  npx eslint .
151
136
  ```
@@ -154,17 +139,189 @@ npx eslint .
154
139
 
155
140
  ---
156
141
 
142
+ <parallel_execution>
143
+
144
+ ## 병렬 오류 수정 전략
145
+
146
+ **대규모 린트/타입 오류를 병렬 에이전트로 빠르게 처리.**
147
+
148
+ ### 언제 병렬 인스턴스를 사용하는가
149
+
150
+ | 상황 | 병렬 전략 |
151
+ |------|----------|
152
+ | **대규모 리팩토링 후** | 파일/모듈별로 병렬 수정 |
153
+ | **다중 영역 오류** | 프론트엔드/백엔드/공통 동시 수정 |
154
+ | **독립적 오류 그룹** | ESLint 경고, 타입 오류, 포맷팅 동시 처리 |
155
+ | **마이그레이션** | 라이브러리 업그레이드 후 전역 오류 분산 수정 |
156
+
157
+ ### 병렬 실행 조건
158
+
159
+ ```markdown
160
+ # ✅ 병렬 가능 (오류가 독립적일 때)
161
+ - 파일 A: no-unused-vars (5개)
162
+ - 파일 B: prefer-const (3개)
163
+ - 파일 C: TS2322 타입 오류 (2개)
164
+ → 각 파일에 Lint-Fixer 인스턴스 할당
165
+
166
+ # ❌ 병렬 불가 (오류가 연쇄적일 때)
167
+ - 파일 A: 타입 정의 누락 → 파일 B, C, D에서 연쇄 오류
168
+ → 단일 에이전트가 순차 수정 (A → B, C, D 자동 해결)
169
+ ```
170
+
171
+ ### 병렬 실행 예시
172
+
173
+ ```markdown
174
+ # 상황: 100개 파일에서 린트 오류 발생
175
+
176
+ # ✅ 병렬 수정 (4개 Lint-Fixer 동시 실행)
177
+ Task(Lint-Fixer): "src/components/*.tsx ESLint 오류 수정"
178
+ Task(Lint-Fixer): "src/routes/*.tsx 타입 오류 수정"
179
+ Task(Lint-Fixer): "src/lib/*.ts 린트 경고 수정"
180
+ Task(Lint-Fixer): "src/functions/*.ts 미사용 변수 제거"
181
+
182
+ # 각 에이전트 결과:
183
+ # - Agent 1: 25개 파일 수정 완료
184
+ # - Agent 2: 30개 파일 수정 완료
185
+ # - Agent 3: 20개 파일 수정 완료
186
+ # - Agent 4: 15개 파일 수정 완료
187
+
188
+ # 최종 검증:
189
+ npx tsc --noEmit
190
+ npx eslint .
191
+ ```
192
+
193
+ ### 모델 라우팅 가이드
194
+
195
+ | 오류 복잡도 | 모델 선택 | 이유 |
196
+ |-----------|----------|------|
197
+ | **ESLint 경고** | haiku | 단순 패턴 수정 (prefer-const, no-console) |
198
+ | **간단한 타입 오류** | haiku | 추론 가능한 리턴 타입, 명확한 타입 수정 |
199
+ | **복잡한 타입 오류** | sonnet (기본) | TS2322, TS2345, TS2339 등 |
200
+ | **구조적 리팩토링** | sonnet | 타입 시스템 재설계, 제네릭 문제 |
201
+ | **아키텍처 수준** | opus | 전역 타입 정의, 의존성 순환 해결 |
202
+
203
+ ### 협업 패턴
204
+
205
+ #### 패턴 1: 탐색 → 분류 → 병렬 수정
206
+
207
+ ```markdown
208
+ # 단계 1: Explore로 오류 영역 파악
209
+ Task(Explore): "타입 오류가 발생한 모든 파일 탐색"
210
+ → 결과: 파일 목록 + 오류 유형
211
+
212
+ # 단계 2: 오류 분류 및 그룹화
213
+ - 그룹 A: components/ (간단한 오류 20개)
214
+ - 그룹 B: routes/ (복잡한 오류 10개)
215
+ - 그룹 C: lib/ (경고 15개)
216
+
217
+ # 단계 3: 병렬 수정
218
+ Task(Lint-Fixer, haiku): "그룹 A 간단한 오류 수정"
219
+ Task(Lint-Fixer, sonnet): "그룹 B 복잡한 오류 수정"
220
+ Task(Lint-Fixer, haiku): "그룹 C 경고 수정"
221
+ ```
222
+
223
+ #### 패턴 2: 순차 수정 (연쇄 오류)
224
+
225
+ ```markdown
226
+ # 근본 원인 → 파생 오류 순서
227
+
228
+ # 단계 1: 근본 원인 수정
229
+ Task(Lint-Fixer, sonnet): "src/types/index.ts 타입 정의 수정"
230
+ → 결과: User 인터페이스에 email 필드 추가
231
+
232
+ # 단계 2: 전체 재검사 (파생 오류 자동 해결)
233
+ npx tsc --noEmit
234
+ → 100개 오류 → 5개 오류로 감소
235
+
236
+ # 단계 3: 남은 오류 수정
237
+ Task(Lint-Fixer, sonnet): "남은 5개 오류 수정"
238
+ ```
239
+
240
+ #### 패턴 3: 반복 수정 (점진적 해결)
241
+
242
+ ```markdown
243
+ # 대규모 오류 → 우선순위별 반복
244
+
245
+ # Round 1: 타입 오류 (컴파일 차단)
246
+ Task(Lint-Fixer, sonnet): "모든 타입 오류 수정"
247
+ → 재검사 → 타입 오류 0개
248
+
249
+ # Round 2: 린트 오류
250
+ Task(Lint-Fixer, haiku): "모든 린트 오류 수정"
251
+ → 재검사 → 린트 오류 0개
252
+
253
+ # Round 3: 경고
254
+ Task(Lint-Fixer, haiku): "모든 린트 경고 수정"
255
+ → 최종 검사 통과
256
+ ```
257
+
258
+ ### 결과 통합 전략
259
+
260
+ 병렬 수정 후 결과 통합:
261
+
262
+ ```markdown
263
+ ## 병렬 수정 결과 통합
264
+
265
+ ### Agent 1 (components/)
266
+ - 수정 파일: 25개
267
+ - 해결 오류: no-unused-vars (15), prefer-const (10)
268
+ - 상태: ✅ 완료
269
+
270
+ ### Agent 2 (routes/)
271
+ - 수정 파일: 30개
272
+ - 해결 오류: TS2322 (20), TS2345 (10)
273
+ - 상태: ✅ 완료
274
+
275
+ ### Agent 3 (lib/)
276
+ - 수정 파일: 20개
277
+ - 해결 오류: no-console (20)
278
+ - 상태: ✅ 완료
279
+
280
+ ### 최종 검증
281
+ npx tsc --noEmit && npx eslint .
282
+ → ✅ 모든 오류 해결 (0 errors, 0 warnings)
283
+
284
+ ### 요약
285
+ - 총 수정 파일: 75개
286
+ - 총 해결 오류: 75개
287
+ - 소요 시간: 병렬 실행으로 3배 단축
288
+ ```
289
+
290
+ ### 충돌 방지
291
+
292
+ 병렬 수정 시 파일 충돌 방지:
293
+
294
+ | 전략 | 설명 |
295
+ |------|------|
296
+ | **파일 단위 분할** | 각 에이전트가 다른 파일만 수정 |
297
+ | **모듈 단위 분할** | components/, routes/, lib/ 등 디렉토리별 분할 |
298
+ | **오류 유형 분할** | 타입 오류 vs 린트 경고 (단, 같은 파일 주의) |
299
+ | **재검증 필수** | 각 에이전트 완료 후 전체 재검사로 충돌 감지 |
300
+
301
+ ### 다른 에이전트와 조율
302
+
303
+ | 에이전트 | 협업 시점 | 역할 분담 |
304
+ |---------|----------|----------|
305
+ | **Explore** | 수정 전 | 오류 발생 파일 및 영역 탐색 |
306
+ | **Implementation-Executor** | 구현 후 | Executor가 구현 → Lint-Fixer가 오류 수정 |
307
+ | **Deployment-Validator** | 배포 전 | Lint-Fixer 패턴 동일, 배포 검증 수행 |
308
+ | **Git-Operator** | 수정 후 | 오류 수정 완료 → Git-Operator가 커밋 |
309
+
310
+ </parallel_execution>
311
+
312
+ ---
313
+
157
314
  <output>
158
315
 
159
- **Fixes completed:**
160
- - Files: src/utils/calc.ts, src/components/Form.tsx
161
- - Errors resolved: 2
316
+ **수정 완료:**
317
+ - 파일: src/utils/calc.ts, src/components/Form.tsx
318
+ - 오류 해결: 2
162
319
 
163
- **Remaining errors:**
164
- - Type errors: 0
165
- - Lint errors: 0
320
+ **남은 오류:**
321
+ - 타입 오류: 0
322
+ - 린트 오류: 0
166
323
 
167
- **Final status:**
168
- All checks passed
324
+ **최종 상태:**
325
+ 전체 검사 통과
169
326
 
170
327
  </output>