@event4u/agent-config 2.23.0 → 2.25.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 (82) hide show
  1. package/.agent-src/commands/create-pr/description-only.md +39 -11
  2. package/.agent-src/commands/create-pr.md +59 -5
  3. package/.agent-src/commands/video/from-script.md +123 -0
  4. package/.agent-src/commands/video/scene.md +92 -0
  5. package/.agent-src/commands/video/stitch.md +83 -0
  6. package/.agent-src/commands/video/storyboard.md +95 -0
  7. package/.agent-src/commands/video.md +59 -0
  8. package/.agent-src/contexts/execution/roadmap-process-loop.md +69 -14
  9. package/.agent-src/personas/README.md +5 -1
  10. package/.agent-src/personas/ai-video-technical-director.md +81 -0
  11. package/.agent-src/personas/hollywood-director.md +99 -0
  12. package/.agent-src/profiles/content_creator.yml +5 -0
  13. package/.agent-src/rules/media-governance-routing.md +82 -0
  14. package/.agent-src/rules/persona-governance.md +90 -0
  15. package/.agent-src/rules/post-push-rewrite-discipline.md +70 -0
  16. package/.agent-src/rules/provider-lifecycle-discipline.md +75 -0
  17. package/.agent-src/rules/roadmap-ci-steps-policy.md +145 -0
  18. package/.agent-src/rules/roadmap-progress-sync.md +11 -5
  19. package/.agent-src/skills/character-consistency/SKILL.md +131 -0
  20. package/.agent-src/skills/git-workflow/SKILL.md +133 -0
  21. package/.agent-src/skills/motion-choreographer/SKILL.md +161 -0
  22. package/.agent-src/skills/pixar-storyteller/SKILL.md +120 -0
  23. package/.agent-src/skills/roadmap-writing/SKILL.md +10 -0
  24. package/.agent-src/skills/scene-expander/SKILL.md +137 -0
  25. package/.agent-src/skills/scene-expander/scene-blueprint.schema.yaml +108 -0
  26. package/.agent-src/skills/subagent-orchestration/SKILL.md +17 -15
  27. package/.agent-src/skills/video-director/SKILL.md +126 -0
  28. package/.agent-src/templates/agent-settings.md +19 -0
  29. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  30. package/.agent-src/templates/roadmaps.md +16 -0
  31. package/.claude-plugin/marketplace.json +11 -1
  32. package/CHANGELOG.md +65 -0
  33. package/README.md +7 -5
  34. package/config/agent-settings.template.yml +54 -0
  35. package/docs/adrs/caveman/0001-default-off-until-bench.md +2 -2
  36. package/docs/adrs/cost/0001-hard-stop-hook.md +1 -1
  37. package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +2 -2
  38. package/docs/architecture.md +3 -3
  39. package/docs/catalog.md +18 -5
  40. package/docs/contracts/command-clusters.md +1 -0
  41. package/docs/contracts/compression-default-kill-criterion.md +1 -1
  42. package/docs/contracts/file-ownership-matrix.json +405 -0
  43. package/docs/contracts/provider-lifecycle.md +122 -0
  44. package/docs/decisions/ADR-011-domain-pack-readiness.md +213 -0
  45. package/docs/decisions/INDEX.md +1 -0
  46. package/docs/getting-started-by-role.md +10 -0
  47. package/docs/getting-started.md +2 -2
  48. package/docs/parity/ruflo.md +3 -3
  49. package/docs/personas.md +73 -26
  50. package/docs/profiles.md +9 -4
  51. package/package.json +1 -1
  52. package/scripts/_tmp_scan_framework_leakage.py +119 -0
  53. package/scripts/ai-video/adapters/gemini-veo.sh +62 -0
  54. package/scripts/ai-video/adapters/higgsfield.sh +88 -0
  55. package/scripts/ai-video/adapters/kling.sh +59 -0
  56. package/scripts/ai-video/adapters/openai-images.sh +57 -0
  57. package/scripts/ai-video/adapters/sora.sh +60 -0
  58. package/scripts/ai-video/lib/adapter-common.sh +116 -0
  59. package/scripts/ai-video/lib/adapter-contract.md +163 -0
  60. package/scripts/ai-video/lib/fixtures/gemini-veo/result.json +1 -0
  61. package/scripts/ai-video/lib/fixtures/gemini-veo/scene-0001.mp4 +1 -0
  62. package/scripts/ai-video/lib/fixtures/higgsfield/result.json +1 -0
  63. package/scripts/ai-video/lib/fixtures/higgsfield/scene-0001.mp4 +1 -0
  64. package/scripts/ai-video/lib/fixtures/kling/result.json +1 -0
  65. package/scripts/ai-video/lib/fixtures/kling/scene-0001.mp4 +1 -0
  66. package/scripts/ai-video/lib/fixtures/openai-images/result.json +1 -0
  67. package/scripts/ai-video/lib/fixtures/openai-images/scene-0001.png +3 -0
  68. package/scripts/ai-video/lib/fixtures/sora/result.json +1 -0
  69. package/scripts/ai-video/lib/fixtures/sora/scene-0001.mp4 +1 -0
  70. package/scripts/ai-video/lib/load-config.sh +140 -0
  71. package/scripts/ai-video/lib/operator-pick.sh +119 -0
  72. package/scripts/ai-video/lib/parse-blueprint.sh +122 -0
  73. package/scripts/ai-video/lib/redact.sh +85 -0
  74. package/scripts/ai-video/lib/validate-deps.sh +132 -0
  75. package/scripts/ai-video/stitch.sh +154 -0
  76. package/scripts/ai-video/test-pipeline.sh +169 -0
  77. package/scripts/check_portability.py +6 -0
  78. package/scripts/lint_media_policy_linkage.py +140 -0
  79. package/scripts/lint_persona_governance.py +164 -0
  80. package/scripts/lint_roadmap_ci_steps.py +182 -0
  81. package/scripts/schemas/command.schema.json +8 -0
  82. package/scripts/smoke/schema.sh +1 -1
@@ -39,17 +39,45 @@ The user may or may not provide a PR URL or branch name.
39
39
  - If no PR found → use `git diff origin/{default}..HEAD --stat` for the branch diff.
40
40
  3. **Never** reuse a PR number from earlier in the conversation.
41
41
 
42
- ### 2. Gather context
43
-
44
- - **Jira ticket**: Extract ticket ID from branch name (e.g. `fix/DEV-4673-description` → `DEV-4673`).
45
- - If found fetch via Jira API (`GET /issue/{ticketId}`).
46
- - If not found ask the user for a ticket number. Proceed without if none.
47
- - **Diff summary**: `git diff origin/{default}..HEAD --stat` for changed files.
48
- - **Commit messages**: `git log origin/{default}..HEAD --format="%s"` for what was done.
49
- - **PR template**: **MUST** read `.github/pull_request_template.md`. This is mandatory, not optional.
50
- - **Read key changed files** to understand what was done — look for migrations, new classes,
51
- modified services, route changes, config changes.
52
- - **Check roadmap/agent docs** that describe the feature intent (if they exist).
42
+ ### 2. Gather context — **one parallel tool-call block**
43
+
44
+ The four primary fetches below are **independent** and **must** be
45
+ dispatched in a single parallel tool-call block, not serially. Serial
46
+ reads here add 3+ round-trips per PR for zero benefit.
47
+
48
+ ```
49
+ parallel:
50
+ 1. Jira API — GET /issue/{ticketId} (skip when no ticket ID)
51
+ 2. git diff — git diff origin/{default}..HEAD --stat
52
+ 3. git log — git log origin/{default}..HEAD --format="%s"
53
+ 4. view PR template — .github/pull_request_template.md
54
+ ```
55
+
56
+ After the block returns:
57
+
58
+ - **Jira ticket**: ticket ID is extracted from the branch name
59
+ (e.g. `fix/DEV-4673-description` → `DEV-4673`) **before** the
60
+ parallel block. No ticket → skip fetch 1 silently; ask the user
61
+ for a number only after the block, and only if needed.
62
+ - **PR template missing** → fall back to the structure in § 4.
63
+ - **Read key changed files** (migrations, new classes, modified
64
+ services, route/config changes) — second parallel block, keyed
65
+ off the diff summary. Group all file reads in one block.
66
+ - **Check roadmap/agent docs** that describe the feature intent
67
+ (if they exist) — fold into the second block.
68
+
69
+ Anti-pattern (do **not** do this):
70
+
71
+ ```
72
+ turn 1: fetch Jira
73
+ turn 2: git diff
74
+ turn 3: git log
75
+ turn 4: view template
76
+ turn 5: view file A
77
+ turn 6: view file B
78
+ ```
79
+
80
+ That's 6 round-trips for what should be 2.
53
81
 
54
82
  ### 3. Build the PR title
55
83
 
@@ -94,6 +94,44 @@ Resolve `"draft"` (first match wins):
94
94
  3. `routine_confirmations: true` → ask `1. draft / 2. ready`.
95
95
  4. Default → `true` (silent draft).
96
96
 
97
+ #### 3a. Tool selection — single-call mandate
98
+
99
+ ```
100
+ POST THE PR WITH ONE github-api CALL.
101
+ NEVER COMPOSE THE BODY THROUGH SHELL, PYTHON, OR TEMP FILES.
102
+ ```
103
+
104
+ Use the `github-api` tool **directly** with the markdown body in the
105
+ JSON `data` field. The body is a regular JSON string — escaping is the
106
+ tool's job, not yours.
107
+
108
+ ```
109
+ github-api
110
+ method: POST
111
+ path: /repos/{owner}/{repo}/pulls
112
+ data: { "title": "...", "body": "<markdown>", "head": "<branch>",
113
+ "base": "main", "draft": <bool> }
114
+ ```
115
+
116
+ **Hard prohibitions** (each one cost 3+ extra tool calls in past runs):
117
+
118
+ - ❌ `python3 -c "import urllib..."` / `python3 - <<PY ... PY` heredocs
119
+ to serialize the body or POST it.
120
+ - ❌ `save-file PR_BODY.md` → read back → `curl -d @PR_BODY.md`.
121
+ - ❌ `gh pr create --body-file …` shelling out when `github-api` is
122
+ available in this surface.
123
+ - ❌ Splitting `title` and `body` into two API calls (create + PATCH).
124
+
125
+ The body may contain any Markdown — code fences, tables, multi-line
126
+ HTML, emoji. Do **not** preprocess, escape, or strip newlines before
127
+ handing it to `github-api`.
128
+
129
+ If the surface genuinely lacks `github-api` (rare), fall back to
130
+ `gh pr create --title "..." --body-file <(echo -n "<body>")` as a
131
+ **single** shell call, never the python-urllib path.
132
+
133
+ #### 3b. Submit
134
+
97
135
  Create the PR with the approved title/body and the resolved `draft`.
98
136
 
99
137
  **Verify after `draft: false`** — the GitHub REST API sometimes ignores
@@ -126,18 +164,21 @@ Run this strip-pass **after PR creation and after every body PATCH**:
126
164
  - `Pull Request opened by [Augment Code]`
127
165
  - `Co-authored by Augment Code`
128
166
  - Any `augmentcode.com` link the user did not ask for
129
- 3. If any pattern is present, remove it together with surrounding
167
+ 3. **No match done.** Skip steps 4–5; the body is already clean.
168
+ This is the common path and **must not** spend a verify-GET.
169
+ 4. Match found → remove the footer(s) together with surrounding
130
170
  `---` separators and trailing whitespace, then:
131
171
  ```
132
172
  PATCH /repos/{owner}/{repo}/pulls/{number}
133
173
  { "body": "<cleaned body>" }
134
174
  ```
135
- 4. Re-fetch the body once more to verify the strip stuck. If a
136
- pattern reappears (server re-injection), repeat steps 2–4 once;
175
+ Re-fetch the body **once** to verify the strip stuck. If a
176
+ pattern reappears (server re-injection), repeat the PATCH once;
137
177
  if it still reappears, surface the issue to the user and stop
138
178
  (do not enter a strip/PATCH loop).
139
- 5. Briefly note in the reply how many footers were removed (or
140
- "no footers found" if clean).
179
+ 5. Briefly note in the reply how many footers were removed (omit
180
+ the line entirely when nothing was stripped — silence is the
181
+ expected path, not "no footers found").
141
182
 
142
183
  #### 4b. Show the PR URL (verbosity-gated)
143
184
 
@@ -154,6 +195,19 @@ Linked ticket + `routine_confirmations: true` → ask `1. Yes / 2. No`.
154
195
  Default (`false`) → skip silently. **Only emit a transition line when
155
196
  an actual Jira API call succeeded** — never announce "skipped".
156
197
 
198
+ #### 4d. Settings short-circuit — single read per run
199
+
200
+ `verbosity.routine_confirmations`, `verbosity.post_action_reports`, and
201
+ `commands.create_pr.preview_description` are read **once** at the top
202
+ of the run and cached for the whole `/create-pr` invocation. Do **not**
203
+ re-read `.agent-settings.yml` in 4b / 4c — both branches resolve from
204
+ the cached values from step 1.
205
+
206
+ When all three resolve to their silent defaults (`false` / `minimal` /
207
+ `false`), steps 4b–4c collapse to the single `→ #N opened: <url>` line
208
+ from 4b and a silent 4c. No extra file reads, no "checking settings…"
209
+ narration, no confirmation prompts.
210
+
157
211
  ### Rules
158
212
 
159
213
  - **Always use the PR template** from `.github/pull_request_template.md`.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: video:from-script
3
+ tier: 2
4
+ cluster: video
5
+ sub: from-script
6
+ description: Drive a script end-to-end through the AI video pipeline — scenes → blueprint → image → operator pick → motion → video → stitch. Dry-run default; network calls require explicit per-turn confirmation.
7
+ disable-model-invocation: true
8
+ personas: [hollywood-director, ai-video-technical-director]
9
+ skills: [scene-expander, video-director, pixar-storyteller, character-consistency, motion-choreographer]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "render a video from a script, full AI video pipeline, multi-scene generation"
13
+ trigger_context: "user supplies a Markdown script with `## Scene N` headings and wants a final MP4"
14
+ ---
15
+
16
+ # /video:from-script
17
+
18
+ `/video:from-script <path-to-script.md> [--image-provider <id>] [--video-provider <id>]`
19
+
20
+ Drives a Markdown script through the full pipeline. Provider flags
21
+ override the `<default-image-provider>` / `<default-video-provider>`
22
+ from [`agents/.ai-video.xml`](../../../agents/.ai-video.xml.example);
23
+ absent flags fall back to the XML defaults.
24
+
25
+ **Block-on-ambiguity:** a missing scene heading, an unparseable
26
+ character-lock block, or a contradictory provider flag halts the run
27
+ with a precise diff — no silent best-guess.
28
+
29
+ ## Steps
30
+
31
+ ### 1. Validate dependencies
32
+
33
+ ```bash
34
+ scripts/ai-video/lib/validate-deps.sh .agent-src.uncompressed/commands/video/from-script.md
35
+ ```
36
+
37
+ Fails fast with the missing-id list if any declared persona / skill is
38
+ absent from `.agent-src/personas/` or `.agent-src/skills/`. No network
39
+ call has happened yet.
40
+
41
+ ### 2. Load config + resolve providers
42
+
43
+ Source `scripts/ai-video/lib/load-config.sh`. Resolve image / video
44
+ provider in this order: command flag → `agents/.ai-video.xml` default
45
+ → fail with the available-providers list.
46
+
47
+ ### 3. Parse the script
48
+
49
+ Run the `scene-expander` skill: split on `## Scene N` headings, extract
50
+ dialogue / action / ambient blocks, and emit one `scene-blueprint.yaml`
51
+ per scene under `<project>/scenes/<id>/`. Schema:
52
+ [`scene-blueprint.schema.yaml`](../../skills/scene-expander/scene-blueprint.schema.yaml).
53
+
54
+ ### 4. Character lock
55
+
56
+ Run `character-consistency` once for the whole project. Writes
57
+ `<project>/character.json` (subject, palette, wardrobe, prop, seed)
58
+ that every later prompt must reuse verbatim.
59
+
60
+ ### 5. Per-scene image render
61
+
62
+ For each scene blueprint:
63
+
64
+ 1. Compose the eight-block image prompt via `video-director`
65
+ (style · subject · environment · action · camera · lens · lighting · mood).
66
+ 2. **Safety gate (Phase 5 Step 6).** If `AIV_DRYRUN=false`, print the
67
+ adapter, model, scene count, and estimated cost; refuse to continue
68
+ without an explicit operator confirmation **in this turn**. Mirrors
69
+ [`non-destructive-by-default`](../../rules/non-destructive-by-default.md).
70
+ 3. Call the image adapter (`run` subcommand) N times where N =
71
+ `<tuning/best-of-n>` (default 1).
72
+
73
+ ### 6. Operator pick (best-of-N checkpoint)
74
+
75
+ ```bash
76
+ scripts/ai-video/lib/operator-pick.sh <project> <scene-id>
77
+ ```
78
+
79
+ Renders the candidate contact-sheet PNG, pauses, and waits for the
80
+ operator to write `<project>/scenes/<id>/selection.json`. In dry-run
81
+ mode the helper auto-selects the first candidate so the smoke test
82
+ stays unattended.
83
+
84
+ ### 7. Motion + video render
85
+
86
+ Pass the locked image into `motion-choreographer` (per-provider profile)
87
+ → build the motion prompt → call the video adapter (`submit` / `poll` /
88
+ `fetch`). Same safety gate as Step 5 fires before each live call.
89
+
90
+ ### 8. Stitch
91
+
92
+ Build `<project>/manifest.json` (ordered `{scene_id, clip_path,
93
+ audio_embedded, audio_path?, duration}`) and run:
94
+
95
+ ```bash
96
+ scripts/ai-video/stitch.sh <project>/manifest.json <project>/final.mp4
97
+ ```
98
+
99
+ Fail loud on missing clips; offer `--skip-scene <id>` or `--continue`
100
+ per the stitcher contract.
101
+
102
+ ### 9. Report
103
+
104
+ Print: project slug, final MP4 path, scenes rendered, scenes skipped,
105
+ estimated cost (live mode) or `dry-run` marker. No commit. No push.
106
+
107
+ ## Rules
108
+
109
+ - **No commit, no push, no PR.** Pipeline produces artefacts; the
110
+ operator chooses what to ship.
111
+ - **Dry-run is the default.** Every live network call needs explicit
112
+ per-turn confirmation.
113
+ - **Block on ambiguity** — never silently best-guess scene splits or
114
+ provider mismatches.
115
+ - **One project per invocation.** Re-running on the same project
116
+ resumes from existing artefacts (skips completed scenes).
117
+
118
+ ## See also
119
+
120
+ - [`/video:scene`](scene.md) — single-scene iteration
121
+ - [`/video:storyboard`](storyboard.md) — image-only contact sheet
122
+ - [`/video:stitch`](stitch.md) — re-stitch after operator edits
123
+ - [`scripts/ai-video/lib/adapter-contract.md`](../../../scripts/ai-video/lib/adapter-contract.md)
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: video:scene
3
+ tier: 2
4
+ cluster: video
5
+ sub: scene
6
+ description: Render a single scene from a one-line idea — scene-expander → blueprint → image → operator pick → motion → video. Dry-run default; live calls require explicit per-turn confirmation.
7
+ disable-model-invocation: true
8
+ personas: [hollywood-director, ai-video-technical-director]
9
+ skills: [scene-expander, video-director, character-consistency, motion-choreographer]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "render a single video scene, iterate on one shot, test a prompt without a full script"
13
+ trigger_context: "user supplies a one-line scene idea and wants a single clip, no multi-scene stitching"
14
+ ---
15
+
16
+ # /video:scene
17
+
18
+ `/video:scene "<idea>" [--image-provider <id>] [--video-provider <id>] [--project <slug>]`
19
+
20
+ Single-scene generation for iteration. Same pipeline as
21
+ [`/video:from-script`](from-script.md) but skips the script parser and
22
+ the stitch step — produces one clip under
23
+ `<project>/scenes/<auto-id>/`.
24
+
25
+ **Block-on-ambiguity:** an idea string under 12 characters, a
26
+ contradictory provider flag, or a missing project slug on resume halts
27
+ the run with a precise diff.
28
+
29
+ ## Steps
30
+
31
+ ### 1. Validate dependencies
32
+
33
+ ```bash
34
+ scripts/ai-video/lib/validate-deps.sh .agent-src.uncompressed/commands/video/scene.md
35
+ ```
36
+
37
+ ### 2. Load config + resolve providers
38
+
39
+ Source `scripts/ai-video/lib/load-config.sh`. Resolve image / video
40
+ provider: flag → `agents/.ai-video.xml` default → fail with the
41
+ available-providers list.
42
+
43
+ ### 3. Expand the idea
44
+
45
+ Run `scene-expander` on the single idea string. Emit one
46
+ `scene-blueprint.yaml` under `<project>/scenes/<id>/`. Project slug
47
+ defaults to `scene-$(date +%Y%m%d-%H%M%S)` when `--project` is absent.
48
+
49
+ ### 4. Character lock (if `<project>/character.json` absent)
50
+
51
+ First run on a fresh project → `character-consistency` builds
52
+ `character.json`. Re-runs reuse the locked descriptor verbatim.
53
+
54
+ ### 5. Image render + operator pick
55
+
56
+ Compose the eight-block image prompt via `video-director`. Safety gate
57
+ fires before any live call (`AIV_DRYRUN=false` requires explicit
58
+ per-turn confirmation). Render `<tuning/best-of-n>` candidates, then:
59
+
60
+ ```bash
61
+ scripts/ai-video/lib/operator-pick.sh <project> <scene-id>
62
+ ```
63
+
64
+ Dry-run auto-selects candidate 1.
65
+
66
+ ### 6. Motion + video render
67
+
68
+ `motion-choreographer` builds the motion prompt for the resolved video
69
+ provider; safety gate fires again; adapter `submit` / `poll` / `fetch`
70
+ runs the call.
71
+
72
+ ### 7. Report
73
+
74
+ Print: project slug, scene id, clip path, audio status
75
+ (`embedded` / `muxed` / `none`), live cost or `dry-run` marker. No
76
+ stitch step; no commit; no push.
77
+
78
+ ## Rules
79
+
80
+ - **No commit, no push, no PR.**
81
+ - **Dry-run is the default.** Live calls need explicit per-turn
82
+ confirmation.
83
+ - **Block on ambiguity** — refuse to invent a project slug, scene id,
84
+ or character descriptor on resume.
85
+ - **Single scene per invocation.** For multi-scene work use
86
+ [`/video:from-script`](from-script.md).
87
+
88
+ ## See also
89
+
90
+ - [`/video:from-script`](from-script.md) — multi-scene pipeline
91
+ - [`/video:storyboard`](storyboard.md) — image-only sheet
92
+ - [`/video:stitch`](stitch.md) — combine existing clips
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: video:stitch
3
+ tier: 2
4
+ cluster: video
5
+ sub: stitch
6
+ description: Re-stitch existing clips in `<project>/scenes/*/` after operator edits — no re-render. ffmpeg concat driven by manifest.json.
7
+ disable-model-invocation: true
8
+ personas: [ai-video-technical-director]
9
+ skills: []
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "re-stitch existing video clips, rebuild final MP4 after edits, ffmpeg concat existing scenes"
13
+ trigger_context: "user has edited clips in `<project>/scenes/*/` and wants the final.mp4 rebuilt without paying for re-renders"
14
+ ---
15
+
16
+ # /video:stitch
17
+
18
+ `/video:stitch <project-slug> [--skip-scene <id>]... [--continue]`
19
+
20
+ Re-stitches existing clips after operator edits. **No adapter calls.**
21
+ Reads `<project>/manifest.json`, runs `scripts/ai-video/stitch.sh`,
22
+ writes `<project>/final.mp4`.
23
+
24
+ **Block-on-ambiguity:** a missing project slug, a missing
25
+ `manifest.json`, or a clip path that no longer resolves halts the run
26
+ with a precise diff — the operator must say `--skip-scene <id>` or
27
+ `--continue` explicitly.
28
+
29
+ ## Steps
30
+
31
+ ### 1. Validate dependencies
32
+
33
+ ```bash
34
+ scripts/ai-video/lib/validate-deps.sh .agent-src.uncompressed/commands/video/stitch.md
35
+ ```
36
+
37
+ (Lightweight here — only the `ai-video-technical-director` persona is
38
+ declared; no skill stack to resolve.)
39
+
40
+ ### 2. Locate the project
41
+
42
+ Resolve `<project-slug>` against the working directory. If neither
43
+ `<slug>/manifest.json` nor `agents/ai-video/projects/<slug>/manifest.json`
44
+ exists, fail with the searched paths.
45
+
46
+ ### 3. Honor operator overrides
47
+
48
+ Read `--skip-scene <id>` (repeatable) and `--continue` (proceed past
49
+ the first missing clip) flags. Reject any other flag — this command
50
+ does not render, so `--image-provider` / `--video-provider` are
51
+ contract bugs.
52
+
53
+ ### 4. Stitch
54
+
55
+ ```bash
56
+ scripts/ai-video/stitch.sh <project>/manifest.json <project>/final.mp4 \
57
+ ${SKIP_FLAGS} ${CONTINUE_FLAG}
58
+ ```
59
+
60
+ The stitcher fails loud on the first unresolved clip unless
61
+ `--continue` is set; on `--skip-scene` it drops the named scene from
62
+ the concat list before invoking `ffmpeg`.
63
+
64
+ ### 5. Report
65
+
66
+ Print: project slug, scenes stitched, scenes skipped, final MP4 path,
67
+ audio status (per-clip `audio_embedded` flags from `manifest.json`).
68
+ No live cost (no network calls happened). No commit. No push.
69
+
70
+ ## Rules
71
+
72
+ - **No adapter calls.** This command must refuse any provider flag.
73
+ - **No commit, no push, no PR.**
74
+ - **Block on missing clips** unless `--continue` is explicitly set.
75
+ - **Manifest is source of truth** — never re-order clips by filename
76
+ or timestamp; respect `manifest.json` ordering.
77
+
78
+ ## See also
79
+
80
+ - [`/video:from-script`](from-script.md) — full pipeline including
81
+ initial stitch
82
+ - [`/video:scene`](scene.md) — render one scene
83
+ - [`scripts/ai-video/stitch.sh`](../../scripts/ai-video/stitch.sh) — the underlying tool
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: video:storyboard
3
+ tier: 2
4
+ cluster: video
5
+ sub: storyboard
6
+ description: Image-only storyboard — script → scenes → blueprint → image render → contact-sheet PNG via ffmpeg montage. No video calls.
7
+ disable-model-invocation: true
8
+ personas: [hollywood-director]
9
+ skills: [scene-expander, video-director, character-consistency]
10
+ suggestion:
11
+ eligible: true
12
+ trigger_description: "build a storyboard, contact sheet of scenes, image-only preview, validate a script visually before video render"
13
+ trigger_context: "user wants to see all scenes as stills before committing to motion calls"
14
+ ---
15
+
16
+ # /video:storyboard
17
+
18
+ `/video:storyboard <path-to-script.md> [--image-provider <id>]`
19
+
20
+ Renders one locked image per scene, then composes them into a single
21
+ contact-sheet PNG via `ffmpeg` montage. **No video calls.** Useful as a
22
+ cheap pre-flight before [`/video:from-script`](from-script.md).
23
+
24
+ **Block-on-ambiguity:** a missing scene heading, an unparseable
25
+ character-lock block, or a `--video-provider` flag (rejected — this
26
+ command does not call video adapters) halts the run with a precise
27
+ diff.
28
+
29
+ ## Steps
30
+
31
+ ### 1. Validate dependencies
32
+
33
+ ```bash
34
+ scripts/ai-video/lib/validate-deps.sh .agent-src.uncompressed/commands/video/storyboard.md
35
+ ```
36
+
37
+ ### 2. Load config + resolve image provider
38
+
39
+ Source `scripts/ai-video/lib/load-config.sh`. Resolve image provider:
40
+ `--image-provider` flag → `agents/.ai-video.xml` default → fail. Reject
41
+ `--video-provider` (this command produces no clips).
42
+
43
+ ### 3. Parse the script
44
+
45
+ `scene-expander` splits on `## Scene N`, writes
46
+ `<project>/scenes/<id>/scene-blueprint.yaml` per scene.
47
+
48
+ ### 4. Character lock
49
+
50
+ Single `character-consistency` pass writes `<project>/character.json`.
51
+ Re-runs on the same project reuse it verbatim.
52
+
53
+ ### 5. Per-scene image render
54
+
55
+ For each scene:
56
+
57
+ 1. `video-director` builds the eight-block image prompt.
58
+ 2. **Safety gate (Phase 5 Step 6).** Live mode requires `AIV_DRYRUN=false`
59
+ AND explicit per-turn confirmation; otherwise the run stops.
60
+ 3. Image adapter `run` → write the locked still under
61
+ `<project>/scenes/<id>/locked.png`.
62
+
63
+ ### 6. Build the contact sheet
64
+
65
+ ```bash
66
+ ffmpeg -y \
67
+ -pattern_type glob -i '<project>/scenes/*/locked.png' \
68
+ -filter_complex "tile=<cols>x<rows>:padding=8:margin=16" \
69
+ <project>/storyboard.png
70
+ ```
71
+
72
+ `<cols>` defaults to `ceil(sqrt(N))`; `<rows>` to `ceil(N/cols)`. The
73
+ helper script `scripts/ai-video/lib/operator-pick.sh` is **not**
74
+ invoked — this command emits a single sheet, not per-scene candidate
75
+ picks.
76
+
77
+ ### 7. Report
78
+
79
+ Print: project slug, scenes rendered, contact-sheet path, live cost or
80
+ `dry-run` marker.
81
+
82
+ ## Rules
83
+
84
+ - **No video adapter calls.** This command must refuse any path that
85
+ would invoke a video provider.
86
+ - **No commit, no push, no PR.**
87
+ - **Dry-run is the default.** Live image calls need explicit per-turn
88
+ confirmation.
89
+ - **Reject `--video-provider`.** Surfacing the flag is a contract bug.
90
+
91
+ ## See also
92
+
93
+ - [`/video:from-script`](from-script.md) — full pipeline including video
94
+ - [`/video:scene`](scene.md) — single-scene iteration
95
+ - [`/video:stitch`](stitch.md) — re-stitch existing clips
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: video
3
+ tier: 2
4
+ cluster: video
5
+ description: Video-creation orchestrator — Hollywood-level AI video pipeline. Routes to from-script, scene, storyboard, stitch.
6
+ type: orchestrator
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "create a video from a script, render a single scene, build a storyboard, re-stitch existing clips, AI video pipeline"
11
+ trigger_context: "user mentions video generation, scene rendering, storyboard, ffmpeg stitch, or a `.ai-video.xml` config"
12
+ ---
13
+
14
+ # /video
15
+
16
+ Top-level orchestrator for the `/video:*` family — multi-provider AI
17
+ video creation. Reads provider keys + defaults from
18
+ [`agents/.ai-video.xml`](../agents/.ai-video.xml.example) (gitignored
19
+ real file; example shipped). Every subcommand is **dry-run by default**;
20
+ network calls require explicit per-turn confirmation per the adapter
21
+ contract under [`scripts/ai-video/lib/adapter-contract.md`](../scripts/ai-video/lib/adapter-contract.md).
22
+
23
+ ## Sub-commands
24
+
25
+ | Sub-command | Routes to | Purpose |
26
+ |---|---|---|
27
+ | `/video:from-script <path>` | `commands/video/from-script.md` | Full pipeline: script → scenes → blueprint → images → operator pick → motion → video → stitch |
28
+ | `/video:scene "<idea>"` | `commands/video/scene.md` | Single-scene iteration without a full script |
29
+ | `/video:storyboard <path>` | `commands/video/storyboard.md` | Image-only output; contact-sheet storyboard PNG via `ffmpeg` montage |
30
+ | `/video:stitch <slug>` | `commands/video/stitch.md` | Re-stitches existing clips after operator edits, no re-render |
31
+
32
+ ## Dispatch
33
+
34
+ 1. Parse `/video <sub-command> [args]`.
35
+ 2. Look up the sub-command in the table above and execute its file
36
+ verbatim with the remaining args.
37
+ 3. Unknown / missing sub-command → print the table and ask:
38
+
39
+ > 1. from-script — full script → final video
40
+ > 2. scene — single-scene iteration
41
+ > 3. storyboard — image-only contact sheet
42
+ > 4. stitch — re-stitch existing clips
43
+
44
+ ## Rules
45
+
46
+ - **Do NOT commit, push, or open a PR** — subcommands never do this.
47
+ - **Do NOT chain subcommands.** One `/video <sub>` per turn.
48
+ - **`AIV_DRYRUN=true` is the default.** A live (paid) call requires
49
+ `AIV_DRYRUN=false` AND an explicit operator confirmation in the same
50
+ turn; mirrors [`non-destructive-by-default`](../rules/non-destructive-by-default.md).
51
+ - **Run `validate-deps.sh` first.** Every subcommand calls
52
+ `scripts/ai-video/lib/validate-deps.sh` before any adapter; fails
53
+ fast on missing personas / skills.
54
+ - **Edit `.agent-src.uncompressed/` only.** Generated mirrors regenerate.
55
+
56
+ ## See also
57
+
58
+ - [`scripts/ai-video/lib/adapter-contract.md`](../scripts/ai-video/lib/adapter-contract.md) — provider adapter v1 contract
59
+ - [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md) — `video` cluster registration