viepilot 1.8.1 → 1.9.2

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.
@@ -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.4.0
4
+ version: 0.5.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - Tạo **artifact** trong `.viepilot/` (và template copy) từ brainstorm — **không** thay **`/vp-auto`** để implement mã ứng dụng / framework shipping. Backlog feature code: **`/vp-evolve`** + **`/vp-auto`**. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Chuyển đổi brainstorm sessions thành structured artifacts để AI có thể autonomous execution.
@@ -47,6 +53,9 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
47
53
  - `LICENSE`
48
54
  - Updated `README.md`
49
55
 
56
+ **ViePilot profile (FEAT-009):**
57
+ - Đọ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
+
50
59
  **Stack intelligence (global cache):**
51
60
  - `~/.viepilot/stacks/{stack}/SUMMARY.md`
52
61
  - `~/.viepilot/stacks/{stack}/BEST-PRACTICES.md`
@@ -68,7 +77,8 @@ Execute workflow from `@$HOME/.cursor/viepilot/workflows/crystallize.md`
68
77
  Key steps:
69
78
 
70
79
  ### Step 0: Collect Project Metadata
71
- Ask user for:
80
+ - **FEAT-009:** Load `.viepilot/META.md` + global profile file first (`workflows/crystallize.md`); set `profile_resolved` or `none`; pre-fill org/website khi có profile.
81
+ Ask user for (confirm proposals từ profile nếu có):
72
82
  - Project name, description
73
83
  - Organization name, website
74
84
  - Package Base ID (e.g., com.company.project)
@@ -110,6 +120,7 @@ Ask user for:
110
120
  - Quick lookup table
111
121
  - Context loading strategy
112
122
  - File relationships
123
+ - **FEAT-009:** Quick context cho `profile_id` + path profile khi đã resolve
113
124
 
114
125
  ### Step 3: Generate PROJECT-META.md
115
126
  - Project info
@@ -117,9 +128,11 @@ Ask user for:
117
128
  - Package structure
118
129
  - Developer info
119
130
  - File headers template
131
+ - **FEAT-009:** Align Organization với profile đã confirm (public only)
120
132
 
121
133
  ### Step 4: Generate ARCHITECTURE.md
122
134
  - System overview
135
+ - **FEAT-009:** Section `## ViePilot organization context` khi có profile (hoặc dòng none)
123
136
  - Services definitions
124
137
  - Data flow
125
138
  - Technology decisions
@@ -132,6 +145,7 @@ Ask user for:
132
145
  - `N/A` => keep section heading + one-line rationale
133
146
 
134
147
  ### Step 5: Generate PROJECT-CONTEXT.md
148
+ - **FEAT-009:** Block `## ViePilot active profile (FEAT-009)` khi có binding
135
149
  - Domain knowledge
136
150
  - Business rules
137
151
  - Conventions
@@ -192,4 +206,5 @@ Ask user for:
192
206
  - [ ] Project files created
193
207
  - [ ] Git committed
194
208
  - [ ] ARCHITECTURE diagram matrix is present and consistent (`required|optional|N/A`)
209
+ - [ ] **FEAT-009:** Nếu có profile bound — ARCHITECTURE + PROJECT-CONTEXT ghi nguồn profile; nếu không — ghi rõ none / not configured
195
210
  </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-debug
3
3
  description: "Systematic debugging with persistent state tracking across sessions"
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
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`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Systematic debugging với persistent state tracking. Giúp track vấn đề qua nhiều sessions.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-docs
3
3
  description: "Generate comprehensive documentation cho dự án"
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
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 đó là **`/vp-auto`**. Override explicit. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Generate comprehensive documentation từ code và artifacts.
@@ -54,6 +60,7 @@ CHANGELOG.md (updated)
54
60
  - GitHub owner/repo from `git remote get-url origin`
55
61
  - Skills count from `ls skills/*/SKILL.md | wc -l`
56
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)
57
64
  </objective>
58
65
 
59
66
  <execution_context>
@@ -89,6 +96,10 @@ ACTUAL_WORKFLOWS=$(ls workflows/*.md 2>/dev/null | wc -l | tr -d ' ')
89
96
  > Use `$ACTUAL_SKILLS` and `$ACTUAL_WORKFLOWS` for counts.
90
97
  > **Never write** `your-org`, `YOUR_USERNAME`, `YOUR_ORG` into generated files.
91
98
 
99
+ ### Step 0A: ViePilot active profile (FEAT-009)
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.
102
+
92
103
  ### Step 1: Ask Documentation Scope
93
104
  ```
94
105
  Which documentation would you like to generate?
@@ -262,4 +273,5 @@ View at: docs/README.md
262
273
  - [ ] skills-reference.md has sections for all skills in skills/ directory
263
274
  - [ ] Root README.md Documentation table updated
264
275
  - [ ] Git committed
276
+ - [ ] **FEAT-009:** Nếu có profile — dùng cho attribution khi phù hợp; nếu không — bỏ qua im lặng (không placeholder sai)
265
277
  </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-evolve
3
3
  description: "Nâng cấp, thêm features, hoặc bắt đầu milestone mới"
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,14 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - Skill này chỉ **planning**: ROADMAP, phase dir, SPEC/tasks, TRACKER, ghi chú version/CHANGELOG khi workflow quy định — **không** implement mã 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 rõ trong chat.
31
+ </implementation_routing_guard>
32
+
25
33
 
26
34
  <objective>
27
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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-info
3
3
  description: "Hiển thị phiên bản ViePilot, npm latest, danh sách skills/workflows qua vp-tools"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -19,6 +19,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
19
19
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
20
20
  </scope_policy>
21
21
 
22
+ <implementation_routing_guard>
23
+ ## Implementation routing guard (ENH-021)
24
+
25
+ - **Inventory / version info** — không implement shipping; implement qua **`/vp-auto`**. Xem `workflows/request.md`.
26
+ </implementation_routing_guard>
27
+
22
28
 
23
29
  <objective>
24
30
  Chạy **`vp-tools info`** để lấy metadata bundle ViePilot (không cần `.viepilot/` trong project đích).
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-pause
3
3
  description: "Pause work với context preservation để resume sau"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - **Handoff state** — không implement shipping; resume với **`/vp-resume`** rồi **`/vp-auto`** theo plan. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Save complete work state để có thể resume từ bất kỳ context nào.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-request
3
3
  description: "Tạo request mới: feature, bug fix, enhancement, hoặc brainstorm tiếp"
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,15 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - Skill này chỉ **tạo request**, **backlog**, **triage** (`.viepilot/requests/*`, `TRACKER`, đôi khi gợi ý ROADMAP) — **không** implement mã shipping mặc định (`lib/`, `tests/`, `bin/`, `workflows/`, `skills/` của repo, v.v.).
29
+ - **Sau request:** **`/vp-evolve`** (ROADMAP + phase + tasks + plan) → **`/vp-auto`** (thực thi). Xem `workflows/request.md`.
30
+ - **Ngoại lệ:** User **explicit** (*hotfix ngay*, *sửa trong chat này*, *bypass planning*) — phải **nêu rõ** bypass trong chat.
31
+ - **Không** đề xuất *“Start working now”* như implement trực tiếp trong thread này; thay bằng evolve → auto.
32
+ </implementation_routing_guard>
33
+
25
34
 
26
35
  <objective>
27
36
  Tạo và quản lý requests cho dự án đang phát triển:
@@ -199,7 +208,7 @@ Options:
199
208
  1. Add to current milestone backlog
200
209
  2. Brainstorm in detail first
201
210
  3. Schedule for next milestone
202
- 4. Start working now
211
+ 4. Plan then execute: `/vp-evolve` → `/vp-auto` (not direct implement here unless explicit override)
203
212
  ```
204
213
 
205
214
  **Tech Debt:**
@@ -242,7 +251,8 @@ Update `.viepilot/TRACKER.md`:
242
251
 
243
252
  Next:
244
253
  - /vp-request --list View all requests
245
- - /vp-auto Start working on it
254
+ - /vp-evolve Plan phase/tasks + ROADMAP (before code)
255
+ - /vp-auto Implement per task plan (after evolve)
246
256
  - /vp-request Create another request
247
257
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
248
258
  ```
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-resume
3
3
  description: "Resume work từ previous session với full context restoration"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - **Khôi phục context** — không implement shipping mặc định; tiếp tục **`/vp-auto`** khi có task plan. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Restore complete project context và resume work seamlessly.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-rollback
3
3
  description: "Rollback to any checkpoint safely with state preservation"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - **Checkpoint / revert** — không thay **`/vp-auto`** cho work mới; sau rollback dùng **`/vp-evolve`** / **`/vp-auto`** theo quy trình. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Rollback đến bất kỳ checkpoint nào một cách an toàn, với backup và state preservation.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-status
3
3
  description: "Hiển thị progress dashboard và actionable insights"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -19,6 +19,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
19
19
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
20
20
  </scope_policy>
21
21
 
22
+ <implementation_routing_guard>
23
+ ## Implementation routing guard (ENH-021)
24
+
25
+ - **Read-only / dashboard** — không implement shipping; **`/vp-evolve`** → **`/vp-auto`**. Xem `workflows/request.md`.
26
+ </implementation_routing_guard>
27
+
22
28
 
23
29
  <objective>
24
30
  Hiển thị visual progress dashboard với actionable insights.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-task
3
3
  description: "Manual control over individual tasks"
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -19,6 +19,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
19
19
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
20
20
  </scope_policy>
21
21
 
22
+ <implementation_routing_guard>
23
+ ## Implementation routing guard (ENH-021)
24
+
25
+ - Skill này **chỉ** quản lý **state/tag/task** trong `.viepilot/` — **không** thay **`/vp-auto`** để implement shipping code. Implement: **`/vp-auto`** hoặc user **explicit** override. Chuỗi plan: **`/vp-evolve`** trước. Xem `workflows/request.md`.
26
+ </implementation_routing_guard>
27
+
22
28
 
23
29
  <objective>
24
30
  Manual control over tasks khi cần fine-grained management.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-ui-components
3
3
  description: "Quản lý workflow sưu tầm và tái sử dụng UI components"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -22,6 +22,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
22
22
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
23
23
  </scope_policy>
24
24
 
25
+ <implementation_routing_guard>
26
+ ## Implementation routing guard (ENH-021)
27
+
28
+ - **Curation** `ui-components/` + metadata — không implement toàn bộ feature app / framework shipping mặc định; thay đổi lớn **`/vp-evolve`** → **`/vp-auto`**. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Thu thập, phân loại, và lưu trữ UI components để tái sử dụng:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-update
3
3
  description: "Nâng cấp package viepilot qua npm (dry-run, --yes, --global) qua vp-tools"
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -19,6 +19,12 @@ Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`,
19
19
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
20
20
  </scope_policy>
21
21
 
22
+ <implementation_routing_guard>
23
+ ## Implementation routing guard (ENH-021)
24
+
25
+ - **Nâng cấp ViePilot package** (npm) — không implement feature product trong repo đang làm việc mặc định; feature code qua **`/vp-auto`**. Xem `workflows/request.md`.
26
+ </implementation_routing_guard>
27
+
22
28
 
23
29
  <objective>
24
30
  Chạy **`vp-tools update`** để lên kế hoạch và (khi được xác nhận) thực thi `npm` nâng cấp `viepilot`.
@@ -0,0 +1,30 @@
1
+ ---
2
+ # ViePilot: links this repo to a global reusable profile (~/.viepilot/profiles/).
3
+ # Created/updated by brainstorm meta intake or manual edit.
4
+ viepilot_profile_id: "{{PROFILE_SLUG}}"
5
+ # Optional absolute override (rare):
6
+ # viepilot_profile_path: "/custom/path/profile.md"
7
+ ---
8
+
9
+ # ViePilot project binding
10
+
11
+ Operational metadata for ViePilot workflows (**not** full product metadata — see `PROJECT-META.md` if used).
12
+
13
+ ## Active profile
14
+
15
+ | Field | Value |
16
+ |-------|-------|
17
+ | **profile_id** | `{{PROFILE_SLUG}}` |
18
+ | **Global file** | `~/.viepilot/profiles/{{PROFILE_SLUG}}.md` |
19
+
20
+ ## Project-specific overrides
21
+
22
+ _Add only non-secret lines that apply to this repo only (e.g. codename, release target). Full org context should live in the global profile file._
23
+
24
+ -
25
+
26
+ ## Intake notes
27
+
28
+ _Short trail from meta intake (optional):_
29
+
30
+ -
@@ -9,6 +9,10 @@ Pauses at control points cho user decisions.
9
9
  - External skills (non `vp-*`) are out of scope unless the user explicitly opts in.
10
10
  - If external skill references appear in runtime context, ignore them and continue with nearest equivalent ViePilot skill.
11
11
 
12
+ ## Implementation entry (cross-skill)
13
+
14
+ - **`/vp-auto`** + workflow này là **lane mặc định** để **implement** work đã có **phase/task plan** (và doc-first **BUG-001**). **`/vp-request`** và **`/vp-evolve`** **không** thay thế bước này trừ user explicit override — xem **Implementation routing guard** trong `workflows/request.md` và `workflows/evolve.md`.
15
+
12
16
 
13
17
  <process>
14
18
 
@@ -163,6 +163,61 @@ Khi thư mục `pages/` tồn tại hoặc bất kỳ `pages/*.html` nào đư
163
163
  - điều chỉnh theo mục tiêu sản phẩm
164
164
  4. Giữ prototype ở mức mô tả định hướng (directional), không ép build production-ready code ở bước brainstorm.
165
165
 
166
+ ### UI Direction — UX walkthrough & upgrade (FEAT-010)
167
+
168
+ Khi đang trong **`/vp-brainstorm --ui`** hoặc đã có `.viepilot/ui-direction/{session-id}/` cho phiên hiện tại, user có thể gọi:
169
+
170
+ - **`/research-ui`** — chạy đủ pipeline dưới đây
171
+ - **`/research ui`** — **alias** của `/research-ui` (khoảng trắng sau `research`; không trùng `/research {chủ đề tự do}`)
172
+
173
+ User có thể kèm ngữ cảnh một dòng (vd. tên sản phẩm **Trips**, persona, flow ưu tiên) — nhập vào cùng tin nhắn lệnh.
174
+
175
+ Áp dụng **các phase tuần tự** (assistant không bỏ qua phase trừ khi user explicit “chỉ phase 1”):
176
+
177
+ #### Phase 1 — Mô phỏng người dùng cuối
178
+
179
+ 1. Đóng vai **người dùng cuối** đang dùng prototype (lấy tên app / màn chính từ `notes.md`, HTML, hoặc prompt user).
180
+ 2. Liệt kê **3–8 scenario** cụ thể (vd. lần đầu mở app, hoàn tất task chính, lỗi edge case) — ưu tiên đúng page nếu multi-page (`pages/*.html`).
181
+ 3. Với từng scenario: mô tả **hành vi** (đọc/click tưởng tượng trên UI hiện tại) → ghi **pain**: mơ hồ, thiếu phản hồi, quá nhiều bước, không khớp mental model, khả năng mobile/a11y, v.v.
182
+ 4. Tổng hợp **Voice of pseudo-user** (bullet + mức độ **low / medium / high**).
183
+ 5. **Stress nội dung & tràn layout (content stress pass)** — *bắt buộc trong mỗi lần `/research-ui`*: sau happy/edge hành vi, mô phỏng **dữ liệu ở biên** trên từng màn/page quan trọng (hoặc toàn hub nếu single-screen). Tối thiểu xét **3–6 loại** sau (chọn đúng ngữ cảnh sản phẩm; bỏ qua mục không áp dụng nhưng **ghi rõ “N/A + lý do”**):
184
+ - **Copy dài**: tiêu đề, subtitle, CTA, placeholder ô nhập, tooltip, breadcrumb, tên địa điểm/người dài (Unicode), email/URL dài.
185
+ - **Khối lượng**: danh sách/grid **nhiều phần tử**, bảng nhiều cột/hàng, thẻ/tag/badge chồng, notification stack, lịch nhiều sự kiện.
186
+ - **Số & định dạng**: số tiền rất lớn/nhỏ, đơn vị dài, múi giờ/ngôn ngữ (nếu product có).
187
+ - **Trạng thái lỗi / validation**: message lỗi dài, nhiều lỗi cùng lúc, inline + banner.
188
+ - **Empty vs cực đầy**: không dữ liệu vs max items; skeleton vs flash of long content.
189
+ - **Viewport**: cùng stress trên **hẹp** (mobile) và **rộng** (desktop) nếu prototype nhắm đa kích thước.
190
+
191
+ **Stress recipes theo archetype (ENH-020)** — sau khi áp checklist trên, **chốt 1–2 archetype** khớp sản phẩm (từ `notes.md` / HTML / user) và áp **ít nhất hai recipe** trong mỗi hàng đã chọn (có thể diễn đạt lại bằng ngôn ngữ session; **ghi rõ archetype** trong Stress findings):
192
+
193
+ | Archetype | Ưu tiên stress (recipe gợi ý) | Ghi chú |
194
+ |-----------|------------------------------|---------|
195
+ | **Landing / marketing** | Hero **headline** cực ngắn vs cực dài; **pricing** 3–5 tier + feature list dài mỗi tier; **FAQ** 10–20 mục (accordion/stack); **logo / social proof** hàng 8–15 logo + tên dài | Sticky CTA vs nội dung dài; section order khi overflow |
196
+ | **App shell / SaaS admin** | **Bảng** nhiều cột + nhiều hàng; **filter bar** chip + dropdown tràn; **sidebar** nhiều cấp; **notification** stack / toast chồng | Trạng thái dense vs comfortable; frozen column |
197
+ | **Form-heavy / wizard** | **Label + hint** dài; **multi-step** 5–7 bước + breadcrumb dài; **lỗi** inline từng field + banner tổng; khối **optional fields** mở rộng | Tab order, submit disabled ambiguity |
198
+ | **Content / reader** | **Bài** cực dài; **code block** rộng; **TOC** 20–40 heading; **related** 8–15 thẻ | Max line length, sidenote, mobile đọc |
199
+ | **Commerce / booking / marketplace** | **Kết quả tìm** grid dày; **giá** + đơn vị + discount dài; **ngày giờ** + múi giờ + DST; **đặt chỗ** (ghế, phòng) + availability text dài | Giỏ / summary trên mobile |
200
+
201
+ Hybrid (vd. marketing + app): **gộp recipe** từ các hàng liên quan; tránh lặp cùng một stress vô nghĩa trên hai màn giống nhau.
202
+
203
+ Với prototype chỉ có nội dung mẫu ngắn: **không bắt buộc** sửa file ngay ở Phase 1 — hãy **mô tả giả định** (“nếu title 120 ký tự thì…”) và UI sẽ **tràn, ellipsis, scroll, overlap, wrap xấu** thế nào.
204
+ 6. Tổng hợp thêm **Stress findings** (bullet: loại stress → quan sát → severity **low/medium/high**) và merge vào tổng kết Phase 1 cho Phase 2.
205
+
206
+ #### Phase 2 — UX designer + research
207
+
208
+ 1. Đổi vai: **UX/UI designer** nhận feedback từ Phase 1 (**gồm cả Stress findings**).
209
+ 2. Map pain → **nguyên nhân thiết kế** (heuristic ngắn, pattern thiếu/sai); **ưu tiên hóa** P0 / P1 / P2 — **ưu tiên P0** nếu stress nội dung gây **mất thông tin, click sai, hoặc không dùng được** (overflow che CTA, text cắt nghĩa, bảng tràn không đọc được).
210
+ 3. **Web research**: khi cần benchmark hoặc pattern chuẩn ngành, chạy **1–3 truy vấn** (search) → tóm tắt nguồn, takeaway, trade-off.
211
+ 4. **Đề xuất cải tiến** cụ thể (thành phần UI, copy, layout, luồng) gắn với file/page (`slug` nếu multi-page).
212
+
213
+ #### Phase 3 — Cập nhật artifact
214
+
215
+ 1. Sửa **`index.html`**, **`pages/*.html`**, **`style.css`** theo P0 → P1 trong phạm vi phiên (prototype direction, không ép production).
216
+ 2. Trong **`notes.md`**, thêm hoặc append section **`## UX walkthrough log`** (một entry mỗi lần chạy lệnh): ngày/scenario đã mô phỏng, pain chính, **Stress findings** (tóm tắt), link research (nếu có), **diff ý định** (bullet), file đã đổi. *Tùy chọn:* chỉnh HTML với **placeholder/copy dài** hoặc thêm **demo row** để minh họa stress đã bàn (ghi trong log).
217
+ 3. **Multi-page**: sau chỉnh sửa page, giữ **`## Pages inventory`** và **hub** khớp 100% file trong `pages/*` (hook FEAT-007).
218
+
219
+ **Quan hệ với `/research {topic}`**: lệnh **tự do** chỉ cần research ngắn và quay lại topic; **`/research-ui`** bắt buộc **3 phase** + **ghi log** + **chỉnh HTML/CSS khi có đề xuất hợp lý**.
220
+
166
221
  Tham chiếu user: `docs/user/features/ui-direction.md`.
167
222
 
168
223
  ### Kết thúc mỗi topic
@@ -172,8 +227,76 @@ Tham chiếu user: `docs/user/features/ui-direction.md`.
172
227
  - Nếu topic thêm/sửa capability: cập nhật **`## Product horizon`** trong bản nháp session (hoặc nhắc user lưu `/save`) với tag tier phù hợp
173
228
  </step>
174
229
 
230
+ <step name="project_meta_intake">
231
+ ## 5. Project meta intake (FEAT-009)
232
+
233
+ Normative contract: **`docs/dev/global-profiles.md`** (`~/.viepilot/profiles/`, `~/.viepilot/profile-map.md`, `.viepilot/META.md`).
234
+
235
+ ### 5.1 When this step runs
236
+
237
+ Chạy **trước** khi ghi session ở trạng thái **`Completed`** hoặc khi user gõ **`/end`**, **nếu**:
238
+
239
+ 1. **Scope locked**: `## Product horizon` trong bản nháp session đã có nội dung thật (không chỉ placeholder) **hoặc** user vừa xác nhận bằng lời đã chốt scope MVP / horizon.
240
+ 2. **Binding thiếu**: không tồn tại `.viepilot/META.md` **hoặc** frontmatter thiếu `viepilot_profile_id` hợp lệ (slug `kebab-case` theo contract).
241
+
242
+ **Bỏ qua mặc định** (skip intake) khi `.viepilot/META.md` đã có `viepilot_profile_id` hợp lệ — chỉ hỏi nhanh: *“Giữ profile `{id}`? Đổi profile?”*; nếu giữ → sang bước Save.
243
+
244
+ ### 5.2 Chuẩn bị registry
245
+
246
+ 1. `mkdir -p "$HOME/.viepilot/profiles"` nếu cần.
247
+ 2. Đọc `~/.viepilot/profile-map.md` nếu có để liệt kê profile hiện có (profile_id, display_name, org_tag).
248
+
249
+ ### 5.3 Disambiguation (nhiều profile / nhiều org)
250
+
251
+ - Nếu brainstorm cho thấy **nhiều org/client** hoặc **≥2 dòng trong profile-map** khớp gợi ý (cùng `org_tag` hoặc tag): **bắt buộc** user chọn **một** `profile_id` **hoặc** chọn **Tạo profile mới** (slug mới, chưa tồn tại).
252
+
253
+ ### 5.4 Q&A tuần tự (một câu mỗi lượt)
254
+
255
+ Với mỗi câu hỏi:
256
+
257
+ 1. Đưa **Proposal** ngắn (1–2 câu) suy ra từ session + Product horizon.
258
+ 2. User trả lời **Accept proposal** / **Edit** (ghi nhận bản user).
259
+ 3. Sang câu tiếp.
260
+
261
+ **Tối thiểu** phải làm rõ trước khi ghi file (khớp body sections trong global contract):
262
+
263
+ | Thứ tự | Câu hỏi (gợi ý) | Map tới |
264
+ |--------|------------------|---------|
265
+ | 1 | Tên hiển thị org/client hoặc “cá nhân”? | `display_name` |
266
+ | 2 | `org_tag` ngắn (vd. `acme`, `personal`)? | `org_tag` |
267
+ | 3 | Branding / giọng văn (audience, tone)? | body `## Branding & voice` |
268
+ | 4 | Legal / attribution công khai (nếu có)? | body `## Legal & attribution` |
269
+ | 5 | Website công khai (optional)? | frontmatter `website` |
270
+
271
+ Sau đó: chốt **`profile_id`** = slug filename (`kebab-case`).
272
+
273
+ ### 5.5 Ghi artifact (machine + project)
274
+
275
+ 1. **`~/.viepilot/profiles/<slug>.md`**: YAML frontmatter đủ key bắt buộc (`profile_id`, `display_name`, `org_tag`, `tags`, `last_updated`) + body sections đã thu thập. **Không** ghi secrets.
276
+ 2. **`~/.viepilot/profile-map.md`**: thêm hoặc cập nhật dòng bảng (cột theo contract); cập nhật `last_used` = ngày hiện tại.
277
+ 3. **`.viepilot/META.md`**: tạo/cập nhật từ `templates/project/VIEPILOT-META.md` với `viepilot_profile_id: <slug>`.
278
+
279
+ ### 5.6 Ghi nhận trong session file
280
+
281
+ Trong bản nháp / file session, thêm section:
282
+
283
+ ```markdown
284
+ ## Project meta intake (FEAT-009)
285
+ - **status**: completed | skipped
286
+ - **profile_id**: {slug}
287
+ - **profile_path**: ~/.viepilot/profiles/{slug}.md
288
+ - **binding**: .viepilot/META.md
289
+ ```
290
+
291
+ Nếu skipped (hiếm): phải có **`## Meta intake waiver`** trong cùng file session kèm **lý do** do user cung cấp.
292
+
293
+ ### 5.7 Tiếp tục
294
+
295
+ Sau khi intake **completed** hoặc **hợp lệ skip** (META đã có profile) → chuyển sang **bước 6 — Save Session**.
296
+ </step>
297
+
175
298
  <step name="save_session">
176
- ## 5. Save Session
299
+ ## 6. Save Session
177
300
 
178
301
  Tạo/cập nhật file: `docs/brainstorm/session-{YYYY-MM-DD}.md`
179
302
 
@@ -209,6 +332,17 @@ Tạo/cập nhật file: `docs/brainstorm/session-{YYYY-MM-DD}.md`
209
332
 
210
333
  **Scope note (optional):** Nếu không có post-MVP: `Single-release product — no separate horizon epics.`
211
334
 
335
+ ## Project meta intake (FEAT-009)
336
+
337
+ - **status**: not_started | completed | skipped
338
+ - **profile_id**:
339
+ - **profile_path**:
340
+ - **binding** (.viepilot/META.md):
341
+
342
+ _(Điền sau bước 5 — Project meta intake; xem `docs/dev/global-profiles.md`.)_
343
+
344
+ <!-- Nếu skipped: ## Meta intake waiver + lý do -->
345
+
212
346
  ## Architecture diagram applicability inputs
213
347
 
214
348
  > Input contract for `/vp-crystallize` Step 4. Keep concise and explicit.
@@ -261,6 +395,9 @@ Tạo/cập nhật file: `docs/brainstorm/session-{YYYY-MM-DD}.md`
261
395
  - Preview focus:
262
396
  - {layout/flow summary; list each page slug if multi-page}
263
397
 
398
+ **UX walkthrough log** (optional; FEAT-010 + ENH-019 + ENH-020 — khi đã chạy `/research-ui`):
399
+ - {YYYY-MM-DD}: scenarios exercised → top pains → **Stress findings** (tóm tắt) → research links → HTML/CSS edits summary
400
+
264
401
  ---
265
402
 
266
403
  ## Summary
@@ -289,7 +426,7 @@ git push
289
426
  </step>
290
427
 
291
428
  <step name="suggest_next">
292
- ## 6. Suggest Next Action
429
+ ## 7. Suggest Next Action
293
430
 
294
431
  ```
295
432
  ✓ Brainstorm session saved
@@ -315,9 +452,11 @@ User có thể dùng các lệnh trong phiên brainstorm:
315
452
  - `/topic {name}` - Chuyển sang topic mới
316
453
  - `/summary` - Xem tóm tắt phiên hiện tại
317
454
  - `/save` - Lưu tiến độ ngay
318
- - `/end` - Kết thúc và lưu phiên
455
+ - `/end` - Kết thúc và lưu phiên (sau **bước 5 — Project meta intake** khi binding thiếu; xem workflow)
319
456
  - `/questions` - Xem danh sách open questions
320
457
  - `/research {topic}` - Research nhanh ngay trong phiên và quay lại topic hiện tại
458
+ - `/research-ui` — UX walkthrough: mô phỏng user → designer + research → cập nhật UI direction + log (`notes.md`) — chỉ khi có UI session (FEAT-010)
459
+ - `/research ui` — alias của `/research-ui`
321
460
  </commands>
322
461
 
323
462
  <success_criteria>
@@ -329,5 +468,8 @@ User có thể dùng các lệnh trong phiên brainstorm:
329
468
  - [ ] Landing page topics trigger layout follow-up questions
330
469
  - [ ] 21st.dev references được dùng khi thảo luận landing page
331
470
  - [ ] Research có thể chạy ngay trong brainstorm session khi user yêu cầu
471
+ - [ ] **FEAT-010 + ENH-019 + ENH-020**: Trong UI Direction, `/research-ui` (hoặc `/research ui`) chạy đủ 3 phase, gồm **content stress pass** + **archetype stress recipes** + **`## UX walkthrough log`** (Stress findings) khi chỉnh prototype
332
472
  - [ ] Git committed
473
+ - [ ] **FEAT-009**: Nếu binding thiếu và scope đã locked — đã chạy **Project meta intake** (bước 5) hoặc có **`## Meta intake waiver`** có lý do trước Completed
474
+ - [ ] **`## Project meta intake (FEAT-009)`** trong session: `status` + `profile_id` khi completed (hoặc waiver nếu skipped)
333
475
  </success_criteria>