@ztffn/presentation-generator-plugin 1.3.6 → 1.3.8

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,11 +1,10 @@
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.6",
4
+ "version": "1.3.8",
5
5
  "author": {
6
6
  "name": "Huma"
7
7
  },
8
8
  "homepage": "https://github.com/huma/humashowcase",
9
- "keywords": ["presentation", "slides", "react-flow", "graph", "pitch deck"],
10
- "hooks": "./hooks/hooks.json"
9
+ "keywords": ["presentation", "slides", "react-flow", "graph", "pitch deck"]
11
10
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztffn/presentation-generator-plugin",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "Claude Code plugin for generating graph-based presentations",
5
5
  "bin": {
6
6
  "presentation-generator-plugin": "bin/index.js"
@@ -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
- Orchestrates a two-agent + script pipeline to produce a complete, navigable presentation graph JSON from a user brief and optional source documents.
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
- ## Pipeline Overview
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 0Locate Plugin Root
16
+ ## Phase 1Setup
33
17
 
34
- Before any other phase, resolve the plugin root directory. Check the local project path first, then the global path:
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=".claude/plugins/presentation-generator"
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="$HOME/.claude/plugins/presentation-generator"
24
+ echo "PLUGIN_ROOT=$HOME/.claude/plugins/presentation-generator"
41
25
  else
42
- echo "ERROR: presentation-generator-plugin not found" && exit 1
26
+ echo "ERROR: plugin not found"
43
27
  fi
44
- echo "Plugin root: $PLUGIN_ROOT"
45
28
  ```
46
29
 
47
- Store `PLUGIN_ROOT` for all subsequent phases. All skill files, scripts, and agent references use this path.
48
-
49
- ## Phase 1 — Context Gathering
30
+ Save the PLUGIN_ROOT value. You need it for every later phase.
50
31
 
51
- Parse the user's request to extract these four fields. Do NOT read or open any files — just note the paths as strings:
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
- 1. **What** is being presented (product, project, topic)
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** — file paths mentioned in the request (pass these to the content agent in Phase 2, do not read them yourself)
39
+ If AUDIENCE or GOAL is unclear, ask the user. Then proceed.
57
40
 
58
- If no documents are provided, skip Phase 2 and construct a minimal content brief directly from the prompt. Ask the user for any missing critical information:
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
- Delegate content extraction to the specialist agent using the Task tool:
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
- Step 2: Read these source documents and extract a structured content brief:
49
+ - subagent_type: `presentation-content`
50
+ - description: `Extract content brief`
51
+ - prompt: (copy this template, fill in the bracketed values)
77
52
 
78
- Documents:
79
- - [list each file path from Phase 1]
53
+ ```
54
+ Read this skill file first: {PLUGIN_ROOT}/skills/content-signals/SKILL.md
80
55
 
81
- Audience: [audience identified in Phase 1]
82
- Goal: [goal identified in Phase 1]
56
+ Then read these documents:
57
+ - {DOC_PATH_1}
58
+ - {DOC_PATH_2}
83
59
 
84
- Step 3: Write the result as JSON to _temp/presentation-content-brief.json
60
+ Audience: {AUDIENCE}
61
+ Goal: {GOAL}
85
62
 
86
- Step 4: Report back with the number of key messages, data points,
87
- and any fields marked "NOT FOUND IN SOURCE".
63
+ Write a JSON content brief to _temp/presentation-content-brief.json
64
+ Report back what you extracted.
88
65
  ```
89
66
 
90
- The content agent reads all source documents and writes a structured content brief.
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
- 1. **`keyMessages`** contains 3-5 declarative claims (subject + verb + specific claim), not topic labels
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
- 2. **`dataPoints`** contains at least one entry with a specific number in `value`
101
- - BAD: `{ "value": "significant" }`
102
- - GOOD: `{ "value": "40%", "source": "Field trial, Oslo 2024" }`
71
+ ---
103
72
 
104
- 3. **`callToAction`** is a single actionable sentence with an action verb
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
- If any check fails, ask the user ONE targeted question to fill the gap. Do not pass a weak brief to the narrative agent.
75
+ Say: **"Phase 3 Designing narrative structure"**
109
76
 
110
- ## Phase 3 Narrative Design
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
- Delegate narrative design to the specialist agent using the Task tool:
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
- Task tool:
117
- subagent_type: "presentation-narrative"
118
- description: "Design narrative outline"
119
- prompt: |
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
- Step 2: Read the content brief at _temp/presentation-content-brief.json
89
+ Read the content brief at _temp/presentation-content-brief.json
126
90
 
127
- Step 3: Design the narrative structure for this presentation.
128
- Audience: [audience from Phase 1]
129
- Goal: [goal from Phase 1]
91
+ Audience: {AUDIENCE}
92
+ Goal: {GOAL}
130
93
 
131
- Step 4: Write the result as MARKDOWN to _temp/presentation-outline.md
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
- The narrative agent selects a story framework, designs the spine and drill-down structure, and writes a detailed slide outline.
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
- Read `_temp/presentation-outline.md` and render it as a folder tree for the user:
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: [headline]
146
- Problem: [headline]
147
- └─ Detail: [headline]
148
- └─ Root Cause: [headline]
149
- Solution: [headline]
150
- └─ How It Works: [headline]
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
- **Rules:**
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
- Write the tree to `_temp/presentation-plan.md` and present it in the chat.
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
- This loop continues until the user explicitly approves.
121
+ ## Phase 5 Graph Generation (script)
169
122
 
170
- ## Phase 5AGraph Generation (script)
171
- Announce to the user that you are **Executing Phase 5A — Generating Graph JSON from Outline**
123
+ Say: **"Phase 5Generating graph JSON"**
172
124
 
173
- Run the deterministic outline-to-graph converter directly via Bash:
125
+ Run this bash command:
174
126
 
175
127
  ```bash
176
- python3 "$PLUGIN_ROOT/scripts/outline_to_graph.py" _temp/presentation-outline.md -o presentations/{slug}/{slug}.json
128
+ python3 "{PLUGIN_ROOT}/scripts/outline_to_graph.py" _temp/presentation-outline.md -o "presentations/{SLUG}/{SLUG}.json"
177
129
  ```
178
130
 
179
- The script:
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
- If exit non-zero, review the errors and fix the outline. If zero, proceed to Phase 5B.
133
+ ---
187
134
 
188
- ## Phase 5B — Visual Styling (agent)
189
- Announce to the user that you are **Executing Phase 5B — Subagent: Visual Styling**
135
+ ## Phase 6 — Visual Styling
190
136
 
191
- Delegate visual styling to the specialist agent using the Task tool:
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
- Step 2: Read the structurally valid presentation JSON at
203
- presentations/{slug}/{slug}.json
141
+ - subagent_type: `presentation-style`
142
+ - description: `Apply visual treatments`
143
+ - prompt: (copy this template, fill in the bracketed values)
204
144
 
205
- Step 3: Read the outline at _temp/presentation-outline.md for context
206
- on each slide's purpose and visual intent.
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
- Step 4: Apply visual treatments to each slide based on the slide-recipes
209
- Visual Intent Mapping. Edit only data fields using the Edit tool.
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
- Step 5: Run the validator script and fix any errors:
213
- python3 "{PLUGIN_ROOT}/scripts/validate_draft.py" presentations/{slug}/{slug}.json
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
- Step 6: Report back with the exact validator terminal output,
216
- number of slides styled, and any video/image placeholders.
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
- The styling agent reads the valid JSON and applies visual treatments (two-column layouts, centered slides, background images, charts) by editing only `data` fields. It cannot break structure.
162
+ When the agent finishes, move to Phase 7.
220
163
 
221
- ## Phase 6 — Delivery
222
- Announce to the user that you are **Executing Phase 6 — Packaging Presentation**
164
+ ---
223
165
 
224
- After `presentations/{slug}/{slug}.json` is written:
166
+ ## Phase 7 — Delivery
225
167
 
226
- 1. Copy the three intermediate files into the presentation folder so everything is self-contained:
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
- 2. Confirm the output path and provide import instructions:
170
+ Copy intermediate files:
232
171
 
233
- ```
234
- Import your presentation:
235
- 1. Open the graph editor at https://humagreenfield.netlify.app/present/plan
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
- 3. If any slides have video placeholders, list them:
177
+ Then tell the user:
244
178
 
245
179
  ```
246
- Slides requiring manual video upload:
247
- - "[Slide Title]" — [description of needed video]
180
+ Your presentation is at: presentations/{SLUG}/{SLUG}.json
248
181
 
249
- Upload path: POST /api/slide-images/upload
250
- Accepted: image/*, video/mp4, video/webm, video/quicktime (max 50MB)
251
- Replace the PLACEHOLDER string with the returned URL after upload.
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 |