slides-grab 1.3.0 → 1.4.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/README-ko.md +8 -6
- package/README.md +8 -6
- package/bin/ppt-agent.js +119 -6
- package/package.json +6 -2
- package/runtimes/claude-code/agents/design-critic-agent.md +23 -0
- package/runtimes/codex/agents/slides-grab-design-critic.md +22 -0
- package/scripts/build-viewer.js +67 -5
- package/scripts/design-gate.js +241 -0
- package/scripts/html2png.js +246 -0
- package/scripts/install-runtime.js +216 -0
- package/skills/slides-grab/SKILL.md +19 -14
- package/skills/slides-grab/references/presentation-workflow-reference.md +8 -6
- package/skills/slides-grab-card-news/SKILL.md +1 -1
- package/skills/slides-grab-design/SKILL.md +19 -11
- package/skills/slides-grab-design/references/design-gate.md +349 -0
- package/skills/slides-grab-design/references/design-rules.md +12 -3
- package/skills/slides-grab-design/references/design-system-full.md +4 -4
- package/skills/slides-grab-design/references/detailed-design-rules.md +9 -0
- package/skills/slides-grab-export/SKILL.md +10 -7
- package/skills/slides-grab-export/references/export-rules.md +3 -0
- package/skills/slides-grab-export/references/pptx-skill-reference.md +7 -42
- package/skills/slides-grab-plan/SKILL.md +6 -3
- package/skills/slides-grab-plan/references/plan-workflow-reference.md +14 -14
- package/src/design-diversity-data.js +6932 -0
- package/src/design-gate-report.js +244 -0
- package/src/design-gate-state.js +294 -0
- package/src/design-styles.js +82 -2
- package/src/editor/codex-edit.js +26 -1
- package/src/editor/editor.html +1 -1
- package/src/editor/js/model-registry.js +1 -1
- package/src/validation/core.js +76 -0
- package/templates/design-styles/README.md +2 -1
- package/templates/design-styles/preview.html +1088 -6
|
@@ -105,7 +105,7 @@ All color palettes are now bundled as design styles accessible via `slides-grab
|
|
|
105
105
|
- **corporate-blue** — Traditional business (white + blue accent)
|
|
106
106
|
- **warm-neutral** — Warm and approachable (cream + terracotta)
|
|
107
107
|
|
|
108
|
-
Run `slides-grab list-styles` to browse all
|
|
108
|
+
Run `slides-grab list-styles` to browse all 95 bundled styles, or design a fully custom palette when none fit.
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
@@ -538,7 +538,7 @@ This skill is **Stage 2**. It works from the `slide-outline.md` approved by the
|
|
|
538
538
|
4. **Auto-fix validation issues**: If validation fails, fix the source HTML/CSS and re-run validation until it passes
|
|
539
539
|
5. **Auto-build viewer**: After validation passes, automatically run:
|
|
540
540
|
```bash
|
|
541
|
-
|
|
541
|
+
slides-grab build-viewer --slides-dir <path>
|
|
542
542
|
```
|
|
543
543
|
6. **Guide user to review**: Tell the user to check slides in the browser:
|
|
544
544
|
```
|
|
@@ -547,7 +547,7 @@ This skill is **Stage 2**. It works from the `slide-outline.md` approved by the
|
|
|
547
547
|
7. **Revision loop**: When the user requests changes to specific slides:
|
|
548
548
|
- Edit only the relevant HTML file
|
|
549
549
|
- Re-run `slides-grab validate --slides-dir <path>` and fix any failures
|
|
550
|
-
- Re-run `
|
|
550
|
+
- Re-run `slides-grab build-viewer --slides-dir <path>` to rebuild the viewer
|
|
551
551
|
- Guide user to review again
|
|
552
552
|
8. **Completion**: Repeat the revision loop until the user signals approval for PPTX conversion
|
|
553
553
|
|
|
@@ -555,7 +555,7 @@ This skill is **Stage 2**. It works from the `slide-outline.md` approved by the
|
|
|
555
555
|
- **Never start PPTX conversion without approval** — PPTX conversion is the responsibility of `pptx-skill` and requires explicit user approval.
|
|
556
556
|
- **Prefer tldraw for complex diagrams** — Use `slides-grab tldraw` when the slide needs a non-trivial diagram instead of forcing dense diagram geometry into HTML/CSS.
|
|
557
557
|
- **Never skip validation** — Run `slides-grab validate --slides-dir <path>` after generation or edits and fix failures before review.
|
|
558
|
-
- **Never forget to build the viewer** — Run `
|
|
558
|
+
- **Never forget to build the viewer** — Run `slides-grab build-viewer --slides-dir <path>` every time slides are generated or modified.
|
|
559
559
|
|
|
560
560
|
---
|
|
561
561
|
|
|
@@ -42,12 +42,21 @@
|
|
|
42
42
|
- Do not default to emoji for iconography; reserve emoji for cases where the brief explicitly wants a playful or native-emoji tone.
|
|
43
43
|
- Keep icon sizing, stroke weight, and color aligned with the deck's approved design tokens.
|
|
44
44
|
|
|
45
|
+
## Chart Usage Rules
|
|
46
|
+
- Prefer Chart.js for bar, line, pie, doughnut, and mixed quantitative slides.
|
|
47
|
+
- Start from `templates/chart.html` when a chart slide needs a proven structure.
|
|
48
|
+
- Keep the `<canvas>` in a stable wrapper and set Chart.js options to `animation: false`, `responsive: true`, and `maintainAspectRatio: false`.
|
|
49
|
+
- Match chart colors to the approved style tokens; avoid rainbow palettes unless the data categories require distinct hues.
|
|
50
|
+
- Direct-label the key data point or keep legends short. Do not let chart legends compete with the slide headline.
|
|
51
|
+
- `slides-grab validate` treats a visible unpainted canvas as `empty-canvas`; fix script loading, target ids, sizing, or data before review/export.
|
|
52
|
+
|
|
45
53
|
## Workflow (Stage 2: Design + Human Review)
|
|
46
54
|
- After slide generation or edits, run `slides-grab validate --slides-dir <path>`.
|
|
47
55
|
- After validation passes, run `slides-grab build-viewer --slides-dir <path>`.
|
|
48
56
|
- Edit only the relevant HTML file during revision loops.
|
|
49
57
|
- When the brief explicitly calls for an image, the user requests one, or the slide clearly benefits from it, prefer `slides-grab image` before falling back to remote image sourcing.
|
|
50
58
|
- Prefer `slides-grab tldraw` + local exported assets for architecture, workflow, relationship, and other complex diagrams.
|
|
59
|
+
- For Chart.js decks, open the generated viewer and confirm charts render inside `viewer.html`, not only as standalone slide files.
|
|
51
60
|
- Keep local videos and their poster thumbnails together under `<slides-dir>/assets/`.
|
|
52
61
|
- Never start PPTX conversion without explicit approval.
|
|
53
62
|
- Never forget to build the viewer after slide changes.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slides-grab-export
|
|
3
|
-
description: Stage 3 conversion skill
|
|
3
|
+
description: Stage 3 conversion skill usable in Codex and Claude Code. Convert approved HTML slides to PDF or per-slide PNG reliably, and to experimental / unstable PPTX/Figma outputs on a best-effort basis.
|
|
4
4
|
metadata:
|
|
5
5
|
short-description: Convert slides and run conversion checks
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# slides-grab Export Skill
|
|
8
|
+
# slides-grab Export Skill
|
|
9
9
|
|
|
10
|
-
Use this only after the user approves design output.
|
|
10
|
+
Use this only after the user approves design output **and the Stage 2 design gate verdict is `Proceed`** (zero unresolved Critical findings — see `../slides-grab-design/references/design-gate.md`). PDF, PPTX, and Figma exports require a fresh `slides-grab design-gate` Proceed receipt for the current slide files.
|
|
11
11
|
|
|
12
12
|
## Goal
|
|
13
13
|
Convert reviewed slide HTML into PDF or per-slide PNG reliably, and into experimental / unstable PPTX/Figma outputs on a best-effort basis.
|
|
@@ -20,7 +20,7 @@ Convert reviewed slide HTML into PDF or per-slide PNG reliably, and into experim
|
|
|
20
20
|
- Presentation artifact (`.pdf`, `.png` per slide, or `.pptx`)
|
|
21
21
|
|
|
22
22
|
## Workflow
|
|
23
|
-
1. Confirm user approval for conversion.
|
|
23
|
+
1. Confirm user approval for conversion **and that the Stage 2 design gate passed** with verdict `Proceed`. If any **Critical** design-gate finding is still unresolved, refuse to export — return to Stage 2, fix the Critical issue, re-run the gate, record Proceed with `slides-grab design-gate`, and only then convert.
|
|
24
24
|
2. Pick the right primary target:
|
|
25
25
|
- Card-news / Instagram-style decks → `slides-grab png --slides-dir <path> --slide-mode card-news --resolution 2160p` (see `slides-grab-card-news`).
|
|
26
26
|
- Widescreen slide decks → `slides-grab pdf --slides-dir <path> --output <name>.pdf`.
|
|
@@ -30,15 +30,18 @@ Convert reviewed slide HTML into PDF or per-slide PNG reliably, and into experim
|
|
|
30
30
|
4. If the user also wants a PDF deck:
|
|
31
31
|
- `slides-grab pdf --slides-dir <path> --output <name>.pdf`
|
|
32
32
|
- Add `--slide-mode card-news` when the deck is square.
|
|
33
|
-
5.
|
|
33
|
+
5. For decks with Chart.js or other `<canvas>` charts, confirm `slides-grab validate --slides-dir <path>` passes without `empty-canvas`, then build/open `viewer.html` once before export. Chart.js charts should use disabled animation so PDF/PNG capture sees the final painted state.
|
|
34
|
+
6. If the user wants PPTX (experimental / unstable):
|
|
34
35
|
- `slides-grab convert --slides-dir <path> --output <name>.pptx`
|
|
35
|
-
|
|
36
|
+
7. If the user wants Figma-importable PPTX (experimental / unstable):
|
|
36
37
|
- `slides-grab figma --slides-dir <path> --output <name>-figma.pptx`
|
|
37
|
-
|
|
38
|
+
8. Report success/failure with actionable errors.
|
|
38
39
|
|
|
39
40
|
## Rules
|
|
41
|
+
- Do not export while any **Critical** design-gate finding is unresolved (`../slides-grab-design/references/design-gate.md`). The design gate is a hard precondition for this stage, and `slides-grab pdf`, `slides-grab convert`, and `slides-grab figma` block if the latest receipt is missing or stale.
|
|
40
42
|
- Do not modify slide content during conversion stage unless explicitly requested.
|
|
41
43
|
- If conversion fails, diagnose and fix root causes in source HTML/CSS.
|
|
44
|
+
- For chart-heavy decks, treat a blank exported chart as a source rendering bug first: re-run validation, inspect `empty-canvas`, and verify the same slide in `viewer.html` before retrying PDF/PNG/PPTX export.
|
|
42
45
|
- Always tell the user that PPTX and Figma export are experimental / unstable and may require manual cleanup.
|
|
43
46
|
- Use the packaged CLI and bundled references only; do not depend on unpublished agent-specific files.
|
|
44
47
|
|
|
@@ -11,6 +11,9 @@ These are the packaged export rules for installable `slides-grab` skills.
|
|
|
11
11
|
- Only export after the user approves the reviewed HTML slides.
|
|
12
12
|
- Do not modify slide content during export unless explicitly requested.
|
|
13
13
|
- If export fails, fix the root cause in the source HTML/CSS or packaged runtime path.
|
|
14
|
+
- For decks with Chart.js or other `<canvas>` charts, run `slides-grab validate --slides-dir <path>` first and fix any `empty-canvas` error before exporting.
|
|
15
|
+
- Build and open `viewer.html` once for chart-heavy decks so the same charts are confirmed in the generated review surface.
|
|
16
|
+
- Keep Chart.js animation disabled in source slides so PDF/PNG capture sees the final painted chart.
|
|
14
17
|
|
|
15
18
|
## User-facing caveats
|
|
16
19
|
- PPTX export is experimental / unstable.
|
|
@@ -37,10 +37,7 @@ If prerequisites are not met, guide the user to review slides in `<slides-dir>/v
|
|
|
37
37
|
```bash
|
|
38
38
|
slides-grab convert --slides-dir <path> --output presentation.pptx
|
|
39
39
|
```
|
|
40
|
-
-
|
|
41
|
-
```bash
|
|
42
|
-
node .claude/skills/pptx-skill/scripts/html2pptx.js
|
|
43
|
-
```
|
|
40
|
+
- Use the packaged `slides-grab convert` command rather than runtime-local skill scripts.
|
|
44
41
|
|
|
45
42
|
3. **Verify results**
|
|
46
43
|
- Check generated PPTX file carefully; expect best-effort fidelity only
|
|
@@ -48,51 +45,19 @@ If prerequisites are not met, guide the user to review slides in `<slides-dir>/v
|
|
|
48
45
|
|
|
49
46
|
## Script Usage
|
|
50
47
|
|
|
51
|
-
###
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```javascript
|
|
55
|
-
import { html2pptx } from './.claude/skills/pptx-skill/scripts/html2pptx.js';
|
|
56
|
-
import PptxGenJS from 'pptxgenjs';
|
|
57
|
-
|
|
58
|
-
const pres = new PptxGenJS();
|
|
59
|
-
pres.layout = 'LAYOUT_WIDE'; // 16:9
|
|
60
|
-
|
|
61
|
-
// Convert each slide
|
|
62
|
-
await html2pptx('<slides-dir>/slide-01.html', pres);
|
|
63
|
-
await html2pptx('<slides-dir>/slide-02.html', pres);
|
|
64
|
-
|
|
65
|
-
// Save
|
|
66
|
-
await pres.writeFile({ fileName: 'presentation.pptx' });
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### thumbnail.py
|
|
70
|
-
Generate presentation thumbnail grid
|
|
48
|
+
### Programmatic Conversion Note
|
|
49
|
+
The packaged runtime exposes PPTX conversion through `slides-grab convert`. Do not import converter files from runtime-local skill directories in installed-agent workflows.
|
|
71
50
|
|
|
72
51
|
```bash
|
|
73
|
-
|
|
52
|
+
slides-grab convert --slides-dir <path> --output presentation.pptx
|
|
74
53
|
```
|
|
75
54
|
|
|
76
|
-
|
|
77
|
-
- `--cols N`: Number of columns (default 5, range 3-6)
|
|
78
|
-
- `--outline-placeholders`: Show placeholder regions
|
|
79
|
-
|
|
80
|
-
### pack.py / unpack.py
|
|
81
|
-
PPTX file packaging/unpackaging
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# Unpack
|
|
85
|
-
python .claude/skills/pptx-skill/ooxml/scripts/unpack.py presentation.pptx output_dir
|
|
86
|
-
|
|
87
|
-
# Pack
|
|
88
|
-
python .claude/skills/pptx-skill/ooxml/scripts/pack.py input_dir presentation.pptx
|
|
89
|
-
```
|
|
55
|
+
### Thumbnail / OOXML Inspection
|
|
90
56
|
|
|
91
|
-
|
|
92
|
-
PPTX structure validation
|
|
57
|
+
Use standard local tools such as LibreOffice, Poppler, or OOXML unzip/zip inspection when you need thumbnails or package-level debugging. These steps are diagnostic aids, not required packaged runtime commands.
|
|
93
58
|
|
|
94
59
|
```bash
|
|
95
|
-
|
|
60
|
+
unzip presentation.pptx -d output_dir
|
|
96
61
|
```
|
|
97
62
|
|
|
98
63
|
## Reference Documents
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slides-grab-plan
|
|
3
|
-
description: Stage 1 planning skill
|
|
3
|
+
description: Stage 1 planning skill usable in Codex and Claude Code. Build and iterate slide-outline.md until explicit user approval.
|
|
4
4
|
metadata:
|
|
5
5
|
short-description: Create and revise slide outline before design stage
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# slides-grab Plan Skill
|
|
8
|
+
# slides-grab Plan Skill
|
|
9
9
|
|
|
10
10
|
Use this when the user asks to start a new presentation from scratch.
|
|
11
11
|
|
|
@@ -20,6 +20,7 @@ Produce an approved `slide-outline.md` before any slide HTML generation.
|
|
|
20
20
|
|
|
21
21
|
## Output
|
|
22
22
|
- `slide-outline.md` (must include `style: <id>` in meta section)
|
|
23
|
+
- For chart-heavy decks, explicit chart slide notes: chart type, data source, key comparison, and whether the design stage should use the default Chart.js canvas template.
|
|
23
24
|
|
|
24
25
|
## Workflow
|
|
25
26
|
1. Analyze user goal and audience.
|
|
@@ -37,6 +38,7 @@ Produce an approved `slide-outline.md` before any slide HTML generation.
|
|
|
37
38
|
- bundled style → `style: <id>`
|
|
38
39
|
- converted DESIGN.slides.md → `style: ./DESIGN.slides.md`
|
|
39
40
|
- free-form custom direction → leave a one-paragraph `style:` block describing it
|
|
41
|
+
- for chart slides, name the intended chart type and data payload in the slide notes so Stage 2 can build a real Chart.js canvas instead of placeholder bars or decorative pseudo-charts
|
|
40
42
|
5. Present a concise summary to user.
|
|
41
43
|
6. Repeat revisions until explicit approval.
|
|
42
44
|
|
|
@@ -44,6 +46,7 @@ Produce an approved `slide-outline.md` before any slide HTML generation.
|
|
|
44
46
|
- **Do not write the outline before the user approves a style.** Style selection comes first.
|
|
45
47
|
- Do not generate slide HTML (`<slides-dir>/slide-*.html`) in this stage.
|
|
46
48
|
- Keep scope to structure, narrative, and style selection.
|
|
49
|
+
- For quantitative stories, plan charts as evidence: identify the source values, comparison axis, baseline, and intended takeaway. Do not invent filler metrics just to fill a chart.
|
|
47
50
|
- Ask for approval before moving to design.
|
|
48
51
|
- Assume later stages run through the packaged `slides-grab` CLI.
|
|
49
52
|
- Use the packaged CLI and bundled references only; do not depend on unpublished agent-specific files.
|
|
@@ -51,5 +54,5 @@ Produce an approved `slide-outline.md` before any slide HTML generation.
|
|
|
51
54
|
## Reference
|
|
52
55
|
If needed, use the bundled outline reference:
|
|
53
56
|
- `references/outline-format.md`
|
|
54
|
-
- `references/plan-workflow-reference.md` — archived detailed planning workflow and
|
|
57
|
+
- `references/plan-workflow-reference.md` — archived detailed planning workflow and runtime-neutral outline-worker guidance
|
|
55
58
|
- `references/design-md-to-slides-conversion.md` — DESIGN.md (web) → DESIGN.slides.md (slide) translation guide, including the structured output template and the web → slide mapping table
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A **supervisor skill** that takes a user topic, generates a `slide-outline.md` outline, and manages a revision loop until the user approves.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Keeps the outline process separate from slide design. Use a runtime-native subagent/task for drafting when available, or draft directly from this reference when the current runtime has no subagent mechanism.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -11,14 +11,14 @@ Does not write the outline directly — delegates the work to `organizer-agent`.
|
|
|
11
11
|
| Role | Owner | Responsibility |
|
|
12
12
|
|------|-------|----------------|
|
|
13
13
|
| **Supervisor** | plan-skill (you) | User communication, quality control, revision loop management |
|
|
14
|
-
| **Worker** |
|
|
14
|
+
| **Worker** | Outline worker | Draft and revise `slide-outline.md` |
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
## Input
|
|
19
19
|
|
|
20
20
|
- User topic (required)
|
|
21
|
-
- Research results (optional
|
|
21
|
+
- Research results (optional)
|
|
22
22
|
- Reference materials, tone/mood requests, etc.
|
|
23
23
|
|
|
24
24
|
## Output
|
|
@@ -29,9 +29,9 @@ Does not write the outline directly — delegates the work to `organizer-agent`.
|
|
|
29
29
|
|
|
30
30
|
## Workflow
|
|
31
31
|
|
|
32
|
-
### 1.
|
|
32
|
+
### 1. Create the Outline Draft
|
|
33
33
|
|
|
34
|
-
Use
|
|
34
|
+
Use a runtime-native task/subagent to generate a `slide-outline.md` draft when available. If the runtime has no such mechanism, write the draft directly using the format below.
|
|
35
35
|
|
|
36
36
|
**Include in the prompt:**
|
|
37
37
|
- User topic and requirements
|
|
@@ -52,7 +52,7 @@ Read the generated `slide-outline.md` and present to the user:
|
|
|
52
52
|
|
|
53
53
|
When user provides feedback:
|
|
54
54
|
1. Organize the feedback
|
|
55
|
-
2.
|
|
55
|
+
2. Revise the existing `slide-outline.md` with the feedback, using a runtime-native task/subagent when available
|
|
56
56
|
3. Present the revised outline to the user
|
|
57
57
|
4. Repeat until user approves
|
|
58
58
|
|
|
@@ -65,7 +65,7 @@ Complete the outline stage when the user explicitly approves.
|
|
|
65
65
|
## Absolute Rules
|
|
66
66
|
|
|
67
67
|
1. **Never proceed to the next stage without approval** — Maintain the revision loop until the user explicitly signals approval ("looks good", "approved", "OK", "proceed", etc.).
|
|
68
|
-
2. **
|
|
68
|
+
2. **Keep the outline stage separate** — Do not generate slide HTML while drafting or revising the outline.
|
|
69
69
|
3. **Never start HTML generation** — This skill's scope ends at `slide-outline.md` approval. HTML generation is the responsibility of `design-skill`.
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -109,12 +109,12 @@ Complete the outline stage when the user explicitly approves.
|
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
-
##
|
|
112
|
+
## Outline Worker Prompt Examples
|
|
113
113
|
|
|
114
114
|
```
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
Runtime-native task/subagent prompt:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
118
|
Create a presentation outline for the following topic.
|
|
119
119
|
|
|
120
120
|
Topic: [user topic]
|
|
@@ -128,9 +128,9 @@ Task tool call:
|
|
|
128
128
|
For feedback revisions:
|
|
129
129
|
|
|
130
130
|
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
Runtime-native task/subagent prompt:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
134
|
Revise the existing outline.
|
|
135
135
|
|
|
136
136
|
Current outline: [slide-outline.md content]
|