@su-record/vibe 2.8.48 β†’ 2.8.50

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 (414) hide show
  1. package/.env.example +37 -37
  2. package/CLAUDE.md +169 -169
  3. package/LICENSE +21 -21
  4. package/README.md +694 -554
  5. package/agents/architect-low.md +41 -41
  6. package/agents/architect-medium.md +59 -59
  7. package/agents/architect.md +80 -80
  8. package/agents/build-error-resolver.md +115 -115
  9. package/agents/compounder.md +261 -261
  10. package/agents/diagrammer.md +178 -178
  11. package/agents/docs/api-documenter.md +99 -99
  12. package/agents/docs/changelog-writer.md +93 -93
  13. package/agents/e2e-tester.md +294 -294
  14. package/agents/event/event-comms.md +78 -78
  15. package/agents/event/event-content.md +68 -68
  16. package/agents/event/event-image.md +95 -95
  17. package/agents/event/event-ops.md +84 -84
  18. package/agents/event/event-scheduler.md +69 -69
  19. package/agents/event/event-speaker.md +86 -86
  20. package/agents/explorer-low.md +42 -42
  21. package/agents/explorer-medium.md +59 -59
  22. package/agents/explorer.md +48 -48
  23. package/agents/implementer-low.md +43 -43
  24. package/agents/implementer-medium.md +52 -52
  25. package/agents/implementer.md +54 -54
  26. package/agents/junior-mentor.md +141 -141
  27. package/agents/planning/requirements-analyst.md +84 -84
  28. package/agents/planning/ux-advisor.md +83 -83
  29. package/agents/qa/acceptance-tester.md +86 -86
  30. package/agents/qa/edge-case-finder.md +93 -93
  31. package/agents/qa/qa-coordinator.md +131 -131
  32. package/agents/refactor-cleaner.md +143 -143
  33. package/agents/research/best-practices-agent.md +199 -199
  34. package/agents/research/codebase-patterns-agent.md +157 -157
  35. package/agents/research/framework-docs-agent.md +188 -188
  36. package/agents/research/security-advisory-agent.md +213 -213
  37. package/agents/review/architecture-reviewer.md +107 -107
  38. package/agents/review/complexity-reviewer.md +116 -116
  39. package/agents/review/data-integrity-reviewer.md +88 -88
  40. package/agents/review/git-history-reviewer.md +103 -103
  41. package/agents/review/performance-reviewer.md +86 -86
  42. package/agents/review/python-reviewer.md +150 -150
  43. package/agents/review/rails-reviewer.md +139 -139
  44. package/agents/review/react-reviewer.md +144 -144
  45. package/agents/review/security-reviewer.md +80 -80
  46. package/agents/review/simplicity-reviewer.md +140 -140
  47. package/agents/review/test-coverage-reviewer.md +116 -116
  48. package/agents/review/typescript-reviewer.md +127 -127
  49. package/agents/searcher.md +54 -54
  50. package/agents/simplifier.md +120 -120
  51. package/agents/tester.md +49 -49
  52. package/agents/ui/ui-a11y-auditor.md +93 -93
  53. package/agents/ui/ui-antipattern-detector.md +102 -102
  54. package/agents/ui/ui-dataviz-advisor.md +69 -69
  55. package/agents/ui/ui-design-system-gen.md +57 -57
  56. package/agents/ui/ui-industry-analyzer.md +49 -49
  57. package/agents/ui/ui-layout-architect.md +65 -65
  58. package/agents/ui/ui-stack-implementer.md +68 -68
  59. package/agents/ui/ux-compliance-reviewer.md +81 -81
  60. package/agents/ui-previewer.md +258 -258
  61. package/commands/vibe.analyze.md +379 -379
  62. package/commands/vibe.docs.md +32 -32
  63. package/commands/vibe.event.md +163 -163
  64. package/commands/vibe.figma.md +69 -69
  65. package/commands/vibe.review.md +686 -686
  66. package/commands/vibe.run.md +2276 -2276
  67. package/commands/vibe.spec.md +1195 -1195
  68. package/commands/vibe.spec.review.md +609 -609
  69. package/commands/vibe.trace.md +259 -259
  70. package/commands/vibe.utils.md +413 -413
  71. package/commands/vibe.verify.md +510 -510
  72. package/dist/cli/collaborator.js +52 -52
  73. package/dist/cli/commands/config.js +9 -9
  74. package/dist/cli/commands/evolution.js +12 -12
  75. package/dist/cli/commands/figma.js +20 -20
  76. package/dist/cli/commands/info.js +53 -53
  77. package/dist/cli/commands/init.js +5 -5
  78. package/dist/cli/commands/remove.js +14 -14
  79. package/dist/cli/commands/sentinel.js +27 -27
  80. package/dist/cli/commands/skills.js +5 -5
  81. package/dist/cli/commands/slack.js +10 -10
  82. package/dist/cli/commands/stats.js +6 -6
  83. package/dist/cli/commands/telegram.js +12 -12
  84. package/dist/cli/detect.js +32 -32
  85. package/dist/cli/index.js +53 -53
  86. package/dist/cli/llm/claude-commands.js +16 -16
  87. package/dist/cli/llm/config.js +18 -18
  88. package/dist/cli/llm/gemini-commands.js +16 -16
  89. package/dist/cli/llm/gpt-commands.js +19 -19
  90. package/dist/cli/llm/help.js +21 -21
  91. package/dist/cli/postinstall/cursor-agents.js +32 -32
  92. package/dist/cli/postinstall/cursor-rules.js +83 -83
  93. package/dist/cli/postinstall/cursor-skills.js +743 -743
  94. package/dist/cli/setup/Provisioner.js +42 -42
  95. package/dist/infra/lib/DeepInit.js +24 -24
  96. package/dist/infra/lib/IterationTracker.js +11 -11
  97. package/dist/infra/lib/PythonParser.js +108 -108
  98. package/dist/infra/lib/ReviewRace.js +96 -96
  99. package/dist/infra/lib/SkillFrontmatter.js +28 -28
  100. package/dist/infra/lib/SkillQualityGate.js +9 -9
  101. package/dist/infra/lib/SkillRepository.js +159 -159
  102. package/dist/infra/lib/UltraQA.js +99 -99
  103. package/dist/infra/lib/autonomy/AuditStore.js +41 -41
  104. package/dist/infra/lib/autonomy/ConfirmationStore.js +30 -30
  105. package/dist/infra/lib/autonomy/EventOutbox.js +38 -38
  106. package/dist/infra/lib/autonomy/PolicyEngine.d.ts +3 -3
  107. package/dist/infra/lib/autonomy/PolicyEngine.js +18 -18
  108. package/dist/infra/lib/autonomy/SecuritySentinel.js +1 -1
  109. package/dist/infra/lib/autonomy/SuggestionStore.js +33 -33
  110. package/dist/infra/lib/embedding/VectorStore.js +22 -22
  111. package/dist/infra/lib/evolution/AgentAnalyzer.js +10 -10
  112. package/dist/infra/lib/evolution/DescriptionOptimizer.js +21 -21
  113. package/dist/infra/lib/evolution/GenerationRegistry.js +36 -36
  114. package/dist/infra/lib/evolution/InsightStore.js +90 -90
  115. package/dist/infra/lib/evolution/ParityTester.js +57 -57
  116. package/dist/infra/lib/evolution/RollbackManager.js +5 -5
  117. package/dist/infra/lib/evolution/SkillBenchmark.js +23 -23
  118. package/dist/infra/lib/evolution/SkillEvalRunner.js +50 -50
  119. package/dist/infra/lib/evolution/SkillGapDetector.js +10 -10
  120. package/dist/infra/lib/evolution/UsageTracker.js +28 -28
  121. package/dist/infra/lib/gemini/orchestration.js +5 -5
  122. package/dist/infra/lib/gpt/orchestration.js +4 -4
  123. package/dist/infra/lib/memory/KnowledgeGraph.js +4 -4
  124. package/dist/infra/lib/memory/MemorySearch.js +57 -57
  125. package/dist/infra/lib/memory/MemoryStorage.js +181 -181
  126. package/dist/infra/lib/memory/ObservationStore.js +28 -28
  127. package/dist/infra/lib/memory/ReflectionStore.js +30 -30
  128. package/dist/infra/lib/memory/SessionRAGRetriever.js +7 -7
  129. package/dist/infra/lib/memory/SessionRAGStore.js +225 -225
  130. package/dist/infra/lib/memory/SessionSummarizer.js +9 -9
  131. package/dist/infra/orchestrator/AgentManager.js +12 -12
  132. package/dist/infra/orchestrator/AgentRegistry.js +65 -65
  133. package/dist/infra/orchestrator/MultiLlmResearch.js +8 -8
  134. package/dist/infra/orchestrator/SwarmOrchestrator.test.js +16 -16
  135. package/dist/infra/orchestrator/parallelResearch.js +24 -24
  136. package/dist/tools/convention/analyzeComplexity.test.js +115 -115
  137. package/dist/tools/convention/validateCodeQuality.test.js +104 -104
  138. package/dist/tools/memory/createMemoryTimeline.js +10 -10
  139. package/dist/tools/memory/getMemoryGraph.js +12 -12
  140. package/dist/tools/memory/getSessionContext.js +9 -9
  141. package/dist/tools/memory/linkMemories.js +14 -14
  142. package/dist/tools/memory/listMemories.js +4 -4
  143. package/dist/tools/memory/recallMemory.js +4 -4
  144. package/dist/tools/memory/saveMemory.js +4 -4
  145. package/dist/tools/memory/searchMemoriesAdvanced.js +23 -23
  146. package/dist/tools/semantic/analyzeDependencyGraph.js +12 -12
  147. package/dist/tools/semantic/astGrep.test.js +6 -6
  148. package/dist/tools/spec/prdParser.test.js +171 -171
  149. package/dist/tools/spec/specGenerator.js +169 -169
  150. package/dist/tools/spec/traceabilityMatrix.js +64 -64
  151. package/dist/tools/spec/traceabilityMatrix.test.js +28 -28
  152. package/hooks/gemini-hooks.json +73 -73
  153. package/hooks/hooks.json +170 -170
  154. package/hooks/scripts/__tests__/keyword-detector.test.js +199 -199
  155. package/hooks/scripts/__tests__/pre-tool-guard.test.js +286 -286
  156. package/hooks/scripts/__tests__/sentinel-guard.test.js +210 -210
  157. package/hooks/scripts/auto-commit.js +97 -65
  158. package/hooks/scripts/auto-format.js +64 -64
  159. package/hooks/scripts/auto-test.js +81 -81
  160. package/hooks/scripts/code-check.js +268 -216
  161. package/hooks/scripts/codex-detect.js +46 -46
  162. package/hooks/scripts/codex-review-gate.js +80 -80
  163. package/hooks/scripts/command-log.js +32 -32
  164. package/hooks/scripts/context-save.js +353 -353
  165. package/hooks/scripts/evolution-engine.js +91 -91
  166. package/hooks/scripts/figma-extract.js +477 -477
  167. package/hooks/scripts/hud-status.js +321 -321
  168. package/hooks/scripts/keyword-detector.js +214 -214
  169. package/hooks/scripts/llm-orchestrate.js +572 -555
  170. package/hooks/scripts/post-edit.js +32 -32
  171. package/hooks/scripts/pr-test-gate.js +52 -52
  172. package/hooks/scripts/pre-tool-guard.js +159 -159
  173. package/hooks/scripts/prompt-dispatcher.js +185 -185
  174. package/hooks/scripts/sentinel-guard.js +131 -131
  175. package/hooks/scripts/session-start.js +177 -106
  176. package/hooks/scripts/skill-injector.js +83 -83
  177. package/hooks/scripts/stop-notify.js +209 -209
  178. package/hooks/scripts/utils.js +243 -186
  179. package/languages/csharp-unity.md +515 -515
  180. package/languages/gdscript-godot.md +470 -470
  181. package/languages/ruby-rails.md +489 -489
  182. package/languages/typescript-angular.md +433 -433
  183. package/languages/typescript-astro.md +416 -416
  184. package/languages/typescript-electron.md +406 -406
  185. package/languages/typescript-nestjs.md +524 -524
  186. package/languages/typescript-svelte.md +407 -407
  187. package/languages/typescript-tauri.md +365 -365
  188. package/package.json +101 -100
  189. package/skills/agents-md/SKILL.md +121 -121
  190. package/skills/agents-md/rubrics/what-to-keep.md +49 -49
  191. package/skills/agents-md/templates/agents-md.md +36 -36
  192. package/skills/arch-guard/SKILL.md +181 -181
  193. package/skills/arch-guard/agents/detector.md +48 -48
  194. package/skills/arch-guard/agents/reporter.md +48 -48
  195. package/skills/arch-guard/agents/rule-generator.md +49 -49
  196. package/skills/arch-guard/agents/violation-checker.md +51 -51
  197. package/skills/arch-guard/frameworks/clean-architecture.md +108 -108
  198. package/skills/arch-guard/frameworks/solid.md +102 -102
  199. package/skills/arch-guard/scripts/check-boundaries.js +90 -90
  200. package/skills/arch-guard/templates/arch-rules.json +47 -47
  201. package/skills/arch-guard/templates/violation-report.md +53 -53
  202. package/skills/brand-assets/SKILL.md +147 -147
  203. package/skills/brand-assets/rubrics/asset-checklist.md +98 -98
  204. package/skills/brand-assets/templates/brand-guide.md +161 -161
  205. package/skills/capability-loop/SKILL.md +168 -168
  206. package/skills/capability-loop/agents/capability-designer.md +61 -61
  207. package/skills/capability-loop/agents/failure-analyst.md +55 -55
  208. package/skills/capability-loop/agents/implementer.md +50 -50
  209. package/skills/capability-loop/agents/tester.md +53 -53
  210. package/skills/capability-loop/templates/capability-spec.md +118 -118
  211. package/skills/capability-loop/templates/failure-analysis.md +118 -118
  212. package/skills/characterization-test/SKILL.md +207 -207
  213. package/skills/characterization-test/agents/behavior-capturer.md +50 -50
  214. package/skills/characterization-test/agents/coverage-checker.md +54 -54
  215. package/skills/characterization-test/agents/reporter.md +50 -50
  216. package/skills/characterization-test/agents/test-writer.md +49 -49
  217. package/skills/characterization-test/rubrics/coverage-criteria.md +53 -53
  218. package/skills/characterization-test/templates/test-template.ts +101 -101
  219. package/skills/chub-usage/SKILL.md +115 -115
  220. package/skills/claude-md-guide/SKILL.md +351 -351
  221. package/skills/claude-md-guide/rubrics/anti-patterns.md +88 -88
  222. package/skills/claude-md-guide/templates/claude-md.md +54 -54
  223. package/skills/commerce-patterns/SKILL.md +64 -64
  224. package/skills/commerce-patterns/rubrics/checkout-flow.md +48 -48
  225. package/skills/commerce-patterns/templates/product-schema.md +85 -85
  226. package/skills/commit-push-pr/SKILL.md +77 -77
  227. package/skills/commit-push-pr/agents/change-analyzer.md +55 -55
  228. package/skills/commit-push-pr/agents/message-writer.md +50 -50
  229. package/skills/commit-push-pr/agents/pr-writer.md +58 -58
  230. package/skills/commit-push-pr/agents/reviewer.md +52 -52
  231. package/skills/commit-push-pr/rubrics/commit-message.md +73 -73
  232. package/skills/commit-push-pr/templates/pr-body.md +63 -63
  233. package/skills/context7-usage/SKILL.md +106 -106
  234. package/skills/context7-usage/rubrics/when-to-use.md +50 -50
  235. package/skills/create-prd/SKILL.md +90 -90
  236. package/skills/create-prd/agents/edge-case-finder.md +48 -48
  237. package/skills/create-prd/agents/prioritizer.md +60 -60
  238. package/skills/create-prd/agents/requirements-writer.md +48 -48
  239. package/skills/create-prd/agents/researcher.md +55 -55
  240. package/skills/create-prd/agents/reviewer.md +54 -54
  241. package/skills/create-prd/frameworks/jobs-to-be-done.md +96 -96
  242. package/skills/create-prd/frameworks/rice-scoring.md +97 -97
  243. package/skills/create-prd/orchestrator.md +70 -70
  244. package/skills/create-prd/rubrics/completeness.md +58 -58
  245. package/skills/create-prd/templates/prd.md +139 -139
  246. package/skills/design-audit/SKILL.md +152 -152
  247. package/skills/design-audit/agents/a11y-auditor.md +43 -43
  248. package/skills/design-audit/agents/performance-auditor.md +46 -46
  249. package/skills/design-audit/agents/responsive-auditor.md +46 -46
  250. package/skills/design-audit/agents/scorer.md +47 -47
  251. package/skills/design-audit/agents/slop-detector.md +47 -47
  252. package/skills/design-audit/frameworks/core-web-vitals.md +107 -107
  253. package/skills/design-audit/frameworks/wcag-checklist.md +64 -64
  254. package/skills/design-audit/orchestrator.md +64 -64
  255. package/skills/design-audit/rubrics/ai-slop-patterns.md +83 -83
  256. package/skills/design-audit/rubrics/scoring.md +63 -63
  257. package/skills/design-audit/templates/report.md +88 -88
  258. package/skills/design-critique/SKILL.md +139 -139
  259. package/skills/design-critique/rubrics/ux-heuristics.md +143 -143
  260. package/skills/design-critique/templates/critique-report.md +86 -86
  261. package/skills/design-distill/SKILL.md +130 -130
  262. package/skills/design-distill/templates/design-system.md +132 -132
  263. package/skills/design-normalize/SKILL.md +133 -133
  264. package/skills/design-normalize/rubrics/token-naming.md +117 -117
  265. package/skills/design-normalize/templates/token-audit.md +89 -89
  266. package/skills/design-polish/SKILL.md +131 -131
  267. package/skills/design-polish/rubrics/polish-checklist.md +68 -68
  268. package/skills/design-polish/templates/polish-report.md +64 -64
  269. package/skills/design-teach/SKILL.md +182 -182
  270. package/skills/design-teach/rubrics/brand-personality.md +73 -73
  271. package/skills/design-teach/templates/design-context.json +36 -36
  272. package/skills/e2e-commerce/SKILL.md +62 -62
  273. package/skills/e2e-commerce/templates/test-scenarios.md +170 -170
  274. package/skills/event-comms/SKILL.md +162 -162
  275. package/skills/event-comms/templates/email-invite.md +99 -99
  276. package/skills/event-comms/templates/sns-post.md +133 -133
  277. package/skills/event-ops/SKILL.md +198 -198
  278. package/skills/event-ops/rubrics/contingency.md +85 -85
  279. package/skills/event-ops/templates/d-day-checklist.md +65 -65
  280. package/skills/event-planning/SKILL.md +132 -132
  281. package/skills/event-planning/rubrics/timeline.md +70 -70
  282. package/skills/event-planning/templates/event-plan.md +91 -91
  283. package/skills/exec-plan/SKILL.md +149 -149
  284. package/skills/exec-plan/agents/decomposer.md +47 -47
  285. package/skills/exec-plan/agents/dependency-mapper.md +44 -44
  286. package/skills/exec-plan/agents/estimator.md +43 -43
  287. package/skills/exec-plan/agents/validator.md +55 -55
  288. package/skills/exec-plan/orchestrator.md +70 -70
  289. package/skills/exec-plan/rubrics/complexity-scoring.md +75 -75
  290. package/skills/exec-plan/templates/plan.md +147 -147
  291. package/skills/git-worktree/SKILL.md +73 -73
  292. package/skills/git-worktree/rubrics/when-to-use.md +55 -55
  293. package/skills/handoff/SKILL.md +110 -110
  294. package/skills/handoff/agents/context-summarizer.md +51 -51
  295. package/skills/handoff/agents/document-writer.md +63 -63
  296. package/skills/handoff/agents/state-collector.md +53 -53
  297. package/skills/handoff/agents/verifier.md +48 -48
  298. package/skills/handoff/rubrics/completeness.md +62 -62
  299. package/skills/handoff/templates/handoff.md +107 -107
  300. package/skills/parallel-research/SKILL.md +89 -89
  301. package/skills/parallel-research/agents/best-practices.md +43 -43
  302. package/skills/parallel-research/agents/codebase-patterns.md +46 -46
  303. package/skills/parallel-research/agents/framework-docs.md +45 -45
  304. package/skills/parallel-research/agents/security-advisory.md +46 -46
  305. package/skills/parallel-research/agents/synthesizer.md +52 -52
  306. package/skills/parallel-research/experts/best-practices.md +50 -50
  307. package/skills/parallel-research/experts/codebase-patterns.md +70 -70
  308. package/skills/parallel-research/experts/framework-docs.md +65 -65
  309. package/skills/parallel-research/experts/security-advisory.md +69 -69
  310. package/skills/parallel-research/orchestrator.md +65 -65
  311. package/skills/parallel-research/templates/synthesis.md +101 -101
  312. package/skills/prioritization-frameworks/SKILL.md +87 -87
  313. package/skills/prioritization-frameworks/rubrics/frameworks.md +79 -79
  314. package/skills/prioritization-frameworks/templates/scoring-matrix.md +69 -69
  315. package/skills/priority-todos/SKILL.md +64 -64
  316. package/skills/priority-todos/rubrics/prioritization.md +70 -70
  317. package/skills/priority-todos/templates/todo-board.md +59 -59
  318. package/skills/seo-checklist/SKILL.md +58 -58
  319. package/skills/seo-checklist/frameworks/structured-data.md +153 -153
  320. package/skills/seo-checklist/rubrics/content-seo.md +42 -42
  321. package/skills/seo-checklist/rubrics/technical-seo.md +48 -48
  322. package/skills/techdebt/SKILL.md +124 -124
  323. package/skills/techdebt/agents/analyzer.md +50 -50
  324. package/skills/techdebt/agents/fixer.md +41 -41
  325. package/skills/techdebt/agents/reviewer.md +47 -47
  326. package/skills/techdebt/agents/scanner.md +44 -44
  327. package/skills/techdebt/orchestrator.md +70 -70
  328. package/skills/techdebt/rubrics/severity.md +51 -51
  329. package/skills/techdebt/scripts/scan.js +90 -90
  330. package/skills/techdebt/templates/report.md +86 -86
  331. package/skills/tool-fallback/SKILL.md +104 -104
  332. package/skills/tool-fallback/rubrics/fallback-chain.md +58 -58
  333. package/skills/typescript-advanced-types/SKILL.md +67 -67
  334. package/skills/typescript-advanced-types/rubrics/type-patterns.md +109 -109
  335. package/skills/ui-ux-pro-max/SKILL.md +236 -236
  336. package/skills/ui-ux-pro-max/reference/color-and-contrast.md +517 -517
  337. package/skills/ui-ux-pro-max/reference/interaction-design.md +544 -544
  338. package/skills/ui-ux-pro-max/reference/motion-design.md +591 -591
  339. package/skills/ui-ux-pro-max/reference/responsive-design.md +463 -463
  340. package/skills/ui-ux-pro-max/reference/spatial-design.md +390 -390
  341. package/skills/ui-ux-pro-max/reference/typography.md +455 -455
  342. package/skills/ui-ux-pro-max/reference/ux-writing.md +469 -469
  343. package/skills/ui-ux-pro-max/rubrics/interaction-states.md +83 -83
  344. package/skills/ui-ux-pro-max/rubrics/responsive-breakpoints.md +99 -99
  345. package/skills/user-personas/SKILL.md +75 -75
  346. package/skills/user-personas/rubrics/research-methods.md +56 -56
  347. package/skills/user-personas/templates/persona.md +89 -89
  348. package/skills/vercel-react-best-practices/SKILL.md +60 -60
  349. package/skills/vercel-react-best-practices/rubrics/performance.md +82 -82
  350. package/skills/vercel-react-best-practices/rubrics/server-components.md +86 -86
  351. package/skills/vibe.docs/SKILL.md +171 -171
  352. package/skills/vibe.docs/templates/architecture.md +80 -80
  353. package/skills/vibe.docs/templates/readme.md +84 -84
  354. package/skills/vibe.docs/templates/release-notes.md +74 -74
  355. package/skills/vibe.figma/SKILL.md +982 -1064
  356. package/skills/vibe.figma/rubrics/extraction-checklist.md +51 -51
  357. package/skills/vibe.figma/templates/component-index.md +126 -126
  358. package/skills/vibe.figma/templates/figma-handoff.md +100 -100
  359. package/skills/vibe.figma/templates/remapped-tree.md +277 -277
  360. package/skills/vibe.figma.convert/SKILL.md +511 -553
  361. package/skills/vibe.figma.convert/rubrics/conversion-rules.md +113 -129
  362. package/skills/vibe.figma.convert/templates/component.md +140 -140
  363. package/skills/vibe.figma.extract/SKILL.md +300 -312
  364. package/skills/vibe.figma.extract/rubrics/image-rules.md +137 -145
  365. package/skills/video-production/SKILL.md +52 -52
  366. package/skills/video-production/rubrics/quality-checklist.md +58 -58
  367. package/skills/video-production/templates/production-plan.md +104 -104
  368. package/vibe/config.json +29 -29
  369. package/vibe/constitution.md +227 -227
  370. package/vibe/rules/principles/communication-guide.md +98 -98
  371. package/vibe/rules/principles/development-philosophy.md +52 -52
  372. package/vibe/rules/principles/quick-start.md +102 -102
  373. package/vibe/rules/quality/bdd-contract-testing.md +393 -393
  374. package/vibe/rules/quality/checklist.md +276 -276
  375. package/vibe/rules/quality/performance.md +236 -236
  376. package/vibe/rules/quality/testing-strategy.md +440 -440
  377. package/vibe/rules/standards/anti-patterns.md +541 -541
  378. package/vibe/rules/standards/code-structure.md +291 -291
  379. package/vibe/rules/standards/complexity-metrics.md +313 -313
  380. package/vibe/rules/standards/git-workflow.md +237 -237
  381. package/vibe/rules/standards/naming-conventions.md +198 -198
  382. package/vibe/rules/standards/security.md +305 -305
  383. package/vibe/rules/writing/document-style.md +74 -74
  384. package/vibe/setup.sh +31 -31
  385. package/vibe/templates/constitution-template.md +252 -252
  386. package/vibe/templates/contract-backend-template.md +526 -526
  387. package/vibe/templates/contract-frontend-template.md +599 -599
  388. package/vibe/templates/feature-template.md +96 -96
  389. package/vibe/templates/spec-template.md +221 -221
  390. package/vibe/ui-ux-data/charts.csv +26 -26
  391. package/vibe/ui-ux-data/colors.csv +97 -97
  392. package/vibe/ui-ux-data/icons.csv +101 -101
  393. package/vibe/ui-ux-data/landing.csv +31 -31
  394. package/vibe/ui-ux-data/products.csv +96 -96
  395. package/vibe/ui-ux-data/react-performance.csv +45 -45
  396. package/vibe/ui-ux-data/stacks/astro.csv +54 -54
  397. package/vibe/ui-ux-data/stacks/flutter.csv +53 -53
  398. package/vibe/ui-ux-data/stacks/html-tailwind.csv +56 -56
  399. package/vibe/ui-ux-data/stacks/jetpack-compose.csv +53 -53
  400. package/vibe/ui-ux-data/stacks/nextjs.csv +53 -53
  401. package/vibe/ui-ux-data/stacks/nuxt-ui.csv +51 -51
  402. package/vibe/ui-ux-data/stacks/nuxtjs.csv +59 -59
  403. package/vibe/ui-ux-data/stacks/react-native.csv +52 -52
  404. package/vibe/ui-ux-data/stacks/react.csv +54 -54
  405. package/vibe/ui-ux-data/stacks/shadcn.csv +61 -61
  406. package/vibe/ui-ux-data/stacks/svelte.csv +54 -54
  407. package/vibe/ui-ux-data/stacks/swiftui.csv +51 -51
  408. package/vibe/ui-ux-data/stacks/vue.csv +50 -50
  409. package/vibe/ui-ux-data/styles.csv +68 -68
  410. package/vibe/ui-ux-data/typography.csv +57 -57
  411. package/vibe/ui-ux-data/ui-reasoning.csv +101 -101
  412. package/vibe/ui-ux-data/ux-guidelines.csv +99 -99
  413. package/vibe/ui-ux-data/version.json +31 -31
  414. package/vibe/ui-ux-data/web-interface.csv +31 -31
@@ -1,2276 +1,2276 @@
1
- ---
2
- description: Execute implementation from SPEC
3
- argument-hint: "feature name" or --phase N
4
- ---
5
-
6
- # /vibe.run
7
-
8
- Execute **Scenario-Driven Implementation** with automatic quality verification.
9
-
10
- > **Core Principle**: Scenarios are both the implementation unit and verification criteria. All scenarios passing = Quality guaranteed.
11
-
12
- ## Usage
13
-
14
- ```
15
- /vibe.run "feature-name" # Full implementation
16
- /vibe.run "feature-name" --phase 1 # Specific Phase only
17
- /vibe.run "feature-name" ultrawork # ULTRAWORK mode (recommended)
18
- /vibe.run "feature-name" ulw # Short alias for ultrawork
19
- ```
20
-
21
- ---
22
-
23
- ## Codex Plugin Integration
24
-
25
- > **Codex ν”ŒλŸ¬κ·ΈμΈ 감지**: μ›Œν¬ν”Œλ‘œμš° μ‹œμž‘ μ‹œ μ•„λž˜ λͺ…λ ΉμœΌλ‘œ μžλ™ 감지.
26
- >
27
- > ```bash
28
- > CODEX_AVAILABLE=$(node "{{VIBE_PATH}}/hooks/scripts/codex-detect.js" 2>/dev/null || echo "unavailable")
29
- > ```
30
- >
31
- > `available`이면 `/codex:rescue` (κ΅¬ν˜„ μœ„μž„), `/codex:review` (μ½”λ“œ 리뷰) μžλ™ 호좜. `unavailable`이면 κΈ°μ‘΄ μ›Œν¬ν”Œλ‘œμš°λ‘œ λ™μž‘.
32
-
33
- ---
34
-
35
- > **⏱️ Timer**: Call `getCurrentTime` tool at the START. Record the result as `{start_time}`.
36
-
37
- ## File Reading Policy (Mandatory)
38
-
39
- - **SPEC/Feature 파일**: λ°˜λ“œμ‹œ `Read` λ„κ΅¬λ‘œ 전체 νŒŒμΌμ„ 읽을 것 (Grep κΈˆμ§€)
40
- - **μ†ŒμŠ€μ½”λ“œ 파일**: κ΅¬ν˜„/μˆ˜μ • λŒ€μƒ νŒŒμΌμ€ λ°˜λ“œμ‹œ `Read` λ„κ΅¬λ‘œ 전체 읽은 ν›„ μž‘μ—…ν•  것
41
- - **Grep μ‚¬μš© μ œν•œ**: 파일 μœ„μΉ˜ 탐색(μ–΄λ–€ νŒŒμΌμ— μžˆλŠ”μ§€ μ°ΎκΈ°)μ—λ§Œ μ‚¬μš©. 파일 λ‚΄μš© νŒŒμ•…μ—λŠ” λ°˜λ“œμ‹œ Read μ‚¬μš©
42
- - **μ—μ΄μ „νŠΈ spawn μ‹œ**: ν”„λ‘¬ν”„νŠΈμ— "λŒ€μƒ νŒŒμΌμ„ Read λ„κ΅¬λ‘œ 전체 읽은 ν›„ κ΅¬ν˜„ν•˜λΌ"λ₯Ό λ°˜λ“œμ‹œ 포함할 것
43
- - **λΆ€λΆ„ 읽기 κΈˆμ§€**: Grep 결과의 μ£Όλ³€ λͺ‡ μ€„λ§Œ 보고 μˆ˜μ •ν•˜μ§€ 말 것. 전체 λ§₯락을 νŒŒμ•…ν•΄μ•Ό κΈ°μ‘΄ μ½”λ“œμ™€ μΌκ΄€λœ κ΅¬ν˜„ κ°€λŠ₯
44
-
45
- ## **Scenario-Driven Development (SDD)**
46
-
47
- > Automate **Scenario = Implementation = Verification** so even non-developers can trust quality
48
-
49
- ### Core Flow
50
-
51
- ```
52
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
53
- β”‚ SCENARIO-DRIVEN IMPLEMENTATION β”‚
54
- β”‚ β”‚
55
- β”‚ Load Feature file β”‚
56
- β”‚ ↓ β”‚
57
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
58
- β”‚ β”‚ Scenario 1: Happy Path β”‚ β”‚
59
- β”‚ β”‚ Given β†’ When β†’ Then β”‚ β”‚
60
- β”‚ β”‚ ↓ β”‚ β”‚
61
- β”‚ β”‚ [Implement] β†’ [Verify immediately] β†’ βœ… Pass β”‚ β”‚
62
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
63
- β”‚ ↓ β”‚
64
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
65
- β”‚ β”‚ Scenario 2: Edge Case β”‚ β”‚
66
- β”‚ β”‚ Given β†’ When β†’ Then β”‚ β”‚
67
- β”‚ β”‚ ↓ β”‚ β”‚
68
- β”‚ β”‚ [Implement] β†’ [Verify] β†’ ❌ Fail β†’ [Fix] β†’ βœ… Pass β”‚ β”‚
69
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
70
- β”‚ ↓ β”‚
71
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
72
- β”‚ β”‚ Scenario N: ... β”‚ β”‚
73
- β”‚ β”‚ [Implement] β†’ [Verify immediately] β†’ βœ… Pass β”‚ β”‚
74
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
75
- β”‚ ↓ β”‚
76
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
77
- β”‚ β”‚ πŸ“Š QUALITY REPORT β”‚ β”‚
78
- β”‚ β”‚ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β”‚ β”‚
79
- β”‚ β”‚ Scenarios: 5/5 passed βœ… β”‚ β”‚
80
- β”‚ β”‚ Quality score: 94/100 β”‚ β”‚
81
- β”‚ β”‚ Build: βœ… | Tests: βœ… β”‚ β”‚
82
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
83
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
84
- ```
85
-
86
- ### Scenario = Implementation Unit
87
-
88
- **Traditional approach (Phase-based)**:
89
- ```
90
- Phase 1 β†’ Phase 2 β†’ Phase 3 β†’ ... β†’ Verify at the end
91
- ↓
92
- "Where did it go wrong?"
93
- ```
94
-
95
- **SDD approach (Scenario-based)**:
96
- ```
97
- Scenario 1 β†’ Implement β†’ Verify βœ…
98
- Scenario 2 β†’ Implement β†’ Verify βœ…
99
- Scenario 3 β†’ Implement β†’ Verify ❌ β†’ Fix β†’ βœ…
100
- ...
101
- All pass = Quality guaranteed
102
- ```
103
-
104
- ### Automated Verification (Closed Loop)
105
-
106
- **자율적 AI μ½”λ”© = κ΅¬ν˜„ + 검증 + 반볡. 검증을 AIμ—κ²Œ λ§‘κΈ°λŠ” μˆœκ°„ 루프가 λ‹«νžŒλ‹€.**
107
-
108
- After implementing each scenario, **automatic verification**:
109
-
110
- | Verification Item | Auto Check | Method |
111
- |-------------------|------------|--------|
112
- | Given (precondition) | State/data preparation confirmed | Code analysis |
113
- | When (action) | Feature execution possible | Code analysis + Build |
114
- | Then (result) | Expected result matches | Code analysis + Test |
115
- | Code quality | Complexity, style, security | Static analysis |
116
- | **UI behavior** | **μ‹€μ œ λΈŒλΌμš°μ €μ—μ„œ λ™μž‘ 확인** | **E2E Closed Loop** |
117
-
118
- ### E2E Closed Loop (UI Scenarios)
119
-
120
- **UI μ‹œλ‚˜λ¦¬μ˜€κ°€ ν¬ν•¨λœ Feature일 λ•Œ μžλ™ ν™œμ„±ν™”.**
121
-
122
- ```
123
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
124
- β”‚ CLOSED LOOP = κ΅¬ν˜„ + 검증 + 반볡 β”‚
125
- β”‚ β”‚
126
- β”‚ Scenario κ΅¬ν˜„ μ™„λ£Œ β”‚
127
- β”‚ ↓ β”‚
128
- β”‚ [E2E 검증] AIκ°€ 직접 λΈŒλΌμš°μ € μ‘°μž‘ β”‚
129
- β”‚ β”‚ (μ ‘κ·Όμ„± 트리 기반 β€” 토큰 효율적) β”‚
130
- β”‚ β”œβ”€ PASS β†’ Next scenario β”‚
131
- β”‚ └─ FAIL β†’ Root cause analysis β”‚
132
- β”‚ β†’ Fix code (Read full file first) β”‚
133
- β”‚ β†’ Re-run failed scenario only β”‚
134
- β”‚ β†’ PASS? β†’ Next scenario β”‚
135
- β”‚ β†’ FAIL? β†’ Retry (max 3) β”‚
136
- β”‚ β”‚
137
- β”‚ 핡심: 검증이 κ°€λ²ΌμšΈμˆ˜λ‘ λ£¨ν”„λŠ” 더 많이 λˆλ‹€ β”‚
138
- β”‚ - μ ‘κ·Όμ„± 트리: button "Sign In" = 15 chars β”‚
139
- β”‚ - DOM 트리: div class="nav-wrapper mx-4..." = 200+ chars β”‚
140
- β”‚ - μ „μžλ₯Ό 써야 ν•œ μ„Έμ…˜μ—μ„œ μˆ˜μ‹­ 개 μ‹œλ‚˜λ¦¬μ˜€ 검증 κ°€λŠ₯ β”‚
141
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
142
- ```
143
-
144
- **Browser Tool Priority:**
145
-
146
- | Priority | Tool | μš©λ„ |
147
- |----------|------|------|
148
- | 1st | Agent Browser (μ ‘κ·Όμ„± 트리) | AI 직접 μ‘°μž‘, μ΅œμ†Œ 토큰 |
149
- | 2nd | Playwright Test Runner | ν…ŒμŠ€νŠΈ μ½”λ“œ μ‹€ν–‰, pass/fail λ°˜ν™˜ |
150
- | 3rd | Playwright MCP (DOM) | μ΅œν›„ μˆ˜λ‹¨, 토큰 λΉ„νš¨μœ¨ |
151
-
152
- **ν™œμ„±ν™” 쑰건:**
153
- - Feature νŒŒμΌμ— UI κ΄€λ ¨ μ‹œλ‚˜λ¦¬μ˜€ 쑴재 (form, button, page, navigate λ“±)
154
- - `.claude/vibe/e2e/config.json`의 `closedLoop.enabled: true` (κΈ°λ³Έκ°’)
155
- - dev serverκ°€ μ‹€ν–‰ 쀑 (`baseURL` μ ‘κ·Ό κ°€λŠ₯)
156
-
157
- ### Auto-Fix on Failure
158
-
159
- ```
160
- Scenario verification failed (μ½”λ“œ 뢄석 λ˜λŠ” E2E)
161
- ↓
162
- [Collect evidence]
163
- - E2E: screenshot, console errors, accessibility tree snapshot
164
- - Code: build errors, test failures, type errors
165
- ↓
166
- [Root cause analysis] - Which Then condition failed?
167
- ↓
168
- [Read target file FULLY] - Grep으둜 ν›‘μ§€ 말 것
169
- ↓
170
- [Implement fix] - Fix only that part
171
- ↓
172
- [Re-verify] - Re-run ONLY failed scenario (save tokens)
173
- ↓
174
- Repeat until pass (max 3 times)
175
- ```
176
-
177
- ---
178
-
179
- ## **ULTRAWORK Mode** (ulw)
180
-
181
- > Include `ultrawork` or `ulw` in your command to activate **maximum performance mode**.
182
-
183
- ### What ULTRAWORK Enables
184
-
185
- When you include `ultrawork` (or `ulw`), ALL of these activate automatically:
186
-
187
- | Feature | Description |
188
- |---------|-------------|
189
- | **Parallel Exploration** | 3+ Task(haiku) agents run simultaneously |
190
- | **Boulder Loop** | Auto-continues until ALL phases complete |
191
- | **Context Compression** | Aggressive auto-save at 70%+ context |
192
- | **No Pause** | Doesn't wait for confirmation between phases |
193
- | **External LLMs** | Auto-consults GPT/Gemini if enabled |
194
- | **Error Recovery** | Auto-retries on failure (up to 3 times) |
195
- | **Race Review (v2.6.9)** | Multi-LLM review (GPT+Gemini) with cross-validation |
196
-
197
- ### Boulder Loop (Inspired by Sisyphus)
198
-
199
- Like Sisyphus rolling the boulder, ULTRAWORK **keeps going until done**:
200
-
201
- ```
202
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
203
- β”‚ BOULDER LOOP (ultrawork) β”‚
204
- β”‚ β”‚
205
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
206
- β”‚ β”‚ Phase 1 │───→│ Phase 2 │───→│ Phase 3 │───→│ Phase N β”‚ β”‚
207
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
208
- β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
209
- β”‚ ↓ ↓ ↓ ↓ β”‚
210
- β”‚ [Parallel] [Parallel] [Parallel] [Parallel] β”‚
211
- β”‚ [Implement] [Implement] [Implement] [Implement] β”‚
212
- β”‚ [Test] [Test] [Test] [Test] β”‚
213
- β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
214
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
215
- β”‚ β”‚ β”‚
216
- β”‚ ↓ β”‚
217
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
218
- β”‚ β”‚ ALL DONE? β”‚ β”‚
219
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
220
- β”‚ β”‚ β”‚ β”‚
221
- β”‚ NO YES β”‚
222
- β”‚ β”‚ β”‚ β”‚
223
- β”‚ ↓ ↓ β”‚
224
- β”‚ [Continue] [πŸŽ‰ Complete!] β”‚
225
- β”‚ β”‚
226
- β”‚ NO STOPPING until acceptance criteria met or error limit hit β”‚
227
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
228
- ```
229
-
230
- ### Ralph Loop (Completion Verification) - CRITICAL
231
-
232
- > **Inspired by [ghuntley.com/ralph](https://ghuntley.com/ralph)**: "Deterministically bad in an undeterministic world" - Keep iterating until TRULY complete.
233
-
234
- **Problem**: AI often claims "complete" when implementation is partial.
235
-
236
- **Solution**: RTM-based automated coverage verification with iteration tracking.
237
-
238
- ```
239
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
240
- β”‚ RALPH LOOP (Mandatory) β”‚
241
- β”‚ β”‚
242
- β”‚ After ALL phases complete: β”‚
243
- β”‚ β”‚
244
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
245
- β”‚ β”‚ RTM COVERAGE VERIFICATION [Iteration {{ITER}}/{{MAX}}] β”‚ β”‚
246
- β”‚ β”‚ β”‚ β”‚
247
- β”‚ β”‚ Generate RTM via core tools: β”‚ β”‚
248
- β”‚ β”‚ β†’ generateTraceabilityMatrix("{feature-name}") β”‚ β”‚
249
- β”‚ β”‚ β”‚ β”‚
250
- β”‚ β”‚ Coverage Metrics (automated): β”‚ β”‚
251
- β”‚ β”‚ β–‘ Requirements coverage: {coveragePercent}% β”‚ β”‚
252
- β”‚ β”‚ β–‘ SPEC β†’ Feature mapping: {featureCovered}/{total} β”‚ β”‚
253
- β”‚ β”‚ β–‘ Feature β†’ Test mapping: {testCovered}/{total} β”‚ β”‚
254
- β”‚ β”‚ β–‘ Build successful? β”‚ β”‚
255
- β”‚ β”‚ β–‘ Tests passing? β”‚ β”‚
256
- β”‚ β”‚ β”‚ β”‚
257
- β”‚ β”‚ UNCOVERED: {uncoveredRequirements[]} β”‚ β”‚
258
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
259
- β”‚ β”‚ β”‚
260
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
261
- β”‚ β”‚ Coverage β‰₯ 95%? β”‚ β”‚
262
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
263
- β”‚ β”‚ β”‚ β”‚
264
- β”‚ NO YES β”‚
265
- β”‚ β”‚ β”‚ β”‚
266
- β”‚ ↓ ↓ β”‚
267
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
268
- β”‚ β”‚ IMPLEMENT β”‚ β”‚ βœ… TRULY DONE β”‚ β”‚
269
- β”‚ β”‚ UNCOVERED β”‚ β”‚ β”‚ β”‚
270
- β”‚ β”‚ REQUIREMENTS β”‚ β”‚ Report final β”‚ β”‚
271
- β”‚ β”‚ (auto-extract) β”‚ β”‚ RTM coverage β”‚ β”‚
272
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
273
- β”‚ β”‚ β”‚
274
- β”‚ └──────────→ [Re-generate RTM] β”‚
275
- β”‚ β”‚
276
- β”‚ MAX_ITERATIONS: 5 (prevent infinite loops) β”‚
277
- β”‚ COVERAGE_THRESHOLD: 95% (quality gate) β”‚
278
- β”‚ ZERO TOLERANCE for scope reduction β”‚
279
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
280
- ```
281
-
282
- **Ralph Loop with RTM:**
283
-
284
- ```bash
285
- # Generate RTM for coverage verification
286
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.generateTraceabilityMatrix('{feature-name}', {projectPath: process.cwd()}).then(r => console.log(JSON.stringify(r, null, 2))))"
287
- ```
288
-
289
- **RTM provides automated metrics:**
290
-
291
- | Metric | Description |
292
- |--------|-------------|
293
- | `totalRequirements` | Total REQ-* items in SPEC |
294
- | `specCovered` | Requirements with SPEC mapping |
295
- | `featureCovered` | Requirements with Feature scenarios |
296
- | `testCovered` | Requirements with test files |
297
- | `coveragePercent` | Overall coverage percentage |
298
- | `uncoveredRequirements` | List of missing REQ-* IDs |
299
-
300
- **Ralph Loop Rules:**
301
-
302
- | Rule | Description |
303
- |------|-------------|
304
- | **No Scope Reduction** | Never say "simplified" or "basic version" - implement FULL request |
305
- | **Iteration Tracking** | Display `[{{ITER}}/{{MAX}}]` to show progress |
306
- | **RTM-Based Gap List** | Use `uncoveredRequirements` array - no manual comparison |
307
- | **Coverage Threshold** | Must reach 95% coverage to complete |
308
- | **Max Iterations** | Stop at 5 iterations (report remaining gaps as TODO) |
309
- | **Convergence Detection** | If coverage % unchanged between iterations β†’ STOP (converged) |
310
- | **Diminishing Returns** | Iteration 3+ β†’ only implement unmet core requirements (REQ-*-001~003), rest goes to TODO |
311
-
312
- **Ralph Loop Output Format:**
313
-
314
- ```
315
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
316
- πŸ”„ RALPH VERIFICATION [Iteration 1/5]
317
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
318
-
319
- πŸ“Š RTM Coverage Report: login
320
-
321
- Requirements Traceability:
322
- Total Requirements: 9
323
- SPEC Covered: 9/9 (100%)
324
- Feature Covered: 5/9 (55%)
325
- Test Covered: 4/9 (44%)
326
-
327
- βœ… REQ-login-001: Login form UI β†’ Scenario 1 β†’ login.test.ts
328
- βœ… REQ-login-002: Email validation β†’ Scenario 2 β†’ validation.test.ts
329
- βœ… REQ-login-003: Password validation β†’ Scenario 2 β†’ validation.test.ts
330
- ❌ REQ-login-004: Remember me checkbox β†’ NOT IMPLEMENTED
331
- ❌ REQ-login-005: Forgot password link β†’ NOT IMPLEMENTED
332
- βœ… REQ-login-006: API integration β†’ Scenario 3 β†’ api.test.ts
333
- ❌ REQ-login-007: Loading state β†’ NOT IMPLEMENTED
334
- ❌ REQ-login-008: Error toast β†’ NOT IMPLEMENTED
335
- βœ… REQ-login-009: Session storage β†’ Scenario 4 β†’ (no test)
336
-
337
- Overall Coverage: 55% ⚠️ BELOW 95% THRESHOLD
338
-
339
- UNCOVERED REQUIREMENTS (auto-extracted from RTM):
340
- 1. REQ-login-004: Remember me checkbox
341
- 2. REQ-login-005: Forgot password link
342
- 3. REQ-login-007: Loading state
343
- 4. REQ-login-008: Error toast notifications
344
-
345
- ⚠️ NOT COMPLETE - Implementing uncovered requirements...
346
-
347
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
348
- πŸ”„ RALPH VERIFICATION [Iteration 2/5]
349
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
350
-
351
- πŸ“Š RTM Coverage Report: login
352
-
353
- Requirements Traceability:
354
- Total Requirements: 9
355
- SPEC Covered: 9/9 (100%)
356
- Feature Covered: 9/9 (100%)
357
- Test Covered: 9/9 (100%)
358
-
359
- Overall Coverage: 100% βœ… ABOVE 95% THRESHOLD
360
-
361
- Build: βœ… Passed
362
- Tests: βœ… 12/12 Passed
363
- Type Check: βœ… No errors
364
-
365
- βœ… RALPH VERIFIED COMPLETE!
366
-
367
- πŸ“„ RTM saved: .claude/vibe/rtm/login-rtm.md
368
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
369
- ```
370
-
371
- **When to Trigger Ralph Loop:**
372
-
373
- 1. After all phases complete
374
- 2. Before final quality report
375
- 3. Whenever user says "ultrawork" or "ralph"
376
-
377
- **Forbidden Responses (VIOLATIONS):**
378
-
379
- | ❌ NEVER Say | βœ… Instead |
380
- |-------------|-----------|
381
- | "I've implemented a basic version" | Implement the FULL version |
382
- | "This is a simplified approach" | Implement as specified |
383
- | "You can add X later" | Add X now |
384
- | "For demonstration purposes" | Implement production-ready |
385
- | "The core functionality is done" | ALL functionality must be done |
386
-
387
- ### ULTRAWORK Example
388
-
389
- ```
390
- User: /vibe.run "brick-game" ultrawork
391
-
392
- Claude:
393
- πŸš€ ULTRAWORK MODE ACTIVATED
394
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
395
-
396
- πŸ“„ SPEC: .claude/vibe/specs/brick-game.md
397
- 🎯 4 Phases detected
398
- ⚑ Boulder Loop: ENABLED (will continue until all phases complete)
399
- πŸ”„ Auto-retry: ON (max 3 per phase)
400
- πŸ’Ύ Context compression: AGGRESSIVE
401
-
402
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
403
- πŸ”οΈ BOULDER ROLLING... Phase 1/4
404
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
405
-
406
- ⚑ [PARALLEL] Launching 3 exploration agents...
407
- βœ… Exploration complete (7.2s)
408
- πŸ”¨ Implementing...
409
- βœ… Phase 1 complete
410
-
411
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
412
- πŸ”οΈ BOULDER ROLLING... Phase 2/4
413
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
414
-
415
- ⚑ [PARALLEL] Launching 3 exploration agents...
416
- βœ… Exploration complete (6.8s)
417
- πŸ”¨ Implementing...
418
- ❌ Test failed: collision detection
419
- πŸ”„ Auto-retry 1/3...
420
- πŸ”¨ Fixing...
421
- βœ… Phase 2 complete
422
-
423
- [...continues automatically...]
424
-
425
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
426
- πŸŽ‰ BOULDER REACHED THE TOP!
427
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
428
-
429
- βœ… All 4 phases complete
430
- βœ… All acceptance criteria passed
431
- βœ… Build succeeded
432
- βœ… Tests passed
433
-
434
- ⏱️ Total: 8m 24s
435
- πŸ“Š Retries: 2
436
- πŸ’Ύ Context saved: 3 checkpoints
437
- ```
438
-
439
- ### Normal vs ULTRAWORK Comparison
440
-
441
- | Aspect | Normal | ULTRAWORK |
442
- |--------|--------|-----------|
443
- | Phase transition | May pause | Auto-continues |
444
- | On error | Reports and stops | Auto-retries (3x) |
445
- | Context 70%+ | Warning only | Auto-compress + save |
446
- | Exploration | Sequential possible | FORCED parallel |
447
- | Completion | Phase-by-phase | Until ALL done |
448
-
449
- ---
450
-
451
- ## Automation Level System
452
-
453
- Magic keywords in the user input automatically set the **AutomationLevel**, which controls how much the AI self-advances vs. pausing for confirmation.
454
-
455
- ### Level Definitions
456
-
457
- | Level | Name | Keyword(s) | Auto-advance | Auto-retry | Max Retries | Parallel Agents | Checkpoints |
458
- |-------|------|------------|--------------|------------|-------------|-----------------|-------------|
459
- | L0 | Manual | `manual` | No | No | 0 | No | All |
460
- | L1 | Guided | `guided`, `verify` | No | No | 0 | No | All |
461
- | L2 | Semi-auto | `quick` (default) | Yes | Yes | 2 | No | Key points |
462
- | L3 | Auto | `ultrawork`, `ulw` | Yes | Yes | 3 | Yes | Checkpoint-only |
463
- | L4 | Full-auto | `ralph`, `ralplan` | Yes | Yes | 5 | Yes | None |
464
-
465
- ### Detection Rule
466
-
467
- The AI detects automation level from word boundaries in the user's input:
468
-
469
- ```
470
- /vibe.run "login" β†’ L2 Semi-auto (default)
471
- /vibe.run "login" ultrawork β†’ L3 Auto
472
- /vibe.run "login" ralph β†’ L4 Full-auto
473
- /vibe.run "login" verify β†’ L1 Guided
474
- ```
475
-
476
- ### Confirmation Matrix
477
-
478
- Certain action types require user confirmation depending on the active level:
479
-
480
- | Action | L0 | L1 | L2 | L3 | L4 |
481
- |--------|----|----|----|----|-----|
482
- | `destructive` | confirm | confirm | confirm | confirm | auto |
483
- | `architecture_choice` | confirm | confirm | confirm | auto | auto |
484
- | `implementation_scope` | confirm | confirm | confirm | auto | auto |
485
- | `phase_advance` | confirm | confirm | auto | auto | auto |
486
- | `fix_strategy` | confirm | confirm | auto | auto | auto |
487
- | `retry` | confirm | auto | auto | auto | auto |
488
-
489
- **Rule**: When confirmation is required, pause and display a checkpoint before proceeding.
490
-
491
- ---
492
-
493
- ## Interactive Checkpoints
494
-
495
- Checkpoints are decision gates inserted at critical points in the workflow. At L3/L4, most checkpoints are **auto-resolved** using the default option.
496
-
497
- ### Checkpoint Types
498
-
499
- | Type | When It Fires | Default Option |
500
- |------|--------------|----------------|
501
- | `requirements_confirm` | Before starting Phase 1 | Confirm (a) |
502
- | `architecture_choice` | When architecture approach is ambiguous | Clean/balanced (b) |
503
- | `implementation_scope` | Before any large scope change (6+ files) | Approve (a) |
504
- | `verification_result` | After each VerificationLoop iteration below threshold | Continue fixing (a) |
505
- | `fix_strategy` | When critical issues are found during quality gate | Fix all (a) |
506
-
507
- ### Checkpoint Format
508
-
509
- When a checkpoint fires, display it in this format:
510
-
511
- ```
512
- ──────────────────────────────────────────────────
513
- CHECKPOINT: Requirements Confirmation
514
- ──────────────────────────────────────────────────
515
- Feature: login
516
-
517
- Requirements:
518
- 1. User can log in with email and password
519
- 2. Invalid credentials show an error message
520
- 3. Remember me persists session for 30 days
521
-
522
- Options:
523
- a) Confirm
524
- Proceed with these requirements as stated.
525
- b) Revise
526
- Modify or clarify requirements before proceeding.
527
- c) Abort
528
- Cancel this workflow.
529
-
530
- Default: a
531
- ──────────────────────────────────────────────────
532
- ```
533
-
534
- ### Auto-Resolution (L3/L4)
535
-
536
- At automation levels L3 and L4, checkpoints that do not require confirmation are auto-resolved:
537
-
538
- ```
539
- [AUTO] CHECKPOINT: implementation_scope β†’ option a (Approve) [auto-resolved]
540
- ```
541
-
542
- ---
543
-
544
- ## Rules Reference
545
-
546
- **Must follow `~/.claude/vibe/rules/` (global):**
547
-
548
- - `core/development-philosophy.md` - Surgical precision, modify only requested scope
549
- - `core/quick-start.md` - Korean, DRY, SRP, YAGNI
550
- - `standards/complexity-metrics.md` - Functions ≀20 lines, nesting ≀3 levels
551
- - `quality/checklist.md` - Code quality checklist
552
-
553
- **Language guide:** `~/.claude/vibe/languages/{stack}.md` (global reference)
554
-
555
- ---
556
-
557
- ## Coding Guidelines (Mandatory)
558
-
559
- ### Type Safety: Use Types Explicitly
560
-
561
- > **Core Principle**: Use types explicitly in every language that has a type system!
562
-
563
- Type definitions are not just language syntax β€” they are a **core engineering philosophy for simplifying and controlling complex software**.
564
-
565
- ### Applies to ALL Typed Languages
566
-
567
- | Category | Languages | Key Principle |
568
- |----------|-----------|---------------|
569
- | **Static Typed** | Java, C#, C++, Go, Rust, Swift, Kotlin, Scala | Types = compile-time contracts |
570
- | **Gradual Typed** | TypeScript, Python (typing), PHP (typed), Ruby (RBS) | Types = optional safety nets |
571
- | **Functional** | Haskell, OCaml, F#, Elm | Types = logical proofs |
572
-
573
- ### Universal Anti-Patterns (All Languages)
574
-
575
- | ❌ Forbidden Pattern | Why | βœ… Instead |
576
- |---------------------|-----|-----------|
577
- | Type escape hatches (`any`, `Any`, `Object`, `void*`, `interface{}`) | Loses type info, runtime errors | Concrete types or `unknown` + guards |
578
- | Type suppression (`@ts-ignore`, `# type: ignore`, `@SuppressWarnings`) | Hides errors | Fix actual type issues |
579
- | Raw generic types (`List`, `Map` without params) | Loses type safety | `List<User>`, `Map<String, Order>` |
580
- | Excessive casting (`as`, `(Type)`, `unsafe`) | Bypasses compiler | Type guards or pattern matching |
581
-
582
- ### Language-Specific Guidelines
583
-
584
- **TypeScript/JavaScript:**
585
- ```typescript
586
- // ❌ BAD
587
- function process(data: any): any { return data.foo; }
588
-
589
- // βœ… GOOD
590
- function process(data: unknown): Result {
591
- if (isValidData(data)) return data.foo;
592
- throw new Error('Invalid');
593
- }
594
- ```
595
-
596
- **Python:**
597
- ```python
598
- # ❌ BAD
599
- def process(data: Any) -> Any: return data["key"]
600
-
601
- # βœ… GOOD
602
- def process(data: UserData) -> str: return data["name"]
603
- ```
604
-
605
- **Java/Kotlin:**
606
- ```java
607
- // ❌ BAD
608
- List items = new ArrayList(); // Raw type
609
- Object data = getData(); // Lost type info
610
-
611
- // βœ… GOOD
612
- List<User> users = new ArrayList<>();
613
- User user = getUser();
614
- ```
615
-
616
- **Go:**
617
- ```go
618
- // ❌ BAD
619
- func process(data interface{}) interface{} { ... }
620
-
621
- // βœ… GOOD
622
- func process(data UserRequest) (UserResponse, error) { ... }
623
- ```
624
-
625
- **Rust:**
626
- ```rust
627
- // ❌ BAD (unnecessary unsafe or Box<dyn Any>)
628
- let data: Box<dyn Any> = get_data();
629
-
630
- // βœ… GOOD
631
- let data: UserData = get_data()?;
632
- ```
633
-
634
- **C#:**
635
- ```csharp
636
- // ❌ BAD
637
- object data = GetData();
638
- dynamic result = Process(data);
639
-
640
- // βœ… GOOD
641
- UserData data = GetData();
642
- Result result = Process(data);
643
- ```
644
-
645
- ### Type Safety Rules (Universal)
646
-
647
- | Rule | Description |
648
- |------|-------------|
649
- | **Boundary Validation** | Validate only at system boundaries (API, JSON, user input) |
650
- | **Internal Trust** | After validation, pass only precise types internally |
651
- | **No Type Escape** | Never use escape hatches to "fix" type errors |
652
- | **Explicit Signatures** | Specify types in function/method signatures |
653
- | **Generics with Params** | Always use generics with type parameters |
654
-
655
- ### Quality Gate: Type Violations Block Merge
656
-
657
- | Violation | Action |
658
- |-----------|--------|
659
- | Type escape hatches (`any`, `Any`, `Object`, `interface{}`, etc.) | ❌ Block |
660
- | Type suppression comments | ❌ Block |
661
- | Raw generic types | ❌ Block |
662
- | Missing function return types | ⚠️ Warning |
663
- | Excessive type casting | ⚠️ Warning |
664
-
665
- ## Description
666
-
667
- Read PTCF structured SPEC document and execute implementation immediately.
668
-
669
- > **PLAN, TASKS documents unnecessary** - SPEC is the executable prompt
670
-
671
- ## Model Orchestration (Intelligent Routing)
672
-
673
- Automatically select optimal model based on **task complexity analysis**.
674
-
675
- ### Complexity-Based Model Selection
676
-
677
- | Complexity Score | Model | When to Use |
678
- |------------------|-------|-------------|
679
- | 0-7 (Low) | **Haiku** | Simple fixes, searches, single file changes |
680
- | 8-19 (Medium) | **Sonnet** | Standard features, 3-5 files, integrations |
681
- | 20+ (High) | **Opus** | Architecture, security, multi-service, 6+ files |
682
-
683
- ### Complexity Signals
684
-
685
- The following signals increase complexity score:
686
-
687
- | Signal | Score |
688
- |--------|-------|
689
- | Architecture change | +15 |
690
- | Security implication | +12 |
691
- | Multi-service | +8 |
692
- | Refactoring | +12 |
693
- | 6+ files | +15 |
694
- | 3-5 files | +8 |
695
- | New feature | +5 |
696
- | Bug fix | -3 |
697
- | Documentation | -5 |
698
-
699
- ### Agent Tier System
700
-
701
- Each agent has tier variants for cost optimization:
702
-
703
- | Agent | Low (Haiku) | Medium (Sonnet) | High (Opus) |
704
- |-------|-------------|-----------------|-------------|
705
- | explorer | explorer-low | explorer-medium | explorer |
706
- | implementer | implementer-low | implementer-medium | implementer |
707
- | architect | architect-low | architect-medium | architect |
708
-
709
- ### Task Calls by Role
710
-
711
- | Task Type | Model | Task Parameter |
712
- |-----------|-------|----------------|
713
- | Simple search | Haiku | `model: "haiku"` |
714
- | Codebase exploration | Haiku/Sonnet | Auto-selected |
715
- | Core implementation | Sonnet | `model: "sonnet"` |
716
- | Test writing | Haiku | `model: "haiku"` |
717
- | Architecture decisions | Opus | Main session |
718
- | Final review | Opus | Main session |
719
-
720
- ### External LLM Usage (When Enabled)
721
-
722
- When external LLMs are enabled in `.claude/vibe/config.json`:
723
-
724
- | Role | Method | Condition |
725
- |------|--------|-----------|
726
- | User direct query | `gpt.question`, `gemini.question` | Hook auto-handles |
727
- | Internal orchestration | Call global script via Bash | Claude calls directly |
728
-
729
- **User questions (Hook auto-handles):**
730
- - `gpt.question` - GPT architecture consultation
731
- - `gemini.question` - Gemini Q&A/consultation
732
-
733
- **Claude internal calls (directly via Bash):**
734
- ```bash
735
- # Usage: node llm-orchestrate.js <provider> <mode> [systemPrompt] [prompt]
736
- # - If systemPrompt omitted, uses default
737
- # - If systemPrompt is "-", uses default and treats next argument as prompt
738
-
739
- # [LLM_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js
740
-
741
- # GPT call (short prompt - CLI arg)
742
- node "[LLM_SCRIPT]" gpt orchestrate-json "[question content]"
743
-
744
- # Gemini call
745
- node "[LLM_SCRIPT]" gemini orchestrate-json "[question content]"
746
-
747
- # Custom system prompt usage
748
- node "[LLM_SCRIPT]" gpt orchestrate-json "You are a code reviewer" "[question content]"
749
-
750
- # Long prompt - use --input file (write JSON file first with Write tool)
751
- # JSON format: {"prompt": "your prompt here"}
752
- node "[LLM_SCRIPT]" gpt orchestrate-json --input "[SCRATCHPAD]/input.json"
753
- ```
754
-
755
- ### External LLM Fallback
756
-
757
- **IMPORTANT**: When GPT/Gemini hook fails, Claude MUST handle the task directly:
758
-
759
- **Fallback behavior**:
760
- - Do NOT retry the external LLM call
761
- - Claude handles the task using its own capabilities
762
- - Continue with the implementation without interruption
763
- - Log the fallback but don't block progress
764
-
765
- ## Core Tools (Semantic Analysis & Memory)
766
-
767
- Use core tools for accurate codebase understanding and session continuity.
768
-
769
- ### Tool Invocation
770
-
771
- All tools are called via:
772
- ```bash
773
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
774
- ```
775
-
776
- ### Semantic Analysis Tools
777
-
778
- | Tool | Purpose | Usage |
779
- |------|---------|-------|
780
- | `findSymbol` | Find symbol definitions | `{symbolName: 'functionName', searchPath: '.'}` |
781
- | `findReferences` | Find all references | `{symbolName: 'functionName', searchPath: '.'}` |
782
- | `analyzeComplexity` | Analyze code complexity | `{filePath: 'src/file.ts'}` |
783
- | `validateCodeQuality` | Validate code quality | `{filePath: 'src/file.ts'}` |
784
-
785
- **Example - Find symbol:**
786
- ```bash
787
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.findSymbol({symbolName: 'login', searchPath: '.'}).then(r => console.log(r.content[0].text)))"
788
- ```
789
-
790
- ### Memory Tools
791
-
792
- | Tool | Purpose | Usage |
793
- |------|---------|-------|
794
- | `saveMemory` | Save important decisions | `{key: 'decision-name', value: 'content', category: 'project'}` |
795
- | `recallMemory` | Recall saved memory | `{key: 'decision-name'}` |
796
- | `listMemories` | List all memories | `{category: 'project'}` |
797
-
798
- **Example - Save important decision:**
799
- ```bash
800
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.saveMemory({key: 'auth-pattern', value: 'Using JWT with refresh tokens', category: 'project'}).then(r => console.log(r.content[0].text)))"
801
- ```
802
-
803
- ### Session Management (Auto via Hooks)
804
-
805
- - **Session start**: Hook auto-calls `startSession` to restore previous context
806
- - **Context 80%+**: Hook auto-calls `autoSaveContext` to preserve state
807
-
808
- ## Process
809
-
810
- ### 1. Load SPEC + Feature
811
-
812
- **Search order (check BOTH file AND folder):**
813
-
814
- ```
815
- Step 1: Check if SPLIT structure exists (folder)
816
- πŸ“ .claude/vibe/specs/{feature-name}/ β†’ Folder with _index.md + phase files
817
- πŸ“ .claude/vibe/features/{feature-name}/ β†’ Folder with _index.feature + phase files
818
-
819
- Step 2: If no folder, check single file
820
- πŸ“„ .claude/vibe/specs/{feature-name}.md β†’ Single SPEC file
821
- πŸ“„ .claude/vibe/features/{feature-name}.feature β†’ Single Feature file
822
-
823
- Step 3: If neither exists β†’ Error
824
- ```
825
-
826
- **Split structure (folder) detected:**
827
- ```
828
- πŸ“ .claude/vibe/specs/{feature-name}/
829
- β”œβ”€β”€ _index.md β†’ Master SPEC (read first for overview)
830
- β”œβ”€β”€ phase-1-{name}.md β†’ Phase 1 SPEC
831
- β”œβ”€β”€ phase-2-{name}.md β†’ Phase 2 SPEC
832
- └── ...
833
-
834
- πŸ“ .claude/vibe/features/{feature-name}/
835
- β”œβ”€β”€ _index.feature β†’ Master Feature (read first for scenario overview)
836
- β”œβ”€β”€ phase-1-{name}.feature β†’ Phase 1 scenarios
837
- β”œβ”€β”€ phase-2-{name}.feature β†’ Phase 2 scenarios
838
- └── ...
839
-
840
- β†’ Load _index.md first, then load phase files in order
841
- β†’ Execute phases sequentially (or per --phase flag)
842
- ```
843
-
844
- **Single file detected:**
845
- ```
846
- πŸ“„ .claude/vibe/specs/{feature-name}.md β†’ SPEC (structure, constraints, context)
847
- πŸ“„ .claude/vibe/features/{feature-name}.feature β†’ Feature (scenario = implementation unit)
848
- ```
849
-
850
- **Error if NEITHER file NOR folder found:**
851
- ```
852
- ❌ SPEC not found. Searched:
853
- - .claude/vibe/specs/{feature-name}/ (folder)
854
- - .claude/vibe/specs/{feature-name}.md (file)
855
-
856
- Run /vibe.spec "{feature-name}" first.
857
- ```
858
-
859
- ### 1-1. Phase Isolation Protocol (Large SPEC Guard)
860
-
861
- > **Problem**: Large SPECs (3+ phases, 5+ scenarios) overflow context β€” agent drifts from SPEC by Phase 3.
862
- > **Solution**: Load only the current phase's SPEC section. Re-anchor before each scenario.
863
-
864
- **Phase Isolation Rules (MANDATORY for 3+ phases):**
865
-
866
- ```
867
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
868
- β”‚ PHASE ISOLATION PROTOCOL β”‚
869
- β”‚ β”‚
870
- β”‚ ❌ WRONG: Load entire SPEC β†’ implement all phases β”‚
871
- β”‚ βœ… RIGHT: Load _index overview β†’ per-phase load β†’ implement β”‚
872
- β”‚ β”‚
873
- β”‚ Step A: Read _index.md (overview only β€” phase list, REQ IDs) β”‚
874
- β”‚ Step B: For each Phase N: β”‚
875
- β”‚ 1. RE-READ Phase N SPEC section (every time, no memory) β”‚
876
- β”‚ 2. RE-READ Phase N Feature scenarios β”‚
877
- β”‚ 3. Extract Phase N scope: files, scenarios, requirements β”‚
878
- β”‚ 4. Implement Phase N scenarios β”‚
879
- β”‚ 5. Verify Phase N β”‚
880
- β”‚ 6. Write Phase Checkpoint β†’ .claude/vibe/checkpoints/ β”‚
881
- β”‚ 7. DISCARD Phase N details from working memory β”‚
882
- β”‚ Step C: Next Phase β€” go to Step B β”‚
883
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
884
- ```
885
-
886
- **Phase Checkpoint Format** (`.claude/vibe/checkpoints/{feature}-phase-{N}.md`):
887
-
888
- ```markdown
889
- # Checkpoint: {feature} Phase {N}
890
-
891
- ## Completed
892
- - Scenario 1: {name} βœ…
893
- - Scenario 2: {name} βœ…
894
-
895
- ## Files Changed
896
- - src/auth.service.ts (added login(), validateToken())
897
- - src/auth.controller.ts (POST /login, POST /refresh)
898
-
899
- ## State for Next Phase
900
- - Auth service exports: login(), logout(), validateToken(), refreshToken()
901
- - JWT secret configured in .env (JWT_SECRET)
902
- - Test baseline: 12 tests passing
903
-
904
- ## Remaining Phases
905
- - Phase {N+1}: {name} β€” {scenario count} scenarios
906
- - Phase {N+2}: {name} β€” {scenario count} scenarios
907
- ```
908
-
909
- **SPEC Re-anchoring (Before EVERY scenario):**
910
-
911
- ```
912
- Before implementing Scenario X:
913
- 1. Re-read the EXACT Given/When/Then from Feature file (not from memory!)
914
- 2. Compare: "Am I about to implement what the SPEC says, or what I think it says?"
915
- 3. If single-file SPEC: re-read only the current phase section (use line offsets)
916
- 4. If split SPEC: re-read only phase-N-{name}.md
917
- ```
918
-
919
- **Scope Lock (Per Phase):**
920
-
921
- ```
922
- At Phase start, declare:
923
- MODIFY: [list of files this phase will touch]
924
- CREATE: [list of files this phase will create]
925
- DO NOT TOUCH: everything else
926
-
927
- If implementation requires files outside scope:
928
- β†’ STOP. Re-read SPEC. Is this actually needed?
929
- β†’ If yes: add to scope with explicit justification
930
- β†’ If no: you're drifting. Return to SPEC.
931
- ```
932
-
933
- **Context Pressure Handling:**
934
-
935
- | Context Level | Action |
936
- |---------------|--------|
937
- | < 50% | Normal execution |
938
- | 50-70% | Save checkpoint, trim exploration results |
939
- | 70%+ | Save checkpoint β†’ `/new` β†’ resume from checkpoint |
940
- | Phase boundary | Always save checkpoint regardless of context level |
941
-
942
- ### 1-2. SPEC-First Gate (Level 3: Spec = Source of Truth)
943
-
944
- > **Principle**: SPEC is the source of truth for code. To modify code, update the SPEC first.
945
-
946
- **When a change not in the SPEC is needed during implementation:**
947
-
948
- ```
949
- Discovery during implementation: "An API endpoint not in SPEC is needed"
950
- β”‚
951
- β”œβ”€ Already in SPEC?
952
- β”‚ YES β†’ Implement as-is
953
- β”‚
954
- β”œβ”€ Not in SPEC but within SPEC scope?
955
- β”‚ YES β†’ Add to SPEC first (Edit tool β†’ SPEC file)
956
- β”‚ β†’ Add corresponding scenario to Feature file
957
- β”‚ β†’ Then implement
958
- β”‚
959
- └─ Outside SPEC scope?
960
- YES β†’ Record as TODO and exclude from current scope
961
- .claude/vibe/todos/out-of-scope-{item}.md
962
- ```
963
-
964
- **Required when changing SPEC:**
965
-
966
- 1. Update REQ-* IDs in SPEC file (add new requirements)
967
- 2. Add corresponding scenarios to Feature file
968
- 3. New REQ-* must be traceable in RTM after implementation
969
-
970
- **Reverse direction also applies β€” when requirements change from code:**
971
-
972
- ```
973
- Test failure β†’ "Is this behavior correct?"
974
- β”‚
975
- β”œβ”€ Check SPEC β†’ If SPEC is correct, fix the code
976
- β”‚
977
- └─ If SPEC is wrong β†’ Fix SPEC first β†’ Then fix code
978
- (Changing code without updating SPEC causes SPEC ↔ code drift)
979
- ```
980
-
981
- **Extended Git commit rules:**
982
-
983
- - SPEC changes and code changes must be in the same commit
984
- - Committing feature code without SPEC changes β†’ warning (except intentional refactoring)
985
-
986
- ### 2. Extract Scenario List
987
-
988
- Extract all Scenarios from Feature file:
989
-
990
- ```markdown
991
- ## Scenarios to Implement
992
-
993
- | # | Scenario | Status |
994
- |---|----------|--------|
995
- | 1 | Valid login success | ⬜ |
996
- | 2 | Invalid password error | ⬜ |
997
- | 3 | Email format validation | ⬜ |
998
- | 4 | Password reset link | ⬜ |
999
-
1000
- Total: 4 scenarios
1001
- ```
1002
-
1003
- ### 3. Scenario-by-Scenario Implementation (Core)
1004
-
1005
- **For each scenario**:
1006
-
1007
- ```
1008
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1009
- 🎯 Scenario 1/4: Valid login success
1010
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1011
-
1012
- Given: User is registered
1013
- When: Login with valid email and password
1014
- Then: Login success + JWT token returned
1015
-
1016
- [Step 1] Analyzing implementation...
1017
- - Required files: auth.service.ts, login.controller.ts
1018
- - Exploring related code...
1019
-
1020
- [Step 2] Implementing...
1021
- βœ… auth.service.ts - Added login() method
1022
- βœ… login.controller.ts - POST /login endpoint
1023
-
1024
- [Step 3] Verifying...
1025
- βœ… Given: Test user creation possible
1026
- βœ… When: Login API call succeeded
1027
- βœ… Then: JWT token return confirmed
1028
-
1029
- βœ… Scenario 1 passed!
1030
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1031
- ```
1032
-
1033
- **On failure**:
1034
-
1035
- ```
1036
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1037
- 🎯 Scenario 2/4: Invalid password error
1038
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1039
-
1040
- [Step 3] Verifying...
1041
- βœ… Given: Test user exists
1042
- βœ… When: Login attempt with wrong password
1043
- ❌ Then: "Invalid credentials" error message
1044
- Actual: "Error occurred" returned
1045
-
1046
- [Auto-fix 1/3]
1047
- Cause: Error message not properly set
1048
- Fix: auth.service.ts line 42
1049
-
1050
- [Re-verify]
1051
- βœ… Then: "Invalid credentials" error message
1052
-
1053
- βœ… Scenario 2 passed! (1 fix)
1054
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1055
- ```
1056
-
1057
- ---
1058
-
1059
- ## **CRITICAL: Parallel Sub-Agent Execution**
1060
-
1061
- > **MUST USE PARALLEL TASK CALLS** - This is REQUIRED, not optional.
1062
- > Sequential execution when parallel is possible = VIOLATION of this workflow.
1063
-
1064
- ### Codex 병렬 κ΅¬ν˜„ (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
1065
-
1066
- > **ν™œμ„±ν™” 쑰건**: Codex ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜ + 독립적인 μ‹œλ‚˜λ¦¬μ˜€ 2개 이상
1067
- > λ―Έμ„€μΉ˜ μ‹œ κΈ°μ‘΄ Claude μ„œλΈŒμ—μ΄μ „νŠΈ λ°©μ‹μœΌλ‘œ λ™μž‘.
1068
-
1069
- 독립적인 μ‹œλ‚˜λ¦¬μ˜€(파일 μ˜μ‘΄μ„± μ—†μŒ)λ₯Ό Codex에 μœ„μž„ν•˜μ—¬ Claude와 **병렬 κ΅¬ν˜„**:
1070
-
1071
- ```
1072
- /codex:rescue "Implement scenario: {scenario-name}. Files: {file-list}. Requirements: {requirements-summary}" --background
1073
- ```
1074
-
1075
- - ClaudeλŠ” λ‹€μŒ μ‹œλ‚˜λ¦¬μ˜€λ₯Ό **λ™μ‹œμ—** κ΅¬ν˜„
1076
- - Codex μ™„λ£Œ μ‹œ `/codex:result`둜 κ²°κ³Ό 확인
1077
- - 좩돌 λ°œμƒ μ‹œ Claudeκ°€ merge νŒλ‹¨
1078
-
1079
- **μœ„μž„ κΈ°μ€€**:
1080
- - μ‹œλ‚˜λ¦¬μ˜€ κ°„ 파일 μ˜μ‘΄μ„± μ—†μŒ (독립적)
1081
- - μ‹œλ‚˜λ¦¬μ˜€ λ³΅μž‘λ„ 쀑간 μ΄ν•˜
1082
- - μ˜μ‘΄μ„± μžˆλŠ” μ‹œλ‚˜λ¦¬μ˜€λŠ” Claudeκ°€ 직접 κ΅¬ν˜„
1083
-
1084
- ### Mandatory Parallel Exploration (Phase Start)
1085
-
1086
- **BEFORE any implementation, you MUST launch these Task calls IN PARALLEL (single message, multiple tool calls):**
1087
-
1088
- ```
1089
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1090
- β”‚ STEP 1: PARALLEL EXPLORATION (REQUIRED) β”‚
1091
- β”‚ β”‚
1092
- β”‚ Launch ALL of these in ONE message: β”‚
1093
- β”‚ β”‚
1094
- β”‚ Task(haiku) ─┬─→ "Analyze related files in <context>" β”‚
1095
- β”‚ β”‚ β”‚
1096
- β”‚ Task(haiku) ─┼─→ "Check dependencies and imports" β”‚
1097
- β”‚ β”‚ β”‚
1098
- β”‚ Task(haiku) ─┴─→ "Find existing patterns and conventions" β”‚
1099
- β”‚ β”‚
1100
- β”‚ [If GPT enabled] Bash: node "[LLM_SCRIPT]" gpt-codex orchestrate-json "[question]"
1101
- β”‚ [If Gemini enabled] Bash: node "[LLM_SCRIPT]" gemini orchestrate-json "[question]"
1102
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1103
- β”‚
1104
- ↓ (wait for all to complete)
1105
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1106
- β”‚ STEP 2: SYNTHESIZE (Opus) β”‚
1107
- β”‚ - Review all exploration results β”‚
1108
- β”‚ - Decide implementation approach β”‚
1109
- β”‚ - Identify files to modify/create β”‚
1110
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1111
- β”‚
1112
- ↓
1113
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1114
- β”‚ STEP 3: IMPLEMENT + BACKGROUND AGENTS (PARALLEL) β”‚
1115
- β”‚ β”‚
1116
- β”‚ Main Agent (sonnet): β”‚
1117
- β”‚ └─→ Execute current phase implementation β”‚
1118
- β”‚ β”‚
1119
- β”‚ Background Agents (haiku, run_in_background=true): β”‚
1120
- β”‚ β”œβ”€β†’ Task: "Prepare Phase N+1 - analyze required files" β”‚
1121
- β”‚ β”œβ”€β†’ Task: "Pre-generate test cases for current implementation" β”‚
1122
- β”‚ └─→ Task: "Search for related types/interfaces needed" β”‚
1123
- β”‚ β”‚
1124
- β”‚ [ULTRAWORK] All 4 agents run simultaneously! β”‚
1125
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1126
- β”‚
1127
- ↓ (main completes, check backgrounds)
1128
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1129
- β”‚ STEP 4: TEST + PHASE PIPELINING β”‚
1130
- β”‚ β”‚
1131
- β”‚ Current Phase: β”‚
1132
- β”‚ └─→ Task(haiku): Write tests using pre-generated cases β”‚
1133
- β”‚ β”‚
1134
- β”‚ Next Phase Prep (from background results): β”‚
1135
- β”‚ └─→ Already have file analysis, ready to start immediately β”‚
1136
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1137
- ```
1138
-
1139
- ### Parallel Task Call Pattern (MUST FOLLOW)
1140
-
1141
- **Correct - Single message with multiple parallel Tasks:**
1142
- ```
1143
- <message>
1144
- Task(haiku, "Analyze src/components/ for existing patterns")
1145
- Task(haiku, "Check package.json dependencies")
1146
- Task(haiku, "Find usage of similar features in codebase")
1147
- </message>
1148
- β†’ All 3 run simultaneously, ~3x faster
1149
- ```
1150
-
1151
- **WRONG - Sequential calls (DO NOT DO THIS):**
1152
- ```
1153
- <message>Task(haiku, "Analyze...")</message>
1154
- <message>Task(haiku, "Check...")</message>
1155
- <message>Task(haiku, "Find...")</message>
1156
- β†’ 3x slower, wastes time
1157
- ```
1158
-
1159
- ### Background Agent Pattern (ULTRAWORK) via Orchestrator
1160
-
1161
- **Launch background agents for next phase via Orchestrator:**
1162
- ```bash
1163
- # Start background agent (doesn't block)
1164
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => o.runAgent('Phase 2 prep: Analyze auth API endpoints', 'phase2-prep').then(r => console.log(r.content[0].text)))"
1165
-
1166
- # Multiple backgrounds in parallel
1167
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(async o => {
1168
- await Promise.all([
1169
- o.runAgent('Phase 2 prep: Analyze auth API endpoints', 'phase2-prep'),
1170
- o.runAgent('Pre-generate test cases for login form', 'test-prep'),
1171
- o.runAgent('Find existing validation patterns', 'pattern-finder')
1172
- ]);
1173
- console.log('All background agents started');
1174
- })"
1175
- ```
1176
-
1177
- **Check background agent status:**
1178
- ```bash
1179
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => console.log(o.status().content[0].text))"
1180
- ```
1181
-
1182
- **Get result when ready:**
1183
- ```bash
1184
- node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => o.getResult('SESSION_ID').then(r => console.log(r.content[0].text)))"
1185
- ```
1186
-
1187
- **Why Background Agents Matter:**
1188
-
1189
- | Without Background | With Background |
1190
- |--------------------|-----------------|
1191
- | Phase 1: 60s | Phase 1: 60s (+ backgrounds running) |
1192
- | Phase 2 prep: 20s | Phase 2 prep: 0s (already done!) |
1193
- | Phase 2: 60s | Phase 2: 60s |
1194
- | **Total: 140s** | **Total: 120s** |
1195
-
1196
- For 5 phases: 4 Γ— 20s saved = **80s faster**
1197
-
1198
- ### Why Parallel Matters
1199
-
1200
- | Approach | Time | Cache Benefit |
1201
- |----------|------|---------------|
1202
- | Sequential (3 Tasks) | ~30s | Cache cold on each |
1203
- | **Parallel (3 Tasks)** | **~10s** | **Cache warmed once, shared** |
1204
-
1205
- core ProjectCache (LRU) caches ts-morph parsing results. Parallel calls share the warmed cache.
1206
-
1207
- ### UI/UX Design Intelligence (Auto-triggered before Phase 1)
1208
-
1209
- > **쑰건**: SPEC λ˜λŠ” Feature에 UI/UX ν‚€μ›Œλ“œ 포함 μ‹œ μžλ™ μ‹€ν–‰
1210
- > **λΉ„ν™œμ„±ν™”**: `.claude/vibe/config.json`에 `"uiUxAnalysis": false` μ„€μ •
1211
-
1212
- **Phase 1 μ‹œμž‘ μ „, 2개 μ—μ΄μ „νŠΈ μžλ™ μ‹€ν–‰:**
1213
-
1214
- | Agent | Condition | Role |
1215
- |-------|-----------|------|
1216
- | β‘£ ui-stack-implementer | **항상 μ‹€ν–‰** | ν”„λ ˆμž„μ›Œν¬λ³„ μ»΄ν¬λ„ŒνŠΈ κ°€μ΄λ“œλΌμΈ 제곡 |
1217
- | β‘€ ui-dataviz-advisor | **쑰건뢀** (chart/dashboard/visualization ν‚€μ›Œλ“œ) | 차트/μ‹œκ°ν™” 라이브러리 μΆ”μ²œ |
1218
-
1219
- **μ‹€ν–‰ 방법:**
1220
-
1221
- ```text
1222
- # β‘£ 항상 μ‹€ν–‰ (Haiku)
1223
- Task(subagent_type="ui-stack-implementer",
1224
- prompt="Provide implementation guidelines for project '{project}' using {detected_stack}. Use core_ui_stack_search for framework-specific patterns.")
1225
-
1226
- # β‘€ 쑰건뢀 μ‹€ν–‰ (Haiku) β€” SPEC에 차트/λŒ€μ‹œλ³΄λ“œ/μ‹œκ°ν™” ν‚€μ›Œλ“œ 포함 μ‹œ
1227
- Task(subagent_type="ui-dataviz-advisor",
1228
- prompt="Recommend data visualization approach for project '{project}'. Use core_ui_search for chart types and react-performance patterns.")
1229
- ```
1230
-
1231
- **λ””μžμΈ μ‹œμŠ€ν…œ μžλ™ μ°Έμ‘°:**
1232
- - `.claude/vibe/design-system/{project}/MASTER.md` 쑴재 μ‹œ μžλ™ λ‘œλ“œ
1233
- - κ΅¬ν˜„ μ—μ΄μ „νŠΈκ°€ CSS λ³€μˆ˜, 폰트, 색상 νŒ”λ ˆνŠΈλ₯Ό 직접 μ°Έμ‘°
1234
- - νŽ˜μ΄μ§€λ³„ μ˜€λ²„λΌμ΄λ“œ `pages/{page}.md` 쑴재 μ‹œ μš°μ„  적용
1235
-
1236
- ### Phase Execution Flow (ULTRAWORK Pipeline)
1237
-
1238
- ```
1239
- Phase N Start
1240
- β”‚
1241
- β”œβ”€β†’ [PARALLEL] Task(haiku) Γ— 3: Exploration
1242
- β”‚ - Related code analysis
1243
- β”‚ - Dependency check
1244
- β”‚ - Pattern discovery
1245
- β”‚
1246
- ↓ (all complete)
1247
- β”‚
1248
- β”œβ”€β†’ Opus: Synthesize and decide
1249
- β”‚
1250
- β”œβ”€β†’ [PARALLEL PIPELINE] ←── KEY SPEED OPTIMIZATION
1251
- β”‚ β”‚
1252
- β”‚ β”œβ”€β†’ Main: Task(sonnet) Implementation
1253
- β”‚ β”‚
1254
- β”‚ └─→ Background (run_in_background=true):
1255
- β”‚ β”œβ”€β†’ Task(haiku): Phase N+1 file analysis
1256
- β”‚ β”œβ”€β†’ Task(haiku): Test case preparation
1257
- β”‚ └─→ Task(haiku): Type/interface lookup
1258
- β”‚
1259
- ↓ (main completes)
1260
- β”‚
1261
- β”œβ”€β†’ Task(haiku): Tests (uses pre-generated cases)
1262
- β”‚
1263
- ↓
1264
- Phase N Complete
1265
- β”‚
1266
- ↓ (Background results ready - NO WAIT for Phase N+1 exploration!)
1267
- β”‚
1268
- Phase N+1 Start (IMMEDIATE - exploration already done!)
1269
- ```
1270
-
1271
- **Speed Comparison:**
1272
-
1273
- | Mode | Phase Time | 5 Phases Total |
1274
- |------|------------|----------------|
1275
- | Sequential | ~2min/phase | ~10min |
1276
- | Parallel Exploration | ~1.5min/phase | ~7.5min |
1277
- | **ULTRAWORK Pipeline** | **~1min/phase** | **~5min** |
1278
-
1279
- **Why Pipeline is Faster:**
1280
- - Background agents prepare next phase WHILE current phase implements
1281
- - No idle time between phases
1282
- - Test cases pre-generated during implementation
1283
- - Cache stays warm across parallel tasks
1284
-
1285
- ---
1286
-
1287
- ### Agent Teams β€” Dev Team
1288
-
1289
- > **Agent Teams**: μ—μ΄μ „νŠΈλ“€μ΄ νŒ€μ„ 이루어 μ„œλ‘œ μ†Œν†΅ν•˜λ©° κ΅¬ν˜„ν•©λ‹ˆλ‹€.
1290
- > μ„€μ •: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` + `teammateMode: in-process` (`~/.claude/settings.json` μ „μ—­ β€” postinstall μžλ™ μ„€μ •)
1291
-
1292
- **νŒ€ ꡬ성:**
1293
-
1294
- | νŒ€μ› | μ—­ν•  |
1295
- |------|------|
1296
- | architect (리더) | 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율, SPEC μ€€μˆ˜ 검증, νŒ€ ν•©μ˜ 주도 |
1297
- | implementer | 핡심 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 κ΅¬ν˜„, architect 섀계λ₯Ό 따라 μ½”λ“œ μž‘μ„± |
1298
- | tester | κ΅¬ν˜„ μ™„λ£Œ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±, μ‹€νŒ¨ μ‹œ implementer에 ν”Όλ“œλ°± |
1299
- | security-reviewer | μ‹€μ‹œκ°„ λ³΄μ•ˆ 취약점 검증, λΈ”λ‘œν‚Ή 이슈 식별 |
1300
-
1301
- **μ‹€ν–‰ μˆœμ„œ:**
1302
-
1303
- 1. `TeamCreate(team_name="dev-{feature}")` β€” νŒ€ + 곡유 νƒœμŠ€ν¬ 리슀트 생성
1304
- 2. 4개 νŒ€μ› 병렬 생성 β€” 각각 `Task(team_name=..., name=..., subagent_type=...)` 으둜 spawn
1305
- 3. architectκ°€ SPEC Phaseλ₯Ό λΆ„μ„ν•˜μ—¬ κ΅¬ν˜„ κ³„νš 수립 β†’ TaskList에 μž‘μ—… 등둝
1306
- 4. νŒ€μ›λ“€μ΄ TaskListμ—μ„œ μž‘μ—…μ„ claimν•˜κ³ , SendMessage둜 μ‹€μ‹œκ°„ ν˜‘μ—…
1307
- 5. λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€ 검증 μ™„λ£Œ β†’ νŒ€μ› shutdown_request β†’ TeamDelete둜 정리
1308
-
1309
- **νŒ€μ› spawn νŒ¨ν„΄:**
1310
-
1311
- ```text
1312
- TeamCreate(team_name="dev-{feature}", description="Implementation team for {feature} Phase {N}")
1313
-
1314
- # 4개 병렬 spawn
1315
- Task(team_name="dev-{feature}", name="architect", subagent_type="architect",
1316
- prompt="κ΅¬ν˜„ νŒ€ 리더. Phase {N}의 SPEC을 λΆ„μ„ν•˜κ³  κ΅¬ν˜„ κ³„νšμ„ μˆ˜λ¦½ν•˜μ„Έμš”.
1317
- SPEC: {spec_content}
1318
- Feature Scenarios: {scenarios}
1319
- μ—­ν• : 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율, νŒ€μ› κ°„ 좩돌 ν•΄κ²°, SPEC μ€€μˆ˜ 검증.
1320
- TaskList에 κ΅¬ν˜„ μž‘μ—…μ„ λ“±λ‘ν•˜μ„Έμš”. implementerμ—κ²Œ 섀계λ₯Ό SendMessage둜 μ „λ‹¬ν•˜μ„Έμš”.
1321
- λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€κ°€ 톡과할 λ•ŒκΉŒμ§€ νŒ€μ„ μ‘°μœ¨ν•˜μ„Έμš”.")
1322
-
1323
- Task(team_name="dev-{feature}", name="implementer", subagent_type="implementer",
1324
- mode="bypassPermissions",
1325
- prompt="κ΅¬ν˜„ νŒ€ μ½”λ“œ λ‹΄λ‹Ή. SPEC: {spec_content}
1326
- μ—­ν• : architect의 섀계λ₯Ό 따라 ν”„λ‘œλ•μ…˜ μ½”λ“œ μž‘μ„±.
1327
- architectμ—κ²Œμ„œ 섀계λ₯Ό λ°›μœΌλ©΄ κ΅¬ν˜„μ„ μ‹œμž‘ν•˜μ„Έμš”.
1328
- μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„ μ™„λ£Œ μ‹œ testerμ—κ²Œ SendMessage둜 ν…ŒμŠ€νŠΈ μš”μ²­ν•˜μ„Έμš”.
1329
- security-reviewer의 λΈ”λ‘œν‚Ή μ΄μŠˆλŠ” μ¦‰μ‹œ μˆ˜μ •ν•˜μ„Έμš”.
1330
- TaskListμ—μ„œ κ΅¬ν˜„ μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1331
-
1332
- Task(team_name="dev-{feature}", name="tester", subagent_type="tester",
1333
- mode="bypassPermissions",
1334
- prompt="κ΅¬ν˜„ νŒ€ ν…ŒμŠ€νŠΈ λ‹΄λ‹Ή. SPEC: {spec_content}
1335
- μ—­ν• : implementerκ°€ μ™„λ£Œν•œ μ»΄ν¬λ„ŒνŠΈλΆ€ν„° μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±.
1336
- κ΅¬ν˜„ 전체λ₯Ό 기닀리지 말고 μ»΄ν¬λ„ŒνŠΈ λ‹¨μœ„λ‘œ 점진적 ν…ŒμŠ€νŠΈν•˜μ„Έμš”.
1337
- ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ implementerμ—κ²Œ SendMessage둜 ν”Όλ“œλ°±ν•˜μ„Έμš”.
1338
- edge case 발견 μ‹œ architectμ—κ²Œ 섀계 κ²€ν† λ₯Ό μš”μ²­ν•˜μ„Έμš”.
1339
- TaskListμ—μ„œ ν…ŒμŠ€νŠΈ μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1340
-
1341
- Task(team_name="dev-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1342
- mode="bypassPermissions",
1343
- prompt="κ΅¬ν˜„ νŒ€ λ³΄μ•ˆ λ‹΄λ‹Ή. SPEC: {spec_content}
1344
- μ—­ν• : κ΅¬ν˜„ μ½”λ“œμ˜ λ³΄μ•ˆ 취약점 μ‹€μ‹œκ°„ 검증.
1345
- λ³΄μ•ˆ μ΄μŠˆλŠ” BLOCKING β€” implementerμ—κ²Œ SendMessage둜 μ¦‰μ‹œ μˆ˜μ • μš”μ²­ν•˜μ„Έμš”.
1346
- μ‹¬κ°ν•œ 섀계 결함 발견 μ‹œ architectμ—κ²Œ SendMessage둜 μ•Œλ¦¬μ„Έμš”.
1347
- TaskListμ—μ„œ λ³΄μ•ˆ 검증 μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1348
- ```
1349
-
1350
- **νŒ€μ› κ°„ 톡신 μ˜ˆμ‹œ:**
1351
-
1352
- ```text
1353
- architect β†’ implementer: "Repository νŒ¨ν„΄μœΌλ‘œ 데이터 μ ‘κ·Ό 계측 λΆ„λ¦¬ν•΄μ„œ κ΅¬ν˜„ν•΄μ£Όμ„Έμš”. μΈν„°νŽ˜μ΄μŠ€λŠ” TaskList에 λ“±λ‘ν–ˆμŠ΅λ‹ˆλ‹€"
1354
- implementer β†’ tester: "LoginService κ΅¬ν˜„ μ™„λ£Œ. 정상/μ‹€νŒ¨/잠금 μ‹œλ‚˜λ¦¬μ˜€ ν…ŒμŠ€νŠΈ μš”μ²­ν•©λ‹ˆλ‹€"
1355
- security-reviewer β†’ implementer: "SQL injection μœ„ν—˜: raw query μ‚¬μš© 감지. parameterized query둜 μ¦‰μ‹œ μˆ˜μ • ν•„μš”"
1356
- tester β†’ architect: "edge case 3건 μ‹€νŒ¨ (빈 μž…λ ₯, 특수문자, λ™μ‹œ μš”μ²­). 섀계 κ²€ν†  μš”μ²­ν•©λ‹ˆλ‹€"
1357
- architect β†’ broadcast: "Phase {N} λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€ 톡과 확인. κ΅¬ν˜„ μ™„λ£Œν•©λ‹ˆλ‹€"
1358
- ```
1359
-
1360
- **νŒ€ λͺ¨λ“œ vs κΈ°μ‘΄ 병렬 λͺ¨λ“œ 비ꡐ:**
1361
-
1362
- | μΈ‘λ©΄ | κΈ°μ‘΄ 병렬 λͺ¨λ“œ | Agent Teams |
1363
- |------|---------------|-------------|
1364
- | 톡신 | 결과만 μˆ˜μ§‘ | μ‹€μ‹œκ°„ μƒν˜Έ ν”Όλ“œλ°± |
1365
- | ν…ŒμŠ€νŠΈ | κ΅¬ν˜„ ν›„ 별도 단계 | κ΅¬ν˜„κ³Ό λ™μ‹œ μ§„ν–‰ |
1366
- | λ³΄μ•ˆ | 사후 리뷰 | μ‹€μ‹œκ°„ 검증 |
1367
- | 섀계 λ³€κ²½ | 메인 μ—μ΄μ „νŠΈλ§Œ κ²°μ • | architect 주도 νŒ€ ν•©μ˜ |
1368
- | 였λ₯˜ 볡ꡬ | μž¬μ‹œλ„ 루프 | νŒ€ λ‚΄ μ¦‰μ‹œ ν”Όλ“œλ°± |
1369
-
1370
- **ν™œμ„±ν™” 쑰건 (Dev Team Full β€” 4λͺ…):**
1371
- - ULTRAWORK λͺ¨λ“œ + 3개 이상 μ‹œλ‚˜λ¦¬μ˜€
1372
- - λ˜λŠ” λ³΅μž‘λ„ 점수 20+ (High)
1373
-
1374
- ### Agent Teams β€” Lite Team (Normal Mode)
1375
-
1376
- > **일반 λͺ¨λ“œμ—μ„œλ„ νŒ€ ν˜‘μ—…**. Dev Team의 μΆ•μ†Œ λ²„μ „μœΌλ‘œ, 3개 이상 μ‹œλ‚˜λ¦¬μ˜€ μ‹œ μžλ™ ν™œμ„±ν™”.
1377
- > security-reviewerλ₯Ό μ œμ™Έν•œ architect + implementer + tester 3λͺ… ꡬ성.
1378
-
1379
- **νŒ€ ꡬ성:**
1380
-
1381
- | νŒ€μ› | μ—­ν•  |
1382
- |------|------|
1383
- | architect (리더) | 섀계 κ²°μ •, μ‹œλ‚˜λ¦¬μ˜€ 뢄석, κ΅¬ν˜„ λ°©ν–₯ 쑰율 |
1384
- | implementer | 핡심 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 κ΅¬ν˜„ |
1385
- | tester | κ΅¬ν˜„ μ™„λ£Œ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±, μ‹€νŒ¨ μ‹œ ν”Όλ“œλ°± |
1386
-
1387
- **spawn νŒ¨ν„΄:**
1388
-
1389
- ```text
1390
- TeamCreate(team_name="lite-{feature}", description="Lite implementation team for {feature} Phase {N}")
1391
-
1392
- Task(team_name="lite-{feature}", name="architect", subagent_type="architect",
1393
- prompt="Lite νŒ€ 리더. Phase {N}의 SPEC을 λΆ„μ„ν•˜κ³  κ΅¬ν˜„ κ³„νšμ„ μˆ˜λ¦½ν•˜μ„Έμš”.
1394
- SPEC: {spec_content}
1395
- Feature Scenarios: {scenarios}
1396
- μ—­ν• : 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율. TaskList에 μž‘μ—…μ„ λ“±λ‘ν•˜μ„Έμš”.
1397
- implementerμ—κ²Œ 섀계λ₯Ό SendMessage둜 μ „λ‹¬ν•˜μ„Έμš”.")
1398
-
1399
- Task(team_name="lite-{feature}", name="implementer", subagent_type="implementer",
1400
- mode="bypassPermissions",
1401
- prompt="Lite νŒ€ μ½”λ“œ λ‹΄λ‹Ή. SPEC: {spec_content}
1402
- μ—­ν• : architect의 섀계λ₯Ό 따라 ν”„λ‘œλ•μ…˜ μ½”λ“œ μž‘μ„±.
1403
- μ™„λ£Œ μ‹œ testerμ—κ²Œ SendMessage둜 ν…ŒμŠ€νŠΈ μš”μ²­ν•˜μ„Έμš”.")
1404
-
1405
- Task(team_name="lite-{feature}", name="tester", subagent_type="tester",
1406
- mode="bypassPermissions",
1407
- prompt="Lite νŒ€ ν…ŒμŠ€νŠΈ λ‹΄λ‹Ή. SPEC: {spec_content}
1408
- μ—­ν• : implementerκ°€ μ™„λ£Œν•œ μ»΄ν¬λ„ŒνŠΈλΆ€ν„° μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±.
1409
- ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ implementerμ—κ²Œ SendMessage둜 ν”Όλ“œλ°±ν•˜μ„Έμš”.")
1410
- ```
1411
-
1412
- **ν™œμ„±ν™” 쑰건 (Lite Team β€” 3λͺ…):**
1413
- - 일반 λͺ¨λ“œ + 3개 이상 μ‹œλ‚˜λ¦¬μ˜€
1414
- - λ³΅μž‘λ„ 점수 8-19 (Medium)
1415
- - λ‹¨μˆœ κ΅¬ν˜„(1-2 파일, μ‹œλ‚˜λ¦¬μ˜€ 2개 μ΄ν•˜)μ—μ„œλŠ” κΈ°μ‘΄ 병렬 λͺ¨λ“œ μœ μ§€
1416
-
1417
- **νŒ€ 선택 κΈ°μ€€:**
1418
-
1419
- | 쑰건 | νŒ€ |
1420
- |------|-----|
1421
- | μ‹œλ‚˜λ¦¬μ˜€ 1-2개, 파일 1-2개 | κΈ°μ‘΄ 병렬 λͺ¨λ“œ (νŒ€ μ—†μŒ) |
1422
- | μ‹œλ‚˜λ¦¬μ˜€ 3개+, 일반 λͺ¨λ“œ | **Lite Team (3λͺ…)** |
1423
- | ULTRAWORK λ˜λŠ” λ³΅μž‘λ„ 20+ | Dev Team Full (4λͺ…) |
1424
-
1425
- ### Agent Teams β€” Review Team
1426
-
1427
- > P1/P2 이슈 ꡐ차 검증을 μœ„ν•œ λ³΄μ•ˆ+μ•„ν‚€ν…μ²˜+μ„±λŠ₯+λ‹¨μˆœμ„± μ „λ¬Έ 리뷰 νŒ€.
1428
- > `/vibe.review` μ‹œ P1/P2 μ΄μŠˆκ°€ 발견되면 μžλ™ ν™œμ„±ν™”.
1429
-
1430
- **νŒ€ ꡬ성:**
1431
-
1432
- | νŒ€μ› | μ—­ν•  |
1433
- |------|------|
1434
- | security-reviewer (리더) | λ³΄μ•ˆ 이슈 μš°μ„ μˆœμœ„ κ²°μ •, ꡐ차 검증 주도, μ˜€νƒ 제거 |
1435
- | architecture-reviewer | μ•„ν‚€ν…μ²˜ μœ„λ°˜ 검증, 섀계 νŒ¨ν„΄ 평가 |
1436
- | performance-reviewer | μ„±λŠ₯ 병λͺ© 검증, N+1 쿼리/λ©”λͺ¨λ¦¬ λˆ„μˆ˜ 확인 |
1437
- | simplicity-reviewer | κ³Όλ„ν•œ λ³΅μž‘μ„± 검증, λΆˆν•„μš”ν•œ 좔상화 식별 |
1438
-
1439
- **spawn νŒ¨ν„΄:**
1440
-
1441
- ```text
1442
- TeamCreate(team_name="review-{feature}", description="Cross-validation review team for {feature}")
1443
-
1444
- Task(team_name="review-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1445
- mode="bypassPermissions",
1446
- prompt="Review team leader. Cross-validate P1/P2 issues found in parallel review.
1447
- Files: {changed_files}
1448
- Found issues: {p1_p2_issues}
1449
- Role: Verify each P1/P2 issue is genuine (not false positive). Prioritize by actual impact.
1450
- Send disputed findings to relevant reviewer for confirmation via SendMessage.")
1451
-
1452
- Task(team_name="review-{feature}", name="architecture-reviewer", subagent_type="architecture-reviewer",
1453
- mode="bypassPermissions",
1454
- prompt="Review team architecture expert. Validate architecture-related findings.
1455
- Files: {changed_files}
1456
- Role: Confirm or dispute architecture violations. Check SOLID principles and layer boundaries.")
1457
-
1458
- Task(team_name="review-{feature}", name="performance-reviewer", subagent_type="performance-reviewer",
1459
- mode="bypassPermissions",
1460
- prompt="Review team performance expert. Validate performance-related findings.
1461
- Files: {changed_files}
1462
- Role: Confirm or dispute performance issues. Run complexity analysis on flagged code.")
1463
-
1464
- Task(team_name="review-{feature}", name="simplicity-reviewer", subagent_type="simplicity-reviewer",
1465
- mode="bypassPermissions",
1466
- prompt="Review team simplicity advocate. Challenge over-engineering findings.
1467
- Files: {changed_files}
1468
- Role: Verify YAGNI violations. Confirm or dispute unnecessary abstraction flags.")
1469
- ```
1470
-
1471
- **νŒ€μ› κ°„ 톡신 μ˜ˆμ‹œ:**
1472
-
1473
- ```text
1474
- security-reviewer β†’ architecture-reviewer: "SQL injection finding in users.py:42 β€” is this pattern used elsewhere?"
1475
- architecture-reviewer β†’ security-reviewer: "Confirmed. Same pattern in orders.py:78. Elevate to P1."
1476
- performance-reviewer β†’ security-reviewer: "N+1 query finding is false positive β€” already uses prefetch_related."
1477
- security-reviewer β†’ broadcast: "Review complete. 2 P1 confirmed, 1 P2 downgraded to P3."
1478
- ```
1479
-
1480
- **ν™œμ„±ν™” 쑰건:**
1481
-
1482
- - `/vibe.review` μ‹€ν–‰ ν›„ P1 λ˜λŠ” P2 이슈 2개 이상 발견 μ‹œ
1483
- - Agent Teams ν™˜κ²½λ³€μˆ˜ ν™œμ„±ν™” μƒνƒœ
1484
-
1485
- ### Agent Teams β€” Debug Team
1486
-
1487
- > λΉŒλ“œ/ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ μ•„ν‚€ν…νŠΈ 진단 β†’ κ΅¬ν˜„μž μˆ˜μ • β†’ ν…ŒμŠ€ν„° 검증 사이클.
1488
- > UltraQA 3회 μ‹€νŒ¨ μ§„μž… μ‹œ λ˜λŠ” λΉŒλ“œ μ‹€νŒ¨ 3회+ μ‹œ μžλ™ ν™œμ„±ν™”.
1489
-
1490
- **νŒ€ ꡬ성:**
1491
-
1492
- | νŒ€μ› | μ—­ν•  |
1493
- |------|------|
1494
- | architect (리더) | κ·Όλ³Έ 원인 진단, μˆ˜μ • λ°©ν–₯ 섀계, μ•„ν‚€ν…μ²˜ 레벨 문제 식별 |
1495
- | implementer | architect 진단에 따라 μ΅œμ†Œ diff μˆ˜μ • 적용 |
1496
- | tester | μˆ˜μ • ν›„ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μ‹€ν–‰, νšŒκ·€ 검증 |
1497
-
1498
- **spawn νŒ¨ν„΄:**
1499
-
1500
- ```text
1501
- TeamCreate(team_name="debug-{feature}", description="Debug team for {feature} build/test failure")
1502
-
1503
- Task(team_name="debug-{feature}", name="architect", subagent_type="architect",
1504
- prompt="Debug team leader. Diagnose root cause of build/test failure.
1505
- Error: {error_output}
1506
- Failed files: {failed_files}
1507
- Previous attempts: {attempt_history}
1508
- Role: Analyze error, identify root cause (not symptoms). Design minimal fix.
1509
- Send diagnosis to implementer via SendMessage. If same failure 3x, escalate to user.")
1510
-
1511
- Task(team_name="debug-{feature}", name="implementer", subagent_type="implementer",
1512
- mode="bypassPermissions",
1513
- prompt="Debug team fixer. Apply minimal-diff fixes based on architect diagnosis.
1514
- Role: Wait for architect diagnosis. Apply ONLY the specific fix recommended.
1515
- Do NOT refactor surrounding code. Notify tester when fix is applied.")
1516
-
1517
- Task(team_name="debug-{feature}", name="tester", subagent_type="tester",
1518
- mode="bypassPermissions",
1519
- prompt="Debug team verifier. Run tests after each fix to verify resolution.
1520
- Role: Wait for implementer fix notification. Run failing tests.
1521
- Report results to architect. If still failing, provide detailed error output.")
1522
- ```
1523
-
1524
- **ν™œμ„±ν™” 쑰건:**
1525
-
1526
- - 동일 λΉŒλ“œ/ν…ŒμŠ€νŠΈ μ‹€νŒ¨ 3회 이상
1527
- - UltraQA `architecture_question` μƒνƒœ μ§„μž… μ‹œ
1528
-
1529
- ### Agent Teams β€” Research Team
1530
-
1531
- > `/vibe.spec` Step 3 λ¦¬μ„œμΉ˜ λ‹¨κ³„μ—μ„œ 4개 μ „λ¬Έ λ¦¬μ„œμΉ˜ μ—μ΄μ „νŠΈκ°€ νŒ€μœΌλ‘œ ν˜‘μ—….
1532
- > λ¦¬μ„œμΉ˜ κ²°κ³Ό ꡐ차 검증 및 좩돌 ν•΄κ²°.
1533
-
1534
- **νŒ€ ꡬ성:**
1535
-
1536
- | νŒ€μ› | μ—­ν•  |
1537
- |------|------|
1538
- | best-practices-agent (리더) | 베슀트 ν”„λž™ν‹°μŠ€ μˆ˜μ§‘, λ¦¬μ„œμΉ˜ 톡합, 좩돌 ν•΄κ²° |
1539
- | security-advisory-agent | λ³΄μ•ˆ 취약점 쑰사, CVE 확인, λ³΄μ•ˆ ꢌμž₯사항 |
1540
- | codebase-patterns-agent | κΈ°μ‘΄ μ½”λ“œλ² μ΄μŠ€ νŒ¨ν„΄ 뢄석, μœ μ‚¬ κ΅¬ν˜„ μ°Έμ‘° |
1541
- | framework-docs-agent | ν”„λ ˆμž„μ›Œν¬ μ΅œμ‹  λ¬Έμ„œ 확인, API 변경사항 좔적 |
1542
-
1543
- **spawn νŒ¨ν„΄:**
1544
-
1545
- ```text
1546
- TeamCreate(team_name="research-{feature}", description="Research team for {feature} SPEC")
1547
-
1548
- Task(team_name="research-{feature}", name="best-practices-agent", subagent_type="best-practices-agent",
1549
- prompt="Research team leader. Coordinate research for {feature} SPEC.
1550
- Tech stack: {tech_stack}
1551
- Requirements: {requirements}
1552
- Role: Collect best practices. Integrate findings from all researchers.
1553
- Resolve conflicting recommendations. Produce unified research summary.")
1554
-
1555
- Task(team_name="research-{feature}", name="security-advisory-agent", subagent_type="security-advisory-agent",
1556
- prompt="Research team security specialist. Check security advisories for {feature}.
1557
- Tech stack: {tech_stack}
1558
- Role: Check CVEs for dependencies. Identify security patterns to follow.
1559
- Share findings with best-practices-agent for integration.")
1560
-
1561
- Task(team_name="research-{feature}", name="codebase-patterns-agent", subagent_type="codebase-patterns-agent",
1562
- prompt="Research team codebase analyst. Analyze existing patterns for {feature}.
1563
- Project path: {project_path}
1564
- Role: Find similar implementations in codebase. Extract conventions and patterns.
1565
- Share findings with best-practices-agent.")
1566
-
1567
- Task(team_name="research-{feature}", name="framework-docs-agent", subagent_type="framework-docs-agent",
1568
- prompt="Research team docs specialist. Check latest framework docs for {feature}.
1569
- Tech stack: {tech_stack}
1570
- Role: Verify API usage against latest docs. Check for breaking changes.
1571
- Share findings with best-practices-agent.")
1572
- ```
1573
-
1574
- **ν™œμ„±ν™” 쑰건:**
1575
-
1576
- - `/vibe.spec` Step 3 λ¦¬μ„œμΉ˜ 단계
1577
- - Agent Teams ν™˜κ²½λ³€μˆ˜ ν™œμ„±ν™” μƒνƒœ
1578
-
1579
- ### Agent Teams β€” Security Team
1580
-
1581
- > λ³΄μ•ˆ 민감 μ½”λ“œ λ³€κ²½ μ‹œ μ „λ¬Έ λ³΄μ•ˆ 검증 νŒ€.
1582
- > 인증, κΆŒν•œ, 결제, κ°œμΈμ •λ³΄ κ΄€λ ¨ μ½”λ“œ λ³€κ²½ 감지 μ‹œ μžλ™ ν™œμ„±ν™”.
1583
-
1584
- **νŒ€ ꡬ성:**
1585
-
1586
- | νŒ€μ› | μ—­ν•  |
1587
- |------|------|
1588
- | security-reviewer (리더) | OWASP Top 10 검증, λ³΄μ•ˆ 이슈 μš°μ„ μˆœμœ„ κ²°μ • |
1589
- | data-integrity-reviewer | 데이터 무결성, νŠΈλžœμž­μ…˜ 관리, μž…λ ₯ 검증 |
1590
- | security-advisory-agent | μ‚¬μš© 라이브러리 CVE 확인, λ³΄μ•ˆ 패치 확인 |
1591
- | tester | λ³΄μ•ˆ ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€ μž‘μ„±, 침투 ν…ŒμŠ€νŠΈ μ‹œλ‚˜λ¦¬μ˜€ 검증 |
1592
-
1593
- **spawn νŒ¨ν„΄:**
1594
-
1595
- ```text
1596
- TeamCreate(team_name="security-{feature}", description="Security audit team for {feature}")
1597
-
1598
- Task(team_name="security-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1599
- mode="bypassPermissions",
1600
- prompt="Security team leader. Comprehensive security audit for {feature}.
1601
- Files: {changed_files}
1602
- Role: OWASP Top 10 check. XSS, CSRF, SQL injection, auth bypass.
1603
- Coordinate with data-integrity-reviewer for data flow analysis.
1604
- Any P1 finding blocks merge β€” notify team immediately.")
1605
-
1606
- Task(team_name="security-{feature}", name="data-integrity-reviewer", subagent_type="data-integrity-reviewer",
1607
- mode="bypassPermissions",
1608
- prompt="Security team data specialist. Verify data integrity for {feature}.
1609
- Files: {changed_files}
1610
- Role: Check transaction management, input validation, data sanitization.
1611
- Report findings to security-reviewer.")
1612
-
1613
- Task(team_name="security-{feature}", name="security-advisory-agent", subagent_type="security-advisory-agent",
1614
- prompt="Security team advisory specialist. Check dependencies for {feature}.
1615
- Role: Scan for known CVEs in project dependencies. Check security advisories.
1616
- Report critical findings to security-reviewer.")
1617
-
1618
- Task(team_name="security-{feature}", name="tester", subagent_type="tester",
1619
- mode="bypassPermissions",
1620
- prompt="Security team test specialist. Write security-focused tests for {feature}.
1621
- Files: {changed_files}
1622
- Role: Write tests for auth bypass, injection, permission escalation.
1623
- Report test results to security-reviewer.")
1624
- ```
1625
-
1626
- **ν™œμ„±ν™” 쑰건:**
1627
-
1628
- - auth, payment, user-data, crypto κ΄€λ ¨ 파일 λ³€κ²½ 감지 μ‹œ
1629
- - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `security` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1630
-
1631
- ### Agent Teams β€” Migration Team
1632
-
1633
- > ν”„λ ˆμž„μ›Œν¬/라이브러리 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ „λ¬Έ νŒ€.
1634
- > λŒ€κ·œλͺ¨ μ˜μ‘΄μ„± μ—…κ·Έλ ˆμ΄λ“œ, ν”„λ ˆμž„μ›Œν¬ μ „ν™˜ μ‹œ ν™œμ„±ν™”.
1635
-
1636
- **νŒ€ ꡬ성:**
1637
-
1638
- | νŒ€μ› | μ—­ν•  |
1639
- |------|------|
1640
- | architect (리더) | λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ „λž΅ 섀계, ν˜Έν™˜μ„± 뢄석, 단계별 κ³„νš |
1641
- | implementer | μ½”λ“œ λ³€ν™˜ μ‹€ν–‰, API λ³€κ²½ 적용 |
1642
- | tester | λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ ν›„ νšŒκ·€ ν…ŒμŠ€νŠΈ, ν˜Έν™˜μ„± 검증 |
1643
- | build-error-resolver | λΉŒλ“œ μ—λŸ¬ μ¦‰μ‹œ ν•΄κ²°, νƒ€μž… μ—λŸ¬ μˆ˜μ • |
1644
-
1645
- **spawn νŒ¨ν„΄:**
1646
-
1647
- ```text
1648
- TeamCreate(team_name="migration-{feature}", description="Migration team for {feature}")
1649
-
1650
- Task(team_name="migration-{feature}", name="architect", subagent_type="architect",
1651
- prompt="Migration team leader. Plan migration strategy for {feature}.
1652
- From: {current_version}
1653
- To: {target_version}
1654
- Role: Analyze breaking changes. Create step-by-step migration plan.
1655
- Assign file groups to implementer. Monitor build-error-resolver for blockers.")
1656
-
1657
- Task(team_name="migration-{feature}", name="implementer", subagent_type="implementer",
1658
- mode="bypassPermissions",
1659
- prompt="Migration team implementer. Execute code migration for {feature}.
1660
- Role: Apply migration changes per architect plan. Work file-by-file.
1661
- Notify tester after each file group. Report blockers to architect.")
1662
-
1663
- Task(team_name="migration-{feature}", name="tester", subagent_type="tester",
1664
- mode="bypassPermissions",
1665
- prompt="Migration team tester. Verify migration correctness for {feature}.
1666
- Role: Run existing tests after each migration step. Add new tests for changed APIs.
1667
- Report regressions to implementer and architect.")
1668
-
1669
- Task(team_name="migration-{feature}", name="build-error-resolver", subagent_type="build-error-resolver",
1670
- mode="bypassPermissions",
1671
- prompt="Migration team build fixer. Resolve build errors during {feature} migration.
1672
- Role: Monitor build output. Apply minimal-diff type fixes for migration errors.
1673
- Notify implementer of patterns requiring broader changes.")
1674
- ```
1675
-
1676
- **ν™œμ„±ν™” 쑰건:**
1677
-
1678
- - package.json μ£Όμš” μ˜μ‘΄μ„± 버전 λ³€κ²½ 감지 μ‹œ
1679
- - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `migration` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1680
-
1681
- ### Agent Teams β€” Fullstack Team
1682
-
1683
- > Frontend + Backend λ™μ‹œ 변경이 ν•„μš”ν•œ ν’€μŠ€νƒ κΈ°λŠ₯ κ΅¬ν˜„ νŒ€.
1684
- > API μ—”λ“œν¬μΈνŠΈ + UI μ»΄ν¬λ„ŒνŠΈλ₯Ό λ™μ‹œμ— 개발.
1685
-
1686
- **νŒ€ ꡬ성:**
1687
-
1688
- | νŒ€μ› | μ—­ν•  |
1689
- |------|------|
1690
- | architect (리더) | API μΈν„°νŽ˜μ΄μŠ€ 섀계, frontend/backend λΆ„μ—… 쑰율 |
1691
- | implementer-backend | Backend API, λ°μ΄ν„°λ² μ΄μŠ€, μ„œλΉ„μŠ€ 둜직 κ΅¬ν˜„ |
1692
- | implementer-frontend | Frontend UI, μƒνƒœ 관리, API 연동 κ΅¬ν˜„ |
1693
- | tester | E2E ν…ŒμŠ€νŠΈ, API ν…ŒμŠ€νŠΈ, 톡합 ν…ŒμŠ€νŠΈ |
1694
-
1695
- **spawn νŒ¨ν„΄:**
1696
-
1697
- ```text
1698
- TeamCreate(team_name="fullstack-{feature}", description="Fullstack team for {feature}")
1699
-
1700
- Task(team_name="fullstack-{feature}", name="architect", subagent_type="architect",
1701
- prompt="Fullstack team leader. Design API contract for {feature}.
1702
- SPEC: {spec_content}
1703
- Role: Define API endpoints (request/response schemas). Design data models.
1704
- Share API contract with both implementers. Coordinate integration timing.")
1705
-
1706
- Task(team_name="fullstack-{feature}", name="implementer-backend", subagent_type="implementer",
1707
- mode="bypassPermissions",
1708
- prompt="Fullstack team backend developer. Implement API for {feature}.
1709
- SPEC: {spec_content}
1710
- Role: Implement API endpoints per architect's contract. Create data models and services.
1711
- Notify implementer-frontend when endpoints are ready for integration.
1712
- Share API response samples with tester.")
1713
-
1714
- Task(team_name="fullstack-{feature}", name="implementer-frontend", subagent_type="implementer",
1715
- mode="bypassPermissions",
1716
- prompt="Fullstack team frontend developer. Implement UI for {feature}.
1717
- SPEC: {spec_content}
1718
- Role: Build UI components and pages per SPEC. Use architect's API contract for types.
1719
- Start with mock data, switch to real API when backend notifies readiness.
1720
- Notify tester when UI is ready for E2E testing.")
1721
-
1722
- Task(team_name="fullstack-{feature}", name="tester", subagent_type="tester",
1723
- mode="bypassPermissions",
1724
- prompt="Fullstack team tester. Write comprehensive tests for {feature}.
1725
- SPEC: {spec_content}
1726
- Role: Write API tests (after backend ready). Write E2E tests (after frontend ready).
1727
- Test API contract conformance. Report integration issues to architect.")
1728
- ```
1729
-
1730
- **ν™œμ„±ν™” 쑰건:**
1731
-
1732
- - SPEC에 frontend + backend 파일이 λͺ¨λ‘ ν¬ν•¨λœ 경우
1733
- - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `fullstack` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1734
-
1735
- ---
1736
-
1737
- 1. **Related code analysis**: Task(haiku) explores `<context>` related code
1738
- 2. **File creation/modification**: Task(sonnet) implements per `<output_format>`
1739
- 3. **Constraint compliance**: Check `<constraints>`
1740
- 4. **Run verification**: Execute verification commands
1741
-
1742
- ### 4. Brand Assets Generation (Optional)
1743
-
1744
- When starting a **new project** with brand context in SPEC, auto-generate app icons and favicons:
1745
-
1746
- ```
1747
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1748
- 🎨 BRAND ASSETS GENERATION
1749
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1750
-
1751
- [Check] Brand assets exist? β†’ Skip if favicon.ico exists
1752
- [Check] Gemini API configured? β†’ Required for image generation
1753
- [Check] SPEC has brand context? β†’ Extract app name, colors, style
1754
-
1755
- [Generate] Creating app icon with Gemini Image API...
1756
- - Prompt: "App icon for [AppName], [style], [color]..."
1757
- - Generated: 512x512 master icon
1758
-
1759
- [Resize] Creating platform variants...
1760
- βœ… favicon.ico (16/32/48)
1761
- βœ… favicon-16x16.png
1762
- βœ… favicon-32x32.png
1763
- βœ… apple-touch-icon.png (180x180)
1764
- βœ… android-chrome-192x192.png
1765
- βœ… android-chrome-512x512.png
1766
- βœ… site.webmanifest
1767
-
1768
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1769
- βœ… Brand assets generated in public/
1770
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1771
- ```
1772
-
1773
- **SPEC Brand Context Example:**
1774
-
1775
- ```xml
1776
- <context>
1777
- Brand:
1778
- - App Name: MyApp
1779
- - Primary Color: #2F6BFF
1780
- - Style: Modern, minimalist, flat design
1781
- - Icon Concept: Abstract geometric shape
1782
- </context>
1783
- ```
1784
-
1785
- **Trigger Conditions:**
1786
- - First `/vibe.run` execution (no existing icons)
1787
- - SPEC contains brand/design context
1788
- - Gemini API key configured (`vibe gemini auth`)
1789
-
1790
- **Manual Generation:**
1791
- ```bash
1792
- # [LLM_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js
1793
- node "[LLM_SCRIPT]" gemini image "App icon for MyApp, primary color #2F6BFF, square format 1:1, simple recognizable design, works well at small sizes, no text or letters, solid or gradient background, modern minimalist" --output "./public/app-icon.png"
1794
- ```
1795
-
1796
- ---
1797
-
1798
- ### 5. Race Code Review (GPT + Gemini) + Auto-Fix (v2.6.9)
1799
-
1800
- After all scenarios are implemented, **GPT and Gemini review in parallel with cross-validation**:
1801
-
1802
- > **ULTRAWORK Default**: In ULTRAWORK mode, race review is automatically enabled.
1803
-
1804
- ```
1805
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1806
- 🏁 RACE CODE REVIEW (GPT + Gemini)
1807
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1808
-
1809
- [Step 1] Parallel review execution...
1810
- β”œβ”€ GPT Codex: Reviewing...
1811
- └─ Gemini: Reviewing...
1812
-
1813
- [Step 2] Cross-validation results:
1814
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1815
- β”‚ Issue β”‚ GPT β”‚ Gemini β”‚ Codex β”‚ Confidenceβ”‚
1816
- │────────────────────────────────│─────│────────│───────│───────────│
1817
- β”‚ Timing attack in password β”‚ βœ… β”‚ βœ… β”‚ βœ… β”‚ 100% β†’ P1 β”‚
1818
- β”‚ Rate limiting missing β”‚ βœ… β”‚ βœ… β”‚ βœ… β”‚ 100% β†’ P1 β”‚
1819
- β”‚ Magic number usage β”‚ βœ… β”‚ ❌ β”‚ ❌ β”‚ 50% β†’ P2 β”‚
1820
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1821
-
1822
- Summary: 3 issues (P1: 2, P2: 1)
1823
-
1824
- [Step 3] Auto-fixing P1/P2 issues...
1825
- βœ… auth.service.ts:24 - Applied timingSafeEqual (P1)
1826
- βœ… auth.controller.ts:15 - Added rate limiter (P1)
1827
- βœ… auth.service.ts:42 - Extracted constant (P2)
1828
-
1829
- [Step 4] Re-verifying...
1830
- βœ… Build succeeded
1831
- βœ… Tests passed
1832
-
1833
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1834
- βœ… Race review complete! 3 improvements (2 P1, 1 P2)
1835
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1836
- ```
1837
-
1838
- **Race Review Invocation (GPT + Gemini in parallel via Bash):**
1839
-
1840
- **🚨 Use --input file to avoid CLI argument length limits and Windows pipe issues.**
1841
-
1842
- 1. Save code to review into `[SCRATCHPAD]/review-code.txt` (using Write tool)
1843
- 2. Write JSON input file `[SCRATCHPAD]/review-input.json` (using Write tool):
1844
- - `{"prompt": "Review this code for security, performance, and best practices. Return JSON: {issues: [{id, title, description, severity, suggestion}]}. Code: [CODE_CONTENT]"}`
1845
- - Where `[CODE_CONTENT]` is the code text (properly JSON-escaped inside the prompt string)
1846
- 3. Script path: `[LLM_SCRIPT]` = `{{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js`
1847
- 4. Run GPT + Gemini in PARALLEL (two Bash tool calls at once):
1848
-
1849
- ```bash
1850
- # GPT review (Bash tool call 1)
1851
- node "[LLM_SCRIPT]" gpt orchestrate-json --input "[SCRATCHPAD]/review-input.json"
1852
- ```
1853
-
1854
- ```bash
1855
- # Gemini review (Bash tool call 2 - run in parallel)
1856
- node "[LLM_SCRIPT]" gemini orchestrate-json --input "[SCRATCHPAD]/review-input.json"
1857
- ```
1858
-
1859
- **Confidence-based Priority:**
1860
-
1861
- | Confidence | Priority | Action |
1862
- |------------|----------|--------|
1863
- | 100% (3/3 or 2/2) | P1 | Auto-fix immediately |
1864
- | 67% (2/3) | P1 | Auto-fix immediately |
1865
- | 50% (1/2) or 33% (1/3) | P2 | Auto-fix with review |
1866
-
1867
- **Fallback handling:**
1868
- - If one LLM fails β†’ Use remaining LLM results (reduced confidence)
1869
- - If all fail β†’ Skip and proceed (log warning)
1870
-
1871
- **Review application rules:**
1872
-
1873
- | Feedback Type | Action |
1874
- |---------------|--------|
1875
- | Security vulnerability (P1) | Auto-fix immediately |
1876
- | Performance improvement (P1/P2) | Auto-fix immediately |
1877
- | Best practices (P2) | Auto-fix |
1878
- | Style/preference (P3) | Apply selectively |
1879
-
1880
- **Conditions:**
1881
- - **ULTRAWORK**: Race review enabled by default
1882
- - **Normal mode**: Use `--race` flag to enable
1883
- - Must re-verify build/tests after fixes
1884
-
1885
- ### Codex Code Review (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
1886
-
1887
- GPT+Gemini race와 **λ™μ‹œμ—** Codex review μ‹€ν–‰:
1888
-
1889
- ```
1890
- /codex:review
1891
- ```
1892
-
1893
- κ²°κ³Όλ₯Ό race review ꡐ차 검증에 포함 β€” 3쀑 리뷰:
1894
-
1895
- ```markdown
1896
- | Issue | GPT | Gemini | Codex | Confidence |
1897
- |-------|-----|--------|-------|------------|
1898
- | {이슈} | βœ…/❌ | βœ…/❌ | βœ…/❌ | {%} |
1899
- ```
1900
-
1901
- ### 6. Quality Report (Auto-generated)
1902
-
1903
- After all scenarios complete + Gemini review, **quality report is auto-generated**:
1904
-
1905
- ```
1906
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1907
- β”‚ πŸ“Š QUALITY REPORT: login β”‚
1908
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
1909
- β”‚ β”‚
1910
- β”‚ βœ… Scenarios: 4/4 passed β”‚
1911
- β”‚ β”‚
1912
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
1913
- β”‚ β”‚ # β”‚ Scenario β”‚ Status β”‚ Retries β”‚ β”‚ β”‚
1914
- β”‚ │───│───────────────────────────│────────│─────────│ β”‚ β”‚
1915
- β”‚ β”‚ 1 β”‚ Valid login success β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1916
- β”‚ β”‚ 2 β”‚ Invalid password error β”‚ βœ… β”‚ 1 β”‚ β”‚ β”‚
1917
- β”‚ β”‚ 3 β”‚ Email format validation β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1918
- β”‚ β”‚ 4 β”‚ Password reset link β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1919
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
1920
- β”‚ β”‚
1921
- β”‚ πŸ“ˆ Quality score: 94/100 β”‚
1922
- β”‚ β”‚
1923
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
1924
- β”‚ β”‚ Item β”‚ Result β”‚ Notes β”‚ β”‚
1925
- β”‚ │───────────────────│────────│─────────────────────────────│ β”‚
1926
- β”‚ β”‚ Build β”‚ βœ… β”‚ npm run build succeeded β”‚ β”‚
1927
- β”‚ β”‚ Tests β”‚ βœ… β”‚ 12/12 passed β”‚ β”‚
1928
- β”‚ β”‚ Type check β”‚ βœ… β”‚ 0 errors β”‚ β”‚
1929
- β”‚ β”‚ Complexity β”‚ βœ… β”‚ All functions ≀30 lines β”‚ β”‚
1930
- β”‚ β”‚ Security β”‚ βœ… β”‚ 0 vulnerabilities β”‚ β”‚
1931
- β”‚ β”‚ Race review β”‚ βœ… β”‚ 3 improvements applied β”‚ β”‚
1932
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
1933
- β”‚ β”‚
1934
- β”‚ ⏱️ Started: {start_time} β”‚
1935
- β”‚ ⏱️ Completed: {getCurrentTime κ²°κ³Ό} β”‚
1936
- β”‚ β”‚
1937
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1938
- ```
1939
-
1940
- **What users should check**:
1941
- - Scenario pass rate (4/4 = 100%)
1942
- - Quality score (94/100)
1943
- - Build/test status
1944
-
1945
- **This alone is enough to trust quality.**
1946
-
1947
- ### 7. Update Feature File
1948
-
1949
- Auto-update scenario status:
1950
-
1951
- ```markdown
1952
- ## Coverage
1953
-
1954
- | Scenario | SPEC AC | Status |
1955
- |----------|---------|--------|
1956
- | Valid login success | AC-1 | βœ… |
1957
- | Invalid password error | AC-2 | βœ… |
1958
- | Email format validation | AC-3 | βœ… |
1959
- | Password reset link | AC-4 | βœ… |
1960
-
1961
- **Last verified**: 2024-01-15 14:32
1962
- **Quality score**: 94/100
1963
- ```
1964
-
1965
- ## TRUST 5 Principles
1966
-
1967
- Follow during implementation:
1968
-
1969
- | Principle | Description |
1970
- |-----------|-------------|
1971
- | **T**est-first | Write tests first |
1972
- | **R**eadable | Clear code |
1973
- | **U**nified | Consistent style |
1974
- | **S**ecured | Consider security |
1975
- | **T**rackable | Logging, monitoring |
1976
-
1977
- ## Input
1978
-
1979
- - `.claude/vibe/specs/{feature-name}.md` (PTCF SPEC)
1980
- - `.claude/vibe/features/{feature-name}.feature` (BDD)
1981
- - `CLAUDE.md` (project context)
1982
-
1983
- ## Output
1984
-
1985
- - Implemented code files
1986
- - Test files
1987
- - Updated SPEC document (checkmarks)
1988
-
1989
- ## Example
1990
-
1991
- ```
1992
- User: /vibe.run "login"
1993
-
1994
- Claude:
1995
- πŸ“„ Loading SPEC: .claude/vibe/specs/login.md
1996
- πŸ“„ Loading Feature: .claude/vibe/features/login.feature
1997
-
1998
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1999
- πŸ“‹ Scenarios to Implement
2000
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2001
-
2002
- | # | Scenario | Status |
2003
- |---|----------|--------|
2004
- | 1 | Valid login success | ⬜ |
2005
- | 2 | Invalid password error | ⬜ |
2006
- | 3 | Email format validation | ⬜ |
2007
- | 4 | Password reset link | ⬜ |
2008
-
2009
- Total: 4 scenarios
2010
-
2011
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2012
- 🎯 Scenario 1/4: Valid login success
2013
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2014
-
2015
- Given: User is registered
2016
- When: Login with valid email and password
2017
- Then: Login success + JWT token returned
2018
-
2019
- ⚑ [PARALLEL] Exploring...
2020
- βœ… Exploration complete (2.1s)
2021
-
2022
- πŸ”¨ Implementing...
2023
- βœ… auth.service.ts - Added login()
2024
- βœ… auth.controller.ts - POST /login
2025
-
2026
- πŸ” Verifying...
2027
- βœ… Given: OK
2028
- βœ… When: OK
2029
- βœ… Then: OK
2030
-
2031
- βœ… Scenario 1 passed!
2032
-
2033
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2034
- 🎯 Scenario 2/4: Invalid password error
2035
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2036
-
2037
- πŸ”¨ Implementing...
2038
- βœ… auth.service.ts - Password validation logic
2039
-
2040
- πŸ” Verifying...
2041
- βœ… Given: OK
2042
- βœ… When: OK
2043
- ❌ Then: "Invalid credentials" error message
2044
- Actual: "Error" returned
2045
-
2046
- πŸ”„ Auto-fix 1/3...
2047
- Fix: auth.service.ts line 42
2048
-
2049
- πŸ” Re-verifying...
2050
- βœ… Then: OK
2051
-
2052
- βœ… Scenario 2 passed! (1 fix)
2053
-
2054
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2055
- 🎯 Scenario 3/4: Email format validation
2056
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2057
-
2058
- πŸ”¨ Implementing...
2059
- πŸ” Verifying...
2060
- βœ… Scenario 3 passed!
2061
-
2062
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2063
- 🎯 Scenario 4/4: Password reset link
2064
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2065
-
2066
- πŸ”¨ Implementing...
2067
- πŸ” Verifying...
2068
- βœ… Scenario 4 passed!
2069
-
2070
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2071
- πŸ” GEMINI CODE REVIEW
2072
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2073
-
2074
- πŸ“€ Sending code to Gemini...
2075
- πŸ“ Gemini feedback:
2076
- 1. [Security] Need timing attack prevention β†’ Fixing...
2077
- 2. [Performance] Unnecessary DB call β†’ Fixing...
2078
-
2079
- βœ… 2 improvements auto-applied
2080
- πŸ” Re-verifying... βœ… Passed
2081
-
2082
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2083
- β”‚ πŸ“Š QUALITY REPORT: login β”‚
2084
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
2085
- β”‚ β”‚
2086
- β”‚ βœ… Scenarios: 4/4 passed β”‚
2087
- β”‚ β”‚
2088
- β”‚ | # | Scenario | Status | Retries | β”‚
2089
- β”‚ |---|───────────────────────|───────|─────────| β”‚
2090
- β”‚ | 1 | Valid login success | βœ… | 0 | β”‚
2091
- β”‚ | 2 | Invalid password error| βœ… | 1 | β”‚
2092
- β”‚ | 3 | Email format validation| βœ… | 0 | β”‚
2093
- β”‚ | 4 | Password reset link | βœ… | 0 | β”‚
2094
- β”‚ β”‚
2095
- β”‚ πŸ“ˆ Quality score: 94/100 β”‚
2096
- β”‚ Build: βœ… | Tests: βœ… | Types: βœ… | Gemini: βœ… (2 applied) β”‚
2097
- β”‚ β”‚
2098
- β”‚ ⏱️ Started: {start_time} β”‚
2099
- β”‚ ⏱️ Completed: {getCurrentTime κ²°κ³Ό} β”‚
2100
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2101
-
2102
- πŸŽ‰ Implementation complete! All scenarios passed + Gemini review applied.
2103
-
2104
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2105
- πŸ” AUTO REVIEW (13+ Agents)
2106
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2107
-
2108
- ⚑ [PARALLEL] 13 expert agents reviewing...
2109
- - security-reviewer βœ…
2110
- - performance-reviewer βœ…
2111
- - architecture-reviewer βœ…
2112
- - ...
2113
-
2114
- πŸ“‹ Review results:
2115
- - P1 Critical: 0
2116
- - P2 Important: 2
2117
- - P3 Nice-to-have: 1
2118
-
2119
- πŸ”§ Auto-fixing P2 issues...
2120
- 1. [PERF] N+1 query β†’ Fixed
2121
- 2. [ARCH] Circular dependency β†’ Fixed
2122
-
2123
- βœ… Auto Review complete! 2 issues auto-resolved.
2124
- ```
2125
-
2126
- ### Phase-specific Execution
2127
-
2128
- ```
2129
- User: /vibe.run "brick-game" --phase 2
2130
-
2131
- Claude:
2132
- πŸ“„ Reading SPEC: .claude/vibe/specs/brick-game.md
2133
- 🎯 Executing Phase 2 only.
2134
-
2135
- Phase 2: Game Logic
2136
- 1. [ ] Paddle movement implementation
2137
- 2. [ ] Ball physics engine
2138
- 3. [ ] Brick collision handling
2139
- 4. [ ] Score system
2140
- 5. [ ] Game over conditions
2141
-
2142
- ⚑ Launching parallel exploration...
2143
- [Task(haiku) Γ— 3 launched in parallel]
2144
-
2145
- πŸš€ Starting implementation...
2146
- ```
2147
-
2148
- ## Error Handling
2149
-
2150
- On failure:
2151
- 1. Check error message
2152
- 2. Review `<constraints>`
2153
- 3. Fix code and retry
2154
- 4. If continues to fail, report to user
2155
-
2156
- ---
2157
-
2158
- ## Quality Gate (Mandatory)
2159
-
2160
- ### Implementation Quality Checklist
2161
-
2162
- Before marking any scenario as complete, ALL items must pass:
2163
-
2164
- | Category | Check Item | Weight |
2165
- |----------|------------|--------|
2166
- | **Functionality** | All Given/When/Then conditions verified | 20% |
2167
- | **Functionality** | Edge cases handled per scenario | 10% |
2168
- | **Code Quality** | No `any` types in TypeScript | 10% |
2169
- | **Code Quality** | Functions ≀30 lines, nesting ≀3 levels | 10% |
2170
- | **Code Quality** | No hardcoded values (use constants) | 5% |
2171
- | **Security** | Input validation implemented | 10% |
2172
- | **Security** | Authentication/authorization checked | 5% |
2173
- | **Error Handling** | Try-catch or error states present | 10% |
2174
- | **Error Handling** | User-friendly error messages | 5% |
2175
- | **Testing** | Unit tests exist for core logic | 10% |
2176
- | **Performance** | No N+1 queries or unnecessary loops | 5% |
2177
-
2178
- ### Quality Score Calculation
2179
-
2180
- ```
2181
- Score = Ξ£(checked items Γ— weight) / 100
2182
-
2183
- Grades:
2184
- - 95-100: βœ… EXCELLENT - Ready to merge
2185
- - 90-94: ⚠️ GOOD - Minor improvements required before merge
2186
- - 80-89: ⚠️ FAIR - Significant improvements required
2187
- - 0-79: ❌ POOR - Major fixes needed
2188
- ```
2189
-
2190
- ### Quality Gate Thresholds
2191
-
2192
- | Gate | Minimum Score | Condition |
2193
- |------|---------------|-----------|
2194
- | **Scenario Complete** | 95 | Each scenario must score β‰₯95 |
2195
- | **Phase Complete** | 95 | Average of all scenarios β‰₯95 |
2196
- | **Feature Complete** | 95 | All phases complete + Gemini review |
2197
-
2198
- ### Auto-Fix Triggers
2199
-
2200
- | Issue Type | Auto-Fix Action |
2201
- |------------|-----------------|
2202
- | Missing error handling | Add try-catch wrapper |
2203
- | Hardcoded values | Extract to constants file |
2204
- | Missing input validation | Add validation schema |
2205
- | Function too long | Suggest split points |
2206
- | N+1 query detected | Add eager loading |
2207
-
2208
- ### Auto-Fix μ‹€νŒ¨ μ‹œ Codex Rescue (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
2209
-
2210
- P1 auto-fixκ°€ **3회 μ‹€νŒ¨** μ‹œ, Codex에 μœ„μž„:
2211
-
2212
- ```
2213
- /codex:rescue "Fix P1 issue: {issue-description}. File: {file-path}. Error: {error-message}"
2214
- ```
2215
-
2216
- Codex μˆ˜μ • μ™„λ£Œ ν›„ μž¬κ²€μ¦. Codex도 μ‹€νŒ¨ μ‹œ TODO νŒŒμΌμ— 기둝.
2217
-
2218
- ### Forbidden Patterns (Block Merge)
2219
-
2220
- | Pattern | Why Forbidden | Detection |
2221
- |---------|---------------|-----------|
2222
- | `console.log` | Debug code in production | Regex scan |
2223
- | `// TODO` without issue | Untracked work | Comment scan |
2224
- | `any` type | Type safety bypass | TypeScript check |
2225
- | `@ts-ignore` | Type error suppression | TypeScript check |
2226
- | Empty catch blocks | Silent error swallowing | AST analysis |
2227
- | Commented-out code | Dead code | Comment scan |
2228
-
2229
- ---
2230
-
2231
- ## Auto-Retrospective (Post-Implementation)
2232
-
2233
- After ALL phases complete successfully, **automatically** perform a brief retrospective:
2234
-
2235
- ### Retrospective Template
2236
-
2237
- ```
2238
- ## Retrospective: {feature-name}
2239
-
2240
- ### What Worked
2241
- - [List effective patterns, tools, approaches used]
2242
-
2243
- ### What Didn't
2244
- - [List issues, failures, unexpected blockers]
2245
-
2246
- ### Key Decisions
2247
- - [Important architectural or implementation decisions made during this run]
2248
-
2249
- ### Lessons Learned
2250
- - [Principle format: "When X, do Y because Z"]
2251
- ```
2252
-
2253
- ### Execution Steps
2254
-
2255
- 1. Generate retrospective based on the implementation session
2256
- 2. Save to `.claude/vibe/retros/{feature-name}.md`
2257
- 3. Save key lessons via `core_save_memory` (for cross-session recall)
2258
- 4. Update `claude-progress.txt` with final status
2259
-
2260
- **Important:**
2261
-
2262
- - Keep it concise (under 20 lines)
2263
- - Focus on **project-specific** insights, not generic knowledge
2264
- - Only save to memory if the lesson is actionable and non-obvious
2265
-
2266
- ---
2267
-
2268
- ## Next Step
2269
-
2270
- ```
2271
- /vibe.verify "brick-game"
2272
- ```
2273
-
2274
- ---
2275
-
2276
- ARGUMENTS: $ARGUMENTS
1
+ ---
2
+ description: Execute implementation from SPEC
3
+ argument-hint: "feature name" or --phase N
4
+ ---
5
+
6
+ # /vibe.run
7
+
8
+ Execute **Scenario-Driven Implementation** with automatic quality verification.
9
+
10
+ > **Core Principle**: Scenarios are both the implementation unit and verification criteria. All scenarios passing = Quality guaranteed.
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /vibe.run "feature-name" # Full implementation
16
+ /vibe.run "feature-name" --phase 1 # Specific Phase only
17
+ /vibe.run "feature-name" ultrawork # ULTRAWORK mode (recommended)
18
+ /vibe.run "feature-name" ulw # Short alias for ultrawork
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Codex Plugin Integration
24
+
25
+ > **Codex ν”ŒλŸ¬κ·ΈμΈ 감지**: μ›Œν¬ν”Œλ‘œμš° μ‹œμž‘ μ‹œ μ•„λž˜ λͺ…λ ΉμœΌλ‘œ μžλ™ 감지.
26
+ >
27
+ > ```bash
28
+ > CODEX_AVAILABLE=$(node "{{VIBE_PATH}}/hooks/scripts/codex-detect.js" 2>/dev/null || echo "unavailable")
29
+ > ```
30
+ >
31
+ > `available`이면 `/codex:rescue` (κ΅¬ν˜„ μœ„μž„), `/codex:review` (μ½”λ“œ 리뷰) μžλ™ 호좜. `unavailable`이면 κΈ°μ‘΄ μ›Œν¬ν”Œλ‘œμš°λ‘œ λ™μž‘.
32
+
33
+ ---
34
+
35
+ > **⏱️ Timer**: Call `getCurrentTime` tool at the START. Record the result as `{start_time}`.
36
+
37
+ ## File Reading Policy (Mandatory)
38
+
39
+ - **SPEC/Feature 파일**: λ°˜λ“œμ‹œ `Read` λ„κ΅¬λ‘œ 전체 νŒŒμΌμ„ 읽을 것 (Grep κΈˆμ§€)
40
+ - **μ†ŒμŠ€μ½”λ“œ 파일**: κ΅¬ν˜„/μˆ˜μ • λŒ€μƒ νŒŒμΌμ€ λ°˜λ“œμ‹œ `Read` λ„κ΅¬λ‘œ 전체 읽은 ν›„ μž‘μ—…ν•  것
41
+ - **Grep μ‚¬μš© μ œν•œ**: 파일 μœ„μΉ˜ 탐색(μ–΄λ–€ νŒŒμΌμ— μžˆλŠ”μ§€ μ°ΎκΈ°)μ—λ§Œ μ‚¬μš©. 파일 λ‚΄μš© νŒŒμ•…μ—λŠ” λ°˜λ“œμ‹œ Read μ‚¬μš©
42
+ - **μ—μ΄μ „νŠΈ spawn μ‹œ**: ν”„λ‘¬ν”„νŠΈμ— "λŒ€μƒ νŒŒμΌμ„ Read λ„κ΅¬λ‘œ 전체 읽은 ν›„ κ΅¬ν˜„ν•˜λΌ"λ₯Ό λ°˜λ“œμ‹œ 포함할 것
43
+ - **λΆ€λΆ„ 읽기 κΈˆμ§€**: Grep 결과의 μ£Όλ³€ λͺ‡ μ€„λ§Œ 보고 μˆ˜μ •ν•˜μ§€ 말 것. 전체 λ§₯락을 νŒŒμ•…ν•΄μ•Ό κΈ°μ‘΄ μ½”λ“œμ™€ μΌκ΄€λœ κ΅¬ν˜„ κ°€λŠ₯
44
+
45
+ ## **Scenario-Driven Development (SDD)**
46
+
47
+ > Automate **Scenario = Implementation = Verification** so even non-developers can trust quality
48
+
49
+ ### Core Flow
50
+
51
+ ```
52
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
53
+ β”‚ SCENARIO-DRIVEN IMPLEMENTATION β”‚
54
+ β”‚ β”‚
55
+ β”‚ Load Feature file β”‚
56
+ β”‚ ↓ β”‚
57
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
58
+ β”‚ β”‚ Scenario 1: Happy Path β”‚ β”‚
59
+ β”‚ β”‚ Given β†’ When β†’ Then β”‚ β”‚
60
+ β”‚ β”‚ ↓ β”‚ β”‚
61
+ β”‚ β”‚ [Implement] β†’ [Verify immediately] β†’ βœ… Pass β”‚ β”‚
62
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
63
+ β”‚ ↓ β”‚
64
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
65
+ β”‚ β”‚ Scenario 2: Edge Case β”‚ β”‚
66
+ β”‚ β”‚ Given β†’ When β†’ Then β”‚ β”‚
67
+ β”‚ β”‚ ↓ β”‚ β”‚
68
+ β”‚ β”‚ [Implement] β†’ [Verify] β†’ ❌ Fail β†’ [Fix] β†’ βœ… Pass β”‚ β”‚
69
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
70
+ β”‚ ↓ β”‚
71
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
72
+ β”‚ β”‚ Scenario N: ... β”‚ β”‚
73
+ β”‚ β”‚ [Implement] β†’ [Verify immediately] β†’ βœ… Pass β”‚ β”‚
74
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
75
+ β”‚ ↓ β”‚
76
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
77
+ β”‚ β”‚ πŸ“Š QUALITY REPORT β”‚ β”‚
78
+ β”‚ β”‚ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β”‚ β”‚
79
+ β”‚ β”‚ Scenarios: 5/5 passed βœ… β”‚ β”‚
80
+ β”‚ β”‚ Quality score: 94/100 β”‚ β”‚
81
+ β”‚ β”‚ Build: βœ… | Tests: βœ… β”‚ β”‚
82
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
83
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
84
+ ```
85
+
86
+ ### Scenario = Implementation Unit
87
+
88
+ **Traditional approach (Phase-based)**:
89
+ ```
90
+ Phase 1 β†’ Phase 2 β†’ Phase 3 β†’ ... β†’ Verify at the end
91
+ ↓
92
+ "Where did it go wrong?"
93
+ ```
94
+
95
+ **SDD approach (Scenario-based)**:
96
+ ```
97
+ Scenario 1 β†’ Implement β†’ Verify βœ…
98
+ Scenario 2 β†’ Implement β†’ Verify βœ…
99
+ Scenario 3 β†’ Implement β†’ Verify ❌ β†’ Fix β†’ βœ…
100
+ ...
101
+ All pass = Quality guaranteed
102
+ ```
103
+
104
+ ### Automated Verification (Closed Loop)
105
+
106
+ **자율적 AI μ½”λ”© = κ΅¬ν˜„ + 검증 + 반볡. 검증을 AIμ—κ²Œ λ§‘κΈ°λŠ” μˆœκ°„ 루프가 λ‹«νžŒλ‹€.**
107
+
108
+ After implementing each scenario, **automatic verification**:
109
+
110
+ | Verification Item | Auto Check | Method |
111
+ |-------------------|------------|--------|
112
+ | Given (precondition) | State/data preparation confirmed | Code analysis |
113
+ | When (action) | Feature execution possible | Code analysis + Build |
114
+ | Then (result) | Expected result matches | Code analysis + Test |
115
+ | Code quality | Complexity, style, security | Static analysis |
116
+ | **UI behavior** | **μ‹€μ œ λΈŒλΌμš°μ €μ—μ„œ λ™μž‘ 확인** | **E2E Closed Loop** |
117
+
118
+ ### E2E Closed Loop (UI Scenarios)
119
+
120
+ **UI μ‹œλ‚˜λ¦¬μ˜€κ°€ ν¬ν•¨λœ Feature일 λ•Œ μžλ™ ν™œμ„±ν™”.**
121
+
122
+ ```
123
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
124
+ β”‚ CLOSED LOOP = κ΅¬ν˜„ + 검증 + 반볡 β”‚
125
+ β”‚ β”‚
126
+ β”‚ Scenario κ΅¬ν˜„ μ™„λ£Œ β”‚
127
+ β”‚ ↓ β”‚
128
+ β”‚ [E2E 검증] AIκ°€ 직접 λΈŒλΌμš°μ € μ‘°μž‘ β”‚
129
+ β”‚ β”‚ (μ ‘κ·Όμ„± 트리 기반 β€” 토큰 효율적) β”‚
130
+ β”‚ β”œβ”€ PASS β†’ Next scenario β”‚
131
+ β”‚ └─ FAIL β†’ Root cause analysis β”‚
132
+ β”‚ β†’ Fix code (Read full file first) β”‚
133
+ β”‚ β†’ Re-run failed scenario only β”‚
134
+ β”‚ β†’ PASS? β†’ Next scenario β”‚
135
+ β”‚ β†’ FAIL? β†’ Retry (max 3) β”‚
136
+ β”‚ β”‚
137
+ β”‚ 핡심: 검증이 κ°€λ²ΌμšΈμˆ˜λ‘ λ£¨ν”„λŠ” 더 많이 λˆλ‹€ β”‚
138
+ β”‚ - μ ‘κ·Όμ„± 트리: button "Sign In" = 15 chars β”‚
139
+ β”‚ - DOM 트리: div class="nav-wrapper mx-4..." = 200+ chars β”‚
140
+ β”‚ - μ „μžλ₯Ό 써야 ν•œ μ„Έμ…˜μ—μ„œ μˆ˜μ‹­ 개 μ‹œλ‚˜λ¦¬μ˜€ 검증 κ°€λŠ₯ β”‚
141
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
142
+ ```
143
+
144
+ **Browser Tool Priority:**
145
+
146
+ | Priority | Tool | μš©λ„ |
147
+ |----------|------|------|
148
+ | 1st | Agent Browser (μ ‘κ·Όμ„± 트리) | AI 직접 μ‘°μž‘, μ΅œμ†Œ 토큰 |
149
+ | 2nd | Playwright Test Runner | ν…ŒμŠ€νŠΈ μ½”λ“œ μ‹€ν–‰, pass/fail λ°˜ν™˜ |
150
+ | 3rd | Playwright MCP (DOM) | μ΅œν›„ μˆ˜λ‹¨, 토큰 λΉ„νš¨μœ¨ |
151
+
152
+ **ν™œμ„±ν™” 쑰건:**
153
+ - Feature νŒŒμΌμ— UI κ΄€λ ¨ μ‹œλ‚˜λ¦¬μ˜€ 쑴재 (form, button, page, navigate λ“±)
154
+ - `.claude/vibe/e2e/config.json`의 `closedLoop.enabled: true` (κΈ°λ³Έκ°’)
155
+ - dev serverκ°€ μ‹€ν–‰ 쀑 (`baseURL` μ ‘κ·Ό κ°€λŠ₯)
156
+
157
+ ### Auto-Fix on Failure
158
+
159
+ ```
160
+ Scenario verification failed (μ½”λ“œ 뢄석 λ˜λŠ” E2E)
161
+ ↓
162
+ [Collect evidence]
163
+ - E2E: screenshot, console errors, accessibility tree snapshot
164
+ - Code: build errors, test failures, type errors
165
+ ↓
166
+ [Root cause analysis] - Which Then condition failed?
167
+ ↓
168
+ [Read target file FULLY] - Grep으둜 ν›‘μ§€ 말 것
169
+ ↓
170
+ [Implement fix] - Fix only that part
171
+ ↓
172
+ [Re-verify] - Re-run ONLY failed scenario (save tokens)
173
+ ↓
174
+ Repeat until pass (max 3 times)
175
+ ```
176
+
177
+ ---
178
+
179
+ ## **ULTRAWORK Mode** (ulw)
180
+
181
+ > Include `ultrawork` or `ulw` in your command to activate **maximum performance mode**.
182
+
183
+ ### What ULTRAWORK Enables
184
+
185
+ When you include `ultrawork` (or `ulw`), ALL of these activate automatically:
186
+
187
+ | Feature | Description |
188
+ |---------|-------------|
189
+ | **Parallel Exploration** | 3+ Task(haiku) agents run simultaneously |
190
+ | **Boulder Loop** | Auto-continues until ALL phases complete |
191
+ | **Context Compression** | Aggressive auto-save at 70%+ context |
192
+ | **No Pause** | Doesn't wait for confirmation between phases |
193
+ | **External LLMs** | Auto-consults GPT/Gemini if enabled |
194
+ | **Error Recovery** | Auto-retries on failure (up to 3 times) |
195
+ | **Race Review (v2.6.9)** | Multi-LLM review (GPT+Gemini) with cross-validation |
196
+
197
+ ### Boulder Loop (Inspired by Sisyphus)
198
+
199
+ Like Sisyphus rolling the boulder, ULTRAWORK **keeps going until done**:
200
+
201
+ ```
202
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
203
+ β”‚ BOULDER LOOP (ultrawork) β”‚
204
+ β”‚ β”‚
205
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
206
+ β”‚ β”‚ Phase 1 │───→│ Phase 2 │───→│ Phase 3 │───→│ Phase N β”‚ β”‚
207
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
208
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
209
+ β”‚ ↓ ↓ ↓ ↓ β”‚
210
+ β”‚ [Parallel] [Parallel] [Parallel] [Parallel] β”‚
211
+ β”‚ [Implement] [Implement] [Implement] [Implement] β”‚
212
+ β”‚ [Test] [Test] [Test] [Test] β”‚
213
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
214
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
215
+ β”‚ β”‚ β”‚
216
+ β”‚ ↓ β”‚
217
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
218
+ β”‚ β”‚ ALL DONE? β”‚ β”‚
219
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
220
+ β”‚ β”‚ β”‚ β”‚
221
+ β”‚ NO YES β”‚
222
+ β”‚ β”‚ β”‚ β”‚
223
+ β”‚ ↓ ↓ β”‚
224
+ β”‚ [Continue] [πŸŽ‰ Complete!] β”‚
225
+ β”‚ β”‚
226
+ β”‚ NO STOPPING until acceptance criteria met or error limit hit β”‚
227
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
228
+ ```
229
+
230
+ ### Ralph Loop (Completion Verification) - CRITICAL
231
+
232
+ > **Inspired by [ghuntley.com/ralph](https://ghuntley.com/ralph)**: "Deterministically bad in an undeterministic world" - Keep iterating until TRULY complete.
233
+
234
+ **Problem**: AI often claims "complete" when implementation is partial.
235
+
236
+ **Solution**: RTM-based automated coverage verification with iteration tracking.
237
+
238
+ ```
239
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
240
+ β”‚ RALPH LOOP (Mandatory) β”‚
241
+ β”‚ β”‚
242
+ β”‚ After ALL phases complete: β”‚
243
+ β”‚ β”‚
244
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
245
+ β”‚ β”‚ RTM COVERAGE VERIFICATION [Iteration {{ITER}}/{{MAX}}] β”‚ β”‚
246
+ β”‚ β”‚ β”‚ β”‚
247
+ β”‚ β”‚ Generate RTM via core tools: β”‚ β”‚
248
+ β”‚ β”‚ β†’ generateTraceabilityMatrix("{feature-name}") β”‚ β”‚
249
+ β”‚ β”‚ β”‚ β”‚
250
+ β”‚ β”‚ Coverage Metrics (automated): β”‚ β”‚
251
+ β”‚ β”‚ β–‘ Requirements coverage: {coveragePercent}% β”‚ β”‚
252
+ β”‚ β”‚ β–‘ SPEC β†’ Feature mapping: {featureCovered}/{total} β”‚ β”‚
253
+ β”‚ β”‚ β–‘ Feature β†’ Test mapping: {testCovered}/{total} β”‚ β”‚
254
+ β”‚ β”‚ β–‘ Build successful? β”‚ β”‚
255
+ β”‚ β”‚ β–‘ Tests passing? β”‚ β”‚
256
+ β”‚ β”‚ β”‚ β”‚
257
+ β”‚ β”‚ UNCOVERED: {uncoveredRequirements[]} β”‚ β”‚
258
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
259
+ β”‚ β”‚ β”‚
260
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
261
+ β”‚ β”‚ Coverage β‰₯ 95%? β”‚ β”‚
262
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
263
+ β”‚ β”‚ β”‚ β”‚
264
+ β”‚ NO YES β”‚
265
+ β”‚ β”‚ β”‚ β”‚
266
+ β”‚ ↓ ↓ β”‚
267
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
268
+ β”‚ β”‚ IMPLEMENT β”‚ β”‚ βœ… TRULY DONE β”‚ β”‚
269
+ β”‚ β”‚ UNCOVERED β”‚ β”‚ β”‚ β”‚
270
+ β”‚ β”‚ REQUIREMENTS β”‚ β”‚ Report final β”‚ β”‚
271
+ β”‚ β”‚ (auto-extract) β”‚ β”‚ RTM coverage β”‚ β”‚
272
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
273
+ β”‚ β”‚ β”‚
274
+ β”‚ └──────────→ [Re-generate RTM] β”‚
275
+ β”‚ β”‚
276
+ β”‚ MAX_ITERATIONS: 5 (prevent infinite loops) β”‚
277
+ β”‚ COVERAGE_THRESHOLD: 95% (quality gate) β”‚
278
+ β”‚ ZERO TOLERANCE for scope reduction β”‚
279
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
280
+ ```
281
+
282
+ **Ralph Loop with RTM:**
283
+
284
+ ```bash
285
+ # Generate RTM for coverage verification
286
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.generateTraceabilityMatrix('{feature-name}', {projectPath: process.cwd()}).then(r => console.log(JSON.stringify(r, null, 2))))"
287
+ ```
288
+
289
+ **RTM provides automated metrics:**
290
+
291
+ | Metric | Description |
292
+ |--------|-------------|
293
+ | `totalRequirements` | Total REQ-* items in SPEC |
294
+ | `specCovered` | Requirements with SPEC mapping |
295
+ | `featureCovered` | Requirements with Feature scenarios |
296
+ | `testCovered` | Requirements with test files |
297
+ | `coveragePercent` | Overall coverage percentage |
298
+ | `uncoveredRequirements` | List of missing REQ-* IDs |
299
+
300
+ **Ralph Loop Rules:**
301
+
302
+ | Rule | Description |
303
+ |------|-------------|
304
+ | **No Scope Reduction** | Never say "simplified" or "basic version" - implement FULL request |
305
+ | **Iteration Tracking** | Display `[{{ITER}}/{{MAX}}]` to show progress |
306
+ | **RTM-Based Gap List** | Use `uncoveredRequirements` array - no manual comparison |
307
+ | **Coverage Threshold** | Must reach 95% coverage to complete |
308
+ | **Max Iterations** | Stop at 5 iterations (report remaining gaps as TODO) |
309
+ | **Convergence Detection** | If coverage % unchanged between iterations β†’ STOP (converged) |
310
+ | **Diminishing Returns** | Iteration 3+ β†’ only implement unmet core requirements (REQ-*-001~003), rest goes to TODO |
311
+
312
+ **Ralph Loop Output Format:**
313
+
314
+ ```
315
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
316
+ πŸ”„ RALPH VERIFICATION [Iteration 1/5]
317
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
318
+
319
+ πŸ“Š RTM Coverage Report: login
320
+
321
+ Requirements Traceability:
322
+ Total Requirements: 9
323
+ SPEC Covered: 9/9 (100%)
324
+ Feature Covered: 5/9 (55%)
325
+ Test Covered: 4/9 (44%)
326
+
327
+ βœ… REQ-login-001: Login form UI β†’ Scenario 1 β†’ login.test.ts
328
+ βœ… REQ-login-002: Email validation β†’ Scenario 2 β†’ validation.test.ts
329
+ βœ… REQ-login-003: Password validation β†’ Scenario 2 β†’ validation.test.ts
330
+ ❌ REQ-login-004: Remember me checkbox β†’ NOT IMPLEMENTED
331
+ ❌ REQ-login-005: Forgot password link β†’ NOT IMPLEMENTED
332
+ βœ… REQ-login-006: API integration β†’ Scenario 3 β†’ api.test.ts
333
+ ❌ REQ-login-007: Loading state β†’ NOT IMPLEMENTED
334
+ ❌ REQ-login-008: Error toast β†’ NOT IMPLEMENTED
335
+ βœ… REQ-login-009: Session storage β†’ Scenario 4 β†’ (no test)
336
+
337
+ Overall Coverage: 55% ⚠️ BELOW 95% THRESHOLD
338
+
339
+ UNCOVERED REQUIREMENTS (auto-extracted from RTM):
340
+ 1. REQ-login-004: Remember me checkbox
341
+ 2. REQ-login-005: Forgot password link
342
+ 3. REQ-login-007: Loading state
343
+ 4. REQ-login-008: Error toast notifications
344
+
345
+ ⚠️ NOT COMPLETE - Implementing uncovered requirements...
346
+
347
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
348
+ πŸ”„ RALPH VERIFICATION [Iteration 2/5]
349
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
350
+
351
+ πŸ“Š RTM Coverage Report: login
352
+
353
+ Requirements Traceability:
354
+ Total Requirements: 9
355
+ SPEC Covered: 9/9 (100%)
356
+ Feature Covered: 9/9 (100%)
357
+ Test Covered: 9/9 (100%)
358
+
359
+ Overall Coverage: 100% βœ… ABOVE 95% THRESHOLD
360
+
361
+ Build: βœ… Passed
362
+ Tests: βœ… 12/12 Passed
363
+ Type Check: βœ… No errors
364
+
365
+ βœ… RALPH VERIFIED COMPLETE!
366
+
367
+ πŸ“„ RTM saved: .claude/vibe/rtm/login-rtm.md
368
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
369
+ ```
370
+
371
+ **When to Trigger Ralph Loop:**
372
+
373
+ 1. After all phases complete
374
+ 2. Before final quality report
375
+ 3. Whenever user says "ultrawork" or "ralph"
376
+
377
+ **Forbidden Responses (VIOLATIONS):**
378
+
379
+ | ❌ NEVER Say | βœ… Instead |
380
+ |-------------|-----------|
381
+ | "I've implemented a basic version" | Implement the FULL version |
382
+ | "This is a simplified approach" | Implement as specified |
383
+ | "You can add X later" | Add X now |
384
+ | "For demonstration purposes" | Implement production-ready |
385
+ | "The core functionality is done" | ALL functionality must be done |
386
+
387
+ ### ULTRAWORK Example
388
+
389
+ ```
390
+ User: /vibe.run "brick-game" ultrawork
391
+
392
+ Claude:
393
+ πŸš€ ULTRAWORK MODE ACTIVATED
394
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
395
+
396
+ πŸ“„ SPEC: .claude/vibe/specs/brick-game.md
397
+ 🎯 4 Phases detected
398
+ ⚑ Boulder Loop: ENABLED (will continue until all phases complete)
399
+ πŸ”„ Auto-retry: ON (max 3 per phase)
400
+ πŸ’Ύ Context compression: AGGRESSIVE
401
+
402
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
403
+ πŸ”οΈ BOULDER ROLLING... Phase 1/4
404
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
405
+
406
+ ⚑ [PARALLEL] Launching 3 exploration agents...
407
+ βœ… Exploration complete (7.2s)
408
+ πŸ”¨ Implementing...
409
+ βœ… Phase 1 complete
410
+
411
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
412
+ πŸ”οΈ BOULDER ROLLING... Phase 2/4
413
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
414
+
415
+ ⚑ [PARALLEL] Launching 3 exploration agents...
416
+ βœ… Exploration complete (6.8s)
417
+ πŸ”¨ Implementing...
418
+ ❌ Test failed: collision detection
419
+ πŸ”„ Auto-retry 1/3...
420
+ πŸ”¨ Fixing...
421
+ βœ… Phase 2 complete
422
+
423
+ [...continues automatically...]
424
+
425
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
426
+ πŸŽ‰ BOULDER REACHED THE TOP!
427
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
428
+
429
+ βœ… All 4 phases complete
430
+ βœ… All acceptance criteria passed
431
+ βœ… Build succeeded
432
+ βœ… Tests passed
433
+
434
+ ⏱️ Total: 8m 24s
435
+ πŸ“Š Retries: 2
436
+ πŸ’Ύ Context saved: 3 checkpoints
437
+ ```
438
+
439
+ ### Normal vs ULTRAWORK Comparison
440
+
441
+ | Aspect | Normal | ULTRAWORK |
442
+ |--------|--------|-----------|
443
+ | Phase transition | May pause | Auto-continues |
444
+ | On error | Reports and stops | Auto-retries (3x) |
445
+ | Context 70%+ | Warning only | Auto-compress + save |
446
+ | Exploration | Sequential possible | FORCED parallel |
447
+ | Completion | Phase-by-phase | Until ALL done |
448
+
449
+ ---
450
+
451
+ ## Automation Level System
452
+
453
+ Magic keywords in the user input automatically set the **AutomationLevel**, which controls how much the AI self-advances vs. pausing for confirmation.
454
+
455
+ ### Level Definitions
456
+
457
+ | Level | Name | Keyword(s) | Auto-advance | Auto-retry | Max Retries | Parallel Agents | Checkpoints |
458
+ |-------|------|------------|--------------|------------|-------------|-----------------|-------------|
459
+ | L0 | Manual | `manual` | No | No | 0 | No | All |
460
+ | L1 | Guided | `guided`, `verify` | No | No | 0 | No | All |
461
+ | L2 | Semi-auto | `quick` (default) | Yes | Yes | 2 | No | Key points |
462
+ | L3 | Auto | `ultrawork`, `ulw` | Yes | Yes | 3 | Yes | Checkpoint-only |
463
+ | L4 | Full-auto | `ralph`, `ralplan` | Yes | Yes | 5 | Yes | None |
464
+
465
+ ### Detection Rule
466
+
467
+ The AI detects automation level from word boundaries in the user's input:
468
+
469
+ ```
470
+ /vibe.run "login" β†’ L2 Semi-auto (default)
471
+ /vibe.run "login" ultrawork β†’ L3 Auto
472
+ /vibe.run "login" ralph β†’ L4 Full-auto
473
+ /vibe.run "login" verify β†’ L1 Guided
474
+ ```
475
+
476
+ ### Confirmation Matrix
477
+
478
+ Certain action types require user confirmation depending on the active level:
479
+
480
+ | Action | L0 | L1 | L2 | L3 | L4 |
481
+ |--------|----|----|----|----|-----|
482
+ | `destructive` | confirm | confirm | confirm | confirm | auto |
483
+ | `architecture_choice` | confirm | confirm | confirm | auto | auto |
484
+ | `implementation_scope` | confirm | confirm | confirm | auto | auto |
485
+ | `phase_advance` | confirm | confirm | auto | auto | auto |
486
+ | `fix_strategy` | confirm | confirm | auto | auto | auto |
487
+ | `retry` | confirm | auto | auto | auto | auto |
488
+
489
+ **Rule**: When confirmation is required, pause and display a checkpoint before proceeding.
490
+
491
+ ---
492
+
493
+ ## Interactive Checkpoints
494
+
495
+ Checkpoints are decision gates inserted at critical points in the workflow. At L3/L4, most checkpoints are **auto-resolved** using the default option.
496
+
497
+ ### Checkpoint Types
498
+
499
+ | Type | When It Fires | Default Option |
500
+ |------|--------------|----------------|
501
+ | `requirements_confirm` | Before starting Phase 1 | Confirm (a) |
502
+ | `architecture_choice` | When architecture approach is ambiguous | Clean/balanced (b) |
503
+ | `implementation_scope` | Before any large scope change (6+ files) | Approve (a) |
504
+ | `verification_result` | After each VerificationLoop iteration below threshold | Continue fixing (a) |
505
+ | `fix_strategy` | When critical issues are found during quality gate | Fix all (a) |
506
+
507
+ ### Checkpoint Format
508
+
509
+ When a checkpoint fires, display it in this format:
510
+
511
+ ```
512
+ ──────────────────────────────────────────────────
513
+ CHECKPOINT: Requirements Confirmation
514
+ ──────────────────────────────────────────────────
515
+ Feature: login
516
+
517
+ Requirements:
518
+ 1. User can log in with email and password
519
+ 2. Invalid credentials show an error message
520
+ 3. Remember me persists session for 30 days
521
+
522
+ Options:
523
+ a) Confirm
524
+ Proceed with these requirements as stated.
525
+ b) Revise
526
+ Modify or clarify requirements before proceeding.
527
+ c) Abort
528
+ Cancel this workflow.
529
+
530
+ Default: a
531
+ ──────────────────────────────────────────────────
532
+ ```
533
+
534
+ ### Auto-Resolution (L3/L4)
535
+
536
+ At automation levels L3 and L4, checkpoints that do not require confirmation are auto-resolved:
537
+
538
+ ```
539
+ [AUTO] CHECKPOINT: implementation_scope β†’ option a (Approve) [auto-resolved]
540
+ ```
541
+
542
+ ---
543
+
544
+ ## Rules Reference
545
+
546
+ **Must follow `~/.claude/vibe/rules/` (global):**
547
+
548
+ - `core/development-philosophy.md` - Surgical precision, modify only requested scope
549
+ - `core/quick-start.md` - Korean, DRY, SRP, YAGNI
550
+ - `standards/complexity-metrics.md` - Functions ≀20 lines, nesting ≀3 levels
551
+ - `quality/checklist.md` - Code quality checklist
552
+
553
+ **Language guide:** `~/.claude/vibe/languages/{stack}.md` (global reference)
554
+
555
+ ---
556
+
557
+ ## Coding Guidelines (Mandatory)
558
+
559
+ ### Type Safety: Use Types Explicitly
560
+
561
+ > **Core Principle**: Use types explicitly in every language that has a type system!
562
+
563
+ Type definitions are not just language syntax β€” they are a **core engineering philosophy for simplifying and controlling complex software**.
564
+
565
+ ### Applies to ALL Typed Languages
566
+
567
+ | Category | Languages | Key Principle |
568
+ |----------|-----------|---------------|
569
+ | **Static Typed** | Java, C#, C++, Go, Rust, Swift, Kotlin, Scala | Types = compile-time contracts |
570
+ | **Gradual Typed** | TypeScript, Python (typing), PHP (typed), Ruby (RBS) | Types = optional safety nets |
571
+ | **Functional** | Haskell, OCaml, F#, Elm | Types = logical proofs |
572
+
573
+ ### Universal Anti-Patterns (All Languages)
574
+
575
+ | ❌ Forbidden Pattern | Why | βœ… Instead |
576
+ |---------------------|-----|-----------|
577
+ | Type escape hatches (`any`, `Any`, `Object`, `void*`, `interface{}`) | Loses type info, runtime errors | Concrete types or `unknown` + guards |
578
+ | Type suppression (`@ts-ignore`, `# type: ignore`, `@SuppressWarnings`) | Hides errors | Fix actual type issues |
579
+ | Raw generic types (`List`, `Map` without params) | Loses type safety | `List<User>`, `Map<String, Order>` |
580
+ | Excessive casting (`as`, `(Type)`, `unsafe`) | Bypasses compiler | Type guards or pattern matching |
581
+
582
+ ### Language-Specific Guidelines
583
+
584
+ **TypeScript/JavaScript:**
585
+ ```typescript
586
+ // ❌ BAD
587
+ function process(data: any): any { return data.foo; }
588
+
589
+ // βœ… GOOD
590
+ function process(data: unknown): Result {
591
+ if (isValidData(data)) return data.foo;
592
+ throw new Error('Invalid');
593
+ }
594
+ ```
595
+
596
+ **Python:**
597
+ ```python
598
+ # ❌ BAD
599
+ def process(data: Any) -> Any: return data["key"]
600
+
601
+ # βœ… GOOD
602
+ def process(data: UserData) -> str: return data["name"]
603
+ ```
604
+
605
+ **Java/Kotlin:**
606
+ ```java
607
+ // ❌ BAD
608
+ List items = new ArrayList(); // Raw type
609
+ Object data = getData(); // Lost type info
610
+
611
+ // βœ… GOOD
612
+ List<User> users = new ArrayList<>();
613
+ User user = getUser();
614
+ ```
615
+
616
+ **Go:**
617
+ ```go
618
+ // ❌ BAD
619
+ func process(data interface{}) interface{} { ... }
620
+
621
+ // βœ… GOOD
622
+ func process(data UserRequest) (UserResponse, error) { ... }
623
+ ```
624
+
625
+ **Rust:**
626
+ ```rust
627
+ // ❌ BAD (unnecessary unsafe or Box<dyn Any>)
628
+ let data: Box<dyn Any> = get_data();
629
+
630
+ // βœ… GOOD
631
+ let data: UserData = get_data()?;
632
+ ```
633
+
634
+ **C#:**
635
+ ```csharp
636
+ // ❌ BAD
637
+ object data = GetData();
638
+ dynamic result = Process(data);
639
+
640
+ // βœ… GOOD
641
+ UserData data = GetData();
642
+ Result result = Process(data);
643
+ ```
644
+
645
+ ### Type Safety Rules (Universal)
646
+
647
+ | Rule | Description |
648
+ |------|-------------|
649
+ | **Boundary Validation** | Validate only at system boundaries (API, JSON, user input) |
650
+ | **Internal Trust** | After validation, pass only precise types internally |
651
+ | **No Type Escape** | Never use escape hatches to "fix" type errors |
652
+ | **Explicit Signatures** | Specify types in function/method signatures |
653
+ | **Generics with Params** | Always use generics with type parameters |
654
+
655
+ ### Quality Gate: Type Violations Block Merge
656
+
657
+ | Violation | Action |
658
+ |-----------|--------|
659
+ | Type escape hatches (`any`, `Any`, `Object`, `interface{}`, etc.) | ❌ Block |
660
+ | Type suppression comments | ❌ Block |
661
+ | Raw generic types | ❌ Block |
662
+ | Missing function return types | ⚠️ Warning |
663
+ | Excessive type casting | ⚠️ Warning |
664
+
665
+ ## Description
666
+
667
+ Read PTCF structured SPEC document and execute implementation immediately.
668
+
669
+ > **PLAN, TASKS documents unnecessary** - SPEC is the executable prompt
670
+
671
+ ## Model Orchestration (Intelligent Routing)
672
+
673
+ Automatically select optimal model based on **task complexity analysis**.
674
+
675
+ ### Complexity-Based Model Selection
676
+
677
+ | Complexity Score | Model | When to Use |
678
+ |------------------|-------|-------------|
679
+ | 0-7 (Low) | **Haiku** | Simple fixes, searches, single file changes |
680
+ | 8-19 (Medium) | **Sonnet** | Standard features, 3-5 files, integrations |
681
+ | 20+ (High) | **Opus** | Architecture, security, multi-service, 6+ files |
682
+
683
+ ### Complexity Signals
684
+
685
+ The following signals increase complexity score:
686
+
687
+ | Signal | Score |
688
+ |--------|-------|
689
+ | Architecture change | +15 |
690
+ | Security implication | +12 |
691
+ | Multi-service | +8 |
692
+ | Refactoring | +12 |
693
+ | 6+ files | +15 |
694
+ | 3-5 files | +8 |
695
+ | New feature | +5 |
696
+ | Bug fix | -3 |
697
+ | Documentation | -5 |
698
+
699
+ ### Agent Tier System
700
+
701
+ Each agent has tier variants for cost optimization:
702
+
703
+ | Agent | Low (Haiku) | Medium (Sonnet) | High (Opus) |
704
+ |-------|-------------|-----------------|-------------|
705
+ | explorer | explorer-low | explorer-medium | explorer |
706
+ | implementer | implementer-low | implementer-medium | implementer |
707
+ | architect | architect-low | architect-medium | architect |
708
+
709
+ ### Task Calls by Role
710
+
711
+ | Task Type | Model | Task Parameter |
712
+ |-----------|-------|----------------|
713
+ | Simple search | Haiku | `model: "haiku"` |
714
+ | Codebase exploration | Haiku/Sonnet | Auto-selected |
715
+ | Core implementation | Sonnet | `model: "sonnet"` |
716
+ | Test writing | Haiku | `model: "haiku"` |
717
+ | Architecture decisions | Opus | Main session |
718
+ | Final review | Opus | Main session |
719
+
720
+ ### External LLM Usage (When Enabled)
721
+
722
+ When external LLMs are enabled in `.claude/vibe/config.json`:
723
+
724
+ | Role | Method | Condition |
725
+ |------|--------|-----------|
726
+ | User direct query | `gpt.question`, `gemini.question` | Hook auto-handles |
727
+ | Internal orchestration | Call global script via Bash | Claude calls directly |
728
+
729
+ **User questions (Hook auto-handles):**
730
+ - `gpt.question` - GPT architecture consultation
731
+ - `gemini.question` - Gemini Q&A/consultation
732
+
733
+ **Claude internal calls (directly via Bash):**
734
+ ```bash
735
+ # Usage: node llm-orchestrate.js <provider> <mode> [systemPrompt] [prompt]
736
+ # - If systemPrompt omitted, uses default
737
+ # - If systemPrompt is "-", uses default and treats next argument as prompt
738
+
739
+ # [LLM_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js
740
+
741
+ # GPT call (short prompt - CLI arg)
742
+ node "[LLM_SCRIPT]" gpt orchestrate-json "[question content]"
743
+
744
+ # Gemini call
745
+ node "[LLM_SCRIPT]" gemini orchestrate-json "[question content]"
746
+
747
+ # Custom system prompt usage
748
+ node "[LLM_SCRIPT]" gpt orchestrate-json "You are a code reviewer" "[question content]"
749
+
750
+ # Long prompt - use --input file (write JSON file first with Write tool)
751
+ # JSON format: {"prompt": "your prompt here"}
752
+ node "[LLM_SCRIPT]" gpt orchestrate-json --input "[SCRATCHPAD]/input.json"
753
+ ```
754
+
755
+ ### External LLM Fallback
756
+
757
+ **IMPORTANT**: When GPT/Gemini hook fails, Claude MUST handle the task directly:
758
+
759
+ **Fallback behavior**:
760
+ - Do NOT retry the external LLM call
761
+ - Claude handles the task using its own capabilities
762
+ - Continue with the implementation without interruption
763
+ - Log the fallback but don't block progress
764
+
765
+ ## Core Tools (Semantic Analysis & Memory)
766
+
767
+ Use core tools for accurate codebase understanding and session continuity.
768
+
769
+ ### Tool Invocation
770
+
771
+ All tools are called via:
772
+ ```bash
773
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.TOOL_NAME({...args}).then(r => console.log(r.content[0].text)))"
774
+ ```
775
+
776
+ ### Semantic Analysis Tools
777
+
778
+ | Tool | Purpose | Usage |
779
+ |------|---------|-------|
780
+ | `findSymbol` | Find symbol definitions | `{symbolName: 'functionName', searchPath: '.'}` |
781
+ | `findReferences` | Find all references | `{symbolName: 'functionName', searchPath: '.'}` |
782
+ | `analyzeComplexity` | Analyze code complexity | `{filePath: 'src/file.ts'}` |
783
+ | `validateCodeQuality` | Validate code quality | `{filePath: 'src/file.ts'}` |
784
+
785
+ **Example - Find symbol:**
786
+ ```bash
787
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.findSymbol({symbolName: 'login', searchPath: '.'}).then(r => console.log(r.content[0].text)))"
788
+ ```
789
+
790
+ ### Memory Tools
791
+
792
+ | Tool | Purpose | Usage |
793
+ |------|---------|-------|
794
+ | `saveMemory` | Save important decisions | `{key: 'decision-name', value: 'content', category: 'project'}` |
795
+ | `recallMemory` | Recall saved memory | `{key: 'decision-name'}` |
796
+ | `listMemories` | List all memories | `{category: 'project'}` |
797
+
798
+ **Example - Save important decision:**
799
+ ```bash
800
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/tools/index.js').then(t => t.saveMemory({key: 'auth-pattern', value: 'Using JWT with refresh tokens', category: 'project'}).then(r => console.log(r.content[0].text)))"
801
+ ```
802
+
803
+ ### Session Management (Auto via Hooks)
804
+
805
+ - **Session start**: Hook auto-calls `startSession` to restore previous context
806
+ - **Context 80%+**: Hook auto-calls `autoSaveContext` to preserve state
807
+
808
+ ## Process
809
+
810
+ ### 1. Load SPEC + Feature
811
+
812
+ **Search order (check BOTH file AND folder):**
813
+
814
+ ```
815
+ Step 1: Check if SPLIT structure exists (folder)
816
+ πŸ“ .claude/vibe/specs/{feature-name}/ β†’ Folder with _index.md + phase files
817
+ πŸ“ .claude/vibe/features/{feature-name}/ β†’ Folder with _index.feature + phase files
818
+
819
+ Step 2: If no folder, check single file
820
+ πŸ“„ .claude/vibe/specs/{feature-name}.md β†’ Single SPEC file
821
+ πŸ“„ .claude/vibe/features/{feature-name}.feature β†’ Single Feature file
822
+
823
+ Step 3: If neither exists β†’ Error
824
+ ```
825
+
826
+ **Split structure (folder) detected:**
827
+ ```
828
+ πŸ“ .claude/vibe/specs/{feature-name}/
829
+ β”œβ”€β”€ _index.md β†’ Master SPEC (read first for overview)
830
+ β”œβ”€β”€ phase-1-{name}.md β†’ Phase 1 SPEC
831
+ β”œβ”€β”€ phase-2-{name}.md β†’ Phase 2 SPEC
832
+ └── ...
833
+
834
+ πŸ“ .claude/vibe/features/{feature-name}/
835
+ β”œβ”€β”€ _index.feature β†’ Master Feature (read first for scenario overview)
836
+ β”œβ”€β”€ phase-1-{name}.feature β†’ Phase 1 scenarios
837
+ β”œβ”€β”€ phase-2-{name}.feature β†’ Phase 2 scenarios
838
+ └── ...
839
+
840
+ β†’ Load _index.md first, then load phase files in order
841
+ β†’ Execute phases sequentially (or per --phase flag)
842
+ ```
843
+
844
+ **Single file detected:**
845
+ ```
846
+ πŸ“„ .claude/vibe/specs/{feature-name}.md β†’ SPEC (structure, constraints, context)
847
+ πŸ“„ .claude/vibe/features/{feature-name}.feature β†’ Feature (scenario = implementation unit)
848
+ ```
849
+
850
+ **Error if NEITHER file NOR folder found:**
851
+ ```
852
+ ❌ SPEC not found. Searched:
853
+ - .claude/vibe/specs/{feature-name}/ (folder)
854
+ - .claude/vibe/specs/{feature-name}.md (file)
855
+
856
+ Run /vibe.spec "{feature-name}" first.
857
+ ```
858
+
859
+ ### 1-1. Phase Isolation Protocol (Large SPEC Guard)
860
+
861
+ > **Problem**: Large SPECs (3+ phases, 5+ scenarios) overflow context β€” agent drifts from SPEC by Phase 3.
862
+ > **Solution**: Load only the current phase's SPEC section. Re-anchor before each scenario.
863
+
864
+ **Phase Isolation Rules (MANDATORY for 3+ phases):**
865
+
866
+ ```
867
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
868
+ β”‚ PHASE ISOLATION PROTOCOL β”‚
869
+ β”‚ β”‚
870
+ β”‚ ❌ WRONG: Load entire SPEC β†’ implement all phases β”‚
871
+ β”‚ βœ… RIGHT: Load _index overview β†’ per-phase load β†’ implement β”‚
872
+ β”‚ β”‚
873
+ β”‚ Step A: Read _index.md (overview only β€” phase list, REQ IDs) β”‚
874
+ β”‚ Step B: For each Phase N: β”‚
875
+ β”‚ 1. RE-READ Phase N SPEC section (every time, no memory) β”‚
876
+ β”‚ 2. RE-READ Phase N Feature scenarios β”‚
877
+ β”‚ 3. Extract Phase N scope: files, scenarios, requirements β”‚
878
+ β”‚ 4. Implement Phase N scenarios β”‚
879
+ β”‚ 5. Verify Phase N β”‚
880
+ β”‚ 6. Write Phase Checkpoint β†’ .claude/vibe/checkpoints/ β”‚
881
+ β”‚ 7. DISCARD Phase N details from working memory β”‚
882
+ β”‚ Step C: Next Phase β€” go to Step B β”‚
883
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
884
+ ```
885
+
886
+ **Phase Checkpoint Format** (`.claude/vibe/checkpoints/{feature}-phase-{N}.md`):
887
+
888
+ ```markdown
889
+ # Checkpoint: {feature} Phase {N}
890
+
891
+ ## Completed
892
+ - Scenario 1: {name} βœ…
893
+ - Scenario 2: {name} βœ…
894
+
895
+ ## Files Changed
896
+ - src/auth.service.ts (added login(), validateToken())
897
+ - src/auth.controller.ts (POST /login, POST /refresh)
898
+
899
+ ## State for Next Phase
900
+ - Auth service exports: login(), logout(), validateToken(), refreshToken()
901
+ - JWT secret configured in .env (JWT_SECRET)
902
+ - Test baseline: 12 tests passing
903
+
904
+ ## Remaining Phases
905
+ - Phase {N+1}: {name} β€” {scenario count} scenarios
906
+ - Phase {N+2}: {name} β€” {scenario count} scenarios
907
+ ```
908
+
909
+ **SPEC Re-anchoring (Before EVERY scenario):**
910
+
911
+ ```
912
+ Before implementing Scenario X:
913
+ 1. Re-read the EXACT Given/When/Then from Feature file (not from memory!)
914
+ 2. Compare: "Am I about to implement what the SPEC says, or what I think it says?"
915
+ 3. If single-file SPEC: re-read only the current phase section (use line offsets)
916
+ 4. If split SPEC: re-read only phase-N-{name}.md
917
+ ```
918
+
919
+ **Scope Lock (Per Phase):**
920
+
921
+ ```
922
+ At Phase start, declare:
923
+ MODIFY: [list of files this phase will touch]
924
+ CREATE: [list of files this phase will create]
925
+ DO NOT TOUCH: everything else
926
+
927
+ If implementation requires files outside scope:
928
+ β†’ STOP. Re-read SPEC. Is this actually needed?
929
+ β†’ If yes: add to scope with explicit justification
930
+ β†’ If no: you're drifting. Return to SPEC.
931
+ ```
932
+
933
+ **Context Pressure Handling:**
934
+
935
+ | Context Level | Action |
936
+ |---------------|--------|
937
+ | < 50% | Normal execution |
938
+ | 50-70% | Save checkpoint, trim exploration results |
939
+ | 70%+ | Save checkpoint β†’ `/new` β†’ resume from checkpoint |
940
+ | Phase boundary | Always save checkpoint regardless of context level |
941
+
942
+ ### 1-2. SPEC-First Gate (Level 3: Spec = Source of Truth)
943
+
944
+ > **Principle**: SPEC is the source of truth for code. To modify code, update the SPEC first.
945
+
946
+ **When a change not in the SPEC is needed during implementation:**
947
+
948
+ ```
949
+ Discovery during implementation: "An API endpoint not in SPEC is needed"
950
+ β”‚
951
+ β”œβ”€ Already in SPEC?
952
+ β”‚ YES β†’ Implement as-is
953
+ β”‚
954
+ β”œβ”€ Not in SPEC but within SPEC scope?
955
+ β”‚ YES β†’ Add to SPEC first (Edit tool β†’ SPEC file)
956
+ β”‚ β†’ Add corresponding scenario to Feature file
957
+ β”‚ β†’ Then implement
958
+ β”‚
959
+ └─ Outside SPEC scope?
960
+ YES β†’ Record as TODO and exclude from current scope
961
+ .claude/vibe/todos/out-of-scope-{item}.md
962
+ ```
963
+
964
+ **Required when changing SPEC:**
965
+
966
+ 1. Update REQ-* IDs in SPEC file (add new requirements)
967
+ 2. Add corresponding scenarios to Feature file
968
+ 3. New REQ-* must be traceable in RTM after implementation
969
+
970
+ **Reverse direction also applies β€” when requirements change from code:**
971
+
972
+ ```
973
+ Test failure β†’ "Is this behavior correct?"
974
+ β”‚
975
+ β”œβ”€ Check SPEC β†’ If SPEC is correct, fix the code
976
+ β”‚
977
+ └─ If SPEC is wrong β†’ Fix SPEC first β†’ Then fix code
978
+ (Changing code without updating SPEC causes SPEC ↔ code drift)
979
+ ```
980
+
981
+ **Extended Git commit rules:**
982
+
983
+ - SPEC changes and code changes must be in the same commit
984
+ - Committing feature code without SPEC changes β†’ warning (except intentional refactoring)
985
+
986
+ ### 2. Extract Scenario List
987
+
988
+ Extract all Scenarios from Feature file:
989
+
990
+ ```markdown
991
+ ## Scenarios to Implement
992
+
993
+ | # | Scenario | Status |
994
+ |---|----------|--------|
995
+ | 1 | Valid login success | ⬜ |
996
+ | 2 | Invalid password error | ⬜ |
997
+ | 3 | Email format validation | ⬜ |
998
+ | 4 | Password reset link | ⬜ |
999
+
1000
+ Total: 4 scenarios
1001
+ ```
1002
+
1003
+ ### 3. Scenario-by-Scenario Implementation (Core)
1004
+
1005
+ **For each scenario**:
1006
+
1007
+ ```
1008
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1009
+ 🎯 Scenario 1/4: Valid login success
1010
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1011
+
1012
+ Given: User is registered
1013
+ When: Login with valid email and password
1014
+ Then: Login success + JWT token returned
1015
+
1016
+ [Step 1] Analyzing implementation...
1017
+ - Required files: auth.service.ts, login.controller.ts
1018
+ - Exploring related code...
1019
+
1020
+ [Step 2] Implementing...
1021
+ βœ… auth.service.ts - Added login() method
1022
+ βœ… login.controller.ts - POST /login endpoint
1023
+
1024
+ [Step 3] Verifying...
1025
+ βœ… Given: Test user creation possible
1026
+ βœ… When: Login API call succeeded
1027
+ βœ… Then: JWT token return confirmed
1028
+
1029
+ βœ… Scenario 1 passed!
1030
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1031
+ ```
1032
+
1033
+ **On failure**:
1034
+
1035
+ ```
1036
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1037
+ 🎯 Scenario 2/4: Invalid password error
1038
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1039
+
1040
+ [Step 3] Verifying...
1041
+ βœ… Given: Test user exists
1042
+ βœ… When: Login attempt with wrong password
1043
+ ❌ Then: "Invalid credentials" error message
1044
+ Actual: "Error occurred" returned
1045
+
1046
+ [Auto-fix 1/3]
1047
+ Cause: Error message not properly set
1048
+ Fix: auth.service.ts line 42
1049
+
1050
+ [Re-verify]
1051
+ βœ… Then: "Invalid credentials" error message
1052
+
1053
+ βœ… Scenario 2 passed! (1 fix)
1054
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1055
+ ```
1056
+
1057
+ ---
1058
+
1059
+ ## **CRITICAL: Parallel Sub-Agent Execution**
1060
+
1061
+ > **MUST USE PARALLEL TASK CALLS** - This is REQUIRED, not optional.
1062
+ > Sequential execution when parallel is possible = VIOLATION of this workflow.
1063
+
1064
+ ### Codex 병렬 κ΅¬ν˜„ (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
1065
+
1066
+ > **ν™œμ„±ν™” 쑰건**: Codex ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜ + 독립적인 μ‹œλ‚˜λ¦¬μ˜€ 2개 이상
1067
+ > λ―Έμ„€μΉ˜ μ‹œ κΈ°μ‘΄ Claude μ„œλΈŒμ—μ΄μ „νŠΈ λ°©μ‹μœΌλ‘œ λ™μž‘.
1068
+
1069
+ 독립적인 μ‹œλ‚˜λ¦¬μ˜€(파일 μ˜μ‘΄μ„± μ—†μŒ)λ₯Ό Codex에 μœ„μž„ν•˜μ—¬ Claude와 **병렬 κ΅¬ν˜„**:
1070
+
1071
+ ```
1072
+ /codex:rescue "Implement scenario: {scenario-name}. Files: {file-list}. Requirements: {requirements-summary}" --background
1073
+ ```
1074
+
1075
+ - ClaudeλŠ” λ‹€μŒ μ‹œλ‚˜λ¦¬μ˜€λ₯Ό **λ™μ‹œμ—** κ΅¬ν˜„
1076
+ - Codex μ™„λ£Œ μ‹œ `/codex:result`둜 κ²°κ³Ό 확인
1077
+ - 좩돌 λ°œμƒ μ‹œ Claudeκ°€ merge νŒλ‹¨
1078
+
1079
+ **μœ„μž„ κΈ°μ€€**:
1080
+ - μ‹œλ‚˜λ¦¬μ˜€ κ°„ 파일 μ˜μ‘΄μ„± μ—†μŒ (독립적)
1081
+ - μ‹œλ‚˜λ¦¬μ˜€ λ³΅μž‘λ„ 쀑간 μ΄ν•˜
1082
+ - μ˜μ‘΄μ„± μžˆλŠ” μ‹œλ‚˜λ¦¬μ˜€λŠ” Claudeκ°€ 직접 κ΅¬ν˜„
1083
+
1084
+ ### Mandatory Parallel Exploration (Phase Start)
1085
+
1086
+ **BEFORE any implementation, you MUST launch these Task calls IN PARALLEL (single message, multiple tool calls):**
1087
+
1088
+ ```
1089
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1090
+ β”‚ STEP 1: PARALLEL EXPLORATION (REQUIRED) β”‚
1091
+ β”‚ β”‚
1092
+ β”‚ Launch ALL of these in ONE message: β”‚
1093
+ β”‚ β”‚
1094
+ β”‚ Task(haiku) ─┬─→ "Analyze related files in <context>" β”‚
1095
+ β”‚ β”‚ β”‚
1096
+ β”‚ Task(haiku) ─┼─→ "Check dependencies and imports" β”‚
1097
+ β”‚ β”‚ β”‚
1098
+ β”‚ Task(haiku) ─┴─→ "Find existing patterns and conventions" β”‚
1099
+ β”‚ β”‚
1100
+ β”‚ [If GPT enabled] Bash: node "[LLM_SCRIPT]" gpt-codex orchestrate-json "[question]"
1101
+ β”‚ [If Gemini enabled] Bash: node "[LLM_SCRIPT]" gemini orchestrate-json "[question]"
1102
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1103
+ β”‚
1104
+ ↓ (wait for all to complete)
1105
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1106
+ β”‚ STEP 2: SYNTHESIZE (Opus) β”‚
1107
+ β”‚ - Review all exploration results β”‚
1108
+ β”‚ - Decide implementation approach β”‚
1109
+ β”‚ - Identify files to modify/create β”‚
1110
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1111
+ β”‚
1112
+ ↓
1113
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1114
+ β”‚ STEP 3: IMPLEMENT + BACKGROUND AGENTS (PARALLEL) β”‚
1115
+ β”‚ β”‚
1116
+ β”‚ Main Agent (sonnet): β”‚
1117
+ β”‚ └─→ Execute current phase implementation β”‚
1118
+ β”‚ β”‚
1119
+ β”‚ Background Agents (haiku, run_in_background=true): β”‚
1120
+ β”‚ β”œβ”€β†’ Task: "Prepare Phase N+1 - analyze required files" β”‚
1121
+ β”‚ β”œβ”€β†’ Task: "Pre-generate test cases for current implementation" β”‚
1122
+ β”‚ └─→ Task: "Search for related types/interfaces needed" β”‚
1123
+ β”‚ β”‚
1124
+ β”‚ [ULTRAWORK] All 4 agents run simultaneously! β”‚
1125
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1126
+ β”‚
1127
+ ↓ (main completes, check backgrounds)
1128
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1129
+ β”‚ STEP 4: TEST + PHASE PIPELINING β”‚
1130
+ β”‚ β”‚
1131
+ β”‚ Current Phase: β”‚
1132
+ β”‚ └─→ Task(haiku): Write tests using pre-generated cases β”‚
1133
+ β”‚ β”‚
1134
+ β”‚ Next Phase Prep (from background results): β”‚
1135
+ β”‚ └─→ Already have file analysis, ready to start immediately β”‚
1136
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1137
+ ```
1138
+
1139
+ ### Parallel Task Call Pattern (MUST FOLLOW)
1140
+
1141
+ **Correct - Single message with multiple parallel Tasks:**
1142
+ ```
1143
+ <message>
1144
+ Task(haiku, "Analyze src/components/ for existing patterns")
1145
+ Task(haiku, "Check package.json dependencies")
1146
+ Task(haiku, "Find usage of similar features in codebase")
1147
+ </message>
1148
+ β†’ All 3 run simultaneously, ~3x faster
1149
+ ```
1150
+
1151
+ **WRONG - Sequential calls (DO NOT DO THIS):**
1152
+ ```
1153
+ <message>Task(haiku, "Analyze...")</message>
1154
+ <message>Task(haiku, "Check...")</message>
1155
+ <message>Task(haiku, "Find...")</message>
1156
+ β†’ 3x slower, wastes time
1157
+ ```
1158
+
1159
+ ### Background Agent Pattern (ULTRAWORK) via Orchestrator
1160
+
1161
+ **Launch background agents for next phase via Orchestrator:**
1162
+ ```bash
1163
+ # Start background agent (doesn't block)
1164
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => o.runAgent('Phase 2 prep: Analyze auth API endpoints', 'phase2-prep').then(r => console.log(r.content[0].text)))"
1165
+
1166
+ # Multiple backgrounds in parallel
1167
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(async o => {
1168
+ await Promise.all([
1169
+ o.runAgent('Phase 2 prep: Analyze auth API endpoints', 'phase2-prep'),
1170
+ o.runAgent('Pre-generate test cases for login form', 'test-prep'),
1171
+ o.runAgent('Find existing validation patterns', 'pattern-finder')
1172
+ ]);
1173
+ console.log('All background agents started');
1174
+ })"
1175
+ ```
1176
+
1177
+ **Check background agent status:**
1178
+ ```bash
1179
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => console.log(o.status().content[0].text))"
1180
+ ```
1181
+
1182
+ **Get result when ready:**
1183
+ ```bash
1184
+ node -e "import('{{VIBE_PATH_URL}}/node_modules/@su-record/vibe/dist/infra/orchestrator/index.js').then(o => o.getResult('SESSION_ID').then(r => console.log(r.content[0].text)))"
1185
+ ```
1186
+
1187
+ **Why Background Agents Matter:**
1188
+
1189
+ | Without Background | With Background |
1190
+ |--------------------|-----------------|
1191
+ | Phase 1: 60s | Phase 1: 60s (+ backgrounds running) |
1192
+ | Phase 2 prep: 20s | Phase 2 prep: 0s (already done!) |
1193
+ | Phase 2: 60s | Phase 2: 60s |
1194
+ | **Total: 140s** | **Total: 120s** |
1195
+
1196
+ For 5 phases: 4 Γ— 20s saved = **80s faster**
1197
+
1198
+ ### Why Parallel Matters
1199
+
1200
+ | Approach | Time | Cache Benefit |
1201
+ |----------|------|---------------|
1202
+ | Sequential (3 Tasks) | ~30s | Cache cold on each |
1203
+ | **Parallel (3 Tasks)** | **~10s** | **Cache warmed once, shared** |
1204
+
1205
+ core ProjectCache (LRU) caches ts-morph parsing results. Parallel calls share the warmed cache.
1206
+
1207
+ ### UI/UX Design Intelligence (Auto-triggered before Phase 1)
1208
+
1209
+ > **쑰건**: SPEC λ˜λŠ” Feature에 UI/UX ν‚€μ›Œλ“œ 포함 μ‹œ μžλ™ μ‹€ν–‰
1210
+ > **λΉ„ν™œμ„±ν™”**: `.claude/vibe/config.json`에 `"uiUxAnalysis": false` μ„€μ •
1211
+
1212
+ **Phase 1 μ‹œμž‘ μ „, 2개 μ—μ΄μ „νŠΈ μžλ™ μ‹€ν–‰:**
1213
+
1214
+ | Agent | Condition | Role |
1215
+ |-------|-----------|------|
1216
+ | β‘£ ui-stack-implementer | **항상 μ‹€ν–‰** | ν”„λ ˆμž„μ›Œν¬λ³„ μ»΄ν¬λ„ŒνŠΈ κ°€μ΄λ“œλΌμΈ 제곡 |
1217
+ | β‘€ ui-dataviz-advisor | **쑰건뢀** (chart/dashboard/visualization ν‚€μ›Œλ“œ) | 차트/μ‹œκ°ν™” 라이브러리 μΆ”μ²œ |
1218
+
1219
+ **μ‹€ν–‰ 방법:**
1220
+
1221
+ ```text
1222
+ # β‘£ 항상 μ‹€ν–‰ (Haiku)
1223
+ Task(subagent_type="ui-stack-implementer",
1224
+ prompt="Provide implementation guidelines for project '{project}' using {detected_stack}. Use core_ui_stack_search for framework-specific patterns.")
1225
+
1226
+ # β‘€ 쑰건뢀 μ‹€ν–‰ (Haiku) β€” SPEC에 차트/λŒ€μ‹œλ³΄λ“œ/μ‹œκ°ν™” ν‚€μ›Œλ“œ 포함 μ‹œ
1227
+ Task(subagent_type="ui-dataviz-advisor",
1228
+ prompt="Recommend data visualization approach for project '{project}'. Use core_ui_search for chart types and react-performance patterns.")
1229
+ ```
1230
+
1231
+ **λ””μžμΈ μ‹œμŠ€ν…œ μžλ™ μ°Έμ‘°:**
1232
+ - `.claude/vibe/design-system/{project}/MASTER.md` 쑴재 μ‹œ μžλ™ λ‘œλ“œ
1233
+ - κ΅¬ν˜„ μ—μ΄μ „νŠΈκ°€ CSS λ³€μˆ˜, 폰트, 색상 νŒ”λ ˆνŠΈλ₯Ό 직접 μ°Έμ‘°
1234
+ - νŽ˜μ΄μ§€λ³„ μ˜€λ²„λΌμ΄λ“œ `pages/{page}.md` 쑴재 μ‹œ μš°μ„  적용
1235
+
1236
+ ### Phase Execution Flow (ULTRAWORK Pipeline)
1237
+
1238
+ ```
1239
+ Phase N Start
1240
+ β”‚
1241
+ β”œβ”€β†’ [PARALLEL] Task(haiku) Γ— 3: Exploration
1242
+ β”‚ - Related code analysis
1243
+ β”‚ - Dependency check
1244
+ β”‚ - Pattern discovery
1245
+ β”‚
1246
+ ↓ (all complete)
1247
+ β”‚
1248
+ β”œβ”€β†’ Opus: Synthesize and decide
1249
+ β”‚
1250
+ β”œβ”€β†’ [PARALLEL PIPELINE] ←── KEY SPEED OPTIMIZATION
1251
+ β”‚ β”‚
1252
+ β”‚ β”œβ”€β†’ Main: Task(sonnet) Implementation
1253
+ β”‚ β”‚
1254
+ β”‚ └─→ Background (run_in_background=true):
1255
+ β”‚ β”œβ”€β†’ Task(haiku): Phase N+1 file analysis
1256
+ β”‚ β”œβ”€β†’ Task(haiku): Test case preparation
1257
+ β”‚ └─→ Task(haiku): Type/interface lookup
1258
+ β”‚
1259
+ ↓ (main completes)
1260
+ β”‚
1261
+ β”œβ”€β†’ Task(haiku): Tests (uses pre-generated cases)
1262
+ β”‚
1263
+ ↓
1264
+ Phase N Complete
1265
+ β”‚
1266
+ ↓ (Background results ready - NO WAIT for Phase N+1 exploration!)
1267
+ β”‚
1268
+ Phase N+1 Start (IMMEDIATE - exploration already done!)
1269
+ ```
1270
+
1271
+ **Speed Comparison:**
1272
+
1273
+ | Mode | Phase Time | 5 Phases Total |
1274
+ |------|------------|----------------|
1275
+ | Sequential | ~2min/phase | ~10min |
1276
+ | Parallel Exploration | ~1.5min/phase | ~7.5min |
1277
+ | **ULTRAWORK Pipeline** | **~1min/phase** | **~5min** |
1278
+
1279
+ **Why Pipeline is Faster:**
1280
+ - Background agents prepare next phase WHILE current phase implements
1281
+ - No idle time between phases
1282
+ - Test cases pre-generated during implementation
1283
+ - Cache stays warm across parallel tasks
1284
+
1285
+ ---
1286
+
1287
+ ### Agent Teams β€” Dev Team
1288
+
1289
+ > **Agent Teams**: μ—μ΄μ „νŠΈλ“€μ΄ νŒ€μ„ 이루어 μ„œλ‘œ μ†Œν†΅ν•˜λ©° κ΅¬ν˜„ν•©λ‹ˆλ‹€.
1290
+ > μ„€μ •: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` + `teammateMode: in-process` (`~/.claude/settings.json` μ „μ—­ β€” postinstall μžλ™ μ„€μ •)
1291
+
1292
+ **νŒ€ ꡬ성:**
1293
+
1294
+ | νŒ€μ› | μ—­ν•  |
1295
+ |------|------|
1296
+ | architect (리더) | 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율, SPEC μ€€μˆ˜ 검증, νŒ€ ν•©μ˜ 주도 |
1297
+ | implementer | 핡심 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 κ΅¬ν˜„, architect 섀계λ₯Ό 따라 μ½”λ“œ μž‘μ„± |
1298
+ | tester | κ΅¬ν˜„ μ™„λ£Œ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±, μ‹€νŒ¨ μ‹œ implementer에 ν”Όλ“œλ°± |
1299
+ | security-reviewer | μ‹€μ‹œκ°„ λ³΄μ•ˆ 취약점 검증, λΈ”λ‘œν‚Ή 이슈 식별 |
1300
+
1301
+ **μ‹€ν–‰ μˆœμ„œ:**
1302
+
1303
+ 1. `TeamCreate(team_name="dev-{feature}")` β€” νŒ€ + 곡유 νƒœμŠ€ν¬ 리슀트 생성
1304
+ 2. 4개 νŒ€μ› 병렬 생성 β€” 각각 `Task(team_name=..., name=..., subagent_type=...)` 으둜 spawn
1305
+ 3. architectκ°€ SPEC Phaseλ₯Ό λΆ„μ„ν•˜μ—¬ κ΅¬ν˜„ κ³„νš 수립 β†’ TaskList에 μž‘μ—… 등둝
1306
+ 4. νŒ€μ›λ“€μ΄ TaskListμ—μ„œ μž‘μ—…μ„ claimν•˜κ³ , SendMessage둜 μ‹€μ‹œκ°„ ν˜‘μ—…
1307
+ 5. λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€ 검증 μ™„λ£Œ β†’ νŒ€μ› shutdown_request β†’ TeamDelete둜 정리
1308
+
1309
+ **νŒ€μ› spawn νŒ¨ν„΄:**
1310
+
1311
+ ```text
1312
+ TeamCreate(team_name="dev-{feature}", description="Implementation team for {feature} Phase {N}")
1313
+
1314
+ # 4개 병렬 spawn
1315
+ Task(team_name="dev-{feature}", name="architect", subagent_type="architect",
1316
+ prompt="κ΅¬ν˜„ νŒ€ 리더. Phase {N}의 SPEC을 λΆ„μ„ν•˜κ³  κ΅¬ν˜„ κ³„νšμ„ μˆ˜λ¦½ν•˜μ„Έμš”.
1317
+ SPEC: {spec_content}
1318
+ Feature Scenarios: {scenarios}
1319
+ μ—­ν• : 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율, νŒ€μ› κ°„ 좩돌 ν•΄κ²°, SPEC μ€€μˆ˜ 검증.
1320
+ TaskList에 κ΅¬ν˜„ μž‘μ—…μ„ λ“±λ‘ν•˜μ„Έμš”. implementerμ—κ²Œ 섀계λ₯Ό SendMessage둜 μ „λ‹¬ν•˜μ„Έμš”.
1321
+ λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€κ°€ 톡과할 λ•ŒκΉŒμ§€ νŒ€μ„ μ‘°μœ¨ν•˜μ„Έμš”.")
1322
+
1323
+ Task(team_name="dev-{feature}", name="implementer", subagent_type="implementer",
1324
+ mode="bypassPermissions",
1325
+ prompt="κ΅¬ν˜„ νŒ€ μ½”λ“œ λ‹΄λ‹Ή. SPEC: {spec_content}
1326
+ μ—­ν• : architect의 섀계λ₯Ό 따라 ν”„λ‘œλ•μ…˜ μ½”λ“œ μž‘μ„±.
1327
+ architectμ—κ²Œμ„œ 섀계λ₯Ό λ°›μœΌλ©΄ κ΅¬ν˜„μ„ μ‹œμž‘ν•˜μ„Έμš”.
1328
+ μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„ μ™„λ£Œ μ‹œ testerμ—κ²Œ SendMessage둜 ν…ŒμŠ€νŠΈ μš”μ²­ν•˜μ„Έμš”.
1329
+ security-reviewer의 λΈ”λ‘œν‚Ή μ΄μŠˆλŠ” μ¦‰μ‹œ μˆ˜μ •ν•˜μ„Έμš”.
1330
+ TaskListμ—μ„œ κ΅¬ν˜„ μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1331
+
1332
+ Task(team_name="dev-{feature}", name="tester", subagent_type="tester",
1333
+ mode="bypassPermissions",
1334
+ prompt="κ΅¬ν˜„ νŒ€ ν…ŒμŠ€νŠΈ λ‹΄λ‹Ή. SPEC: {spec_content}
1335
+ μ—­ν• : implementerκ°€ μ™„λ£Œν•œ μ»΄ν¬λ„ŒνŠΈλΆ€ν„° μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±.
1336
+ κ΅¬ν˜„ 전체λ₯Ό 기닀리지 말고 μ»΄ν¬λ„ŒνŠΈ λ‹¨μœ„λ‘œ 점진적 ν…ŒμŠ€νŠΈν•˜μ„Έμš”.
1337
+ ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ implementerμ—κ²Œ SendMessage둜 ν”Όλ“œλ°±ν•˜μ„Έμš”.
1338
+ edge case 발견 μ‹œ architectμ—κ²Œ 섀계 κ²€ν† λ₯Ό μš”μ²­ν•˜μ„Έμš”.
1339
+ TaskListμ—μ„œ ν…ŒμŠ€νŠΈ μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1340
+
1341
+ Task(team_name="dev-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1342
+ mode="bypassPermissions",
1343
+ prompt="κ΅¬ν˜„ νŒ€ λ³΄μ•ˆ λ‹΄λ‹Ή. SPEC: {spec_content}
1344
+ μ—­ν• : κ΅¬ν˜„ μ½”λ“œμ˜ λ³΄μ•ˆ 취약점 μ‹€μ‹œκ°„ 검증.
1345
+ λ³΄μ•ˆ μ΄μŠˆλŠ” BLOCKING β€” implementerμ—κ²Œ SendMessage둜 μ¦‰μ‹œ μˆ˜μ • μš”μ²­ν•˜μ„Έμš”.
1346
+ μ‹¬κ°ν•œ 섀계 결함 발견 μ‹œ architectμ—κ²Œ SendMessage둜 μ•Œλ¦¬μ„Έμš”.
1347
+ TaskListμ—μ„œ λ³΄μ•ˆ 검증 μž‘μ—…μ„ claimν•˜μ„Έμš”.")
1348
+ ```
1349
+
1350
+ **νŒ€μ› κ°„ 톡신 μ˜ˆμ‹œ:**
1351
+
1352
+ ```text
1353
+ architect β†’ implementer: "Repository νŒ¨ν„΄μœΌλ‘œ 데이터 μ ‘κ·Ό 계측 λΆ„λ¦¬ν•΄μ„œ κ΅¬ν˜„ν•΄μ£Όμ„Έμš”. μΈν„°νŽ˜μ΄μŠ€λŠ” TaskList에 λ“±λ‘ν–ˆμŠ΅λ‹ˆλ‹€"
1354
+ implementer β†’ tester: "LoginService κ΅¬ν˜„ μ™„λ£Œ. 정상/μ‹€νŒ¨/잠금 μ‹œλ‚˜λ¦¬μ˜€ ν…ŒμŠ€νŠΈ μš”μ²­ν•©λ‹ˆλ‹€"
1355
+ security-reviewer β†’ implementer: "SQL injection μœ„ν—˜: raw query μ‚¬μš© 감지. parameterized query둜 μ¦‰μ‹œ μˆ˜μ • ν•„μš”"
1356
+ tester β†’ architect: "edge case 3건 μ‹€νŒ¨ (빈 μž…λ ₯, 특수문자, λ™μ‹œ μš”μ²­). 섀계 κ²€ν†  μš”μ²­ν•©λ‹ˆλ‹€"
1357
+ architect β†’ broadcast: "Phase {N} λͺ¨λ“  μ‹œλ‚˜λ¦¬μ˜€ 톡과 확인. κ΅¬ν˜„ μ™„λ£Œν•©λ‹ˆλ‹€"
1358
+ ```
1359
+
1360
+ **νŒ€ λͺ¨λ“œ vs κΈ°μ‘΄ 병렬 λͺ¨λ“œ 비ꡐ:**
1361
+
1362
+ | μΈ‘λ©΄ | κΈ°μ‘΄ 병렬 λͺ¨λ“œ | Agent Teams |
1363
+ |------|---------------|-------------|
1364
+ | 톡신 | 결과만 μˆ˜μ§‘ | μ‹€μ‹œκ°„ μƒν˜Έ ν”Όλ“œλ°± |
1365
+ | ν…ŒμŠ€νŠΈ | κ΅¬ν˜„ ν›„ 별도 단계 | κ΅¬ν˜„κ³Ό λ™μ‹œ μ§„ν–‰ |
1366
+ | λ³΄μ•ˆ | 사후 리뷰 | μ‹€μ‹œκ°„ 검증 |
1367
+ | 섀계 λ³€κ²½ | 메인 μ—μ΄μ „νŠΈλ§Œ κ²°μ • | architect 주도 νŒ€ ν•©μ˜ |
1368
+ | 였λ₯˜ 볡ꡬ | μž¬μ‹œλ„ 루프 | νŒ€ λ‚΄ μ¦‰μ‹œ ν”Όλ“œλ°± |
1369
+
1370
+ **ν™œμ„±ν™” 쑰건 (Dev Team Full β€” 4λͺ…):**
1371
+ - ULTRAWORK λͺ¨λ“œ + 3개 이상 μ‹œλ‚˜λ¦¬μ˜€
1372
+ - λ˜λŠ” λ³΅μž‘λ„ 점수 20+ (High)
1373
+
1374
+ ### Agent Teams β€” Lite Team (Normal Mode)
1375
+
1376
+ > **일반 λͺ¨λ“œμ—μ„œλ„ νŒ€ ν˜‘μ—…**. Dev Team의 μΆ•μ†Œ λ²„μ „μœΌλ‘œ, 3개 이상 μ‹œλ‚˜λ¦¬μ˜€ μ‹œ μžλ™ ν™œμ„±ν™”.
1377
+ > security-reviewerλ₯Ό μ œμ™Έν•œ architect + implementer + tester 3λͺ… ꡬ성.
1378
+
1379
+ **νŒ€ ꡬ성:**
1380
+
1381
+ | νŒ€μ› | μ—­ν•  |
1382
+ |------|------|
1383
+ | architect (리더) | 섀계 κ²°μ •, μ‹œλ‚˜λ¦¬μ˜€ 뢄석, κ΅¬ν˜„ λ°©ν–₯ 쑰율 |
1384
+ | implementer | 핡심 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 κ΅¬ν˜„ |
1385
+ | tester | κ΅¬ν˜„ μ™„λ£Œ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±, μ‹€νŒ¨ μ‹œ ν”Όλ“œλ°± |
1386
+
1387
+ **spawn νŒ¨ν„΄:**
1388
+
1389
+ ```text
1390
+ TeamCreate(team_name="lite-{feature}", description="Lite implementation team for {feature} Phase {N}")
1391
+
1392
+ Task(team_name="lite-{feature}", name="architect", subagent_type="architect",
1393
+ prompt="Lite νŒ€ 리더. Phase {N}의 SPEC을 λΆ„μ„ν•˜κ³  κ΅¬ν˜„ κ³„νšμ„ μˆ˜λ¦½ν•˜μ„Έμš”.
1394
+ SPEC: {spec_content}
1395
+ Feature Scenarios: {scenarios}
1396
+ μ—­ν• : 섀계 κ²°μ •, κ΅¬ν˜„ λ°©ν–₯ 쑰율. TaskList에 μž‘μ—…μ„ λ“±λ‘ν•˜μ„Έμš”.
1397
+ implementerμ—κ²Œ 섀계λ₯Ό SendMessage둜 μ „λ‹¬ν•˜μ„Έμš”.")
1398
+
1399
+ Task(team_name="lite-{feature}", name="implementer", subagent_type="implementer",
1400
+ mode="bypassPermissions",
1401
+ prompt="Lite νŒ€ μ½”λ“œ λ‹΄λ‹Ή. SPEC: {spec_content}
1402
+ μ—­ν• : architect의 섀계λ₯Ό 따라 ν”„λ‘œλ•μ…˜ μ½”λ“œ μž‘μ„±.
1403
+ μ™„λ£Œ μ‹œ testerμ—κ²Œ SendMessage둜 ν…ŒμŠ€νŠΈ μš”μ²­ν•˜μ„Έμš”.")
1404
+
1405
+ Task(team_name="lite-{feature}", name="tester", subagent_type="tester",
1406
+ mode="bypassPermissions",
1407
+ prompt="Lite νŒ€ ν…ŒμŠ€νŠΈ λ‹΄λ‹Ή. SPEC: {spec_content}
1408
+ μ—­ν• : implementerκ°€ μ™„λ£Œν•œ μ»΄ν¬λ„ŒνŠΈλΆ€ν„° μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μž‘μ„±.
1409
+ ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ implementerμ—κ²Œ SendMessage둜 ν”Όλ“œλ°±ν•˜μ„Έμš”.")
1410
+ ```
1411
+
1412
+ **ν™œμ„±ν™” 쑰건 (Lite Team β€” 3λͺ…):**
1413
+ - 일반 λͺ¨λ“œ + 3개 이상 μ‹œλ‚˜λ¦¬μ˜€
1414
+ - λ³΅μž‘λ„ 점수 8-19 (Medium)
1415
+ - λ‹¨μˆœ κ΅¬ν˜„(1-2 파일, μ‹œλ‚˜λ¦¬μ˜€ 2개 μ΄ν•˜)μ—μ„œλŠ” κΈ°μ‘΄ 병렬 λͺ¨λ“œ μœ μ§€
1416
+
1417
+ **νŒ€ 선택 κΈ°μ€€:**
1418
+
1419
+ | 쑰건 | νŒ€ |
1420
+ |------|-----|
1421
+ | μ‹œλ‚˜λ¦¬μ˜€ 1-2개, 파일 1-2개 | κΈ°μ‘΄ 병렬 λͺ¨λ“œ (νŒ€ μ—†μŒ) |
1422
+ | μ‹œλ‚˜λ¦¬μ˜€ 3개+, 일반 λͺ¨λ“œ | **Lite Team (3λͺ…)** |
1423
+ | ULTRAWORK λ˜λŠ” λ³΅μž‘λ„ 20+ | Dev Team Full (4λͺ…) |
1424
+
1425
+ ### Agent Teams β€” Review Team
1426
+
1427
+ > P1/P2 이슈 ꡐ차 검증을 μœ„ν•œ λ³΄μ•ˆ+μ•„ν‚€ν…μ²˜+μ„±λŠ₯+λ‹¨μˆœμ„± μ „λ¬Έ 리뷰 νŒ€.
1428
+ > `/vibe.review` μ‹œ P1/P2 μ΄μŠˆκ°€ 발견되면 μžλ™ ν™œμ„±ν™”.
1429
+
1430
+ **νŒ€ ꡬ성:**
1431
+
1432
+ | νŒ€μ› | μ—­ν•  |
1433
+ |------|------|
1434
+ | security-reviewer (리더) | λ³΄μ•ˆ 이슈 μš°μ„ μˆœμœ„ κ²°μ •, ꡐ차 검증 주도, μ˜€νƒ 제거 |
1435
+ | architecture-reviewer | μ•„ν‚€ν…μ²˜ μœ„λ°˜ 검증, 섀계 νŒ¨ν„΄ 평가 |
1436
+ | performance-reviewer | μ„±λŠ₯ 병λͺ© 검증, N+1 쿼리/λ©”λͺ¨λ¦¬ λˆ„μˆ˜ 확인 |
1437
+ | simplicity-reviewer | κ³Όλ„ν•œ λ³΅μž‘μ„± 검증, λΆˆν•„μš”ν•œ 좔상화 식별 |
1438
+
1439
+ **spawn νŒ¨ν„΄:**
1440
+
1441
+ ```text
1442
+ TeamCreate(team_name="review-{feature}", description="Cross-validation review team for {feature}")
1443
+
1444
+ Task(team_name="review-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1445
+ mode="bypassPermissions",
1446
+ prompt="Review team leader. Cross-validate P1/P2 issues found in parallel review.
1447
+ Files: {changed_files}
1448
+ Found issues: {p1_p2_issues}
1449
+ Role: Verify each P1/P2 issue is genuine (not false positive). Prioritize by actual impact.
1450
+ Send disputed findings to relevant reviewer for confirmation via SendMessage.")
1451
+
1452
+ Task(team_name="review-{feature}", name="architecture-reviewer", subagent_type="architecture-reviewer",
1453
+ mode="bypassPermissions",
1454
+ prompt="Review team architecture expert. Validate architecture-related findings.
1455
+ Files: {changed_files}
1456
+ Role: Confirm or dispute architecture violations. Check SOLID principles and layer boundaries.")
1457
+
1458
+ Task(team_name="review-{feature}", name="performance-reviewer", subagent_type="performance-reviewer",
1459
+ mode="bypassPermissions",
1460
+ prompt="Review team performance expert. Validate performance-related findings.
1461
+ Files: {changed_files}
1462
+ Role: Confirm or dispute performance issues. Run complexity analysis on flagged code.")
1463
+
1464
+ Task(team_name="review-{feature}", name="simplicity-reviewer", subagent_type="simplicity-reviewer",
1465
+ mode="bypassPermissions",
1466
+ prompt="Review team simplicity advocate. Challenge over-engineering findings.
1467
+ Files: {changed_files}
1468
+ Role: Verify YAGNI violations. Confirm or dispute unnecessary abstraction flags.")
1469
+ ```
1470
+
1471
+ **νŒ€μ› κ°„ 톡신 μ˜ˆμ‹œ:**
1472
+
1473
+ ```text
1474
+ security-reviewer β†’ architecture-reviewer: "SQL injection finding in users.py:42 β€” is this pattern used elsewhere?"
1475
+ architecture-reviewer β†’ security-reviewer: "Confirmed. Same pattern in orders.py:78. Elevate to P1."
1476
+ performance-reviewer β†’ security-reviewer: "N+1 query finding is false positive β€” already uses prefetch_related."
1477
+ security-reviewer β†’ broadcast: "Review complete. 2 P1 confirmed, 1 P2 downgraded to P3."
1478
+ ```
1479
+
1480
+ **ν™œμ„±ν™” 쑰건:**
1481
+
1482
+ - `/vibe.review` μ‹€ν–‰ ν›„ P1 λ˜λŠ” P2 이슈 2개 이상 발견 μ‹œ
1483
+ - Agent Teams ν™˜κ²½λ³€μˆ˜ ν™œμ„±ν™” μƒνƒœ
1484
+
1485
+ ### Agent Teams β€” Debug Team
1486
+
1487
+ > λΉŒλ“œ/ν…ŒμŠ€νŠΈ μ‹€νŒ¨ μ‹œ μ•„ν‚€ν…νŠΈ 진단 β†’ κ΅¬ν˜„μž μˆ˜μ • β†’ ν…ŒμŠ€ν„° 검증 사이클.
1488
+ > UltraQA 3회 μ‹€νŒ¨ μ§„μž… μ‹œ λ˜λŠ” λΉŒλ“œ μ‹€νŒ¨ 3회+ μ‹œ μžλ™ ν™œμ„±ν™”.
1489
+
1490
+ **νŒ€ ꡬ성:**
1491
+
1492
+ | νŒ€μ› | μ—­ν•  |
1493
+ |------|------|
1494
+ | architect (리더) | κ·Όλ³Έ 원인 진단, μˆ˜μ • λ°©ν–₯ 섀계, μ•„ν‚€ν…μ²˜ 레벨 문제 식별 |
1495
+ | implementer | architect 진단에 따라 μ΅œμ†Œ diff μˆ˜μ • 적용 |
1496
+ | tester | μˆ˜μ • ν›„ μ¦‰μ‹œ ν…ŒμŠ€νŠΈ μ‹€ν–‰, νšŒκ·€ 검증 |
1497
+
1498
+ **spawn νŒ¨ν„΄:**
1499
+
1500
+ ```text
1501
+ TeamCreate(team_name="debug-{feature}", description="Debug team for {feature} build/test failure")
1502
+
1503
+ Task(team_name="debug-{feature}", name="architect", subagent_type="architect",
1504
+ prompt="Debug team leader. Diagnose root cause of build/test failure.
1505
+ Error: {error_output}
1506
+ Failed files: {failed_files}
1507
+ Previous attempts: {attempt_history}
1508
+ Role: Analyze error, identify root cause (not symptoms). Design minimal fix.
1509
+ Send diagnosis to implementer via SendMessage. If same failure 3x, escalate to user.")
1510
+
1511
+ Task(team_name="debug-{feature}", name="implementer", subagent_type="implementer",
1512
+ mode="bypassPermissions",
1513
+ prompt="Debug team fixer. Apply minimal-diff fixes based on architect diagnosis.
1514
+ Role: Wait for architect diagnosis. Apply ONLY the specific fix recommended.
1515
+ Do NOT refactor surrounding code. Notify tester when fix is applied.")
1516
+
1517
+ Task(team_name="debug-{feature}", name="tester", subagent_type="tester",
1518
+ mode="bypassPermissions",
1519
+ prompt="Debug team verifier. Run tests after each fix to verify resolution.
1520
+ Role: Wait for implementer fix notification. Run failing tests.
1521
+ Report results to architect. If still failing, provide detailed error output.")
1522
+ ```
1523
+
1524
+ **ν™œμ„±ν™” 쑰건:**
1525
+
1526
+ - 동일 λΉŒλ“œ/ν…ŒμŠ€νŠΈ μ‹€νŒ¨ 3회 이상
1527
+ - UltraQA `architecture_question` μƒνƒœ μ§„μž… μ‹œ
1528
+
1529
+ ### Agent Teams β€” Research Team
1530
+
1531
+ > `/vibe.spec` Step 3 λ¦¬μ„œμΉ˜ λ‹¨κ³„μ—μ„œ 4개 μ „λ¬Έ λ¦¬μ„œμΉ˜ μ—μ΄μ „νŠΈκ°€ νŒ€μœΌλ‘œ ν˜‘μ—….
1532
+ > λ¦¬μ„œμΉ˜ κ²°κ³Ό ꡐ차 검증 및 좩돌 ν•΄κ²°.
1533
+
1534
+ **νŒ€ ꡬ성:**
1535
+
1536
+ | νŒ€μ› | μ—­ν•  |
1537
+ |------|------|
1538
+ | best-practices-agent (리더) | 베슀트 ν”„λž™ν‹°μŠ€ μˆ˜μ§‘, λ¦¬μ„œμΉ˜ 톡합, 좩돌 ν•΄κ²° |
1539
+ | security-advisory-agent | λ³΄μ•ˆ 취약점 쑰사, CVE 확인, λ³΄μ•ˆ ꢌμž₯사항 |
1540
+ | codebase-patterns-agent | κΈ°μ‘΄ μ½”λ“œλ² μ΄μŠ€ νŒ¨ν„΄ 뢄석, μœ μ‚¬ κ΅¬ν˜„ μ°Έμ‘° |
1541
+ | framework-docs-agent | ν”„λ ˆμž„μ›Œν¬ μ΅œμ‹  λ¬Έμ„œ 확인, API 변경사항 좔적 |
1542
+
1543
+ **spawn νŒ¨ν„΄:**
1544
+
1545
+ ```text
1546
+ TeamCreate(team_name="research-{feature}", description="Research team for {feature} SPEC")
1547
+
1548
+ Task(team_name="research-{feature}", name="best-practices-agent", subagent_type="best-practices-agent",
1549
+ prompt="Research team leader. Coordinate research for {feature} SPEC.
1550
+ Tech stack: {tech_stack}
1551
+ Requirements: {requirements}
1552
+ Role: Collect best practices. Integrate findings from all researchers.
1553
+ Resolve conflicting recommendations. Produce unified research summary.")
1554
+
1555
+ Task(team_name="research-{feature}", name="security-advisory-agent", subagent_type="security-advisory-agent",
1556
+ prompt="Research team security specialist. Check security advisories for {feature}.
1557
+ Tech stack: {tech_stack}
1558
+ Role: Check CVEs for dependencies. Identify security patterns to follow.
1559
+ Share findings with best-practices-agent for integration.")
1560
+
1561
+ Task(team_name="research-{feature}", name="codebase-patterns-agent", subagent_type="codebase-patterns-agent",
1562
+ prompt="Research team codebase analyst. Analyze existing patterns for {feature}.
1563
+ Project path: {project_path}
1564
+ Role: Find similar implementations in codebase. Extract conventions and patterns.
1565
+ Share findings with best-practices-agent.")
1566
+
1567
+ Task(team_name="research-{feature}", name="framework-docs-agent", subagent_type="framework-docs-agent",
1568
+ prompt="Research team docs specialist. Check latest framework docs for {feature}.
1569
+ Tech stack: {tech_stack}
1570
+ Role: Verify API usage against latest docs. Check for breaking changes.
1571
+ Share findings with best-practices-agent.")
1572
+ ```
1573
+
1574
+ **ν™œμ„±ν™” 쑰건:**
1575
+
1576
+ - `/vibe.spec` Step 3 λ¦¬μ„œμΉ˜ 단계
1577
+ - Agent Teams ν™˜κ²½λ³€μˆ˜ ν™œμ„±ν™” μƒνƒœ
1578
+
1579
+ ### Agent Teams β€” Security Team
1580
+
1581
+ > λ³΄μ•ˆ 민감 μ½”λ“œ λ³€κ²½ μ‹œ μ „λ¬Έ λ³΄μ•ˆ 검증 νŒ€.
1582
+ > 인증, κΆŒν•œ, 결제, κ°œμΈμ •λ³΄ κ΄€λ ¨ μ½”λ“œ λ³€κ²½ 감지 μ‹œ μžλ™ ν™œμ„±ν™”.
1583
+
1584
+ **νŒ€ ꡬ성:**
1585
+
1586
+ | νŒ€μ› | μ—­ν•  |
1587
+ |------|------|
1588
+ | security-reviewer (리더) | OWASP Top 10 검증, λ³΄μ•ˆ 이슈 μš°μ„ μˆœμœ„ κ²°μ • |
1589
+ | data-integrity-reviewer | 데이터 무결성, νŠΈλžœμž­μ…˜ 관리, μž…λ ₯ 검증 |
1590
+ | security-advisory-agent | μ‚¬μš© 라이브러리 CVE 확인, λ³΄μ•ˆ 패치 확인 |
1591
+ | tester | λ³΄μ•ˆ ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€ μž‘μ„±, 침투 ν…ŒμŠ€νŠΈ μ‹œλ‚˜λ¦¬μ˜€ 검증 |
1592
+
1593
+ **spawn νŒ¨ν„΄:**
1594
+
1595
+ ```text
1596
+ TeamCreate(team_name="security-{feature}", description="Security audit team for {feature}")
1597
+
1598
+ Task(team_name="security-{feature}", name="security-reviewer", subagent_type="security-reviewer",
1599
+ mode="bypassPermissions",
1600
+ prompt="Security team leader. Comprehensive security audit for {feature}.
1601
+ Files: {changed_files}
1602
+ Role: OWASP Top 10 check. XSS, CSRF, SQL injection, auth bypass.
1603
+ Coordinate with data-integrity-reviewer for data flow analysis.
1604
+ Any P1 finding blocks merge β€” notify team immediately.")
1605
+
1606
+ Task(team_name="security-{feature}", name="data-integrity-reviewer", subagent_type="data-integrity-reviewer",
1607
+ mode="bypassPermissions",
1608
+ prompt="Security team data specialist. Verify data integrity for {feature}.
1609
+ Files: {changed_files}
1610
+ Role: Check transaction management, input validation, data sanitization.
1611
+ Report findings to security-reviewer.")
1612
+
1613
+ Task(team_name="security-{feature}", name="security-advisory-agent", subagent_type="security-advisory-agent",
1614
+ prompt="Security team advisory specialist. Check dependencies for {feature}.
1615
+ Role: Scan for known CVEs in project dependencies. Check security advisories.
1616
+ Report critical findings to security-reviewer.")
1617
+
1618
+ Task(team_name="security-{feature}", name="tester", subagent_type="tester",
1619
+ mode="bypassPermissions",
1620
+ prompt="Security team test specialist. Write security-focused tests for {feature}.
1621
+ Files: {changed_files}
1622
+ Role: Write tests for auth bypass, injection, permission escalation.
1623
+ Report test results to security-reviewer.")
1624
+ ```
1625
+
1626
+ **ν™œμ„±ν™” 쑰건:**
1627
+
1628
+ - auth, payment, user-data, crypto κ΄€λ ¨ 파일 λ³€κ²½ 감지 μ‹œ
1629
+ - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `security` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1630
+
1631
+ ### Agent Teams β€” Migration Team
1632
+
1633
+ > ν”„λ ˆμž„μ›Œν¬/라이브러리 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ „λ¬Έ νŒ€.
1634
+ > λŒ€κ·œλͺ¨ μ˜μ‘΄μ„± μ—…κ·Έλ ˆμ΄λ“œ, ν”„λ ˆμž„μ›Œν¬ μ „ν™˜ μ‹œ ν™œμ„±ν™”.
1635
+
1636
+ **νŒ€ ꡬ성:**
1637
+
1638
+ | νŒ€μ› | μ—­ν•  |
1639
+ |------|------|
1640
+ | architect (리더) | λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ μ „λž΅ 섀계, ν˜Έν™˜μ„± 뢄석, 단계별 κ³„νš |
1641
+ | implementer | μ½”λ“œ λ³€ν™˜ μ‹€ν–‰, API λ³€κ²½ 적용 |
1642
+ | tester | λ§ˆμ΄κ·Έλ ˆμ΄μ…˜ ν›„ νšŒκ·€ ν…ŒμŠ€νŠΈ, ν˜Έν™˜μ„± 검증 |
1643
+ | build-error-resolver | λΉŒλ“œ μ—λŸ¬ μ¦‰μ‹œ ν•΄κ²°, νƒ€μž… μ—λŸ¬ μˆ˜μ • |
1644
+
1645
+ **spawn νŒ¨ν„΄:**
1646
+
1647
+ ```text
1648
+ TeamCreate(team_name="migration-{feature}", description="Migration team for {feature}")
1649
+
1650
+ Task(team_name="migration-{feature}", name="architect", subagent_type="architect",
1651
+ prompt="Migration team leader. Plan migration strategy for {feature}.
1652
+ From: {current_version}
1653
+ To: {target_version}
1654
+ Role: Analyze breaking changes. Create step-by-step migration plan.
1655
+ Assign file groups to implementer. Monitor build-error-resolver for blockers.")
1656
+
1657
+ Task(team_name="migration-{feature}", name="implementer", subagent_type="implementer",
1658
+ mode="bypassPermissions",
1659
+ prompt="Migration team implementer. Execute code migration for {feature}.
1660
+ Role: Apply migration changes per architect plan. Work file-by-file.
1661
+ Notify tester after each file group. Report blockers to architect.")
1662
+
1663
+ Task(team_name="migration-{feature}", name="tester", subagent_type="tester",
1664
+ mode="bypassPermissions",
1665
+ prompt="Migration team tester. Verify migration correctness for {feature}.
1666
+ Role: Run existing tests after each migration step. Add new tests for changed APIs.
1667
+ Report regressions to implementer and architect.")
1668
+
1669
+ Task(team_name="migration-{feature}", name="build-error-resolver", subagent_type="build-error-resolver",
1670
+ mode="bypassPermissions",
1671
+ prompt="Migration team build fixer. Resolve build errors during {feature} migration.
1672
+ Role: Monitor build output. Apply minimal-diff type fixes for migration errors.
1673
+ Notify implementer of patterns requiring broader changes.")
1674
+ ```
1675
+
1676
+ **ν™œμ„±ν™” 쑰건:**
1677
+
1678
+ - package.json μ£Όμš” μ˜μ‘΄μ„± 버전 λ³€κ²½ 감지 μ‹œ
1679
+ - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `migration` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1680
+
1681
+ ### Agent Teams β€” Fullstack Team
1682
+
1683
+ > Frontend + Backend λ™μ‹œ 변경이 ν•„μš”ν•œ ν’€μŠ€νƒ κΈ°λŠ₯ κ΅¬ν˜„ νŒ€.
1684
+ > API μ—”λ“œν¬μΈνŠΈ + UI μ»΄ν¬λ„ŒνŠΈλ₯Ό λ™μ‹œμ— 개발.
1685
+
1686
+ **νŒ€ ꡬ성:**
1687
+
1688
+ | νŒ€μ› | μ—­ν•  |
1689
+ |------|------|
1690
+ | architect (리더) | API μΈν„°νŽ˜μ΄μŠ€ 섀계, frontend/backend λΆ„μ—… 쑰율 |
1691
+ | implementer-backend | Backend API, λ°μ΄ν„°λ² μ΄μŠ€, μ„œλΉ„μŠ€ 둜직 κ΅¬ν˜„ |
1692
+ | implementer-frontend | Frontend UI, μƒνƒœ 관리, API 연동 κ΅¬ν˜„ |
1693
+ | tester | E2E ν…ŒμŠ€νŠΈ, API ν…ŒμŠ€νŠΈ, 톡합 ν…ŒμŠ€νŠΈ |
1694
+
1695
+ **spawn νŒ¨ν„΄:**
1696
+
1697
+ ```text
1698
+ TeamCreate(team_name="fullstack-{feature}", description="Fullstack team for {feature}")
1699
+
1700
+ Task(team_name="fullstack-{feature}", name="architect", subagent_type="architect",
1701
+ prompt="Fullstack team leader. Design API contract for {feature}.
1702
+ SPEC: {spec_content}
1703
+ Role: Define API endpoints (request/response schemas). Design data models.
1704
+ Share API contract with both implementers. Coordinate integration timing.")
1705
+
1706
+ Task(team_name="fullstack-{feature}", name="implementer-backend", subagent_type="implementer",
1707
+ mode="bypassPermissions",
1708
+ prompt="Fullstack team backend developer. Implement API for {feature}.
1709
+ SPEC: {spec_content}
1710
+ Role: Implement API endpoints per architect's contract. Create data models and services.
1711
+ Notify implementer-frontend when endpoints are ready for integration.
1712
+ Share API response samples with tester.")
1713
+
1714
+ Task(team_name="fullstack-{feature}", name="implementer-frontend", subagent_type="implementer",
1715
+ mode="bypassPermissions",
1716
+ prompt="Fullstack team frontend developer. Implement UI for {feature}.
1717
+ SPEC: {spec_content}
1718
+ Role: Build UI components and pages per SPEC. Use architect's API contract for types.
1719
+ Start with mock data, switch to real API when backend notifies readiness.
1720
+ Notify tester when UI is ready for E2E testing.")
1721
+
1722
+ Task(team_name="fullstack-{feature}", name="tester", subagent_type="tester",
1723
+ mode="bypassPermissions",
1724
+ prompt="Fullstack team tester. Write comprehensive tests for {feature}.
1725
+ SPEC: {spec_content}
1726
+ Role: Write API tests (after backend ready). Write E2E tests (after frontend ready).
1727
+ Test API contract conformance. Report integration issues to architect.")
1728
+ ```
1729
+
1730
+ **ν™œμ„±ν™” 쑰건:**
1731
+
1732
+ - SPEC에 frontend + backend 파일이 λͺ¨λ‘ ν¬ν•¨λœ 경우
1733
+ - λ˜λŠ” μˆ˜λ™μœΌλ‘œ `fullstack` ν‚€μ›Œλ“œ μ§€μ • μ‹œ
1734
+
1735
+ ---
1736
+
1737
+ 1. **Related code analysis**: Task(haiku) explores `<context>` related code
1738
+ 2. **File creation/modification**: Task(sonnet) implements per `<output_format>`
1739
+ 3. **Constraint compliance**: Check `<constraints>`
1740
+ 4. **Run verification**: Execute verification commands
1741
+
1742
+ ### 4. Brand Assets Generation (Optional)
1743
+
1744
+ When starting a **new project** with brand context in SPEC, auto-generate app icons and favicons:
1745
+
1746
+ ```
1747
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1748
+ 🎨 BRAND ASSETS GENERATION
1749
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1750
+
1751
+ [Check] Brand assets exist? β†’ Skip if favicon.ico exists
1752
+ [Check] Gemini API configured? β†’ Required for image generation
1753
+ [Check] SPEC has brand context? β†’ Extract app name, colors, style
1754
+
1755
+ [Generate] Creating app icon with Gemini Image API...
1756
+ - Prompt: "App icon for [AppName], [style], [color]..."
1757
+ - Generated: 512x512 master icon
1758
+
1759
+ [Resize] Creating platform variants...
1760
+ βœ… favicon.ico (16/32/48)
1761
+ βœ… favicon-16x16.png
1762
+ βœ… favicon-32x32.png
1763
+ βœ… apple-touch-icon.png (180x180)
1764
+ βœ… android-chrome-192x192.png
1765
+ βœ… android-chrome-512x512.png
1766
+ βœ… site.webmanifest
1767
+
1768
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1769
+ βœ… Brand assets generated in public/
1770
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1771
+ ```
1772
+
1773
+ **SPEC Brand Context Example:**
1774
+
1775
+ ```xml
1776
+ <context>
1777
+ Brand:
1778
+ - App Name: MyApp
1779
+ - Primary Color: #2F6BFF
1780
+ - Style: Modern, minimalist, flat design
1781
+ - Icon Concept: Abstract geometric shape
1782
+ </context>
1783
+ ```
1784
+
1785
+ **Trigger Conditions:**
1786
+ - First `/vibe.run` execution (no existing icons)
1787
+ - SPEC contains brand/design context
1788
+ - Gemini API key configured (`vibe gemini auth`)
1789
+
1790
+ **Manual Generation:**
1791
+ ```bash
1792
+ # [LLM_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js
1793
+ node "[LLM_SCRIPT]" gemini image "App icon for MyApp, primary color #2F6BFF, square format 1:1, simple recognizable design, works well at small sizes, no text or letters, solid or gradient background, modern minimalist" --output "./public/app-icon.png"
1794
+ ```
1795
+
1796
+ ---
1797
+
1798
+ ### 5. Race Code Review (GPT + Gemini) + Auto-Fix (v2.6.9)
1799
+
1800
+ After all scenarios are implemented, **GPT and Gemini review in parallel with cross-validation**:
1801
+
1802
+ > **ULTRAWORK Default**: In ULTRAWORK mode, race review is automatically enabled.
1803
+
1804
+ ```
1805
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1806
+ 🏁 RACE CODE REVIEW (GPT + Gemini)
1807
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1808
+
1809
+ [Step 1] Parallel review execution...
1810
+ β”œβ”€ GPT Codex: Reviewing...
1811
+ └─ Gemini: Reviewing...
1812
+
1813
+ [Step 2] Cross-validation results:
1814
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1815
+ β”‚ Issue β”‚ GPT β”‚ Gemini β”‚ Codex β”‚ Confidenceβ”‚
1816
+ │────────────────────────────────│─────│────────│───────│───────────│
1817
+ β”‚ Timing attack in password β”‚ βœ… β”‚ βœ… β”‚ βœ… β”‚ 100% β†’ P1 β”‚
1818
+ β”‚ Rate limiting missing β”‚ βœ… β”‚ βœ… β”‚ βœ… β”‚ 100% β†’ P1 β”‚
1819
+ β”‚ Magic number usage β”‚ βœ… β”‚ ❌ β”‚ ❌ β”‚ 50% β†’ P2 β”‚
1820
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1821
+
1822
+ Summary: 3 issues (P1: 2, P2: 1)
1823
+
1824
+ [Step 3] Auto-fixing P1/P2 issues...
1825
+ βœ… auth.service.ts:24 - Applied timingSafeEqual (P1)
1826
+ βœ… auth.controller.ts:15 - Added rate limiter (P1)
1827
+ βœ… auth.service.ts:42 - Extracted constant (P2)
1828
+
1829
+ [Step 4] Re-verifying...
1830
+ βœ… Build succeeded
1831
+ βœ… Tests passed
1832
+
1833
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1834
+ βœ… Race review complete! 3 improvements (2 P1, 1 P2)
1835
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1836
+ ```
1837
+
1838
+ **Race Review Invocation (GPT + Gemini in parallel via Bash):**
1839
+
1840
+ **🚨 Use --input file to avoid CLI argument length limits and Windows pipe issues.**
1841
+
1842
+ 1. Save code to review into `[SCRATCHPAD]/review-code.txt` (using Write tool)
1843
+ 2. Write JSON input file `[SCRATCHPAD]/review-input.json` (using Write tool):
1844
+ - `{"prompt": "Review this code for security, performance, and best practices. Return JSON: {issues: [{id, title, description, severity, suggestion}]}. Code: [CODE_CONTENT]"}`
1845
+ - Where `[CODE_CONTENT]` is the code text (properly JSON-escaped inside the prompt string)
1846
+ 3. Script path: `[LLM_SCRIPT]` = `{{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js`
1847
+ 4. Run GPT + Gemini in PARALLEL (two Bash tool calls at once):
1848
+
1849
+ ```bash
1850
+ # GPT review (Bash tool call 1)
1851
+ node "[LLM_SCRIPT]" gpt orchestrate-json --input "[SCRATCHPAD]/review-input.json"
1852
+ ```
1853
+
1854
+ ```bash
1855
+ # Gemini review (Bash tool call 2 - run in parallel)
1856
+ node "[LLM_SCRIPT]" gemini orchestrate-json --input "[SCRATCHPAD]/review-input.json"
1857
+ ```
1858
+
1859
+ **Confidence-based Priority:**
1860
+
1861
+ | Confidence | Priority | Action |
1862
+ |------------|----------|--------|
1863
+ | 100% (3/3 or 2/2) | P1 | Auto-fix immediately |
1864
+ | 67% (2/3) | P1 | Auto-fix immediately |
1865
+ | 50% (1/2) or 33% (1/3) | P2 | Auto-fix with review |
1866
+
1867
+ **Fallback handling:**
1868
+ - If one LLM fails β†’ Use remaining LLM results (reduced confidence)
1869
+ - If all fail β†’ Skip and proceed (log warning)
1870
+
1871
+ **Review application rules:**
1872
+
1873
+ | Feedback Type | Action |
1874
+ |---------------|--------|
1875
+ | Security vulnerability (P1) | Auto-fix immediately |
1876
+ | Performance improvement (P1/P2) | Auto-fix immediately |
1877
+ | Best practices (P2) | Auto-fix |
1878
+ | Style/preference (P3) | Apply selectively |
1879
+
1880
+ **Conditions:**
1881
+ - **ULTRAWORK**: Race review enabled by default
1882
+ - **Normal mode**: Use `--race` flag to enable
1883
+ - Must re-verify build/tests after fixes
1884
+
1885
+ ### Codex Code Review (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
1886
+
1887
+ GPT+Gemini race와 **λ™μ‹œμ—** Codex review μ‹€ν–‰:
1888
+
1889
+ ```
1890
+ /codex:review
1891
+ ```
1892
+
1893
+ κ²°κ³Όλ₯Ό race review ꡐ차 검증에 포함 β€” 3쀑 리뷰:
1894
+
1895
+ ```markdown
1896
+ | Issue | GPT | Gemini | Codex | Confidence |
1897
+ |-------|-----|--------|-------|------------|
1898
+ | {이슈} | βœ…/❌ | βœ…/❌ | βœ…/❌ | {%} |
1899
+ ```
1900
+
1901
+ ### 6. Quality Report (Auto-generated)
1902
+
1903
+ After all scenarios complete + Gemini review, **quality report is auto-generated**:
1904
+
1905
+ ```
1906
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
1907
+ β”‚ πŸ“Š QUALITY REPORT: login β”‚
1908
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
1909
+ β”‚ β”‚
1910
+ β”‚ βœ… Scenarios: 4/4 passed β”‚
1911
+ β”‚ β”‚
1912
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
1913
+ β”‚ β”‚ # β”‚ Scenario β”‚ Status β”‚ Retries β”‚ β”‚ β”‚
1914
+ β”‚ │───│───────────────────────────│────────│─────────│ β”‚ β”‚
1915
+ β”‚ β”‚ 1 β”‚ Valid login success β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1916
+ β”‚ β”‚ 2 β”‚ Invalid password error β”‚ βœ… β”‚ 1 β”‚ β”‚ β”‚
1917
+ β”‚ β”‚ 3 β”‚ Email format validation β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1918
+ β”‚ β”‚ 4 β”‚ Password reset link β”‚ βœ… β”‚ 0 β”‚ β”‚ β”‚
1919
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
1920
+ β”‚ β”‚
1921
+ β”‚ πŸ“ˆ Quality score: 94/100 β”‚
1922
+ β”‚ β”‚
1923
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
1924
+ β”‚ β”‚ Item β”‚ Result β”‚ Notes β”‚ β”‚
1925
+ β”‚ │───────────────────│────────│─────────────────────────────│ β”‚
1926
+ β”‚ β”‚ Build β”‚ βœ… β”‚ npm run build succeeded β”‚ β”‚
1927
+ β”‚ β”‚ Tests β”‚ βœ… β”‚ 12/12 passed β”‚ β”‚
1928
+ β”‚ β”‚ Type check β”‚ βœ… β”‚ 0 errors β”‚ β”‚
1929
+ β”‚ β”‚ Complexity β”‚ βœ… β”‚ All functions ≀30 lines β”‚ β”‚
1930
+ β”‚ β”‚ Security β”‚ βœ… β”‚ 0 vulnerabilities β”‚ β”‚
1931
+ β”‚ β”‚ Race review β”‚ βœ… β”‚ 3 improvements applied β”‚ β”‚
1932
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
1933
+ β”‚ β”‚
1934
+ β”‚ ⏱️ Started: {start_time} β”‚
1935
+ β”‚ ⏱️ Completed: {getCurrentTime κ²°κ³Ό} β”‚
1936
+ β”‚ β”‚
1937
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1938
+ ```
1939
+
1940
+ **What users should check**:
1941
+ - Scenario pass rate (4/4 = 100%)
1942
+ - Quality score (94/100)
1943
+ - Build/test status
1944
+
1945
+ **This alone is enough to trust quality.**
1946
+
1947
+ ### 7. Update Feature File
1948
+
1949
+ Auto-update scenario status:
1950
+
1951
+ ```markdown
1952
+ ## Coverage
1953
+
1954
+ | Scenario | SPEC AC | Status |
1955
+ |----------|---------|--------|
1956
+ | Valid login success | AC-1 | βœ… |
1957
+ | Invalid password error | AC-2 | βœ… |
1958
+ | Email format validation | AC-3 | βœ… |
1959
+ | Password reset link | AC-4 | βœ… |
1960
+
1961
+ **Last verified**: 2024-01-15 14:32
1962
+ **Quality score**: 94/100
1963
+ ```
1964
+
1965
+ ## TRUST 5 Principles
1966
+
1967
+ Follow during implementation:
1968
+
1969
+ | Principle | Description |
1970
+ |-----------|-------------|
1971
+ | **T**est-first | Write tests first |
1972
+ | **R**eadable | Clear code |
1973
+ | **U**nified | Consistent style |
1974
+ | **S**ecured | Consider security |
1975
+ | **T**rackable | Logging, monitoring |
1976
+
1977
+ ## Input
1978
+
1979
+ - `.claude/vibe/specs/{feature-name}.md` (PTCF SPEC)
1980
+ - `.claude/vibe/features/{feature-name}.feature` (BDD)
1981
+ - `CLAUDE.md` (project context)
1982
+
1983
+ ## Output
1984
+
1985
+ - Implemented code files
1986
+ - Test files
1987
+ - Updated SPEC document (checkmarks)
1988
+
1989
+ ## Example
1990
+
1991
+ ```
1992
+ User: /vibe.run "login"
1993
+
1994
+ Claude:
1995
+ πŸ“„ Loading SPEC: .claude/vibe/specs/login.md
1996
+ πŸ“„ Loading Feature: .claude/vibe/features/login.feature
1997
+
1998
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1999
+ πŸ“‹ Scenarios to Implement
2000
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2001
+
2002
+ | # | Scenario | Status |
2003
+ |---|----------|--------|
2004
+ | 1 | Valid login success | ⬜ |
2005
+ | 2 | Invalid password error | ⬜ |
2006
+ | 3 | Email format validation | ⬜ |
2007
+ | 4 | Password reset link | ⬜ |
2008
+
2009
+ Total: 4 scenarios
2010
+
2011
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2012
+ 🎯 Scenario 1/4: Valid login success
2013
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2014
+
2015
+ Given: User is registered
2016
+ When: Login with valid email and password
2017
+ Then: Login success + JWT token returned
2018
+
2019
+ ⚑ [PARALLEL] Exploring...
2020
+ βœ… Exploration complete (2.1s)
2021
+
2022
+ πŸ”¨ Implementing...
2023
+ βœ… auth.service.ts - Added login()
2024
+ βœ… auth.controller.ts - POST /login
2025
+
2026
+ πŸ” Verifying...
2027
+ βœ… Given: OK
2028
+ βœ… When: OK
2029
+ βœ… Then: OK
2030
+
2031
+ βœ… Scenario 1 passed!
2032
+
2033
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2034
+ 🎯 Scenario 2/4: Invalid password error
2035
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2036
+
2037
+ πŸ”¨ Implementing...
2038
+ βœ… auth.service.ts - Password validation logic
2039
+
2040
+ πŸ” Verifying...
2041
+ βœ… Given: OK
2042
+ βœ… When: OK
2043
+ ❌ Then: "Invalid credentials" error message
2044
+ Actual: "Error" returned
2045
+
2046
+ πŸ”„ Auto-fix 1/3...
2047
+ Fix: auth.service.ts line 42
2048
+
2049
+ πŸ” Re-verifying...
2050
+ βœ… Then: OK
2051
+
2052
+ βœ… Scenario 2 passed! (1 fix)
2053
+
2054
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2055
+ 🎯 Scenario 3/4: Email format validation
2056
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2057
+
2058
+ πŸ”¨ Implementing...
2059
+ πŸ” Verifying...
2060
+ βœ… Scenario 3 passed!
2061
+
2062
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2063
+ 🎯 Scenario 4/4: Password reset link
2064
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2065
+
2066
+ πŸ”¨ Implementing...
2067
+ πŸ” Verifying...
2068
+ βœ… Scenario 4 passed!
2069
+
2070
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2071
+ πŸ” GEMINI CODE REVIEW
2072
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2073
+
2074
+ πŸ“€ Sending code to Gemini...
2075
+ πŸ“ Gemini feedback:
2076
+ 1. [Security] Need timing attack prevention β†’ Fixing...
2077
+ 2. [Performance] Unnecessary DB call β†’ Fixing...
2078
+
2079
+ βœ… 2 improvements auto-applied
2080
+ πŸ” Re-verifying... βœ… Passed
2081
+
2082
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
2083
+ β”‚ πŸ“Š QUALITY REPORT: login β”‚
2084
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
2085
+ β”‚ β”‚
2086
+ β”‚ βœ… Scenarios: 4/4 passed β”‚
2087
+ β”‚ β”‚
2088
+ β”‚ | # | Scenario | Status | Retries | β”‚
2089
+ β”‚ |---|───────────────────────|───────|─────────| β”‚
2090
+ β”‚ | 1 | Valid login success | βœ… | 0 | β”‚
2091
+ β”‚ | 2 | Invalid password error| βœ… | 1 | β”‚
2092
+ β”‚ | 3 | Email format validation| βœ… | 0 | β”‚
2093
+ β”‚ | 4 | Password reset link | βœ… | 0 | β”‚
2094
+ β”‚ β”‚
2095
+ β”‚ πŸ“ˆ Quality score: 94/100 β”‚
2096
+ β”‚ Build: βœ… | Tests: βœ… | Types: βœ… | Gemini: βœ… (2 applied) β”‚
2097
+ β”‚ β”‚
2098
+ β”‚ ⏱️ Started: {start_time} β”‚
2099
+ β”‚ ⏱️ Completed: {getCurrentTime κ²°κ³Ό} β”‚
2100
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
2101
+
2102
+ πŸŽ‰ Implementation complete! All scenarios passed + Gemini review applied.
2103
+
2104
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2105
+ πŸ” AUTO REVIEW (13+ Agents)
2106
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2107
+
2108
+ ⚑ [PARALLEL] 13 expert agents reviewing...
2109
+ - security-reviewer βœ…
2110
+ - performance-reviewer βœ…
2111
+ - architecture-reviewer βœ…
2112
+ - ...
2113
+
2114
+ πŸ“‹ Review results:
2115
+ - P1 Critical: 0
2116
+ - P2 Important: 2
2117
+ - P3 Nice-to-have: 1
2118
+
2119
+ πŸ”§ Auto-fixing P2 issues...
2120
+ 1. [PERF] N+1 query β†’ Fixed
2121
+ 2. [ARCH] Circular dependency β†’ Fixed
2122
+
2123
+ βœ… Auto Review complete! 2 issues auto-resolved.
2124
+ ```
2125
+
2126
+ ### Phase-specific Execution
2127
+
2128
+ ```
2129
+ User: /vibe.run "brick-game" --phase 2
2130
+
2131
+ Claude:
2132
+ πŸ“„ Reading SPEC: .claude/vibe/specs/brick-game.md
2133
+ 🎯 Executing Phase 2 only.
2134
+
2135
+ Phase 2: Game Logic
2136
+ 1. [ ] Paddle movement implementation
2137
+ 2. [ ] Ball physics engine
2138
+ 3. [ ] Brick collision handling
2139
+ 4. [ ] Score system
2140
+ 5. [ ] Game over conditions
2141
+
2142
+ ⚑ Launching parallel exploration...
2143
+ [Task(haiku) Γ— 3 launched in parallel]
2144
+
2145
+ πŸš€ Starting implementation...
2146
+ ```
2147
+
2148
+ ## Error Handling
2149
+
2150
+ On failure:
2151
+ 1. Check error message
2152
+ 2. Review `<constraints>`
2153
+ 3. Fix code and retry
2154
+ 4. If continues to fail, report to user
2155
+
2156
+ ---
2157
+
2158
+ ## Quality Gate (Mandatory)
2159
+
2160
+ ### Implementation Quality Checklist
2161
+
2162
+ Before marking any scenario as complete, ALL items must pass:
2163
+
2164
+ | Category | Check Item | Weight |
2165
+ |----------|------------|--------|
2166
+ | **Functionality** | All Given/When/Then conditions verified | 20% |
2167
+ | **Functionality** | Edge cases handled per scenario | 10% |
2168
+ | **Code Quality** | No `any` types in TypeScript | 10% |
2169
+ | **Code Quality** | Functions ≀30 lines, nesting ≀3 levels | 10% |
2170
+ | **Code Quality** | No hardcoded values (use constants) | 5% |
2171
+ | **Security** | Input validation implemented | 10% |
2172
+ | **Security** | Authentication/authorization checked | 5% |
2173
+ | **Error Handling** | Try-catch or error states present | 10% |
2174
+ | **Error Handling** | User-friendly error messages | 5% |
2175
+ | **Testing** | Unit tests exist for core logic | 10% |
2176
+ | **Performance** | No N+1 queries or unnecessary loops | 5% |
2177
+
2178
+ ### Quality Score Calculation
2179
+
2180
+ ```
2181
+ Score = Ξ£(checked items Γ— weight) / 100
2182
+
2183
+ Grades:
2184
+ - 95-100: βœ… EXCELLENT - Ready to merge
2185
+ - 90-94: ⚠️ GOOD - Minor improvements required before merge
2186
+ - 80-89: ⚠️ FAIR - Significant improvements required
2187
+ - 0-79: ❌ POOR - Major fixes needed
2188
+ ```
2189
+
2190
+ ### Quality Gate Thresholds
2191
+
2192
+ | Gate | Minimum Score | Condition |
2193
+ |------|---------------|-----------|
2194
+ | **Scenario Complete** | 95 | Each scenario must score β‰₯95 |
2195
+ | **Phase Complete** | 95 | Average of all scenarios β‰₯95 |
2196
+ | **Feature Complete** | 95 | All phases complete + Gemini review |
2197
+
2198
+ ### Auto-Fix Triggers
2199
+
2200
+ | Issue Type | Auto-Fix Action |
2201
+ |------------|-----------------|
2202
+ | Missing error handling | Add try-catch wrapper |
2203
+ | Hardcoded values | Extract to constants file |
2204
+ | Missing input validation | Add validation schema |
2205
+ | Function too long | Suggest split points |
2206
+ | N+1 query detected | Add eager loading |
2207
+
2208
+ ### Auto-Fix μ‹€νŒ¨ μ‹œ Codex Rescue (Codex ν”ŒλŸ¬κ·ΈμΈ ν™œμ„±ν™” μ‹œ)
2209
+
2210
+ P1 auto-fixκ°€ **3회 μ‹€νŒ¨** μ‹œ, Codex에 μœ„μž„:
2211
+
2212
+ ```
2213
+ /codex:rescue "Fix P1 issue: {issue-description}. File: {file-path}. Error: {error-message}"
2214
+ ```
2215
+
2216
+ Codex μˆ˜μ • μ™„λ£Œ ν›„ μž¬κ²€μ¦. Codex도 μ‹€νŒ¨ μ‹œ TODO νŒŒμΌμ— 기둝.
2217
+
2218
+ ### Forbidden Patterns (Block Merge)
2219
+
2220
+ | Pattern | Why Forbidden | Detection |
2221
+ |---------|---------------|-----------|
2222
+ | `console.log` | Debug code in production | Regex scan |
2223
+ | `// TODO` without issue | Untracked work | Comment scan |
2224
+ | `any` type | Type safety bypass | TypeScript check |
2225
+ | `@ts-ignore` | Type error suppression | TypeScript check |
2226
+ | Empty catch blocks | Silent error swallowing | AST analysis |
2227
+ | Commented-out code | Dead code | Comment scan |
2228
+
2229
+ ---
2230
+
2231
+ ## Auto-Retrospective (Post-Implementation)
2232
+
2233
+ After ALL phases complete successfully, **automatically** perform a brief retrospective:
2234
+
2235
+ ### Retrospective Template
2236
+
2237
+ ```
2238
+ ## Retrospective: {feature-name}
2239
+
2240
+ ### What Worked
2241
+ - [List effective patterns, tools, approaches used]
2242
+
2243
+ ### What Didn't
2244
+ - [List issues, failures, unexpected blockers]
2245
+
2246
+ ### Key Decisions
2247
+ - [Important architectural or implementation decisions made during this run]
2248
+
2249
+ ### Lessons Learned
2250
+ - [Principle format: "When X, do Y because Z"]
2251
+ ```
2252
+
2253
+ ### Execution Steps
2254
+
2255
+ 1. Generate retrospective based on the implementation session
2256
+ 2. Save to `.claude/vibe/retros/{feature-name}.md`
2257
+ 3. Save key lessons via `core_save_memory` (for cross-session recall)
2258
+ 4. Update `claude-progress.txt` with final status
2259
+
2260
+ **Important:**
2261
+
2262
+ - Keep it concise (under 20 lines)
2263
+ - Focus on **project-specific** insights, not generic knowledge
2264
+ - Only save to memory if the lesson is actionable and non-obvious
2265
+
2266
+ ---
2267
+
2268
+ ## Next Step
2269
+
2270
+ ```
2271
+ /vibe.verify "brick-game"
2272
+ ```
2273
+
2274
+ ---
2275
+
2276
+ ARGUMENTS: $ARGUMENTS