@mulmocast/slide 0.4.0 → 0.5.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.
Files changed (54) hide show
  1. package/.claude/skills/extend/SKILL.md +11 -9
  2. package/.claude/skills/md-to-mulmo/SKILL.md +172 -0
  3. package/.claude/skills/narrate/SKILL.md +6 -4
  4. package/README.md +62 -16
  5. package/lib/actions/common.d.ts +1 -0
  6. package/lib/actions/common.d.ts.map +1 -1
  7. package/lib/actions/common.js +5 -2
  8. package/lib/actions/common.js.map +1 -1
  9. package/lib/actions/extend-init.js +1 -1
  10. package/lib/actions/md-to-extended.d.ts +54 -0
  11. package/lib/actions/md-to-extended.d.ts.map +1 -0
  12. package/lib/actions/md-to-extended.js +176 -0
  13. package/lib/actions/md-to-extended.js.map +1 -0
  14. package/lib/cli.js +20 -0
  15. package/lib/cli.js.map +1 -1
  16. package/lib/convert/markdown-utils.d.ts.map +1 -1
  17. package/lib/convert/markdown-utils.js +2 -1
  18. package/lib/convert/markdown-utils.js.map +1 -1
  19. package/lib/convert/marp.d.ts.map +1 -1
  20. package/lib/convert/marp.js +4 -2
  21. package/lib/convert/marp.js.map +1 -1
  22. package/lib/convert/movie.js +2 -2
  23. package/lib/convert/movie.js.map +1 -1
  24. package/lib/convert/pdf.js +1 -1
  25. package/lib/convert/pdf.js.map +1 -1
  26. package/lib/convert/pdfvision.d.ts +14 -0
  27. package/lib/convert/pdfvision.d.ts.map +1 -0
  28. package/lib/convert/pdfvision.js +247 -0
  29. package/lib/convert/pdfvision.js.map +1 -0
  30. package/lib/convert/pptx.js +1 -1
  31. package/lib/convert/pptx.js.map +1 -1
  32. package/lib/utils/audio-save.d.ts.map +1 -1
  33. package/lib/utils/audio-save.js +4 -3
  34. package/lib/utils/audio-save.js.map +1 -1
  35. package/lib/utils/bundle-server.js +1 -1
  36. package/lib/utils/bundle-server.js.map +1 -1
  37. package/lib/utils/document-analysis.d.ts +43 -0
  38. package/lib/utils/document-analysis.d.ts.map +1 -0
  39. package/lib/utils/document-analysis.js +118 -0
  40. package/lib/utils/document-analysis.js.map +1 -0
  41. package/lib/utils/markdown-parser.d.ts +28 -0
  42. package/lib/utils/markdown-parser.d.ts.map +1 -0
  43. package/lib/utils/markdown-parser.js +215 -0
  44. package/lib/utils/markdown-parser.js.map +1 -0
  45. package/lib/utils/narration-generator.d.ts +14 -0
  46. package/lib/utils/narration-generator.d.ts.map +1 -0
  47. package/lib/utils/narration-generator.js +68 -0
  48. package/lib/utils/narration-generator.js.map +1 -0
  49. package/lib/utils/vision-provider.d.ts +12 -0
  50. package/lib/utils/vision-provider.d.ts.map +1 -0
  51. package/lib/utils/vision-provider.js +105 -0
  52. package/lib/utils/vision-provider.js.map +1 -0
  53. package/package.json +7 -8
  54. package/tools/keynote/extract.scpt +1 -1
@@ -5,7 +5,7 @@ Convert a MulmoScript JSON into an ExtendedScript by adding `scriptMeta` and `be
5
5
  ## Invocation
6
6
 
7
7
  ```
8
- /extend <mulmo_script.json path> [--source <source file path>]
8
+ /extend <MulmoScript.json path> [--source <source file path>]
9
9
  ```
10
10
 
11
11
  ## CLI Commands Overview
@@ -15,10 +15,12 @@ This project uses multiple CLI tools. Do NOT confuse them:
15
15
  | Command | Package | Purpose | Input |
16
16
  |---------|---------|---------|-------|
17
17
  | `mulmo-slide` (or `yarn cli`) | `@mulmocast/slide` | Convert source files to MulmoScript, scaffold ExtendedScript | Presentation files (.pdf, .pptx, .md, .key) |
18
- | `mulmo` | `mulmocast` | Generate movie/PDF/audio from MulmoScript | `mulmo_script.json` |
18
+ | `mulmo` | `mulmocast` | Generate movie/PDF/audio from MulmoScript | `{basename}.json` |
19
19
  | `mulmocast-preprocessor` | `mulmocast-preprocessor` | Convert ExtendedScript → MulmoScript, query, summarize | `extended_script.json` |
20
20
 
21
- **IMPORTANT**: `mulmo-slide movie` and `mulmo movie` are DIFFERENT commands. Use `npx mulmo movie` (not `mulmo-slide`) when generating video from a `mulmo_script.json`.
21
+ **IMPORTANT**: `mulmo-slide movie` and `mulmo movie` are DIFFERENT commands. Use `npx mulmo movie` (not `mulmo-slide`) when generating video from a MulmoScript JSON.
22
+
23
+ **NOTE**: MulmoScript files are named `{basename}.json` (e.g., `scripts/paper/paper.json`), NOT `mulmo_script.json`.
22
24
 
23
25
  ### CLI prefix for mulmo-slide
24
26
 
@@ -36,7 +38,7 @@ Use this prefix (referred to as `{cli}` below) for `mulmo-slide` CLI calls in th
36
38
  If the MulmoScript doesn't already have an `extended_script.json`, you can create a skeleton first:
37
39
 
38
40
  ```bash
39
- {cli} extend scaffold <mulmo_script.json>
41
+ {cli} extend scaffold <MulmoScript.json>
40
42
  ```
41
43
 
42
44
  This adds beat IDs, empty metadata, and imports extracted texts as notes. You can then skip to Step 2 and analyze the scaffolded output.
@@ -50,7 +52,7 @@ Use the Read tool (not bash/node commands) to read the following files:
50
52
  3. `extracted_texts.json` in the same directory as the MulmoScript (if it exists — generated by PDF converter, provides raw text per beat)
51
53
  4. The source file:
52
54
  - If `--source` is specified, use that file
53
- - Otherwise, infer from the MulmoScript path: `scripts/{basename}/mulmo_script.json` -> search for `samples/{basename}.*` (try `.md`, `.pptx`, `.pdf`, `.key`)
55
+ - Otherwise, infer from the MulmoScript path: `scripts/{basename}/{basename}.json` -> search for `samples/{basename}.*` (try `.md`, `.pptx`, `.pdf`, `.key`)
54
56
  - If no source file found, work from the MulmoScript content and extracted texts alone
55
57
 
56
58
  ### Step 2: Analyze Content
@@ -110,18 +112,18 @@ Based on the analysis, generate:
110
112
  ### Step 5: Write and Validate Output
111
113
 
112
114
  1. Determine output path:
113
- - Same directory as input: replace `mulmo_script.json` with `extended_script.json`
114
- - Example: `scripts/simple_text/mulmo_script.json` -> `scripts/simple_text/extended_script.json`
115
+ - Same directory as input: replace `{basename}.json` with `extended_script.json`
116
+ - Example: `scripts/simple_text/simple_text.json` -> `scripts/simple_text/extended_script.json`
115
117
  2. Write the JSON with 2-space indentation
116
118
  3. Run `{cli} extend validate <output_path>` to validate against the schema
117
119
  4. If validation fails, fix the errors and re-write the file, then validate again
118
120
  5. Generate MulmoScript from ExtendedScript using the preprocessor:
119
121
  ```bash
120
- npx mulmocast-preprocessor <extended_script.json> -o <mulmo_script.json>
122
+ npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/{basename}.json
121
123
  ```
122
124
  Note: The preprocessor may not fully strip `scriptMeta`. If `mulmo movie` fails with "Unrecognized key" errors, manually strip remaining fields with a node one-liner:
123
125
  ```bash
124
- node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('<mulmo_script.json>','utf8'));delete d.scriptMeta;delete d.outputProfiles;d.beats.forEach(b=>{delete b.meta;delete b.variants});fs.writeFileSync('<mulmo_script.json>',JSON.stringify(d,null,2))"
126
+ node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('scripts/{basename}/{basename}.json','utf8'));delete d.scriptMeta;delete d.outputProfiles;d.beats.forEach(b=>{delete b.meta;delete b.variants});fs.writeFileSync('scripts/{basename}/{basename}.json',JSON.stringify(d,null,2))"
125
127
  ```
126
128
  6. Display a summary to the user:
127
129
  - Number of beats processed
@@ -0,0 +1,172 @@
1
+ # /md-to-mulmo - Markdown to ExtendedScript Conversion
2
+
3
+ Convert a structured markdown document into an ExtendedScript with intelligent beat allocation, narration, metadata, and variant support for detailed/short output profiles.
4
+
5
+ ## Invocation
6
+
7
+ ```
8
+ /md-to-mulmo <markdown file path>
9
+ ```
10
+
11
+ ## CLI Commands Overview
12
+
13
+ | Command | Package | Purpose | Input |
14
+ |---------|---------|---------|-------|
15
+ | `mulmo-slide` (or `yarn cli`) | `@mulmocast/slide` | Convert source files, parse markdown, assemble ExtendedScript | `.md`, `.pdf`, `.pptx`, etc. |
16
+ | `mulmo` | `mulmocast` | Generate movie/PDF/audio from MulmoScript | `{basename}.json` |
17
+ | `mulmocast-preprocessor` | `mulmocast-preprocessor` | Convert ExtendedScript → MulmoScript, query, summarize | `extended_script.json` |
18
+
19
+ ### CLI prefix for mulmo-slide
20
+
21
+ Determine the correct CLI command prefix:
22
+ - If `package.json` exists in the project root and its `name` is `"@mulmocast/slide"` → use `yarn cli`
23
+ - Otherwise → use `npx mulmo-slide`
24
+ - NEVER create a `package.json` for this purpose
25
+
26
+ Use this prefix (referred to as `{cli}` below) for all `mulmo-slide` CLI calls.
27
+
28
+ ## Instructions
29
+
30
+ ### Step 1: Parse Markdown and Generate Schemas
31
+
32
+ Run the parse-md command to extract document structure and generate JSON Schemas:
33
+
34
+ ```bash
35
+ {cli} parse-md <markdown file>
36
+ ```
37
+
38
+ This produces in `scripts/{basename}/`:
39
+ - `parsed_structure.json` — structured markdown sections with typed elements
40
+ - `extended-script.schema.json` — ExtendedScript JSON Schema (generated from Zod every run)
41
+ - `presentation-plan.schema.json` — intermediate format JSON Schema
42
+
43
+ ### Step 2: Read Inputs
44
+
45
+ Use the Read tool to read:
46
+
47
+ 1. `scripts/{basename}/parsed_structure.json`
48
+ 2. `scripts/{basename}/presentation-plan.schema.json`
49
+ 3. The original markdown file (for full context)
50
+
51
+ ### Step 3: Create Presentation Plan
52
+
53
+ Analyze the parsed structure and create `presentation_plan.json` conforming to the plan schema.
54
+
55
+ **Key decisions to make:**
56
+
57
+ 1. **Beat allocation** (sections ≠ beats):
58
+ - Multiple sections can be consolidated into one beat
59
+ - One dense section can be split across multiple beats
60
+ - Aim for 8-15 beats for a typical document
61
+ - Each beat should be a coherent, presentable unit
62
+
63
+ 2. **Slide content** (`slideMarkdown`):
64
+ - Concise, presentation-ready markdown for the visual slide
65
+ - NOT a copy of the source — distill to key points, headings, bullet lists
66
+ - Include tables, mermaid diagrams, code blocks when they are the focus
67
+ - Each slide should be understandable at a glance
68
+
69
+ 3. **Narration** (`narration`):
70
+ - Natural spoken language explaining the slide content
71
+ - Add context and insight beyond what's on the slide
72
+ - Write in the document's language (specified by `lang`)
73
+
74
+ 4. **Core vs optional** (`isCore` / `shortNarration`):
75
+ - `isCore: true`: Essential beats included in ALL output profiles
76
+ - `isCore: false`: Detailed-only beats, skipped in short version
77
+ - `shortNarration`: Condensed narration for short profile (null = skip beat in short)
78
+ - Typical: 60-70% core, 30-40% optional
79
+ - Introduction and conclusion beats should always be core
80
+
81
+ 5. **Script metadata** (`scriptMeta`):
82
+ - `audience`: Target audience
83
+ - `goals`: 2-4 learning objectives
84
+ - `keywords`: 5-10 main keywords
85
+ - `background`: Theme overview
86
+ - `references`: Extract URLs from source, categorize as web/code/document/video
87
+ - `faq`: 2-4 questions with answers
88
+
89
+ 6. **Beat metadata** (`meta`):
90
+ - `section`: Logical section (lowercase-kebab-case, consecutive beats with same section stay grouped)
91
+ - `tags`: Content type tags (intro, overview, definition, example, code, diagram, data, table, comparison, summary, conclusion)
92
+ - `context`: Background info for AI features — most important field. Add supplementary information beyond what's in the slide.
93
+ - `keywords`: 2-5 beat-specific terms
94
+ - `expectedQuestions`: 1-3 audience questions
95
+
96
+ **Output format:**
97
+
98
+ ```json
99
+ {
100
+ "lang": "ja",
101
+ "title": "Presentation Title",
102
+ "scriptMeta": {
103
+ "audience": "...",
104
+ "goals": ["..."],
105
+ "keywords": ["..."],
106
+ "background": "...",
107
+ "references": [{ "type": "web", "url": "...", "title": "..." }],
108
+ "faq": [{ "question": "...", "answer": "..." }]
109
+ },
110
+ "beats": [
111
+ {
112
+ "id": "beat-1",
113
+ "sourceSections": ["sec-0", "sec-1"],
114
+ "slideMarkdown": "# Introduction\n\n- Key point 1\n- Key point 2",
115
+ "narration": "Full narration text...",
116
+ "shortNarration": "Condensed version...",
117
+ "isCore": true,
118
+ "meta": {
119
+ "section": "introduction",
120
+ "tags": ["intro"],
121
+ "context": "Background info...",
122
+ "keywords": ["term1"],
123
+ "expectedQuestions": ["Why is this important?"]
124
+ }
125
+ }
126
+ ]
127
+ }
128
+ ```
129
+
130
+ Write this to `scripts/{basename}/presentation_plan.json`.
131
+
132
+ ### Step 4: Assemble and Validate
133
+
134
+ Run the assemble command to convert the plan to ExtendedScript:
135
+
136
+ ```bash
137
+ {cli} assemble-extended scripts/{basename}/presentation_plan.json
138
+ ```
139
+
140
+ This:
141
+ - Validates the plan against the JSON Schema (z.fromJSONSchema)
142
+ - Converts `isCore`/`shortNarration` → `variants`/`outputProfiles`
143
+ - Validates the result against ExtendedScript schema
144
+ - Outputs `scripts/{basename}/extended_script.json`
145
+
146
+ If validation fails, fix the plan and re-run.
147
+
148
+ ### Step 5: Post-processing
149
+
150
+ Generate MulmoScript from ExtendedScript:
151
+
152
+ ```bash
153
+ npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/{basename}.json
154
+ ```
155
+
156
+ ### Step 6: Summary
157
+
158
+ Display to the user:
159
+ - Total beats, core beats, optional beats
160
+ - Sections identified
161
+ - Output profiles available (detailed, short)
162
+ - File paths for extended_script.json and {basename}.json
163
+ - Next steps (e.g., `npx mulmo movie scripts/{basename}/{basename}.json`)
164
+
165
+ ## Quality Guidelines
166
+
167
+ - **slideMarkdown**: Presentation-ready, not a dump of the source. Think "what would go on a slide."
168
+ - **narration**: Natural spoken language. Add insight beyond the slide text.
169
+ - **context field**: Most important metadata. Don't restate the slide — add background, related concepts, real-world examples.
170
+ - **section naming**: lowercase-kebab-case, consistent across beats.
171
+ - **isCore judgment**: Introduction, key findings, and conclusion are always core. Examples, deep-dives, and supplementary content can be optional.
172
+ - **shortNarration**: If a core beat needs the same text in both profiles, omit shortNarration (it defaults to the full narration).
@@ -17,10 +17,12 @@ This project uses multiple CLI tools. Do NOT confuse them:
17
17
  | Command | Package | Purpose | Input |
18
18
  |---------|---------|---------|-------|
19
19
  | `mulmo-slide` (or `yarn cli`) | `@mulmocast/slide` | Convert source files to MulmoScript, scaffold ExtendedScript | Presentation files (.pdf, .pptx, .md, .key) |
20
- | `mulmo` | `mulmocast` | Generate movie/PDF/audio from MulmoScript | `mulmo_script.json` |
20
+ | `mulmo` | `mulmocast` | Generate movie/PDF/audio from MulmoScript | `{basename}.json` |
21
21
  | `mulmocast-preprocessor` | `mulmocast-preprocessor` | Convert ExtendedScript → MulmoScript, query, summarize | `extended_script.json` |
22
22
 
23
- **IMPORTANT**: `mulmo-slide movie` and `mulmo movie` are DIFFERENT commands. Use `npx mulmo movie` (not `mulmo-slide`) when generating video from a `mulmo_script.json`.
23
+ **IMPORTANT**: `mulmo-slide movie` and `mulmo movie` are DIFFERENT commands. Use `npx mulmo movie` (not `mulmo-slide`) when generating video from a MulmoScript JSON.
24
+
25
+ **NOTE**: MulmoScript files are named `{basename}.json` (e.g., `scripts/paper/paper.json`), NOT `mulmo_script.json`.
24
26
 
25
27
  ### CLI prefix for mulmo-slide
26
28
 
@@ -142,8 +144,8 @@ npx mulmocast-preprocessor query scripts/{basename}/extended_script.json -i
142
144
  npx mulmocast-preprocessor summarize scripts/{basename}/extended_script.json
143
145
 
144
146
  ## Generate a narrated video
145
- npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/mulmo_script.json
146
- npx mulmo movie scripts/{basename}/mulmo_script.json
147
+ npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/{basename}.json
148
+ npx mulmo movie scripts/{basename}/{basename}.json
147
149
  ```
148
150
 
149
151
  Ask the user if they want to adjust any narration or metadata before proceeding.
package/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![npm version](https://badge.fury.io/js/%40mulmocast%2Fslide.svg)](https://badge.fury.io/js/%40mulmocast%2Fslide)
1
2
  # MulmoCast-Slides
2
3
 
3
4
  A collection of tools to convert presentation files into MulmoScript format, enabling automated narration and processing of slide decks.
@@ -117,8 +118,8 @@ yarn movie samples/omochikaeri.pptx -g -l ja
117
118
  yarn bundle samples/sample.md -g -l ja
118
119
  ```
119
120
 
120
- **Note:** When re-running commands, the existing `mulmo_script.json` will be reused. To regenerate:
121
- - Delete the existing JSON file: `rm scripts/<basename>/mulmo_script.json`
121
+ **Note:** When re-running commands, the existing MulmoScript JSON will be reused. To regenerate:
122
+ - Delete the existing JSON file: `rm scripts/<basename>/<basename>.json`
122
123
  - Or use the `-f` (force) flag with movie/bundle: `yarn movie samples/sample.pptx -f -g`
123
124
 
124
125
  ## Unified CLI
@@ -140,6 +141,8 @@ Commands:
140
141
  mulmo-slide extend init Install Claude Code skills (/narrate, /extend)
141
142
  mulmo-slide extend validate Validate ExtendedScript JSON against schema
142
143
  mulmo-slide extend scaffold Create ExtendedScript skeleton from MulmoScript
144
+ mulmo-slide parse-md <file> Parse markdown structure for LLM presentation planning
145
+ mulmo-slide assemble-extended <file> Assemble ExtendedScript from presentation plan
143
146
  ```
144
147
 
145
148
  The `convert` command auto-detects file format by extension (.pptx, .md, .key, .pdf).
@@ -228,7 +231,7 @@ yarn test:keynote
228
231
 
229
232
  **Output:**
230
233
  - `scripts/<basename>/images/` - PNG images of each slide
231
- - `scripts/<basename>/mulmo_script.json` - MulmoScript JSON file
234
+ - `scripts/<basename>/<basename>.json` - MulmoScript JSON file
232
235
 
233
236
  ### Marp Extractor
234
237
 
@@ -263,8 +266,8 @@ yarn test:marp
263
266
 
264
267
  **Output:**
265
268
  - `scripts/<basename>/images/` - PNG images of each slide
266
- - `scripts/<basename>/mulmo_script.json` - MulmoScript JSON file (PNG format)
267
- - `scripts/<basename>/mulmo_script-markdown.json` - MulmoScript JSON file (Markdown format)
269
+ - `scripts/<basename>/<basename>.json` - MulmoScript JSON file (PNG format)
270
+ - `scripts/<basename>/<basename>-markdown.json` - MulmoScript JSON file (Markdown format)
268
271
 
269
272
  **Features:**
270
273
  - Extracts speaker notes from HTML comments (`<!-- note text -->`)
@@ -382,7 +385,7 @@ mulmo-slide markdown document.md --layout --style corporate-blue
382
385
  ```
383
386
 
384
387
  **Output:**
385
- - `scripts/<basename>/mulmo_script.json` - MulmoScript JSON file (Markdown format)
388
+ - `scripts/<basename>/<basename>.json` - MulmoScript JSON file (Markdown format)
386
389
 
387
390
  ### PowerPoint (PPTX) Converter
388
391
 
@@ -413,7 +416,7 @@ yarn pptx path/to/presentation.pptx -g -l ja
413
416
  **Output:**
414
417
  - `scripts/<basename>/` - Directory named after input file
415
418
  - `scripts/<basename>/images/<basename>-0.png, -1.png, ...` - PNG images of each slide
416
- - `scripts/<basename>/mulmo_script.json` - MulmoScript JSON file
419
+ - `scripts/<basename>/<basename>.json` - MulmoScript JSON file
417
420
 
418
421
  ### PDF Converter
419
422
 
@@ -443,7 +446,7 @@ yarn pdf path/to/presentation.pdf -g -l ja
443
446
  **Output:**
444
447
  - `scripts/<basename>/` - Directory named after input file
445
448
  - `scripts/<basename>/images/<basename>-0.png, -1.png, ...` - PNG images of each page
446
- - `scripts/<basename>/mulmo_script.json` - MulmoScript JSON file
449
+ - `scripts/<basename>/<basename>.json` - MulmoScript JSON file
447
450
 
448
451
  ## Movie Generation
449
452
 
@@ -593,12 +596,55 @@ yarn narrate samples/sample.pdf --scaffold-only
593
596
  Create an ExtendedScript skeleton from an existing MulmoScript without any LLM calls. This adds beat IDs, empty metadata fields, and imports extracted texts as notes.
594
597
 
595
598
  ```bash
596
- mulmo-slide extend scaffold scripts/basename/mulmo_script.json
599
+ mulmo-slide extend scaffold scripts/<basename>/<basename>.json
597
600
 
598
601
  # yarn (development)
599
- yarn cli extend scaffold scripts/basename/mulmo_script.json
602
+ yarn cli extend scaffold scripts/<basename>/<basename>.json
600
603
  ```
601
604
 
605
+ ## Markdown to ExtendedScript (LLM-assisted)
606
+
607
+ Convert a structured markdown document into an ExtendedScript with intelligent beat allocation, narration, and metadata. This is a multi-step process using the `/md-to-mulmo` Claude Code skill.
608
+
609
+ ### Pipeline Overview
610
+
611
+ 1. **Parse** (`parse-md`): Extract document structure and generate JSON Schemas
612
+ 2. **Plan** (LLM via `/md-to-mulmo` skill): Create presentation plan with beat allocation
613
+ 3. **Assemble** (`assemble-extended`): Convert plan to ExtendedScript with variants
614
+
615
+ ### Usage
616
+
617
+ ```bash
618
+ # Step 1: Parse markdown and generate schemas
619
+ mulmo-slide parse-md path/to/document.md
620
+
621
+ # Step 2: Use /md-to-mulmo skill in Claude Code (creates presentation_plan.json)
622
+
623
+ # Step 3: Assemble ExtendedScript from plan
624
+ mulmo-slide assemble-extended scripts/{basename}/presentation_plan.json
625
+
626
+ # Step 4: Generate MulmoScript from ExtendedScript
627
+ npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/{basename}.json
628
+ ```
629
+
630
+ **Output of `parse-md`:**
631
+ - `scripts/{basename}/parsed_structure.json` — structured markdown sections
632
+ - `scripts/{basename}/extended-script.schema.json` — ExtendedScript JSON Schema
633
+ - `scripts/{basename}/presentation-plan.schema.json` — intermediate plan schema
634
+
635
+ **Output of `assemble-extended`:**
636
+ - `scripts/{basename}/extended_script.json` — validated ExtendedScript with output profiles
637
+
638
+ ### Setup
639
+
640
+ Install the Claude Code skill:
641
+
642
+ ```bash
643
+ mulmo-slide extend init
644
+ ```
645
+
646
+ Then use `/md-to-mulmo path/to/document.md` in Claude Code.
647
+
602
648
  ## Narrate: Source File to Narrated Video (Claude Code Skill)
603
649
 
604
650
  > **Tip:** If you don't need interactive analysis and want a fully automated pipeline, use the [Narrate CLI](#narrate-cli) instead (`mulmo-slide narrate <file>`). It runs the full pipeline with OpenAI GPT-4o without requiring Claude Code.
@@ -652,8 +698,8 @@ npx mulmocast-preprocessor query scripts/{basename}/extended_script.json -i
652
698
  npx mulmocast-preprocessor summarize scripts/{basename}/extended_script.json
653
699
 
654
700
  # Generate a narrated video
655
- npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/mulmo_script.json
656
- npx mulmo movie scripts/{basename}/mulmo_script.json
701
+ npx mulmocast-preprocessor scripts/{basename}/extended_script.json -o scripts/{basename}/{basename}.json
702
+ npx mulmo movie scripts/{basename}/{basename}.json
657
703
  ```
658
704
 
659
705
  ### Validating ExtendedScript
@@ -674,7 +720,7 @@ Outputs beat count, scriptMeta presence, meta coverage percentage, and sections
674
720
  If you already have a MulmoScript and just want to add metadata:
675
721
 
676
722
  ```
677
- /extend scripts/simple_text/mulmo_script.json
723
+ /extend scripts/simple_text/simple_text.json
678
724
  ```
679
725
 
680
726
  ### Tutorials
@@ -692,10 +738,10 @@ scripts/<basename>/
692
738
  │ ├── <basename>-0.png (or images.001.png for Marp)
693
739
  │ ├── <basename>-1.png (or images.002.png for Marp)
694
740
  │ └── ...
695
- ├── mulmo_script.json # MulmoScript (all formats)
696
- └── mulmo_script-markdown.json # Marp only: Markdown format
741
+ ├── <basename>.json # MulmoScript (all formats)
742
+ └── <basename>-markdown.json # Marp only: Markdown format
697
743
  ```
698
744
 
699
745
  ## License
700
746
 
701
- MIT
747
+ MIT
@@ -29,6 +29,7 @@ export interface RunActionOptions {
29
29
  force?: boolean;
30
30
  generateText?: boolean;
31
31
  }
32
+ export declare function getMulmoScriptFilename(basename: string): string;
32
33
  export declare function getMulmoScriptPath(basename: string): string;
33
34
  export declare function runAction(commandName: string, inputFile: string, actionRunner: ActionRunner, options?: RunActionOptions): Promise<void>;
34
35
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/actions/common.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,wBAAgB,cAAc,IAAI,MAAM,CAGvC;AAGD,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC;AAIrE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAiBzD;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,E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AI,EAAE,WAAW,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD,KAAG,MAOH,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAsB,SAAS,CAC7B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAuCf"}
@@ -69,7 +69,7 @@ export async function convertToMulmoScript(filePath, fileType, options = {}) {
69
69
  stdio: "inherit",
70
70
  cwd: process.cwd(),
71
71
  });
72
- return path.join("scripts", basename, "mulmo_script.json");
72
+ return path.join("scripts", basename, getMulmoScriptFilename(basename));
73
73
  }
74
74
  }
75
75
  }
@@ -120,8 +120,11 @@ export const formatZodError = (error) => {
120
120
  })
121
121
  .join("\n");
122
122
  };
123
+ export function getMulmoScriptFilename(basename) {
124
+ return `${basename}.json`;
125
+ }
123
126
  export function getMulmoScriptPath(basename) {
124
- return path.join("scripts", basename, "mulmo_script.json");
127
+ return path.join("scripts", basename, getMulmoScriptFilename(basename));
125
128
  }
126
129
  export async function runAction(commandName, inputFile, actionRunner, options = {}) {
127
130
  const { force = false, generateText = false } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/actions/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OA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AG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAErD,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,mCAAmC,eAAe,EAAE,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,MAAM,oBAAoB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;YAElE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;gBACpC,MAAM,IAAI,KAAK,CAAC,8BAA8B,eAAe,EAAE,CAAC,CAAC;YACnE,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,8BAA8B,eAAe,EAAE,CAAC,CAAC;QAC/D,CAAC;QAED,MAAM,YAAY,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QAE/C,OAAO,CAAC,GAAG,CAAC,OAAO,WAAW,uBAAuB,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACpF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -44,6 +44,6 @@ export const runExtendInit = () => {
44
44
  console.log(`\nInstalled skills (${totalFiles} files total)`);
45
45
  console.log(`\nUsage in Claude Code:`);
46
46
  console.log(` /narrate <source file> Full pipeline (recommended)`);
47
- console.log(` /extend <mulmo_script.json> Add metadata to existing MulmoScript`);
47
+ console.log(` /extend <MulmoScript.json> Add metadata to existing MulmoScript`);
48
48
  };
49
49
  //# sourceMappingURL=extend-init.js.map
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Markdown → ExtendedScript pipeline
3
+ *
4
+ * Step 1: Generate JSON Schema from Zod (every run) + parse markdown
5
+ * Step 3: Assemble ExtendedScript from presentation plan
6
+ * Step 4: Validate against ExtendedScript schema
7
+ *
8
+ * Step 2 (LLM presentation planning) is handled by the /md-to-mulmo skill.
9
+ */
10
+ import type { ExtendedScript } from "@mulmocast/extended-types";
11
+ interface BeatPlan {
12
+ id: string;
13
+ sourceSections: string[];
14
+ slideMarkdown: string;
15
+ narration: string;
16
+ shortNarration?: string | null;
17
+ isCore: boolean;
18
+ meta: {
19
+ tags?: string[];
20
+ section?: string;
21
+ context?: string;
22
+ keywords?: string[];
23
+ expectedQuestions?: string[];
24
+ };
25
+ }
26
+ interface PresentationPlan {
27
+ lang: string;
28
+ title?: string;
29
+ scriptMeta: Record<string, unknown>;
30
+ beats: BeatPlan[];
31
+ }
32
+ export declare const generateSchemas: (outputDir: string) => {
33
+ extendedSchemaPath: string;
34
+ planSchemaPath: string;
35
+ };
36
+ export declare const runParseMd: (inputPath: string) => void;
37
+ export declare const assembleExtendedScript: (plan: PresentationPlan) => ExtendedScript;
38
+ export declare const validateExtendedScript: (data: unknown) => {
39
+ success: true;
40
+ data: ExtendedScript;
41
+ } | {
42
+ success: false;
43
+ errors: string;
44
+ };
45
+ export declare const validatePresentationPlan: (data: unknown) => {
46
+ success: true;
47
+ data: PresentationPlan;
48
+ } | {
49
+ success: false;
50
+ errors: string;
51
+ };
52
+ export declare const runAssembleExtended: (inputPath: string) => void;
53
+ export {};
54
+ //# sourceMappingURL=md-to-extended.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"md-to-extended.d.ts","sourceRoot":"","sources":["../../src/actions/md-to-extended.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,OAAO,KAAK,EAAE,cAAc,EAA6B,MAAM,2BAA2B,CAAC;AAM3F,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAA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