viepilot 2.1.0 → 2.4.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 +93 -0
- package/README.md +27 -17
- package/bin/viepilot.cjs +12 -4
- package/docs/user/features/adapters.md +74 -0
- package/lib/adapters/antigravity.cjs +33 -0
- package/lib/adapters/claude-code.cjs +2 -2
- package/lib/adapters/codex.cjs +34 -0
- package/lib/adapters/cursor.cjs +2 -1
- package/lib/adapters/index.cjs +4 -2
- package/lib/viepilot-install.cjs +8 -10
- package/package.json +1 -3
- package/skills/vp-audit/SKILL.md +2 -2
- package/skills/vp-auto/SKILL.md +2 -2
- package/skills/vp-brainstorm/SKILL.md +2 -2
- package/skills/vp-crystallize/SKILL.md +3 -3
- package/skills/vp-debug/SKILL.md +2 -2
- package/skills/vp-docs/SKILL.md +1 -1
- package/skills/vp-evolve/SKILL.md +1 -1
- package/skills/vp-info/SKILL.md +1 -1
- package/skills/vp-pause/SKILL.md +2 -2
- package/skills/vp-request/SKILL.md +2 -2
- package/skills/vp-resume/SKILL.md +2 -2
- package/skills/vp-rollback/SKILL.md +1 -1
- package/skills/vp-ui-components/SKILL.md +2 -2
- package/skills/vp-update/SKILL.md +1 -1
- package/workflows/autonomous.md +32 -0
- package/workflows/brainstorm.md +1 -1
- package/workflows/crystallize.md +5 -0
- package/workflows/evolve.md +2 -0
- package/dev-install.sh +0 -171
- package/install.sh +0 -125
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,99 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.4.0] - 2026-04-10
|
|
11
|
+
|
|
12
|
+
### Added (FEAT-015 — Phase 62)
|
|
13
|
+
- **Codex adapter**: `lib/adapters/codex.cjs` — OpenAI Codex CLI is now a first-class install target; skills install to `~/.codex/skills/`, viepilot bundle to `~/.codex/viepilot/`
|
|
14
|
+
- `lib/adapters/index.cjs`: `codex` registered; `listAdapters()` now returns 4 unique adapters
|
|
15
|
+
- `bin/viepilot.cjs`: Codex added to interactive installer TARGETS list and help text
|
|
16
|
+
- `docs/user/features/adapters.md`: Codex row added; `$skill-name` invocation note; removed stale `dev-install.sh` reference
|
|
17
|
+
|
|
18
|
+
### Notes
|
|
19
|
+
- Codex uses `$vp-status` syntax (not `/vp-status`) — SKILL.md format is fully compatible, invocation prefix differs
|
|
20
|
+
|
|
21
|
+
### Tests
|
|
22
|
+
- Added `tests/unit/vp-adapter-codex.test.js` (11 tests)
|
|
23
|
+
- Updated `tests/unit/vp-adapter-antigravity.test.js`: `listAdapters()` now expects 4
|
|
24
|
+
- Updated `tests/unit/viepilot-adapters.test.js`: count 3 → 4
|
|
25
|
+
- Updated `tests/unit/guided-installer.test.js`: `normalizeTargets('all')` includes codex
|
|
26
|
+
- Total: 607 tests (was 596)
|
|
27
|
+
|
|
28
|
+
## [2.3.2] - 2026-04-10
|
|
29
|
+
|
|
30
|
+
### Changed (ENH-037 — Phase 61)
|
|
31
|
+
- Post-install "Next actions" block is now adapter-driven: each adapter carries a `postInstallHint` string; CLI prints one hint per unique installed target — Antigravity now appears when installed
|
|
32
|
+
- `lib/adapters/claude-code.cjs`, `cursor.cjs`, `antigravity.cjs`: added `postInstallHint` field
|
|
33
|
+
|
|
34
|
+
## [2.3.1] - 2026-04-10
|
|
35
|
+
|
|
36
|
+
### Removed (ENH-036 — Phase 60)
|
|
37
|
+
- `install.sh` — bash wrapper was redundant; `bin/viepilot.cjs install` covers all install functionality
|
|
38
|
+
- `dev-install.sh` — bash adapter routing duplicated `lib/adapters/`; `bin/viepilot.cjs install --target <adapter>` is the canonical path
|
|
39
|
+
- Removed 5 tests that only verified shell script content (viepilot-install.test.js, viepilot-adapters.test.js, vp-adapter-antigravity.test.js)
|
|
40
|
+
|
|
41
|
+
## [2.3.0] - 2026-04-10
|
|
42
|
+
|
|
43
|
+
### Added (FEAT-014 — Phase 59)
|
|
44
|
+
- **Antigravity adapter**: `lib/adapters/antigravity.cjs` — Google Antigravity IDE is now a first-class install target; skills install to `~/.antigravity/skills/`, viepilot bundle to `~/.antigravity/viepilot/`
|
|
45
|
+
- `lib/adapters/index.cjs`: `antigravity` registered; `listAdapters()` now returns 3 unique adapters
|
|
46
|
+
- `dev-install.sh`: `VIEPILOT_ADAPTER=antigravity` supported
|
|
47
|
+
- `bin/viepilot.cjs`: Antigravity added to interactive installer TARGETS list and help text
|
|
48
|
+
- `docs/user/features/adapters.md`: new doc — supported platforms table, install examples, guide for adding new adapters
|
|
49
|
+
|
|
50
|
+
### Tests
|
|
51
|
+
- Added `tests/unit/vp-adapter-antigravity.test.js` (12 tests)
|
|
52
|
+
- Updated `tests/unit/viepilot-adapters.test.js`: `listAdapters()` now expects 3
|
|
53
|
+
- Updated `tests/unit/guided-installer.test.js`: `normalizeTargets('all')` includes antigravity
|
|
54
|
+
- Total: 600 tests (was 588)
|
|
55
|
+
|
|
56
|
+
## [2.2.0] - 2026-04-10
|
|
57
|
+
|
|
58
|
+
### Changed (ENH-035 — Phase 58)
|
|
59
|
+
- **{envToolDir} template variable**: all 14 `skills/*/SKILL.md` source files now use `$HOME/{envToolDir}/` instead of hardcoded `$HOME/.cursor/viepilot/` — skill sources are platform-neutral
|
|
60
|
+
- **`lib/viepilot-install.cjs`**: path substitution now unconditionally replaces `{envToolDir}` → `adapter.executionContextBase` for every adapter (Cursor → `.cursor/viepilot`, Claude Code → `.claude/viepilot`, future adapters just set `executionContextBase`)
|
|
61
|
+
- **`lib/adapters/claude-code.cjs`**: removed `pathRewrite` field — no longer needed
|
|
62
|
+
- **`lib/adapters/cursor.cjs`**: removed `pathRewrite: null` field — no longer needed
|
|
63
|
+
- Adding a new adapter now requires only `executionContextBase` — no `pathRewrite` definition
|
|
64
|
+
|
|
65
|
+
### Tests
|
|
66
|
+
- Updated `tests/unit/viepilot-adapters.test.js`: removed `pathRewrite` assertion; rewrite step tests now check `from: '{envToolDir}'`; added cursor-target substitution test
|
|
67
|
+
- Updated `tests/unit/viepilot-install.test.js`: 2 tests updated for ENH-035 behavior
|
|
68
|
+
- Total: 588 tests (was 587)
|
|
69
|
+
|
|
70
|
+
## [2.1.3] - 2026-04-10
|
|
71
|
+
|
|
72
|
+
### Fixed (BUG-011 — Phase 55)
|
|
73
|
+
- **brainstorm.md dialogue path**: confirmation option 1 now shows `.viepilot/ui-direction/{session-id}/notes.md` instead of bare `ui-direction/notes.md` — eliminates ambiguity with user-managed `{root}/ui-direction/` folders
|
|
74
|
+
- **crystallize.md PATH GUARD**: `consume_ui_direction` step now opens with `⛔ PATH GUARD (BUG-011)` — explicitly instructs LLM to ignore any `{root}/ui-direction/` folder and read only from `.viepilot/ui-direction/`
|
|
75
|
+
|
|
76
|
+
### Tests
|
|
77
|
+
- Added `tests/unit/vp-bug011-ui-direction-path-guard.test.js` (3 tests)
|
|
78
|
+
- Total: 587 tests (was 584)
|
|
79
|
+
|
|
80
|
+
## [2.1.2] - 2026-04-10
|
|
81
|
+
|
|
82
|
+
### Fixed (BUG-013 — Phase 57)
|
|
83
|
+
- **Untrack .viepilot/ from git**: `git rm -r --cached .viepilot/` — removes all 27 previously-tracked internal state files from the git index; `.viepilot/` now correctly treated as gitignored on disk only, never staged or pushed
|
|
84
|
+
- **GITIGNORE-AWARE STAGING RULE**: `workflows/autonomous.md` commit block now has `⛔ GITIGNORE-AWARE STAGING RULE (BUG-013)` — instructs vp-auto to check `git check-ignore -q` before staging, and explicitly forbids `git add .viepilot/`
|
|
85
|
+
- **Git persistence gate note**: porcelain check section clarified — `??` (untracked-only) lines are CLEAN, not dirty state; prevents false gate failures after BUG-013 fix
|
|
86
|
+
|
|
87
|
+
### Tests
|
|
88
|
+
- Added `tests/unit/vp-bug013-gitignore-staging-rule.test.js` (3 tests)
|
|
89
|
+
- Total: 584 tests (was 581)
|
|
90
|
+
- **ui-direction path disambiguation**: `workflows/brainstorm.md` confirmation dialogue option 1 now shows full unambiguous path `.viepilot/ui-direction/{session-id}/notes.md` (was bare `ui-direction/notes.md`)
|
|
91
|
+
- **crystallize PATH GUARD**: `workflows/crystallize.md` `consume_ui_direction` step now opens with `⛔ PATH GUARD (BUG-011)` — explicitly instructs LLM to ignore any `{root}/ui-direction/` folder and read only from `.viepilot/ui-direction/`
|
|
92
|
+
|
|
93
|
+
## [2.1.1] - 2026-04-10
|
|
94
|
+
|
|
95
|
+
### Fixed (BUG-012 — Phase 56)
|
|
96
|
+
- **PATH RESOLUTION RULE**: `workflows/autonomous.md` now has `⛔ PATH RESOLUTION RULE (BUG-012)` block — explicitly states all file reads/edits during task execution resolve from `{cwd}` (repo root), never from `~/.claude/` or `~/.cursor/` install directories
|
|
97
|
+
- **evolve.md cwd note**: `workflows/evolve.md` TASK PATH RULE section now includes BUG-012 cwd-resolution clarification: repo-relative paths always anchor to `{cwd}`, not install paths
|
|
98
|
+
|
|
99
|
+
### Tests
|
|
100
|
+
- Added `tests/unit/vp-bug012-path-resolution-rule.test.js` (3 tests)
|
|
101
|
+
- Total: 581 tests (was 578)
|
|
102
|
+
|
|
10
103
|
## [2.1.0] - 2026-04-08
|
|
11
104
|
|
|
12
105
|
### Added (FEAT-012 — Phase 54)
|
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
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 **2.4.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**2.4.0**) is the Node package identifier for this repo; 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,13 +28,13 @@ 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 | **~
|
|
31
|
+
| Total LOC | **~39,668+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
|
|
32
32
|
| Skills | **16** |
|
|
33
33
|
| Workflows | **12** |
|
|
34
34
|
| Templates | **17** (Project: 12, Phase: 5) |
|
|
35
35
|
| CLI Commands | **18** (`vp-tools` 17 subcommands + `viepilot` installer) |
|
|
36
|
-
| Tests | **
|
|
37
|
-
| ViePilot phases (local `.viepilot`) | **
|
|
36
|
+
| Tests | **607** (34 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009/010/011/012/013/015 + ENH-021~037 routing/language/architect/adapter + BUG-009~013 guards + viepilot-info/update/install/adapters) |
|
|
37
|
+
| ViePilot phases (local `.viepilot`) | **62** phase cycles — **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.0.0** FEAT-013 dynamic adapters; **v1.x** M1.29 (FEAT-001~013); xem `CHANGELOG.md` |
|
|
38
38
|
| Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
|
|
39
39
|
|
|
40
40
|
> Metric `Total LOC` có thể được refresh tự động bằng `npm run readme:sync` (dùng `cloc`; nếu thiếu `cloc` script sẽ fallback an toàn).
|
|
@@ -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 | 12 | AI-GUIDE, ARCHITECTURE, VIEPILOT-META, README, SYSTEM-RULES, etc. |
|
|
49
49
|
| Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
|
|
50
50
|
| CLI Tools | 2 | vp-tools.cjs (**17** subcommands) + viepilot.cjs (guided installer) |
|
|
51
|
-
| Test Files |
|
|
51
|
+
| Test Files | 34 | Jest: 33 unit + 1 integration (contracts, installer + Claude paths, info/update, FEAT-009/010/011~015, ENH-021~037, BUG-009~013 guards, adapter tests, scope policy, …) |
|
|
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: ████████████████████ ~99% ✅ Latest **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.1.x** BUG-009~013; **v2.0.0** FEAT-013 dynamic adapters
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
| Lĩnh vực / Area | Trạng thái | Chi tiết |
|
|
@@ -65,11 +65,11 @@ Tổng thể / Overall: ██████████████████
|
|
|
65
65
|
| Project Templates (12) | ✅ Hoàn thiện | Placeholders cho customization (+ `VIEPILOT-META` FEAT-009) |
|
|
66
66
|
| Phase Templates (5) | ✅ Hoàn thiện | Task tracking, verification, summary |
|
|
67
67
|
| CLI Tools (18) | ✅ Hoàn thiện | vp-tools 17 subcommands + viepilot installer; bundle `info` / `update` |
|
|
68
|
-
| Tests (
|
|
68
|
+
| Tests (607) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~037, BUG-009~013, adapter tests, info/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 |
|
|
72
|
-
| Installation | ✅ Hoàn thiện |
|
|
72
|
+
| Installation | ✅ Hoàn thiện | `bin/viepilot.cjs install` (Node-based, all adapters) |
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
@@ -205,10 +205,13 @@ Chọn target profile trong wizard (phím mũi tên + space + enter):
|
|
|
205
205
|
- Claude Code
|
|
206
206
|
- Cursor Agent
|
|
207
207
|
- Cursor IDE
|
|
208
|
+
- Antigravity
|
|
209
|
+
- Codex
|
|
208
210
|
|
|
209
211
|
Non-interactive:
|
|
210
212
|
```bash
|
|
211
213
|
npx viepilot install --target cursor-agent --yes
|
|
214
|
+
npx viepilot install --target codex --yes
|
|
212
215
|
```
|
|
213
216
|
|
|
214
217
|
Gỡ cài đặt:
|
|
@@ -353,7 +356,7 @@ viepilot/
|
|
|
353
356
|
│ ├── vp-rollback/ # Checkpoint recovery
|
|
354
357
|
│ └── vp-audit/ # Documentation sync
|
|
355
358
|
│
|
|
356
|
-
├── workflows/ #
|
|
359
|
+
├── workflows/ # 12 Workflow definitions
|
|
357
360
|
│ ├── brainstorm.md # Brainstorm session flow
|
|
358
361
|
│ ├── crystallize.md # Artifact generation flow
|
|
359
362
|
│ ├── autonomous.md # Execution loop
|
|
@@ -388,17 +391,25 @@ viepilot/
|
|
|
388
391
|
│ └── SUMMARY.md
|
|
389
392
|
│
|
|
390
393
|
├── lib/ # Shared CLI logic (coverage target for Jest)
|
|
391
|
-
│
|
|
394
|
+
│ ├── cli-shared.cjs # Validators, project root, Levenshtein helpers
|
|
395
|
+
│ └── adapters/ # Dynamic adapter system (FEAT-013)
|
|
396
|
+
│ ├── index.cjs # Registry: listAdapters(), getAdapter()
|
|
397
|
+
│ ├── claude-code.cjs # Claude Code adapter (~/.claude/)
|
|
398
|
+
│ ├── cursor.cjs # Cursor adapter (~/.cursor/)
|
|
399
|
+
│ ├── antigravity.cjs # Antigravity adapter (~/.antigravity/)
|
|
400
|
+
│ └── codex.cjs # Codex CLI adapter (~/.codex/)
|
|
392
401
|
│
|
|
393
402
|
├── bin/ # CLI tools
|
|
394
403
|
│ └── vp-tools.cjs # 17 subcommands; uses ../lib/cli-shared.cjs, viepilot-info/update.cjs
|
|
395
404
|
│
|
|
396
|
-
├── tests/ # Test suite (
|
|
397
|
-
│ ├── unit/ #
|
|
405
|
+
├── tests/ # Test suite (607 tests, 34 suites)
|
|
406
|
+
│ ├── unit/ # 33 unit test files
|
|
398
407
|
│ │ ├── validators.test.js # CLI subprocess + in-process coverage tests
|
|
399
|
-
│ │
|
|
408
|
+
│ │ ├── ai-provider-compat.test.js # AI compat tests
|
|
409
|
+
│ │ ├── viepilot-adapters.test.js # Adapter registry tests
|
|
410
|
+
│ │ └── vp-adapter-codex.test.js # Codex adapter tests
|
|
400
411
|
│ └── integration/ # Integration tests
|
|
401
|
-
│ └── workflow.test.js #
|
|
412
|
+
│ └── workflow.test.js # E2E tests
|
|
402
413
|
│
|
|
403
414
|
├── .github/workflows/ # CI/CD
|
|
404
415
|
│ └── ci.yml # Node 18/20/22 matrix
|
|
@@ -419,7 +430,6 @@ viepilot/
|
|
|
419
430
|
│ ├── api-service/ # Express + JWT example
|
|
420
431
|
│ └── cli-tool/ # Node.js CLI example
|
|
421
432
|
│
|
|
422
|
-
├── install.sh # Installation script
|
|
423
433
|
├── Makefile # Developer commands
|
|
424
434
|
├── CHANGELOG.md # Version history
|
|
425
435
|
├── CONTRIBUTING.md # Contribution guide
|
package/bin/viepilot.cjs
CHANGED
|
@@ -21,6 +21,8 @@ const TARGETS = [
|
|
|
21
21
|
{ id: 'claude-code', label: adapterMap['claude-code'].name + ' (default)' },
|
|
22
22
|
{ id: 'cursor-agent', label: 'Cursor Agent' },
|
|
23
23
|
{ id: 'cursor-ide', label: 'Cursor IDE' },
|
|
24
|
+
{ id: 'antigravity', label: adapterMap['antigravity'].name },
|
|
25
|
+
{ id: 'codex', label: adapterMap['codex'].name },
|
|
24
26
|
];
|
|
25
27
|
|
|
26
28
|
function printHelp() {
|
|
@@ -34,14 +36,14 @@ Usage:
|
|
|
34
36
|
viepilot --list-targets
|
|
35
37
|
|
|
36
38
|
Install options:
|
|
37
|
-
--target <id|id,id|all> Target profile(s): claude-code (mirrors vp-* to ~/.claude/skills), cursor-agent, cursor-ide
|
|
39
|
+
--target <id|id,id|all> Target profile(s): claude-code (mirrors vp-* to ~/.claude/skills), cursor-agent, cursor-ide, antigravity, codex
|
|
38
40
|
--yes Non-interactive mode (skip confirmations)
|
|
39
41
|
--dry-run Print actions only (Node installer; no bash)
|
|
40
42
|
--list-targets Print supported targets and exit
|
|
41
43
|
--help Show help
|
|
42
44
|
|
|
43
45
|
Uninstall options:
|
|
44
|
-
--target <id|id,id|all> Remove assets (claude-code: ~/.claude/skills/vp-*; cursor-*: ~/.cursor/skills/vp-*;
|
|
46
|
+
--target <id|id,id|all> Remove assets (claude-code: ~/.claude/skills/vp-*; cursor-*: ~/.cursor/skills/vp-*; antigravity: ~/.antigravity/skills/vp-*; codex: ~/.codex/skills/vp-*)
|
|
45
47
|
--yes Non-interactive mode (skip confirmations)
|
|
46
48
|
--dry-run Print actions only, do not remove files
|
|
47
49
|
`);
|
|
@@ -337,8 +339,14 @@ async function installCommand(rawArgs) {
|
|
|
337
339
|
else console.log(`- ${r.target}: failed (exit ${r.code})`);
|
|
338
340
|
}
|
|
339
341
|
console.log('\nNext actions:');
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
const seenAdapters = new Set();
|
|
343
|
+
for (const target of selectedTargets) {
|
|
344
|
+
const a = adapterMap[target];
|
|
345
|
+
if (a && !seenAdapters.has(a.id)) {
|
|
346
|
+
seenAdapters.add(a.id);
|
|
347
|
+
console.log(`- ${a.name}: ${a.postInstallHint || 'run /vp-status'}`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
342
350
|
console.log('- If needed, run /vp-brainstorm then /vp-crystallize');
|
|
343
351
|
|
|
344
352
|
return failed.length === 0 ? 0 : 1;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Supported Adapters
|
|
2
|
+
|
|
3
|
+
ViePilot supports multiple AI coding platforms via its adapter system (FEAT-013). Each adapter defines where skills and workflows are installed on your machine.
|
|
4
|
+
|
|
5
|
+
## Supported Platforms
|
|
6
|
+
|
|
7
|
+
| Adapter ID | Platform | Skills dir | ViePilot dir | Hooks | Skill syntax |
|
|
8
|
+
|------------|----------|------------|--------------|-------|--------------|
|
|
9
|
+
| `claude-code` | Claude Code *(default)* | `~/.claude/skills/` | `~/.claude/viepilot/` | ✅ Stop, PreToolUse, … | `/vp-status` |
|
|
10
|
+
| `cursor-agent` / `cursor-ide` | Cursor | `~/.cursor/skills/` | `~/.cursor/viepilot/` | — | `/vp-status` |
|
|
11
|
+
| `antigravity` | Google Antigravity | `~/.antigravity/skills/` | `~/.antigravity/viepilot/` | — | `/vp-status` |
|
|
12
|
+
| `codex` | OpenAI Codex CLI | `~/.codex/skills/` | `~/.codex/viepilot/` | — | `$vp-status` |
|
|
13
|
+
|
|
14
|
+
> **Note — Codex invocation syntax:** OpenAI Codex CLI uses `$skill-name` to invoke skills (e.g. `$vp-status`, `$vp-brainstorm`). The `/command` prefix is reserved for Codex built-in controls (`/plan`, `/clear`, `/diff`, etc.). SKILL.md file format is fully compatible — no changes needed to skill content.
|
|
15
|
+
|
|
16
|
+
## Install for a specific platform
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Claude Code (default)
|
|
20
|
+
viepilot install
|
|
21
|
+
|
|
22
|
+
# Cursor Agent
|
|
23
|
+
viepilot install --target cursor-agent
|
|
24
|
+
|
|
25
|
+
# Google Antigravity
|
|
26
|
+
viepilot install --target antigravity
|
|
27
|
+
|
|
28
|
+
# OpenAI Codex CLI
|
|
29
|
+
viepilot install --target codex
|
|
30
|
+
|
|
31
|
+
# Multiple targets at once
|
|
32
|
+
viepilot install --target claude-code,antigravity
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## How path resolution works (ENH-035)
|
|
36
|
+
|
|
37
|
+
Skill source files use the neutral placeholder `{envToolDir}` in `execution_context` blocks:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
@$HOME/{envToolDir}/workflows/autonomous.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
At install time, `{envToolDir}` is replaced with each adapter's `executionContextBase`:
|
|
44
|
+
- `claude-code` → `.claude/viepilot`
|
|
45
|
+
- `cursor` → `.cursor/viepilot`
|
|
46
|
+
- `antigravity` → `.antigravity/viepilot`
|
|
47
|
+
- `codex` → `.codex/viepilot`
|
|
48
|
+
|
|
49
|
+
## Adding a new adapter
|
|
50
|
+
|
|
51
|
+
Create `lib/adapters/{name}.cjs`:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
module.exports = {
|
|
55
|
+
id: 'myplatform',
|
|
56
|
+
name: 'My Platform',
|
|
57
|
+
skillsDir: (home) => path.join(home, '.myplatform', 'skills'),
|
|
58
|
+
viepilotDir: (home) => path.join(home, '.myplatform', 'viepilot'),
|
|
59
|
+
executionContextBase: '.myplatform/viepilot', // {envToolDir} resolves to this
|
|
60
|
+
postInstallHint: 'Open project and run /vp-status', // or $vp-status if platform uses $ prefix
|
|
61
|
+
hooks: { configFile: null, schema: 'myplatform', supportedEvents: [] },
|
|
62
|
+
installSubdirs: ['workflows', 'templates/project', 'templates/phase',
|
|
63
|
+
'templates/architect', 'bin', 'lib', 'ui-components'],
|
|
64
|
+
isAvailable: (home) => fs.existsSync(path.join(home, '.myplatform'))
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Register in `lib/adapters/index.cjs`:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
'myplatform': require('./myplatform.cjs'),
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No `pathRewrite` field needed — `{envToolDir}` substitution is handled automatically.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
id: 'antigravity',
|
|
8
|
+
name: 'Antigravity',
|
|
9
|
+
skillsDir: (home) => path.join(home, '.antigravity', 'skills'),
|
|
10
|
+
viepilotDir: (home) => path.join(home, '.antigravity', 'viepilot'),
|
|
11
|
+
// {envToolDir} in SKILL.md files resolves to this value at install time (ENH-035)
|
|
12
|
+
executionContextBase: '.antigravity/viepilot',
|
|
13
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
14
|
+
postInstallHint: 'Open project and run /vp-status',
|
|
15
|
+
hooks: {
|
|
16
|
+
configFile: null, // Antigravity has no programmatic hooks system
|
|
17
|
+
schema: 'antigravity',
|
|
18
|
+
supportedEvents: []
|
|
19
|
+
},
|
|
20
|
+
installSubdirs: [
|
|
21
|
+
'workflows',
|
|
22
|
+
path.join('templates', 'project'),
|
|
23
|
+
path.join('templates', 'phase'),
|
|
24
|
+
path.join('templates', 'architect'),
|
|
25
|
+
'bin',
|
|
26
|
+
'lib',
|
|
27
|
+
'ui-components'
|
|
28
|
+
],
|
|
29
|
+
isAvailable: (home) => {
|
|
30
|
+
const h = home || os.homedir();
|
|
31
|
+
return fs.existsSync(path.join(h, '.antigravity'));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -11,8 +11,8 @@ module.exports = {
|
|
|
11
11
|
viepilotDir: (home) => path.join(home, '.claude', 'viepilot'),
|
|
12
12
|
// execution_context base for skill .md files
|
|
13
13
|
executionContextBase: '.claude/viepilot',
|
|
14
|
-
//
|
|
15
|
-
|
|
14
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
15
|
+
postInstallHint: 'Restart session so ~/.claude/skills/vp-* is picked up; then /vp-status',
|
|
16
16
|
// Hooks configuration (Claude Code settings.json)
|
|
17
17
|
hooks: {
|
|
18
18
|
configFile: (home) => path.join(home, '.claude', 'settings.json'),
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
id: 'codex',
|
|
8
|
+
name: 'Codex',
|
|
9
|
+
skillsDir: (home) => path.join(home, '.codex', 'skills'),
|
|
10
|
+
viepilotDir: (home) => path.join(home, '.codex', 'viepilot'),
|
|
11
|
+
// {envToolDir} in SKILL.md files resolves to this value at install time (ENH-035)
|
|
12
|
+
executionContextBase: '.codex/viepilot',
|
|
13
|
+
// NOTE: Codex uses $skill-name syntax (not /skill-name like other adapters)
|
|
14
|
+
// Codex reserves /command for built-in system controls (/plan, /clear, /diff, etc.)
|
|
15
|
+
postInstallHint: 'Open project and type $vp-status to get started',
|
|
16
|
+
hooks: {
|
|
17
|
+
configFile: null, // Codex uses AGENTS.md convention, not programmatic hooks
|
|
18
|
+
schema: 'codex',
|
|
19
|
+
supportedEvents: []
|
|
20
|
+
},
|
|
21
|
+
installSubdirs: [
|
|
22
|
+
'workflows',
|
|
23
|
+
path.join('templates', 'project'),
|
|
24
|
+
path.join('templates', 'phase'),
|
|
25
|
+
path.join('templates', 'architect'),
|
|
26
|
+
'bin',
|
|
27
|
+
'lib',
|
|
28
|
+
'ui-components'
|
|
29
|
+
],
|
|
30
|
+
isAvailable: (home) => {
|
|
31
|
+
const h = home || os.homedir();
|
|
32
|
+
return fs.existsSync(path.join(h, '.codex'));
|
|
33
|
+
}
|
|
34
|
+
};
|
package/lib/adapters/cursor.cjs
CHANGED
|
@@ -9,7 +9,8 @@ module.exports = {
|
|
|
9
9
|
skillsDir: (home) => path.join(home, '.cursor', 'skills'),
|
|
10
10
|
viepilotDir: (home) => path.join(home, '.cursor', 'viepilot'),
|
|
11
11
|
executionContextBase: '.cursor/viepilot',
|
|
12
|
-
|
|
12
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
13
|
+
postInstallHint: 'Open project and run /vp-status',
|
|
13
14
|
hooks: {
|
|
14
15
|
configFile: null, // Cursor uses .cursorrules/MDC, not settings.json hooks
|
|
15
16
|
schema: 'cursor',
|
package/lib/adapters/index.cjs
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
const adapters = {
|
|
3
3
|
'claude-code': require('./claude-code.cjs'),
|
|
4
4
|
'cursor': require('./cursor.cjs'),
|
|
5
|
-
'cursor-agent': require('./cursor.cjs'),
|
|
6
|
-
'cursor-ide': require('./cursor.cjs'),
|
|
5
|
+
'cursor-agent': require('./cursor.cjs'), // alias
|
|
6
|
+
'cursor-ide': require('./cursor.cjs'), // alias
|
|
7
|
+
'antigravity': require('./antigravity.cjs'),
|
|
8
|
+
'codex': require('./codex.cjs'),
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
/**
|
package/lib/viepilot-install.cjs
CHANGED
|
@@ -199,16 +199,14 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
|
|
|
199
199
|
steps.push({ kind: 'chmod', path: path.join(vpDir, 'bin', f), mode: 0o755 });
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
//
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
});
|
|
211
|
-
}
|
|
202
|
+
// resolve {envToolDir} placeholder → adapter's actual install base (ENH-035)
|
|
203
|
+
steps.push({
|
|
204
|
+
kind: 'rewrite_paths_in_dir',
|
|
205
|
+
dir: skillsDir,
|
|
206
|
+
glob: '**/*.md',
|
|
207
|
+
from: '{envToolDir}',
|
|
208
|
+
to: adapter.executionContextBase,
|
|
209
|
+
});
|
|
212
210
|
}
|
|
213
211
|
|
|
214
212
|
steps.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viepilot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "**Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -44,8 +44,6 @@
|
|
|
44
44
|
"workflows/",
|
|
45
45
|
"templates/",
|
|
46
46
|
"ui-components/",
|
|
47
|
-
"install.sh",
|
|
48
|
-
"dev-install.sh",
|
|
49
47
|
"README.md",
|
|
50
48
|
"CHANGELOG.md",
|
|
51
49
|
"LICENSE",
|
package/skills/vp-audit/SKILL.md
CHANGED
|
@@ -72,7 +72,7 @@ Auto-detects if running inside the viepilot framework repo to enable framework-s
|
|
|
72
72
|
</objective>
|
|
73
73
|
|
|
74
74
|
<execution_context>
|
|
75
|
-
@$HOME
|
|
75
|
+
@$HOME/{envToolDir}/workflows/audit.md
|
|
76
76
|
</execution_context>
|
|
77
77
|
|
|
78
78
|
<context>
|
|
@@ -89,7 +89,7 @@ Optional flags:
|
|
|
89
89
|
</context>
|
|
90
90
|
|
|
91
91
|
<process>
|
|
92
|
-
Execute workflow from `@$HOME
|
|
92
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/audit.md`
|
|
93
93
|
|
|
94
94
|
### Quick Summary
|
|
95
95
|
|
package/skills/vp-auto/SKILL.md
CHANGED
|
@@ -96,7 +96,7 @@ If required task details are missing, do not implement until task contract is re
|
|
|
96
96
|
</objective>
|
|
97
97
|
|
|
98
98
|
<execution_context>
|
|
99
|
-
@$HOME
|
|
99
|
+
@$HOME/{envToolDir}/workflows/autonomous.md
|
|
100
100
|
</execution_context>
|
|
101
101
|
|
|
102
102
|
<context>
|
|
@@ -119,7 +119,7 @@ See preflight check in `workflows/autonomous.md` → “Preflight: Task Paths Va
|
|
|
119
119
|
</context>
|
|
120
120
|
|
|
121
121
|
<process>
|
|
122
|
-
Execute workflow from `@$HOME
|
|
122
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/autonomous.md`
|
|
123
123
|
|
|
124
124
|
### 1. Initialize
|
|
125
125
|
```bash
|
|
@@ -61,7 +61,7 @@ Supports:
|
|
|
61
61
|
</objective>
|
|
62
62
|
|
|
63
63
|
<execution_context>
|
|
64
|
-
@$HOME
|
|
64
|
+
@$HOME/{envToolDir}/workflows/brainstorm.md
|
|
65
65
|
</execution_context>
|
|
66
66
|
|
|
67
67
|
<context>
|
|
@@ -75,7 +75,7 @@ Optional flags:
|
|
|
75
75
|
</context>
|
|
76
76
|
|
|
77
77
|
<process>
|
|
78
|
-
Execute workflow from `@$HOME
|
|
78
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/brainstorm.md`
|
|
79
79
|
|
|
80
80
|
Key steps:
|
|
81
81
|
1. Detect existing sessions
|
|
@@ -80,12 +80,12 @@ Convert brainstorm sessions into structured artifacts for autonomous AI executio
|
|
|
80
80
|
</objective>
|
|
81
81
|
|
|
82
82
|
<execution_context>
|
|
83
|
-
@$HOME
|
|
84
|
-
@$HOME
|
|
83
|
+
@$HOME/{envToolDir}/workflows/crystallize.md
|
|
84
|
+
@$HOME/{envToolDir}/templates/project/
|
|
85
85
|
</execution_context>
|
|
86
86
|
|
|
87
87
|
<process>
|
|
88
|
-
Execute workflow from `@$HOME
|
|
88
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/crystallize.md`
|
|
89
89
|
|
|
90
90
|
Key steps:
|
|
91
91
|
|
package/skills/vp-debug/SKILL.md
CHANGED
|
@@ -50,7 +50,7 @@ Systematic debugging with persistent state tracking. Helps track issues across m
|
|
|
50
50
|
</objective>
|
|
51
51
|
|
|
52
52
|
<execution_context>
|
|
53
|
-
@$HOME
|
|
53
|
+
@$HOME/{envToolDir}/workflows/debug.md
|
|
54
54
|
</execution_context>
|
|
55
55
|
|
|
56
56
|
<context>
|
|
@@ -63,7 +63,7 @@ Optional flags:
|
|
|
63
63
|
</context>
|
|
64
64
|
|
|
65
65
|
<process>
|
|
66
|
-
Execute workflow from `@$HOME
|
|
66
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/debug.md`
|
|
67
67
|
|
|
68
68
|
### Debug Session Structure
|
|
69
69
|
```json
|
package/skills/vp-docs/SKILL.md
CHANGED
package/skills/vp-info/SKILL.md
CHANGED
package/skills/vp-pause/SKILL.md
CHANGED
|
@@ -41,11 +41,11 @@ Save complete work state so it can be resumed from any context.
|
|
|
41
41
|
</objective>
|
|
42
42
|
|
|
43
43
|
<execution_context>
|
|
44
|
-
@$HOME
|
|
44
|
+
@$HOME/{envToolDir}/workflows/pause-work.md
|
|
45
45
|
</execution_context>
|
|
46
46
|
|
|
47
47
|
<process>
|
|
48
|
-
Execute workflow from `@$HOME
|
|
48
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/pause-work.md`
|
|
49
49
|
|
|
50
50
|
### Step 1: Detect Current Position
|
|
51
51
|
```bash
|
|
@@ -49,7 +49,7 @@ Create and manage requests for the project under development:
|
|
|
49
49
|
</objective>
|
|
50
50
|
|
|
51
51
|
<execution_context>
|
|
52
|
-
@$HOME
|
|
52
|
+
@$HOME/{envToolDir}/workflows/request.md
|
|
53
53
|
</execution_context>
|
|
54
54
|
|
|
55
55
|
<context>
|
|
@@ -64,7 +64,7 @@ Optional flags:
|
|
|
64
64
|
</context>
|
|
65
65
|
|
|
66
66
|
<process>
|
|
67
|
-
Execute workflow from `@$HOME
|
|
67
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/request.md`
|
|
68
68
|
|
|
69
69
|
### Step 1: Detect Request Type
|
|
70
70
|
|
|
@@ -41,11 +41,11 @@ Restore complete project context and resume work seamlessly.
|
|
|
41
41
|
</objective>
|
|
42
42
|
|
|
43
43
|
<execution_context>
|
|
44
|
-
@$HOME
|
|
44
|
+
@$HOME/{envToolDir}/workflows/resume-work.md
|
|
45
45
|
</execution_context>
|
|
46
46
|
|
|
47
47
|
<process>
|
|
48
|
-
Execute workflow from `@$HOME
|
|
48
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/resume-work.md`
|
|
49
49
|
|
|
50
50
|
### Step 1: Check Project Exists
|
|
51
51
|
```bash
|
|
@@ -45,7 +45,7 @@ Sources can come from prompt/link/snippet (especially 21st.dev), then normalized
|
|
|
45
45
|
</objective>
|
|
46
46
|
|
|
47
47
|
<execution_context>
|
|
48
|
-
@$HOME
|
|
48
|
+
@$HOME/{envToolDir}/workflows/ui-components.md
|
|
49
49
|
</execution_context>
|
|
50
50
|
|
|
51
51
|
<context>
|
|
@@ -58,7 +58,7 @@ Optional flags:
|
|
|
58
58
|
</context>
|
|
59
59
|
|
|
60
60
|
<process>
|
|
61
|
-
Execute workflow from `@$HOME
|
|
61
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/ui-components.md`
|
|
62
62
|
|
|
63
63
|
Key steps:
|
|
64
64
|
1. Prepare global + local component stores
|
package/workflows/autonomous.md
CHANGED
|
@@ -134,6 +134,25 @@ FOR EACH path in ## Paths:
|
|
|
134
134
|
This check fires on `~/`, `~\`, and any path starting with `/`.
|
|
135
135
|
It does NOT fire on paths inside code block content within the task (only the `## Paths` header block is validated).
|
|
136
136
|
|
|
137
|
+
#### ⛔ PATH RESOLUTION RULE (BUG-012)
|
|
138
|
+
|
|
139
|
+
**All file reads and edits during task execution MUST be resolved from `{cwd}`** — the repository root where `package.json` lives (e.g. `/Users/.../my-project/`).
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
WHEN executing a task with:
|
|
143
|
+
## Paths
|
|
144
|
+
workflows/brainstorm.md
|
|
145
|
+
|
|
146
|
+
→ Read and edit: {cwd}/workflows/brainstorm.md
|
|
147
|
+
→ NEVER: ~/.claude/viepilot/workflows/brainstorm.md
|
|
148
|
+
→ NEVER: ~/.cursor/viepilot/workflows/brainstorm.md
|
|
149
|
+
→ NEVER: any path outside {cwd}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Rule**: If a file exists at both `{cwd}/workflows/foo.md` (codebase) and `~/.claude/viepilot/workflows/foo.md` (production install), **ALWAYS use the `{cwd}` copy**.
|
|
153
|
+
|
|
154
|
+
The install directory (`~/.claude/`, `~/.cursor/`) is a **deployment artifact** — it is populated by `dev-install.sh`. Editing it directly bypasses version control and will be silently overwritten on the next install.
|
|
155
|
+
|
|
137
156
|
### ViePilot Skill Scope Policy (BUG-004 baseline)
|
|
138
157
|
- **Default mode**: only reference/route skills in the ViePilot namespace (`vp-*`).
|
|
139
158
|
- **External skills** (`non vp-*`) are out of scope by default and must not be suggested implicitly.
|
|
@@ -214,6 +233,16 @@ Ensure `PHASE-STATE.md` already shows current task `in_progress` (set during the
|
|
|
214
233
|
git commit -m "{type}({scope}): {description}"
|
|
215
234
|
git push
|
|
216
235
|
```
|
|
236
|
+
|
|
237
|
+
⛔ **GITIGNORE-AWARE STAGING RULE (BUG-013)**: Before staging any file, verify it is
|
|
238
|
+
not gitignored. NEVER stage or commit gitignored files — they are internal state, not
|
|
239
|
+
shipping artifacts.
|
|
240
|
+
```bash
|
|
241
|
+
# Check before staging:
|
|
242
|
+
git check-ignore -q {file} && echo "IGNORED — skip" || git add {file}
|
|
243
|
+
```
|
|
244
|
+
`.viepilot/` is ALWAYS gitignored in ViePilot repos. **Never run `git add .viepilot/`.**
|
|
245
|
+
|
|
217
246
|
8. Log notes in task file after each sub-task
|
|
218
247
|
|
|
219
248
|
#### Verify Task
|
|
@@ -238,6 +267,9 @@ Before marking a task PASS, require durable git persistence:
|
|
|
238
267
|
```bash
|
|
239
268
|
# Must have no unstaged/staged residue for this task
|
|
240
269
|
git status --porcelain
|
|
270
|
+
# NOTE (BUG-013): lines starting with "??" are UNTRACKED files — NOT a dirty state.
|
|
271
|
+
# Porcelain is CLEAN when output is empty OR contains only "??" lines.
|
|
272
|
+
# Gitignored files (e.g. .viepilot/) must never be staged, so they appear as ?? here.
|
|
241
273
|
|
|
242
274
|
# Must track an upstream branch
|
|
243
275
|
git rev-parse --abbrev-ref --symbolic-full-name @{u}
|
package/workflows/brainstorm.md
CHANGED
|
@@ -413,7 +413,7 @@ Display a confirmation dialogue when any of the following conditions occur:
|
|
|
413
413
|
...
|
|
414
414
|
|
|
415
415
|
What would you like to do?
|
|
416
|
-
1. Save to ui-direction/notes.md (background extraction)
|
|
416
|
+
1. Save to .viepilot/ui-direction/{session-id}/notes.md (background extraction)
|
|
417
417
|
2. Save + activate UI Direction Mode to generate HTML direction
|
|
418
418
|
3. Discard and continue brainstorming
|
|
419
419
|
```
|
package/workflows/crystallize.md
CHANGED
|
@@ -140,6 +140,11 @@ If gaps found → ask user to clarify or return to brainstorm.
|
|
|
140
140
|
<step name="consume_ui_direction">
|
|
141
141
|
## Step 1A: Consume UI Direction Artifacts (for UI/UX projects)
|
|
142
142
|
|
|
143
|
+
> ⛔ **PATH GUARD (BUG-011):** The ONLY valid ui-direction path is `.viepilot/ui-direction/`.
|
|
144
|
+
> If a `{root}/ui-direction/` directory exists at the project root — **IGNORE it completely**.
|
|
145
|
+
> It is user-managed reference material, NOT ViePilot artifacts.
|
|
146
|
+
> Never read, glob, or reference any file under `{root}/ui-direction/` in this workflow.
|
|
147
|
+
|
|
143
148
|
### UI Scope Detection (ENH-026 hard gate)
|
|
144
149
|
|
|
145
150
|
Before checking for artifacts, scan brainstorm session files (`docs/brainstorm/session-*.md`) for UI signal keywords:
|
package/workflows/evolve.md
CHANGED
|
@@ -135,6 +135,8 @@ If unsure of the repo-relative path, inspect:
|
|
|
135
135
|
- `ls bin/` → CLI files
|
|
136
136
|
- `ls templates/` → template files
|
|
137
137
|
|
|
138
|
+
**Resolution rule (BUG-012):** Paths in `## Paths` are always resolved from `{cwd}` (the repo root where `package.json` lives) — never from `~/.claude/`, `~/.cursor/`, or any install directory. When both a codebase copy and an installed copy exist, `{cwd}` wins.
|
|
139
|
+
|
|
138
140
|
### Create Phase Directory
|
|
139
141
|
```bash
|
|
140
142
|
mkdir -p .viepilot/phases/{NN}-{feature-slug}/tasks/
|
package/dev-install.sh
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# ViePilot Development Installation Script
|
|
4
|
-
# Installs development build without symlink dependency by default
|
|
5
|
-
#
|
|
6
|
-
# Optional env vars:
|
|
7
|
-
# VIEPILOT_ADAPTER — target platform: claude-code (default), cursor, cursor-agent, cursor-ide
|
|
8
|
-
# VIEPILOT_INSTALL_PROFILE — backward-compat alias for VIEPILOT_ADAPTER
|
|
9
|
-
# VIEPILOT_AUTO_YES — skip confirmation prompt (set to 1)
|
|
10
|
-
# VIEPILOT_SYMLINK_SKILLS=1 — symlink each skills/vp-* instead of copy
|
|
11
|
-
|
|
12
|
-
set -e
|
|
13
|
-
|
|
14
|
-
# Colors
|
|
15
|
-
RED='\033[0;31m'
|
|
16
|
-
GREEN='\033[0;32m'
|
|
17
|
-
YELLOW='\033[1;33m'
|
|
18
|
-
BLUE='\033[0;34m'
|
|
19
|
-
NC='\033[0m'
|
|
20
|
-
|
|
21
|
-
# Get script directory (project root)
|
|
22
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
23
|
-
AUTO_YES="${VIEPILOT_AUTO_YES:-0}"
|
|
24
|
-
|
|
25
|
-
# Backward compat: VIEPILOT_INSTALL_PROFILE accepted as alias for VIEPILOT_ADAPTER
|
|
26
|
-
ADAPTER="${VIEPILOT_ADAPTER:-${VIEPILOT_INSTALL_PROFILE:-claude-code}}"
|
|
27
|
-
|
|
28
|
-
case "$ADAPTER" in
|
|
29
|
-
claude-code)
|
|
30
|
-
SKILLS_DIR="$HOME/.claude/skills"
|
|
31
|
-
VIEPILOT_DIR="$HOME/.claude/viepilot"
|
|
32
|
-
PROFILE_LABEL="Claude Code"
|
|
33
|
-
;;
|
|
34
|
-
cursor|cursor-agent|cursor-ide)
|
|
35
|
-
SKILLS_DIR="$HOME/.cursor/skills"
|
|
36
|
-
VIEPILOT_DIR="$HOME/.cursor/viepilot"
|
|
37
|
-
PROFILE_LABEL="Cursor"
|
|
38
|
-
;;
|
|
39
|
-
*)
|
|
40
|
-
echo "Unknown adapter: $ADAPTER. Use: claude-code (default), cursor-agent, cursor-ide"
|
|
41
|
-
exit 1
|
|
42
|
-
;;
|
|
43
|
-
esac
|
|
44
|
-
|
|
45
|
-
echo -e "${BLUE}"
|
|
46
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
47
|
-
echo " VIEPILOT DEV INSTALLER"
|
|
48
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
49
|
-
echo -e "${NC}"
|
|
50
|
-
|
|
51
|
-
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
52
|
-
echo -e "${YELLOW}Development mode installation (skills: SYMLINK → repo)${NC}"
|
|
53
|
-
else
|
|
54
|
-
echo -e "${YELLOW}Development mode installation (copy-first for reliability)${NC}"
|
|
55
|
-
fi
|
|
56
|
-
echo " Source: $SCRIPT_DIR"
|
|
57
|
-
echo " Skills: $SKILLS_DIR"
|
|
58
|
-
echo " Viepilot: $VIEPILOT_DIR"
|
|
59
|
-
echo " Adapter: $ADAPTER ($PROFILE_LABEL)"
|
|
60
|
-
echo ""
|
|
61
|
-
|
|
62
|
-
check_cloc_dependency() {
|
|
63
|
-
if command -v cloc >/dev/null 2>&1; then
|
|
64
|
-
echo -e " ${GREEN}✓${NC} cloc detected"
|
|
65
|
-
return 0
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
echo -e "${YELLOW} cloc not found.${NC}"
|
|
69
|
-
echo " README LOC auto-sync will fallback safely, but metrics won't refresh automatically."
|
|
70
|
-
echo " Install suggestion:"
|
|
71
|
-
echo " - macOS: brew install cloc"
|
|
72
|
-
echo " - Ubuntu/Debian: sudo apt-get install -y cloc"
|
|
73
|
-
echo " - Windows: choco install cloc"
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
# Confirm
|
|
77
|
-
if [ "$AUTO_YES" != "1" ]; then
|
|
78
|
-
read -p "This will replace existing installation with dev files. Continue? (y/n) " -n 1 -r
|
|
79
|
-
echo
|
|
80
|
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
81
|
-
echo "Installation cancelled."
|
|
82
|
-
exit 0
|
|
83
|
-
fi
|
|
84
|
-
else
|
|
85
|
-
echo "Auto-yes enabled via VIEPILOT_AUTO_YES=1"
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
echo ""
|
|
89
|
-
echo -e "${BLUE}Removing old installations...${NC}"
|
|
90
|
-
|
|
91
|
-
# Remove old skill installations
|
|
92
|
-
for skill in "$SKILLS_DIR"/vp-*/; do
|
|
93
|
-
if [ -d "$skill" ] || [ -L "$skill" ]; then
|
|
94
|
-
rm -rf "$skill"
|
|
95
|
-
echo " Removed: $(basename "$skill")"
|
|
96
|
-
fi
|
|
97
|
-
done
|
|
98
|
-
|
|
99
|
-
# Remove old viepilot installation
|
|
100
|
-
if [ -d "$VIEPILOT_DIR" ] || [ -L "$VIEPILOT_DIR" ]; then
|
|
101
|
-
rm -rf "$VIEPILOT_DIR"
|
|
102
|
-
echo " Removed: viepilot/"
|
|
103
|
-
fi
|
|
104
|
-
|
|
105
|
-
echo ""
|
|
106
|
-
echo -e "${BLUE}Installing skills...${NC}"
|
|
107
|
-
|
|
108
|
-
# Install skills: copy (default) or symlink when VIEPILOT_SYMLINK_SKILLS=1
|
|
109
|
-
mkdir -p "$SKILLS_DIR"
|
|
110
|
-
for skill in "$SCRIPT_DIR"/skills/vp-*/; do
|
|
111
|
-
skill_name=$(basename "$skill")
|
|
112
|
-
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
113
|
-
if command -v realpath >/dev/null 2>&1; then
|
|
114
|
-
skill_abs=$(realpath "$skill")
|
|
115
|
-
else
|
|
116
|
-
skill_abs=$(cd "$skill" && pwd)
|
|
117
|
-
fi
|
|
118
|
-
ln -sfn "$skill_abs" "$SKILLS_DIR/$skill_name"
|
|
119
|
-
echo -e " ${GREEN}✓${NC} $skill_name (symlink)"
|
|
120
|
-
else
|
|
121
|
-
cp -R "$skill" "$SKILLS_DIR/$skill_name"
|
|
122
|
-
echo -e " ${GREEN}✓${NC} $skill_name"
|
|
123
|
-
fi
|
|
124
|
-
done
|
|
125
|
-
|
|
126
|
-
echo ""
|
|
127
|
-
echo -e "${BLUE}Installing viepilot files...${NC}"
|
|
128
|
-
|
|
129
|
-
# Install file copies (avoid symlink discovery issues)
|
|
130
|
-
mkdir -p "$VIEPILOT_DIR"
|
|
131
|
-
mkdir -p "$VIEPILOT_DIR/workflows"
|
|
132
|
-
mkdir -p "$VIEPILOT_DIR/templates"
|
|
133
|
-
mkdir -p "$VIEPILOT_DIR/bin"
|
|
134
|
-
mkdir -p "$VIEPILOT_DIR/lib"
|
|
135
|
-
mkdir -p "$VIEPILOT_DIR/ui-components"
|
|
136
|
-
|
|
137
|
-
cp -R "$SCRIPT_DIR/workflows/"* "$VIEPILOT_DIR/workflows/"
|
|
138
|
-
cp -R "$SCRIPT_DIR/templates/"* "$VIEPILOT_DIR/templates/"
|
|
139
|
-
cp -R "$SCRIPT_DIR/bin/"* "$VIEPILOT_DIR/bin/"
|
|
140
|
-
cp -R "$SCRIPT_DIR/lib/"* "$VIEPILOT_DIR/lib/"
|
|
141
|
-
if [ -d "$SCRIPT_DIR/ui-components" ]; then
|
|
142
|
-
cp -R "$SCRIPT_DIR/ui-components/"* "$VIEPILOT_DIR/ui-components/"
|
|
143
|
-
fi
|
|
144
|
-
|
|
145
|
-
echo -e " ${GREEN}✓${NC} workflows"
|
|
146
|
-
echo -e " ${GREEN}✓${NC} templates"
|
|
147
|
-
echo -e " ${GREEN}✓${NC} bin"
|
|
148
|
-
echo -e " ${GREEN}✓${NC} lib"
|
|
149
|
-
echo -e " ${GREEN}✓${NC} ui-components"
|
|
150
|
-
check_cloc_dependency
|
|
151
|
-
|
|
152
|
-
# Count installed
|
|
153
|
-
SKILL_COUNT=$(ls -d "$SKILLS_DIR"/vp-*/ 2>/dev/null | wc -l | tr -d ' ')
|
|
154
|
-
WORKFLOW_COUNT=$(ls "$SCRIPT_DIR"/workflows/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
155
|
-
|
|
156
|
-
echo ""
|
|
157
|
-
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
158
|
-
echo -e "${GREEN} DEV INSTALLATION COMPLETE ✓${NC}"
|
|
159
|
-
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
160
|
-
echo ""
|
|
161
|
-
if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
|
|
162
|
-
echo "Installed (skills symlink mode):"
|
|
163
|
-
echo -e "${YELLOW}Skills point at repo — edits in $SCRIPT_DIR/skills/ are live.${NC}"
|
|
164
|
-
else
|
|
165
|
-
echo "Installed (copy mode):"
|
|
166
|
-
echo -e "${YELLOW}Development mode enabled (reliable copy mode).${NC}"
|
|
167
|
-
echo "Re-run this script after local changes to refresh installed files."
|
|
168
|
-
fi
|
|
169
|
-
echo " - Skills: $SKILL_COUNT"
|
|
170
|
-
echo " - Workflows: $WORKFLOW_COUNT"
|
|
171
|
-
echo ""
|
package/install.sh
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# ViePilot installation — thin wrapper around the Node installer (bin/viepilot.cjs).
|
|
4
|
-
# Implements prompts + optional cloc install here; file copy/symlink/chmod/path is in lib/viepilot-install.cjs.
|
|
5
|
-
#
|
|
6
|
-
# Optional: VIEPILOT_SYMLINK_SKILLS=1 — passed through to Node (symlink skills into ~/.cursor/skills/)
|
|
7
|
-
# Optional: VIEPILOT_INSTALL_DRY_RUN=1 — runs `viepilot install --dry-run` (for CI/tests)
|
|
8
|
-
|
|
9
|
-
set -e
|
|
10
|
-
|
|
11
|
-
RED='\033[0;31m'
|
|
12
|
-
GREEN='\033[0;32m'
|
|
13
|
-
YELLOW='\033[1;33m'
|
|
14
|
-
BLUE='\033[0;34m'
|
|
15
|
-
NC='\033[0m'
|
|
16
|
-
|
|
17
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
|
-
cd "$SCRIPT_DIR" || exit 1
|
|
19
|
-
|
|
20
|
-
CURSOR_SKILLS_DIR="$HOME/.cursor/skills"
|
|
21
|
-
VIEPILOT_DIR="$HOME/.cursor/viepilot"
|
|
22
|
-
AUTO_YES="${VIEPILOT_AUTO_YES:-0}"
|
|
23
|
-
INSTALL_PROFILE="${VIEPILOT_INSTALL_PROFILE:-cursor-ide}"
|
|
24
|
-
ADD_PATH_CHOICE="${VIEPILOT_ADD_PATH:-0}"
|
|
25
|
-
|
|
26
|
-
echo -e "${BLUE}"
|
|
27
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
28
|
-
echo " VIEPILOT INSTALLER"
|
|
29
|
-
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
30
|
-
echo -e "${NC}"
|
|
31
|
-
|
|
32
|
-
if [ ! -f "$SCRIPT_DIR/README.md" ] || [ ! -d "$SCRIPT_DIR/skills" ]; then
|
|
33
|
-
echo -e "${RED}Error: Please run this script from the viepilot directory${NC}"
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
|
|
37
|
-
echo -e "${YELLOW}Installation paths:${NC}"
|
|
38
|
-
echo " Skills: $CURSOR_SKILLS_DIR"
|
|
39
|
-
echo " ViePilot: $VIEPILOT_DIR"
|
|
40
|
-
echo " Profile: $INSTALL_PROFILE"
|
|
41
|
-
echo " Engine: Node (bin/viepilot.cjs) — no bash copy logic"
|
|
42
|
-
echo ""
|
|
43
|
-
|
|
44
|
-
install_cloc_best_effort() {
|
|
45
|
-
if command -v cloc >/dev/null 2>&1; then
|
|
46
|
-
echo " ✓ cloc detected"
|
|
47
|
-
return 0
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
echo -e "${YELLOW} cloc not found.${NC}"
|
|
51
|
-
echo " README metric auto-sync can still run with fallback, but LOC refresh will be skipped."
|
|
52
|
-
echo " Suggested install:"
|
|
53
|
-
echo " - macOS: brew install cloc"
|
|
54
|
-
echo " - Ubuntu/Debian: sudo apt-get install -y cloc"
|
|
55
|
-
echo " - Windows: choco install cloc"
|
|
56
|
-
|
|
57
|
-
if [ "$AUTO_YES" = "1" ]; then
|
|
58
|
-
return 0
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
read -p " Attempt automatic cloc install now (best effort)? (y/n) " -n 1 -r
|
|
62
|
-
echo
|
|
63
|
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
64
|
-
return 0
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
if command -v brew >/dev/null 2>&1; then
|
|
68
|
-
brew install cloc || true
|
|
69
|
-
elif command -v apt-get >/dev/null 2>&1; then
|
|
70
|
-
sudo apt-get update && sudo apt-get install -y cloc || true
|
|
71
|
-
elif command -v dnf >/dev/null 2>&1; then
|
|
72
|
-
sudo dnf install -y cloc || true
|
|
73
|
-
elif command -v yum >/dev/null 2>&1; then
|
|
74
|
-
sudo yum install -y cloc || true
|
|
75
|
-
elif command -v pacman >/dev/null 2>&1; then
|
|
76
|
-
sudo pacman -Sy --noconfirm cloc || true
|
|
77
|
-
else
|
|
78
|
-
echo -e "${YELLOW} Could not detect supported package manager. Install cloc manually.${NC}"
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
if command -v cloc >/dev/null 2>&1; then
|
|
82
|
-
echo " ✓ cloc installed"
|
|
83
|
-
else
|
|
84
|
-
echo -e "${YELLOW} cloc is still unavailable; continuing without blocking installation.${NC}"
|
|
85
|
-
fi
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if [ "$AUTO_YES" != "1" ]; then
|
|
89
|
-
read -p "Continue with installation? (y/n) " -n 1 -r
|
|
90
|
-
echo
|
|
91
|
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
92
|
-
echo "Installation cancelled."
|
|
93
|
-
exit 0
|
|
94
|
-
fi
|
|
95
|
-
else
|
|
96
|
-
echo "Auto-yes enabled via VIEPILOT_AUTO_YES=1"
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
echo ""
|
|
100
|
-
echo -e "${BLUE}Preparing Node installer...${NC}"
|
|
101
|
-
install_cloc_best_effort
|
|
102
|
-
|
|
103
|
-
echo ""
|
|
104
|
-
if [ "$AUTO_YES" != "1" ]; then
|
|
105
|
-
read -p "Add vp-tools + viepilot to PATH? (symlinks via Node installer, often /usr/local/bin) (y/n) " -n 1 -r
|
|
106
|
-
echo
|
|
107
|
-
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
108
|
-
export VIEPILOT_ADD_PATH=1
|
|
109
|
-
fi
|
|
110
|
-
else
|
|
111
|
-
if [ "$ADD_PATH_CHOICE" = "1" ]; then
|
|
112
|
-
export VIEPILOT_ADD_PATH=1
|
|
113
|
-
fi
|
|
114
|
-
fi
|
|
115
|
-
|
|
116
|
-
export VIEPILOT_AUTO_YES=1
|
|
117
|
-
|
|
118
|
-
NODE_ARGS=(install --target "$INSTALL_PROFILE" --yes)
|
|
119
|
-
if [ "${VIEPILOT_INSTALL_DRY_RUN:-0}" = "1" ]; then
|
|
120
|
-
NODE_ARGS+=(--dry-run)
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
echo ""
|
|
124
|
-
echo -e "${BLUE}Running: node bin/viepilot.cjs ${NODE_ARGS[*]}${NC}"
|
|
125
|
-
exec node "$SCRIPT_DIR/bin/viepilot.cjs" "${NODE_ARGS[@]}"
|