viepilot 1.2.0 → 1.6.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 +30 -0
- package/README.md +23 -19
- package/bin/vp-tools.cjs +221 -0
- package/dev-install.sh +29 -8
- package/docs/README.md +5 -3
- package/docs/dev/cli-reference.md +70 -1
- package/docs/dev/contributing.md +4 -0
- package/docs/skills-reference.md +47 -2
- package/docs/user/features/autonomous-mode.md +16 -0
- package/docs/user/features/brainstorm.md +28 -0
- package/docs/user/features/product-horizon.md +18 -0
- package/docs/user/features/ui-direction.md +63 -12
- package/docs/user/quick-start.md +22 -0
- package/install.sh +15 -3
- package/lib/viepilot-info.cjs +196 -0
- package/lib/viepilot-update.cjs +156 -0
- package/package.json +2 -1
- package/skills/vp-auto/SKILL.md +9 -0
- package/skills/vp-brainstorm/SKILL.md +9 -5
- package/skills/vp-crystallize/SKILL.md +17 -12
- package/skills/vp-info/SKILL.md +62 -0
- package/skills/vp-update/SKILL.md +59 -0
- package/templates/project/AI-GUIDE.md +23 -11
- package/templates/project/PROJECT-CONTEXT.md +22 -0
- package/templates/project/ROADMAP.md +27 -0
- package/workflows/autonomous.md +23 -0
- package/workflows/brainstorm.md +62 -11
- package/workflows/crystallize.md +36 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.6.1] - 2026-04-01
|
|
11
|
+
|
|
12
|
+
### Enhanced
|
|
13
|
+
|
|
14
|
+
- **ENH-015** — `dev-install.sh` và `install.sh` hỗ trợ **`VIEPILOT_SYMLINK_SKILLS=1`**: cài skills vào `~/.cursor/skills/` bằng symlink tuyệt đối tới repo (mặc định vẫn copy-first); `docs/dev/contributing.md` documents the flag.
|
|
15
|
+
|
|
16
|
+
## [1.6.0] - 2026-04-01
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **M1.23 / Phase 27 (FEAT-008)** — `vp-tools info` and `vp-tools info --json` with `lib/viepilot-info.cjs` (resolve `viepilot` package root without `.viepilot/`, npm latest, skills + workflows inventory); `vp-tools update` with `--dry-run`, `--yes`, `--global` and `lib/viepilot-update.cjs` (local vs global install classification, semver no-op when up to date); Cursor skills `skills/vp-info/SKILL.md` and `skills/vp-update/SKILL.md`; documentation in `docs/skills-reference.md`, `docs/dev/cli-reference.md`, `docs/user/quick-start.md`, and README metrics (16 skills, 18 CLI surface / 17 `vp-tools` subcommands); unit tests `tests/unit/viepilot-info.test.js` and `tests/unit/viepilot-update.test.js`.
|
|
21
|
+
|
|
22
|
+
## [1.5.1] - 2026-04-01
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **M1.22 — ENH-001 ~ ENH-005 backlog closed (verification)** — Các enhancement doc-sync + audit drift đã được implement trong các milestone trước (`workflows/autonomous.md`, `workflows/documentation.md`, `workflows/audit.md`, skills `vp-auto` / `vp-docs` / `vp-audit`). Thêm `tests/unit/enh-backlog-workflow-contracts.test.js` để regression-guard contract.
|
|
27
|
+
|
|
28
|
+
### Enhanced
|
|
29
|
+
|
|
30
|
+
- **M1.21 / Phase 25 — task 25.5** — `docs/user/features/product-horizon.md` (end-to-end horizon handoff); `templates/project/AI-GUIDE.md` states **load order**: `<product_vision>` + `ROADMAP` horizon before deep implementation; `workflows/crystallize.md` Step 2 reminds to preserve that ordering; `docs/user/quick-start.md`, `docs/README.md`, `docs/skills-reference.md` cross-links.
|
|
31
|
+
- **M1.21 / Phase 25 — task 25.4** — `skills/vp-brainstorm` and `skills/vp-crystallize` bumped to **0.4.0**; objectives/process/success criteria mirror ENH-014 horizon + crystallize gates; `docs/skills-reference.md` documents horizon output and crystallize intake.
|
|
32
|
+
- **M1.21 / Phase 25 — task 25.3** — `templates/project/ROADMAP.md` adds mandatory **Post-MVP / Product horizon** with placeholders (`HORIZON_MODE_LINE`, epic lists, deferred/non-goals); `templates/project/PROJECT-CONTEXT.md` adds `<product_vision>` (**Product vision & phased scope**) aligned with MVP / Post-MVP / Future terminology.
|
|
33
|
+
- **M1.21 / Phase 25 — task 25.2** — `workflows/crystallize.md` Step 1 now **extracts and validates** brainstorm product horizon (inventory, single-release mode, tier conflicts); Step 7 always emits **MVP phases** plus a mandatory **Post-MVP / horizon** block with a **no silent omission** gate before finalizing `ROADMAP.md`; success criteria updated.
|
|
34
|
+
- **M1.21 / Phase 25 — task 25.1** — `workflows/brainstorm.md` now mandates **`## Product horizon`** (MVP / Post-MVP / Future tags, non-goals, deferred capabilities, single-release escape hatch), merge rules when continuing sessions, and user doc `docs/user/features/brainstorm.md` (+ docs index link).
|
|
35
|
+
|
|
10
36
|
### Enhanced
|
|
11
37
|
|
|
38
|
+
- **M1.20 / Phase 24 (FEAT-007) completed** — multi-page UI Direction (`pages/*.html` + hub `index.html`), mandatory `## Pages inventory` in `notes.md` when `pages/` exists, crystallize workflow/skill reads every page + inventory for full site-map architecture, `npm run verify:ui-direction` helper, and docs refresh.
|
|
12
39
|
- **M1.17 / Phase 21 (ENH-013) completed** — realigned README metrics (`npm run readme:sync` with `cloc`) and moved `.viepilot` to local-only (`.gitignore` + untracked index).
|
|
13
40
|
- **M1.15 / Phase 18 (FEAT-004) completed** — npm distribution flow is now fully closed: publish pipeline passes and package released to npm as `viepilot@1.0.1`.
|
|
14
41
|
- **M1.15 / Phase 19 (FEAT-005) completed** — installer now supports keyboard selector UX (arrow/space/enter), added `viepilot uninstall` command (`--target`, `--yes`, `--dry-run`), and switched dev installer to copy-first flow to avoid symlink-based skill discovery failures.
|
|
@@ -16,11 +43,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
43
|
|
|
17
44
|
### Fixed
|
|
18
45
|
|
|
46
|
+
- **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
47
|
- **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
48
|
- **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
49
|
|
|
22
50
|
### Documentation
|
|
23
51
|
|
|
52
|
+
- `README.md`, `docs/README.md` — refreshed framework version, skills/commands/test counts, and index notes after M1.18 checkpoint-tag rollout.
|
|
53
|
+
- `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
54
|
- `README.md`, `docs/user/quick-start.md` — updated install wizard controls and uninstall command examples.
|
|
25
55
|
- `README.md`, `docs/troubleshooting.md`, `docs/user/quick-start.md` — documented README metric sync flow, `cloc` fallback/install guidance, and maintainer usage.
|
|
26
56
|
- `docs/troubleshooting.md` — added selector TTY fallback guidance and uninstall/reinstall recovery flow for legacy symlink installs.
|
package/README.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
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
|
-
[](#skills-reference)
|
|
8
8
|
[](#workflows)
|
|
9
9
|
[](#templates)
|
|
10
|
-
[](tests/)
|
|
11
11
|
[](https://github.com/0-CODE/viepilot)
|
|
12
12
|
|
|
13
|
-
**Versioning:** Shield **
|
|
13
|
+
**Versioning:** Shield **1.6.1** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.6.1**) 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
|
|
|
@@ -28,12 +28,12 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
|
|
|
28
28
|
|
|
29
29
|
| Chỉ số / Metric | Giá trị / Value |
|
|
30
30
|
|-----------------|-----------------|
|
|
31
|
-
| Total LOC | **~
|
|
32
|
-
| Skills | **
|
|
31
|
+
| Total LOC | **~25,050+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
|
|
32
|
+
| Skills | **16** |
|
|
33
33
|
| Workflows | **12** |
|
|
34
34
|
| Templates | **16** (Project: 11, Phase: 5) |
|
|
35
|
-
| CLI Commands | **
|
|
36
|
-
| Tests | **
|
|
35
|
+
| CLI Commands | **18** (`vp-tools` 17 subcommands + `viepilot` installer) |
|
|
36
|
+
| Tests | **267** (9 suites: unit + integration + AI compat + README metrics + UI direction verify + ENH workflow contracts + viepilot-info + viepilot-update) |
|
|
37
37
|
| ViePilot phases (repo) | **15** hoàn thành (xem `.viepilot/TRACKER.md`) |
|
|
38
38
|
| Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
|
|
39
39
|
|
|
@@ -43,29 +43,29 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
|
|
|
43
43
|
|
|
44
44
|
| Thành phần / Component | Số lượng / Count | Mô tả / Description |
|
|
45
45
|
|------------------------|------------------|---------------------|
|
|
46
|
-
| Skill Definitions | **
|
|
46
|
+
| Skill Definitions | **16** | SKILL.md files với trigger, process, success criteria |
|
|
47
47
|
| Workflow Files | **12** | Step-by-step execution guides |
|
|
48
48
|
| Project Templates | 11 | AI-GUIDE, ARCHITECTURE, README, SYSTEM-RULES, etc. |
|
|
49
49
|
| Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
|
|
50
|
-
| CLI Tools | 2 | vp-tools.cjs (**
|
|
51
|
-
| Test Files |
|
|
50
|
+
| CLI Tools | 2 | vp-tools.cjs (**17** subcommands) + viepilot.cjs (guided installer) |
|
|
51
|
+
| Test Files | 6 | Jest unit + integration + AI compatibility + README metrics + ENH backlog + viepilot-info/update |
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
55
|
## Độ hoàn thiện / Completion Status
|
|
56
56
|
|
|
57
57
|
```
|
|
58
|
-
Tổng thể / Overall: ████████████████████
|
|
58
|
+
Tổng thể / Overall: ████████████████████ ~98% ✅ Latest **v1.6.1** (ENH-015 symlink skills opt-in); M1.23 FEAT-008 (v1.6.0); M1.22 (v1.5.1)
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
| Lĩnh vực / Area | Trạng thái | Chi tiết |
|
|
62
62
|
|-----------------|------------|----------|
|
|
63
|
-
| Core Skills (
|
|
63
|
+
| Core Skills (16) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components |
|
|
64
64
|
| Workflows (12) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
|
|
65
65
|
| Project Templates (11) | ✅ Hoàn thiện | Placeholders cho customization |
|
|
66
66
|
| Phase Templates (5) | ✅ Hoàn thiện | Task tracking, verification, summary |
|
|
67
|
-
| CLI Tools (
|
|
68
|
-
| Tests (
|
|
67
|
+
| CLI Tools (18) | ✅ Hoàn thiện | vp-tools 17 subcommands + viepilot installer; bundle `info` / `update` |
|
|
68
|
+
| Tests (267) | ✅ Hoàn thiện | Unit, integration, AI provider compatibility, workflow contracts, viepilot-info, viepilot-update |
|
|
69
69
|
| CI/CD | ✅ Hoàn thiện | GitHub Actions, Node 18/20/22 matrix, coverage >80% |
|
|
70
70
|
| Documentation | ✅ Hoàn thiện | dev/, user/, api/, videos/, examples/, troubleshooting |
|
|
71
71
|
| Standards | ✅ Hoàn thiện | SemVer, Conventional Commits, Keep a Changelog |
|
|
@@ -116,10 +116,12 @@ Tổng thể / Overall: ██████████████████
|
|
|
116
116
|
| `/vp-pause` | Lưu state để resume sau / Save state for later | "pause", "dừng" | Control |
|
|
117
117
|
| `/vp-resume` | Khôi phục context và tiếp tục / Restore and continue | "resume", "tiếp tục" | Control |
|
|
118
118
|
| `/vp-status` | Dashboard tiến độ / Progress dashboard | "status", "tiến độ" | Monitor |
|
|
119
|
+
| `/vp-info` | Bundle version, npm latest, skills/workflows inventory | "viepilot version", "phiên bản" | Monitor |
|
|
119
120
|
| `/vp-request` | Bug/Feature/Enhancement/Debt / Ongoing requests | "bug", "feature", "yêu cầu" | Develop |
|
|
120
121
|
| `/vp-ui-components` | Curation + reuse UI component library | "ui components", "21st.dev" | Develop |
|
|
121
122
|
| `/vp-evolve` | Milestone mới, nâng cấp lớn / New milestone, major upgrade | "evolve", "milestone" | Develop |
|
|
122
123
|
| `/vp-docs` | Generate documentation / Tạo tài liệu | "docs", "tài liệu" | Finalize |
|
|
124
|
+
| `/vp-update` | Nâng cấp viepilot qua npm (dry-run / --yes / --global) | "upgrade viepilot", "npm update" | Maintain |
|
|
123
125
|
| `/vp-task` | Quản lý task thủ công / Manual task control | "task" | Manual |
|
|
124
126
|
| `/vp-debug` | Debug có hệ thống với state tracking / Systematic debugging | "debug", "gỡ lỗi" | Debug |
|
|
125
127
|
| `/vp-rollback` | Khôi phục về checkpoint / Rollback to checkpoint | "rollback", "revert" | Recovery |
|
|
@@ -332,7 +334,7 @@ Full guide: `docs/dev/deployment.md`.
|
|
|
332
334
|
|
|
333
335
|
```
|
|
334
336
|
viepilot/
|
|
335
|
-
├── skills/ #
|
|
337
|
+
├── skills/ # 16 Skill definitions
|
|
336
338
|
│ ├── vp-brainstorm/ # Thu thập ý tưởng
|
|
337
339
|
│ │ └── SKILL.md
|
|
338
340
|
│ ├── vp-crystallize/ # Tạo artifacts
|
|
@@ -340,9 +342,11 @@ viepilot/
|
|
|
340
342
|
│ ├── vp-pause/ # Save state
|
|
341
343
|
│ ├── vp-resume/ # Restore state
|
|
342
344
|
│ ├── vp-status/ # Progress dashboard
|
|
345
|
+
│ ├── vp-info/ # Bundle info (vp-tools info)
|
|
343
346
|
│ ├── vp-request/ # Bug/Feature/Enhancement
|
|
344
347
|
│ ├── vp-evolve/ # Milestone/Upgrade
|
|
345
348
|
│ ├── vp-docs/ # Documentation
|
|
349
|
+
│ ├── vp-update/ # npm upgrade (vp-tools update)
|
|
346
350
|
│ ├── vp-task/ # Manual task control
|
|
347
351
|
│ ├── vp-debug/ # Systematic debugging
|
|
348
352
|
│ ├── vp-rollback/ # Checkpoint recovery
|
|
@@ -386,9 +390,9 @@ viepilot/
|
|
|
386
390
|
│ └── cli-shared.cjs # Validators, project root, Levenshtein helpers
|
|
387
391
|
│
|
|
388
392
|
├── bin/ # CLI tools
|
|
389
|
-
│ └── vp-tools.cjs #
|
|
393
|
+
│ └── vp-tools.cjs # 17 subcommands; uses ../lib/cli-shared.cjs, viepilot-info/update.cjs
|
|
390
394
|
│
|
|
391
|
-
├── tests/ # Test suite (
|
|
395
|
+
├── tests/ # Test suite (267 tests)
|
|
392
396
|
│ ├── unit/ # Unit tests
|
|
393
397
|
│ │ ├── validators.test.js # CLI subprocess + in-process coverage tests
|
|
394
398
|
│ │ └── ai-provider-compat.test.js # 142 AI compat tests
|
|
@@ -488,7 +492,7 @@ your-project/
|
|
|
488
492
|
| [Getting Started](docs/getting-started.md) | Hướng dẫn bắt đầu / Quick start guide |
|
|
489
493
|
| [Quick Start (User)](docs/user/quick-start.md) | 5-minute guide |
|
|
490
494
|
| [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
|
|
495
|
+
| [CLI Reference](docs/dev/cli-reference.md) | vp-tools 17 subcommands (`info`, `update`, …) |
|
|
492
496
|
| [Advanced Usage](docs/advanced-usage.md) | Power user features |
|
|
493
497
|
| [Troubleshooting](docs/troubleshooting.md) | Common issues & fixes |
|
|
494
498
|
| [Architecture](docs/dev/architecture.md) | System design |
|
package/bin/vp-tools.cjs
CHANGED
|
@@ -23,6 +23,9 @@ const {
|
|
|
23
23
|
isCheckpointTag,
|
|
24
24
|
} = require(path.join(__dirname, '../lib/cli-shared.cjs'));
|
|
25
25
|
|
|
26
|
+
const viepilotInfo = require(path.join(__dirname, '../lib/viepilot-info.cjs'));
|
|
27
|
+
const viepilotUpdate = require(path.join(__dirname, '../lib/viepilot-update.cjs'));
|
|
28
|
+
|
|
26
29
|
// ============================================================================
|
|
27
30
|
// Output Formatting (TTY-aware)
|
|
28
31
|
// ============================================================================
|
|
@@ -634,6 +637,193 @@ const commands = {
|
|
|
634
637
|
console.log(JSON.stringify({ prefix }));
|
|
635
638
|
},
|
|
636
639
|
|
|
640
|
+
/**
|
|
641
|
+
* Validate git persistence readiness for PASS transitions
|
|
642
|
+
*/
|
|
643
|
+
'git-persistence': (args) => {
|
|
644
|
+
const projectCheck = validators.requireProjectRoot();
|
|
645
|
+
validateArgs([projectCheck]);
|
|
646
|
+
const projectRoot = projectCheck.value;
|
|
647
|
+
const strict = args.includes('--strict');
|
|
648
|
+
const { execSync } = require('child_process');
|
|
649
|
+
|
|
650
|
+
let cleanWorktree = false;
|
|
651
|
+
let upstreamConfigured = false;
|
|
652
|
+
let aheadCount = null;
|
|
653
|
+
let branch = '';
|
|
654
|
+
|
|
655
|
+
try {
|
|
656
|
+
branch = execSync('git branch --show-current', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
657
|
+
} catch (_e) {
|
|
658
|
+
branch = '';
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
try {
|
|
662
|
+
const status = execSync('git status --porcelain', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
663
|
+
cleanWorktree = status.length === 0;
|
|
664
|
+
} catch (_e) {
|
|
665
|
+
cleanWorktree = false;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
try {
|
|
669
|
+
execSync('git rev-parse --abbrev-ref --symbolic-full-name @{u}', { cwd: projectRoot, encoding: 'utf8' });
|
|
670
|
+
upstreamConfigured = true;
|
|
671
|
+
} catch (_e) {
|
|
672
|
+
upstreamConfigured = false;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (upstreamConfigured) {
|
|
676
|
+
try {
|
|
677
|
+
const output = execSync('git rev-list --count @{u}..HEAD', { cwd: projectRoot, encoding: 'utf8' }).trim();
|
|
678
|
+
aheadCount = parseInt(output, 10);
|
|
679
|
+
} catch (_e) {
|
|
680
|
+
aheadCount = null;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
const readyForPersistedPass = cleanWorktree && upstreamConfigured && aheadCount === 0;
|
|
685
|
+
const result = {
|
|
686
|
+
branch,
|
|
687
|
+
clean_worktree: cleanWorktree,
|
|
688
|
+
upstream_configured: upstreamConfigured,
|
|
689
|
+
ahead_count: aheadCount,
|
|
690
|
+
ready_for_persisted_pass: readyForPersistedPass,
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
console.log(JSON.stringify(result, null, 2));
|
|
694
|
+
|
|
695
|
+
if (strict && !readyForPersistedPass) {
|
|
696
|
+
process.exit(1);
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Show ViePilot package version, npm latest, skills/workflows inventory (FEAT-008)
|
|
702
|
+
*/
|
|
703
|
+
info: (args) => {
|
|
704
|
+
const json = args.includes('--json');
|
|
705
|
+
const root = viepilotInfo.resolveViepilotPackageRoot(path.join(__dirname, '..'));
|
|
706
|
+
if (!root) {
|
|
707
|
+
console.error(
|
|
708
|
+
formatError(
|
|
709
|
+
'Could not locate viepilot package root',
|
|
710
|
+
'Install viepilot globally, use npx from a project with viepilot, or run from a viepilot clone'
|
|
711
|
+
)
|
|
712
|
+
);
|
|
713
|
+
process.exit(1);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
const report = viepilotInfo.buildInfoReport(root);
|
|
717
|
+
|
|
718
|
+
if (json) {
|
|
719
|
+
console.log(JSON.stringify(report, null, 2));
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
console.log(`\n${colors.bold}ViePilot bundle${colors.reset}\n`);
|
|
724
|
+
console.log(` ${colors.cyan}Package root:${colors.reset} ${report.packageRoot}`);
|
|
725
|
+
console.log(` ${colors.cyan}Installed:${colors.reset} ${colors.bold}${report.installedVersion}${colors.reset} (${report.packageName})`);
|
|
726
|
+
|
|
727
|
+
if (report.latestNpm.ok) {
|
|
728
|
+
const upToDate = report.latestNpm.version === report.installedVersion;
|
|
729
|
+
const marker = upToDate ? colors.green : colors.yellow;
|
|
730
|
+
console.log(
|
|
731
|
+
` ${colors.cyan}npm latest:${colors.reset} ${marker}${report.latestNpm.version}${colors.reset}${upToDate ? ' (matches installed)' : ''}`
|
|
732
|
+
);
|
|
733
|
+
} else {
|
|
734
|
+
console.log(` ${colors.cyan}npm latest:${colors.reset} ${colors.gray}(unavailable: ${report.latestNpm.error})${colors.reset}`);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
if (report.gitHead) {
|
|
738
|
+
console.log(` ${colors.cyan}Git HEAD:${colors.reset} ${report.gitHead.slice(0, 7)}`);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
console.log(`\n${colors.bold}Skills (${report.skills.length})${colors.reset}`);
|
|
742
|
+
report.skills.forEach((s) => {
|
|
743
|
+
const verLabel =
|
|
744
|
+
s.version === 'unspecified'
|
|
745
|
+
? `${colors.gray}unspecified${colors.reset}`
|
|
746
|
+
: `${colors.bold}v${s.version}${colors.reset}`;
|
|
747
|
+
console.log(` ${colors.bold}${s.id.padEnd(22)}${colors.reset} ${verLabel} ${colors.gray}${s.relativePath}${colors.reset}`);
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
console.log(`\n${colors.bold}Workflows (${report.workflows.length})${colors.reset} ${colors.gray}— ${viepilotInfo.WORKFLOW_SEMVER_NOTE}${colors.reset}`);
|
|
751
|
+
report.workflows.forEach((w) => {
|
|
752
|
+
console.log(` ${colors.bold}${w.id.padEnd(22)}${colors.reset} ${colors.gray}${w.relativePath}${colors.reset}`);
|
|
753
|
+
});
|
|
754
|
+
console.log();
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Upgrade viepilot via npm (global, local dependency, or --global) — FEAT-008
|
|
759
|
+
*/
|
|
760
|
+
update: async (args) => {
|
|
761
|
+
const dryRun = args.includes('--dry-run');
|
|
762
|
+
const yes = args.includes('--yes');
|
|
763
|
+
const globalFlag = args.includes('--global');
|
|
764
|
+
const startDir = path.join(__dirname, '..');
|
|
765
|
+
const plan = viepilotUpdate.buildUpdatePlan({ startDir, forceGlobal: globalFlag });
|
|
766
|
+
|
|
767
|
+
if (!plan.ok) {
|
|
768
|
+
console.error(formatError(plan.error));
|
|
769
|
+
process.exit(1);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
if (plan.alreadyLatest) {
|
|
773
|
+
console.log(
|
|
774
|
+
formatSuccess(
|
|
775
|
+
`viepilot@${plan.installedVersion} is already up to date (npm latest: ${plan.latestVersion}).`
|
|
776
|
+
)
|
|
777
|
+
);
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
if (plan.latestNpmError) {
|
|
782
|
+
console.log(formatWarning(`Could not read npm registry (continuing): ${plan.latestNpmError}`));
|
|
783
|
+
}
|
|
784
|
+
if (plan.ambiguous) {
|
|
785
|
+
console.log(
|
|
786
|
+
formatWarning(
|
|
787
|
+
'ViePilot install path looks like a source clone or unknown layout; using global npm install. Use --global to make this explicit.'
|
|
788
|
+
)
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
console.log(`\n${colors.cyan}Planned:${colors.reset} ${plan.displayCommand}\n`);
|
|
793
|
+
console.log(
|
|
794
|
+
`${colors.gray}Rollback (example): npm install -g viepilot@${plan.installedVersion || 'PREVIOUS'}${colors.reset}`
|
|
795
|
+
);
|
|
796
|
+
|
|
797
|
+
if (dryRun) {
|
|
798
|
+
console.log(`\n${formatInfo('Dry run — no changes applied.')}`);
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
if (!isInteractive && !yes) {
|
|
803
|
+
console.error(
|
|
804
|
+
formatError(
|
|
805
|
+
'Non-interactive terminal: use --yes to run npm or --dry-run to preview only',
|
|
806
|
+
'Example: vp-tools update --dry-run && vp-tools update --yes'
|
|
807
|
+
)
|
|
808
|
+
);
|
|
809
|
+
process.exit(1);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
if (isInteractive && !yes) {
|
|
813
|
+
const ok = await confirm('Run npm to apply this update?', false);
|
|
814
|
+
if (!ok) {
|
|
815
|
+
console.log(formatWarning('Aborted.'));
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
const result = viepilotUpdate.runNpmUpdate(plan);
|
|
821
|
+
if (!result.ok) {
|
|
822
|
+
process.exit(result.code || 1);
|
|
823
|
+
}
|
|
824
|
+
console.log(formatSuccess('npm update completed.'));
|
|
825
|
+
},
|
|
826
|
+
|
|
637
827
|
/**
|
|
638
828
|
* Check for potential conflicts
|
|
639
829
|
*/
|
|
@@ -829,6 +1019,34 @@ const commands = {
|
|
|
829
1019
|
'vp-tools tag-prefix --raw',
|
|
830
1020
|
],
|
|
831
1021
|
},
|
|
1022
|
+
'git-persistence': {
|
|
1023
|
+
usage: 'vp-tools git-persistence [--strict]',
|
|
1024
|
+
description: 'Check if commit/push persistence gate is satisfied',
|
|
1025
|
+
examples: [
|
|
1026
|
+
'vp-tools git-persistence',
|
|
1027
|
+
'vp-tools git-persistence --strict',
|
|
1028
|
+
],
|
|
1029
|
+
},
|
|
1030
|
+
info: {
|
|
1031
|
+
usage: 'vp-tools info [--json]',
|
|
1032
|
+
description: 'Show installed ViePilot version, latest npm version, skills & workflows inventory',
|
|
1033
|
+
options: ['--json: Machine-readable JSON output'],
|
|
1034
|
+
examples: ['vp-tools info', 'vp-tools info --json'],
|
|
1035
|
+
},
|
|
1036
|
+
update: {
|
|
1037
|
+
usage: 'vp-tools update [--dry-run] [--yes] [--global]',
|
|
1038
|
+
description: 'Update viepilot to npm latest (local dependency, global install, or explicit --global)',
|
|
1039
|
+
options: [
|
|
1040
|
+
'--dry-run: Print planned npm command only',
|
|
1041
|
+
'--yes: Run npm without confirmation (CI / scripts)',
|
|
1042
|
+
'--global: Force npm install -g viepilot@latest',
|
|
1043
|
+
],
|
|
1044
|
+
examples: [
|
|
1045
|
+
'vp-tools update --dry-run',
|
|
1046
|
+
'vp-tools update --yes',
|
|
1047
|
+
'vp-tools update --global --dry-run',
|
|
1048
|
+
],
|
|
1049
|
+
},
|
|
832
1050
|
};
|
|
833
1051
|
|
|
834
1052
|
if (command && commandHelp[command]) {
|
|
@@ -866,6 +1084,9 @@ ${colors.cyan}Commands:${colors.reset}
|
|
|
866
1084
|
${colors.bold}clean${colors.reset} [-f] [--dry-run] Clean generated files (interactive)
|
|
867
1085
|
${colors.bold}checkpoints${colors.reset} List all ViePilot checkpoints (git tags)
|
|
868
1086
|
${colors.bold}tag-prefix${colors.reset} [--raw] Show project-scoped checkpoint prefix
|
|
1087
|
+
${colors.bold}git-persistence${colors.reset} [--strict] Check commit/push persistence readiness
|
|
1088
|
+
${colors.bold}info${colors.reset} [--json] Show ViePilot version, npm latest, skills/workflows
|
|
1089
|
+
${colors.bold}update${colors.reset} [--dry-run] Update viepilot via npm (use --yes non-interactive)
|
|
869
1090
|
${colors.bold}conflicts${colors.reset} Check for potential conflicts
|
|
870
1091
|
${colors.bold}save-state${colors.reset} Save current state for precise resume
|
|
871
1092
|
${colors.bold}help${colors.reset} [command] Show help (optionally for specific command)
|
package/dev-install.sh
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# ViePilot Development Installation Script
|
|
4
4
|
# Installs development build without symlink dependency by default
|
|
5
|
+
#
|
|
6
|
+
# Optional: VIEPILOT_SYMLINK_SKILLS=1 — symlink each skills/vp-* into ~/.cursor/skills/
|
|
7
|
+
# (live edits from this repo; default remains copy for reliability — see FEAT-005)
|
|
5
8
|
|
|
6
9
|
set -e
|
|
7
10
|
|
|
@@ -25,7 +28,11 @@ echo " VIEPILOT DEV INSTALLER"
|
|
|
25
28
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
26
29
|
echo -e "${NC}"
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
32
|
+
echo -e "${YELLOW}Development mode installation (skills: SYMLINK → repo)${NC}"
|
|
33
|
+
else
|
|
34
|
+
echo -e "${YELLOW}Development mode installation (copy-first for reliability)${NC}"
|
|
35
|
+
fi
|
|
29
36
|
echo " Source: $SCRIPT_DIR"
|
|
30
37
|
echo " Target: $CURSOR_SKILLS_DIR, $VIEPILOT_DIR"
|
|
31
38
|
echo " Profile: $INSTALL_PROFILE"
|
|
@@ -77,12 +84,22 @@ fi
|
|
|
77
84
|
echo ""
|
|
78
85
|
echo -e "${BLUE}Installing skills...${NC}"
|
|
79
86
|
|
|
80
|
-
# Install
|
|
87
|
+
# Install skills: copy (default) or symlink when VIEPILOT_SYMLINK_SKILLS=1
|
|
81
88
|
mkdir -p "$CURSOR_SKILLS_DIR"
|
|
82
89
|
for skill in "$SCRIPT_DIR"/skills/vp-*/; do
|
|
83
90
|
skill_name=$(basename "$skill")
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
92
|
+
if command -v realpath >/dev/null 2>&1; then
|
|
93
|
+
skill_abs=$(realpath "$skill")
|
|
94
|
+
else
|
|
95
|
+
skill_abs=$(cd "$skill" && pwd)
|
|
96
|
+
fi
|
|
97
|
+
ln -sfn "$skill_abs" "$CURSOR_SKILLS_DIR/$skill_name"
|
|
98
|
+
echo -e " ${GREEN}✓${NC} $skill_name (symlink)"
|
|
99
|
+
else
|
|
100
|
+
cp -R "$skill" "$CURSOR_SKILLS_DIR/$skill_name"
|
|
101
|
+
echo -e " ${GREEN}✓${NC} $skill_name"
|
|
102
|
+
fi
|
|
86
103
|
done
|
|
87
104
|
|
|
88
105
|
echo ""
|
|
@@ -120,10 +137,14 @@ echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━
|
|
|
120
137
|
echo -e "${GREEN} DEV INSTALLATION COMPLETE ✓${NC}"
|
|
121
138
|
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
122
139
|
echo ""
|
|
123
|
-
|
|
140
|
+
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
141
|
+
echo "Installed (skills symlink mode):"
|
|
142
|
+
echo -e "${YELLOW}Skills point at repo — edits in $SCRIPT_DIR/skills/ are live.${NC}"
|
|
143
|
+
else
|
|
144
|
+
echo "Installed (copy mode):"
|
|
145
|
+
echo -e "${YELLOW}Development mode enabled (reliable copy mode).${NC}"
|
|
146
|
+
echo "Re-run this script after local changes to refresh installed files."
|
|
147
|
+
fi
|
|
124
148
|
echo " - Skills: $SKILL_COUNT"
|
|
125
149
|
echo " - Workflows: $WORKFLOW_COUNT"
|
|
126
150
|
echo ""
|
|
127
|
-
echo -e "${YELLOW}Development mode enabled (reliable copy mode).${NC}"
|
|
128
|
-
echo "Re-run this script after local changes to refresh installed files."
|
|
129
|
-
echo ""
|
package/docs/README.md
CHANGED
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
| Feature | Document |
|
|
30
30
|
|---------|----------|
|
|
31
31
|
| Autonomous Mode | [autonomous-mode.md](user/features/autonomous-mode.md) (flags, `--fast`, lượt chat) |
|
|
32
|
+
| Brainstorm & product horizon | [brainstorm.md](user/features/brainstorm.md) (MVP / Post-MVP tags, crystallize handoff) |
|
|
33
|
+
| Product horizon end-to-end | [product-horizon.md](user/features/product-horizon.md) (brainstorm → ROADMAP / PROJECT-CONTEXT, AI load order) |
|
|
32
34
|
| UI Direction Mode | [ui-direction.md](user/features/ui-direction.md) |
|
|
33
35
|
| Checkpoint Recovery | [checkpoint-recovery.md](user/features/checkpoint-recovery.md) |
|
|
34
36
|
| Debug Mode | [debug-mode.md](user/features/debug-mode.md) |
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
|----------|-------------|
|
|
54
56
|
| [Getting Started](getting-started.md) | Installation and first steps |
|
|
55
57
|
| [Getting Started (dev entry)](dev/getting-started.md) | Short link into dev guide |
|
|
56
|
-
| [CLI Reference](dev/cli-reference.md) | All
|
|
58
|
+
| [CLI Reference](dev/cli-reference.md) | All `vp-tools` subcommands (incl. `info`, `update`) with examples |
|
|
57
59
|
| [Architecture](dev/architecture.md) | System layers, data flow, design decisions |
|
|
58
60
|
| [UI Components Library](dev/ui-components-library.md) | Curation taxonomy, storage contract, reuse flow |
|
|
59
61
|
| [Contributing](dev/contributing.md) | How to add skills, workflows, CLI commands |
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
|
|
67
69
|
| Document | Description |
|
|
68
70
|
|----------|-------------|
|
|
69
|
-
| [Skills Reference](skills-reference.md) | All
|
|
71
|
+
| [Skills Reference](skills-reference.md) | All skills with flags and examples |
|
|
70
72
|
| [Advanced Usage](advanced-usage.md) | Power user features and patterns |
|
|
71
73
|
|
|
72
74
|
---
|
|
@@ -122,4 +124,4 @@
|
|
|
122
124
|
|
|
123
125
|
---
|
|
124
126
|
|
|
125
|
-
*Last updated: 2026-03-31 — ViePilot framework
|
|
127
|
+
*Last updated: 2026-03-31 — ViePilot framework v1.2.0 (see `.viepilot/TRACKER.md`); project-scoped checkpoint tags delivered.*
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
# Sau khi install ViePilot
|
|
8
|
+
# Sau khi install ViePilot (global: npm i -g viepilot — có `vp-tools` trên PATH)
|
|
9
9
|
vp-tools help
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
Sau `npm i -g viepilot`, lệnh `vp-tools` (cùng bundle với `npx viepilot`) có sẵn để gọi `info` / `update` mà không cần clone repo.
|
|
13
|
+
|
|
12
14
|
---
|
|
13
15
|
|
|
14
16
|
## Commands
|
|
@@ -291,6 +293,73 @@ vp-tools help version
|
|
|
291
293
|
|
|
292
294
|
---
|
|
293
295
|
|
|
296
|
+
### `info [--json]`
|
|
297
|
+
|
|
298
|
+
Hiển thị metadata bundle ViePilot: thư mục gốc package đã resolve, version đã cài, (nếu có mạng) version mới nhất trên npm, optional `git HEAD`, danh sách **skills** và **workflows** kèm semver trong frontmatter (skills).
|
|
299
|
+
|
|
300
|
+
**Không cần** project có `.viepilot/` — CLI resolve gói `viepilot` từ vị trí `vp-tools.cjs` hoặc từ `process.cwd()`.
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
vp-tools info
|
|
304
|
+
vp-tools info --json
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Flags**:
|
|
308
|
+
|
|
309
|
+
| Flag | Description |
|
|
310
|
+
|------|-------------|
|
|
311
|
+
| `--json` | In một object JSON duy nhất (parse-friendly) |
|
|
312
|
+
|
|
313
|
+
**JSON shape** (`vp-tools info --json`, rút gọn):
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"packageRoot": "/path/to/viepilot",
|
|
318
|
+
"packageName": "viepilot",
|
|
319
|
+
"installedVersion": "1.5.1",
|
|
320
|
+
"latestNpm": { "ok": true, "version": "1.5.1" },
|
|
321
|
+
"gitHead": "abc1234…",
|
|
322
|
+
"skills": [
|
|
323
|
+
{ "id": "vp-auto", "version": "0.1.0", "relativePath": "skills/vp-auto/SKILL.md" }
|
|
324
|
+
],
|
|
325
|
+
"workflows": [
|
|
326
|
+
{ "id": "autonomous", "relativePath": "workflows/autonomous.md", "semverInFile": null, "note": "no semver in workflow markdown" }
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Errors**:
|
|
332
|
+
- `Could not locate viepilot package root` — Cài global, thêm dependency `viepilot`, hoặc chạy `node path/to/viepilot/bin/vp-tools.cjs info` từ clone.
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
### `update [--dry-run] [--yes] [--global]`
|
|
337
|
+
|
|
338
|
+
Nâng cấp package `viepilot` qua **npm** (local `node_modules`, global install, hoặc ép global).
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
vp-tools update --dry-run
|
|
342
|
+
vp-tools update --yes
|
|
343
|
+
vp-tools update --global --dry-run
|
|
344
|
+
vp-tools update --global --yes
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Flags**:
|
|
348
|
+
|
|
349
|
+
| Flag | Description |
|
|
350
|
+
|------|-------------|
|
|
351
|
+
| `--dry-run` | Chỉ in lệnh npm dự kiến và hướng dẫn rollback, **không** chạy npm |
|
|
352
|
+
| `--yes` | Bỏ qua prompt; **bắt buộc** trong môi trường non-interactive khi thực sự apply |
|
|
353
|
+
| `--global` | Ép `npm install -g viepilot@latest` |
|
|
354
|
+
|
|
355
|
+
**Lưu ý**:
|
|
356
|
+
- Trong repo **ứng dụng** có `node_modules/viepilot`, bản mặc định có thể cập nhật **dependency local** — dùng `--global` nếu chỉ muốn nâng bản global.
|
|
357
|
+
- Non-interactive: dùng `vp-tools update --dry-run` trước, sau đó `vp-tools update --yes` (hoặc `--global --yes`).
|
|
358
|
+
|
|
359
|
+
**Success**: Thông báo `npm update completed` hoặc `already up to date` (no-op).
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
294
363
|
## Exit Codes
|
|
295
364
|
|
|
296
365
|
| Code | Meaning |
|
package/docs/dev/contributing.md
CHANGED
|
@@ -14,6 +14,10 @@ Hướng dẫn đóng góp cho ViePilot framework.
|
|
|
14
14
|
```bash
|
|
15
15
|
./dev-install.sh
|
|
16
16
|
```
|
|
17
|
+
Để **symlink** toàn bộ `skills/vp-*` về repo (sửa skill là Cursor thấy ngay), dùng:
|
|
18
|
+
```bash
|
|
19
|
+
VIEPILOT_SYMLINK_SKILLS=1 ./dev-install.sh
|
|
20
|
+
```
|
|
17
21
|
4. Tạo branch cho feature/fix:
|
|
18
22
|
```bash
|
|
19
23
|
git checkout -b feat/my-new-skill
|