viepilot 2.1.0 → 2.12.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 (48) hide show
  1. package/CHANGELOG.md +220 -0
  2. package/README.md +32 -21
  3. package/bin/viepilot.cjs +12 -4
  4. package/docs/brainstorm/session-2026-04-11.md +194 -0
  5. package/docs/skills-reference.md +46 -0
  6. package/docs/user/features/adapters.md +74 -0
  7. package/docs/user/features/proposal.md +196 -0
  8. package/lib/adapters/antigravity.cjs +33 -0
  9. package/lib/adapters/claude-code.cjs +2 -2
  10. package/lib/adapters/codex.cjs +34 -0
  11. package/lib/adapters/cursor.cjs +2 -1
  12. package/lib/adapters/index.cjs +4 -2
  13. package/lib/google-slides-exporter.cjs +80 -0
  14. package/lib/proposal-generator.cjs +249 -0
  15. package/lib/screenshot-artifact.cjs +142 -0
  16. package/lib/viepilot-config.cjs +32 -1
  17. package/lib/viepilot-install.cjs +8 -10
  18. package/package.json +8 -3
  19. package/skills/vp-audit/SKILL.md +13 -2
  20. package/skills/vp-auto/SKILL.md +2 -2
  21. package/skills/vp-brainstorm/SKILL.md +2 -2
  22. package/skills/vp-crystallize/SKILL.md +30 -3
  23. package/skills/vp-debug/SKILL.md +2 -2
  24. package/skills/vp-docs/SKILL.md +1 -1
  25. package/skills/vp-evolve/SKILL.md +1 -1
  26. package/skills/vp-info/SKILL.md +1 -1
  27. package/skills/vp-pause/SKILL.md +2 -2
  28. package/skills/vp-proposal/SKILL.md +175 -0
  29. package/skills/vp-request/SKILL.md +2 -2
  30. package/skills/vp-resume/SKILL.md +2 -2
  31. package/skills/vp-rollback/SKILL.md +1 -1
  32. package/skills/vp-ui-components/SKILL.md +2 -2
  33. package/skills/vp-update/SKILL.md +1 -1
  34. package/templates/proposal/docx/project-detail.docx +0 -0
  35. package/templates/proposal/pptx/general.pptx +0 -0
  36. package/templates/proposal/pptx/product-pitch.pptx +0 -0
  37. package/templates/proposal/pptx/project-proposal-creative.pptx +0 -0
  38. package/templates/proposal/pptx/project-proposal-enterprise.pptx +0 -0
  39. package/templates/proposal/pptx/project-proposal-modern-tech.pptx +0 -0
  40. package/templates/proposal/pptx/project-proposal.pptx +0 -0
  41. package/templates/proposal/pptx/tech-architecture.pptx +0 -0
  42. package/workflows/autonomous.md +32 -0
  43. package/workflows/brainstorm.md +1 -1
  44. package/workflows/crystallize.md +519 -0
  45. package/workflows/evolve.md +2 -0
  46. package/workflows/proposal.md +807 -0
  47. package/dev-install.sh +0 -171
  48. package/install.sh +0 -125
package/CHANGELOG.md CHANGED
@@ -7,6 +7,226 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.12.0] - 2026-04-13
11
+
12
+ ### Added (FEAT-018 — Phase 75)
13
+ - **`vp-crystallize --brownfield`**: Brownfield Mode — bootstrap `.viepilot/` project context from an existing codebase without a brainstorm session
14
+ - 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
15
+ - Structured Scan Report (YAML) with DETECTED / ASSUMED / MISSING gap classification
16
+ - MUST-DETECT gap tier: blocks artifact generation until user fills interactively
17
+ - Synthetic brainstorm stub (`docs/brainstorm/session-brownfield-import.md`) for `vp-audit` compatibility
18
+ - Safety rules: never reads `.env`; skips `node_modules/`, `.git/`, `target/`, `build/`, `dist/`, `__pycache__/`, `.venv/`, `vendor/`
19
+ - `vp-audit` updated to accept brownfield stub as valid brainstorm source (no false-positive errors)
20
+ - `TRACKER.md` annotated with `## Brownfield Import` block on first-time bootstrap
21
+
22
+ ## [2.11.0] - 2026-04-13
23
+
24
+ ### Added (ENH-045 — Phase 74)
25
+ - **`lib/proposal-generator.cjs`**: `getDesignConfig(projectContext)` helper + `DESIGN_CONFIGS` map (3 styles: modern-tech, enterprise, creative) — auto-selects palette from sector/audience/tone context
26
+ - **`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
27
+ - **`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
28
+ - 31 contract tests in `vp-enh045-dynamic-slides.test.js`
29
+
30
+ ## [2.10.1] - 2026-04-11
31
+
32
+ ### Changed (ENH-044 — Phase 73)
33
+ - **`lib/screenshot-artifact.cjs`**: `warnMissingTool(tool, installCmd)` — standardized stderr `⚠` warning when visual tool absent but artifacts exist; exports alongside existing helpers
34
+ - **`workflows/proposal.md` Step 4c**: mandatory enforcement — `visualSlides[]` MUST be non-empty when artifacts exist; puppeteer absent → `warnMissingTool('puppeteer', ...)` + `addPlaceholderVisual()` (no more silent skip)
35
+ - **`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', ...)`
36
+ - `warnMissingTool()` called once per missing tool per generation run (not per-diagram)
37
+ - 16 tests in `vp-enh044-visual-enforce.test.js`
38
+
39
+ ## [2.10.0] - 2026-04-11
40
+
41
+ ### Added (ENH-043 — Phase 72)
42
+ - **`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)
43
+ - **`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)
44
+ - **`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
45
+ - 19 tests in `vp-enh043-docx-visuals.test.js`; contracts +2 (769/769 total)
46
+
47
+ ## [2.9.0] - 2026-04-11
48
+
49
+ ### Added (ENH-042 — Phase 71)
50
+ - **`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.)
51
+ - **`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
52
+ - **`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
53
+ - **`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
54
+ - Zero breaking change: all proposal generation works without puppeteer; visuals are additive
55
+
56
+ ## [2.8.0] - 2026-04-11
57
+
58
+ ### Added (ENH-041 — Phase 70)
59
+ - **`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
60
+ - **`docxContent` JSON schema**: `executiveSummary[]`, `problemStatement[]`, `solutionNarrative[]`, `technicalNarrative[]`, `riskRegister[]`, `glossary[]`, `diagrams[]` (with `mermaidSource`)
61
+ - **Step 7 updated**: `.docx` generator consumes `docxContent` for narrative paragraphs; new Risk Register and Glossary sections fed from `docxContent`
62
+ - **Step 8 updated**: `.md` companion embeds Mermaid fenced code blocks (` ```flowchart `, ` ```sequenceDiagram `, etc.) for each diagram in `docxContent.diagrams[]`
63
+ - **`getDiagramTypes(typeId)` helper** in `lib/proposal-generator.cjs`: maps proposal type to diagram array (`project-proposal` → `[flowchart, gantt]`, `tech-architecture` → `[flowchart, sequenceDiagram, classDiagram]`, etc.)
64
+ - **`.docx` Risk Register table**: Risk | Probability | Impact | Mitigation (5 placeholder rows)
65
+ - **`.docx` Glossary table**: Term | Definition (4 placeholder rows)
66
+ - `project-detail.docx` regenerated — 12 sections (added §8 Risk Register, §11 Glossary; previous §8–10 renumbered §9–12)
67
+ - 17 new tests in `tests/unit/vp-enh041-proposal-docx-ai.test.js`; `vp-proposal-contracts.test.js` updated (+5 ENH-041 assertions)
68
+
69
+ ## [2.7.0] - 2026-04-10
70
+
71
+ ### Added (ENH-040 — Phase 69)
72
+ - **`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
73
+ - **Manifest `meta` schema**: `cta`, `budget`, `timeline`, `decisionMaker` fields drive tone and content specificity
74
+ - **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
75
+ - **`.pptx` templates: 5 distinct layouts** (ENH-040 Layer 1):
76
+ - `cover` — split panel (left charcoal + ViePilot mark, right title/subtitle/meta)
77
+ - `section` — left accent sidebar + heading bar + bullets
78
+ - `two-column` — heading + dual column content (comparisons, scope, competitive)
79
+ - `data` — heading + up to 3 metric callout boxes (large value + label + note)
80
+ - `closing` — full charcoal, prominent CTA text, accent bars top/bottom
81
+ - **`.docx` template: structured tables + narrative** (ENH-040 Layer 3):
82
+ - **Timeline table**: Phase | Milestone/Deliverable | Duration | Dependencies (6 rows)
83
+ - **Budget/Investment table**: Line Item | Estimate | Notes (with TOTAL row)
84
+ - **Team table**: Role | Name/Background | Responsibility
85
+ - Narrative paragraphs for Executive Summary, Problem & Opportunity, Why Choose Us
86
+ - 10 sections + explicit `{{placeholder}}` instructions for AI to fill
87
+ - All 4 `.pptx` stock templates regenerated (137–151 KB; prev 97–126 KB)
88
+ - `project-detail.docx` regenerated (12 KB; prev 10 KB)
89
+
90
+ ### Tests
91
+ - Added `tests/unit/vp-enh040-proposal-quality.test.js` (27 tests — workflow contracts, pptx layout coverage, docx structure)
92
+ - Updated `tests/unit/vp-proposal-contracts.test.js` (+2 tests — quality brief + outcome-oriented rules)
93
+ - Total: **660 → 689 tests**
94
+
95
+ ## [2.6.0] - 2026-04-10
96
+
97
+ ### Added (ENH-039 — Phase 68)
98
+ - **`/vp-proposal --lang <code>`**: language selection for AI-generated content (ISO 639-1; e.g. `vi`, `en`, `ja`, `fr`, `zh`)
99
+ - If omitted: prompted with MRU suggestions from `~/.viepilot/config.json → proposal.recentLangs`
100
+ - Language is saved to MRU after each successful generation
101
+ - **`/vp-proposal --lang-content-only`**: translate bullets, notes, and paragraphs; keep structural labels / section names in English
102
+ - **MRU language history**: `~/.viepilot/config.json → proposal.recentLangs` (max 5, most recent first, deduped)
103
+ - **`lib/viepilot-config.cjs`**: `getProposalLang()` + `recordProposalLang()` helpers; `DEFAULTS` extended with `proposal.recentLangs` + `proposal.defaultLang`
104
+ - **`lib/proposal-generator.cjs`**: `buildLangInstruction(lang, contentOnly)` — builds AI prompt language instruction; no-op for English
105
+ - **`workflows/proposal.md`**: Step 3b Language Selection (MRU prompt); `langInstruction` injection in manifest generation; `recordProposalLang` after confirm output
106
+ - **`skills/vp-proposal/SKILL.md`**: `--lang` + `--lang-content-only` flags documented
107
+
108
+ ### Tests
109
+ - Added `tests/unit/vp-enh039-proposal-lang.test.js` (13 tests — config helpers, buildLangInstruction, SKILL.md/workflow contracts)
110
+ - Updated `tests/unit/vp-proposal-contracts.test.js` (+2 tests — --lang and --lang-content-only flag documentation)
111
+ - Total: **645 → 660 tests**
112
+
113
+ ## [2.5.0] - 2026-04-11
114
+
115
+ ### Added (FEAT-016 — Phases 63–67)
116
+ - **`/vp-proposal` skill**: convert brainstorm session (or direct brief) → professional proposal package
117
+ - `.pptx` presentation (ViePilot branded, dark navy/charcoal)
118
+ - `.docx` detailed document (10 sections: executive summary → appendix)
119
+ - `.md` Markdown source of truth
120
+ - Optional `.txt` Google Slides URL (`--slides` flag)
121
+ - **4 proposal types**: `project-proposal` (10 slides), `tech-architecture` (12), `product-pitch` (12), `general` (8)
122
+ - **`lib/proposal-generator.cjs`**: 2-tier template resolution (project `.viepilot/proposal-templates/` override → ViePilot stock fallback), context detection, type validation, output path builder
123
+ - **`lib/google-slides-exporter.cjs`**: service account auth; lazy-loads `@googleapis/slides`; graceful error when package or credentials absent
124
+ - **Stock templates**: `templates/proposal/pptx/` (4 files, dark navy `#1a1f36`/charcoal `#2d3142`, ViePilot branded) + `templates/proposal/docx/project-detail.docx`
125
+ - **`scripts/gen-proposal-pptx.cjs`** + **`scripts/gen-proposal-docx.cjs`**: template generation scripts
126
+ - **`skills/vp-proposal/SKILL.md`**: full skill definition; `--type`, `--from`, `--slides`, `--dry-run` flags
127
+ - **`workflows/proposal.md`**: 10-step workflow; slide manifest schema; 4 proposal type structures; error handling
128
+ - **`docs/user/features/proposal.md`**: full user guide with Google Slides 5-step setup guide
129
+ - **`@googleapis/slides`** added as `optionalDependencies` (install not required unless using `--slides`)
130
+ - **`pptxgenjs` + `docx`** added as runtime `dependencies`
131
+
132
+ ### Tests
133
+ - Added `tests/unit/vp-proposal-contracts.test.js` (25 tests — skill/workflow files, generator exports, stock templates, graceful degradation)
134
+ - Added `tests/unit/vp-proposal-core.test.js` (15 tests — resolveTemplate, validateType, detectBrainstormSession)
135
+ - Total: 607 → **647 tests**
136
+
137
+ ## [2.4.0] - 2026-04-10
138
+
139
+ ### Added (FEAT-015 — Phase 62)
140
+ - **Codex adapter**: `lib/adapters/codex.cjs` — OpenAI Codex CLI is now a first-class install target; skills install to `~/.codex/skills/`, viepilot bundle to `~/.codex/viepilot/`
141
+ - `lib/adapters/index.cjs`: `codex` registered; `listAdapters()` now returns 4 unique adapters
142
+ - `bin/viepilot.cjs`: Codex added to interactive installer TARGETS list and help text
143
+ - `docs/user/features/adapters.md`: Codex row added; `$skill-name` invocation note; removed stale `dev-install.sh` reference
144
+
145
+ ### Notes
146
+ - Codex uses `$vp-status` syntax (not `/vp-status`) — SKILL.md format is fully compatible, invocation prefix differs
147
+
148
+ ### Tests
149
+ - Added `tests/unit/vp-adapter-codex.test.js` (11 tests)
150
+ - Updated `tests/unit/vp-adapter-antigravity.test.js`: `listAdapters()` now expects 4
151
+ - Updated `tests/unit/viepilot-adapters.test.js`: count 3 → 4
152
+ - Updated `tests/unit/guided-installer.test.js`: `normalizeTargets('all')` includes codex
153
+ - Total: 607 tests (was 596)
154
+
155
+ ## [2.3.2] - 2026-04-10
156
+
157
+ ### Changed (ENH-037 — Phase 61)
158
+ - Post-install "Next actions" block is now adapter-driven: each adapter carries a `postInstallHint` string; CLI prints one hint per unique installed target — Antigravity now appears when installed
159
+ - `lib/adapters/claude-code.cjs`, `cursor.cjs`, `antigravity.cjs`: added `postInstallHint` field
160
+
161
+ ## [2.3.1] - 2026-04-10
162
+
163
+ ### Removed (ENH-036 — Phase 60)
164
+ - `install.sh` — bash wrapper was redundant; `bin/viepilot.cjs install` covers all install functionality
165
+ - `dev-install.sh` — bash adapter routing duplicated `lib/adapters/`; `bin/viepilot.cjs install --target <adapter>` is the canonical path
166
+ - Removed 5 tests that only verified shell script content (viepilot-install.test.js, viepilot-adapters.test.js, vp-adapter-antigravity.test.js)
167
+
168
+ ## [2.3.0] - 2026-04-10
169
+
170
+ ### Added (FEAT-014 — Phase 59)
171
+ - **Antigravity adapter**: `lib/adapters/antigravity.cjs` — Google Antigravity IDE is now a first-class install target; skills install to `~/.antigravity/skills/`, viepilot bundle to `~/.antigravity/viepilot/`
172
+ - `lib/adapters/index.cjs`: `antigravity` registered; `listAdapters()` now returns 3 unique adapters
173
+ - `dev-install.sh`: `VIEPILOT_ADAPTER=antigravity` supported
174
+ - `bin/viepilot.cjs`: Antigravity added to interactive installer TARGETS list and help text
175
+ - `docs/user/features/adapters.md`: new doc — supported platforms table, install examples, guide for adding new adapters
176
+
177
+ ### Tests
178
+ - Added `tests/unit/vp-adapter-antigravity.test.js` (12 tests)
179
+ - Updated `tests/unit/viepilot-adapters.test.js`: `listAdapters()` now expects 3
180
+ - Updated `tests/unit/guided-installer.test.js`: `normalizeTargets('all')` includes antigravity
181
+ - Total: 600 tests (was 588)
182
+
183
+ ## [2.2.0] - 2026-04-10
184
+
185
+ ### Changed (ENH-035 — Phase 58)
186
+ - **{envToolDir} template variable**: all 14 `skills/*/SKILL.md` source files now use `$HOME/{envToolDir}/` instead of hardcoded `$HOME/.cursor/viepilot/` — skill sources are platform-neutral
187
+ - **`lib/viepilot-install.cjs`**: path substitution now unconditionally replaces `{envToolDir}` → `adapter.executionContextBase` for every adapter (Cursor → `.cursor/viepilot`, Claude Code → `.claude/viepilot`, future adapters just set `executionContextBase`)
188
+ - **`lib/adapters/claude-code.cjs`**: removed `pathRewrite` field — no longer needed
189
+ - **`lib/adapters/cursor.cjs`**: removed `pathRewrite: null` field — no longer needed
190
+ - Adding a new adapter now requires only `executionContextBase` — no `pathRewrite` definition
191
+
192
+ ### Tests
193
+ - Updated `tests/unit/viepilot-adapters.test.js`: removed `pathRewrite` assertion; rewrite step tests now check `from: '{envToolDir}'`; added cursor-target substitution test
194
+ - Updated `tests/unit/viepilot-install.test.js`: 2 tests updated for ENH-035 behavior
195
+ - Total: 588 tests (was 587)
196
+
197
+ ## [2.1.3] - 2026-04-10
198
+
199
+ ### Fixed (BUG-011 — Phase 55)
200
+ - **brainstorm.md dialogue path**: confirmation option 1 now shows `.viepilot/ui-direction/{session-id}/notes.md` instead of bare `ui-direction/notes.md` — eliminates ambiguity with user-managed `{root}/ui-direction/` folders
201
+ - **crystallize.md PATH GUARD**: `consume_ui_direction` step now opens with `⛔ PATH GUARD (BUG-011)` — explicitly instructs LLM to ignore any `{root}/ui-direction/` folder and read only from `.viepilot/ui-direction/`
202
+
203
+ ### Tests
204
+ - Added `tests/unit/vp-bug011-ui-direction-path-guard.test.js` (3 tests)
205
+ - Total: 587 tests (was 584)
206
+
207
+ ## [2.1.2] - 2026-04-10
208
+
209
+ ### Fixed (BUG-013 — Phase 57)
210
+ - **Untrack .viepilot/ from git**: `git rm -r --cached .viepilot/` — removes all 27 previously-tracked internal state files from the git index; `.viepilot/` now correctly treated as gitignored on disk only, never staged or pushed
211
+ - **GITIGNORE-AWARE STAGING RULE**: `workflows/autonomous.md` commit block now has `⛔ GITIGNORE-AWARE STAGING RULE (BUG-013)` — instructs vp-auto to check `git check-ignore -q` before staging, and explicitly forbids `git add .viepilot/`
212
+ - **Git persistence gate note**: porcelain check section clarified — `??` (untracked-only) lines are CLEAN, not dirty state; prevents false gate failures after BUG-013 fix
213
+
214
+ ### Tests
215
+ - Added `tests/unit/vp-bug013-gitignore-staging-rule.test.js` (3 tests)
216
+ - Total: 584 tests (was 581)
217
+ - **ui-direction path disambiguation**: `workflows/brainstorm.md` confirmation dialogue option 1 now shows full unambiguous path `.viepilot/ui-direction/{session-id}/notes.md` (was bare `ui-direction/notes.md`)
218
+ - **crystallize PATH GUARD**: `workflows/crystallize.md` `consume_ui_direction` step now opens with `⛔ PATH GUARD (BUG-011)` — explicitly instructs LLM to ignore any `{root}/ui-direction/` folder and read only from `.viepilot/ui-direction/`
219
+
220
+ ## [2.1.1] - 2026-04-10
221
+
222
+ ### Fixed (BUG-012 — Phase 56)
223
+ - **PATH RESOLUTION RULE**: `workflows/autonomous.md` now has `⛔ PATH RESOLUTION RULE (BUG-012)` block — explicitly states all file reads/edits during task execution resolve from `{cwd}` (repo root), never from `~/.claude/` or `~/.cursor/` install directories
224
+ - **evolve.md cwd note**: `workflows/evolve.md` TASK PATH RULE section now includes BUG-012 cwd-resolution clarification: repo-relative paths always anchor to `{cwd}`, not install paths
225
+
226
+ ### Tests
227
+ - Added `tests/unit/vp-bug012-path-resolution-rule.test.js` (3 tests)
228
+ - Total: 581 tests (was 578)
229
+
10
230
  ## [2.1.0] - 2026-04-08
11
231
 
12
232
  ### Added (FEAT-012 — Phase 54)
package/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  **Autonomous Vibe Coding Framework / Bộ khung phát triển tự động có kiểm soát**
4
4
 
5
- [![Version](https://img.shields.io/badge/version-1.16.0-blue.svg)](CHANGELOG.md)
5
+ [![Version](https://img.shields.io/badge/version-2.5.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)
7
+ [![Skills](https://img.shields.io/badge/skills-17-purple.svg)](#skills-reference)
8
8
  [![Workflows](https://img.shields.io/badge/workflows-12-orange.svg)](#workflows)
9
9
  [![Templates](https://img.shields.io/badge/templates-17-cyan.svg)](#templates)
10
- [![Tests](https://img.shields.io/badge/tests-448%20passing-brightgreen.svg)](tests/)
10
+ [![Tests](https://img.shields.io/badge/tests-607%20passing-brightgreen.svg)](tests/)
11
11
  [![GitHub](https://img.shields.io/github/stars/0-CODE/viepilot?style=social)](https://github.com/0-CODE/viepilot)
12
12
 
13
- **Versioning:** Shield **1.9.5** is the **ViePilot framework SemVer** tracked in `.viepilot/TRACKER.md` and `CHANGELOG.md`. The npm `package.json` field `version` (**1.9.5**) is the Node package identifier for this repo; use the framework version for milestone releases and docs.
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.
14
14
 
15
15
  ViePilot là bộ skill framework cho phép AI assistant (Claude, GPT, etc.) phát triển dự án một cách **tự động**, **có kiểm soát**, và **có thể khôi phục**. Thiết kế theo các tiêu chuẩn chuyên nghiệp: Semantic Versioning, Conventional Commits, Keep a Changelog.
16
16
 
@@ -28,13 +28,13 @@ Nếu ViePilot giúp ích cho bạn, bạn có thể ủng hộ một ly cafe:
28
28
 
29
29
  | Chỉ số / Metric | Giá trị / Value |
30
30
  |-----------------|-----------------|
31
- | Total LOC | **~34,308+** (`.md`, `.js`, `.cjs`, `.yml`, `.json`, `.sh`; không gồm `node_modules`) |
32
- | Skills | **16** |
31
+ | Total LOC | **~39,668+** (`.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) |
36
- | Tests | **308** (16 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009 + FEAT-010 + ENH-021 routing + FEAT-001 Claude Code + ENH-022 crystallize architecture files + viepilot-info/update/install) |
37
- | ViePilot phases (local `.viepilot`) | **34** phase cycles — **M1.29** FEAT-001 (**v1.9.3** doc); patch **v1.9.4** (Claude installer); **M1.28** FEAT-010 (**v1.9.1**); **v1.9.2** (ENH-019~021); **M1.27** (**v1.9.0** FEAT-009); xem `CHANGELOG.md` |
36
+ | Tests | **607** (34 suites: unit + integration + AI compat + README metrics + UI direction + ENH contracts + scope policy + FEAT-009/010/011/012/013/015 + ENH-021~037 routing/language/architect/adapter + BUG-009~013 guards + viepilot-info/update/install/adapters) |
37
+ | ViePilot phases (local `.viepilot`) | **62** phase cycles — **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.0.0** FEAT-013 dynamic adapters; **v1.x** M1.29 (FEAT-001~013); xem `CHANGELOG.md` |
38
38
  | Standards | 5 (SemVer, Commits, Changelog, Comments, Contributors) |
39
39
 
40
40
  > Metric `Total LOC` có thể được refresh tự động bằng `npm run readme:sync` (dùng `cloc`; nếu thiếu `cloc` script sẽ fallback an toàn).
@@ -43,33 +43,33 @@ 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 |
50
50
  | CLI Tools | 2 | vp-tools.cjs (**17** subcommands) + viepilot.cjs (guided installer) |
51
- | Test Files | 15 | Jest: 14 unit + 1 integration (contracts, installer + Claude paths, info/update, FEAT-009, FEAT-010, FEAT-001, ENH-021, scope policy, …) |
51
+ | Test Files | 34 | Jest: 33 unit + 1 integration (contracts, installer + Claude paths, info/update, FEAT-009/010/011~015, ENH-021~037, BUG-009~013 guards, adapter tests, scope policy, …) |
52
52
 
53
53
  ---
54
54
 
55
55
  ## Độ hoàn thiện / Completion Status
56
56
 
57
57
  ```
58
- Tổng thể / Overall: ████████████████████ ~98% ✅ Latest **v1.9.4** (Claude Code **installer** ~/.claude/skills); **v1.9.3** FEAT-001 doc; **v1.9.2** (ENH-019~021); **v1.9.1** FEAT-010; **v1.9.0** FEAT-009
58
+ Tổng thể / Overall: ████████████████████ ~99% ✅ Latest **v2.4.0** FEAT-015 Codex adapter; **v2.3.x** ENH-036~037 installer cleanup; **v2.1.x** BUG-009~013; **v2.0.0** FEAT-013 dynamic adapters
59
59
  ```
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 |
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
64
  | Workflows (12) | ✅ 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 (304) | ✅ Hoàn thiện | Unit, integration, AI compat, workflow contracts, installer, scope policy, FEAT-009/010/001, ENH-021, 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 |
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 |
72
- | Installation | ✅ Hoàn thiện | install.sh + dev-install.sh |
72
+ | Installation | ✅ Hoàn thiện | `bin/viepilot.cjs install` (Node-based, all adapters) |
73
73
 
74
74
  ---
75
75
 
@@ -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
 
@@ -205,10 +206,13 @@ Chọn target profile trong wizard (phím mũi tên + space + enter):
205
206
  - Claude Code
206
207
  - Cursor Agent
207
208
  - Cursor IDE
209
+ - Antigravity
210
+ - Codex
208
211
 
209
212
  Non-interactive:
210
213
  ```bash
211
214
  npx viepilot install --target cursor-agent --yes
215
+ npx viepilot install --target codex --yes
212
216
  ```
213
217
 
214
218
  Gỡ cài đặt:
@@ -353,7 +357,7 @@ viepilot/
353
357
  │ ├── vp-rollback/ # Checkpoint recovery
354
358
  │ └── vp-audit/ # Documentation sync
355
359
 
356
- ├── workflows/ # 11 Workflow definitions
360
+ ├── workflows/ # 12 Workflow definitions
357
361
  │ ├── brainstorm.md # Brainstorm session flow
358
362
  │ ├── crystallize.md # Artifact generation flow
359
363
  │ ├── autonomous.md # Execution loop
@@ -388,17 +392,25 @@ viepilot/
388
392
  │ └── SUMMARY.md
389
393
 
390
394
  ├── lib/ # Shared CLI logic (coverage target for Jest)
391
- └── cli-shared.cjs # Validators, project root, Levenshtein helpers
395
+ ├── cli-shared.cjs # Validators, project root, Levenshtein helpers
396
+ │ └── adapters/ # Dynamic adapter system (FEAT-013)
397
+ │ ├── index.cjs # Registry: listAdapters(), getAdapter()
398
+ │ ├── claude-code.cjs # Claude Code adapter (~/.claude/)
399
+ │ ├── cursor.cjs # Cursor adapter (~/.cursor/)
400
+ │ ├── antigravity.cjs # Antigravity adapter (~/.antigravity/)
401
+ │ └── codex.cjs # Codex CLI adapter (~/.codex/)
392
402
 
393
403
  ├── bin/ # CLI tools
394
404
  │ └── vp-tools.cjs # 17 subcommands; uses ../lib/cli-shared.cjs, viepilot-info/update.cjs
395
405
 
396
- ├── tests/ # Test suite (308 tests)
397
- │ ├── unit/ # Unit tests
406
+ ├── tests/ # Test suite (607 tests, 34 suites)
407
+ │ ├── unit/ # 33 unit test files
398
408
  │ │ ├── validators.test.js # CLI subprocess + in-process coverage tests
399
- │ │ └── ai-provider-compat.test.js # 142 AI compat tests
409
+ │ │ ├── ai-provider-compat.test.js # AI compat tests
410
+ │ │ ├── viepilot-adapters.test.js # Adapter registry tests
411
+ │ │ └── vp-adapter-codex.test.js # Codex adapter tests
400
412
  │ └── integration/ # Integration tests
401
- │ └── workflow.test.js # 22 E2E tests
413
+ │ └── workflow.test.js # E2E tests
402
414
 
403
415
  ├── .github/workflows/ # CI/CD
404
416
  │ └── ci.yml # Node 18/20/22 matrix
@@ -419,7 +431,6 @@ viepilot/
419
431
  │ ├── api-service/ # Express + JWT example
420
432
  │ └── cli-tool/ # Node.js CLI example
421
433
 
422
- ├── install.sh # Installation script
423
434
  ├── Makefile # Developer commands
424
435
  ├── CHANGELOG.md # Version history
425
436
  ├── CONTRIBUTING.md # Contribution guide
package/bin/viepilot.cjs CHANGED
@@ -21,6 +21,8 @@ const TARGETS = [
21
21
  { id: 'claude-code', label: adapterMap['claude-code'].name + ' (default)' },
22
22
  { id: 'cursor-agent', label: 'Cursor Agent' },
23
23
  { id: 'cursor-ide', label: 'Cursor IDE' },
24
+ { id: 'antigravity', label: adapterMap['antigravity'].name },
25
+ { id: 'codex', label: adapterMap['codex'].name },
24
26
  ];
25
27
 
26
28
  function printHelp() {
@@ -34,14 +36,14 @@ Usage:
34
36
  viepilot --list-targets
35
37
 
36
38
  Install options:
37
- --target <id|id,id|all> Target profile(s): claude-code (mirrors vp-* to ~/.claude/skills), cursor-agent, cursor-ide
39
+ --target <id|id,id|all> Target profile(s): claude-code (mirrors vp-* to ~/.claude/skills), cursor-agent, cursor-ide, antigravity, codex
38
40
  --yes Non-interactive mode (skip confirmations)
39
41
  --dry-run Print actions only (Node installer; no bash)
40
42
  --list-targets Print supported targets and exit
41
43
  --help Show help
42
44
 
43
45
  Uninstall options:
44
- --target <id|id,id|all> Remove assets (claude-code: ~/.claude/skills/vp-*; cursor-*: ~/.cursor/skills/vp-*; shared: ~/.cursor/viepilot)
46
+ --target <id|id,id|all> Remove assets (claude-code: ~/.claude/skills/vp-*; cursor-*: ~/.cursor/skills/vp-*; antigravity: ~/.antigravity/skills/vp-*; codex: ~/.codex/skills/vp-*)
45
47
  --yes Non-interactive mode (skip confirmations)
46
48
  --dry-run Print actions only, do not remove files
47
49
  `);
@@ -337,8 +339,14 @@ async function installCommand(rawArgs) {
337
339
  else console.log(`- ${r.target}: failed (exit ${r.code})`);
338
340
  }
339
341
  console.log('\nNext actions:');
340
- console.log('- Cursor: open project and run /vp-status');
341
- console.log('- Claude Code: restart session if needed so ~/.claude/skills/vp-* is picked up; then /vp-status');
342
+ const seenAdapters = new Set();
343
+ for (const target of selectedTargets) {
344
+ const a = adapterMap[target];
345
+ if (a && !seenAdapters.has(a.id)) {
346
+ seenAdapters.add(a.id);
347
+ console.log(`- ${a.name}: ${a.postInstallHint || 'run /vp-status'}`);
348
+ }
349
+ }
342
350
  console.log('- If needed, run /vp-brainstorm then /vp-crystallize');
343
351
 
344
352
  return failed.length === 0 ? 0 : 1;
@@ -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