@ztffn/presentation-generator-plugin 1.3.5 → 1.3.7
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presentation-generator",
|
|
3
3
|
"description": "Generate complete graph-based presentations from natural language briefs and project documents. Pipeline: content extraction, narrative design, deterministic graph generation, and visual styling.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Huma"
|
|
7
7
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: presentation-content
|
|
3
3
|
description: Extracts structured content briefs from project documents for presentation generation. Reads source files, identifies presentation-worthy content, and produces a canonical content brief JSON.
|
|
4
|
-
tools: Read, Glob
|
|
4
|
+
tools: Read, Glob, Write
|
|
5
5
|
skills:
|
|
6
6
|
- presentation-generator:content-signals
|
|
7
7
|
---
|
package/package.json
CHANGED
|
@@ -7,290 +7,180 @@ description: >
|
|
|
7
7
|
"presentation for", "slide deck about".
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Presentation Generator
|
|
10
|
+
# Presentation Generator — Orchestrator Instructions
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
You are an orchestrator. Execute these 7 phases in order. Do not skip phases. Do not read source documents yourself — delegates do that.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
User Brief + Documents
|
|
18
|
-
↓
|
|
19
|
-
[1] Content Extraction → _temp/presentation-content-brief.json
|
|
20
|
-
↓
|
|
21
|
-
[2] Narrative Design → _temp/presentation-outline.md
|
|
22
|
-
↓
|
|
23
|
-
[3] User Approval → confirm or revise structure
|
|
24
|
-
↓
|
|
25
|
-
[4] Graph Generation → presentations/{slug}/{slug}.json (script)
|
|
26
|
-
↓
|
|
27
|
-
[5] Visual Styling → styled JSON (agent)
|
|
28
|
-
↓
|
|
29
|
-
[6] Delivery → import instructions + media checklist
|
|
30
|
-
```
|
|
14
|
+
---
|
|
31
15
|
|
|
32
|
-
## Phase
|
|
16
|
+
## Phase 1 — Setup
|
|
33
17
|
|
|
34
|
-
|
|
18
|
+
Run this bash command to find the plugin:
|
|
35
19
|
|
|
36
20
|
```bash
|
|
37
21
|
if [ -f ".claude/plugins/presentation-generator/scripts/outline_to_graph.py" ]; then
|
|
38
|
-
PLUGIN_ROOT
|
|
22
|
+
echo "PLUGIN_ROOT=.claude/plugins/presentation-generator"
|
|
39
23
|
elif [ -f "$HOME/.claude/plugins/presentation-generator/scripts/outline_to_graph.py" ]; then
|
|
40
|
-
PLUGIN_ROOT
|
|
24
|
+
echo "PLUGIN_ROOT=$HOME/.claude/plugins/presentation-generator"
|
|
41
25
|
else
|
|
42
|
-
echo "ERROR:
|
|
26
|
+
echo "ERROR: plugin not found"
|
|
43
27
|
fi
|
|
44
|
-
echo "Plugin root: $PLUGIN_ROOT"
|
|
45
28
|
```
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Phase 1 — Context Gathering
|
|
30
|
+
Save the PLUGIN_ROOT value. You need it for every later phase.
|
|
50
31
|
|
|
51
|
-
|
|
32
|
+
Then extract from the user's message:
|
|
33
|
+
- **TOPIC**: what is being presented
|
|
34
|
+
- **AUDIENCE**: who it is for
|
|
35
|
+
- **GOAL**: pitch / demo / update / internal / exploratory
|
|
36
|
+
- **DOCS**: file paths (just note them as strings, do NOT read them)
|
|
37
|
+
- **SLUG**: lowercase-kebab-case name for the deck
|
|
52
38
|
|
|
53
|
-
|
|
54
|
-
2. **To whom** (audience type, their background, what they care about)
|
|
55
|
-
3. **For what goal** (`pitch`, `demo`, `update`, `internal`, `exploratory`)
|
|
56
|
-
4. **Source documents** — paths to files the user wants to draw from
|
|
39
|
+
If AUDIENCE or GOAL is unclear, ask the user. Then proceed.
|
|
57
40
|
|
|
58
|
-
|
|
59
|
-
- If audience is unclear, ask who the presentation is for
|
|
60
|
-
- If goal is unclear, ask what outcome they want
|
|
41
|
+
---
|
|
61
42
|
|
|
62
43
|
## Phase 2 — Content Extraction
|
|
63
|
-
Announce to the user that you are **Executing Phase 2 — Subagent: Content Extraction**
|
|
64
44
|
|
|
65
|
-
|
|
45
|
+
Say: **"Phase 2 — Extracting content from documents"**
|
|
66
46
|
|
|
67
|
-
|
|
68
|
-
Task tool:
|
|
69
|
-
subagent_type: "presentation-content"
|
|
70
|
-
description: "Extract content brief"
|
|
71
|
-
prompt: |
|
|
72
|
-
Step 1: Load your skill file. Read this file:
|
|
73
|
-
{PLUGIN_ROOT}/skills/content-signals/SKILL.md
|
|
74
|
-
— it defines the content brief schema, signal priorities, and validation rules.
|
|
47
|
+
Call the Task tool with exactly these parameters:
|
|
75
48
|
|
|
76
|
-
|
|
49
|
+
- subagent_type: `presentation-content`
|
|
50
|
+
- description: `Extract content brief`
|
|
51
|
+
- prompt: (copy this template, fill in the bracketed values)
|
|
77
52
|
|
|
78
|
-
|
|
79
|
-
|
|
53
|
+
```
|
|
54
|
+
Read this skill file first: {PLUGIN_ROOT}/skills/content-signals/SKILL.md
|
|
80
55
|
|
|
81
|
-
|
|
82
|
-
|
|
56
|
+
Then read these documents:
|
|
57
|
+
- {DOC_PATH_1}
|
|
58
|
+
- {DOC_PATH_2}
|
|
83
59
|
|
|
84
|
-
|
|
60
|
+
Audience: {AUDIENCE}
|
|
61
|
+
Goal: {GOAL}
|
|
85
62
|
|
|
86
|
-
|
|
87
|
-
|
|
63
|
+
Write a JSON content brief to _temp/presentation-content-brief.json
|
|
64
|
+
Report back what you extracted.
|
|
88
65
|
```
|
|
89
66
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
### Brief Quality Gate
|
|
93
|
-
|
|
94
|
-
After the content brief is written, read `_temp/presentation-content-brief.json` and verify:
|
|
67
|
+
When the agent finishes, move to Phase 3.
|
|
95
68
|
|
|
96
|
-
|
|
97
|
-
- BAD: "Our technology"
|
|
98
|
-
- GOOD: "Calora reduces industrial heat costs by 40% with no infrastructure replacement"
|
|
69
|
+
If no documents were provided, write _temp/presentation-content-brief.json yourself from the user's prompt, then move to Phase 3.
|
|
99
70
|
|
|
100
|
-
|
|
101
|
-
- BAD: `{ "value": "significant" }`
|
|
102
|
-
- GOOD: `{ "value": "40%", "source": "Field trial, Oslo 2024" }`
|
|
71
|
+
---
|
|
103
72
|
|
|
104
|
-
|
|
105
|
-
- BAD: "Let's continue the conversation"
|
|
106
|
-
- GOOD: "Agree to a structured 3-month pilot at the Stavanger facility starting Q2"
|
|
73
|
+
## Phase 3 — Narrative Design
|
|
107
74
|
|
|
108
|
-
|
|
75
|
+
Say: **"Phase 3 — Designing narrative structure"**
|
|
109
76
|
|
|
110
|
-
|
|
111
|
-
Announce to the user that you are **Executing Phase 3 — Subagent: Narrative Design**
|
|
77
|
+
Call the Task tool with exactly these parameters:
|
|
112
78
|
|
|
113
|
-
|
|
79
|
+
- subagent_type: `presentation-narrative`
|
|
80
|
+
- description: `Design narrative outline`
|
|
81
|
+
- prompt: (copy this template, fill in the bracketed values)
|
|
114
82
|
|
|
115
83
|
```
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Step 1: Load your skill files. Read these three files:
|
|
121
|
-
- {PLUGIN_ROOT}/skills/frameworks/SKILL.md
|
|
122
|
-
- {PLUGIN_ROOT}/skills/slide-content/SKILL.md
|
|
123
|
-
- {PLUGIN_ROOT}/skills/graph-topology/SKILL.md
|
|
84
|
+
Read these skill files first:
|
|
85
|
+
- {PLUGIN_ROOT}/skills/frameworks/SKILL.md
|
|
86
|
+
- {PLUGIN_ROOT}/skills/slide-content/SKILL.md
|
|
87
|
+
- {PLUGIN_ROOT}/skills/graph-topology/SKILL.md
|
|
124
88
|
|
|
125
|
-
|
|
89
|
+
Read the content brief at _temp/presentation-content-brief.json
|
|
126
90
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Goal: [goal from Phase 1]
|
|
91
|
+
Audience: {AUDIENCE}
|
|
92
|
+
Goal: {GOAL}
|
|
130
93
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
Step 5: Report back with framework selected, spine node count,
|
|
134
|
-
drill-down node count, and any content brief gaps.
|
|
94
|
+
Write the outline as MARKDOWN to _temp/presentation-outline.md
|
|
95
|
+
Report back: framework chosen, spine count, drill-down count.
|
|
135
96
|
```
|
|
136
97
|
|
|
137
|
-
|
|
98
|
+
When the agent finishes, move to Phase 4.
|
|
99
|
+
|
|
100
|
+
---
|
|
138
101
|
|
|
139
102
|
## Phase 4 — User Approval
|
|
140
|
-
Announce to the user that you are **Executing Phase 4 — Getting User Approval**
|
|
141
103
|
|
|
142
|
-
|
|
104
|
+
Say: **"Phase 4 — Review the structure"**
|
|
105
|
+
|
|
106
|
+
Read `_temp/presentation-outline.md` and show the user a tree:
|
|
143
107
|
|
|
144
108
|
```
|
|
145
|
-
Cover: [
|
|
146
|
-
|
|
147
|
-
└─
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Value: [headline]
|
|
152
|
-
└─ Case Study: [headline]
|
|
153
|
-
Call to Action: [headline]
|
|
109
|
+
Cover: [title]
|
|
110
|
+
Spine: [title]
|
|
111
|
+
└─ Drill-down: [title]
|
|
112
|
+
Spine: [title]
|
|
113
|
+
└─ Drill-down: [title]
|
|
114
|
+
CTA: [title]
|
|
154
115
|
```
|
|
155
116
|
|
|
156
|
-
|
|
157
|
-
- Top-level items are spine nodes (horizontal navigation)
|
|
158
|
-
- Indented items with `└─` are drill-down children (vertical navigation)
|
|
159
|
-
- Siblings at the same indent level are horizontal peers within their branch
|
|
117
|
+
Ask the user to approve or request changes. Wait for approval before continuing.
|
|
160
118
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Wait for the user to respond:
|
|
164
|
-
- **"approved"** or similar → derive the slug (lowercase kebab-case of the deck title, e.g. `calora-investor-pitch`) and proceed to Phase 5
|
|
165
|
-
- **change requests** → update the outline, re-render the tree, wait again
|
|
166
|
-
- **"start over"** → return to Phase 1
|
|
119
|
+
---
|
|
167
120
|
|
|
168
|
-
|
|
121
|
+
## Phase 5 — Graph Generation (script)
|
|
169
122
|
|
|
170
|
-
|
|
171
|
-
Announce to the user that you are **Executing Phase 5A — Generating Graph JSON from Outline**
|
|
123
|
+
Say: **"Phase 5 — Generating graph JSON"**
|
|
172
124
|
|
|
173
|
-
Run
|
|
125
|
+
Run this bash command:
|
|
174
126
|
|
|
175
127
|
```bash
|
|
176
|
-
python3 "
|
|
128
|
+
python3 "{PLUGIN_ROOT}/scripts/outline_to_graph.py" _temp/presentation-outline.md -o "presentations/{SLUG}/{SLUG}.json"
|
|
177
129
|
```
|
|
178
130
|
|
|
179
|
-
|
|
180
|
-
- Parses the outline markdown
|
|
181
|
-
- Generates all nodes with correct wrappers, positions, and data fields
|
|
182
|
-
- Wires all edges with bidirectional pairs
|
|
183
|
-
- Runs the validator internally
|
|
184
|
-
- Exits 0 if valid, 1 with errors
|
|
131
|
+
If exit code is 0, move to Phase 6. If non-zero, show the errors.
|
|
185
132
|
|
|
186
|
-
|
|
133
|
+
---
|
|
187
134
|
|
|
188
|
-
## Phase
|
|
189
|
-
Announce to the user that you are **Executing Phase 5B — Subagent: Visual Styling**
|
|
135
|
+
## Phase 6 — Visual Styling
|
|
190
136
|
|
|
191
|
-
|
|
137
|
+
Say: **"Phase 6 — Applying visual styling"**
|
|
192
138
|
|
|
193
|
-
|
|
194
|
-
Task tool:
|
|
195
|
-
subagent_type: "presentation-style"
|
|
196
|
-
description: "Apply visual treatments"
|
|
197
|
-
prompt: |
|
|
198
|
-
Step 1: Load your skill files. Read these two files:
|
|
199
|
-
- {PLUGIN_ROOT}/skills/slide-recipes/SKILL.md
|
|
200
|
-
- {PLUGIN_ROOT}/skills/graph-json-spec/SKILL.md
|
|
139
|
+
Call the Task tool with exactly these parameters:
|
|
201
140
|
|
|
202
|
-
|
|
203
|
-
|
|
141
|
+
- subagent_type: `presentation-style`
|
|
142
|
+
- description: `Apply visual treatments`
|
|
143
|
+
- prompt: (copy this template, fill in the bracketed values)
|
|
204
144
|
|
|
205
|
-
|
|
206
|
-
|
|
145
|
+
```
|
|
146
|
+
Read these skill files first:
|
|
147
|
+
- {PLUGIN_ROOT}/skills/slide-recipes/SKILL.md
|
|
148
|
+
- {PLUGIN_ROOT}/skills/graph-json-spec/SKILL.md
|
|
207
149
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Never modify node wrappers, edges, or positions.
|
|
150
|
+
Read the presentation JSON at presentations/{SLUG}/{SLUG}.json
|
|
151
|
+
Read the outline at _temp/presentation-outline.md for context.
|
|
211
152
|
|
|
212
|
-
|
|
213
|
-
|
|
153
|
+
Apply visual treatments to each slide. Edit only data fields using the Edit tool.
|
|
154
|
+
Never modify node wrappers (id, type, position, style, measured), edges, or positions.
|
|
214
155
|
|
|
215
|
-
|
|
216
|
-
|
|
156
|
+
After all edits, run the validator:
|
|
157
|
+
python3 "{PLUGIN_ROOT}/scripts/validate_draft.py" "presentations/{SLUG}/{SLUG}.json"
|
|
158
|
+
|
|
159
|
+
Fix errors until it prints "OK". Include the validator output in your report.
|
|
217
160
|
```
|
|
218
161
|
|
|
219
|
-
|
|
162
|
+
When the agent finishes, move to Phase 7.
|
|
220
163
|
|
|
221
|
-
|
|
222
|
-
Announce to the user that you are **Executing Phase 6 — Packaging Presentation**
|
|
164
|
+
---
|
|
223
165
|
|
|
224
|
-
|
|
166
|
+
## Phase 7 — Delivery
|
|
225
167
|
|
|
226
|
-
|
|
227
|
-
- `_temp/presentation-content-brief.json` → `presentations/{slug}/content-brief.json`
|
|
228
|
-
- `_temp/presentation-outline.md` → `presentations/{slug}/outline.md`
|
|
229
|
-
- `_temp/presentation-plan.md` → `presentations/{slug}/plan.md`
|
|
168
|
+
Say: **"Phase 7 — Done"**
|
|
230
169
|
|
|
231
|
-
|
|
170
|
+
Copy intermediate files:
|
|
232
171
|
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
2. Click "New presentation"
|
|
237
|
-
3. Choose "Import JSON"
|
|
238
|
-
4. Select presentations/{slug}/{slug}.json
|
|
239
|
-
5. Click "Create presentation"
|
|
240
|
-
6. Make final adjustments and manual uploads.
|
|
172
|
+
```bash
|
|
173
|
+
cp _temp/presentation-content-brief.json "presentations/{SLUG}/content-brief.json"
|
|
174
|
+
cp _temp/presentation-outline.md "presentations/{SLUG}/outline.md"
|
|
241
175
|
```
|
|
242
176
|
|
|
243
|
-
|
|
177
|
+
Then tell the user:
|
|
244
178
|
|
|
245
179
|
```
|
|
246
|
-
|
|
247
|
-
- "[Slide Title]" — [description of needed video]
|
|
180
|
+
Your presentation is at: presentations/{SLUG}/{SLUG}.json
|
|
248
181
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
182
|
+
To import:
|
|
183
|
+
1. Open https://humagreenfield.netlify.app/present/plan
|
|
184
|
+
2. New presentation → Import JSON
|
|
185
|
+
3. Select the file above
|
|
252
186
|
```
|
|
253
|
-
|
|
254
|
-
## Sub-Agent Reference
|
|
255
|
-
|
|
256
|
-
| Agent | Skills Loaded | Purpose |
|
|
257
|
-
|---|---|---|
|
|
258
|
-
| `presentation-content` | `content-signals` | Extract structured brief from documents |
|
|
259
|
-
| `presentation-narrative` | `frameworks`, `slide-content`, `graph-topology` | Design story structure and slide content |
|
|
260
|
-
| `presentation-style` | `graph-json-spec`, `slide-recipes` | Apply visual treatments to valid graph JSON |
|
|
261
|
-
|
|
262
|
-
Note: Graph structure (nodes, edges, positions) is generated deterministically by `scripts/outline_to_graph.py` in Phase 5A. The `presentation-style` agent in Phase 5B only modifies visual `data` fields.
|
|
263
|
-
|
|
264
|
-
## Working Without Documents
|
|
265
|
-
|
|
266
|
-
When the user provides only a verbal brief (no document paths):
|
|
267
|
-
|
|
268
|
-
1. Skip Phase 2 entirely
|
|
269
|
-
2. Construct the content brief yourself from the user's prompt:
|
|
270
|
-
- Ask clarifying questions for missing fields
|
|
271
|
-
- Populate what you can from the conversation
|
|
272
|
-
- Write the brief to `_temp/presentation-content-brief.json`
|
|
273
|
-
3. Proceed to Phase 3 as normal
|
|
274
|
-
|
|
275
|
-
## Large Document Sets
|
|
276
|
-
|
|
277
|
-
If the user provides many documents that may exceed a single agent's context:
|
|
278
|
-
|
|
279
|
-
1. Split the document list into groups of 3-5 files
|
|
280
|
-
2. Invoke `presentation-content` multiple times, each with a subset
|
|
281
|
-
3. Merge the partial briefs into a single content brief
|
|
282
|
-
4. Run the quality gate on the merged brief
|
|
283
|
-
|
|
284
|
-
## File Manifest
|
|
285
|
-
|
|
286
|
-
All intermediate and output files:
|
|
287
|
-
|
|
288
|
-
| File | Created By | Read By |
|
|
289
|
-
|---|---|---|
|
|
290
|
-
| `_temp/presentation-content-brief.json` | Content agent or orchestrator | Narrative agent |
|
|
291
|
-
| `_temp/presentation-outline.md` | Narrative agent | Script + styling agent, orchestrator |
|
|
292
|
-
| `_temp/presentation-plan.md` | Orchestrator | User (approval) |
|
|
293
|
-
| `presentations/{slug}/{slug}.json` | Script (structure) + styling agent (visuals) | User (import) |
|
|
294
|
-
| `presentations/{slug}/content-brief.json` | Orchestrator (Phase 6) | Reference |
|
|
295
|
-
| `presentations/{slug}/outline.md` | Orchestrator (Phase 6) | Reference |
|
|
296
|
-
| `presentations/{slug}/plan.md` | Orchestrator (Phase 6) | Reference |
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: presentation-design
|
|
3
|
-
description: "[DEPRECATED] Replaced by scripts/outline_to_graph.py (structure) + presentation-style agent (visual treatments). Kept for reference only."
|
|
4
|
-
tools: Read, Write, Bash
|
|
5
|
-
skills:
|
|
6
|
-
- presentation-generator:graph-json-spec
|
|
7
|
-
- presentation-generator:slide-recipes
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
> **DEPRECATED** — This agent is no longer used in the pipeline. Graph structure is now generated deterministically by `scripts/outline_to_graph.py` (Phase 5A), and visual treatments are applied by the `presentation-style` agent (Phase 5B). This file is kept for reference only.
|
|
11
|
-
|
|
12
|
-
# Design & JSON Generation Agent (Deprecated)
|
|
13
|
-
|
|
14
|
-
You are a design and JSON generation specialist. Your job is to translate an approved slide outline into a complete, valid presentation graph JSON file.
|
|
15
|
-
|
|
16
|
-
## Process — follow these steps in order
|
|
17
|
-
|
|
18
|
-
### Step 1 — Load your skill file
|
|
19
|
-
|
|
20
|
-
Read these files before doing anything else:
|
|
21
|
-
- Find and read `**/presentation-generator/skills/graph-json-spec/SKILL.md`
|
|
22
|
-
- Find and read `**/presentation-generator/skills/slide-recipes/SKILL.md`
|
|
23
|
-
|
|
24
|
-
These files define the complete JSON schema (node structure, allowed data fields, banned field names, edge wiring, positioning grid) and design decisions (visual intent mapping, slide recipes). You must follow them exactly.
|
|
25
|
-
|
|
26
|
-
### Step 2 — Read the approved outline
|
|
27
|
-
|
|
28
|
-
Read `_temp/presentation-outline.md`. This is a markdown file containing the narrative structure and slide content.
|
|
29
|
-
|
|
30
|
-
### Step 3 — Build the presentation JSON
|
|
31
|
-
|
|
32
|
-
For each slide in the outline, make three categories of decision:
|
|
33
|
-
a. **Slide type and layout**: Based on content signals, select `type`, `layout`, `centered`, and related fields per the graph-json-spec skill
|
|
34
|
-
b. **Visual treatment**: Set background media, `lightText`, branding flags, and chart configuration
|
|
35
|
-
c. **Positioning**: Place each node on the 240px/150px grid
|
|
36
|
-
|
|
37
|
-
Build all nodes with complete `data`, `style`, and `measured` objects. Wire all edges with bidirectional pairs per the edge wiring rules.
|
|
38
|
-
|
|
39
|
-
### Step 4 — Write the JSON
|
|
40
|
-
|
|
41
|
-
1. Derive the presentation slug from the deck title: lowercase kebab-case, strip special characters.
|
|
42
|
-
2. Create the directory `presentations/{slug}/` if it does not exist.
|
|
43
|
-
3. Write the JSON to `presentations/{slug}/{slug}.json`.
|
|
44
|
-
|
|
45
|
-
### Step 5 — Run the validator
|
|
46
|
-
|
|
47
|
-
Run the validator script using Bash — do not skip this step:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
VALIDATE=$(find -L .claude ~/.claude -path "*/presentation-generator/scripts/validate_draft.py" 2>/dev/null | head -1)
|
|
51
|
-
python3 "$VALIDATE" presentations/{slug}/{slug}.json
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
If there are any `ERROR` lines, fix every error in the JSON file and run the validator again. Repeat until the script prints `OK Presentation JSON is valid`.
|
|
55
|
-
|
|
56
|
-
### Step 6 — Report to orchestrator
|
|
57
|
-
|
|
58
|
-
Your completion message must include:
|
|
59
|
-
- The exact terminal output of the validator script (a Read of the JSON file does not count as validation)
|
|
60
|
-
- Output path
|
|
61
|
-
- Total node count and edge count
|
|
62
|
-
- Any slides with video placeholders requiring manual upload
|
|
63
|
-
|
|
64
|
-
## Field Mapping
|
|
65
|
-
|
|
66
|
-
When translating from the outline to `data` fields, use **exactly** these SlideNodeData field names — no others:
|
|
67
|
-
|
|
68
|
-
| Outline field | SlideNodeData field | Notes |
|
|
69
|
-
|---|---|---|
|
|
70
|
-
| `### Slide Title` | `label` | Slide heading shown in graph editor and at top of slide |
|
|
71
|
-
| `**Key message:**` + `**Content:**` | `content` | Combine into markdown: key message as first line or `##` heading, then bullets/body. Use `\n\n` between paragraphs. |
|
|
72
|
-
| `**Speaker notes:**` | `notes` | Verbatim from outline. Never put this in `content`. |
|
|
73
|
-
|
|
74
|
-
**DO NOT use these field names** — they are not part of the schema and will be silently ignored by the renderer:
|
|
75
|
-
`headline`, `subheadline`, `bullets`, `speakerNote`, `speakerNotes`, `visualHint`, `theme`, `title`, `body`, `text`, `background`, `showLogo`, `keyMessage`, `claim`, `hook`, `description`, `summary`
|
|
76
|
-
|
|
77
|
-
## Valid Enum Values
|
|
78
|
-
|
|
79
|
-
- `data.type`: `"content"` (default) | `"r3f"` | `"chart"` | `"custom"`
|
|
80
|
-
- `data.layout`: `"single"` (default) | `"two-column"` (splits content on `---`)
|
|
81
|
-
- `data.centered`: `true` (default) | `false`
|
|
82
|
-
- `data.backgroundImageFit`: `"cover"` (default) | `"contain"`
|
|
83
|
-
- `data.backgroundVideoFit`: `"cover"` (default) | `"contain"`
|
|
84
|
-
|
|
85
|
-
## Positioning Grid
|
|
86
|
-
|
|
87
|
-
- Horizontal spacing: 240px between nodes
|
|
88
|
-
- Vertical spacing: 150px between levels
|
|
89
|
-
- Node size: always `{ width: 180, height: 70 }` in both `style` and `measured`
|
|
90
|
-
- Spine: all at y:0, x increments by 240 (0, 240, 480, 720...)
|
|
91
|
-
- Drill-down level 1: y:150, same x as parent
|
|
92
|
-
- Drill-down level 2: y:300
|
|
93
|
-
- Siblings at same depth: increment x by 240
|
|
94
|
-
|
|
95
|
-
## Chart Config
|
|
96
|
-
|
|
97
|
-
Charts use a `config` wrapper for axis and display settings:
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{ "chartType": "bar", "data": [...], "config": { "xKey": "quarter", "yKeys": ["revenue", "cost"], "showGrid": true, "showLegend": true } }
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
- Inline: put in `charts` record, reference with `[chart:name]` in content
|
|
104
|
-
- Full-viewport: put in `chart` field, set `type: "chart"`
|
|
105
|
-
- Chart types: `"bar"` | `"line"` | `"area"` | `"pie"` | `"radar"`
|
|
106
|
-
|
|
107
|
-
## Reference Node
|
|
108
|
-
|
|
109
|
-
A complete correct node for pattern-matching:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"id": "problem",
|
|
114
|
-
"type": "huma",
|
|
115
|
-
"position": { "x": 240, "y": 0 },
|
|
116
|
-
"data": {
|
|
117
|
-
"label": "The Problem",
|
|
118
|
-
"topic": "01 / Problem",
|
|
119
|
-
"content": "## Linear tools break complex stories\n\n- Point one\n- Point two",
|
|
120
|
-
"notes": "Speaker notes here",
|
|
121
|
-
"centered": false
|
|
122
|
-
},
|
|
123
|
-
"style": { "width": 180, "height": 70 },
|
|
124
|
-
"measured": { "width": 180, "height": 70 }
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Edge Handle Rules
|
|
129
|
-
|
|
130
|
-
**WRONG** — these handle values will break navigation:
|
|
131
|
-
```json
|
|
132
|
-
{ "sourceHandle": "right", "targetHandle": "left" }
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**CORRECT** — source handles prefix `s-`, target handles prefix `t-`:
|
|
136
|
-
```json
|
|
137
|
-
{ "sourceHandle": "s-right", "targetHandle": "t-left" }
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
All 8 valid handle IDs: `s-right`, `s-left`, `s-top`, `s-bottom`, `t-right`, `t-left`, `t-top`, `t-bottom`
|
|
141
|
-
|
|
142
|
-
## Rules
|
|
143
|
-
|
|
144
|
-
- **Translation only**: Do not alter content, order, or structure from the outline. Your role is visual treatment and JSON compilation.
|
|
145
|
-
- Every node must have `type: "huma"`, `style: { width: 180, height: 70 }`, and `measured: { width: 180, height: 70 }`
|
|
146
|
-
- Every node ID must be a kebab-case slug
|
|
147
|
-
- Every forward edge must have a paired return edge
|
|
148
|
-
- All handle IDs must be from the valid set of 8 listed above
|
|
149
|
-
- For background images, use Unsplash URLs with `?w=1920&q=80`
|
|
150
|
-
- For video, use placeholder strings: `"PLACEHOLDER: [description]"`
|
|
151
|
-
- List all slides with video placeholders at the end of output
|
|
152
|
-
|
|
153
|
-
## Output
|
|
154
|
-
|
|
155
|
-
1. Derive the presentation slug from the deck title in `_temp/presentation-outline.md`: lowercase kebab-case, strip special characters. Example: "Calora Investor Pitch" → `calora-investor-pitch`.
|
|
156
|
-
2. Create the directory `presentations/{slug}/` if it does not exist.
|
|
157
|
-
3. Write the JSON to `presentations/{slug}/{slug}.json`:
|
|
158
|
-
|
|
159
|
-
```json
|
|
160
|
-
{
|
|
161
|
-
"meta": {
|
|
162
|
-
"name": "<deck title from _temp/presentation-outline.md verbatim>"
|
|
163
|
-
},
|
|
164
|
-
"nodes": [ ... ],
|
|
165
|
-
"edges": [ ... ]
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
4. Run the validator script using Bash. This is a Python script — you must execute it, not read it. Reading the JSON file is not validation.
|
|
170
|
-
|
|
171
|
-
The script is bundled with the plugin. Find it and run it:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
VALIDATE=$(find -L .claude ~/.claude -path "*/presentation-generator/scripts/validate_draft.py" 2>/dev/null | head -1)
|
|
175
|
-
python3 "$VALIDATE" presentations/{slug}/{slug}.json
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
The script prints either `OK Presentation JSON is valid` (exit 0) or a list of `ERROR` lines (exit 1).
|
|
179
|
-
|
|
180
|
-
If there are any `ERROR` lines:
|
|
181
|
-
- Fix every error directly in the JSON file
|
|
182
|
-
- Run the script again against the same file
|
|
183
|
-
- Repeat until the script prints `OK Presentation JSON is valid`
|
|
184
|
-
|
|
185
|
-
**Your completion message must include the exact terminal output of the script.** A Read tool call on the JSON file is not validation and does not count. If the script output is not shown, the task is not complete.
|
|
186
|
-
|
|
187
|
-
After a clean validation pass, output a summary listing:
|
|
188
|
-
- Output path (e.g. `presentations/calora-investor-pitch/calora-investor-pitch.json`)
|
|
189
|
-
- Total node count
|
|
190
|
-
- Total edge count
|
|
191
|
-
- Any slides with video placeholders requiring manual upload
|