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