slides-grab 1.2.6 → 1.3.1

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.
Files changed (33) hide show
  1. package/README-ko.md +258 -0
  2. package/README.md +16 -12
  3. package/bin/ppt-agent.js +195 -1
  4. package/package.json +11 -6
  5. package/runtimes/claude-code/agents/design-critic-agent.md +23 -0
  6. package/runtimes/codex/agents/slides-grab-design-critic.md +22 -0
  7. package/scripts/design-gate.js +241 -0
  8. package/scripts/editor-server.js +1 -0
  9. package/scripts/html2png.js +246 -0
  10. package/scripts/install-runtime.js +216 -0
  11. package/skills/slides-grab/SKILL.md +14 -12
  12. package/skills/slides-grab/references/presentation-workflow-reference.md +1 -1
  13. package/skills/slides-grab-card-news/SKILL.md +1 -1
  14. package/skills/slides-grab-design/SKILL.md +15 -7
  15. package/skills/slides-grab-design/references/design-gate.md +349 -0
  16. package/skills/slides-grab-design/references/design-rules.md +3 -3
  17. package/skills/slides-grab-design/references/design-system-full.md +4 -4
  18. package/skills/slides-grab-export/SKILL.md +5 -4
  19. package/skills/slides-grab-export/references/pptx-skill-reference.md +7 -42
  20. package/skills/slides-grab-plan/SKILL.md +20 -7
  21. package/skills/slides-grab-plan/references/design-md-to-slides-conversion.md +135 -0
  22. package/skills/slides-grab-plan/references/plan-workflow-reference.md +14 -14
  23. package/src/design-diversity-data.js +6932 -0
  24. package/src/design-gate-report.js +244 -0
  25. package/src/design-gate-state.js +294 -0
  26. package/src/design-import.js +164 -0
  27. package/src/design-md-parser.js +415 -0
  28. package/src/design-styles.js +86 -4
  29. package/src/editor/codex-edit.js +61 -2
  30. package/src/editor/editor.html +1 -1
  31. package/src/editor/js/model-registry.js +1 -1
  32. package/templates/design-styles/README.md +2 -1
  33. package/templates/design-styles/preview.html +1088 -6
@@ -0,0 +1,216 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { cp, mkdir, readdir, rm } from 'node:fs/promises';
4
+ import { homedir } from 'node:os';
5
+ import { dirname, join, resolve } from 'node:path';
6
+ import { fileURLToPath, pathToFileURL } from 'node:url';
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const packageRoot = resolve(__dirname, '..');
10
+ const VALID_TARGETS = new Set(['all', 'codex', 'claude-code']);
11
+ const VALID_SCOPES = new Set(['project', 'user']);
12
+ const SKILL_NAMES = [
13
+ 'slides-grab',
14
+ 'slides-grab-plan',
15
+ 'slides-grab-design',
16
+ 'slides-grab-export',
17
+ 'slides-grab-card-news',
18
+ ];
19
+
20
+ function printUsage() {
21
+ process.stdout.write(
22
+ [
23
+ 'Usage: slides-grab install-skills [options]',
24
+ '',
25
+ 'Options:',
26
+ ' --target <target> Runtime target: all|codex|claude-code (default: all)',
27
+ ' --runtime <target> Alias for --target',
28
+ ' --scope <scope> Install scope: project|user (default: project)',
29
+ ' --project-dir <path> Project directory for project scope (default: cwd)',
30
+ ' --target-root <path> Root directory for user-style installs',
31
+ ' --dry-run Print planned writes without copying',
32
+ ' --json Print JSON result',
33
+ ' -h, --help Show this help message',
34
+ ].join('\n'),
35
+ );
36
+ process.stdout.write('\n');
37
+ }
38
+
39
+ function parseArgs(args) {
40
+ const options = {
41
+ target: 'all',
42
+ scope: 'project',
43
+ projectDir: process.cwd(),
44
+ targetRoot: '',
45
+ dryRun: false,
46
+ json: false,
47
+ help: false,
48
+ };
49
+
50
+ for (let index = 0; index < args.length; index += 1) {
51
+ const arg = args[index];
52
+ if (arg === '-h' || arg === '--help') {
53
+ options.help = true;
54
+ continue;
55
+ }
56
+ if (arg === '--dry-run') {
57
+ options.dryRun = true;
58
+ continue;
59
+ }
60
+ if (arg === '--json') {
61
+ options.json = true;
62
+ continue;
63
+ }
64
+ if (OPTION_FIELDS.has(arg)) {
65
+ options[OPTION_FIELDS.get(arg)] = readOptionValue(args, index, arg);
66
+ index += 1;
67
+ continue;
68
+ }
69
+ const equalSignIndex = arg.indexOf('=');
70
+ if (equalSignIndex > -1) {
71
+ const name = arg.slice(0, equalSignIndex);
72
+ if (OPTION_FIELDS.has(name)) {
73
+ options[OPTION_FIELDS.get(name)] = arg.slice(equalSignIndex + 1);
74
+ continue;
75
+ }
76
+ }
77
+ throw new Error(`Unknown option: ${arg}`);
78
+ }
79
+
80
+ if (options.help) return options;
81
+
82
+ options.target = normalizeTarget(options.target);
83
+ options.scope = normalizeScope(options.scope);
84
+ options.projectDir = resolve(process.cwd(), options.projectDir);
85
+ options.targetRoot = options.targetRoot ? resolve(process.cwd(), options.targetRoot) : '';
86
+ return options;
87
+ }
88
+
89
+ const OPTION_FIELDS = new Map([
90
+ ['--target', 'target'],
91
+ ['--runtime', 'target'],
92
+ ['--scope', 'scope'],
93
+ ['--project-dir', 'projectDir'],
94
+ ['--target-root', 'targetRoot'],
95
+ ]);
96
+
97
+ function readOptionValue(args, index, optionName) {
98
+ const value = args[index + 1];
99
+ if (!value || value.startsWith('-')) {
100
+ throw new Error(`Missing value for ${optionName}.`);
101
+ }
102
+ return value;
103
+ }
104
+
105
+ function normalizeTarget(value) {
106
+ const target = String(value || '').trim().toLowerCase();
107
+ if (!VALID_TARGETS.has(target)) {
108
+ throw new Error(`Unknown runtime target "${value}". Expected: all, codex, or claude-code.`);
109
+ }
110
+ return target;
111
+ }
112
+
113
+ function normalizeScope(value) {
114
+ const scope = String(value || '').trim().toLowerCase();
115
+ if (!VALID_SCOPES.has(scope)) {
116
+ throw new Error(`Unknown install scope "${value}". Expected: project or user.`);
117
+ }
118
+ return scope;
119
+ }
120
+
121
+ function selectedTargets(target) {
122
+ return target === 'all' ? ['codex', 'claude-code'] : [target];
123
+ }
124
+
125
+ function runtimeRoots(options, target) {
126
+ if (options.scope === 'project') {
127
+ return {
128
+ codex: {
129
+ skillsDir: join(options.projectDir, '.agents', 'skills'),
130
+ agentsDir: join(options.projectDir, '.codex', 'agents'),
131
+ },
132
+ 'claude-code': {
133
+ skillsDir: join(options.projectDir, '.claude', 'skills'),
134
+ agentsDir: join(options.projectDir, '.claude', 'agents'),
135
+ },
136
+ }[target];
137
+ }
138
+
139
+ const root = options.targetRoot || homedir();
140
+ return {
141
+ codex: {
142
+ skillsDir: join(root, '.agents', 'skills'),
143
+ agentsDir: join(root, '.codex', 'agents'),
144
+ },
145
+ 'claude-code': {
146
+ skillsDir: join(root, '.claude', 'skills'),
147
+ agentsDir: join(root, '.claude', 'agents'),
148
+ },
149
+ }[target];
150
+ }
151
+
152
+ async function copyDirectory(source, destination, dryRun) {
153
+ if (dryRun) return;
154
+ await rm(destination, { recursive: true, force: true });
155
+ await mkdir(dirname(destination), { recursive: true });
156
+ await cp(source, destination, { recursive: true });
157
+ }
158
+
159
+ async function installTarget(options, target) {
160
+ const roots = runtimeRoots(options, target);
161
+ const writes = [];
162
+ if (!options.dryRun) {
163
+ await mkdir(roots.skillsDir, { recursive: true });
164
+ await mkdir(roots.agentsDir, { recursive: true });
165
+ }
166
+
167
+ for (const skillName of SKILL_NAMES) {
168
+ const source = join(packageRoot, 'skills', skillName);
169
+ const destination = join(roots.skillsDir, skillName);
170
+ await copyDirectory(source, destination, options.dryRun);
171
+ writes.push(destination);
172
+ }
173
+
174
+ const adapterSourceDir = join(packageRoot, 'runtimes', target, 'agents');
175
+ const adapterFiles = await readdir(adapterSourceDir);
176
+ for (const adapterFile of adapterFiles) {
177
+ const source = join(adapterSourceDir, adapterFile);
178
+ const destination = join(roots.agentsDir, adapterFile);
179
+ await copyDirectory(source, destination, options.dryRun);
180
+ writes.push(destination);
181
+ }
182
+
183
+ return { target, skillsDir: roots.skillsDir, agentsDir: roots.agentsDir, writes };
184
+ }
185
+
186
+ export async function main(argv = process.argv.slice(2)) {
187
+ const options = parseArgs(argv);
188
+ if (options.help) {
189
+ printUsage();
190
+ return;
191
+ }
192
+
193
+ const installs = [];
194
+ for (const target of selectedTargets(options.target)) {
195
+ installs.push(await installTarget(options, target));
196
+ }
197
+
198
+ if (options.json) {
199
+ process.stdout.write(`${JSON.stringify({ installs, dryRun: options.dryRun }, null, 2)}\n`);
200
+ return;
201
+ }
202
+
203
+ for (const install of installs) {
204
+ const label = install.target === 'claude-code' ? 'Claude Code' : 'Codex';
205
+ process.stdout.write(`Installed slides-grab skills for ${label}\n`);
206
+ process.stdout.write(` Skills: ${install.skillsDir}\n`);
207
+ process.stdout.write(` Agents: ${install.agentsDir}\n`);
208
+ }
209
+ }
210
+
211
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
212
+ main().catch((error) => {
213
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
214
+ process.exit(1);
215
+ });
216
+ }
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: slides-grab
3
- description: End-to-end presentation workflow for Codex. Use when making a full presentation from scratch — planning, designing slides, editing, and exporting. PDF and per-slide PNG are preferred; PPTX/Figma export is experimental / unstable.
3
+ description: End-to-end presentation workflow usable in Codex and Claude Code. Use when making a full presentation from scratch — planning, designing slides, editing, and exporting. PDF and per-slide PNG are preferred; PPTX/Figma export is experimental / unstable.
4
4
  metadata:
5
5
  short-description: Full pipeline from topic to PDF/PNG + experimental / unstable PPTX/Figma export
6
6
  ---
7
7
 
8
- # slides-grab Skill (Codex) - Full Workflow Orchestrator
8
+ # slides-grab Skill - Full Workflow Orchestrator
9
9
 
10
10
  Guides you through the complete presentation pipeline from topic to exported file.
11
11
 
@@ -37,11 +37,12 @@ Use the installed **slides-grab-design** skill.
37
37
  7. For complex diagrams (architecture, workflows, relationship maps, multi-node concepts), prefer `tldraw` over hand-built HTML/CSS diagrams. Render the asset with `slides-grab tldraw`, store it under `<slides-dir>/assets/`, and place it in the slide with a normal `<img>`.
38
38
  8. Keep local videos under `<slides-dir>/assets/`, prefer `poster="./assets/<file>"` thumbnails, and use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly) when the source starts on a supported web page.
39
39
  9. The default provider, god-tibo-imagen, reuses the local Codex ChatGPT login (`~/.codex/auth.json`) — run `codex login` once; no API key required. ⚠️ god-tibo-imagen uses an unsupported private Codex backend that may break without notice. Optional alternatives: `--provider codex` (Codex/OpenAI gpt-image-2 via `OPENAI_API_KEY`; maps `--aspect-ratio` to the nearest supported OpenAI image size; `--image-size 2K|4K` is Nano Banana-only) or `--provider nano-banana` (Google `gemini-3-pro-image-preview` via `GOOGLE_API_KEY` or `GEMINI_API_KEY`; supports `--image-size 2K|4K`). If credentials are unavailable, fall back to web search/download into `<slides-dir>/assets/`.
40
- 10. Launch the interactive editor for review: `slides-grab edit --slides-dir <path>`
41
- 11. Revise slides based on user feedback via the editor, then re-run validation after each edit round.
42
- 12. When the user confirms editing is complete, suggest next steps: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final preview, or proceed directly to Stage 3 for PDF/PPTX export.
40
+ 10. **Run the design gate as an adversarial quality loop** before presenting the deck (`skills/slides-grab-design/references/design-gate.md`): capture render evidence (`slides-grab png --output-dir <path>/gate-preview`), dispatch two parallel read-only reviewer passes when the current runtime supports subagents/tasks (A: System Contract / Constraint Integrity, B: Audience Impact / Expressive Readability), and synthesize contract coherence against audience impact into one Design Gate Report with a verdict. If subagents are unavailable, run the same two passes sequentially from the bundled reference. Review Litmus is the shared audience-success tie-breaker, not a third pass. **Resolve every Critical finding** (unreadable text, palette violation, AI slop trope as a slide's primary treatment, key slide with no visual anchor, invented data), re-run validate, capture fresh PNGs, and re-run both adversarial passes until the latest rendered state reaches `Proceed` or requires `Rethink approach`. For `Proceed`, the Pass A/B reports must follow the CLI-enforced structure in `slides-grab-design/references/design-gate.md` (role title, `VERDICT: PASS`, confidence, rendered PNG evidence filenames, current `slide-*.html: <sha256>` fingerprints, `Unresolved Critical: 0`, `Blocking findings: None`, findings table, and required checks marked `PASS`). When the verdict is `Proceed`, record the export-unlocking receipt with `slides-grab design-gate --slides-dir <path> --verdict proceed --pass-a-report <pass-a.md> --pass-b-report <pass-b.md>`. If the CLI rejects the reports, continue the fix → validate → render → A/B review loop. Track deferred Minor/Note in `<slides-dir>/design-debt.md`.
41
+ 11. Launch the interactive editor for review: `slides-grab edit --slides-dir <path>`
42
+ 12. Revise slides based on user feedback via the editor, then re-run validation and the design gate after each edit round that changes layout, color, typography, imagery, or content density.
43
+ 13. When the user confirms editing is complete, suggest next steps: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final preview, or proceed directly to Stage 3 for PDF/PPTX export.
43
44
 
44
- **Do not proceed to Stage 3 without approval.**
45
+ **Do not proceed to Stage 3 without approval, and never while any Critical design-gate finding is unresolved.**
45
46
 
46
47
  ### Stage 3 — Export
47
48
 
@@ -62,12 +63,13 @@ Use the installed **slides-grab-export** skill.
62
63
 
63
64
  1. **Always follow the stage order**: Plan → Design → Export.
64
65
  2. **Get explicit user approval** before advancing to the next stage.
65
- 3. **Read each stage's SKILL.md** for detailed rules this skill only orchestrates.
66
- 4. **Use `decks/<deck-name>/`** as the slides workspace for multi-deck projects.
67
- 5. **Call out export risk clearly**: PPTX and Figma export are experimental / unstable and must be described as best-effort output.
68
- 6. Use the stage skills as the source of truth for plan, design, and export rules.
69
- 7. When a slide needs a complex diagram, default to a `tldraw`-generated asset unless the user explicitly asks for a different approach.
70
- 8. When a slide needs bespoke imagery, prefer the default god-tibo-imagen provider via `slides-grab image` (reuses local Codex ChatGPT login no API key required) and keep the saved asset local under `<slides-dir>/assets/`.
66
+ 3. **Pass the design gate before export**: Stage 2 must end with a Design Gate Report whose verdict is `Proceed` (zero unresolved Critical findings) on the **latest rendered state** before the deck advances to Stage 3. The gate (`skills/slides-grab-design/references/design-gate.md`) runs after `slides-grab validate`; use runtime-native subagents/tasks for Pass A/B when available, or run the same bundled procedure sequentially. Record the latest Proceed verdict with `slides-grab design-gate`; `slides-grab pdf`, `slides-grab convert`, and `slides-grab figma` block if that receipt is missing, stale, or backed by Pass A/B reports that fail the CLI-enforced report contract. Any fix requires fresh PNG evidence and another Pass A/B challenge. Critical hard-blocks export; Major findings are listed for user acceptance; Minor/Note findings may be tracked in the design-debt log.
67
+ 4. **Read each stage's SKILL.md** for detailed rules this skill only orchestrates.
68
+ 5. **Use `decks/<deck-name>/`** as the slides workspace for multi-deck projects.
69
+ 6. **Call out export risk clearly**: PPTX and Figma export are experimental / unstable and must be described as best-effort output.
70
+ 7. Use the stage skills as the source of truth for plan, design, and export rules.
71
+ 8. When a slide needs a complex diagram, default to a `tldraw`-generated asset unless the user explicitly asks for a different approach.
72
+ 9. When a slide needs bespoke imagery, prefer the default god-tibo-imagen provider via `slides-grab image` (reuses local Codex ChatGPT login — no API key required) and keep the saved asset local under `<slides-dir>/assets/`.
71
73
 
72
74
  ## Reference
73
75
  - `references/presentation-workflow-reference.md` — archived end-to-end workflow guidance from the legacy skill set
@@ -22,7 +22,7 @@ Use the installed **slides-grab-plan** skill.
22
22
  Use the installed **slides-grab-design** skill.
23
23
 
24
24
  1. Read approved `slide-outline.md`.
25
- 2. If the user has not approved a visual direction yet, use `slides-grab list-styles` to shortlist bundled styles, optionally `slides-grab preview-styles` to open the visual gallery in browser, and agree on a direction with the user. If none of the 35 bundled styles fit, design a fully custom visual direction.
25
+ 2. If the user has not approved a visual direction yet, use `slides-grab list-styles` to shortlist bundled styles, optionally `slides-grab preview-styles` to open the visual gallery in browser, and agree on a direction with the user. If none of the 95 bundled styles fit, design a fully custom visual direction.
26
26
  3. Generate `slide-*.html` files in the slides workspace (default: `slides/`).
27
27
  4. Run validation: `slides-grab validate --slides-dir <path>`
28
28
  5. If validation fails, automatically fix the slide HTML/CSS until validation passes.
@@ -5,7 +5,7 @@ metadata:
5
5
  short-description: Square card-news workflow on top of slides-grab (PNG by default)
6
6
  ---
7
7
 
8
- # slides-grab Card News Skill (Codex)
8
+ # slides-grab Card News Skill
9
9
 
10
10
  Use this when the user wants card news instead of a widescreen presentation.
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: slides-grab-design
3
- description: Stage 2 design skill for Codex. Generate and iterate slide-XX.html files in the selected slides workspace.
3
+ description: Stage 2 design skill usable in Codex and Claude Code. Generate and iterate slide-XX.html files in the selected slides workspace.
4
4
  metadata:
5
5
  short-description: Build HTML slides and viewer for review loop
6
6
  ---
7
7
 
8
- # slides-grab Design Skill (Codex)
8
+ # slides-grab Design Skill
9
9
 
10
10
  Use this after `slide-outline.md` is approved.
11
11
 
@@ -22,7 +22,11 @@ Generate high-quality `slide-XX.html` files in the selected slides workspace (`s
22
22
 
23
23
  ## Workflow
24
24
  1. Read approved `slide-outline.md` and extract the `style` field from its meta section.
25
- 2. Load the chosen style's full spec from `src/design-styles-data.js` — colors, fonts, layout, signature elements, and things to avoid. If the meta specifies a custom direction instead of a bundled ID, use that custom direction as the design basis.
25
+ 2. Load the chosen style's full spec:
26
+ - If `style` is a bundled id (e.g. `glassmorphism`), load from `src/design-styles-data.js` — colors, fonts, layout, signature elements, and things to avoid.
27
+ - If `style` ends in `.md` (e.g. `./DESIGN.slides.md` or `./DESIGN.md`), or if a design markdown file exists at the project root, parse it with `slides-grab show-design <path>` and treat the parsed output as the authoritative design system (colors, typography, layout, components, signature, avoid).
28
+ - **Precedence when both files exist:** `DESIGN.slides.md` takes priority over `DESIGN.md`. The `.slides.md` version is the slide-flavored conversion produced by the plan stage and is the only file safe to apply to slide HTML. If only `DESIGN.md` exists, treat it as web-flavored and follow the slide layout/avoid rules in `references/design-rules.md` strictly to avoid leaking web-only components (top-nav, CTA buttons, footer-band columns, pricing grids) into slides — or, preferably, switch back to the plan stage and produce a `DESIGN.slides.md` first.
29
+ - If the meta specifies a written custom direction, use that as the design basis.
26
30
  3. Before generating slides, write a quick **visual thesis** (mood/material/energy), a **content plan** (opener → support/proof → detail/story → close/CTA), a **system declaration** (reused layout patterns, max two background colors, max two typefaces, image-led vs text-led slides, where section dividers reset tempo), and the core design tokens (background, surface, text, muted, accent + display/headline/body/caption roles). Ground these tokens in the chosen style's spec. Follow `references/beautiful-slide-defaults.md` for the full working model, content discipline, color discipline, and AI slop tropes to avoid.
27
31
  4. If you need to confirm or revisit the approved bundled style before designing, re-run `slides-grab list-styles` and open the gallery from `slides-grab preview-styles` so the Stage 2 deck stays aligned with the Stage 1 direction.
28
32
  5. Generate slide HTML files with 2-digit numbering in selected `--slides-dir`.
@@ -34,10 +38,12 @@ Generate high-quality `slide-XX.html` files in the selected slides workspace (`s
34
38
  11. Run `slides-grab validate --slides-dir <path>` after generation or edits.
35
39
  12. If validation fails, automatically fix the source slide HTML/CSS and re-run validation until it passes.
36
40
  13. Run the slide litmus check from `references/beautiful-slide-defaults.md` before presenting the deck for review.
37
- 14. Launch the interactive editor for visual review: `slides-grab edit --slides-dir <path>`
38
- 15. Iterate on user feedback by editing only requested slide files, then re-run validation after each edit round.
39
- 16. When the user confirms editing is complete, suggest: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final read-only preview, or proceed to export (PDF/PPTX).
40
- 17. Keep revising until user approves conversion stage.
41
+ 14. **Run the design gate as an adversarial quality loop** (`references/design-gate.md`) before showing the deck: (a) capture render evidence with `slides-grab png --slides-dir <path> --output-dir <path>/gate-preview --resolution 1080p`; (b) run two read-only reviewer passes — Pass A (System Contract / Constraint Integrity) and Pass B (Audience Impact / Expressive Readability) — that open the rendered PNGs directly, using runtime-native subagents/tasks in parallel when available or sequential passes when not; (c) synthesize contract coherence against audience impact into a single Design Gate Report ending in a verdict (`Proceed` / `Revise and re-review` / `Rethink approach`). Review Litmus is the shared audience-success tie-breaker, not a third pass. Keep the two reviewer passes distinct from the slide-building pass. The render evidence aims the reviewers; it is not the verdict. For `Proceed`, each pass report must satisfy the CLI-enforced structure in `references/design-gate.md`: role title, `VERDICT: PASS`, confidence, rendered PNG evidence filenames, current `slide-*.html: <sha256>` fingerprints, `Unresolved Critical: 0`, `Blocking findings: None`, a findings table, and all required checks marked `PASS`.
42
+ 15. **Repeat until the latest rendered state survives the gate.** Critical findings (unreadable text, palette violation, an AI slop trope used as a slide's primary treatment, a key slide with no real visual anchor, invented data shown as real) hard-block progress. Fix the source HTML/CSS, re-run `slides-grab validate`, capture fresh PNGs, then re-run both adversarial passes until the verdict is `Proceed` (zero unresolved Critical) or `Rethink approach` requires redesigning the visual thesis/system. When the verdict is `Proceed`, write the export-unlocking receipt with `slides-grab design-gate --slides-dir <path> --verdict proceed --pass-a-report <pass-a.md> --pass-b-report <pass-b.md>`. If the CLI rejects the reports, treat that as the loop still failing: fix the missing evidence/checks or unresolved findings, re-render, re-review, and retry. Record deferred Minor/Note findings in `<slides-dir>/design-debt.md`; never silently drop a finding.
43
+ 16. Launch the interactive editor for visual review: `slides-grab edit --slides-dir <path>`
44
+ 17. Iterate on user feedback by editing only requested slide files, then re-run validation and the design gate after each edit round that changes layout, color, typography, imagery, or content density.
45
+ 18. When the user confirms editing is complete, suggest: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final read-only preview, or proceed to export (PDF/PPTX).
46
+ 19. Keep revising until user approves conversion stage.
41
47
 
42
48
  ## Rules
43
49
  - Keep slide size 720pt x 405pt.
@@ -62,6 +68,7 @@ Generate high-quality `slide-XX.html` files in the selected slides workspace (`s
62
68
  - Prefer `tldraw` for complex diagrams instead of recreating dense node/edge diagrams directly in HTML/CSS.
63
69
  - Use `slides-grab tldraw` plus `templates/diagram-tldraw.html` when that gives a cleaner, more export-friendly result.
64
70
  - Do not present slides for review until `slides-grab validate --slides-dir <path>` passes.
71
+ - Do not present slides for review, and do not advance toward export, while any **Critical** design-gate finding is unresolved (`references/design-gate.md`). Critical hard-blocks; Major findings are listed for user acceptance; Minor/Note findings may be tracked. `slides-grab pdf`, `slides-grab convert`, and `slides-grab figma` require a fresh `slides-grab design-gate` Proceed receipt.
65
72
  - Do not start conversion before approval.
66
73
  - Use the packaged CLI and bundled references only; do not depend on unpublished agent-specific files.
67
74
 
@@ -70,4 +77,5 @@ For full constraints and style system, follow:
70
77
  - `references/design-rules.md`
71
78
  - `references/detailed-design-rules.md`
72
79
  - `references/beautiful-slide-defaults.md` — slide-specific art direction defaults adapted from OpenAI's frontend design guidance and Anthropic's Claude design system guidance (content/color discipline, system declaration, AI slop tropes)
80
+ - `references/design-gate.md` — the structured design-quality gate run after validation and before export: severity rubric (Critical/Major/Minor/Note), the seven checks, evidence-before-shipping, design-debt log, and the gate report/verdict format. Run with runtime-native subagents/tasks when available, or as two explicit sequential reviewer passes, then record Proceed with `slides-grab design-gate`.
73
81
  - `references/design-system-full.md` — archived full design system, templates, and advanced pattern guidance