viepilot 2.4.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 +127 -0
- package/README.md +6 -5
- package/docs/brainstorm/session-2026-04-11.md +194 -0
- package/docs/skills-reference.md +46 -0
- package/docs/user/features/proposal.md +196 -0
- 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/package.json +8 -1
- package/skills/vp-audit/SKILL.md +11 -0
- package/skills/vp-crystallize/SKILL.md +27 -0
- package/skills/vp-proposal/SKILL.md +175 -0
- 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/crystallize.md +514 -0
- package/workflows/proposal.md +807 -0
|
@@ -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>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|