@ztffn/presentation-generator-plugin 1.3.0 → 1.3.2

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. Includes a three-agent pipeline: content extraction, narrative design, and graph JSON compilation.",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "author": {
6
6
  "name": "Huma"
7
7
  },
@@ -10,23 +10,47 @@ skills:
10
10
 
11
11
  You are a content extraction specialist. Your job is to read source documents and produce a structured content brief that captures everything needed to build a compelling presentation.
12
12
 
13
- ## Your Process
13
+ ## Process — follow these steps in order
14
14
 
15
- 1. Read all document paths provided to you
16
- 2. Apply the content signal guidance from your pre-injected skill to identify what is presentation-worthy
17
- 3. Populate every field of the content brief schema with specific, concrete entries
18
- 4. Write the result to `_temp/presentation-content-brief.json`
15
+ ### Step 1 Load your skill files
19
16
 
20
- ## Rules
17
+ Read this file before doing anything else:
18
+ - Find and read the file matching `**/presentation-generator/skills/content-signals/SKILL.md`
21
19
 
22
- - Extract strong, specific entries for every field. Weak or vague entries (e.g. "saves money", "good technology") are unacceptable.
20
+ This file defines the content brief schema, signal priorities, validation rules, and strong/weak examples. You must follow it exactly.
21
+
22
+ ### Step 2 — Read all source documents
23
+
24
+ Read every document path provided in the prompt. Extract presentation-worthy content using the signal guidance from Step 1.
25
+
26
+ ### Step 3 — Populate the content brief
27
+
28
+ Build a JSON object conforming to the content brief schema from your content-signals skill. Every field must have specific, concrete entries.
29
+
30
+ Rules:
23
31
  - `keyMessages` must be declarative sentences with subject + verb + specific claim
24
- - `dataPoints` must contain at least one entry with a concrete number
32
+ - `dataPoints` must contain at least one entry with a concrete number in `value`
25
33
  - `callToAction` must be a single sentence with an action verb
26
34
  - Never include layout, design, slide type, or visual treatment in the brief
27
35
  - Never invent data — only extract what the documents contain. If a field cannot be populated from the source material, note it as `"NOT FOUND IN SOURCE — ask user"`
28
36
  - When multiple documents conflict, prefer the most recent or most authoritative source
29
37
 
30
- ## Output
38
+ ### Step 4 — Validate the brief
39
+
40
+ Before writing, verify:
41
+ 1. `keyMessages` contains 3-5 declarative claims (not topic labels)
42
+ 2. `dataPoints` has at least one entry with a specific number
43
+ 3. `callToAction` is a single actionable sentence
44
+ 4. No field contains layout, design, or slide-type references
45
+
46
+ ### Step 5 — Write output
47
+
48
+ Write the JSON to `_temp/presentation-content-brief.json`.
49
+
50
+ ### Step 6 — Report to orchestrator
31
51
 
32
- Write a single JSON file to `_temp/presentation-content-brief.json` conforming to the content brief schema defined in your content-signals skill.
52
+ Return a summary listing:
53
+ - Number of key messages extracted
54
+ - Number of data points extracted
55
+ - Any fields marked as `"NOT FOUND IN SOURCE — ask user"`
56
+ - Any gaps or weak areas the orchestrator should address before proceeding
@@ -10,17 +10,52 @@ skills:
10
10
 
11
11
  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.
12
12
 
13
- ## Your Process
14
-
15
- 1. Read the approved outline from `_temp/presentation-outline.md`
16
- 2. For each slide in the outline, make three categories of decision:
17
- a. **Slide type and layout**: Based on content signals, select `type`, `layout`, `centered`, and related fields per the graph-json-spec skill
18
- b. **Visual treatment**: Set background media, `lightText`, branding flags, and chart configuration
19
- c. **Positioning**: Place each node on the 240px/150px grid
20
- 3. Build all nodes with complete `data`, `style`, and `measured` objects
21
- 4. Wire all edges with bidirectional pairs per the edge wiring rules
22
- 5. Run the edge validation checklist before finalizing
23
- 6. Write the complete JSON to `_temp/presentation-draft.json`
13
+ ## Process — follow these steps in order
14
+
15
+ ### Step 1 Load your skill file
16
+
17
+ Read this file before doing anything else:
18
+ - Find and read the file matching `**/presentation-generator/skills/graph-json-spec/SKILL.md`
19
+
20
+ This file defines the complete JSON schema — node structure, allowed data fields, banned field names, edge wiring with handle IDs, positioning grid, visual intent mapping, and slide recipes. You must follow it exactly.
21
+
22
+ ### Step 2 Read the approved outline
23
+
24
+ Read `_temp/presentation-outline.md`. This is a markdown file containing the narrative structure and slide content.
25
+
26
+ ### Step 3 — Build the presentation JSON
27
+
28
+ For each slide in the outline, make three categories of decision:
29
+ a. **Slide type and layout**: Based on content signals, select `type`, `layout`, `centered`, and related fields per the graph-json-spec skill
30
+ b. **Visual treatment**: Set background media, `lightText`, branding flags, and chart configuration
31
+ c. **Positioning**: Place each node on the 240px/150px grid
32
+
33
+ Build all nodes with complete `data`, `style`, and `measured` objects. Wire all edges with bidirectional pairs per the edge wiring rules.
34
+
35
+ ### Step 4 — Write the JSON
36
+
37
+ 1. Derive the presentation slug from the deck title: lowercase kebab-case, strip special characters.
38
+ 2. Create the directory `presentations/{slug}/` if it does not exist.
39
+ 3. Write the JSON to `presentations/{slug}/{slug}.json`.
40
+
41
+ ### Step 5 — Run the validator
42
+
43
+ Run the validator script using Bash — do not skip this step:
44
+
45
+ ```bash
46
+ VALIDATE=$(find -L .claude ~/.claude -path "*/presentation-generator/scripts/validate_draft.py" 2>/dev/null | head -1)
47
+ python3 "$VALIDATE" presentations/{slug}/{slug}.json
48
+ ```
49
+
50
+ 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`.
51
+
52
+ ### Step 6 — Report to orchestrator
53
+
54
+ Your completion message must include:
55
+ - The exact terminal output of the validator script (a Read of the JSON file does not count as validation)
56
+ - Output path
57
+ - Total node count and edge count
58
+ - Any slides with video placeholders requiring manual upload
24
59
 
25
60
  ## Field Mapping
26
61
 
@@ -12,14 +12,35 @@ skills:
12
12
 
13
13
  You are a narrative design specialist. Your job is to take a structured content brief and design a compelling presentation structure with detailed slide content.
14
14
 
15
- ## Your Process
16
-
17
- 1. Read the content brief from `_temp/presentation-content-brief.json`
18
- 2. Based on `goal` and `audience`, select the appropriate narrative framework from your pre-injected frameworks skill
19
- 3. Design the spine (main horizontal flow) of 4-7 nodes
20
- 4. Design drill-down branches where content warrants optional depth
21
- 5. Write detailed content for each slide following the quality guidance in your slide-content skill
22
- 6. Write the result to `_temp/presentation-outline.md`
15
+ ## Process — follow these steps in order
16
+
17
+ ### Step 1 Load your skill files
18
+
19
+ Read these three files before doing anything else:
20
+ - Find and read the file matching `**/presentation-generator/skills/frameworks/SKILL.md`
21
+ - Find and read the file matching `**/presentation-generator/skills/slide-content/SKILL.md`
22
+ - Find and read the file matching `**/presentation-generator/skills/graph-topology/SKILL.md`
23
+
24
+ These files define framework selection logic, slide content quality rules, visual intent annotations, and topology patterns. You must follow them exactly.
25
+
26
+ ### Step 2 — Read the content brief
27
+
28
+ Read `_temp/presentation-content-brief.json`. Note any weak or missing fields.
29
+
30
+ ### Step 3 — Select framework, design structure, write slide content
31
+
32
+ Based on `goal` and `audience`, select the appropriate narrative framework from your frameworks skill. Then:
33
+ 1. Design the spine (main horizontal flow) of 4-7 nodes
34
+ 2. Design drill-down branches where content warrants optional depth
35
+ 3. Write detailed content for each slide following the quality guidance in your slide-content skill
36
+
37
+ ### Step 4 — Write output as MARKDOWN
38
+
39
+ Write the result to `_temp/presentation-outline.md` — this must be a markdown file, NOT JSON.
40
+
41
+ ### Step 5 — Report to orchestrator
42
+
43
+ Return a summary: framework selected, spine node count, drill-down node count, and any content brief gaps that need user input.
23
44
 
24
45
  ## Output Format
25
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztffn/presentation-generator-plugin",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Claude Code plugin for generating graph-based presentations",
5
5
  "bin": {
6
6
  "presentation-generator-plugin": "bin/index.js"
@@ -49,7 +49,11 @@ Task tool:
49
49
  subagent_type: "presentation-content"
50
50
  description: "Extract content brief"
51
51
  prompt: |
52
- Read these source documents and extract a structured content brief:
52
+ Step 1: Load your skill file. Find and read the file matching
53
+ **/presentation-generator/skills/content-signals/SKILL.md
54
+ — it defines the content brief schema, signal priorities, and validation rules.
55
+
56
+ Step 2: Read these source documents and extract a structured content brief:
53
57
 
54
58
  Documents:
55
59
  - [list each file path from Phase 1]
@@ -57,7 +61,10 @@ Task tool:
57
61
  Audience: [audience identified in Phase 1]
58
62
  Goal: [goal identified in Phase 1]
59
63
 
60
- Write the result to _temp/presentation-content-brief.json
64
+ Step 3: Write the result as JSON to _temp/presentation-content-brief.json
65
+
66
+ Step 4: Report back with the number of key messages, data points,
67
+ and any fields marked "NOT FOUND IN SOURCE".
61
68
  ```
62
69
 
63
70
  The content agent reads all source documents and writes a structured content brief.
@@ -89,13 +96,21 @@ Task tool:
89
96
  subagent_type: "presentation-narrative"
90
97
  description: "Design narrative outline"
91
98
  prompt: |
92
- Read the content brief at _temp/presentation-content-brief.json and design
93
- the narrative structure for this presentation.
99
+ Step 1: Load your skill files. Find and read these three files:
100
+ - **/presentation-generator/skills/frameworks/SKILL.md
101
+ - **/presentation-generator/skills/slide-content/SKILL.md
102
+ - **/presentation-generator/skills/graph-topology/SKILL.md
94
103
 
104
+ Step 2: Read the content brief at _temp/presentation-content-brief.json
105
+
106
+ Step 3: Design the narrative structure for this presentation.
95
107
  Audience: [audience from Phase 1]
96
108
  Goal: [goal from Phase 1]
97
109
 
98
- Write the result to _temp/presentation-outline.md
110
+ Step 4: Write the result as MARKDOWN to _temp/presentation-outline.md
111
+
112
+ Step 5: Report back with framework selected, spine node count,
113
+ drill-down node count, and any content brief gaps.
99
114
  ```
100
115
 
101
116
  The narrative agent selects a story framework, designs the spine and drill-down structure, and writes a detailed slide outline.
@@ -139,14 +154,24 @@ Task tool:
139
154
  subagent_type: "presentation-design"
140
155
  description: "Generate presentation JSON"
141
156
  prompt: |
142
- Read the approved outline at _temp/presentation-outline.md and translate it
143
- into a complete presentation graph JSON.
157
+ Step 1: Load your skill file. Find and read the file matching
158
+ **/presentation-generator/skills/graph-json-spec/SKILL.md
159
+ — it defines the complete JSON schema, allowed fields, banned fields,
160
+ edge wiring, handle IDs, and positioning grid.
144
161
 
162
+ Step 2: Read the approved outline at _temp/presentation-outline.md
163
+
164
+ Step 3: Translate the outline into a complete presentation graph JSON.
145
165
  Presentation slug: {slug}
146
- Output path: presentations/{slug}/{slug}.json
147
166
 
148
- After writing the JSON, run the validator script and fix any errors until
149
- it passes. Include the validator terminal output in your completion message.
167
+ Step 4: Write the JSON to presentations/{slug}/{slug}.json
168
+
169
+ Step 5: Run the validator script and fix any errors until it passes:
170
+ VALIDATE=$(find -L .claude ~/.claude -path "*/presentation-generator/scripts/validate_draft.py" 2>/dev/null | head -1)
171
+ python3 "$VALIDATE" presentations/{slug}/{slug}.json
172
+
173
+ Step 6: Report back with the exact validator terminal output,
174
+ output path, node count, edge count, and any video placeholders.
150
175
  ```
151
176
 
152
177
  The design agent translates each slide into a fully specified graph node, wires all edges with bidirectional pairs, and validates the result.
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "WebFetch(domain:support.claude.com)",
5
- "WebFetch(domain:github.com)",
6
- "WebFetch(domain:raw.githubusercontent.com)"
7
- ]
8
- }
9
- }
@@ -1,61 +0,0 @@
1
- name: Publish
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v*"
7
-
8
- jobs:
9
- publish-npm:
10
- name: Publish to npm
11
- runs-on: ubuntu-latest
12
- permissions:
13
- contents: read
14
- id-token: write
15
- steps:
16
- - uses: actions/checkout@v4
17
-
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: "20"
21
- registry-url: "https://registry.npmjs.org"
22
-
23
- - run: npm publish --access public
24
- env:
25
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26
-
27
- release-zip:
28
- name: Create GitHub Release with zip
29
- runs-on: ubuntu-latest
30
- permissions:
31
- contents: write
32
- steps:
33
- - uses: actions/checkout@v4
34
-
35
- - name: Build zip
36
- run: |
37
- VERSION=${GITHUB_REF_NAME}
38
- ZIP_NAME="presentation-generator-plugin-${VERSION}.zip"
39
- zip -r "$ZIP_NAME" . \
40
- --exclude "*.git*" \
41
- --exclude ".github/*" \
42
- --exclude "node_modules/*"
43
- echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
44
-
45
- - name: Create GitHub Release
46
- uses: softprops/action-gh-release@v2
47
- with:
48
- name: ${{ github.ref_name }}
49
- body: |
50
- ## Install via zip (non-technical)
51
-
52
- 1. Download `${{ env.ZIP_NAME }}` below
53
- 2. Unzip it anywhere on your machine
54
- 3. In Claude Code, run: `claude --plugin-dir /path/to/presentation-generator-plugin`
55
-
56
- ## Install via npx (developers)
57
-
58
- ```bash
59
- npx @ztffn/presentation-generator-plugin install
60
- ```
61
- files: ${{ env.ZIP_NAME }}
package/CONTEXT.md DELETED
@@ -1,110 +0,0 @@
1
- # Context: Presentation Generator Plugin
2
-
3
- ## What this plugin is
4
-
5
- A Claude Code plugin (`@ztffn/presentation-generator-plugin`) that generates graph-based presentation JSON for the Huma Showcase renderer. It uses a three-agent pipeline:
6
-
7
- 1. **presentation-content** — reads source documents, produces `_temp/presentation-content-brief.json`
8
- 2. **presentation-narrative** — reads the brief, produces `_temp/presentation-outline.md` (story structure, slide content)
9
- 3. **presentation-design** — reads the outline, produces `presentations/{slug}/{slug}.json` (graph JSON with nodes, edges, positions)
10
-
11
- The orchestrator skill (`skills/presentation-generator/SKILL.md`) spawns each agent via the Task tool.
12
-
13
- ## Repository layout
14
-
15
- ```
16
- presentation-generator-plugin/
17
- ├── .claude-plugin/plugin.json # Plugin manifest (v1.3.0)
18
- ├── package.json # npm package (v1.3.0)
19
- ├── bin/index.js # Installer script
20
- ├── agents/
21
- │ ├── presentation-content.md # Agent 1: content extraction
22
- │ ├── presentation-narrative.md # Agent 2: narrative design
23
- │ └── presentation-design.md # Agent 3: JSON generation
24
- ├── skills/
25
- │ ├── presentation-generator/ # Orchestrator skill
26
- │ │ ├── SKILL.md
27
- │ │ └── presentation-guide.md # Generic presentation craft guide
28
- │ ├── content-signals/SKILL.md # Content brief schema + extraction patterns
29
- │ ├── frameworks/SKILL.md # 5 narrative frameworks (PSV, BAB, etc.)
30
- │ ├── slide-content/SKILL.md # Slide writing quality rules
31
- │ ├── graph-topology/SKILL.md # Spine/drill-down structure patterns
32
- │ └── graph-json-spec/SKILL.md # Complete graph JSON spec (node schema, edges, positioning, layouts, recipes, reference example)
33
- └── scripts/
34
- └── validate_draft.py # Validates generated JSON
35
- ```
36
-
37
- ## How skills reach agents
38
-
39
- Each agent file has a `skills:` frontmatter listing plugin-namespaced skill references:
40
-
41
- ```yaml
42
- # agents/presentation-design.md
43
- skills:
44
- - presentation-generator:graph-json-spec
45
- ```
46
-
47
- Per Claude Code docs, the full content of each listed skill should be injected into the sub-agent's context at startup. The agent's markdown body (below the frontmatter) becomes the system prompt. The `prompt` field from the Task tool call becomes the user message.
48
-
49
- ## Resilience: self-sufficient agents
50
-
51
- Because `skills:` injection has proven unreliable, each agent's markdown body now contains the critical subset of its skill content inlined directly. The design agent body includes: valid enum values, positioning grid, chart config structure, and a reference node example. This means the agent produces correct JSON even when skill injection fails entirely.
52
-
53
- ## The three agent responsibilities (DO NOT MIX)
54
-
55
- ### presentation-content
56
- - **Input:** Source document paths, audience, goal
57
- - **Output:** `_temp/presentation-content-brief.json`
58
- - **Knows about:** Content extraction patterns, brief schema, what makes content presentation-worthy
59
- - **Does NOT know about:** Narrative frameworks, slide design, JSON format, node schema, edges
60
-
61
- ### presentation-narrative
62
- - **Input:** Content brief
63
- - **Output:** `_temp/presentation-outline.md`
64
- - **Knows about:** Story frameworks (PSV, BAB, etc.), graph topology (spine/drill-down), slide content quality (headlines, assertion-evidence, speaker notes)
65
- - **Does NOT know about:** JSON format, node schema fields, edge handles, positioning grid, layout/type values
66
-
67
- ### presentation-design
68
- - **Input:** Approved outline
69
- - **Output:** `presentations/{slug}/{slug}.json`
70
- - **Knows about:** Node schema (SlideNodeData fields), edge conventions (handle IDs), positioning grid, layout templates (type/layout decisions), slide recipes
71
- - **Does NOT know about:** Story frameworks, content extraction, audience analysis
72
-
73
- ## The renderer (authoritative, do not modify)
74
-
75
- Lives at `/Users/steffen/Projects/huma/humashowcase`. Key types from `src/types/presentation.ts`:
76
-
77
- ### SlideNodeData allowed fields
78
- `label`, `topic`, `content`, `notes`, `type`, `centered`, `layout`, `lightText`, `brandFont`, `showBranding`, `brandingText`, `backgroundImage`, `backgroundImageFit`, `backgroundImageOverlay`, `backgroundVideo`, `backgroundVideoFit`, `backgroundVideoLoop`, `inlineVideoControls`, `inlineVideoAutoplay`, `inlineVideoLoop`, `scene`, `chart`, `charts`, `sceneGroup`, `focus`
79
-
80
- ### Valid enums
81
- - `data.type`: `"content"` | `"r3f"` | `"chart"` | `"custom"` (default: `"content"`)
82
- - `data.layout`: `"single"` | `"two-column"` (default: `"single"`)
83
-
84
- ### Correct node structure
85
- ```json
86
- {
87
- "id": "kebab-case-slug",
88
- "type": "huma",
89
- "position": { "x": 240, "y": 0 },
90
- "data": {
91
- "label": "Slide title goes here",
92
- "content": "## Markdown body\n\n- Bullet points\n- More content",
93
- "notes": "Speaker notes go here",
94
- "centered": false
95
- },
96
- "style": { "width": 180, "height": 70 },
97
- "measured": { "width": 180, "height": 70 }
98
- }
99
- ```
100
-
101
- ### Correct edge structure
102
- ```json
103
- { "id": "e-a-b", "source": "a", "target": "b", "sourceHandle": "s-right", "targetHandle": "t-left" }
104
- { "id": "e-b-a", "source": "b", "target": "a", "sourceHandle": "s-left", "targetHandle": "t-right" }
105
- ```
106
-
107
- ### Positioning grid
108
- - Horizontal spacing: 240px
109
- - Vertical spacing: 150px
110
- - Node size: always 180x70
package/HANDOFF.md DELETED
@@ -1,49 +0,0 @@
1
- # Handoff: Presentation Generator Plugin v1.3.0
2
-
3
- ## Current state
4
-
5
- The plugin generates correct graph JSON. The design agent is resilient to skills injection failure because critical rules (enums, grid, chart config, reference node) are inlined in its body.
6
-
7
- ## Architecture
8
-
9
- Three-agent pipeline orchestrated by `skills/presentation-generator/SKILL.md`:
10
-
11
- | Agent | Skills | Purpose |
12
- |---|---|---|
13
- | `presentation-content` | `content-signals` | Extract structured brief from documents |
14
- | `presentation-narrative` | `frameworks`, `slide-content`, `graph-topology` | Design story structure and slide content |
15
- | `presentation-design` | `graph-json-spec` | Translate outline to valid graph JSON |
16
-
17
- ## Key files
18
-
19
- | File | Purpose |
20
- |---|---|
21
- | `skills/graph-json-spec/SKILL.md` | Complete graph JSON specification — node schema, edges, positioning, layouts, recipes, reference example |
22
- | `agents/presentation-design.md` | Design agent with inlined critical rules as fallback |
23
- | `scripts/validate_draft.py` | Validates generated JSON against renderer types |
24
-
25
- ## Known past failures (resolved)
26
-
27
- 1. **Skills injection failure** — agent invented its own schema (wrong field names, wrong enums, wrong spacing). Fixed by inlining critical rules into the agent body.
28
- 2. **Fragmented skills** — 5 separate skills (`node-schema`, `edge-conventions`, `layout-templates`, `positioning`, `pitch-reference`) all had to inject correctly. Consolidated into single `graph-json-spec` skill.
29
- 3. **Wrong field names** — `title`/`subtitle`/`bullets` instead of `label`/`content`/`notes`. Banned field list is in both the agent body and the consolidated skill.
30
- 4. **Bare edge handles** — `right`/`left` instead of `s-right`/`t-left`. Handle rules are in both the agent body and the consolidated skill.
31
- 5. **Missing `measured` field** — validator now enforces this.
32
-
33
- ## The renderer (do not modify)
34
-
35
- Lives at `/Users/steffen/Projects/huma/humashowcase`. The renderer is authoritative — the plugin must match it. Key source of truth: `src/types/presentation.ts` (`SlideNodeData` interface).
36
-
37
- ## Validation
38
-
39
- Run against any generated JSON:
40
-
41
- ```bash
42
- python3 scripts/validate_draft.py presentations/{slug}/{slug}.json
43
- ```
44
-
45
- Or against the reference demo:
46
-
47
- ```bash
48
- python3 scripts/validate_draft.py "/Users/steffen/Downloads/presentation-demo-2(1).json"
49
- ```
@@ -1,238 +0,0 @@
1
- # Plan: Consolidate Design Agent Skills
2
-
3
- ## Objective
4
-
5
- Merge the 5 fragmented design-agent skills (`node-schema`, `edge-conventions`, `layout-templates`, `positioning`, `pitch-reference`) into a single consolidated skill AND inline its critical content into the `agents/presentation-design.md` body. The agent must produce correct JSON even when `skills:` injection fails entirely.
6
-
7
- ## Problem
8
-
9
- The design agent currently references 5 separate skills via frontmatter:
10
- ```yaml
11
- skills:
12
- - presentation-generator:node-schema
13
- - presentation-generator:edge-conventions
14
- - presentation-generator:layout-templates
15
- - presentation-generator:positioning
16
- - presentation-generator:pitch-reference
17
- ```
18
-
19
- Per Claude Code docs, `skills:` in subagent frontmatter should inject full skill content at startup. In practice, this injection fails — the agent invents its own schema (wrong field names, wrong enums, wrong spacing, bare handles). Five skills must ALL inject correctly; if even one fails, the output breaks.
20
-
21
- ## What to do
22
-
23
- ### Step 1: Create consolidated skill
24
-
25
- Create `skills/graph-json-spec/SKILL.md` — a single comprehensive skill containing everything the design agent needs. Merge content from all 5 skills into one coherent document, organized in the order the agent needs it during JSON generation.
26
-
27
- **Frontmatter:**
28
- ```yaml
29
- ---
30
- name: graph-json-spec
31
- description: >
32
- Complete specification for generating valid graph-based presentation JSON —
33
- node schema, edge wiring, positioning grid, layout decisions, and slide recipes.
34
- Used by the presentation-design agent.
35
- user-invocable: false
36
- ---
37
- ```
38
-
39
- **Document structure** (in this order):
40
-
41
- 1. **Quick Reference** — The essential rules on one screen. Field names, valid enums, grid values, handle IDs. This section alone should prevent the most common errors.
42
-
43
- 2. **Node Structure** — Merge from `node-schema`. Full node wrapper (`id`, `type: "huma"`, `position`, `data`, `style`, `measured`). All `SlideNodeData` fields with types and defaults. Keep the grouped tables (content fields, layout/display, background media, inline video, R3F scene, charts). Include the banned field names list from the current agent body.
44
-
45
- 3. **Edge Wiring** — Merge from `edge-conventions`. Handle ID table, bidirectional pair rule, standard edge pair patterns (spine, drill-down, sibling), edge ID convention, validation checklist.
46
-
47
- 4. **Positioning Grid** — Merge from `positioning`. Grid constants (240px/150px/180×70), spine row layout, drill-down row placement, sibling spacing, quick reference position table.
48
-
49
- 5. **Design Decisions** — Merge from `layout-templates`. Slide type selection, layout decisions (when two-column, when centered, when brand font, when branding), background treatment, text contrast, chart decisions (full-viewport vs inline, chart type selection), R3F scene decisions, topic badge conventions.
50
-
51
- 6. **Slide Recipes** — Merge from `layout-templates`. All 7 recipe patterns (cover/CTA, standard bullets, impact statement, two-column comparison, text+inline chart, proof point/customer quote, section opener with background image). These are complete `data` field examples the agent can pattern-match against.
52
-
53
- 7. **Complete Reference Example** — Merge from `pitch-reference`. The full 7-node JSON with all edges. But UPDATE it to match the validated demo at `/Users/steffen/Downloads/presentation-demo-2(1).json`. Key differences to adopt from the demo:
54
- - The demo uses `"meta": { "updatedAt": "..." }` — the plugin should use `"meta": { "name": "..." }` (per the current agent spec). Keep the plugin's `meta.name` convention.
55
- - Edge IDs: the demo uses short IDs like `"e1"`, `"e2"` for spine and descriptive IDs like `"e-prob-detail"` for drill-downs. Either convention is fine, but the reference should be consistent — use the descriptive `e-{source}-{target}` pattern throughout.
56
- - The demo has 20 nodes and 40 edges — it's a real-world example. Consider including a trimmed version (keep the 7-node pitch reference) but add 2-3 realistic patterns from the demo that the current pitch-reference doesn't cover:
57
- - A slide with `style.backgroundColor` set (the `feat-style` node uses `"backgroundColor": "#1a1a2e"`)
58
- - A drill-down with a second-level child (the demo has `feat-markdown` → `feat-tables` at y:300)
59
- - Sibling drill-downs connected horizontally (the demo has `feat-markdown` → `feat-charts` via `s-right`/`t-left`)
60
-
61
- 8. **Media Delivery Summary Format** — The template for listing placeholder media at the end of output.
62
-
63
- **Important content decisions:**
64
- - DO NOT include narrative frameworks, content extraction patterns, or audience analysis — those belong to other agents.
65
- - DO NOT include the presentation guide / playbook content — that's for the narrative agent.
66
- - DO include the content markdown features list from node-schema (the agent needs to know what markdown syntax works).
67
- - DO include chart config structure with the `config` wrapper (the demo JSON shows `config: { xKey, yKeys, showGrid, showLegend }` — not top-level `xKey`/`yKey`).
68
-
69
- ### Step 2: Update the design agent body
70
-
71
- Edit `agents/presentation-design.md` to inline the critical subset — the minimum needed for correct output even if skills injection fails completely. The agent body should contain:
72
-
73
- **Keep everything currently in the body** (field mapping table, banned fields, edge handle rules, node structure rules, output format, validator invocation).
74
-
75
- **Add these sections from the consolidated skill:**
76
-
77
- 1. **Valid Enums** — Add directly after the field mapping table:
78
- ```
79
- ## Valid Enum Values
80
-
81
- - `data.type`: `"content"` (default) | `"r3f"` | `"chart"` | `"custom"`
82
- - `data.layout`: `"single"` (default) | `"two-column"` (splits content on `---`)
83
- - `data.centered`: `true` (default) | `false`
84
- - `data.backgroundImageFit`: `"cover"` (default) | `"contain"`
85
- - `data.backgroundVideoFit`: `"cover"` (default) | `"contain"`
86
- ```
87
-
88
- 2. **Positioning Grid** — Add a compact version:
89
- ```
90
- ## Positioning Grid
91
-
92
- - Horizontal spacing: 240px between nodes
93
- - Vertical spacing: 150px between levels
94
- - Node size: always `{ width: 180, height: 70 }` in both `style` and `measured`
95
- - Spine: all at y:0, x increments by 240 (0, 240, 480, 720...)
96
- - Drill-down level 1: y:150, same x as parent
97
- - Drill-down level 2: y:300
98
- - Siblings at same depth: increment x by 240
99
- ```
100
-
101
- 3. **Chart Config Structure** — Add a compact example showing the `config` wrapper:
102
- ```
103
- ## Chart Config
104
-
105
- Charts use a `config` wrapper for axis and display settings:
106
- { "chartType": "bar", "data": [...], "config": { "xKey": "...", "yKeys": [...], "showGrid": true, "showLegend": true } }
107
-
108
- Inline: put in `charts` record, reference with `[chart:name]` in content.
109
- Full-viewport: put in `chart` field, set `type: "chart"`.
110
- ```
111
-
112
- 4. **Compact Reference Node** — One complete node example showing all common fields:
113
- ```json
114
- {
115
- "id": "problem",
116
- "type": "huma",
117
- "position": { "x": 240, "y": 0 },
118
- "data": {
119
- "label": "The Problem",
120
- "topic": "01 / Problem",
121
- "content": "## Linear tools break complex stories\n\n- Point one\n- Point two",
122
- "notes": "Speaker notes here",
123
- "centered": false
124
- },
125
- "style": { "width": 180, "height": 70 },
126
- "measured": { "width": 180, "height": 70 }
127
- }
128
- ```
129
-
130
- **Update the `skills:` frontmatter** to reference the single consolidated skill:
131
- ```yaml
132
- skills:
133
- - presentation-generator:graph-json-spec
134
- ```
135
-
136
- ### Step 3: Update the orchestrator
137
-
138
- Edit `skills/presentation-generator/SKILL.md` — update the Sub-Agent Reference table:
139
-
140
- ```
141
- | Agent | Skills Loaded | Purpose |
142
- |---|---|---|
143
- | `presentation-content` | `content-signals` | Extract structured brief from documents |
144
- | `presentation-narrative` | `frameworks`, `slide-content`, `graph-topology` | Design story structure and slide content |
145
- | `presentation-design` | `graph-json-spec` | Translate outline to valid graph JSON |
146
- ```
147
-
148
- ### Step 4: Delete the old skill directories
149
-
150
- Remove these 5 directories (they're fully superseded):
151
- - `skills/node-schema/`
152
- - `skills/edge-conventions/`
153
- - `skills/layout-templates/`
154
- - `skills/positioning/`
155
- - `skills/pitch-reference/`
156
-
157
- ### Step 5: Update validator awareness
158
-
159
- Read `scripts/validate_draft.py` and verify the consolidated skill's field lists match. The validator's `ALLOWED_DATA_FIELDS` set and handle sets must be consistent with what's documented in the skill. Current validator allows 24 data fields:
160
-
161
- ```python
162
- ALLOWED_DATA_FIELDS = {
163
- "label", "topic", "content", "notes", "type", "centered", "layout",
164
- "lightText", "brandFont", "showBranding", "brandingText",
165
- "backgroundImage", "backgroundImageFit", "backgroundImageOverlay",
166
- "backgroundVideo", "backgroundVideoFit", "backgroundVideoLoop",
167
- "inlineVideoControls", "inlineVideoAutoplay", "inlineVideoLoop",
168
- "scene", "chart", "charts", "sceneGroup", "focus"
169
- }
170
- ```
171
-
172
- The consolidated skill should list these same 24 fields. Cross-check against the demo JSON — the demo also uses `"selected": false` at the node level (not in `data`), which is fine (it's a React Flow runtime field, not part of `data`).
173
-
174
- Note: the demo JSON uses `meta.updatedAt` instead of `meta.name`. The validator checks for `meta.name` as non-empty. The consolidated skill should document that `meta.name` is required (the validator enforces it). The orchestrator can add `updatedAt` if desired but it's not checked.
175
-
176
- ### Step 6: Update package version
177
-
178
- Bump version in `package.json` and `.claude-plugin/plugin.json` from `1.2.0` to `1.3.0`.
179
-
180
- ### Step 7: Update CONTEXT.md and HANDOFF.md
181
-
182
- Update or remove the sections that describe the old fragmented skill structure. The new structure should be documented.
183
-
184
- ### Step 8: Update README.md
185
-
186
- The Plugin structure section at the bottom lists the old nested structure. Update to reflect the actual flat structure with the new consolidated skill.
187
-
188
- ## Files to create
189
-
190
- | File | Description |
191
- |---|---|
192
- | `skills/graph-json-spec/SKILL.md` | Consolidated design specification (merge of 5 skills) |
193
-
194
- ## Files to modify
195
-
196
- | File | Changes |
197
- |---|---|
198
- | `agents/presentation-design.md` | Inline critical rules (enums, grid, chart config, reference node). Change `skills:` to reference `graph-json-spec` only. |
199
- | `skills/presentation-generator/SKILL.md` | Update sub-agent reference table |
200
- | `package.json` | Bump to 1.3.0 |
201
- | `.claude-plugin/plugin.json` | Bump to 1.3.0 |
202
- | `README.md` | Update plugin structure diagram |
203
- | `CONTEXT.md` | Update to reflect new structure |
204
- | `HANDOFF.md` | Update to reflect new structure |
205
-
206
- ## Files to delete
207
-
208
- | File | Reason |
209
- |---|---|
210
- | `skills/node-schema/SKILL.md` | Merged into `graph-json-spec` |
211
- | `skills/edge-conventions/SKILL.md` | Merged into `graph-json-spec` |
212
- | `skills/layout-templates/SKILL.md` | Merged into `graph-json-spec` |
213
- | `skills/positioning/SKILL.md` | Merged into `graph-json-spec` |
214
- | `skills/pitch-reference/SKILL.md` | Merged into `graph-json-spec` |
215
-
216
- ## Validation criteria
217
-
218
- After implementation, verify:
219
-
220
- 1. `skills/graph-json-spec/SKILL.md` exists and contains all content from the 5 merged skills
221
- 2. `agents/presentation-design.md` body contains: valid enums, positioning grid values, chart config structure, and a reference node example
222
- 3. `agents/presentation-design.md` frontmatter references only `presentation-generator:graph-json-spec`
223
- 4. The 5 old skill directories are deleted
224
- 5. The validator still passes against the demo JSON:
225
- ```bash
226
- python3 scripts/validate_draft.py "/Users/steffen/Downloads/presentation-demo-2(1).json"
227
- ```
228
- 6. No narrative/content concepts leaked into the design skill (no framework names, no content extraction patterns, no audience analysis)
229
- 7. The chart config in the skill uses the `config` wrapper structure (matching the demo JSON), not bare `xKey`/`yKey`
230
-
231
- ## Reference files for the implementor
232
-
233
- These files contain the authoritative truth. Read them if anything is ambiguous:
234
-
235
- - **Valid demo JSON:** `/Users/steffen/Downloads/presentation-demo-2(1).json` — 20 nodes, 40 edges, all patterns
236
- - **Renderer types:** `/Users/steffen/Projects/huma/humashowcase/src/types/presentation.ts` — `SlideNodeData` interface
237
- - **Technical docs:** `/Users/steffen/Projects/huma/humashowcase/docs/technical/presentation-system-implementation.md`
238
- - **Validator:** `/Users/steffen/Projects/huma/presentation-generator-plugin/scripts/validate_draft.py`