viepilot 1.9.2 → 1.9.5
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 +22 -0
- package/README.md +10 -10
- package/bin/viepilot.cjs +21 -6
- package/docs/README.md +4 -3
- package/docs/getting-started.md +4 -0
- package/docs/skills-reference.md +4 -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/skills/vp-audit/SKILL.md +2 -1
- package/skills/vp-crystallize/SKILL.md +4 -1
- package/templates/project/ARCHITECTURE.md +18 -0
- package/workflows/crystallize.md +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,28 @@ 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.5] - 2026-04-02
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **M1.29 / Phase 35 (ENH-022)** — Crystallize **Step 4** ghi thêm **`.viepilot/architecture/<diagram>.mermaid`** (raw Mermaid, mirror khối fenced trong `ARCHITECTURE.md`); bảng tên canonical + policy trong `workflows/crystallize.md`; template `templates/project/ARCHITECTURE.md` có **Diagram source files** và dòng path từng section; **vp-crystallize** 0.5.2, **vp-audit** 0.3.2; `docs/skills-reference.md`; `tests/unit/vp-enh022-crystallize-architecture-files-contracts.test.js` (**308** tests).
|
|
27
|
+
|
|
28
|
+
## [1.9.4] - 2026-04-02
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **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).
|
|
33
|
+
|
|
34
|
+
## [1.9.3] - 2026-04-02
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **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.
|
|
39
|
+
|
|
18
40
|
## [1.9.2] - 2026-04-03
|
|
19
41
|
|
|
20
42
|
### 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.5** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.9.5**) 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,991+** (`.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 | **308** (16 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009 + FEAT-010 + ENH-021 routing + FEAT-001 Claude Code + ENH-022 crystallize architecture files + 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 |
|
|
@@ -393,7 +393,7 @@ viepilot/
|
|
|
393
393
|
├── bin/ # CLI tools
|
|
394
394
|
│ └── vp-tools.cjs # 17 subcommands; uses ../lib/cli-shared.cjs, viepilot-info/update.cjs
|
|
395
395
|
│
|
|
396
|
-
├── tests/ # Test suite (
|
|
396
|
+
├── tests/ # Test suite (308 tests)
|
|
397
397
|
│ ├── unit/ # Unit tests
|
|
398
398
|
│ │ ├── validators.test.js # CLI subprocess + in-process coverage tests
|
|
399
399
|
│ │ └── ai-provider-compat.test.js # 142 AI compat tests
|
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
|
@@ -78,6 +78,7 @@ Complete reference for all ViePilot skills.
|
|
|
78
78
|
├── AI-GUIDE.md
|
|
79
79
|
├── PROJECT-META.md
|
|
80
80
|
├── ARCHITECTURE.md
|
|
81
|
+
├── architecture/ (*.mermaid diagram sidecars — ENH-022, mirror fenced blocks)
|
|
81
82
|
├── PROJECT-CONTEXT.md
|
|
82
83
|
├── SYSTEM-RULES.md
|
|
83
84
|
├── ROADMAP.md
|
|
@@ -201,7 +202,7 @@ AI pauses for user input when:
|
|
|
201
202
|
|
|
202
203
|
## /vp-evolve
|
|
203
204
|
|
|
204
|
-
**Purpose**: Nâng cấp hoặc mở rộng dự án
|
|
205
|
+
**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
206
|
|
|
206
207
|
### Modes
|
|
207
208
|
| Mode | Description |
|
|
@@ -278,7 +279,7 @@ CHANGELOG.md (updated)
|
|
|
278
279
|
|
|
279
280
|
## /vp-request
|
|
280
281
|
|
|
281
|
-
**Purpose**: Tạo và quản lý requests (Bug, Feature, Enhancement, Tech Debt, Brainstorm tiếp)
|
|
282
|
+
**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
283
|
|
|
283
284
|
### Flags
|
|
284
285
|
| Flag | Description |
|
|
@@ -427,6 +428,7 @@ CHANGELOG.md (updated)
|
|
|
427
428
|
4. **CLI coverage** — mỗi command có documentation không
|
|
428
429
|
5. **docs/ sync** — docs/ có match với thực tế (skills count, workflows count) không
|
|
429
430
|
6. **ROOT drift** — README.md badges, ROADMAP.md status có up-to-date không
|
|
431
|
+
7. **ENH-022 (architecture sidecars)** — khi matrix có Mermaid thực tế, gợi ý kiểm `.viepilot/architecture/<type>.mermaid` khớp `ARCHITECTURE.md`
|
|
430
432
|
|
|
431
433
|
### Output
|
|
432
434
|
- Audit report với danh sách gaps
|
|
@@ -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}`);
|
package/package.json
CHANGED
package/skills/vp-audit/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vp-audit
|
|
3
3
|
description: "Audit state, docs drift, and stack best-practice compliance — works on any project"
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<cursor_skill_adapter>
|
|
@@ -49,6 +49,7 @@ Auto-detect nếu đang chạy trong viepilot framework repo để thêm framewo
|
|
|
49
49
|
- `required` diagrams must have Mermaid content
|
|
50
50
|
- `optional` diagrams may be omitted/merged with explicit note
|
|
51
51
|
- `N/A` diagrams must have rationale line
|
|
52
|
+
- **ENH-022 (recommended check):** when a diagram type is `required` (or `optional` with a real Mermaid block) and crystallize policy applies, verify **`.viepilot/architecture/<type>.mermaid`** exists and that **Diagram source** lines in `ARCHITECTURE.md` match; for `N/A`, sidecar file should be absent (no empty stubs)
|
|
52
53
|
|
|
53
54
|
**Tier 3 — Stack Best Practices + Code Quality (mọi project, theo stack detect được):**
|
|
54
55
|
- Detect stacks liên quan từ context/project manifests
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vp-crystallize
|
|
3
3
|
description: "Chuyển đổi brainstorm thành executable artifacts"
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<cursor_skill_adapter>
|
|
@@ -38,6 +38,7 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
|
|
|
38
38
|
├── AI-GUIDE.md # Navigation cho AI
|
|
39
39
|
├── PROJECT-META.md # Metadata dự án
|
|
40
40
|
├── ARCHITECTURE.md # System design
|
|
41
|
+
├── architecture/ # ENH-022: *.mermaid sidecars (mirror fenced diagrams)
|
|
41
42
|
├── PROJECT-CONTEXT.md # Domain knowledge + `<product_vision>` (phased scope)
|
|
42
43
|
├── SYSTEM-RULES.md # Coding rules & standards
|
|
43
44
|
├── ROADMAP.md # MVP phases & tasks + **Post-MVP / Product horizon** block (mandatory)
|
|
@@ -143,6 +144,7 @@ Ask user for (confirm proposals từ profile nếu có):
|
|
|
143
144
|
- `required` => include concrete Mermaid block
|
|
144
145
|
- `optional` => allow lightweight/merged representation
|
|
145
146
|
- `N/A` => keep section heading + one-line rationale
|
|
147
|
+
- **ENH-022:** For each diagram type with real Mermaid, write **`.viepilot/architecture/<type>.mermaid`** (raw source) and keep it **identical** to the body inside the fenced ` ```mermaid ` block in `ARCHITECTURE.md`; omit files for `N/A` or no diagram — see `workflows/crystallize.md` Step 4.
|
|
146
148
|
|
|
147
149
|
### Step 5: Generate PROJECT-CONTEXT.md
|
|
148
150
|
- **FEAT-009:** Block `## ViePilot active profile (FEAT-009)` khi có binding
|
|
@@ -206,5 +208,6 @@ Ask user for (confirm proposals từ profile nếu có):
|
|
|
206
208
|
- [ ] Project files created
|
|
207
209
|
- [ ] Git committed
|
|
208
210
|
- [ ] ARCHITECTURE diagram matrix is present and consistent (`required|optional|N/A`)
|
|
211
|
+
- [ ] **ENH-022:** Mỗi diagram Mermaid được sinh có file `.viepilot/architecture/<canonical-name>.mermaid` đồng bộ nội dung với `ARCHITECTURE.md` (không tạo file thừa cho N/A)
|
|
209
212
|
- [ ] **FEAT-009:** Nếu có profile bound — ARCHITECTURE + PROJECT-CONTEXT ghi nguồn profile; nếu không — ghi rõ none / not configured
|
|
210
213
|
</success_criteria>
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
{{SYSTEM_OVERVIEW_DESCRIPTION}}
|
|
6
6
|
|
|
7
|
+
**Diagram source (when Mermaid):** `.viepilot/architecture/system-overview.mermaid`
|
|
8
|
+
|
|
7
9
|
```
|
|
8
10
|
{{SYSTEM_DIAGRAM}}
|
|
9
11
|
```
|
|
@@ -28,6 +30,12 @@
|
|
|
28
30
|
| deployment | {{DIAGRAM_STATUS_DEPLOYMENT}} | {{DIAGRAM_REASON_DEPLOYMENT}} |
|
|
29
31
|
| user-use-case | {{DIAGRAM_STATUS_USER_USE_CASE}} | {{DIAGRAM_REASON_USER_USE_CASE}} |
|
|
30
32
|
|
|
33
|
+
## Diagram source files (ENH-022)
|
|
34
|
+
|
|
35
|
+
When crystallize emits a real Mermaid diagram for a type, it also writes **`.viepilot/architecture/<type>.mermaid`** (raw Mermaid, no markdown fences). Canonical names: `system-overview.mermaid`, `data-flow.mermaid`, `event-flows.mermaid`, `module-dependencies.mermaid`, `deployment.mermaid`, `user-use-case.mermaid`. Types marked **N/A** or without a diagram must **not** get a sidecar file.
|
|
36
|
+
|
|
37
|
+
Under each diagram section below, when applicable, include **Diagram source** pointing at the matching path. The fenced ` ```mermaid ` body in this file must **mirror** the `.mermaid` file line-for-line.
|
|
38
|
+
|
|
31
39
|
## Services
|
|
32
40
|
|
|
33
41
|
{{#SERVICES}}
|
|
@@ -42,12 +50,16 @@
|
|
|
42
50
|
|
|
43
51
|
## Data Flow
|
|
44
52
|
|
|
53
|
+
**Diagram source (when generated):** `.viepilot/architecture/data-flow.mermaid`
|
|
54
|
+
|
|
45
55
|
```
|
|
46
56
|
{{DATA_FLOW_DIAGRAM}}
|
|
47
57
|
```
|
|
48
58
|
|
|
49
59
|
### Event Flows
|
|
50
60
|
|
|
61
|
+
- **Diagram source (when generated):** `.viepilot/architecture/event-flows.mermaid`
|
|
62
|
+
|
|
51
63
|
- **Status**: {{DIAGRAM_STATUS_EVENT_FLOWS}}
|
|
52
64
|
- **Not applicable rationale**: {{DIAGRAM_NA_EVENT_FLOWS}}
|
|
53
65
|
|
|
@@ -58,6 +70,8 @@ flowchart LR
|
|
|
58
70
|
|
|
59
71
|
### Module Dependencies
|
|
60
72
|
|
|
73
|
+
- **Diagram source (when generated):** `.viepilot/architecture/module-dependencies.mermaid`
|
|
74
|
+
|
|
61
75
|
- **Status**: {{DIAGRAM_STATUS_MODULE_DEPENDENCIES}}
|
|
62
76
|
- **Not applicable rationale**: {{DIAGRAM_NA_MODULE_DEPENDENCIES}}
|
|
63
77
|
|
|
@@ -68,6 +82,8 @@ flowchart LR
|
|
|
68
82
|
|
|
69
83
|
### User Use-Case Flows
|
|
70
84
|
|
|
85
|
+
- **Diagram source (when generated):** `.viepilot/architecture/user-use-case.mermaid`
|
|
86
|
+
|
|
71
87
|
- **Status**: {{DIAGRAM_STATUS_USER_USE_CASE}}
|
|
72
88
|
- **Not applicable rationale**: {{DIAGRAM_NA_USER_USE_CASE}}
|
|
73
89
|
|
|
@@ -108,6 +124,8 @@ flowchart TD
|
|
|
108
124
|
|
|
109
125
|
## Deployment Architecture
|
|
110
126
|
|
|
127
|
+
**Diagram source (when generated):** `.viepilot/architecture/deployment.mermaid`
|
|
128
|
+
|
|
111
129
|
```
|
|
112
130
|
{{DEPLOYMENT_DIAGRAM}}
|
|
113
131
|
```
|
package/workflows/crystallize.md
CHANGED
|
@@ -287,6 +287,27 @@ Generation rules:
|
|
|
287
287
|
- `optional`: may be simplified or merged with a nearby section, but keep section heading discoverable
|
|
288
288
|
- `N/A`: keep heading and add one-line rationale (`Not applicable: ...`) so `vp-audit` and `vp-auto` can interpret intent
|
|
289
289
|
- Never default to “all six detailed diagrams”; diagram depth must scale with project complexity from brainstorm.
|
|
290
|
+
|
|
291
|
+
### Architecture diagram source files on disk (ENH-022)
|
|
292
|
+
|
|
293
|
+
When a diagram type is **`required`** or **`optional`** and you emit a **non-empty Mermaid diagram** for it, also persist the **same** diagram body (Mermaid source only — **no** markdown fences) under **`.viepilot/architecture/`** using the canonical filenames below. When status is **`N/A`** or the section has **no** real diagram (placeholder-only / rationale-only), **do not** create the matching `.mermaid` file (and remove a stale file if regenerating a project).
|
|
294
|
+
|
|
295
|
+
| Diagram type (matrix key) | File (under `.viepilot/architecture/`) |
|
|
296
|
+
|---------------------------|----------------------------------------|
|
|
297
|
+
| `system-overview` | `system-overview.mermaid` |
|
|
298
|
+
| `data-flow` | `data-flow.mermaid` |
|
|
299
|
+
| `event-flows` | `event-flows.mermaid` |
|
|
300
|
+
| `module-dependencies` | `module-dependencies.mermaid` |
|
|
301
|
+
| `deployment` | `deployment.mermaid` |
|
|
302
|
+
| `user-use-case` | `user-use-case.mermaid` |
|
|
303
|
+
|
|
304
|
+
**Single source of truth (mirror policy):** the line-for-line Mermaid **inside** the ` ```mermaid ` fence in `.viepilot/ARCHITECTURE.md` must match the contents of the paired `.viepilot/architecture/<name>.mermaid` file. If you update one, update the other in the same crystallize pass.
|
|
305
|
+
|
|
306
|
+
**System overview exception:** if the overview uses a non-Mermaid diagram (e.g. ASCII in a plain ` ``` ` block) and matrix marks `system-overview` as `required`, prefer converting to Mermaid for consistency; if you keep ASCII only, **omit** `system-overview.mermaid` and state that choice in the matrix reason column.
|
|
307
|
+
|
|
308
|
+
**Discoverability:** in `.viepilot/ARCHITECTURE.md`, under each diagram section that has a sidecar file, add a line with bold label **Diagram source** and an inline-code path `.viepilot/architecture/<filename>.mermaid`.
|
|
309
|
+
|
|
310
|
+
Create `.viepilot/architecture/` only when at least one `.mermaid` file will be written (empty directory otherwise is unnecessary).
|
|
290
311
|
</step>
|
|
291
312
|
|
|
292
313
|
<step name="generate_context">
|
|
@@ -480,6 +501,7 @@ Display summary:
|
|
|
480
501
|
│ ├── AI-GUIDE.md
|
|
481
502
|
│ ├── PROJECT-META.md
|
|
482
503
|
│ ├── ARCHITECTURE.md
|
|
504
|
+
│ ├── architecture/ (*.mermaid sidecars when diagrams generated — ENH-022)
|
|
483
505
|
│ ├── PROJECT-CONTEXT.md
|
|
484
506
|
│ ├── SYSTEM-RULES.md
|
|
485
507
|
│ ├── ROADMAP.md ({phase_count} phases)
|