@su-record/vibe 2.9.25 β†’ 2.9.32

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