@su-record/vibe 2.9.21 β†’ 2.9.23

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