@vibe-validate/cli 0.17.0 → 0.17.1-rc.2
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/README.md +51 -0
- package/config-templates/README.md +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ The `@vibe-validate/cli` package provides a command-line interface for running v
|
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
+
- **🛡️ Automatic work protection** - Invisible safety net for all uncommitted changes
|
|
12
13
|
- **🚀 Git tree hash-based caching** - 312x faster validation on unchanged code
|
|
13
14
|
- **🤖 Agent-friendly output** - Minimal token waste, structured error reporting
|
|
14
15
|
- **⚡ Parallel phase execution** - Run validation steps concurrently
|
|
@@ -487,6 +488,56 @@ phases:
|
|
|
487
488
|
totalErrors: 1
|
|
488
489
|
```
|
|
489
490
|
|
|
491
|
+
## Work Protection & Recovery
|
|
492
|
+
|
|
493
|
+
vibe-validate automatically protects your uncommitted work every time it calculates a git tree hash for caching.
|
|
494
|
+
|
|
495
|
+
### How It Works
|
|
496
|
+
|
|
497
|
+
When you run validation commands, vibe-validate:
|
|
498
|
+
1. Creates a temporary git index
|
|
499
|
+
2. Stages all your files (tracked + untracked) in that temp index
|
|
500
|
+
3. Runs `git write-tree` to create git objects for everything
|
|
501
|
+
4. Cleans up the temp index (your real index is untouched)
|
|
502
|
+
|
|
503
|
+
**Result**: All your files are now in `.git/objects/` as git blobs, even if they're unstaged or untracked.
|
|
504
|
+
|
|
505
|
+
### Recovery Commands
|
|
506
|
+
|
|
507
|
+
```bash
|
|
508
|
+
# List validation history (shows tree hashes with timestamps)
|
|
509
|
+
vv history list
|
|
510
|
+
|
|
511
|
+
# Show files in a specific tree hash
|
|
512
|
+
git ls-tree <tree-hash>
|
|
513
|
+
|
|
514
|
+
# View a specific file from any validation point
|
|
515
|
+
git cat-file -p <tree-hash>:path/to/file.ts
|
|
516
|
+
|
|
517
|
+
# Recover a file
|
|
518
|
+
git cat-file -p <tree-hash>:src/deleted-work.ts > src/deleted-work.ts
|
|
519
|
+
|
|
520
|
+
# Recover entire directory
|
|
521
|
+
git checkout <tree-hash> -- src/
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
### Use Cases
|
|
525
|
+
|
|
526
|
+
- **Accidental git restore**: Recover unstaged changes after accidental revert
|
|
527
|
+
- **Bad refactoring**: Revert to code state before risky changes
|
|
528
|
+
- **Editor crashes**: Restore in-progress work from last validation
|
|
529
|
+
- **Experimental changes**: Compare current code vs previous validation snapshots
|
|
530
|
+
- **Team debugging**: Share exact code state via tree hash
|
|
531
|
+
|
|
532
|
+
### When Protection Happens
|
|
533
|
+
|
|
534
|
+
Your work is automatically captured during:
|
|
535
|
+
- `vv validate` - Full validation
|
|
536
|
+
- `vv pre-commit` - Pre-commit workflow
|
|
537
|
+
- `vv run <command>` - Individual command execution (cached)
|
|
538
|
+
|
|
539
|
+
See [Work Protection Guide](../../docs/work-protection.md) for detailed examples.
|
|
540
|
+
|
|
490
541
|
## Integration with Pre-Commit Hooks
|
|
491
542
|
|
|
492
543
|
**Recommended setup using [husky](https://typicode.github.io/husky/):**
|
|
@@ -322,8 +322,8 @@ All templates in this directory are:
|
|
|
322
322
|
## Related Documentation
|
|
323
323
|
|
|
324
324
|
- [Getting Started Guide](../docs/getting-started.md)
|
|
325
|
-
- [Configuration Reference](../docs/configuration-reference.md)
|
|
326
|
-
- [CLI Reference](../docs/cli-reference.md)
|
|
325
|
+
- [Configuration Reference](../docs/skill/resources/configuration-reference.md)
|
|
326
|
+
- [CLI Reference](../docs/skill/resources/cli-reference.md)
|
|
327
327
|
|
|
328
328
|
---
|
|
329
329
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibe-validate/cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1-rc.2",
|
|
4
4
|
"description": "Command-line interface for vibe-validate validation framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"yaml": "^2.6.1",
|
|
64
64
|
"zod": "^3.24.1",
|
|
65
65
|
"zod-to-json-schema": "^3.24.6",
|
|
66
|
-
"@vibe-validate/
|
|
67
|
-
"@vibe-validate/
|
|
68
|
-
"@vibe-validate/
|
|
69
|
-
"@vibe-validate/
|
|
70
|
-
"@vibe-validate/
|
|
66
|
+
"@vibe-validate/config": "0.17.1-rc.2",
|
|
67
|
+
"@vibe-validate/git": "0.17.1-rc.2",
|
|
68
|
+
"@vibe-validate/core": "0.17.1-rc.2",
|
|
69
|
+
"@vibe-validate/history": "0.17.1-rc.2",
|
|
70
|
+
"@vibe-validate/extractors": "0.17.1-rc.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^20.14.8",
|