viepilot 2.4.0 → 2.15.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,212 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.15.0] - 2026-04-13
11
+
12
+ ### Changed (ENH-048 — Phase 78: AskUserQuestion Adapter-Aware Integration)
13
+
14
+ All `vp-*` workflows that ask users questions now include adapter-aware interactive prompts.
15
+ Claude Code (terminal) receives a structured click-to-select UI via `AskUserQuestion` tool.
16
+ All other adapters (Cursor Agent/Skills, Codex CLI, Antigravity native) automatically fall back
17
+ to the existing plain-text numbered lists — no configuration required.
18
+
19
+ **Research findings (adapter compatibility):**
20
+ - Claude Code terminal: ✅ `AskUserQuestion` fully supported (native tool)
21
+ - Cursor Agent/Skills Mode: ❌ `AskQuestion` only available in Plan Mode (community feature request)
22
+ - Codex CLI: ❌ not native (community MCP `ask-user-questions-mcp` exists separately)
23
+ - Antigravity native agent: ❌ uses Artifact model, no raw tool calls
24
+
25
+ **`workflows/crystallize.md`:**
26
+ - Added `Adapter Compatibility` table near top
27
+ - License selection (Step 0): AUQ spec with MIT/Apache-2.0/GPL-3.0/Proprietary options
28
+ - Brownfield overwrite confirmation (Step 0-B): AUQ Yes/No prompt
29
+ - Polyrepo related-repos prompt (Step 0-B): AUQ Yes supply/Skip options
30
+ - UI direction gate (Step 1A): AUQ Return-to-brainstorm / Continue-with-assumptions options
31
+ - Architect mode suggestion (Step 1D): AUQ Yes/No architect mode routing
32
+
33
+ **`workflows/brainstorm.md`:**
34
+ - Added `Adapter Compatibility` table near top
35
+ - Session intent (Step 2): AUQ Continue-recent / Review-specific / New-session options
36
+ - Landing page layout (Step 4): AUQ Layout A/B/C/D with descriptions (4-option fit)
37
+
38
+ **`workflows/request.md`:**
39
+ - Added `Adapter Compatibility` table near top
40
+ - Request type detection (Step 2): AUQ Bug/Feature/Enhancement/Tech-Debt (Brainstorm+List remain text)
41
+ - Bug severity (Step 4A): AUQ Critical/High/Medium/Low options
42
+ - Feature priority (Step 4B): AUQ Must-have/Should-have/Nice-to-have options
43
+
44
+ **`workflows/evolve.md`:**
45
+ - Added `Adapter Compatibility` table near top
46
+ - Intent detection (Step 2): AUQ Add-Feature/New-Milestone/Refactor options
47
+ - Complexity question (Step 3A): AUQ S/M/L/XL options
48
+ - Brainstorm routing (Step 3A): AUQ Yes-brainstorm/No-plan-directly options
49
+
50
+ **`skills/vp-crystallize/SKILL.md`, `skills/vp-brainstorm/SKILL.md`, `skills/vp-request/SKILL.md`:**
51
+ - Added `## Adapter Compatibility` section with 6-row adapter support table
52
+ - Listed prompts using AskUserQuestion per skill
53
+
54
+ ### Added
55
+ - `tests/unit/vp-enh048-askuserquestion.test.js` — 33 contract tests verifying AUQ specs + text fallback preservation across all affected files
56
+
57
+ ## [2.14.0] - 2026-04-13
58
+
59
+ ### Added (ENH-047 — Phase 77: Brownfield Multi-Repo, Submodules & Per-Module Gap Detection)
60
+
61
+ **Gap A — Git Submodule Detection:**
62
+ - `workflows/crystallize.md`: Signal Category 1 now reads `.gitmodules` → parses all `[submodule]` blocks (name, path, url); runs Signal Cat 1+2+4 on each initialized submodule path; records uninitialized paths with `initialized: false` + `primary_language: MISSING`
63
+ - Scan Report `modules[]`: new fields `type` (submodule/workspace/root), `submodule_url`, `initialized`
64
+ - Safety rule: scanner never runs `git submodule update` — local filesystem read-only
65
+
66
+ **Gap B — Polyrepo / Multi-Repo Detection:**
67
+ - `workflows/crystallize.md`: new Polyrepo Detection subsection in Signal Category 1 with 6 signal sources (docker-compose `../` build contexts, `file:../` package.json deps, CI cross-repo clones, README external repo links, Makefile `cd ../` targets)
68
+ - Scan Report: `polyrepo_hints[]` + `related_repos[]` fields (omitted entirely when empty — no empty arrays in clean single-repo reports)
69
+ - Interactive prompt fires when polyrepo signals detected; user can supply related repo URLs with optional role label
70
+ - Gap-fill rule: polyrepo hints without `related_repos` → system-level context fields = ASSUMED tier
71
+
72
+ **Gap C — Per-Module Gap Detection:**
73
+ - `workflows/crystallize.md`: new Per-Module Gap Detection section with MUST-DETECT table (primary_language, framework, module_purpose, entry_point) including source signals and tier-if-absent rules
74
+ - `must_detect_status{}` per module: records `{ value, source, tier }` per MUST-DETECT field; source conventions: `"tsconfig.json"` (file), `"inferred"` (ASSUMED), `"absent"` (MISSING), `"user"` (gap-filled)
75
+ - Root gap tier rollup: worst tier across all modules (MISSING > ASSUMED > DETECTED)
76
+ - Module with `gap_tier: MISSING` blocks artifact generation with targeted per-field user prompt
77
+ - Per-module `open_questions[]` rolled up into root `open_questions[]`
78
+ - Scan summary printout table (module | path | language | framework | gap tier)
79
+ - `skills/vp-crystallize/SKILL.md`: Brownfield Mode section updated with Gaps A+B+C, Scan Report contents list, per-module MUST-DETECT fields
80
+
81
+ ## [2.13.0] - 2026-04-13
82
+
83
+ ### Changed (ENH-046 — Phase 76)
84
+ - **`workflows/documentation.md`**: replaced GitHub-only URL parser with a forge-agnostic extractor supporting GitHub (SSH/HTTPS), GitLab (SSH/HTTPS), Bitbucket, Azure DevOps (`dev.azure.com`), Gitea, and any self-hosted remote
85
+ - Variables renamed: `GITHUB_OWNER`/`GITHUB_REPO` → `GIT_OWNER`/`GIT_REPO`; added `GIT_HOST`
86
+ - **`skills/vp-docs/SKILL.md`**: Step 0 shell block updated to match — same forge-agnostic parser, same variable names
87
+ - **`workflows/crystallize.md`**: Step 0 prompt label generalized from "GitHub username? (optional)" → "Git remote host / username? (optional — e.g. github.com/johndoe, gitlab.com/org)"
88
+
89
+ ## [2.12.0] - 2026-04-13
90
+
91
+ ### Added (FEAT-018 — Phase 75)
92
+ - **`vp-crystallize --brownfield`**: Brownfield Mode — bootstrap `.viepilot/` project context from an existing codebase without a brainstorm session
93
+ - 12-category codebase scanner: build manifests (11 platforms), framework detection (40+ dep patterns), architecture layer inference (18 directory patterns), database schema signals, API contract detection, infrastructure config, environment config shape, test coverage, code quality tools, documentation files, git history, file extension survey
94
+ - Structured Scan Report (YAML) with DETECTED / ASSUMED / MISSING gap classification
95
+ - MUST-DETECT gap tier: blocks artifact generation until user fills interactively
96
+ - Synthetic brainstorm stub (`docs/brainstorm/session-brownfield-import.md`) for `vp-audit` compatibility
97
+ - Safety rules: never reads `.env`; skips `node_modules/`, `.git/`, `target/`, `build/`, `dist/`, `__pycache__/`, `.venv/`, `vendor/`
98
+ - `vp-audit` updated to accept brownfield stub as valid brainstorm source (no false-positive errors)
99
+ - `TRACKER.md` annotated with `## Brownfield Import` block on first-time bootstrap
100
+
101
+ ## [2.11.0] - 2026-04-13
102
+
103
+ ### Added (ENH-045 — Phase 74)
104
+ - **`lib/proposal-generator.cjs`**: `getDesignConfig(projectContext)` helper + `DESIGN_CONFIGS` map (3 styles: modern-tech, enterprise, creative) — auto-selects palette from sector/audience/tone context
105
+ - **`scripts/gen-proposal-pptx.cjs`**: `PALETTES` map with 3 colour schemes + 3 rich slide layouts (timeline-gantt, team-card, investment-visual) + generates `project-proposal-{modern-tech,enterprise,creative}.pptx` variants
106
+ - **`workflows/proposal.md`**: dynamic slide count (no hard cap) + `designConfig` field in manifest + content-aware split rules (technicalNarrative > 4 → 2 slides; team > 4 → 2 slides; phases > 4 → 2 timeline slides) + DESIGN SELECTION AI prompt block
107
+ - 31 contract tests in `vp-enh045-dynamic-slides.test.js`
108
+
109
+ ## [2.10.1] - 2026-04-11
110
+
111
+ ### Changed (ENH-044 — Phase 73)
112
+ - **`lib/screenshot-artifact.cjs`**: `warnMissingTool(tool, installCmd)` — standardized stderr `⚠` warning when visual tool absent but artifacts exist; exports alongside existing helpers
113
+ - **`workflows/proposal.md` Step 4c**: mandatory enforcement — `visualSlides[]` MUST be non-empty when artifacts exist; puppeteer absent → `warnMissingTool('puppeteer', ...)` + `addPlaceholderVisual()` (no more silent skip)
114
+ - **`workflows/proposal.md` Step 7**: mandatory enforcement — Mermaid + ui/arch sections MUST be added when diagrams/artifacts exist; mmdc absent → text fallback + `warnMissingTool('mmdc', ...)`; puppeteer absent → placeholder paragraph + `warnMissingTool('puppeteer', ...)`
115
+ - `warnMissingTool()` called once per missing tool per generation run (not per-diagram)
116
+ - 16 tests in `vp-enh044-visual-enforce.test.js`
117
+
118
+ ## [2.10.0] - 2026-04-11
119
+
120
+ ### Added (ENH-043 — Phase 72)
121
+ - **`lib/screenshot-artifact.cjs`**: `isMmdcAvailable()` — boolean guard for `mmdc` CLI on PATH; `renderMermaidToPng(source, outPath)` — renders Mermaid source string → PNG via `mmdc` CLI; returns null when mmdc absent (no crash)
122
+ - **`scripts/gen-proposal-docx.cjs`**: `imageRunFromPng(pngPath, widthEmu, heightEmu)` → `ImageRun` (docx package) for embedding PNG as inline image; requires `screenshot-artifact.cjs` + `proposal-generator.cjs`; runtime visual embedding comment block documenting three injection points: Mermaid diagrams (renderMermaidToPng → ImageRun), UI prototype screenshot (before Executive Summary), architecture screenshot (after Technical Approach)
123
+ - **`workflows/proposal.md` Step 7**: Diagram Reference updated to render `mermaidSource` → PNG via `renderMermaidToPng()`; documents `screenshotArtifact` for ui-direction + architect injection; all paths use `cleanupScreenshot()`; graceful fallback when mmdc/puppeteer absent
124
+ - 19 tests in `vp-enh043-docx-visuals.test.js`; contracts +2 (769/769 total)
125
+
126
+ ## [2.9.0] - 2026-04-11
127
+
128
+ ### Added (ENH-042 — Phase 71)
129
+ - **`lib/proposal-generator.cjs`**: `detectVisualArtifacts(sessionDir)` — auto-scans `.viepilot/ui-direction/{latest-session}/` for ui-direction pages (`index.html`, `pages/*.html`) and 10 architect workspace page types (`architecture.html`, `erd.html`, `sequence-diagram.html`, etc.)
130
+ - **`lib/screenshot-artifact.cjs`** (new): `screenshotArtifact(htmlPath)` via optional puppeteer (headless Chrome) — returns `null` gracefully when puppeteer not installed; `isPuppeteerAvailable()` boolean guard; `cleanupScreenshot()` temp-file cleanup
131
+ - **`workflows/proposal.md` Step 4c `detect_visual_artifacts`**: AI maps slide topics to HTML artifact files, produces `visualSlides[]` array with `slideIndex`, `artifactType`, `htmlPath`, `label` fields
132
+ - **`scripts/gen-proposal-pptx.cjs`**: `addPlaceholderVisual(slide, label)` — styled navy+accent placeholder shape for when screenshots are unavailable; runtime integration comment block documenting the `screenshotArtifact` → `addImage` → `cleanupScreenshot` pattern
133
+ - Zero breaking change: all proposal generation works without puppeteer; visuals are additive
134
+
135
+ ## [2.8.0] - 2026-04-11
136
+
137
+ ### Added (ENH-041 — Phase 70)
138
+ - **`workflows/proposal.md` Step 4b `generate_docx_content`**: dedicated AI pass for deep `.docx` content, independent of the slide manifest — richer prose, risk analysis, diagrams
139
+ - **`docxContent` JSON schema**: `executiveSummary[]`, `problemStatement[]`, `solutionNarrative[]`, `technicalNarrative[]`, `riskRegister[]`, `glossary[]`, `diagrams[]` (with `mermaidSource`)
140
+ - **Step 7 updated**: `.docx` generator consumes `docxContent` for narrative paragraphs; new Risk Register and Glossary sections fed from `docxContent`
141
+ - **Step 8 updated**: `.md` companion embeds Mermaid fenced code blocks (` ```flowchart `, ` ```sequenceDiagram `, etc.) for each diagram in `docxContent.diagrams[]`
142
+ - **`getDiagramTypes(typeId)` helper** in `lib/proposal-generator.cjs`: maps proposal type to diagram array (`project-proposal` → `[flowchart, gantt]`, `tech-architecture` → `[flowchart, sequenceDiagram, classDiagram]`, etc.)
143
+ - **`.docx` Risk Register table**: Risk | Probability | Impact | Mitigation (5 placeholder rows)
144
+ - **`.docx` Glossary table**: Term | Definition (4 placeholder rows)
145
+ - `project-detail.docx` regenerated — 12 sections (added §8 Risk Register, §11 Glossary; previous §8–10 renumbered §9–12)
146
+ - 17 new tests in `tests/unit/vp-enh041-proposal-docx-ai.test.js`; `vp-proposal-contracts.test.js` updated (+5 ENH-041 assertions)
147
+
148
+ ## [2.7.0] - 2026-04-10
149
+
150
+ ### Added (ENH-040 — Phase 69)
151
+ - **`workflows/proposal.md` Step 2C Quality Brief**: 4 focused questions before AI generation — CTA, budget range, timeline constraint, decision-maker — stored in manifest `meta` field
152
+ - **Manifest `meta` schema**: `cta`, `budget`, `timeline`, `decisionMaker` fields drive tone and content specificity
153
+ - **AI Prompt Contract** in manifest_generation step: 8–15 word outcome-oriented bullets, 3–5 sentence speaker notes, concrete CTA on closing slide, avoids filler phrases
154
+ - **`.pptx` templates: 5 distinct layouts** (ENH-040 Layer 1):
155
+ - `cover` — split panel (left charcoal + ViePilot mark, right title/subtitle/meta)
156
+ - `section` — left accent sidebar + heading bar + bullets
157
+ - `two-column` — heading + dual column content (comparisons, scope, competitive)
158
+ - `data` — heading + up to 3 metric callout boxes (large value + label + note)
159
+ - `closing` — full charcoal, prominent CTA text, accent bars top/bottom
160
+ - **`.docx` template: structured tables + narrative** (ENH-040 Layer 3):
161
+ - **Timeline table**: Phase | Milestone/Deliverable | Duration | Dependencies (6 rows)
162
+ - **Budget/Investment table**: Line Item | Estimate | Notes (with TOTAL row)
163
+ - **Team table**: Role | Name/Background | Responsibility
164
+ - Narrative paragraphs for Executive Summary, Problem & Opportunity, Why Choose Us
165
+ - 10 sections + explicit `{{placeholder}}` instructions for AI to fill
166
+ - All 4 `.pptx` stock templates regenerated (137–151 KB; prev 97–126 KB)
167
+ - `project-detail.docx` regenerated (12 KB; prev 10 KB)
168
+
169
+ ### Tests
170
+ - Added `tests/unit/vp-enh040-proposal-quality.test.js` (27 tests — workflow contracts, pptx layout coverage, docx structure)
171
+ - Updated `tests/unit/vp-proposal-contracts.test.js` (+2 tests — quality brief + outcome-oriented rules)
172
+ - Total: **660 → 689 tests**
173
+
174
+ ## [2.6.0] - 2026-04-10
175
+
176
+ ### Added (ENH-039 — Phase 68)
177
+ - **`/vp-proposal --lang <code>`**: language selection for AI-generated content (ISO 639-1; e.g. `vi`, `en`, `ja`, `fr`, `zh`)
178
+ - If omitted: prompted with MRU suggestions from `~/.viepilot/config.json → proposal.recentLangs`
179
+ - Language is saved to MRU after each successful generation
180
+ - **`/vp-proposal --lang-content-only`**: translate bullets, notes, and paragraphs; keep structural labels / section names in English
181
+ - **MRU language history**: `~/.viepilot/config.json → proposal.recentLangs` (max 5, most recent first, deduped)
182
+ - **`lib/viepilot-config.cjs`**: `getProposalLang()` + `recordProposalLang()` helpers; `DEFAULTS` extended with `proposal.recentLangs` + `proposal.defaultLang`
183
+ - **`lib/proposal-generator.cjs`**: `buildLangInstruction(lang, contentOnly)` — builds AI prompt language instruction; no-op for English
184
+ - **`workflows/proposal.md`**: Step 3b Language Selection (MRU prompt); `langInstruction` injection in manifest generation; `recordProposalLang` after confirm output
185
+ - **`skills/vp-proposal/SKILL.md`**: `--lang` + `--lang-content-only` flags documented
186
+
187
+ ### Tests
188
+ - Added `tests/unit/vp-enh039-proposal-lang.test.js` (13 tests — config helpers, buildLangInstruction, SKILL.md/workflow contracts)
189
+ - Updated `tests/unit/vp-proposal-contracts.test.js` (+2 tests — --lang and --lang-content-only flag documentation)
190
+ - Total: **645 → 660 tests**
191
+
192
+ ## [2.5.0] - 2026-04-11
193
+
194
+ ### Added (FEAT-016 — Phases 63–67)
195
+ - **`/vp-proposal` skill**: convert brainstorm session (or direct brief) → professional proposal package
196
+ - `.pptx` presentation (ViePilot branded, dark navy/charcoal)
197
+ - `.docx` detailed document (10 sections: executive summary → appendix)
198
+ - `.md` Markdown source of truth
199
+ - Optional `.txt` Google Slides URL (`--slides` flag)
200
+ - **4 proposal types**: `project-proposal` (10 slides), `tech-architecture` (12), `product-pitch` (12), `general` (8)
201
+ - **`lib/proposal-generator.cjs`**: 2-tier template resolution (project `.viepilot/proposal-templates/` override → ViePilot stock fallback), context detection, type validation, output path builder
202
+ - **`lib/google-slides-exporter.cjs`**: service account auth; lazy-loads `@googleapis/slides`; graceful error when package or credentials absent
203
+ - **Stock templates**: `templates/proposal/pptx/` (4 files, dark navy `#1a1f36`/charcoal `#2d3142`, ViePilot branded) + `templates/proposal/docx/project-detail.docx`
204
+ - **`scripts/gen-proposal-pptx.cjs`** + **`scripts/gen-proposal-docx.cjs`**: template generation scripts
205
+ - **`skills/vp-proposal/SKILL.md`**: full skill definition; `--type`, `--from`, `--slides`, `--dry-run` flags
206
+ - **`workflows/proposal.md`**: 10-step workflow; slide manifest schema; 4 proposal type structures; error handling
207
+ - **`docs/user/features/proposal.md`**: full user guide with Google Slides 5-step setup guide
208
+ - **`@googleapis/slides`** added as `optionalDependencies` (install not required unless using `--slides`)
209
+ - **`pptxgenjs` + `docx`** added as runtime `dependencies`
210
+
211
+ ### Tests
212
+ - Added `tests/unit/vp-proposal-contracts.test.js` (25 tests — skill/workflow files, generator exports, stock templates, graceful degradation)
213
+ - Added `tests/unit/vp-proposal-core.test.js` (15 tests — resolveTemplate, validateType, detectBrainstormSession)
214
+ - Total: 607 → **647 tests**
215
+
10
216
  ## [2.4.0] - 2026-04-10
11
217
 
12
218
  ### Added (FEAT-015 — Phase 62)
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-2.4.0-blue.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-2.15.0-blue.svg)](CHANGELOG.md)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
- [![Skills](https://img.shields.io/badge/skills-16-purple.svg)](#skills-reference)
8
- [![Workflows](https://img.shields.io/badge/workflows-12-orange.svg)](#workflows)
7
+ [![Skills](https://img.shields.io/badge/skills-17-purple.svg)](#skills-reference)
8
+ [![Workflows](https://img.shields.io/badge/workflows-13-orange.svg)](#workflows)
9
9
  [![Templates](https://img.shields.io/badge/templates-17-cyan.svg)](#templates)
10
- [![Tests](https://img.shields.io/badge/tests-607%20passing-brightgreen.svg)](tests/)
10
+ [![Tests](https://img.shields.io/badge/tests-957%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 **2.4.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**2.4.0**) is the Node package identifier for this repo; use the framework version for milestone releases and docs.
13
+ **Versioning:** Shield **2.15.0** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**2.15.0**) 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,8 +28,8 @@ 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 | **~39,668+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
- | Skills | **16** |
31
+ | Total LOC | **~51,713+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
+ | Skills | **17** |
33
33
  | Workflows | **12** |
34
34
  | Templates | **17** (Project: 12, Phase: 5) |
35
35
  | CLI Commands | **18** (`vp-tools` 17 subcommands + `viepilot` installer) |
@@ -43,7 +43,7 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
43
43
 
44
44
  | Thành phần / Component | Số lượng / Count | Mô tả / Description |
45
45
  |------------------------|------------------|---------------------|
46
- | Skill Definitions | **16** | SKILL.md files với trigger, process, success criteria |
46
+ | Skill Definitions | **17** | SKILL.md files với trigger, process, success criteria |
47
47
  | Workflow Files | **12** | Step-by-step execution guides |
48
48
  | Project Templates | 12 | AI-GUIDE, ARCHITECTURE, VIEPILOT-META, README, SYSTEM-RULES, etc. |
49
49
  | Phase Templates | 5 | SPEC, PHASE-STATE, TASK, VERIFICATION, SUMMARY |
@@ -60,12 +60,12 @@ Tổng thể / Overall: ██████████████████
60
60
 
61
61
  | Lĩnh vực / Area | Trạng thái | Chi tiết |
62
62
  |-----------------|------------|----------|
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
- | Workflows (12) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
63
+ | Core Skills (17) | ✅ Hoàn thiện | brainstorm, crystallize, auto, pause, resume, status, info, request, evolve, docs, update, task, debug, rollback, audit, ui-components, **proposal** |
64
+ | Workflows (13) | ✅ Hoàn thiện | Full step-by-step guides với success criteria |
65
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 (607) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~037, BUG-009~013, adapter tests, info/update |
68
+ | Tests (957) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009~015, ENH-021~048, BUG-009~013, adapter tests, AskUserQuestion adapter-aware prompts |
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 |
@@ -126,6 +126,7 @@ Tổng thể / Overall: ██████████████████
126
126
  | `/vp-debug` | Debug có hệ thống với state tracking / Systematic debugging | "debug", "gỡ lỗi" | Debug |
127
127
  | `/vp-rollback` | Khôi phục về checkpoint / Rollback to checkpoint | "rollback", "revert" | Recovery |
128
128
  | `/vp-audit` | Kiểm tra sync docs vs implementation | "audit", "kiểm tra" | Quality |
129
+ | `/vp-proposal` | Generate .pptx + .docx proposal package từ brainstorm | "proposal", "pitch", "presentation" | Deliver |
129
130
 
130
131
  ---
131
132
 
@@ -338,7 +339,7 @@ Full guide: `docs/dev/deployment.md`.
338
339
 
339
340
  ```
340
341
  viepilot/
341
- ├── skills/ # 16 Skill definitions
342
+ ├── skills/ # 17 Skill definitions
342
343
  │ ├── vp-brainstorm/ # Thu thập ý tưởng
343
344
  │ │ └── SKILL.md
344
345
  │ ├── vp-crystallize/ # Tạo artifacts
@@ -356,7 +357,7 @@ viepilot/
356
357
  │ ├── vp-rollback/ # Checkpoint recovery
357
358
  │ └── vp-audit/ # Documentation sync
358
359
 
359
- ├── workflows/ # 12 Workflow definitions
360
+ ├── workflows/ # 13 Workflow definitions
360
361
  │ ├── brainstorm.md # Brainstorm session flow
361
362
  │ ├── crystallize.md # Artifact generation flow
362
363
  │ ├── autonomous.md # Execution loop
@@ -367,6 +368,8 @@ viepilot/
367
368
  │ ├── documentation.md # Docs generation
368
369
  │ ├── debug.md # Debug session workflow
369
370
  │ ├── rollback.md # Rollback workflow
371
+ │ ├── ui-components.md # UI component workflow
372
+ │ ├── proposal.md # Proposal generation
370
373
  │ └── audit.md # Audit workflow
371
374
 
372
375
  ├── templates/ # 17 Templates
@@ -0,0 +1,194 @@
1
+ # Brainstorm Session — 2026-04-11
2
+
3
+ ## Topic
4
+ **vp-proposal** — Skill mới: Idea → Proposal Documents + Presentation files (.pptx, .docx)
5
+
6
+ ## Status
7
+ Completed — Ready for `/vp-crystallize` / `/vp-request` → `/vp-evolve` → `/vp-auto`
8
+
9
+ ---
10
+
11
+ ## Problem Statement
12
+ ViePilot hiện có thể đưa ý tưởng thành code nhưng chưa có cầu nối sang **tài liệu bán hàng / thuyết phục**. Developer cần trình bày dự án cho khách hàng, đối tác, nhà đầu tư — hiện phải tự làm thủ công PowerPoint/Word tốn nhiều thời gian.
13
+
14
+ ---
15
+
16
+ ## Solution: `/vp-proposal`
17
+
18
+ Skill chuyển đổi ideas/brainstorm session → professional proposal package:
19
+ - **Presentation** (`.pptx`) — thuyết trình trực tiếp
20
+ - **Detail document** (`.docx`) — tài liệu chi tiết kèm theo
21
+ - **Markdown summary** (`.md`) — source of truth, version-controlled
22
+ - **Google Slides link** (optional `--slides`) — cloud sharing
23
+
24
+ ---
25
+
26
+ ## Decisions
27
+
28
+ ### D1: AI content generation
29
+ Auto-generate từ brainstorm session notes (context-aware).
30
+ - Nếu có `docs/brainstorm/session-*.md` → load latest session tự động làm input
31
+ - Standalone mode: user cung cấp brief trực tiếp trong chat
32
+ - Không cần user điền outline thủ công — AI extract + structure
33
+
34
+ ### D2: Template system (2-tier resolution)
35
+ ```
36
+ Tier 1 (project override): .viepilot/proposal-templates/{type}.pptx|docx
37
+ Tier 2 (stock fallback): {viepilot-install}/templates/proposal/pptx/{type}.pptx
38
+ {viepilot-install}/templates/proposal/docx/{type}.docx
39
+ ```
40
+ - Override chỉ ảnh hưởng project hiện tại
41
+ - Stock templates ship theo npm package
42
+
43
+ ### D3: Proposal types (4 + 1 docx)
44
+ | Type ID | Tên | Use case |
45
+ |---------|-----|----------|
46
+ | `project-proposal` | Project Proposal | Scope, timeline, budget cho khách hàng |
47
+ | `tech-architecture` | Technical Architecture | Thiết kế hệ thống cho technical partner |
48
+ | `product-pitch` | Product Pitch Deck | Investor / partner pitch |
49
+ | `general` | General Proposal | Tổng quát, fallback |
50
+ | `project-detail` (docx) | Project Detail Doc | Tài liệu chi tiết bổ sung cho tất cả loại trên |
51
+
52
+ ### D4: Output location
53
+ ```
54
+ docs/proposals/
55
+ ├── {slug}-{date}.md # Markdown source
56
+ ├── {slug}-{date}.pptx # Presentation
57
+ ├── {slug}-{date}.docx # Detail document
58
+ └── {slug}-{date}-slides.txt # Google Slides URL (nếu --slides)
59
+ ```
60
+
61
+ ### D5: Tech stack
62
+ | Output | Package | Version | Downloads/wk |
63
+ |--------|---------|---------|-------------|
64
+ | `.pptx` | `pptxgenjs` | ^3.x | 1.8M |
65
+ | `.docx` | `docx` | ^9.x | 3.5M |
66
+ | Google Slides | `@googleapis/slides` | official | optional dep |
67
+
68
+ ### D6: Workflow integration
69
+ - `c` — Context-aware: detect brainstorm session tự động OR standalone brief
70
+ - Auto-detect: check `docs/brainstorm/session-*.md` → sort by date → load latest
71
+ - User có thể override: `/vp-proposal --from session-2026-04-11.md`
72
+
73
+ ---
74
+
75
+ ## Architecture
76
+
77
+ ### New files
78
+ ```
79
+ skills/vp-proposal/
80
+ └── SKILL.md # Skill definition
81
+
82
+ workflows/
83
+ └── proposal.md # Step-by-step workflow
84
+
85
+ lib/
86
+ └── proposal-generator.cjs # Core: template resolution + pptxgenjs + docx
87
+
88
+ templates/proposal/
89
+ ├── pptx/
90
+ │ ├── project-proposal.pptx # ViePilot stock template
91
+ │ ├── tech-architecture.pptx
92
+ │ ├── product-pitch.pptx
93
+ │ └── general.pptx
94
+ └── docx/
95
+ └── project-detail.docx # ViePilot stock .docx template
96
+ ```
97
+
98
+ ### Template resolution logic (lib/proposal-generator.cjs)
99
+ ```js
100
+ function resolveTemplate(type, ext, projectRoot) {
101
+ const projectOverride = path.join(projectRoot, '.viepilot/proposal-templates', `${type}.${ext}`);
102
+ if (fs.existsSync(projectOverride)) return projectOverride;
103
+ return path.join(__dirname, '../templates/proposal', ext, `${type}.${ext}`);
104
+ }
105
+ ```
106
+
107
+ ### Slide generation flow
108
+ ```
109
+ /vp-proposal [--type project-proposal] [--slides]
110
+
111
+ ├─ 1. Load context (brainstorm session or user brief)
112
+ ├─ 2. AI structures content → JSON slide manifest
113
+ ├─ 3. resolveTemplate() → pick .pptx/.docx template
114
+ ├─ 4. pptxgenjs → write .pptx
115
+ ├─ 5. docx → write .docx
116
+ ├─ 6. Write .md summary
117
+ └─ 7. (--slides) Google Slides API upload → write URL
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Open Questions
123
+
124
+ - ~~OQ1~~: **Resolved** — Dark theme: navy/charcoal. Professional, tech feel.
125
+ - ~~OQ2~~: **Resolved** — Flexible per type: project-proposal 10, tech-architecture 12, product-pitch 12, general 8.
126
+ - ~~OQ3~~: **Resolved** — `optionalDependencies` — load on demand khi `--slides` flag, npm install không fail nếu thiếu.
127
+ - ~~OQ4~~: **Resolved** — Skill-only `/vp-proposal`, nhất quán với các skill khác.
128
+
129
+ ---
130
+
131
+ ## Phases
132
+
133
+ ### Phase 1 — Core infrastructure
134
+ - Add `pptxgenjs` + `docx` to `package.json` dependencies
135
+ - `lib/proposal-generator.cjs`: template resolution + base pptx/docx writer
136
+ - Unit tests: template resolution logic
137
+
138
+ ### Phase 2 — Skill + Workflow
139
+ - `skills/vp-proposal/SKILL.md`
140
+ - `workflows/proposal.md` — full step-by-step
141
+ - Context detection: brainstorm session auto-load
142
+ - 4 proposal types wired up
143
+
144
+ ### Phase 3 — Stock templates
145
+ - Design + generate 4 stock `.pptx` templates (ViePilot branded)
146
+ - 1 stock `.docx` template
147
+ - Store in `templates/proposal/`
148
+
149
+ ### Phase 4 — Google Slides export (optional)
150
+ - `--slides` flag
151
+ - `@googleapis/slides` optional dependency
152
+ - Service account auth guide in docs
153
+
154
+ ### Phase 5 — Tests + Docs
155
+ - Jest contracts for proposal-generator
156
+ - `docs/user/features/proposal.md`
157
+ - Update `docs/skills-reference.md` + `README.md`
158
+
159
+ ---
160
+
161
+ ## Research Notes
162
+
163
+ ### pptxgenjs
164
+ - MIT, zero runtime dependencies
165
+ - Supports Slide Masters for branded templates
166
+ - HTML-to-PPTX in 1 line
167
+ - Template injection: load existing .pptx → inject content
168
+
169
+ ### docx (by Dolan Miu)
170
+ - MIT, 3.5M downloads/week
171
+ - Declarative API: `new Document({ sections: [...] })`
172
+ - Supports tables, images, headings, lists
173
+ - Version 9.6.1, actively maintained
174
+
175
+ ### Google Slides API
176
+ - Official `@googleapis/slides` Node.js client
177
+ - Service account = no browser auth for CLI
178
+ - Template-based: create in Slides → replace placeholders via API
179
+ - Optional: only needed for `--slides` flag
180
+
181
+ ---
182
+
183
+ ## Project meta intake (FEAT-009)
184
+ Waiver — this is the ViePilot framework repo itself; profile binding already exists.
185
+
186
+ ---
187
+
188
+ ## Session Summary
189
+ - **Feasibility**: HIGH ✅
190
+ - **Dependencies**: 2 well-maintained npm packages (pptxgenjs + docx), both MIT
191
+ - **Complexity**: Medium — template system + AI content structuring + 2 file formats
192
+ - **Estimated phases**: 5
193
+ - **Suggested ID**: FEAT-016
194
+ - **Target version**: 2.5.0
@@ -45,6 +45,10 @@ Complete reference for all ViePilot skills.
45
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`.
46
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).
47
47
 
48
+ ### Adapter-Aware Interactive Prompts (ENH-048)
49
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool — click-to-select UI cho session intent + landing page layout
50
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
51
+
48
52
  ---
49
53
 
50
54
  ## /vp-crystallize
@@ -101,6 +105,10 @@ LICENSE
101
105
  README.md
102
106
  ```
103
107
 
108
+ ### Adapter-Aware Interactive Prompts (ENH-048)
109
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool cho license selection, brownfield overwrite confirm, polyrepo prompt, UI direction gate, architect suggestion
110
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
111
+
104
112
  ---
105
113
 
106
114
  ## /vp-auto
@@ -313,6 +321,10 @@ CHANGELOG.md (updated)
313
321
  4. Add to backlog
314
322
  5. Offer routing options (fix now, add to phase, etc.)
315
323
 
324
+ ### Adapter-Aware Interactive Prompts (ENH-048)
325
+ - **Claude Code (terminal)**: dùng `AskUserQuestion` tool cho request type detection, bug severity, feature priority
326
+ - **Cursor / Codex / Antigravity / other**: tự động fallback về text list — không cần cấu hình
327
+
316
328
  ---
317
329
 
318
330
  ## /vp-debug
@@ -467,3 +479,49 @@ CHANGELOG.md (updated)
467
479
  ### Lưu ý
468
480
  - Trong repo **application** có `node_modules/viepilot`, update mặc định có thể target **local** — dùng **`--global`** nếu chỉ muốn global.
469
481
  - Luồng an toàn: `vp-tools update --dry-run` → sau đó `vp-tools update --yes` (hoặc `--global --yes`).
482
+
483
+ ---
484
+
485
+ ## /vp-proposal
486
+
487
+ **Purpose**: Generate professional proposal packages (.pptx + .docx + .md) from brainstorm sessions or direct briefs.
488
+
489
+ **Triggers**: "proposal", "pitch deck", "presentation", "tài liệu đề xuất"
490
+
491
+ ### Proposal Types
492
+ | Type | Slides | Use case |
493
+ |------|--------|----------|
494
+ | `project-proposal` | 10 | Client delivery — scope, timeline, budget |
495
+ | `tech-architecture` | 12 | Technical partners — system design |
496
+ | `product-pitch` | 12 | Investors / partners — pitch |
497
+ | `general` | 8 | Any audience — flexible |
498
+
499
+ ### Flags
500
+ | Flag | Description |
501
+ |------|-------------|
502
+ | `--type <id>` | Proposal type ID. If omitted: guided menu. |
503
+ | `--from <file>` | Explicit brainstorm session file to use |
504
+ | `--slides` | Upload to Google Slides after generation (requires service account) |
505
+ | `--dry-run` | Print slide manifest; no files written |
506
+
507
+ ### Output
508
+ ```
509
+ docs/proposals/
510
+ ├── {slug}-{date}.md Markdown source
511
+ ├── {slug}-{date}.pptx Presentation
512
+ ├── {slug}-{date}.docx Detailed document
513
+ └── {slug}-{date}-slides.txt Google Slides URL (--slides only)
514
+ ```
515
+
516
+ ### Template Override
517
+ Place custom `.pptx`/`.docx` files in `.viepilot/proposal-templates/` to override stock ViePilot templates for a specific project.
518
+
519
+ ### Examples
520
+ ```
521
+ /vp-proposal Auto-detect session + guided type selection
522
+ /vp-proposal --type product-pitch 12-slide investor pitch
523
+ /vp-proposal --type project-proposal --slides + upload to Google Slides
524
+ /vp-proposal --dry-run Preview manifest only
525
+ ```
526
+
527
+ Full guide: `docs/user/features/proposal.md`