viepilot 1.2.0 → 1.3.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/CHANGELOG.md +3 -0
- package/README.md +7 -7
- package/bin/vp-tools.cjs +69 -0
- package/docs/README.md +3 -3
- package/docs/skills-reference.md +3 -2
- package/docs/user/features/autonomous-mode.md +16 -0
- package/package.json +1 -1
- package/skills/vp-auto/SKILL.md +9 -0
- package/workflows/autonomous.md +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -16,11 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
|
|
17
17
|
### Fixed
|
|
18
18
|
|
|
19
|
+
- **M1.19 / Phase 23 (BUG-003) completed** — enforced deterministic git persistence gates for `/vp-auto`: PASS transitions now require clean worktree, configured upstream, and zero unpushed commits (via `vp-tools git-persistence --strict` in workflow).
|
|
19
20
|
- **M1.18 / Phase 22 (BUG-002) completed** — introduced project-scoped checkpoint tags (`{project}-vp-p...`) and kept backward compatibility with legacy `vp-p...` tags for list/rollback flows.
|
|
20
21
|
- **CI coverage** — Jest chỉ instrument process hiện tại; test CLI qua `spawnSync` khiến `bin/vp-tools.cjs` báo **0%**. Đã tách `lib/cli-shared.cjs` (validators, `findProjectRoot`, Levenshtein) và đặt `collectCoverageFrom` trên file đó; bổ sung test in-process + `require.main === module` gate cho CLI; `install.sh` / `dev-install.sh` cài kèm `lib/`.
|
|
21
22
|
|
|
22
23
|
### Documentation
|
|
23
24
|
|
|
25
|
+
- `README.md`, `docs/README.md` — refreshed framework version, skills/commands/test counts, and index notes after M1.18 checkpoint-tag rollout.
|
|
26
|
+
- `workflows/autonomous.md`, `skills/vp-auto/SKILL.md`, `docs/user/features/autonomous-mode.md`, `docs/skills-reference.md` — documented and standardized git persistence gate behavior for `/vp-auto`.
|
|
24
27
|
- `README.md`, `docs/user/quick-start.md` — updated install wizard controls and uninstall command examples.
|
|
25
28
|
- `README.md`, `docs/troubleshooting.md`, `docs/user/quick-start.md` — documented README metric sync flow, `cloc` fallback/install guidance, and maintainer usage.
|
|
26
29
|
- `docs/troubleshooting.md` — added selector TTY fallback guidance and uninstall/reinstall recovery flow for legacy symlink installs.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**
|
|
4
4
|
|
|
5
|
-
[](CHANGELOG.md)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](#skills-reference)
|
|
8
8
|
[](#workflows)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](tests/)
|
|
11
11
|
[](https://github.com/0-CODE/viepilot)
|
|
12
12
|
|
|
13
|
-
**Versioning:** Shield **
|
|
13
|
+
**Versioning:** Shield **1.2.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.2.0**) is the Node package identifier for this repo and may differ; use the framework version for milestone releases and docs.
|
|
14
14
|
|
|
15
15
|
ViePilot là bộ skill framework cho phép AI assistant (Claude, GPT, etc.) phát triển dự án một cách **tự động**, **có kiểm soát**, và **có thể khôi phục**. Thiết kế theo các tiêu chuẩn chuyên nghiệp: Semantic Versioning, Conventional Commits, Keep a Changelog.
|
|
16
16
|
|
|
@@ -48,14 +48,14 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
|
|
|
48
48
|
| Project Templates | 11 | AI-GUIDE, ARCHITECTURE, README, SYSTEM-RULES, etc. |
|
|
49
49
|
| Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
|
|
50
50
|
| CLI Tools | 2 | vp-tools.cjs (**13** commands) + viepilot.cjs (guided installer) |
|
|
51
|
-
| Test Files |
|
|
51
|
+
| Test Files | 4 | Jest unit + integration + AI compatibility + README metrics tests (231 tests) |
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
55
|
## Độ hoàn thiện / Completion Status
|
|
56
56
|
|
|
57
57
|
```
|
|
58
|
-
Tổng thể / Overall: ████████████████████ 100% 🎉 M1.
|
|
58
|
+
Tổng thể / Overall: ████████████████████ 100% 🎉 M1.18 roadmap phases ✅ (v1.2.0)
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
| Lĩnh vực / Area | Trạng thái | Chi tiết |
|
|
@@ -386,9 +386,9 @@ viepilot/
|
|
|
386
386
|
│ └── cli-shared.cjs # Validators, project root, Levenshtein helpers
|
|
387
387
|
│
|
|
388
388
|
├── bin/ # CLI tools
|
|
389
|
-
│ └── vp-tools.cjs #
|
|
389
|
+
│ └── vp-tools.cjs # 14 commands (requires ../lib/cli-shared.cjs)
|
|
390
390
|
│
|
|
391
|
-
├── tests/ # Test suite (
|
|
391
|
+
├── tests/ # Test suite (231 tests)
|
|
392
392
|
│ ├── unit/ # Unit tests
|
|
393
393
|
│ │ ├── validators.test.js # CLI subprocess + in-process coverage tests
|
|
394
394
|
│ │ └── ai-provider-compat.test.js # 142 AI compat tests
|
|
@@ -488,7 +488,7 @@ your-project/
|
|
|
488
488
|
| [Getting Started](docs/getting-started.md) | Hướng dẫn bắt đầu / Quick start guide |
|
|
489
489
|
| [Quick Start (User)](docs/user/quick-start.md) | 5-minute guide |
|
|
490
490
|
| [Skills Reference](docs/skills-reference.md) | Chi tiết từng skill / Detailed skill docs |
|
|
491
|
-
| [CLI Reference](docs/dev/cli-reference.md) | vp-tools
|
|
491
|
+
| [CLI Reference](docs/dev/cli-reference.md) | vp-tools 14 commands |
|
|
492
492
|
| [Advanced Usage](docs/advanced-usage.md) | Power user features |
|
|
493
493
|
| [Troubleshooting](docs/troubleshooting.md) | Common issues & fixes |
|
|
494
494
|
| [Architecture](docs/dev/architecture.md) | System design |
|
package/bin/vp-tools.cjs
CHANGED
|
@@ -634,6 +634,66 @@ const commands = {
|
|
|
634
634
|
console.log(JSON.stringify({ prefix }));
|
|
635
635
|
},
|
|
636
636
|
|
|
637
|
+
/**
|
|
638
|
+
* Validate git persistence readiness for PASS transitions
|
|
639
|
+
*/
|
|
640
|
+
'git-persistence': (args) => {
|
|
641
|
+
const projectCheck = validators.requireProjectRoot();
|
|
642
|
+
validateArgs([projectCheck]);
|
|
643
|
+
const projectRoot = projectCheck.value;
|
|
644
|
+
const strict = args.includes('--strict');
|
|
645
|
+
const { execSync } = require('child_process');
|
|
646
|
+
|
|
647
|
+
let cleanWorktree = false;
|
|
648
|
+
let upstreamConfigured = false;
|
|
649
|
+
let aheadCount = null;
|
|
650
|
+
let branch = '';
|
|
651
|
+
|
|
652
|
+
try {
|
|
653
|
+
branch = execSync('git branch --show-current', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
654
|
+
} catch (_e) {
|
|
655
|
+
branch = '';
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
try {
|
|
659
|
+
const status = execSync('git status --porcelain', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
660
|
+
cleanWorktree = status.length === 0;
|
|
661
|
+
} catch (_e) {
|
|
662
|
+
cleanWorktree = false;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
try {
|
|
666
|
+
execSync('git rev-parse --abbrev-ref --symbolic-full-name @{u}', { cwd: projectRoot, encoding: 'utf8' });
|
|
667
|
+
upstreamConfigured = true;
|
|
668
|
+
} catch (_e) {
|
|
669
|
+
upstreamConfigured = false;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
if (upstreamConfigured) {
|
|
673
|
+
try {
|
|
674
|
+
const output = execSync('git rev-list --count @{u}..HEAD', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
675
|
+
aheadCount = parseInt(output, 10);
|
|
676
|
+
} catch (_e) {
|
|
677
|
+
aheadCount = null;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
const readyForPersistedPass = cleanWorktree && upstreamConfigured && aheadCount === 0;
|
|
682
|
+
const result = {
|
|
683
|
+
branch,
|
|
684
|
+
clean_worktree: cleanWorktree,
|
|
685
|
+
upstream_configured: upstreamConfigured,
|
|
686
|
+
ahead_count: aheadCount,
|
|
687
|
+
ready_for_persisted_pass: readyForPersistedPass,
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
console.log(JSON.stringify(result, null, 2));
|
|
691
|
+
|
|
692
|
+
if (strict && !readyForPersistedPass) {
|
|
693
|
+
process.exit(1);
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
|
|
637
697
|
/**
|
|
638
698
|
* Check for potential conflicts
|
|
639
699
|
*/
|
|
@@ -829,6 +889,14 @@ const commands = {
|
|
|
829
889
|
'vp-tools tag-prefix --raw',
|
|
830
890
|
],
|
|
831
891
|
},
|
|
892
|
+
'git-persistence': {
|
|
893
|
+
usage: 'vp-tools git-persistence [--strict]',
|
|
894
|
+
description: 'Check if commit/push persistence gate is satisfied',
|
|
895
|
+
examples: [
|
|
896
|
+
'vp-tools git-persistence',
|
|
897
|
+
'vp-tools git-persistence --strict',
|
|
898
|
+
],
|
|
899
|
+
},
|
|
832
900
|
};
|
|
833
901
|
|
|
834
902
|
if (command && commandHelp[command]) {
|
|
@@ -866,6 +934,7 @@ ${colors.cyan}Commands:${colors.reset}
|
|
|
866
934
|
${colors.bold}clean${colors.reset} [-f] [--dry-run] Clean generated files (interactive)
|
|
867
935
|
${colors.bold}checkpoints${colors.reset} List all ViePilot checkpoints (git tags)
|
|
868
936
|
${colors.bold}tag-prefix${colors.reset} [--raw] Show project-scoped checkpoint prefix
|
|
937
|
+
${colors.bold}git-persistence${colors.reset} [--strict] Check commit/push persistence readiness
|
|
869
938
|
${colors.bold}conflicts${colors.reset} Check for potential conflicts
|
|
870
939
|
${colors.bold}save-state${colors.reset} Save current state for precise resume
|
|
871
940
|
${colors.bold}help${colors.reset} [command] Show help (optionally for specific command)
|
package/docs/README.md
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|----------|-------------|
|
|
54
54
|
| [Getting Started](getting-started.md) | Installation and first steps |
|
|
55
55
|
| [Getting Started (dev entry)](dev/getting-started.md) | Short link into dev guide |
|
|
56
|
-
| [CLI Reference](dev/cli-reference.md) | All
|
|
56
|
+
| [CLI Reference](dev/cli-reference.md) | All 14 `vp-tools` commands with examples |
|
|
57
57
|
| [Architecture](dev/architecture.md) | System layers, data flow, design decisions |
|
|
58
58
|
| [UI Components Library](dev/ui-components-library.md) | Curation taxonomy, storage contract, reuse flow |
|
|
59
59
|
| [Contributing](dev/contributing.md) | How to add skills, workflows, CLI commands |
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
| Document | Description |
|
|
68
68
|
|----------|-------------|
|
|
69
|
-
| [Skills Reference](skills-reference.md) | All
|
|
69
|
+
| [Skills Reference](skills-reference.md) | All 14 skills with flags and examples |
|
|
70
70
|
| [Advanced Usage](advanced-usage.md) | Power user features and patterns |
|
|
71
71
|
|
|
72
72
|
---
|
|
@@ -122,4 +122,4 @@
|
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
125
|
-
*Last updated: 2026-03-31 — ViePilot framework
|
|
125
|
+
*Last updated: 2026-03-31 — ViePilot framework v1.2.0 (see `.viepilot/TRACKER.md`); project-scoped checkpoint tags delivered.*
|
package/docs/skills-reference.md
CHANGED
|
@@ -96,8 +96,9 @@ For each phase:
|
|
|
96
96
|
2. Create git tag
|
|
97
97
|
3. Execute implementation
|
|
98
98
|
4. Verify results
|
|
99
|
-
5.
|
|
100
|
-
6.
|
|
99
|
+
5. Enforce git persistence gate (`vp-tools git-persistence --strict`)
|
|
100
|
+
6. Handle outcome (pass/fail)
|
|
101
|
+
7. Update state
|
|
101
102
|
Mark phase complete
|
|
102
103
|
```
|
|
103
104
|
|
|
@@ -18,6 +18,7 @@ Mỗi task:
|
|
|
18
18
|
3. Verify (automated + manual nếu cần)
|
|
19
19
|
4. Commit với conventional commit message
|
|
20
20
|
5. Tạo done tag (`{project}-vp-p{N}-t{T}-done`)
|
|
21
|
+
6. Pass Git persistence gate (clean + pushed) trước khi mark done
|
|
21
22
|
|
|
22
23
|
## Flags
|
|
23
24
|
|
|
@@ -82,6 +83,21 @@ Trước khi mark task done, ViePilot kiểm tra:
|
|
|
82
83
|
|
|
83
84
|
Nếu bất kỳ gate nào fail → control point.
|
|
84
85
|
|
|
86
|
+
## Git Persistence Gate (BUG-003)
|
|
87
|
+
|
|
88
|
+
Trước khi `/vp-auto` được phép mark task/phase là PASS:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node bin/vp-tools.cjs git-persistence --strict
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Gate chỉ PASS khi:
|
|
95
|
+
- Working tree sạch (không còn thay đổi chưa commit)
|
|
96
|
+
- Nhánh hiện tại có upstream
|
|
97
|
+
- Không còn commit local chưa push (`ahead_count = 0`)
|
|
98
|
+
|
|
99
|
+
Nếu fail, workflow phải vào control point và **không được** cập nhật state sang `done/complete`.
|
|
100
|
+
|
|
85
101
|
## Checkpoints
|
|
86
102
|
|
|
87
103
|
Mỗi task tạo 2 git tags:
|
package/package.json
CHANGED
package/skills/vp-auto/SKILL.md
CHANGED
|
@@ -35,6 +35,15 @@ Pauses at control points:
|
|
|
35
35
|
- `CHANGELOG.md` (if feature/fix)
|
|
36
36
|
- `.viepilot/ROADMAP.md` when task completion changes phase progress/status
|
|
37
37
|
|
|
38
|
+
**Git persistence gate before PASS (BUG-003):**
|
|
39
|
+
- Task/phase cannot be marked PASS if git is not durably persisted.
|
|
40
|
+
- Required checks:
|
|
41
|
+
- `git status --porcelain` must be empty
|
|
42
|
+
- upstream branch must exist (`git rev-parse ... @{u}`)
|
|
43
|
+
- no unpushed commits (`git rev-list --count @{u}..HEAD` equals `0`)
|
|
44
|
+
- Recommended single check: `node bin/vp-tools.cjs git-persistence --strict`
|
|
45
|
+
- On failure: route to control point (retry commit/push, rollback, or stop).
|
|
46
|
+
|
|
38
47
|
**Mandatory task decomposition before implementation:**
|
|
39
48
|
- Objective with concrete expected outcome
|
|
40
49
|
- Exact file paths to create/modify
|
package/workflows/autonomous.md
CHANGED
|
@@ -175,6 +175,28 @@ quality_gate:
|
|
|
175
175
|
- no_lint_errors: true
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
#### Git Persistence Gate (BUG-003)
|
|
179
|
+
Before marking a task PASS, require durable git persistence:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Must have no unstaged/staged residue for this task
|
|
183
|
+
git status --porcelain
|
|
184
|
+
|
|
185
|
+
# Must track an upstream branch
|
|
186
|
+
git rev-parse --abbrev-ref --symbolic-full-name @{u}
|
|
187
|
+
|
|
188
|
+
# Must have no unpushed commits
|
|
189
|
+
git rev-list --count @{u}..HEAD
|
|
190
|
+
|
|
191
|
+
# Consolidated check helper (recommended)
|
|
192
|
+
node bin/vp-tools.cjs git-persistence --strict
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
If any check fails:
|
|
196
|
+
- **Do not** mark task `done`
|
|
197
|
+
- **Do not** advance phase progress/state files as PASS
|
|
198
|
+
- Route to control point (retry commit/push, rollback, or stop)
|
|
199
|
+
|
|
178
200
|
#### Handle Result
|
|
179
201
|
|
|
180
202
|
**PASS:**
|
|
@@ -253,6 +275,7 @@ When all tasks in phase are done/skipped:
|
|
|
253
275
|
```bash
|
|
254
276
|
git push
|
|
255
277
|
git push --tags
|
|
278
|
+
node bin/vp-tools.cjs git-persistence --strict
|
|
256
279
|
```
|
|
257
280
|
|
|
258
281
|
### 5a. Sync ROADMAP.md (after every phase complete)
|