@vibeframe/cli 0.99.0 → 0.100.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 (3) hide show
  1. package/CONTEXT.md +83 -30
  2. package/dist/index.js +7885 -4926
  3. package/package.json +3 -3
package/CONTEXT.md CHANGED
@@ -8,13 +8,14 @@ a shell command. The same surface is exposed as MCP tools through
8
8
 
9
9
  For the full reference (every flag, default, enum), read
10
10
  [`docs/cli-reference.md`](../../docs/cli-reference.md) — auto-generated
11
- from `vibe schema --list`. This file is the *agent quickstart*: rules,
11
+ from `vibe schema --list`. This file is the _agent quickstart_: rules,
12
12
  conventions, and discovery hooks.
13
13
 
14
14
  ## Discovery (use these first)
15
15
 
16
16
  ```bash
17
17
  vibe schema --list --json # All commands with paths + descriptions
18
+ vibe schema --list --surface public # Small first-run/product command surface
18
19
  vibe schema <group>.<leaf> --json # JSON Schema for one command
19
20
  vibe doctor --json # Configured API keys + filter availability
20
21
  vibe guide <topic> --json # Step-by-step guides (motion | scene | pipeline)
@@ -29,7 +30,7 @@ vibe guide <topic> --json # Step-by-step guides (motion | scene | p
29
30
  2. **`--dry-run` before any paid call** — returns a `costUsd` estimate
30
31
  in the JSON envelope without spending. Validates inputs.
31
32
  3. **`--stdin` for complex options** — `echo '{"key":"value"}' | vibe
32
- <cmd> --stdin --json`. CLI flags still win on conflict.
33
+ <cmd> --stdin --json`. CLI flags still win on conflict.
33
34
  4. **`--fields <list>`** — limit JSON output fields on read-heavy
34
35
  commands (e.g. `--fields "path,duration"`).
35
36
  5. **`--describe`** — print a command's JSON Schema and exit (no
@@ -37,30 +38,34 @@ vibe guide <topic> --json # Step-by-step guides (motion | scene | p
37
38
 
38
39
  ## Cost tiers
39
40
 
40
- | Tier | Commands | Per-call cost |
41
- |------|----------|---------------|
42
- | Free | `detect *`, `edit silence-cut/fade/noise-reduce/text-overlay/interpolate`, `timeline *`, `scene lint/list-styles`, `audio duck` | $0 |
43
- | Low | `inspect *`, `audio transcribe/list-voices`, `generate image` | $0.01–0.10 |
44
- | High | `generate video`, `edit image`, `edit grade/reframe/speed-ramp` | $1–5 |
45
- | Very High | `remix *` (highlights, auto-shorts, regenerate-scene), `vibe build` (full pipeline) | $5–50+ |
41
+ | Tier | Commands | Per-call cost |
42
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------- |
43
+ | Free | `detect *`, `edit silence-cut/fade/noise-reduce/text-overlay/interpolate`, `timeline *`, `scene lint/list-styles`, `audio duck` | $0 |
44
+ | Low | `inspect *`, `audio transcribe/list-voices`, `generate image` | $0.01–0.10 |
45
+ | High | `generate video`, `edit image`, `edit grade/reframe/speed-ramp` | $1–5 |
46
+ | Very High | `remix *` (highlights, auto-shorts, regenerate-scene), `vibe build` (full pipeline) | $5–50+ |
46
47
 
47
48
  > Rule: **confirm with the user before any High / Very-High call**.
48
49
 
49
50
  ## JSON envelope
50
51
 
51
52
  ### Success
53
+
52
54
  ```json
53
55
  {
54
56
  "command": "<group> <leaf>",
55
57
  "elapsedMs": 12345,
56
58
  "costUsd": 0.07,
57
59
  "warnings": [],
58
- "data": { /* command-specific */ },
60
+ "data": {
61
+ /* command-specific */
62
+ },
59
63
  "dryRun": true
60
64
  }
61
65
  ```
62
66
 
63
67
  ### Error (stderr)
68
+
64
69
  ```json
65
70
  {
66
71
  "success": false,
@@ -72,13 +77,13 @@ vibe guide <topic> --json # Step-by-step guides (motion | scene | p
72
77
  }
73
78
  ```
74
79
 
75
- | Code | Exit | Meaning | Recovery |
76
- |------|------|---------|----------|
77
- | `USAGE_ERROR` | 2 | bad arg | check `vibe schema <cmd>` |
78
- | `NOT_FOUND` | 3 | file missing | verify path |
79
- | `AUTH_ERROR` | 4 | key missing/invalid | `vibe doctor` |
80
- | `API_ERROR` | 5 | provider failed | retry if `retryable: true` |
81
- | `NETWORK_ERROR` | 6 | connection | retry with backoff |
80
+ | Code | Exit | Meaning | Recovery |
81
+ | --------------- | ---- | ------------------- | -------------------------- |
82
+ | `USAGE_ERROR` | 2 | bad arg | check `vibe schema <cmd>` |
83
+ | `NOT_FOUND` | 3 | file missing | verify path |
84
+ | `AUTH_ERROR` | 4 | key missing/invalid | `vibe doctor` |
85
+ | `API_ERROR` | 5 | provider failed | retry if `retryable: true` |
86
+ | `NETWORK_ERROR` | 6 | connection | retry with backoff |
82
87
 
83
88
  ## Authentication
84
89
 
@@ -107,13 +112,15 @@ export IMGBB_API_KEY="..." # Local image upload (Seedance image-to-video
107
112
  The **storyboard project** is the primary product lane. `STORYBOARD.md`
108
113
  and `DESIGN.md` are the source of truth; generated files under
109
114
  `compositions/` are artifacts. Use `vibe storyboard *` for narrow cue
110
- edits and direct Markdown edits for larger creative rewrites. Use
115
+ edits, and use `vibe storyboard revise --dry-run` for project-aware
116
+ LLM revisions to `STORYBOARD.md`. Use direct Markdown edits for larger
117
+ design rewrites. Use
111
118
  `vibe inspect project`, `vibe inspect render --cheap`, and `vibe scene repair`
112
119
  for deterministic local review and mechanical composition fixes. Semantic
113
120
  creative fixes belong to the host agent.
114
121
 
115
122
  ```
116
- init --from → storyboard validate → plan → build → inspect → render # storyboard-to-video
123
+ init --from → storyboard revise → storyboard validate → plan → build → inspect → render
117
124
  generate / edit / inspect / remix # one-shot media tools
118
125
  scene / timeline # lower-level authoring
119
126
  run / agent / schema / context # automation + agents
@@ -126,19 +133,44 @@ CLI flag → per-beat STORYBOARD.md cue → vibe.config.json →
126
133
  legacy vibe.project.yaml → configured/env default → VibeFrame default
127
134
  ```
128
135
 
136
+ Build planning contract:
137
+
138
+ `vibe plan --json` emits `data.kind:"build-plan"`, `schemaVersion:"1"`,
139
+ `status:"ready"|"invalid"`, `summary`, `validation`, `retryWith`, and
140
+ `nextCommands`. `vibe plan`, `vibe build --dry-run`, and `vibe build`
141
+ validate `STORYBOARD.md` before cost caps or provider dispatch. Invalid
142
+ storyboards exit non-zero with `code:"STORYBOARD_VALIDATION_FAILED"` and
143
+ `retryWith` entries for `storyboard validate` / `storyboard revise`.
144
+
145
+ Build repair contract:
146
+
147
+ Real `vibe build` runs deterministic scene repair after compose
148
+ (sub-compositions only) and after sync (including root `index.html`) before
149
+ render. Failed repair returns `code:"SCENE_REPAIR_FAILED"` and
150
+ `sceneRepair:{ran,stage,status,score,fixed,remainingIssues,retryWith}`; use
151
+ those `retryWith` commands before trying to render.
152
+
153
+ Product surface contract:
154
+
155
+ `vibe schema --list` includes `surface`, `replacement`, and `note`.
156
+ Prefer `vibe schema --list --surface public` for first-run/product workflows.
157
+ Use `legacy` commands only for compatibility and inspect `replacement` first.
158
+
129
159
  ## Per-group invariants
130
160
 
131
- | Group | Key rule |
132
- |-------|----------|
133
- | `generate` | Always `--dry-run` first. Costs money. `-p` selects provider; default routes via key availability. |
134
- | `edit` | FFmpeg-only leaves (silence-cut, fade, noise-reduce, text-overlay, interpolate) are free. caption/grade/reframe/image need API keys. |
135
- | `inspect` | `inspect project` and `inspect render --cheap` are local. Use `inspect render --ai` for final Gemini critique; Gemini media/review calls are low cost. |
136
- | `audio` | `transcribe` low cost (Whisper). `dub` is full pipeline (medium-high). `duck` is free. |
137
- | `remix` | **Confirm with user.** Multi-step, high cost ($5–50+). Always `--dry-run`. |
138
- | `detect` | Free, FFmpeg only. No keys. |
139
- | `project / timeline` | Free. All mutating leaves support `--dry-run`. |
140
- | `scene` | `lint` and `list-styles` free; `add` may invoke TTS + image-gen. |
141
- | `init / build / render` | Top-level project flow. `init` is idempotent (existing files preserved without `--force`). |
161
+ | Group | Key rule |
162
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
163
+ | `generate` | Always `--dry-run` first. Costs money. `-p` selects provider; default routes via key availability. `--no-wait` returns local job ids. |
164
+ | `edit` | FFmpeg-only leaves (silence-cut, fade, noise-reduce, text-overlay, interpolate) are free. caption/grade/reframe/image need API keys. |
165
+ | `inspect` | `inspect project` and `inspect render --cheap` are local. Use `inspect render --ai` for final Gemini critique; Gemini media/review calls are low cost. |
166
+ | `audio` | `transcribe` low cost (Whisper). `dub` is full pipeline (medium-high). `duck` is free. |
167
+ | `remix` | **Confirm with user.** Multi-step, high cost ($5–50+). Always `--dry-run`. |
168
+ | `detect` | Free, FFmpeg only. No keys. |
169
+ | `project / timeline` | Free. All mutating leaves support `--dry-run`. |
170
+ | `scene` | `lint` and `list-styles` free; `add` may invoke TTS + image-gen. |
171
+ | `init / build / render` | Top-level project flow. `init` is idempotent. `build --stage assets` may return async job ids for video/music cues; poll with `status project --refresh`. Real `build` auto-repairs scene artifacts before render. |
172
+ | `storyboard` | `list/get/set/move/validate` are local. `revise` uses a composer LLM, validates before writing, and should be run with `--dry-run` first. |
173
+ | `status` | Free/local by default. `status job` returns a flat `kind:"job"` payload plus the raw record; `status project` returns `kind/status/currentStage/beats/jobs/build/review/retryWith` for resume decisions. |
142
174
 
143
175
  ## Common patterns
144
176
 
@@ -147,7 +179,7 @@ legacy vibe.project.yaml → configured/env default → VibeFrame default
147
179
  ```bash
148
180
  vibe generate image "hero shot" -o hero.png --json
149
181
  vibe generate video "motion prompt" -i hero.png -o hero.mp4 --json
150
- vibe generate speech "narration text" -o voice.mp3 --json
182
+ vibe generate narration "narration text" -o voice.mp3 --json
151
183
  vibe generate music "mood description" -o bgm.mp3 -d 10 --json
152
184
  ```
153
185
 
@@ -155,18 +187,39 @@ vibe generate music "mood description" -o bgm.mp3 -d 10 --json
155
187
 
156
188
  ```bash
157
189
  vibe init my-video --from "45-second launch video" --visual-style "Swiss Pulse" --json
190
+ vibe storyboard revise my-video --from "make the hook sharper" --dry-run --json
158
191
  # edit my-video/STORYBOARD.md, my-video/DESIGN.md
159
192
  vibe storyboard validate my-video --json
160
193
  vibe plan my-video --json
161
194
  vibe build my-video --dry-run --max-cost 5 --json
162
195
  vibe build my-video --max-cost 5 --json
196
+ vibe status project my-video --refresh --json # when build returns pending-jobs
163
197
  vibe inspect project my-video --json
164
198
  vibe render my-video -o renders/final.mp4 --json
165
199
  vibe inspect render my-video --cheap --json
166
200
  vibe inspect render my-video --ai --json
201
+
202
+ # Single-beat loop
203
+ vibe build my-video --beat hook --stage sync --json
204
+ vibe inspect project my-video --beat hook --json
205
+ vibe render my-video --beat hook --json
206
+ vibe inspect render my-video --beat hook --cheap --json
207
+ vibe status project my-video --json
167
208
  vibe scene repair --project my-video --json
168
209
  ```
169
210
 
211
+ ### Machine status contract
212
+
213
+ `build-report.json` keeps the detailed `beats[]` array and also includes `kind:"build"`, `status`, `currentStage`, `beatSummary`, `jobs[]`, `sceneRepair`, `stageReports`, `warnings`, and `retryWith`. Each beat keeps legacy flat asset fields and nested `narration`, `backdrop`, `video`, and `music` objects with provider/path/status metadata. `render-report.json` records the latest render output, including `beat` when `vibe render --beat <id>` is used.
214
+
215
+ `vibe status job --json` emits the normal success envelope with `data.kind:"job"`, flat job fields (`id`, `jobType`, `provider`, `status`, timestamps), `progress`, `result`, `retryWith`, and the raw `job` record for compatibility.
216
+
217
+ `vibe status project --json` emits `data.kind:"project"`, `status`, `currentStage`, `beats:{total,assetsReady,compositionsReady,needsAuthor}`, `jobs.latest`, `build`, `review`, `warnings`, and `retryWith`. `review` includes `issueCount`, `errorCount`, `warningCount`, and its own `retryWith`; top-level `retryWith` carries the next resume command. Use `retryWith` rather than guessing the next command.
218
+
219
+ ### Storyboard revision contract
220
+
221
+ `vibe storyboard revise --json` emits `data.kind:"storyboard-revision"`, `provider`, `summary`, `changedBeats`, `validation`, `wrote`, `warnings`, and `retryWith`. On failure it does not write `STORYBOARD.md`; inspect `data.code`, `data.message`, and `data.retryWith`.
222
+
170
223
  ### Lower-level timeline (NLE-style)
171
224
 
172
225
  ```bash