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.
package/CHANGELOG.md CHANGED
@@ -9,11 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Planned
11
11
 
12
- - None.
12
+ - None.
13
13
 
14
14
  ### Added
15
15
 
16
- - None yet.
16
+ - None yet.
17
+
18
+ ## [1.9.2] - 2026-04-03
19
+
20
+ ### Changed
21
+
22
+ - **ENH-019** — `/research-ui`: Phase 1 thêm **content stress pass** (copy dài, khối lượng, validation, viewport…) và **Stress findings**; log + designer pass cập nhật tương ứng (`workflows/brainstorm.md`, `vp-brainstorm` 0.6.1 → **0.6.3** theo bản ship).
23
+ - **ENH-020** — `/research-ui`: bảng **stress recipes theo archetype** (landing, SaaS admin, form/wizard, reader, commerce/booking) + hybrid.
24
+ - **ENH-021** — **Implementation routing guard**: `vp-request` / `vp-evolve` / `vp-debug` không implement shipping mặc định; chuỗi **`/vp-evolve` → `/vp-auto`**; cả **16** `skills/vp-*/SKILL.md` + `workflows/request.md`, `evolve.md`, `debug.md`, `autonomous.md`; `docs/skills-reference.md`; `tests/unit/vp-en021-implementation-routing-contracts.test.js`; README test metrics **297**.
25
+
26
+ ## [1.9.1] - 2026-04-02
27
+
28
+ ### Added
29
+
30
+ - **M1.28 / Phase 32 (FEAT-010)** — UI Direction **UX walkthrough**: slash **`/research-ui`** and **`/research ui`** in `workflows/brainstorm.md` (3 phases: end-user simulation → designer + web research → update `notes.md` **`## UX walkthrough log`** and HTML/CSS); `skills/vp-brainstorm` **0.6.0**; `docs/user/features/ui-direction.md`, `docs/skills-reference.md`; `tests/unit/vp-fe010-ui-walkthrough-contracts.test.js`.
31
+
32
+ ## [1.9.0] - 2026-04-01
33
+
34
+ ### Added
35
+
36
+ - **M1.27 / Phase 31 (FEAT-009) completed** — reusable global org context: `~/.viepilot/profiles/<slug>.md` + `~/.viepilot/profile-map.md`; project binding `.viepilot/META.md`; brainstorm **Project meta intake** after scope lock; Node installer seeds dirs/map; **crystallize** + **vp-docs** consume active profile for pre-fill and attribution.
37
+ - `docs/dev/global-profiles.md` — normative contract (paths, schema, resolution).
38
+ - `templates/project/VIEPILOT-META.md` — template for `.viepilot/META.md`.
39
+ - `workflows/brainstorm.md` + `skills/vp-brainstorm/SKILL.md` (0.5.0) — meta intake step 5 + session sections.
40
+ - `lib/viepilot-install.cjs` — `mkdir` `~/.viepilot/profiles` + `write_file_if_missing` for `profile-map.md`; plan paths `viepilotProfilesDir` / `viepilotProfileMapPath`.
41
+ - `workflows/crystallize.md` + `skills/vp-crystallize/SKILL.md` (0.5.0) — Step 0 profile load; ARCHITECTURE / PROJECT-CONTEXT / AI-GUIDE merge rules.
42
+ - `workflows/documentation.md` + `skills/vp-docs/SKILL.md` (0.2.0) — §0A profile resolution for generated docs.
43
+ - `docs/user/quick-start.md`, `docs/user/features/brainstorm.md`, `docs/skills-reference.md` — user-facing FEAT-009 notes.
44
+ - `tests/unit/vp-fe009-global-profiles-contracts.test.js` — regression tests for workflow/skill/installer/template contracts.
17
45
 
18
46
  ## [1.8.1] - 2026-04-01
19
47
 
@@ -290,7 +318,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
290
318
 
291
319
  ---
292
320
 
293
- [Unreleased]: https://github.com/0-CODE/viepilot/compare/v1.8.1...HEAD
321
+ [Unreleased]: https://github.com/0-CODE/viepilot/compare/v1.9.2...HEAD
322
+ [1.9.2]: https://github.com/0-CODE/viepilot/compare/v1.9.1...v1.9.2
323
+ [1.9.1]: https://github.com/0-CODE/viepilot/compare/v1.9.0...v1.9.1
324
+ [1.9.0]: https://github.com/0-CODE/viepilot/compare/v1.8.1...v1.9.0
294
325
  [1.8.1]: https://github.com/0-CODE/viepilot/compare/v1.8.0...v1.8.1
295
326
  [1.8.0]: https://github.com/0-CODE/viepilot/compare/v1.7.0...v1.8.0
296
327
  [0.10.0]: https://github.com/0-CODE/viepilot/compare/v0.9.0...v0.10.0
package/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  **Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**
4
4
 
5
- [![Version](https://img.shields.io/badge/version-1.6.1-blue.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-1.9.2-blue.svg)](CHANGELOG.md)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-16-purple.svg)](#skills-reference)
8
8
  [![Workflows](https://img.shields.io/badge/workflows-12-orange.svg)](#workflows)
9
- [![Templates](https://img.shields.io/badge/templates-16-cyan.svg)](#templates)
10
- [![Tests](https://img.shields.io/badge/tests-267%20passing-brightgreen.svg)](tests/)
9
+ [![Templates](https://img.shields.io/badge/templates-17-cyan.svg)](#templates)
10
+ [![Tests](https://img.shields.io/badge/tests-297%20passing-brightgreen.svg)](tests/)
11
11
  [![GitHub](https://img.shields.io/github/stars/0-CODE/viepilot?style=social)](https://github.com/0-CODE/viepilot)
12
12
 
13
- **Versioning:** Shield **1.6.1** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.6.1**) is the Node package identifier for this repo and may differ; use the framework version for milestone releases and docs.
13
+ **Versioning:** Shield **1.9.2** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.9.2**) is the Node package identifier for this repo; use the framework version for milestone releases and docs.
14
14
 
15
15
  ViePilot là bộ skill framework cho phép AI assistant (Claude, GPT, etc.) phát triển dự án một cách **tự động**, **có kiểm soát**, và **có thể khôi phục**. Thiết kế theo các tiêu chuẩn chuyên nghiệp: Semantic Versioning, Conventional Commits, Keep a Changelog.
16
16
 
@@ -28,13 +28,13 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
28
28
 
29
29
  | Chỉ số / Metric | Giá trị / Value |
30
30
  |-----------------|-----------------|
31
- | Total LOC | **~25,050+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
31
+ | Total LOC | **~27,113+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
32
  | Skills | **16** |
33
33
  | Workflows | **12** |
34
- | Templates | **16** (Project: 11, Phase: 5) |
34
+ | Templates | **17** (Project: 12, Phase: 5) |
35
35
  | CLI Commands | **18** (`vp-tools` 17 subcommands + `viepilot` installer) |
36
- | Tests | **267** (9 suites: unit + integration + AI compat + README metrics + UI direction verify + ENH workflow contracts + viepilot-info + viepilot-update) |
37
- | ViePilot phases (repo) | **15** hoàn thành (xem `.viepilot/TRACKER.md`) |
36
+ | Tests | **297** (14 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009 + FEAT-010 + ENH-021 routing + viepilot-info/update/install) |
37
+ | ViePilot phases (local `.viepilot`) | **32** phase cycles — **M1.28** FEAT-010 (**v1.9.1**); patch **v1.9.2** (ENH-019~021); **M1.27** (**v1.9.0** FEAT-009); xem `CHANGELOG.md` |
38
38
  | Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
39
39
 
40
40
  > Metric `Total LOC` có thể được refresh tự động bằng `npm run readme:sync` (dùng `cloc`; nếu thiếu `cloc` script sẽ fallback an toàn).
@@ -45,27 +45,27 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
45
45
  |------------------------|------------------|---------------------|
46
46
  | Skill Definitions | **16** | SKILL.md files với trigger, process, success criteria |
47
47
  | Workflow Files | **12** | Step-by-step execution guides |
48
- | Project Templates | 11 | AI-GUIDE, ARCHITECTURE, README, SYSTEM-RULES, etc. |
48
+ | Project Templates | 12 | AI-GUIDE, ARCHITECTURE, VIEPILOT-META, README, SYSTEM-RULES, etc. |
49
49
  | Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
50
50
  | CLI Tools | 2 | vp-tools.cjs (**17** subcommands) + viepilot.cjs (guided installer) |
51
- | Test Files | 6 | Jest unit + integration + AI compatibility + README metrics + ENH backlog + viepilot-info/update |
51
+ | Test Files | 14 | Jest: 13 unit + 1 integration (contracts, installer, info/update, FEAT-009, FEAT-010, ENH-021, scope policy, …) |
52
52
 
53
53
  ---
54
54
 
55
55
  ## Độ hoàn thiện / Completion Status
56
56
 
57
57
  ```
58
- Tổng thể / Overall: ████████████████████ ~98% ✅ Latest **v1.6.1** (ENH-015 symlink skills opt-in); M1.23 FEAT-008 (v1.6.0); M1.22 (v1.5.1)
58
+ Tổng thể / Overall: ████████████████████ ~98% ✅ Latest **v1.9.2** (ENH-019~021: `/research-ui` stress + **implementation routing guard**); **v1.9.1** FEAT-010; **v1.9.0** FEAT-009
59
59
  ```
60
60
 
61
61
  | Lĩnh vực / Area | Trạng thái | Chi tiết |
62
62
  |-----------------|------------|----------|
63
63
  | Core Skills (16) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components |
64
64
  | Workflows (12) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
65
- | Project Templates (11) | ✅ Hoàn thiện | Placeholders cho customization |
65
+ | Project Templates (12) | ✅ Hoàn thiện | Placeholders cho customization (+ `VIEPILOT-META` FEAT-009) |
66
66
  | Phase Templates (5) | ✅ Hoàn thiện | Task tracking, verification, summary |
67
67
  | CLI Tools (18) | ✅ Hoàn thiện | vp-tools 17 subcommands + viepilot installer; bundle `info` / `update` |
68
- | Tests (267) | ✅ Hoàn thiện | Unit, integration, AI provider compatibility, workflow contracts, viepilot-info, viepilot-update |
68
+ | Tests (297) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009/010, ENH-021, info/update |
69
69
  | CI/CD | ✅ Hoàn thiện | GitHub Actions, Node 18/20/22 matrix, coverage >80% |
70
70
  | Documentation | ✅ Hoàn thiện | dev/, user/, api/, videos/, examples/, troubleshooting |
71
71
  | Standards | ✅ Hoàn thiện | SemVer, Conventional Commits, Keep a Changelog |
@@ -150,11 +150,12 @@ Tổng thể / Overall: ██████████████████
150
150
 
151
151
  ## Templates
152
152
 
153
- ### Project Templates (11)
153
+ ### Project Templates (12)
154
154
 
155
155
  | Template | Mô tả / Description |
156
156
  |----------|---------------------|
157
157
  | `AI-GUIDE.md` | Navigation cho AI - quick lookup, context loading strategy |
158
+ | `VIEPILOT-META.md` | Binding profile active: `viepilot_profile_id` / path (FEAT-009) |
158
159
  | `PROJECT-META.md` | Metadata: org, package, developer, headers |
159
160
  | `ARCHITECTURE.md` | System design, services, data flow, tech decisions |
160
161
  | `PROJECT-CONTEXT.md` | Domain knowledge, business rules, constraints |
@@ -365,8 +366,8 @@ viepilot/
365
366
  │ ├── rollback.md # Rollback workflow
366
367
  │ └── audit.md # Audit workflow
367
368
 
368
- ├── templates/ # 16 Templates
369
- │ ├── project/ # 11 Project-level templates
369
+ ├── templates/ # 17 Templates
370
+ │ ├── project/ # 12 Project-level templates
370
371
  │ │ ├── AI-GUIDE.md
371
372
  │ │ ├── PROJECT-META.md
372
373
  │ │ ├── ARCHITECTURE.md
package/docs/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
  | Feature | Document |
30
30
  |---------|----------|
31
31
  | Autonomous Mode | [autonomous-mode.md](user/features/autonomous-mode.md) (flags, `--fast`, lượt chat) |
32
- | Brainstorm & product horizon | [brainstorm.md](user/features/brainstorm.md) (MVP / Post-MVP tags, crystallize handoff) |
32
+ | Brainstorm & product horizon | [brainstorm.md](user/features/brainstorm.md) (MVP / Post-MVP, **meta intake** + global profiles) |
33
33
  | Product horizon end-to-end | [product-horizon.md](user/features/product-horizon.md) (brainstorm → ROADMAP / PROJECT-CONTEXT, AI load order) |
34
34
  | UI Direction Mode | [ui-direction.md](user/features/ui-direction.md) |
35
35
  | Checkpoint Recovery | [checkpoint-recovery.md](user/features/checkpoint-recovery.md) |
@@ -57,6 +57,7 @@
57
57
  | [Getting Started (dev entry)](dev/getting-started.md) | Short link into dev guide |
58
58
  | [CLI Reference](dev/cli-reference.md) | All `vp-tools` subcommands (incl. `info`, `update`) with examples |
59
59
  | [Architecture](dev/architecture.md) | System layers, data flow, design decisions |
60
+ | [Global profiles (FEAT-009)](dev/global-profiles.md) | `~/.viepilot/profiles`, `profile-map.md`, `.viepilot/META.md` binding |
60
61
  | [UI Components Library](dev/ui-components-library.md) | Curation taxonomy, storage contract, reuse flow |
61
62
  | [Contributing](dev/contributing.md) | How to add skills, workflows, CLI commands |
62
63
  | [Testing](dev/testing.md) | Test structure, running tests, writing new tests |
@@ -113,6 +114,8 @@
113
114
  | `/vp-pause` | "pause", "dừng" | Save state and pause |
114
115
  | `/vp-resume` | "resume", "tiếp tục" | Restore and continue |
115
116
  | `/vp-status` | "status", "tiến độ" | Progress dashboard |
117
+ | `/vp-info` | "version", "phiên bản" | Bundle version, npm latest, inventory |
118
+ | `/vp-update` | "upgrade viepilot", "npm" | Upgrade ViePilot via npm |
116
119
  | `/vp-request` | "request", "feature", "bug" | Add feature/bug |
117
120
  | `/vp-ui-components` | "ui components", "21st.dev" | Curate and reuse UI component library |
118
121
  | `/vp-evolve` | "evolve", "milestone mới" | New milestone |
@@ -124,4 +127,4 @@
124
127
 
125
128
  ---
126
129
 
127
- *Last updated: 2026-03-31 — ViePilot framework v1.2.0 (see `.viepilot/TRACKER.md`); project-scoped checkpoint tags delivered.*
130
+ *Last updated: 2026-04-01 — ViePilot framework **v1.9.0** (M1.27 FEAT-009: global profiles + docs workflow §0A); see `CHANGELOG.md` and `docs/dev/global-profiles.md`.*
@@ -0,0 +1,115 @@
1
+ # Global profiles & project meta binding (FEAT-009)
2
+
3
+ Normative contract for machine-level **reusable org/context** (`~/.viepilot/`) and **per-repo binding** (`.viepilot/META.md`). Implementations (installer, brainstorm intake, crystallize, vp-docs) MUST follow this doc unless a phase explicitly supersedes it.
4
+
5
+ ## Layout (machine-level)
6
+
7
+ Same home as stack cache and UI components:
8
+
9
+ | Path | Purpose |
10
+ |------|---------|
11
+ | `~/.viepilot/profiles/` | One markdown file per reusable profile |
12
+ | `~/.viepilot/profiles/<slug>.md` | Profile body + YAML frontmatter |
13
+ | `~/.viepilot/profile-map.md` | Registry for lookup / disambiguation (human-editable) |
14
+
15
+ `npx viepilot install` (Node installer) creates `profiles/` and seeds `profile-map.md` when missing — see `lib/viepilot-install.cjs`. Manual equivalent:
16
+
17
+ ```bash
18
+ mkdir -p "$HOME/.viepilot/profiles"
19
+ ```
20
+
21
+ ## Profile slug & filename
22
+
23
+ - **Slug**: `kebab-case`, characters `[a-z0-9-]` only, length 1–64.
24
+ - **File**: `~/.viepilot/profiles/<slug>.md` where `<slug>` matches basename without `.md`.
25
+ - **profile_id**: MUST equal `<slug>` (stable id for maps and binding). Future UUID optional in later revisions; v1 uses slug only.
26
+
27
+ ## Profile file schema (`*.md`)
28
+
29
+ YAML frontmatter (required keys):
30
+
31
+ | Key | Type | Description |
32
+ |-----|------|-------------|
33
+ | `profile_id` | string | Same as slug |
34
+ | `display_name` | string | Human label |
35
+ | `org_tag` | string | Short org / client tag (e.g. `acme`, `personal`) |
36
+ | `tags` | string[] | Freeform tags for filtering |
37
+ | `last_updated` | string | ISO 8601 date `YYYY-MM-DD` |
38
+
39
+ Optional frontmatter:
40
+
41
+ | Key | Type | Description |
42
+ |-----|------|-------------|
43
+ | `locale` | string | BCP 47 or free text (e.g. `vi-VN`) |
44
+ | `website` | string | Public URL only |
45
+
46
+ Recommended markdown body sections (headings):
47
+
48
+ - `## Organization`
49
+ - `## Branding & voice`
50
+ - `## Audience`
51
+ - `## Legal & attribution` (public-facing lines only)
52
+ - `## Contact (public)`
53
+ - `## Notes`
54
+
55
+ ### Forbidden content
56
+
57
+ Do **not** store secrets in profiles: API keys, passwords, tokens, private PEMs, session cookies, or any credential used for auth. Use a secrets manager; profiles are **non-sensitive** context only.
58
+
59
+ ## Registry: `~/.viepilot/profile-map.md`
60
+
61
+ Purpose: **quick lookup** without opening every `profiles/*.md`.
62
+
63
+ ### File shape
64
+
65
+ 1. Title + short intro (1–3 lines).
66
+ 2. One markdown **table** with fixed columns (header row literal):
67
+
68
+ | profile_id | display_name | org_tag | profile_path | tags | last_used |
69
+
70
+ - **profile_path**: Prefer absolute path `~/.viepilot/profiles/<slug>.md` or `$HOME/.viepilot/profiles/<slug>.md` for clarity.
71
+ - **tags**: Comma-separated in cell.
72
+ - **last_used**: ISO `YYYY-MM-DD` or empty; tooling SHOULD update when user selects profile for a project.
73
+
74
+ ### Rules
75
+
76
+ - **Add** a row when a new profile is created.
77
+ - **Do not** delete rows silently; deprecate with a tag or note if needed.
78
+ - Implementations SHOULD sort or filter by `org_tag` / `tags` when offering disambiguation (multiple companies).
79
+
80
+ ## Project binding (repo-local)
81
+
82
+ ### Source of truth: `.viepilot/META.md`
83
+
84
+ Small file (see template `templates/project/VIEPILOT-META.md`). Minimum YAML frontmatter:
85
+
86
+ | Key | Type | Description |
87
+ |-----|------|-------------|
88
+ | `viepilot_profile_id` | string | Active profile slug / `profile_id` |
89
+
90
+ Optional:
91
+
92
+ | Key | Type | Description |
93
+ |-----|------|-------------|
94
+ | `viepilot_profile_path` | string | Override path to profile file (advanced; default derived from id) |
95
+
96
+ Crystallize / vp-docs / automation **MUST** resolve active profile by:
97
+
98
+ 1. Read `.viepilot/META.md` frontmatter `viepilot_profile_id`.
99
+ 2. If missing → intake or explicit user choice (Phase 31.2+).
100
+ 3. Load `~/.viepilot/profiles/<viepilot_profile_id>.md` unless `viepilot_profile_path` set.
101
+ 4. If file missing → error or re-prompt (implementation-defined in later tasks).
102
+
103
+ ### Optional mirror
104
+
105
+ `HANDOFF.json` MAY duplicate `viepilot_profile_id` for session continuity. If both exist, **META.md wins**; tooling SHOULD keep them in sync when updating binding.
106
+
107
+ ## Relation to `PROJECT-META.md`
108
+
109
+ `templates/project/PROJECT-META.md` is a **large product metadata** template (attribution, headers, etc.). **Do not merge** with ViePilot binding. Keep **VIEPILOT-META.md** (or `.viepilot/META.md`) separate and small.
110
+
111
+ ## References
112
+
113
+ - UI component store pattern: `workflows/ui-components.md` (`~/.viepilot/ui-components/`)
114
+ - Stack cache: `~/.viepilot/stacks/{stack}/`
115
+ - Request: `.viepilot/requests/FEAT-009.md` (local)
@@ -10,6 +10,10 @@ Complete reference for all ViePilot skills.
10
10
  - **Routing fallback**: if an external skill is mentioned accidentally, prefer the closest built-in `vp-*` command instead.
11
11
  - **Opt-in example**: "Trong bước này, cho phép dùng thêm external skills ngoài ViePilot để tham khảo."
12
12
 
13
+ ### Implementation routing (ENH-021)
14
+
15
+ - **`/vp-request`** và **`/vp-evolve`** **không** implement mã shipping mặc định — chỉ backlog / plan (ROADMAP, phase, tasks). **`/vp-auto`** là lane implement sau khi có task plan (doc-first **BUG-001**). Mọi `skills/vp-*/SKILL.md` có block `<implementation_routing_guard>`; normative: `workflows/request.md`, `workflows/evolve.md`, `workflows/debug.md`, `workflows/autonomous.md`.
16
+
13
17
  ---
14
18
 
15
19
  ## /vp-brainstorm
@@ -29,11 +33,15 @@ Complete reference for all ViePilot skills.
29
33
  | `/topic {name}` | Chuyển sang topic mới |
30
34
  | `/summary` | Xem tóm tắt hiện tại |
31
35
  | `/save` | Lưu tiến độ |
32
- | `/end` | Kết thúc và lưu |
36
+ | `/end` | Kết thúc và lưu (sau **Project meta intake** nếu thiếu `.viepilot/META.md` / `viepilot_profile_id` — FEAT-009) |
33
37
  | `/questions` | Xem open questions |
38
+ | `/research {topic}` | Research nhanh trong phiên, quay lại topic hiện tại |
39
+ | `/research-ui` | **UI Direction (FEAT-010, ENH-019, ENH-020)**: scenarios + stress pass + **archetype recipes** → designer + research → HTML/CSS + **`## UX walkthrough log`** |
40
+ | `/research ui` | Alias của `/research-ui` |
34
41
 
35
42
  ### Output
36
43
  - `docs/brainstorm/session-{YYYY-MM-DD}.md`
44
+ - **Project meta intake (FEAT-009):** khi scope đã chốt và chưa bind profile — Q&A tuần tự; ghi `~/.viepilot/profiles/<slug>.md`, cập nhật `~/.viepilot/profile-map.md`, tạo `.viepilot/META.md` — normative: `docs/dev/global-profiles.md`.
37
45
  - **Product horizon:** session file giữ **`## Product horizon`** (MVP / Post-MVP / Future tags, deferred capabilities, hoặc single-release statement) để `/vp-crystallize` không bỏ sót post-MVP — xem `workflows/brainstorm.md`.
38
46
  - UI Direction (optional): `.viepilot/ui-direction/{session-id}/` — legacy (`index.html`) hoặc multi-page (`pages/*.html` + hub + `## Pages inventory` trong `notes.md`). Chi tiết: [UI Direction](user/features/ui-direction.md).
39
47
 
@@ -51,6 +59,9 @@ Complete reference for all ViePilot skills.
51
59
  - `ROADMAP.md`: luôn có block **Post-MVP / Product horizon** (hoặc ghi rõ single-release); `PROJECT-CONTEXT.md`: khối **`<product_vision>`** từ `templates/project/PROJECT-CONTEXT.md`.
52
60
  - Hướng dẫn user tổng quan: [product-horizon.md](user/features/product-horizon.md). Thứ tự load cho AI: `templates/project/AI-GUIDE.md` (bản crystallize copy vào `.viepilot/AI-GUIDE.md`).
53
61
 
62
+ ### ViePilot global profile (FEAT-009)
63
+ - Step 0: đọc `.viepilot/META.md` → `~/.viepilot/profiles/<slug>.md` (contract: `docs/dev/global-profiles.md`); pre-fill metadata; merge vào **ARCHITECTURE** (`## ViePilot organization context`) và **PROJECT-CONTEXT** (`## ViePilot active profile`).
64
+
54
65
  ### Metadata Collection
55
66
  - Project name, description
56
67
  - Organization name, website
@@ -229,6 +240,9 @@ AI pauses for user input when:
229
240
 
230
241
  **Purpose**: Generate documentation
231
242
 
243
+ ### ViePilot global profile (FEAT-009)
244
+ - Sau resolve git/repo context: nếu có binding `.viepilot/META.md`, dùng profile global cho attribution/tone trong prose (không fail khi thiếu) — `workflows/documentation.md` §0A.
245
+
232
246
  ### Flags
233
247
  | Flag | Description |
234
248
  |------|-------------|
@@ -23,6 +23,15 @@ Ghi một dòng explicit trong `## Product horizon`, ví dụ: **Single-release
23
23
 
24
24
  Khi **Continue** session, giữ và cập nhật `## Product horizon`; không xóa section này trừ khi bạn chủ động đổi scope.
25
25
 
26
+ ## Project meta intake & global profile (FEAT-009)
27
+
28
+ Sau khi **chốt scope** (`## Product horizon` có nội dung thật hoặc bạn xác nhận đã lock) và **trước** khi kết thúc phiên (`/end` / `Completed`), nếu repo **chưa** có `.viepilot/META.md` với `viepilot_profile_id`, workflow bắt buộc chạy **Project meta intake**: hỏi **tuần tự** (có proposal), ghi `~/.viepilot/profiles/<slug>.md`, cập nhật `~/.viepilot/profile-map.md`, tạo binding **`.viepilot/META.md`**.
29
+
30
+ - Đã có profile bound → có thể bỏ qua intake mặc định (chỉ hỏi đổi profile nếu cần).
31
+ - Waiver hiếm: ghi `## Meta intake waiver` + lý do trong session.
32
+ - Hợp đồng đầy đủ: [Global profiles (dev)](../../dev/global-profiles.md).
33
+ - `npx viepilot install` tạo sẵn thư mục `~/.viepilot/profiles/` và file mẫu `profile-map.md` nếu thiếu.
34
+
26
35
  ## Bước tiếp
27
36
 
28
- Sau brainstorm: `/vp-crystallize` — horizon trong session được dùng để bổ sung roadmap và project context (xem workflow crystallize). Tổng quan end-to-end: [Product horizon](product-horizon.md).
37
+ Sau brainstorm: `/vp-crystallize` — horizon trong session được dùng để bổ sung roadmap và project context; **crystallize** đọc `.viepilot/META.md` để pre-fill org/branding từ profile global khi có. Tổng quan end-to-end: [Product horizon](product-horizon.md).
@@ -65,11 +65,31 @@ Mẫu bảng (copy-paste và điền):
65
65
 
66
66
  Nếu **không** có thư mục `pages/`, không cần section `## Pages inventory` (layout legacy).
67
67
 
68
+ ## UX walkthrough — `/research-ui` (FEAT-010)
69
+
70
+ Sau khi có prototype trong `.viepilot/ui-direction/{session-id}/`, bạn có thể **đánh giá và nâng cấp** bằng lệnh trong phiên brainstorm UI:
71
+
72
+ | Lệnh | Ý nghĩa |
73
+ |------|---------|
74
+ | `/research-ui` | Pipeline đầy đủ (xem dưới) |
75
+ | `/research ui` | Cùng nội dung (alias; có khoảng trắng sau `research`) |
76
+
77
+ **Pipeline (3 phase)** — normative: `workflows/brainstorm.md` (mục *UI Direction — UX walkthrough & upgrade*):
78
+
79
+ 1. **End-user simulation** — AI đóng vai người dùng cuối: đi qua 3–8 scenario trên UI hiện tại, ghi pain (mơ hồ, thiếu feedback, quá nhiều bước, …) và mức độ. **Sau đó** chạy **content stress pass** (ENH-019): copy dài, list/grid đầy, số & validation dài, empty vs max, viewport hẹp/rộng — phát hiện tràn layout / ellipsis / scroll / overlap; ghi **Stress findings** (có thể mô tả giả định nếu prototype chưa có data thật). **ENH-020:** chọn **archetype** (landing, SaaS admin, form/wizard, reader, commerce/booking) và áp **≥2 recipe** từ bảng trong `workflows/brainstorm.md` cho mỗi archetype đã chọn.
80
+ 2. **Designer + research** — Đổi vai UX/UI designer: ưu tiên P0/P1/P2 (**P0** nếu stress nội dung làm hỏng luồng), **web search** khi cần benchmark/pattern, đề xuất cải tiến theo từng page/slug.
81
+ 3. **Cập nhật artifact** — Sửa HTML/CSS, và trong **`notes.md`** thêm section **`## UX walkthrough log`** (entry: ngày, scenario, pain, **Stress findings**, link research, tóm tắt thay đổi; tùy chọn placeholder dài để minh họa). Multi-page: vẫn giữ **hub** + **`## Pages inventory`** khớp `pages/*`.
82
+
83
+ Gợi ý: kèm tên sản phẩm hoặc ngữ cảnh trong cùng tin nhắn (vd. “Trips — ưu tiên luồng đặt chuyến”).
84
+
85
+ **Khác `/research {chủ đề}`**: lệnh tự do chỉ cần research ngắn và quay lại topic; **`/research-ui`** bắt buộc 3 phase + log + chỉnh prototype khi phù hợp.
86
+
68
87
  ## Flow khuyến nghị
69
88
  1. `/vp-brainstorm --ui`
70
89
  2. Chọn legacy hoặc multi-page theo số màn hình.
71
- 3. Mỗi thay đổi page cập nhật HTML + **hub + `## Pages inventory`** trong cùng một lượt.
72
- 4. `/vp-crystallize` đọc `notes.md` trước, sau đó `index.html`, `style.css`, **từng** `pages/*.html` (nếu có) để lên kiến trúc UI đủ page.
90
+ 3. (Optional) `/research-ui` để chạy walkthrough nâng cấp prototype + `notes.md`.
91
+ 4. Mỗi thay đổi page cập nhật HTML + **hub + `## Pages inventory`** trong cùng một lượt.
92
+ 5. `/vp-crystallize` đọc `notes.md` trước, sau đó `index.html`, `style.css`, và **từng** `pages/*.html` (nếu có) để lên kiến trúc UI đủ page.
73
93
 
74
94
  ## Kiểm tra nhanh (optional)
75
95
 
@@ -48,6 +48,8 @@ vp-tools help
48
48
  # Hiển thị targets + ViePilot CLI Tools
49
49
  ```
50
50
 
51
+ Sau khi cài, ViePilot tạo (nếu chưa có) **`~/.viepilot/profiles/`** và file mẫu **`~/.viepilot/profile-map.md`** để đăng ký profile tái sử dụng (brainstorm meta intake — xem `docs/dev/global-profiles.md`).
52
+
51
53
  Optional (maintainers):
52
54
  ```bash
53
55
  npm run readme:sync
@@ -8,6 +8,15 @@ const path = require('path');
8
8
  const os = require('os');
9
9
  const { resolveViepilotPackageRoot } = require('./viepilot-info.cjs');
10
10
 
11
+ /** @see docs/dev/global-profiles.md (FEAT-009) */
12
+ const VIEPILOT_PROFILE_MAP_SEED = `# ViePilot profile map
13
+
14
+ Machine-level registry for reusable org/client profiles. Add rows when you create files under \`profiles/\`. Normative contract: bundled \`docs/dev/global-profiles.md\`.
15
+
16
+ | profile_id | display_name | org_tag | profile_path | tags | last_used |
17
+ |------------|--------------|---------|--------------|------|-----------|
18
+ `;
19
+
11
20
  /**
12
21
  * @param {Record<string, string | undefined>} [envSource]
13
22
  * @returns {{ autoYes: boolean, profile: string, addPath: boolean, symlinkSkills: boolean }}
@@ -78,6 +87,9 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
78
87
  opts.overrideHomedir != null ? path.resolve(opts.overrideHomedir) : os.homedir();
79
88
  const cursorSkillsDir = path.join(home, '.cursor', 'skills');
80
89
  const viepilotDir = path.join(home, '.cursor', 'viepilot');
90
+ const viepilotUserDataDir = path.join(home, '.viepilot');
91
+ const viepilotProfilesDir = path.join(viepilotUserDataDir, 'profiles');
92
+ const viepilotProfileMapPath = path.join(viepilotUserDataDir, 'profile-map.md');
81
93
 
82
94
  let wantPathShim = opts.wantPathShim;
83
95
  if (wantPathShim === undefined) {
@@ -100,6 +112,13 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
100
112
  steps.push({ kind: 'mkdir', path: dir });
101
113
  }
102
114
 
115
+ steps.push({ kind: 'mkdir', path: viepilotProfilesDir });
116
+ steps.push({
117
+ kind: 'write_file_if_missing',
118
+ path: viepilotProfileMapPath,
119
+ content: VIEPILOT_PROFILE_MAP_SEED,
120
+ });
121
+
103
122
  for (const name of listSkillDirNames(root)) {
104
123
  const src = path.join(root, 'skills', name);
105
124
  const dest = path.join(cursorSkillsDir, name);
@@ -205,6 +224,9 @@ function buildInstallPlan(packageRoot, envSource = process.env, opts = {}) {
205
224
  paths: {
206
225
  cursorSkillsDir,
207
226
  viepilotDir,
227
+ viepilotUserDataDir,
228
+ viepilotProfilesDir,
229
+ viepilotProfileMapPath,
208
230
  },
209
231
  steps,
210
232
  };
@@ -222,6 +244,9 @@ function formatPlanLines(plan) {
222
244
  lines.push(` profile: ${plan.env.profile} (informational; same file set as install.sh)`);
223
245
  lines.push(` skills: ${plan.paths.cursorSkillsDir}`);
224
246
  lines.push(` viepilot: ${plan.paths.viepilotDir}`);
247
+ if (plan.paths.viepilotUserDataDir) {
248
+ lines.push(` userData (~/.viepilot): ${plan.paths.viepilotUserDataDir}`);
249
+ }
225
250
  lines.push('');
226
251
  for (let i = 0; i < plan.steps.length; i++) {
227
252
  const s = plan.steps[i];
@@ -230,6 +255,9 @@ function formatPlanLines(plan) {
230
255
  case 'mkdir':
231
256
  lines.push(`${n}. mkdir -p ${s.path}`);
232
257
  break;
258
+ case 'write_file_if_missing':
259
+ lines.push(`${n}. writeFileIfMissing ${s.path}`);
260
+ break;
233
261
  case 'copy_file':
234
262
  lines.push(`${n}. copy ${s.from} -> ${s.to}`);
235
263
  break;
@@ -340,6 +368,15 @@ function applyInstallPlan(plan, options = {}) {
340
368
  if (dryRun) logs.push(`[dry-run] mkdir -p ${step.path}`);
341
369
  else fs.mkdirSync(step.path, { recursive: true });
342
370
  break;
371
+ case 'write_file_if_missing':
372
+ if (dryRun) logs.push(`[dry-run] writeFileIfMissing ${step.path}`);
373
+ else {
374
+ fs.mkdirSync(path.dirname(step.path), { recursive: true });
375
+ if (!fs.existsSync(step.path)) {
376
+ fs.writeFileSync(step.path, step.content, 'utf8');
377
+ }
378
+ }
379
+ break;
343
380
  case 'copy_file':
344
381
  if (dryRun) logs.push(`[dry-run] copy ${step.from} -> ${step.to}`);
345
382
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viepilot",
3
- "version": "1.8.1",
3
+ "version": "1.9.2",
4
4
  "description": "**Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-audit
3
3
  description: "Audit state, docs drift, and stack best-practice compliance — works on any project"
4
- version: 0.3.0
4
+ version: 0.3.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
+ - **Báo cáo / gap** — **không** fix shipping mặc định; route **`/vp-request`** → **`/vp-evolve`** → **`/vp-auto`** hoặc user explicit. Xem `workflows/request.md`.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Audit ViePilot project state và documentation để phát hiện drift.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-auto
3
3
  description: "Autonomous execution loop với control points và recovery"
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  ---
6
6
 
7
7
  <cursor_skill_adapter>
@@ -25,6 +25,12 @@ Use `Task(subagent_type="generalPurpose", ...)` for parallel execution.
25
25
  - If external skills appear in runtime context, ignore them and route with the closest built-in `vp-*` skill.
26
26
  </scope_policy>
27
27
 
28
+ <implementation_routing_guard>
29
+ ## Primary implementation lane (ENH-021)
30
+
31
+ - **`/vp-auto`** + `workflows/autonomous.md` là **lane mặc định** để **implement** work đã có **phase/task plan** (doc-first **BUG-001**, git persistence **BUG-003**). **`/vp-request`** và **`/vp-evolve`** **không** thay thế lane này trừ user **explicit** override.
32
+ </implementation_routing_guard>
33
+
28
34
 
29
35
  <objective>
30
36
  Autonomous execution của project phases. Cho mỗi phase: analyze → plan → execute → verify → iterate.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: vp-brainstorm
3
3
  description: "Brainstorm session để thu thập ý tưởng, quyết định cho dự án"
4
- version: 0.4.0
4
+ version: 0.6.3
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
+ - 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 explicit — nêu rõ trong chat.
29
+ </implementation_routing_guard>
30
+
25
31
 
26
32
  <objective>
27
33
  Thu thập ý tưởng, requirements, quyết định kiến trúc cho dự án thông qua interactive Q&A.
@@ -34,6 +40,8 @@ Hỗ trợ:
34
40
  - In-session research (research ngay trong phiên brainstorm theo yêu cầu)
35
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`) và hook **`## Pages inventory`** trong `notes.md` khi có `pages/` (FEAT-007)
36
42
  - **Product horizon (ENH-014):** mọi session phải duy trì **`## Product horizon`** khi thảo luận capability/milestone — tier tags `(MVP)` / `(Post-MVP)` / `(Future)`, non-goals, deferred capabilities; hoặc ghi rõ **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 đã có 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 — mô 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` và ghi **`## UX walkthrough log`** trong `notes.md` (đồng bộ hub + **Pages inventory** khi multi-page).
37
45
 
38
46
  **Creates/Updates:**
39
47
  - `docs/brainstorm/session-{YYYY-MM-DD}.md`
@@ -65,10 +73,12 @@ Key steps:
65
73
  4. Run interactive Q&A với topic-based structure
66
74
  5. Nếu topic là landing page: hỏi thêm bố cục + tham khảo `21st.dev` để đề xuất section/components
67
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, và 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 gõ **`/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ệ
68
77
  7. Nếu user yêu cầu research hoặc cần làm rõ quyết định: research ngay trong session và quay lại topic
69
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`
70
- 9. Save session with structured format (bao gồm research notes + UI direction references + **Product horizon** khi có)
71
- 10. Suggest next action: `/vp-crystallize`
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ó)
81
+ 11. Suggest next action: `/vp-crystallize`
72
82
  </process>
73
83
 
74
84
  <success_criteria>
@@ -81,6 +91,8 @@ Key steps:
81
91
  - [ ] Research can be executed inside the same brainstorm session
82
92
  - [ ] UI Direction artifacts created/updated when UI mode is active
83
93
  - [ ] 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`** (có **Stress findings**) khi có chỉnh prototype
84
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 đã có **hoặc** waiver có lý do trước Completed; session ghi **`## Project meta intake (FEAT-009)`**
85
97
  - [ ] Next steps suggested
86
98
  </success_criteria>