vibe-validate 0.17.1-rc.3 → 0.17.1
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/package.json +3 -4
- package/skill/SKILL.md +79 -364
- package/skill/resources/agent-integration-guide.md +936 -0
- package/skill/resources/caching-internals.md +366 -0
- package/skill/resources/configure-project.md +1 -1
- package/skill/resources/run-capability.md +2 -2
- package/skill/resources/work-recovery.md +233 -0
- package/skill/resources/workflows.md +504 -0
- package/scripts/uninstall-skill.js +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibe-validate",
|
|
3
|
-
"version": "0.17.1
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Git-aware validation orchestration for vibe coding (LLM-assisted development) - umbrella package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@vibe-validate/cli": "0.17.1
|
|
53
|
+
"@vibe-validate/cli": "0.17.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^20.14.8",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"scripts": {
|
|
61
61
|
"test": "vitest run",
|
|
62
62
|
"lint": "echo 'No linting needed for delegation wrappers'",
|
|
63
|
-
"postinstall": "node scripts/install-skill.js"
|
|
64
|
-
"preuninstall": "node scripts/uninstall-skill.js"
|
|
63
|
+
"postinstall": "node scripts/install-skill.js"
|
|
65
64
|
}
|
|
66
65
|
}
|
package/skill/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ permissions:
|
|
|
22
22
|
|
|
23
23
|
# vibe-validate Expert Agent
|
|
24
24
|
|
|
25
|
-
You are an expert in **vibe-validate**, a git-aware validation orchestration tool designed for LLM-assisted development (vibe coding). You help developers leverage vibe-validate's
|
|
25
|
+
You are an expert in **vibe-validate**, a git-aware validation orchestration tool designed for LLM-assisted development (vibe coding). You help developers leverage vibe-validate's dramatically faster cached validation and 90-95% context window reduction.
|
|
26
26
|
|
|
27
27
|
## Core Principles
|
|
28
28
|
|
|
@@ -54,7 +54,7 @@ npx vibe-validate pre-commit
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
# Step 2: Query cached state (DO NOT re-run tests!)
|
|
57
|
-
npx vibe-validate state
|
|
57
|
+
npx vibe-validate state
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
**Step 3: Analyze the state output**:
|
|
@@ -85,6 +85,9 @@ git merge origin/main # or git rebase origin/main
|
|
|
85
85
|
npx vibe-validate pre-commit
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
**For complete workflow patterns and decision trees**:
|
|
89
|
+
- **Load**: [Workflows & Decision Trees](resources/workflows.md)
|
|
90
|
+
|
|
88
91
|
### 2. Context-Optimized Test Running
|
|
89
92
|
|
|
90
93
|
**When**: Running tests, linting, type checking during development
|
|
@@ -121,15 +124,13 @@ guidance: "Fix assertion in tests/foo.test.ts:42"
|
|
|
121
124
|
- ❌ Already-wrapped: `pnpm validate`
|
|
122
125
|
- ❌ Interactive: `git log`
|
|
123
126
|
|
|
124
|
-
**
|
|
125
|
-
|
|
126
|
-
The `run` command automatically caches results by git tree hash:
|
|
127
|
+
**Smart Caching** (automatic):
|
|
127
128
|
|
|
128
129
|
```bash
|
|
129
130
|
# First run - executes and caches (~30s)
|
|
130
131
|
npx vibe-validate run "pnpm test"
|
|
131
132
|
|
|
132
|
-
# Repeat run - instant (<
|
|
133
|
+
# Repeat run - instant (<1s) ✨
|
|
133
134
|
npx vibe-validate run "pnpm test"
|
|
134
135
|
```
|
|
135
136
|
|
|
@@ -137,31 +138,20 @@ npx vibe-validate run "pnpm test"
|
|
|
137
138
|
```bash
|
|
138
139
|
# Check cache without executing
|
|
139
140
|
npx vibe-validate run --check "pnpm test"
|
|
140
|
-
# Exit 0 if cached, exit 1 if not
|
|
141
141
|
|
|
142
142
|
# Force fresh execution
|
|
143
143
|
npx vibe-validate run --force "pnpm test"
|
|
144
|
-
# Always executes, updates cache
|
|
145
144
|
```
|
|
146
145
|
|
|
147
|
-
**
|
|
148
|
-
|
|
149
|
-
# List cached runs
|
|
150
|
-
npx vibe-validate history list --run
|
|
151
|
-
|
|
152
|
-
# Filter by command
|
|
153
|
-
npx vibe-validate history list --run "vitest"
|
|
154
|
-
|
|
155
|
-
# Clear run cache
|
|
156
|
-
npx vibe-validate history prune --run --all
|
|
157
|
-
```
|
|
146
|
+
**For complete run capability details**:
|
|
147
|
+
- **Load**: [Run Capability Guide](resources/run-capability.md)
|
|
158
148
|
|
|
159
149
|
### 3. Full Validation Pipeline
|
|
160
150
|
|
|
161
151
|
**When**: Validating before push, checking all validation steps
|
|
162
152
|
|
|
163
153
|
```bash
|
|
164
|
-
# Run
|
|
154
|
+
# Run all validation phases
|
|
165
155
|
npx vibe-validate validate
|
|
166
156
|
|
|
167
157
|
# Force re-validation (bypass cache)
|
|
@@ -200,11 +190,11 @@ npx vibe-validate doctor
|
|
|
200
190
|
**When**: Checking current validation status, debugging failures
|
|
201
191
|
|
|
202
192
|
```bash
|
|
203
|
-
#
|
|
193
|
+
# Query current state (instant, no re-run)
|
|
204
194
|
npx vibe-validate state
|
|
205
195
|
|
|
206
|
-
# Full error output
|
|
207
|
-
npx vibe-validate state --
|
|
196
|
+
# Full error output
|
|
197
|
+
npx vibe-validate state --verbose
|
|
208
198
|
```
|
|
209
199
|
|
|
210
200
|
**State includes**:
|
|
@@ -214,7 +204,31 @@ npx vibe-validate state --yaml
|
|
|
214
204
|
- Failed step details
|
|
215
205
|
- Complete error output
|
|
216
206
|
|
|
217
|
-
### 6.
|
|
207
|
+
### 6. Work Recovery & Protection
|
|
208
|
+
|
|
209
|
+
**When**: User accidentally loses work, wants to recover from previous state
|
|
210
|
+
|
|
211
|
+
**Quick recovery**:
|
|
212
|
+
```bash
|
|
213
|
+
# List recent validation snapshots
|
|
214
|
+
vv history list --limit 5
|
|
215
|
+
|
|
216
|
+
# Recover deleted file
|
|
217
|
+
git cat-file -p <tree-hash>:path/to/file.ts > path/to/file.ts
|
|
218
|
+
|
|
219
|
+
# Recover entire directory
|
|
220
|
+
git checkout <tree-hash> -- src/
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Automatic snapshots created during**:
|
|
224
|
+
- `vv validate` - Full validation pipeline
|
|
225
|
+
- `vv pre-commit` - Pre-commit workflow
|
|
226
|
+
- `vv run <command>` - Individual command execution
|
|
227
|
+
|
|
228
|
+
**For comprehensive recovery patterns**:
|
|
229
|
+
- **Load**: [Work Recovery Guide](resources/work-recovery.md)
|
|
230
|
+
|
|
231
|
+
### 7. PR Monitoring
|
|
218
232
|
|
|
219
233
|
**When**: Waiting for CI validation, debugging CI failures
|
|
220
234
|
|
|
@@ -224,9 +238,6 @@ npx vibe-validate watch-pr
|
|
|
224
238
|
|
|
225
239
|
# Specific PR number
|
|
226
240
|
npx vibe-validate watch-pr 123
|
|
227
|
-
|
|
228
|
-
# YAML output
|
|
229
|
-
npx vibe-validate watch-pr --yaml
|
|
230
241
|
```
|
|
231
242
|
|
|
232
243
|
**Features**:
|
|
@@ -234,7 +245,7 @@ npx vibe-validate watch-pr --yaml
|
|
|
234
245
|
- Extracts vibe-validate state from failed runs
|
|
235
246
|
- Provides recovery commands
|
|
236
247
|
|
|
237
|
-
###
|
|
248
|
+
### 8. Project Initialization
|
|
238
249
|
|
|
239
250
|
**When**: Setting up vibe-validate in a new project
|
|
240
251
|
|
|
@@ -252,127 +263,16 @@ npx vibe-validate init --template typescript-react
|
|
|
252
263
|
|
|
253
264
|
**After init**: Always run `npx vibe-validate doctor`
|
|
254
265
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
**When**: User accidentally loses work, wants to recover from previous state, or wants to compare code states
|
|
266
|
+
**For comprehensive setup guidance**:
|
|
267
|
+
- **Load**: [Configure Project Guide](resources/configure-project.md)
|
|
258
268
|
|
|
259
|
-
|
|
269
|
+
### 9. Improving Poor Extraction Results
|
|
260
270
|
|
|
261
|
-
|
|
262
|
-
# List all validation points (timestamped tree hashes)
|
|
263
|
-
vv history list
|
|
264
|
-
|
|
265
|
-
# Show details of specific validation
|
|
266
|
-
vv history show <tree-hash>
|
|
267
|
-
|
|
268
|
-
# YAML output for programmatic access
|
|
269
|
-
vv history list --yaml
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
#### Recover Lost Work
|
|
273
|
-
|
|
274
|
-
**Scenario**: User accidentally ran `git restore .` or deleted files
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
# Step 1: Find recent validation point
|
|
278
|
-
vv history list --limit 5
|
|
279
|
-
|
|
280
|
-
# Step 2: View file content from that validation
|
|
281
|
-
git cat-file -p <tree-hash>:path/to/file.ts
|
|
282
|
-
|
|
283
|
-
# Step 3: Recover the file
|
|
284
|
-
git cat-file -p <tree-hash>:path/to/file.ts > path/to/file.ts
|
|
285
|
-
|
|
286
|
-
# Or recover entire directory
|
|
287
|
-
git checkout <tree-hash> -- src/
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
#### Compare Code States
|
|
291
|
-
|
|
292
|
-
**Scenario**: User wants to see what changed between two validation points
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
# Compare two tree hashes
|
|
296
|
-
git diff <old-tree-hash> <new-tree-hash>
|
|
297
|
-
|
|
298
|
-
# Compare specific file between validations
|
|
299
|
-
git diff <old-tree-hash>:<file> <new-tree-hash>:<file>
|
|
300
|
-
|
|
301
|
-
# Show what files changed
|
|
302
|
-
git diff --name-status <old-tree-hash> <new-tree-hash>
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
#### View Files in Snapshot
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
# List all files in a tree hash
|
|
309
|
-
git ls-tree -r <tree-hash>
|
|
310
|
-
|
|
311
|
-
# List specific directory
|
|
312
|
-
git ls-tree -r <tree-hash> src/
|
|
313
|
-
|
|
314
|
-
# View specific file
|
|
315
|
-
git cat-file -p <tree-hash>:src/feature.ts
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
#### When Work is Protected
|
|
319
|
-
|
|
320
|
-
Automatic snapshots are created during:
|
|
321
|
-
- `vv validate` - Full validation pipeline
|
|
322
|
-
- `vv pre-commit` - Pre-commit workflow
|
|
323
|
-
- `vv run <command>` - Individual command execution (v0.15.0+)
|
|
324
|
-
|
|
325
|
-
Each creates a tree hash in git objects that captures complete working directory state.
|
|
326
|
-
|
|
327
|
-
#### What Gets Protected
|
|
328
|
-
|
|
329
|
-
- ✅ Staged changes (in git index)
|
|
330
|
-
- ✅ Unstaged modifications (tracked files)
|
|
331
|
-
- ✅ Untracked files (new files, not in .gitignore)
|
|
332
|
-
|
|
333
|
-
Not protected (by design):
|
|
334
|
-
- ❌ Files in .gitignore (secrets, build artifacts)
|
|
335
|
-
|
|
336
|
-
#### Recovery Patterns
|
|
337
|
-
|
|
338
|
-
**Pattern 1: Undo Recent Changes**
|
|
339
|
-
```bash
|
|
340
|
-
# List recent validations
|
|
341
|
-
vv history list --limit 10
|
|
342
|
-
|
|
343
|
-
# Pick validation from before bad changes
|
|
344
|
-
# Recover all affected files
|
|
345
|
-
git checkout <good-tree-hash> -- src/
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
**Pattern 2: Cherry-pick Deleted File**
|
|
349
|
-
```bash
|
|
350
|
-
# Find validation when file existed
|
|
351
|
-
vv history list
|
|
352
|
-
|
|
353
|
-
# Recover just that file
|
|
354
|
-
git cat-file -p <tree-hash>:path/to/deleted.ts > path/to/deleted.ts
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**Pattern 3: Compare Before/After Refactoring**
|
|
358
|
-
```bash
|
|
359
|
-
# Before refactoring validation: abc123
|
|
360
|
-
# After refactoring validation: def456
|
|
361
|
-
|
|
362
|
-
# See all changes
|
|
363
|
-
git diff abc123 def456
|
|
364
|
-
|
|
365
|
-
# If refactoring went wrong, revert specific files
|
|
366
|
-
git checkout abc123 -- src/refactored-file.ts
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### 5. Improving Poor Extraction Results
|
|
370
|
-
|
|
371
|
-
**When**: Validation fails (exitCode !== 0) but no errors extracted (totalErrors === 0), or generic extractor is being used
|
|
271
|
+
**When**: Validation fails (exitCode !== 0) but no errors extracted (totalErrors === 0)
|
|
372
272
|
|
|
373
273
|
**Step 1: Identify the problem**
|
|
374
274
|
```bash
|
|
375
|
-
npx vibe-validate state
|
|
275
|
+
npx vibe-validate state
|
|
376
276
|
```
|
|
377
277
|
|
|
378
278
|
Look for:
|
|
@@ -385,216 +285,61 @@ extraction:
|
|
|
385
285
|
extractor: generic # ❌ Fell back to generic
|
|
386
286
|
```
|
|
387
287
|
|
|
388
|
-
**Step 2:
|
|
389
|
-
-
|
|
390
|
-
- If `extractor: generic` → no specific extractor found for this tool
|
|
391
|
-
- If errors seem truncated → extractor may need tuning
|
|
392
|
-
|
|
393
|
-
**Step 3: Create custom extractor**
|
|
394
|
-
→ **Load**: [Extending Extraction Guide](resources/extending-extraction.md)
|
|
395
|
-
|
|
396
|
-
This guide will:
|
|
397
|
-
1. Help you use `vv create-extractor` scaffolding command
|
|
398
|
-
2. Show you how to identify error patterns in your tool's output
|
|
399
|
-
3. Guide implementation of the extraction logic
|
|
400
|
-
4. Show testing and verification steps
|
|
401
|
-
|
|
402
|
-
**Progressive detail**: If you need to understand how extractors work internally first, the Extending Extraction Guide links to the complete [Error Extractors Guide](resources/error-extractors-guide.md).
|
|
403
|
-
|
|
404
|
-
## Decision Trees
|
|
405
|
-
|
|
406
|
-
### When User Requests a Commit
|
|
407
|
-
|
|
408
|
-
```
|
|
409
|
-
User: "Commit these changes"
|
|
410
|
-
↓
|
|
411
|
-
Run: npx vibe-validate pre-commit
|
|
412
|
-
↓
|
|
413
|
-
├─ Pass → Proceed with commit
|
|
414
|
-
│
|
|
415
|
-
└─ Fail → Query: npx vibe-validate state --yaml
|
|
416
|
-
↓
|
|
417
|
-
Analyze failedStepOutput
|
|
418
|
-
↓
|
|
419
|
-
Fix errors
|
|
420
|
-
↓
|
|
421
|
-
Re-run: npx vibe-validate pre-commit (fast with cache!)
|
|
422
|
-
↓
|
|
423
|
-
Repeat until pass
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
### When User Requests Running Tests
|
|
427
|
-
|
|
428
|
-
```
|
|
429
|
-
User: "Run the tests in path/to/test.ts"
|
|
430
|
-
↓
|
|
431
|
-
Run: npx vibe-validate run "npx vitest path/to/test.ts"
|
|
432
|
-
↓
|
|
433
|
-
Parse YAML output
|
|
434
|
-
↓
|
|
435
|
-
├─ exitCode: 0 → Report success
|
|
436
|
-
│
|
|
437
|
-
└─ exitCode: 1 → Show errors[] from YAML
|
|
438
|
-
↓
|
|
439
|
-
User fixes or asks for help
|
|
440
|
-
↓
|
|
441
|
-
Re-run (wrapped)
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
### When Validation Behaves Unexpectedly
|
|
445
|
-
|
|
446
|
-
```
|
|
447
|
-
Issue: Validation slow/flaky/failing unexpectedly
|
|
448
|
-
↓
|
|
449
|
-
Run: npx vibe-validate doctor
|
|
450
|
-
↓
|
|
451
|
-
├─ Issues found → Follow guidance to fix
|
|
452
|
-
│
|
|
453
|
-
└─ No issues → Check configuration validity
|
|
454
|
-
↓
|
|
455
|
-
Run: npx vibe-validate config --validate
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
## Performance & Caching
|
|
459
|
-
|
|
460
|
-
### How Caching Works
|
|
461
|
-
|
|
462
|
-
**Cache key**: Git tree hash (deterministic content hash)
|
|
463
|
-
- Same code = same hash
|
|
464
|
-
- Includes untracked files
|
|
465
|
-
- No timestamps (purely content-based)
|
|
466
|
-
|
|
467
|
-
**Cache hit**: ~288ms (312x faster than full validation)
|
|
468
|
-
**Cache miss**: ~60-90s (runs all validation steps)
|
|
469
|
-
|
|
470
|
-
**When cache invalidates**:
|
|
471
|
-
- Any file content changes
|
|
472
|
-
- New files added
|
|
473
|
-
- Files deleted
|
|
474
|
-
- Working tree modifications
|
|
475
|
-
|
|
476
|
-
**When cache persists**:
|
|
477
|
-
- Switching branches (if same code)
|
|
478
|
-
- Git operations (commits, merges) that result in same tree
|
|
479
|
-
- Time passing (content-based, not time-based)
|
|
480
|
-
|
|
481
|
-
### Leveraging Caching for Speed
|
|
482
|
-
|
|
483
|
-
**Pattern**: Fix incrementally
|
|
484
|
-
```bash
|
|
485
|
-
# First run: Full validation (~90s)
|
|
486
|
-
npx vibe-validate validate
|
|
487
|
-
|
|
488
|
-
# Fix 1-2 errors
|
|
489
|
-
# Second run: Mostly cached, only changed files re-validated
|
|
490
|
-
npx vibe-validate validate
|
|
288
|
+
**Step 2: Create custom extractor**
|
|
289
|
+
- **Load**: [Extending Extraction Guide](resources/extending-extraction.md)
|
|
491
290
|
|
|
492
|
-
|
|
493
|
-
```
|
|
291
|
+
This guide shows how to use `vv create-extractor` and implement custom error extraction logic.
|
|
494
292
|
|
|
495
293
|
## Configuration
|
|
496
294
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
`vibe-validate.config.yaml` (project root)
|
|
295
|
+
**Config file**: `vibe-validate.config.yaml` (project root)
|
|
500
296
|
|
|
501
297
|
**Schema URL** (for IDE autocomplete):
|
|
502
298
|
```yaml
|
|
503
299
|
$schema: https://unpkg.com/@vibe-validate/config/config.schema.json
|
|
504
300
|
```
|
|
505
301
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
```yaml
|
|
509
|
-
git:
|
|
510
|
-
mainBranch: main # Default branch for sync checks
|
|
511
|
-
remoteOrigin: origin # Remote name
|
|
512
|
-
autoSync: false # Never auto-merge (safety)
|
|
513
|
-
|
|
514
|
-
validation:
|
|
515
|
-
failFast: true # Stop on first phase failure
|
|
516
|
-
phases:
|
|
517
|
-
- name: Pre-Qualification
|
|
518
|
-
parallel: true # Run steps in parallel
|
|
519
|
-
steps:
|
|
520
|
-
- name: TypeScript
|
|
521
|
-
command: pnpm typecheck
|
|
522
|
-
- name: ESLint
|
|
523
|
-
command: pnpm lint
|
|
524
|
-
|
|
525
|
-
- name: Testing
|
|
526
|
-
parallel: false # Sequential
|
|
527
|
-
steps:
|
|
528
|
-
- name: Unit Tests
|
|
529
|
-
command: pnpm test
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
**For detailed configuration**: Load [Configuration Reference](resources/configuration-reference.md)
|
|
533
|
-
|
|
534
|
-
## Error Extractors
|
|
302
|
+
**For complete configuration reference**:
|
|
303
|
+
- **Load**: [Configuration Reference](resources/configuration-reference.md)
|
|
535
304
|
|
|
536
|
-
|
|
305
|
+
## Performance & Caching
|
|
537
306
|
|
|
538
|
-
**
|
|
539
|
-
-
|
|
540
|
-
-
|
|
541
|
-
-
|
|
542
|
-
- OpenAPI validators
|
|
543
|
-
- Generic (fallback)
|
|
307
|
+
**How it works**:
|
|
308
|
+
- Git tree hash (content-based) = cache key
|
|
309
|
+
- Same code = same hash = instant cache hit
|
|
310
|
+
- Changed code = new hash = re-validation
|
|
544
311
|
|
|
545
|
-
**
|
|
312
|
+
**Cache persists across**:
|
|
313
|
+
- Branch switches (if same code)
|
|
314
|
+
- Time passing (content-based, not time-based)
|
|
315
|
+
- Git operations (commits, merges)
|
|
546
316
|
|
|
547
|
-
**
|
|
317
|
+
**For complete caching internals and optimization strategies**:
|
|
318
|
+
- **Load**: [Caching Internals Guide](resources/caching-internals.md)
|
|
548
319
|
|
|
549
320
|
## Troubleshooting
|
|
550
321
|
|
|
551
|
-
###
|
|
322
|
+
### Quick Fixes
|
|
552
323
|
|
|
553
|
-
**
|
|
324
|
+
**"vibe-validate not found"**
|
|
554
325
|
```bash
|
|
555
326
|
npm install -D vibe-validate
|
|
556
327
|
```
|
|
557
328
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
**Check**:
|
|
561
|
-
1. In a git repository? `git rev-parse --git-dir`
|
|
562
|
-
2. Run: `npx vibe-validate doctor`
|
|
563
|
-
|
|
564
|
-
### "Validation passes locally but fails in CI"
|
|
565
|
-
|
|
566
|
-
**Check**:
|
|
567
|
-
1. Force re-run locally: `npx vibe-validate validate --force`
|
|
568
|
-
2. Verify no hardcoded paths or environment-specific code
|
|
569
|
-
3. Check test isolation (no shared state)
|
|
570
|
-
|
|
571
|
-
### "Branch sync check fails incorrectly"
|
|
572
|
-
|
|
573
|
-
**Check**:
|
|
574
|
-
1. Fetch latest: `git fetch origin`
|
|
575
|
-
2. Verify tracking: `git branch -vv`
|
|
576
|
-
3. Confirm remote exists: `git ls-remote origin main`
|
|
577
|
-
|
|
578
|
-
### "I accidentally deleted my work"
|
|
579
|
-
|
|
580
|
-
**Check recent validations**:
|
|
329
|
+
**"Validation slow every time"**
|
|
581
330
|
```bash
|
|
582
|
-
|
|
331
|
+
git rev-parse --git-dir # Check if in git repo
|
|
332
|
+
npx vibe-validate doctor # Run diagnostics
|
|
583
333
|
```
|
|
584
334
|
|
|
585
|
-
**
|
|
335
|
+
**"I accidentally deleted my work"**
|
|
586
336
|
```bash
|
|
587
|
-
|
|
588
|
-
git
|
|
589
|
-
|
|
590
|
-
# Recover specific file
|
|
591
|
-
git cat-file -p <tree-hash>:path/to/file.ts > path/to/file.ts
|
|
592
|
-
|
|
593
|
-
# Recover directory
|
|
594
|
-
git checkout <tree-hash> -- src/
|
|
337
|
+
vv history list --limit 5 # Find recent validation
|
|
338
|
+
git checkout <tree-hash> -- path/to/file.ts # Recover
|
|
595
339
|
```
|
|
596
340
|
|
|
597
|
-
**
|
|
341
|
+
**For comprehensive troubleshooting**:
|
|
342
|
+
- **Load**: [Troubleshooting Guide](resources/troubleshooting.md)
|
|
598
343
|
|
|
599
344
|
## Reference Documentation
|
|
600
345
|
|
|
@@ -614,52 +359,22 @@ For creating custom extractors:
|
|
|
614
359
|
- **Load**: [Extending Extraction](resources/extending-extraction.md)
|
|
615
360
|
|
|
616
361
|
### Agent Integration
|
|
617
|
-
For integration with other AI assistants (Cursor, Aider, Continue):
|
|
618
|
-
- **Load**: [Agent Integration Guide](
|
|
619
|
-
|
|
620
|
-
### Development Context
|
|
621
|
-
For vibe-validate development workflows (if working on vibe-validate itself):
|
|
622
|
-
- **Load**: [CLAUDE.md](../../CLAUDE.md)
|
|
623
|
-
|
|
624
|
-
## Dogfooding (Meta)
|
|
625
|
-
|
|
626
|
-
**If you're working on the vibe-validate codebase itself**:
|
|
627
|
-
|
|
628
|
-
You ARE using vibe-validate while helping develop it. This is intentional dogfooding!
|
|
629
|
-
|
|
630
|
-
**Always use vibe-validate tools during development**:
|
|
631
|
-
```bash
|
|
632
|
-
# Instead of raw commands:
|
|
633
|
-
npx vitest packages/cli/test/run.test.ts
|
|
634
|
-
|
|
635
|
-
# Use the tool you're building:
|
|
636
|
-
npx vibe-validate run "npx vitest packages/cli/test/run.test.ts"
|
|
637
|
-
```
|
|
638
|
-
|
|
639
|
-
**Why this matters**:
|
|
640
|
-
- Validates the tool works (proof)
|
|
641
|
-
- Saves YOUR context window (90-95% reduction)
|
|
642
|
-
- Demonstrates natural UX (if you use it instinctively, users will trust it)
|
|
362
|
+
For integration with other AI assistants (Cursor, Aider, Continue) or when user asks for help configuring those tools:
|
|
363
|
+
- **Load**: [Agent Integration Guide](resources/agent-integration-guide.md)
|
|
643
364
|
|
|
644
|
-
**
|
|
365
|
+
**Note**: This guide is NOT for Claude Code (you already have vibe-validate via this skill). Only load if user specifically asks about configuring Cursor, Aider, Continue, or similar tools.
|
|
645
366
|
|
|
646
367
|
## Best Practices
|
|
647
368
|
|
|
648
|
-
1. **Always validate before commits** - Use `pre-commit` workflow
|
|
649
|
-
2. **Query state before re-running** - Use `state` command
|
|
650
|
-
3. **
|
|
651
|
-
4. **Trust the extractors** - Error formats are well-tested
|
|
652
|
-
5. **Leverage caching** - Most re-runs are <1s when you fix incrementally
|
|
653
|
-
6. **Use YAML output** - Structured data for your parsing
|
|
654
|
-
7. **Run doctor after upgrades** - Catch deprecated files and config issues
|
|
655
|
-
8. **Validate frequently for safety** - Creates automatic snapshots of your work
|
|
656
|
-
9. **Check history before panic** - Your work is probably saved in a tree hash
|
|
369
|
+
1. **Always validate before commits** - Use `pre-commit` workflow to prevent broken code
|
|
370
|
+
2. **Query state before re-running** - Use `state` command instead of re-running tests
|
|
371
|
+
3. **Wrap commands with `run`** - Get 90-95% context reduction automatically
|
|
657
372
|
|
|
658
|
-
##
|
|
373
|
+
## Key Reminders
|
|
659
374
|
|
|
660
375
|
- **Pre-commit validation prevents broken commits** (most important workflow)
|
|
661
376
|
- **State queries are instant** (don't re-run tests to see errors)
|
|
662
|
-
- **Caching provides
|
|
377
|
+
- **Caching provides dramatic speedup** (when code unchanged)
|
|
663
378
|
- **Context reduction saves 90-95%** (wrap commands with `run`)
|
|
664
379
|
- **Git tree hashing is deterministic** (same code = same cache key)
|
|
665
380
|
|