gooseworks 0.4.4 → 0.4.5-dev.15.facf60fb

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 (120) hide show
  1. package/README.md +42 -11
  2. package/dist/agents/staging.d.ts +38 -0
  3. package/dist/agents/staging.d.ts.map +1 -0
  4. package/dist/agents/staging.js +309 -0
  5. package/dist/agents/staging.js.map +1 -0
  6. package/dist/auth/credentials.d.ts +1 -0
  7. package/dist/auth/credentials.d.ts.map +1 -1
  8. package/dist/auth/credentials.js +26 -8
  9. package/dist/auth/credentials.js.map +1 -1
  10. package/dist/auth/device-flow.d.ts +79 -0
  11. package/dist/auth/device-flow.d.ts.map +1 -0
  12. package/dist/auth/device-flow.js +411 -0
  13. package/dist/auth/device-flow.js.map +1 -0
  14. package/dist/auth/login-mode.d.ts +25 -0
  15. package/dist/auth/login-mode.d.ts.map +1 -0
  16. package/dist/auth/login-mode.js +87 -0
  17. package/dist/auth/login-mode.js.map +1 -0
  18. package/dist/auth/oauth-server.d.ts +2 -2
  19. package/dist/auth/oauth-server.d.ts.map +1 -1
  20. package/dist/auth/oauth-server.js +28 -5
  21. package/dist/auth/oauth-server.js.map +1 -1
  22. package/dist/auth/paste-login.d.ts +27 -0
  23. package/dist/auth/paste-login.d.ts.map +1 -0
  24. package/dist/auth/paste-login.js +203 -0
  25. package/dist/auth/paste-login.js.map +1 -0
  26. package/dist/commands/doctor.d.ts.map +1 -1
  27. package/dist/commands/doctor.js +17 -8
  28. package/dist/commands/doctor.js.map +1 -1
  29. package/dist/commands/formats.js +2 -2
  30. package/dist/commands/formats.js.map +1 -1
  31. package/dist/commands/graphics/publish-flow.js +1 -1
  32. package/dist/commands/graphics/publish-flow.js.map +1 -1
  33. package/dist/commands/install.d.ts.map +1 -1
  34. package/dist/commands/install.js +101 -34
  35. package/dist/commands/install.js.map +1 -1
  36. package/dist/commands/launch.d.ts +3 -0
  37. package/dist/commands/launch.d.ts.map +1 -0
  38. package/dist/commands/launch.js +35 -0
  39. package/dist/commands/launch.js.map +1 -0
  40. package/dist/commands/login.d.ts +21 -1
  41. package/dist/commands/login.d.ts.map +1 -1
  42. package/dist/commands/login.js +106 -29
  43. package/dist/commands/login.js.map +1 -1
  44. package/dist/commands/logout.d.ts.map +1 -1
  45. package/dist/commands/logout.js +7 -1
  46. package/dist/commands/logout.js.map +1 -1
  47. package/dist/commands/skills.d.ts +16 -0
  48. package/dist/commands/skills.d.ts.map +1 -1
  49. package/dist/commands/skills.js +52 -1
  50. package/dist/commands/skills.js.map +1 -1
  51. package/dist/commands/styles.js +2 -2
  52. package/dist/commands/styles.js.map +1 -1
  53. package/dist/commands/tool.d.ts +17 -0
  54. package/dist/commands/tool.d.ts.map +1 -0
  55. package/dist/commands/tool.js +239 -0
  56. package/dist/commands/tool.js.map +1 -0
  57. package/dist/commands/update.d.ts.map +1 -1
  58. package/dist/commands/update.js +20 -0
  59. package/dist/commands/update.js.map +1 -1
  60. package/dist/commands/video-local.d.ts.map +1 -1
  61. package/dist/commands/video-local.js +2 -2
  62. package/dist/commands/video-local.js.map +1 -1
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +14 -3
  65. package/dist/config.js.map +1 -1
  66. package/dist/environment.d.ts +9 -0
  67. package/dist/environment.d.ts.map +1 -0
  68. package/dist/environment.js +105 -0
  69. package/dist/environment.js.map +1 -0
  70. package/dist/index.js +12 -45
  71. package/dist/index.js.map +1 -1
  72. package/dist/lib/graphics-cache.d.ts.map +1 -1
  73. package/dist/lib/graphics-cache.js +2 -2
  74. package/dist/lib/graphics-cache.js.map +1 -1
  75. package/dist/lib/mcp-client.d.ts +53 -0
  76. package/dist/lib/mcp-client.d.ts.map +1 -0
  77. package/dist/lib/mcp-client.js +196 -0
  78. package/dist/lib/mcp-client.js.map +1 -0
  79. package/dist/program.d.ts +2 -0
  80. package/dist/program.d.ts.map +1 -0
  81. package/dist/program.js +56 -0
  82. package/dist/program.js.map +1 -0
  83. package/dist/skills/custom-video-skill.d.ts +1 -1
  84. package/dist/skills/custom-video-skill.d.ts.map +1 -1
  85. package/dist/skills/custom-video-skill.js +1 -1
  86. package/dist/skills/custom-video-skill.js.map +1 -1
  87. package/dist/skills/installer.d.ts.map +1 -1
  88. package/dist/skills/installer.js +42 -24
  89. package/dist/skills/installer.js.map +1 -1
  90. package/dist/skills/master-skill.d.ts +12 -9
  91. package/dist/skills/master-skill.d.ts.map +1 -1
  92. package/dist/skills/master-skill.js +857 -372
  93. package/dist/skills/master-skill.js.map +1 -1
  94. package/dist/skills/releases.d.ts +1 -1
  95. package/dist/skills/releases.d.ts.map +1 -1
  96. package/dist/skills/releases.js +8 -5
  97. package/dist/skills/releases.js.map +1 -1
  98. package/dist/skills/routes.js +8 -8
  99. package/dist/skills/routes.js.map +1 -1
  100. package/dist/skills/staging-content.d.ts +3 -0
  101. package/dist/skills/staging-content.d.ts.map +1 -0
  102. package/dist/skills/staging-content.js +12 -0
  103. package/dist/skills/staging-content.js.map +1 -0
  104. package/dist/utils/http.d.ts +7 -1
  105. package/dist/utils/http.d.ts.map +1 -1
  106. package/dist/utils/http.js +5 -1
  107. package/dist/utils/http.js.map +1 -1
  108. package/package.json +12 -4
  109. package/skills/goose-ads/SKILL.md +386 -224
  110. package/skills/goose-product-photos/SKILL.md +107 -58
  111. package/skills/goose-video/SKILL.md +300 -36
  112. package/skills/goose-video-local/SKILL.md +239 -31
  113. package/skills/gooseworks/SKILL.md +133 -26
  114. package/skills/make-custom-video/SKILL.md +256 -11
  115. package/skills/manifest.json +7 -7
  116. package/skills/routes.json +8 -8
  117. package/dist/skills/fetcher.d.ts +0 -18
  118. package/dist/skills/fetcher.d.ts.map +0 -1
  119. package/dist/skills/fetcher.js +0 -118
  120. package/dist/skills/fetcher.js.map +0 -1
@@ -8,10 +8,10 @@ description: >
8
8
  gooseworks CLI) OR inside a GooseWorks workspace sandbox (canonical MCP tools + Bash, no CLI).
9
9
  Use for a client-side format project (created by goose-video), a template-remix project or a
10
10
  video batch. A copy-for-Claude command or project id must first be checked with
11
- video_project_read. A hosted connector with no shell hands this same project to the GooseWorks coworker. To start a NEW video ad in chat,
11
+ video_project_read. An agent that can't run shell commands on the customer's computer hands this same project to the GooseWorks coworker. To start a NEW video ad in chat,
12
12
  use goose-video first.
13
13
  category: ads
14
- version: 0.6.1
14
+ version: 0.7.0
15
15
  author: GooseWorks
16
16
  tags: [gooseworks, ads, video, remix, imessage, podcast, ugc, local-render, sandbox, byoa]
17
17
  ---
@@ -70,9 +70,171 @@ and approval before spending. Hosted installed snapshots use the existing Skills
70
70
  Skill content and a host's cached MCP tool schemas are separate: refreshing one does not refresh
71
71
  the other. Check the actual advertised tools before using new fields.
72
72
 
73
+ ## No GooseWorks tools in this session? Call them through the CLI
74
+
75
+ The GooseWorks tools named here (for example `account_whoami`, `brand_onboarding`,
76
+ `brand_read`) normally come from the GooseWorks connector. If they are not registered in this
77
+ session but you have a shell with the `gooseworks` CLI signed in (a cloud sandbox such as
78
+ ChatGPT agent, Meta AI or Grok), call the same tool from the shell:
79
+
80
+ ```bash
81
+ npx gooseworks tool <name> '<arguments as a JSON object>'
82
+ ```
83
+
84
+ - Run `npx gooseworks tool --list` once first. It prints the server's rules for using the tools
85
+ and every tool name; `npx gooseworks tool <name> --schema` shows one tool's arguments.
86
+ - The result prints as JSON. When a tool answers with a one-line summary, the fields you act on
87
+ (such as `next_step` and ids) follow under "Data:". It exits 1 when the tool reports an error.
88
+ - Nothing renders as a widget here, so tell the user the result in plain words.
89
+ - The same rules apply as over the connector: state the credit total and get the user's yes
90
+ before paid work.
91
+ - If it says you are not logged in, run `npx gooseworks login --device --no-wait`, show the
92
+ user the link and code it prints, and run `npx gooseworks login --device` once they approve.
93
+
94
+ When the tools are registered in this session, call them directly instead.
95
+
96
+ ## Prepare the video workflow and brand before creative work
97
+
98
+ **Installed entry files are bootstrap instructions.** For new work started from an installed
99
+ file or an old chat, fetch `catalog_fetch { type: "skill", slug: "goose-video-local" }` on the selected
100
+ connection and read its returned content and dependencies before continuing. Use the already
101
+ fetched body when this entry came from that connection in this run; do not recursively fetch
102
+ the same entry. A CLI freshness warning does not block using the current connected package.
103
+ Keep the fetched package and hashes in a new run folder; do not replace edited installed files.
104
+ If current instructions cannot be loaded, resolve the connection before format suggestions,
105
+ script writing or production. Do not continue from an old installed workflow or session notes.
106
+
107
+ **Follow the connector's full-guide requirement when available.** Fetch
108
+ `catalog_fetch { type: "skill", slug: "gooseworks-guide" }` when the connector requires it.
109
+ The only older-server exception is below; it never removes brand preparation or approvals.
110
+
111
+ | Returned guide/workflow state on the selected connection | Required action |
112
+ | --- | --- |
113
+ | Guide returns `not_found`, and this same connection already returned the complete current matching video entry with its required dependencies | Continue with that authoritative entry's workflow, full brand preparation and existing approvals. |
114
+ | Guide has another error, no response, or incomplete content; or the matching entry/dependencies are missing, incomplete or from another connection | Stop before creative work, project writes or paid calls; resolve a compatible connection on this same environment. |
115
+
116
+ A missing custom entry or required custom tool/schema remains unavailable: never substitute
117
+ a template or an import to bypass it. Never hide other fetch errors or continue from cached
118
+ instructions merely because the guide was not found.
119
+
120
+ **For an existing project or batch, read `video_project_read` first.** Determine its actual
121
+ route and saved review state before fetching a recipe or doing local work. Resume an approved
122
+ run with its recorded packages, brand inputs, script and ingredients; do not silently replace
123
+ them with today's release or brand rules. Follow returned preparation requirements and use
124
+ the existing affected review/approval flow for an intentional change. Reads, free drafts,
125
+ imports and existing-job retrieval do not grant permission for new paid production.
126
+
127
+ **For every new plan, resolve the brand and call**
128
+ `brand_read { brand_id, sections: ["summary", "kit", "products", "learnings"] }` **before**
129
+ suggesting formats, mining video angles, writing any script, creating a production plan or
130
+ handing the work to another agent. Use `brand_get_context` with those same four sections only
131
+ when advertised. Reuse a complete read from this run on the same connection and brand.
132
+ Onboarding completion, a summary-only response and earlier session notes do not supply the
133
+ kit, selected product facts or saved rules. If the full read is unavailable, resolve it before
134
+ creative work. Use known kit facts while research is incomplete; do not restart research
135
+ solely because its status is pending. Never invent a product fact or accept a campaign to
136
+ bypass preparation. Then search the Brand Brain (next section) before suggesting formats,
137
+ choosing an angle or asking the user for a brand fact.
138
+
139
+ Carry that context through custom/template/idea routing and delegation. Before writing, make
140
+ the workflow's brand-rules file from those sources: pronunciations, required spoken copy,
141
+ prohibited claims, real logo, font, palette and the selected product's supported facts.
142
+ Entries prefixed `Video preference:` and visual/pacing instructions are creative direction,
143
+ not spoken lines. Use the kit's audience, offer and voice as defaults without an interview.
144
+ The rules file mirrors context; it is not proof of a read or permission to spend. Keep the
145
+ route's existing script, ingredient and budget approvals, including its allowed previews.
146
+
147
+ **Use the server's brand bundle when the selected API returns it.** Project create/read may
148
+ return top-level
149
+ `brand_context`: `{ version: 1, brand_id, digest, loaded_at, sections, brand, kit, products,
150
+ learnings }`. Its sections cover summary, kit, products and learnings.
151
+
152
+ | Returned brand/project response on the selected connection | Required action |
153
+ | --- | --- |
154
+ | A complete authoritative version-1 `brand_context` is returned | Binding is required: use its contents for the plan/rules and include `script_drafts.brand_context_digest = brand_context.digest` with each new/changed script save. |
155
+ | An older API returns the actual four brand sections but no `brand_context` in either the brand read or project response | Prepare from those full sections, write the brand rules and follow the selected connection's existing approval flow and advertised fields. Do not fabricate a receipt or send nonexistent bundle/digest fields. |
156
+
157
+ An incomplete/malformed bundle or missing brand section is a preparation failure, never the
158
+ older-API exception. Once this connection returns an authoritative bundle, use its binding
159
+ contract. `script_drafts.video_brand_context` is server-owned: do not author, replace or forge
160
+ it, and do not invent a read receipt or hash local brand facts into one. Keep the full bundle
161
+ out of client review payloads. If managed generation returns HTTP 409
162
+ `video_brand_context_required`, reload the project and bind the plan to its returned bundle
163
+ through the normal review flow before retrying. That refusal never permits the older-API
164
+ fallback, skipping sections or retrying paid calls blindly. Unchanged approved legacy resumes
165
+ retain their package, context and approvals; an upgrade alone needs no extra approval.
166
+
167
+ **To apply a deliberate brand correction to a new or revised plan**, make a fresh, unfiltered
168
+ `brand_read` of those four sections. When it returns the authoritative bundle, use its
169
+ returned `brand_context.digest` in the complete revised `script_drafts` through the existing
170
+ `video_project_upsert` `patch.script` save; the server verifies the current brand and replaces
171
+ its snapshot with the saved plan. On an older API with no bundle contract, apply the actual
172
+ four-section correction and save the revised draft through its existing flow without inventing
173
+ digest fields. If a connection that already returned a bundle cannot supply the fresh bundle,
174
+ resolve that failure before rebinding. Review and approve the affected script, ingredients and
175
+ budget through the normal flow. Never refresh an ongoing approved run automatically; its
176
+ recorded package and brand inputs stay pinned until an intentional change.
177
+
178
+ ## Search the Brand Brain, then propose — before any creative choice or question
179
+
180
+ The Brand Kit is a summary. The brand's saved knowledge (its Brain) holds what the Kit does not:
181
+ rules from past feedback, approved and rejected creatives, customer evidence, approved claims,
182
+ reports and documents. **After `brand_read`, and before you choose an angle, claim, hook,
183
+ product emphasis, format or source ad — and before you ask the user for any brand fact — call
184
+ `knowledge_search { brand_id, query }`** when it is registered. It is free and read-only: no
185
+ approval, no announcement to the customer and no questionnaire.
186
+
187
+ 1. **Search for this task, not the whole Brain.** Run one short query (under 500 characters) in
188
+ the user's own words plus the product (for example "ads for <product>: what worked, what to
189
+ avoid") and one with
190
+ `source_types: ["evidence", "claim", "learning", "creative", "document"]` for proof and past
191
+ creative results. Add a query only for a specific open question. Reuse results from this run.
192
+ 2. **Keep these states distinct** and record which one each query returned:
193
+
194
+ | Result | Means | Do |
195
+ | --- | --- | --- |
196
+ | `status: "ok"` with matches | Saved knowledge exists | Use it; keep each fact's citation in your working brief |
197
+ | `status: "empty"` | Nothing saved matches this query | Say "no saved evidence for <topic>", never "the brand has no proof" |
198
+ | `refresh_required` | The results shown are current; some changed sources were left out | Use them; search again shortly for anything missing |
199
+ | `building` | The index is not ready | Retry once shortly, then continue with the gap stated |
200
+ | An error, or the tool is not registered | Retrieval failed or is unavailable | Retry an error once, then continue from `brand_read` and treat evidence as unchecked |
201
+ | An empty Kit field | Only that field is blank | Not a search result: still search before asking |
202
+
203
+ 3. **Let the findings change the plan.** A `dont`/`must` learning or a rejected creative rules
204
+ options out; an approved or well-rated past creative is a proven angle to lead with; a report
205
+ shows what worked. Claim-grade proof is a result with `approved_ad_claim: true` or the kit's
206
+ `approvedClaims` within their stated applicability; the kit's `proofPoints` are what the
207
+ backend allows an ad to state, used as written. Other Kit text, documents and performance
208
+ numbers are context, never public claims. Never invent an offer, price or result. Judge
209
+ relevance and skip results about another product or business.
210
+ 4. **Propose; don't interview.** Lead with one recommended direction (angle, product, source or
211
+ format) and a one-line reason naming what you found, with up to two alternatives. When several
212
+ directions fit (two audiences, products or campaigns), pick the one the evidence favours, such
213
+ as an active campaign or approved past creatives, and name the other as an alternative instead
214
+ of asking. Ask only for a decision the brand read and the search cannot settle, or for spend
215
+ approval. Never ask the user for a fact the Brain already answered.
216
+ Keep directions already chosen (the user's words, a project's creative brief, handed-off
217
+ defaults, approved plans): search only to fill empty fields and to apply saved rules. When a
218
+ returned card or picker presents the choice, your recommendation is its one acknowledgement
219
+ line and the saved plan's defaults, not a separate list.
220
+ 5. **Carry an evidence brief** into the routed skill, writer or plan: findings with citations,
221
+ the state of each query, what it ruled out and the open gaps. Tell the customer the findings
222
+ in plain words; the citations stay in the brief.
223
+
224
+ On an approved resume, keep the saved brief and evidence; search again only for a new decision.
225
+
73
226
  ## Chat hosts and cards
74
227
 
75
- First perform the mandatory route check below. Then, without a shell, hand a verified template
228
+ **Who makes the video (one rule).** If you can run shell commands on the customer's own
229
+ computer, you make it there with `goose-video-local`: check the toolchain first and, if it
230
+ can't be fixed, hand it off. If you can't, hand it to the GooseWorks coworker with
231
+ `goose_run_task { brand_id, project_id, message: the customer's words }`; the one approval,
232
+ Stop and fixes stay in this chat. Inside the GooseWorks coworker's own sandbox you are the
233
+ coworker: make it yourself and never hand off. A hosted code sandbox is not the customer's
234
+ computer. Decide this yourself, never from the host's name; the server needs no flag for it.
235
+
236
+ First perform the mandatory route check below. Then, if you can't run shell commands on the
237
+ customer's computer, hand a verified template
76
238
  project to `goose_run_task { brand_id, project_id, message }`, or a verified template batch to
77
239
  `goose_run_task { brand_id, batch_id, message }` (never send both ids). Keep task_id and the
78
240
  same project or batch. Generated custom children keep their separate make-custom-video flow.
@@ -160,7 +322,8 @@ review set; do not add a separate approval round.
160
322
 
161
323
  ## Where am I running? (decide once, first)
162
324
 
163
- Check in Bash, without printing any secret value:
325
+ With no shell on the customer's computer at all, you don't render here: hand the project off
326
+ (Chat hosts and cards above). Otherwise check in Bash, without printing any secret value:
164
327
 
165
328
  ```bash
166
329
  [ -n "$GW_MEDIA_PROXY_TOKEN" ] && echo sandbox || echo local
@@ -323,7 +486,7 @@ the skill. It's fire-and-forget, never counts against you, and never blocks your
323
486
  1. **Sandbox →** see "Running in a GooseWorks sandbox": ffmpeg + ffprobe (+ PIL on demand); no
324
487
  Chromium, so browser formats stop there.
325
488
  2. **CLI present →** run `gooseworks doctor --no-browser` for login, MCP, Node 18+, ffmpeg
326
- with libx264 + libass, and ffprobe. This is common setup only. After fetching the selected
489
+ with libx264, and ffprobe. Require libass only for a selected ASS caption route; caption-burn uses Pillow overlays and does not need it. This is common setup only. After fetching the selected
327
490
  capabilities in Step 2, check each browser renderer's actual launch before ANY paid
328
491
  ingredient. An unscoped `gooseworks doctor` checks only the calling folder's browser;
329
492
  it cannot certify a different fetched renderer.
@@ -338,7 +501,10 @@ the skill. It's fire-and-forget, never counts against you, and never blocks your
338
501
  **`ghcr.io/gooseworks-ai/goose-video-render`** (ffmpeg + ffprobe + Playwright Chromium baked
339
502
  in), mounting the project working directory. (Nested Docker is usually disabled inside
340
503
  managed sandboxes — treat this as an option, not a guarantee.)
341
- 5. **None of the above works →** STOP and tell the user plainly, e.g.: *"Video rendering needs
504
+ 5. **None of the above works →** on the customer's computer, hand the project to the GooseWorks
505
+ coworker with `goose_run_task` (a `needs_browser` format can't be: offer another). Inside the
506
+ coworker sandbox, or when the customer wants it made on their own machine, STOP and tell the
507
+ user plainly, e.g.: *"Video rendering needs
342
508
  ffmpeg (and, for this format, a Playwright Chromium) on the machine running this agent. This
343
509
  environment doesn't have them and I can't install them here. Options: (a) enable Docker so I
344
510
  can use the goose-video-render image, (b) install ffmpeg + `npx playwright install chromium`,
@@ -560,7 +726,7 @@ the app's "N concepts" flow: one composer submission fans out into **N independe
560
726
  **Loop shape (ONE approval for the batch, isolated work per concept):**
561
727
  1. Run **Step 1 + Step 1.5 + Step 2 + Step 2.5 + Step 3-assemble** for EACH concept project (each
562
728
  has its own `project_id`, brief, `GW_PROJECT_ID` and `working/` folder — never cross-write
563
- between concepts). The brand read (Step 1 item 3) and `brand-rules.json` (Step 1.7) are per
729
+ between concepts). The brand read (Step 1 item 2) and `brand-rules.json` (Step 1.7) are per
564
730
  BRAND: do them once for the batch and copy the file into each concept's `working/`. The read is
565
731
  ~90K characters. Step 2.5's angle bank is shared per brand AND product: load or build it once, and
566
732
  give every concept whose angle is `auto` a DIFFERENT angle from that list, so the batch is N
@@ -603,8 +769,8 @@ written per-project; a batch just runs it N times with the shared approval gate
603
769
 
604
770
  The composer already collected the user's creative direction onto the project. **Read it and treat
605
771
  it as ground truth — it OVERRIDES the template recipe's defaults, and it REPLACES the clarifying
606
- questions you would otherwise ask.** Only fall back to the recipe default (then, last, to asking)
607
- for a field the brief leaves empty. Map the fields you WILL honor:
772
+ questions you would otherwise ask.** For a field the brief leaves empty, use the Brain search's
773
+ evidence brief first, then the recipe default, then (last) asking. Map the fields you WILL honor:
608
774
 
609
775
  - `creative_brief.productName` / `.offer` / `.angle` → the product, offer/code, and angle. Do
610
776
  **not** ask "which product / what offer / what angle" if these are set.
@@ -622,20 +788,24 @@ for a field the brief leaves empty. Map the fields you WILL honor:
622
788
  "also 1:1" option included).
623
789
  - `polish_policy` (`standard` | `extra`) → `extra` means spend the extra pass on QC/polish.
624
790
 
625
- 2. `catalog_fetch { type: "template", slug: <source_sample_id> }` → the source video: `media_url`,
626
- `recipe`, `format` (e.g. "podcast-skit", "imessage"), `extracted_script`, `how_to`, `remix_spec`.
627
- 3. Brand gate: `brand_read { brand_id, sections: ["summary", "kit", "products", "learnings"] }`
791
+ 2. Brand gate: `brand_read { brand_id, sections: ["summary", "kit", "products", "learnings"] }`
628
792
  (older clients: `brand_get_context` with the same sections). Ask for all four: the default
629
793
  leaves out the kit and the brand's saved rules, and a video made without them is off-brand.
630
794
  If the kit's `researchStatus` (or the brand's `research_status`) is `complete`, REUSE it —
631
- never re-research. If not, run brand research first (`catalog_fetch { type: "skill", slug:
632
- "brand-research" }`) and follow its stored-pack workflow. Only when that verified pack is
795
+ never re-research. A pending status alone does not require research; use verified stored
796
+ facts and ask only for an actual gap. If the context is empty or the customer requests
797
+ research, load `catalog_fetch { type: "skill", slug:
798
+ "brand-research" }` and follow its stored-pack workflow. Only when that verified pack is
633
799
  saved in the supported research workspace, finalize with
634
800
  `brand_update { brand_id, patch: { finalize_research: true } }`, then read the brand back.
635
801
  Never send raw research JSON through `kit_patch`: the public tool accepts only the existing
636
802
  `video_lab` asset slot there. If there is no verified stored pack, submit researched facts
637
803
  through typed `patch.knowledge` / `patch.kit` as pending agent proposals; do not pretend
638
804
  research is finalized or its proposals are approved. Then do Step 1.7 with verified facts.
805
+ 3. For a new plan, `catalog_fetch { type: "template", slug: <source_sample_id> }` → the source
806
+ video: `media_url`, `recipe`, `format` (e.g. "podcast-skit", "imessage"),
807
+ `extracted_script`, `how_to`, `remix_spec`. For an approved resume, restore the recorded
808
+ package and dependencies instead of fetching today's recipe over the saved plan.
639
809
 
640
810
  ### Step 1.6 — a remix of a FINISHED video (the project read has a `remix` block)
641
811
 
@@ -664,8 +834,9 @@ Its `video_project_read` returns a top-level `remix` block
664
834
 
665
835
  ### Step 1.7 — the brand rules file and the brand assets (every run, before any writing)
666
836
 
667
- Write `working/brand-rules.json` from the Step 1 brand read. Every later step reads THIS file,
668
- not your memory of the chat:
837
+ Before new writing, write `working/brand-rules.json` from the Step 1 brand read. Preserve an
838
+ approved run's saved rules on resume; reconcile an intentional rule change through the existing
839
+ review gate. Every later step reads THIS file, not your memory of the chat:
669
840
 
670
841
  ```json
671
842
  {
@@ -745,8 +916,9 @@ in the SAME turn, before anything else:
745
916
  ## Save durable brand answers, then verify them
746
917
 
747
918
  Read the selected brand with `brand_read { brand_id, sections: ["summary", "kit", "products", "learnings", "onboarding"] }`
748
- (fallback: `brand_get_context` with the same sections). Keep founder answers, user corrections,
749
- research and your own hypotheses distinct. Reuse matching saved answers; ask only about gaps.
919
+ (older clients: `brand_get_context` with the same sections, only when that tool is advertised).
920
+ Keep founder answers, user corrections, research and your own hypotheses distinct. Reuse
921
+ matching saved answers; ask only about gaps.
750
922
 
751
923
  When the user asks to remember a rule, answers a brand interview, or explicitly corrects a
752
924
  standing fact, save that answer in the same turn. The capture request authorizes those answers;
@@ -910,7 +1082,16 @@ of ad performance. The existing Step 3 review and approval remain unchanged.
910
1082
  evidence and proof plan, not only its hook. Reuse the shared video-angle-bank.v1 from
911
1083
  the brand's video-scripts workspace or this run. Prepare angle-context.json with the
912
1084
  writer's preparation script with `--brief working/script/creative-brief.json` and use
913
- its strict rule check before review. Save the sourced brief in the writer's documented
1085
+ its strict rule check before review. First run the fetched writer's free
1086
+ `python3 <saved-writer-package>/scripts/verify_handoff.py --package-dir <saved-writer-package> --out working/script/writer-handoff-check.json` check against those
1087
+ actual saved prepare/lint scripts. Retain the result and script hashes with the run.
1088
+ A provided writer package with a missing checker, failed check or unsupported flag
1089
+ is incompatible: stop this handoff and refresh the package on the same connection.
1090
+ Never use the provisional agent path after a provided package fails validation.
1091
+ Only an actual `not_found` for an optional writer permits the explicit provisional
1092
+ agent check below; a required writer remains blocked. Never silently remove the brief,
1093
+ strict check or new shape requirement to run an older parser.
1094
+ Save the sourced brief in the writer's documented
914
1095
  shape: exact product/variant, buyer situation, supported mechanism, offer/CTA, constraints,
915
1096
  delivery intent, source references, locked copy, applicable prior decisions and unknowns.
916
1097
  New custom/template shapes set `requires_creative_brief: true`; both writer and critic
@@ -925,16 +1106,20 @@ of ad performance. The existing Step 3 review and approval remain unchanged.
925
1106
  a catalogue card alone cannot establish fit. An impossible essential visual blocks
926
1107
  the proposal until repaired. Do not force a testimonial into every format.
927
1108
  - **Research only what is missing.** Fetching the miner does not spend or rerun research.
928
- Reuse current facts and prior evidence. If paid collection is needed, its permission
1109
+ Reuse current facts and prior evidence. The Brain search's evidence brief (citations, the
1110
+ state of each query and open gaps) is the first source for the brief's source references and
1111
+ prior decisions. If paid collection is needed, its permission
929
1112
  rides in the existing choices round. A new product with no reviews can use verified
930
1113
  facts and a feasible demo; do not require paid research merely to fill a quote quota.
931
1114
  - **Choose eligible concepts only.** Take the strongest supported concept and validated
932
1115
  hook into review, with up to two viable alternatives when the direction is open.
933
1116
  Do not pad three concepts or select the highest-ranked rejected one. If all fail,
934
1117
  repair within the brief and recipe before Step 3.
935
- - **Unavailable writer or research.** Complete an explicit agent check of claim support,
936
- recipe limits, visual feasibility and hook payoff. Record missing provenance and say
937
- in the review when research is provisional. Never report a failed check as a pass.
1118
+ - **Optional writer not found or unavailable research.** Only when the optional writer
1119
+ returns `not_found`, complete an explicit agent check of claim support, recipe limits,
1120
+ visual feasibility and hook payoff. Record missing provenance and say in the review when
1121
+ research is provisional. A provided incompatible writer or another fetch error stops
1122
+ the handoff. Never report a failed check as a pass.
938
1123
  - **The user's exact lines** remain verbatim; use report-only checks and raise material
939
1124
  timing, claim or format conflicts without silently rewriting them.
940
1125
  - **No spoken words.** Still fit the visual promise, reveal, cards and CTA to the silent
@@ -946,9 +1131,14 @@ of ad performance. The existing Step 3 review and approval remain unchanged.
946
1131
 
947
1132
  Fetch `video-production-harness` and read its `references/editorial-review.md`,
948
1133
  `references/specialist-handoff.md` and `references/hook-compatibility.md`, plus the
949
- review/edit/polish/promote/wrap steps when used. Save the fetched version/content hash with
950
- this run's capability records. These supply craft and evidence rules inside the template
951
- flow; this entry's existing review, paid approval, storage and two-repair limit still apply.
1134
+ review/edit/polish/promote/wrap steps when used. Verify every named file is returned as
1135
+ nonempty text before relying on that package. A version/content hash alone cannot establish
1136
+ that the required guides were published. Missing guides block new template creative work
1137
+ before project writes or paid previews; resolve the package on this same connection. Keep
1138
+ an unchanged approved resume on its recorded package and approvals.
1139
+ Save the fetched version/content hash with this run's capability records. These supply
1140
+ craft and evidence rules inside the template flow; this entry's existing review, paid
1141
+ approval, storage and two-repair limit still apply.
952
1142
  Do not turn a template into a custom project or import the custom host's extra gates.
953
1143
 
954
1144
  Before executing a fetched recipe atom, pass the exact brief/script revision, scene/beat IDs,
@@ -1057,8 +1247,8 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
1057
1247
  “Not now” keeps the plan. In a coworker sandbox end the turn after saving the review set;
1058
1248
  the customer's approval arrives as the next message.
1059
1249
  Record the explicit yes with `video_project_upsert { brand_id, project_id, patch: { approve:
1060
- { user_quote: "<their exact words>", total_credits: <the saved total> } } }` before rendering.
1061
- A single project requires recorded approval too; never treat an absent approval as permission.
1250
+ { user_quote: "<their exact words>", total_credits: <the saved total> } } }` before rendering;
1251
+ its reply says what comes next. A single project requires recorded approval too; never treat an absent approval as permission.
1062
1252
  Changes require an updated saved review, clearing prior approval, and approval of the new
1063
1253
  total. One yes authorizes the remaining approved chain. On insufficient_balance start
1064
1254
  nothing; offer a shorter video or top-up. Remove batch concepts with patch.concepts remove:true,
@@ -1068,7 +1258,8 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
1068
1258
 
1069
1259
  1. **Open the render row FIRST** — right after recording the Step 3 approval, before any paid
1070
1260
  generation (if this returns `approval_required`, the approval is missing or was cleared: go
1071
- back to Step 3 and ask in this chat, don't retry):
1261
+ back to Step 3 and ask in this chat, don't retry; if it returns `coworker_makes_it`, the video
1262
+ was handed to the GooseWorks coworker, so don't render it: the coworker is making it):
1072
1263
  `video_render_run { brand_id, project_id, kind: "full" }` (no `dry_run`; returns
1073
1264
  `render_id`) → keep `render_id`, then mark it running:
1074
1265
  `video_render_run { brand_id, project_id, render: { render_id, status: "running",
@@ -1077,8 +1268,25 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
1077
1268
  about start / blocked / complete.
1078
1269
  After EVERY progress callback inspect stop. If true, start no new paid step; record
1079
1270
  status:"stopped" with a plain note and report what is kept and credits used. SPEND_CAP_REACHED
1080
- stops the same way; raising the cap requires patch.approve scope:"raise_cap" and the customer's
1081
- words. Send render.steps with the same neutral names each time and a live count only in the
1271
+ stops the same way. Never raise a video's budget on your own judgment. Raise it only when a paid
1272
+ step was refused with SPEND_CAP_REACHED or the progress card offers "Finish it" or a choice past the budget.
1273
+ Then read the project and say cost.raise_quote in one line: "Finishing needs up to <by_credits>
1274
+ more credits, so your budget goes from <from_credits> to <to_credits>. OK?" Only after the
1275
+ customer's yes to that number: patch.approve { scope:"raise_cap", total_credits: <to_credits>,
1276
+ user_quote: "<their exact words>" }. total_credits is the new budget itself, never credits to
1277
+ add; do not send raise_cap_credits for one video. If they pick a smaller choice past the
1278
+ budget, send that choice's new budget as total_credits (never above to_credits). Sending the same
1279
+ total_credits again changes nothing (already_raised: carry on). An earlier yes, or "I don't care
1280
+ about the cost", is not approval of a new budget. If cost.raise_quote is null because the plan was saved
1281
+ again since its approval (plan_status is not "approved"), show the plan with its total and
1282
+ approve it again; otherwise the approved budget already covers the work: carry on, do not ask.
1283
+ After a raise, open a new render that reuses the saved pieces. A refused raise changes nothing:
1284
+ cap_raise_not_needed means carry on within the budget, or, when it says the plan was saved again,
1285
+ show the plan with its total and approve the plan again; cap_raise_total_required means read the
1286
+ project again and send total_credits equal to cost.raise_quote.to_credits after the customer
1287
+ approves that number; cap_raise_changed or cap_raise_too_large mean read the project again and
1288
+ show the current cost.raise_quote. Custom videos never use raise_cap.
1289
+ Send render.steps with the same neutral names each time and a live count only in the
1082
1290
  current detail; use render.choices when blocked.
1083
1291
  2. Now generate every PAID piece you showed as a prompt in Step 3 — the AI stills/video, lipsync
1084
1292
  clips, voice, music — through the media proxies (below), each from its approved prompt, with