viepilot 1.9.2 → 1.9.4
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 +16 -0
- package/README.md +9 -9
- package/bin/viepilot.cjs +21 -6
- package/docs/README.md +4 -3
- package/docs/getting-started.md +4 -0
- package/docs/skills-reference.md +2 -2
- package/docs/user/claude-code-setup.md +144 -0
- package/docs/user/faq.md +11 -4
- package/docs/user/features/autonomous-mode.md +7 -0
- package/docs/user/quick-start.md +2 -0
- package/lib/viepilot-install.cjs +28 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
15
15
|
|
|
16
16
|
- None yet.
|
|
17
17
|
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- None yet.
|
|
21
|
+
|
|
22
|
+
## [1.9.4] - 2026-04-02
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **Installer / Claude Code** — `npx viepilot install --target claude-code` giờ **copy** (hoặc symlink nếu `VIEPILOT_SYMLINK_SKILLS=1`) toàn bộ `skills/vp-*` vào **`~/.claude/skills/`**, không chỉ `~/.cursor/skills/`. `uninstall --target claude-code` gỡ `~/.claude/skills/vp-*`. (`lib/viepilot-install.cjs`, `bin/viepilot.cjs`; tests + `docs/user/claude-code-setup.md`, FAQ).
|
|
27
|
+
|
|
28
|
+
## [1.9.3] - 2026-04-02
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **M1.29 / Phase 34 (FEAT-001)** — Hướng dẫn ViePilot trên **Claude Code**: `docs/user/claude-code-setup.md` (installer `npx viepilot install --target claude-code`, map `vp-*` → `~/.claude/skills`, `vp-tools info`, chuỗi request → evolve → auto); cross-links trong `docs/getting-started.md`, `docs/user/quick-start.md`, `docs/user/faq.md`, `docs/README.md`; `tests/unit/vp-feat001-claude-code-docs-contracts.test.js`; README test metrics **299** / **15** suites.
|
|
33
|
+
|
|
18
34
|
## [1.9.2] - 2026-04-03
|
|
19
35
|
|
|
20
36
|
### Changed
|
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 **1.9.
|
|
13
|
+
**Versioning:** Shield **1.9.4** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.9.4**) 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 | **~27,
|
|
31
|
+
| Total LOC | **~27,779+** (`.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 | **304** (15 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009 + FEAT-010 + ENH-021 routing + FEAT-001 Claude Code docs + viepilot-info/update/install) |
|
|
37
|
+
| ViePilot phases (local `.viepilot`) | **34** phase cycles — **M1.29** FEAT-001 (**v1.9.3** doc); patch **v1.9.4** (Claude installer); **M1.28** FEAT-010 (**v1.9.1**); **v1.9.2** (ENH-019~021); **M1.27** (**v1.9.0** FEAT-009); 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 | 15 | Jest: 14 unit + 1 integration (contracts, installer + Claude paths, info/update, FEAT-009, FEAT-010, FEAT-001, ENH-021, 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: ████████████████████ ~98% ✅ Latest **v1.9.
|
|
58
|
+
Tổng thể / Overall: ████████████████████ ~98% ✅ Latest **v1.9.4** (Claude Code **installer** ~/.claude/skills); **v1.9.3** FEAT-001 doc; **v1.9.2** (ENH-019~021); **v1.9.1** FEAT-010; **v1.9.0** FEAT-009
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
| Lĩnh vực / Area | Trạng thái | Chi tiết |
|
|
@@ -65,7 +65,7 @@ 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 (304) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009/010/001, ENH-021, 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 |
|
package/bin/viepilot.cjs
CHANGED
|
@@ -32,14 +32,14 @@ Usage:
|
|
|
32
32
|
viepilot --list-targets
|
|
33
33
|
|
|
34
34
|
Install options:
|
|
35
|
-
--target <id|id,id|all> Target profile(s): claude-code,cursor-agent,cursor-ide
|
|
35
|
+
--target <id|id,id|all> Target profile(s): claude-code (mirrors vp-* to ~/.claude/skills), cursor-agent, cursor-ide
|
|
36
36
|
--yes Non-interactive mode (skip confirmations)
|
|
37
37
|
--dry-run Print actions only (Node installer; no bash)
|
|
38
38
|
--list-targets Print supported targets and exit
|
|
39
39
|
--help Show help
|
|
40
40
|
|
|
41
41
|
Uninstall options:
|
|
42
|
-
--target <id|id,id|all> Remove
|
|
42
|
+
--target <id|id,id|all> Remove assets (claude-code: ~/.claude/skills/vp-*; cursor-*: ~/.cursor/skills/vp-*; shared: ~/.cursor/viepilot)
|
|
43
43
|
--yes Non-interactive mode (skip confirmations)
|
|
44
44
|
--dry-run Print actions only, do not remove files
|
|
45
45
|
`);
|
|
@@ -246,7 +246,7 @@ async function interactiveTargetSelection() {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
|
-
*
|
|
249
|
+
* Core bundle (workflows, bin, ~/.cursor/viepilot) is shared; `claude-code` additionally mirrors vp-* skills into ~/.claude/skills.
|
|
250
250
|
* @param {string[]} selectedTargets
|
|
251
251
|
* @param {boolean} dryRun
|
|
252
252
|
* @returns {{ ok: boolean, code: number }}
|
|
@@ -264,7 +264,7 @@ function runInstallViaNode(selectedTargets, dryRun) {
|
|
|
264
264
|
|
|
265
265
|
let plan;
|
|
266
266
|
try {
|
|
267
|
-
plan = buildInstallPlan(pkgRoot, env, { wantPathShim });
|
|
267
|
+
plan = buildInstallPlan(pkgRoot, env, { wantPathShim, installTargets: selectedTargets });
|
|
268
268
|
} catch (err) {
|
|
269
269
|
console.error(err.message);
|
|
270
270
|
return { ok: false, code: 1 };
|
|
@@ -273,7 +273,10 @@ function runInstallViaNode(selectedTargets, dryRun) {
|
|
|
273
273
|
console.log('');
|
|
274
274
|
console.log('ViePilot install (Node — no bash required)');
|
|
275
275
|
console.log(` Package: ${pkgRoot}`);
|
|
276
|
-
console.log(` Targets
|
|
276
|
+
console.log(` Targets: ${selectedTargets.join(', ')}`);
|
|
277
|
+
if (selectedTargets.includes('claude-code')) {
|
|
278
|
+
console.log(' (claude-code → also ~/.claude/skills/vp-*)');
|
|
279
|
+
}
|
|
277
280
|
|
|
278
281
|
const applied = applyInstallPlan(plan, { dryRun });
|
|
279
282
|
if (applied.logs.length > 0) {
|
|
@@ -332,7 +335,8 @@ async function installCommand(rawArgs) {
|
|
|
332
335
|
else console.log(`- ${r.target}: failed (exit ${r.code})`);
|
|
333
336
|
}
|
|
334
337
|
console.log('\nNext actions:');
|
|
335
|
-
console.log('-
|
|
338
|
+
console.log('- Cursor: open project and run /vp-status');
|
|
339
|
+
console.log('- Claude Code: restart session if needed so ~/.claude/skills/vp-* is picked up; then /vp-status');
|
|
336
340
|
console.log('- If needed, run /vp-brainstorm then /vp-crystallize');
|
|
337
341
|
|
|
338
342
|
return failed.length === 0 ? 0 : 1;
|
|
@@ -356,6 +360,17 @@ function computeUninstallPaths(targets) {
|
|
|
356
360
|
}
|
|
357
361
|
}
|
|
358
362
|
|
|
363
|
+
if (targets.some((t) => t === 'claude-code')) {
|
|
364
|
+
const claudeSkills = path.join(home, '.claude', 'skills');
|
|
365
|
+
if (fs.existsSync(claudeSkills)) {
|
|
366
|
+
for (const entry of fs.readdirSync(claudeSkills)) {
|
|
367
|
+
if (entry.startsWith('vp-')) {
|
|
368
|
+
paths.push(path.join(claudeSkills, entry));
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
359
374
|
paths.push(vpRoot);
|
|
360
375
|
paths.push('/usr/local/bin/vp-tools');
|
|
361
376
|
paths.push('/usr/local/bin/viepilot');
|
package/docs/README.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
| Document | Description |
|
|
23
23
|
|----------|-------------|
|
|
24
24
|
| [Quick Start](user/quick-start.md) | Install, brainstorm, crystallize, auto — 5 min guide |
|
|
25
|
+
| [Claude Code setup](user/claude-code-setup.md) | Cài ViePilot trên Claude Code (`~/.claude/skills`, CLI, workflows) |
|
|
25
26
|
| [FAQ](user/faq.md) | Frequently asked questions |
|
|
26
27
|
|
|
27
28
|
#### Features
|
|
@@ -116,9 +117,9 @@
|
|
|
116
117
|
| `/vp-status` | "status", "tiến độ" | Progress dashboard |
|
|
117
118
|
| `/vp-info` | "version", "phiên bản" | Bundle version, npm latest, inventory |
|
|
118
119
|
| `/vp-update` | "upgrade viepilot", "npm" | Upgrade ViePilot via npm |
|
|
119
|
-
| `/vp-request` | "request", "feature", "bug" |
|
|
120
|
+
| `/vp-request` | "request", "feature", "bug" | Log backlog; sau đó evolve + auto (ENH-021) |
|
|
120
121
|
| `/vp-ui-components` | "ui components", "21st.dev" | Curate and reuse UI component library |
|
|
121
|
-
| `/vp-evolve` | "evolve", "milestone mới" |
|
|
122
|
+
| `/vp-evolve` | "evolve", "milestone mới" | Planning (ROADMAP/phase); implement bằng `/vp-auto` |
|
|
122
123
|
| `/vp-docs` | "docs", "documentation" | Generate docs |
|
|
123
124
|
| `/vp-task` | "task", "manual" | Manual task control |
|
|
124
125
|
| `/vp-debug` | "debug", "investigate" | Debug issues |
|
|
@@ -127,4 +128,4 @@
|
|
|
127
128
|
|
|
128
129
|
---
|
|
129
130
|
|
|
130
|
-
*Last updated: 2026-04-
|
|
131
|
+
*Last updated: 2026-04-02 — ViePilot framework **v1.9.4** (Claude Code installer → `~/.claude/skills`; FEAT-001 doc v1.9.3; ENH-021 routing; M1.27 FEAT-009 profiles); see `CHANGELOG.md`, [Claude Code setup](user/claude-code-setup.md), `docs/user/features/autonomous-mode.md`.*
|
package/docs/getting-started.md
CHANGED
|
@@ -27,6 +27,10 @@ cd viepilot
|
|
|
27
27
|
./install.sh
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
### Claude Code
|
|
31
|
+
|
|
32
|
+
Nếu bạn dùng **Claude Code** thay vì Cursor, làm theo [ViePilot trên Claude Code](user/claude-code-setup.md) (skills trong `~/.claude/skills`, installer `npx viepilot install --target claude-code`, và verify `vp-tools info`).
|
|
33
|
+
|
|
30
34
|
## Step 2: Brainstorm Your Project
|
|
31
35
|
|
|
32
36
|
Start a new project by brainstorming:
|
package/docs/skills-reference.md
CHANGED
|
@@ -201,7 +201,7 @@ AI pauses for user input when:
|
|
|
201
201
|
|
|
202
202
|
## /vp-evolve
|
|
203
203
|
|
|
204
|
-
**Purpose**: Nâng cấp hoặc mở rộng dự án
|
|
204
|
+
**Purpose**: Nâng cấp hoặc mở rộng dự án (**planning** — ROADMAP, phase, tasks; implement sau bằng **`/vp-auto`**; xem **Implementation routing (ENH-021)** ở đầu file).
|
|
205
205
|
|
|
206
206
|
### Modes
|
|
207
207
|
| Mode | Description |
|
|
@@ -278,7 +278,7 @@ CHANGELOG.md (updated)
|
|
|
278
278
|
|
|
279
279
|
## /vp-request
|
|
280
280
|
|
|
281
|
-
**Purpose**: Tạo và quản lý requests (Bug, Feature, Enhancement, Tech Debt, Brainstorm tiếp)
|
|
281
|
+
**Purpose**: Tạo và quản lý requests (Bug, Feature, Enhancement, Tech Debt, Brainstorm tiếp). **Không** thay **`/vp-evolve`** (plan) hay **`/vp-auto`** (implement); chuỗi khuyến nghị: request → evolve → auto (**ENH-021**).
|
|
282
282
|
|
|
283
283
|
### Flags
|
|
284
284
|
| Flag | Description |
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# ViePilot trên Claude Code
|
|
2
|
+
|
|
3
|
+
Hướng dẫn cài đặt và kiểm tra ViePilot khi bạn dùng **Claude Code** (CLI/IDE), bổ sung cho [Quick Start](quick-start.md) và [Getting Started](../getting-started.md).
|
|
4
|
+
|
|
5
|
+
## Claude Code vs Cursor (đường dẫn skills)
|
|
6
|
+
|
|
7
|
+
| | **Cursor** | **Claude Code** |
|
|
8
|
+
|---|------------|-----------------|
|
|
9
|
+
| Skills (global) | `~/.cursor/skills/<id>/SKILL.md` | `~/.claude/skills/<id>/SKILL.md` |
|
|
10
|
+
| Skills (project) | Rules / project config tùy Cursor | `.claude/skills/<id>/SKILL.md` trong repo |
|
|
11
|
+
| Tài liệu chính thức | — | [Extend Claude with skills](https://code.claude.com/docs/en/skills), [Explore the .claude directory](https://code.claude.com/docs/en/claude-directory) |
|
|
12
|
+
|
|
13
|
+
Bundled skill ViePilot dùng frontmatter `name: vp-*` — trên Claude Code bạn gọi tương đương **`/vp-auto`**, **`/vp-request`**, … như trong [Skills Reference](../skills-reference.md).
|
|
14
|
+
|
|
15
|
+
**Lưu ý:** Nội dung skill hiện nhắc tới công cụ kiểu Cursor (`ReadFile`, `ApplyPatch`, …). Trên Claude Code, agent sẽ map sang tool tương đương (đọc/ghi file, terminal, …). Phần **workflow** và **chuỗi lệnh** (`/vp-evolve` → `/vp-auto`) vẫn giữ nguyên ý nghĩa.
|
|
16
|
+
|
|
17
|
+
## Bước 1 — Cài bundle ViePilot (CLI)
|
|
18
|
+
|
|
19
|
+
Với **`--target claude-code`**, installer (ViePilot **≥ 1.9.4**) **tự copy** toàn bộ `skills/vp-*` vào **`~/.claude/skills/`** (Claude Code mới thấy lệnh `/vp-*`). Đồng thời vẫn mirror vào **`~/.cursor/skills/`** và **`~/.cursor/viepilot/`** (workflows, bin) như trước.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx viepilot install --target claude-code --yes
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Hoặc clone repo và chạy từ thư mục gốc package:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/0-CODE/viepilot.git
|
|
29
|
+
cd viepilot
|
|
30
|
+
npx viepilot install --target claude-code --yes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Kết quả điển hình:
|
|
34
|
+
|
|
35
|
+
- **`~/.claude/skills/vp-*/SKILL.md`** — dùng trực tiếp trong Claude Code
|
|
36
|
+
- **`~/.cursor/skills/vp-*/`** — giữ cho Cursor / tương thích
|
|
37
|
+
- Workflows, templates, `bin/*.cjs` tới **`~/.cursor/viepilot/`**
|
|
38
|
+
- Seed **`~/.viepilot/profiles/`** và `~/.viepilot/profile-map.md` (xem [Global profiles](../dev/global-profiles.md))
|
|
39
|
+
|
|
40
|
+
Sau khi cài: **khởi động lại / mở session Claude Code mới** nếu menu `/` chưa thấy `vp-*`.
|
|
41
|
+
|
|
42
|
+
**Cập nhật sau này:** chạy lại `npx viepilot install --target claude-code --yes` từ bản npm/git mới để refresh cả hai cây skills.
|
|
43
|
+
|
|
44
|
+
## Bước 2 — Tuỳ chọn: symlink / copy thủ công (bản cũ hoặc chỉ Cursor)
|
|
45
|
+
|
|
46
|
+
Nếu bạn dùng ViePilot **< 1.9.4** hoặc đã cài **`--target cursor-*`** mà **không** gồm `claude-code`, Claude Code **không** đọc `~/.cursor/skills` — khi đó đồng bộ thủ công vào **`~/.claude/skills/<tên-thư-mục>/SKILL.md`**.
|
|
47
|
+
|
|
48
|
+
### Cách A — Symlink (khuyến nghị cho máy cá nhân)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
mkdir -p ~/.claude/skills
|
|
52
|
+
for d in ~/.cursor/skills/vp-*; do
|
|
53
|
+
[ -d "$d" ] || continue
|
|
54
|
+
name=$(basename "$d")
|
|
55
|
+
ln -sfn "$d" "$HOME/.claude/skills/$name"
|
|
56
|
+
done
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Cách B — Copy (ổn cho máy không dùng symlink)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
mkdir -p ~/.claude/skills
|
|
63
|
+
for d in ~/.cursor/skills/vp-*; do
|
|
64
|
+
[ -d "$d" ] || continue
|
|
65
|
+
name=$(basename "$d")
|
|
66
|
+
rm -rf "$HOME/.claude/skills/$name"
|
|
67
|
+
cp -R "$d" "$HOME/.claude/skills/$name"
|
|
68
|
+
done
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Sau mỗi lần `npm update -g viepilot` hoặc reinstall: với **copy** cần chạy lại lệnh copy; với **symlink** chỉ cần cập nhật phía `~/.cursor/skills`.
|
|
72
|
+
|
|
73
|
+
### Cách C — Skills chỉ trong một project
|
|
74
|
+
|
|
75
|
+
Trong repo của bạn:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
mkdir -p .claude/skills
|
|
79
|
+
# symlink hoặc copy từng vp-* từ clone viepilot hoặc từ ~/.cursor/skills
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Commit `.claude/skills/` nếu team cần dùng chung (xì [Where skills live](https://code.claude.com/docs/en/skills#where-skills-live)).
|
|
83
|
+
|
|
84
|
+
## Bước 3 — Workflows và `execution_context`
|
|
85
|
+
|
|
86
|
+
Nhiều skill trỏ tới workflow qua đường dẫn kiểu **`~/.cursor/viepilot/workflows/...`**. Sau `npx viepilot install`, thư mục này đã có bản mirror — **giữ nguyên** và đảm bảo skill không bị sandbox chặn đọc `$HOME`.
|
|
87
|
+
|
|
88
|
+
Nếu bạn **không** dùng installer: từ clone, có thể đọc trực tiếp `workflows/*.md` trong repo hoặc tự mirror sang `~/.cursor/viepilot/workflows/` cho khớp văn bản skill.
|
|
89
|
+
|
|
90
|
+
## Bước 4 — `vp-tools` trên PATH
|
|
91
|
+
|
|
92
|
+
**Sau installer**, thử:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
~/.cursor/viepilot/bin/vp-tools.cjs info
|
|
96
|
+
# hoặc nếu đã thêm vào PATH:
|
|
97
|
+
vp-tools info
|
|
98
|
+
vp-tools info --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**npm global:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm i -g viepilot
|
|
105
|
+
vp-tools info
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Chỉ có clone, không cài global:**
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
node /đường-dẫn/tới/viepilot/bin/vp-tools.cjs info --json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Chi tiết lệnh: [CLI Reference](../dev/cli-reference.md).
|
|
115
|
+
|
|
116
|
+
## Bước 5 — Bootstrap `.viepilot/` cho project đích
|
|
117
|
+
|
|
118
|
+
Trong thư mục project (không nhất thiết là repo `viepilot`):
|
|
119
|
+
|
|
120
|
+
1. Mở project trong Claude Code.
|
|
121
|
+
2. Chạy **`/vp-crystallize`** (hoặc tương đương theo skill) để sinh `.viepilot/` — hoặc copy thủ công từ [`templates/project/`](../../templates/project/) theo [Getting Started](../getting-started.md).
|
|
122
|
+
|
|
123
|
+
Một số repo framework **gitignore** `.viepilot/`; với **ứng dụng của bạn** thường nên **commit** để cả team (và agent) cùng thấy ROADMAP/TRACKER.
|
|
124
|
+
|
|
125
|
+
## Kiểm tra nhanh
|
|
126
|
+
|
|
127
|
+
| Bước | Lệnh / hành động | Kỳ vọng |
|
|
128
|
+
|------|------------------|---------|
|
|
129
|
+
| CLI | `vp-tools info` hoặc `node .../vp-tools.cjs info` | In `installedVersion`, `skills[]` |
|
|
130
|
+
| Claude | Gõ `/` trong Claude Code | Thấy các skill `vp-*` đã cài |
|
|
131
|
+
| Project | Có `.viepilot/TRACKER.md` sau crystallize | Theo [FAQ](faq.md) |
|
|
132
|
+
|
|
133
|
+
## Windows
|
|
134
|
+
|
|
135
|
+
- Symlink có thể cần quyền Developer Mode hoặc chạy terminal elevated; nếu không, dùng **copy** (cách B).
|
|
136
|
+
- `path_shim` tới `/usr/local/bin` chỉ phù hợp Unix; trên Windows dùng `node ...\vp-tools.cjs` hoặc thêm thư mục chứa `vp-tools.cjs` vào **PATH** thủ công.
|
|
137
|
+
|
|
138
|
+
## Chuỗi làm việc gợi ý (ENH-021)
|
|
139
|
+
|
|
140
|
+
1. **`/vp-request`** — ghi yêu cầu
|
|
141
|
+
2. **`/vp-evolve`** — lên ROADMAP / phase
|
|
142
|
+
3. **`/vp-auto`** — thực thi task có plan
|
|
143
|
+
|
|
144
|
+
Xem thêm: [Autonomous mode](features/autonomous-mode.md), [Troubleshooting](../troubleshooting.md).
|
package/docs/user/faq.md
CHANGED
|
@@ -14,6 +14,12 @@ A: Skills được thiết kế cho Cursor IDE. Tuy nhiên, workflows và CLI (`
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
### Q: Làm sao dùng ViePilot với Claude Code?
|
|
18
|
+
|
|
19
|
+
A: Chạy `npx viepilot install --target claude-code --yes` (ViePilot **≥ 1.9.4**): installer **tự copy** `vp-*` vào **`~/.claude/skills/`**. Với bản cũ hoặc chỉ target Cursor, symlink/copy thủ công từ `~/.cursor/skills/`. Chi tiết, verify `vp-tools info`, và chuỗi **`/vp-request` → `/vp-evolve` → `/vp-auto`**: xem [ViePilot trên Claude Code](claude-code-setup.md).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
17
23
|
### Q: Tôi có cần biết code để dùng ViePilot không?
|
|
18
24
|
|
|
19
25
|
A: Không nhất thiết. ViePilot giúp AI code cho bạn. Tuy nhiên, để review code và approve control points, hiểu biết cơ bản về programming sẽ hữu ích.
|
|
@@ -106,12 +112,13 @@ A: Dùng `/vp-resume` để tiếp tục từ điểm dừng. Nếu có lỗi, d
|
|
|
106
112
|
|
|
107
113
|
### Q: Làm sao thêm feature mới khi project đang chạy?
|
|
108
114
|
|
|
109
|
-
A:
|
|
115
|
+
A: **`/vp-request --feature`** để **log** yêu cầu (file request + backlog). **`/vp-evolve`** (Add feature / New milestone) để **thêm phase + tasks** trên ROADMAP. **`/vp-auto`** để **implement** theo task plan. (ENH-021: không implement trực tiếp trong thread request/evolve trừ khi bạn explicit bypass.)
|
|
110
116
|
|
|
111
117
|
---
|
|
112
118
|
|
|
113
119
|
### Q: Khi nào nên dùng `/vp-evolve` vs `/vp-request`?
|
|
114
120
|
|
|
115
|
-
A:
|
|
116
|
-
-
|
|
117
|
-
-
|
|
121
|
+
A:
|
|
122
|
+
- **`/vp-request`** — Ghi nhận bug/feature/enhancement vào `.viepilot/requests/*` + TRACKER; **không** thay thế bước plan/implement.
|
|
123
|
+
- **`/vp-evolve`** — **Planning**: thêm phase trên ROADMAP, tạo `SPEC`/tasks, cập nhật milestone; sau đó gọi **`/vp-auto`**.
|
|
124
|
+
- Milestone **mới** (M2, M3…) hoặc scope lớn → thường bắt đầu bằng **`/vp-evolve`**; ý tưởng rời rạc → có thể **`/vp-request`** trước rồi evolve.
|
|
@@ -36,6 +36,13 @@ Mỗi task:
|
|
|
36
36
|
- Nếu môi trường runtime có skills ngoài framework, workflow sẽ bỏ qua và ưu tiên skill ViePilot tương đương.
|
|
37
37
|
- Chỉ khi bạn ghi rõ yêu cầu mở rộng (explicit opt-in), agent mới được phép dùng external skills.
|
|
38
38
|
|
|
39
|
+
### Implementation routing (ENH-021)
|
|
40
|
+
|
|
41
|
+
- **`/vp-auto`** là **lane mặc định** để **implement** mã shipping sau khi đã có **phase/task plan** trên ROADMAP.
|
|
42
|
+
- **`/vp-request`** chỉ **ghi backlog** (`.viepilot/requests/*`, TRACKER) — **không** thay evolve + auto.
|
|
43
|
+
- **`/vp-evolve`** chỉ **planning** (ROADMAP, thư mục phase, SPEC/tasks) — **không** implement thay `/vp-auto`.
|
|
44
|
+
- **Chuỗi khuyến nghị:** `vp-request` → `vp-evolve` → **`vp-auto`**. Ngoại lệ: user **explicit** (*hotfix*, *sửa trong chat này*) — phải nêu rõ bypass.
|
|
45
|
+
|
|
39
46
|
### Doc-first gate (v0.8.2 / BUG-001)
|
|
40
47
|
|
|
41
48
|
Workflow `autonomous.md` yêu cầu **ghi nhận kế hoạch trong file task** và **`PHASE-STATE` → `in_progress`** trước khi chỉnh sửa deliverable. Xem `workflows/autonomous.md` — *Pre-execution documentation gate*.
|
package/docs/user/quick-start.md
CHANGED
|
@@ -31,6 +31,8 @@ Chọn profile cài đặt trong wizard (arrow keys + space + enter):
|
|
|
31
31
|
- `cursor-agent`
|
|
32
32
|
- `cursor-ide`
|
|
33
33
|
|
|
34
|
+
Hướng dẫn đầy đủ cho **Claude Code** (symlink/copy skills sang `~/.claude/skills`, PATH, kiểm tra CLI): [ViePilot trên Claude Code](claude-code-setup.md).
|
|
35
|
+
|
|
34
36
|
Non-interactive:
|
|
35
37
|
```bash
|
|
36
38
|
npx viepilot install --target cursor-agent --yes
|
package/lib/viepilot-install.cjs
CHANGED
|
@@ -76,7 +76,7 @@ function listDirEntries(packageRoot, subdir) {
|
|
|
76
76
|
*
|
|
77
77
|
* @param {string} packageRoot - absolute viepilot package root
|
|
78
78
|
* @param {Record<string, string | undefined>} [envSource] - defaults to process.env
|
|
79
|
-
* @param {{ wantPathShim?: boolean, overrideHomedir?: string }} [opts] - `overrideHomedir`: absolute fake home for tests only. `wantPathShim`: append /usr/local/bin steps (skipped on Windows at apply time).
|
|
79
|
+
* @param {{ wantPathShim?: boolean, overrideHomedir?: string, installTargets?: string[] }} [opts] - `overrideHomedir`: absolute fake home for tests only. `wantPathShim`: append /usr/local/bin steps (skipped on Windows at apply time). `installTargets`: when it includes `claude-code`, also mirror `skills/vp-*` into `~/.claude/skills/` (Claude Code discovery).
|
|
80
80
|
* @returns {{ version: number, packageRoot: string, env: ReturnType<typeof normalizeInstallEnv>, home: string, paths: object, steps: object[] }}
|
|
81
81
|
*/
|
|
82
82
|
function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
|
|
@@ -91,6 +91,10 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
|
|
|
91
91
|
const viepilotProfilesDir = path.join(viepilotUserDataDir, 'profiles');
|
|
92
92
|
const viepilotProfileMapPath = path.join(viepilotUserDataDir, 'profile-map.md');
|
|
93
93
|
|
|
94
|
+
const installTargets = Array.isArray(opts.installTargets) ? opts.installTargets : [];
|
|
95
|
+
const installClaudeSkills = installTargets.includes('claude-code');
|
|
96
|
+
const claudeSkillsDir = installClaudeSkills ? path.join(home, '.claude', 'skills') : null;
|
|
97
|
+
|
|
94
98
|
let wantPathShim = opts.wantPathShim;
|
|
95
99
|
if (wantPathShim === undefined) {
|
|
96
100
|
wantPathShim = env.autoYes && env.addPath;
|
|
@@ -133,6 +137,23 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
|
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
|
|
140
|
+
if (installClaudeSkills && claudeSkillsDir) {
|
|
141
|
+
steps.push({ kind: 'mkdir', path: claudeSkillsDir });
|
|
142
|
+
for (const name of listSkillDirNames(root)) {
|
|
143
|
+
const src = path.join(root, 'skills', name);
|
|
144
|
+
const dest = path.join(claudeSkillsDir, name);
|
|
145
|
+
if (env.symlinkSkills) {
|
|
146
|
+
steps.push({
|
|
147
|
+
kind: 'symlink_dir',
|
|
148
|
+
target: dest,
|
|
149
|
+
sourceAbsolute: path.resolve(src),
|
|
150
|
+
});
|
|
151
|
+
} else {
|
|
152
|
+
steps.push({ kind: 'copy_dir', from: src, to: dest });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
136
157
|
for (const ent of listDirEntries(root, 'workflows')) {
|
|
137
158
|
const src = path.join(root, 'workflows', ent.name);
|
|
138
159
|
const dest = path.join(viepilotDir, 'workflows', ent.name);
|
|
@@ -223,6 +244,7 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
|
|
|
223
244
|
home,
|
|
224
245
|
paths: {
|
|
225
246
|
cursorSkillsDir,
|
|
247
|
+
claudeSkillsDir,
|
|
226
248
|
viepilotDir,
|
|
227
249
|
viepilotUserDataDir,
|
|
228
250
|
viepilotProfilesDir,
|
|
@@ -241,8 +263,11 @@ function formatPlanLines(plan) {
|
|
|
241
263
|
const lines = [];
|
|
242
264
|
lines.push('ViePilot install plan (dry-run)');
|
|
243
265
|
lines.push(` packageRoot: ${plan.packageRoot}`);
|
|
244
|
-
lines.push(` profile: ${plan.env.profile} (informational;
|
|
245
|
-
lines.push(` skills: ${plan.paths.cursorSkillsDir}`);
|
|
266
|
+
lines.push(` profile: ${plan.env.profile} (informational; Cursor paths always; Claude Code skills when target includes claude-code)`);
|
|
267
|
+
lines.push(` skills (Cursor): ${plan.paths.cursorSkillsDir}`);
|
|
268
|
+
if (plan.paths.claudeSkillsDir) {
|
|
269
|
+
lines.push(` skills (Claude Code): ${plan.paths.claudeSkillsDir}`);
|
|
270
|
+
}
|
|
246
271
|
lines.push(` viepilot: ${plan.paths.viepilotDir}`);
|
|
247
272
|
if (plan.paths.viepilotUserDataDir) {
|
|
248
273
|
lines.push(` userData (~/.viepilot): ${plan.paths.viepilotUserDataDir}`);
|