@su-record/vibe 3.2.6 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +5 -2
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/agents/build-error-resolver.md +1 -1
- package/agents/code-reviewer.md +1 -1
- package/agents/e2e-tester.md +1 -1
- package/agents/event/event-ops.md +1 -1
- package/agents/event/event-planner.md +1 -1
- package/agents/implementer.md +1 -1
- package/agents/security-reviewer.md +1 -1
- package/agents/tester.md +1 -1
- package/agents/ui/design-reviewer.md +1 -1
- package/agents/ui/design-system-gen.md +1 -1
- package/dist/cli/commands/info.d.ts +9 -0
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +32 -0
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/info.test.js +34 -1
- package/dist/cli/commands/info.test.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +18 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +60 -2
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/upgrade.test.js +51 -1
- package/dist/cli/commands/upgrade.test.js.map +1 -1
- package/dist/cli/generate-release-notes.js +8 -6
- package/dist/cli/generate-release-notes.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +3 -1
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +27 -21
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/tests/curated-release-notes.test.js +55 -1
- package/dist/tests/curated-release-notes.test.js.map +1 -1
- package/dist/tools/release/releaseNotes.d.ts +22 -0
- package/dist/tools/release/releaseNotes.d.ts.map +1 -1
- package/dist/tools/release/releaseNotes.js +45 -0
- package/dist/tools/release/releaseNotes.js.map +1 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
- package/hooks/scripts/__tests__/code-check-detectors.test.js +58 -0
- package/hooks/scripts/code-check.js +7 -0
- package/package.json +2 -2
- package/skills/vibe/SKILL.md +27 -86
- package/skills/vibe/references/routing-examples.md +85 -0
- package/skills/vibe.agents-md/SKILL.md +12 -10
- package/skills/vibe.analyze/SKILL.md +22 -211
- package/skills/vibe.analyze/references/mode1-feature.md +81 -0
- package/skills/vibe.analyze/references/mode2-document.md +50 -0
- package/skills/vibe.analyze/references/mode3-website.md +47 -0
- package/skills/vibe.analyze/references/mode4-quality.md +35 -0
- package/skills/vibe.analyze/references/output-templates.md +2 -2
- package/skills/vibe.brand-assets/SKILL.md +2 -2
- package/skills/vibe.brand-assets/references/mobile-assets.md +6 -0
- package/skills/vibe.capability-loop/SKILL.md +14 -80
- package/skills/vibe.capability-loop/references/escalate.md +86 -0
- package/skills/vibe.chub-usage/SKILL.md +3 -132
- package/skills/vibe.clone/SKILL.md +43 -358
- package/skills/vibe.clone/references/phase-commands.md +118 -0
- package/skills/vibe.clone/references/setup-and-layout.md +34 -0
- package/skills/vibe.clone/references/verification-loops.md +64 -0
- package/skills/vibe.commit-push-pr/SKILL.md +10 -4
- package/skills/vibe.context7-usage/SKILL.md +3 -99
- package/skills/vibe.continue/SKILL.md +17 -7
- package/skills/{vibe.handoff → vibe.continue}/agents/context-summarizer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/document-writer.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/state-collector.md +1 -1
- package/skills/{vibe.handoff → vibe.continue}/agents/verifier.md +1 -1
- package/skills/{vibe.handoff/rubrics/completeness.md → vibe.continue/references/handoff-completeness.md} +1 -1
- package/skills/{vibe.handoff/templates → vibe.continue/references}/handoff.md +37 -2
- package/skills/vibe.contract/SKILL.md +4 -27
- package/skills/vibe.create-prd/SKILL.md +8 -1
- package/skills/vibe.design/SKILL.md +18 -5
- package/skills/vibe.design/references/design-context.md +184 -0
- package/skills/vibe.design-refine/SKILL.md +7 -0
- package/skills/vibe.design-review/SKILL.md +7 -0
- package/skills/vibe.design-teach/SKILL.md +2 -175
- package/skills/vibe.devlog/SKILL.md +14 -11
- package/skills/vibe.devlog/references/auto-push.md +10 -0
- package/skills/vibe.docs/SKILL.md +27 -198
- package/skills/vibe.docs/references/agent.md +55 -0
- package/skills/vibe.docs/references/arch.md +28 -0
- package/skills/vibe.docs/references/codemaps.md +17 -0
- package/skills/vibe.docs/references/diagram.md +24 -0
- package/skills/vibe.docs/references/guide.md +23 -0
- package/skills/vibe.docs/references/readme.md +45 -0
- package/skills/vibe.docs/references/release.md +31 -0
- package/skills/vibe.documentation-provider/SKILL.md +22 -0
- package/skills/vibe.documentation-provider/references/chub.md +141 -0
- package/skills/vibe.documentation-provider/references/context7.md +107 -0
- package/skills/vibe.educational-content/SKILL.md +7 -0
- package/skills/vibe.event/SKILL.md +47 -146
- package/skills/vibe.event/references/comms.md +173 -0
- package/skills/vibe.event/references/operations.md +208 -0
- package/skills/vibe.event/references/orchestration-legacy.md +97 -0
- package/skills/vibe.event/references/planning.md +145 -0
- package/skills/vibe.event-comms/SKILL.md +3 -165
- package/skills/vibe.event-ops/SKILL.md +3 -200
- package/skills/vibe.event-planning/SKILL.md +3 -137
- package/skills/vibe.figma/SKILL.md +26 -692
- package/skills/vibe.figma/references/branch1-read-convention.md +82 -0
- package/skills/vibe.figma/references/branch2-read-standalone.md +69 -0
- package/skills/vibe.figma/references/branch3-write.md +122 -0
- package/skills/vibe.figma/references/core-implementation.md +453 -0
- package/skills/vibe.git-worktree/SKILL.md +2 -6
- package/skills/vibe.git-worktree/references/troubleshooting.md +9 -0
- package/skills/vibe.handoff/SKILL.md +2 -103
- package/skills/vibe.harness/SKILL.md +17 -12
- package/skills/vibe.image/SKILL.md +8 -1
- package/skills/vibe.llm/SKILL.md +8 -1
- package/skills/vibe.loop/SKILL.md +9 -11
- package/skills/vibe.loop/references/install-adapters.md +10 -0
- package/skills/vibe.presentation/SKILL.md +7 -0
- package/skills/vibe.prioritization/SKILL.md +7 -0
- package/skills/vibe.priority-todos/SKILL.md +2 -57
- package/skills/vibe.react-best-practices/SKILL.md +1 -1
- package/skills/vibe.reason/SKILL.md +9 -2
- package/skills/vibe.regress/SKILL.md +6 -28
- package/skills/vibe.regress/templates/{test-jest.md → test-template.md} +1 -0
- package/skills/vibe.review/SKILL.md +62 -52
- package/skills/vibe.review/references/priority-todos.md +66 -0
- package/skills/vibe.review/references/ui-ux-review.md +39 -0
- package/skills/vibe.run/SKILL.md +63 -660
- package/skills/vibe.run/references/arch-guard.md +178 -0
- package/skills/vibe.run/references/e2e-and-autofix.md +40 -0
- package/skills/vibe.run/references/exec-plan.md +145 -0
- package/skills/vibe.run/references/guidelines-and-tools.md +84 -0
- package/skills/vibe.run/references/parallel-agents.md +44 -60
- package/skills/vibe.run/references/process-steps.md +179 -0
- package/skills/vibe.run/references/restraint.md +66 -0
- package/skills/vibe.run/references/ultrawork-mode.md +1 -1
- package/skills/vibe.scaffold/SKILL.md +9 -13
- package/skills/vibe.scaffold/references/clean-architecture.md +17 -0
- package/skills/vibe.spec/SKILL.md +13 -9
- package/skills/vibe.spec/references/legacy-artifacts.md +6 -0
- package/skills/vibe.test/SKILL.md +93 -70
- package/skills/vibe.test/references/report-template.md +101 -0
- package/skills/vibe.tool-fallback/SKILL.md +10 -32
- package/skills/vibe.tool-fallback/references/external-llm.md +10 -0
- package/skills/vibe.tool-fallback/references/file-lookup.md +9 -0
- package/skills/vibe.tool-fallback/references/web-search.md +11 -0
- package/skills/vibe.trace/SKILL.md +2 -264
- package/skills/vibe.ui-ux-pro-max/SKILL.md +1 -3
- package/skills/vibe.ui-ux-pro-max/references/charts-and-data.md +7 -0
- package/skills/vibe.user-personas/SKILL.md +8 -1
- package/skills/vibe.verify/SKILL.md +30 -4
- package/skills/vibe.verify/references/trace-mode.md +271 -0
- package/vibe/rules/principles/dual-harness-doctrine.md +10 -9
- package/skills/vibe.regress/templates/test-vitest.md +0 -30
- /package/skills/{vibe.design-teach/rubrics → vibe.design/references}/brand-personality.md +0 -0
- /package/skills/{vibe.design-teach → vibe.design}/templates/design-context.json +0 -0
- /package/skills/{vibe.context7-usage/rubrics/when-to-use.md → vibe.documentation-provider/references/context7-when-to-use.md} +0 -0
- /package/skills/{vibe.event-ops/rubrics → vibe.event/references}/contingency.md +0 -0
- /package/skills/{vibe.event-ops/templates/d-day-checklist.md → vibe.event/references/d-day-checklist-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/email-invite.md → vibe.event/references/email-invite-template.md} +0 -0
- /package/skills/{vibe.event-planning/templates/event-plan.md → vibe.event/references/event-plan-template.md} +0 -0
- /package/skills/{vibe.event-comms/templates/sns-post.md → vibe.event/references/sns-post-template.md} +0 -0
- /package/skills/{vibe.event-planning/rubrics → vibe.event/references}/timeline.md +0 -0
- /package/skills/{vibe.priority-todos/templates/todo-board.md → vibe.review/references/todo-board-template.md} +0 -0
- /package/skills/{vibe.priority-todos/rubrics/prioritization.md → vibe.review/references/todo-prioritization.md} +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Arch Guard — Architecture Boundary Test Generator
|
|
2
|
+
|
|
3
|
+
> vibe.run 내부 구현. **아키텍처 경계 테스트를 생성/검증할 때만 로드한다** — 매 run 마다 필요하지 않다.
|
|
4
|
+
|
|
5
|
+
# Arch Guard — Architecture Boundary Test Generator
|
|
6
|
+
|
|
7
|
+
> **Principle**: "Mechanical enforcement over documentation." If a rule exists only in docs, it will be violated. Turn architecture constraints into failing tests.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
| Scenario | Signal |
|
|
12
|
+
|----------|--------|
|
|
13
|
+
| `vibe init` / `vibe update` | Auto-generate for detected stack |
|
|
14
|
+
| New layer/module added | Boundaries need enforcement |
|
|
15
|
+
| Architecture violation found in review | Prevent recurrence with test |
|
|
16
|
+
| "Services should not import UI" type rules | Turn into automated check |
|
|
17
|
+
|
|
18
|
+
## Core Flow
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
DETECT → INFER → GENERATE → VERIFY
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Step 1: DETECT — Identify Project Architecture
|
|
25
|
+
|
|
26
|
+
Analyze the project to determine its layer structure:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Parallel exploration:
|
|
30
|
+
- Agent 1: Scan directory structure (src/, app/, lib/, etc.)
|
|
31
|
+
- Agent 2: Read existing architecture docs (CLAUDE.md, README, ADR)
|
|
32
|
+
- Agent 3: Analyze import graph (which files import what)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Common patterns to detect:**
|
|
36
|
+
|
|
37
|
+
| Pattern | Layers | Typical Stacks |
|
|
38
|
+
|---------|--------|----------------|
|
|
39
|
+
| MVC | Controller → Service → Model | Rails, NestJS, Spring |
|
|
40
|
+
| Clean Architecture | UI → Application → Domain → Infrastructure | General |
|
|
41
|
+
| Feature-based | Feature A ↛ Feature B internals | Next.js, React |
|
|
42
|
+
| Hexagonal | Adapters → Ports → Domain | DDD projects |
|
|
43
|
+
| Component hierarchy | Page → Feature → Shared → UI Primitives | Frontend |
|
|
44
|
+
|
|
45
|
+
### Step 2: INFER — Define Boundary Rules
|
|
46
|
+
|
|
47
|
+
From detected structure, generate rules:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
// Rule format
|
|
51
|
+
interface ArchRule {
|
|
52
|
+
name: string; // "service-no-ui-import"
|
|
53
|
+
from: string; // Glob pattern: "src/services/**"
|
|
54
|
+
cannotImport: string[]; // ["src/components/**", "src/pages/**"]
|
|
55
|
+
canImport: string[]; // ["src/models/**", "src/utils/**"]
|
|
56
|
+
reason: string; // "Services must be UI-agnostic"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Default rules by stack:**
|
|
61
|
+
|
|
62
|
+
| Stack | Rule |
|
|
63
|
+
|-------|------|
|
|
64
|
+
| Next.js / React | `components/` cannot import from `pages/` or `app/` |
|
|
65
|
+
| Next.js / React | `lib/` cannot import from `components/` |
|
|
66
|
+
| NestJS | `*.service.ts` cannot import from `*.controller.ts` |
|
|
67
|
+
| NestJS | `*.module.ts` is the only valid cross-boundary import |
|
|
68
|
+
| General TS | `src/domain/` cannot import from `src/infra/` |
|
|
69
|
+
| General TS | No circular dependencies between top-level dirs |
|
|
70
|
+
| Python Django | `models.py` cannot import from `views.py` |
|
|
71
|
+
| Python FastAPI | `schemas/` cannot import from `routers/` |
|
|
72
|
+
|
|
73
|
+
### Step 3: GENERATE — Create Test File
|
|
74
|
+
|
|
75
|
+
Output: `tests/arch-guard.test.ts` (or equivalent for stack)
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
/**
|
|
79
|
+
* Architecture Boundary Tests
|
|
80
|
+
* Generated by arch-guard skill
|
|
81
|
+
*
|
|
82
|
+
* These tests enforce architectural constraints mechanically.
|
|
83
|
+
* If a test fails, it means an import violates the intended architecture.
|
|
84
|
+
*/
|
|
85
|
+
import { describe, it, expect } from 'vitest';
|
|
86
|
+
import fs from 'fs';
|
|
87
|
+
import path from 'path';
|
|
88
|
+
|
|
89
|
+
// Helper: extract imports from a file
|
|
90
|
+
function extractImports(filePath: string): string[] {
|
|
91
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
92
|
+
const importRegex = /(?:import|require)\s*\(?['"]([^'"]+)['"]\)?/g;
|
|
93
|
+
const imports: string[] = [];
|
|
94
|
+
let match;
|
|
95
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
96
|
+
imports.push(match[1]);
|
|
97
|
+
}
|
|
98
|
+
return imports;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Helper: resolve relative import to absolute path
|
|
102
|
+
function resolveImport(fromFile: string, importPath: string): string {
|
|
103
|
+
if (importPath.startsWith('.')) {
|
|
104
|
+
return path.resolve(path.dirname(fromFile), importPath);
|
|
105
|
+
}
|
|
106
|
+
return importPath; // external package
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Helper: glob files matching pattern
|
|
110
|
+
function globFiles(pattern: string, baseDir: string): string[] {
|
|
111
|
+
// Use fast-glob or manual recursive scan
|
|
112
|
+
// Implementation depends on available dependencies
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
describe('Architecture Boundaries', () => {
|
|
116
|
+
// GENERATED RULES GO HERE
|
|
117
|
+
// Each rule becomes a test case:
|
|
118
|
+
|
|
119
|
+
it('services cannot import UI components', () => {
|
|
120
|
+
const serviceFiles = globFiles('src/services/**/*.ts', process.cwd());
|
|
121
|
+
const violations: string[] = [];
|
|
122
|
+
|
|
123
|
+
for (const file of serviceFiles) {
|
|
124
|
+
const imports = extractImports(file);
|
|
125
|
+
for (const imp of imports) {
|
|
126
|
+
const resolved = resolveImport(file, imp);
|
|
127
|
+
if (resolved.includes('/components/') || resolved.includes('/pages/')) {
|
|
128
|
+
violations.push(`${file} imports ${imp}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
expect(violations).toEqual([]);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Step 4: VERIFY — Run and Fix
|
|
139
|
+
|
|
140
|
+
1. Run the generated tests: `npx vitest run tests/arch-guard.test.ts`
|
|
141
|
+
2. If violations found:
|
|
142
|
+
- Report each violation with file:line
|
|
143
|
+
- Suggest fix (move shared code to appropriate layer)
|
|
144
|
+
- Do NOT auto-fix — violations need human review
|
|
145
|
+
|
|
146
|
+
## Output Files
|
|
147
|
+
|
|
148
|
+
| File | Purpose |
|
|
149
|
+
|------|---------|
|
|
150
|
+
| `tests/arch-guard.test.ts` | Executable boundary tests |
|
|
151
|
+
| `.vibe/arch-rules.json` | Machine-readable rules (for CI) |
|
|
152
|
+
|
|
153
|
+
## Customization
|
|
154
|
+
|
|
155
|
+
Users can add custom rules to `.vibe/arch-rules.json`:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"rules": [
|
|
160
|
+
{
|
|
161
|
+
"name": "no-direct-db-in-handlers",
|
|
162
|
+
"from": "src/handlers/**",
|
|
163
|
+
"cannotImport": ["src/db/**"],
|
|
164
|
+
"reason": "Handlers must use services, not direct DB access"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The test generator reads this file and adds custom rules to the test suite.
|
|
171
|
+
|
|
172
|
+
## Integration
|
|
173
|
+
|
|
174
|
+
- `vibe init` → auto-detect and generate initial arch-guard tests
|
|
175
|
+
- `vibe update` → refresh rules if directory structure changed
|
|
176
|
+
- Explicit pre-commit JUDGE → run arch-guard tests before commit; a lifecycle hook may accelerate this check
|
|
177
|
+
- `vibe.review` (skill) → code-reviewer (focus: architecture) checks against arch-rules.json
|
|
178
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# vibe.run — E2E Closed Loop & Auto-Fix
|
|
2
|
+
|
|
3
|
+
> vibe.run SKILL.md Automated Verification 에서 참조. UI 시나리오 E2E 루프와 실패 시 자동 수정 절차.
|
|
4
|
+
|
|
5
|
+
### E2E Closed Loop (UI Scenarios)
|
|
6
|
+
|
|
7
|
+
**UI 시나리오가 포함된 Feature일 때 자동 활성화.**
|
|
8
|
+
|
|
9
|
+
Browser Tool Priority:
|
|
10
|
+
|
|
11
|
+
| Priority | Tool | 용도 |
|
|
12
|
+
|----------|------|------|
|
|
13
|
+
| 1st | Agent Browser (접근성 트리) | AI 직접 조작, 최소 토큰 |
|
|
14
|
+
| 2nd | Playwright Test Runner | 테스트 코드 실행, pass/fail 반환 |
|
|
15
|
+
| 3rd | Playwright MCP (DOM) | 최후 수단, 토큰 비효율 |
|
|
16
|
+
|
|
17
|
+
**활성화 조건:** Feature 파일에 UI 관련 시나리오 존재 + `.vibe/e2e/config.json`의 `closedLoop.enabled: true` (기본값) + dev server가 실행 중
|
|
18
|
+
|
|
19
|
+
### Auto-Fix on Failure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Scenario verification failed
|
|
23
|
+
↓ [Collect evidence]
|
|
24
|
+
↓ [Root cause analysis]
|
|
25
|
+
↓ [Read target file FULLY]
|
|
26
|
+
↓ [Implement fix]
|
|
27
|
+
↓ [Re-verify failed scenario only]
|
|
28
|
+
Repeat until pass (stuck 감지로 종료)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Termination conditions (loop-contract JUDGE):**
|
|
32
|
+
- PASS → 다음 scenario
|
|
33
|
+
- stuck (같은 failure가 이전 라운드와 동일, `loop-ledger.js check-stuck`) → automationLevel confirm: 사용자 질문; autonomous: TODO + next scenario
|
|
34
|
+
|
|
35
|
+
**Stakes 프로파일 (SSOT: `vibe/rules/loop-contract.md` Stakes 표):**
|
|
36
|
+
- `demo`/`prototype` → max_iterations 1, 리뷰 1패스, **검증 스크립트 신규 생성 금지** — 검증은 기존 테스트 러너·브라우저 게이트만 사용한다. 새 verify_*.py / 검증 전용 스크립트 파일을 만들지 않는다.
|
|
37
|
+
- JUDGE 검증 산출물 절제 (모든 stakes): 이번 feature 신규 검증 코드 바이트 합이 신규 구현 코드 바이트 합을 초과하면 (`git diff --numstat` 기준) P2 경고를 run-ledger 에 기록한다. advisory — 게이트 통과 여부는 불변.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# ExecPlan — Self-Contained Execution Plan Generator
|
|
2
|
+
|
|
3
|
+
> vibe.run 내부 구현. **Step 1-0 (execution packet 컴파일) 에서만 로드한다.**
|
|
4
|
+
|
|
5
|
+
# ExecPlan — Self-Contained Execution Plan Generator
|
|
6
|
+
|
|
7
|
+
> **Principle**: "If the agent can't see it, it doesn't exist." Every decision, file path, pattern, and verification step must be explicit in the plan — no implicit knowledge allowed.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
Before `/vibe.run`, generate an ExecPlan to make execution deterministic:
|
|
12
|
+
|
|
13
|
+
| Scenario | Signal |
|
|
14
|
+
|----------|--------|
|
|
15
|
+
| Complex SPEC (3+ phases) | Agent needs long autonomous execution |
|
|
16
|
+
| Team/multi-agent execution | Multiple agents need shared understanding |
|
|
17
|
+
| Context window pressure | Plan survives `/new` session handoff |
|
|
18
|
+
| Unfamiliar codebase | Agent can't rely on implicit knowledge |
|
|
19
|
+
|
|
20
|
+
## Core Flow
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
SPEC + Feature → ANALYZE → RESOLVE → GENERATE → PERSIST
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Step 1: ANALYZE — Extract Everything Needed
|
|
27
|
+
|
|
28
|
+
Read the SPEC and Feature files, then extract:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
For each Phase → For each Scenario:
|
|
32
|
+
1. Requirements (REQ-* IDs)
|
|
33
|
+
2. Given/When/Then conditions
|
|
34
|
+
3. Affected files (MUST exist — verify with Glob)
|
|
35
|
+
4. Dependencies (imports, packages)
|
|
36
|
+
5. Existing patterns to follow (read actual code, don't assume)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Parallel exploration** (3+ agents):
|
|
40
|
+
- Agent 1: Map all file paths mentioned/implied in SPEC → verify they exist
|
|
41
|
+
- Agent 2: For each affected file, extract current interfaces/types/exports
|
|
42
|
+
- Agent 3: Find existing patterns (naming conventions, error handling, test structure)
|
|
43
|
+
|
|
44
|
+
### Step 2: RESOLVE — Eliminate All Ambiguity
|
|
45
|
+
|
|
46
|
+
For every decision point in the SPEC, resolve it NOW:
|
|
47
|
+
|
|
48
|
+
| Ambiguity | Resolution |
|
|
49
|
+
|-----------|------------|
|
|
50
|
+
| "Add validation" | → Which fields? What rules? What error messages? |
|
|
51
|
+
| "Handle errors" | → Which error codes? What response format? |
|
|
52
|
+
| "Follow existing pattern" | → Copy the ACTUAL pattern code into the plan |
|
|
53
|
+
| "Update tests" | → Which test file? What test framework? What assertions? |
|
|
54
|
+
|
|
55
|
+
**Rule**: If you'd need to "figure it out later", resolve it now. The plan must be executable by an agent with ZERO codebase knowledge.
|
|
56
|
+
|
|
57
|
+
### Step 3: GENERATE — Write the ExecPlan
|
|
58
|
+
|
|
59
|
+
Output format: `.vibe/specs/{feature-name}-execplan.md`
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
# ExecPlan: {feature-name}
|
|
63
|
+
|
|
64
|
+
## Meta
|
|
65
|
+
- SPEC: .vibe/specs/{name}.md
|
|
66
|
+
- Feature: .vibe/features/{name}.feature
|
|
67
|
+
- Generated: {timestamp}
|
|
68
|
+
- Phases: {count}
|
|
69
|
+
- Scenarios: {count}
|
|
70
|
+
|
|
71
|
+
## Pre-flight Checks
|
|
72
|
+
- [ ] `npm run build` passes
|
|
73
|
+
- [ ] `npx vitest run` passes (baseline)
|
|
74
|
+
- [ ] Required files exist: {list}
|
|
75
|
+
|
|
76
|
+
## Phase {N}: {phase-name}
|
|
77
|
+
|
|
78
|
+
### Environment
|
|
79
|
+
- Files to modify: {exact paths}
|
|
80
|
+
- Files to create: {exact paths}
|
|
81
|
+
- Dependencies to add: {package@version}
|
|
82
|
+
- Patterns to follow: (inline code snippets from codebase)
|
|
83
|
+
|
|
84
|
+
### Scenario {N}.{M}: {scenario-name}
|
|
85
|
+
|
|
86
|
+
**Given**: {precondition}
|
|
87
|
+
→ Setup: {exact code/commands to establish precondition}
|
|
88
|
+
|
|
89
|
+
**When**: {action}
|
|
90
|
+
→ Implement: {step-by-step implementation instructions}
|
|
91
|
+
- File: {path}
|
|
92
|
+
- Location: after line containing `{anchor text}`
|
|
93
|
+
- Code: (inline snippet)
|
|
94
|
+
- Imports needed: {list}
|
|
95
|
+
|
|
96
|
+
**Then**: {expected result}
|
|
97
|
+
→ Verify:
|
|
98
|
+
- Command: `{test command}`
|
|
99
|
+
- Expected: {output/behavior}
|
|
100
|
+
- Fallback: {what to do if verification fails}
|
|
101
|
+
|
|
102
|
+
### Phase {N} Gate
|
|
103
|
+
- [ ] Build: `npm run build`
|
|
104
|
+
- [ ] Tests: `npx vitest run {relevant-test-files}`
|
|
105
|
+
- [ ] Type check: `npx tsc --noEmit`
|
|
106
|
+
|
|
107
|
+
## Completion Criteria
|
|
108
|
+
- Coverage threshold: ≥95%
|
|
109
|
+
- All scenarios passing
|
|
110
|
+
- No regressions in existing tests
|
|
111
|
+
- RTM: `generateTraceabilityMatrix("{feature-name}")`
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 4: PERSIST — Save and Link
|
|
115
|
+
|
|
116
|
+
1. Save ExecPlan to `.vibe/specs/{feature-name}-execplan.md`
|
|
117
|
+
2. Save session context: `save_memory("execplan-{feature}", {summary})`
|
|
118
|
+
3. Output execution command:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Ready to execute:
|
|
122
|
+
/vibe.run "{feature-name}" ultrawork
|
|
123
|
+
|
|
124
|
+
Or hand off to new session:
|
|
125
|
+
/vibe.continue
|
|
126
|
+
→ Load: .vibe/specs/{feature-name}-execplan.md
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Quality Checks
|
|
130
|
+
|
|
131
|
+
| Check | Criteria |
|
|
132
|
+
|-------|----------|
|
|
133
|
+
| No implicit knowledge | Every file path verified with Glob |
|
|
134
|
+
| No "figure it out" | Every decision resolved with actual code |
|
|
135
|
+
| Survives handoff | Plan readable without any prior context |
|
|
136
|
+
| Inline patterns | Actual code snippets, not "follow existing pattern" |
|
|
137
|
+
| Verification steps | Every scenario has a concrete verification command |
|
|
138
|
+
|
|
139
|
+
## Anti-patterns
|
|
140
|
+
|
|
141
|
+
- "See the existing implementation" → Copy the relevant code inline
|
|
142
|
+
- "Follow the pattern in X" → Show the actual pattern
|
|
143
|
+
- "Standard error handling" → Specify exact error codes and messages
|
|
144
|
+
- "Update tests accordingly" → Name the test file, framework, and assertions
|
|
145
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# vibe.run — Tools, Guidelines & Retrospective
|
|
2
|
+
|
|
3
|
+
> vibe.run SKILL.md 에서 참조. 시맨틱 분석·메모리 도구, 코딩 가이드라인, rules 참조표, TRUST 5, 자동 회고 템플릿.
|
|
4
|
+
|
|
5
|
+
## Core Tools (Semantic Analysis & Memory)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# All tools via:
|
|
9
|
+
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)))"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| Tool | Purpose |
|
|
13
|
+
|------|---------|
|
|
14
|
+
| `analyzeComplexity` | Analyze code complexity |
|
|
15
|
+
| `validateCodeQuality` | Validate code quality |
|
|
16
|
+
| `saveMemory` | Save important decisions |
|
|
17
|
+
| `recallMemory` | Recall saved memory |
|
|
18
|
+
| `listMemories` | List all memories |
|
|
19
|
+
|
|
20
|
+
Session management: explicitly load the latest checkpoint at start and persist a
|
|
21
|
+
checkpoint before context reset. Lifecycle hooks may accelerate those steps when
|
|
22
|
+
available, but completion never depends on them.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Coding Guidelines (Mandatory)
|
|
27
|
+
|
|
28
|
+
> Read `references/race-review.md` for full type safety guidelines, language-specific examples, and the type-violation detection/escalation table.
|
|
29
|
+
|
|
30
|
+
**TypeScript — core rule:**
|
|
31
|
+
```typescript
|
|
32
|
+
// BAD
|
|
33
|
+
function process(data: any): any { return data.foo; }
|
|
34
|
+
|
|
35
|
+
// GOOD
|
|
36
|
+
function process(data: unknown): Result {
|
|
37
|
+
if (isValidData(data)) return data.foo;
|
|
38
|
+
throw new Error('Invalid');
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
No `any` / `as any` / `@ts-ignore` — fix at root. Explicit return types on all functions.
|
|
43
|
+
|
|
44
|
+
**Detection outcome:** Run the project's explicit static type check and treat a
|
|
45
|
+
non-zero exit as JUDGE failure. Harness diagnostics or auto-commit hooks may
|
|
46
|
+
surface the same violations earlier, but they do not replace the command result.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Rules Reference
|
|
51
|
+
|
|
52
|
+
- `core/development-philosophy.md` — Surgical precision, modify only requested scope
|
|
53
|
+
- `core/quick-start.md` — Korean, DRY, SRP, YAGNI
|
|
54
|
+
- `standards/complexity-metrics.md` — Functions ≤50 lines, nesting ≤3 levels
|
|
55
|
+
- `quality/checklist.md` — Code quality checklist
|
|
56
|
+
- Language guide: `~/.claude/vibe/languages/{stack}.md`
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## TRUST 5 Principles
|
|
61
|
+
|
|
62
|
+
| Principle | Description |
|
|
63
|
+
|-----------|-------------|
|
|
64
|
+
| **T**est-first | Write tests first |
|
|
65
|
+
| **R**eadable | Clear code |
|
|
66
|
+
| **U**nified | Consistent style |
|
|
67
|
+
| **S**ecured | Consider security |
|
|
68
|
+
| **T**rackable | Logging, monitoring |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Auto-Retrospective (Post-Implementation)
|
|
73
|
+
|
|
74
|
+
After ALL phases complete, save to `.vibe/retros/{feature-name}.md`:
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
## Retrospective: {feature-name}
|
|
78
|
+
### What Worked / What Didn't / Key Decisions / Lessons Learned
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Keep under 20 lines. Record key lessons in the project progress/checkpoint artifact and update `claude-progress.txt`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
@@ -2,52 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
> Loaded by vibe.run SKILL.md when parallel execution patterns, parallel subagent groups, or model selection details are needed.
|
|
4
4
|
|
|
5
|
-
## Model Orchestration
|
|
5
|
+
## Model Orchestration — Inherit by Default
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Do not pass a `model` parameter.** Subagents inherit the session model.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The complexity→tier routing that used to live here (Haiku for simple work, Sonnet
|
|
10
|
+
for standard, Opus for architecture) is **retired**. It was written when the
|
|
11
|
+
default session model was weak enough that routing *up* was the win. With a strong
|
|
12
|
+
default, a hardcoded tier can only route *down* — and a downgraded subagent's
|
|
13
|
+
misses land back on the session model to find and undo. That costs more than the
|
|
14
|
+
tokens it saves.
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|------------------|-------|-------------|
|
|
13
|
-
| 0-7 (Low) | **Haiku** | Simple fixes, searches, single file changes |
|
|
14
|
-
| 8-19 (Medium) | **Sonnet** | Standard features, 3-5 files, integrations |
|
|
15
|
-
| 20+ (High) | **Opus** | Architecture, security, multi-service, 6+ files |
|
|
16
|
+
### The only exception
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
| Agent | Tier | Why it overrides the session model |
|
|
19
|
+
|-------|------|------------------------------------|
|
|
20
|
+
| `architect` | `opus` | Design decisions are expensive to reverse — guarantee a floor even when the session runs lower |
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| Security implication | +12 |
|
|
23
|
-
| Multi-service | +8 |
|
|
24
|
-
| Refactoring | +12 |
|
|
25
|
-
| 6+ files | +15 |
|
|
26
|
-
| 3-5 files | +8 |
|
|
27
|
-
| New feature | +5 |
|
|
28
|
-
| Bug fix | -3 |
|
|
29
|
-
| Documentation | -5 |
|
|
22
|
+
Every other agent (`implementer`, `tester`, `e2e-tester`, `code-reviewer`,
|
|
23
|
+
`security-reviewer`, `build-error-resolver`, UI/event agents) is `inherit`.
|
|
24
|
+
SSOT: `CLAUDE_MODEL_MAPPING` in `src/cli/postinstall/constants.ts`.
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
> Adding a new tier override requires an answer to: *"why must this run at this
|
|
27
|
+
> tier regardless of what the session is running?"* "It's a simple task" is not
|
|
28
|
+
> an answer — a strong model finishes simple tasks quickly at no quality cost.
|
|
32
29
|
|
|
33
|
-
|
|
30
|
+
### What still scales with complexity
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| implementer | `model: "haiku"` | `model: "sonnet"` | `model: "opus"` |
|
|
39
|
-
| architect | `model: "haiku"` | `model: "sonnet"` | `model: "opus"` |
|
|
40
|
-
|
|
41
|
-
### Task Calls by Role
|
|
42
|
-
|
|
43
|
-
| Task Type | Model | Task Parameter |
|
|
44
|
-
|-----------|-------|----------------|
|
|
45
|
-
| Simple search | Haiku | `model: "haiku"` |
|
|
46
|
-
| Codebase exploration | Haiku/Sonnet | Auto-selected |
|
|
47
|
-
| Core implementation | Sonnet | `model: "sonnet"` |
|
|
48
|
-
| Test writing | Haiku | `model: "haiku"` |
|
|
49
|
-
| Architecture decisions | Opus | Main session |
|
|
50
|
-
| Final review | Opus | Main session |
|
|
32
|
+
Complexity should change **how many agents you spawn and how deep they go**, not
|
|
33
|
+
which model they run. See the Stakes table in `vibe/rules/loop-contract.md` — that
|
|
34
|
+
is the SSOT for proportional execution.
|
|
51
35
|
|
|
52
36
|
## Mandatory Parallel Exploration (Phase Start)
|
|
53
37
|
|
|
@@ -59,11 +43,11 @@ Tier-variant agents were consolidated — the model is a Task parameter, not a s
|
|
|
59
43
|
│ │
|
|
60
44
|
│ Launch ALL of these in ONE message: │
|
|
61
45
|
│ │
|
|
62
|
-
│ Task
|
|
63
|
-
│
|
|
64
|
-
│ Task
|
|
65
|
-
│
|
|
66
|
-
│ Task
|
|
46
|
+
│ Task ─┬─→ "Analyze related files in <context>" │
|
|
47
|
+
│ │ │
|
|
48
|
+
│ Task ─┼─→ "Check dependencies and imports" │
|
|
49
|
+
│ │ │
|
|
50
|
+
│ Task ─┴─→ "Find existing patterns and conventions" │
|
|
67
51
|
│ │
|
|
68
52
|
│ [If GPT enabled] Bash: node "[LLM_SCRIPT]" gpt orchestrate-json "[question]"
|
|
69
53
|
│ [If Antigravity enabled] Bash: node "[LLM_SCRIPT]" antigravity orchestrate-json "[question]"
|
|
@@ -71,7 +55,7 @@ Tier-variant agents were consolidated — the model is a Task parameter, not a s
|
|
|
71
55
|
│
|
|
72
56
|
↓ (wait for all to complete)
|
|
73
57
|
┌─────────────────────────────────────────────────────────────────┐
|
|
74
|
-
│ STEP 2: SYNTHESIZE
|
|
58
|
+
│ STEP 2: SYNTHESIZE │
|
|
75
59
|
│ - Review all exploration results │
|
|
76
60
|
│ - Decide implementation approach │
|
|
77
61
|
│ - Identify files to modify/create │
|
|
@@ -81,10 +65,10 @@ Tier-variant agents were consolidated — the model is a Task parameter, not a s
|
|
|
81
65
|
┌─────────────────────────────────────────────────────────────────┐
|
|
82
66
|
│ STEP 3: IMPLEMENT + BACKGROUND AGENTS (PARALLEL) │
|
|
83
67
|
│ │
|
|
84
|
-
│ Main Agent
|
|
68
|
+
│ Main Agent: │
|
|
85
69
|
│ └─→ Execute current phase implementation │
|
|
86
70
|
│ │
|
|
87
|
-
│ Background Agents (
|
|
71
|
+
│ Background Agents (run_in_background=true): │
|
|
88
72
|
│ ├─→ Task: "Prepare Phase N+1 - analyze required files" │
|
|
89
73
|
│ ├─→ Task: "Pre-generate test cases for current implementation" │
|
|
90
74
|
│ └─→ Task: "Search for related types/interfaces needed" │
|
|
@@ -97,7 +81,7 @@ Tier-variant agents were consolidated — the model is a Task parameter, not a s
|
|
|
97
81
|
│ STEP 4: TEST + PHASE PIPELINING │
|
|
98
82
|
│ │
|
|
99
83
|
│ Current Phase: │
|
|
100
|
-
│ └─→ Task
|
|
84
|
+
│ └─→ Task: Write tests using pre-generated cases │
|
|
101
85
|
│ │
|
|
102
86
|
│ Next Phase Prep (from background results): │
|
|
103
87
|
│ └─→ Already have file analysis, ready to start immediately │
|
|
@@ -109,18 +93,18 @@ Tier-variant agents were consolidated — the model is a Task parameter, not a s
|
|
|
109
93
|
**Correct — Single message with multiple parallel Tasks:**
|
|
110
94
|
```
|
|
111
95
|
<message>
|
|
112
|
-
Task(
|
|
113
|
-
Task(
|
|
114
|
-
Task(
|
|
96
|
+
Task("Analyze src/components/ for existing patterns")
|
|
97
|
+
Task("Check package.json dependencies")
|
|
98
|
+
Task("Find usage of similar features in codebase")
|
|
115
99
|
</message>
|
|
116
100
|
→ All 3 run simultaneously, ~3x faster
|
|
117
101
|
```
|
|
118
102
|
|
|
119
103
|
**WRONG — Sequential calls (DO NOT DO THIS):**
|
|
120
104
|
```
|
|
121
|
-
<message>Task(
|
|
122
|
-
<message>Task(
|
|
123
|
-
<message>Task(
|
|
105
|
+
<message>Task("Analyze...")</message>
|
|
106
|
+
<message>Task("Check...")</message>
|
|
107
|
+
<message>Task("Find...")</message>
|
|
124
108
|
→ 3x slower, wastes time
|
|
125
109
|
```
|
|
126
110
|
|
|
@@ -141,27 +125,27 @@ No status polling is needed — the harness re-invokes you when each background
|
|
|
141
125
|
```
|
|
142
126
|
Phase N Start
|
|
143
127
|
│
|
|
144
|
-
├─→ [PARALLEL] Task
|
|
128
|
+
├─→ [PARALLEL] Task × 3: Exploration
|
|
145
129
|
│ - Related code analysis
|
|
146
130
|
│ - Dependency check
|
|
147
131
|
│ - Pattern discovery
|
|
148
132
|
│
|
|
149
133
|
↓ (all complete)
|
|
150
134
|
│
|
|
151
|
-
├─→
|
|
135
|
+
├─→ Synthesize and decide
|
|
152
136
|
│
|
|
153
137
|
├─→ [PARALLEL PIPELINE] ←── KEY SPEED OPTIMIZATION
|
|
154
138
|
│ │
|
|
155
|
-
│ ├─→ Main: Task
|
|
139
|
+
│ ├─→ Main: Task Implementation
|
|
156
140
|
│ │
|
|
157
141
|
│ └─→ Background (run_in_background=true):
|
|
158
|
-
│ ├─→ Task
|
|
159
|
-
│ ├─→ Task
|
|
160
|
-
│ └─→ Task
|
|
142
|
+
│ ├─→ Task: Phase N+1 file analysis
|
|
143
|
+
│ ├─→ Task: Test case preparation
|
|
144
|
+
│ └─→ Task: Type/interface lookup
|
|
161
145
|
│
|
|
162
146
|
↓ (main completes)
|
|
163
147
|
│
|
|
164
|
-
├─→ Task
|
|
148
|
+
├─→ Task: Tests (uses pre-generated cases)
|
|
165
149
|
│
|
|
166
150
|
↓
|
|
167
151
|
Phase N Complete
|