@lalalic/markcut 2.2.8 → 2.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.
Files changed (46) hide show
  1. package/package.json +2 -1
  2. package/skills/markcut/SKILL.md +11 -9
  3. package/skills/markcut/docs/markdown-descriptive.md +1 -1
  4. package/src/config.mjs +60 -63
  5. package/src/descriptive/resolve.ts +3 -2
  6. package/src/player/pipeline.mjs +64 -21
  7. package/src/render/cli.mjs +42 -69
  8. package/src/vision/cli.mjs +21 -45
  9. package/skills/markcut/docs/edit-mode.md +0 -220
  10. package/skills/markcut/docs/label-mode.md +0 -112
  11. package/skills/markcut/docs/template.md +0 -212
  12. package/skills/markcut/docs/templates/courseware/TEMPLATE.md +0 -526
  13. package/skills/markcut/docs/templates/courseware/agents/reviewer.md +0 -84
  14. package/skills/markcut/docs/templates/courseware/prompts/fix.md +0 -30
  15. package/skills/markcut/docs/templates/courseware/prompts/outline.md +0 -58
  16. package/skills/markcut/docs/templates/courseware/prompts/scene.md +0 -70
  17. package/skills/markcut/docs/templates/deep-dive/TEMPLATE.md +0 -354
  18. package/skills/markcut/docs/templates/deep-dive/agents/researcher.md +0 -69
  19. package/skills/markcut/docs/templates/deep-dive/agents/reviewer.md +0 -108
  20. package/skills/markcut/docs/templates/deep-dive/prompts/fix.md +0 -28
  21. package/skills/markcut/docs/templates/deep-dive/prompts/outline.md +0 -102
  22. package/skills/markcut/docs/templates/deep-dive/prompts/script.md +0 -64
  23. package/skills/markcut/docs/templates/illustrated-book/TEMPLATE.md +0 -356
  24. package/skills/markcut/docs/templates/illustrated-book/agents/reviewer.md +0 -115
  25. package/skills/markcut/docs/templates/illustrated-book/prompts/fix.md +0 -29
  26. package/skills/markcut/docs/templates/illustrated-book/prompts/illustration.md +0 -35
  27. package/skills/markcut/docs/templates/illustrated-book/prompts/story.md +0 -69
  28. package/skills/markcut/docs/templates/short-film/TEMPLATE.md +0 -385
  29. package/skills/markcut/docs/templates/short-film/agents/reviewer.md +0 -115
  30. package/skills/markcut/docs/templates/short-film/prompts/fix.md +0 -29
  31. package/skills/markcut/docs/templates/short-film/prompts/screenplay.md +0 -101
  32. package/skills/markcut/docs/templates/short-film/prompts/storyboard.md +0 -54
  33. package/skills/markcut/docs/templates/short-video/TEMPLATE.md +0 -301
  34. package/skills/markcut/docs/templates/short-video/agents/reviewer.md +0 -94
  35. package/skills/markcut/docs/templates/short-video/prompts/fix.md +0 -27
  36. package/skills/markcut/docs/templates/short-video/prompts/script.md +0 -65
  37. package/skills/markcut/docs/templates/vlog/TEMPLATE.md +0 -326
  38. package/skills/markcut/docs/templates/vlog/agents/reviewer.md +0 -89
  39. package/skills/markcut/docs/templates/vlog/agents/story-writer.md +0 -100
  40. package/skills/markcut/docs/templates/vlog/prompts/bgm-select.md +0 -38
  41. package/skills/markcut/docs/templates/vlog/prompts/group-clips.md +0 -93
  42. package/skills/markcut/docs/templates/vlog/prompts/local-context.md +0 -59
  43. package/skills/markcut/docs/templates/vlog/prompts/outline.md +0 -56
  44. package/skills/markcut/docs/templates/vlog/prompts/review-fix.md +0 -27
  45. package/skills/markcut/docs/templates/vlog/prompts/storyboard.md +0 -41
  46. package/src/render/cli.test.ts +0 -13
@@ -1,58 +0,0 @@
1
- # Prompt: Course Outline
2
-
3
- > Fill every `{placeholder}`, then execute in your own (orchestrator) context.
4
- > Output feeds `prompts/scene.md` and must be confirmed by the user before scene writing.
5
-
6
- ---
7
-
8
- You are an instructional designer planning a {duration_min}-minute video course.
9
-
10
- Topic / source material:
11
-
12
- {material}
13
-
14
- Audience: {audience}
15
- Language(s): {languages}
16
-
17
- Requirements:
18
-
19
- - Structure: 1 hook + 1 title slide + 3–6 concept sections + 1 summary.
20
- - Total narration budget ≈ {duration_min} × 150 words. Allocate a word budget per section; the sum must fit the budget.
21
- - Per concept section provide:
22
- - title (≤ 5 words)
23
- - 3–6 key points, each as `**bold key phrase** — short elaboration`
24
- - one concrete example (real product, scenario, or story) — gets its own key point
25
- - whether the content is comparative → table (if yes, name the columns)
26
- - whether a mermaid diagram would help (flowchart, architecture, timeline)
27
- - per-bullet **image/video suggestion** (a concrete visual that illustrates this point)
28
- - word budget
29
- - Summary: one comparison table spanning all concepts (name the columns) + a selection/decision guide ("If X → use Y").
30
- - Hook: one vivid visual idea usable as an image/video generation prompt, OR a provocative question if generation is unavailable.
31
- - Stay strictly within the given material plus well-established knowledge. No invented facts, numbers, or citations.
32
-
33
- Output format (markdown):
34
-
35
- ```
36
- ## Hook
37
- - visual: <generation prompt or question>
38
-
39
- ## Concept 1: <title>
40
- - points:
41
- - **<key phrase>** — <elaboration>
42
- - ... (last point = the concrete example)
43
- - images:
44
- - bullet 1: <description of visual — screenshot, diagram, photo, icon>
45
- - bullet 2: <description>
46
- - ...
47
- - table: no | yes (<col1>, <col2>, ...)
48
- - mermaid: no | yes (<type and description of diagram>)
49
- - words: <n>
50
-
51
- ## Concept 2: ...
52
-
53
- ## Summary
54
- - table columns: <dimension>, <per-concept columns...>
55
- - guide:
56
- - <condition> → <concept>
57
- - words: <n>
58
- ```
@@ -1,70 +0,0 @@
1
- # Prompt: Concept Scene (slide + script)
2
-
3
- > Fill every `{placeholder}`, then execute in your own (orchestrator) context.
4
- > Run once per outline section (TitleSlide, each Concept, Summary).
5
- > Constraints below mirror TEMPLATE.md §2/§3 — the reviewer checks against them.
6
-
7
- ---
8
-
9
- You are writing one scene of a {duration_min}-minute course for a {audience} audience.
10
-
11
- Outline section:
12
-
13
- {outline_section}
14
-
15
- Course context (for continuity — do not repeat content already covered):
16
-
17
- {outline_full}
18
-
19
- Produce, for language(s) {languages}:
20
-
21
- **A. Slide source** (markdown, rendered by `<Slide>`):
22
-
23
- - `##` heading = section title
24
- - ≤ 6 bullets, shape: `<emoji> **bold key phrase** — short elaboration`
25
- - consistent emoji set across the course: {emoji_set}
26
- - markdown table if the outline marks this section comparative
27
- - `>` quote block only for a single memorable takeaway line
28
- - no bullet may exceed one line at 1.3em / 1920px width (~90 chars)
29
- - Optional mermaid diagram: add a fenced mermaid code block after the bullet list (` ```mermaid ...``` `) for flowcharts or architecture visuals.
30
- - **For each bullet, suggest a visual** (image, diagram, screenshot, or icon) that could accompany it. The visual should show something concrete: a screenshot, a diagram step, a photo, etc.
31
-
32
- **B. Narration script** (per language, **one paragraph per bullet**):
33
-
34
- - **One paragraph per bullet** — never merge bullets into a single script. Each paragraph becomes a separate `- script "..."` node with `on:(start, <sceneId>.current=N)`.
35
- - Paragraph length ≈ **15–30 words** per beat (~6–12s at 2.5 w/s).
36
- - Each paragraph **expands** its bullet — never reads it verbatim.
37
- - Spoken register: short sentences, no markdown, no stage directions.
38
- - The concrete example gets its own bullet and its own paragraph. Place it last (final beat of the scene).
39
- - For TitleSlide: 1 paragraph (just the welcome/introduction line).
40
- - For Summary: 1 paragraph per row in the comparison table + 1 final closing paragraph ("Thank you for watching…").
41
-
42
- Output format:
43
-
44
- ```
45
- ### <SceneName (PascalCase, no spaces)>
46
-
47
- ~~~md source
48
- <slide markdown>
49
- ~~~
50
- <one extra fenced block per additional language: ~~~md <lang>-source>
51
-
52
- script (en):
53
- <p1: describes bullet 1>
54
-
55
- <p2: describes bullet 2>
56
-
57
- <p3: describes bullet 3 — concrete example>
58
-
59
- image suggestions:
60
- <bullet 1: brief description of visual — e.g. GitHub commit diff screenshot>
61
- <bullet 2: brief description of visual — e.g. unique hash diagram>
62
- <bullet 3: brief description of visual — e.g. PR timeline graphs>
63
-
64
- script (<lang>):
65
- <p1 translation>
66
-
67
- <p2 translation>
68
-
69
- <p3 translation>
70
- ```
@@ -1,354 +0,0 @@
1
- ---
2
- name: deep-dive
3
- description: 深度解读 — turn a complex topic, problem, or phenomenon into a thorough video-essay style analysis with evidence, multiple perspectives, citations, and synthesis.
4
- when-to-use: video essays, investigative deep dives, philosophical explorations, science explainers, cultural criticism, political analysis — 3-20 minute long-form analytical content
5
- engine: "@lalalic/markcut — run via `npx @lalalic/markcut`"
6
- ---
7
-
8
- # Deep Dive (深度解读) Template
9
-
10
- Follow this file top to bottom. Read the markcut skill (`SKILL.md` → `docs/markdown-descriptive.md`) first if you have not.
11
-
12
- ```mermaid
13
- flowchart LR
14
- Topic[📥 Topic / Problem / Phenomenon] --> Research[🔍 researcher agent<br/>evidence + sources]
15
- Research --> Outline[📝 outline.md<br/>narrative arc]
16
- Outline --> Script[✍️ script.md<br/>scene-by-scene]
17
- Script --> Storyboard[📄 deep-dive.md]
18
- BGM["🎵 BGM (optional)"] --> Storyboard
19
- Media["🖼️ src:auto / archival / citations"] --> Storyboard
20
- Storyboard --> Render[🎬 npx markcut render]
21
- Render --> MP4[📺 final.mp4]
22
- MP4 --> Reviewer[🔍 reviewer agent]
23
- Reviewer -->|FAIL| Fix[🔧 fix]
24
- Fix --> Storyboard
25
- Reviewer -->|PASS| Done[✅ Done]
26
- ```
27
-
28
- | Path | Runs in | Purpose |
29
- |---|---|---|
30
- | `TEMPLATE.md` | your context | everything |
31
- | `prompts/*.md` | your context | fill-in prompts you execute |
32
- | `agents/*.md` | separate session | subagent definitions |
33
-
34
- ## 0. Prerequisites
35
-
36
- - `npx @lalalic/markcut` runnable
37
- - `ffmpeg`/`ffprobe/exiftool` on PATH
38
- - Web search capability (for research phase)
39
- - ITT/TTV CLI (for `src:auto` visuals) — optional but recommended
40
- - For reviewer: image-understanding capability, STT CLI
41
-
42
- ## 1. Inputs — collect before starting
43
-
44
- | Input | Required | Default | Notes |
45
- |---|---|---|---|
46
- | Topic / problem / phenomenon | **yes** | — | what to analyze. Can be a question ("Why do democracies fail?"), a phenomenon ("The rise of remote work"), a problem ("Plastic pollution"), or a cultural object ("Oppenheimer") |
47
- | Source material | no | — | optional: article URL, book title, research paper, documentary to reference |
48
- | Language | no | en | narration language |
49
- | Tone | no | `analytical` | `analytical` (neutral, evidence-driven), `opinionated` (strong thesis, persuasive), `philosophical` (open-ended, reflective), `investigative` (detective-like, reveals) |
50
- | Target duration | no | 8 min | 3–20 min. Longer formats need deeper scene breakdown |
51
- | Depth | no | `moderate` | `overview` (surface-level, broad), `moderate` (some depth, 3-5 angles), `deep` (thorough, 5-10 angles, academic-level) |
52
- | Voice | no | | mlx-audio voice per language |
53
- | BGM style | no | `ambient` | background music mood. Optional — deep dives can work without BGM |
54
-
55
- **Core rule: Every factual claim must be supported by a source.** If you cannot find a source for a claim, either qualify it ("some argue that...", "it's believed that...") or remove it. Cite sources on screen (see §3).
56
-
57
- ## 2. Scene grammar — narrative architecture
58
-
59
- ### The deep dive arc
60
-
61
- A deep dive is not a lecture and not a highlight reel — it's a **narrative journey** through a topic. The canonical arc:
62
-
63
- ```
64
- # video ← root: width:1920 height:1080 fps:30 layout:series
65
- │ subtitle:{fontSize:"24px"}
66
- │ transition:fade(0.5)
67
- ├── ## Hook ← 15–30s. The question, the contradiction, the mystery
68
- ├── ## Context ← 30–60s. Background the audience needs
69
- ├── ## Thesis ← 15–30s. Your central argument / framing
70
- ├── ## Angle 1 ← 1–3 min. First perspective / evidence block
71
- │ │ (may contain multiple sub-scenes)
72
- │ ├── {scene} ← Claim → Evidence → Source → Analysis
73
- │ ├── {scene} ← Repeat for each sub-point
74
- │ └── ...
75
- ├── ## Angle 2 ← 1–3 min. Second perspective
76
- ├── ## Angle 3 ← 1–3 min. (optional, depth-dependent)
77
- ├── ## Counterpoint ← 30–60s. The opposing view (fairly stated)
78
- ├── ## Rebuttal / Synthesis ← 30–60s. Why the counterpoint doesn't fully hold, or synthesis
79
- └── ## Conclusion ← 30–60s. Restate thesis, broader implication, call to reflection
80
- ```
81
-
82
- ### Scene timing template
83
-
84
- | Section | Duration | Purpose |
85
- |---|---|---|
86
- | Hook | 15–30s | Arresting question, contradiction, or provocative claim. No context yet. |
87
- | Context | 30–60s | Background: history, definitions, prior work. What the audience MUST know. |
88
- | Thesis | 15–30s | Clear statement of your argument/framing. "I argue that..." |
89
- | Angle×N | 1–3 min each | Evidence blocks. Each angle = one perspective or dimension of the topic |
90
- | Counterpoint | 30–60s | Fair presentation of the strongest opposing view |
91
- | Synthesis | 30–60s | Why the evidence points your way, or a nuanced middle ground |
92
- | Conclusion | 30–60s | Broader implication, call to reflection, closing thought |
93
-
94
- ### Scene types (within sections)
95
-
96
- Each section contains 1–5 scenes. A scene is one of these types:
97
-
98
- **Claim scene** — A point is stated, then supported:
99
- ```
100
- ## Main Idea
101
- layout:parallel
102
- - image src:auto prompt:"<metaphorical or illustrative visual>" duration:10
103
- - subtitle src:"<the claim — one clear sentence>" duration:10 type:Fade
104
- - script "<narration expanding the claim, citing sources>"
105
- ```
106
-
107
- **Evidence scene** — Data, quote, or case study:
108
- ```
109
- ## The Data
110
- layout:parallel
111
- - image src:auto prompt:"<visual related to the data>" duration:8
112
- - subtitle src:"<key statistic or quote>" duration:8 type:Typewriter
113
- style:"fontSize:36px;color:#ffd700"
114
- - script "<narration explaining what this evidence means>"
115
- ```
116
-
117
- **Source citation scene** — Attribution overlay:
118
- ```
119
- ## Source
120
- layout:parallel
121
- - image src:auto prompt:"<academic or documentary feel>" duration:4
122
- - subtitle src:"— Smith (2023), Journal of Political Science" duration:4 type:Fade
123
- style:"fontSize:20px;color:#aaa;fontStyle:italic"
124
- ```
125
-
126
- **Comparison scene** — Two-column or before/after:
127
- ```
128
- ## Two Views
129
- layout:parallel
130
- - component isBackground:true jsx:"<SplitComparison left='View A' right='View B' />"
131
- - script "<narration comparing the two perspectives>"
132
- ```
133
-
134
- **Transition scene** — Brief pause, signaling a shift:
135
- ```
136
- ## Shifting Gears
137
- layout:parallel
138
- - image src:auto prompt:"<transition visual — doorway, turning page>" duration:3
139
- - subtitle src:"But there's another way to look at this..." duration:3 type:Fade
140
- ```
141
-
142
- ### Scene count guide
143
-
144
- | Depth | Sections | Total scenes | Duration |
145
- |---|---|---|---|
146
- | overview | Hook + Context + Thesis + 2 angles + Counterpoint + Synthesis + Conclusion | 10–18 | 3–5 min |
147
- | moderate | Hook + Context + Thesis + 3 angles + Counterpoint + Synthesis + Conclusion | 15–28 | 5–10 min |
148
- | deep | Hook + Context + Thesis + 4–6 angles + Counterpoint + Rebuttal + Synthesis + Conclusion | 25–50 | 10–20 min |
149
-
150
- ### Visual style for each tone
151
-
152
- | Tone | Visual approach | Pacing | Music |
153
- |---|---|---|---|
154
- | analytical | clean diagrams, data viz, archival footage, minimal text | steady, 10–30s per scene | ambient, subtle |
155
- | opinionated | bold text overlays, dramatic imagery, reaction clips | dynamic, 5–15s per scene | building, persuasive |
156
- | philosophical | nature visuals, slow pans, negative space, poetic imagery | slow, 15–40s per scene | sparse or none |
157
- | investigative | document-style, maps, photos, timeline graphics, evidence close-ups | varied, 8–25s per scene | tense, mysterious |
158
-
159
- ## 3. Authoring rules — the analytical bar
160
-
161
- ### Research quality (see `prompts/outline.md` and `agents/researcher.md`)
162
-
163
- Every deep dive is built on evidence. Before writing any scene:
164
- 1. **Research the topic** thoroughly using web search. Find: key facts, statistics, expert quotes, opposing views, historical context.
165
- 2. **For each factual claim**, note the source (URL, book title with page, paper with DOI). If no source exists for a claim, either remove it or soften it ("some suggest...").
166
- 3. **Present counterpoints fairly**: the "steel man" version of opposing views, not a straw man. If you can't steel-man an opposing view, acknowledge the uncertainty.
167
- 4. **Multiple perspectives** are the heart of a deep dive. A monological "this is correct" piece is a lecture, not a deep dive. Always include at least one counterpoint.
168
-
169
- ### Narration script
170
-
171
- - **Conversational but precise**: Write for the ear, but don't sacrifice accuracy. Use everyday language for complex ideas.
172
- - **Pacing**: 2.5–3 words/second. A 30s scene ≈ 75–90 words.
173
- - **Scene-level hook**: Every scene should have a mini-hook in its first sentence — why should the viewer keep watching through this scene?
174
- - **Transitions**: End each scene/section with a hook into the next ("But that's only half the story...").
175
- - **No filler**: No "as we can see," "it's important to note that," "in order to understand X we must first..." — cut these.
176
- - **Citations in narration**: "According to a 2023 study in Nature..." not "A study said..."
177
-
178
- ### On-screen citations
179
-
180
- Every time you cite a source in narration, add a brief citation scene or overlay:
181
- ```markdown
182
- ## Source
183
- layout:parallel
184
- - image src:auto prompt:"<related visual>" duration:4
185
- - subtitle src:"— Smith (2023), Journal of Political Science" duration:4 type:Fade
186
- style:"fontSize:20px;color:#888;fontStyle:italic"
187
- ```
188
-
189
- For dense deep dives, use root-level citation slides between sections rather than per-claim — but the narration must still name the source.
190
-
191
- ### Subtitle / text overlay rules
192
-
193
- - **Font size**: 28–48px for main text (smaller than short-video — deep dive viewers read more).
194
- - **Key claims**: 36–48px, bold, centered.
195
- - **Citations**: 18–24px, italic, bottom-right or bottom-center, subtle color.
196
- - **Data / statistics**: 40–56px, prominent, colored (`#ffd700` for emphasis).
197
- - **Quotes**: 32–40px, with quotation marks, citation below.
198
-
199
- ### Visual rhythm
200
-
201
- - **Variety is critical**: Don't use the same visual pattern for every scene. Mix: full-screen imagery, split screens, text-only, data visualization, b-roll, talking head.
202
- - **B-roll relevance**: Every visual should serve the argument. Avoid generic "filler" stock footage. If a concept is abstract, use metaphorical or illustrative visuals that provoke thought.
203
- - **Scene length variety**: Within a section, mix short scenes (3–5s for impact) with longer ones (15–30s for explanation). A constant rhythm is monotonous.
204
-
205
- ### BGM
206
-
207
- Optional but recommended. Use `foreground:true` for ducking:
208
- ```markdown
209
- - audio isBackground:true foreground:true src:bgm.mp3 volume:0.08
210
- ```
211
-
212
- Volume lower than other formats (0.05–0.10) — deep dive TTS clarity is paramount. For philosophical or heavy topics, consider no BGM at all (silence can be powerful).
213
-
214
- ### Multi-language (variants)
215
-
216
- - Same `# <lang>` variant block pattern as courseware.
217
- - For bilingual deep dives, ensure both translations match in nuance — translation errors in analytical content are serious.
218
-
219
- ## 4. Components & styles
220
-
221
- ### Optional: Comparison / Split-screen component
222
-
223
- When comparing two ideas, images, or perspectives:
224
-
225
- ```jsx
226
- export function SplitComparison({ left, right, leftLabel = '', rightLabel = '' }) {
227
- return (
228
- <div style={{
229
- display: 'flex', width: '100%', height: '100%',
230
- position: 'absolute', inset: 0,
231
- }}>
232
- <div style={{
233
- flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center',
234
- background: 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)',
235
- fontSize: 36, color: '#e0e0e6', padding: 40, textAlign: 'center',
236
- flexDirection: 'column', gap: 12,
237
- }}>
238
- {left}
239
- {leftLabel && <span style={{ fontSize: 18, color: '#888', marginTop: 8 }}>{leftLabel}</span>}
240
- </div>
241
- <div style={{
242
- width: 2, background: 'rgba(255,255,255,.1)',
243
- }} />
244
- <div style={{
245
- flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center',
246
- background: 'linear-gradient(135deg, #16213e 0%, #0f3460 100%)',
247
- fontSize: 36, color: '#f5f5f7', padding: 40, textAlign: 'center',
248
- flexDirection: 'column', gap: 12,
249
- }}>
250
- {right}
251
- {rightLabel && <span style={{ fontSize: 18, color: '#888', marginTop: 8 }}>{rightLabel}</span>}
252
- </div>
253
- </div>
254
- )
255
- }
256
- ```
257
-
258
- ### Stylesheet (optional)
259
-
260
- If you want a consistent overlay style for citations and footnotes:
261
- ```css
262
- ~~~css stylesheet
263
- .citation {
264
- font-size: 20px;
265
- color: #888;
266
- font-style: italic;
267
- text-align: right;
268
- position: absolute;
269
- bottom: 40px;
270
- right: 40px;
271
- }
272
- .stat {
273
- font-size: 52px;
274
- color: #ffd700;
275
- font-weight: 800;
276
- text-align: center;
277
- }
278
- .quote-text {
279
- font-size: 38px;
280
- color: #f5f5f7;
281
- font-style: italic;
282
- text-align: center;
283
- padding: 0 60px;
284
- line-height: 1.5;
285
- }
286
- ~~~
287
- ```
288
-
289
- ## 5. Workflow
290
-
291
- ### Phase 0: Research
292
-
293
- 1. **Understand the topic** — Read the topic/source material. Identify:
294
- - Core question or problem
295
- - Key dimensions / angles
296
- - Known facts vs contested areas
297
- - Potential sources and evidence
298
-
299
- 2. **Research** — Fill `prompts/outline.md` with the topic. This produces:
300
- - Research summary with key facts, sources, statistics
301
- - Narrative arc: hook angle → angles → counterpoint → synthesis
302
- - Evidence map: what supports each point
303
-
304
- **Alternative (deeper)**: Run `agents/researcher.md` in a separate session. It returns a structured research document with sources for every claim.
305
-
306
- 3. **Review research**: Every factual claim must have a source. If sources are weak, note uncertainty in the narration.
307
-
308
- ### Phase 1: Outline
309
-
310
- 4. **Narrative arc** — Using the research, write the scene outline: sections, scene types, key claims, and evidence per scene. Use `prompts/script.md` or write directly.
311
-
312
- ### Phase 2: Storyboard
313
-
314
- 5. **Write scenes** — For each section in the outline, write the markcut markdown:
315
- - Choose scene types (claim, evidence, source, comparison, transition)
316
- - Write narration (conversational but precise, sourced)
317
- - Add on-screen citations for every source
318
- - Choose visuals (`src:auto` prompts or archival imagery)
319
- - Add effects for transitions between scenes
320
-
321
- 6. **Assemble deep-dive.md** — Compile all sections into a single markcut file following §2 grammar. Root config includes TTS voice and subtitle defaults. Add optional BGM.
322
-
323
- ### Phase 3: Render & Review
324
-
325
- 7. **Render** — `npx @lalalic/markcut render deep-dive.md`. On errors: fix and re-render, max 3 per error.
326
-
327
- 8. **Review (quality gate)** — Run `agents/reviewer.md` in a fresh separate session. Pass: `deep-dive.md`, rendered MP4, `TEMPLATE.md`, target duration, language, tone, depth. Returns `{verdict, findings[]}`.
328
-
329
- 9. **Fix loop** — On FAIL: fill `prompts/fix.md` with findings, edit, re-render, re-review. Max 3 iterations, then escalate.
330
-
331
- ## 6. Quality gate — exit criteria
332
-
333
- Done only when ALL hold:
334
-
335
- - [ ] reviewer verdict = `PASS` (zero blocker/major findings)
336
- - [ ] total duration within ±15% of target
337
- - [ ] structure matches §2 arc (hook → context → thesis → angles×N → counterpoint → synthesis → conclusion)
338
- - [ ] hook is engaging (question, contradiction, or provocative claim — not a bland introduction)
339
- - [ ] at least one counterpoint presented fairly (steel-manned, not straw-manned)
340
- - [ ] every factual claim in narration is sourced (spot-check 5 claims: each has a citation scene or in-narration attribution)
341
- - [ ] no fabricated sources, quotes, statistics, or studies
342
- - [ ] no blank/black frames; visuals are relevant (not generic filler)
343
- - [ ] STT transcript matches script lines (≥85% content match)
344
- - [ ] scene types are varied (not all claim scenes — mix of evidence, citation, transition, comparison)
345
- - [ ] BGM (if present) ducked under voice, volume ≤0.10
346
- - [ ] tone matches chosen style (analytical/opinionated/philosophical/investigative)
347
- - [ ] total scenes and section count appropriate for depth level (see §2 table)
348
-
349
- ## 7. Reference
350
-
351
- - Golden example: See `tests/fixtures/templates/courseware.md` for the template format.
352
- - For comparison scenes: use the `SplitComparison` component from §4.
353
- - For citation formatting: follow APA/MLA style adapted for on-screen readability.
354
- - Effect reference: `fadeIn`, `zoomIn`, `slideInLeft`, `slideInRight` for scene transitions.
@@ -1,69 +0,0 @@
1
- ---
2
- name: deep-dive-researcher
3
- description: Research a topic thoroughly for a deep-dive video essay. Returns structured evidence with sources for every claim. Runs in a separate session with web search capability.
4
- context: fresh
5
- mode: read-only
6
- tools: web search, read
7
- ---
8
-
9
- # System prompt
10
-
11
- You are a research assistant for a video essay. Your job is to find **evidence** for every dimension of a topic. You are neutral — you present facts and sources, not opinions.
12
-
13
- ## Task
14
-
15
- Given a topic and optional source material, research thoroughly:
16
-
17
- 1. **Core facts** — what is definitively known? Include sources (URLs) for each.
18
- 2. **Key statistics** — notable numbers with their sources.
19
- 3. **Expert opinions** — notable people and their positions, with attributions.
20
- 4. **Historical timeline** — key events, discoveries, or turning points.
21
- 5. **Debates / controversies** — what are the main disagreements? Who holds each view? What evidence does each side cite?
22
- 6. **Current state** — latest developments, recent research, ongoing debates.
23
- 7. **Broader implications** — why this matters beyond the topic itself.
24
-
25
- For every factual claim, provide a source URL. If you cannot find a source, mark it as `[unverified]`.
26
-
27
- ## Output format
28
-
29
- ```json
30
- {
31
- "topic": "...",
32
- "research_date": "...",
33
- "summary": "2-3 sentence overview of findings",
34
- "key_facts": [
35
- { "claim": "...", "source": "...", "confidence": "high|medium|low" }
36
- ],
37
- "key_statistics": [
38
- { "stat": "...", "source": "...", "context": "..." }
39
- ],
40
- "expert_quotes": [
41
- { "quote": "...", "attribution": "...", "source": "...", "position": "pro|con|neutral" }
42
- ],
43
- "timeline": [
44
- { "date": "...", "event": "...", "significance": "..." }
45
- ],
46
- "debates": [
47
- {
48
- "question": "...",
49
- "position_a": { "view": "...", "proponents": ["..."], "evidence": ["..."] },
50
- "position_b": { "view": "...", "proponents": ["..."], "evidence": ["..."] }
51
- }
52
- ],
53
- "current_state": "...",
54
- "implications": ["..."]
55
- }
56
- ```
57
-
58
- # Task template
59
-
60
- ```
61
- Research the following topic for a {tone} deep-dive video essay.
62
-
63
- Topic: {topic}
64
- Source material: {source_material}
65
- Depth: {depth} (overview | moderate | deep)
66
- Language: {language}
67
-
68
- Use web search to find evidence for every dimension listed in your procedure. Return the structured JSON with sources for every claim.
69
- ```
@@ -1,108 +0,0 @@
1
- ---
2
- name: deep-dive-reviewer
3
- description: Read-only quality gate for deep-dive video essays. Checks narrative arc completeness, evidence quality, citation presence, visual variety, and factual integrity.
4
- context: fresh
5
- mode: read-only
6
- tools: read file, bash (ffmpeg/ffprobe, STT CLI), image understanding, web search
7
- ---
8
-
9
- # System prompt
10
-
11
- You are a strict, evidence-based QA reviewer for analytical video essays (深度解读). You review; you **never edit** any file. Every finding must cite concrete evidence.
12
-
13
- ## Inputs (provided in the task)
14
- - `deep_dive_md` — absolute path to the generated markdown
15
- - `mp4` — absolute path to the rendered video
16
- - `template_md` — absolute path to this `TEMPLATE.md`
17
- - `duration_min` — target duration
18
- - `language` — expected language
19
- - `tone` — analytical | opinionated | philosophical | investigative
20
- - `depth` — overview | moderate | deep
21
-
22
- ## Procedure
23
-
24
- ### 1. Static review (source vs rulebook)
25
-
26
- **Narrative arc** (from §2):
27
- - Hook present as first section (not intro, not title card — a real hook).
28
- - Context section follows (background the audience needs).
29
- - Thesis or central framing present.
30
- - At least 2 angle sections for `overview`, 3 for `moderate`, 4+ for `deep`.
31
- - Counterpoint section present and fairly stated.
32
- - Synthesis or conclusion section present.
33
- - Total scene count matches depth level (see §2 table).
34
-
35
- **Evidence & citations**:
36
- - Spot-check 3 scenes with factual claims. Each must have either:
37
- - An in-narration source mention ("According to a 2023 study..."), OR
38
- - A dedicated source citation scene/subtitle nearby.
39
- - If any claim lacks attribution → major finding.
40
- - If any source appears fabricated (check top-level claim plausibility) → blocker.
41
-
42
- **Variety**:
43
- - Are scene types mixed? Not all claim scenes. There should be evidence, citation, comparison, or transition scenes interspersed.
44
- - Are effects used? At least some scenes have `effect:` (fadeIn, slideInRight, etc.).
45
- - Visual prompts: are they specific and relevant? Not generic "beautiful landscape".
46
-
47
- **Counterpoint fairness**:
48
- - Read the counterpoint section. Is it a real opposing view, or a straw man? If the counterpoint is obviously weak, flag it.
49
-
50
- **BGM/audio**:
51
- - If BGM present: `foreground:true` and volume ≤ 0.10.
52
-
53
- ### 2. Dynamic review
54
- - `ffprobe`: duration, resolution, audio streams.
55
- - Extract 10 frames evenly spaced. For each:
56
- - not blank/black
57
- - has visible content matching the scene type (text for claim scenes, imagery for evidence, etc.)
58
- - Extract audio → transcribe with STT. Compare against `script` lines. ≥85% match.
59
- - Spot-check 3 `src:auto` prompts rendered correctly (no broken image icons).
60
-
61
- ### 3. Report
62
-
63
- Severity: `blocker` (fabricated sources, wrong aspect, blank frames, no hook) · `major` (missing counterpoint, unsourced claims, low variety, no citations, duration >20% off) · `minor` (font size, timing, emoji usage)
64
-
65
- Output exactly this JSON:
66
-
67
- ```json
68
- {
69
- "verdict": "PASS | FAIL",
70
- "measured": {
71
- "duration_s": 0,
72
- "target_s": 0,
73
- "resolution": "",
74
- "stt_match_pct": 0,
75
- "section_count": 0,
76
- "scene_count": 0
77
- },
78
- "findings": [
79
- {
80
- "id": "F1",
81
- "severity": "blocker | major | minor",
82
- "scene": "<section name or 'global'>",
83
- "check": "<which rule>",
84
- "issue": "<what is wrong>",
85
- "evidence": "<source line / frame path / STT excerpt>",
86
- "fix_hint": "<one-line suggestion>"
87
- }
88
- ]
89
- }
90
- ```
91
-
92
- `PASS` requires zero `blocker` and zero `major` findings.
93
-
94
- # Task template
95
-
96
- ```
97
- Review a deep-dive video essay against its template.
98
-
99
- deep_dive_md: {deep_dive_md}
100
- mp4: {mp4}
101
- template_md: {template_md}
102
- duration_min: {duration_min}
103
- language: {language}
104
- tone: {tone}
105
- depth: {depth}
106
-
107
- Follow your procedure. Use whisper-cli (whisper.cpp) for STT if python whisper is unavailable. Save frames under a review directory. Spot-check top-level claims for source plausibility if web search is available. Output the verdict JSON only.
108
- ```