@ztffn/presentation-generator-plugin 1.1.5 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +9 -0
- package/.claude-plugin/plugin.json +1 -1
- package/CONTEXT.md +110 -0
- package/HANDOFF.md +49 -0
- package/PLAN-consolidate-design-skills.md +238 -0
- package/README.md +15 -17
- package/agents/presentation-content.md +2 -4
- package/agents/presentation-design.md +56 -12
- package/agents/presentation-narrative.md +4 -6
- package/package.json +1 -1
- package/skills/{presentation-generator/narrative/content-signals.md → content-signals/SKILL.md} +5 -0
- package/skills/{presentation-generator/narrative/frameworks.md → frameworks/SKILL.md} +5 -0
- package/skills/graph-json-spec/SKILL.md +812 -0
- package/skills/{presentation-generator/narrative/graph-topology.md → graph-topology/SKILL.md} +5 -0
- package/skills/presentation-generator/SKILL.md +42 -15
- package/skills/{presentation-generator/narrative/slide-content.md → slide-content/SKILL.md} +50 -0
- package/skills/presentation-generator/examples/pitch-reference.json +0 -155
- package/skills/presentation-generator/system/edge-conventions.md +0 -92
- package/skills/presentation-generator/system/layout-templates.md +0 -310
- package/skills/presentation-generator/system/node-schema.md +0 -130
- package/skills/presentation-generator/system/positioning.md +0 -84
- /package/skills/presentation-generator/{examples/presentation-guide.md → presentation-guide.md} +0 -0
|
@@ -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.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Huma"
|
|
7
7
|
},
|
package/CONTEXT.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,238 @@
|
|
|
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`
|
package/README.md
CHANGED
|
@@ -133,27 +133,25 @@ Pushing the tag triggers the publish workflow. Team members get the update with
|
|
|
133
133
|
## Plugin structure
|
|
134
134
|
|
|
135
135
|
```
|
|
136
|
-
presentation-generator/
|
|
136
|
+
presentation-generator-plugin/
|
|
137
137
|
├── .claude-plugin/
|
|
138
138
|
│ └── plugin.json
|
|
139
|
+
├── package.json
|
|
140
|
+
├── bin/
|
|
141
|
+
│ └── index.js
|
|
139
142
|
├── agents/
|
|
140
143
|
│ ├── presentation-content.md
|
|
141
144
|
│ ├── presentation-narrative.md
|
|
142
145
|
│ └── presentation-design.md
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
│ ├── layout-templates.md
|
|
155
|
-
│ └── positioning.md
|
|
156
|
-
└── examples/
|
|
157
|
-
├── pitch-reference.json
|
|
158
|
-
└── presentation-guide.md
|
|
146
|
+
├── skills/
|
|
147
|
+
│ ├── presentation-generator/
|
|
148
|
+
│ │ ├── SKILL.md # Orchestrator skill
|
|
149
|
+
│ │ └── presentation-guide.md
|
|
150
|
+
│ ├── content-signals/SKILL.md # Content extraction patterns
|
|
151
|
+
│ ├── frameworks/SKILL.md # Narrative frameworks
|
|
152
|
+
│ ├── slide-content/SKILL.md # Slide writing quality
|
|
153
|
+
│ ├── graph-topology/SKILL.md # Spine/drill-down structure
|
|
154
|
+
│ └── graph-json-spec/SKILL.md # Complete graph JSON spec (design agent)
|
|
155
|
+
└── scripts/
|
|
156
|
+
└── validate_draft.py
|
|
159
157
|
```
|
|
@@ -1,11 +1,9 @@
|
|
|
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:
|
|
5
|
-
- Read
|
|
6
|
-
- Glob
|
|
4
|
+
tools: Read, Glob
|
|
7
5
|
skills:
|
|
8
|
-
- presentation-generator
|
|
6
|
+
- presentation-generator:content-signals
|
|
9
7
|
---
|
|
10
8
|
|
|
11
9
|
# Content Extraction Agent
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: presentation-design
|
|
3
3
|
description: Translates approved slide outlines into complete graph JSON with nodes, edges, positions, and visual treatments. Pure translation — never alters content or structure from the outline.
|
|
4
|
-
tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Write
|
|
7
|
-
- Bash
|
|
4
|
+
tools: Read, Write, Bash
|
|
8
5
|
skills:
|
|
9
|
-
- presentation-generator
|
|
10
|
-
- presentation-generator/system/edge-conventions
|
|
11
|
-
- presentation-generator/system/layout-templates
|
|
12
|
-
- presentation-generator/system/positioning
|
|
13
|
-
- presentation-generator/examples/pitch-reference
|
|
6
|
+
- presentation-generator:graph-json-spec
|
|
14
7
|
---
|
|
15
8
|
|
|
16
9
|
# Design & JSON Generation Agent
|
|
@@ -21,11 +14,11 @@ You are a design and JSON generation specialist. Your job is to translate an app
|
|
|
21
14
|
|
|
22
15
|
1. Read the approved outline from `_temp/presentation-outline.md`
|
|
23
16
|
2. For each slide in the outline, make three categories of decision:
|
|
24
|
-
a. **Slide type and layout**: Based on content signals, select `type`, `layout`, `centered`, and related fields
|
|
17
|
+
a. **Slide type and layout**: Based on content signals, select `type`, `layout`, `centered`, and related fields per the graph-json-spec skill
|
|
25
18
|
b. **Visual treatment**: Set background media, `lightText`, branding flags, and chart configuration
|
|
26
|
-
c. **Positioning**: Place each node on the grid
|
|
19
|
+
c. **Positioning**: Place each node on the 240px/150px grid
|
|
27
20
|
3. Build all nodes with complete `data`, `style`, and `measured` objects
|
|
28
|
-
4. Wire all edges with bidirectional pairs
|
|
21
|
+
4. Wire all edges with bidirectional pairs per the edge wiring rules
|
|
29
22
|
5. Run the edge validation checklist before finalizing
|
|
30
23
|
6. Write the complete JSON to `_temp/presentation-draft.json`
|
|
31
24
|
|
|
@@ -42,6 +35,57 @@ When translating from the outline to `data` fields, use **exactly** these SlideN
|
|
|
42
35
|
**DO NOT use these field names** — they are not part of the schema and will be silently ignored by the renderer:
|
|
43
36
|
`headline`, `subheadline`, `bullets`, `speakerNote`, `speakerNotes`, `visualHint`, `theme`, `title`, `body`, `text`, `background`, `showLogo`, `keyMessage`, `claim`, `hook`, `description`, `summary`
|
|
44
37
|
|
|
38
|
+
## Valid Enum Values
|
|
39
|
+
|
|
40
|
+
- `data.type`: `"content"` (default) | `"r3f"` | `"chart"` | `"custom"`
|
|
41
|
+
- `data.layout`: `"single"` (default) | `"two-column"` (splits content on `---`)
|
|
42
|
+
- `data.centered`: `true` (default) | `false`
|
|
43
|
+
- `data.backgroundImageFit`: `"cover"` (default) | `"contain"`
|
|
44
|
+
- `data.backgroundVideoFit`: `"cover"` (default) | `"contain"`
|
|
45
|
+
|
|
46
|
+
## Positioning Grid
|
|
47
|
+
|
|
48
|
+
- Horizontal spacing: 240px between nodes
|
|
49
|
+
- Vertical spacing: 150px between levels
|
|
50
|
+
- Node size: always `{ width: 180, height: 70 }` in both `style` and `measured`
|
|
51
|
+
- Spine: all at y:0, x increments by 240 (0, 240, 480, 720...)
|
|
52
|
+
- Drill-down level 1: y:150, same x as parent
|
|
53
|
+
- Drill-down level 2: y:300
|
|
54
|
+
- Siblings at same depth: increment x by 240
|
|
55
|
+
|
|
56
|
+
## Chart Config
|
|
57
|
+
|
|
58
|
+
Charts use a `config` wrapper for axis and display settings:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{ "chartType": "bar", "data": [...], "config": { "xKey": "quarter", "yKeys": ["revenue", "cost"], "showGrid": true, "showLegend": true } }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- Inline: put in `charts` record, reference with `[chart:name]` in content
|
|
65
|
+
- Full-viewport: put in `chart` field, set `type: "chart"`
|
|
66
|
+
- Chart types: `"bar"` | `"line"` | `"area"` | `"pie"` | `"radar"`
|
|
67
|
+
|
|
68
|
+
## Reference Node
|
|
69
|
+
|
|
70
|
+
A complete correct node for pattern-matching:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"id": "problem",
|
|
75
|
+
"type": "huma",
|
|
76
|
+
"position": { "x": 240, "y": 0 },
|
|
77
|
+
"data": {
|
|
78
|
+
"label": "The Problem",
|
|
79
|
+
"topic": "01 / Problem",
|
|
80
|
+
"content": "## Linear tools break complex stories\n\n- Point one\n- Point two",
|
|
81
|
+
"notes": "Speaker notes here",
|
|
82
|
+
"centered": false
|
|
83
|
+
},
|
|
84
|
+
"style": { "width": 180, "height": 70 },
|
|
85
|
+
"measured": { "width": 180, "height": 70 }
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
45
89
|
## Edge Handle Rules
|
|
46
90
|
|
|
47
91
|
**WRONG** — these handle values will break navigation:
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: presentation-narrative
|
|
3
3
|
description: Designs narrative structure and slide outlines for graph-based presentations. Selects story frameworks, designs spine and drill-down topology, and writes detailed slide content outlines.
|
|
4
|
-
tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Write
|
|
4
|
+
tools: Read, Write
|
|
7
5
|
skills:
|
|
8
|
-
- presentation-generator
|
|
9
|
-
- presentation-generator
|
|
10
|
-
- presentation-generator
|
|
6
|
+
- presentation-generator:frameworks
|
|
7
|
+
- presentation-generator:slide-content
|
|
8
|
+
- presentation-generator:graph-topology
|
|
11
9
|
---
|
|
12
10
|
|
|
13
11
|
# Narrative Design Agent
|
package/package.json
CHANGED
package/skills/{presentation-generator/narrative/content-signals.md → content-signals/SKILL.md}
RENAMED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: content-signals
|
|
3
|
+
description: Content signal extraction patterns and content brief schema for identifying presentation-worthy material from source documents.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Content Extraction Signals
|
|
2
7
|
|
|
3
8
|
Guidance for extracting presentation-worthy content from source documents.
|