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.
- package/CHANGELOG.md +220 -0
- package/README.md +32 -21
- package/bin/viepilot.cjs +12 -4
- package/docs/brainstorm/session-2026-04-11.md +194 -0
- package/docs/skills-reference.md +46 -0
- package/docs/user/features/adapters.md +74 -0
- package/docs/user/features/proposal.md +196 -0
- package/lib/adapters/antigravity.cjs +33 -0
- package/lib/adapters/claude-code.cjs +2 -2
- package/lib/adapters/codex.cjs +34 -0
- package/lib/adapters/cursor.cjs +2 -1
- package/lib/adapters/index.cjs +4 -2
- package/lib/google-slides-exporter.cjs +80 -0
- package/lib/proposal-generator.cjs +249 -0
- package/lib/screenshot-artifact.cjs +142 -0
- package/lib/viepilot-config.cjs +32 -1
- package/lib/viepilot-install.cjs +8 -10
- package/package.json +8 -3
- package/skills/vp-audit/SKILL.md +13 -2
- package/skills/vp-auto/SKILL.md +2 -2
- package/skills/vp-brainstorm/SKILL.md +2 -2
- package/skills/vp-crystallize/SKILL.md +30 -3
- package/skills/vp-debug/SKILL.md +2 -2
- package/skills/vp-docs/SKILL.md +1 -1
- package/skills/vp-evolve/SKILL.md +1 -1
- package/skills/vp-info/SKILL.md +1 -1
- package/skills/vp-pause/SKILL.md +2 -2
- package/skills/vp-proposal/SKILL.md +175 -0
- package/skills/vp-request/SKILL.md +2 -2
- package/skills/vp-resume/SKILL.md +2 -2
- package/skills/vp-rollback/SKILL.md +1 -1
- package/skills/vp-ui-components/SKILL.md +2 -2
- package/skills/vp-update/SKILL.md +1 -1
- package/templates/proposal/docx/project-detail.docx +0 -0
- package/templates/proposal/pptx/general.pptx +0 -0
- package/templates/proposal/pptx/product-pitch.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-creative.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-enterprise.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-modern-tech.pptx +0 -0
- package/templates/proposal/pptx/project-proposal.pptx +0 -0
- package/templates/proposal/pptx/tech-architecture.pptx +0 -0
- package/workflows/autonomous.md +32 -0
- package/workflows/brainstorm.md +1 -1
- package/workflows/crystallize.md +519 -0
- package/workflows/evolve.md +2 -0
- package/workflows/proposal.md +807 -0
- package/dev-install.sh +0 -171
- package/install.sh +0 -125
package/skills/vp-pause/SKILL.md
CHANGED
|
@@ -41,11 +41,11 @@ Save complete work state so it can be resumed from any context.
|
|
|
41
41
|
</objective>
|
|
42
42
|
|
|
43
43
|
<execution_context>
|
|
44
|
-
@$HOME
|
|
44
|
+
@$HOME/{envToolDir}/workflows/pause-work.md
|
|
45
45
|
</execution_context>
|
|
46
46
|
|
|
47
47
|
<process>
|
|
48
|
-
Execute workflow from `@$HOME
|
|
48
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/pause-work.md`
|
|
49
49
|
|
|
50
50
|
### Step 1: Detect Current Position
|
|
51
51
|
```bash
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vp-proposal
|
|
3
|
+
description: "Generate professional proposal packages (.pptx + .docx + .md) from brainstorm sessions or direct briefs"
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<cursor_skill_adapter>
|
|
8
|
+
## A. Skill Invocation
|
|
9
|
+
- Skill được gọi khi user mention `vp-proposal`, `/vp-proposal`, "proposal", "pitch deck", "presentation", "tài liệu đề xuất"
|
|
10
|
+
- Treat all user text after the skill mention as `{{VP_ARGS}}`
|
|
11
|
+
|
|
12
|
+
## B. User Prompting
|
|
13
|
+
Prompt user conversationally with numbered list options.
|
|
14
|
+
|
|
15
|
+
## C. Tool Usage
|
|
16
|
+
Use Cursor tools: `Shell`, `ReadFile`, `Glob`, `rg`, `ApplyPatch`, `WebSearch`, `WebFetch`, `Subagent`
|
|
17
|
+
</cursor_skill_adapter>
|
|
18
|
+
<scope_policy>
|
|
19
|
+
## ViePilot Namespace Guard (BUG-004)
|
|
20
|
+
- Default mode: only use and reference `vp-*` skills in ViePilot workflows.
|
|
21
|
+
- External skills (`non vp-*`) are out of framework scope unless user explicitly opts in.
|
|
22
|
+
</scope_policy>
|
|
23
|
+
<implementation_routing_guard>
|
|
24
|
+
## Implementation routing guard (ENH-021)
|
|
25
|
+
|
|
26
|
+
- **`/vp-proposal`** generates **output artifacts** (`docs/proposals/*.pptx`, `*.docx`, `*.md`) — it does **not** implement shipping code for `lib/`, `tests/`, `bin/`, or framework `workflows/`/`skills/`.
|
|
27
|
+
- This skill is the **delivery lane** after `/vp-brainstorm` captures the ideas. Use `/vp-request` → `/vp-evolve` → `/vp-auto` for ViePilot framework feature work.
|
|
28
|
+
- **Exception:** User **explicit** bypass — state clearly in chat.
|
|
29
|
+
</implementation_routing_guard>
|
|
30
|
+
|
|
31
|
+
<objective>
|
|
32
|
+
Generate a professional proposal package from a brainstorm session or direct brief.
|
|
33
|
+
|
|
34
|
+
**Output files** (written to `docs/proposals/`):
|
|
35
|
+
- `{slug}-{date}.md` — structured proposal Markdown (source of truth)
|
|
36
|
+
- `{slug}-{date}.pptx` — presentation file (ViePilot branded, dark navy/charcoal)
|
|
37
|
+
- `{slug}-{date}.docx` — detailed project document
|
|
38
|
+
- `{slug}-{date}-slides.txt` — Google Slides URL (only with `--slides` flag)
|
|
39
|
+
|
|
40
|
+
**Proposal types:**
|
|
41
|
+
| Type | Slides | Use case |
|
|
42
|
+
|------|--------|----------|
|
|
43
|
+
| `project-proposal` | 10 | Scope, timeline, budget for clients |
|
|
44
|
+
| `tech-architecture` | 12 | Technical design for partners |
|
|
45
|
+
| `product-pitch` | 12 | Investor / partner pitch deck |
|
|
46
|
+
| `general` | 8 | Generic, fallback |
|
|
47
|
+
|
|
48
|
+
**Template resolution (2-tier):**
|
|
49
|
+
1. `.viepilot/proposal-templates/{type}.pptx` — project-level override
|
|
50
|
+
2. `{viepilot-install}/templates/proposal/pptx/{type}.pptx` — ViePilot stock
|
|
51
|
+
|
|
52
|
+
**Context detection:**
|
|
53
|
+
- Auto-loads latest `docs/brainstorm/session-*.md` when present
|
|
54
|
+
- Standalone mode if no session found (user provides brief)
|
|
55
|
+
- `--from session-YYYY-MM-DD.md` for explicit session selection
|
|
56
|
+
</objective>
|
|
57
|
+
|
|
58
|
+
<execution_context>
|
|
59
|
+
workflows/proposal.md
|
|
60
|
+
</execution_context>
|
|
61
|
+
|
|
62
|
+
<context>
|
|
63
|
+
Optional flags:
|
|
64
|
+
- `--type <id>` : Proposal type — `project-proposal` | `tech-architecture` | `product-pitch` | `general`
|
|
65
|
+
If omitted: guided selection menu is shown
|
|
66
|
+
- `--from <file>` : Explicit brainstorm session file to use as context
|
|
67
|
+
Default: auto-detect latest `docs/brainstorm/session-*.md`
|
|
68
|
+
- `--lang <code>` : Language for generated content — ISO 639-1 (e.g. vi, en, ja, fr, zh).
|
|
69
|
+
If omitted: prompted with MRU suggestions from config.
|
|
70
|
+
Saved to ~/.viepilot/config.json → proposal.recentLangs after generation.
|
|
71
|
+
- `--lang-content-only` : Translate content (bullets, notes, paragraphs) only.
|
|
72
|
+
Keep structural labels / section names in English.
|
|
73
|
+
- `--slides` : After .pptx is generated, upload to Google Slides via service account auth
|
|
74
|
+
Requires: `@googleapis/slides` installed + `GOOGLE_APPLICATION_CREDENTIALS` env var
|
|
75
|
+
- `--dry-run` : Show slide manifest (JSON) without writing any files
|
|
76
|
+
</context>
|
|
77
|
+
|
|
78
|
+
<process>
|
|
79
|
+
Execute workflow from `workflows/proposal.md`
|
|
80
|
+
|
|
81
|
+
### Step 1: Context Detection
|
|
82
|
+
- Scan `docs/brainstorm/` for `session-*.md` → sort descending → load latest
|
|
83
|
+
- If `--from` specified: load that file directly
|
|
84
|
+
- If no session found: prompt user for brief:
|
|
85
|
+
- Project name
|
|
86
|
+
- One-line description
|
|
87
|
+
- Target audience (client / partner / investor)
|
|
88
|
+
- 3–5 key points to cover
|
|
89
|
+
|
|
90
|
+
### Step 2: Proposal Type Selection
|
|
91
|
+
- If `--type` provided: validate; show type + slide count to confirm
|
|
92
|
+
- Else: present menu:
|
|
93
|
+
```
|
|
94
|
+
1. Project Proposal (10 slides) — scope, timeline, budget
|
|
95
|
+
2. Tech Architecture (12 slides) — system design for partners
|
|
96
|
+
3. Product Pitch Deck (12 slides) — investor / partner pitch
|
|
97
|
+
4. General Proposal ( 8 slides) — generic fallback
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Step 3: AI Slide Manifest Generation
|
|
101
|
+
- Structure context into JSON manifest:
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"title": "...",
|
|
105
|
+
"subtitle": "...",
|
|
106
|
+
"slides": [
|
|
107
|
+
{ "index": 1, "layout": "cover", "heading": "...", "body": "...", "speakerNotes": "..." },
|
|
108
|
+
{ "index": 2, "layout": "section", "heading": "...", "bullets": ["..."], "speakerNotes": "..." }
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
- Slide count MUST match `PROPOSAL_TYPES[typeId].slides`
|
|
113
|
+
- If `--dry-run`: print manifest and stop
|
|
114
|
+
|
|
115
|
+
### Step 4: Template Resolution
|
|
116
|
+
- Call `resolveTemplate(typeId, 'pptx', projectRoot)` → pptx template path
|
|
117
|
+
- Call `resolveTemplate('project-detail', 'docx', projectRoot)` → docx template path
|
|
118
|
+
- Warn (not error) if stock fallback is used
|
|
119
|
+
|
|
120
|
+
### Step 5: Generate .pptx
|
|
121
|
+
- Load template via pptxgenjs
|
|
122
|
+
- Apply slide manifest: inject titles, bullets, speaker notes per slide
|
|
123
|
+
- Ensure `docs/proposals/` directory exists
|
|
124
|
+
- Write `{slug}-{date}.pptx`
|
|
125
|
+
|
|
126
|
+
### Step 6: Generate .docx
|
|
127
|
+
- Build detailed document from same manifest + extended content
|
|
128
|
+
- Sections: Executive Summary, Problem & Solution, Features & Specifications,
|
|
129
|
+
Technical Architecture (if relevant), Timeline, Team, Appendix
|
|
130
|
+
- Write `{slug}-{date}.docx`
|
|
131
|
+
|
|
132
|
+
### Step 7: Generate .md summary
|
|
133
|
+
- Write Markdown mirror of the manifest
|
|
134
|
+
- Save `{slug}-{date}.md`
|
|
135
|
+
|
|
136
|
+
### Step 8: Optional Google Slides upload (`--slides`)
|
|
137
|
+
- Call `lib/google-slides-exporter.cjs` → `uploadToSlides(pptxPath, title)`
|
|
138
|
+
- Write URL to `{slug}-{date}-slides.txt`
|
|
139
|
+
- On failure: surface error but do NOT fail the whole command (files already written)
|
|
140
|
+
|
|
141
|
+
### Step 9: Confirm output
|
|
142
|
+
```
|
|
143
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
|
+
VIEPILOT ► PROPOSAL GENERATED ✓
|
|
145
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
146
|
+
Type: {type label} ({N} slides)
|
|
147
|
+
Context: {session file or "direct brief"}
|
|
148
|
+
|
|
149
|
+
Files:
|
|
150
|
+
docs/proposals/{slug}-{date}.md
|
|
151
|
+
docs/proposals/{slug}-{date}.pptx
|
|
152
|
+
docs/proposals/{slug}-{date}.docx
|
|
153
|
+
[docs/proposals/{slug}-{date}-slides.txt] ← if --slides
|
|
154
|
+
|
|
155
|
+
Next:
|
|
156
|
+
Open .pptx in PowerPoint / Keynote / LibreOffice
|
|
157
|
+
Share .docx as supporting document
|
|
158
|
+
Run /vp-proposal --slides to upload to Google Slides
|
|
159
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
160
|
+
```
|
|
161
|
+
</process>
|
|
162
|
+
|
|
163
|
+
<success_criteria>
|
|
164
|
+
- [ ] Context detected (brainstorm session or user brief)
|
|
165
|
+
- [ ] Proposal type selected and validated
|
|
166
|
+
- [ ] Slide manifest generated with correct slide count
|
|
167
|
+
- [ ] .pptx written to docs/proposals/
|
|
168
|
+
- [ ] .docx written to docs/proposals/
|
|
169
|
+
- [ ] .md summary written to docs/proposals/
|
|
170
|
+
- [ ] Template resolution: project override takes precedence over stock
|
|
171
|
+
- [ ] --lang: content generated in specified language; MRU saved to config
|
|
172
|
+
- [ ] --lang-content-only: bullets/notes translated; structural labels stay English
|
|
173
|
+
- [ ] --slides: Google Slides URL written to -slides.txt (or clear error shown)
|
|
174
|
+
- [ ] --dry-run: manifest printed, no files written
|
|
175
|
+
</success_criteria>
|
|
@@ -49,7 +49,7 @@ Create and manage requests for the project under development:
|
|
|
49
49
|
</objective>
|
|
50
50
|
|
|
51
51
|
<execution_context>
|
|
52
|
-
@$HOME
|
|
52
|
+
@$HOME/{envToolDir}/workflows/request.md
|
|
53
53
|
</execution_context>
|
|
54
54
|
|
|
55
55
|
<context>
|
|
@@ -64,7 +64,7 @@ Optional flags:
|
|
|
64
64
|
</context>
|
|
65
65
|
|
|
66
66
|
<process>
|
|
67
|
-
Execute workflow from `@$HOME
|
|
67
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/request.md`
|
|
68
68
|
|
|
69
69
|
### Step 1: Detect Request Type
|
|
70
70
|
|
|
@@ -41,11 +41,11 @@ Restore complete project context and resume work seamlessly.
|
|
|
41
41
|
</objective>
|
|
42
42
|
|
|
43
43
|
<execution_context>
|
|
44
|
-
@$HOME
|
|
44
|
+
@$HOME/{envToolDir}/workflows/resume-work.md
|
|
45
45
|
</execution_context>
|
|
46
46
|
|
|
47
47
|
<process>
|
|
48
|
-
Execute workflow from `@$HOME
|
|
48
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/resume-work.md`
|
|
49
49
|
|
|
50
50
|
### Step 1: Check Project Exists
|
|
51
51
|
```bash
|
|
@@ -45,7 +45,7 @@ Sources can come from prompt/link/snippet (especially 21st.dev), then normalized
|
|
|
45
45
|
</objective>
|
|
46
46
|
|
|
47
47
|
<execution_context>
|
|
48
|
-
@$HOME
|
|
48
|
+
@$HOME/{envToolDir}/workflows/ui-components.md
|
|
49
49
|
</execution_context>
|
|
50
50
|
|
|
51
51
|
<context>
|
|
@@ -58,7 +58,7 @@ Optional flags:
|
|
|
58
58
|
</context>
|
|
59
59
|
|
|
60
60
|
<process>
|
|
61
|
-
Execute workflow from `@$HOME
|
|
61
|
+
Execute workflow from `@$HOME/{envToolDir}/workflows/ui-components.md`
|
|
62
62
|
|
|
63
63
|
Key steps:
|
|
64
64
|
1. Prepare global + local component stores
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/workflows/autonomous.md
CHANGED
|
@@ -134,6 +134,25 @@ FOR EACH path in ## Paths:
|
|
|
134
134
|
This check fires on `~/`, `~\`, and any path starting with `/`.
|
|
135
135
|
It does NOT fire on paths inside code block content within the task (only the `## Paths` header block is validated).
|
|
136
136
|
|
|
137
|
+
#### ⛔ PATH RESOLUTION RULE (BUG-012)
|
|
138
|
+
|
|
139
|
+
**All file reads and edits during task execution MUST be resolved from `{cwd}`** — the repository root where `package.json` lives (e.g. `/Users/.../my-project/`).
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
WHEN executing a task with:
|
|
143
|
+
## Paths
|
|
144
|
+
workflows/brainstorm.md
|
|
145
|
+
|
|
146
|
+
→ Read and edit: {cwd}/workflows/brainstorm.md
|
|
147
|
+
→ NEVER: ~/.claude/viepilot/workflows/brainstorm.md
|
|
148
|
+
→ NEVER: ~/.cursor/viepilot/workflows/brainstorm.md
|
|
149
|
+
→ NEVER: any path outside {cwd}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Rule**: If a file exists at both `{cwd}/workflows/foo.md` (codebase) and `~/.claude/viepilot/workflows/foo.md` (production install), **ALWAYS use the `{cwd}` copy**.
|
|
153
|
+
|
|
154
|
+
The install directory (`~/.claude/`, `~/.cursor/`) is a **deployment artifact** — it is populated by `dev-install.sh`. Editing it directly bypasses version control and will be silently overwritten on the next install.
|
|
155
|
+
|
|
137
156
|
### ViePilot Skill Scope Policy (BUG-004 baseline)
|
|
138
157
|
- **Default mode**: only reference/route skills in the ViePilot namespace (`vp-*`).
|
|
139
158
|
- **External skills** (`non vp-*`) are out of scope by default and must not be suggested implicitly.
|
|
@@ -214,6 +233,16 @@ Ensure `PHASE-STATE.md` already shows current task `in_progress` (set during the
|
|
|
214
233
|
git commit -m "{type}({scope}): {description}"
|
|
215
234
|
git push
|
|
216
235
|
```
|
|
236
|
+
|
|
237
|
+
⛔ **GITIGNORE-AWARE STAGING RULE (BUG-013)**: Before staging any file, verify it is
|
|
238
|
+
not gitignored. NEVER stage or commit gitignored files — they are internal state, not
|
|
239
|
+
shipping artifacts.
|
|
240
|
+
```bash
|
|
241
|
+
# Check before staging:
|
|
242
|
+
git check-ignore -q {file} && echo "IGNORED — skip" || git add {file}
|
|
243
|
+
```
|
|
244
|
+
`.viepilot/` is ALWAYS gitignored in ViePilot repos. **Never run `git add .viepilot/`.**
|
|
245
|
+
|
|
217
246
|
8. Log notes in task file after each sub-task
|
|
218
247
|
|
|
219
248
|
#### Verify Task
|
|
@@ -238,6 +267,9 @@ Before marking a task PASS, require durable git persistence:
|
|
|
238
267
|
```bash
|
|
239
268
|
# Must have no unstaged/staged residue for this task
|
|
240
269
|
git status --porcelain
|
|
270
|
+
# NOTE (BUG-013): lines starting with "??" are UNTRACKED files — NOT a dirty state.
|
|
271
|
+
# Porcelain is CLEAN when output is empty OR contains only "??" lines.
|
|
272
|
+
# Gitignored files (e.g. .viepilot/) must never be staged, so they appear as ?? here.
|
|
241
273
|
|
|
242
274
|
# Must track an upstream branch
|
|
243
275
|
git rev-parse --abbrev-ref --symbolic-full-name @{u}
|
package/workflows/brainstorm.md
CHANGED
|
@@ -413,7 +413,7 @@ Display a confirmation dialogue when any of the following conditions occur:
|
|
|
413
413
|
...
|
|
414
414
|
|
|
415
415
|
What would you like to do?
|
|
416
|
-
1. Save to ui-direction/notes.md (background extraction)
|
|
416
|
+
1. Save to .viepilot/ui-direction/{session-id}/notes.md (background extraction)
|
|
417
417
|
2. Save + activate UI Direction Mode to generate HTML direction
|
|
418
418
|
3. Discard and continue brainstorming
|
|
419
419
|
```
|