viepilot 1.3.1 → 1.8.0
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 +51 -1
- package/README.md +23 -19
- package/bin/viepilot.cjs +54 -22
- package/bin/vp-tools.cjs +152 -0
- package/dev-install.sh +29 -8
- package/docs/README.md +4 -2
- package/docs/dev/cli-reference.md +70 -1
- package/docs/dev/contributing.md +4 -0
- package/docs/dev/deployment.md +3 -4
- package/docs/skills-reference.md +44 -0
- package/docs/troubleshooting.md +37 -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 +24 -90
- package/lib/viepilot-info.cjs +196 -0
- package/lib/viepilot-install.cjs +427 -0
- package/lib/viepilot-update.cjs +156 -0
- package/package.json +2 -1
- package/skills/vp-audit/SKILL.md +7 -1
- package/skills/vp-brainstorm/SKILL.md +9 -5
- package/skills/vp-crystallize/SKILL.md +25 -12
- package/skills/vp-debug/SKILL.md +12 -5
- 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/ARCHITECTURE.md +53 -0
- package/templates/project/PROJECT-CONTEXT.md +22 -0
- package/templates/project/ROADMAP.md +27 -0
- package/workflows/autonomous.md +7 -0
- package/workflows/brainstorm.md +80 -11
- package/workflows/crystallize.md +53 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Planned
|
|
11
|
+
|
|
12
|
+
- **M1.25 / Phase 29 (ENH-018)** — **Crystallize + ARCHITECTURE**: Mermaid diagrams **complexity-gated** from brainstorm; six diagram kinds with required/optional/N/A; vp-audit / vp-auto / vp-debug alignment; target **1.8.0** on complete.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
## [1.8.0] - 2026-04-01
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **M1.25 / Phase 29 (ENH-018) completed** — complexity-gated Mermaid architecture contract shipped: brainstorm inputs + crystallize matrix (`required|optional|N/A`) for six diagram types, architecture template sections with N/A rationale policy, and skill/workflow alignment across `vp-crystallize`, `vp-audit`, `vp-debug`, and `autonomous`.
|
|
21
|
+
|
|
22
|
+
## [1.7.0] - 2026-04-01
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **M1.24 / Phase 28 (ENH-017) completed** — Node-native installer flow shipped: `lib/viepilot-install.cjs` (`buildInstallPlan`/`applyInstallPlan`), `bin/viepilot.cjs install` no longer spawns `bash`, `install.sh` now thin wrapper to Node, and Jest coverage for dry-run/apply/wrapper paths.
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
|
|
30
|
+
- `docs/troubleshooting.md`, `docs/dev/deployment.md` — updated install engine behavior (`npx viepilot install` Node-native, `install.sh` wrapper), Windows guidance, and reinstall semantics with `dev-install.sh`.
|
|
31
|
+
|
|
32
|
+
## [1.6.1] - 2026-04-01
|
|
33
|
+
|
|
34
|
+
### Enhanced
|
|
35
|
+
|
|
36
|
+
- **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.
|
|
37
|
+
|
|
38
|
+
## [1.6.0] - 2026-04-01
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **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`.
|
|
43
|
+
|
|
44
|
+
## [1.5.1] - 2026-04-01
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **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.
|
|
49
|
+
|
|
50
|
+
### Enhanced
|
|
51
|
+
|
|
52
|
+
- **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.
|
|
53
|
+
- **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.
|
|
54
|
+
- **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.
|
|
55
|
+
- **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.
|
|
56
|
+
- **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).
|
|
57
|
+
|
|
10
58
|
### Enhanced
|
|
11
59
|
|
|
60
|
+
- **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
61
|
- **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
62
|
- **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
63
|
- **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.
|
|
@@ -225,7 +274,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
225
274
|
|
|
226
275
|
---
|
|
227
276
|
|
|
228
|
-
[Unreleased]: https://github.com/0-CODE/viepilot/compare/
|
|
277
|
+
[Unreleased]: https://github.com/0-CODE/viepilot/compare/v1.8.0...HEAD
|
|
278
|
+
[1.8.0]: https://github.com/0-CODE/viepilot/compare/v1.7.0...v1.8.0
|
|
229
279
|
[0.10.0]: https://github.com/0-CODE/viepilot/compare/v0.9.0...v0.10.0
|
|
230
280
|
[0.9.0]: https://github.com/0-CODE/viepilot/compare/v0.8.2...v0.9.0
|
|
231
281
|
[0.8.2]: https://github.com/0-CODE/viepilot/compare/v0.8.1...v0.8.2
|
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 **1.
|
|
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/viepilot.cjs
CHANGED
|
@@ -5,9 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const path = require('path');
|
|
8
|
-
const { spawnSync } = require('child_process');
|
|
9
8
|
const readline = require('readline');
|
|
10
9
|
const fs = require('fs');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
const { buildInstallPlan, applyInstallPlan, resolveViepilotPackageRoot } = require(path.join(
|
|
12
|
+
__dirname,
|
|
13
|
+
'..',
|
|
14
|
+
'lib',
|
|
15
|
+
'viepilot-install.cjs',
|
|
16
|
+
));
|
|
11
17
|
|
|
12
18
|
const TARGETS = [
|
|
13
19
|
{ id: 'claude-code', label: 'Claude Code' },
|
|
@@ -28,7 +34,7 @@ Usage:
|
|
|
28
34
|
Install options:
|
|
29
35
|
--target <id|id,id|all> Target profile(s): claude-code,cursor-agent,cursor-ide
|
|
30
36
|
--yes Non-interactive mode (skip confirmations)
|
|
31
|
-
--dry-run Print actions only
|
|
37
|
+
--dry-run Print actions only (Node installer; no bash)
|
|
32
38
|
--list-targets Print supported targets and exit
|
|
33
39
|
--help Show help
|
|
34
40
|
|
|
@@ -239,28 +245,48 @@ async function interactiveTargetSelection() {
|
|
|
239
245
|
return runKeyboardSelector(TARGETS, 'multi', 'Select install targets');
|
|
240
246
|
}
|
|
241
247
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
248
|
+
/**
|
|
249
|
+
* One install applies the same file bundle for every target id (profiles are informational).
|
|
250
|
+
* @param {string[]} selectedTargets
|
|
251
|
+
* @param {boolean} dryRun
|
|
252
|
+
* @returns {{ ok: boolean, code: number }}
|
|
253
|
+
*/
|
|
254
|
+
function runInstallViaNode(selectedTargets, dryRun) {
|
|
255
|
+
const fallbackRoot = path.join(__dirname, '..');
|
|
256
|
+
const pkgRoot = resolveViepilotPackageRoot(fallbackRoot) || fallbackRoot;
|
|
257
|
+
const profile = selectedTargets[0] || 'cursor-ide';
|
|
258
|
+
const env = {
|
|
259
|
+
...process.env,
|
|
260
|
+
VIEPILOT_AUTO_YES: '1',
|
|
261
|
+
VIEPILOT_INSTALL_PROFILE: profile,
|
|
247
262
|
};
|
|
248
|
-
|
|
263
|
+
const wantPathShim = env.VIEPILOT_ADD_PATH === '1';
|
|
249
264
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
console.
|
|
255
|
-
return { ok:
|
|
265
|
+
let plan;
|
|
266
|
+
try {
|
|
267
|
+
plan = buildInstallPlan(pkgRoot, env, { wantPathShim });
|
|
268
|
+
} catch (err) {
|
|
269
|
+
console.error(err.message);
|
|
270
|
+
return { ok: false, code: 1 };
|
|
256
271
|
}
|
|
257
272
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
273
|
+
console.log('');
|
|
274
|
+
console.log('ViePilot install (Node — no bash required)');
|
|
275
|
+
console.log(` Package: ${pkgRoot}`);
|
|
276
|
+
console.log(` Targets (informational): ${selectedTargets.join(', ')}`);
|
|
277
|
+
|
|
278
|
+
const applied = applyInstallPlan(plan, { dryRun });
|
|
279
|
+
if (applied.logs.length > 0) {
|
|
280
|
+
console.log('');
|
|
281
|
+
console.log(applied.logs.join('\n'));
|
|
282
|
+
}
|
|
283
|
+
if (!applied.ok && applied.errors.length > 0) {
|
|
284
|
+
const first = applied.errors[0];
|
|
285
|
+
const msg = first.error && first.error.message ? first.error.message : String(first.error);
|
|
286
|
+
console.error(msg);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
return { ok: applied.ok, code: applied.ok ? 0 : 1 };
|
|
264
290
|
}
|
|
265
291
|
|
|
266
292
|
async function installCommand(rawArgs) {
|
|
@@ -290,7 +316,13 @@ async function installCommand(rawArgs) {
|
|
|
290
316
|
}
|
|
291
317
|
|
|
292
318
|
console.log(`\nSelected targets: ${selectedTargets.join(', ')}`);
|
|
293
|
-
const
|
|
319
|
+
const run = runInstallViaNode(selectedTargets, options.dryRun);
|
|
320
|
+
const results = selectedTargets.map((target) => ({
|
|
321
|
+
ok: run.ok,
|
|
322
|
+
target,
|
|
323
|
+
dryRun: options.dryRun,
|
|
324
|
+
code: run.code,
|
|
325
|
+
}));
|
|
294
326
|
const failed = results.filter((r) => !r.ok);
|
|
295
327
|
|
|
296
328
|
console.log('\nInstall summary:');
|
|
@@ -307,7 +339,7 @@ async function installCommand(rawArgs) {
|
|
|
307
339
|
}
|
|
308
340
|
|
|
309
341
|
function computeUninstallPaths(targets) {
|
|
310
|
-
const home = process.env.HOME || '';
|
|
342
|
+
const home = process.env.HOME || os.homedir() || '';
|
|
311
343
|
const cursorSkills = path.join(home, '.cursor', 'skills');
|
|
312
344
|
const vpRoot = path.join(home, '.cursor', 'viepilot');
|
|
313
345
|
const paths = [];
|
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
|
// ============================================================================
|
|
@@ -694,6 +697,133 @@ const commands = {
|
|
|
694
697
|
}
|
|
695
698
|
},
|
|
696
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
|
+
|
|
697
827
|
/**
|
|
698
828
|
* Check for potential conflicts
|
|
699
829
|
*/
|
|
@@ -897,6 +1027,26 @@ const commands = {
|
|
|
897
1027
|
'vp-tools git-persistence --strict',
|
|
898
1028
|
],
|
|
899
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
|
+
},
|
|
900
1050
|
};
|
|
901
1051
|
|
|
902
1052
|
if (command && commandHelp[command]) {
|
|
@@ -935,6 +1085,8 @@ ${colors.cyan}Commands:${colors.reset}
|
|
|
935
1085
|
${colors.bold}checkpoints${colors.reset} List all ViePilot checkpoints (git tags)
|
|
936
1086
|
${colors.bold}tag-prefix${colors.reset} [--raw] Show project-scoped checkpoint prefix
|
|
937
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)
|
|
938
1090
|
${colors.bold}conflicts${colors.reset} Check for potential conflicts
|
|
939
1091
|
${colors.bold}save-state${colors.reset} Save current state for precise resume
|
|
940
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
|
---
|