aiwf 0.3.3 → 0.3.4

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 (203) hide show
  1. package/.aiwf/config/language.json +1 -1
  2. package/.aiwf/sessions/session_1752877859489_1t7n2fhdb.json +7 -0
  3. package/.aiwf/sessions/session_1752877859515_cwdv211ry.json +7 -0
  4. package/.aiwf/sessions/session_1752877860664_huziadmbo.json +7 -0
  5. package/.aiwf/sessions/session_1752877860666_kyr5u1np6.json +7 -0
  6. package/.aiwf/sessions/session_1752877861848_9yinepw3t.json +7 -0
  7. package/.aiwf/sessions/session_1752877861874_y32sputuc.json +7 -0
  8. package/.aiwf/sessions/session_1752877862685_ivxbl5rhz.json +7 -0
  9. package/.aiwf/sessions/session_1752877862820_wnq4glvxi.json +7 -0
  10. package/.aiwf/sessions/session_1752877864632_3ebnpaelb.json +7 -0
  11. package/.aiwf/sessions/session_1752877864879_b9zgjcb7d.json +7 -0
  12. package/.aiwf/sessions/session_1752877865533_x14m1vodi.json +7 -0
  13. package/.aiwf/sessions/session_1752877865562_gkoh19n7d.json +7 -0
  14. package/.aiwf/sessions/session_1752877866333_wp8qpdcoh.json +7 -0
  15. package/.aiwf/sessions/session_1752877866509_dawntfpab.json +7 -0
  16. package/.aiwf/sessions/session_1752877866890_plc5vfucl.json +7 -0
  17. package/.aiwf/sessions/session_1752877866895_ga8hmq3oi.json +7 -0
  18. package/.aiwf/sessions/session_1752877867761_ayjp4v5f5.json +7 -0
  19. package/.aiwf/sessions/session_1752877867892_lfz6jy252.json +7 -0
  20. package/.aiwf/sessions/session_1752877868139_7bqd9ubli.json +7 -0
  21. package/.aiwf/sessions/session_1752877868162_zq3ofjbsh.json +7 -0
  22. package/.aiwf/sessions/session_1752877869054_7rlgm9jt6.json +7 -0
  23. package/.aiwf/sessions/session_1752877869477_ax3nhbxzr.json +7 -0
  24. package/.aiwf/sessions/session_1752877870095_6hgp4vl1e.json +7 -0
  25. package/.aiwf/sessions/session_1752877870381_qfcrdg4li.json +7 -0
  26. package/.aiwf/sessions/session_1752877871895_pgd5vllhz.json +7 -0
  27. package/.aiwf/sessions/session_1752877872199_jbhv2g2da.json +7 -0
  28. package/.aiwf/sessions/session_1752877872680_x04wpffu6.json +7 -0
  29. package/.aiwf/sessions/session_1752877872895_3y4vbeauo.json +7 -0
  30. package/.aiwf/sessions/session_1752877873178_3maolzc6b.json +7 -0
  31. package/.aiwf/sessions/session_1752877873180_ytm83j07f.json +7 -0
  32. package/.aiwf/sessions/session_1752877874217_dp56c9t42.json +7 -0
  33. package/.aiwf/sessions/session_1752877874415_epwp1g1og.json +7 -0
  34. package/.aiwf/sessions/session_1752877874454_heicyuryb.json +7 -0
  35. package/.aiwf/sessions/session_1752877874869_1c2illeu5.json +7 -0
  36. package/.aiwf/sessions/session_1752877874879_k1vo4vxyx.json +7 -0
  37. package/.aiwf/sessions/session_1752877874913_bwgyiz9bp.json +7 -0
  38. package/.aiwf/sessions/session_1752877876218_44807kztz.json +7 -0
  39. package/.aiwf/sessions/session_1752877876515_qkhjv5kpw.json +7 -0
  40. package/.aiwf/sessions/session_1752877876543_p605aud1m.json +7 -0
  41. package/.aiwf/sessions/session_1752877876819_l65w7ifck.json +7 -0
  42. package/.aiwf/sessions/session_1752877876867_xrhzss4we.json +7 -0
  43. package/.aiwf/sessions/session_1752877876872_u7aso54qb.json +7 -0
  44. package/.aiwf/sessions/session_1752877877705_telnfg4o6.json +7 -0
  45. package/.aiwf/sessions/session_1752877878285_6s45im2ib.json +7 -0
  46. package/.aiwf/sessions/session_1752877878506_v0dvguqhz.json +7 -0
  47. package/.aiwf/sessions/session_1752877878581_3ri3yc66a.json +7 -0
  48. package/.aiwf/sessions/session_1752877878756_a82x9s2pd.json +7 -0
  49. package/.aiwf/sessions/session_1752877878886_20pjsfour.json +7 -0
  50. package/.aiwf/sessions/session_1752877880266_fm1ydjw0g.json +7 -0
  51. package/.aiwf/sessions/session_1752877881149_xbat4z03d.json +7 -0
  52. package/.aiwf/sessions/session_1752877881551_qy5sic9qs.json +7 -0
  53. package/.aiwf/sessions/session_1752877881554_24ugd96wu.json +7 -0
  54. package/.aiwf/sessions/session_1752877881797_e9mm25uh0.json +7 -0
  55. package/.aiwf/sessions/session_1752877881822_bxvjj8c9g.json +7 -0
  56. package/.aiwf/sessions/session_1752877881890_jv7l6jve3.json +7 -0
  57. package/.aiwf/sessions/session_1752877881991_f0qugdtcq.json +7 -0
  58. package/.aiwf/sessions/session_1752877883387_0bvw9rvnx.json +7 -0
  59. package/.aiwf/sessions/session_1752877883820_q6g2md2up.json +7 -0
  60. package/.aiwf/sessions/session_1752877884393_sqr7trvjl.json +7 -0
  61. package/.aiwf/sessions/session_1752877884500_whtypmzlf.json +7 -0
  62. package/.aiwf/sessions/session_1752877884645_y9mvvxli1.json +7 -0
  63. package/.aiwf/sessions/session_1752877884733_hk46eenel.json +7 -0
  64. package/.aiwf/sessions/session_1752877884738_c62j6214r.json +7 -0
  65. package/.aiwf/sessions/session_1752877884771_temhxehoz.json +7 -0
  66. package/.aiwf/sessions/session_1752877885643_6v5fcktc7.json +7 -0
  67. package/.aiwf/sessions/session_1752877886426_ee8di2fqh.json +7 -0
  68. package/.aiwf/sessions/session_1752877886549_3xj6tdoew.json +7 -0
  69. package/.aiwf/sessions/session_1752877886604_aj80yyfco.json +7 -0
  70. package/.aiwf/sessions/session_1752877886702_2b8841vyg.json +7 -0
  71. package/.aiwf/sessions/session_1752877886712_ntqc8b8bz.json +7 -0
  72. package/.aiwf/sessions/session_1752877886968_946m8tbw6.json +7 -0
  73. package/.aiwf/sessions/session_1752877887008_wg6zfg8dn.json +7 -0
  74. package/.aiwf/sessions/session_1752877888479_ciiu2qiqs.json +7 -0
  75. package/.aiwf/sessions/session_1752877889330_ravg8l66k.json +7 -0
  76. package/.aiwf/sessions/session_1752877889542_7zepkhjkc.json +7 -0
  77. package/.aiwf/sessions/session_1752877889638_ev4htqiu0.json +7 -0
  78. package/.aiwf/sessions/session_1752877889956_szphy2qma.json +7 -0
  79. package/.aiwf/sessions/session_1752877890220_o6aaa57tt.json +7 -0
  80. package/.aiwf/sessions/session_1752877890527_v2loy5vu1.json +7 -0
  81. package/.aiwf/sessions/session_1752877890572_cwq8fiuma.json +7 -0
  82. package/.aiwf/sessions/session_1752877892200_sgcwq1alt.json +7 -0
  83. package/.aiwf/sessions/session_1752877892268_v8kexpbc5.json +7 -0
  84. package/.aiwf/sessions/session_1752877892384_1gbbgrp4y.json +7 -0
  85. package/.aiwf/sessions/session_1752877893568_9p2n5p31a.json +7 -0
  86. package/.aiwf/sessions/session_1752877893727_un34a5tvp.json +7 -0
  87. package/.aiwf/sessions/session_1752877893778_01j79sw9i.json +7 -0
  88. package/.aiwf/sessions/session_1752877894053_jrhba6wko.json +7 -0
  89. package/.aiwf/sessions/session_1752877894082_x3bghawox.json +7 -0
  90. package/.aiwf/sessions/session_1752877894500_iytiav2ku.json +7 -0
  91. package/.aiwf/sessions/session_1752877894667_ucn0gc2ge.json +7 -0
  92. package/.aiwf/test-results-s02.json +4 -4
  93. package/.claude/commands/aiwf/aiwf_changelog.md +82 -0
  94. package/.claude/commands/aiwf/aiwf_code_review.md +88 -0
  95. package/.claude/commands/aiwf/aiwf_commit.md +160 -0
  96. package/.claude/commands/aiwf/aiwf_compress_aggressive_persona.md +53 -0
  97. package/.claude/commands/aiwf/aiwf_compress_context.md +116 -0
  98. package/.claude/commands/aiwf/aiwf_compress_minimal_persona.md +48 -0
  99. package/.claude/commands/aiwf/aiwf_compress_stats.md +79 -0
  100. package/.claude/commands/aiwf/aiwf_compress_with_persona.md +51 -0
  101. package/.claude/commands/aiwf/aiwf_create_feature_ledger.md +54 -0
  102. package/.claude/commands/aiwf/aiwf_create_general_task.md +147 -0
  103. package/.claude/commands/aiwf/aiwf_create_milestone_plan.md +194 -0
  104. package/.claude/commands/aiwf/aiwf_create_prd.md +280 -0
  105. package/.claude/commands/aiwf/aiwf_create_sprint_tasks.md +189 -0
  106. package/.claude/commands/aiwf/aiwf_create_sprints_from_milestone.md +121 -0
  107. package/.claude/commands/aiwf/aiwf_default_mode.md +44 -0
  108. package/.claude/commands/aiwf/aiwf_discuss_review.md +29 -0
  109. package/.claude/commands/aiwf/aiwf_do_task.md +109 -0
  110. package/.claude/commands/aiwf/aiwf_docs.md +225 -0
  111. package/.claude/commands/aiwf/aiwf_evaluate.md +92 -0
  112. package/.claude/commands/aiwf/aiwf_get_feature_details.md +78 -0
  113. package/.claude/commands/aiwf/aiwf_infinite.md +202 -0
  114. package/.claude/commands/aiwf/aiwf_initialize.md +134 -0
  115. package/.claude/commands/aiwf/aiwf_issue_create.md +65 -0
  116. package/.claude/commands/aiwf/aiwf_link_feature_to_milestone.md +57 -0
  117. package/.claude/commands/aiwf/aiwf_list_features.md +54 -0
  118. package/.claude/commands/aiwf/aiwf_mermaid.md +272 -0
  119. package/.claude/commands/aiwf/aiwf_persona_architect.md +48 -0
  120. package/.claude/commands/aiwf/aiwf_persona_backend.md +37 -0
  121. package/.claude/commands/aiwf/aiwf_persona_data_analyst.md +37 -0
  122. package/.claude/commands/aiwf/aiwf_persona_frontend.md +37 -0
  123. package/.claude/commands/aiwf/aiwf_persona_security.md +48 -0
  124. package/.claude/commands/aiwf/aiwf_persona_status.md +50 -0
  125. package/.claude/commands/aiwf/aiwf_pr_create.md +76 -0
  126. package/.claude/commands/aiwf/aiwf_prime.md +9 -0
  127. package/.claude/commands/aiwf/aiwf_project_review.md +261 -0
  128. package/.claude/commands/aiwf/aiwf_switch_language.md +160 -0
  129. package/.claude/commands/aiwf/aiwf_test.md +124 -0
  130. package/.claude/commands/aiwf/aiwf_testing_review.md +198 -0
  131. package/.claude/commands/aiwf/aiwf_tm-run-all-subtask.md +210 -0
  132. package/.claude/commands/aiwf/aiwf_ultrathink_code_advanced.md +460 -0
  133. package/.claude/commands/aiwf/aiwf_ultrathink_code_basic.md +165 -0
  134. package/.claude/commands/aiwf/aiwf_ultrathink_general.md +305 -0
  135. package/.claude/commands/aiwf/aiwf_update_docs_kr.md +25 -0
  136. package/.claude/commands/aiwf/aiwf_update_feature_status.md +53 -0
  137. package/.claude/commands/aiwf/aiwf_yolo.md +300 -0
  138. package/.eslintrc.json +26 -0
  139. package/.prettierrc +10 -0
  140. package/CLAUDE.md +154 -54
  141. package/README.ko.md +25 -0
  142. package/README.md +25 -0
  143. package/TEST_RECOVERY_PLAN.md +68 -0
  144. package/docs/CLEANUP_RECOMMENDATIONS.md +86 -0
  145. package/docs/CLI_USAGE_GUIDE.md +479 -0
  146. package/package.json +9 -9
  147. package/scripts/update-feature-status.js +70 -0
  148. package/{lib → src/cli}/cache-cli.js +4 -4
  149. package/src/cli/index.js +165 -0
  150. package/{language-cli.js → src/cli/language-cli.js} +11 -4
  151. package/src/commands/cache-templates.js +209 -0
  152. package/src/commands/create-offline.js +86 -0
  153. package/src/commands/create-project.js +151 -0
  154. package/src/lib/backup-manager.js +270 -0
  155. package/src/lib/file-downloader.js +208 -0
  156. package/src/lib/installer.js +676 -0
  157. package/src/lib/rollback-manager.js +418 -0
  158. package/src/lib/validator.js +561 -0
  159. package/src/utils/git-integration.js +173 -0
  160. package/{language-utils.js → src/utils/language-utils.js} +2 -1
  161. package/src/utils/messages.js +136 -0
  162. package/src/utils/paths.js +130 -0
  163. package/tests/application.test.js +2 -2
  164. package/tests/installer.test.js +2 -2
  165. package/tests/integration/ai-persona-system.test.js +4 -4
  166. package/tests/integration/test-persona-system/docs/README.md +1 -0
  167. package/tests/integration/test-persona-system/package.json +1 -0
  168. package/tests/integration/test-persona-system/src/auth.js +1 -0
  169. package/tests/integration/test-persona-system/src/index.js +1 -0
  170. package/tests/integration/test-persona-system/test/test.js +1 -0
  171. package/tests/language-utils.test.js +1 -1
  172. package/tests/temp_invalid_json/invalid.json +1 -0
  173. package/tests/unit/ai-persona-manager.test.js +7 -7
  174. package/.aiwf/05_DOCUMENTATION/performance-report.md +0 -33
  175. package/.aiwf/test-cache/86c7f9e80251abb8bedd58953ab0d1779e46b4f43ea33b63bffdb778106373b0.json +0 -6
  176. package/.aiwf/test-cache/9e252a90b80fce0585d7ed0646e7a9b4343e109f661f42a3ae678ba1ec5e22c7.json +0 -7
  177. package/.aiwf/token-data/alerts.json +0 -293
  178. package/.aiwf/token-data/monitor-config.json +0 -12
  179. package/CHANGELOG_M02.md +0 -52
  180. package/claude-code/aiwf/ko/templates/web-app/template/package-lock.json +0 -10022
  181. package/claude-code/aiwf/ko/token-data/alerts.json +0 -293
  182. package/claude-code/aiwf/ko/token-data/monitor-config.json +0 -12
  183. package/docs/m02-dod-checklist.md +0 -125
  184. package/docs/m02-gap-analysis.md +0 -214
  185. package/docs/m02-milestone-completion-report.md +0 -186
  186. package/docs/m02-milestone-executive-summary.md +0 -68
  187. package/index.js +0 -1951
  188. package/lib/cache-integration.js +0 -401
  189. package/lib/file-batch-processor.js +0 -401
  190. package/lib/performance-benchmark.js +0 -621
  191. package/lib/template-manager.js +0 -310
  192. package/scripts/validate-commands.cjs +0 -338
  193. /package/{lib → src/lib}/ai-persona-manager.js +0 -0
  194. /package/{lib → src/lib}/cache-system.js +0 -0
  195. /package/{lib → src/lib}/context-engine.js +0 -0
  196. /package/{lib → src/lib}/memory-profiler.js +0 -0
  197. /package/{lib → src/lib}/metrics-collector.js +0 -0
  198. /package/{lib → src/lib}/offline-detector.js +0 -0
  199. /package/{lib → src/lib}/task-analyzer.js +0 -0
  200. /package/{lib → src/lib}/template-cache-system.js +0 -0
  201. /package/{lib → src/lib}/template-downloader.js +0 -0
  202. /package/{lib → src/lib}/template-version-manager.js +0 -0
  203. /package/{lib → src/lib}/token-optimizer.js +0 -0
@@ -0,0 +1,460 @@
1
+ # Ultra Think - 코드 심층사고 엔진 (/ultrathink_code_advanced 이 5000줄 클래스를 어떻게 분해할까?)
2
+
3
+ Activate Claude's maximum cognitive depth for code architecture decisions, complex implementation challenges, and discovering elegant solutions at the intersection of theory and practice.
4
+
5
+ ## 🧠 Code Intelligence Framework
6
+
7
+ ### Phase 0: Context Loading & Analysis
8
+
9
+ ```yaml
10
+ Initialize:
11
+ - Check for $ARGUMENTS presence
12
+ - If empty: STOP and request clarification
13
+ - Load current codebase context
14
+ - Analyze existing patterns and conventions
15
+ - Map dependency graph
16
+ - Identify technical debt zones
17
+ - Establish performance baselines
18
+ - Scan for anti-patterns
19
+ ```
20
+
21
+ ### ⚠️ Argument Validation
22
+
23
+ ```python
24
+ if not $ARGUMENTS or $ARGUMENTS.strip() == "":
25
+ return """
26
+ 🛑 **Ultra Think requires a specific problem or question to analyze.**
27
+
28
+ Please provide details about what you'd like me to think deeply about:
29
+
30
+ Examples:
31
+ - /ultrathink How should I refactor this authentication service?
32
+ - /ultrathink What's the best way to handle rate limiting in our API?
33
+ - /ultrathink Should we migrate from REST to GraphQL?
34
+ - /ultrathink How to optimize this O(n²) algorithm?
35
+
36
+ What specific code challenge would you like me to analyze?
37
+ """
38
+ ```
39
+
40
+ ## 🌀 Deep Code Reasoning Protocol
41
+
42
+ ### 1. **Problem Decomposition in Code Context**
43
+
44
+ ```typescript
45
+ interface ProblemSpace {
46
+ // Surface Layer
47
+ symptom: "What error/issue is manifesting?";
48
+
49
+ // Code Layer
50
+ implementation: "What code structures are involved?";
51
+
52
+ // Architecture Layer
53
+ design: "What architectural decisions led here?";
54
+
55
+ // Principle Layer
56
+ paradigm: "What programming paradigms are at play?";
57
+
58
+ // Meta Layer
59
+ evolution: "How will this code need to evolve?";
60
+ }
61
+ ```
62
+
63
+ **Analytical Questions:**
64
+
65
+ - What does the code want to be?
66
+ - What patterns is it trying to express?
67
+ - What constraints are real vs. assumed?
68
+ - What would the ideal solution look like if we had no legacy?
69
+ - What can we learn from how others solved this?
70
+
71
+ ### 2. **Multi-Paradigm Code Analysis**
72
+
73
+ #### 🔍 Static Analysis Thinking
74
+
75
+ ```python
76
+ def analyze_code_health():
77
+ return {
78
+ 'complexity': cyclomatic_complexity_analysis(),
79
+ 'coupling': dependency_coupling_matrix(),
80
+ 'cohesion': module_cohesion_score(),
81
+ 'duplication': code_duplication_patterns(),
82
+ 'test_coverage': coverage_gap_analysis(),
83
+ 'performance': big_o_complexity_map(),
84
+ 'security': vulnerability_surface_analysis()
85
+ }
86
+ ```
87
+
88
+ #### 🏗️ Architectural Reasoning
89
+
90
+ - **Layered Architecture**: How do layers communicate?
91
+ - **Domain Boundaries**: Where are the natural seams?
92
+ - **Data Flow**: How does information propagate?
93
+ - **State Management**: Where does truth live?
94
+ - **Error Propagation**: How do failures cascade?
95
+
96
+ #### 🧬 Pattern Mining
97
+
98
+ ```yaml
99
+ Identify Patterns:
100
+ Creational:
101
+ - Factory patterns needed?
102
+ - Builder complexity warranted?
103
+ - Singleton anti-patterns?
104
+
105
+ Structural:
106
+ - Adapter opportunities?
107
+ - Facade simplifications?
108
+ - Composite hierarchies?
109
+
110
+ Behavioral:
111
+ - Observer decoupling?
112
+ - Strategy flexibility?
113
+ - Command pattern undo/redo?
114
+
115
+ Concurrent:
116
+ - Actor model applicable?
117
+ - Producer-consumer queues?
118
+ - Lock-free algorithms possible?
119
+ ```
120
+
121
+ ### 3. **Solution Space Exploration**
122
+
123
+ #### 🎯 Implementation Strategies
124
+
125
+ **Strategy 1: Incremental Refactoring**
126
+
127
+ ```javascript
128
+ // Preserve existing behavior while improving structure
129
+ const refactoringPath = [
130
+ "Extract method for clarity",
131
+ "Introduce parameter object",
132
+ "Replace conditional with polymorphism",
133
+ "Extract interface",
134
+ "Dependency injection",
135
+ ];
136
+ ```
137
+
138
+ **Strategy 2: Parallel Implementation**
139
+
140
+ ```python
141
+ # Build new alongside old
142
+ class LegacyImplementation:
143
+ """Current working code"""
144
+ pass
145
+
146
+ class NextGenImplementation:
147
+ """Clean reimplementation"""
148
+ pass
149
+
150
+ class FeatureToggle:
151
+ """Gradual migration control"""
152
+ pass
153
+ ```
154
+
155
+ **Strategy 3: Abstraction Layer**
156
+
157
+ ```rust
158
+ // Introduce abstraction to hide complexity
159
+ trait UnifiedInterface {
160
+ fn execute(&self) -> Result<Output, Error>;
161
+ }
162
+
163
+ impl UnifiedInterface for ComplexSystemA { }
164
+ impl UnifiedInterface for ComplexSystemB { }
165
+ ```
166
+
167
+ ### 4. **Deep Technical Analysis**
168
+
169
+ #### ⚡ Performance Optimization Paths
170
+
171
+ ```yaml
172
+ CPU Bound:
173
+ - Algorithm complexity reduction
174
+ - Parallelization opportunities
175
+ - SIMD vectorization potential
176
+ - Cache-friendly data structures
177
+
178
+ Memory Bound:
179
+ - Memory pooling strategies
180
+ - Lazy evaluation patterns
181
+ - Streaming processing
182
+ - Memory-mapped approaches
183
+
184
+ I/O Bound:
185
+ - Async/await patterns
186
+ - Connection pooling
187
+ - Batch processing
188
+ - Caching strategies
189
+ ```
190
+
191
+ #### 🔐 Security Reasoning
192
+
193
+ ```python
194
+ security_analysis = {
195
+ 'input_validation': boundary_check_completeness(),
196
+ 'authentication': auth_flow_vulnerabilities(),
197
+ 'authorization': permission_model_gaps(),
198
+ 'data_protection': encryption_coverage(),
199
+ 'injection_risks': sanitization_audit(),
200
+ 'timing_attacks': constant_time_operations()
201
+ }
202
+ ```
203
+
204
+ #### 🧪 Testing Strategy Evolution
205
+
206
+ ```typescript
207
+ interface TestingDimensions {
208
+ unit: "Pure function isolation";
209
+ integration: "Component interaction";
210
+ contract: "API boundary verification";
211
+ property: "Invariant maintenance";
212
+ fuzzing: "Edge case discovery";
213
+ mutation: "Test quality verification";
214
+ performance: "Regression prevention";
215
+ }
216
+ ```
217
+
218
+ ### 5. **Code Quality Transcendence**
219
+
220
+ #### 📐 Elegance Metrics
221
+
222
+ - **Simplicity**: Can we remove code while adding functionality?
223
+ - **Orthogonality**: Are concerns properly separated?
224
+ - **Composability**: Do pieces combine naturally?
225
+ - **Readability**: Would a new developer understand immediately?
226
+ - **Extensibility**: How easy is adding new features?
227
+
228
+ #### 🌊 Flow State Code
229
+
230
+ ```python
231
+ # Code that feels natural to write and modify
232
+ class FlowStateExample:
233
+ """
234
+ - Clear intent
235
+ - Natural naming
236
+ - Obvious structure
237
+ - Minimal cognitive load
238
+ - Self-documenting
239
+ """
240
+ def process(self, data: Data) -> Result:
241
+ validated = self.validate(data)
242
+ transformed = self.transform(validated)
243
+ return self.persist(transformed)
244
+ ```
245
+
246
+ ### 6. **Advanced Code Patterns**
247
+
248
+ #### 🔄 Functional Composition
249
+
250
+ ```haskell
251
+ -- Pure functions that compose naturally
252
+ processData = validate >=> transform >=> persist
253
+ where
254
+ validate = ...
255
+ transform = ...
256
+ persist = ...
257
+ ```
258
+
259
+ #### 🎭 Type-Level Programming
260
+
261
+ ```typescript
262
+ // Encode business rules in type system
263
+ type ValidatedUser<T> = T & { __validated: true };
264
+ type AuthorizedUser<T> = T & { __authorized: true };
265
+
266
+ function process<T>(user: ValidatedUser<AuthorizedUser<T>>) {
267
+ // Compiler ensures user is validated AND authorized
268
+ }
269
+ ```
270
+
271
+ #### 🌀 Reactive Patterns
272
+
273
+ ```javascript
274
+ // Event-driven, responsive architecture
275
+ const userEvents$ = new Subject();
276
+
277
+ const processedUsers$ = userEvents$.pipe(
278
+ filter(isValid),
279
+ debounceTime(300),
280
+ switchMap(fetchUserDetails),
281
+ retry(3),
282
+ shareReplay(1)
283
+ );
284
+ ```
285
+
286
+ ### 7. **Meta-Code Reasoning**
287
+
288
+ #### 🤔 Code Philosophy Questions
289
+
290
+ - Is this code expressing the domain naturally?
291
+ - Are we fighting the language or flowing with it?
292
+ - What would this look like in 10 lines? 100 lines? 1000 lines?
293
+ - How would we explain this to a junior? To a senior? To a non-programmer?
294
+ - What parts will definitely change? What parts are eternal?
295
+
296
+ #### 🧩 Cross-Pollination
297
+
298
+ ```yaml
299
+ Borrow From:
300
+ Gaming: "Entity-Component-System for flexibility"
301
+ Databases: "Query optimization techniques"
302
+ Compilers: "AST transformation patterns"
303
+ OS Design: "Scheduling algorithms"
304
+ Biology: "Self-healing systems"
305
+ Physics: "Conservation laws in state management"
306
+ ```
307
+
308
+ ### 8. **Implementation Roadmap**
309
+
310
+ #### Phase 1: Immediate Wins
311
+
312
+ ```bash
313
+ # Quick improvements with high impact
314
+ - Extract constants
315
+ - Add type hints
316
+ - Improve naming
317
+ - Add critical tests
318
+ - Document intent
319
+ ```
320
+
321
+ #### Phase 2: Structural Improvements
322
+
323
+ ```python
324
+ # Refactoring for better architecture
325
+ - Introduce interfaces
326
+ - Separate concerns
327
+ - Reduce coupling
328
+ - Increase cohesion
329
+ - Establish boundaries
330
+ ```
331
+
332
+ #### Phase 3: Paradigm Shifts
333
+
334
+ ```rust
335
+ // Fundamental reimagining
336
+ - New architecture
337
+ - Different paradigm
338
+ - Modern patterns
339
+ - Performance overhaul
340
+ - Future-proofing
341
+ ```
342
+
343
+ ### 9. **Output Format**
344
+
345
+ ````markdown
346
+ # Ultra Think Analysis: [Code Challenge]
347
+
348
+ ## 📊 Current State Assessment
349
+
350
+ - Code health metrics
351
+ - Technical debt quantification
352
+ - Performance bottlenecks
353
+ - Security vulnerabilities
354
+
355
+ ## 🎯 Core Problem Identification
356
+
357
+ - Root cause (not symptoms)
358
+ - Systemic issues
359
+ - Architectural constraints
360
+
361
+ ## 💡 Solution Strategies
362
+
363
+ ### Option 1: [Minimal Refactor]
364
+
365
+ ```[language]
366
+ // Code example
367
+ ```
368
+ ````
369
+
370
+ - Effort: Low
371
+ - Risk: Low
372
+ - Impact: Medium
373
+
374
+ ### Option 2: [Architectural Shift]
375
+
376
+ ```[language]
377
+ // Code example
378
+ ```
379
+
380
+ - Effort: High
381
+ - Risk: Medium
382
+ - Impact: High
383
+
384
+ ### Option 3: [Innovation Path]
385
+
386
+ ```[language]
387
+ // Code example
388
+ ```
389
+
390
+ - Effort: Medium
391
+ - Risk: High
392
+ - Impact: Transformative
393
+
394
+ ## 🗺️ Implementation Plan
395
+
396
+ 1. Week 1: [Specific tasks]
397
+ 2. Week 2: [Specific tasks]
398
+ 3. Week 3: [Specific tasks]
399
+
400
+ ## ⚠️ Risk Mitigation
401
+
402
+ - Rollback strategy
403
+ - Feature flags
404
+ - Monitoring plan
405
+ - Performance benchmarks
406
+
407
+ ## 📈 Success Metrics
408
+
409
+ - Performance improvement: X%
410
+ - Code complexity reduction: Y%
411
+ - Test coverage increase: Z%
412
+ - Developer velocity impact
413
+
414
+ ## 🔮 Future Considerations
415
+
416
+ - Scalability path
417
+ - Maintenance strategy
418
+ - Evolution roadmap
419
+
420
+ ````
421
+
422
+ ### 10. **Activation Examples**
423
+
424
+ ```bash
425
+ # Architecture decision
426
+ /ultrathink Should we use microservices or modular monolith for our e-commerce platform?
427
+
428
+ # Performance optimization
429
+ /ultrathink Our API response time is 800ms. How do we get it under 100ms?
430
+
431
+ # Refactoring strategy
432
+ /ultrathink This 5000-line class is unmaintainable. What's the best decomposition approach?
433
+
434
+ # Technology choice
435
+ /ultrathink React vs Vue vs Svelte for our new dashboard - considering our team's background?
436
+
437
+ # Design pattern application
438
+ /ultrathink How to implement undo/redo in our collaborative editor efficiently?
439
+
440
+ # Debugging complex issues
441
+ /ultrathink Random crashes in production but not in staging - systematic debugging approach?
442
+ ````
443
+
444
+ ## 🚀 Pro Tips
445
+
446
+ 1. **Provide Context**: Include relevant code snippets, architecture diagrams, or performance metrics
447
+ 2. **Specify Constraints**: Mention tech stack, team size, deadlines, backwards compatibility needs
448
+ 3. **Share History**: What has been tried before? What failed? Why?
449
+ 4. **Define Success**: What does "better" mean? Performance? Maintainability? Features?
450
+
451
+ ## 🎓 Learning Integration
452
+
453
+ Ultra Think doesn't just solve - it teaches:
454
+
455
+ - Why certain patterns emerge
456
+ - When to apply specific solutions
457
+ - How to think about similar problems
458
+ - What to watch out for in the future
459
+
460
+ Remember: The best code often comes from deeply understanding the problem space, not just applying patterns. Ultra Think helps you see the forest AND the trees, finding elegant solutions that feel inevitable in hindsight.
@@ -0,0 +1,165 @@
1
+ # Ultra Think - 심층사고 지시 (/ultrathink_code_basic 마이크로서비스로 개선할수 있을까?)
2
+
3
+ Engage Claude in ultra-deep thinking mode for complex problem-solving, architectural decisions, and thorough analysis requiring maximum reasoning capabilities.
4
+
5
+ ## Instructions
6
+
7
+ 1. **Initialize Ultra Think Mode**
8
+
9
+ - Acknowledge the request for enhanced analytical thinking
10
+ - Set context for deep, systematic reasoning
11
+ - Prepare to explore the problem space comprehensively
12
+
13
+ 2. **Parse the Problem or Question**
14
+
15
+ - Extract the core challenge from: **$ARGUMENTS**
16
+ - Identify all stakeholders and constraints
17
+ - Recognize implicit requirements and hidden complexities
18
+ - Question assumptions and surface unknowns
19
+
20
+ 3. **Multi-Dimensional Analysis**
21
+ Approach the problem from multiple angles:
22
+
23
+ ### Technical Perspective
24
+
25
+ - Analyze technical feasibility and constraints
26
+ - Consider scalability, performance, and maintainability
27
+ - Evaluate security implications
28
+ - Assess technical debt and future-proofing
29
+
30
+ ### Business Perspective
31
+
32
+ - Understand business value and ROI
33
+ - Consider time-to-market pressures
34
+ - Evaluate competitive advantages
35
+ - Assess risk vs. reward trade-offs
36
+
37
+ ### User Perspective
38
+
39
+ - Analyze user needs and pain points
40
+ - Consider usability and accessibility
41
+ - Evaluate user experience implications
42
+ - Think about edge cases and user journeys
43
+
44
+ ### System Perspective
45
+
46
+ - Consider system-wide impacts
47
+ - Analyze integration points
48
+ - Evaluate dependencies and coupling
49
+ - Think about emergent behaviors
50
+
51
+ 4. **Generate Multiple Solutions**
52
+
53
+ - Brainstorm at least 3-5 different approaches
54
+ - For each approach, consider:
55
+ - Pros and cons
56
+ - Implementation complexity
57
+ - Resource requirements
58
+ - Potential risks
59
+ - Long-term implications
60
+ - Include both conventional and creative solutions
61
+ - Consider hybrid approaches
62
+
63
+ 5. **Deep Dive Analysis**
64
+ For the most promising solutions:
65
+
66
+ - Create detailed implementation plans
67
+ - Identify potential pitfalls and mitigation strategies
68
+ - Consider phased approaches and MVPs
69
+ - Analyze second and third-order effects
70
+ - Think through failure modes and recovery
71
+
72
+ 6. **Cross-Domain Thinking**
73
+
74
+ - Draw parallels from other industries or domains
75
+ - Apply design patterns from different contexts
76
+ - Consider biological or natural system analogies
77
+ - Look for innovative combinations of existing solutions
78
+
79
+ 7. **Challenge and Refine**
80
+
81
+ - Play devil's advocate with each solution
82
+ - Identify weaknesses and blind spots
83
+ - Consider "what if" scenarios
84
+ - Stress-test assumptions
85
+ - Look for unintended consequences
86
+
87
+ 8. **Synthesize Insights**
88
+
89
+ - Combine insights from all perspectives
90
+ - Identify key decision factors
91
+ - Highlight critical trade-offs
92
+ - Summarize innovative discoveries
93
+ - Present a nuanced view of the problem space
94
+
95
+ 9. **Provide Structured Recommendations**
96
+ Present findings in a clear structure:
97
+
98
+ ```
99
+ ## Problem Analysis
100
+ - Core challenge
101
+ - Key constraints
102
+ - Critical success factors
103
+
104
+ ## Solution Options
105
+ ### Option 1: [Name]
106
+ - Description
107
+ - Pros/Cons
108
+ - Implementation approach
109
+ - Risk assessment
110
+
111
+ ### Option 2: [Name]
112
+ [Similar structure]
113
+
114
+ ## Recommendation
115
+ - Recommended approach
116
+ - Rationale
117
+ - Implementation roadmap
118
+ - Success metrics
119
+ - Risk mitigation plan
120
+
121
+ ## Alternative Perspectives
122
+ - Contrarian view
123
+ - Future considerations
124
+ - Areas for further research
125
+ ```
126
+
127
+ 10. **Meta-Analysis**
128
+ - Reflect on the thinking process itself
129
+ - Identify areas of uncertainty
130
+ - Acknowledge biases or limitations
131
+ - Suggest additional expertise needed
132
+ - Provide confidence levels for recommendations
133
+
134
+ ## Usage Examples
135
+
136
+ ```bash
137
+ # Architectural decision
138
+ /project:ultra-think Should we migrate to microservices or improve our monolith?
139
+
140
+ # Complex problem solving
141
+ /project:ultra-think How do we scale our system to handle 10x traffic while reducing costs?
142
+
143
+ # Strategic planning
144
+ /project:ultra-think What technology stack should we choose for our next-gen platform?
145
+
146
+ # Design challenge
147
+ /project:ultra-think How can we improve our API to be more developer-friendly while maintaining backward compatibility?
148
+ ```
149
+
150
+ ## Key Principles
151
+
152
+ - **First Principles Thinking**: Break down to fundamental truths
153
+ - **Systems Thinking**: Consider interconnections and feedback loops
154
+ - **Probabilistic Thinking**: Work with uncertainties and ranges
155
+ - **Inversion**: Consider what to avoid, not just what to do
156
+ - **Second-Order Thinking**: Consider consequences of consequences
157
+
158
+ ## Output Expectations
159
+
160
+ - Comprehensive analysis (typically 2-4 pages of insights)
161
+ - Multiple viable solutions with trade-offs
162
+ - Clear reasoning chains
163
+ - Acknowledgment of uncertainties
164
+ - Actionable recommendations
165
+ - Novel insights or perspectives