@ztffn/presentation-generator-plugin 1.3.5 → 1.3.6

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.5",
4
+ "version": "1.3.6",
5
5
  "author": {
6
6
  "name": "Huma"
7
7
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztffn/presentation-generator-plugin",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "description": "Claude Code plugin for generating graph-based presentations",
5
5
  "bin": {
6
6
  "presentation-generator-plugin": "bin/index.js"
@@ -48,12 +48,12 @@ Store `PLUGIN_ROOT` for all subsequent phases. All skill files, scripts, and age
48
48
 
49
49
  ## Phase 1 — Context Gathering
50
50
 
51
- Parse the user's request to identify:
51
+ Parse the user's request to extract these four fields. Do NOT read or open any files — just note the paths as strings:
52
52
 
53
53
  1. **What** is being presented (product, project, topic)
54
54
  2. **To whom** (audience type, their background, what they care about)
55
55
  3. **For what goal** (`pitch`, `demo`, `update`, `internal`, `exploratory`)
56
- 4. **Source documents** — paths to files the user wants to draw from
56
+ 4. **Source documents** — file paths mentioned in the request (pass these to the content agent in Phase 2, do not read them yourself)
57
57
 
58
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
59
  - If audience is unclear, ask who the presentation is for
@@ -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