viepilot 2.23.0 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/README.md +6 -6
  3. package/bin/viepilot.cjs +108 -1
  4. package/bin/vp-tools.cjs +109 -0
  5. package/docs/brainstorm/session-2026-04-20.md +261 -0
  6. package/docs/skills-reference.md +22 -0
  7. package/docs/user/features/adapters.md +2 -2
  8. package/docs/user/features/scaffold-first.md +62 -0
  9. package/docs/user/features/skill-registry.md +125 -0
  10. package/lib/adapters/antigravity.cjs +5 -4
  11. package/lib/skill-installer.cjs +274 -0
  12. package/lib/skill-registry.cjs +212 -0
  13. package/lib/viepilot-update.cjs +113 -0
  14. package/package.json +1 -1
  15. package/skills/vp-audit/SKILL.md +57 -9
  16. package/skills/vp-auto/SKILL.md +44 -0
  17. package/skills/vp-brainstorm/SKILL.md +108 -1
  18. package/skills/vp-crystallize/SKILL.md +72 -0
  19. package/skills/vp-debug/SKILL.md +27 -0
  20. package/skills/vp-docs/SKILL.md +27 -0
  21. package/skills/vp-evolve/SKILL.md +59 -6
  22. package/skills/vp-info/SKILL.md +27 -0
  23. package/skills/vp-pause/SKILL.md +27 -0
  24. package/skills/vp-proposal/SKILL.md +27 -0
  25. package/skills/vp-request/SKILL.md +52 -6
  26. package/skills/vp-resume/SKILL.md +27 -0
  27. package/skills/vp-rollback/SKILL.md +27 -0
  28. package/skills/vp-skills/SKILL.md +301 -0
  29. package/skills/vp-status/SKILL.md +27 -0
  30. package/skills/vp-task/SKILL.md +27 -0
  31. package/skills/vp-ui-components/SKILL.md +27 -0
  32. package/skills/vp-update/SKILL.md +27 -0
  33. package/templates/phase/TASK.md +7 -0
  34. package/templates/project/PROJECT-CONTEXT.md +76 -0
  35. package/workflows/audit.md +131 -0
  36. package/workflows/autonomous.md +140 -0
  37. package/workflows/brainstorm.md +1025 -9
  38. package/workflows/crystallize.md +528 -3
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -103,15 +130,36 @@ When auditing a project bootstrapped via `vp-crystallize --brownfield`:
103
130
 
104
131
  <context>
105
132
  Optional flags:
106
- - `--framework` : Force Tier 3 framework checks (even if not auto-detected)
107
- - `--project` : Force project-only mode — skip Tier 3 framework checks
108
- - `--fix` : Auto-fix all detected issues
109
- - `--report` : Generate report file at `.viepilot/audit-report.md`
110
- - `--silent` : Only output if issues found
111
- - `--tier1` : Run Tier 1 (state consistency) only
112
- - `--tier2` : Run Tier 2 (docs drift) only
113
- - `--tier3` : Run Tier 3 (stack best-practice) only
114
- - `--tier4` : Run Tier 4 (framework integrity) only
133
+ - `--framework` : Force Tier 3 framework checks (even if not auto-detected)
134
+ - `--project` : Force project-only mode — skip Tier 3 framework checks
135
+ - `--fix` : Auto-fix all detected issues
136
+ - `--report` : Generate report file at `.viepilot/audit-report.md`
137
+ - `--silent` : Only output if issues found
138
+ - `--tier1` : Run Tier 1 (state consistency) only
139
+ - `--tier2` : Run Tier 2 (docs drift) only
140
+ - `--tier3` : Run Tier 3 (stack best-practice) only
141
+ - `--tier4` : Run Tier 4 (framework integrity) only
142
+ - `--no-autolog` : Skip auto-logging of gaps to `.viepilot/requests/`; report-only mode
143
+
144
+ ### Auto-Log Behavior (ENH-070)
145
+
146
+ By default, `vp-audit` automatically logs each detected gap as a request file after the audit report is shown — no manual `/vp-request` step needed:
147
+
148
+ | Tier | Issue category | Request type | Priority |
149
+ |------|----------------|-------------|----------|
150
+ | 1 | State inconsistency / HANDOFF drift / git tag missing | BUG | medium |
151
+ | 1 | Execute-first ordering risk | BUG | medium |
152
+ | 2 | Doc drift (README/CHANGELOG version) | BUG | low |
153
+ | 2 | Missing docs / placeholder URLs | ENH | low |
154
+ | 3 | Stack violation / correctness anti-pattern | BUG | high |
155
+ | 3 | Stack improvement / best-practice gap | ENH | medium |
156
+ | 4 | Framework integrity gap | ENH | high |
157
+
158
+ **Duplicate detection**: if a matching open request already exists (title ≥ 70% match or file overlap), the finding is appended to it as a "Re-detected" note rather than creating a duplicate file.
159
+
160
+ **Post-audit banner**: after auto-logging, shows all logged request IDs and recommends `/vp-evolve {IDs}` as the next action. AUQ prompt on Claude Code terminal.
161
+
162
+ **Disable**: use `vp-audit --no-autolog` for report-only mode (no `.viepilot/requests/` files created).
115
163
  </context>
116
164
 
117
165
  <process>
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -267,3 +294,20 @@ Before the first interactive prompt, call `ToolSearch` with `query: "select:AskU
267
294
  - [ ] CHANGELOG updated for features/fixes
268
295
  - [ ] Clean stop with summary on pause/error
269
296
  </success_criteria>
297
+
298
+ ### Skill Context Execution (FEAT-020)
299
+
300
+ At session start, vp-auto reads `PROJECT-CONTEXT.md ## Skills` (locked by `/vp-crystallize`
301
+ Step 1E) and builds a `SKILL_CONTEXT_MAP`.
302
+
303
+ During each task:
304
+ - Required skills whose phases match the current task's phase are **silently** injected into the execution context
305
+ - Best practices from matched skills appear as a silent checklist before implementation
306
+ - Task output records `skills_applied: [id@version, ...]`
307
+
308
+ **No prompts are shown** — all skill decisions are locked at crystallize time.
309
+ `/vp-auto` is execution-only for skills.
310
+
311
+ Install skills: `vp-tools install-skill <source>`
312
+ Lock decisions: `/vp-crystallize` Step 1E
313
+ Docs: `docs/user/features/skill-registry.md`
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -54,11 +81,18 @@ Supports:
54
81
  - **Phase assignment (ENH-030):** in every session, features/capabilities are assigned directly to Phase 1, Phase 2, Phase 3... — no MVP/Post-MVP/Future tiers. Session file stores assignments in the `## Phases` section.
55
82
  - **Project meta intake (FEAT-009):** after **scope locked**, **before** `Completed` / `/end`, if `.viepilot/META.md` (`viepilot_profile_id`) is missing — run **sequential** Q&A with proposals; read/write `~/.viepilot/profile-map.md`; create `~/.viepilot/profiles/<slug>.md` + binding per **`docs/dev/global-profiles.md`**. If a profile is already bound — skip intake by default (ask if change needed).
56
83
  - **UX walkthrough (FEAT-010 + ENH-019 + ENH-020):** in **`--ui`** mode, command **`/research-ui`** or **`/research ui`** runs 3 phases — simulates **end-user** (with **content stress pass** + **stress recipes by archetype** → **Stress findings**) → **UX designer + web research** → update `index.html` / `pages/*.html` / `style.css` and write **`## UX walkthrough log`** in `notes.md` (sync hub + **Pages inventory** for multi-page).
57
- - **Background UI extraction (ENH-026):** automatically detects UI signal keywords in every brainstorm session (no `--ui` flag required); silent accumulation buffer; surfaces for confirmation when topic ends, `/save`, or ≥5 signals — does not interrupt the main conversation.
84
+ - **Background UI extraction (ENH-026 + ENH-060):** automatically detects UI signal keywords in every brainstorm session (no `--ui` flag required). **Auto-suggests itself (ENH-060):** if the initial message contains ≥1 UI keyword, shows a proactive 🎨 banner immediately — mirrors Architect Design Mode's 🏗️ proactive activation. Accumulation starts at ≥1 signal (was ≥3); surfaces for confirmation when topic ends, `/save`, or **≥2 unique signals** accumulated (was ≥5) — does not interrupt the main conversation.
85
+ - **Idea → Architecture breakdown loop (ENH-061):** structured 8-step flow from free idea collection → scope lock → **Feature → Coverage mapping** (maps each Phase 1 feature to an architect page + UI screen, outputs `## Coverage` matrix in `notes.md`) → Architect Design → **`arch_to_ui_sync`** reverse sync (surfaces UI implications of architectural decisions; `/sync-ui` command) → UI Direction → **completeness gate** (CHECK 4: warns if any Phase 1 feature has no coverage in either mode, non-blocking). See `Recommended Breakdown Ordering` section in `workflows/brainstorm.md`.
86
+ - **Unified workspace mode selection (BUG-018):** after scope lock, before any design workspace is created, an AUQ prompt offers: Both / Architect only / UI Direction only / Neither. Architect auto-activate heuristic is deferred until after this selection; suppressed if user selects "Neither" or "UI Direction only".
87
+ - **Admin & Governance coverage (ENH-063):** Topic 6 in brainstorm template; proactive 🔐 heuristic fires on admin/governance keywords; admin coverage gate before /save for multi-user/SaaS/compliance projects; `admin.html` added to Architect workspace when applicable; `notes.md ## admin` YAML exported via crystallize.
88
+ - **Content Management coverage (ENH-065):** Topic 7 in brainstorm template; proactive 🗂️ heuristic fires on content-type/media/SEO keywords; content coverage gate before /save for projects with content layer; `content.html` added to Architect workspace; `notes.md ## content` YAML exported via crystallize.
89
+ - **Admin Entity Management coverage (ENH-068):** Topic 7 in brainstorm template; proactive 🗄️ heuristic fires on CRUD/entity/admin panel keywords; entity management coverage gate before /save for projects with DB entities (cross-references ERD); `entity-mgmt.html` added to Architect workspace; `notes.md ## entity_mgmt` YAML exported via crystallize.
90
+ - **User Data Management coverage (ENH-066):** Topic 9 in brainstorm template; proactive 👤 heuristic fires on user-account/privacy/auth keywords; user data coverage gate before /save for B2C/SaaS/GDPR projects; `user-data.html` added to Architect workspace; `notes.md ## user_data` YAML exported via crystallize.
58
91
  - **Architect Design Mode (FEAT-011):** `/vp-brainstorm --architect` or auto-activate when ≥3 components/services detected; generate HTML workspace (architecture, data-flow, decisions, tech-stack, tech-notes, feature-map) with Mermaid diagrams; incremental update per decision; `/review-arch` command; machine-readable `notes.md` YAML schema.
59
92
  - **ERD page (ENH-027):** Architect workspace includes `erd.html` — Mermaid `erDiagram`, entity list table, relationship summary; triggered by DB/entity/table/relationship keywords; notes.md `## erd` YAML section exported to ARCHITECTURE.md `## Database Schema` via crystallize Step 1D.
60
93
  - **User Use Cases page (ENH-028):** Architect workspace includes `user-use-cases.html` — actor/use-case diagram (Mermaid flowchart), use case table; triggered by user/role/actor/story keywords; notes.md `## use_cases` YAML section exported to PROJECT-CONTEXT.md `## User Stories & Use Cases` via crystallize Step 1D.
61
94
  - **C4Context/Sequence/Deployment/APIs pages (ENH-029, 12-page workspace):** Architect workspace expanded to 12 pages — `sequence-diagram.html` (per-scenario sequenceDiagram), `deployment.html` (infra graph + environments + CI/CD pipeline), `apis.html` (endpoint tables with HTTP method badges); page boundary rules table; trigger keywords for sequence/deploy/API; notes.md `## apis` YAML section; deployment+APIs exported to ARCHITECTURE.md via crystallize Step 1D (sequence excluded — scenario docs are not architecture artifacts).
95
+ - **Embedded Domain Mode (ENH-071):** Activated when ≥2 embedded trigger keywords detected (MCU families: STM32/ESP32/nRF52/AVR/RISC-V/RP2040; concepts: firmware/bare-metal/GPIO/interrupt/HAL/bootloader/RTOS) OR `--domain embedded` flag. Adds 6 Architect workspace pages for embedded hardware artifacts, injects domain-specific topic probes, suppresses web-UI false-positives for hardware display keywords, and offers a firmware phase ordering template. crystallize exports 8 YAML sections to ARCHITECTURE.md hardware sections.
62
96
 
63
97
  **Creates/Updates:**
64
98
  - `docs/brainstorm/session-{YYYY-MM-DD}.md`
@@ -70,6 +104,16 @@ Supports:
70
104
  - `BRAINSTORM_LANG` is used for brainstorm file storage and generated content.
71
105
  - User session language takes precedence over config if different.
72
106
  - Configure via: `vp-tools config set language.document vi`
107
+
108
+ **Workflow version stamps (ENH-067):**
109
+ - Session files record `workflow_version` (current ViePilot semver) at create/save time.
110
+ - `upgrade_supplement_version` stamped after gap-detection supplement completes (idempotency guard).
111
+
112
+ **Upgrade gap detection (ENH-067):**
113
+ - On `--continue`, compares session `workflow_version` vs. current Topics Template to detect missing topics.
114
+ - Proactive 🔄 upgrade banner (AUQ) lists missing topics; user can discuss inline, defer to /save, or skip.
115
+ - Inline supplement appended as `## Upgrade supplement (vX → vY)` section; `upgrade_supplement_version` stamped for idempotency.
116
+ - After supplement: suggests `/vp-crystallize --upgrade` to patch project artifacts.
73
117
  </objective>
74
118
 
75
119
  <execution_context>
@@ -84,8 +128,52 @@ Optional flags:
84
128
  - `--landing` : Prioritize the Landing Page layout discovery flow
85
129
  - `--research` : Enable proactive research suggestions during the session
86
130
  - `--ui` : Enable UI Direction mode (live HTML/CSS direction artifacts)
131
+ - `--domain embedded` : Force-activate Embedded Domain Mode (hardware topology, RTOS, pin map, memory layout, protocol matrix, power budget pages + topic probes)
87
132
  </context>
88
133
 
134
+ ### Embedded Domain Mode (ENH-071)
135
+
136
+ **Activation**: Automatically when ≥2 embedded keywords detected, or via `--domain embedded` flag. One-time `🔌 Embedded Domain Mode activated` banner shown.
137
+
138
+ **Topic probes injected when `embedded_domain: true`:**
139
+ - **MCU/Toolchain** (Gap 2): MCU family, toolchain (GCC-ARM/Keil/IAR), build system (CMake/PlatformIO/West), debug interface (SWD/JTAG), flasher, SDK/HAL
140
+ - **RTOS/Scheduling** (Gap 3): bare-metal vs RTOS choice, task list, ISR table, resource protection strategy
141
+ - **Power Budget** (Gap 7): supply type, sleep modes, current targets, battery life (triggered by battery/power/sleep keywords)
142
+ - **Safety/Compliance** (Gap 10): IEC 61508/ISO 26262/DO-178C, watchdog, fault handlers (triggered by safety/SIL/ASIL keywords)
143
+ - **Firmware Phase Template** (Gap 9): Board Bring-Up → Drivers → RTOS → Middleware → Application → Integration Test → OTA
144
+
145
+ **6 new Architect workspace pages** (in `.viepilot/architect/{session-id}/`):
146
+
147
+ | Page | Trigger | Content |
148
+ |------|---------|---------|
149
+ | `hw-topology.html` | Always in embedded domain | MCU block diagram (Mermaid graph TD) + component/bus/power-rail tables |
150
+ | `pin-map.html` | GPIO/pin/pinout keywords | Pin assignment table (Pin# / GPIO / Function / Peripheral / Direction / Pull / Voltage) |
151
+ | `memory-layout.html` | Flash/RAM/linker/bootloader/OTA keywords | Flash + RAM regions tables + linker constraint notes |
152
+ | `protocol-matrix.html` | CAN/I2C/SPI/BLE/LoRa/MQTT/Modbus keywords | Bus protocol + wireless connectivity tables (distinct from `apis.html` HTTP REST) |
153
+ | `rtos-scheduler.html` | RTOS/FreeRTOS/task/ISR/scheduler keywords | Task priority table + ISR table + state diagram (≤5 tasks) |
154
+ | `power-budget.html` | Battery/sleep/power/µA/mAh keywords | Power modes table + battery life estimate |
155
+
156
+ Pages linked in `index.html` under an **Embedded** nav section.
157
+
158
+ **UI Direction false-positive suppression** (Gap 6):
159
+ - `LCD` / `OLED` / `TFT` / `display` / `screen` in hardware context → routed to `hw-topology` peripherals, NOT UI Direction buffer
160
+ - Hardware context confirmed by: GPIO / SPI / I2C / driver / framebuffer / ILI9341 / SSD1306 / LVGL / u8g2 keywords
161
+ - `🎨 UI Direction Mode?` banner suppressed when all display signals have hardware context
162
+
163
+ **notes.md YAML sections written:** `## hw_topology`, `## pin_map`, `## memory_layout`, `## protocols`, `## rtos_config`, `## embedded_toolchain`, `## power_budget`, `## safety_config`
164
+
165
+ **crystallize Step 1D item 13 exports:**
166
+ - `## Hardware Architecture` (from `hw_topology`)
167
+ - `## Hardware Interface` (from `pin_map`)
168
+ - `## Memory Map` (from `memory_layout`)
169
+ - `## Communication Protocols` (from `protocols`) — distinct from `## APIs`
170
+ - `## RTOS & Task Model` (from `rtos_config`)
171
+ - `## Toolchain & Build System` (from `embedded_toolchain`)
172
+ - `## Power Budget` (from `power_budget`)
173
+ - `## Safety & Reliability` (from `safety_config`)
174
+ - `## Embedded Domain: true` + MCU family written to `PROJECT-CONTEXT.md`
175
+ - UI Coverage Gate skipped; Hardware Coverage Check (driver-task completeness, non-blocking) applied instead
176
+
89
177
  <process>
90
178
  Execute workflow from `@$HOME/{envToolDir}/workflows/brainstorm.md`
91
179
 
@@ -144,3 +232,22 @@ plain-text numbered list prompts — no configuration required.
144
232
  **Prompts using AskUserQuestion in this skill:**
145
233
  - Session intent (continue / review / new — Step 2)
146
234
  - Landing page layout selection (Step 4 — Layout A/B/C/D)
235
+
236
+
237
+ ### Skill Registry Integration (FEAT-020)
238
+
239
+ When UI Direction Mode is active, vp-brainstorm automatically:
240
+ 1. Loads `~/.viepilot/skill-registry.json` (written by `vp-tools scan-skills`)
241
+ 2. Matches installed skills by `capabilities` to current UI signals
242
+ 3. **Silently** applies matched skill `best_practices` to HTML generation
243
+ 4. Records matched skills in `notes.md ## skills_used`
244
+
245
+ **No prompt is shown** — integration is transparent. Skills with relevant
246
+ capabilities (e.g., `ui-generation`, `component-design`, `responsive-layout`)
247
+ are detected automatically.
248
+
249
+ Skill decisions are **locked at crystallize time** (see `/vp-crystallize`).
250
+ `/vp-auto` executes with those locked decisions — no re-asking.
251
+
252
+ Install skills via `vp-tools install-skill <source>`.
253
+ See: `docs/user/features/skill-registry.md`
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -84,6 +111,35 @@ Convert brainstorm sessions into structured artifacts for autonomous AI executio
84
111
  **Architect artifacts consumption (FEAT-011):**
85
112
  - Step 1D reads `.viepilot/architect/{session}/notes.md` YAML — imports `decisions[]` → ARCHITECTURE.md, uses `tech_stack{}` as authoritative stack (conflict → ask user), surfaces `open_questions[]` with `status: open`. Soft suggestion (not hard block) when architect dir missing but ≥5 services detected.
86
113
 
114
+ **Admin & Governance Export (ENH-063):**
115
+ - Step 1D item 7: if `admin.html` or `notes.md ## admin` exists in architect workspace → append `## Admin & Governance` table to `.viepilot/PROJECT-CONTEXT.md` (columns: Capability | Required | Phase | Notes) + Admin Personas table. Records `admin_imported` and `admin_capabilities_count` in working notes.
116
+
117
+ **Content Management Export (ENH-065):**
118
+ - Step 1D item 8: if `content.html` or `notes.md ## content` exists in architect workspace → append `## Content Management` table to `.viepilot/PROJECT-CONTEXT.md` (columns: Content Type | Created By | Lifecycle | Key Fields | Phase) + Media/Storage and Localization sub-tables. Records `content_imported` and `content_types_count` in working notes.
119
+
120
+ **Admin Entity Management Export (ENH-068):**
121
+ - Step 1D item 10: if `entity-mgmt.html` or `notes.md ## entity_mgmt` exists in architect workspace → append `## Admin Entity Management` table to `.viepilot/PROJECT-CONTEXT.md` (columns: Entity | CRUD Ops | Soft Delete | Bulk Actions | Audit Trail | Scope) + Import/Export sub-table. Records `entity_mgmt_imported` and `entity_mgmt_entity_count` in working notes.
122
+
123
+ **User Data Management Export (ENH-066):**
124
+ - Step 1D item 9: if `user-data.html` or `notes.md ## user_data` exists in architect workspace → append `## User Data Management` table to `.viepilot/PROJECT-CONTEXT.md` (columns: Capability | Supported | Notes) with 8 capability rows (profile editing, notification prefs, privacy settings, data export, right to erasure, connected accounts, session management, 2FA). Records `user_data_imported` and `user_data_capabilities_count` in working notes.
125
+
126
+ **Crystallize version stamps (ENH-067):**
127
+ - Generated `PROJECT-CONTEXT.md` includes `<!-- crystallize_version: {semver} -->` as its first line.
128
+ - `HANDOFF.json` records `crystallize_version` and `crystallized_at` fields.
129
+ - Used by `--upgrade` re-scan mode to compute delta on future runs.
130
+
131
+ **Upgrade re-scan mode (`--upgrade`) (ENH-067):**
132
+ - Detects `crystallize_version` delta; lists missing PROJECT-CONTEXT.md sections.
133
+ - **Patch mode:** appends only missing sections non-destructively; re-stamps `crystallize_version`.
134
+ - **Full re-generate:** backs up `.viepilot/` → regenerates all artifacts using existing sessions.
135
+ - Integrates brainstorm `## Upgrade supplement` sections when present.
136
+
137
+ **Mandatory Workspace Read Gates (ENH-064):**
138
+ - **Architect workspace (Step 1D):** if `.viepilot/architect/` exists → reads ALL 12 pages front-to-back before any extraction. `architect_read_complete: true` required. Missing `notes.md` → STOP.
139
+ - **UI Direction workspace (Step 1A strengthened):** if `.viepilot/ui-direction/` exists → reads ALL pages/*.html + ALL notes.md sections. `ui_direction_read_complete: true` required. Pages inventory mismatch → STOP.
140
+ - **Cross-reference gate (Step 1F):** when both workspaces present → validates coverage matrix; warns on Phase 1 features with no architect OR UI coverage.
141
+ - **No silent skip**: any workspace that exists MUST be fully read. Partial reads are not allowed.
142
+
87
143
  **Language configuration (ENH-032):**
88
144
  - Step 0-A reads `~/.viepilot/config.json` → `DOCUMENT_LANG` (default: `en`) and `COMMUNICATION_LANG` (default: `en`).
89
145
  - `DOCUMENT_LANG` controls content language for all generated files (ROADMAP, TRACKER, ARCHITECTURE, etc.).
@@ -303,3 +359,19 @@ plain-text numbered list prompts — no configuration required.
303
359
  - Polyrepo related-repos prompt (Step 0-B)
304
360
  - UI direction gate choice (Step 1A)
305
361
  - Architect mode suggestion (Step 1D)
362
+
363
+ ### Step 1E — Skill Decision Gate (FEAT-020)
364
+
365
+ After scope lock, before SPEC generation, crystallize checks for `## skills_used`
366
+ in the brainstorm session's notes.md:
367
+
368
+ - **No skills_used found** → step silently skipped
369
+ - **Skills found** → AUQ presents each skill (required / optional / exclude)
370
+ - **Decision written** to `PROJECT-CONTEXT.md ## Skills`
371
+
372
+ The `## Skills` decision is **final** — `/vp-auto` reads it at execution time
373
+ and injects skill best practices per task without re-prompting.
374
+
375
+ Install skills: `vp-tools install-skill <source>`
376
+ Registry: `vp-tools scan-skills`
377
+ Docs: `docs/user/features/skill-registry.md`
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -179,16 +206,42 @@ Update in:
179
206
  - CHANGELOG.md [Unreleased] section
180
207
 
181
208
  ### Step 5: Confirm & Suggest Next
209
+
210
+ Display summary banner:
211
+ ```
212
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
213
+ VIEPILOT ► EVOLVE COMPLETE ✓
214
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
+
216
+ Mode: {mode}
217
+ Changes: {list}
218
+ Version: {old} → {new}
219
+ New Phases: Phase {N}
220
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
221
  ```
183
- ✓ Evolution complete
184
222
 
185
- Mode: {mode}
186
- Changes:
187
- - {list changes}
223
+ **Claude Code (terminal) — REQUIRED:** After banner, call `AskUserQuestion`:
224
+ ```
225
+ question: "Phase {N} planned. What would you like to do next?"
226
+ options:
227
+ - label: "Execute now → /vp-auto"
228
+ description: "Start implementing Phase {N} immediately (Recommended)"
229
+ - label: "Create another request → /vp-request"
230
+ description: "Log more requests before implementing"
231
+ - label: "Done for now"
232
+ description: "Exit — run /vp-auto later"
233
+ ```
188
234
 
189
- Version: {old} → {new}
235
+ **On selection:**
236
+ - "Execute now → /vp-auto": invoke `/vp-auto --from {new_phase}` skill
237
+ - "Create another request → /vp-request": invoke `/vp-request` skill
238
+ - "Done for now": print "Phase {N} ready. Run /vp-auto when ready." and exit
190
239
 
191
- Next action: /vp-auto --from {new_phase}
240
+ **Text fallback (Cursor/Codex/Copilot/Antigravity):**
241
+ ```
242
+ Next actions:
243
+ /vp-auto --from {N} Execute Phase {N}
244
+ /vp-request Create another request
192
245
  ```
193
246
  </process>
194
247
 
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation
@@ -15,6 +15,33 @@ Output this banner as the **first** thing on every invocation — before questio
15
15
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
16
  ```
17
17
  </greeting>
18
+ <version_check>
19
+ ## Version Update Check (ENH-072)
20
+
21
+ After displaying the greeting banner, run:
22
+ ```bash
23
+ node "$HOME/.claude/viepilot/bin/vp-tools.cjs" check-update --silent
24
+ ```
25
+
26
+ **If exit code = 1** (update available — new version printed to stdout):
27
+ Display notice banner before any other output:
28
+ ```
29
+ ┌──────────────────────────────────────────────────────────────────┐
30
+ │ ✨ ViePilot {latest_version} available (installed: {current}) │
31
+ │ npm i -g viepilot && vp-tools install --target {adapter_id} │
32
+ └──────────────────────────────────────────────────────────────────┘
33
+ ```
34
+ Replace `{latest_version}` with stdout from the command, `{current}` with the installed
35
+ version, `{adapter_id}` with the active adapter (claude-code / cursor / antigravity / codex / copilot).
36
+
37
+ **If exit code = 0 or command unavailable**: silent, continue.
38
+
39
+ **Suppression rules:**
40
+ - `--no-update-check` flag on skill invocation → skip this step entirely
41
+ - `config.json` → `update.check: false` → skip this step entirely
42
+ - Show at most once per session (`update_check_done` session guard)
43
+ </version_check>
44
+
18
45
 
19
46
  <cursor_skill_adapter>
20
47
  ## A. Skill Invocation