@slatesvideo/shared 0.7.3 → 0.7.4
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/dist/analytics/events.d.ts +155 -0
- package/dist/analytics/events.js +430 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +14 -6
- package/dist/operations/index.js +224 -30
- package/dist/operations/surface.js +1 -0
- package/dist/prompts/agent-doctrine.js +51 -32
- package/dist/prompts/banned-tokens.d.ts +18 -0
- package/dist/prompts/banned-tokens.js +59 -4
- package/dist/prompts/model-capabilities.d.ts +3 -3
- package/dist/prompts/model-capabilities.js +3 -3
- package/dist/prompts/model-facts.d.ts +1 -1
- package/dist/prompts/prompting-tips.js +6 -6
- package/dist/prompts/shot-grammar.d.ts +2 -2
- package/dist/prompts/shot-grammar.js +2 -2
- package/dist/skills/content.js +1 -1
- package/dist/update-check.js +1 -1
- package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +2 -2
- package/package.json +5 -2
- package/skills/slates-vision-feedback-loop.md +117 -117
|
@@ -27,13 +27,18 @@
|
|
|
27
27
|
// 3. PROSE IS EXPLANATION, NOT ENFORCEMENT. The two rules the agent actually
|
|
28
28
|
// breaks — "load the guide" and "quality-check with vision" — are enforced
|
|
29
29
|
// STRUCTURALLY in the op layer (generated banned-token lists inlined into
|
|
30
|
-
// the generate ops' descriptions,
|
|
31
|
-
//
|
|
30
|
+
// the generate ops' descriptions, warnings on the submitted prompt that the
|
|
31
|
+
// desktop loop turns into a refusal before the spend, and a review pointer
|
|
32
|
+
// on every generation result). A rule with no
|
|
32
33
|
// check is a suggestion, and an LLM is the least reliable enforcer you
|
|
33
34
|
// could pick. Do not "fix" a skipped rule by adding a sentence here.
|
|
34
|
-
// 4. NEVER BLOCK. PRODUCT_PHILOSOPHY.md → the Sandbox Doctrine: make
|
|
35
|
-
// visible, never block.
|
|
36
|
-
// and violations are reported back
|
|
35
|
+
// 4. NEVER BLOCK THE USER. PRODUCT_PHILOSOPHY.md → the Sandbox Doctrine: make
|
|
36
|
+
// state visible, never block. In the op layer enforcement means the guidance
|
|
37
|
+
// is already present and violations are reported back. The desktop loop may
|
|
38
|
+
// refuse an AGENT's call that breaks a rule code can check (never-use words
|
|
39
|
+
// before a spend, a project nobody asked for, a model the plan did not
|
|
40
|
+
// approve: slate `studio-agent/guards.ts`, 2026-10-07), and each refusal has
|
|
41
|
+
// a way through for the user: their own words, an approved plan, a resend.
|
|
37
42
|
// 5. CACHE DISCIPLINE. This output is the desktop's cached prompt prefix and
|
|
38
43
|
// its byte-stability IS the cache mechanism (measured 97.4% steady-state
|
|
39
44
|
// cache hit). No timestamps, no balances, no project names, no per-session
|
|
@@ -73,15 +78,15 @@ export function buildSkillIndex() {
|
|
|
73
78
|
// current project — sits here; the sections below expand it for clients that
|
|
74
79
|
// read everything. mcp-instructions-smoke asserts these lines land inside the
|
|
75
80
|
// cut when UPDATE AVAILABLE follows the first doctrine paragraph.
|
|
76
|
-
const PREAMBLE = fork(`You are the Slates Studio Agent — a production assistant living inside Slates, the AI video creation studio. Turn the user's vision into finished work using the optional Slates tools and relevant production craft. Choose the workflow for the brief; start from the user's existing material and bring results into their project or timeline when asked.`, `Turn the user's vision into finished work in Slates. Find craft with slates_get_prompting_guide(query: the brief); reuse current guidance. Tools generate real media and spend credits. Before generation, estimate every step, show the itemized total and wait for approval. Work in the current project. Choose tools to fit the brief.
|
|
77
|
-
|
|
78
|
-
## Essentials (the sections below expand on these)
|
|
79
|
-
|
|
80
|
-
- FINDING TOOLS: every Slates capability is its own slates_* tool. If your client shows tool names only, search your tools for the task (for example "slates generate video") and load that tool before calling it. slates_load_tools searches Slates tools by task and returns exact schemas.
|
|
81
|
-
- SPENDING: before ANY generation, price every step with slates_estimate_generation_cost, show the user the itemized total in ONE message, and wait for their OK. Pass confirm: true only to relay an explicit user OK for that exact spend.
|
|
82
|
-
- REAL NUMBERS ONLY: every cost, balance or count you state is copied from a tool result in this session. Never describe how a generation looks unless you fetched it this session.
|
|
83
|
-
- PROJECT: call slates_get_workspace_state once, work in the user's current project, and never create a project unless asked.
|
|
84
|
-
- CRAFT: discover relevant guides with slates_get_prompting_guide(query: the brief). Reuse current cards and guidance; fetch sections for missing craft. For UI help, use topic "app-manual".
|
|
81
|
+
const PREAMBLE = fork(`You are the Slates Studio Agent — a production assistant living inside Slates, the AI video creation studio. Turn the user's vision into finished work using the optional Slates tools and relevant production craft. Choose the workflow for the brief; start from the user's existing material and bring results into their project or timeline when asked.`, `Turn the user's vision into finished work in Slates. Find craft with slates_get_prompting_guide(query: the brief); reuse current guidance. Tools generate real media and spend credits. Before generation, estimate every step, show the itemized total and wait for approval. Work in the current project. Choose tools to fit the brief.
|
|
82
|
+
|
|
83
|
+
## Essentials (the sections below expand on these)
|
|
84
|
+
|
|
85
|
+
- FINDING TOOLS: every Slates capability is its own slates_* tool. If your client shows tool names only, search your tools for the task (for example "slates generate video") and load that tool before calling it. slates_load_tools searches Slates tools by task and returns exact schemas.
|
|
86
|
+
- SPENDING: before ANY generation, price every step with slates_estimate_generation_cost, show the user the itemized total in ONE message, and wait for their OK. Pass confirm: true only to relay an explicit user OK for that exact spend.
|
|
87
|
+
- REAL NUMBERS ONLY: every cost, balance or count you state is copied from a tool result in this session. Never describe how a generation looks unless you fetched it this session.
|
|
88
|
+
- PROJECT: call slates_get_workspace_state once, work in the user's current project, and never create a project unless asked.
|
|
89
|
+
- CRAFT: discover relevant guides with slates_get_prompting_guide(query: the brief). Reuse current cards and guidance; fetch sections for missing craft. For UI help, use topic "app-manual".
|
|
85
90
|
- Speak in the app's words and name assets by code and label (IMG-A12), never by tool name or UUID.`);
|
|
86
91
|
// ── The working method ─────────────────────────────────────────────
|
|
87
92
|
export const WORKING_METHOD = [
|
|
@@ -100,7 +105,9 @@ export const WORKING_METHOD = [
|
|
|
100
105
|
// client would name a tool that does not exist.
|
|
101
106
|
fork(`4. PLAN + GET APPROVAL: before ANY generation, call present_plan with itemized credit costs (slates_estimate_generation_cost per step). One approval covers the plan's listed steps ONLY. Generation tools are rejected without an approved plan — and any user revision, question, or new instruction after an approval means you MUST re-present the plan BEFORE the next generation call (calling a generation op first just gets BLOCKED and wastes a turn).`, `4. PLAN + GET APPROVAL: before ANY generation, price every step with slates_estimate_generation_cost and put the itemized total in front of the user in ONE message, then wait for their answer. There is no present_plan tool on this surface — consent is per call: a generation over the confirm threshold returns requires_confirm, and confirm: true is only ever a relay of an explicit user OK for that exact spend. Never pass confirm: true to clear a gate the user has not seen.`),
|
|
102
107
|
fork(`5. EXECUTE: after approval, pass confirm: true (the approval IS the consent — never re-ask per step). Use background: true + status polling for video.`, `5. EXECUTE: run the approved steps, passing confirm: true only for the spend the user actually OK'd. Use background: true + status polling for video.`),
|
|
103
|
-
|
|
108
|
+
// Desktop adds the frame-edge check (2026-10-08: Haiku looked at a lighthouse with its top cropped
|
|
109
|
+
// off and kept it, agent-eval round 6); the MCP copy is unchanged, its instructions sit at the ceiling.
|
|
110
|
+
fork(`6. QUALITY-CHECK: you have vision. Inspect images or sampled video frames against the brief (slates-vision-feedback-loop), starting at the frame edges: is the whole subject in frame, and is anything the brief named cut off? Frames establish visible appearance, not continuous motion, lip sync or sound: review those through actual playback or an audio-capable host when available; otherwise state they remain unreviewed. Fix real problems and change ONE variable per regeneration.`, `6. QUALITY-CHECK: you have vision. Inspect images or sampled video frames against the brief (slates-vision-feedback-loop). Frames establish visible appearance, not continuous motion, lip sync or sound: review those through actual playback or an audio-capable host when available; otherwise state they remain unreviewed. Fix real problems and change ONE variable per regeneration.`),
|
|
104
111
|
both(`7. REPORT: when done, summarize what was made and where it landed. Concise and concrete.`),
|
|
105
112
|
];
|
|
106
113
|
// ── Hard rules ─────────────────────────────────────────────────────
|
|
@@ -109,7 +116,7 @@ export const WORKING_METHOD = [
|
|
|
109
116
|
// the exception: it is multi-line and generated, and supplies its own bullet.
|
|
110
117
|
export const HARD_RULES = [
|
|
111
118
|
// FORKED: "outside an approved plan" names the desktop's code-level gate.
|
|
112
|
-
fork(`- COST DISCIPLINE (slates-cost-discipline): never fire a billable generation outside an approved plan. Estimate before you promise. Batch related generations into one plan.`, `- COST DISCIPLINE (slates-cost-discipline): never fire a billable generation the user has not agreed to. Estimate before you promise. Batch related generations into one quote so the user approves a total, not a drip.`),
|
|
119
|
+
fork(`- COST DISCIPLINE (slates-cost-discipline): never fire a billable generation outside an approved plan. Estimate before you promise. Batch related generations into one plan. When the user says cheap or cheapest, price decides: plan the lowest-priced setting the estimates show (at a tie, the better quality at that price); "best" then means the best picture at that price, never a dearer tier. A dearer tier is named in words, never generated unless the user asks for it.`, `- COST DISCIPLINE (slates-cost-discipline): never fire a billable generation the user has not agreed to. Estimate before you promise. Batch related generations into one quote so the user approves a total, not a drip.`),
|
|
113
120
|
both(`- CONTENT POLICY: before writing prompts involving real people/celebrities, minors, brands/logos, weapons, or gore, load slates-content-policy and build the scene safe from the first word. If a provider rejects (e.g. real-face detection), explain in plain language — refunds for provider rejections are automatic.`),
|
|
114
121
|
both(`- PROMPT IS LAW (reference doctrine): references are cited inline by name and image number ("Marcus (images 1 and 2)"); the prompt text leads. Never write role-essays about what each reference is "for".`),
|
|
115
122
|
both(`- NAMES AND DESCRIPTIONS ARE THE USER'S UI, NOT YOUR NOTEPAD. A project, board or shot name is rendered at the top of the user's screen at all times. Name it after the piece ("Kaiju selfie"), never after your process, and NEVER append your own status or housekeeping — no "shot list", no "v2", no "Written from IMG-A172 and IMG-A182", no "Delete freely", no "scratch". Leave the description empty unless the user gave you one worth keeping: a note-to-self at the top of the screen reads as part of the product, and the user has to look at it every day. Say that kind of thing in your reply to them instead.`),
|
|
@@ -134,6 +141,13 @@ export const HARD_RULES = [
|
|
|
134
141
|
both(`- ASSET CODES + STALENESS: every asset carries a badge code (IMG-A12 / VID-V3 / AUD-S1, top-left of its gallery card); speak about assets by code + label. When the user says "these" or "this one", call slates_get_selection rather than asking which. Asset lists go STALE — the user creates assets in the Slates UI mid-conversation. When the user names a code you have NOT seen in a tool result this session, resolve it with slates_list_assets (use the search filter) BEFORE using it. NEVER guess an asset id or reuse a nearby UUID — pass the exact id a tool returned for that exact code. A wrong start frame burns real credits.`),
|
|
135
142
|
both(`- CREDITS ONLY: every generation you drive bills Slates credits (your tool calls enforce this), except ChatGPT images, which use the person's ChatGPT account. Never suggest BYOK keys for agent work.`),
|
|
136
143
|
both(`- Do not invent tools, asset ids, or credit prices. If a tool errors, read the error and fix that exact issue; don't repeat the same call unchanged and never switch models to route around a parameter mistake.`),
|
|
144
|
+
// 2026-10-08, measured: Haiku 5.5 called slates_list_assets in the SAME turn as
|
|
145
|
+
// slates_get_workspace_state, with a project id it made up, read the empty
|
|
146
|
+
// answer as "IMG-A8 does not exist" and stopped (slate scripts/agent-eval
|
|
147
|
+
// README, round 5). Dependent calls wait; independent ones may still run together.
|
|
148
|
+
// Desktop loop only: the invented id came from the desktop brain, and the MCP
|
|
149
|
+
// instructions sit at their 14,000-character ceiling (agent-surface check).
|
|
150
|
+
fork(`- IDS COME FROM RESULTS: pass only a project, asset, shot, folder or board id you read in a tool result in this conversation. When a call needs another call's answer (the open project's id from slates_get_workspace_state, an asset's id from slates_list_assets), make the first call, read its result, then make the second; never fill the id in ahead of the answer. Calls that do not depend on each other may run together. "No project …" or "No asset …" means the id was wrong, not that the thing is missing: get the real id and try again.`, ``),
|
|
137
151
|
// FORKED: only the desktop loop auto-polls generation status
|
|
138
152
|
// (loop.ts → autoPollUntilTerminal). Telling an MCP client "the app keeps
|
|
139
153
|
// polling for you" would strand a job nobody is watching.
|
|
@@ -149,6 +163,11 @@ export const HARD_RULES = [
|
|
|
149
163
|
// compliance 0/8 → 30/32, while the same guidance behind a guide fetch sat at
|
|
150
164
|
// 13% before and after. This sentence exists only to say the numbers are
|
|
151
165
|
// there and must be looked at; the craft is the skill.
|
|
166
|
+
// 2026-10-07, measured: asked for "just the shot list for now", GLM-5.3-Flash
|
|
167
|
+
// AND Opus 5.5 both wrote a good list into the chat, 0/8 each, and never
|
|
168
|
+
// created a Shot. Neither knew that in Slates a shot list IS Shots — and on
|
|
169
|
+
// the desktop slates_create_shot is not core, so nothing on screen said so.
|
|
170
|
+
fork(`- A SHOT LIST IS SHOTS: asked for a shot list, storyboard or breakdown, write each beat as a Shot with slates_create_shot (load it by name first): Shots land on the board and can be priced and fired later; a chat list cannot. Read the set back with slates_list_shots. Writing Shots is free, even under "don't generate yet". Firing Shots is slates_generate_from_shots, so each take lands on its Shot; to fire them at other settings, change each Shot first with slates_update_shot and say so in the plan. A loose slates_generate_video leaves the board without its takes.`, `- A SHOT LIST IS SHOTS: asked for a shot list, storyboard or breakdown, write each beat as a Shot with slates_create_shot: Shots land on the board and can be priced and fired later; a chat list cannot. Read the set back with slates_list_shots. Writing Shots is free, even under "don't generate yet".`),
|
|
152
171
|
both(`- READ THE VARIETY COUNTS BEFORE FIRING A SET: slates_list_shots and slates_get_storyboard_with_frames return authored framing and movement distributions. Review unintended sameness while preserving deliberate repetition and the user's format; counts do not require a rewrite. slates-shot-variety is the craft.`),
|
|
153
172
|
both(`- AUDIO LENGTH IS PROMPT-DRIVEN ON SEED AUDIO: it has no duration parameter, so the durationSeconds you pass is written into the prompt AND is what the user is charged, whatever comes back. Choose it deliberately and load slates-prompting-seed-audio before the first call.`),
|
|
154
173
|
];
|
|
@@ -158,9 +177,9 @@ export const HARD_RULES = [
|
|
|
158
177
|
// (`slates install-skills` covers Claude Code and Codex; other hosts may
|
|
159
178
|
// use different native skill locations). The desktop always has the embedded
|
|
160
179
|
// record, so this paragraph would be dead weight in its cached prefix.
|
|
161
|
-
const MCP_FOOTER = `## Working without skill files
|
|
162
|
-
|
|
163
|
-
If slates-* skill files are not installed in this client, every one of them is still reachable as data: call slates_get_prompting_guide with the skill name (or a model id — it resolves aliases). Query the brief or browse topic "catalog" for generated discovery and entitled member playbooks. "No skill installed" is never a reason to prompt a model blind.
|
|
180
|
+
const MCP_FOOTER = `## Working without skill files
|
|
181
|
+
|
|
182
|
+
If slates-* skill files are not installed in this client, every one of them is still reachable as data: call slates_get_prompting_guide with the skill name (or a model id — it resolves aliases). Query the brief or browse topic "catalog" for generated discovery and entitled member playbooks. "No skill installed" is never a reason to prompt a model blind.
|
|
164
183
|
`;
|
|
165
184
|
/**
|
|
166
185
|
* THE doctrine string for a surface. The desktop's whole system prompt and the
|
|
@@ -195,19 +214,19 @@ export function buildAgentDoctrine({ surface }) {
|
|
|
195
214
|
const skillIndex = rest.map((s) => `- ${s.name}: ${firstSentence(s.description)}`).join('\n') +
|
|
196
215
|
`\n- PER-MODEL PROMPTING GUIDES — pass the model id, or the name: ` +
|
|
197
216
|
perModel.map((s) => s.name).join(', ');
|
|
198
|
-
return `${PREAMBLE[surface]}
|
|
199
|
-
|
|
200
|
-
## How you work
|
|
201
|
-
|
|
202
|
-
${WORKING_METHOD.map((s) => s[surface]).join('\n')}
|
|
203
|
-
|
|
204
|
-
## Hard rules
|
|
205
|
-
|
|
206
|
-
${HARD_RULES.map((r) => r[surface]).join('\n')}
|
|
207
|
-
|
|
208
|
-
## Guide index (load via slates_get_prompting_guide)
|
|
209
|
-
|
|
210
|
-
${skillIndex}
|
|
217
|
+
return `${PREAMBLE[surface]}
|
|
218
|
+
|
|
219
|
+
## How you work
|
|
220
|
+
|
|
221
|
+
${WORKING_METHOD.map((s) => s[surface]).join('\n')}
|
|
222
|
+
|
|
223
|
+
## Hard rules
|
|
224
|
+
|
|
225
|
+
${HARD_RULES.map((r) => r[surface]).join('\n')}
|
|
226
|
+
|
|
227
|
+
## Guide index (load via slates_get_prompting_guide)
|
|
228
|
+
|
|
229
|
+
${skillIndex}
|
|
211
230
|
${surface === 'mcp' ? `\n${MCP_FOOTER}` : ''}`;
|
|
212
231
|
}
|
|
213
232
|
//# sourceMappingURL=agent-doctrine.js.map
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export type BannedTokenScope = 'image' | 'video';
|
|
2
|
+
/** The call shape a block's heading limits its tokens to. */
|
|
3
|
+
export type BannedTokenCondition = 'reference-video' | 'edit';
|
|
2
4
|
export interface BannedToken {
|
|
3
5
|
token: string;
|
|
4
6
|
skill: string;
|
|
5
7
|
scope: BannedTokenScope;
|
|
8
|
+
/** The never-use line the token came from, as the skill words it. */
|
|
9
|
+
note: string;
|
|
10
|
+
/** False when the rule needs context the call cannot show; such a token only warns. */
|
|
11
|
+
checkable: boolean;
|
|
12
|
+
/** Set when the block's heading limits it to a call shape. */
|
|
13
|
+
when?: BannedTokenCondition;
|
|
6
14
|
}
|
|
7
15
|
/** Compatibility exports: there is no cross-model blacklist. */
|
|
8
16
|
export declare const BANNED_PROMPT_TOKENS: readonly BannedToken[];
|
|
@@ -10,6 +18,16 @@ export declare function bannedTokensFor(_scope: BannedTokenScope): readonly Bann
|
|
|
10
18
|
export declare function describeBannedTokens(_scope: BannedTokenScope): string;
|
|
11
19
|
export declare function bannedTokensForSkill(skill: string): readonly BannedToken[];
|
|
12
20
|
export declare function findBannedTokens(prompt: string, _scope: BannedTokenScope, skill?: string): BannedToken[];
|
|
21
|
+
/**
|
|
22
|
+
* The never-use words this CALL breaks, as far as the call can show: checkable
|
|
23
|
+
* tokens, and a heading-limited token only when the call has that shape (a
|
|
24
|
+
* Seedance 2.5 "edit" reclassifies a fresh generation only with a reference
|
|
25
|
+
* video attached). The desktop loop refuses these before the spend.
|
|
26
|
+
*/
|
|
27
|
+
export declare function refusableBannedTokens(prompt: string, scope: BannedTokenScope, skill: string | undefined, call?: {
|
|
28
|
+
referenceVideo?: boolean;
|
|
29
|
+
edit?: boolean;
|
|
30
|
+
}): BannedToken[];
|
|
13
31
|
export declare function describeBannedTokensForSkill(skill: string): string;
|
|
14
32
|
export declare function bannedTokenWarning(prompt: string, scope: BannedTokenScope, skill?: string): string;
|
|
15
33
|
//# sourceMappingURL=banned-tokens.d.ts.map
|
|
@@ -1,17 +1,63 @@
|
|
|
1
1
|
/** Model-specific prompt advice, extracted from each skill's @banned blocks.
|
|
2
|
-
*
|
|
2
|
+
* The op layer only warns: it never rewrites or blocks a prompt, on any surface.
|
|
3
|
+
* The desktop Studio Agent's loop refuses an agent-written generation prompt
|
|
4
|
+
* BEFORE the spend when it carries a word code can check from the call alone
|
|
5
|
+
* (`refusableBannedTokens`; slate `src/main/studio-agent/guards.ts`,
|
|
6
|
+
* 2026-10-07): a word the user typed passes, and the identical call sent again
|
|
7
|
+
* after the refusal runs. No model's list is universal.
|
|
8
|
+
*
|
|
9
|
+
* WHAT A BLOCK MAY CONTAIN. Every `backticked` string is a never-use token,
|
|
10
|
+
* except the right way written beside it, which is never a token: `(say \`x\`)`,
|
|
11
|
+
* `than \`x\``, `as in: \`x\`` and `(\`x\`) passed`. A heading that limits the
|
|
12
|
+
* block to a call shape ("with a reference video", "in an EDIT prompt") limits
|
|
13
|
+
* the refusal to calls of that shape. A line whose rule depends on context the
|
|
14
|
+
* call cannot show ("after the first introduction") stays a warning only.
|
|
3
15
|
*/
|
|
4
16
|
import { SKILLS } from '../skills/content.js';
|
|
17
|
+
/** The right way, written next to the wrong one: never a token. */
|
|
18
|
+
const POSITIVE_BEFORE = [/\(\s*say\s*$/i, /\bthan\s*$/i, /\bas in:?\s*$/i];
|
|
19
|
+
const POSITIVE_AFTER = /^\)\s*passed\b/i;
|
|
20
|
+
/** A rule the call alone cannot settle. */
|
|
21
|
+
const CONTEXTUAL = /after the first introduction/i;
|
|
22
|
+
function conditionOf(heading) {
|
|
23
|
+
if (/with a reference video/i.test(heading))
|
|
24
|
+
return 'reference-video';
|
|
25
|
+
if (/in an EDIT prompt/i.test(heading))
|
|
26
|
+
return 'edit';
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
/** One fence → its tokens, positives dropped, each with its line and its limits. */
|
|
30
|
+
function parseBannedBlock(body, skill, scope) {
|
|
31
|
+
const lines = body.replace(/<!--[\s\S]*?-->/g, '').split('\n').map((l) => l.trim()).filter(Boolean);
|
|
32
|
+
const heading = lines.find((l) => /never use|avoid/i.test(l)) ?? '';
|
|
33
|
+
const when = conditionOf(heading.replace(/`[^`\n]*`/g, ''));
|
|
34
|
+
const out = [];
|
|
35
|
+
for (const line of lines) {
|
|
36
|
+
const note = line.replace(/^-\s*/, '').replace(/`([^`\n]+)`/g, '"$1"');
|
|
37
|
+
for (const m of line.matchAll(/`([^`\n]+)`/g)) {
|
|
38
|
+
const before = line.slice(0, m.index);
|
|
39
|
+
const after = line.slice((m.index ?? 0) + m[0].length);
|
|
40
|
+
if (POSITIVE_BEFORE.some((re) => re.test(before)) || POSITIVE_AFTER.test(after))
|
|
41
|
+
continue;
|
|
42
|
+
const token = m[1].trim();
|
|
43
|
+
if (out.some((t) => t.token === token))
|
|
44
|
+
continue;
|
|
45
|
+
out.push({ token, skill, scope, note, checkable: !CONTEXTUAL.test(line), ...(when ? { when } : {}) });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
5
50
|
const bySkill = new Map();
|
|
6
51
|
for (const [skill, content] of Object.entries(SKILLS)) {
|
|
7
52
|
const fences = [...content.matchAll(/<!--\s*@banned:start\s*-->([\s\S]*?)<!--\s*@banned:end\s*-->/g)];
|
|
8
53
|
if (!fences.length)
|
|
9
54
|
continue;
|
|
10
|
-
const
|
|
55
|
+
const scope = /nano-banana|gpt-image|flux|seedream/.test(skill) ? 'image' : 'video';
|
|
56
|
+
const tokens = fences.flatMap((f) => parseBannedBlock(f[1], skill, scope))
|
|
57
|
+
.filter((t, i, all) => all.findIndex((o) => o.token === t.token) === i);
|
|
11
58
|
if (!tokens.length)
|
|
12
59
|
throw new Error(`${skill}: @banned block contains no tokens`);
|
|
13
|
-
|
|
14
|
-
bySkill.set(skill, tokens.map((token) => ({ token, skill, scope })));
|
|
60
|
+
bySkill.set(skill, tokens);
|
|
15
61
|
}
|
|
16
62
|
/** Compatibility exports: there is no cross-model blacklist. */
|
|
17
63
|
export const BANNED_PROMPT_TOKENS = Object.freeze([]);
|
|
@@ -31,6 +77,15 @@ function matcherFor(token) {
|
|
|
31
77
|
export function findBannedTokens(prompt, _scope, skill) {
|
|
32
78
|
return skill ? bannedTokensForSkill(skill).filter((b) => matcherFor(b.token).test(prompt)) : [];
|
|
33
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* The never-use words this CALL breaks, as far as the call can show: checkable
|
|
82
|
+
* tokens, and a heading-limited token only when the call has that shape (a
|
|
83
|
+
* Seedance 2.5 "edit" reclassifies a fresh generation only with a reference
|
|
84
|
+
* video attached). The desktop loop refuses these before the spend.
|
|
85
|
+
*/
|
|
86
|
+
export function refusableBannedTokens(prompt, scope, skill, call = {}) {
|
|
87
|
+
return findBannedTokens(prompt, scope, skill).filter((b) => b.checkable && (b.when === undefined || (b.when === 'reference-video' ? !!call.referenceVideo : !!call.edit)));
|
|
88
|
+
}
|
|
34
89
|
export function describeBannedTokensForSkill(skill) {
|
|
35
90
|
const list = bannedTokensForSkill(skill);
|
|
36
91
|
return list.length ? `Avoid these phrases for ${skill}: ${list.map((b) => `"${b.token}"`).join(', ')}. Describe the intended result specifically.` : '';
|
|
@@ -35,9 +35,9 @@ export interface DurationCapability {
|
|
|
35
35
|
mode: 'continuous' | 'discrete';
|
|
36
36
|
/** For discrete mode: the exact allowed durations. */
|
|
37
37
|
values?: number[];
|
|
38
|
-
/** Resolution-dependent narrowing
|
|
38
|
+
/** Resolution-dependent narrowing: a resolution that allows fewer durations (LTX sets this). */
|
|
39
39
|
resolutionOverrides?: Record<string, Pick<DurationCapability, 'min' | 'max' | 'mode' | 'values'>>;
|
|
40
|
-
/** Prompt-mode narrowing
|
|
40
|
+
/** Prompt-mode narrowing: a mode, such as reference-to-video, that allows fewer durations. No row sets one today. */
|
|
41
41
|
modeOverrides?: Record<string, Pick<DurationCapability, 'min' | 'max' | 'mode' | 'values'>>;
|
|
42
42
|
}
|
|
43
43
|
/** Video resolution constraints. */
|
|
@@ -195,7 +195,7 @@ export interface ModelCapability {
|
|
|
195
195
|
* credits route carries Kling on fal: `slate/src/main/agent/routes.ts`
|
|
196
196
|
* never sends `klingProvider`, so `handlers/video.ts` defaults it to `'fal'`.
|
|
197
197
|
* So an agent gets Kling's THREE fal ratios, not the eight it takes on its
|
|
198
|
-
* direct API
|
|
198
|
+
* direct API. Validating
|
|
199
199
|
* against the direct sets would accept a ratio fal rejects, which is the exact
|
|
200
200
|
* failure this module exists to delete.
|
|
201
201
|
*/
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
// enums plus English prose, with no link of any kind back to the registry. It
|
|
14
14
|
// had drifted on every axis: an aspect-ratio enum offering `9:21` (a value that
|
|
15
15
|
// exists in NO model, invented here), "Kling/Seedance support all" when Seedance
|
|
16
|
-
// takes 6 of 11 and Kling-on-fal takes 3, "
|
|
17
|
-
//
|
|
16
|
+
// takes 6 of 11 and Kling-on-fal takes 3, "locks to 16:9" for a model that took
|
|
17
|
+
// two on fal, "Kling: 5-15" against a registry minimum of 3, and a
|
|
18
18
|
// `videoResolution` description that never mentioned Kling at all. A customer
|
|
19
19
|
// burned a round trip on 2026-08-16 passing `4:5` to Seedance: the op accepted
|
|
20
20
|
// it, the job queued, credits reserved, and the provider rejected it
|
|
@@ -206,7 +206,7 @@ export function falImageSize(model, aspectRatio, resolution) {
|
|
|
206
206
|
* credits route carries Kling on fal: `slate/src/main/agent/routes.ts`
|
|
207
207
|
* never sends `klingProvider`, so `handlers/video.ts` defaults it to `'fal'`.
|
|
208
208
|
* So an agent gets Kling's THREE fal ratios, not the eight it takes on its
|
|
209
|
-
* direct API
|
|
209
|
+
* direct API. Validating
|
|
210
210
|
* against the direct sets would accept a ratio fal rejects, which is the exact
|
|
211
211
|
* failure this module exists to delete.
|
|
212
212
|
*/
|
|
@@ -34,7 +34,7 @@ export interface ModelFact {
|
|
|
34
34
|
* meaning the default SEEDANCE seat (a bare "seedance" resolves to 2.0), and for
|
|
35
35
|
* a month two rows read as the default while the routing doctrine then in force
|
|
36
36
|
* (Eric, 2026-07-03: Kling 3.0 the general-purpose default, Seedance the premium
|
|
37
|
-
* escalation) never changed. The marketing site meanwhile headlined
|
|
37
|
+
* escalation) never changed. The marketing site meanwhile headlined a
|
|
38
38
|
* `niche` row, because no check could read a tier out of prose. The tier is
|
|
39
39
|
* DATA now; the notes describe, they do not rank.
|
|
40
40
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Per-model PROMPTING TIPS — the short, curated, FREE prompting guidance.
|
|
2
2
|
// SINGLE SOURCE OF TRUTH: this file. Nothing downstream authors tips copy (no
|
|
3
|
-
// hand-written tips JSX or prose anywhere — that's how the Omni Flash
|
|
4
|
-
//
|
|
3
|
+
// hand-written tips JSX or prose anywhere — that's how the Omni Flash modal shipped
|
|
4
|
+
// showing another model's tips under a Kling title).
|
|
5
5
|
//
|
|
6
6
|
// WHERE IT RENDERS (changed 2026-08-10): exactly one place, the generated page
|
|
7
7
|
// https://slates.video/docs/prompting, emitted by slates-web
|
|
@@ -137,21 +137,21 @@ const SEEDANCE_25 = {
|
|
|
137
137
|
[
|
|
138
138
|
{
|
|
139
139
|
heading: '720p is not the cheap one here',
|
|
140
|
-
example: '30s \u00b7 720p \u00b7 Face
|
|
140
|
+
example: '30s \u00b7 720p \u00b7 Seedance 2.5 Face = 489 credits\n15s \u00b7 1080p \u00b7 Seedance 2.0 Face = 411 credits',
|
|
141
141
|
note: 'Length is what moves the price, and 2.5 doubles the length ceiling — so a 30-second 720p clip can cost more than a 15-second 1080p one, against a 1,000-credit starting balance. Explore at short LENGTH rather than low resolution: cut the seconds to 4-8 while you are finding the shot, and stay at the resolution you actually want. A 480p pass does not de-risk a 720p render — generation is stochastic, so the 720p run is a different take, not the same shot rendered better. The Generate button always shows the exact number first.',
|
|
142
142
|
critical: true,
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
heading: 'Audio-only references',
|
|
146
146
|
example: 'Reference the timbre in audio 1 to generate...',
|
|
147
|
-
note: '2.5 accepts an audio reference on its own — a voice line, a music bed, a room tone — with no image or video alongside it. 2.0 could not. Audio references never cost extra on any Seedance
|
|
147
|
+
note: '2.5 accepts an audio reference on its own — a voice line, a music bed, a room tone — with no image or video alongside it. 2.0 could not. Audio references never cost extra on any Seedance row.',
|
|
148
148
|
},
|
|
149
149
|
...SEEDANCE.columns[1],
|
|
150
150
|
],
|
|
151
151
|
],
|
|
152
152
|
footer: [
|
|
153
153
|
'30 image references is a budget, not a target — 2-4 strong references still beat both extremes, one per role. ByteDance\'s own ceilings for 2.5: 1-8 subjects bound by image reference stay stable (9-12 works but needs re-rolls), 1-5 subjects bound by video or audio reference, and 5-10 seconds is the sweet spot for a reference clip. Unlike 2.0, a multi-view turnaround sheet can be a single subject reference here — past 5 subjects, go back to one view per image. The larger budget is for long multi-shot takes and for video plus audio references alongside images.',
|
|
154
|
-
'A reference VIDEO bills input seconds PLUS output seconds, and 2.5 accepts references up to 30s combined — so a 20-second reference driving a 20-second output bills 40 seconds. On
|
|
154
|
+
'A reference VIDEO bills input seconds PLUS output seconds, and 2.5 accepts references up to 30s combined — so a 20-second reference driving a 20-second output bills 40 seconds. On a Face row the reference counts as at least as long as the output: a 5-second reference on a 20-second output bills 40 seconds, not 25. The Generate button shows the total.',
|
|
155
155
|
...(SEEDANCE.footer ?? []).slice(0, 2),
|
|
156
156
|
'Frames and reference images stay mutually exclusive, and on a first/last-frame generation Seedance 2.5 chooses the aspect ratio itself — the ratio control shows "Adaptive" because the start frame decides the shape.',
|
|
157
157
|
],
|
|
@@ -179,7 +179,7 @@ const SEEDANCE_25_EDIT = {
|
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
heading: 'Turn Face on when a face is visible',
|
|
182
|
-
note: '
|
|
182
|
+
note: 'Without Face, a character face in the clip is refused outright — this is not a price optimisation, it is whether the job runs at all. Editing has no consented real-person option; real-person footage the Face row rejects has to go to Kling O3 Edit.',
|
|
183
183
|
critical: true,
|
|
184
184
|
},
|
|
185
185
|
{
|
|
@@ -87,7 +87,7 @@ export interface SpeechRate {
|
|
|
87
87
|
*/
|
|
88
88
|
export declare const SPEECH_RATE_QUERY: string;
|
|
89
89
|
/** When the numbers below were last derived from the query above. */
|
|
90
|
-
export declare const SPEECH_RATE_MEASURED_ON = "2026-
|
|
90
|
+
export declare const SPEECH_RATE_MEASURED_ON = "2026-10-17";
|
|
91
91
|
/**
|
|
92
92
|
* 🔑 THE REGISTER SPLIT IS REAL AND MEASURED, which is why there is no single
|
|
93
93
|
* number. the performed, genre-acted reads run a median of 133 wpm;
|
|
@@ -119,7 +119,7 @@ export declare const SPEECH_RATE: {
|
|
|
119
119
|
*/
|
|
120
120
|
readonly ceiling: {
|
|
121
121
|
readonly wpm: 283;
|
|
122
|
-
readonly n:
|
|
122
|
+
readonly n: 70;
|
|
123
123
|
readonly segment: "max over every marked row";
|
|
124
124
|
};
|
|
125
125
|
};
|
|
@@ -124,7 +124,7 @@ SELECT id, speech_rate, duration_seconds, transcript
|
|
|
124
124
|
-- statistic: median per register; ceiling = max over every marked row
|
|
125
125
|
`.trim();
|
|
126
126
|
/** When the numbers below were last derived from the query above. */
|
|
127
|
-
export const SPEECH_RATE_MEASURED_ON = '2026-
|
|
127
|
+
export const SPEECH_RATE_MEASURED_ON = '2026-10-17';
|
|
128
128
|
/**
|
|
129
129
|
* 🔑 THE REGISTER SPLIT IS REAL AND MEASURED, which is why there is no single
|
|
130
130
|
* number. the performed, genre-acted reads run a median of 133 wpm;
|
|
@@ -142,7 +142,7 @@ export const SPEECH_RATE = {
|
|
|
142
142
|
* 250, not p90: those are rates real ads actually hit, and flagging an
|
|
143
143
|
* achievable read is exactly how a check gets ignored.
|
|
144
144
|
*/
|
|
145
|
-
ceiling: { wpm: 283, n:
|
|
145
|
+
ceiling: { wpm: 283, n: 70, segment: 'max over every marked row' },
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
148
148
|
* The default register, and there is deliberately no picker for it.
|
package/dist/skills/content.js
CHANGED
|
@@ -36,6 +36,6 @@ export const SKILLS = {
|
|
|
36
36
|
"slates-storyboard-from-script": "---\nname: slates-storyboard-from-script\ndescription: \"Save a supplied script or treatment as an editable Slates document and bind production passages to shots. Use when preparing a storyboard while preserving the words, structure and requested scope.\"\n---\n\n# Script into editable production\n\nRead the existing document and its revision before writing. Preserve supplied words, speaker context, headings, non-spoken direction and any explicit shot list. A heading formats a document; creating a production scene is a separate choice. Paragraph count does not determine shot count.\n\n## Save the words once\n\nUse `slates_get_script_document` and `slates_update_script_document` for ordered, revision-checked text and structure edits. Scene strings own spoken words. Paragraph blocks hold offsets and marks; headings/directions own only their non-spoken text. Do not keep an independently editable master body beside the document.\n\nCreate a board or scene only when needed for the requested destination. Use the current project unless the user asks for another. Writing a script needs no image, character record or generation.\n\n## Bind production where wanted\n\nSelect an intended production passage and use the script-to-shot operation. It can make, attach, extend, split or merge according to the existing bindings. Read back the resulting shots and ranges. A silent shot is equally valid and needs no fabricated dialogue.\n\nA new document-created recipe is script-driven: its prompt compiles from the active passage. Text with no speaker and no delivery goes to the model as written (most script text is action); a speaker, VO included, or a delivery note makes it quoted speech. Keep action, delivery, framing and references in their own controls. Do not write the dialogue a second time in a custom prompt. When the creator explicitly chooses a custom prompt, preserve its bytes and review alignment after script changes.\n\nShots file through the existing filing service. Pass the scene or frame destination when known and use the returned shot codes. Keep recurring identities in existing Library references; a working speaker name does not require a placeholder character.\n\n## Review without imposing a format\n\nRead composed requests, actual reference roles and the current quote. Explain only consequential decisions not already visible in the document or shot. Variety counts are suggestions: intentional repeated frames, continuing sentences and recurring cast may be exactly right. `slates-script-craft` covers passages and versions; `slates-shot-variety` covers deliberate visual rhythm.\n\nIf generation is requested, follow `slates-cost-discipline` for the exact set. On an uncertain timeout inspect existing generation IDs before retrying. Preserve takes and inspect the landed results. Named cuts keep independent edits separate; writing alone does not require a cut, export or paid call.\n\n<!-- @inject:decision-log -->\nRecord production choices in the editable shot fields. Explain only consequential judgments the user did not specify and no field already records: for example, why a particular light or performance register supports the brief. Do not repeat the shot list in prose or turn this explanation into an approval gate. Follow the separate generation authorization policy before spending.\n<!-- @end:decision-log -->\n",
|
|
37
37
|
"slates-style-prompting": "---\nname: slates-style-prompting\ndescription: \"Translate a visual-style brief into model-specific image or video direction and maintain the look across shots. Covers photoreal, anime, painterly and 3D styles, references and optional start-frame control.\"\n---\n\n# Per-style prompting (photoreal · anime · painterly · 3d-render)\n\nThe style library (`slates_create_style` / the app's style ids) defines what each style IS. This guide is how to PROMPT each style per model. Derived from `research/style-prompting-research.md` (second-brain) — claims marked *(hypothesis)* are untested; don't present them to users as fact.\n\n## The four ground rules (all styles)\n\n1. **Assign references where they contribute.** Describe the scene with inline bindings, such as \"the woman from image 1, lit and graded like image 2.\" Preserve an existing scene reference when its look should stay. A look-only reference may need light and exposure described for the new scene; prose and references can work together.\n2. **Use each model’s language, without imposing a fixed prompt template:**\n - **Nano Banana 2** — narrative prose; the style is the opening framing of the sentence (\"A hand-drawn 2D anime cel illustration of…\"), never a comma tag.\n - **Seedance 2.0** — the 8-part formula reserves \"visual style\" (slot 6) and \"image quality\" (slot 7). One clause each. Don't scatter style words through the action text.\n - **Kling V3** — prose scene direction; style rides the lighting/style tail of Scene → Subject → Action → Camera → Lighting/Style. Tag soup underperforms badly.\n3. **Keep the intended look consistent across shots.** Reuse relevant references and stable descriptions, adapting the wording to each scene.\n4. **A styled start frame is one video control.** Generate it with the image seat suited to the brief, then describe the motion. Preserve its look unless the user wants the light or grade to change.\n\nNever stack style buzzwords (\"ARRI ALEXA, 35mm, film grain, depth-of-field mastery…\"). One or two register tokens maximum — piles of specs dull the image.\n\n## Photoreal\n\n- **NB2:** never the literal word \"photorealistic\". Describe *a real photograph*: natural skin texture and imperfection, motivated lighting, one lens/film register (\"shot on a 50mm, soft window light\"). Photographic composition terms: wide-angle / macro / low-angle.\n- **Seedance:** put \"sharp focus, natural color, high detail\" in the image-quality slot and always include a lighting clause. Keep motion slow and coherent — fast/burst action is the #1 quality killer and reads most fake in photoreal.\n- **Kling:** the photoreal-PEOPLE lane — convincing acting, dialogue, lip-sync. It breaks on close-up hands, fine fluids, and crowds beyond ~5 faces: route those beats to Seedance or reframe.\n- **Faces on Seedance:** photoreal humans trigger the face-tier routing (AI face vs consented real face — see slates-prompting-seedance §Faces). Set the face flags honestly; never skip them to save credits.\n\n## Anime\n\n- **NB2:** open with the medium — \"A hand-drawn 2D anime cel illustration of…\" — then normal narrative Subject/Setting/Action. Clean line art, flat-shaded color, expressive eyes. NB2 has no negative prompt: phrase exclusions positively (\"flat cel shading with uniform focus\", not \"no depth of field\").\n- **Seedance:** visual-style slot = \"2D anime style, clean line art, flat cel shading\". The slow/coherent-motion preference still applies — burst sakuga actions are the same instability trap as in photoreal.\n- **Kling:** weakest anime lane (its strength is live-action-like acting); expect style drift on long prose-only shots. Prefer ground rule 4: NB2 anime start-frame → i2v with a motion-only prompt. *(hypothesis: refs hold Kling's anime better than prose — verify before promising.)*\n- Anime faces drift under multiple references faster than photoreal; the named-entity one-sheet doctrine applies unchanged.\n\n## Painterly\n\n- **NB2:** medium + technique in the style framing: \"digital concept-art painting, visible brushwork, painted edges\". At most ONE school/era register (\"classic gouache illustration\") — a register, not an artist-name pile.\n- **Video:** the least-supported style lane. Use ground rule 4 (painterly NB2 frame → i2v, motion-only prompt) and expect some cleanup of painterliness over the clip *(hypothesis — set user expectations, don't promise a perfectly painterly clip)*.\n- Camera language still applies — painterly ≠ static; \"slow push-in\" works the same.\n\n## 3D render\n\n- **NB2:** name the lineage register in the style framing: \"stylized 3D render, soft global illumination, subsurface skin\". Lighting vocabulary (GI, rim light) is unusually load-bearing for the 3D read.\n- **Seedance:** the physics/effects lane flatters 3D content — visual-style slot \"stylized 3D animation\", image-quality slot \"clean render, high detail\".\n- **Kling:** same start-frame preference as anime.\n- *(hypothesis)* An engine token (\"Unreal Engine 5 render\") may help NB2; if used, ONE token, style slot only — never on Seedance where spec-stuffing hurts.\n\n## Routing recipe (what to actually do)\n\n1. Style reference available → inspect it, bind its look role, and describe any light or exposure needed in the new scene.\n2. Image request → use the current image default unless the brief supplies a reason for another seat; load that model's craft. The NB2 examples above apply when NB2 is selected, not to every image model.\n3. Video request → choose a styled start frame when composition, exact text or an approved look must hold. Use the image seat suited to that job, then the chosen video model's motion and sound grammar. Direct styled text-to-video is also valid when it serves the brief; an image pass is not mandatory.\n4. Multi-shot run → retain stable style references and descriptors, adapting action, light and model-specific wording to each scene.\n\n`slates-model-selection` and the current catalogue own routing. These style techniques supply craft after the production choice; no user needs to select a skill or workflow.\n",
|
|
38
38
|
"slates-ugc-influencer-ad": "---\nname: slates-ugc-influencer-ad\ndescription: \"Direct a creator-style spoken ad when the brief calls for a camera-facing person or exchange. Covers activity, performance, phone-camera handling, speech, interaction and sound.\"\n---\n\n# Creator-style performance\n\nRead `slates-script-craft` for the script and opening/bridge versions. Match the requested creator, audience and reference register. Phone footage, quiet polish and cinematic treatment are choices; no evidence here establishes one as universally highest-converting.\n\n## Direct a person in a place\n\nWrite an observable activity and a speaking intention: showing a worn handle, answering a friend, demonstrating a catch, interrupting a task. Small actions can make a close shot legible: a weight shift, a glance toward the other person, a hand taking an object's weight. Larger actions need space and framing that accommodates them.\n\nFor an ordinary phone register, describe concrete light and surroundings: a window from one side, a practical lamp, a room with ordinary possessions. Avoid generic praise words. Preserve the supplied person's appearance and product details through references, not invented claims.\n\nDescribe camera handling physically when it matters: a hand supports the phone against the table edge; the frame sags and is corrected once. Static framing is also valid. Do not force handheld motion or imperfections into a brief that asks for something else.\n\n## Speech, interaction and sound\n\nOne person or several may carry the piece. Give reactions and answers their antecedents. A continuing sentence may cross an edit; an independent module should establish its own subject. Repetition can be a callback.\n\nSpeech may point at what the viewer sees when demonstrating a claim. It need not compete with the picture for novelty on every line. Keep pauses, listening and the intended register; a fixed words-per-second formula cannot establish the performance's duration.\n\nMake audio intent explicit: dialogue, room sound, effects, score or silence. A silent demo is valid. Use current model guidance for audio support and reference syntax. Plan captions or text only where the actual editing surface supports them; do not promise an unverified rendering feature.\n\n## References and production choices\n\nSelect the identity, voice, location and direct images deliberately. A replacement presenter need not replace a separately retained voice. A changed location does not automatically replace a first-frame image. Inspect the composed request to see which references remain.\n\nA plate-first approach is useful when the composition must be approved before motion, but it is not a prerequisite for all video. Choose single-take or multiple-cut production according to the intended performance and current capabilities. Do not copy vendor duration, resolution or reference limits into this guide.\n\nBefore spending, follow `slates-cost-discipline` for the selected set. Inspect errors and existing job state; a refusal or timeout does not authorize another charge. Check the actual clip's picture and sound against the brief, preserve earlier takes, and trim or rearrange when that solves the issue without regenerating. Exported playback, not a successful process exit, establishes the result.\n",
|
|
39
|
-
"slates-vision-feedback-loop": "---\r\nname: slates-vision-feedback-loop\r\ndescription: \"Inspect generated media against the brief, diagnose defects and choose a targeted correction. Use during production or iteration; covers reference review, image defects and model-specific failure receipts.\"\r\n---\r\n\r\n# Vision feedback loop — Slates utility skill\r\n\r\nSlates returns generated images inline as base64. You see the actual pixels. Use that — don't trust prompt-following blindly.\r\n\r\n## Asset codes are your shared vocabulary with the user\r\n\r\nEvery asset in Slates has a short stable code (e.g. `IMG-A12`, `VID-V3`, `AUD-S1`) and a label derived from its prompt (e.g. `Beach Sunset`). These are visible in the gallery as a corner badge on each thumbnail. **Always refer to assets by their code in chat** so the user can match what you're saying to a specific card in their gallery.\r\n\r\n- ✅ \"I'm using **IMG-A12 — Beach Sunset** as the first frame. The second-frame candidate **IMG-A15** has the right composition but warmer light — want me to use that one instead?\"\r\n- ❌ \"I'm using the beach sunset image...\" (user has four beach sunset variants — which one?)\r\n- ❌ \"I'm using asset `7a3f9e4b-...`\" (UUIDs aren't readable; user can't match to a badge)\r\n\r\nThe code is the FORMAL reference. The label is human texture. Use both: `IMG-A12 — Beach Sunset`.\r\n\r\n## Vision tools at your disposal\r\n\r\n- `slates_get_asset_image` — pull one image into context. Returns its code+label.\r\n- `slates_get_assets_batch` — pull up to 8 images in one call. Use when picking from a candidate set; cheaper than N individual fetches.\r\n- `slates_get_asset_video_frames` — extract N keyframes (default 3) from a video and inline them as JPEGs. These sampled stills support appearance, framing and identity checks. They do not verify continuous motion, lip sync or sound. Use actual playback or an audio-capable host for those claims when available; otherwise report them unreviewed and retain the saved asset.\r\n\r\n## Pre-flight is automatic on the gen tools\r\n\r\n`slates_generate_video` and `slates_generate_image` show you their reference assets **inline** on the confirm response. You don't need to fetch them yourself, but you DO need to look at what comes back, revise the prompt if the references suggest a different motion/framing, and only then re-call with `confirm=true`.\n\r\n## 🔴 The still-gate — never animate a bad frame\r\n\r\n<!-- @inject:still-gate -->\r\n**Inspect a start frame before animating it.** Repair a visible defect that would make the intended crop or performance unusable before spending on motion. A clean frame can be animated whenever the brief calls for movement; this check does not require an image stage for text-to-video.\r\n\r\nThis is a cost rule as well as craft: a premium video call can cost many times an image correction. Broken geometry can turn to mush, oily textures can crawl and malformed objects can fall apart in motion. Fix a known source defect at the source instead of buying a more expensive copy. Judge intentional stylisation against the brief, not a universal photoreal standard. Additional image or video requests still follow the existing generation authorization.\r\n<!-- @end:still-gate -->\r\n\r\n## The pattern\r\n\r\n1. **Generate.** Call `slates_generate_image` with a prompt. The result is in your context as an image content block.\r\n2. **Evaluate on TWO axes — they are different questions:**\r\n - **Brief-conformance** — what did the user actually want? Are the elements right? Composition? Lighting? Subject identity?\r\n - **Defects** — run the slop rubric below. *A frame can match the brief perfectly and still be slop that mushes the moment it moves.* Checking only the first axis is how a bad frame reaches an expensive video call.\r\n3. **One of three outcomes:**\r\n - **Right** → save it (bind to a frame, character slot, etc.) and move on.\r\n - **Close, but adjustable** → refine with a specific delta, regenerate **once**.\r\n - **Wrong direction** → diagnose the failed requirement. Refine within the supplied brief and existing authorization; ask only when the creative intent is unresolved or the next request needs fresh consent.\r\n\r\n## The defect rubric — five slop tells\r\n\r\n| Tell | What it looks like | Why it matters downstream |\r\n|---|---|---|\r\n| **Light with no transitions** | Flat-black pits instead of a shadow ramp; light that stops rather than falls off | Transfers onto every character or object added into that plate later |\r\n| **Broken-but-plausible objects** | Crates, railings, hardware, mechanisms you can *almost* read but that don't resolve | Turn to mush in motion, and the model multiplies them |\r\n| **Local logic breaks** | An effect present in only part of the frame — rain scratching one corner, wet ground under one figure | The video model's physical logic breaks along with it |\r\n| **Oily textures** | Soapy, licked-smooth surfaces that have lost their material identity | Reflections crawl in motion; the plate can't hold continuity |\r\n| **Too perfect** | A soft light on the face that nothing in the scene could cast, the subject sharper and cleaner than everything around them, every region exposed to be readable, colour pushed warm and saturated | It reads as a subject pasted onto a location, and every shot built from the plate inherits the studio look. Fix it in words: `slates-cinematic-look` |\r\n\r\n### Per-model accents — check the one you actually used\r\n\r\n- **Nano Banana Pro** (`nano-banana-pro`) — ruler-straight symmetry, everything parallel and square, flat even light, pretty but staged/stock, textures reading as 3D render rather than photograph. **It hyperbolizes every edit**: ask for graffiti on one wall and the whole location gets tagged.\r\n- **GPT Image** (`gpt-image-2-5-flare`, `gpt-image-2-5-sunburst`) — microcontrast to the ceiling, hard halos on every edge, no depth or bokeh, white balance pulled warm until the frame yellows, plastic licked-smooth materials. Worst tell: **one sickly texture pattern laid over the entire frame**. ⚠️ Catalogued on `gpt-image-2`, which 2.5 replaced on 2026-09-09 — an accent is a per-model observation, so treat this as a prior to check rather than a finding, and correct it here the first time a 2.5 frame disagrees.\r\n\r\n> ⚠️ These are accents for **`nano-banana-pro`** and the **GPT Image** line specifically. `nano-banana-2` is a **different model** (Gemini 3.1 Flash Image vs NB Pro's Gemini 3 Pro Image) and we have **no evidence** about its accent. Do not inherit one — say nothing rather than warn about a failure mode you can't substantiate. That caution applies to the GPT Image entry above too: it was measured on `gpt-image-2`, not on either 2.5 seat.\r\n\r\n## Where the fault lives — triage before you change anything\r\n\r\nWe say \"one specific delta per regeneration\" but that only helps once you know *which* variable to move. Diagnose first:\r\n\r\n| Visible pattern | Diagnosis | Fix |\r\n|---|---|---|\r\n| The defect exists in the source asset, or stays tied to the same feature when the direction changes | **Source asset** | Fix the sheet / plate, not the prompt |\r\n| Source is clean, and the defect changes when only the suspect motion clause changes | **Motion direction** | Fix the prompt |\r\n| Controls conflict, or the failure follows neither variable | **Inconclusive** | Narrow the test — change less, not more |\r\n\r\n**Review routes; it is not pass/fail.** Geography melts → fix the location. Identity drifts → fix the character sheet. Assets are sound but the action is wrong → fix the video direction. Wrong idea entirely → reopen the brief with the user.\r\n\r\n**Correct the earliest broken handoff.** Polishing a downstream symptom hides the source and guarantees it resurfaces in the next shot built from the same asset.\r\n\r\n## Baseline hygiene — isolate the variable you're testing\r\n\r\nWhen the **character** is the question, keep the location out of it: test on a plate that already holds its own geometry, depth, materials, and light. **A broken plate gives every character failure a second plausible cause**, and you will spend re-rolls deciding which one you're looking at. The same applies in reverse — test a plate empty before you populate it.\r\n\r\n## Refinement rules\r\n\r\n- **One specific delta per regeneration.** Don't change five things at once — you won't know what helped.\r\n- **A fresh generation needs a complete coherent prompt.** Change one decision and retain the unchanged requirements so old and new clauses do not conflict. An edit request uses its model's change-only grammar instead; do not turn a surgical edit into a full scene re-description.\r\n - On **Seedance**, retain the selected model's structure: shot numbers for 2.0, whole-second timing where used for 2.5. See the matching model guide.\r\n - **Exception — Omni Flash Edit.** Long prompts documentedly destroy its fidelity. There the rule inverts: one short instruction plus *\"Keep everything else the same.\"*\r\n- **Anchor with references.** If the result drifted from the user's intent, attach the *previous best* generation as a reference image alongside the original brief.\r\n- **Use `slates_get_asset_image`** to pull a previously-generated image back into context if you need to compare against a fresh generation.\r\n- **Use `slates_edit_image`** for surgical tweaks instead of full regeneration when ~90% of the image is right — `sourceAssetId` = the asset, `prompt` = the change only. Edits preserve composition and identity; full regen rolls the dice. Recipe: `slates-edit-and-iterate`.\r\n\r\n## Cost discipline\r\n\r\n- Track total credits spent across the loop. Surface to the user every 3 iterations.\r\n- Use the repeated-failure checkpoint below; do not keep submitting an unchanged failed request.\r\n- **Follow the existing consent for every attempt.** An approved enumerated batch covers its listed calls. A retry or changed input outside that batch needs a new quote and the applicable confirmation; a timeout requires a status check before another submission.\r\n\r\n<!-- @inject:iteration-diagnosis -->\r\n## Diagnose repeated failures\r\n\r\nAfter three failed attempts at the same requirement, pause unchanged re-rolls and diagnose the source reference, prompt structure, model fit and tool result. Three is a review checkpoint, not a universal limit or proof that the seed cannot matter. Preserve the attempts and name what each test changed.\r\n\r\nContinue autonomously when the brief is clear, a specific correction is supported and the next request is already authorized. Hand control back when taste or intent cannot be inferred, the next request needs fresh consent, or the available tool cannot meet the requirement. A failed roll never authorizes an additional charge. Follow the existing batch and per-request cost policy.\r\n<!-- @end:iteration-diagnosis -->\r\n\r\n## When to break the loop\r\n\r\n- The user said \"good enough\" or \"ship it.\" Stop iterating.\r\n- Repeated attempts show no progress. Diagnose the source, prompt or model before spending again; apply the scoped retry rule above.\r\n- The user changes brief mid-loop. Treat it as a new brief, not a continuation.\r\n\r\n## Voice when narrating to the user\r\n\r\nTight, observational, no editorializing.\r\n- ✅ \"Frame 2 has the wrong lighting direction — back-lit instead of side. Regenerating with side light.\"\r\n- ❌ \"I notice that the lighting in frame 2 isn't quite what we were going for. I'll go ahead and try again with a different approach.\"\r\n",
|
|
39
|
+
"slates-vision-feedback-loop": "---\nname: slates-vision-feedback-loop\ndescription: \"Inspect generated media against the brief, diagnose defects and choose a targeted correction. Use during production or iteration; covers reference review, image defects and model-specific failure receipts.\"\n---\n\n# Vision feedback loop — Slates utility skill\n\nSlates returns generated images inline as base64. You see the actual pixels. Use that — don't trust prompt-following blindly.\n\n## Asset codes are your shared vocabulary with the user\n\nEvery asset in Slates has a short stable code (e.g. `IMG-A12`, `VID-V3`, `AUD-S1`) and a label derived from its prompt (e.g. `Beach Sunset`). These are visible in the gallery as a corner badge on each thumbnail. **Always refer to assets by their code in chat** so the user can match what you're saying to a specific card in their gallery.\n\n- ✅ \"I'm using **IMG-A12 — Beach Sunset** as the first frame. The second-frame candidate **IMG-A15** has the right composition but warmer light — want me to use that one instead?\"\n- ❌ \"I'm using the beach sunset image...\" (user has four beach sunset variants — which one?)\n- ❌ \"I'm using asset `7a3f9e4b-...`\" (UUIDs aren't readable; user can't match to a badge)\n\nThe code is the FORMAL reference. The label is human texture. Use both: `IMG-A12 — Beach Sunset`.\n\n## Vision tools at your disposal\n\n- `slates_get_asset_image` — pull one image into context. Returns its code+label.\n- `slates_get_assets_batch` — pull up to 8 images in one call. Use when picking from a candidate set; cheaper than N individual fetches.\n- `slates_get_asset_video_frames` — extract N keyframes (default 3) from a video and inline them as JPEGs. These sampled stills support appearance, framing and identity checks. They do not verify continuous motion, lip sync or sound. Use actual playback or an audio-capable host for those claims when available; otherwise report them unreviewed and retain the saved asset.\n\n## Pre-flight is automatic on the gen tools\n\n`slates_generate_video` and `slates_generate_image` show you their reference assets **inline** on the confirm response. You don't need to fetch them yourself, but you DO need to look at what comes back, revise the prompt if the references suggest a different motion/framing, and only then re-call with `confirm=true`.\n\n## 🔴 The still-gate — never animate a bad frame\n\n<!-- @inject:still-gate -->\n**Inspect a start frame before animating it.** Repair a visible defect that would make the intended crop or performance unusable before spending on motion. A clean frame can be animated whenever the brief calls for movement; this check does not require an image stage for text-to-video.\n\nThis is a cost rule as well as craft: a premium video call can cost many times an image correction. Broken geometry can turn to mush, oily textures can crawl and malformed objects can fall apart in motion. Fix a known source defect at the source instead of buying a more expensive copy. Judge intentional stylisation against the brief, not a universal photoreal standard. Additional image or video requests still follow the existing generation authorization.\n<!-- @end:still-gate -->\n\n## The pattern\n\n1. **Generate.** Call `slates_generate_image` with a prompt. The result is in your context as an image content block.\n2. **Evaluate on TWO axes — they are different questions:**\n - **Brief-conformance** — what did the user actually want? Check the four edges first: a subject cut off by the frame (a lighthouse missing its lantern, a head cropped at the brow) is a defect unless the brief asked for that crop. Then: are the elements right? Composition? Lighting? Subject identity?\n - **Defects** — run the slop rubric below. *A frame can match the brief perfectly and still be slop that mushes the moment it moves.* Checking only the first axis is how a bad frame reaches an expensive video call.\n3. **One of three outcomes:**\n - **Right** → save it (bind to a frame, character slot, etc.) and move on.\n - **Close, but adjustable** → refine with a specific delta, regenerate **once**.\n - **Wrong direction** → diagnose the failed requirement. Refine within the supplied brief and existing authorization; ask only when the creative intent is unresolved or the next request needs fresh consent.\n\n## The defect rubric — five slop tells\n\n| Tell | What it looks like | Why it matters downstream |\n|---|---|---|\n| **Light with no transitions** | Flat-black pits instead of a shadow ramp; light that stops rather than falls off | Transfers onto every character or object added into that plate later |\n| **Broken-but-plausible objects** | Crates, railings, hardware, mechanisms you can *almost* read but that don't resolve | Turn to mush in motion, and the model multiplies them |\n| **Local logic breaks** | An effect present in only part of the frame — rain scratching one corner, wet ground under one figure | The video model's physical logic breaks along with it |\n| **Oily textures** | Soapy, licked-smooth surfaces that have lost their material identity | Reflections crawl in motion; the plate can't hold continuity |\n| **Too perfect** | A soft light on the face that nothing in the scene could cast, the subject sharper and cleaner than everything around them, every region exposed to be readable, colour pushed warm and saturated | It reads as a subject pasted onto a location, and every shot built from the plate inherits the studio look. Fix it in words: `slates-cinematic-look` |\n\n### Per-model accents — check the one you actually used\n\n- **Nano Banana Pro** (`nano-banana-pro`) — ruler-straight symmetry, everything parallel and square, flat even light, pretty but staged/stock, textures reading as 3D render rather than photograph. **It hyperbolizes every edit**: ask for graffiti on one wall and the whole location gets tagged.\n- **GPT Image** (`gpt-image-2-5-flare`, `gpt-image-2-5-sunburst`) — microcontrast to the ceiling, hard halos on every edge, no depth or bokeh, white balance pulled warm until the frame yellows, plastic licked-smooth materials. Worst tell: **one sickly texture pattern laid over the entire frame**. ⚠️ Catalogued on `gpt-image-2`, which 2.5 replaced on 2026-09-09 — an accent is a per-model observation, so treat this as a prior to check rather than a finding, and correct it here the first time a 2.5 frame disagrees.\n\n> ⚠️ These are accents for **`nano-banana-pro`** and the **GPT Image** line specifically. `nano-banana-2` is a **different model** (Gemini 3.1 Flash Image vs NB Pro's Gemini 3 Pro Image) and we have **no evidence** about its accent. Do not inherit one — say nothing rather than warn about a failure mode you can't substantiate. That caution applies to the GPT Image entry above too: it was measured on `gpt-image-2`, not on either 2.5 seat.\n\n## Where the fault lives — triage before you change anything\n\nWe say \"one specific delta per regeneration\" but that only helps once you know *which* variable to move. Diagnose first:\n\n| Visible pattern | Diagnosis | Fix |\n|---|---|---|\n| The defect exists in the source asset, or stays tied to the same feature when the direction changes | **Source asset** | Fix the sheet / plate, not the prompt |\n| Source is clean, and the defect changes when only the suspect motion clause changes | **Motion direction** | Fix the prompt |\n| Controls conflict, or the failure follows neither variable | **Inconclusive** | Narrow the test — change less, not more |\n\n**Review routes; it is not pass/fail.** Geography melts → fix the location. Identity drifts → fix the character sheet. Assets are sound but the action is wrong → fix the video direction. Wrong idea entirely → reopen the brief with the user.\n\n**Correct the earliest broken handoff.** Polishing a downstream symptom hides the source and guarantees it resurfaces in the next shot built from the same asset.\n\n## Baseline hygiene — isolate the variable you're testing\n\nWhen the **character** is the question, keep the location out of it: test on a plate that already holds its own geometry, depth, materials, and light. **A broken plate gives every character failure a second plausible cause**, and you will spend re-rolls deciding which one you're looking at. The same applies in reverse — test a plate empty before you populate it.\n\n## Refinement rules\n\n- **One specific delta per regeneration.** Don't change five things at once — you won't know what helped.\n- **A fresh generation needs a complete coherent prompt.** Change one decision and retain the unchanged requirements so old and new clauses do not conflict. An edit request uses its model's change-only grammar instead; do not turn a surgical edit into a full scene re-description.\n - On **Seedance**, retain the selected model's structure: shot numbers for 2.0, whole-second timing where used for 2.5. See the matching model guide.\n - **Exception — Omni Flash Edit.** Long prompts documentedly destroy its fidelity. There the rule inverts: one short instruction plus *\"Keep everything else the same.\"*\n- **Anchor with references.** If the result drifted from the user's intent, attach the *previous best* generation as a reference image alongside the original brief.\n- **Use `slates_get_asset_image`** to pull a previously-generated image back into context if you need to compare against a fresh generation.\n- **Use `slates_edit_image`** for surgical tweaks instead of full regeneration when ~90% of the image is right — `sourceAssetId` = the asset, `prompt` = the change only. Edits preserve composition and identity; full regen rolls the dice. Recipe: `slates-edit-and-iterate`.\n\n## Cost discipline\n\n- Track total credits spent across the loop. Surface to the user every 3 iterations.\n- Use the repeated-failure checkpoint below; do not keep submitting an unchanged failed request.\n- **Follow the existing consent for every attempt.** An approved enumerated batch covers its listed calls. A retry or changed input outside that batch needs a new quote and the applicable confirmation; a timeout requires a status check before another submission.\n\n<!-- @inject:iteration-diagnosis -->\n## Diagnose repeated failures\n\nAfter three failed attempts at the same requirement, pause unchanged re-rolls and diagnose the source reference, prompt structure, model fit and tool result. Three is a review checkpoint, not a universal limit or proof that the seed cannot matter. Preserve the attempts and name what each test changed.\n\nContinue autonomously when the brief is clear, a specific correction is supported and the next request is already authorized. Hand control back when taste or intent cannot be inferred, the next request needs fresh consent, or the available tool cannot meet the requirement. A failed roll never authorizes an additional charge. Follow the existing batch and per-request cost policy.\n<!-- @end:iteration-diagnosis -->\n\n## When to break the loop\n\n- The user said \"good enough\" or \"ship it.\" Stop iterating.\n- Repeated attempts show no progress. Diagnose the source, prompt or model before spending again; apply the scoped retry rule above.\n- The user changes brief mid-loop. Treat it as a new brief, not a continuation.\n\n## Voice when narrating to the user\n\nTight, observational, no editorializing.\n- ✅ \"Frame 2 has the wrong lighting direction — back-lit instead of side. Regenerating with side light.\"\n- ❌ \"I notice that the lighting in frame 2 isn't quite what we were going for. I'll go ahead and try again with a different approach.\"\n",
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=content.js.map
|
package/dist/update-check.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// and @slatesvideo/cli).
|
|
3
3
|
//
|
|
4
4
|
// WHY THIS EXISTS (2026-09-13): a Discord user's agent reported "H3 isn't in
|
|
5
|
-
// the API tool, only Kling,
|
|
5
|
+
// the API tool, only Kling, [a model] and Seedance are exposed" — a server older
|
|
6
6
|
// than 0.5.10 (2026-08-28). Nothing told him, and nothing told his agent. The
|
|
7
7
|
// install path is `npx -y @slatesvideo/mcp-server` with no version pinned, so
|
|
8
8
|
// a client RESTART is the whole update; the failure is a client that never
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"path": "src/prompts/model-capabilities.ts",
|
|
51
|
-
"sha256": "
|
|
51
|
+
"sha256": "1f3ea8f851718af39061cf699b33cc167f563252a6b161521c6629e60c661c6e"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"path": "src/prompts/model-facts.ts",
|
|
55
|
-
"sha256": "
|
|
55
|
+
"sha256": "1eb305bce7e045f5133f5052f0ebd38087c9854cfc8af98093a95c31eab6d081"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": "src/prompts/partials.generated.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slatesvideo/shared",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Shared operations layer for the Slates MCP server and CLI: auth, cloud/desktop clients, and the single tool surface both consume. Most users want @slatesvideo/mcp-server or @slatesvideo/cli instead.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"./model-facts": {
|
|
35
35
|
"types": "./dist/prompts/model-facts.d.ts",
|
|
36
36
|
"default": "./dist/prompts/model-facts.js"
|
|
37
|
+
},
|
|
38
|
+
"./analytics": {
|
|
39
|
+
"types": "./dist/analytics/events.d.ts",
|
|
40
|
+
"default": "./dist/analytics/events.js"
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"files": [
|
|
@@ -71,7 +75,6 @@
|
|
|
71
75
|
"video-generation",
|
|
72
76
|
"image-generation",
|
|
73
77
|
"claude",
|
|
74
|
-
"veo",
|
|
75
78
|
"kling",
|
|
76
79
|
"seedance"
|
|
77
80
|
],
|