viepilot 1.14.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +191 -0
  2. package/README.md +27 -17
  3. package/bin/viepilot.cjs +19 -9
  4. package/bin/vp-tools.cjs +193 -0
  5. package/docs/user/features/adapters.md +74 -0
  6. package/docs/user/features/hooks.md +93 -0
  7. package/lib/adapters/antigravity.cjs +33 -0
  8. package/lib/adapters/claude-code.cjs +42 -0
  9. package/lib/adapters/codex.cjs +34 -0
  10. package/lib/adapters/cursor.cjs +32 -0
  11. package/lib/adapters/index.cjs +28 -0
  12. package/lib/hooks/brainstorm-staleness.cjs +231 -0
  13. package/lib/viepilot-config.cjs +103 -0
  14. package/lib/viepilot-install.cjs +125 -152
  15. package/package.json +1 -3
  16. package/skills/vp-audit/SKILL.md +23 -23
  17. package/skills/vp-auto/SKILL.md +23 -9
  18. package/skills/vp-brainstorm/SKILL.md +44 -38
  19. package/skills/vp-crystallize/SKILL.md +25 -19
  20. package/skills/vp-debug/SKILL.md +4 -4
  21. package/skills/vp-docs/SKILL.md +8 -8
  22. package/skills/vp-evolve/SKILL.md +26 -13
  23. package/skills/vp-info/SKILL.md +24 -24
  24. package/skills/vp-pause/SKILL.md +7 -7
  25. package/skills/vp-request/SKILL.md +14 -14
  26. package/skills/vp-resume/SKILL.md +6 -6
  27. package/skills/vp-rollback/SKILL.md +4 -4
  28. package/skills/vp-status/SKILL.md +4 -4
  29. package/skills/vp-task/SKILL.md +2 -2
  30. package/skills/vp-ui-components/SKILL.md +14 -14
  31. package/skills/vp-update/SKILL.md +18 -18
  32. package/templates/architect/apis.html +11 -10
  33. package/templates/architect/architect-actions.js +217 -0
  34. package/templates/architect/architecture.html +8 -7
  35. package/templates/architect/data-flow.html +5 -4
  36. package/templates/architect/decisions.html +4 -3
  37. package/templates/architect/deployment.html +10 -9
  38. package/templates/architect/erd.html +7 -6
  39. package/templates/architect/feature-map.html +5 -4
  40. package/templates/architect/sequence-diagram.html +6 -5
  41. package/templates/architect/style.css +146 -0
  42. package/templates/architect/tech-notes.html +3 -2
  43. package/templates/architect/tech-stack.html +8 -7
  44. package/templates/architect/user-use-cases.html +8 -7
  45. package/templates/project/AI-GUIDE.md +49 -49
  46. package/workflows/audit.md +3 -3
  47. package/workflows/autonomous.md +70 -5
  48. package/workflows/brainstorm.md +398 -222
  49. package/workflows/crystallize.md +51 -33
  50. package/workflows/debug.md +9 -9
  51. package/workflows/documentation.md +5 -5
  52. package/workflows/evolve.md +46 -12
  53. package/workflows/pause-work.md +2 -2
  54. package/workflows/request.md +8 -8
  55. package/workflows/resume-work.md +1 -1
  56. package/workflows/rollback.md +1 -1
  57. package/dev-install.sh +0 -150
  58. package/install.sh +0 -125
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Chuyển đổi brainstorm sessions thành structured artifacts để AI có thể autonomous execution.
2
+ Convert brainstorm sessions into structured artifacts for autonomous AI execution.
3
3
  </purpose>
4
4
 
5
5
  ## ViePilot Skill Scope Policy (BUG-004)
@@ -11,6 +11,19 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
11
11
 
12
12
  <process>
13
13
 
14
+ <step name="load_language_config">
15
+ ## Step 0-A: Load Language Configuration (ENH-032)
16
+
17
+ Read `~/.viepilot/config.json` → set session variables:
18
+ - `DOCUMENT_LANG` — language for generated project files (default: `en`)
19
+ - `COMMUNICATION_LANG` — language for AI↔user messages (default: `en`)
20
+
21
+ Use `DOCUMENT_LANG` for all file content written in Steps 1–9.
22
+ Use `COMMUNICATION_LANG` for all prompts and confirmation messages in this session.
23
+
24
+ If `~/.viepilot/config.json` is absent, use defaults (en/en) — do not fail.
25
+ </step>
26
+
14
27
  <step name="collect_metadata">
15
28
  ## Step 0: Collect Project Metadata
16
29
 
@@ -18,34 +31,34 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
18
31
 
19
32
  Normative: **`docs/dev/global-profiles.md`**. Binding: **`.viepilot/META.md`** (`viepilot_profile_id`, optional `viepilot_profile_path`).
20
33
 
21
- **Trước** block câu hỏi Basic Info:
34
+ **Before** the Basic Info question block:
22
35
 
23
- 1. Nếu `.viepilot/META.md`, parse YAML frontmatter lấy `viepilot_profile_id` tùy chọn `viepilot_profile_path`.
24
- 2. **Resolve** file profile markdown:
25
- - Nếu `viepilot_profile_path` file tồn tại (expand `~` / `$HOME`) → dùng path đó.
26
- - Else nếu `viepilot_profile_id` hợp lệ → `$HOME/.viepilot/profiles/<viepilot_profile_id>.md`.
27
- 3. **Khi đọc được file profile:**
28
- - Đọc frontmatter (`display_name`, `org_tag`, `website`, `tags`, …) body (`## Organization`, `## Branding & voice`, `## Audience`, `## Legal & attribution`, `## Contact (public)`).
29
- - **Pre-fill** các câu hỏi Step 0 (org, website, tả ngắn nếu khớp) dưới dạng **proposal**; user **confirm** hoặc **sửa**.
30
- - Ghi working note **`profile_resolved`**: `{ profile_id, absolute_path }` cho các bước sau.
31
- 4. **Khi không META, thiếu id, hoặc file không tồn tại:**
32
- - Ghi **`profile_resolved: none`** tiếp tục Step 0 như — **không** fail crystallize.
36
+ 1. If `.viepilot/META.md` exists, parse YAML frontmatter to extract `viepilot_profile_id` and optionally `viepilot_profile_path`.
37
+ 2. **Resolve** the profile markdown file:
38
+ - If `viepilot_profile_path` is set and the file exists (expand `~` / `$HOME`) → use that path.
39
+ - Else if a valid `viepilot_profile_id` is present → `$HOME/.viepilot/profiles/<viepilot_profile_id>.md`.
40
+ 3. **When the profile file is readable:**
41
+ - Read frontmatter (`display_name`, `org_tag`, `website`, `tags`, …) and body (`## Organization`, `## Branding & voice`, `## Audience`, `## Legal & attribution`, `## Contact (public)`).
42
+ - **Pre-fill** Step 0 questions (org, website, short description if matched) as a **proposal**; user must **confirm** or **edit**.
43
+ - Record working note **`profile_resolved`**: `{ profile_id, absolute_path }` for use in later steps.
44
+ 4. **When META is absent, id is missing, or file does not exist:**
45
+ - Record **`profile_resolved: none`** and continue Step 0 as normaldo **not** fail crystallize.
33
46
 
34
- Hỏi user các thông tin dự án:
47
+ Ask the user for project information:
35
48
 
36
49
  ### Basic Info
37
50
  ```
38
- 1. Tên dự án?
51
+ 1. Project name?
39
52
  Default: (extract from brainstorm)
40
53
 
41
- 2. tả ngắn gọn (1-2 câu)?
54
+ 2. Short description (1-2 sentences)?
42
55
  ```
43
56
 
44
57
  ### Organization Info
45
58
  ```
46
- 3. Tên công ty/tổ chức phát triển?
59
+ 3. Company/organization name?
47
60
 
48
- 4. Website công ty? (optional)
61
+ 4. Company website? (optional)
49
62
  ```
50
63
 
51
64
  ### Package Info
@@ -63,9 +76,9 @@ Hỏi user các thông tin dự án:
63
76
 
64
77
  ### Developer Info
65
78
  ```
66
- 8. Tên người phát triển chính?
79
+ 8. Lead developer name?
67
80
 
68
- 9. Email người phát triển chính?
81
+ 9. Lead developer email?
69
82
 
70
83
  10. GitHub username? (optional)
71
84
  ```
@@ -84,7 +97,7 @@ Hỏi user các thông tin dự án:
84
97
  Options: MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, Proprietary
85
98
  Default: MIT
86
99
 
87
- 14. Năm bắt đầu dự án?
100
+ 14. Project start year?
88
101
  Default: {current_year}
89
102
  ```
90
103
 
@@ -127,6 +140,11 @@ If gaps found → ask user to clarify or return to brainstorm.
127
140
  <step name="consume_ui_direction">
128
141
  ## Step 1A: Consume UI Direction Artifacts (for UI/UX projects)
129
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
+
130
148
  ### UI Scope Detection (ENH-026 hard gate)
131
149
 
132
150
  Before checking for artifacts, scan brainstorm session files (`docs/brainstorm/session-*.md`) for UI signal keywords:
@@ -144,10 +162,10 @@ If `ui_scope_detected = true` **AND** artifacts are missing → **STOP** and pre
144
162
  ```
145
163
  ⚠️ UI Direction artifacts missing
146
164
 
147
- Phiên brainstorm cho thấy dự án UI scope nhưng `.viepilot/ui-direction/` chưa artifacts.
165
+ The brainstorm session indicates this project has UI scope but `.viepilot/ui-direction/` has no artifacts yet.
148
166
 
149
- 1. Quay lại /vp-brainstorm --ui để tạo direction trước (khuyến nghị)
150
- 2. Tiếp tục với assumptions — ghi vào ARCHITECTURE.md proceed
167
+ 1. Return to /vp-brainstorm --ui to create direction first (recommended)
168
+ 2. Continue with assumptions — record in ARCHITECTURE.md and proceed
151
169
  ```
152
170
 
153
171
  **Option 2 path**: append to `.viepilot/ARCHITECTURE.md`:
@@ -307,9 +325,9 @@ If `.viepilot/architect/` exists with at least one session directory:
307
325
  If `.viepilot/architect/` does **not** exist but brainstorm shows complex architecture (≥5 services/components detected):
308
326
  - Suggest (soft prompt — not a hard block):
309
327
  ```
310
- 💡 Bạn muốn quay lại /vp-brainstorm --architect để tạo visualization trước không?
311
- 1. quay lại architect mode
312
- 2. Khôngtiếp tục crystallize với text-only brainstorm
328
+ 💡 Would you like to return to /vp-brainstorm --architect to create visualizations first?
329
+ 1. Yesreturn to architect mode
330
+ 2. Nocontinue crystallize with text-only brainstorm
313
331
  ```
314
332
  - User confirmation required before proceeding.
315
333
  </step>
@@ -322,7 +340,7 @@ Create `.viepilot/AI-GUIDE.md` using template:
322
340
 
323
341
  Customize with:
324
342
  - Project-specific file references
325
- - **ViePilot profile (FEAT-009):** Nếu Step 0 đặt `profile_resolved` thành đường dẫn hợp lệ, thêm mục **Quick context** ghi `profile_id`, đường dẫn file profile, nhắc đọc file đó cho **tone/branding** khi viết user-facing text. Nếu `profile_resolved: none`, ghi một dòng: chưa bind profile global.
343
+ - **ViePilot profile (FEAT-009):** If Step 0 set `profile_resolved` to a valid path, add a **Quick context** entry recording `profile_id`, the profile file path, and a reminder to read that file for **tone/branding** when writing user-facing text. If `profile_resolved: none`, write a single line: no global profile bound.
326
344
  - Context loading strategy based on project size — **preserve template ordering** where `PROJECT-CONTEXT.md` **`<product_vision>`** and **`ROADMAP.md` phases** are read **before** deep implementation / architecture lock; state this explicitly in the generated `AI-GUIDE.md` if you trim sections
327
345
  - Quick lookup for project-specific terms
328
346
  - Fast stack lookup section:
@@ -343,7 +361,7 @@ Fill with collected metadata:
343
361
  - Package structure (generate from base ID)
344
362
  - Developer info
345
363
  - File headers (generate from metadata)
346
- - **FEAT-009:** Nếu profile đã resolve Step 0 user đã confirm pre-fill, **ưu tiên** khớp bảng Organization / attribution trong template với nội dung profile (chỉ dữ liệu công khai; không secrets).
364
+ - **FEAT-009:** If the profile was resolved in Step 0 and the user confirmed the pre-fill, **prioritize** aligning the Organization / attribution table in the template with the profile content (public data only; no secrets).
347
365
  </step>
348
366
 
349
367
  <step name="generate_architecture">
@@ -361,7 +379,7 @@ Extract from brainstorm:
361
379
 
362
380
  ### ViePilot organization context (FEAT-009)
363
381
 
364
- - Nếu Step 0 ghi **`profile_resolved`** với đường dẫn hợp lệ: ngay sau phần **overview** đầu tiên của `.viepilot/ARCHITECTURE.md`, thêm section:
382
+ - If Step 0 recorded **`profile_resolved`** with a valid path: immediately after the first **overview** section of `.viepilot/ARCHITECTURE.md`, add the following section:
365
383
 
366
384
  ```markdown
367
385
  ## ViePilot organization context
@@ -370,9 +388,9 @@ Extract from brainstorm:
370
388
 
371
389
  ```
372
390
 
373
- Sau đó **2–8 bullet** tóm tắt (không secrets) từ **Organization**, **Branding & voice**, **Audience** trong file profile.
391
+ Then add **2–8 bullets** summarizing (no secrets) from the **Organization**, **Branding & voice**, and **Audience** sections of the profile file.
374
392
 
375
- - Nếu **`profile_resolved: none`**: một dòng dưới overview: *No ViePilot global profile bound — organization context comes from Step 0 only.*
393
+ - If **`profile_resolved: none`**: add one line below the overview: *No ViePilot global profile bound — organization context comes from Step 0 only.*
376
394
 
377
395
  Before writing diagrams, create a **diagram applicability matrix** from brainstorm signals (complexity, service boundaries, event usage, deployment shape, user-flow complexity, integration surface):
378
396
 
@@ -426,7 +444,7 @@ Extract:
426
444
  - Naming conventions
427
445
  - Constraints
428
446
 
429
- **FEAT-009 — ViePilot active profile block:** Nếu profile đã resolve Step 0, chèn **trước** `<domain_knowledge>` (hoặc ngay sau title file) section:
447
+ **FEAT-009 — ViePilot active profile block:** If the profile was resolved in Step 0, insert **before** `<domain_knowledge>` (or immediately after the file title) the following section:
430
448
 
431
449
  ```markdown
432
450
  ## ViePilot active profile (FEAT-009)
@@ -441,7 +459,7 @@ Extract:
441
459
 
442
460
  ```
443
461
 
444
- Nếu không profile: một dòng *Profile binding not configured (`META.md` or global profile file missing).*
462
+ If no profile: a single line *Profile binding not configured (`META.md` or global profile file missing).*
445
463
  </step>
446
464
 
447
465
  <step name="generate_rules">
@@ -1,6 +1,6 @@
1
1
  <purpose>
2
- Systematic debugging workflow với persistent state tracking.
3
- Giúp organize debugging process track progress qua nhiều sessions.
2
+ Systematic debugging workflow with persistent state tracking.
3
+ Helps organize the debugging process and track progress across multiple sessions.
4
4
  </purpose>
5
5
 
6
6
  ## ViePilot Skill Scope Policy (BUG-004)
@@ -11,8 +11,8 @@ Giúp organize debugging process và track progress qua nhiều sessions.
11
11
 
12
12
  ## Implementation routing guard (debug)
13
13
 
14
- - **`debug.md`**: ưu tiên **điều tra**, log session, chạy test — **không** sửa shipping mặc định cho đến khi (a) user **explicit** *sửa luôn* / *hotfix*, hoặc (b) đã route **`/vp-request`** + **`/vp-evolve`** + **`/vp-auto`** cho fix cấu trúc.
15
- - Reproduce/minimal patch **chỉ để xác minh giả thuyết** được phép nếu nhỏ user đồng ý ngầm trong phiên debug; merge fix thật vẫn nên qua **`/vp-auto`** khi task plan.
14
+ - **`debug.md`**: prioritizes **investigation**, session logging, running testsdoes **not** modify shipping code by default until (a) user **explicitly** says *fix now* / *hotfix*, or (b) already routed through **`/vp-request`** + **`/vp-evolve`** + **`/vp-auto`** for a structured fix.
15
+ - Reproduce/minimal patch **only to verify hypotheses** is allowed if small and the user implicitly agrees during the debug session; merging the real fix should still go through **`/vp-auto`** when a task plan exists.
16
16
 
17
17
 
18
18
  <process>
@@ -61,11 +61,11 @@ Go to step 3 (New Session).
61
61
 
62
62
  Ask user:
63
63
  ```
64
- tả vấn đề bạn đang gặp:
65
- 1. Vấn đề gì?
66
- 2. Triệu chứng? (error messages, behavior)
67
- 3. Khi nào xảy ra? (điều kiện)
68
- 4. Files liên quan?
64
+ Describe the problem you are facing:
65
+ 1. What is the problem?
66
+ 2. Symptoms? (error messages, behavior)
67
+ 3. When does it occur? (conditions)
68
+ 4. Related files?
69
69
  ```
70
70
 
71
71
  Create session:
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Generate comprehensive documentation từ code artifacts.
2
+ Generate comprehensive documentation from code and artifacts.
3
3
  </purpose>
4
4
 
5
5
  ## ViePilot Skill Scope Policy (BUG-004)
@@ -60,11 +60,11 @@ For viepilot framework repos, also use `$ACTUAL_SKILLS`, `$ACTUAL_WORKFLOWS`.
60
60
 
61
61
  ### 0A. ViePilot active profile (FEAT-009)
62
62
 
63
- Normative: **`docs/dev/global-profiles.md`**. Cùng **resolution** như `workflows/crystallize.md` Step 0 (đọc `.viepilot/META.md` → `viepilot_profile_path` hoặc `$HOME/.viepilot/profiles/<viepilot_profile_id>.md`).
63
+ Normative: **`docs/dev/global-profiles.md`**. Same **resolution** as `workflows/crystallize.md` Step 0 (read `.viepilot/META.md` → `viepilot_profile_path` or `$HOME/.viepilot/profiles/<viepilot_profile_id>.md`).
64
64
 
65
- 1. Nếu đọc được file profile, giữ **working notes** (display_name, org_tag, website, audience, branding) để dùng khi sinh README / contributing / bất kỳ prose **attribution** — chỉ nội dung **công khai**, không secrets.
66
- 2. Nếu không binding hoặc file thiếutiếp tục; **không** fail `/vp-docs`.
67
- 3. Khi profile, nhắc trong output (vd. footer README hoặc `docs/dev/architecture.md`) một dòng trích **profile_id** nếu phù hợp policy dự án.
65
+ 1. If the profile file is readable, keep **working notes** (display_name, org_tag, website, audience, branding) for use when generating README / contributing / any prose **attribution** — public content only, no secrets.
66
+ 2. If no binding exists or file is missing continue; do **not** fail `/vp-docs`.
67
+ 3. When a profile is present, mention in output (e.g., README footer or `docs/dev/architecture.md`) one line referencing **profile_id** if appropriate for the project policy.
68
68
 
69
69
  Post-generation validation (run after all files generated):
70
70
  ```bash
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Nâng cấp hoặc mở rộng dự án: thêm features, bắt đầu milestone mới, hoặc refactor.
2
+ Upgrade or expand the project: add features, start a new milestone, or refactor.
3
3
  </purpose>
4
4
 
5
5
  ## ViePilot Skill Scope Policy (BUG-004)
@@ -10,9 +10,9 @@ Nâng cấp hoặc mở rộng dự án: thêm features, bắt đầu milestone
10
10
 
11
11
  ## Implementation routing guard (planning vs execution)
12
12
 
13
- - **`evolve.md`** chỉ **lập kế hoạch**: ROADMAP, phase dir, SPEC/tasks, TRACKER, ghi chú CHANGELOG `[Unreleased]` khi workflow yêu cầu — **không** implement shipping mặc định (`lib/`, `tests/`, `bin/`, `workflows/` ngoài plan, v.v.).
14
- - **Bước tiếp:** **`/vp-auto`** sau khi task/phase plan (doc-first **BUG-001**).
15
- - **Ngoại lệ:** User **explicit** bypass — phải nêu trong chat.
13
+ - **`evolve.md`** only **plans**: ROADMAP, phase dir, SPEC/tasks, TRACKER, CHANGELOG `[Unreleased]` notes when the workflow requiresdoes **not** implement shipping code by default (`lib/`, `tests/`, `bin/`, `workflows/` outside plan, etc.).
14
+ - **Next step:** **`/vp-auto`** after task/phase has a plan (doc-first **BUG-001**).
15
+ - **Exception:** User **explicit** bypass — must be stated clearly in chat.
16
16
 
17
17
 
18
18
  <process>
@@ -63,7 +63,7 @@ Describe the new feature:
63
63
  3. Which services/modules affected?
64
64
  4. Dependencies on existing code?
65
65
  5. Estimated complexity? (S/M/L/XL)
66
- 6. cần brainstorm chuyên sâu không? (landing page / UX / growth ideas / research-heavy)
66
+ 6. Need deep brainstorm? (landing page / UX / growth ideas / research-heavy)
67
67
  ```
68
68
 
69
69
  ### Check Architecture Compatibility
@@ -79,12 +79,12 @@ Questions:
79
79
 
80
80
  If incompatible → suggest refactor first or discuss alternative.
81
81
 
82
- ### Smart Route to Brainstorm (khi phù hợp)
83
- Nếu feature nội dung thiên về product discovery, UX, hoặc landing page:
84
- - Route qua brainstorm nâng cao thay chốt phase ngay:
85
- - `/vp-brainstorm --new --landing --research` (nếu landing page)
86
- - `/vp-brainstorm --new --research` (nếu cần research decision)
87
- - Sau khi brainstorm xong, quay lại `/vp-evolve` để crystallize phase/tasks.
82
+ ### Smart Route to Brainstorm (when applicable)
83
+ If the feature leans toward product discovery, UX, or landing page:
84
+ - Route through advanced brainstorm instead of locking the phase immediately:
85
+ - `/vp-brainstorm --new --landing --research` (if there is a landing page)
86
+ - `/vp-brainstorm --new --research` (if a research decision is needed)
87
+ - After brainstorm is complete, return to `/vp-evolve` to crystallize phase/tasks.
88
88
 
89
89
  ### Generate Phase
90
90
  Create new phase in ROADMAP.md:
@@ -103,6 +103,40 @@ Create new phase in ROADMAP.md:
103
103
  - [ ] {criteria}
104
104
  ```
105
105
 
106
+ ### ⚠️ TASK PATH RULE (BUG-009)
107
+
108
+ When writing the `## Paths` block in **any task `.md` file**, ALWAYS use paths
109
+ **relative to the repository root** (where `package.json` / `Makefile` lives).
110
+
111
+ ```
112
+ CORRECT (repo-relative):
113
+ workflows/crystallize.md
114
+ skills/vp-audit/SKILL.md
115
+ templates/project/AI-GUIDE.md
116
+ lib/viepilot-config.cjs
117
+ bin/vp-tools.cjs
118
+ tests/unit/my-test.test.js
119
+
120
+ INCORRECT (never use in ## Paths):
121
+ ~/.claude/viepilot/workflows/crystallize.md
122
+ ~/.claude/skills/vp-audit/SKILL.md
123
+ /Users/someone/.claude/...
124
+ /absolute/path/to/anything
125
+ ```
126
+
127
+ **Exception:** paths *inside* code block content (bash examples, runtime descriptions)
128
+ may reference absolute paths (e.g., `~/.claude/viepilot/config.json` inside a bash
129
+ snippet). Only the `## Paths` header block must be repo-relative.
130
+
131
+ If unsure of the repo-relative path, inspect:
132
+ - `ls workflows/` → workflow files
133
+ - `ls skills/` → skill files
134
+ - `ls lib/` → library files
135
+ - `ls bin/` → CLI files
136
+ - `ls templates/` → template files
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
+
106
140
  ### Create Phase Directory
107
141
  ```bash
108
142
  mkdir -p .viepilot/phases/{NN}-{feature-slug}/tasks/
@@ -168,7 +202,7 @@ New milestone details:
168
202
 
169
203
  Options:
170
204
  - Route to `/vp-brainstorm --new` for full brainstorm
171
- - Nếu milestone landing page focus: `/vp-brainstorm --new --landing --research`
205
+ - If milestone has landing page focus: `/vp-brainstorm --new --landing --research`
172
206
  - Quick setup with minimal questions
173
207
 
174
208
  ### Generate New ROADMAP.md
@@ -1,6 +1,6 @@
1
1
  <purpose>
2
- Save complete work state để thể resume từ bất kỳ context nào.
3
- Creates HANDOFF.json .continue-here.md cho recovery.
2
+ Save complete work state so it can be resumed from any context.
3
+ Creates HANDOFF.json and .continue-here.md for recovery.
4
4
  </purpose>
5
5
 
6
6
  <process>
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Tạo quản requests cho dự án: bugs, features, enhancements, tech debt, brainstorm continuation.
2
+ Create and manage project requests: bugs, features, enhancements, tech debt, and brainstorm continuation.
3
3
  </purpose>
4
4
 
5
5
  ## ViePilot Skill Scope Policy (BUG-004)
@@ -10,9 +10,9 @@ Tạo và quản lý requests cho dự án: bugs, features, enhancements, tech d
10
10
 
11
11
  ## Implementation routing guard (planning vs execution)
12
12
 
13
- - Workflow **`request.md`** chỉ **ghi nhận, backlog, triage** — **không** lane mặc định để **implement** shipping (`lib/`, `tests/`, `bin/`, `src/` app, `workflows/`, `skills/` trong repo framework, v.v.).
14
- - **Chuỗi khuyến nghị sau khi có request:** `/vp-evolve` (ROADMAP, phase, SPEC/tasks, task plan; doc-first **BUG-001** khi áp dụng) → **`/vp-auto`** (thực thi + verify + git persistence **BUG-003**).
15
- - **Ngoại lệ:** User **explicit** (vd. *hotfix ngay*, *sửa file X trong chat này*, *bypass planning*) → được implement trực tiếp; assistant **phải nêu rõ** đang bypass guard.
13
+ - Workflow **`request.md`** only **records, backlogs, and triages** — it is **not** the default lane to **implement** shipping code (`lib/`, `tests/`, `bin/`, `src/` app, `workflows/`, `skills/` in the framework repo, etc.).
14
+ - **Recommended chain after a request:** `/vp-evolve` (ROADMAP, phase, SPEC/tasks, task plan; doc-first **BUG-001** when applicable) → **`/vp-auto`** (execute + verify + git persistence **BUG-003**).
15
+ - **Exception:** User **explicitly** states (e.g., *hotfix now*, *fix file X in this chat*, *bypass planning*) → direct implementation is allowed; the assistant **must state clearly** it is bypassing the guard.
16
16
 
17
17
 
18
18
  <process>
@@ -455,8 +455,8 @@ Current task: {task}
455
455
 
456
456
  If option 1:
457
457
  - Save current state (like /vp-pause)
458
- - Create emergency fix phase (minimal SPEC/tasks) **hoặc** user explicit hotfix
459
- - Route to **`/vp-auto`** — vẫn qua task plan ngắn khi thể; **không** implement lặng trong thread `/vp-request` trừ user explicit bypass
458
+ - Create emergency fix phase (minimal SPEC/tasks) **or** user explicit hotfix
459
+ - Route to **`/vp-auto`** — still go through a short task plan when possible; do **not** implement silently inside the `/vp-request` thread unless the user explicitly bypasses
460
460
 
461
461
  ### High Priority Feature
462
462
  ```
@@ -466,7 +466,7 @@ Options:
466
466
  1. Add to current milestone
467
467
  2. Brainstorm more first
468
468
  3. Schedule for next milestone
469
- 4. **Plan then execute:** `/vp-evolve` → `/vp-auto` (không implement trực tiếp trong thread `/vp-request` trừ user explicit override)
469
+ 4. **Plan then execute:** `/vp-evolve` → `/vp-auto` (do not implement directly inside the `/vp-request` thread unless user explicitly overrides)
470
470
  ```
471
471
 
472
472
  ### Regular Request
@@ -527,7 +527,7 @@ git push
527
527
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
528
528
 
529
529
  /vp-request --list View all requests
530
- /vp-evolve ROADMAP + phase/tasks (trước code)
530
+ /vp-evolve ROADMAP + phase/tasks (before code)
531
531
  /vp-auto Implement theo task plan (sau evolve)
532
532
  /vp-request Create another request
533
533
  /vp-status See overall progress
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Restore complete project context resume work seamlessly từ previous session.
2
+ Restore complete project context and resume work seamlessly from a previous session.
3
3
  </purpose>
4
4
 
5
5
  <process>
@@ -1,5 +1,5 @@
1
1
  <purpose>
2
- Safe rollback to any ViePilot checkpoint với backup state preservation.
2
+ Safe rollback to any ViePilot checkpoint with backup and state preservation.
3
3
  </purpose>
4
4
 
5
5
  <process>
package/dev-install.sh DELETED
@@ -1,150 +0,0 @@
1
- #!/bin/bash
2
-
3
- # ViePilot Development Installation Script
4
- # Installs development build without symlink dependency by default
5
- #
6
- # Optional: VIEPILOT_SYMLINK_SKILLS=1 — symlink each skills/vp-* into ~/.cursor/skills/
7
- # (live edits from this repo; default remains copy for reliability — see FEAT-005)
8
-
9
- set -e
10
-
11
- # Colors
12
- RED='\033[0;31m'
13
- GREEN='\033[0;32m'
14
- YELLOW='\033[1;33m'
15
- BLUE='\033[0;34m'
16
- NC='\033[0m'
17
-
18
- # Get script directory (project root)
19
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
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-agent}"
24
-
25
- echo -e "${BLUE}"
26
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
27
- echo " VIEPILOT DEV INSTALLER"
28
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
29
- echo -e "${NC}"
30
-
31
- if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
32
- echo -e "${YELLOW}Development mode installation (skills: SYMLINK → repo)${NC}"
33
- else
34
- echo -e "${YELLOW}Development mode installation (copy-first for reliability)${NC}"
35
- fi
36
- echo " Source: $SCRIPT_DIR"
37
- echo " Target: $CURSOR_SKILLS_DIR, $VIEPILOT_DIR"
38
- echo " Profile: $INSTALL_PROFILE"
39
- echo ""
40
-
41
- check_cloc_dependency() {
42
- if command -v cloc >/dev/null 2>&1; then
43
- echo -e " ${GREEN}✓${NC} cloc detected"
44
- return 0
45
- fi
46
-
47
- echo -e "${YELLOW} cloc not found.${NC}"
48
- echo " README LOC auto-sync will fallback safely, but metrics won't refresh automatically."
49
- echo " Install suggestion:"
50
- echo " - macOS: brew install cloc"
51
- echo " - Ubuntu/Debian: sudo apt-get install -y cloc"
52
- echo " - Windows: choco install cloc"
53
- }
54
-
55
- # Confirm
56
- if [ "$AUTO_YES" != "1" ]; then
57
- read -p "This will replace existing installation with dev files. Continue? (y/n) " -n 1 -r
58
- echo
59
- if [[ ! $REPLY =~ ^[Yy]$ ]]; then
60
- echo "Installation cancelled."
61
- exit 0
62
- fi
63
- else
64
- echo "Auto-yes enabled via VIEPILOT_AUTO_YES=1"
65
- fi
66
-
67
- echo ""
68
- echo -e "${BLUE}Removing old installations...${NC}"
69
-
70
- # Remove old skill installations
71
- for skill in "$CURSOR_SKILLS_DIR"/vp-*/; do
72
- if [ -d "$skill" ] || [ -L "$skill" ]; then
73
- rm -rf "$skill"
74
- echo " Removed: $(basename "$skill")"
75
- fi
76
- done
77
-
78
- # Remove old viepilot installation
79
- if [ -d "$VIEPILOT_DIR" ] || [ -L "$VIEPILOT_DIR" ]; then
80
- rm -rf "$VIEPILOT_DIR"
81
- echo " Removed: viepilot/"
82
- fi
83
-
84
- echo ""
85
- echo -e "${BLUE}Installing skills...${NC}"
86
-
87
- # Install skills: copy (default) or symlink when VIEPILOT_SYMLINK_SKILLS=1
88
- mkdir -p "$CURSOR_SKILLS_DIR"
89
- for skill in "$SCRIPT_DIR"/skills/vp-*/; do
90
- skill_name=$(basename "$skill")
91
- if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
92
- if command -v realpath >/dev/null 2>&1; then
93
- skill_abs=$(realpath "$skill")
94
- else
95
- skill_abs=$(cd "$skill" && pwd)
96
- fi
97
- ln -sfn "$skill_abs" "$CURSOR_SKILLS_DIR/$skill_name"
98
- echo -e " ${GREEN}✓${NC} $skill_name (symlink)"
99
- else
100
- cp -R "$skill" "$CURSOR_SKILLS_DIR/$skill_name"
101
- echo -e " ${GREEN}✓${NC} $skill_name"
102
- fi
103
- done
104
-
105
- echo ""
106
- echo -e "${BLUE}Installing viepilot files...${NC}"
107
-
108
- # Install file copies (avoid symlink discovery issues)
109
- mkdir -p "$VIEPILOT_DIR"
110
- mkdir -p "$VIEPILOT_DIR/workflows"
111
- mkdir -p "$VIEPILOT_DIR/templates"
112
- mkdir -p "$VIEPILOT_DIR/bin"
113
- mkdir -p "$VIEPILOT_DIR/lib"
114
- mkdir -p "$VIEPILOT_DIR/ui-components"
115
-
116
- cp -R "$SCRIPT_DIR/workflows/"* "$VIEPILOT_DIR/workflows/"
117
- cp -R "$SCRIPT_DIR/templates/"* "$VIEPILOT_DIR/templates/"
118
- cp -R "$SCRIPT_DIR/bin/"* "$VIEPILOT_DIR/bin/"
119
- cp -R "$SCRIPT_DIR/lib/"* "$VIEPILOT_DIR/lib/"
120
- if [ -d "$SCRIPT_DIR/ui-components" ]; then
121
- cp -R "$SCRIPT_DIR/ui-components/"* "$VIEPILOT_DIR/ui-components/"
122
- fi
123
-
124
- echo -e " ${GREEN}✓${NC} workflows"
125
- echo -e " ${GREEN}✓${NC} templates"
126
- echo -e " ${GREEN}✓${NC} bin"
127
- echo -e " ${GREEN}✓${NC} lib"
128
- echo -e " ${GREEN}✓${NC} ui-components"
129
- check_cloc_dependency
130
-
131
- # Count installed
132
- SKILL_COUNT=$(ls -d "$CURSOR_SKILLS_DIR"/vp-*/ 2>/dev/null | wc -l | tr -d ' ')
133
- WORKFLOW_COUNT=$(ls "$SCRIPT_DIR"/workflows/*.md 2>/dev/null | wc -l | tr -d ' ')
134
-
135
- echo ""
136
- echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
137
- echo -e "${GREEN} DEV INSTALLATION COMPLETE ✓${NC}"
138
- echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
139
- echo ""
140
- if [ "${VIEPILOT_SYMLINK_SKILLS:-0}" = "1" ]; then
141
- echo "Installed (skills symlink mode):"
142
- echo -e "${YELLOW}Skills point at repo — edits in $SCRIPT_DIR/skills/ are live.${NC}"
143
- else
144
- echo "Installed (copy mode):"
145
- echo -e "${YELLOW}Development mode enabled (reliable copy mode).${NC}"
146
- echo "Re-run this script after local changes to refresh installed files."
147
- fi
148
- echo " - Skills: $SKILL_COUNT"
149
- echo " - Workflows: $WORKFLOW_COUNT"
150
- echo ""