viepilot 1.2.0 → 1.6.1
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 +30 -0
- package/README.md +23 -19
- package/bin/vp-tools.cjs +221 -0
- package/dev-install.sh +29 -8
- package/docs/README.md +5 -3
- package/docs/dev/cli-reference.md +70 -1
- package/docs/dev/contributing.md +4 -0
- package/docs/skills-reference.md +47 -2
- package/docs/user/features/autonomous-mode.md +16 -0
- package/docs/user/features/brainstorm.md +28 -0
- package/docs/user/features/product-horizon.md +18 -0
- package/docs/user/features/ui-direction.md +63 -12
- package/docs/user/quick-start.md +22 -0
- package/install.sh +15 -3
- package/lib/viepilot-info.cjs +196 -0
- package/lib/viepilot-update.cjs +156 -0
- package/package.json +2 -1
- package/skills/vp-auto/SKILL.md +9 -0
- package/skills/vp-brainstorm/SKILL.md +9 -5
- package/skills/vp-crystallize/SKILL.md +17 -12
- package/skills/vp-info/SKILL.md +62 -0
- package/skills/vp-update/SKILL.md +59 -0
- package/templates/project/AI-GUIDE.md +23 -11
- package/templates/project/PROJECT-CONTEXT.md +22 -0
- package/templates/project/ROADMAP.md +27 -0
- package/workflows/autonomous.md +23 -0
- package/workflows/brainstorm.md +62 -11
- package/workflows/crystallize.md +36 -9
package/skills/vp-auto/SKILL.md
CHANGED
|
@@ -35,6 +35,15 @@ Pauses at control points:
|
|
|
35
35
|
- `CHANGELOG.md` (if feature/fix)
|
|
36
36
|
- `.viepilot/ROADMAP.md` when task completion changes phase progress/status
|
|
37
37
|
|
|
38
|
+
**Git persistence gate before PASS (BUG-003):**
|
|
39
|
+
- Task/phase cannot be marked PASS if git is not durably persisted.
|
|
40
|
+
- Required checks:
|
|
41
|
+
- `git status --porcelain` must be empty
|
|
42
|
+
- upstream branch must exist (`git rev-parse ... @{u}`)
|
|
43
|
+
- no unpushed commits (`git rev-list --count @{u}..HEAD` equals `0`)
|
|
44
|
+
- Recommended single check: `node bin/vp-tools.cjs git-persistence --strict`
|
|
45
|
+
- On failure: route to control point (retry commit/push, rollback, or stop).
|
|
46
|
+
|
|
38
47
|
**Mandatory task decomposition before implementation:**
|
|
39
48
|
- Objective with concrete expected outcome
|
|
40
49
|
- Exact file paths to create/modify
|
|
@@ -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
|
+
version: 0.4.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<cursor_skill_adapter>
|
|
@@ -25,7 +25,8 @@ Hỗ trợ:
|
|
|
25
25
|
- Xem lại session trước đó
|
|
26
26
|
- Landing page layout discovery (hỏi thêm để chốt bố cục)
|
|
27
27
|
- In-session research (research ngay trong phiên brainstorm theo yêu cầu)
|
|
28
|
-
- UI Direction mode: tạo/cập nhật HTML prototype + notes trong `.viepilot/ui-direction/{session-id}/`
|
|
28
|
+
- 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)
|
|
29
|
+
- **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`)
|
|
29
30
|
|
|
30
31
|
**Creates/Updates:**
|
|
31
32
|
- `docs/brainstorm/session-{YYYY-MM-DD}.md`
|
|
@@ -56,10 +57,11 @@ Key steps:
|
|
|
56
57
|
3. Load context if continuing
|
|
57
58
|
4. Run interactive Q&A với topic-based structure
|
|
58
59
|
5. Nếu topic là landing page: hỏi thêm bố cục + tham khảo `21st.dev` để đề xuất section/components
|
|
59
|
-
6. Nếu topic cần UI/UX: tạo/cập nhật UI Direction artifacts
|
|
60
|
+
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`)
|
|
60
61
|
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
|
|
61
|
-
8.
|
|
62
|
-
9.
|
|
62
|
+
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`
|
|
63
|
+
9. Save session with structured format (bao gồm research notes + UI direction references + **Product horizon** khi có)
|
|
64
|
+
10. Suggest next action: `/vp-crystallize`
|
|
63
65
|
</process>
|
|
64
66
|
|
|
65
67
|
<success_criteria>
|
|
@@ -71,5 +73,7 @@ Key steps:
|
|
|
71
73
|
- [ ] 21st.dev references included when relevant
|
|
72
74
|
- [ ] Research can be executed inside the same brainstorm session
|
|
73
75
|
- [ ] UI Direction artifacts created/updated when UI mode is active
|
|
76
|
+
- [ ] Multi-page sessions: hub links + `## Pages inventory` stay in sync with `pages/*.html`
|
|
77
|
+
- [ ] `## Product horizon` present với MVP / Post-MVP / Future (hoặc explicit single-release statement) khi scope được thảo luận
|
|
74
78
|
- [ ] Next steps suggested
|
|
75
79
|
</success_criteria>
|
|
@@ -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
|
+
version: 0.4.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<cursor_skill_adapter>
|
|
@@ -25,9 +25,9 @@ Chuyển đổi brainstorm sessions thành structured artifacts để AI có th
|
|
|
25
25
|
├── AI-GUIDE.md # Navigation cho AI
|
|
26
26
|
├── PROJECT-META.md # Metadata dự án
|
|
27
27
|
├── ARCHITECTURE.md # System design
|
|
28
|
-
├── PROJECT-CONTEXT.md # Domain knowledge
|
|
28
|
+
├── PROJECT-CONTEXT.md # Domain knowledge + `<product_vision>` (phased scope)
|
|
29
29
|
├── SYSTEM-RULES.md # Coding rules & standards
|
|
30
|
-
├── ROADMAP.md #
|
|
30
|
+
├── ROADMAP.md # MVP phases & tasks + **Post-MVP / Product horizon** block (mandatory)
|
|
31
31
|
├── TRACKER.md # Progress tracking
|
|
32
32
|
├── HANDOFF.json # Machine-readable state
|
|
33
33
|
└── schemas/ # Database, API, Kafka schemas
|
|
@@ -75,12 +75,15 @@ Ask user for:
|
|
|
75
75
|
- Load all brainstorm sessions
|
|
76
76
|
- Extract: decisions, architecture, schemas, features
|
|
77
77
|
- Extract selected tech stacks
|
|
78
|
-
-
|
|
78
|
+
- **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
|
|
79
|
+
- Validate completeness (tech stack, features, schema/API clarity, **horizon gate**)
|
|
79
80
|
|
|
80
81
|
### Step 1A: Consume UI direction (if present)
|
|
81
|
-
- Read `.viepilot/ui-direction/{session-id}/notes.md
|
|
82
|
-
-
|
|
83
|
-
-
|
|
82
|
+
- Read `.viepilot/ui-direction/{session-id}/notes.md` first, then `style.css`, then HTML:
|
|
83
|
+
- **Multi-page:** if `pages/*.html` exists → require `## Pages inventory` in `notes.md`, validate it lists every page file, read each `pages/*.html` plus hub `index.html` for navigation.
|
|
84
|
+
- **Legacy:** no `pages/` → read `index.html` + `style.css` as before.
|
|
85
|
+
- Carry approved layout/component decisions into architecture + roadmap artifacts; **architecture must reference all pages** from inventory when multi-page.
|
|
86
|
+
- Mark assumptions explicitly if direction artifacts are missing or inventory/files mismatch.
|
|
84
87
|
|
|
85
88
|
### Step 1B: Official stack research (mandatory)
|
|
86
89
|
- For every selected stack, research official docs and authoritative sources
|
|
@@ -119,6 +122,7 @@ Ask user for:
|
|
|
119
122
|
- Business rules
|
|
120
123
|
- Conventions
|
|
121
124
|
- Constraints
|
|
125
|
+
- 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
|
|
122
126
|
|
|
123
127
|
### Step 6: Generate SYSTEM-RULES.md
|
|
124
128
|
- Architecture rules
|
|
@@ -131,10 +135,9 @@ Ask user for:
|
|
|
131
135
|
- Stack-specific rules from cache
|
|
132
136
|
|
|
133
137
|
### Step 7: Generate ROADMAP.md
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
- Add verification checkpoints
|
|
138
|
+
- Use `templates/project/ROADMAP.md` — **executable MVP phases** first (tasks, criteria, verification)
|
|
139
|
+
- **Mandatory `## Post-MVP / Product horizon`:** epic-level deferred work from horizon inventory **or** explicit single-release statement (no silent omission)
|
|
140
|
+
- **Self-check before finalize:** non-empty horizon inventory must appear in ROADMAP; if mismatch → stop and ask user — see `workflows/crystallize.md` Step 7
|
|
138
141
|
|
|
139
142
|
### Step 8: Generate schemas/
|
|
140
143
|
- database-schema.sql
|
|
@@ -168,7 +171,9 @@ Ask user for:
|
|
|
168
171
|
- [ ] All artifacts created in .viepilot/
|
|
169
172
|
- [ ] PROJECT-META.md has complete metadata
|
|
170
173
|
- [ ] SYSTEM-RULES.md has all standards
|
|
171
|
-
- [ ]
|
|
174
|
+
- [ ] Step 1 horizon extracted or explicit single-release recorded; validation gate satisfied
|
|
175
|
+
- [ ] PROJECT-CONTEXT.md includes populated **`<product_vision>`** (template placeholders filled from brainstorm)
|
|
176
|
+
- [ ] ROADMAP.md has MVP phases with tasks **and** mandatory Post-MVP / horizon block (or explicit single-release statement)
|
|
172
177
|
- [ ] TRACKER.md initialized
|
|
173
178
|
- [ ] Project files created
|
|
174
179
|
- [ ] Git committed
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vp-info
|
|
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
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<cursor_skill_adapter>
|
|
8
|
+
## A. Skill Invocation
|
|
9
|
+
- Skill được gọi khi user mention `vp-info`, `/vp-info`, "viepilot version", "phiên bản viepilot", "skills list bundle"
|
|
10
|
+
- Treat all user text after the skill mention as `{{VP_ARGS}}`
|
|
11
|
+
|
|
12
|
+
## B. Tool Usage
|
|
13
|
+
Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
|
|
14
|
+
</cursor_skill_adapter>
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Chạy **`vp-tools info`** để lấy metadata bundle ViePilot (không cần `.viepilot/` trong project đích).
|
|
18
|
+
|
|
19
|
+
**Output hữu ích cho agent:**
|
|
20
|
+
- `installedVersion`, `packageName`, `packageRoot`
|
|
21
|
+
- `latestNpm` (ok + version hoặc lỗi mạng/registry)
|
|
22
|
+
- `gitHead` (nếu clone có git)
|
|
23
|
+
- `skills[]`: `id`, `version`, `relativePath`
|
|
24
|
+
- `workflows[]`: `id`, `relativePath`, `note`
|
|
25
|
+
|
|
26
|
+
Dùng **`vp-tools info --json`** khi cần parse hoặc so sánh phiên bản trong script.
|
|
27
|
+
</objective>
|
|
28
|
+
|
|
29
|
+
<execution_context>
|
|
30
|
+
@$HOME/.cursor/viepilot/bin/vp-tools.cjs
|
|
31
|
+
</execution_context>
|
|
32
|
+
|
|
33
|
+
<process>
|
|
34
|
+
|
|
35
|
+
### Step 1: Resolve CLI
|
|
36
|
+
Ưu tiên theo thứ tự:
|
|
37
|
+
1. `vp-tools info` — khi ViePilot đã có trên `PATH` (npm global hoặc shim).
|
|
38
|
+
2. `node <viepilot-package>/bin/vp-tools.cjs info` — từ repo clone hoặc `node_modules/viepilot`.
|
|
39
|
+
|
|
40
|
+
### Step 2: Chạy lệnh
|
|
41
|
+
```bash
|
|
42
|
+
vp-tools info
|
|
43
|
+
# hoặc
|
|
44
|
+
vp-tools info --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Step 3: Diễn giải JSON (khi dùng `--json`)
|
|
48
|
+
- **`packageRoot`**: gốc package `viepilot` CLI đang resolve được.
|
|
49
|
+
- **`installedVersion`**: semver trong `package.json` của bundle đó.
|
|
50
|
+
- **`latestNpm`**: `{ ok, version }` hoặc `{ ok: false, error }`.
|
|
51
|
+
- **`skills`**: inventory skill trong `skills/*/SKILL.md` (version từ frontmatter).
|
|
52
|
+
- **`workflows`**: file `workflows/*.md`.
|
|
53
|
+
|
|
54
|
+
### Step 4: Lỗi thường gặp
|
|
55
|
+
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 có dependency `viepilot`, hoặc trỏ thẳng tới `bin/vp-tools.cjs` trong clone.
|
|
56
|
+
</process>
|
|
57
|
+
|
|
58
|
+
<success_criteria>
|
|
59
|
+
- [ ] Đã gọi đúng subcommand `info` (hoặc `--json` khi cần parse)
|
|
60
|
+
- [ ] Nêu rõ `installedVersion` và (nếu có) `latestNpm.version`
|
|
61
|
+
- [ ] Khi user hỏi “có những skill nào trong bundle”, tóm tắt từ `skills[]` hoặc output bảng CLI
|
|
62
|
+
</success_criteria>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vp-update
|
|
3
|
+
description: "Nâng cấp package viepilot qua npm (dry-run, --yes, --global) qua vp-tools"
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<cursor_skill_adapter>
|
|
8
|
+
## A. Skill Invocation
|
|
9
|
+
- Skill được gọi khi user mention `vp-update`, `/vp-update`, "upgrade viepilot", "cập nhật viepilot npm"
|
|
10
|
+
- Treat all user text after the skill mention as `{{VP_ARGS}}`
|
|
11
|
+
|
|
12
|
+
## B. Tool Usage
|
|
13
|
+
Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
|
|
14
|
+
</cursor_skill_adapter>
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
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`.
|
|
18
|
+
|
|
19
|
+
**Ràng buộc an toàn:**
|
|
20
|
+
- **Non-interactive** (CI, agent không TTY): bắt buộc **`--dry-run`** hoặc **`--yes`**; nếu không sẽ exit lỗi.
|
|
21
|
+
- Luôn ưu tiên **`--dry-run`** trước khi apply, trừ khi user đã yêu cầu rõ apply.
|
|
22
|
+
|
|
23
|
+
**Phân biệt target:** trong repo **không phải** ViePilot nhưng có `node_modules/viepilot`, lệnh có thể cập nhật **local dependency**. Muốn chỉ nâng **global**, thêm **`--global`**.
|
|
24
|
+
</objective>
|
|
25
|
+
|
|
26
|
+
<execution_context>
|
|
27
|
+
@$HOME/.cursor/viepilot/bin/vp-tools.cjs
|
|
28
|
+
</execution_context>
|
|
29
|
+
|
|
30
|
+
<process>
|
|
31
|
+
|
|
32
|
+
### Step 1: Dry run (mặc định khi tự động)
|
|
33
|
+
```bash
|
|
34
|
+
vp-tools update --dry-run
|
|
35
|
+
```
|
|
36
|
+
Đọc output: planned npm command, phiên bản hiện tại vs latest, cảnh báo ambiguous/global.
|
|
37
|
+
|
|
38
|
+
### Step 2: Apply (sau khi user đồng ý hoặc đã yêu cầu rõ)
|
|
39
|
+
```bash
|
|
40
|
+
vp-tools update --yes
|
|
41
|
+
```
|
|
42
|
+
Hoặc ép global:
|
|
43
|
+
```bash
|
|
44
|
+
vp-tools update --global --dry-run
|
|
45
|
+
vp-tools update --global --yes
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 3: Interactive
|
|
49
|
+
Nếu terminal tương tác và **không** có `--yes`, CLI có thể hỏi xác nhận trước khi chạy npm.
|
|
50
|
+
|
|
51
|
+
### Step 4: Rollback gợi ý
|
|
52
|
+
Output dry-run/update thường gợi ý `npm install -g viepilot@<previous>` — giữ phiên bản cũ từ `vp-tools info` nếu cần hoàn tác.
|
|
53
|
+
</process>
|
|
54
|
+
|
|
55
|
+
<success_criteria>
|
|
56
|
+
- [ ] Không chạy apply trong non-interactive mà thiếu `--yes`
|
|
57
|
+
- [ ] Nêu rõ target (local vs global) khi user đang ở project lạ
|
|
58
|
+
- [ ] Ghi nhận khi đã `already up to date` (no-op thành công)
|
|
59
|
+
</success_criteria>
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
| Tôi cần... | Đọc file | Section |
|
|
9
9
|
|------------|----------|---------|
|
|
10
10
|
| Hiểu project làm gì | `PROJECT-CONTEXT.md` | `<domain_knowledge>` |
|
|
11
|
+
| Tầm nhìn & scope theo pha (MVP / Post-MVP / Future) | `PROJECT-CONTEXT.md` | `<product_vision>` |
|
|
12
|
+
| Roadmap sau MVP & horizon (không chỉ task hiện tại) | `ROADMAP.md` | Sections Post-MVP / Future / product horizon |
|
|
11
13
|
| Biết tech stack | `ARCHITECTURE.md` | `## Technology Decisions` |
|
|
12
14
|
| Xem service nào làm gì | `ARCHITECTURE.md` | `## Services` |
|
|
13
15
|
| Biết đang ở phase nào | `TRACKER.md` | `## Current State` |
|
|
@@ -36,20 +38,28 @@ Chỉ đọc:
|
|
|
36
38
|
Đọc theo thứ tự:
|
|
37
39
|
1. AI-GUIDE.md (file này)
|
|
38
40
|
2. TRACKER.md → biết đang ở đâu
|
|
39
|
-
3.
|
|
40
|
-
4.
|
|
41
|
-
5.
|
|
41
|
+
3. PROJECT-CONTEXT.md → <product_vision> + phased scope (đọc TRƯỚC khi khóa thiết kế chi tiết)
|
|
42
|
+
4. ROADMAP.md → skim Post-MVP / Future / horizon, rồi task hiện tại
|
|
43
|
+
5. SYSTEM-RULES.md → coding rules
|
|
44
|
+
6. Schema file nếu cần
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
### Full Context (cho architecture decisions)
|
|
45
48
|
```
|
|
46
|
-
Đọc
|
|
47
|
-
1.
|
|
48
|
-
2.
|
|
49
|
-
3.
|
|
50
|
-
4.
|
|
49
|
+
Đọc theo thứ tự:
|
|
50
|
+
1. AI-GUIDE.md + TRACKER.md
|
|
51
|
+
2. PROJECT-CONTEXT.md → domain + <product_vision> (đầy đủ)
|
|
52
|
+
3. ROADMAP.md → MVP phases + Post-MVP / horizon blocks
|
|
53
|
+
4. ARCHITECTURE.md
|
|
54
|
+
5. SYSTEM-RULES.md
|
|
55
|
+
6. Brainstorm session gốc (nếu cần rationale chi tiết, đặc biệt cho deferred capabilities)
|
|
51
56
|
```
|
|
52
57
|
|
|
58
|
+
### Product vision & roadmap horizon (trước khi “lock” architecture)
|
|
59
|
+
|
|
60
|
+
- **Không** để post-MVP chỉ tồn tại trong file brainstorm: sau `/vp-crystallize`, horizon phải nằm trong `ROADMAP.md` và vision theo pha trong `PROJECT-CONTEXT.md`.
|
|
61
|
+
- Trước task implementation sâu hoặc quyết định kiến trúc lớn: đọc `<product_vision>` và các section horizon trong `ROADMAP.md` **cùng lúc** với task hiện tại — tránh code MVP làm bế tắc bản sau hoặc bỏ sót ràng buộc đã thống nhất.
|
|
62
|
+
|
|
53
63
|
## File Relationships
|
|
54
64
|
|
|
55
65
|
```
|
|
@@ -58,7 +68,10 @@ AI-GUIDE.md (đọc đầu tiên)
|
|
|
58
68
|
├── TRACKER.md (state hiện tại)
|
|
59
69
|
│ └── points to → current phase in ROADMAP.md
|
|
60
70
|
│
|
|
61
|
-
├──
|
|
71
|
+
├── PROJECT-CONTEXT.md (domain + <product_vision> / phased scope)
|
|
72
|
+
│ └── read early with → ROADMAP.md horizon blocks
|
|
73
|
+
│
|
|
74
|
+
├── ROADMAP.md (what to do + Post-MVP / Future)
|
|
62
75
|
│ └── tasks reference → schemas/
|
|
63
76
|
│
|
|
64
77
|
├── SYSTEM-RULES.md (how to code)
|
|
@@ -67,8 +80,7 @@ AI-GUIDE.md (đọc đầu tiên)
|
|
|
67
80
|
├── ARCHITECTURE.md (system design)
|
|
68
81
|
│ └── decisions from → PROJECT-CONTEXT.md
|
|
69
82
|
│
|
|
70
|
-
└── PROJECT-CONTEXT
|
|
71
|
-
└── extracted from → docs/brainstorm/
|
|
83
|
+
└── docs/brainstorm/ (session rationale; horizon đã mirror vào ROADMAP + PROJECT-CONTEXT)
|
|
72
84
|
```
|
|
73
85
|
|
|
74
86
|
## When Creating New Files
|
|
@@ -20,6 +20,28 @@
|
|
|
20
20
|
{{DATA_RELATIONSHIPS}}
|
|
21
21
|
</domain_knowledge>
|
|
22
22
|
|
|
23
|
+
<product_vision>
|
|
24
|
+
## Product vision & phased scope
|
|
25
|
+
|
|
26
|
+
> Aligns with **`ROADMAP.md` → Post-MVP / Product horizon** and brainstorm tier tags `(MVP)` / `(Post-MVP)` / `(Future)`.
|
|
27
|
+
|
|
28
|
+
### MVP boundary (ship first)
|
|
29
|
+
|
|
30
|
+
{{MVP_BOUNDARY}}
|
|
31
|
+
|
|
32
|
+
### Post-MVP themes
|
|
33
|
+
|
|
34
|
+
{{POST_MVP_VISION}}
|
|
35
|
+
|
|
36
|
+
### Future / exploratory north star
|
|
37
|
+
|
|
38
|
+
{{FUTURE_VISION}}
|
|
39
|
+
|
|
40
|
+
### Anti-goals & explicit non-scope
|
|
41
|
+
|
|
42
|
+
{{VISION_NON_GOALS}}
|
|
43
|
+
</product_vision>
|
|
44
|
+
|
|
23
45
|
<conventions>
|
|
24
46
|
## Naming Conventions
|
|
25
47
|
|
|
@@ -51,6 +51,33 @@
|
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
+
## Post-MVP / Product horizon
|
|
55
|
+
|
|
56
|
+
> **Mandatory block (crystallize):** Populate from brainstorm **`## Product horizon`**, or state **single-release** explicitly. Tier tags: `(MVP)` ship first; `(Post-MVP)` after first release; `(Future)` exploratory.
|
|
57
|
+
|
|
58
|
+
### Horizon mode
|
|
59
|
+
|
|
60
|
+
{{HORIZON_MODE_LINE}}
|
|
61
|
+
|
|
62
|
+
### Post-MVP themes (epic-level)
|
|
63
|
+
|
|
64
|
+
{{POST_MVP_EPICS}}
|
|
65
|
+
|
|
66
|
+
### Future / exploratory
|
|
67
|
+
|
|
68
|
+
{{FUTURE_EPICS}}
|
|
69
|
+
|
|
70
|
+
### Deferred capabilities (from MVP)
|
|
71
|
+
|
|
72
|
+
{{DEFERRED_CAPABILITIES}}
|
|
73
|
+
|
|
74
|
+
### Non-goals for MVP (reference)
|
|
75
|
+
|
|
76
|
+
{{MVP_NON_GOALS_ROADMAP}}
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
54
80
|
## Notes
|
|
55
81
|
- Created: {{DATE}}
|
|
56
82
|
- Last Updated: {{DATE}}
|
|
83
|
+
- **Horizon:** Keep Post-MVP / Future content in sync with `PROJECT-CONTEXT.md` *Product vision & phased scope* after crystallize.
|
package/workflows/autonomous.md
CHANGED
|
@@ -175,6 +175,28 @@ quality_gate:
|
|
|
175
175
|
- no_lint_errors: true
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
#### Git Persistence Gate (BUG-003)
|
|
179
|
+
Before marking a task PASS, require durable git persistence:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Must have no unstaged/staged residue for this task
|
|
183
|
+
git status --porcelain
|
|
184
|
+
|
|
185
|
+
# Must track an upstream branch
|
|
186
|
+
git rev-parse --abbrev-ref --symbolic-full-name @{u}
|
|
187
|
+
|
|
188
|
+
# Must have no unpushed commits
|
|
189
|
+
git rev-list --count @{u}..HEAD
|
|
190
|
+
|
|
191
|
+
# Consolidated check helper (recommended)
|
|
192
|
+
node bin/vp-tools.cjs git-persistence --strict
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
If any check fails:
|
|
196
|
+
- **Do not** mark task `done`
|
|
197
|
+
- **Do not** advance phase progress/state files as PASS
|
|
198
|
+
- Route to control point (retry commit/push, rollback, or stop)
|
|
199
|
+
|
|
178
200
|
#### Handle Result
|
|
179
201
|
|
|
180
202
|
**PASS:**
|
|
@@ -253,6 +275,7 @@ When all tasks in phase are done/skipped:
|
|
|
253
275
|
```bash
|
|
254
276
|
git push
|
|
255
277
|
git push --tags
|
|
278
|
+
node bin/vp-tools.cjs git-persistence --strict
|
|
256
279
|
```
|
|
257
280
|
|
|
258
281
|
### 5a. Sync ROADMAP.md (after every phase complete)
|
package/workflows/brainstorm.md
CHANGED
|
@@ -41,6 +41,7 @@ Nếu user chọn tiếp tục:
|
|
|
41
41
|
2. Tóm tắt nội dung đã thảo luận
|
|
42
42
|
3. Xác định các open questions / action items còn lại
|
|
43
43
|
4. Tiếp tục từ điểm dừng
|
|
44
|
+
5. Nếu session đã có section **`## Product horizon`**: tóm tắt nhanh MVP / Post-MVP / Future hiện có; mọi cập nhật sau đó phải **merge** vào section đó (không xóa im lặng, không làm mất tier tags) trừ khi user chủ động yêu cầu thu hẹp/mở rộng scope.
|
|
44
45
|
</step>
|
|
45
46
|
|
|
46
47
|
<step name="brainstorm_mode">
|
|
@@ -74,6 +75,13 @@ Gợi ý các topics để brainstorm:
|
|
|
74
75
|
- Monitoring
|
|
75
76
|
- Scaling
|
|
76
77
|
|
|
78
|
+
6. **Product horizon (MVP vs Post-MVP vs Future)** — **bắt buộc duy trì trong session file** khi user thảo luận bất kỳ tính năng / milestone nào:
|
|
79
|
+
- **Mục tiêu**: tách rõ phạm vi ship đầu tiên với tầm nhìn sau MVP để `/vp-crystallize` không “mất” ý tưởng dài hạn.
|
|
80
|
+
- **Quy ước tag** (đặt ở cuối dòng bullet): `(MVP)` | `(Post-MVP)` | `(Future)`.
|
|
81
|
+
- **Non-goals for MVP**: những gì cố tình *không* làm ở bản đầu (tránh hiểu nhầm là quên).
|
|
82
|
+
- **Deferred capabilities**: tính năng đã thống nhất nhưng **lùi sau MVP** — ghi rõ để crystallize map vào roadmap horizon.
|
|
83
|
+
- Nếu sản phẩm **single-release** (không có post-MVP): ghi một dòng explicit trong session, ví dụ: `**Scope**: single-release only — no deferred epics.`
|
|
84
|
+
|
|
77
85
|
### Interactive Q&A
|
|
78
86
|
Cho mỗi topic:
|
|
79
87
|
1. Đặt câu hỏi cụ thể
|
|
@@ -113,26 +121,42 @@ User có thể yêu cầu research ngay trong brainstorm (không cần đổi sk
|
|
|
113
121
|
Nếu assistant nhận thấy topic có độ mơ hồ cao hoặc rủi ro quyết định sai, assistant nên chủ động đề xuất:
|
|
114
122
|
`Mục này nên research nhanh trước khi chốt, bạn muốn mình research luôn trong phiên này không?`
|
|
115
123
|
|
|
116
|
-
### UI Direction Mode (design-in-the-loop; FEAT-002)
|
|
124
|
+
### UI Direction Mode (design-in-the-loop; FEAT-002 + FEAT-007)
|
|
117
125
|
Nếu user đang brainstorm cho dự án có UI/UX hoặc yêu cầu thiết kế trực quan:
|
|
118
126
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
127
|
+
**Layout — chọn một:**
|
|
128
|
+
|
|
129
|
+
- **Legacy (một màn):** `.viepilot/ui-direction/{session-id}/index.html` + `style.css` + `notes.md`.
|
|
130
|
+
- **Multi-page (nhiều màn):** cùng thư mục session, thêm `pages/{slug}.html` cho từng page; `index.html` là **hub** (liên kết tới mọi page). `style.css` shared.
|
|
131
|
+
|
|
132
|
+
**Quy tắc chung**
|
|
133
|
+
|
|
134
|
+
1. Tạo workspace direction cho phiên hiện tại (tối thiểu `style.css` + `notes.md`; HTML theo layout đã chọn).
|
|
123
135
|
2. Mỗi lần user đổi requirement/layout/component:
|
|
124
136
|
- Cập nhật trực tiếp HTML/CSS direction
|
|
125
|
-
- Ghi decision + rationale vào `notes.md` (single source of truth)
|
|
137
|
+
- Ghi decision + rationale vào `notes.md` (single source of truth cho design intent)
|
|
138
|
+
|
|
139
|
+
**Hook bắt buộc (multi-page only)**
|
|
140
|
+
|
|
141
|
+
Khi thư mục `pages/` tồn tại hoặc bất kỳ `pages/*.html` nào được thêm / đổi tên / xóa:
|
|
142
|
+
|
|
143
|
+
- Cập nhật **hub** `index.html` (nav / danh sách link tới mọi page còn lại).
|
|
144
|
+
- Cập nhật ngay section **`## Pages inventory`** trong `notes.md` (bảng: Slug | File | Title | Purpose | Key sections | Nav to) — phải khớp 100% tập file `pages/*.html` hiện có.
|
|
145
|
+
- Không kết thúc topic / không coi session UI đã “sync” nếu inventory lệch với file trên disk.
|
|
146
|
+
|
|
126
147
|
3. Nếu user gửi references/components (bao gồm 21st.dev prompt/link), ghi rõ:
|
|
127
148
|
- nguồn tham chiếu
|
|
128
|
-
- phần UI áp dụng
|
|
149
|
+
- phần UI áp dụng (page slug nếu multi-page)
|
|
129
150
|
- điều chỉnh theo mục tiêu sản phẩm
|
|
130
151
|
4. Giữ prototype ở mức mô tả định hướng (directional), không ép build production-ready code ở bước brainstorm.
|
|
131
152
|
|
|
153
|
+
Tham chiếu user: `docs/user/features/ui-direction.md`.
|
|
154
|
+
|
|
132
155
|
### Kết thúc mỗi topic
|
|
133
156
|
- Tóm tắt decisions
|
|
134
157
|
- List action items
|
|
135
158
|
- Note open questions
|
|
159
|
+
- 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
|
|
136
160
|
</step>
|
|
137
161
|
|
|
138
162
|
<step name="save_session">
|
|
@@ -148,6 +172,30 @@ Tạo/cập nhật file: `docs/brainstorm/session-{YYYY-MM-DD}.md`
|
|
|
148
172
|
- **Participants**: User, Claude
|
|
149
173
|
- **Status**: In Progress | Completed
|
|
150
174
|
|
|
175
|
+
## Product horizon
|
|
176
|
+
|
|
177
|
+
> Single source for **MVP / Post-MVP / Future** scope. Bắt buộc giữ section này khi tiếp tục session; crystallize đọc để không bỏ sót post-MVP.
|
|
178
|
+
|
|
179
|
+
### MVP (ship first)
|
|
180
|
+
- Capability / theme — `(MVP)`
|
|
181
|
+
- ...
|
|
182
|
+
|
|
183
|
+
### Post-MVP (after first release)
|
|
184
|
+
- Capability / theme — `(Post-MVP)`
|
|
185
|
+
- ...
|
|
186
|
+
|
|
187
|
+
### Future / exploratory
|
|
188
|
+
- Idea — `(Future)`
|
|
189
|
+
- ...
|
|
190
|
+
|
|
191
|
+
### Non-goals for MVP
|
|
192
|
+
- ...
|
|
193
|
+
|
|
194
|
+
### Deferred capabilities (from MVP)
|
|
195
|
+
- ...
|
|
196
|
+
|
|
197
|
+
**Scope note (optional):** Nếu không có post-MVP: `Single-release product — no separate horizon epics.`
|
|
198
|
+
|
|
151
199
|
## Topics Discussed
|
|
152
200
|
|
|
153
201
|
### Topic 1: {Name}
|
|
@@ -179,12 +227,14 @@ Tạo/cập nhật file: `docs/brainstorm/session-{YYYY-MM-DD}.md`
|
|
|
179
227
|
|
|
180
228
|
**UI Direction Artifacts** (if applicable):
|
|
181
229
|
- Session id: {session-id}
|
|
230
|
+
- Layout: legacy (single `index.html`) | multi-page (`pages/*.html` + hub `index.html`)
|
|
182
231
|
- Files:
|
|
183
|
-
- `.viepilot/ui-direction/{session-id}/index.html`
|
|
232
|
+
- `.viepilot/ui-direction/{session-id}/index.html` (hub hoặc single-screen)
|
|
184
233
|
- `.viepilot/ui-direction/{session-id}/style.css`
|
|
185
|
-
- `.viepilot/ui-direction/{session-id}/notes.md`
|
|
234
|
+
- `.viepilot/ui-direction/{session-id}/notes.md` (must include `## Pages inventory` when `pages/` exists)
|
|
235
|
+
- `.viepilot/ui-direction/{session-id}/pages/*.html` (when multi-page)
|
|
186
236
|
- Preview focus:
|
|
187
|
-
- {layout/flow summary}
|
|
237
|
+
- {layout/flow summary; list each page slug if multi-page}
|
|
188
238
|
|
|
189
239
|
---
|
|
190
240
|
|
|
@@ -228,7 +278,7 @@ Next step: /vp-crystallize
|
|
|
228
278
|
This will transform your brainstorm into:
|
|
229
279
|
- Project structure
|
|
230
280
|
- Architecture documents
|
|
231
|
-
- Development roadmap
|
|
281
|
+
- Development roadmap (MVP phases + **Post-MVP / horizon** when documented above)
|
|
232
282
|
```
|
|
233
283
|
</step>
|
|
234
284
|
|
|
@@ -247,6 +297,7 @@ User có thể dùng các lệnh trong phiên brainstorm:
|
|
|
247
297
|
|
|
248
298
|
<success_criteria>
|
|
249
299
|
- [ ] Session file created với đầy đủ sections
|
|
300
|
+
- [ ] `## Product horizon` present với MVP / Post-MVP / Future (hoặc explicit single-release statement)
|
|
250
301
|
- [ ] Decisions có rationale
|
|
251
302
|
- [ ] Open questions tracked
|
|
252
303
|
- [ ] Action items captured
|
package/workflows/crystallize.md
CHANGED
|
@@ -80,12 +80,25 @@ For each session file:
|
|
|
80
80
|
3. Extract database schemas
|
|
81
81
|
4. Extract features/requirements
|
|
82
82
|
5. Extract tech stack choices
|
|
83
|
+
6. **Product horizon (mandatory)** — parse `## Product horizon` when present (contract: `workflows/brainstorm.md`):
|
|
84
|
+
- Classify bullets under **MVP (ship first)**, **Post-MVP (after first release)**, and **Future / exploratory** using trailing tags `(MVP)` / `(Post-MVP)` / `(Future)` when present.
|
|
85
|
+
- Capture **Non-goals for MVP** and **Deferred capabilities (from MVP)** as first-class lists (these feed roadmap horizon and architecture constraints).
|
|
86
|
+
- Record **extensibility / platform notes** that imply deferred work (e.g., plugin model later, multi-tenant after MVP) if written in horizon or architecture sections.
|
|
87
|
+
- If the session states **single-release only** / **no deferred epics** (see brainstorm scope note), record `horizon_mode: single_release` in working notes for Step 7.
|
|
88
|
+
|
|
89
|
+
**Consolidate across sessions** into a single **horizon inventory** (dedupe by capability name; if the same capability appears under conflicting tiers → stop and ask the user which tier wins).
|
|
90
|
+
|
|
91
|
+
**Horizon validation gate (before leaving Step 1):**
|
|
92
|
+
- [ ] Every brainstorm file was checked for `## Product horizon` **or** an explicit in-session single-release / no-deferred statement.
|
|
93
|
+
- [ ] If `## Product horizon` is missing and the session still discusses releases beyond MVP without a single-release statement → stop and ask the user to update the session (e.g. `/vp-brainstorm` save) or confirm **single-release only** for the whole project.
|
|
94
|
+
- [ ] Either **horizon inventory is non-empty** (Post-MVP/Future/deferred items captured) **or** **single-release** is explicitly recorded — no silent default.
|
|
83
95
|
|
|
84
96
|
Validate completeness:
|
|
85
97
|
- [ ] Tech stack defined
|
|
86
98
|
- [ ] Core features identified
|
|
87
99
|
- [ ] Database schema exists
|
|
88
100
|
- [ ] API requirements clear
|
|
101
|
+
- [ ] Product horizon processed per gate above (inventory or explicit single-release)
|
|
89
102
|
|
|
90
103
|
If gaps found → ask user to clarify or return to brainstorm.
|
|
91
104
|
</step>
|
|
@@ -101,11 +114,16 @@ ls -la .viepilot/ui-direction/ 2>/dev/null
|
|
|
101
114
|
|
|
102
115
|
When available, for the selected/latest session:
|
|
103
116
|
- Read `.viepilot/ui-direction/{session-id}/notes.md` first (source of design decisions)
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
- interaction
|
|
108
|
-
-
|
|
117
|
+
- If `pages/` exists and contains `*.html`:
|
|
118
|
+
- Require section **`## Pages inventory`** in `notes.md`; treat it as the **site map** (page count, purpose, navigation).
|
|
119
|
+
- List all `pages/*.html` and confirm each file is represented in the inventory table (if mismatch → stop and ask user to fix brainstorm artifacts or document assumptions).
|
|
120
|
+
- Read **each** `pages/{slug}.html` for section structure, components, and interaction hints.
|
|
121
|
+
- Read hub `index.html` for cross-page navigation intent.
|
|
122
|
+
- Else (legacy single-file layout):
|
|
123
|
+
- Read `index.html` + `style.css` only (no `pages/`).
|
|
124
|
+
- Always read `style.css` for shared styling constraints.
|
|
125
|
+
- Extract from HTML: layout hierarchy, component candidates, interaction expectations.
|
|
126
|
+
- In architecture / UI plan output, **enumerate every page** from inventory (or state explicitly single-page legacy).
|
|
109
127
|
|
|
110
128
|
If UI scope is present but artifacts are missing:
|
|
111
129
|
- Warn user and request either:
|
|
@@ -177,7 +195,7 @@ Create `.viepilot/AI-GUIDE.md` using template:
|
|
|
177
195
|
|
|
178
196
|
Customize with:
|
|
179
197
|
- Project-specific file references
|
|
180
|
-
- Context loading strategy based on project size
|
|
198
|
+
- Context loading strategy based on project size — **preserve template ordering** where `PROJECT-CONTEXT.md` **`<product_vision>`** and **`ROADMAP.md` horizon** (Post-MVP / Future) are read **before** deep implementation / architecture lock; state this explicitly in the generated `AI-GUIDE.md` if you trim sections
|
|
181
199
|
- Quick lookup for project-specific terms
|
|
182
200
|
- Fast stack lookup section:
|
|
183
201
|
- Read `.viepilot/STACKS.md`
|
|
@@ -255,14 +273,22 @@ Create `.viepilot/ROADMAP.md` using template:
|
|
|
255
273
|
`@$HOME/.cursor/viepilot/templates/project/ROADMAP.md`
|
|
256
274
|
|
|
257
275
|
From brainstorm features/MVP breakdown:
|
|
258
|
-
1. Create phases
|
|
276
|
+
1. Create **executable MVP phases** (what `/vp-auto` can run next; near-term delivery only).
|
|
259
277
|
2. For each phase:
|
|
260
278
|
- Define goal
|
|
261
279
|
- Break into tasks
|
|
262
280
|
- Set acceptance criteria
|
|
263
281
|
- Add verification checkpoints
|
|
264
282
|
- Estimate complexity (S/M/L/XL)
|
|
265
|
-
3. Define dependencies between phases
|
|
283
|
+
3. Define dependencies between MVP phases.
|
|
284
|
+
4. **Post-MVP / product horizon (mandatory section in `.viepilot/ROADMAP.md`):**
|
|
285
|
+
- After MVP phases, always add a dedicated block (heading e.g. `## Post-MVP / Product horizon` or match the project template’s equivalent) that is **never omitted**:
|
|
286
|
+
- If Step 1 recorded **single-release** / no deferred epics: state explicitly *e.g.* **Single-release scope — no separate post-MVP epics** and that deferred capabilities are none by confirmation (do not invent future work).
|
|
287
|
+
- Otherwise: summarize **horizon inventory** items as **epic-level** entries (dependencies, rough sequencing OK; full task breakdown optional).
|
|
288
|
+
- Where a future epic depends on MVP deliverables, note **dependency links** back to the MVP phase(s) that unlock it.
|
|
289
|
+
5. **ROADMAP self-check before finalize:**
|
|
290
|
+
- If Step 1 **horizon inventory** is non-empty but the draft ROADMAP **drops** those items or lacks the horizon block → **stop** and ask the user to reconcile (do not ship a roadmap that silently omits post-MVP content from brainstorm).
|
|
291
|
+
- If brainstorm contained Post-MVP ideas only in free text without `## Product horizon` → you should already have stopped in Step 1; do not proceed to commit ROADMAP.
|
|
266
292
|
</step>
|
|
267
293
|
|
|
268
294
|
<step name="generate_schemas">
|
|
@@ -408,10 +434,11 @@ Note: global stack cache at `~/.viepilot/stacks/` is machine-level knowledge and
|
|
|
408
434
|
- [ ] All metadata collected
|
|
409
435
|
- [ ] Official research completed for each selected stack
|
|
410
436
|
- [ ] Global stack cache written under ~/.viepilot/stacks/{stack}/
|
|
437
|
+
- [ ] Step 1: product horizon extracted **or** explicit single-release recorded; validation gate satisfied
|
|
411
438
|
- [ ] All artifacts created in .viepilot/
|
|
412
439
|
- [ ] PROJECT-META.md complete
|
|
413
440
|
- [ ] SYSTEM-RULES.md has all standards
|
|
414
|
-
- [ ] ROADMAP.md has phases with tasks
|
|
441
|
+
- [ ] ROADMAP.md has MVP phases with tasks **and** mandatory Post-MVP / horizon block (or explicit single-release statement)
|
|
415
442
|
- [ ] Phase directories created
|
|
416
443
|
- [ ] Project files created
|
|
417
444
|
- [ ] Git committed
|