@lalalic/markcut 2.1.0 → 2.2.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.
- package/package.json +3 -2
- package/{SKILL.md → skills/markcut/SKILL.md} +8 -2
- package/skills/markcut/docs/template.md +213 -0
- package/{templates → skills/markcut/docs/templates}/courseware/TEMPLATE.md +220 -10
- package/{templates → skills/markcut/docs/templates}/courseware/prompts/outline.md +5 -0
- package/{templates → skills/markcut/docs/templates}/courseware/prompts/scene.md +6 -0
- package/skills/markcut/docs/templates/deep-dive/TEMPLATE.md +355 -0
- package/skills/markcut/docs/templates/deep-dive/agents/researcher.md +69 -0
- package/skills/markcut/docs/templates/deep-dive/agents/reviewer.md +108 -0
- package/skills/markcut/docs/templates/deep-dive/prompts/fix.md +28 -0
- package/skills/markcut/docs/templates/deep-dive/prompts/outline.md +102 -0
- package/skills/markcut/docs/templates/deep-dive/prompts/script.md +64 -0
- package/skills/markcut/docs/templates/illustrated-book/TEMPLATE.md +360 -0
- package/skills/markcut/docs/templates/illustrated-book/agents/reviewer.md +115 -0
- package/skills/markcut/docs/templates/illustrated-book/prompts/fix.md +29 -0
- package/skills/markcut/docs/templates/illustrated-book/prompts/illustration.md +35 -0
- package/skills/markcut/docs/templates/illustrated-book/prompts/story.md +69 -0
- package/skills/markcut/docs/templates/short-film/TEMPLATE.md +387 -0
- package/skills/markcut/docs/templates/short-film/agents/reviewer.md +115 -0
- package/skills/markcut/docs/templates/short-film/prompts/fix.md +29 -0
- package/skills/markcut/docs/templates/short-film/prompts/screenplay.md +101 -0
- package/skills/markcut/docs/templates/short-film/prompts/storyboard.md +54 -0
- package/skills/markcut/docs/templates/short-video/TEMPLATE.md +302 -0
- package/skills/markcut/docs/templates/short-video/agents/reviewer.md +94 -0
- package/skills/markcut/docs/templates/short-video/prompts/fix.md +27 -0
- package/skills/markcut/docs/templates/short-video/prompts/script.md +65 -0
- package/skills/markcut/docs/templates/vlog/TEMPLATE.md +405 -0
- package/skills/markcut/docs/templates/vlog/agents/reviewer.md +89 -0
- package/skills/markcut/docs/templates/vlog/agents/story-writer.md +100 -0
- package/skills/markcut/docs/templates/vlog/prompts/bgm-select.md +38 -0
- package/skills/markcut/docs/templates/vlog/prompts/group-clips.md +93 -0
- package/skills/markcut/docs/templates/vlog/prompts/local-context.md +59 -0
- package/skills/markcut/docs/templates/vlog/prompts/outline.md +56 -0
- package/skills/markcut/docs/templates/vlog/prompts/review-fix.md +27 -0
- package/skills/markcut/docs/templates/vlog/prompts/storyboard.md +41 -0
- package/src/config.mjs +11 -3
- package/src/player/bundle/player.js +793 -545
- package/src/player/pipeline.mjs +1 -0
- package/src/player/server.mjs +3 -5
- /package/{docs → skills/markcut/docs}/edit-mode.md +0 -0
- /package/{docs → skills/markcut/docs}/json-descriptive.md +0 -0
- /package/{docs → skills/markcut/docs}/label-mode.md +0 -0
- /package/{docs → skills/markcut/docs}/markdown-descriptive.md +0 -0
- /package/{docs → skills/markcut/docs}/system-prompt-edit.md +0 -0
- /package/{templates → skills/markcut/docs/templates}/courseware/agents/reviewer.md +0 -0
- /package/{templates → skills/markcut/docs/templates}/courseware/prompts/fix.md +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Prompt: Group & Filter Clips
|
|
2
|
+
|
|
3
|
+
> Fill every `{placeholder}`, then execute in your own context.
|
|
4
|
+
> Reads: `metadata.json` from `markcut vision --label`. Outputs structured scene groups.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are transforming raw clip metadata into structured scene groups for a {style} vlog: "{theme}".
|
|
9
|
+
|
|
10
|
+
## Input — raw clip understanding
|
|
11
|
+
|
|
12
|
+
Below is the per-clip understanding from `markcut vision --label`, sorted by capture time. Each clip has:
|
|
13
|
+
|
|
14
|
+
- `filename` — original file name
|
|
15
|
+
- `type` — "image" or "video"
|
|
16
|
+
- `duration` — full clip duration in seconds (for videos)
|
|
17
|
+
- `caption` — VLM description of what the clip shows
|
|
18
|
+
- `aes_score` — aesthetic/interestingness score (0–1, higher = better)
|
|
19
|
+
- `user_label` — (optional) user's annotation from interactive labeling
|
|
20
|
+
- `gps` — (optional) {lat, lng} coordinates
|
|
21
|
+
- `stt` — (optional) STT transcript if video has speech
|
|
22
|
+
|
|
23
|
+
{clips_detail}
|
|
24
|
+
|
|
25
|
+
GPS waypoints (deduplicated, sorted): {gps_waypoints}
|
|
26
|
+
|
|
27
|
+
## Rules — filter
|
|
28
|
+
|
|
29
|
+
1. **Auto-keep** if `user_label` is present and positive (user specifically marked this clip as important).
|
|
30
|
+
2. **Drop** clips where `aes_score < 0.4`, unless it has a positive user label or is the only clip in its visual scene.
|
|
31
|
+
3. **Drop** near-duplicates: if two clips have visually identical captions (same subject, same angle), keep the one with higher aes_score.
|
|
32
|
+
4. **Drop** off-topic clips: screen recordings, blurry shots, transitions (pointing at ground, pocket shots).
|
|
33
|
+
5. **Max drops**: ≤20% of total clips. Never below 5 kept.
|
|
34
|
+
6. **List every dropped clip** with filename and reason.
|
|
35
|
+
|
|
36
|
+
## Rules — group into scenes
|
|
37
|
+
|
|
38
|
+
Each scene is a **single story beat** — one moment or idea. Group clips by **visual continuity**:
|
|
39
|
+
|
|
40
|
+
- **Same background + same clothing/lighting/subject-state → same scene**. Exhaust one scene before starting the next.
|
|
41
|
+
- A scene can be: a location/setting stop (lake, trail, campfire), a specific activity (setting up tent, cooking), or a thematic moment (arrival, farewell).
|
|
42
|
+
- **1–4 clips per scene**. A single long video take >10s may be its own scene.
|
|
43
|
+
- Each scene **3–20 seconds** estimated duration. Split if >20s.
|
|
44
|
+
- Clips within a scene play in capture order.
|
|
45
|
+
- **Transition between scenes**: root `layout:series` plays scenes sequentially, so group clips that belong together visually.
|
|
46
|
+
|
|
47
|
+
### For video clips, suggest trim boundaries
|
|
48
|
+
|
|
49
|
+
If a video clip is longer than needed:
|
|
50
|
+
- `startFrom` — where to start (seconds from beginning of clip)
|
|
51
|
+
- `endAt` — where to end (seconds from beginning of clip)
|
|
52
|
+
- Example: a 30s walking video may be trimmed to `startFrom:5 endAt:15` for the narrative-relevant 10 seconds.
|
|
53
|
+
|
|
54
|
+
### Route scene
|
|
55
|
+
|
|
56
|
+
If the user provided ≥2 GPS waypoints OR the clips reveal ≥2 distinct locations with GPS data, include a Route scene as the first scene with:
|
|
57
|
+
- Waypoints list
|
|
58
|
+
- Brief route narration
|
|
59
|
+
- Estimated duration: 4–8 seconds
|
|
60
|
+
|
|
61
|
+
## Output format
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"route_scene": null | {
|
|
66
|
+
"waypoints": [
|
|
67
|
+
{ "lat": 0, "lng": 0, "label": "place name" }
|
|
68
|
+
],
|
|
69
|
+
"narration": "Route overview line..."
|
|
70
|
+
},
|
|
71
|
+
"scenes": [
|
|
72
|
+
{
|
|
73
|
+
"name": "Short descriptive name for the scene",
|
|
74
|
+
"clips": [
|
|
75
|
+
{
|
|
76
|
+
"source": "filename",
|
|
77
|
+
"type": "image | video",
|
|
78
|
+
"startFrom": 0,
|
|
79
|
+
"endAt": 10,
|
|
80
|
+
"duration": 0
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"estimated_duration": 0
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"dropped_clips": [
|
|
87
|
+
{ "source": "filename", "reason": "Low aes_score (0.35)" }
|
|
88
|
+
],
|
|
89
|
+
"arc": "Hook → Core → Vibe → Close",
|
|
90
|
+
"total_kept": 0,
|
|
91
|
+
"total_dropped": 0
|
|
92
|
+
}
|
|
93
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Prompt: Search Local Context (News, Weather, Events)
|
|
2
|
+
|
|
3
|
+
> Fill every `{placeholder}`, then execute in your own context.
|
|
4
|
+
> Runs after Phase 1 (media understanding) before storyboard writing.
|
|
5
|
+
> Uses web search to find real facts about the vlog's location and date.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are researching local context for a vlog about "{theme}" at {location}.
|
|
10
|
+
|
|
11
|
+
Date range: {date_range} (or approximate dates from media timestamps)
|
|
12
|
+
Location description: {location} (from GPS reverse-geocode or user input)
|
|
13
|
+
Vlog style: {style}
|
|
14
|
+
|
|
15
|
+
## Task
|
|
16
|
+
|
|
17
|
+
Search for the following and report real facts that could naturally weave into the narration:
|
|
18
|
+
|
|
19
|
+
1. **Weather** — What was the weather like on those dates? High/low temps, conditions (sunny, rainy, cloudy), notable patterns (heatwave, storm, full moon).
|
|
20
|
+
2. **Local events** — Any festivals, markets, sports events, holidays, or community gatherings happening at that location during the date range.
|
|
21
|
+
3. **Seasonal context** — Seasonal highlights: fall colours, cherry blossoms, ski season opening, migration patterns, park hours.
|
|
22
|
+
4. **Recent news** — Any notable local news near that location within the week before the vlog dates (park closures, trail openings, wildlife alerts, cultural events).
|
|
23
|
+
|
|
24
|
+
Use multiple search queries for coverage. Prefer official sources (weather service, park website, local news).
|
|
25
|
+
|
|
26
|
+
## Output format
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
## Local Context
|
|
30
|
+
|
|
31
|
+
Weather:
|
|
32
|
+
- <fact 1> (source: <url>)
|
|
33
|
+
- <fact 2> (source: <url>)
|
|
34
|
+
|
|
35
|
+
Events:
|
|
36
|
+
- <fact> (source: <url>)
|
|
37
|
+
|
|
38
|
+
Seasonal:
|
|
39
|
+
- <fact> (source: <url>)
|
|
40
|
+
|
|
41
|
+
News:
|
|
42
|
+
- <fact> (source: <url>)
|
|
43
|
+
|
|
44
|
+
## Amplification ideas (optional, for narrator)
|
|
45
|
+
|
|
46
|
+
- <How a fact amplifies the story: "The fall colours festival meant the park was busier than usual, which explains the crowded trail clip">
|
|
47
|
+
- <Another idea>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- Only include facts confirmed by at least one web source. If a search yields nothing useful for a category, write "None found."
|
|
53
|
+
- Do not invent weather, events, or news.
|
|
54
|
+
- The amplification ideas are suggestions only — the story-writer decides whether to use them.
|
|
55
|
+
- Focus on facts that **connect** to what the media shows (weather matching the sky in photos, events explaining crowds, seasonal features matching the scenery).
|
|
56
|
+
|
|
57
|
+
## After this step
|
|
58
|
+
|
|
59
|
+
Pass the result to the storyboard phase (Phase 3). The story-writer agent or outline prompt should receive the local context as an additional input. Use at most **2 local-context references** in the final narration — enough to add color, not enough to overwhelm the personal story.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Prompt: Vlog Outline — Narrative Arc
|
|
2
|
+
|
|
3
|
+
> Fill every `{placeholder}`, then execute in your own context.
|
|
4
|
+
> Reads: `metadata.json` (per-clip captions, aes_score, GPS), project inputs.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are planning a {duration_min}-second {style} vlog: "{theme}".
|
|
9
|
+
|
|
10
|
+
Creator: {creator_profile}
|
|
11
|
+
Language: {language}
|
|
12
|
+
|
|
13
|
+
Given the clip understanding below, plan the narrative arc.
|
|
14
|
+
|
|
15
|
+
Clip understanding (from `markcut vision --label`):
|
|
16
|
+
- Total clips: {total_clips}
|
|
17
|
+
- Dominant mood: {dominant_mood}
|
|
18
|
+
- Narrative summary: {narrative_summary}
|
|
19
|
+
- Key subjects: {key_subjects}
|
|
20
|
+
{clips_detail}
|
|
21
|
+
|
|
22
|
+
Requirements:
|
|
23
|
+
|
|
24
|
+
1. **Hook → Core → Vibe → Close arc**: First scene hooks the viewer with the best visual + intriguing line. Middle scenes are chronological story beats. Final scene provides closure.
|
|
25
|
+
|
|
26
|
+
2. **Visual continuity**: Clips sharing same background/outfit/subject-state form one scene. No jumping A→B→A.
|
|
27
|
+
|
|
28
|
+
3. **Drop rules**: Keep all clips unless aes_score < 0.4, near-duplicate, or off-topic. Max ~20% drops. Never below 5 clips.
|
|
29
|
+
|
|
30
|
+
4. **GPS**: {gps_info} — if ≥2 GPS waypoints, include a route scene with map.
|
|
31
|
+
|
|
32
|
+
Output format:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
## Scene Plan
|
|
36
|
+
|
|
37
|
+
### Route Scene (if applicable)
|
|
38
|
+
- waypoints: <list>
|
|
39
|
+
- route narration: <one line describing the route>
|
|
40
|
+
|
|
41
|
+
### Scene 1: <title>
|
|
42
|
+
- clips: <filenames with time ranges>
|
|
43
|
+
- narration: <first-person line, 10-40 words>
|
|
44
|
+
- mood: <mood word>
|
|
45
|
+
- duration: <estimated seconds>
|
|
46
|
+
|
|
47
|
+
### Scene 2: <title>
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
### Scene N: <title>
|
|
51
|
+
|
|
52
|
+
Dropped clips:
|
|
53
|
+
- <filename>: <reason>
|
|
54
|
+
|
|
55
|
+
Title suggestion: <3-15 words>
|
|
56
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Prompt: Apply Reviewer Findings
|
|
2
|
+
|
|
3
|
+
> Fill every `{placeholder}`, then execute in your own context.
|
|
4
|
+
> Used after a FAIL verdict. You edit; the reviewer never does.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Apply the reviewer findings below to `{vlog_md_path}` with minimal, targeted edits.
|
|
9
|
+
|
|
10
|
+
Reviewer findings (JSON):
|
|
11
|
+
|
|
12
|
+
{findings_json}
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
- Address every `blocker` and `major` finding. Minor findings only when trivially fixable.
|
|
16
|
+
- Each fix must respect TEMPLATE.md §2 scene grammar and §3 authoring rules.
|
|
17
|
+
- Narration fabrication → rewrite the line to use conservative paraphrase of clip captions.
|
|
18
|
+
- Broken src → fix the path or add a placeholder image.
|
|
19
|
+
- Duration mismatch → shorten/lengthen narration and adjust subtitle `duration:`.
|
|
20
|
+
- Blank frames → check startFrom/endAt values, clip ordering, and file existence.
|
|
21
|
+
|
|
22
|
+
After editing, list what changed:
|
|
23
|
+
```
|
|
24
|
+
- <finding id>: <scene> — <one-line description of the edit>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then re-render and re-review.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Prompt: Vlog Scene → Markcut Markdown
|
|
2
|
+
|
|
3
|
+
> Fill every `{placeholder}`, then execute in your own context.
|
|
4
|
+
> Run once per scene in the outline. Constraints mirror TEMPLATE.md §2/§3.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are writing one scene of a {style} vlog. The scene will be rendered with markcut markdown syntax.
|
|
9
|
+
|
|
10
|
+
Theme: {theme}
|
|
11
|
+
Creator: {creator_profile}
|
|
12
|
+
Language: {language}
|
|
13
|
+
|
|
14
|
+
Scene from outline:
|
|
15
|
+
|
|
16
|
+
{outline_scene}
|
|
17
|
+
|
|
18
|
+
All clips are in the media directory `{media_dir}`. Use filenames as `src:` values relative to this directory.
|
|
19
|
+
|
|
20
|
+
**A. Media selection:**
|
|
21
|
+
- 1-4 clips for this scene. Use imaging for photos, videos for clips. See `startFrom`/`endAt` for trimming.
|
|
22
|
+
- Image: `- image src:{filename} duration:{s} start:{s}`
|
|
23
|
+
- Video: `- video src:{filename} startFrom:{trim_start} endAt:{trim_end} start:{s}`
|
|
24
|
+
- First clip starts at `start:0`. Subsequent clips start at the cumulative previous duration.
|
|
25
|
+
|
|
26
|
+
**B. Narration:**
|
|
27
|
+
- One `subtitle script:"..."` node per scene. Duration matches total scene length.
|
|
28
|
+
- First-person, conversational, matching creator profile.
|
|
29
|
+
- Every word grounded in clip captions, user labels, or GPS. No fabrication.
|
|
30
|
+
- Length: 10-40 words (~3-15 seconds at 2.5 w/s).
|
|
31
|
+
- No parentheses, no ellipses. At most one emoji.
|
|
32
|
+
|
|
33
|
+
Output format for ONE scene:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
## <SceneTitle (PascalCase)>
|
|
37
|
+
layout:parallel
|
|
38
|
+
- image src:<filename> duration:<s> start:<s>
|
|
39
|
+
- video src:<filename> startFrom:<s> endAt:<s> start:<s>
|
|
40
|
+
- subtitle script:"<narration line>" duration:<total_s>
|
|
41
|
+
```
|
package/src/config.mjs
CHANGED
|
@@ -75,14 +75,22 @@ export const DEFAULT_TTS_CLI =
|
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Default agent CLI — general-purpose text LLM.
|
|
78
|
-
* Used for text-only tasks like detect-scenes
|
|
78
|
+
* Used for text-only tasks like detect-scenes.
|
|
79
|
+
* Placeholder:
|
|
80
|
+
* {prompt} = user prompt (current context + edit request)
|
|
81
|
+
* Override with MARKCUT_AGENT_CLI env var.
|
|
82
|
+
*/
|
|
83
|
+
export const DEFAULT_AGENT_CLI = process.env.MARKCUT_AGENT_CLI || 'npx pi -p {prompt}';
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Default edit agent CLI — used by the edit-mode persistent rpc session.
|
|
79
87
|
* Placeholders:
|
|
80
88
|
* {systemprompt} = system prompt (role, instructions, knowledge)
|
|
81
89
|
* {prompt} = user prompt (current context + edit request)
|
|
82
90
|
* {sessionid} = unique session ID for conversation continuity
|
|
83
|
-
* Override with
|
|
91
|
+
* Override with MARKCUT_EDIT_CLI env var.
|
|
84
92
|
*/
|
|
85
|
-
export const
|
|
93
|
+
export const DEFAULT_EDIT_CLI = process.env.MARKCUT_EDIT_CLI || 'npx pi --session-id {sessionid} --system-prompt {systemprompt} -p {prompt}';
|
|
86
94
|
|
|
87
95
|
// ── Render-only pipeline CLI templates ─────────────────────────────────────
|
|
88
96
|
// These are specific to the render pipeline (no vision pipeline equivalent).
|