viepilot 1.9.11 → 2.1.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 (60) hide show
  1. package/CHANGELOG.md +175 -2
  2. package/README.md +3 -3
  3. package/bin/viepilot.cjs +7 -5
  4. package/bin/vp-tools.cjs +193 -0
  5. package/dev-install.sh +34 -13
  6. package/docs/user/features/architect-design-mode.md +170 -0
  7. package/docs/user/features/hooks.md +93 -0
  8. package/docs/user/features/ui-direction.md +79 -3
  9. package/lib/adapters/claude-code.cjs +42 -0
  10. package/lib/adapters/cursor.cjs +31 -0
  11. package/lib/adapters/index.cjs +26 -0
  12. package/lib/hooks/brainstorm-staleness.cjs +231 -0
  13. package/lib/viepilot-config.cjs +103 -0
  14. package/lib/viepilot-install.cjs +128 -153
  15. package/package.json +1 -1
  16. package/skills/vp-audit/SKILL.md +21 -21
  17. package/skills/vp-auto/SKILL.md +21 -7
  18. package/skills/vp-brainstorm/SKILL.md +46 -35
  19. package/skills/vp-crystallize/SKILL.md +37 -25
  20. package/skills/vp-debug/SKILL.md +2 -2
  21. package/skills/vp-docs/SKILL.md +7 -7
  22. package/skills/vp-evolve/SKILL.md +25 -12
  23. package/skills/vp-info/SKILL.md +23 -23
  24. package/skills/vp-pause/SKILL.md +5 -5
  25. package/skills/vp-request/SKILL.md +12 -12
  26. package/skills/vp-resume/SKILL.md +4 -4
  27. package/skills/vp-rollback/SKILL.md +3 -3
  28. package/skills/vp-status/SKILL.md +4 -4
  29. package/skills/vp-task/SKILL.md +3 -3
  30. package/skills/vp-ui-components/SKILL.md +12 -12
  31. package/skills/vp-update/SKILL.md +17 -17
  32. package/templates/architect/apis.html +159 -0
  33. package/templates/architect/architect-actions.js +217 -0
  34. package/templates/architect/architecture.html +160 -0
  35. package/templates/architect/data-flow.html +109 -0
  36. package/templates/architect/decisions.html +96 -0
  37. package/templates/architect/deployment.html +184 -0
  38. package/templates/architect/erd.html +154 -0
  39. package/templates/architect/feature-map.html +113 -0
  40. package/templates/architect/index.html +108 -0
  41. package/templates/architect/sequence-diagram.html +133 -0
  42. package/templates/architect/style.css +365 -0
  43. package/templates/architect/tech-notes.html +89 -0
  44. package/templates/architect/tech-stack.html +114 -0
  45. package/templates/architect/user-use-cases.html +154 -0
  46. package/templates/project/AI-GUIDE.md +53 -54
  47. package/templates/project/PROJECT-CONTEXT.md +7 -11
  48. package/templates/project/README.md +43 -0
  49. package/templates/project/ROADMAP.md +1 -27
  50. package/workflows/audit.md +3 -3
  51. package/workflows/autonomous.md +38 -5
  52. package/workflows/brainstorm.md +575 -191
  53. package/workflows/crystallize.md +168 -58
  54. package/workflows/debug.md +9 -9
  55. package/workflows/documentation.md +5 -5
  56. package/workflows/evolve.md +44 -12
  57. package/workflows/pause-work.md +2 -2
  58. package/workflows/request.md +8 -8
  59. package/workflows/resume-work.md +1 -1
  60. package/workflows/rollback.md +1 -1
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-brainstorm
3
- description: "Brainstorm session để thu thập ý tưởng, quyết định cho dự án"
4
- version: 0.6.3
3
+ description: "Brainstorm session to collect ideas and decisions for the project"
4
+ version: 1.1.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -10,7 +10,7 @@ version: 0.6.3
10
10
  - Treat all user text after the skill mention as `{{VP_ARGS}}`
11
11
 
12
12
  ## B. User Prompting
13
- Prompt user conversationally với numbered list options.
13
+ Prompt user conversationally with numbered list options.
14
14
 
15
15
  ## C. Tool Usage
16
16
  Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
@@ -25,28 +25,39 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - Trong phạm vi **session** (`docs/brainstorm/*`, `.viepilot/ui-direction/*`). **Không** implement thay **`/vp-auto`** cho `lib/`, `tests/`, thay đổi framework `workflows/`/`skills/` — sau brainstorm dùng **`/vp-crystallize`** / **`/vp-evolve`** → **`/vp-auto`** tùy giai đoạn. Override explicitnêu trong chat.
28
+ - Scoped to **session artifacts** (`docs/brainstorm/*`, `.viepilot/ui-direction/*`). Does **not** implement on behalf of **`/vp-auto`** for `lib/`, `tests/`, or framework `workflows/`/`skills/` changes after brainstorm use **`/vp-crystallize`** / **`/vp-evolve`** → **`/vp-auto`** depending on the stage. Explicit overridestate it in chat.
29
29
  </implementation_routing_guard>
30
30
 
31
31
 
32
32
  <objective>
33
- Thu thập ý tưởng, requirements, quyết định kiến trúc cho dự án thông qua interactive Q&A.
34
-
35
- Hỗ trợ:
36
- - Tạo session mới
37
- - Tiếp tục session
38
- - Xem lại session trước đó
39
- - Landing page layout discovery (hỏi thêm để chốt bố cục)
40
- - In-session research (research ngay trong phiên brainstorm theo yêu cầu)
41
- - UI Direction mode: tạo/cập nhật HTML prototype + notes trong `.viepilot/ui-direction/{session-id}/` — hỗ trợ **multi-page** (`pages/{slug}.html` + hub `index.html`) hook **`## Pages inventory`** trong `notes.md` khi `pages/` (FEAT-007)
42
- - **Product horizon (ENH-014):** mọi session phải duy trì **`## Product horizon`** khi thảo luận capability/milestonetier tags `(MVP)` / `(Post-MVP)` / `(Future)`, non-goals, deferred capabilities; hoặc ghi **single-release / no deferred epics** (contract: `workflows/brainstorm.md`)
43
- - **Project meta intake (FEAT-009):** sau khi **scope locked**, **trước** `Completed` / `/end`, nếu thiếu `.viepilot/META.md` (`viepilot_profile_id`) — chạy Q&A **tuần tự** có proposal; đọc/ghi `~/.viepilot/profile-map.md`; tạo `~/.viepilot/profiles/<slug>.md` + binding theo **`docs/dev/global-profiles.md`**. Nếu đã profile bound — skip intake mặc định (hỏi đổi nếu cần).
44
- - **UX walkthrough (FEAT-010 + ENH-019 + ENH-020):** trong **`--ui`**, lệnh **`/research-ui`** hoặc **`/research ui`** chạy 3 phase phỏng **end-user** (kèm **content stress pass** + **stress recipes theo archetype** → **Stress findings**) → **UX designer + web research** → chỉnh `index.html` / `pages/*.html` / `style.css` ghi **`## UX walkthrough log`** trong `notes.md` (đồng bộ hub + **Pages inventory** khi multi-page).
33
+ Collect ideas, requirements, and architecture decisions for the project through interactive Q&A.
34
+
35
+ Supports:
36
+ - Create a new session
37
+ - Continue a previous session
38
+ - Review a past session
39
+ - Landing page layout discovery (follow-up questions to finalize layout)
40
+ - In-session research (research during the brainstorm session on demand)
41
+ - UI Direction mode: create/update HTML prototype + notes under `.viepilot/ui-direction/{session-id}/` — supports **multi-page** (`pages/{slug}.html` + hub `index.html`) and the **`## Pages inventory`** hook in `notes.md` when `pages/` exists (FEAT-007)
42
+ - **Phase assignment (ENH-030):** in every session, features/capabilities are assigned directly to Phase 1, Phase 2, Phase 3... no MVP/Post-MVP/Future tiers. Session file stores assignments in the `## Phases` section.
43
+ - **Project meta intake (FEAT-009):** after **scope locked**, **before** `Completed` / `/end`, if `.viepilot/META.md` (`viepilot_profile_id`) is missing run **sequential** Q&A with proposals; read/write `~/.viepilot/profile-map.md`; create `~/.viepilot/profiles/<slug>.md` + binding per **`docs/dev/global-profiles.md`**. If a profile is already bound — skip intake by default (ask if change needed).
44
+ - **UX walkthrough (FEAT-010 + ENH-019 + ENH-020):** in **`--ui`** mode, command **`/research-ui`** or **`/research ui`** runs 3 phasessimulates **end-user** (with **content stress pass** + **stress recipes by archetype** → **Stress findings**) → **UX designer + web research** → update `index.html` / `pages/*.html` / `style.css` and write **`## UX walkthrough log`** in `notes.md` (sync hub + **Pages inventory** for multi-page).
45
+ - **Background UI extraction (ENH-026):** automatically detects UI signal keywords in every brainstorm session (no `--ui` flag required); silent accumulation buffer; surfaces for confirmation when topic ends, `/save`, or ≥5 signals — does not interrupt the main conversation.
46
+ - **Architect Design Mode (FEAT-011):** `/vp-brainstorm --architect` or auto-activate when ≥3 components/services detected; generate HTML workspace (architecture, data-flow, decisions, tech-stack, tech-notes, feature-map) with Mermaid diagrams; incremental update per decision; `/review-arch` command; machine-readable `notes.md` YAML schema.
47
+ - **ERD page (ENH-027):** Architect workspace includes `erd.html` — Mermaid `erDiagram`, entity list table, relationship summary; triggered by DB/entity/table/relationship keywords; notes.md `## erd` YAML section exported to ARCHITECTURE.md `## Database Schema` via crystallize Step 1D.
48
+ - **User Use Cases page (ENH-028):** Architect workspace includes `user-use-cases.html` — actor/use-case diagram (Mermaid flowchart), use case table; triggered by user/role/actor/story keywords; notes.md `## use_cases` YAML section exported to PROJECT-CONTEXT.md `## User Stories & Use Cases` via crystallize Step 1D.
49
+ - **C4Context/Sequence/Deployment/APIs pages (ENH-029, 12-page workspace):** Architect workspace expanded to 12 pages — `sequence-diagram.html` (per-scenario sequenceDiagram), `deployment.html` (infra graph + environments + CI/CD pipeline), `apis.html` (endpoint tables with HTTP method badges); page boundary rules table; trigger keywords for sequence/deploy/API; notes.md `## apis` YAML section; deployment+APIs exported to ARCHITECTURE.md via crystallize Step 1D (sequence excluded — scenario docs are not architecture artifacts).
45
50
 
46
51
  **Creates/Updates:**
47
52
  - `docs/brainstorm/session-{YYYY-MM-DD}.md`
48
53
 
49
54
  **After:** Ready for `/vp-crystallize`
55
+
56
+ **Language configuration (ENH-032):**
57
+ - Step 0 reads `~/.viepilot/config.json` → `BRAINSTORM_LANG` = `language.document` (default: `en`).
58
+ - `BRAINSTORM_LANG` is used for brainstorm file storage and generated content.
59
+ - User session language takes precedence over config if different.
60
+ - Configure via: `vp-tools config set language.document vi`
50
61
  </objective>
51
62
 
52
63
  <execution_context>
@@ -55,12 +66,12 @@ Hỗ trợ:
55
66
 
56
67
  <context>
57
68
  Optional flags:
58
- - `--new` : Force tạo session mới
59
- - `--continue` : Tiếp tục session gần nhất
60
- - `--list` : Liệt các sessions
61
- - `--landing` : Ưu tiên flow Landing Page layout discovery
62
- - `--research` : Bật proactive research suggestions trong phiên
63
- - `--ui` : Bật UI Direction mode (live HTML/CSS direction artifacts)
69
+ - `--new` : Force create a new session
70
+ - `--continue` : Continue the most recent session
71
+ - `--list` : List all sessions
72
+ - `--landing` : Prioritize the Landing Page layout discovery flow
73
+ - `--research` : Enable proactive research suggestions during the session
74
+ - `--ui` : Enable UI Direction mode (live HTML/CSS direction artifacts)
64
75
  </context>
65
76
 
66
77
  <process>
@@ -70,20 +81,20 @@ Key steps:
70
81
  1. Detect existing sessions
71
82
  2. Ask user intent (new/continue/review)
72
83
  3. Load context if continuing
73
- 4. Run interactive Q&A với topic-based structure
74
- 5. Nếu topic landing page: hỏi thêm bố cục + tham khảo `21st.dev` để đề xuất section/components
75
- 6. Nếu topic cần UI/UX: tạo/cập nhật UI Direction artifacts trong `.viepilot/ui-direction/{session-id}/` — legacy: `index.html` + `style.css` + `notes.md`; multi-page: thêm `pages/*.html`, `index.html` làm hub, sau mỗi thay đổi page cập nhật **`## Pages inventory`** trong `notes.md` (xem `docs/user/features/ui-direction.md`)
76
- 6b. Khi user **`/research-ui`** hoặc **`/research ui`** trong phiên UI: làm đúng **`workflows/brainstorm.md`** (FEAT-010) — không gộp vào bước research ngắn thường lệ
77
- 7. Nếu user yêu cầu research hoặc cần làm quyết định: research ngay trong session quay lại topic
78
- 8. Khi topic thêm/sửa capability hoặc release scope: cập nhật **`## Product horizon`** trong session (merge, không xóa tier tags im lặng) theo `workflows/brainstorm.md`
79
- 9. Trước khi hoàn tất phiên: **bước 5 — Project meta intake (FEAT-009)** trong `workflows/brainstorm.md` khi binding thiếu; sequential Q&A + profile-map disambiguation + ghi global profile + `.viepilot/META.md`
80
- 10. Save session with structured format (bao gồm **`## Project meta intake (FEAT-009)`**, research notes + UI direction references + **Product horizon** khi có)
84
+ 4. Run interactive Q&A with topic-based structure
85
+ 5. If topic is a landing page: ask follow-up layout questions + reference `21st.dev` to suggest sections/components
86
+ 6. If topic needs UI/UX: create/update UI Direction artifacts under `.viepilot/ui-direction/{session-id}/` — legacy: `index.html` + `style.css` + `notes.md`; multi-page: add `pages/*.html`, `index.html` as hub, and after each page change update **`## Pages inventory`** in `notes.md` (see `docs/user/features/ui-direction.md`)
87
+ 6b. When user types **`/research-ui`** or **`/research ui`** during a UI session: follow **`workflows/brainstorm.md`** exactly (FEAT-010) — do not merge into the short regular research step
88
+ 7. If user requests research or needs to clarify a decision: research inline in the session and return to the topic
89
+ 8. When a topic adds/modifies a capability: update **`## Phases`** in the session per `workflows/brainstorm.md`
90
+ 9. Before completing the session: **step 5 — Project meta intake (FEAT-009)** in `workflows/brainstorm.md` when binding is missing; sequential Q&A + profile-map disambiguation + write global profile + `.viepilot/META.md`
91
+ 10. Save session with structured format (including **`## Project meta intake (FEAT-009)`**, research notes + UI direction references + **`## Phases`**)
81
92
  11. Suggest next action: `/vp-crystallize`
82
93
  </process>
83
94
 
84
95
  <success_criteria>
85
- - [ ] Session file created/updated với đầy đủ sections
86
- - [ ] Decisions documented với rationale
96
+ - [ ] Session file created/updated with all required sections
97
+ - [ ] Decisions documented with rationale
87
98
  - [ ] Open questions listed
88
99
  - [ ] Action items captured
89
100
  - [ ] Landing page topics include explicit layout selection questions
@@ -91,8 +102,8 @@ Key steps:
91
102
  - [ ] Research can be executed inside the same brainstorm session
92
103
  - [ ] UI Direction artifacts created/updated when UI mode is active
93
104
  - [ ] Multi-page sessions: hub links + `## Pages inventory` stay in sync with `pages/*.html`
94
- - [ ] **FEAT-010 + ENH-019 + ENH-020**: `/research-ui` (khi `--ui`) chạy đủ 3 phase, gồm **content stress pass** + **archetype recipes** + **`## UX walkthrough log`** ( **Stress findings**) khi chỉnh prototype
95
- - [ ] `## Product horizon` present với MVP / Post-MVP / Future (hoặc explicit single-release statement) khi scope được thảo luận
96
- - [ ] **FEAT-009**: intake hoàn tất hoặc binding đã **hoặc** waiver do trước Completed; session ghi **`## Project meta intake (FEAT-009)`**
105
+ - [ ] **FEAT-010 + ENH-019 + ENH-020**: `/research-ui` (when `--ui`) runs all 3 phases, including **content stress pass** + **archetype recipes** + **`## UX walkthrough log`** (with **Stress findings**) when prototype is updated
106
+ - [ ] `## Phases` present with Phase 1 having real content when scope is discussed
107
+ - [ ] **FEAT-009**: intake completed, binding already present, **or** waiver with reason before Completed; session records **`## Project meta intake (FEAT-009)`**
97
108
  - [ ] Next steps suggested
98
109
  </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-crystallize
3
- description: "Chuyển đổi brainstorm thành executable artifacts"
4
- version: 0.5.2
3
+ description: "Convert brainstorm sessions into executable artifacts"
4
+ version: 0.8.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -10,7 +10,7 @@ version: 0.5.2
10
10
  - Treat all user text after the skill mention as `{{VP_ARGS}}`
11
11
 
12
12
  ## B. User Prompting
13
- Prompt user conversationally với numbered list options.
13
+ Prompt user conversationally with numbered list options.
14
14
 
15
15
  ## C. Tool Usage
16
16
  Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
@@ -25,23 +25,23 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - Tạo **artifact** trong `.viepilot/` ( template copy) từ brainstorm — **không** thay **`/vp-auto`** để implement ứng dụng / framework shipping. Backlog feature code: **`/vp-evolve`** + **`/vp-auto`**. Xem `workflows/request.md`.
28
+ - Creates **artifacts** in `.viepilot/` (and template copy) from brainstorm — does **not** replace **`/vp-auto`** for implementing application code / framework shipping. Backlog feature code: **`/vp-evolve`** + **`/vp-auto`**. See `workflows/request.md`.
29
29
  </implementation_routing_guard>
30
30
 
31
31
 
32
32
  <objective>
33
- Chuyển đổi brainstorm sessions thành structured artifacts để AI có thể autonomous execution.
33
+ Convert brainstorm sessions into structured artifacts for autonomous AI execution.
34
34
 
35
35
  **Creates:**
36
36
  ```
37
37
  .viepilot/
38
- ├── AI-GUIDE.md # Navigation cho AI
39
- ├── PROJECT-META.md # Metadata dự án
38
+ ├── AI-GUIDE.md # AI navigation guide
39
+ ├── PROJECT-META.md # Project metadata
40
40
  ├── ARCHITECTURE.md # System design
41
41
  ├── architecture/ # ENH-022: *.mermaid sidecars (mirror fenced diagrams)
42
42
  ├── PROJECT-CONTEXT.md # Domain knowledge + `<product_vision>` (phased scope)
43
43
  ├── SYSTEM-RULES.md # Coding rules & standards
44
- ├── ROADMAP.md # MVP phases & tasks + **Post-MVP / Product horizon** block (mandatory)
44
+ ├── ROADMAP.md # Phases & tasks in order from phases_inventory
45
45
  ├── TRACKER.md # Progress tracking
46
46
  ├── HANDOFF.json # Machine-readable state
47
47
  └── schemas/ # Database, API, Kafka schemas
@@ -55,7 +55,7 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
55
55
  - Updated `README.md`
56
56
 
57
57
  **ViePilot profile (FEAT-009):**
58
- - Đọc `.viepilot/META.md` → file `~/.viepilot/profiles/<slug>.md` (contract: `docs/dev/global-profiles.md`); pre-fill Step 0; merge vào **ARCHITECTURE** (`## ViePilot organization context`), **PROJECT-CONTEXT** (`## ViePilot active profile`), **AI-GUIDE** quick context.
58
+ - Reads `.viepilot/META.md` → file `~/.viepilot/profiles/<slug>.md` (contract: `docs/dev/global-profiles.md`); pre-fills Step 0; merges into **ARCHITECTURE** (`## ViePilot organization context`), **PROJECT-CONTEXT** (`## ViePilot active profile`), **AI-GUIDE** quick context.
59
59
 
60
60
  **Stack intelligence (global cache):**
61
61
  - `~/.viepilot/stacks/{stack}/SUMMARY.md`
@@ -65,6 +65,18 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
65
65
  - `.viepilot/STACKS.md` (project-local index to global cache)
66
66
 
67
67
  **After:** Ready for `/vp-auto`
68
+
69
+ **UI direction hard gate (ENH-026):**
70
+ - Step 1A scans brainstorm for UI signal keywords; if ≥3 signals detected + no artifacts → **STOP** with 2-option dialogue (go back to brainstorm --ui OR proceed with assumptions written to ARCHITECTURE.md). Enforces direction-first workflow before crystallize proceeds.
71
+
72
+ **Architect artifacts consumption (FEAT-011):**
73
+ - Step 1D reads `.viepilot/architect/{session}/notes.md` YAML — imports `decisions[]` → ARCHITECTURE.md, uses `tech_stack{}` as authoritative stack (conflict → ask user), surfaces `open_questions[]` with `status: open`. Soft suggestion (not hard block) when architect dir missing but ≥5 services detected.
74
+
75
+ **Language configuration (ENH-032):**
76
+ - Step 0-A reads `~/.viepilot/config.json` → `DOCUMENT_LANG` (default: `en`) and `COMMUNICATION_LANG` (default: `en`).
77
+ - `DOCUMENT_LANG` controls content language for all generated files (ROADMAP, TRACKER, ARCHITECTURE, etc.).
78
+ - `COMMUNICATION_LANG` controls prompt/confirmation language for this session.
79
+ - Configure via: `vp-tools config set language.document vi`
68
80
  </objective>
69
81
 
70
82
  <execution_context>
@@ -78,8 +90,8 @@ Execute workflow from `@$HOME/.cursor/viepilot/workflows/crystallize.md`
78
90
  Key steps:
79
91
 
80
92
  ### Step 0: Collect Project Metadata
81
- - **FEAT-009:** Load `.viepilot/META.md` + global profile file first (`workflows/crystallize.md`); set `profile_resolved` or `none`; pre-fill org/website khi profile.
82
- Ask user for (confirm proposals từ profile nếu ):
93
+ - **FEAT-009:** Load `.viepilot/META.md` + global profile file first (`workflows/crystallize.md`); set `profile_resolved` or `none`; pre-fill org/website when profile is present.
94
+ Ask user for (confirm proposals from profile if present):
83
95
  - Project name, description
84
96
  - Organization name, website
85
97
  - Package Base ID (e.g., com.company.project)
@@ -93,8 +105,8 @@ Ask user for (confirm proposals từ profile nếu có):
93
105
  - Load all brainstorm sessions
94
106
  - Extract: decisions, architecture, schemas, features
95
107
  - Extract selected tech stacks
96
- - **Product horizon (ENH-014):** parse each session **`## Product horizon`**; build consolidated **horizon inventory**; record **single-release** mode when stated; run **validation gate** (missing section vs multi-release discussion stop and ask; tier conflicts → stop) — full contract: `workflows/crystallize.md` Step 1
97
- - Validate completeness (tech stack, features, schema/API clarity, **horizon gate**)
108
+ - **Phase assignment (ENH-030):** parse `## Phases` from brainstorm sessions; build `phases_inventory`; run phase assignment gate (all features must have a phase — full contract: `workflows/crystallize.md` Step 1)
109
+ - Validate completeness (tech stack, features, schema/API clarity, **phase assignment gate**)
98
110
 
99
111
  ### Step 1A: Consume UI direction (if present)
100
112
  - Read `.viepilot/ui-direction/{session-id}/notes.md` first, then `style.css`, then HTML:
@@ -121,7 +133,7 @@ Ask user for (confirm proposals từ profile nếu có):
121
133
  - Quick lookup table
122
134
  - Context loading strategy
123
135
  - File relationships
124
- - **FEAT-009:** Quick context cho `profile_id` + path profile khi đã resolve
136
+ - **FEAT-009:** Quick context for `profile_id` + profile path when resolved
125
137
 
126
138
  ### Step 3: Generate PROJECT-META.md
127
139
  - Project info
@@ -129,11 +141,11 @@ Ask user for (confirm proposals từ profile nếu có):
129
141
  - Package structure
130
142
  - Developer info
131
143
  - File headers template
132
- - **FEAT-009:** Align Organization với profile đã confirm (public only)
144
+ - **FEAT-009:** Align Organization with confirmed profile content (public only)
133
145
 
134
146
  ### Step 4: Generate ARCHITECTURE.md
135
147
  - System overview
136
- - **FEAT-009:** Section `## ViePilot organization context` khi profile (hoặc dòng none)
148
+ - **FEAT-009:** Section `## ViePilot organization context` when profile is present (or none line)
137
149
  - Services definitions
138
150
  - Data flow
139
151
  - Technology decisions
@@ -147,12 +159,12 @@ Ask user for (confirm proposals từ profile nếu có):
147
159
  - **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.
148
160
 
149
161
  ### Step 5: Generate PROJECT-CONTEXT.md
150
- - **FEAT-009:** Block `## ViePilot active profile (FEAT-009)` khi binding
162
+ - **FEAT-009:** Block `## ViePilot active profile (FEAT-009)` when binding is present
151
163
  - Domain knowledge
152
164
  - Business rules
153
165
  - Conventions
154
166
  - Constraints
155
- - Fill **`<product_vision>`** from template (`templates/project/PROJECT-CONTEXT.md`): MVP boundary, Post-MVP / Future themes, anti-goals — aligned with brainstorm horizon + Step 1 inventory
167
+ - Fill **`<product_vision>`** from template (`templates/project/PROJECT-CONTEXT.md`): Project scope, Phase overview, anti-goals — aligned with brainstorm `## Phases` + Step 1 phases_inventory
156
168
 
157
169
  ### Step 6: Generate SYSTEM-RULES.md
158
170
  - Architecture rules
@@ -165,9 +177,9 @@ Ask user for (confirm proposals từ profile nếu có):
165
177
  - Stack-specific rules from cache
166
178
 
167
179
  ### Step 7: Generate ROADMAP.md
168
- - Use `templates/project/ROADMAP.md` — **executable MVP phases** first (tasks, criteria, verification)
169
- - **Mandatory `## Post-MVP / Product horizon`:** epic-level deferred work from horizon inventory **or** explicit single-release statement (no silent omission)
170
- - **Self-check before finalize:** non-empty horizon inventory must appear in ROADMAP; if mismatch → stop and ask user — see `workflows/crystallize.md` Step 7
180
+ - Use `templates/project/ROADMAP.md` — phases in order (Phase 1, Phase 2...) from `phases_inventory`; no Post-MVP block
181
+ - Each phase: tasks, acceptance criteria, verification commands
182
+ - **Self-check before finalize:** all phases from phases_inventory appear in ROADMAP; if mismatch → stop and ask user — see `workflows/crystallize.md` Step 7
171
183
 
172
184
  ### Step 8: Generate schemas/
173
185
  - database-schema.sql
@@ -201,13 +213,13 @@ Ask user for (confirm proposals từ profile nếu có):
201
213
  - [ ] All artifacts created in .viepilot/
202
214
  - [ ] PROJECT-META.md has complete metadata
203
215
  - [ ] SYSTEM-RULES.md has all standards
204
- - [ ] Step 1 horizon extracted or explicit single-release recorded; validation gate satisfied
216
+ - [ ] Step 1 phase assignment gate satisfied (phases_inventory recorded, all features assigned)
205
217
  - [ ] PROJECT-CONTEXT.md includes populated **`<product_vision>`** (template placeholders filled from brainstorm)
206
- - [ ] ROADMAP.md has MVP phases with tasks **and** mandatory Post-MVP / horizon block (or explicit single-release statement)
218
+ - [ ] ROADMAP.md has phases with tasks in order from phases_inventory
207
219
  - [ ] TRACKER.md initialized
208
220
  - [ ] Project files created
209
221
  - [ ] Git committed
210
222
  - [ ] ARCHITECTURE diagram matrix is present and consistent (`required|optional|N/A`)
211
- - [ ] **ENH-022:** Mỗi diagram Mermaid được sinh 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)
212
- - [ ] **FEAT-009:** Nếu profile bound — ARCHITECTURE + PROJECT-CONTEXT ghi nguồn profile; nếu khôngghi none / not configured
223
+ - [ ] **ENH-022:** Every generated Mermaid diagram has a `.viepilot/architecture/<canonical-name>.mermaid` file in sync with `ARCHITECTURE.md` (no extra files created for N/A)
224
+ - [ ] **FEAT-009:** When profile is bound — ARCHITECTURE + PROJECT-CONTEXT record the profile source; if notstate none / not configured explicitly
213
225
  </success_criteria>
@@ -25,12 +25,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - **Điều tra + log** session; **không** merge fix shipping mặc định cho đến khi user **explicit** (*sửa luôn*, *hotfix*) hoặc route **`/vp-request` → `/vp-evolve` → `/vp-auto`**. Patch nhỏ chỉ để **reproduce** OK nếu user đồng ý. Xem `workflows/debug.md`.
28
+ - **Investigate + log** session; does **not** merge default shipping fixes until user **explicit** (*fix now*, *hotfix*) or routes **`/vp-request` → `/vp-evolve` → `/vp-auto`**. Small patches only to **reproduce** are OK if the user agrees. See `workflows/debug.md`.
29
29
  </implementation_routing_guard>
30
30
 
31
31
 
32
32
  <objective>
33
- Systematic debugging với persistent state tracking. Giúp track vấn đề qua nhiều sessions.
33
+ Systematic debugging with persistent state tracking. Helps track issues across multiple sessions.
34
34
 
35
35
  **Creates/Updates:**
36
36
  - `.viepilot/debug/session-{id}.json` - Debug session state
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vp-docs
3
- description: "Generate comprehensive documentation cho dự án"
3
+ description: "Generate comprehensive documentation for the project"
4
4
  version: 0.2.1
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ version: 0.2.1
10
10
  - Treat all user text after the skill mention as `{{VP_ARGS}}`
11
11
 
12
12
  ## B. User Prompting
13
- Prompt user conversationally với options.
13
+ Prompt user conversationally with options.
14
14
 
15
15
  ## C. Tool Usage
16
16
  Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
@@ -25,12 +25,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - Skill này sửa **`docs/`**, index, README liên quan doc — **không** implement **`lib/`**, **`tests/`**, logic product mặc định; việc đó **`/vp-auto`**. Override explicit. Xem `workflows/request.md`.
28
+ - This skill edits **`docs/`**, index, README related to docsdoes **not** implement **`lib/`**, **`tests/`**, default product logic; that is **`/vp-auto`**. Explicit override required. See `workflows/request.md`.
29
29
  </implementation_routing_guard>
30
30
 
31
31
 
32
32
  <objective>
33
- Generate comprehensive documentation từ code artifacts.
33
+ Generate comprehensive documentation from code and artifacts.
34
34
 
35
35
  **Creates/Updates:**
36
36
  ```
@@ -60,7 +60,7 @@ CHANGELOG.md (updated)
60
60
  - GitHub owner/repo from `git remote get-url origin`
61
61
  - Skills count from `ls skills/*/SKILL.md | wc -l`
62
62
  - Workflows count from `ls workflows/*.md | wc -l`
63
- - **FEAT-009:** Optional ViePilot global profile từ `.viepilot/META.md` + `~/.viepilot/profiles/` cho attribution/tone (`workflows/documentation.md` §0A)
63
+ - **FEAT-009:** Optional ViePilot global profile from `.viepilot/META.md` + `~/.viepilot/profiles/` for attribution/tone (`workflows/documentation.md` §0A)
64
64
  </objective>
65
65
 
66
66
  <execution_context>
@@ -98,7 +98,7 @@ ACTUAL_WORKFLOWS=$(ls workflows/*.md 2>/dev/null | wc -l | tr -d ' ')
98
98
 
99
99
  ### Step 0A: ViePilot active profile (FEAT-009)
100
100
 
101
- Sau Step 0: resolve `.viepilot/META.md` → file profile global (cùng quy tắc `workflows/crystallize.md`). Giữ working notes (org, website, audience, branding) cho prose docs; **không** fail nếu thiếu. Chi tiết: `workflows/documentation.md` §0A.
101
+ After Step 0: resolve `.viepilot/META.md` → global profile file (same rules as `workflows/crystallize.md`). Keep working notes (org, website, audience, branding) for prose docs; do **not** fail if missing. Details: `workflows/documentation.md` §0A.
102
102
 
103
103
  ### Step 1: Ask Documentation Scope
104
104
  ```
@@ -273,5 +273,5 @@ View at: docs/README.md
273
273
  - [ ] skills-reference.md has sections for all skills in skills/ directory
274
274
  - [ ] Root README.md Documentation table updated
275
275
  - [ ] Git committed
276
- - [ ] **FEAT-009:** Nếu profile — dùng cho attribution khi phù hợp; nếu khôngbỏ qua im lặng (không placeholder sai)
276
+ - [ ] **FEAT-009:** If profile exists use for attribution where appropriate; if notsilently skip (no incorrect placeholders)
277
277
  </success_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vp-evolve
3
- description: "Nâng cấp, thêm features, hoặc bắt đầu milestone mới"
3
+ description: "Upgrade, add features, or start a new milestone"
4
4
  version: 0.3.0
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ version: 0.3.0
10
10
  - Treat all user text after the skill mention as `{{VP_ARGS}}`
11
11
 
12
12
  ## B. User Prompting
13
- Prompt user conversationally với options.
13
+ Prompt user conversationally with options.
14
14
 
15
15
  ## C. Tool Usage
16
16
  Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
@@ -25,28 +25,28 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - Skill này chỉ **planning**: ROADMAP, phase dir, SPEC/tasks, TRACKER, ghi chú version/CHANGELOG khi workflow quy định — **không** implement shipping mặc định (`lib/`, `tests/`, `bin/`, sửa lớn `workflows/`/`skills/` ngoài plan artifact).
29
- - **Bước tiếp:** **`/vp-auto`**. Xem `workflows/evolve.md`.
30
- - **Ngoại lệ:** User **explicit** bypass — nêu trong chat.
28
+ - This skill is **planning only**: ROADMAP, phase dir, SPEC/tasks, TRACKER, version/CHANGELOG notes when the workflow specifiesdoes **not** implement default shipping code (`lib/`, `tests/`, `bin/`, large edits to `workflows/`/`skills/` beyond plan artifacts).
29
+ - **Next step:** **`/vp-auto`**. See `workflows/evolve.md`.
30
+ - **Exception:** User **explicit** bypass — state clearly in chat.
31
31
  </implementation_routing_guard>
32
32
 
33
33
 
34
34
  <objective>
35
- Nâng cấp hoặc mở rộng dự án sau khi hoàn thành milestone hoặc cần thêm features.
35
+ Upgrade or expand the project after completing a milestone or when new features are needed.
36
36
 
37
37
  **Modes:**
38
- 1. **Add Feature** - Thêm feature vào milestone hiện tại
39
- 2. **New Milestone** - Bắt đầu milestone mới
40
- 3. **Refactor** - Cải thiện code hiện có
38
+ 1. **Add Feature** - Add a feature to the current milestone
39
+ 2. **New Milestone** - Start a new milestone
40
+ 3. **Refactor** - Improve existing code
41
41
 
42
42
  **Routing intelligence:**
43
- - Với yêu cầu thiên về khám phá ý tưởng (đặc biệt landing page), ưu tiên route qua `/vp-brainstorm` nâng cao trước khi crystallize phase.
44
- - Hỗ trợ route brainstorm in-session research để user quyết định ngay trong một phiên.
43
+ - For requests leaning toward idea exploration (especially landing pages), prioritize routing through enhanced `/vp-brainstorm` before the crystallize phase.
44
+ - Supports brainstorm routing with in-session research so the user can decide within a single session.
45
45
 
46
46
  **Updates:**
47
47
  - `.viepilot/ROADMAP.md`
48
48
  - `.viepilot/TRACKER.md`
49
- - `.viepilot/ARCHITECTURE.md` (nếu changes)
49
+ - `.viepilot/ARCHITECTURE.md` (if there are changes)
50
50
  - `CHANGELOG.md`
51
51
  </objective>
52
52
 
@@ -59,6 +59,19 @@ Optional flags:
59
59
  - `--feature` : Add feature mode
60
60
  - `--milestone` : New milestone mode
61
61
  - `--refactor` : Refactor mode
62
+
63
+ **Task path convention (BUG-009):**
64
+ When generating task files, ALL paths in `## Paths` blocks MUST be
65
+ repo-relative (relative to the repository root where `package.json` lives).
66
+
67
+ ```
68
+ CORRECT: workflows/foo.md skills/vp-bar/SKILL.md lib/foo.cjs
69
+ INCORRECT: ~/.claude/viepilot/workflows/foo.md /absolute/path
70
+ ```
71
+
72
+ Absolute paths inside code block content (bash examples, runtime descriptions)
73
+ are fine — only the `## Paths` header block must use repo-relative paths.
74
+ See guard in `workflows/evolve.md` → "TASK PATH RULE (BUG-009)".
62
75
  </context>
63
76
 
64
77
  <process>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vp-info
3
- description: "Hiển thị phiên bản ViePilot, npm latest, danh sách skills/workflows qua vp-tools"
3
+ description: "Display ViePilot version, npm latest, skills/workflows list via vp-tools"
4
4
  version: 0.1.1
5
5
  ---
6
6
 
@@ -22,21 +22,21 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  <implementation_routing_guard>
23
23
  ## Implementation routing guard (ENH-021)
24
24
 
25
- - **Inventory / version info** — không implement shipping; implement qua **`/vp-auto`**. Xem `workflows/request.md`.
25
+ - **Inventory / version info** — does not implement shipping; implement via **`/vp-auto`**. See `workflows/request.md`.
26
26
  </implementation_routing_guard>
27
27
 
28
28
 
29
29
  <objective>
30
- Chạy **`vp-tools info`** để lấy metadata bundle ViePilot (không cần `.viepilot/` trong project đích).
30
+ Run **`vp-tools info`** to retrieve the ViePilot bundle metadata (no `.viepilot/` needed in the target project).
31
31
 
32
- **Output hữu ích cho agent:**
32
+ **Useful output for agents:**
33
33
  - `installedVersion`, `packageName`, `packageRoot`
34
- - `latestNpm` (ok + version hoặc lỗi mạng/registry)
35
- - `gitHead` (nếu clone git)
34
+ - `latestNpm` (ok + version or network/registry error)
35
+ - `gitHead` (if clone has git)
36
36
  - `skills[]`: `id`, `version`, `relativePath`
37
37
  - `workflows[]`: `id`, `relativePath`, `note`
38
38
 
39
- Dùng **`vp-tools info --json`** khi cần parse hoặc so sánh phiên bản trong script.
39
+ Use **`vp-tools info --json`** when parsing or comparing versions in scripts.
40
40
  </objective>
41
41
 
42
42
  <execution_context>
@@ -46,30 +46,30 @@ Dùng **`vp-tools info --json`** khi cần parse hoặc so sánh phiên bản tr
46
46
  <process>
47
47
 
48
48
  ### Step 1: Resolve CLI
49
- Ưu tiên theo thứ tự:
50
- 1. `vp-tools info` — khi ViePilot đã trên `PATH` (npm global hoặc shim).
51
- 2. `node <viepilot-package>/bin/vp-tools.cjs info` — từ repo clone hoặc `node_modules/viepilot`.
49
+ Priority order:
50
+ 1. `vp-tools info` — when ViePilot is already on `PATH` (npm global or shim).
51
+ 2. `node <viepilot-package>/bin/vp-tools.cjs info` — from repo clone or `node_modules/viepilot`.
52
52
 
53
- ### Step 2: Chạy lệnh
53
+ ### Step 2: Run command
54
54
  ```bash
55
55
  vp-tools info
56
- # hoặc
56
+ # or
57
57
  vp-tools info --json
58
58
  ```
59
59
 
60
- ### Step 3: Diễn giải JSON (khi dùng `--json`)
61
- - **`packageRoot`**: gốc package `viepilot` CLI đang resolve được.
62
- - **`installedVersion`**: semver trong `package.json` của bundle đó.
63
- - **`latestNpm`**: `{ ok, version }` hoặc `{ ok: false, error }`.
64
- - **`skills`**: inventory skill trong `skills/*/SKILL.md` (version từ frontmatter).
65
- - **`workflows`**: file `workflows/*.md`.
60
+ ### Step 3: Interpret JSON (when using `--json`)
61
+ - **`packageRoot`**: root of the `viepilot` package the CLI resolved.
62
+ - **`installedVersion`**: semver in `package.json` of that bundle.
63
+ - **`latestNpm`**: `{ ok, version }` or `{ ok: false, error }`.
64
+ - **`skills`**: skill inventory in `skills/*/SKILL.md` (version from frontmatter).
65
+ - **`workflows`**: files in `workflows/*.md`.
66
66
 
67
- ### Step 4: Lỗi thường gặp
68
- Nếu báo không tìm thấy package root: cài global (`npm i -g viepilot`), hoặc chạy từ project dependency `viepilot`, hoặc trỏ thẳng tới `bin/vp-tools.cjs` trong clone.
67
+ ### Step 4: Common errors
68
+ If package root is not found: install globally (`npm i -g viepilot`), or run from a project that has `viepilot` as a dependency, or point directly to `bin/vp-tools.cjs` in a clone.
69
69
  </process>
70
70
 
71
71
  <success_criteria>
72
- - [ ] Đã gọi đúng subcommand `info` (hoặc `--json` khi cần parse)
73
- - [ ] Nêu rõ `installedVersion` (nếu ) `latestNpm.version`
74
- - [ ] Khi user hỏi những skill nào trong bundle”, tóm tắt từ `skills[]` hoặc output bảng CLI
72
+ - [ ] Correct subcommand `info` called (or `--json` when parsing is needed)
73
+ - [ ] `installedVersion` and (if available) `latestNpm.version` clearly stated
74
+ - [ ] When user askswhat skills are in the bundle”, summarize from `skills[]` or CLI table output
75
75
  </success_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vp-pause
3
- description: "Pause work với context preservation để resume sau"
3
+ description: "Pause work with context preservation to resume later"
4
4
  version: 0.1.1
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ version: 0.1.1
10
10
  - Treat all user text after the skill mention as `{{VP_ARGS}}`
11
11
 
12
12
  ## B. User Prompting
13
- Prompt user conversationally để gather state info.
13
+ Prompt user conversationally to gather state info.
14
14
 
15
15
  ## C. Tool Usage
16
16
  Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
@@ -25,19 +25,19 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
25
25
  <implementation_routing_guard>
26
26
  ## Implementation routing guard (ENH-021)
27
27
 
28
- - **Handoff state** — không implement shipping; resume với **`/vp-resume`** rồi **`/vp-auto`** theo plan. Xem `workflows/request.md`.
28
+ - **Handoff state** — does not implement shipping; resume with **`/vp-resume`** then **`/vp-auto`** per plan. See `workflows/request.md`.
29
29
  </implementation_routing_guard>
30
30
 
31
31
 
32
32
  <objective>
33
- Save complete work state để thể resume từ bất kỳ context nào.
33
+ Save complete work state so it can be resumed from any context.
34
34
 
35
35
  **Creates/Updates:**
36
36
  - `.viepilot/HANDOFF.json` - Machine-readable state
37
37
  - `.viepilot/phases/{current}/.continue-here.md` - Human-readable context
38
38
  - Git WIP commit
39
39
 
40
- **After:** Safe to close session. Resume với `/vp-resume`
40
+ **After:** Safe to close session. Resume with `/vp-resume`
41
41
  </objective>
42
42
 
43
43
  <execution_context>