@su-record/vibe 2.12.5 β†’ 2.14.0

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