@su-record/vibe 2.12.5 β 2.13.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.
- package/CLAUDE.md +8 -2
- package/README.en.md +11 -11
- package/README.md +7 -7
- package/dist/cli/postinstall/fs-utils.d.ts +23 -0
- package/dist/cli/postinstall/fs-utils.d.ts.map +1 -1
- package/dist/cli/postinstall/fs-utils.js +71 -0
- package/dist/cli/postinstall/fs-utils.js.map +1 -1
- package/dist/cli/postinstall/fs-utils.test.js +69 -1
- package/dist/cli/postinstall/fs-utils.test.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +12 -2
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/setup/CodexHooks.test.js +27 -0
- package/dist/cli/setup/CodexHooks.test.js.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +2 -2
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/infra/lib/DecisionTracer.d.ts +4 -0
- package/dist/infra/lib/DecisionTracer.d.ts.map +1 -1
- package/dist/infra/lib/DecisionTracer.js +4 -0
- package/dist/infra/lib/DecisionTracer.js.map +1 -1
- package/dist/infra/lib/LoopBreaker.d.ts +4 -0
- package/dist/infra/lib/LoopBreaker.d.ts.map +1 -1
- package/dist/infra/lib/LoopBreaker.js +4 -0
- package/dist/infra/lib/LoopBreaker.js.map +1 -1
- package/dist/infra/lib/ReviewRace.d.ts +4 -0
- package/dist/infra/lib/ReviewRace.d.ts.map +1 -1
- package/dist/infra/lib/ReviewRace.js +4 -0
- package/dist/infra/lib/ReviewRace.js.map +1 -1
- package/dist/infra/lib/SkillQualityGate.d.ts +4 -0
- package/dist/infra/lib/SkillQualityGate.d.ts.map +1 -1
- package/dist/infra/lib/SkillQualityGate.js +4 -0
- package/dist/infra/lib/SkillQualityGate.js.map +1 -1
- package/dist/infra/lib/UltraQA.d.ts +4 -0
- package/dist/infra/lib/UltraQA.d.ts.map +1 -1
- package/dist/infra/lib/UltraQA.js +4 -0
- package/dist/infra/lib/UltraQA.js.map +1 -1
- package/dist/infra/lib/VerificationLoop.d.ts +4 -0
- package/dist/infra/lib/VerificationLoop.d.ts.map +1 -1
- package/dist/infra/lib/VerificationLoop.js +4 -0
- package/dist/infra/lib/VerificationLoop.js.map +1 -1
- package/dist/infra/orchestrator/index.d.ts.map +1 -1
- package/dist/infra/orchestrator/index.js +1 -3
- package/dist/infra/orchestrator/index.js.map +1 -1
- package/dist/infra/orchestrator/parallelResearch.d.ts.map +1 -1
- package/dist/infra/orchestrator/parallelResearch.js +1 -4
- package/dist/infra/orchestrator/parallelResearch.js.map +1 -1
- package/dist/tools/convention/validateCodeQuality.d.ts.map +1 -1
- package/dist/tools/convention/validateCodeQuality.js +5 -4
- package/dist/tools/convention/validateCodeQuality.js.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts +2 -0
- package/dist/tools/spec/traceabilityMatrix.d.ts.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.js +50 -1
- package/dist/tools/spec/traceabilityMatrix.js.map +1 -1
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts +10 -0
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts.map +1 -0
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js +89 -0
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js.map +1 -0
- package/dist/tools/spec/traceabilityMatrix.test.js +19 -0
- package/dist/tools/spec/traceabilityMatrix.test.js.map +1 -1
- package/hooks/hooks.json +1 -0
- package/hooks/scripts/__tests__/.vibe/command-log.txt +39 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
- package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
- package/hooks/scripts/__tests__/auto-test-debounce.test.js +145 -0
- package/hooks/scripts/__tests__/code-check-detectors.test.js +155 -0
- package/hooks/scripts/__tests__/dispatcher-inprocess.test.js +99 -0
- package/hooks/scripts/__tests__/post-edit-dispatcher.test.js +139 -0
- package/hooks/scripts/__tests__/pre-tool-guard.test.js +115 -1
- package/hooks/scripts/__tests__/run-ledger-verify-required.test.js +146 -0
- package/hooks/scripts/__tests__/run-ledger.test.js +330 -0
- package/hooks/scripts/__tests__/scope-from-spec.test.js +215 -0
- package/hooks/scripts/__tests__/sentinel-guard.test.js +79 -24
- package/hooks/scripts/__tests__/step-counter.test.js +95 -15
- package/hooks/scripts/__tests__/utils-npm-root.test.js +98 -0
- package/hooks/scripts/auto-commit.js +27 -1
- package/hooks/scripts/auto-format.js +85 -20
- package/hooks/scripts/auto-test.js +187 -37
- package/hooks/scripts/code-check.js +286 -90
- package/hooks/scripts/codex-hook-adapter.js +12 -1
- package/hooks/scripts/command-log.js +26 -16
- package/hooks/scripts/lib/dispatcher.js +38 -0
- package/hooks/scripts/lib/hook-context.js +101 -0
- package/hooks/scripts/lib/pr-gate-runner.js +62 -0
- package/hooks/scripts/lib/run-ledger.js +169 -0
- package/hooks/scripts/lib/scope-from-spec.js +40 -7
- package/hooks/scripts/post-edit-dispatcher.js +93 -20
- package/hooks/scripts/post-edit.js +40 -19
- package/hooks/scripts/pr-test-gate.js +8 -37
- package/hooks/scripts/pre-tool-dispatcher.js +18 -16
- package/hooks/scripts/pre-tool-guard.js +55 -52
- package/hooks/scripts/prompt-dispatcher.js +10 -0
- package/hooks/scripts/scope-guard.js +40 -39
- package/hooks/scripts/sentinel-guard.js +41 -41
- package/hooks/scripts/session-start.js +13 -1
- package/hooks/scripts/step-counter.js +100 -7
- package/hooks/scripts/stop-dispatcher.js +26 -0
- package/hooks/scripts/utils.js +63 -21
- package/hooks/scripts/verify-ledger.js +22 -0
- package/package.json +2 -2
- package/skills/spec/references/templates.md +11 -6
- package/skills/vibe.run/SKILL.md +144 -1681
- package/skills/vibe.run/references/brand-assets.md +59 -0
- package/skills/vibe.run/references/parallel-agents.md +326 -0
- package/skills/vibe.run/references/race-review.md +272 -0
- package/skills/vibe.run/references/ralph-loop.md +172 -0
- package/skills/vibe.run/references/ultrawork-mode.md +148 -0
- package/skills/vibe.trace/SKILL.md +25 -38
- package/skills/vibe.verify/SKILL.md +15 -0
- package/hooks/scripts/figma-guard.js +0 -219
package/skills/vibe.run/SKILL.md
CHANGED
|
@@ -22,21 +22,9 @@ Execute **Scenario-Driven Implementation** with automatic quality verification.
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
> **Timer**: Call `getCurrentTime` tool at the START. Record the result as `{start_time}`.
|
|
26
26
|
|
|
27
|
-
> **
|
|
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":
|
|
27
|
+
> **Step Counter Reset (MANDATORY at START)**: Run this Bash command once at the very start:
|
|
40
28
|
>
|
|
41
29
|
> ```bash
|
|
42
30
|
> 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 +36,6 @@ Execute **Scenario-Driven Implementation** with automatic quality verification.
|
|
|
48
36
|
- **μμ€μ½λ νμΌ**: ꡬν/μμ λμ νμΌμ λ°λμ `Read` λκ΅¬λ‘ μ 체 μ½μ ν μμ
ν κ²
|
|
49
37
|
- **Grep μ¬μ© μ ν**: νμΌ μμΉ νμ(μ΄λ€ νμΌμ μλμ§ μ°ΎκΈ°)μλ§ μ¬μ©. νμΌ λ΄μ© νμ
μλ λ°λμ Read μ¬μ©
|
|
50
38
|
- **μμ΄μ νΈ spawn μ**: ν둬ννΈμ "λμ νμΌμ Read λκ΅¬λ‘ μ 체 μ½μ ν ꡬννλΌ"λ₯Ό λ°λμ ν¬ν¨ν κ²
|
|
51
|
-
- **λΆλΆ μ½κΈ° κΈμ§**: Grep κ²°κ³Όμ μ£Όλ³ λͺ μ€λ§ λ³΄κ³ μμ νμ§ λ§ κ². μ 체 λ§₯λ½μ νμ
ν΄μΌ κΈ°μ‘΄ μ½λμ μΌκ΄λ ꡬν κ°λ₯
|
|
52
39
|
|
|
53
40
|
## **Scenario-Driven Development (SDD)**
|
|
54
41
|
|
|
@@ -56,33 +43,25 @@ Execute **Scenario-Driven Implementation** with automatic quality verification.
|
|
|
56
43
|
|
|
57
44
|
### Pre-Run Regression Check (MANDATORY, before implementation starts)
|
|
58
45
|
|
|
59
|
-
Run immediately after start:
|
|
60
|
-
|
|
61
46
|
```
|
|
62
47
|
Load skill `regress` with: list --feature "{feature-name}"
|
|
63
48
|
```
|
|
64
49
|
|
|
65
|
-
-
|
|
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
|
|
50
|
+
- Open regressions exist β interactive: ask user; ultrawork: auto-invoke `/vibe.regress generate <slug>`
|
|
68
51
|
- No open regressions β silently continue
|
|
69
52
|
|
|
70
53
|
Also load `.vibe/contracts/{feature-name}.md` if present β use it as the contract reference during implementation.
|
|
71
54
|
|
|
72
55
|
### DESIGN.md Gate (UI stack only, before Phase 1)
|
|
73
56
|
|
|
74
|
-
Run immediately after the contract load:
|
|
75
|
-
|
|
76
57
|
```bash
|
|
77
|
-
# UI stack κ°μ§: .vibe/config.json μ stacks[].type μ€ STACK_TO_SKILLS κ° vibe.design μ ν¬ν¨νλ κ²
|
|
78
|
-
# DESIGN.md μ‘΄μ¬: νλ‘μ νΈ λ£¨νΈ
|
|
79
58
|
test -f DESIGN.md
|
|
80
59
|
```
|
|
81
60
|
|
|
82
61
|
- **DESIGN.md present OR no UI stack** β silently continue
|
|
83
62
|
- **DESIGN.md absent AND UI stack present**:
|
|
84
|
-
- interactive
|
|
85
|
-
- ultrawork
|
|
63
|
+
- interactive: ν μ€ μλ΄ β "UI μμ
μ `DESIGN.md` μκ° SSOT κ° μμ΅λλ€. `/vibe.design init` μΌλ‘ μμ±νλ©΄ μκ° λ리ννΈκ° μλ κ²μΆλ©λλ€. (μλ΅ κ°λ₯ β 1 νλ§ μλ΄)"
|
|
64
|
+
- ultrawork: 무μ μ€ν΅
|
|
86
65
|
|
|
87
66
|
> **κΆμ > κ°μ **. DESIGN.md λΆμ¬λ μ λ vibe.run μ λΈλ‘νμ§ μλλ€.
|
|
88
67
|
|
|
@@ -98,55 +77,22 @@ test -f DESIGN.md
|
|
|
98
77
|
β β Scenario 1: Happy Path β β
|
|
99
78
|
β β Given β When β Then β β
|
|
100
79
|
β β β β β
|
|
101
|
-
β β [Implement] β [Verify immediately] β
|
|
80
|
+
β β [Implement] β [Verify immediately] β Pass β β
|
|
102
81
|
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
103
82
|
β β β
|
|
104
83
|
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
105
84
|
β β Scenario 2: Edge Case β β
|
|
106
|
-
β β
|
|
107
|
-
β β β β β
|
|
108
|
-
β β [Implement] β [Verify] β β Fail β [Fix] β β
Pass β β
|
|
85
|
+
β β [Implement] β [Verify] β Fail β [Fix] β Pass β β
|
|
109
86
|
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
110
87
|
β β β
|
|
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
|
-
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
88
|
+
β [Quality Report: Scenarios N/N passed] β
|
|
123
89
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
124
90
|
```
|
|
125
91
|
|
|
126
|
-
|
|
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`.
|
|
92
|
+
> **νλ€μ€-μμ μ¦λΆ (Dual-Harness Doctrine)**: μλ리μ€λ **κ°μ₯ μμ κ²μ¦ λ¨μ**λ€. ν μλλ¦¬μ€ κ΅¬ν β μ¦μ κ²μ¦ β λ€μ. `ultrawork` λͺ¨λλΌλ μ΄ λ¨μλ 무λλ¨λ¦¬μ§ μλλ€ (λ³λ ¬μ μλλ¦¬μ€ κ°, κ²μ¦μ μλ리μ€λ³). μ λ¬Έ: `vibe/rules/principles/dual-harness-doctrine.md`.
|
|
145
93
|
|
|
146
94
|
### Automated Verification (Closed Loop)
|
|
147
95
|
|
|
148
|
-
**μμ¨μ AI μ½λ© = ꡬν + κ²μ¦ + λ°λ³΅. κ²μ¦μ AIμκ² λ§‘κΈ°λ μκ° λ£¨νκ° λ«νλ€.**
|
|
149
|
-
|
|
150
96
|
After implementing each scenario, **automatic verification**:
|
|
151
97
|
|
|
152
98
|
| Verification Item | Auto Check | Method |
|
|
@@ -161,29 +107,7 @@ After implementing each scenario, **automatic verification**:
|
|
|
161
107
|
|
|
162
108
|
**UI μλ리μ€κ° ν¬ν¨λ FeatureμΌ λ μλ νμ±ν.**
|
|
163
109
|
|
|
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:**
|
|
110
|
+
Browser Tool Priority:
|
|
187
111
|
|
|
188
112
|
| Priority | Tool | μ©λ |
|
|
189
113
|
|----------|------|------|
|
|
@@ -191,789 +115,122 @@ After implementing each scenario, **automatic verification**:
|
|
|
191
115
|
| 2nd | Playwright Test Runner | ν
μ€νΈ μ½λ μ€ν, pass/fail λ°ν |
|
|
192
116
|
| 3rd | Playwright MCP (DOM) | μ΅ν μλ¨, ν ν° λΉν¨μ¨ |
|
|
193
117
|
|
|
194
|
-
**νμ±ν 쑰건:**
|
|
195
|
-
- Feature νμΌμ UI κ΄λ ¨ μλλ¦¬μ€ μ‘΄μ¬ (form, button, page, navigate λ±)
|
|
196
|
-
- `.vibe/e2e/config.json`μ `closedLoop.enabled: true` (κΈ°λ³Έκ°)
|
|
197
|
-
- dev serverκ° μ€ν μ€ (`baseURL` μ κ·Ό κ°λ₯)
|
|
118
|
+
**νμ±ν 쑰건:** Feature νμΌμ UI κ΄λ ¨ μλλ¦¬μ€ μ‘΄μ¬ + `.vibe/e2e/config.json`μ `closedLoop.enabled: true` (κΈ°λ³Έκ°) + dev serverκ° μ€ν μ€
|
|
198
119
|
|
|
199
120
|
### Auto-Fix on Failure
|
|
200
121
|
|
|
201
122
|
```
|
|
202
|
-
Scenario verification failed
|
|
203
|
-
β
|
|
204
|
-
[
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
β
|
|
208
|
-
|
|
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 κ°μ§λ‘ μ’
λ£)
|
|
123
|
+
Scenario verification failed
|
|
124
|
+
β [Collect evidence]
|
|
125
|
+
β [Root cause analysis]
|
|
126
|
+
β [Read target file FULLY]
|
|
127
|
+
β [Implement fix]
|
|
128
|
+
β [Re-verify failed scenario only]
|
|
129
|
+
Repeat until pass (stuck κ°μ§λ‘ μ’
λ£)
|
|
217
130
|
```
|
|
218
131
|
|
|
219
132
|
**Termination conditions:**
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
1. μ§μ μμ λ°©λ² μ 곡 (μ: "LoginForm.tsx 42μ€ μμ ") β μ¬μλ
|
|
223
|
-
2. "proceed" β λ¨μ μ€ν¨ TODO κΈ°λ‘ ν λ€μ scenario
|
|
224
|
-
3. "abort" β ꡬν μ€λ¨
|
|
225
|
-
- `ultrawork` λͺ¨λ: stuck μ ν둬ννΈ μμ΄ TODO κΈ°λ‘ ν λ€μ scenario
|
|
133
|
+
- PASS β λ€μ scenario
|
|
134
|
+
- Stuck (κ°μ failureκ° μ΄μ λΌμ΄λμ λμΌ) β ask user or ultrawork: TODO + next scenario
|
|
226
135
|
|
|
227
136
|
---
|
|
228
137
|
|
|
229
138
|
## **ULTRAWORK Mode** (ulw)
|
|
230
139
|
|
|
231
|
-
>
|
|
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
|
|
281
|
-
|
|
282
|
-
> **Inspired by [ghuntley.com/ralph](https://ghuntley.com/ralph)**: "Deterministically bad in an undeterministic world" - Keep iterating until TRULY complete.
|
|
140
|
+
> Read `references/ultrawork-mode.md` for the full Boulder Loop diagram, automation level definitions, and confirmation matrix.
|
|
283
141
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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 |
|
|
142
|
+
When `ultrawork` or `ulw` is included:
|
|
143
|
+
- Parallel Exploration + Boulder Loop + No Pause + Error Recovery (auto-TODO on stuck)
|
|
144
|
+
- Race Review (GPT+Antigravity) enabled by default
|
|
145
|
+
- Ralph Loop runs after all phases
|
|
507
146
|
|
|
508
147
|
---
|
|
509
148
|
|
|
510
|
-
##
|
|
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
|
|
149
|
+
## Scope & Ledger Rules
|
|
515
150
|
|
|
516
|
-
|
|
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
|
-
---
|
|
151
|
+
### Run Ledger Tracking
|
|
551
152
|
|
|
552
|
-
|
|
153
|
+
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
154
|
|
|
554
|
-
|
|
155
|
+
### Interactive Checkpoints
|
|
555
156
|
|
|
556
|
-
|
|
157
|
+
Checkpoints are decision gates inserted at critical points. At L3/L4, most are **auto-resolved** using the default option.
|
|
557
158
|
|
|
558
159
|
| Type | When It Fires | Default Option |
|
|
559
160
|
|------|--------------|----------------|
|
|
560
161
|
| `requirements_confirm` | Before starting Phase 1 | Confirm (a) |
|
|
561
162
|
| `architecture_choice` | When architecture approach is ambiguous | Clean/balanced (b) |
|
|
562
163
|
| `implementation_scope` | Before any large scope change (6+ files) | Approve (a) |
|
|
563
|
-
| `verification_result` | After each VerificationLoop iteration below threshold | Continue fixing (a) |
|
|
564
164
|
| `fix_strategy` | When critical issues are found during quality gate | Fix all (a) |
|
|
565
165
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
When a checkpoint fires, display it in this format:
|
|
569
|
-
|
|
166
|
+
Checkpoint format example:
|
|
570
167
|
```
|
|
571
168
|
ββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
572
169
|
CHECKPOINT: Requirements Confirmation
|
|
573
170
|
ββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
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
171
|
Options:
|
|
582
|
-
a) Confirm
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
Modify or clarify requirements before proceeding.
|
|
586
|
-
c) Abort
|
|
587
|
-
Cancel this workflow.
|
|
588
|
-
|
|
172
|
+
a) Confirm β Proceed as stated.
|
|
173
|
+
b) Revise β Modify before proceeding.
|
|
174
|
+
c) Abort β Cancel.
|
|
589
175
|
Default: a
|
|
590
176
|
ββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
591
177
|
```
|
|
592
178
|
|
|
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
179
|
---
|
|
615
180
|
|
|
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
181
|
## Process
|
|
868
182
|
|
|
869
183
|
### 1. Load SPEC + Feature
|
|
870
184
|
|
|
871
|
-
**Search order
|
|
872
|
-
|
|
185
|
+
**Search order:**
|
|
873
186
|
```
|
|
874
|
-
Step 1: Check
|
|
875
|
-
|
|
876
|
-
|
|
187
|
+
Step 1: Check split structure (folder)
|
|
188
|
+
.vibe/specs/{feature-name}/ β Folder: _index.md + phase files
|
|
189
|
+
.vibe/features/{feature-name}/ β Folder: _index.feature + phase files
|
|
877
190
|
|
|
878
191
|
Step 2: If no folder, check single file
|
|
879
|
-
|
|
880
|
-
|
|
192
|
+
.vibe/specs/{feature-name}.md
|
|
193
|
+
.vibe/features/{feature-name}.feature
|
|
881
194
|
|
|
882
|
-
Step 3: If neither
|
|
195
|
+
Step 3: If neither β Error: "Run /vibe.spec first"
|
|
883
196
|
```
|
|
884
197
|
|
|
885
|
-
**Split structure (
|
|
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
|
-
```
|
|
198
|
+
**Split structure:** Load `_index.md` first, then phase files in order. Execute phases sequentially (or per `--phase` flag).
|
|
908
199
|
|
|
909
|
-
|
|
910
|
-
```
|
|
911
|
-
β SPEC not found. Searched:
|
|
912
|
-
- .vibe/specs/{feature-name}/ (folder)
|
|
913
|
-
- .vibe/specs/{feature-name}.md (file)
|
|
200
|
+
### 1-1. Phase Isolation Protocol (Large SPEC Guard, MANDATORY for 3+ phases)
|
|
914
201
|
|
|
915
|
-
Run /vibe.spec "{feature-name}" first.
|
|
916
202
|
```
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
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
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
203
|
+
Step A: Read _index.md (overview only β phase list, REQ IDs)
|
|
204
|
+
Step B: For each Phase N:
|
|
205
|
+
1. RE-READ Phase N SPEC section (every time, no memory)
|
|
206
|
+
2. RE-READ Phase N Feature scenarios
|
|
207
|
+
3. Extract Phase N scope: files, scenarios, requirements
|
|
208
|
+
4. Implement Phase N scenarios
|
|
209
|
+
5. Verify Phase N
|
|
210
|
+
6. Write Phase Checkpoint β .vibe/checkpoints/
|
|
211
|
+
7. DISCARD Phase N details from working memory
|
|
212
|
+
Step C: Next Phase
|
|
943
213
|
```
|
|
944
214
|
|
|
945
|
-
**Phase Checkpoint
|
|
215
|
+
**Phase Checkpoint** (`.vibe/checkpoints/{feature}-phase-{N}.md`):
|
|
946
216
|
|
|
947
217
|
```markdown
|
|
948
218
|
# Checkpoint: {feature} Phase {N}
|
|
949
219
|
|
|
950
220
|
## Completed
|
|
951
221
|
- Scenario 1: {name} β
|
|
952
|
-
- Scenario 2: {name} β
|
|
953
222
|
|
|
954
223
|
## Files Changed
|
|
955
224
|
- src/auth.service.ts (added login(), validateToken())
|
|
956
|
-
- src/auth.controller.ts (POST /login, POST /refresh)
|
|
957
225
|
|
|
958
226
|
## State for Next Phase
|
|
959
|
-
- Auth service exports: login(), logout(), validateToken()
|
|
960
|
-
- JWT secret configured in .env (JWT_SECRET)
|
|
961
|
-
- Test baseline: 12 tests passing
|
|
227
|
+
- Auth service exports: login(), logout(), validateToken()
|
|
962
228
|
|
|
963
229
|
## Remaining Phases
|
|
964
230
|
- Phase {N+1}: {name} β {scenario count} scenarios
|
|
965
|
-
- Phase {N+2}: {name} β {scenario count} scenarios
|
|
966
231
|
```
|
|
967
232
|
|
|
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
|
-
```
|
|
233
|
+
**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
234
|
|
|
978
235
|
**Scope Lock (Per Phase):**
|
|
979
236
|
|
|
@@ -982,681 +239,155 @@ At Phase start, declare:
|
|
|
982
239
|
MODIFY: [list of files this phase will touch]
|
|
983
240
|
CREATE: [list of files this phase will create]
|
|
984
241
|
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
242
|
```
|
|
991
243
|
|
|
992
|
-
**Context Pressure
|
|
244
|
+
**Context Pressure:**
|
|
993
245
|
|
|
994
246
|
| Context Level | Action |
|
|
995
247
|
|---------------|--------|
|
|
996
248
|
| < 50% | Normal execution |
|
|
997
249
|
| 50-85% | Save checkpoint, trim exploration results |
|
|
998
|
-
| 85%+ | Save checkpoint β `/new` β resume from checkpoint
|
|
999
|
-
| Phase boundary | Always save checkpoint
|
|
250
|
+
| 85%+ | Save checkpoint β `/new` β resume from checkpoint |
|
|
251
|
+
| Phase boundary | Always save checkpoint |
|
|
1000
252
|
|
|
1001
|
-
### 1-2. SPEC-First Gate
|
|
253
|
+
### 1-2. SPEC-First Gate
|
|
1002
254
|
|
|
1003
|
-
>
|
|
1004
|
-
|
|
1005
|
-
**When a change not in the SPEC is needed during implementation:**
|
|
255
|
+
> SPEC is the source of truth for code. To modify code, update the SPEC first.
|
|
1006
256
|
|
|
1007
257
|
```
|
|
1008
|
-
Discovery
|
|
1009
|
-
|
|
1010
|
-
ββ
|
|
1011
|
-
|
|
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
|
|
258
|
+
Discovery: "An API endpoint not in SPEC is needed"
|
|
259
|
+
ββ Already in SPEC? YES β Implement
|
|
260
|
+
ββ Not in SPEC but within scope? β Add to SPEC + Feature β Implement
|
|
261
|
+
ββ Outside scope? β TODO in .vibe/todos/out-of-scope-{item}.md
|
|
1021
262
|
```
|
|
1022
263
|
|
|
1023
|
-
|
|
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)
|
|
264
|
+
SPEC changes and code changes must be in the **same commit**.
|
|
1044
265
|
|
|
1045
266
|
### 2. Extract Scenario List
|
|
1046
267
|
|
|
1047
|
-
Extract all Scenarios from Feature file:
|
|
1048
|
-
|
|
1049
268
|
```markdown
|
|
1050
|
-
## Scenarios to Implement
|
|
1051
|
-
|
|
1052
269
|
| # | Scenario | Status |
|
|
1053
270
|
|---|----------|--------|
|
|
1054
271
|
| 1 | Valid login success | β¬ |
|
|
1055
272
|
| 2 | Invalid password error | β¬ |
|
|
1056
|
-
| 3 | Email format validation | β¬ |
|
|
1057
|
-
| 4 | Password reset link | β¬ |
|
|
1058
|
-
|
|
1059
|
-
Total: 4 scenarios
|
|
1060
273
|
```
|
|
1061
274
|
|
|
1062
|
-
### 3. Scenario-by-Scenario Implementation
|
|
275
|
+
### 3. Scenario-by-Scenario Implementation
|
|
1063
276
|
|
|
1064
|
-
|
|
277
|
+
> Read `references/parallel-agents.md` for full parallel exploration patterns, background agents, agent team selection, and model routing.
|
|
1065
278
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
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**:
|
|
279
|
+
**For each scenario:**
|
|
280
|
+
1. [Parallel exploration] Task(haiku) Γ 3 β related code, deps, patterns
|
|
281
|
+
2. [Implement] Write/edit the minimum required code
|
|
282
|
+
3. [Verify] Check Given/When/Then; E2E if UI scenario
|
|
283
|
+
4. [Auto-fix loop] On failure: collect evidence β root cause β fix β re-verify
|
|
1093
284
|
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
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
|
|
285
|
+
**UI/UX Design Intelligence (auto-triggered before Phase 1 if UI keywords in SPEC):**
|
|
286
|
+
- Task(haiku, `ui-stack-implementer`): framework-specific component guidelines
|
|
287
|
+
- Task(haiku, `ui-dataviz-advisor`): chart/viz library advice (conditional on chart keywords)
|
|
288
|
+
- Load `.vibe/design-system/{project}/MASTER.md` if present
|
|
1111
289
|
|
|
1112
|
-
|
|
1113
|
-
ββββββββββββββββββββββββββββββββββββββββββββ
|
|
1114
|
-
```
|
|
1115
|
-
|
|
1116
|
-
---
|
|
290
|
+
### 4. Brand Assets (New project only)
|
|
1117
291
|
|
|
1118
|
-
|
|
292
|
+
> Read `references/brand-assets.md` when SPEC contains brand context and this is the first run.
|
|
1119
293
|
|
|
1120
|
-
|
|
1121
|
-
> Sequential execution when parallel is possible = VIOLATION of this workflow.
|
|
294
|
+
Trigger conditions: first run (no favicon.ico) + SPEC has brand context + Antigravity API key configured.
|
|
1122
295
|
|
|
1123
|
-
###
|
|
296
|
+
### 5. Race Code Review
|
|
1124
297
|
|
|
1125
|
-
>
|
|
1126
|
-
> λ―Έμ€μΉ μ κΈ°μ‘΄ Claude μλΈμμ΄μ νΈ λ°©μμΌλ‘ λμ.
|
|
298
|
+
> Read `references/race-review.md` for full Race Review invocation, confidence matrix, and quality gate thresholds.
|
|
1127
299
|
|
|
1128
|
-
|
|
300
|
+
After all scenarios: GPT + Antigravity review in parallel. ULTRAWORK enables this by default.
|
|
1129
301
|
|
|
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):**
|
|
302
|
+
### 6. Quality Report (Auto-generated)
|
|
1146
303
|
|
|
1147
304
|
```
|
|
1148
305
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
1149
|
-
β
|
|
1150
|
-
|
|
1151
|
-
β
|
|
1152
|
-
β
|
|
1153
|
-
β
|
|
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 β
|
|
306
|
+
β QUALITY REPORT: {feature} β
|
|
307
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
308
|
+
β Scenarios: N/N passed β
|
|
309
|
+
β Quality score: 94/100 β
|
|
310
|
+
β Build: β
| Tests: β
| Types: β
| Race review: β
β
|
|
311
|
+
β Started: {start_time} Completed: {getCurrentTime} β
|
|
1195
312
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
1196
313
|
```
|
|
1197
314
|
|
|
1198
|
-
###
|
|
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
|
-
```
|
|
315
|
+
### 7. Update Feature File
|
|
1209
316
|
|
|
1210
|
-
|
|
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
|
-
```
|
|
317
|
+
Auto-update scenario status with `Last verified` timestamp and quality score.
|
|
1217
318
|
|
|
1218
|
-
###
|
|
319
|
+
### 8. Ralph Loop (Coverage Verification)
|
|
1219
320
|
|
|
1220
|
-
|
|
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
|
-
```
|
|
321
|
+
> Read `references/ralph-loop.md` for the full RTM loop diagram, output format, and iteration rules.
|
|
1235
322
|
|
|
1236
|
-
|
|
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
|
-
```
|
|
323
|
+
After ALL phases complete:
|
|
1240
324
|
|
|
1241
|
-
**Get result when ready:**
|
|
1242
325
|
```bash
|
|
1243
|
-
|
|
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.")
|
|
326
|
+
# generateTraceabilityMatrix is synchronous β no .then()
|
|
327
|
+
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
328
|
```
|
|
1289
329
|
|
|
1290
|
-
|
|
1291
|
-
- `.vibe/design-system/{project}/MASTER.md` μ‘΄μ¬ μ μλ λ‘λ
|
|
1292
|
-
- ꡬν μμ΄μ νΈκ° CSS λ³μ, ν°νΈ, μμ νλ νΈλ₯Ό μ§μ μ°Έμ‘°
|
|
1293
|
-
- νμ΄μ§λ³ μ€λ²λΌμ΄λ `pages/{page}.md` μ‘΄μ¬ μ μ°μ μ μ©
|
|
330
|
+
> Default SPEC path is `.vibe/specs/<feature>.md`. `status === 'empty'` must be treated as failed/not-applicable β never as 100% pass.
|
|
1294
331
|
|
|
1295
|
-
|
|
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
|
|
332
|
+
Loop until `coveragePercent === 100` or stuck. Stuck β interactive: ask user; ultrawork β TODO + done.
|
|
1343
333
|
|
|
1344
334
|
---
|
|
1345
335
|
|
|
1346
|
-
|
|
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
|
-
```
|
|
336
|
+
## Core Tools (Semantic Analysis & Memory)
|
|
1544
337
|
|
|
1545
338
|
```bash
|
|
1546
|
-
#
|
|
1547
|
-
node "
|
|
339
|
+
# All tools via:
|
|
340
|
+
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
341
|
```
|
|
1549
342
|
|
|
1550
|
-
|
|
343
|
+
| Tool | Purpose |
|
|
344
|
+
|------|---------|
|
|
345
|
+
| `findSymbol` | Find symbol definitions |
|
|
346
|
+
| `findReferences` | Find all references |
|
|
347
|
+
| `analyzeComplexity` | Analyze code complexity |
|
|
348
|
+
| `validateCodeQuality` | Validate code quality |
|
|
349
|
+
| `saveMemory` | Save important decisions |
|
|
350
|
+
| `recallMemory` | Recall saved memory |
|
|
351
|
+
| `listMemories` | List all memories |
|
|
1551
352
|
|
|
1552
|
-
|
|
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 |
|
|
353
|
+
Session management: start hook auto-calls `startSession`; context 80%+ triggers `autoSaveContext`.
|
|
1557
354
|
|
|
1558
|
-
|
|
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μ€ λ¦¬λ·°:
|
|
355
|
+
---
|
|
1585
356
|
|
|
1586
|
-
|
|
1587
|
-
| Issue | GPT | Antigravity | Codex | Confidence |
|
|
1588
|
-
|-------|-----|--------|-------|------------|
|
|
1589
|
-
| {μ΄μ} | β
/β | β
/β | β
/β | {%} |
|
|
1590
|
-
```
|
|
357
|
+
## Coding Guidelines (Mandatory)
|
|
1591
358
|
|
|
1592
|
-
|
|
359
|
+
> Read `references/race-review.md` for full type safety guidelines, language-specific examples, and the type-violation detection/escalation table.
|
|
1593
360
|
|
|
1594
|
-
|
|
361
|
+
**TypeScript β core rule:**
|
|
362
|
+
```typescript
|
|
363
|
+
// BAD
|
|
364
|
+
function process(data: any): any { return data.foo; }
|
|
1595
365
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
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
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
366
|
+
// GOOD
|
|
367
|
+
function process(data: unknown): Result {
|
|
368
|
+
if (isValidData(data)) return data.foo;
|
|
369
|
+
throw new Error('Invalid');
|
|
370
|
+
}
|
|
1629
371
|
```
|
|
1630
372
|
|
|
1631
|
-
|
|
1632
|
-
- Scenario pass rate (4/4 = 100%)
|
|
1633
|
-
- Quality score (94/100)
|
|
1634
|
-
- Build/test status
|
|
373
|
+
No `any` / `as any` / `@ts-ignore` β fix at root. Explicit return types on all functions.
|
|
1635
374
|
|
|
1636
|
-
**
|
|
1637
|
-
|
|
1638
|
-
### 7. Update Feature File
|
|
375
|
+
**Detection outcome:** Type violations are detected by static analysis and injected as `additionalContext`; commit-level enforcement occurs at the auto-commit verify gate.
|
|
1639
376
|
|
|
1640
|
-
|
|
377
|
+
---
|
|
1641
378
|
|
|
1642
|
-
|
|
1643
|
-
## Coverage
|
|
379
|
+
## Rules Reference
|
|
1644
380
|
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
| Password reset link | AC-4 | β
|
|
|
381
|
+
- `core/development-philosophy.md` β Surgical precision, modify only requested scope
|
|
382
|
+
- `core/quick-start.md` β Korean, DRY, SRP, YAGNI
|
|
383
|
+
- `standards/complexity-metrics.md` β Functions β€50 lines, nesting β€3 levels
|
|
384
|
+
- `quality/checklist.md` β Code quality checklist
|
|
385
|
+
- Language guide: `~/.claude/vibe/languages/{stack}.md`
|
|
1651
386
|
|
|
1652
|
-
|
|
1653
|
-
**Quality score**: 94/100
|
|
1654
|
-
```
|
|
387
|
+
---
|
|
1655
388
|
|
|
1656
389
|
## TRUST 5 Principles
|
|
1657
390
|
|
|
1658
|
-
Follow during implementation:
|
|
1659
|
-
|
|
1660
391
|
| Principle | Description |
|
|
1661
392
|
|-----------|-------------|
|
|
1662
393
|
| **T**est-first | Write tests first |
|
|
@@ -1665,301 +396,33 @@ Follow during implementation:
|
|
|
1665
396
|
| **S**ecured | Consider security |
|
|
1666
397
|
| **T**rackable | Logging, monitoring |
|
|
1667
398
|
|
|
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
399
|
---
|
|
1921
400
|
|
|
1922
401
|
## Auto-Retrospective (Post-Implementation)
|
|
1923
402
|
|
|
1924
|
-
After ALL phases complete
|
|
403
|
+
After ALL phases complete, save to `.vibe/retros/{feature-name}.md`:
|
|
1925
404
|
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
```
|
|
405
|
+
```markdown
|
|
1929
406
|
## 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"]
|
|
407
|
+
### What Worked / What Didn't / Key Decisions / Lessons Learned
|
|
1942
408
|
```
|
|
1943
409
|
|
|
1944
|
-
|
|
410
|
+
Keep under 20 lines. Save key lessons via `core_save_memory`. Update `claude-progress.txt`.
|
|
411
|
+
|
|
412
|
+
---
|
|
1945
413
|
|
|
1946
|
-
|
|
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
|
|
414
|
+
## Input / Output
|
|
1950
415
|
|
|
1951
|
-
**
|
|
416
|
+
**Input:** `.vibe/specs/{feature-name}.md`, `.vibe/features/{feature-name}.feature`, `CLAUDE.md`
|
|
1952
417
|
|
|
1953
|
-
|
|
1954
|
-
- Focus on **project-specific** insights, not generic knowledge
|
|
1955
|
-
- Only save to memory if the lesson is actionable and non-obvious
|
|
418
|
+
**Output:** Implemented code files, test files, updated SPEC (checkmarks)
|
|
1956
419
|
|
|
1957
420
|
---
|
|
1958
421
|
|
|
1959
422
|
## Next Step
|
|
1960
423
|
|
|
1961
424
|
```
|
|
1962
|
-
/vibe.verify "
|
|
425
|
+
/vibe.verify "feature-name"
|
|
1963
426
|
```
|
|
1964
427
|
|
|
1965
428
|
---
|