🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"
TypeScript
feat(settings): Agent 提示词/Skill 支持 en/ja/ko 多语言版本
Connor190d33381fa5
diff --git a/.gitignore b/.gitignoreindex c75ee71..30c4a72 100644--- a/.gitignore+++ b/.gitignore@@ -47,9 +47,10 @@ temp//CLAUDE.md/AGENTS.md-# Agent workspace (skills 保持跟踪,其余产出忽略)+# Agent workspace (skills/prompts 为策划模板保持跟踪,其余产出忽略)backend/workspace/*!backend/workspace/skills/+!backend/workspace/prompts/# Desktop (Electron) build artifactsdesktop/node_modules/diff --git a/backend/src/agents/index.ts b/backend/src/agents/index.tsindex 6050fa3..d6b3aaf 100644--- a/backend/src/agents/index.ts+++ b/backend/src/agents/index.ts@@ -15,7 +15,7 @@ import { extractTools } from './tools/extract-tools.js'import { storyboardTools } from './tools/storyboard-tools.js'import { imagePromptTools } from './tools/image-prompt-tools.js'import { loadAgentSkills, skillWorkspaces } from './skills.js'-import { loadAgentPromptFile } from './prompts.js'+import { loadAgentPromptFile, loadBasePromptFile } from './prompts.js'import { buildLanguageDirective } from './language.js'import { getContentLanguageFromRC } from './context.js'@@ -340,24 +340,27 @@ const AGENT_TOOLS: Record<string, Record<string, any>> = {},}-/** instructions 按请求解析:prompt 文件(或默认)+ 技能全文拼接 + 目标语言指令块 */+/** instructions 按请求解析:prompt 文件(或默认)+ 技能全文拼接 + 目标语言指令块+ * prompt/skill 文本随内容语言切换语言变体(<type>.<lang>.md / SKILL.<lang>.md),缺失回退中文版 */function buildInstructions(type: string) {return async ({ requestContext }: { requestContext?: RequestContext }) => {const defaults = DEFAULT_PROMPTS[type]- const promptFile = await loadAgentPromptFile(type)+ const lang = getContentLanguageFromRC(requestContext)+ const promptFile = await loadAgentPromptFile(type, lang)const baseInstructions = promptFile?.instructions || defaults.instructions- const skillInstructions = await loadAgentSkills(type)- const languageDirective = buildLanguageDirective(getContentLanguageFromRC(requestContext))+ const skillInstructions = await loadAgentSkills(type, lang)+ const languageDirective = buildLanguageDirective(lang)return [baseInstructions, skillInstructions, languageDirective].filter(Boolean).join('\n\n')}}-/** model 按请求解析:prompt 文件 frontmatter + RequestContext 的 modelOverride/textConfigId 覆盖 */+/** model 按请求解析:基础版 prompt 文件 frontmatter + RequestContext 的 modelOverride/textConfigId 覆盖+ * (model 只认基础版 prompts/<type>.md,语言变体不参与 model 解析) */function buildModel(type: string) {return async ({ requestContext }: { requestContext?: RequestContext }) => {- const promptFile = await loadAgentPromptFile(type)+ const promptFile = await loadBasePromptFile(type)const modelOverride = requestContext?.get('modelOverride' as never) as string | undefinedconst textConfigId = requestContext?.get('textConfigId' as never) as number | undefinedreturn getModel(promptFile?.model || undefined, modelOverride, textConfigId)diff --git a/backend/src/agents/prompts.ts b/backend/src/agents/prompts.tsindex 991036e..ec158dc 100644--- a/backend/src/agents/prompts.ts+++ b/backend/src/agents/prompts.ts@@ -17,7 +17,9 @@ export interface AgentPromptFile {}const fsm = () => skillsManagerWorkspace.filesystem!-export const promptFilePath = (agentType: string) => `prompts/${agentType}.md`+/** prompt 文件路径;lang 为 en/ja/ko 时返回语言变体(<type>.<lang>.md),zh/空为基础版 */+export const promptFilePath = (agentType: string, lang?: string | null) =>+ `prompts/${agentType}${lang && lang !== 'zh' ? `.${lang}` : ''}.md`/** 解析 prompt 文件(frontmatter 仅支持 name/model 两个标量字段,无需 yaml 依赖) */export function parsePromptFile(raw: string): AgentPromptFile {@@ -43,10 +45,9 @@ export function serializePromptFile(file: AgentPromptFile): string {return `---\nname: ${file.name}\nmodel: "${file.model}"\n---\n\n${file.instructions.trim()}\n`}-/** 读取 Agent 的 prompt 文件;文件不存在或解析失败返回 null */-export async function loadAgentPromptFile(agentType: string): Promise<AgentPromptFile | null> {+/** 读取指定路径的 prompt 文件;文件不存在或解析失败返回 null */+async function readPromptFile(path: string): Promise<AgentPromptFile | null> {try {- const path = promptFilePath(agentType)if (!await fsm().exists(path)) return nullconst raw = String(await fsm().readFile(path, { encoding: 'utf-8' }))const parsed = parsePromptFile(raw)@@ -55,3 +56,20 @@ export async function loadAgentPromptFile(agentType: string): Promise<AgentPrompreturn null}}++/** 读取基础版(中文)prompt 文件 — model 字段永远只从基础版解析,避免多语言文件漂移 */+export function loadBasePromptFile(agentType: string): Promise<AgentPromptFile | null> {+ return readPromptFile(promptFilePath(agentType))+}++/**+ * 读取 Agent 的 prompt 文件;lang 非 zh 时优先语言变体(<type>.<lang>.md),缺失回退基础版。+ * 变体的 model 字段无效:返回时 model 始终取基础版的值。+ */+export async function loadAgentPromptFile(agentType: string, lang?: string | null): Promise<AgentPromptFile | null> {+ const base = await loadBasePromptFile(agentType)+ if (!lang || lang === 'zh') return base+ const localized = await readPromptFile(promptFilePath(agentType, lang))+ if (!localized) return base+ return { ...localized, model: base?.model || '' }+}diff --git a/backend/src/agents/skills.ts b/backend/src/agents/skills.tsindex 4ca958c..df6d17b 100644--- a/backend/src/agents/skills.ts+++ b/backend/src/agents/skills.ts@@ -86,10 +86,30 @@ function formatSkillSection(skillId: string, content: string): string {return [`## Skill: ${skillId}`, content].join('\n')}+/** 剥离 SKILL.md 风格文件的 frontmatter,返回正文(供语言变体直读使用) */+function stripFrontmatter(raw: string): string {+ const m = raw.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/)+ return (m ? raw.slice(m[0].length) : raw).trim()+}++/** 读取技能的语言变体正文(SKILL.<lang>.md,直读绕缓存永远最新);不存在返回 null */+async function readLocalizedSkill(relPath: string, lang: string): Promise<string | null> {+ const fsm = skillsManagerWorkspace.filesystem!+ const p = `skills/${relPath}/SKILL.${lang}.md`+ try {+ if (!await fsm.exists(p)) return null+ const body = stripFrontmatter(String(await fsm.readFile(p, { encoding: 'utf-8' })))+ return body || null+ } catch {+ return null+ }+}+/** 读取 Agent 专属技能全文(经 workspace.skills API,保持原注入格式)* AGENT_SKILL_MAP 的目录按前缀匹配:目录自身及其子目录下所有 SKILL.md 都会注入,- * 因此设置页新建的子技能(如 storyboard-breaker/xxx)无需改代码即可生效 */-export async function loadAgentSkills(agentType: string): Promise<string> {+ * 因此设置页新建的子技能(如 storyboard-breaker/xxx)无需改代码即可生效。+ * lang 非 zh 时逐技能优先 SKILL.<lang>.md,缺失回退基础版(中文) */+export async function loadAgentSkills(agentType: string, lang?: string | null): Promise<string> {const workspace = skillWorkspaces[agentType]const prefixes = AGENT_SKILL_MAP[agentType] || []if (!workspace || !prefixes.length) return ''@@ -98,10 +118,15 @@ export async function loadAgentSkills(agentType: string): Promise<string> {const relPaths = allPaths.filter(p =>prefixes.some(prefix => p === prefix || p.startsWith(prefix + '/')))+ const useLocalized = Boolean(lang && lang !== 'zh')const contents: string[] = []for (const relPath of relPaths) {- const skill = await workspace.skills?.get(`skills/${relPath}`)- const body = skill?.instructions?.trim()+ let body: string | null | undefined+ if (useLocalized) body = await readLocalizedSkill(relPath, lang!)+ if (!body) {+ const skill = await workspace.skills?.get(`skills/${relPath}`)+ body = skill?.instructions?.trim()+ }if (body) contents.push(formatSkillSection(relPath, body))}diff --git a/backend/src/routes/prompts.ts b/backend/src/routes/prompts.tsindex 1492318..e28a377 100644--- a/backend/src/routes/prompts.ts+++ b/backend/src/routes/prompts.ts@@ -1,6 +1,7 @@/**- * Agent prompt 管理路由 — 读写 workspace/prompts/<agent_type>.md+ * Agent prompt 管理路由 — 读写 workspace/prompts/<agent_type>[.<lang>].md* 文件操作 jail 在 backend/workspace/ 目录内(仿 skills 路由)+ * ?lang=en/ja/ko 读写语言变体;zh/缺省为基础版(历史行为)*/import { Hono } from 'hono'import { success, badRequest } from '../utils/response.js'@@ -12,8 +13,10 @@ const app = new Hono()const fsm = () => skillsManagerWorkspace.filesystem!const checkType = (type: string) => validAgentTypes.includes(type)+const LANGS = ['zh', 'en', 'ja', 'ko']+const normalizeLang = (v?: string) => (v && LANGS.includes(v) ? v : 'zh')-// GET /prompts — 列出全部 Agent 的 prompt 状态+// GET /prompts — 列出全部 Agent 的 prompt 状态(基础版口径;name/model 只属于基础版)app.get('/', async (c) => {const list = await Promise.all(validAgentTypes.map(async (type) => {const file = await loadAgentPromptFile(type)@@ -27,22 +30,31 @@ app.get('/', async (c) => {return success(c, list)})-// GET /prompts/:type — 有效内容(文件优先,缺失回退代码默认)+// GET /prompts/:type?lang= — 有效内容(语言变体优先,缺失回退基础版,再缺失回退代码默认)+// is_default=true 表示当前语言无独立文件(内容为回退版本),前端据此提示「跟随中文」app.get('/:type', async (c) => {const type = c.req.param('type')if (!checkType(type)) return badRequest(c, '未知的 Agent 类型')- const file = await loadAgentPromptFile(type)+ const lang = normalizeLang(c.req.query('lang'))+ const [file, base] = await Promise.all([+ loadAgentPromptFile(type, lang),+ lang === 'zh' ? Promise.resolve(null) : loadAgentPromptFile(type),+ ])+ // 非 zh 且变体不存在时 file 即基础版;通过路径再确认一次变体存在性+ const variantExists = lang !== 'zh' && await fsm().exists(promptFilePath(type, lang))if (file) {return success(c, {agent_type: type,- name: file.name || DEFAULT_PROMPTS[type].name,- model: file.model,+ lang,+ name: base?.name || file.name || DEFAULT_PROMPTS[type].name,+ model: base?.model || file.model,system_prompt: file.instructions,- is_default: false,+ is_default: lang === 'zh' ? false : !variantExists,})}return success(c, {agent_type: type,+ lang,name: DEFAULT_PROMPTS[type].name,model: '',system_prompt: DEFAULT_PROMPTS[type].instructions,@@ -50,26 +62,35 @@ app.get('/:type', async (c) => {})})-// PUT /prompts/:type — 保存为 prompt 文件+// PUT /prompts/:type?lang= — 保存为 prompt 文件(lang 非 zh 写语言变体;model 只随基础版保存)app.put('/:type', async (c) => {const type = c.req.param('type')if (!checkType(type)) return badRequest(c, '未知的 Agent 类型')const body = await c.req.json()+ const lang = normalizeLang(c.req.query('lang') ?? body.lang)const instructions = String(body.system_prompt ?? '').trim()if (!instructions) return badRequest(c, 'system_prompt 必填')- const name = String(body.name || DEFAULT_PROMPTS[type].name)- const model = String(body.model ?? '').trim()- await fsm().writeFile(promptFilePath(type), serializePromptFile({ name, model, instructions }), { recursive: true })- return success(c, { agent_type: type, name, model, is_default: false })+ if (lang === 'zh') {+ const name = String(body.name || DEFAULT_PROMPTS[type].name)+ const model = String(body.model ?? '').trim()+ await fsm().writeFile(promptFilePath(type), serializePromptFile({ name, model, instructions }), { recursive: true })+ return success(c, { agent_type: type, lang, name, model, is_default: false })+ }+ // 语言变体:model 不从变体读取,name 仅作展示;保留变体自己的 name(缺省用基础版/默认名)+ const base = await loadAgentPromptFile(type)+ const name = String(body.name || base?.name || DEFAULT_PROMPTS[type].name)+ await fsm().writeFile(promptFilePath(type, lang), serializePromptFile({ name, model: '', instructions }), { recursive: true })+ return success(c, { agent_type: type, lang, name, is_default: false })})-// POST /prompts/:type/reset — 删除文件,回退代码默认值+// POST /prompts/:type/reset?lang= — 删除对应语言文件,回退(变体→基础版;基础版→代码默认)app.post('/:type/reset', async (c) => {const type = c.req.param('type')if (!checkType(type)) return badRequest(c, '未知的 Agent 类型')- const path = promptFilePath(type)+ const lang = normalizeLang(c.req.query('lang'))+ const path = promptFilePath(type, lang)if (await fsm().exists(path)) await fsm().deleteFile(path)- return success(c, { agent_type: type, is_default: true })+ return success(c, { agent_type: type, lang, is_default: true })})export default appdiff --git a/backend/src/routes/skills.ts b/backend/src/routes/skills.tsindex be990d7..5fe3aef 100644--- a/backend/src/routes/skills.ts+++ b/backend/src/routes/skills.ts@@ -8,7 +8,10 @@ import { refreshSkillWorkspaces, skillsManagerWorkspace } from '../agents/skillsconst app = new Hono()const fsm = () => skillsManagerWorkspace.filesystem!-const skillFile = (id: string) => `skills/${id}/SKILL.md`+const LANGS = ['zh', 'en', 'ja', 'ko']+const normalizeLang = (v?: string) => (v && LANGS.includes(v) ? v : 'zh')+/** 技能文件路径;lang 非 zh 时为语言变体 SKILL.<lang>.md */+const skillFile = (id: string, lang?: string) => `skills/${id}/SKILL${lang && lang !== 'zh' ? `.${lang}` : ''}.md`const SKILL_ID_SEGMENT = /^[a-z0-9-]+$/// GET /skills — List all skills (经 workspace.skills 原生发现)@@ -21,21 +24,26 @@ app.get('/', async (c) => {})))})-// GET /skills/:id — Get skill content (raw, 含 frontmatter 供编辑)+// GET /skills/:id?lang= — Get skill content (raw, 含 frontmatter 供编辑)+// lang 非 zh 时读语言变体;变体缺失回退基础版内容并标记 is_default=true(前端提示「跟随中文」)app.get('/*', async (c) => {const id = c.req.path.slice('/api/v1/skills/'.length)+ const lang = normalizeLang(c.req.query('lang'))if (!await fsm().exists(skillFile(id))) return badRequest(c, '技能不存在')- const content = await fsm().readFile(skillFile(id), { encoding: 'utf-8' })- return success(c, { id, content })+ const variantExists = lang !== 'zh' && await fsm().exists(skillFile(id, lang))+ const content = await fsm().readFile(skillFile(id, variantExists ? lang : undefined), { encoding: 'utf-8' })+ return success(c, { id, lang, content, is_default: lang !== 'zh' && !variantExists })})-// PUT /skills/:id — Update skill content+// PUT /skills/:id?lang= — Update skill content(lang 非 zh 写语言变体;基础版变更需刷新技能缓存)app.put('/*', async (c) => {const id = c.req.path.slice('/api/v1/skills/'.length)const body = await c.req.json()- await fsm().writeFile(skillFile(id), body.content, { recursive: true })- // 目录 mtime 不会因文件内容编辑而更新(APFS),显式刷新技能缓存- await refreshSkillWorkspaces()+ const lang = normalizeLang(c.req.query('lang') ?? body.lang)+ if (lang !== 'zh' && !await fsm().exists(skillFile(id))) return badRequest(c, '技能不存在')+ await fsm().writeFile(skillFile(id, lang), body.content, { recursive: true })+ // 目录 mtime 不会因文件内容编辑而更新(APFS),显式刷新技能缓存;语言变体直读无需刷新+ if (lang === 'zh') await refreshSkillWorkspaces()return success(c)})diff --git a/backend/workspace/prompts/extractor.en.md b/backend/workspace/prompts/extractor.en.mdnew file mode 100644index 0000000..13ce96b--- /dev/null+++ b/backend/workspace/prompts/extractor.en.md@@ -0,0 +1,36 @@+---+name: Character & Scene Extraction+model: ""+---++You are a production assistant, skilled at extracting character, scene, and prop information from scripts, and intelligently deduplicating against existing project data during extraction.++Workflow:+1. Call read_script_for_extraction to read the formatted script+2. Call read_existing_characters to read the list of characters already in the project, plus the characters already linked to the current episode+3. Call read_existing_scenes to read the list of scenes already in the project, plus the scenes already linked to the current episode+4. Call read_existing_props to read the list of props already in the project, plus the props already linked to the current episode+5. Focus on the current episode's script and analyze the characters, scenes, and props that actually appear in this episode+6. For each character: if one with the same name already exists, merge and update it; otherwise create a new one+7. Call save_dedup_characters to save the characters (deduplicated merge; automatically handles creation and updates, and links them to the current episode)+8. Analyze the script content and extract all scene information involved in this episode+9. For each scene: if one with the same location + time period already exists, reuse it; otherwise create a new one+10. Call save_dedup_scenes to save the scenes (deduplicated merge; automatically handles creation and reuse, and links them to the current episode)+11. Extract the key props of this episode — both of the following conditions must be met, neither is optional:+ a) Directly drives the plot: the item's appearance, handover, damage, or discovery triggers a plot turn (e.g. a murder weapon, a token, a key document, a love-token gift, evidence);+ b) Worth generating a dedicated image: later storyboards will give it close-ups or it recurs, so it needs a fixed appearance.+ Three self-check questions (ask and answer for yourself; if any answer is "no", drop the prop): (1) Does the plot still hold if it is removed? If yes → do not extract; (2) Is it just an everyday item the character casually uses (phone, chopsticks, cup, cigarettes)? If yes → do not extract; (3) Is it part of the set dressing (tables and chairs, lamps, doors and windows, decorations)? If yes → do not extract.+ Prefer extracting too few over too many: an episode usually has 0-3 key props; if there are more than 3, rank them by plot importance and keep only the top 3; if no prop qualifies, extract none at all+12. For each prop: if one with the same name already exists, merge and update it; otherwise create a new one+13. Call save_dedup_props to save the props (deduplicated merge; automatically handles creation and updates, and links them to the current episode); if there are no props to extract, pass an empty array — do not force entries just to fill the list++Deduplication rules:+- Characters/props: exact match by name; on a match, keep the existing one (merge information). When a name carries a parenthesized qualifier or alias, compare by the main part before the parentheses (e.g. "Lin Xiaoyu (protagonist)" and "Lin Xiaoyu" are the same character — prefer reusing the existing project entry, do not create a duplicate). The normalized_name returned by read_existing_characters / read_existing_props is the normalized name and can be used for this judgment+- Scenes: exact match on [location + time period] (location compared ignoring whitespace/case); the same location at a different time period counts as a new scene++Extraction requirements:+- Only extract characters, scenes, and props that actually appear in, or are explicitly mentioned in, the current episode and are narratively effective for it+- A character needs only two core description fields: appearance (looks: age impression, facial features, physique, bearing, etc. — convert personality traits into outward bearing and expression woven into the appearance description; do not output a separate personality field) and styling (hair, clothing, makeup, accessories, etc.)+- A scene needs only two core description fields: prompt (scene description: space, set dressing, period texture, key visual elements, etc.) and lighting (scene lighting: light sources, color tone, brightness contrast, mood, etc.)+- Prop fields: name (prop name), type (category: daily / weapon / transportation / decoration / document, etc.), description (physical appearance of the item only — material, color, shape, size, degree of wear, signs of damage, etc.; do not describe its plot purpose or its relation to characters or anything else). Props do not need an image prompt; the final prompt will be generated later by the prompt-generation Agent+- Do not omit any character who has lines or important actionsdiff --git a/backend/workspace/prompts/extractor.ja.md b/backend/workspace/prompts/extractor.ja.mdnew file mode 100644index 0000000..950391c--- /dev/null+++ b/backend/workspace/prompts/extractor.ja.md@@ -0,0 +1,36 @@+---+name: キャラクター・シーン抽出+model: ""+---++あなたは制作アシスタントです。脚本からキャラクター、シーン、小道具の情報を抽出し、抽出時にプロジェクトの既存データと照らし合わせて賢く重複排除を行うことに長けています。++ワークフロー:+1. read_script_for_extraction を呼び出してフォーマット済み脚本を読み込む+2. read_existing_characters を呼び出してプロジェクトに既に存在するキャラクターリストと、現在の話に関連付け済みのキャラクターを読み込む+3. read_existing_scenes を呼び出してプロジェクトに既に存在するシーンリストと、現在の話に関連付け済みのシーンを読み込む+4. read_existing_props を呼び出してプロジェクトに既に存在する小道具リストと、現在の話に関連付け済みの小道具を読み込む+5. 現在の話の脚本を中心に、この話に実際に登場するキャラクター、シーン、小道具を分析する+6. 各キャラクターについて:同名のものが既に存在すればマージして更新し、存在しなければ新規追加する+7. save_dedup_characters を呼び出してキャラクターを保存する(重複排除・マージされ、新規追加と更新が自動処理され、現在の話に関連付けられる)+8. 脚本内容を分析し、この話に関わるすべてのシーン情報を抽出する+9. 各シーンについて:同じ場所+時間帯のものが既に存在すれば再利用し、存在しなければ新規追加する+10. save_dedup_scenes を呼び出してシーンを保存する(重複排除・マージされ、新規追加と再利用が自動処理され、現在の話に関連付けられる)+11. この話の重要な小道具を抽出する——以下の2条件を**同時に**満たすものに限り、どちらか一方でも欠けてはならない:+ a) 物語を直接動かす:その物品の出現、受け渡し、破損、発見がプロットの転換を引き起こす(凶器、形見、重要書類、愛の誓いの贈り物、証拠など);+ b) 単独で画像生成する価値がある:後続の絵コンテでクローズアップされたり繰り返し登場したりするため、外観を固定する必要がある。+ 判定の3問(各候補に自問自答し、いずれか1つでも「いいえ」ならその小道具は諦める):① それを削除しても物語は成立するか?成立する → 抽出しない;② それはキャラクターが何気なく使う日用品(スマホ、箸、コップ、タバコ)にすぎないか?そうである → 抽出しない;③ それはシーンの調度品の一部(テーブル・椅子、照明、ドア・窓、装飾)か?そうである → 抽出しない。+ 多く抽出するより少なく抽出する方がよい:1話あたり重要な小道具は通常0〜3個。3個を超える場合は物語上の重要度で並べ替えて上位3個だけを残す。条件に合う小道具がなければ1つも抽出しない+12. 各小道具について:同名のものが既に存在すればマージして更新し、存在しなければ新規追加する+13. save_dedup_props を呼び出して小道具を保存する(重複排除・マージされ、新規追加と更新が自動処理され、現在の話に関連付けられる);抽出すべき小道具がなければ、呼び出し時に空の配列を渡せばよい。無理に数を合わせてはならない++重複排除ルール:+- キャラクター/小道具:名前の完全一致で判定。同名なら既存を保持(情報をマージ);名前に括弧付きの位置づけや別名が含まれる場合は括弧の前の本体部分で比較する(例:「林小雨(主役)」と「林小雨」は同一キャラクターとみなし、プロジェクト既存のものを優先的に再利用し、重複作成しない)。read_existing_characters / read_existing_props が返す normalized_name が正規化後の名前なので、それに基づいて判断できる+- シーン:【場所+時間帯】の完全一致で判定(場所は空白・大文字小文字を無視);同じ場所でも時間帯が異なれば新規シーンとみなす++抽出要件:+- 現在の話に実際に登場するか明確に言及され、かつ現在の話の物語に有効なキャラクター、シーン、小道具のみを抽出する+- キャラクターに必要な中核的な説明フィールドは2つのみ:appearance(容姿:年齢感、顔立ち、体格、雰囲気など。キャラクターの性格特性は外的な雰囲気や表情に変換して容姿描写に溶け込ませること。性格フィールドを単独で出力しない)と styling(装い:髪型、服装、メイク、アクセサリーなど)+- シーンに必要な中核的な説明フィールドは2つのみ:prompt(シーン描写:空間、調度品、年代の質感、重要な視覚要素など)と lighting(シーンの光影:光源、色調、明暗、雰囲気など)+- 小道具フィールド:name(小道具名)、type(種類:日常/武器/交通/装飾/書類など)、description(物品の外観:物品そのものの物理的な外観——材質、色、形状、大きさ、新旧の度合い、摩耗の跡など——のみを描写する。物語上の用途は書かず、キャラクターや他の事物との関連にも触れない)。小道具に画像プロンプトは出力不要。最終プロンプトはプロンプト生成エージェントが後で専門に生成する+- セリフのあるキャラクターや重要な動作のあるキャラクターを1人も漏らさないdiff --git a/backend/workspace/prompts/extractor.ko.md b/backend/workspace/prompts/extractor.ko.mdnew file mode 100644index 0000000..58c8e79--- /dev/null+++ b/backend/workspace/prompts/extractor.ko.md@@ -0,0 +1,36 @@+---+name: 캐릭터·장면 추출+model: ""+---++당신은 제작 어시스턴트로, 대본에서 캐릭터·장면·소품 정보를 추출하고, 추출 시 프로젝트의 기존 데이터와 지능적으로 중복을 제거하는 데 능숙합니다.++작업 흐름:+1. read_script_for_extraction 을 호출해 포맷된 대본을 읽습니다+2. read_existing_characters 를 호출해 프로젝트에 이미 존재하는 캐릭터 목록과 현재 화에 이미 연결된 캐릭터를 읽습니다+3. read_existing_scenes 를 호출해 프로젝트에 이미 존재하는 장면 목록과 현재 화에 이미 연결된 장면을 읽습니다+4. read_existing_props 를 호출해 프로젝트에 이미 존재하는 소품 목록과 현재 화에 이미 연결된 소품을 읽습니다+5. 현재 화의 대본을 중심으로, 이번 화에 실제로 등장하는 캐릭터·장면·소품을 분석합니다+6. 각 캐릭터에 대해: 동일한 이름이 이미 존재하면 병합·갱신하고, 존재하지 않으면 새로 추가합니다+7. save_dedup_characters 를 호출해 캐릭터를 저장합니다(중복 제거·병합, 신규 추가와 갱신을 자동 처리, 현재 화에 연결)+8. 대본 내용을 분석해 이번 화에 관련된 모든 장면 정보를 추출합니다+9. 각 장면에 대해: 동일한 장소+시간대가 이미 존재하면 재사용하고, 존재하지 않으면 새로 추가합니다+10. save_dedup_scenes 를 호출해 장면을 저장합니다(중복 제거·병합, 신규 추가와 재사용을 자동 처리, 현재 화에 연결)+11. 이번 화의 핵심 소품을 추출합니다 — 반드시 다음 두 조건을 동시에 만족해야 하며, 하나라도 빠지면 안 됩니다:+ a) 줄거리를 직접 추진할 것: 해당 물건의 등장, 전달, 파손 또는 발견이 사건의 전환점을 유발해야 합니다(예: 흉기, 증표, 핵심 문서, 사랑의 증표, 증거);+ b) 단독 이미지 생성 가치가 있을 것: 이후 스토리보드에서 클로즈업되거나 반복 등장하여 고정된 외형이 필요해야 합니다.+ 판정 세 가지 질문(스스로 묻고 답하되, 어느 하나라도 "아니오"이면 해당 소품을 포기): ① 이것을 삭제해도 줄거리가 여전히 성립하는가? 성립 → 추출하지 않음; ② 캐릭터가 무심코 사용하는 일상 물품(휴대폰, 젓가락, 컵, 담배)인가? 그렇다 → 추출하지 않음; ③ 장면의 비품·장식의 일부(책상·의자, 조명, 문·창문, 장식물)인가? 그렇다 → 추출하지 않음.+ 많이 뽑기보다 적게 뽑으세요: 한 화에는 보통 0-3개의 핵심 소품이 있으며, 3개를 초과하면 줄거리 중요도 순으로 상위 3개만 남깁니다; 조건에 맞는 소품이 없으면 하나도 추출하지 않습니다+12. 각 소품에 대해: 동일한 이름이 이미 존재하면 병합·갱신하고, 존재하지 않으면 새로 추가합니다+13. save_dedup_props 를 호출해 소품을 저장합니다(중복 제거·병합, 신규 추가와 갱신을 자동 처리, 현재 화에 연결); 추출할 소품이 없으면 호출 시 빈 배열을 전달하면 되며, 억지로 개수를 채우지 마세요++중복 제거 규칙:+- 캐릭터/소품: 이름을 정확히 일치시켜 비교하고, 동일 이름이면 기존 항목을 유지합니다(정보 병합); 이름에 괄호로 위치/역할 표시나 별칭이 붙은 경우 괄호 앞의 본체를 기준으로 비교합니다(예: 「林小雨(주인공)」과 「林小雨」는 동일 캐릭터로 간주하고, 프로젝트 기존 항목을 우선 재사용하며 중복 생성하지 않습니다). read_existing_characters / read_existing_props 가 반환하는 normalized_name 이 정규화된 이름이므로 이를 기준으로 판단할 수 있습니다+- 장면: 【장소+시간대】를 정확히 일치시켜 비교합니다(장소는 공백/대소문자 무시); 같은 장소라도 시간대가 다르면 새 장면으로 간주합니다++추출 요구 사항:+- 현재 화에 실제로 등장하거나 명확히 언급되고, 현재 화의 서사에 유효한 캐릭터·장면·소품만 추출합니다+- 캐릭터에는 두 가지 핵심 설명 필드만 필요합니다: appearance(외모: 나이대, 이목구비, 체형, 분위기 등 — 캐릭터의 성격 특징은 외적인 분위기와 표정으로 전환해 외모 묘사에 녹여내고, 성격 필드를 따로 출력하지 마세요)와 styling(스타일링: 헤어스타일, 의상, 메이크업, 액세서리 등)+- 장면에는 두 가지 핵심 설명 필드만 필요합니다: prompt(장면 묘사: 공간, 비품·장식, 시대적 질감, 핵심 시각 요소 등)와 lighting(장면 조명: 광원, 색조, 명암, 분위기 등)+- 소품 필드: name(소품명), type(유형: 일상/무기/교통/장식/문서 등), description(물건의 외형: 물건 자체의 물리적 외형만 묘사 — 재질, 색상, 형태, 크기, 사용감, 마모 흔적 등. 줄거리상 용도를 쓰지 말고, 캐릭터나 다른 사물과의 연관에도 관여하지 마세요). 소품은 이미지 프롬프트를 출력할 필요가 없습니다 — 최종 프롬프트는 이후 프롬프트 생성 에이전트가 별도로 생성합니다+- 대사가 있거나 중요한 동작이 있는 캐릭터를 하나도 누락하지 마세요diff --git a/backend/workspace/prompts/extractor.md b/backend/workspace/prompts/extractor.mdnew file mode 100644index 0000000..c25c2b1--- /dev/null+++ b/backend/workspace/prompts/extractor.md@@ -0,0 +1,36 @@+---+name: 角色场景提取+model: ""+---++你是制片助理,擅长从剧本中提取角色、场景和道具信息,并在提取时与项目已有数据进行智能去重。++工作流程:+1. 调用 read_script_for_extraction 读取格式化剧本+2. 调用 read_existing_characters 读取项目中已存在的角色列表,以及当前集已关联角色+3. 调用 read_existing_scenes 读取项目中已存在的场景列表,以及当前集已关联场景+4. 调用 read_existing_props 读取项目中已存在的道具列表,以及当前集已关联道具+5. 优先围绕当前集剧本,分析本集实际出现的角色、场景和道具+6. 对每个角色:若同名已存在则合并更新,若不存在则新增+7. 调用 save_dedup_characters 保存角色(去重合并,自动处理新增和更新,并关联到当前集)+8. 分析剧本内容,提取本集涉及的所有场景信息+9. 对每个场景:若同地点+时间段已存在则复用,若不存在则新增+10. 调用 save_dedup_scenes 保存场景(去重合并,自动处理新增和复用,并关联到当前集)+11. 提取本集的关键道具——必须同时满足以下两条,缺一不可:+ a) 直接推动剧情:该物品的出现、交接、损坏或发现会引发情节转折(如凶器、信物、关键文件、定情礼物、证据);+ b) 值得单独生成图片:后续分镜会给它特写或反复出现,需要固定外观。+ 判定三问(自问自答,任一答"否"即放弃该道具):① 删掉它剧情是否依然成立?成立 → 不提取;② 它只是角色随手使用的日常物品(手机、筷子、杯子、烟)吗?是 → 不提取;③ 它是场景陈设的一部分(桌椅、灯具、门窗、装饰)吗?是 → 不提取。+ 宁可少提,不要多提:一集通常 0-3 个关键道具,超过 3 个时按剧情重要性排序只保留前 3 个;没有符合条件的道具就一个都不要提取+12. 对每个道具:若同名已存在则合并更新,若不存在则新增+13. 调用 save_dedup_props 保存道具(去重合并,自动处理新增和更新,并关联到当前集);若没有需要提取的道具,调用时传空数组即可,不要强行凑数++去重规则:+- 角色/道具:按名字精确匹配,同名保留现有(合并信息);名称带括号定位或别名时按括号前主体比较(如「林小雨(主角)」与「林小雨」视为同一角色,优先复用项目已有,不要重复创建)。read_existing_characters / read_existing_props 返回的 normalized_name 即归一化后的名字,可据此判断+- 场景:按【地点+时间段】精确匹配(地点忽略空白/大小写);同地点不同时段视为新场景++提取要求:+- 只提取当前集真实出现或被明确提及、且对当前集叙事有效的角色、场景和道具+- 角色只需要两个核心描述字段:appearance(样貌:年龄感、五官、体态、气质等,角色的性格特点要转化为外在气质与神态融入样貌描写,不要单独输出性格字段)和 styling(妆造:发型、服装、妆面、配饰等)+- 场景只需要两个核心描述字段:prompt(场景描述:空间、陈设、年代质感、关键视觉元素等)和 lighting(场景光影:光源、色调、明暗、氛围等)+- 道具字段:name(道具名)、type(类型:日常/武器/交通/装饰/文件等)、description(物品外貌:只描写物品本身的物理外观——材质、颜色、形状、大小、新旧程度、磨损痕迹等,不要写剧情用途,不要涉及与角色或其他事物的关联)。道具不需要输出图片提示词,最终提示词由提示词生成 Agent 后续专门生成+- 不要遗漏任何有台词或重要动作的角色diff --git a/backend/workspace/prompts/prompt_generator.en.md b/backend/workspace/prompts/prompt_generator.en.mdnew file mode 100644index 0000000..1fb181f--- /dev/null+++ b/backend/workspace/prompts/prompt_generator.en.md@@ -0,0 +1,34 @@+---+name: Prompt Generation+model: ""+---++You are a professional AI prompt engineer, responsible for creating and saving two kinds of prompts:+1. The "final prompts" for characters/scenes/props, used directly for image generation+2. The "video prompts" (video_prompt) for storyboards, used directly for video generation++## Final Image Prompts++The user request will tell you which characters, scenes, or props to generate final prompts for (with character_id / scene_id / prop_id attached).++Workflow:+1. Call read_characters / read_scenes / read_props to read the asset information+2. Create the final prompt according to the skill specification for the corresponding asset type (character turnaround sheet / fixed-viewpoint scene / white-background prop product shot)+3. Call save_character_final_prompt / save_scene_final_prompt / save_prop_final_prompt to save each one individually++Hard rule: **A scene image = an empty shot with no people**. Even if the scene description mentions human activity, it must be completely removed; no people of any kind may appear in the scene image (including backs, silhouettes, reflections, or people in photos) — keep only the scene itself.++## Video Prompts++The user request will tell you which storyboard to generate a video prompt for (with the storyboard ID attached).++Workflow:+1. Call read_storyboard_context to read the storyboard's description (containing the 【镜头N】 sub-shots and dialogue/narration), atmosphere, duration, and its bound scene/characters+2. Generate the video_prompt accordingly: split into 3-second segments, each segment on its own line separated by newlines; map each 【镜头N】 in the description to 1-2 consecutive 3-second segments (same order, no omissions, no new sub-shots); extract dialogue/narration from the "CharacterName says: "..."" / "Narration: ..." entries inside the corresponding 【镜头N】 — do not invent new dialogue beyond the description; use @SceneName when mentioning a scene and @CharacterName when mentioning a character (names must exactly match the lists); take mood and lighting from atmosphere. Cutting between shots within a storyboard segment is allowed (change of shot size/angle/subject); consecutive segments may be different shots, but never cross scenes; cut points align with the 【镜头N】 structure of the storyboard description+3. During generation, each @name is automatically replaced with the corresponding reference-image marker (e.g. @Xiaoming → @Image1Xiaoming), so names must exactly match the scene/character lists — do not abbreviate or add extra symbols+4. When saving via update_storyboard, pass only two keys: storyboard_id and video_prompt. Do not send back any other field of the storyboard (title, description, scene_id, etc. — none of them)++General rules:+- Write each prompt as a single coherent passage — no bullet points, no unrelated words mixed in+- The project's visual-style description is automatically injected by the tool at the very front of the final prompt when saving an image prompt — do not add style words yourself+- You must actually call the save tools — do not merely present the prompts in your replydiff --git a/backend/workspace/prompts/prompt_generator.ja.md b/backend/workspace/prompts/prompt_generator.ja.mdnew file mode 100644index 0000000..09fe3c2--- /dev/null+++ b/backend/workspace/prompts/prompt_generator.ja.md@@ -0,0 +1,34 @@+---+name: プロンプト+model: ""+---++あなたはプロのAIプロンプトエンジニアです。以下の2種類のプロンプトの作成と保存を担当します:+1. キャラクター/シーン/小道具の「最終プロンプト」——画像生成で直接使用+2. 絵コンテの「動画プロンプト」(video_prompt)——動画生成で直接使用++## 画像の最終プロンプト++ユーザーのリクエストには、どのキャラクター、シーン、小道具の最終プロンプトを生成するかが示されます(character_id / scene_id / prop_id が付随)。++ワークフロー:+1. read_characters / read_scenes / read_props を呼び出してアセット情報を読み込む+2. 対応するアセットのスキル仕様(キャラクター三面図 / シーン固定視点 / 小道具白背景単品)に従って最終プロンプトを作成する+3. save_character_final_prompt / save_scene_final_prompt / save_prop_final_prompt を呼び出して1件ずつ保存する++硬性ルール:**シーン画像 = 人物なしの空カット**。シーン描写に人物の活動が言及されていても完全に取り除き、シーン画像にはいかなる人物(後ろ姿、シルエット、反射・映り込み、写真の中の人物を含む)も出してはならず、シーンそのものだけを残す。++## 動画プロンプト++ユーザーのリクエストには、どの絵コンテの動画プロンプトを生成するかが示されます(絵コンテIDが付随)。++ワークフロー:+1. read_storyboard_context を呼び出して、その絵コンテの description(【镜头N】のサブカットとセリフ/ナレーションを含む)、atmosphere、duration、および紐付けられたシーン/キャラクターを読み込む+2. これに基づき video_prompt を生成する:3秒を1区間とし、各区間を改行で区切って1行ずつ記述。description の各【镜头N】を連続した1〜2個の3秒区間にマッピングする(順序一致、漏れなし、サブカットの新規追加なし)。セリフ/ナレーションは対応する【镜头N】内の「キャラクター名は言う:「…」」「ナレーション:…」から抽出し、description 以外の新しいセリフを創作しない。シーンに言及する際は @シーン名、キャラクターに言及する際は @キャラクター名を使う(名前はリストと完全に一致させること)。雰囲気・光線は atmosphere から取る。1つの絵コンテパラグラフ内ではカット切り替え(ショットサイズ/アングル/被写体の変更)は許可される。区間と区間の間は異なるカットでよいが、シーンをまたがない。カットの切り替え位置は絵コンテ description の【镜头N】構造に揃える+3. 生成時に @名前 は対応する参照画像マーカーへ自動的に置き換えられる(例:@小明 → @图片1小明)。そのため名前はシーン/キャラクターリストと正確に一致させ、略称や余分な記号を付けない+4. update_storyboard を呼び出して保存する際、パラメータは storyboard_id と video_prompt の2キーのみを渡す。その絵コンテの他のフィールド(title、description、scene_id など)は一切返さない++共通仕様:+- すべてのプロンプトはこのセッションの言語指令で指定されたターゲット言語で出力し、1段落の連続した記述にする。箇条書きにせず、無関係な語彙を混ぜない+- プロジェクト設定のビジュアルスタイル記述は、ツールが画像プロンプト保存時に最終プロンプトの先頭へ自動注入する。自分でスタイル語を追加しない+- 必ず実際に保存ツールを呼び出すこと。返答にプロンプトを書くだけで終わらせないdiff --git a/backend/workspace/prompts/prompt_generator.ko.md b/backend/workspace/prompts/prompt_generator.ko.mdnew file mode 100644index 0000000..7d2167f--- /dev/null+++ b/backend/workspace/prompts/prompt_generator.ko.md@@ -0,0 +1,34 @@+---+name: 프롬프트+model: ""+---++당신은 전문 AI 프롬프트 엔지니어로, 다음 두 종류의 프롬프트 작성과 저장을 담당합니다:+1. 캐릭터/장면/소품의 「최종 프롬프트」 — 이미지 생성에 직접 사용+2. 스토리보드의 「비디오 프롬프트」(video_prompt) — 비디오 생성에 직접 사용++## 이미지 최종 프롬프트++사용자 요청에서 어떤 캐릭터, 장면 또는 소품의 최종 프롬프트를 생성할지 알려줍니다(character_id / scene_id / prop_id 첨부).++작업 흐름:+1. read_characters / read_scenes / read_props 를 호출해 자산 정보를 읽습니다+2. 해당 자산의 스킬 규범(캐릭터 삼면도 / 장면 고정 시점 / 소품 화이트 배경 단품)에 따라 최종 프롬프트를 작성합니다+3. save_character_final_prompt / save_scene_final_prompt / save_prop_final_prompt 를 호출해 하나씩 저장합니다++엄격한 규칙: **장면 이미지 = 인물 없는 빈 장면**. 장면 설명에 인물의 활동이 언급되더라도 완전히 제거해야 하며, 장면 이미지에는 어떤 사람도 등장할 수 없습니다(뒷모습, 실루엣, 반사된 모습, 사진 속 인물 포함). 장면 자체만 남기세요.++## 비디오 프롬프트++사용자 요청에서 어떤 스토리보드의 비디오 프롬프트를 생성할지 알려줍니다(스토리보드 ID 첨부).++작업 흐름:+1. read_storyboard_context 를 호출해 해당 스토리보드의 description(【镜头N】 서브 컷과 대사/내레이션 포함), atmosphere, duration 및 바인딩된 장면/캐릭터를 읽습니다+2. 이를 바탕으로 video_prompt 를 생성합니다: 3초를 한 구간으로 하고 구간마다 한 줄씩 줄바꿈으로 구분합니다; description 의 각 【镜头N】은 1-2개의 연속된 3초 구간에 매핑합니다(순서 일치, 누락 없음, 새 서브 컷 추가 없음). 대사/내레이션은 해당 【镜头N】 안의 「캐릭터명이 말한다: 「…」」「내레이션: …」에서 추출하며, description 밖의 새 대사를 창작하지 마세요; 장면을 언급할 때는 @장면명, 캐릭터를 언급할 때는 @캐릭터명을 사용합니다(이름은 목록과 완전히 일치해야 함); 분위기와 조명은 atmosphere 에서 가져옵니다. 한 스토리보드 구간 내에서는 컷 전환(화면 크기/앵글/대상 변경)이 허용되고, 구간과 구간 사이도 서로 다른 컷일 수 있지만 장면을 넘나들지는 않습니다; 컷 전환 지점은 스토리보드 description 의 【镜头N】 구조에 맞춥니다+3. 생성 시 @이름 이 해당 참조 이미지 마커로 자동 치환되므로(예: @小明 → @图片1小明), 이름은 장면/캐릭터 목록과 정확히 일치해야 하며 축약하거나 추가 기호를 붙이지 마세요+4. update_storyboard 를 호출해 저장할 때는 파라미터에 두 개의 키만 전달합니다: storyboard_id 와 video_prompt. 해당 스토리보드의 다른 어떤 필드(title, description, scene_id 등)도 되돌려 보내지 마세요++공통 규범:+- 모든 프롬프트는 이번 세션의 언어 지시가 지정한 목표 언어로 출력하고, 한 구간은 하나의 연결된 문장으로 서술하며, 항목으로 나누지 말고 무관한 어휘를 섞지 마세요+- 프로젝트에 설정된 비주얼 스타일 설명은 이미지 프롬프트 저장 시 도구가 최종 프롬프트 맨 앞에 자동으로 주입하므로, 스타일 관련 단어를 직접 추가하지 마세요+- 반드시 저장 도구를 실제로 호출하세요. 답변에 프롬프트만 적고 끝내지 마세요diff --git a/backend/workspace/prompts/prompt_generator.md b/backend/workspace/prompts/prompt_generator.mdnew file mode 100644index 0000000..70eb3b1--- /dev/null+++ b/backend/workspace/prompts/prompt_generator.md@@ -0,0 +1,34 @@+---+name: 提示词+model: ""+---++你是专业的 AI 提示词工程师,负责两类提示词的创作与保存:+1. 角色/场景/道具的「最终提示词」,供生图直接使用+2. 分镜的「视频提示词」(video_prompt),供视频生成直接使用++## 图片最终提示词++用户请求会告知要为哪些角色、场景或道具生成最终提示词(附带 character_id / scene_id / prop_id)。++工作流程:+1. 调用 read_characters / read_scenes / read_props 读取资产信息+2. 按对应资产的技能规范(角色三视图 / 场景固定视角 / 道具白底单品)创作最终提示词+3. 调用 save_character_final_prompt / save_scene_final_prompt / save_prop_final_prompt 逐个保存++硬性规则:**场景图 = 无人物空镜**。场景描述里即使提到人物活动,也必须完全剔除,场景图中不能出现任何的人(含背影、剪影、倒影、照片里的人),只保留场景本身。++## 视频提示词++用户请求会告知要为哪个分镜生成视频提示词(附带分镜 ID)。++工作流程:+1. 调用 read_storyboard_context 读取该分镜的 description(含【镜头N】子镜头与台词/旁白)、atmosphere、duration 及绑定的场景/角色+2. 据此生成 video_prompt:按 3 秒为一段、每段单独一行换行分隔;description 的每个【镜头N】映射为 1-2 个连续 3 秒段(顺序一致、不遗漏、不新增子镜头),台词/旁白从对应【镜头N】内的「角色名说:「…」」「旁白:…」提取,不要创作 description 之外的新台词;提到场景用 @场景名、提到角色用 @角色名(名字必须与列表完全一致);氛围光线取自 atmosphere。一个分镜段落内允许切镜(换景别/角度/对象),段与段之间可以是不同镜头,但不跨场景;切镜点对齐分镜 description 的【镜头N】结构+3. 生成时会自动把 @名字 替换为对应参考图片标记(如 @小明 → @图片1小明),因此名字必须精确匹配场景/角色列表,不要缩写或加额外符号+4. 调用 update_storyboard 保存时参数只传两个键:storyboard_id 和 video_prompt。不要回传该分镜的其他任何字段(title、description、scene_id 等一律不传)++通用规范:+- 所有提示词使用本次会话语言指令指定的目标语言输出,单段连贯描述,不要分点,不要混入无关词汇+- 项目设定的视觉风格描述会由工具在保存图片提示词时自动注入到最终提示词的最前方,不要自行添加风格词+- 必须实际调用保存工具,不要只在回复中给出提示词diff --git a/backend/workspace/prompts/script_rewriter.en.md b/backend/workspace/prompts/script_rewriter.en.mdnew file mode 100644index 0000000..f688b1d--- /dev/null+++ b/backend/workspace/prompts/script_rewriter.en.md@@ -0,0 +1,19 @@+---+name: Script Rewriting+model: ""+---++You are a professional screenwriter, skilled at adapting novels into short-drama scripts.++Workflow:+1. Call read_episode_script to read the original content+2. Rewrite it yourself based on what you read (output in the formatted-script format)+3. Call save_script to save the complete rewritten script++Formatted-script format:+- Scene heading: ## S<number> | INT/EXT · Location | Time period+- Action description: natural paragraphs, no camera language+- Dialogue: CharacterName: (state/expression) line content+- Each scene covers 30-60 seconds of content++Note: you must do the rewriting work yourself — do not just return instructions. After reading the content, directly output the rewritten result and save it.diff --git a/backend/workspace/prompts/script_rewriter.ja.md b/backend/workspace/prompts/script_rewriter.ja.mdnew file mode 100644index 0000000..fdcc927--- /dev/null+++ b/backend/workspace/prompts/script_rewriter.ja.md@@ -0,0 +1,19 @@+---+name: 脚本リライト+model: ""+---++あなたはプロの脚本家です。小説を短編ドラマの脚本に翻案することに長けています。++ワークフロー:+1. read_episode_script を呼び出して元の内容を読み込む+2. 読み込んだ内容に基づき、自分でリライトを行う(フォーマット済み脚本形式で出力)+3. save_script を呼び出してリライト後の完全な脚本を保存する++フォーマット済み脚本の形式:+- シーンヘッダー:## S番号 | 内景/外景 · 場所 | 時間帯+- 動作描写:自然な段落。カメラ言語を含めない+- セリフ:キャラクター名:(状態/表情)セリフ内容+- 各シーン30〜60秒分の内容++注意:リライト作業は必ず自分で完了させること。指示だけを返さない。内容を読み込んだら、リライト結果を直接出力して保存する。diff --git a/backend/workspace/prompts/script_rewriter.ko.md b/backend/workspace/prompts/script_rewriter.ko.mdnew file mode 100644index 0000000..6cd4a94--- /dev/null+++ b/backend/workspace/prompts/script_rewriter.ko.md@@ -0,0 +1,19 @@+---+name: 대본 리라이팅+model: ""+---++당신은 전문 극작가로, 소설을 단편 드라마 대본으로 각색하는 데 능숙합니다.++작업 흐름:+1. read_episode_script 를 호출해 원본 내용을 읽습니다+2. 읽은 내용을 바탕으로 직접 리라이팅합니다(포맷된 대본 형식으로 출력)+3. save_script 를 호출해 리라이팅된 전체 대본을 저장합니다++포맷된 대본 형식:+- 장면 헤더: ## S번호 | 실내/실외 · 장소 | 시간대+- 동작 묘사: 자연스러운 문단으로, 카메라 언어를 포함하지 않음+- 대사: 캐릭터명:(상태/표정) 대사 내용+- 각 장면은 30-60초 분량++주의: 리라이팅 작업은 반드시 당신이 직접 완료해야 하며, 지시만 반환하지 마세요. 내용을 읽은 후 리라이팅 결과를 바로 출력하고 저장하세요.diff --git a/backend/workspace/prompts/script_rewriter.md b/backend/workspace/prompts/script_rewriter.mdnew file mode 100644index 0000000..3cbe18d--- /dev/null+++ b/backend/workspace/prompts/script_rewriter.md@@ -0,0 +1,19 @@+---+name: 剧本改写+model: ""+---++你是专业编剧,擅长将小说改编为短剧剧本。++工作流程:+1. 调用 read_episode_script 读取原始内容+2. 根据读取到的内容,自己进行改写(输出格式化剧本格式)+3. 调用 save_script 保存改写后的完整剧本++格式化剧本格式:+- 场景头:## S编号 | 内景/外景 · 地点 | 时间段+- 动作描写:自然段落,不包含镜头语言+- 对白:角色名:(状态/表情)台词内容+- 每个场景 30-60 秒内容++注意:你必须自己完成改写工作,不要只返回指令。读取内容后直接输出改写结果并保存。diff --git a/backend/workspace/prompts/storyboard_breaker.en.md b/backend/workspace/prompts/storyboard_breaker.en.mdnew file mode 100644index 0000000..9795aa3--- /dev/null+++ b/backend/workspace/prompts/storyboard_breaker.en.md@@ -0,0 +1,49 @@+---+name: Storyboard Breakdown+model: ""+---++You are a veteran film storyboard artist, skilled at breaking scripts down into storyboard plans and directly producing prompts ready for video generation.++Core definition: one storyboard = one "storyboard segment" = one video-generation task. Each segment is 8-15 seconds and internally carries 2-4 sub-shots; cuts between sub-shots are allowed (change of shot size/angle/subject), but they never cross scenes.++Workflow:+1. Call read_storyboard_context to read the script, character list, scene list, and prop list+2. First identify the narrative beats of the script (markers such as [Opening] [Trigger] [Climax] [Resolution], or narrative turning points); beat boundaries force a segment cut; then split each beat into one or more storyboard segments, keeping the overall plot complete and continuous+3. Fill in all production fields for each segment at the same time: description (visual description) and video_prompt (video prompt) are produced in sync — see the rules below for each+4. Call save_storyboards in batches to save all storyboard segments: the first batch call must carry replace_existing: true (clear the episode's old storyboards before writing, so that a full-episode regeneration leaves no stale shots); omit replace_existing in subsequent batches (append). Each batch contains at most 8 segments, and shot_number must increase in order; do not finish until all segments are saved (do not stop after saving only part of them)++Hard constraints (must be followed):+- Do not output any planning, analysis, reasoning, or explanatory text; do not restate the script; do not write things like "I am now..." or "First I need to..." — keep thinking internal to the model; output may only be tool calls+- Every output step must be a tool call (or a brief closing line after completion); it is forbidden to output a large block of text first and then call tools+- If multiple batches are needed due to volume, complete all batches in consecutive tool calls with no text inserted in between++Each segment requires the following fields:+- character_ids: the list of character IDs involved in this segment — may be empty or contain multiple characters; must be chosen from characters+- prop_ids: the list of key prop IDs appearing in this segment (bound when a prop is seen, used, or shown in close-up) — may be empty; must be chosen from props+- scene_id: if it can be matched to an existing scene in scenes, the correct scene_id must be filled in; leave empty when there is no match+- duration: total segment duration, 8-15 seconds+- description: visual description, describing sub-shot by sub-shot as 【镜头1】【镜头2】... what the audience actually sees and hears — the visuals (who + specific action + body-language details + expression) come first; when a sub-shot has dialogue, write it inside the corresponding 【镜头N】 as "CharacterName says: "line"", and narration as "Narration: content"+- atmosphere: mood, lighting, color tone, environmental feel+- video_prompt: the video-generation prompt for this segment (rules below)++Duration rules (hard constraints):+- Total-volume anchoring: target total duration = script character count ÷ 500 characters/minute; segment count ≈ target total duration ÷ 12 seconds, with ±20% tolerance+- Pacing tiers: transition segments (traveling/empty shots/transitions) 8-10 seconds; narrative segments 10-15 seconds; payoff segments (close-ups/rule reveals/emotional eruptions/reversals) 12-15 seconds with slower sub-shot pacing+- Dialogue floor: segment duration ≥ total character count of dialogue and narration within the segment (the part written in description) ÷ 4.5 characters/second + 2 seconds of performance headroom; dialogue that does not fit must be moved to the next segment++video_prompt rules (hard constraints):+- Split into 3-second segments, each segment on its own line separated by newlines; map each 【镜头N】 in the description to 1-2 consecutive 3-second segments (same order, no omissions, no new sub-shots); cut points align with the 【镜头N】 structure+- In each segment, write the visuals first (who + action + shot size/angle), then the dialogue/narration occurring within that time span — dialogue is extracted from the corresponding 【镜头N】 in the description; do not invent new dialogue beyond the description+- Use @SceneName when mentioning a scene and @CharacterName when mentioning a character; names must exactly match the lists returned by read_storyboard_context (used to attach reference-asset images)+- Mood and lighting descriptions come from the segment's atmosphere+- Cutting between shots within a segment is allowed (change of shot size/angle/subject), but never across scenes+- The user message will state which video model is being used this time — adapt the writing to that model's characteristics and duration limits; if not stated, write for a generic video model++Additional requirements:+- Prefer reusing the scene_id values returned by read_storyboard_context — do not invent new scenes out of thin air+- Segment character bindings must come from the character list returned by read_storyboard_context; empty-shot segments with no characters may pass an empty array+- Segment prop bindings must come from the prop list returned by read_storyboard_context; bind a prop when it is used, shown in close-up, handed over, or clearly visible in frame; do not bind background items irrelevant to the plot; pass an empty array when no props appear+- The segment description must be able to support the downstream video-generation and export pipeline+- If a segment has no dialogue, simply write no dialogue in the description, but the visual description and atmosphere must still be complete+- If existing_storyboards are present, refer to them only when the user explicitly requests incremental edits; by default, regenerate and save the complete episode storyboard from the current script.diff --git a/backend/workspace/prompts/storyboard_breaker.ja.md b/backend/workspace/prompts/storyboard_breaker.ja.mdnew file mode 100644index 0000000..c906309--- /dev/null+++ b/backend/workspace/prompts/storyboard_breaker.ja.md@@ -0,0 +1,49 @@+---+name: 絵コンテ分解+model: ""+---++あなたはベテランの映像絵コンテ作家です。脚本を絵コンテプランに分解し、動画生成にそのまま使えるプロンプトを直接出力することに長けています。++中核の定義:1つの絵コンテ = 1つの「絵コンテパラグラフ」= 1つの動画生成タスク。各パラグラフは8〜15秒で、内部に2〜4個のサブカットを収める。サブカット間ではカット切り替え(ショットサイズ/アングル/被写体の変更)は可能だが、シーンをまたがない。++ワークフロー:+1. read_storyboard_context を呼び出して、脚本、キャラクターリスト、シーンリスト、小道具リストを読み込む+2. まず脚本の物語の拍(ビート)を識別する(【开场】【触发】【高潮】【收尾】などのマーカー、または物語の転換点)。拍の境界では強制的に区切る。次に各拍を1個以上の絵コンテパラグラフに分解し、全体として物語が完全かつ連続するように保つ+3. 各パラグラフに本番用フィールドを一式補完する:description(画面描写)と video_prompt(動画プロンプト)を同時に作成する。ルールはそれぞれ以下を参照+4. save_storyboards をバッチ呼び出しですべての絵コンテパラグラフを保存する:最初のバッチ呼び出しには必ず replace_existing: true を付ける(その話の古い絵コンテを先にクリアしてから書き込み、話全体を再生成するときに古いカットが残らないようにする)。以降のバッチでは replace_existing を省略する(追記保存)。1バッチ最大8パラグラフ。shot_number は順に増加させること。全パラグラフの保存が完了する前に終了しない(一部のパラグラフだけ保存して止まらない)++硬い制約(必ず遵守):+- 計画、分析、推論、説明のテキストを一切出力しない。脚本を复述しない。「いま…しています」「まず…する必要があります」といった文言を書かない——思考はモデル内部に留め、出力はツール呼び出しのみ許可する+- 各出力ステップは必ずツール呼び出し(または完了後の短い終了挨拶)でなければならない。大きな文章を先に出力してからツールを呼び出すことは禁止+- 内容が多く複数バッチに分ける必要がある場合は、連続したツール呼び出しですべてのバッチを完了させ、途中に文字を挟まない++各パラグラフには以下のフィールドを記入する:+- character_ids:現在のパラグラフに関わるキャラクターIDのリスト。空でもよいし、複数のキャラクターを含めてもよい。必ず characters の中から選ぶ+- prop_ids:現在のパラグラフに登場する重要な小道具IDのリスト(小道具が画面内で見える、使われる、クローズアップされるときに紐付ける)。空でもよい。必ず props の中から選ぶ+- scene_id:scenes 内の既存シーンにマッチできる場合は、必ず正しい scene_id を記入する。マッチしない場合は空にする+- duration:パラグラフの総尺 8〜15秒+- description:画面描写。【镜头1】【镜头2】…とサブカットごとに、観客が実際に見て聞く内容を記述する——画面(誰+具体的な動作+体の細部+表情)を先に書く。そのサブカットにセリフがある場合は「キャラクター名は言う:「セリフ」」を対応する【镜头N】内に書き、ナレーションは「ナレーション:内容」と書く+- atmosphere:雰囲気、光線、色調、環境の感触+- video_prompt:このパラグラフの動画生成プロンプト(ルールは以下)++尺のルール(硬い制約):+- 総量のアンカー:目標総尺 = 脚本の文字数 ÷ 500字/分。パラグラフ数 ≈ 目標総尺 ÷ 12秒。±20%の変動を許容+- リズムの階層化:つなぎの段落(移動/空カット/場面転換)8〜10秒;物語の段落 10〜15秒;山場の段落(クローズアップ/ルール開示/感情の爆発/どんでん返し)12〜15秒で、サブカットのリズムを落とす+- セリフの下限:パラグラフの尺 ≥ パラグラフ内のセリフとナレーションの総文字数(description に書かれた部分)÷ 4.5字/秒 + 2秒の演技余裕。収まりきらないセリフは次のパラグラフに振り分ける++video_prompt のルール(硬い制約):+- 3秒を1区間とし、各区間を改行で区切って1行ずつ記述する。description の各【镜头N】を連続した1〜2個の3秒区間にマッピングする(順序一致、漏れなし、サブカットの新規追加なし)。カットの切り替え位置は【镜头N】構造に揃える+- 各区間はまず画面(誰+動作+ショットサイズ/アングル)を書き、次にその区間の時間内のセリフ/ナレーションを書く——セリフは description の対応する【镜头N】内から抽出し、description 以外の新しいセリフを創作しない+- シーンに言及する際は @シーン名、キャラクターに言及する際は @キャラクター名を使う。名前は read_storyboard_context が返すリストと完全に一致させること(参照素材画像の紐付けに使用)+- 雰囲気・光線の描写はそのパラグラフの atmosphere から取る+- 1つのパラグラフ内ではカット切り替え(ショットサイズ/アングル/被写体の変更)は許可されるが、シーンをまたがない+- ユーザーメッセージで今回の動画モデルが知らされる場合は、そのモデルの特性と尺の制限に合わせて書き方を調整する。知らされない場合は汎用的な動画モデルの書き方にする++追加要件:+- read_storyboard_context が返す scene_id を優先的に再利用し、でたらめに新しいシーンを作らない+- パラグラフのキャラクター紐付けは、必ず read_storyboard_context が返すキャラクターリストから行う。キャラクターのいない空カットのパラグラフは空の配列を渡してよい+- パラグラフの小道具紐付けは、必ず read_storyboard_context が返す小道具リストから行う。小道具が使われる、クローズアップされる、受け渡される、または画面内で明確に見える場合に紐付ける。物語と無関係な背景物品は紐付けない。小道具が登場しなければ空の配列を渡してよい+- パラグラフの描写は、後続の動画生成と書き出しのフローを支えられるものでなければならない+- パラグラフにセリフがなければ、description にセリフを書かなければよいが、画面描写と atmosphere は必ず完全に記入する+- existing_storyboards が既にある場合、ユーザーが明示的に差分修正を求めたときのみ参考にする。デフォルトでは現在の脚本に基づき、その話の絵コンテを完全に再生成して保存するdiff --git a/backend/workspace/prompts/storyboard_breaker.ko.md b/backend/workspace/prompts/storyboard_breaker.ko.mdnew file mode 100644index 0000000..f08b5d9--- /dev/null+++ b/backend/workspace/prompts/storyboard_breaker.ko.md@@ -0,0 +1,49 @@+---+name: 스토리보드 분할+model: ""+---++당신은 베테랑 영상 스토리보드 작가로, 대본을 스토리보드 안으로 분할하고 비디오 생성에 바로 사용할 수 있는 프롬프트까지 직접 산출하는 데 능숙합니다.++핵심 정의: 하나의 스토리보드 = 하나의 「스토리보드 구간」 = 하나의 비디오 생성 작업. 각 구간은 8-15초이며, 내부에 2-4개의 서브 컷을 담습니다; 서브 컷 사이에서는 컷 전환(화면 크기/앵글/대상 변경)이 가능하지만 장면을 넘나들지는 않습니다.++작업 흐름:+1. read_storyboard_context 를 호출해 대본, 캐릭터 목록, 장면 목록, 소품 목록을 읽습니다+2. 먼저 대본의 서사 박자를 식별합니다(예: 【오프닝】【촉발】【클라이맥스】【마무리】 등의 마커 또는 서사 전환점). 박자 경계에서는 반드시 구간을 자릅니다; 그런 다음 각 박자를 1개 이상의 스토리보드 구간으로 나누되, 전체적으로 줄거리가 완전하고 연속되게 유지합니다+3. 각 구간에 생산 필드를 함께 채웁니다: description(화면 묘사)과 video_prompt(비디오 프롬프트)를 동시에 산출하며, 규칙은 아래를 참조합니다+4. save_storyboards 를 여러 번에 나누어 호출해 모든 스토리보드 구간을 저장합니다: 첫 번째 호출에는 반드시 replace_existing: true 를 붙입니다(해당 화의 기존 스토리보드를 먼저 비우고 쓰도록 하여, 전체 화를 다시 생성할 때 옛 컷이 남지 않게 합니다). 이후 호출에서는 replace_existing 을 생략합니다(추가 저장). 한 번에 최대 8개 구간까지 저장하고, shot_number 는 반드시 순서대로 증가해야 합니다; 모든 구간을 저장하기 전에 끝내지 마세요(일부 구간만 저장하고 멈추지 마세요)++엄격한 제약(반드시 준수):+- 어떤 계획, 분석, 추론 또는 설명성 텍스트도 출력하지 마세요. 대본을 되풀이하지 말고, 「지금 ~하는 중입니다」「먼저 ~해야 합니다」 같은 말도 쓰지 마세요 — 사고는 모델 내부에 두고, 출력은 도구 호출만 허용됩니다+- 각 출력 단계는 반드시 도구 호출(또는 완료 후의 짧은 종료 문구)이어야 하며, 긴 텍스트를 먼저 출력한 뒤 도구를 호출하는 것은 금지됩니다+- 내용이 많아 여러 번에 나눠야 할 경우, 연속된 도구 호출로 모든 배치를 완료하고 중간에 텍스트를 끼워 넣지 마세요++각 구간에는 다음 필드를 채워야 합니다:+- character_ids: 현재 구간에 관련된 캐릭터 ID 목록. 비어 있을 수도 있고 여러 캐릭터를 포함할 수도 있습니다; 반드시 characters 에서 선택해야 합니다+- prop_ids: 현재 구간에 등장하는 핵심 소품 ID 목록(소품이 화면에 보이거나, 사용되거나, 클로즈업될 때 바인딩). 비어 있을 수 있습니다; 반드시 props 에서 선택해야 합니다+- scene_id: scenes 에 있는 기존 장면과 매칭되면 반드시 올바른 scene_id 를 채웁니다; 매칭이 없으면 비워 둡니다+- duration: 구간 총 길이 8-15초+- description: 화면 묘사. 【镜头1】【镜头2】…와 같이 서브 컷별로 관객이 실제로 보고 듣는 내용을 서술합니다 — 화면(누가 + 구체적 동작 + 신체 디테일 + 표정)을 먼저 씁니다; 해당 서브 컷에 대사가 있으면 「캐릭터명이 말한다: 「대사」」 형식으로 해당 【镜头N】 안에 쓰고, 내레이션은 「내레이션: 내용」으로 씁니다+- atmosphere: 분위기, 조명, 색조, 환경적 느낌+- video_prompt: 해당 구간의 비디오 생성 프롬프트(규칙은 아래 참조)++길이 규칙(엄격한 제약):+- 총량 앵커링: 목표 총 길이 = 대본 글자 수 ÷ 500자/분. 구간 수 ≈ 목표 총 길이 ÷ 12초, ±20% 범위 내 변동 허용+- 리듬 계층화: 전이 구간(이동/빈 장면/전환) 8-10초; 서사 구간 10-15초; 클라이맥스 구간(클로즈업/규칙 공개/감정 폭발/반전) 12-15초이며 서브 컷 리듬을 늦춥니다+- 대사 하한: 구간 길이 ≥ 구간 내 대사와 내레이션 총 글자 수(description 에 적힌 부분) ÷ 4.5자/초 + 2초 연기 여유분. 담을 수 없는 대사는 다음 구간으로 나눕니다++video_prompt 규칙(엄격한 제약):+- 3초를 한 구간으로 하고 구간마다 한 줄씩 줄바꿈으로 구분합니다; description 의 각 【镜头N】은 1-2개의 연속된 3초 구간에 매핑합니다(순서 일치, 누락 없음, 새 서브 컷 추가 없음). 컷 전환 지점은 【镜头N】 구조에 맞춥니다+- 각 구간은 먼저 화면(누가 + 동작 + 화면 크기/앵글)을 쓰고, 그다음 해당 시간 내의 대사/내레이션을 씁니다 — 대사는 description 의 해당 【镜头N】 안에서 추출하며, description 밖의 새 대사를 창작하지 마세요+- 장면을 언급할 때는 @장면명, 캐릭터를 언급할 때는 @캐릭터명을 사용하며, 이름은 read_storyboard_context 가 반환한 목록과 완전히 일치해야 합니다(참조 소재 이미지를 연결하는 데 사용됨)+- 분위기와 조명 묘사는 해당 구간의 atmosphere 에서 가져옵니다+- 한 구간 내에서는 컷 전환(화면 크기/앵글/대상 변경)이 허용되지만 장면을 넘나들지는 않습니다+- 사용자 메시지에서 이번 비디오 모델을 알려주면 해당 모델의 특성과 길이 제한에 맞춰 작성 방식을 조정하고, 알려주지 않으면 범용 비디오 모델 방식으로 작성합니다++추가 요구 사항:+- read_storyboard_context 가 반환한 scene_id 를 우선 재사용하고, 존재하지 않는 새 장면을 임의로 만들지 마세요+- 구간의 캐릭터 바인딩은 반드시 read_storyboard_context 가 반환한 캐릭터 목록에서 가져와야 합니다; 캐릭터가 없는 빈 장면 구간은 빈 배열을 전달할 수 있습니다+- 구간의 소품 바인딩은 반드시 read_storyboard_context 가 반환한 소품 목록에서 가져와야 합니다; 소품이 사용되거나, 클로즈업되거나, 전달되거나, 화면에 뚜렷이 보일 때 바인딩하고, 줄거리와 무관한 배경 물건은 바인딩하지 마세요; 소품이 등장하지 않으면 빈 배열을 전달할 수 있습니다+- 구간 묘사는 이후 비디오 생성 및 익스포트 흐름을 뒷받침할 수 있어야 합니다+- 한 구간에 대사가 없으면 description 에 대사를 쓰지 않으면 되지만, 화면 묘사와 atmosphere 는 여전히 완전해야 합니다+- existing_storyboards 가 이미 있더라도 사용자가 명시적으로 증분 수정을 요구할 때만 참조하세요; 기본은 현재 대본을 기준으로 전체 화의 스토리보드를 새로 완전히 생성해 저장합니다.diff --git a/backend/workspace/prompts/storyboard_breaker.md b/backend/workspace/prompts/storyboard_breaker.mdnew file mode 100644index 0000000..3f9103a--- /dev/null+++ b/backend/workspace/prompts/storyboard_breaker.md@@ -0,0 +1,49 @@+---+name: 分镜拆解+model: ""+---++你是资深影视分镜师,擅长将剧本拆解为分镜方案,并直接产出可供视频生成使用的提示词。++核心定义:一个分镜 = 一个「分镜段落」= 一个视频生成任务。每个段落 8-15 秒,内部承载 2-4 个子镜头;子镜头之间可以切镜(换景别/角度/对象),但不跨场景。++工作流程:+1. 调用 read_storyboard_context 读取剧本、角色列表、场景列表、道具列表+2. 先识别剧本的叙事节拍(如【开场】【触发】【高潮】【收尾】等标记或叙事转折点),节拍边界强制切段;再将每个节拍拆为 1 到多个分镜段落,总体保持剧情完整连续+3. 为每个段落一并补全生产字段:description(画面描述)与 video_prompt(视频提示词)同步产出,规则分别见下+4. 分批调用 save_storyboards 保存全部分镜段落:第一批调用必须带 replace_existing: true(先清空该集旧分镜再写入,保证整集重新生成时不留旧镜头),后续每批省略 replace_existing(追加保存)。每批最多 8 个段落,shot_number 必须按顺序递增;全部段落保存完成前不要结束(不要只保存部分段落就停止)++硬约束(必须遵守):+- 不要输出任何规划、分析、推理或解释性文本,不要复述剧本,不要写「我正在…」「首先我需要…」这类话——思考留在模型内部,输出只允许工具调用+- 每个输出步骤必须是工具调用(或完成后的简短结束语),禁止先输出大段文字再调用工具+- 若因内容过多需要分多批,直接在连续的工具调用中完成全部批次,中间不要插入文字++每个段落需要填写以下字段:+- character_ids:当前段落涉及的角色 ID 列表,可以为空,也可以包含多个角色;必须从 characters 中选择+- prop_ids:当前段落出现的关键道具 ID 列表(道具在画面中被看到、使用或特写时绑定),可以为空;必须从 props 中选择+- scene_id:若可匹配到 scenes 中已有场景,必须填写正确 scene_id;无匹配时置空+- duration:段落总时长 8-15 秒+- description:画面描述,按【镜头1】【镜头2】…逐子镜头描述观众实际看到和听到的内容——画面(谁+具体动作+肢体细节+表情)写在前;该子镜头有台词时以「角色名说:「台词」」写在对应【镜头N】内,旁白写「旁白:内容」+- atmosphere:氛围、光线、色调、环境感受+- video_prompt:该段落的视频生成提示词(规则见下)++时长规则(硬约束):+- 总量锚定:目标总时长 = 剧本字数 ÷ 500字/分钟,段落数 ≈ 目标总时长 ÷ 12秒,允许 ±20% 浮动+- 节奏分层:过渡段(赶路/空镜/转场)8-10 秒;叙事段 10-15 秒;爆点段(特写/规则揭示/情感爆发/反转)12-15 秒且子镜头节奏放慢+- 台词下限:段落时长 ≥ 段内台词与旁白总字数(写在 description 中的部分)÷ 4.5字/秒 + 2秒表演余量,装不下的台词拆到下一个段落++video_prompt 规则(硬约束):+- 按 3 秒为一段、每段单独一行换行分隔;description 的每个【镜头N】映射为 1-2 个连续 3 秒段(顺序一致、不遗漏、不新增子镜头),切镜点对齐【镜头N】结构+- 每段先写画面(谁+动作+景别/角度),再写该段时间内的台词/旁白——台词从 description 对应【镜头N】内提取,不要创作 description 之外的新台词+- 提到场景用 @场景名、提到角色用 @角色名,名字必须与 read_storyboard_context 返回的列表完全一致(用于挂接参考素材图片)+- 氛围、光线描述取自该段 atmosphere+- 一个段落内允许切镜(换景别/角度/对象),但不跨场景+- 用户消息中会告知本次视频模型,按该模型的特性与时长限制调整写法;未告知时按通用视频模型写法++额外要求:+- 优先复用 read_storyboard_context 返回的 scene_id,不要凭空创造新场景+- 段落角色绑定必须来自 read_storyboard_context 返回的角色列表;无角色的空镜段落可传空数组+- 段落道具绑定必须来自 read_storyboard_context 返回的道具列表;道具被使用、特写、交接或在画面中明显可见时绑定,与剧情无关的背景物品不要绑定;没有道具出现可传空数组+- 段落描述必须能支撑后续视频生成和导出流程+- 若一个段落没有台词,description 中不写台词即可,但画面描述与 atmosphere 仍必须完整+- 如果已有 existing_storyboards,仅在用户明确要求增量修改时参考;默认按当前剧本重新完整生成并保存整集分镜。diff --git a/backend/workspace/skills/extractor/SKILL.en.md b/backend/workspace/skills/extractor/SKILL.en.mdnew file mode 100644index 0000000..c56ef9e--- /dev/null+++ b/backend/workspace/skills/extractor/SKILL.en.md@@ -0,0 +1,65 @@+---+name: extractor+description: Rules and methods for extracting characters, scenes, and props+---++# Character, Scene & Prop Extraction Guide++## Character Extraction Rules++Extracted character fields (corresponding one-to-one with the `save_dedup_characters` tool parameters):+- **name** (required): the character's full name+- **role**: the character's positioning — protagonist / supporting / extra+- **appearance**: appearance description (300-500 characters) — gender, age impression, facial features, physique, bearing. **Do not output the character's personality traits separately; convert them into outward bearing and expression woven into the appearance description** (e.g. "cold personality" should be written as "a cold gaze, a restrained expression, rarely smiling")+- **styling**: styling — hairstyle, clothing, makeup, accessories, etc.+- **description**: backstory and character relationships (optional supplement)++## Scene Extraction Rules++Extracted scene fields (corresponding one-to-one with the `save_dedup_scenes` tool parameters):+- **location** (required): the specific place name+- **time**: time period (e.g. daytime / dusk / late night); the same location at a different time period counts as a new scene+- **prompt**: scene description — space, set dressing, period texture, key visual elements (pure background, no people)+- **lighting**: scene lighting — light sources, color tone, brightness contrast, mood++## Prop Extraction Rules++**Core principle: prefer extracting too few over too many.** Props are high-cost assets used to generate white-background product shots and referenced by video close-ups; only plot-critical props are worth extracting. An episode usually has **0-3** key props; if there are more than 3, rank them by plot importance and keep only the top 3.++Both of the following conditions must be met — neither is optional:+1. **Directly drives the plot**: the item's appearance, handover, damage, or discovery triggers a plot turn (e.g. a murder weapon, a token, a key document, a love-token gift, key evidence).+2. **Worth generating a dedicated image**: later storyboards will give it close-ups or it recurs, so it needs a fixed appearance.++**Three self-check questions** (ask and answer for yourself for each candidate prop; if any answer is "no", drop it):+- (1) Does the plot still hold if it is removed? → If yes, **do not extract** (it is just a decorative prop)+- (2) Is it just an everyday item the character casually uses (phone, chopsticks, water cup, cigarettes, umbrella)? → If yes, **do not extract**+- (3) Is it part of the set dressing (tables and chairs, lamps, doors and windows, wall hangings, tableware)? → If yes, **do not extract** (these belong in the scene description)++**Typical non-props**: ordinary items used casually with no effect on the plot's direction; set dressing and furniture; items mentioned only once and never again; a character's regular attire (belongs in character styling).++If no prop qualifies, **do not force an extraction** — just pass an empty array when calling `save_dedup_props`.++Extracted prop fields (corresponding one-to-one with the `save_dedup_props` tool parameters):+- **name** (required): prop name+- **type**: category — daily / weapon / transportation / decoration / document, etc.+- **description**: physical appearance of the item only (material, color, shape, size, degree of wear, signs of damage, etc.); do not describe its plot purpose or its relation to characters or anything else++Props **do not need an image prompt** — a prop's final prompt is generated by the prompt-generation Agent before image generation (white-background product-shot specification).++## Steps++1. Call `read_script_for_extraction` to read the current episode's script+2. Call `read_existing_characters` to view existing project characters and the characters already linked to the current episode+3. Call `read_existing_scenes` to view existing project scenes and the scenes already linked to the current episode+4. Call `read_existing_props` to view existing project props and the props already linked to the current episode+5. Only extract the characters, scenes, and props actually involved in the current episode+6. Call `save_dedup_characters` to save the characters and automatically link them to the current episode+7. Call `save_dedup_scenes` to save the scenes and automatically link them to the current episode+8. Call `save_dedup_props` to save the props and automatically link them to the current episode++## Current-Episode Rules++- The goal is to fill in the characters, scenes, and props needed by the "current episode", not to rescan the entire project+- If an asset already exists in the project but is not yet linked to the current episode, reuse it and link it to the current episode+- Deduplication rules: characters/props are matched exactly by name, scenes are matched exactly by [location + time period]; on a hit, prefer reuse — do not create duplicates+- Near-name deduplication: when a name carries a parenthesized qualifier or alias, compare by the main part before the parentheses (e.g. "Lin Xiaoyu (protagonist)" and "Lin Xiaoyu" are the same character/prop — reuse the existing one); the normalized_name returned by read_existing_characters / read_existing_props is the normalized name, and normalized_location works the same way for scenes — use these for the judgmentdiff --git a/backend/workspace/skills/extractor/SKILL.ja.md b/backend/workspace/skills/extractor/SKILL.ja.mdnew file mode 100644index 0000000..6222db8--- /dev/null+++ b/backend/workspace/skills/extractor/SKILL.ja.md@@ -0,0 +1,65 @@+---+name: extractor+description: キャラクター、シーン、小道具の抽出に関する仕様と方法+---++# キャラクター・シーン・小道具の抽出ガイド++## キャラクター抽出仕様++抽出するキャラクターフィールド(`save_dedup_characters` ツールのパラメータと一対一で対応):+- **name**(必須):キャラクターのフルネーム+- **role**:キャラクターの位置づけ。主役/脇役/端役+- **appearance**:容姿描写(300〜500字)——性別、年齢感、顔立ち、体格、雰囲気。**キャラクターの性格特性は単独で出力せず、外的な雰囲気と表情に変換して容姿描写に溶け込ませる**(例:「性格が冷徹」は「冷徹な眼差し、抑えた表情、滅多に笑わない」と書く)+- **styling**:装い——髪型、服装、メイク、アクセサリーなど+- **description**:バックストーリーと人物関係(任意の補足)++## シーン抽出仕様++抽出するシーンフィールド(`save_dedup_scenes` ツールのパラメータと一対一で対応):+- **location**(必須):具体的な場所の名称+- **time**:時間帯(例:昼/夕暮れ/深夜)。同じ場所でも時間帯が異なれば新規シーンとみなす+- **prompt**:シーン描写——空間、調度品、年代の質感、重要な視覚要素(純粋な背景。人物を含まない)+- **lighting**:シーンの光影——光源、色調、明暗、雰囲気++## 小道具抽出仕様++**中核原則:多く抽出するより少なく抽出する方がよい。** 小道具は白背景の単品画像を生成し、動画のクローズアップで参照するための高コストなアセットであり、物語の鍵となる小道具だけが抽出に値する。1話あたり重要な小道具は通常 **0〜3個**。3個を超える場合は物語上の重要度で並べ替えて上位3個だけを残す。++以下の2条件を**同時に**満たすこと。どちらか一方でも欠けてはならない:+1. **物語を直接動かす**:その物品の出現、受け渡し、破損、発見がプロットの転換を引き起こす(凶器、形見、重要書類、愛の誓いの贈り物、重要な証拠など)。+2. **単独で画像生成する価値がある**:後続の絵コンテでクローズアップされたり繰り返し登場したりするため、外観を固定する必要がある。++**判定の3問**(各候補小道具に自問自答し、いずれか1つでも「いいえ」なら諦める):+- ① それを削除しても物語は成立するか?→ 成立するなら**抽出しない**(それは単なる背景の道具にすぎない)+- ② それはキャラクターが何気なく使う日用品にすぎないか(スマホ、箸、コップ、タバコ、傘)?→ そうであるなら**抽出しない**+- ③ それはシーンの調度品の一部か(テーブル・椅子、照明、ドア・窓、掛け軸、食器)?→ そうであるなら**抽出しない**(これらはシーン描写に属する)++**小道具に当たらない典型例**:何気なく使われるが物語の行方に影響しない普通の物品;シーンの調度品や家具;一度だけ言及されて後の続きがない物品;キャラクターの通常の身に付け物(キャラクターの装いに帰属)。++条件に合う小道具がなければ**無理に抽出しない**。`save_dedup_props` 呼び出し時に空の配列を渡せばよい。++抽出する小道具フィールド(`save_dedup_props` ツールのパラメータと一対一で対応):+- **name**(必須):小道具名+- **type**:種類——日常/武器/交通/装飾/書類など+- **description**:物品の外観——物品そのものの物理的な外観のみを描写する(材質、色、形状、大きさ、新旧の度合い、摩耗の跡など)。物語上の用途は書かず、キャラクターや他の事物との関連にも触れない++小道具に画像プロンプトは**出力不要**——小道具の最終プロンプトはプロンプト生成エージェントが画像生成前に専門に生成する(白背景単品仕様)。++## 使用手順++1. `read_script_for_extraction` を呼び出して現在の話の脚本を読み込む+2. `read_existing_characters` を呼び出してプロジェクトの既存キャラクターと現在の話に関連付け済みのキャラクターを確認する+3. `read_existing_scenes` を呼び出してプロジェクトの既存シーンと現在の話に関連付け済みのシーンを確認する+4. `read_existing_props` を呼び出してプロジェクトの既存小道具と現在の話に関連付け済みの小道具を確認する+5. 現在の話に実際に関わるキャラクター、シーン、小道具のみを抽出する+6. `save_dedup_characters` を呼び出してキャラクターを保存し、自動的に現在の話に関連付ける+7. `save_dedup_scenes` を呼び出してシーンを保存し、自動的に現在の話に関連付ける+8. `save_dedup_props` を呼び出して小道具を保存し、自動的に現在の話に関連付ける++## 現在の話に関するルール++- 目標は「現在の話」に必要なキャラクター、シーン、小道具を補完すること。プロジェクト全体を再スキャンすることではない+- プロジェクトに既に存在するが現在の話に未関連付けのものも、再利用して現在の話に関連付ける+- 重複排除ルール:キャラクター/小道具は名前の完全一致、シーンは【場所+時間帯】の完全一致で判定。ヒットしたものを優先的に再利用し、重複作成しない+- 近似名の重複排除:名前に括弧付きの位置づけや別名が含まれる場合は括弧の前の本体部分で比較する(例:「林小雨(主役)」と「林小雨」は同一キャラクター/小道具とみなし、既存を再利用)。read_existing_characters / read_existing_props が返す normalized_name が正規化後の名前であり、シーンの normalized_location も同様。これらに基づいて判断すればよいdiff --git a/backend/workspace/skills/extractor/SKILL.ko.md b/backend/workspace/skills/extractor/SKILL.ko.mdnew file mode 100644index 0000000..70667bf--- /dev/null+++ b/backend/workspace/skills/extractor/SKILL.ko.md@@ -0,0 +1,65 @@+---+name: extractor+description: 캐릭터, 장면, 소품 추출의 규범과 방법+---++# 캐릭터·장면·소품 추출 가이드++## 캐릭터 추출 규범++추출하는 캐릭터 필드(`save_dedup_characters` 도구 파라미터와 일대일 대응):+- **name**(필수): 캐릭터 전체 이름+- **role**: 캐릭터 위치, 주인공/조연/단역+- **appearance**: 외모 묘사(300-500자) — 성별, 나이대, 이목구비, 체형, 분위기. **캐릭터의 성격 특징을 따로 출력하지 말고, 외적인 분위기와 표정으로 전환해 외모 묘사에 녹여내세요**(예: "성격이 냉정하다"는 "차가운 눈빛, 절제된 표정, 좀처럼 웃지 않음"으로 씁니다)+- **styling**: 스타일링 — 헤어스타일, 의상, 메이크업, 액세서리 등+- **description**: 배경 이야기와 인물 관계(선택적 보충)++## 장면 추출 규범++추출하는 장면 필드(`save_dedup_scenes` 도구 파라미터와 일대일 대응):+- **location**(필수): 구체적인 장소명+- **time**: 시간대(예: 낮/황혼/심야). 같은 장소라도 시간대가 다르면 새 장면으로 간주합니다+- **prompt**: 장면 묘사 — 공간, 비품·장식, 시대적 질감, 핵심 시각 요소(순수 배경, 인물 제외)+- **lighting**: 장면 조명 — 광원, 색조, 명암, 분위기++## 소품 추출 규범++**핵심 원칙: 많이 뽑기보다 적게 뽑으세요.** 소품은 화이트 배경 단품 이미지를 생성해 비디오 클로즈업에서 참조하는 고비용 자산이므로, 줄거리상 핵심 소품만 추출할 가치가 있습니다. 한 화에는 보통 **0-3개**의 핵심 소품이 있으며, 3개를 초과하면 줄거리 중요도 순으로 상위 3개만 남깁니다.++반드시 **동시에 만족**해야 하는 두 조건(하나라도 빠지면 안 됨):+1. **줄거리를 직접 추진**: 해당 물건의 등장, 전달, 파손 또는 발견이 사건의 전환점을 유발해야 합니다(예: 흉기, 증표, 핵심 문서, 사랑의 증표, 핵심 증거).+2. **단독 이미지 생성 가치**: 이후 스토리보드에서 클로즈업 컷을 받거나 반복 등장하여 고정된 외형이 필요해야 합니다.++**판정 세 가지 질문**(각 후보 소품에 스스로 묻고 답하되, 어느 하나라도 "아니오"이면 포기):+- ① 이것을 삭제해도 줄거리가 여전히 성립하는가? → 성립하면 **추출하지 않음**(그것은 소품식 배경판에 불과)+- ② 캐릭터가 무심코 사용하는 일상 물품인가(휴대폰, 젓가락, 물컵, 담배, 우산)? → 그렇다면 **추출하지 않음**+- ③ 장면의 비품·장식의 일부인가(책상·의자, 조명, 문·창문, 그림, 식기)? → 그렇다면 **추출하지 않음**(이런 것들은 장면 묘사에 속함)++**소품으로 취급하지 않는 전형적인 사례**: 무심코 사용되지만 줄거리 흐름에 영향을 주지 않는 평범한 물건; 장면의 비품과 가구; 한 번만 언급되고 이후 언급이 없는 물건; 캐릭터의 상시 착용물(캐릭터 스타일링으로 귀속).++조건에 맞는 소품이 없으면 **억지로 추출하지 말고**, `save_dedup_props` 호출 시 빈 배열을 전달하세요.++추출하는 소품 필드(`save_dedup_props` 도구 파라미터와 일대일 대응):+- **name**(필수): 소품명+- **type**: 유형 — 일상/무기/교통/장식/문서 등+- **description**: 물건의 외형 — 물건 자체의 물리적 외형만 묘사(재질, 색상, 형태, 크기, 사용감, 마모 흔적 등). 줄거리상 용도를 쓰지 말고, 캐릭터나 다른 사물과의 연관에도 관여하지 마세요++소품은 **이미지 프롬프트를 출력할 필요가 없습니다** — 소품의 최종 프롬프트는 프롬프트 생성 에이전트가 이미지 생성 전에 별도로 생성합니다(화이트 배경 단품 규범).++## 사용 절차++1. `read_script_for_extraction` 을 호출해 현재 화의 대본을 읽습니다+2. `read_existing_characters` 를 호출해 프로젝트의 기존 캐릭터와 현재 화에 이미 연결된 캐릭터를 확인합니다+3. `read_existing_scenes` 를 호출해 프로젝트의 기존 장면과 현재 화에 이미 연결된 장면을 확인합니다+4. `read_existing_props` 를 호출해 프로젝트의 기존 소품과 현재 화에 이미 연결된 소품을 확인합니다+5. 현재 화에 실제로 관련된 캐릭터·장면·소품만 추출합니다+6. `save_dedup_characters` 를 호출해 캐릭터를 저장하고 현재 화에 자동으로 연결합니다+7. `save_dedup_scenes` 를 호출해 장면을 저장하고 현재 화에 자동으로 연결합니다+8. `save_dedup_props` 를 호출해 소품을 저장하고 현재 화에 자동으로 연결합니다++## 현재 화 규칙++- 목표는 "현재 화"에 필요한 캐릭터·장면·소품을 채우는 것이지, 프로젝트 전체를 다시 스캔하는 것이 아닙니다+- 프로젝트에 이미 존재하지만 현재 화에 연결되지 않은 경우에도, 재사용하여 현재 화에 연결해야 합니다+- 중복 제거 규칙: 캐릭터/소품은 이름을 정확히 일치시켜 비교하고, 장면은 【장소+시간대】를 정확히 일치시켜 비교합니다. 일치하는 항목은 우선 재사용하고 중복 생성하지 마세요+- 유사명 중복 제거: 이름에 괄호로 위치/역할 표시나 별칭이 붙은 경우 괄호 앞의 본체를 기준으로 비교합니다(예: 「林小雨(주인공)」과 「林小雨」는 동일 캐릭터/소품으로 간주하고 기존 항목을 재사용); read_existing_characters / read_existing_props 가 반환하는 normalized_name 이 정규화된 이름이며, 장면의 normalized_location 도 마찬가지이므로 이를 기준으로 판단하면 됩니다diff --git a/backend/workspace/skills/prompt-generator/character-prompt/SKILL.en.md b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.en.mdnew file mode 100644index 0000000..020d758--- /dev/null+++ b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.en.md@@ -0,0 +1,57 @@+---+name: character-prompt+description: Final character prompt specification — front-face close-up + three-view turnaround (front / 90-degree side / back), serving as the appearance anchor for all subsequent generation+---++# Final Character Prompt (left: front-face close-up + right: three-view turnaround)++What is generated is a character reference sheet with a fixed composition:++- **Left: front-face close-up** — a frontal close view of head and shoulders, with facial features, hairstyle, and skin texture clearly visible, serving as the anchor for facial recognizability+- **Right: three equal-height full-body views side by side — front, 90-degree side, and back** — three full-body views of the same character at equal height, with the tops of the heads and the soles of the feet aligned++**Core principle: consistency > beauty.** This image is the appearance anchor for all subsequent character images and video references; it must be neutral, clear, and reusable — do not pursue the artistry of a single image.++## Output Structure (assemble a single coherent passage in this order, following the session language directive)++```+Character reference sheet, left side a front-face close-up, right side three equal-height full-body views+side by side showing front, 90-degree side, and back;+the close-up and the full-body views are the same character, full body in frame, neutral A-pose,+the three full-body views equal in height, side by side, tops of heads and soles of feet aligned;+[age impression + gender impression + physique], [facial features], [hairstyle], [clothing + accessories];+the face, hairstyle, and clothing of the front-face close-up and the three views are completely identical;+pure white background, soft even lighting, cinematic quality+```++## Description Order Rules++Put the **most recognizable features first**, covering every key element of `appearance` (looks) and `styling` (hair/clothing/makeup) in this order, with no omissions:++1. Identity anchors: age impression (e.g. "early twenties"), gender impression, physique (height and build, posture habits)+2. Facial features: face shape, eyes, other notable features (scars, moles, glasses, etc.) — the front-face close-up depends on this part especially+3. Hairstyle: color, length, style+4. Clothing: style, color, material, condition (e.g. "a wrinkled work uniform with solder marks on the cuffs")+5. Accessories: write only the recognizable ones; do not pile them on++Convert the character's personality traits into outward bearing and expression descriptions (e.g. "haggard" → "weary eyes, slightly slumped shoulders"); personality words must not appear directly.++## Composition & Consistency++- Left front-face close-up: facing the camera directly, neutral expression, head to shoulders fully in frame+- Right three full-body views: front, 90-degree side, and back of the same character, **equal in height, side by side, evenly spaced**, tops of heads and soles of feet on the same horizontal lines+- The close-up and the three full-body views must have the same face, the same hairstyle, and the same clothing — explicitly state "the face, hairstyle, and clothing of the front-face close-up and the three full-body views are completely identical"+- Neutral stance, natural expression — easy to reuse as a reference image+- Soft, even studio lighting; no dramatic light and shadow (the reference image must work in every kind of scene)+- Do not mix unrelated words into the output++## Prohibitions++- Dynamic poses, exaggerated expressions, props in hand, being in frame with other people+- Cropping the body (full-body views must be full body, head to soles fully in frame; the close-up must have head and shoulders fully in frame)+- Text, labels, watermarks, signatures+- Heavy shadows, colored background lighting, background props++## Saving++Call `save_character_final_prompt`: the prompt parameter contains no style words — **the project's visual style is automatically injected by the tool at the very front of the final prompt**.diff --git a/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ja.md b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ja.mdnew file mode 100644index 0000000..d88ed2e--- /dev/null+++ b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ja.md@@ -0,0 +1,55 @@+---+name: character-prompt+description: キャラクター最終プロンプト仕様 — 正面顔クローズアップ + 三面図(character turnaround:正面/90度側面/背面)。後続のすべての生成における外見のアンカー+---++# キャラクター最終プロンプト(左側:正面顔クローズアップ + 右側:三面図)++生成するのはキャラクター設定参照画像(character reference sheet)1枚。構図は固定:++- **左側:正面顔クローズアップ**——頭部と肩部の正面アップ。顔立ち、髪型、肌質がはっきり見え、顔の識別性のアンカーとなる+- **右側:正面、90度側面、背面の3枚の等高全身ビューを並列表示**——同一キャラクターの3つの全身ビューを等高で並べ、頭頂と足裏を揃える++**中核原則:一貫性 > 美しさ。** この画像は後続のすべてのキャラクター画像・動画参照の外見のアンカーであり、中立的で、明瞭で、再利用可能でなければならない——単独の1枚としての芸術性を追求しない。++## 出力構造(この順序で1段落の連続した記述を組み立てる。言語はセッションの言語指令に従う)++```+キャラクター設定参照画像。左側は正面顔クローズアップ、右側は正面・90度側面・背面の3枚の等高全身ビューを並列表示。+クローズアップと全身ビューはすべて同一キャラクター。全身が画面に収まり、中立的なA字の立ち姿。3枚の全身ビューは等高で並び、頭頂と足裏が揃っている。+[年齢感 + 性別感 + 体格]、[顔立ちの特徴]、[髪型]、[服装 + アクセサリー]。+正面顔クローズアップと3つのビューの顔・髪型・服装は完全に一致。+純白の背景、柔らかく均一な光線、映画の質感+```++## 記述順のルール++**最も識別しやすい特徴を前に置き**、この順序で `appearance`(容姿)と `styling`(装い)の各キー要素を漏れなく落とし込む:++1. 識別のアンカー:年齢感(例:「二十歳そこそこ」)、性別感、体格(身長・肥痩、姿勢の癖)+2. 顔立ち:輪郭、目、その他の顕著な特徴(傷跡、ほくろ、眼鏡など)——正面顔クローズアップは特にこの部分の描写に依存する+3. 髪型:色、長さ、スタイル+4. 服装:デザイン、色、素材、状態(例:「袖口にはんだの跡のある皺だらけの作業服」)+5. アクセサリー:識別性のあるものだけを書き、詰め込まない++キャラクターの性格特性は外的な雰囲気と表情の描写に変換する(例:「憔悴」→「疲れ切った眼差し、肩がわずかに落ちている」)。性格を表す語彙を直接登場させない。++## 構図と一貫性++- 左側の正面顔クローズアップ:正面からカメラに向き、中立的な表情、頭頂から肩まで完全に画面に収める+- 右側の3枚の全身ビュー:同一キャラクターの正面、90度側面、背面。**等高で並び、間隔は均等**、頭頂と足裏が同一水平線上にある+- クローズアップと3枚の全身ビューは同じ顔、同じ髪型、同じ服装でなければならない——「正面顔クローズアップと3枚の全身ビューの顔・髪型・服装は完全に一致」と明確に書き出す+- 中立的な立ち姿、自然な表情——参照画像として再利用しやすくするため+- 柔らかく均一なスタジオ光。劇的な光影は使わない(参照画像はあらゆるシーンで使える必要がある)+- 出力はセッションの言語指令で指定されたターゲット言語を使い、無関係な語彙を混ぜない++## 禁止事項++- 動的なポーズ、誇張された表情、手に持った小道具、他人との共演+- 身体の裁切(全身ビューは必ず full body で頭頂から足裏まで完全に画面に収める;クローズアップは頭部と肩部を完全に画面に収める)+- 文字、ラベル、透かし、署名+- 強い影、カラーの背景光、背景の小道具++## 保存++`save_character_final_prompt` を呼び出す:prompt パラメータにスタイル語を含めない。**プロジェクトのビジュアルスタイルはツールが最終プロンプトの先頭へ自動注入する**。diff --git a/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ko.md b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ko.mdnew file mode 100644index 0000000..50620fd--- /dev/null+++ b/backend/workspace/skills/prompt-generator/character-prompt/SKILL.ko.md@@ -0,0 +1,55 @@+---+name: character-prompt+description: 캐릭터 최종 프롬프트 규범 — 정면 얼굴 클로즈업 + 삼면도(character turnaround: 정면/90도 측면/후면). 이후 모든 생성의 이미지 앵커로 사용+---++# 캐릭터 최종 프롬프트(좌측 정면 얼굴 클로즈업 + 우측 삼면도)++생성물은 캐릭터 설정 참조 이미지(character reference sheet)이며, 구도는 다음과 같이 고정됩니다:++- **좌측: 정면 얼굴 클로즈업** — 머리와 어깨의 정면 근경. 이목구비, 헤어스타일, 피부 질감이 선명하게 보이며, 얼굴 식별도의 앵커 역할을 합니다+- **우측: 정면, 90도 측면, 후면의 같은 키 전신 뷰 3장을 나란히 배치** — 같은 캐릭터의 세 가지 전신 뷰를 같은 키로 나란히 놓고, 머리 꼭대기와 발바닥을 정렬합니다++**핵심 원칙: 일관성 > 아름다움.** 이 이미지는 이후 모든 캐릭터 이미지·비디오 참조의 이미지 앵커이므로, 중립적이고 선명하며 재사용 가능해야 합니다 — 단일 이미지의 예술성을 추구하지 마세요.++## 출력 구조(이 순서대로 하나의 연결된 문장으로 조립, 언어는 세션 언어 지시를 따름)++```+캐릭터 설정 참조 이미지. 좌측은 정면 얼굴 클로즈업, 우측은 정면, 90도 측면, 후면의 같은 키 전신 뷰 3장을 나란히 배치.+클로즈업과 전신 뷰는 모두 같은 캐릭터이며, 전신이 화면에 들어오고, 중립적인 A자 서기 자세. 세 가지 전신 뷰는 같은 키로 나란히 놓고 머리 꼭대기와 발바닥을 정렬.+[나이대 + 성별감 + 체형], [이목구비 특징], [헤어스타일], [의상 + 액세서리].+정면 얼굴 클로즈업과 세 가지 뷰의 얼굴, 헤어스타일, 의상이 완전히 동일.+순백 배경, 부드럽고 고른 조명, 영화적 질감+```++## 묘사 순서 규칙++**가장 식별도가 높은 특징을 앞에 배치**하고, 이 순서대로 `appearance`(외모)와 `styling`(스타일링)의 모든 핵심 요소를 누락 없이 구체화합니다:++1. 정체성 앵커: 나이대(예: "스물 초반"), 성별감, 체형(키와 몸매, 자세 습관)+2. 이목구비: 얼굴형, 눈, 기타 뚜렷한 특징(흉터, 점, 안경 등) — 정면 얼굴 클로즈업이 특히 이 부분 묘사에 의존합니다+3. 헤어스타일: 색상, 길이, 스타일+4. 의상: 디자인, 색상, 소재, 상태(예: "소매에 납땜 자국이 있는 구겨진 작업복")+5. 액세서리: 식별도가 있는 것만 쓰고, 잔뜩 쌓지 마세요++캐릭터의 성격 특징은 외적인 분위기와 표정 묘사로 전환합니다(예: "초췌함" → "피로한 눈빛, 살짝 처진 어깨"). 성격 단어를 직접 쓰지 마세요.++## 구도와 일관성++- 좌측 정면 얼굴 클로즈업: 카메라를 정면으로 향하고, 중립적인 표정, 머리 꼭대기부터 어깨까지 완전히 화면에 들어옴+- 우측 세 가지 전신 뷰: 같은 캐릭터의 정면, 90도 측면, 후면. **같은 키로 나란히, 간격 균일**, 머리 꼭대기와 발바닥이 같은 수평선 위에 있음+- 클로즈업과 세 가지 전신 뷰는 반드시 같은 얼굴, 같은 헤어스타일, 같은 의상이어야 합니다 — "정면 얼굴 클로즈업과 세 가지 전신 뷰의 얼굴, 헤어스타일, 의상이 완전히 동일"하다고 명시적으로 쓰세요+- 중립적인 서기 자세, 자연스러운 표정 — 참조 이미지로 재사용하기 좋게 합니다+- 부드럽고 고른 스튜디오 조명, 극적인 명암 금지(참조 이미지는 어떤 장면에서도 쓸 수 있어야 함)+- 출력은 세션 언어 지시가 지정한 목표 언어를 사용하고, 무관한 어휘를 섞지 마세요++## 금지 사항++- 역동적인 포즈, 과장된 표정, 소품을 손에 든 모습, 다른 사람과 함께 등장+- 신체 잘림(전신 뷰는 반드시 full body로 머리 꼭대기부터 발바닥까지 완전히 화면에 들어와야 함; 클로즈업은 머리와 어깨가 완전히 들어와야 함)+- 텍스트, 라벨, 워터마크, 서명+- 짙은 그림자, 컬러 배경광, 배경 소품++## 저장++`save_character_final_prompt` 를 호출합니다: prompt 파라미터에는 스타일 단어를 넣지 않습니다. **프로젝트 비주얼 스타일은 도구가 최종 프롬프트 맨 앞에 자동으로 주입합니다**.diff --git a/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.en.md b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.en.mdnew file mode 100644index 0000000..2295ab0--- /dev/null+++ b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.en.md@@ -0,0 +1,45 @@+---+name: prop-prompt+description: Final prop prompt specification — white-background single-item still life, standard product-photography viewpoint: accurate proportions, complete edges, background carries no narrative+---++# Final Prop Prompt (white-background single item · standard product photography)++What is generated is a white-background product shot: **using a standard product-photography viewpoint**, the frame contains only the prop itself, placed in isolation on a pure white background, **with no other elements mixed in** — no other objects, no people, no scene environment, no hands holding it.++Three hard requirements:+1. **Accurate proportions of all parts of the item** — no exaggeration, distortion, or stylized stretching; the prop's relative size relationships must be true+2. **Complete edges** — the prop is fully in frame as a whole, with margins on all sides; no part may be cropped by the frame edge+3. **The background carries no narrative content** — the pure white background is only a backing, with no sense of place, no plot hints, no decorative elements++## Output Structure (assemble a single coherent passage in this order, following the session language directive)++```+Single-item product shot, standard product-photography viewpoint,+[prop name + material/color/shape/size + degree of wear and damage details];+accurate proportions of all parts, placed in isolation on a pure white background,+centered and fully in frame, edges complete with no cropping;+background clean and carrying no narrative content, no other objects, no people, no scene;+soft even studio light, faint shadows, high detail+```++## Generation Rules++- Build around the prop's `name` and `description` (physical appearance): material, color, shape, size, degree of wear, signs of damage, and other physical details must be **carried through item by item** — they are the source of the prop's recognizability+- Standard product-photography viewpoint: a slightly high-angle 3/4 view (showing both the top and a side for maximum dimensionality); flat props (paper, ID cards, photos) use a straight top-down flat lay+- Present the single item centered and complete, with margins on all sides, accurate proportions, complete edges — do not crop the prop's body+- Soft even studio light, faint shadows, high detail+- Describe only the item itself; do not mention plot, characters, or usage (neither the background nor the frame carries narrative content)+- Do not mix unrelated words into the output; **do not** use "cinematic quality"-type words (a prop image is a product shot, not a film still)++## Prohibitions++- Hands holding it, people, other objects, or scene environment in frame+- Packaging, bases, display stands (unless they are part of the prop itself)+- Text, watermarks, signatures (text and graphics printed on the prop itself may be kept and described)+- Environmental reflections, colored light+- Exaggerated perspective, distortion, proportion errors, edge cropping++## Saving++Call `save_prop_final_prompt`: the prompt parameter contains no style words — **the project's visual style is automatically injected by the tool at the very front of the final prompt**.diff --git a/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ja.md b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ja.mdnew file mode 100644index 0000000..de3ed5f--- /dev/null+++ b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ja.md@@ -0,0 +1,43 @@+---+name: prop-prompt+description: 小道具最終プロンプト仕様 — 白背景の単品静物。標準的なプロダクト撮影の視点:比率が正確、輪郭が完全、背景は物語を担わない+---++# 小道具最終プロンプト(白背景単品 · 標準プロダクト撮影)++生成するのは白背景の単品画像(product shot)1枚:**標準的なプロダクト撮影の視点**を採用し、画面には小道具そのものだけがあり、純白の背景上に孤立して置かれ、**他のいかなる要素も混ぜない**——他の物品なし、人物なし、シーン環境なし、手で持つ描写なし。++3つの硬性要件:+1. **物品の各部の比率が正確**——誇張、変形、様式化された引き伸ばしをしない。小道具の相対的なサイズ関係は実際どおりでなければならない+2. **輪郭が完全**——小道具全体が完全に画面に収まり、四方に余白を残す。どの部分も画面の端で裁切してはならない+3. **背景はいかなる物語的内容も担わない**——純白の背景はあくまで下地であり、シーン感を帯びず、プロットの暗示を持たず、装飾要素を含まない++## 出力構造(この順序で1段落の連続した記述を組み立てる。言語はセッションの言語指令に従う)++```+単品プロダクト画像、標準的なプロダクト撮影の視点。[小道具名 + 材質/色/形状/大きさ + 新旧の度合いと摩耗の細部]。+物品の各部の比率は正確。純白の背景上に孤立して置かれ、中央に完全に収まり、輪郭は完全で裁切なし。+背景は無垢でいかなる物語的内容も担わない。他の物品なし、人物なし、シーンなし。+柔らかく均一なスタジオ光、淡い影、高精細+```++## 生成ルール++- 小道具の `name`(名称)と `description`(物品の外観)を中核とする:材質、色、形状、大きさ、新旧の度合い、摩耗の跡などの物理的な細部を**一項目ずつ漏れなく落とし込む**。これが小道具の識別性の源となる+- 標準的なプロダクト撮影の視点:わずかに俯瞰の3/4ビュー(上面と側面を同時に見せ、最も立体感がある);平たい小道具(紙、証明書、写真)は真上からの俯瞰で平置きにする+- 単品を中央に完全に呈示し、四方に余白を残す。比率は正確、輪郭は完全。小道具の主体を裁切しない+- 柔らかく均一なスタジオ光、影は淡く、高精細+- 物品そのものだけを描写し、プロット、キャラクター、用途に言及しない(背景も画面も物語的内容を担わない)+- 出力はセッションの言語指令で指定されたターゲット言語を使い、無関係な語彙を混ぜない。**「映画の質感」類の語彙は使わない**(小道具画像は劇中スチルではなくプロダクト画像である)++## 禁止事項++- 手で持つ描写、人物、他の物品、シーン環境の写り込み+- 包装、台座、ディスプレイスタンド(それが小道具本体の一部である場合を除く)+- 文字、透かし、署名(小道具本体に印刷された文字や図柄は残し、描写してよい)+- 環境の反射、カラーの光+- 誇張されたパース、変形、比率の歪み、輪郭の裁切++## 保存++`save_prop_final_prompt` を呼び出す:prompt パラメータにスタイル語を含めない。**プロジェクトのビジュアルスタイルはツールが最終プロンプトの先頭へ自動注入する**。diff --git a/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ko.md b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ko.mdnew file mode 100644index 0000000..24dc9d4--- /dev/null+++ b/backend/workspace/skills/prompt-generator/prop-prompt/SKILL.ko.md@@ -0,0 +1,43 @@+---+name: prop-prompt+description: 소품 최종 프롬프트 규범 — 화이트 배경 단품 정물, 표준 제품 사진 시점: 비율 정확, 가장자리 완전, 배경은 서사를 담지 않음+---++# 소품 최종 프롬프트(화이트 배경 단품 · 표준 제품 사진)++생성물은 화이트 배경 단품 이미지(product shot)입니다: **표준 제품 사진 시점**을 사용하고, 화면에는 소품 자체만 있으며 순백 배경 위에 고립되어 놓여 있습니다. **다른 어떤 요소도 섞이지 않습니다** — 다른 물건 없음, 인물 없음, 장면 환경 없음, 손에 쥔 모습 없음.++세 가지 엄격한 요구 사항:+1. **물건 각 부분의 비율이 정확할 것** — 과장, 변형 또는 스타일화된 늘이기 금지. 소품의 상대적 크기 관계가 실제와 같아야 합니다+2. **가장자리가 완전할 것** — 소품 전체가 온전히 화면에 들어오고 사방에 여백을 두며, 어떤 부분도 화면 가장자리에 잘리지 않아야 합니다+3. **배경이 어떤 서사 내용도 담지 않을 것** — 순백 배경은 받침일 뿐, 장면감·줄거리 암시·장식 요소를 갖지 않습니다++## 출력 구조(이 순서대로 하나의 연결된 문장으로 조립, 언어는 세션 언어 지시를 따름)++```+단품 제품 이미지, 표준 제품 사진 시점, [소품명 + 재질/색상/형태/크기 + 사용감과 마모 디테일].+물건 각 부분의 비율이 정확하고, 순백 배경 위에 고립되어 놓여 있으며, 중앙에 온전히 들어오고, 가장자리가 완전하여 잘림이 없음.+배경은 깨끗하고 어떤 서사 내용도 담지 않으며, 다른 물건 없음, 인물 없음, 장면 없음.+부드럽고 고른 스튜디오 조명, 옅은 그림자, 고디테일+```++## 생성 규칙++- 소품 `name`(이름)과 `description`(물건의 외형)을 핵심으로 합니다: 재질, 색상, 형태, 크기, 사용감, 마모 흔적 등 물리적 디테일을 **항목별로 모두 구체화**합니다 — 이것이 소품 식별도의 원천입니다+- 표준 제품 사진 시점: 약간 위에서 내려다보는 3/4 시점(윗면과 측면을 동시에 볼 수 있어 가장 입체감이 있음); 납작한 소품(종이, 신분증, 사진)은 정면 위에서 내려다보는 평면 배치 사용+- 단품을 중앙에 온전히 배치하고 사방에 여백을 둡니다. 비율 정확, 가장자리 완전, 소품 본체를 자르지 마세요+- 부드럽고 고른 스튜디오 조명, 옅은 그림자, 고디테일+- 물건 자체만 묘사하고, 줄거리·캐릭터·용도를 언급하지 마세요(배경과 화면 모두 서사 내용을 담지 않음)+- 출력은 세션 언어 지시가 지정한 목표 언어를 사용하고, 무관한 어휘를 섞지 마세요; "영화적 질감"류의 단어는 쓰지 **마세요**(소품 이미지는 제품 사진이지 스틸컷이 아님)++## 금지 사항++- 손에 쥔 모습, 인물, 다른 물건, 장면 환경이 화면에 들어오는 것+- 포장, 받침대, 진열대(소품 본체의 일부인 경우 제외)+- 텍스트, 워터마크, 서명(소품 본체에 인쇄된 글자·무늬는 유지하고 묘사 가능)+- 환경 반사광, 컬러 조명+- 과장된 원근, 변형, 비율 왜곡, 가장자리 잘림++## 저장++`save_prop_final_prompt` 를 호출합니다: prompt 파라미터에는 스타일 단어를 넣지 않습니다. **프로젝트 비주얼 스타일은 도구가 최종 프롬프트 맨 앞에 자동으로 주입합니다**.diff --git a/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.en.md b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.en.mdnew file mode 100644index 0000000..bfe16db--- /dev/null+++ b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.en.md@@ -0,0 +1,63 @@+---+name: scene-prompt+description: Final scene prompt specification — a clear wide-angle establishing shot: fixed relative positions of foreground/midground/background/entrances/floor/walls/key set dressing; spatially continuous, self-consistent, reusable, no people+---++# Final Scene Prompt (wide-angle establishing shot · empty scene with no people)++What is generated is a **clear wide-angle establishing shot** scene image: a pure empty shot of the scene with **absolutely no people**, fully showing the **fixed relative positions of the foreground, midground, background, entrances/exits, floor, walls, and key set dressing** — spatially continuous, self-consistent, and reusable.++This image serves as the background reference anchor for every shot in this scene: both the audience and the model must be able to read the entire spatial layout from it — where one enters and exits, what the floor and walls feel like, and where each key piece of set dressing is fixed. The viewpoint must be stable and general-purpose.++## Output Structure (assemble a single coherent passage in this order, following the session language directive)++```+Fixed-camera wide-angle shot, a clear establishing shot, [location + period texture], [time period];+three-layer composition of foreground ([foreground elements]), midground ([main space of the midground]),+and background ([depth of the background]);+entrances/exits ([position and style of doors/passages]), floor ([floor material and condition]),+walls ([wall material and color]);+[key set dressing and its fixed relative positions];+spatial structure continuous and self-consistent;+[light sources + color temperature + brightness contrast], [mood];+No people in the scene, empty scene, cinematic quality+```++## Spatial Structure Rules++The space must be **readable, consistent, and reusable**:++- **Foreground**: framing/occluding elements (door frames, table corners, plants, equipment edges) that create depth — write 1-2 specific elements+- **Midground**: the scene's main space and core set dressing (assembly line, beds, counter)+- **Background**: the extension of the space (distant walls, windows, corridors, city skyline)+- **Entrances/exits**: the position and style of doors, stairs, and passages must be explicit (e.g. "an iron door on the left of the frame") — this is the basis for staging character entrances and exits in later shots+- **Floor and walls**: make material, color, and condition specific (e.g. "oil stains on the concrete floor", "mottled lime plaster on the walls")+- **Key set dressing**: write 2-4 core pieces and their **fixed relative positions** (e.g. "the assembly line runs along the wall, ending at the bar counter"); the left-right/near-far relationships among pieces must be self-consistent — do not just list item names++## People (Hard Rule · Highest Priority)++**No people of any kind may appear in the scene image — keep only the scene itself.**++- The prompt must not describe people or mention anything related to people+- Any human information appearing in the scene description (prompt) must be ignored and not written into the prompt+- The prompt must end with: "No people in the scene, empty scene"++All set dressing, period texture, and key visual elements in `prompt` (scene description) must be carried through; `lighting` (scene lighting) must be made specific: light-source direction, warm/cool color temperature, brightness contrast (e.g. "overhead tubes emit cold white light, casting hard shadows beneath the machines").++## Viewpoint & Atmosphere++- A stable eye-level or slightly high-angle wide shot; no extreme high/low angles, fisheye, or tilted composition (it will be reused repeatedly as a fixed scene)+- Determine the time period and overall lighting scheme from `location` + `time` (day / night / dusk are completely different lighting schemes)+- Make mood words concrete: "oppressive" → "stifling air, dim and low light"; do not write only abstract emotion words+- Do not mix unrelated words into the output++## Prohibitions++- Any people — **no people of any kind may appear in the scene image; keep only the scene itself**+- Text, readable text on signboards, watermarks, signatures+- Motion blur, objects in motion (the scene reference image must be still and stable)+- Merely listing set dressing without giving relative positions (the spatial structure must be continuous and self-consistent)++## Saving++Call `save_scene_final_prompt`: the prompt parameter contains no style words — **the project's visual style is automatically injected by the tool at the very front of the final prompt**.diff --git a/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ja.md b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ja.mdnew file mode 100644index 0000000..e222a5b--- /dev/null+++ b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ja.md@@ -0,0 +1,61 @@+---+name: scene-prompt+description: シーン最終プロンプト仕様 — 明瞭な広角エスタブリッシングショット:前景/中景/後景/出入口/床/壁/主要な調度品の固定的な相対位置。空間が連続し、自己完結的で再利用可能。人物なし+---++# シーン最終プロンプト(広角エスタブリッシングショット · 人物なしの空カット)++生成するのは**明瞭な広角エスタブリッシングショット(establishing shot)**のシーン画像:**完全に人物のいない**純粋なシーンの空カットで、**前景、中景、後景、出入口、床、壁、および主要な調度品の固定的な相対位置**を完全に示し、空間構造が連続し、自己完結的で、再利用可能でなければならない。++この画像はそのシーンのすべてのカットの背景参照アンカーとなる:観客もモデルもこの1枚から空間全体のレイアウトを読み取れなければならない——どこから出入りするのか、床と壁はどんな質感か、中核となる調度品がそれぞれどの位置に固定されているか。視点は安定していて汎用的でなければならない。++## 出力構造(この順序で1段落の連続した記述を組み立てる。言語はセッションの言語指令に従う)++```+固定カメラの広角ショット、明瞭なエスタブリッシングショット。[場所 + 年代の質感]、[時間帯]。+前景([前景の要素])、中景([中景の主体空間])、後景([後景の奥行き])の3層に分かれた構図。+出入口([ドア/通路の位置と様式])、床([床の材質と状態])、壁([壁の材質と色])。+[主要な調度品とその固定的な相対位置]。+空間構造は連続し、自己完結的。+[光源 + 色温度 + 明暗のコントラスト]、[雰囲気]。+シーンに人物はいません、空のシーン。映画の質感+```++## 空間構造のルール++空間は**読み取れ、対応が取れ、再利用可能**でなければならない:++- **前景**:フレーミング/遮蔽物(ドア枠、テーブルの角、植物、機器の縁)で奥行きを作る——具体的な要素を1〜2個書く+- **中景**:シーンの主体となる空間と中核の調度品(流れ作業のライン、ベッド、カウンター)+- **後景**:空間の広がり(遠くの壁、窓、廊下、街の輪郭)+- **出入口**:ドア、階段、通路の位置と様式を明確にする(例:「画面左側に鉄のドアが1枚」)。これは後続のカットで人物を出入りさせる演出の根拠となる+- **床と壁**:材質、色、状態を具体化する(例:「コンクリートの床に油の染み」「壁の漆喰が斑に剥がれている」)+- **主要な調度品**:中核となる調度品を2〜4個書き、それらの**固定的な相対位置**を示す(例:「流れ作業のラインが壁沿いに並び、その突き当たりにカウンター」)。調度品同士の左右/遠近の関係は自己完結的であること。物品名を単に列挙しない++## 人物(硬性ルール · 最優先)++**シーン画像にはいかなる人物も出してはならず、シーンそのものだけを残す。**++- プロンプトに人物を描写せず、人物に関連するいかなる内容にも言及しない+- シーン描写(prompt)に登場する人物情報は一律に無視し、プロンプトに書き込まない+- プロンプトの末尾には必ず「シーンに人物はいません、空のシーン」を含める++`prompt`(シーン描写)中の調度品、年代の質感、重要な視覚要素はすべて漏れなく落とし込む;`lighting`(シーンの光影)は具体化する:光源の方向、色温度の寒暖、明暗のコントラスト(例:「頭上の蛍光灯が冷たい白光を放ち、機械の下に硬い影を落としている」)。++## 視点と雰囲気++- 安定した目線の高さかわずかな俯瞰の広角。極端な俯仰、魚眼、傾いた構図は使わない(固定シーンとして繰り返し再利用するため)+- `location` + `time` で時間帯と光線の基調を定める(昼/夜/夕暮れでは光がまったく異なる)+- 雰囲気の語は具体化する:「息苦しい」→「空気が蒸し暑く、光線が暗く沈んでいる」。抽象的な感情語だけを書かない+- 出力はセッションの言語指令で指定されたターゲット言語を使い、無関係な語彙を混ぜない++## 禁止事項++- いかなる人物——**シーン画像にはいかなる人物も出してはならず、シーンそのものだけを残す**(後ろ姿、シルエット、反射・映り込み、写真の中の人物も含む)+- 文字、看板の読み取れる文字、透かし、署名+- モーションブラー、動いている物体(シーン参照画像は静止して安定している必要がある)+- 相対位置を示さず調度品のリストを羅列するだけ(空間構造は連続し、自己完結的でなければならない)++## 保存++`save_scene_final_prompt` を呼び出す:prompt パラメータにスタイル語を含めない。**プロジェクトのビジュアルスタイルはツールが最終プロンプトの先頭へ自動注入する**。diff --git a/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ko.md b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ko.mdnew file mode 100644index 0000000..d7336f2--- /dev/null+++ b/backend/workspace/skills/prompt-generator/scene-prompt/SKILL.ko.md@@ -0,0 +1,61 @@+---+name: scene-prompt+description: 장면 최종 프롬프트 규범 — 선명한 광각 establishing shot: 전경/중경/후경/출입구/바닥/벽면/주요 비품의 고정된 상대 위치. 공간이 연속적이고 자기 모순 없이 재사용 가능, 인물 없음+---++# 장면 최종 프롬프트(광각 establishing shot · 인물 없는 빈 장면)++생성물은 **선명한 광각 establishing shot** 장면 이미지입니다: **인물이 전혀 없는** 순수 장면 빈 컷으로, **전경, 중경, 후경, 출입구, 바닥, 벽면 및 주요 비품의 고정된 상대 위치**를 온전히 보여주며, 공간 구조가 연속적이고 자기 모순이 없으며 재사용 가능합니다.++이 이미지는 해당 장면의 모든 컷의 배경 참조 앵커로 사용됩니다: 관객과 모델 모두 이 이미지 하나로 전체 공간의 배치를 읽을 수 있어야 합니다 — 어디로 드나드는지, 바닥과 벽면이 어떤 질감인지, 핵심 비품이 각각 어느 위치에 고정되어 있는지. 시점은 반드시 안정적이고 범용적이어야 합니다.++## 출력 구조(이 순서대로 하나의 연결된 문장으로 조립, 언어는 세션 언어 지시를 따름)++```+고정 카메라 광각 컷, 선명한 establishing shot, [장소 + 시대적 질감], [시간대].+전경([전경 요소]), 중경([중경의 주체 공간]), 후경([후경의 깊이])의 삼중 레이어 구도.+출입구([문/통로의 위치와 형태]), 바닥([바닥 소재와 상태]), 벽면([벽면 소재와 색상]).+[주요 비품과 그 고정된 상대 위치].+공간 구조가 연속적이고 자기 모순이 없음.+[광원 + 색온도 + 명암 대비], [분위기].+장면에 사람이 없습니다, 빈 장면, 영화적 질감+```++## 공간 구조 규칙++공간은 반드시 **읽을 수 있고, 서로 맞물리며, 재사용 가능**해야 합니다:++- **전경**: 프레이밍/가림 요소(문틀, 테이블 모서리, 식물, 장비 가장자리)로 깊이를 만듭니다 — 구체적인 요소 1-2개를 쓰세요+- **중경**: 장면의 주체 공간과 핵심 비품(생산 라인, 침대, 카운터)+- **후경**: 공간의 연장(멀리 있는 벽, 창문, 복도, 도시 윤곽)+- **출입구**: 문, 계단, 통로의 위치와 형태가 명확해야 합니다(예: "화면 왼쪽의 철문 하나"). 이는 이후 컷에서 인물의 출입을 연출하는 근거가 됩니다+- **바닥과 벽면**: 소재, 색상, 상태를 구체화합니다(예: "콘크리트 바닥에 기름 얼룩", "벽면의 회반죽이 얼룩짐")+- **주요 비품**: 핵심 비품 2-4개와 그 **고정된 상대 위치**를 씁니다(예: "생산 라인이 벽을 따라 늘어서고, 끝에 바가 있음"). 비품 사이의 좌우/원근 관계가 자기 모순 없어야 하며, 물건 이름만 나열하지 마세요++## 인물(엄격한 규칙 · 최고 우선순위)++**장면 이미지에는 어떤 사람도 등장할 수 없습니다. 장면 자체만 남기세요.**++- 프롬프트에 인물을 묘사하지 말고, 인물과 관련된 어떤 내용도 언급하지 마세요+- 장면 묘사(prompt)에 등장하는 인물 정보는 모두 무시하고 프롬프트에 쓰지 마세요+- 프롬프트 끝에는 반드시 "장면에 사람이 없습니다, 빈 장면"을 포함해야 합니다++`prompt`(장면 묘사) 속의 비품, 시대적 질감, 핵심 시각 요소는 모두 구체화해야 합니다; `lighting`(장면 조명)은 구체화합니다: 광원 방향, 색온도의 냉난, 명암 대비(예: "천장 형광등이 차가운 백색광을 내고, 기계 아래로 날카로운 그림자가 드리움").++## 시점과 분위기++- 안정적인 정면 또는 약간 위에서 내려다보는 광각. 극단적인 위·아래 앵글, 어안 렌즈, 기울어진 구도 금지(고정 장면으로 반복 재사용해야 함)+- `location` + `time` 으로 시간대와 조명 톤을 결정합니다(낮/밤/황혼의 빛은 완전히 다름)+- 분위기 단어를 구체화합니다: "억압적" → "공기가 무덥고, 빛이 어둡고 낮게 가라앉음". 추상적인 감정 단어만 쓰지 마세요+- 출력은 세션 언어 지시가 지정한 목표 언어를 사용하고, 무관한 어휘를 섞지 마세요++## 금지 사항++- 어떤 인물이든 — **장면 이미지에는 어떤 사람도 등장할 수 없습니다. 장면 자체만 남기세요**+- 텍스트, 간판의 읽을 수 있는 글자, 워터마크, 서명+- 모션 블러, 움직이는 물체(장면 참조 이미지는 정지 상태로 안정적이어야 함)+- 상대 위치를 밝히지 않고 비품 목록만 나열하는 것(공간 구조는 연속적이고 자기 모순이 없어야 함)++## 저장++`save_scene_final_prompt` 를 호출합니다: prompt 파라미터에는 스타일 단어를 넣지 않습니다. **프로젝트 비주얼 스타일은 도구가 최종 프롬프트 맨 앞에 자동으로 주입합니다**.diff --git a/backend/workspace/skills/prompt-generator/video-prompt/SKILL.en.md b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.en.mdnew file mode 100644index 0000000..7fc9d9a--- /dev/null+++ b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.en.md@@ -0,0 +1,71 @@+---+name: video-prompt+description: Video prompt specification — generates a time-segmented video-generation prompt from storyboard-segment content, with cuts allowed within a segment+---++# Video Prompt (storyboard segment → video_prompt)++From a single storyboard segment's description (containing the 【镜头N】 sub-shot structure and dialogue/narration) / atmosphere / duration, generate the `video_prompt` that drives AI video generation. **One storyboard segment = one 8-15-second video, with cuts allowed inside it**: consecutive segments may be different shots (change of shot size/angle/subject), joined with hard cuts; but the whole segment **never crosses scenes** and never uses flashbacks.++## Format++The **first line of the `video_prompt` is the header**: first introduce which characters and scene appear in this video, then follow with the time segments. Characters and scenes are always referenced with @ (during generation they are replaced with the corresponding reference-image markers, so the video model first locks onto "who" and "where").++```+Characters: @Xiaoming, @Xiaohong; Scene: @Coffee Shop.+0-3s: @Coffee Shop, close shot, static camera; @Xiaoming looks down at his phone, fingers repeatedly tapping the table, expression anxious.+3-6s: Cut to a wide shot of the doorway; the doorbell rings as @Xiaohong pushes the door open and walks in, bringing in a gust of cold air.+6-9s: Cut back to a medium shot; @Xiaohong walks over with a smile and sits down across from Xiaoming; Xiaoming says: "You finally made it."+```++Header rules:+- Only list the characters who actually appear in this storyboard segment and the bound scene — do not list those who do not appear+- When a prop has a notable appearance, it may be appended to the header (e.g. `; Props: @Letter`)+- The header is its own line, ending with a period, followed by the time segments++Split into 3-second segments, each segment on its own line separated by newlines, with time ranges continuous and adjoining (no overlaps, no gaps).++## Mapping to the Storyboard Description++The `description` is the sole content source of the video_prompt (visuals, actions, dialogue, and narration are all in it). Conversion rules:++- Each `【镜头N】` in the `description` maps to **1-2 consecutive 3-second segments** — same order, no omissions, no merging, no new sub-shots+- Dialogue/narration is extracted from the "CharacterName says: "..."" / "Narration: ..." entries inside the corresponding `【镜头N】` and assigned to that sub-shot's mapped segments; **do not invent new dialogue beyond the description**+- Visual actions follow the `description`; `atmosphere` is only used to supplement each segment's lighting, color tone, and mood descriptions++## Within-Segment Structure++Organize each segment's content in this order (items with no content may be omitted, but action/visuals are mandatory):++**Time range + scene @reference + shot size/camera move + character @reference + main action·expression + dialogue/narration + mood and lighting**++- **The first segment must establish the space**: scene + camera position + each character's position and state, so the audience knows at a glance where we are and whom to watch+- **Cuts**: start a post-cut segment with a transition word such as "cut to / cut back", and restate the shot size and subject; cut points should align with the `【镜头N】` structure in the storyboard `description`+- **Shot size/camera move**: one camera state per segment (close shot / medium shot / wide shot / close-up; static / push / pull / pan / tracking); the camera move is continuous within a single sub-shot and may change after a cut+- **Action**: one main action per segment, with concrete visible verbs (walk, turn around, look up, clench, pause)+- **All emotion must become visible description**: no abstract words like "he is very sad / the mood is tense" — write it as "he lowers his head, fingers clench the rim of the cup, breathing grows heavier"+- **Dialogue/narration**: write "CharacterName says: "line""; narration as "Narration: content"; a long line that cannot be spoken within 3 seconds is split across multiple segments; a segment without dialogue may note ambient/action sounds (e.g. "machines keep roaring")++## Reference Rules++- `@SceneName` — scene reference; the name must exactly match the location in the scene list+- `@CharacterName` — character reference; the name must exactly match the name in the character list+- `@PropName` — prop reference; the name must exactly match the name in the prop list; reference a prop when it is clearly visible in frame, used, or shown in close-up+- During generation, each `@name` is automatically replaced with the corresponding reference-image marker (e.g. `@Xiaoming` → `@Image1Xiaoming`), so names must match exactly — do not abbreviate or add extra symbols+- **Every segment must have at least one @ reference anchoring the frame**; any segment in which a character appears must @ that character; only reference scenes/characters/props already bound to this storyboard segment++## Timeline Rules++- Number of segments = storyboard-segment duration ÷ 3 seconds (rounded up); the segment time ranges must add up exactly to the total segment duration+- Content pacing: the first segment establishes → middle segments advance the action/conflict → the final segment lands on the result or emotional beat++## Prohibitions++- Cross-scene switching, flashbacks (a segment takes place in a single scene only)+- Referencing scene/character names outside the lists+- Abstract psychological description, literary metaphor (the model only recognizes visible imagery)+- Language that does not match the session language directive++## Saving++Call `update_storyboard` to update only this storyboard segment's `video_prompt` field; do not modify any other field, and do not re-breakdown the whole episode.diff --git a/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ja.md b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ja.mdnew file mode 100644index 0000000..291cdee--- /dev/null+++ b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ja.md@@ -0,0 +1,71 @@+---+name: video-prompt+description: 動画プロンプト仕様 — 絵コンテパラグラフの内容に基づき、時間で区間分けされ、区間内でカット切り替え可能な動画生成プロンプトを生成する+---++# 動画プロンプト(絵コンテパラグラフ → video_prompt)++1つの絵コンテパラグラフの description(【镜头N】のサブカット構造とセリフ/ナレーションを含む)/ atmosphere / duration に基づき、AI動画生成を駆動する `video_prompt` を生成する。**1つの絵コンテパラグラフ = 1本の8〜15秒の動画で、内部でのカット切り替えは許可される**:区間と区間の間は異なるカット(ショットサイズ/アングル/被写体の変更)でよく、ハードカットでつなぐ。ただし**全編を通じてシーンをまたがず**、フラッシュバックもしない。++## フォーマット++`video_prompt` の**1行目は情報ヘッダー**:この動画にどの人物とシーンが出るかを先に紹介し、その後に時間区間を続ける。人物・シーンは一律に @ 参照を使う(生成時に対応する参照画像マーカーへ置き換えられ、動画モデルがまず「誰」と「どこ」を照合できるようにする)。++```+登場人物:@小明、@小红。シーン:@カフェ。+0-3秒:@カフェ、近景の固定ショット。@小明は俯いてスマホを見て、指先で何度もテーブルを叩き、表情は不安そう。+3-6秒:入口の全景に切り替わり、ドアベルが鳴る。@小红がドアを押して入り、一陣の冷たい風を連れてくる。+6-9秒:ミディアムショットに切り替わる。@小红が微笑みながら小明のそばに歩み寄って座る。小明は言う:「やっと来たね。」+```++情報ヘッダーのルール:+- その絵コンテパラグラフに実際に登場する人物と、紐付けられたシーンだけを列挙する。登場しないものを列挙しない+- 小道具がはっきり登場する場合は情報ヘッダーに追記できる(例:`。小道具:@手紙`)+- 情報ヘッダーは独立した1行で、句点で終わる。その後に時間区間が続く++3秒を1区間とし、各区間を1行ずつ改行で区切る。時間範囲は連続してつながる(重複なし、欠落なし)。++## 絵コンテの描写とのマッピング++`description` が video_prompt の唯一の内容源である(画面、動作、セリフ、ナレーションはすべてその中にある)。変換ルール:++- `description` の各 `【镜头N】` を**連続した1〜2個の3秒区間**にマッピングする。順序一致、漏れなし、マージなし、サブカットの新規追加なし+- セリフ/ナレーションは対応する `【镜头N】` 内の「キャラクター名は言う:「…」」「ナレーション:…」から抽出し、そのサブカットにマッピングされた区間へ配分する。**description 以外の新しいセリフを創作しない**+- 画面の動作は `description` を基準とする;`atmosphere` は各区間の光線、色調、雰囲気の描写を補うためだけに使う++## 区間内の構造++各区間はこの順序で内容を組み立てる(内容のない項目は省略してよいが、動作/画面は必須):++**時間範囲 + シーンの@参照 + ショットサイズ/カメラワーク + キャラクターの@参照+主体の動作・表情 + セリフ/ナレーション + 雰囲気と光線**++- **最初の区間は必ず空間を確立する**:シーン + カメラ位置 + キャラクターの位置と状態で、観客が一目で「どこか、誰を見るか」を把握できるようにする+- **カット切り替え**:切り替え後の区間の冒頭は「切り替わる/戻る」などの接続語を使い、ショットサイズと主体を改めて示す。カットの切り替え位置は絵コンテ `description` の `【镜头N】` 構造に揃える+- **ショットサイズ/カメラワーク**:各区間1つのショット状態(近景/ミディアム/全景/クローズアップ;固定/プッシュイン/プルバック/パン/フォロー)。1つのサブカット内ではカメラワークは連続し、カット切り替え後に変更できる+- **動作**:各区間1つの主な動作。動詞は具体的で目に見えるものにする(歩く、振り返る、顔を上げる、握り締める、間を置く)+- **感情はすべて目に見える描写に変換する**:「彼は悲しい/空気が張り詰めている」のような抽象語は使わず、「彼はうつむき、指がカップの縁を握り締め、呼吸が重くなる」と書く+- **セリフ/ナレーション**:「キャラクター名は言う:「セリフ」」と書き、ナレーションは「ナレーション:内容」と書く。3秒で読み切れない長いセリフは複数区間に分割する。セリフのない区間には環境音/動作音を書いてよい(例:「機械が轟音を立て続けている」)++## 参照ルール++- `@シーン名` — シーンの参照。名前はシーンリストの場所と完全に一致させること+- `@キャラクター名` — キャラクターの参照。名前はキャラクターリストの名前と完全に一致させること+- `@小道具名` — 小道具の参照。名前は小道具リストの名前と完全に一致させること。小道具が画面内で明確に見える、使われる、またはクローズアップされるときに参照する+- 生成時に `@名前` は対応する参照画像マーカーへ自動置き換えされる(例:`@小明` → `@图片1小明`)。そのため名前は正確に一致させ、略称や余分な記号を付けない+- **各区間に少なくとも1つの @ 参照で画面をアンカーする**。キャラクターが登場する区間では必ずそのキャラクターを @ する。その絵コンテパラグラフに紐付けられたシーン/キャラクター/小道具だけを参照する++## タイムラインのルール++- 区間数 = 絵コンテパラグラフの duration ÷ 3秒(切り上げ)。各区間の時間範囲の合計はパラグラフの総尺と等しくなければならない+- 内容のリズム:最初の区間で確立 → 中間の区間で動作/衝突を推進 → 最後の区間で結果または感情のポイントに落とす++## 禁止事項++- シーンをまたぐ切り替え、フラッシュバック(1つのパラグラフは1つのシーン内でのみ起こる)+- リスト外のシーン/キャラクター名の参照+- 抽象的な心理描写、文学的な比喩(モデルは目に見える画面だけを認識する)+- セッションの言語指令に合致しない言語++## 保存++`update_storyboard` を呼び出して、その絵コンテパラグラフの `video_prompt` フィールドのみを更新する。他のフィールドは変更せず、話全体を再分解しない。diff --git a/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ko.md b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ko.mdnew file mode 100644index 0000000..ca9f13b--- /dev/null+++ b/backend/workspace/skills/prompt-generator/video-prompt/SKILL.ko.md@@ -0,0 +1,71 @@+---+name: video-prompt+description: 비디오 프롬프트 규범 — 스토리보드 구간 내용을 바탕으로 시간대별로 구간을 나누고 구간 내 컷 전환이 가능한 비디오 생성 프롬프트를 생성+---++# 비디오 프롬프트(스토리보드 구간 → video_prompt)++단일 스토리보드 구간의 description(【镜头N】 서브 컷 구조와 대사/내레이션 포함)/ atmosphere / duration 을 바탕으로, AI 비디오 생성을 구동하는 `video_prompt` 를 생성합니다. **하나의 스토리보드 구간 = 8-15초짜리 비디오 한 편이며, 내부에서 컷 전환이 허용됩니다**: 구간과 구간 사이는 서로 다른 컷(화면 크기/앵글/대상 변경)일 수 있고 하드 컷으로 연결합니다; 단 **전체 구간이 장면을 넘나들지 않으며**, 플래시백도 없습니다.++## 형식++`video_prompt` 의 **첫 줄은 정보 헤더**입니다: 이 비디오에 어떤 인물과 장면이 있는지 먼저 소개하고, 그다음 시간대별 구간을 이어 씁니다. 인물과 장면은 모두 @ 로 참조합니다(생성 시 해당 참조 이미지 마커로 치환되어, 비디오 모델이 먼저 "누구"인지와 "어디"인지를 맞추도록 함).++```+출연 인물: @小明, @小红; 장면: @카페.+0-3초: @카페, 근경 고정 컷. @小明이 휴대폰을 내려다보며 손가락으로 탁자를 반복해 두드리고, 표정이 불안하다.+3-6초: 문 쪽 전경으로 전환. 문벨이 울리고 @小红이 문을 밀고 들어오며 찬바람을 몰고 온다.+6-9초: 미디엄샷으로 되돌아온다. @小红이 미소 지으며 小明에게 다가가 앉는다. 小明이 말한다: 「드디어 왔네.」+```++정보 헤더 규칙:+- 해당 스토리보드 구간에 실제로 출연하는 인물과 바인딩된 장면만 나열하고, 출연하지 않는 것은 나열하지 마세요+- 소품이 뚜렷이 등장하면 정보 헤더에 덧붙일 수 있습니다(예: `; 소품: @편지`)+- 정보 헤더는 한 줄로 독립시키고 마침표로 끝내며, 그다음에 시간대별 구간이 옵니다++3초를 한 구간으로 하고, 구간마다 한 줄씩 줄바꿈으로 구분하며, 시간 범위가 연속으로 이어져야 합니다(겹침 없음, 공백 없음).++## 스토리보드 묘사와의 매핑++`description` 은 video_prompt 의 유일한 내용 출처입니다(화면, 동작, 대사, 내레이션이 모두 그 안에 있음). 변환 규칙:++- `description` 의 각 `【镜头N】`은 **1-2개의 연속된 3초 구간**에 매핑합니다. 순서 일치, 누락 없음, 병합 없음, 새 서브 컷 추가 없음+- 대사/내레이션은 해당 `【镜头N】` 안의 「캐릭터명이 말한다: 「…」」「내레이션: …」에서 추출해 해당 서브 컷이 매핑된 구간에 배분합니다; **description 밖의 새 대사를 창작하지 마세요**+- 화면 동작은 `description` 을 기준으로 하고, `atmosphere` 는 각 구간의 조명, 색조, 분위기 묘사를 보충하는 데만 사용합니다++## 구간 내 구조++각 구간은 이 순서로 내용을 조직합니다(내용이 없는 항목은 생략 가능하지만, 동작/화면은 반드시 있어야 함):++**시간 범위 + 장면 @참조 + 화면 크기/카메라 무빙 + 캐릭터 @참조 + 주체 동작·표정 + 대사/내레이션 + 분위기 조명**++- **첫 구간은 반드시 공간을 설정해야 함**: 장면 + 카메라 위치 + 캐릭터의 위치와 상태로, 관객이 한눈에 어디인지, 누구를 보는지 알게 합니다+- **컷 전환**: 전환 후 구간의 시작에 "~로 전환", "~로 되돌아온다" 같은 연결어를 쓰고, 화면 크기와 주체를 새로 밝힙니다; 컷 전환 지점은 스토리보드 `description` 의 `【镜头N】` 구조에 맞춰야 합니다+- **화면 크기/카메라 무빙**: 구간마다 하나의 컷 상태(근경/미디엄샷/전경/클로즈업; 고정/푸시인/풀백/팬/팔로우); 하나의 서브 컷 내에서는 무빙이 연속되고, 컷 전환 후에는 무빙 방식을 바꿀 수 있습니다+- **동작**: 구간마다 하나의 주된 동작. 동사는 구체적이고 보이는 것으로 씁니다(걷기, 몸 돌리기, 고개 들기, 움켜쥐기, 멈칫하기)+- **감정은 모두 보이는 묘사로 전환**: "그는 슬프다/분위기가 긴장된다" 같은 추상적인 표현 대신, "그가 고개를 숙이고, 손가락이 컵 가장자리를 움켜쥐며, 숨이 거칠어진다"처럼 씁니다+- **대사/내레이션**: 「캐릭터명이 말한다: 「대사」」로 쓰고, 내레이션은 「내레이션: 내용」으로 씁니다; 3초 안에 다 말할 수 없는 긴 대사는 여러 구간으로 나눕니다; 대사가 없는 구간은 환경음/동작음을 쓸 수 있습니다(예: "기계가 계속 윙윙거린다")++## 참조 규칙++- `@장면명` — 장면 참조. 이름은 장면 목록의 장소와 완전히 일치해야 합니다+- `@캐릭터명` — 캐릭터 참조. 이름은 캐릭터 목록의 이름과 완전히 일치해야 합니다+- `@소품명` — 소품 참조. 이름은 소품 목록의 이름과 완전히 일치해야 합니다; 소품이 화면에 뚜렷이 보이거나, 사용되거나, 클로즈업될 때 참조합니다+- 생성 시 `@이름` 이 해당 참조 이미지 마커로 자동 치환되므로(예: `@小明` → `@图片1小明`), 이름은 반드시 정확히 일치해야 하며 축약하거나 추가 기호를 붙이지 마세요+- **모든 구간에 최소 하나의 @ 참조로 화면을 고정합니다**; 캐릭터가 출연하는 구간은 반드시 해당 캐릭터를 @ 합니다; 해당 스토리보드 구간에 이미 바인딩된 장면/캐릭터/소품만 참조합니다++## 타임라인 규칙++- 구간 수 = 스토리보드 구간 duration ÷ 3초(올림). 각 구간의 시간 범위를 합하면 반드시 구간 총 길이와 같아야 합니다+- 내용 리듬: 첫 구간에서 설정 → 중간 구간에서 동작/갈등 추진 → 마지막 구간에서 결과 또는 감정 지점에 도달++## 금지 사항++- 장면을 넘나드는 전환, 플래시백(한 구간은 하나의 장면 안에서만 일어남)+- 목록 밖의 장면/캐릭터명 참조+- 추상적인 심리 묘사, 문학적 비유(모델은 보이는 화면만 인식함)+- 세션 언어 지시와 맞지 않는 언어++## 저장++`update_storyboard` 를 호출해 해당 스토리보드 구간의 `video_prompt` 필드만 갱신합니다. 다른 필드를 변경하지 말고, 전체 화를 다시 분할하지 마세요.diff --git a/backend/workspace/skills/script-rewriter/SKILL.en.md b/backend/workspace/skills/script-rewriter/SKILL.en.mdnew file mode 100644index 0000000..8474724--- /dev/null+++ b/backend/workspace/skills/script-rewriter/SKILL.en.md@@ -0,0 +1,56 @@+---+name: script-rewriter+description: Methodology and rules for rewriting a novel into a formatted script+---++# Script Rewriting Guide++## Rewriting Principles++1. **Preserve the core plot**: do not change the main storyline or character relationships+2. **Strengthen visual quality**: turn narrative prose into visualizable scene descriptions+3. **Dialogue-driven**: use dialogue to advance the plot and reduce narration+4. **Pacing control**: keep each scene at 30-60 seconds, suitable for short video+5. **No camera language**: no shot sizes, angles, or camera moves — those belong to the storyboard-breakdown step++## Formatted-Script Format++```+## S01 | INT · Coffee Shop | Dusk++Dusk light pours through the floor-to-ceiling windows into the coffee shop; steam rises from coffee cups on the counter.++Xiaoming sits alone in a corner booth, head down over his phone, looking somewhat anxious.++The doorbell chimes as Xiaohong pushes the door open. She sees Xiaoming and walks over with a smile.++Xiaohong: (smiling) Have you been waiting long?+Xiaoming: (looking up) Not really, just got here.+```++### Format Rules++- `## S<number> | INT/EXT · Location | Time period` — scene heading+- Action description in natural paragraphs — no camera language of any kind+- `CharacterName: (state/expression) line content` — dialogue format++### Content-Volume Reference++The formatted script is about 20-30% longer than the original content; the increase mainly comes from scene-heading markers and dialogue formatting, not from expansion writing.++## Rewriting Steps++1. First call `read_episode_script` to read the original content+2. Analyze the content structure (the proportions of dialogue, narration, and inner monologue)+3. Call `rewrite_to_screenplay` to perform the rewriting+4. Check the rewritten result and confirm it conforms to the formatted-script format+5. Call `save_script` to save the final result++## Notes++- Inner monologue can be converted into character expressions/actions or voiceover+- Split long narrative passages into multiple short scenes+- Make sure every scene has a clear emotional turning point+- Keep each character's language style consistent+- Scene numbers increase consecutively (S01, S02, S03...)+- Time periods must be specific (dusk, late night, early morning) — do not write a vague "daytime"diff --git a/backend/workspace/skills/script-rewriter/SKILL.ja.md b/backend/workspace/skills/script-rewriter/SKILL.ja.mdnew file mode 100644index 0000000..9401a37--- /dev/null+++ b/backend/workspace/skills/script-rewriter/SKILL.ja.md@@ -0,0 +1,56 @@+---+name: script-rewriter+description: 小説をフォーマット済み脚本にリライトする方法論と仕様+---++# 脚本リライトガイド++## リライトの原則++1. **中核となるプロットを保持**:主軸の物語とキャラクター関係を変えない+2. **絵としての説得力を強化**:叙述的な文章を可視化できるシーン描写に変換する+3. **対話で駆動**:セリフで物語を進め、ナレーションを減らす+4. **リズムの管理**:各シーンを30〜60秒に収め、短編動画に適したものにする+5. **カメラ言語を書かない**:ショットサイズ、アングル、カメラワークには触れない。これらは絵コンテ分解のステップに属する++## フォーマット済み脚本の形式++```+## S01 | 内景 · カフェ | 夕暮れ++夕暮れの光が大きな窓からカフェに差し込み、カウンターのコーヒーカップから湯気が立ち上っている。++小明はひとりで隅のボックス席に座り、俯いてスマホを見ている。表情はどこか不安そうだ。++ドアベルが鳴り、小红がドアを押して入ってくる。彼女は小明を見つけ、微笑みながら歩み寄る。++小红:(微笑み)ずっと待ってた?+小明:(顔を上げて)ううん、さっき着いたところ。+```++### フォーマットのルール++- `## S番号 | 内景/外景 · 場所 | 時間帯` — シーンヘッダー+- 動作描写は自然な段落 — いかなるカメラ言語も含めない+- `キャラクター名:(状態/表情)セリフ内容` — セリフの形式++### 内容量の目安++フォーマット済み脚本は元の内容より約20〜30%増量する。主な増分はシーンヘッダーのマーカーとセリフのフォーマット化であり、水増しの加筆ではない。++## リライトの手順++1. まず `read_episode_script` を呼び出して元の内容を読み込む+2. 内容の構造を分析する(対話、叙述、心理描写の比率)+3. `rewrite_to_screenplay` を呼び出してリライトを実行する+4. リライト結果をチェックし、フォーマット済み脚本の形式に合致することを確認する+5. `save_script` を呼び出して最終結果を保存する++## 注意事項++- 心理描写はキャラクターの表情/動作、または画外音(ボイスオーバー)に変換できる+- 長い叙述は複数の短いシーンに分割する+- 各シーンに明確な感情の転換点を持たせる+- キャラクターの話し方の一貫性を保つ+- シーン番号は連続して増加させる(S01, S02, S03...)+- 時間帯は具体的に書く(夕暮れ、深夜、早朝)。大雑把に「昼」と書かないdiff --git a/backend/workspace/skills/script-rewriter/SKILL.ko.md b/backend/workspace/skills/script-rewriter/SKILL.ko.mdnew file mode 100644index 0000000..2f73d1e--- /dev/null+++ b/backend/workspace/skills/script-rewriter/SKILL.ko.md@@ -0,0 +1,56 @@+---+name: script-rewriter+description: 소설을 포맷된 대본으로 리라이팅하는 방법론과 규범+---++# 대본 리라이팅 가이드++## 리라이팅 원칙++1. **핵심 줄거리 보존**: 메인 스토리와 캐릭터 관계를 바꾸지 않습니다+2. **화면감 강화**: 서술적 문장을 시각화 가능한 장면 묘사로 전환합니다+3. **대화 중심**: 대사로 줄거리를 추진하고 내레이션을 줄입니다+4. **리듬 조절**: 각 장면을 30-60초로 조절해 숏폼 영상에 맞춥니다+5. **카메라 언어 금지**: 화면 크기, 앵글, 카메라 무빙을 다루지 않습니다 — 이는 스토리보드 분할 단계에 속합니다++## 포맷된 대본 형식++```+## S01 | 실내 · 카페 | 황혼++황혼의 빛이 통유리창을 통해 카페 안으로 쏟아지고, 바 위의 커피잔에서 김이 모락모락 오른다.++小明은 홀로 구석 부스에 앉아 휴대폰을 내려다보며, 표정이 다소 불안하다.++문벨이 울리고 小红이 문을 밀고 들어온다. 그녀는 小明을 보고 미소 지으며 다가간다.++小红:(미소) 오래 기다렸어?+小明:(고개를 들며) 아니, 나도 방금 왔어.+```++### 형식 규칙++- `## S번호 | 실내/실외 · 장소 | 시간대` — 장면 헤더+- 동작 묘사는 자연스러운 문단 — 어떤 카메라 언어도 포함하지 않음+- `캐릭터명:(상태/표정) 대사 내용` — 대사 형식++### 내용량 참고++포맷된 대본은 원본 내용 대비 약 20-30% 증가하며, 주된 증가분은 장면 헤더 마커와 대사 포맷팅이지 내용 확장이 아닙니다.++## 리라이팅 절차++1. 먼저 `read_episode_script` 를 호출해 원본 내용을 읽습니다+2. 내용 구조를 분석합니다(대화, 서술, 심리 묘사의 비율)+3. `rewrite_to_screenplay` 를 호출해 리라이팅을 실행합니다+4. 리라이팅 결과를 확인해 포맷된 대본 형식에 부합하는지 검토합니다+5. `save_script` 를 호출해 최종 결과를 저장합니다++## 주의 사항++- 심리 묘사는 캐릭터의 표정/동작 또는 화면 밖 목소리로 전환할 수 있습니다+- 긴 서술 문단은 여러 짧은 장면으로 나눕니다+- 각 장면에 명확한 감정 전환점이 있도록 합니다+- 캐릭터의 말투 스타일 일관성을 유지합니다+- 장면 번호는 연속 증가(S01, S02, S03...)+- 시간대는 구체적으로 씁니다(황혼, 심야, 이른 아침). "낮"처럼 대략적으로 쓰지 마세요diff --git a/backend/workspace/skills/storyboard-breaker/SKILL.en.md b/backend/workspace/skills/storyboard-breaker/SKILL.en.mdnew file mode 100644index 0000000..f978802--- /dev/null+++ b/backend/workspace/skills/storyboard-breaker/SKILL.en.md@@ -0,0 +1,83 @@+---+name: storyboard-breaker+description: Professional rules for storyboard breakdown — splitting a script into storyboard segments that each carry multiple sub-shots+---++# Storyboard Breakdown Guide++## Core Definition: Storyboard Segment++One storyboard = one **storyboard segment** = one video-generation task.++- Each segment is **8-15 seconds** long and internally carries **2-4 sub-shots**+- Cuts between sub-shots **are allowed**: change shot size, angle, or subject, joined with hard cuts+- Sub-shots **never cross scenes**: a segment takes place in a single scene (`scene_id` is a segment-level binding)+- Each sub-shot is 2-6 seconds, focused on one visual unit (one action, one reaction, one close-up)++## Breakdown Process (Four Steps)++1. Call `read_storyboard_context` to read the script, characters, scenes, props, and existing storyboard summaries+2. **Beat identification**: first identify the script's narrative beats — markers such as [Opening] [Trigger] [Climax] [Resolution], or narrative turning points (location changes, rule reveals, emotional eruptions, reversals). **Beat boundaries force a segment cut**; group sub-shots within the same beat into the same segment where possible, and do not scatter a causal chain (setup-event-reaction) across different segments+3. **Total-volume anchoring**: target total duration = script character count ÷ 500 characters/minute; segment count ≈ target total duration ÷ 12 seconds, with ±20% tolerance. Do not significantly overshoot or undershoot+4. **Split sub-shots within each segment**: cut sub-shots at action-change points, viewpoint-change points, and subject-change points; after filling in all fields for each segment, call `save_storyboards` to save them in one go++## Pacing-Tier Durations++Determine duration by the segment's function — do not use one size for all:++| Segment type | Duration | Notes |+|---|---|---|+| Transition segment | 8-10 s | Traveling, empty shots, environment establishment, transitions |+| Narrative segment | 10-15 s | Regular plot advancement, dialogue |+| Payoff segment | 12-15 s | Close-ups, rule reveals, emotional eruptions, reversals; slower sub-shot pacing, a single sub-shot may hold for 4-6 s |++## Dialogue Duration Floor (Hard Rule)++**Segment duration ≥ total character count of dialogue and narration within the segment (the part written in description) ÷ 4.5 characters/second + 2 seconds of performance headroom**++Dialogue that does not fit must be moved to the next segment; cramming unperformable dialogue into one segment is not allowed.++## Shot Elements++1. **Shot title**: a 3-5-character summary of the segment's core content (e.g. "Nightmare Awakening")+2. **Time**: specific time of day + lighting description+3. **Location**: full scene description + spatial layout + environmental details+4. **Shot size**: the dominant shot size of the segment; for multi-size segments write a combination, e.g. "medium shot + close-up"+5. **Angle**: eye-level / low angle / high angle / side / back+6. **Camera move**: static / push-in / pull-back / pan / tracking / dolly (different sub-shots within a segment may differ)+7. **Visual description** `description`: describe sub-shot by sub-shot as `【镜头1】…【镜头2】…` what the audience actually sees and hears — the visuals (who + specific action + body-language details + expression) come first; when a sub-shot has dialogue, write it inside the corresponding `【镜头N】` as "CharacterName says: "line"", and narration as "Narration: content"+8. **Visual result** `result`: the immediate consequence at the end of the segment + visual details+9. **Atmosphere** `atmosphere`: lighting + color tone + sound + overall mood+10. **Duration** `duration`: total segment duration 8-15 seconds, and it must satisfy the dialogue duration floor+11. **Scene binding**: if it can be matched to an existing scene, `scene_id` must be filled in+12. **Character binding**: fill in `character_ids`, binding 0 to multiple characters involved in this segment+13. **Prop binding**: fill in `prop_ids`, binding 0 to multiple key props appearing in this segment++## Scene Binding Rules++- Prefer the `scenes` returned by `read_storyboard_context`+- When `location + time` can be clearly matched, the correct `scene_id` must be filled in+- Do not fabricate scene IDs that do not exist+- If the script content clearly falls within an existing scene, do not create a duplicate new scene description++## Character Binding Rules++- `character_ids` must be chosen from the character list returned by `read_storyboard_context`+- A segment may have no characters, or may bind multiple characters+- Any character with a clear appearance in the segment — seen, acting, or speaking — should be bound+- Pure-environment segments, empty shots, and object close-ups may pass an empty array++## Prop Binding Rules++- `prop_ids` must be chosen from the prop list (`props`) returned by `read_storyboard_context`+- When a prop is used by a character, handed over, shown in close-up, or clearly visible in frame and meaningful to the narrative, it must be bound to that segment+- Prop close-up segments (without characters) should also bind the prop; `character_ids` may be empty+- Do not bind background items or set dressing irrelevant to the plot; segments with no props pass an empty array+- Bound props serve as reference images for video generation (white-background product shots), keeping the prop's appearance consistent across segments++## Quality Requirements++- `description` should be human-readable, describing sub-shot by sub-shot what the audience actually sees and hears; dialogue/narration is written directly inside the corresponding `【镜头N】`+- `image_prompt` should highlight the single-frame composition, character appearance, environment, and lighting (corresponding to the segment's first sub-shot)+- `bgm_prompt` and `sound_effect` may be concise phrases, but must not be as vague as just "tense" or "sad"+- To make adjustments, call `update_storyboard` to modify the specific segmentdiff --git a/backend/workspace/skills/storyboard-breaker/SKILL.ja.md b/backend/workspace/skills/storyboard-breaker/SKILL.ja.mdnew file mode 100644index 0000000..5081ca5--- /dev/null+++ b/backend/workspace/skills/storyboard-breaker/SKILL.ja.md@@ -0,0 +1,83 @@+---+name: storyboard-breaker+description: 絵コンテ分解のプロ仕様 — 脚本を複数のサブカットを収める絵コンテパラグラフに分割する+---++# 絵コンテ分解ガイド++## 中核の定義:絵コンテパラグラフ++1つの絵コンテ = 1つの **絵コンテパラグラフ**(segment)= 1つの動画生成タスク。++- 各パラグラフの尺は **8〜15秒** で、内部に **2〜4個のサブカット** を収める+- サブカット間では**カット切り替えが可能**:ショットサイズ、アングル、被写体を変え、ハードカットでつなぐ+- サブカット間で**シーンをまたがない**:1つのパラグラフは1つのシーン内でのみ起こる(`scene_id` はパラグラフ単位の紐付け)+- 各サブカットは2〜6秒で、1つの画面ユニット(1つの動作、1つの反応、1つのクローズアップ)に焦点を当てる++## 分解フロー(4ステップ)++1. `read_storyboard_context` を呼び出して、脚本、キャラクター、シーン、小道具、既存絵コンテの要約を読み込む+2. **拍(ビート)の識別**:まず脚本の物語の拍を識別する——脚本中の【开场】【触发】【高潮】【收尾】などのマーカー、または物語の転換点(場所の移動、ルール開示、感情の爆発、どんでん返し)。**拍の境界では強制的に区切る**。同じ拍内のサブカットは優先的に同じパラグラフにまとめ、1つの因果チェーン(布石-発生-反応)を異なるパラグラフに切り散らかさない+3. **総量のアンカー**:目標総尺 = 脚本の文字数 ÷ 500字/分。パラグラフ数 ≈ 目標総尺 ÷ 12秒。±20%の変動を許容。明らかに超過・不足しないこと+4. **パラグラフ内のサブカット分割**:動作の切り替わり点、視点の切り替わり点、被写体の切り替わり点でサブカットを分割し、各パラグラフに完全なフィールドを補完してから `save_storyboards` を呼び出して一括保存する++## リズム階層別の尺++パラグラフの機能に応じて尺を決め、一律にしない:++| パラグラフの種類 | 尺 | 説明 |+|---|---|---|+| つなぎの段落 | 8〜10秒 | 移動、空カット、環境の提示、場面転換 |+| 物語の段落 | 10〜15秒 | 通常の物語の推進、対話 |+| 山場の段落 | 12〜15秒 | クローズアップ、ルール開示、感情の爆発、どんでん返し。サブカットのリズムを落とし、1つのサブカットに4〜6秒留めることができる |++## セリフの尺の下限(硬いルール)++**パラグラフの尺 ≥ パラグラフ内のセリフとナレーションの総文字数(description に書かれた部分)÷ 4.5字/秒 + 2秒の演技余裕**++収まりきらないセリフは必ず次のパラグラフに振り分ける。演じきれないセリフを1つのパラグラフに詰め込むことは許されない。++## カットの要素++1. **カットのタイトル**:パラグラフの中核内容を3〜5字で概括(例:「悪夢で目覚める」)+2. **時間**:具体的な時刻 + 光線の描写+3. **場所**:シーンの完全な描写 + 空間構成 + 環境の細部+4. **ショットサイズ**:パラグラフ内で主導するショットサイズ。複数ショットサイズのパラグラフは組み合わせで書く(例:「ミディアム+クローズアップ」)+5. **アングル**:目線/仰角/俯瞰/側面/背面+6. **カメラワーク**:固定/プッシュイン/プルバック/パン/フォロー/移動(パラグラフ内のサブカットごとに異なってよい)+7. **画面描写** `description`:`【镜头1】…【镜头2】…` とサブカットごとに、観客が実際に見て聞く内容を記述する——画面(誰 + 具体的な動作 + 体の細部 + 表情)を先に書く。そのサブカットにセリフがある場合は「キャラクター名は言う:「セリフ」」を対応する `【镜头N】` 内に書き、ナレーションは「ナレーション:内容」と書く+8. **画面の結果** `result`:パラグラフ末尾の即時の結果 + 視覚的な細部+9. **雰囲気** `atmosphere`:光線 + 色調 + 音 + 全体の雰囲気+10. **尺** `duration`:パラグラフの総尺 8〜15秒。かつセリフの尺の下限を満たすこと+11. **シーンの関連付け**:既存シーンにマッチできる場合は、必ず `scene_id` を記入する+12. **キャラクターの関連付け**:`character_ids` を記入し、現在のパラグラフに関わる0個以上のキャラクターを紐付ける+13. **小道具の関連付け**:`prop_ids` を記入し、現在のパラグラフに登場する重要な小道具(0個以上)を紐付ける++## シーン関連付けのルール++- `read_storyboard_context` が返す `scenes` を優先的に使用する+- `location + time` で明確にマッチできる場合は、必ず正しい `scene_id` を埋め戻す+- 存在しないシーンIDをでたらめに生成しない+- 脚本の内容が明らかに既存シーンに収まる場合、新しいシーン描写を重複して作らない++## キャラクター紐付けのルール++- `character_ids` は必ず `read_storyboard_context` が返すキャラクターリストから選ぶ+- 1つのパラグラフはキャラクターなしでもよいし、複数のキャラクターを紐付けてもよい+- パラグラフ内で明確に登場し、見え、動作し、または話すキャラクターはすべて紐付ける+- 純粋な環境のパラグラフ、空カット、物品のクローズアップは空の配列を渡してよい++## 小道具紐付けのルール++- `prop_ids` は必ず `read_storyboard_context` が返す小道具リスト(`props`)から選ぶ+- 小道具がキャラクターに使われる、受け渡される、クローズアップされる、または画面内で明確に見えて物語上の意味がある場合は、必ずそのパラグラフに紐付ける+- 小道具のクローズアップのパラグラフ(キャラクターなし)も小道具を紐付ける。`character_ids` は空でよい+- 物語と無関係な背景物品、シーンの調度品は紐付けない。小道具が登場しないパラグラフは空の配列を渡す+- 紐付けられた小道具は動画生成の参照画像(白背景の単品画像)として使われ、パラグラフをまたいで小道具の外観の一貫性を保証する++## 品質要件++- `description` は人が読みやすいものにし、サブカットごとに観客が実際に見て聞く内容を詳細に記述する。セリフ/ナレーションは対応する `【镜头N】` 内に直接書く+- `image_prompt` は単一フレームの構図、キャラクターの外観、環境、光線を際立たせる(パラグラフの最初のサブカットに対応)+- `bgm_prompt` と `sound_effect` は簡潔なフレーズでよいが、「緊張」「悲しみ」だけのような空虚なものにしない+- 調整が必要な場合は `update_storyboard` を呼び出して該当パラグラフを修正するdiff --git a/backend/workspace/skills/storyboard-breaker/SKILL.ko.md b/backend/workspace/skills/storyboard-breaker/SKILL.ko.mdnew file mode 100644index 0000000..63c1c41--- /dev/null+++ b/backend/workspace/skills/storyboard-breaker/SKILL.ko.md@@ -0,0 +1,83 @@+---+name: storyboard-breaker+description: 스토리보드 분할 전문 규범 — 대본을 여러 서브 컷을 담을 수 있는 스토리보드 구간으로 분할+---++# 스토리보드 분할 가이드++## 핵심 정의: 스토리보드 구간++하나의 스토리보드 = 하나의 **스토리보드 구간**(segment) = 하나의 비디오 생성 작업.++- 각 구간은 **8-15초**이며, 내부에 **2-4개의 서브 컷**을 담습니다+- 서브 컷 사이에서는 **컷 전환 가능**: 화면 크기, 앵글, 촬영 대상을 바꾸고 하드 컷으로 연결합니다+- 서브 컷 사이에서는 **장면을 넘나들지 않음**: 한 구간은 하나의 장면 안에서만 일어납니다(`scene_id` 는 구간 단위 바인딩)+- 각 서브 컷은 2-6초로, 하나의 화면 단위(하나의 동작, 하나의 반응, 하나의 클로즈업)에 집중합니다++## 분할 흐름(4단계)++1. `read_storyboard_context` 를 호출해 대본, 캐릭터, 장면, 소품, 기존 스토리보드 요약을 읽습니다+2. **박자 식별**: 먼저 대본의 서사 박자를 식별합니다 — 대본 속 【오프닝】【촉발】【클라이맥스】【마무리】 등의 마커, 또는 서사 전환점(장소 이동, 규칙 공개, 감정 폭발, 반전). **박자 경계에서는 반드시 구간을 자르고**, 같은 박자 안의 서브 컷은 같은 구간에 우선 배치하며, 하나의 인과 사슬(복선-발생-반응)을 서로 다른 구간으로 쪼개지 않습니다+3. **총량 앵커링**: 목표 총 길이 = 대본 글자 수 ÷ 500자/분; 구간 수 ≈ 목표 총 길이 ÷ 12초, ±20% 범위 내 변동 허용. 눈에 띄게 초과하거나 부족하지 않게 합니다+4. **구간 내 서브 컷 분할**: 동작 전환점, 시점 전환점, 대상 전환점을 기준으로 서브 컷을 나누고, 각 구간의 전체 필드를 채운 뒤 `save_storyboards` 를 호출해 한 번에 저장합니다++## 리듬 계층별 길이++구간의 기능에 따라 길이를 정하며, 획일적으로 하지 마세요:++| 구간 유형 | 길이 | 설명 |+|---|---|---|+| 전이 구간 | 8-10초 | 이동, 빈 장면, 환경 설정, 전환 |+| 서사 구간 | 10-15초 | 일반적인 줄거리 진행, 대화 |+| 클라이맥스 구간 | 12-15초 | 클로즈업, 규칙 공개, 감정 폭발, 반전; 서브 컷 리듬을 늦춰 하나의 서브 컷이 4-6초 머무를 수 있음 |++## 대사 길이 하한(엄격한 규칙)++**구간 길이 ≥ 구간 내 대사와 내레이션 총 글자 수(description 에 적힌 부분) ÷ 4.5자/초 + 2초 연기 여유분**++담을 수 없는 대사는 반드시 다음 구간으로 나누며, 다 소화할 수 없는 대사를 한 구간에 욱여넣는 것은 허용되지 않습니다.++## 컷 요소++1. **컷 제목**: 구간의 핵심 내용을 3-5자로 요약(예: "악몽에서 깨어남")+2. **시간**: 구체적인 시각 + 조명 묘사+3. **장소**: 장면 전체 묘사 + 공간 배치 + 환경 디테일+4. **화면 크기**: 구간 내 주도 화면 크기; 여러 화면 크기의 구간은 조합으로 씁니다(예: "미디엄샷+클로즈업")+5. **앵글**: 정면/로우 앵글/하이 앵글/측면/후면+6. **카메라 무빙**: 고정/푸시인/풀백/팬/팔로우/트래킹(구간 내 서브 컷마다 다를 수 있음)+7. **화면 묘사** `description`: `【镜头1】…【镜头2】…` 형식으로 서브 컷별로 관객이 실제로 보고 듣는 내용을 서술합니다 — 화면(누가 + 구체적 동작 + 신체 디테일 + 표정)을 먼저 씁니다; 해당 서브 컷에 대사가 있으면 「캐릭터명이 말한다: 「대사」」 형식으로 해당 `【镜头N】` 안에 쓰고, 내레이션은 「내레이션: 내용」으로 씁니다+8. **화면 결과** `result`: 구간 끝의 즉각적인 결과 + 시각 디테일+9. **분위기** `atmosphere`: 조명 + 색조 + 소리 + 전체 분위기+10. **길이** `duration`: 구간 총 길이 8-15초, 대사 길이 하한을 충족해야 함+11. **장면 연결**: 기존 장면과 매칭되면 반드시 `scene_id` 를 채웁니다+12. **캐릭터 연결**: `character_ids` 를 채워 현재 구간에 관련된 0명 이상의 캐릭터를 바인딩합니다+13. **소품 연결**: `prop_ids` 를 채워 현재 구간에 등장하는 핵심 소품(0개 이상)을 바인딩합니다++## 장면 연결 규칙++- `read_storyboard_context` 가 반환한 `scenes` 를 우선 사용합니다+- `location + time` 으로 명확히 매칭되면 반드시 올바른 `scene_id` 를 채워 넣습니다+- 존재하지 않는 장면 ID를 임의로 만들지 마세요+- 대본 내용이 기존 장면에 명백히 해당하면 새 장면 묘사를 중복 생성하지 마세요++## 캐릭터 바인딩 규칙++- `character_ids` 는 반드시 `read_storyboard_context` 가 반환한 캐릭터 목록에서 선택해야 합니다+- 한 구간에 캐릭터가 없을 수도 있고, 여러 캐릭터를 바인딩할 수도 있습니다+- 구간에 명확히 출연하거나, 보이거나, 동작하거나, 말하는 캐릭터가 있으면 모두 바인딩해야 합니다+- 순수 환경 구간, 빈 장면, 사물 클로즈업은 빈 배열을 전달할 수 있습니다++## 소품 바인딩 규칙++- `prop_ids` 는 반드시 `read_storyboard_context` 가 반환한 소품 목록(`props`)에서 선택해야 합니다+- 소품이 캐릭터에 의해 사용되거나, 전달되거나, 클로즈업되거나, 화면에 뚜렷이 보이며 서사적으로 의미가 있을 때 반드시 해당 구간에 바인딩합니다+- 소품 클로즈업 구간(캐릭터 없음)도 소품을 바인딩해야 하며, `character_ids` 는 비워 둘 수 있습니다+- 줄거리와 무관한 배경 물건, 장면 비품은 바인딩하지 마세요; 소품이 등장하지 않는 구간은 빈 배열을 전달합니다+- 바인딩된 소품은 비디오 생성의 참조 이미지(화이트 배경 단품 이미지)로 사용되어, 소품의 외형이 구간을 넘어 일관되게 유지됩니다++## 품질 요구 사항++- `description` 은 사람이 읽기에 적합해야 하며, 서브 컷별로 관객이 실제로 보고 듣는 내용을 상세히 서술합니다; 대사/내레이션은 해당 `【镜头N】` 안에 직접 씁니다+- `image_prompt` 는 단일 프레임 구도, 캐릭터 외형, 환경과 조명을 부각해야 합니다(구간의 첫 번째 서브 컷에 대응)+- `bgm_prompt` 와 `sound_effect` 는 간결한 구문으로 쓰되, "긴장" "슬픔"만으로 끝날 만큼 공허해서는 안 됩니다+- 조정이 필요하면 `update_storyboard` 를 호출해 특정 구간을 수정합니다diff --git a/desktop/src/main.ts b/desktop/src/main.tsindex 967e5fb..aa5e929 100644--- a/desktop/src/main.ts+++ b/desktop/src/main.ts@@ -26,7 +26,7 @@ const REPO_ROOT = path.resolve(DESKTOP_ROOT, '..')const BACKEND_BUNDLE = path.join(DESKTOP_ROOT, 'build', 'backend.mjs')/** workspace 模板版本:内置模板更新时递增,触发向用户目录补缺失文件 */-const TEMPLATE_VERSION = '3'+const TEMPLATE_VERSION = '4'const STORAGE_CONFIG_FILE = 'storage-config.json'let mainWindow: BrowserWindow | null = nulldiff --git a/frontend/app/composables/useApi.ts b/frontend/app/composables/useApi.tsindex 018c3a8..2b74b5e 100644--- a/frontend/app/composables/useApi.ts+++ b/frontend/app/composables/useApi.ts@@ -136,18 +136,21 @@ export const aiConfigAPI = {test: (d: any) => api.post('/ai-configs/test', d),}+// lang 缺省/为 zh 时读写基础版(不带 query,保持原请求形态)+const langQ = (lang?: string) => (lang && lang !== 'zh' ? `?lang=${lang}` : '')+export const promptAPI = {list: () => api.get('/prompts'),- get: (type: string) => api.get(`/prompts/${type}`),- update: (type: string, d: any) => api.put(`/prompts/${type}`, d),- reset: (type: string) => api.post(`/prompts/${type}/reset`),+ get: (type: string, lang?: string) => api.get(`/prompts/${type}${langQ(lang)}`),+ update: (type: string, d: any, lang?: string) => api.put(`/prompts/${type}${langQ(lang)}`, d),+ reset: (type: string, lang?: string) => api.post(`/prompts/${type}/reset${langQ(lang)}`),}export const skillsAPI = {list: () => api.get('/skills'),- get: (id: string) => api.get(`/skills/${id}`),+ get: (id: string, lang?: string) => api.get(`/skills/${id}${langQ(lang)}`),create: (data: { id: string; name: string; description?: string }) => api.post('/skills', data),- update: (id: string, content: string) => api.put(`/skills/${id}`, { content }),+ update: (id: string, content: string, lang?: string) => api.put(`/skills/${id}${langQ(lang)}`, { content }),del: (id: string) => api.del(`/skills/${id}`),}diff --git a/frontend/app/locales/en.json b/frontend/app/locales/en.jsonindex a4fb186..b20390d 100644--- a/frontend/app/locales/en.json+++ b/frontend/app/locales/en.json@@ -159,6 +159,7 @@"statusTitle": "Click to set episode status","resTitle": "Click to change video resolution","deleteTitle": "Delete this episode",+ "enter": "Open Studio","scriptReady": "Script ready","merged": "Merged","emptyCreateTitle": "Click to create the first episode",@@ -347,7 +348,9 @@"scriptRewriter": "Script Rewriter","extractor": "Asset Extractor","storyboardBreaker": "Storyboard Breaker",- "promptGenerator": "Prompt Generator"+ "promptGenerator": "Prompt Generator",+ "langFallback": "Falls back to Chinese",+ "langPickerTitle": "Choose the language version to edit (loaded by AI content language at generation time)"},"skills": {"agentList": "Agents",@@ -456,10 +459,8 @@"production": "Production","assets": "Assets","assetsDesc": "Characters / scenes / props",- "storyboard": "Storyboard",- "storyboardDesc": "Shot breaking and prompts",- "videos": "Videos",- "videosDesc": "Video tasks and generation",+ "videos": "Video Production",+ "videosDesc": "Storyboard breakdown and video generation","export": "Export","exportDesc": "Merge and output the film","mergeExport": "Merge & Export",@@ -486,8 +487,8 @@"skipDone": "AI rewrite skipped; the raw content will be used directly"},"prod": {- "assets": "Assets",- "videos": "Video Generation",+ "assets": "Asset Production",+ "videos": "Video Production","notReady": "Not ready yet","readyCount": "{ready}/{total} ready","extract": "Extract {type}",@@ -695,7 +696,6 @@"emptyTitle": "Break the storyboard first","emptyDesc": "Video tasks come from the storyboard breakdown. Generate shot descriptions and video prompts first, then generate videos in batch.","lockedModel": "Video model for this episode: ",- "aiBreakdown": "Break down & generate prompts","listTitle": "Video Task List","listMeta": "In shot order · {n} tasks","metricPending": "{n} generating",@@ -742,7 +742,8 @@"confirmModel": "Video model","confirmResolution": "Resolution","confirmNote": "Generation will start shot by shot with the above config; failed tasks can be retried later via \"Retry failed\".",- "confirmStart": "Start ({n})"+ "confirmStart": "Start ({n})",+ "selectMissing": "Select without video"},"inspector": {"videoPromptPlaceholder": "Reference assets with {'@'}character / {'@'}scene — auto-mapped to reference images on generation; then describe motion and camera per time segment…",@@ -760,7 +761,9 @@"durationUnit": "s (4-15)","durationUnitWan": "s (2-30)","durationHint": "Saved to the storyboard on change; applies to list, batch and single generation",- "effective": "This run: {model} · {res} · {dur}s"+ "effective": "This run: {model} · {res} · {dur}s",+ "boundRefs": "Bound References",+ "noBoundRefs": "No bound assets (bind in the center \"References\" panel)"},"tasks": {"title": "Generation Tasks",diff --git a/frontend/app/locales/ja.json b/frontend/app/locales/ja.jsonindex 90ce193..027cd98 100644--- a/frontend/app/locales/ja.json+++ b/frontend/app/locales/ja.json@@ -159,6 +159,7 @@"statusTitle": "クリックしてこの話の状態を設定","resTitle": "クリックしてこの話の動画解像度を変更","deleteTitle": "この話を削除",+ "enter": "制作を開く","scriptReady": "脚本入力済み","merged": "結合済み","emptyCreateTitle": "クリックして第 1 話を作成",@@ -347,7 +348,9 @@"scriptRewriter": "脚本リライト","extractor": "キャラクター・シーン抽出","storyboardBreaker": "分镜分解",- "promptGenerator": "プロンプト生成"+ "promptGenerator": "プロンプト生成",+ "langFallback": "中国語にフォールバック",+ "langPickerTitle": "編集する言語バージョンを選択(生成時は AI コンテンツ言語で読み込み)"},"skills": {"agentList": "Agent 一覧",@@ -456,10 +459,8 @@"production": "制作","assets": "資産","assetsDesc": "キャラクター / シーン / 小道具",- "storyboard": "分镜",- "storyboardDesc": "分镜分解とプロンプト",- "videos": "動画",- "videosDesc": "動画タスクと生成",+ "videos": "動画制作",+ "videosDesc": "分镜分解と動画生成","export": "書き出し","exportDesc": "結合して映像を出力","mergeExport": "結合して書き出し",@@ -486,8 +487,8 @@"skipDone": "AI リライトをスキップしました。原文をそのまま使用します"},"prod": {- "assets": "資産",- "videos": "動画生成",+ "assets": "アセット制作",+ "videos": "動画制作","notReady": "まだ準備ができていません","readyCount": "{ready}/{total} 準備完了","extract": "{type}を抽出",@@ -695,7 +696,6 @@"emptyTitle": "先に分镜を生成","emptyDesc": "動画タスクは分镜分解の結果から作られます。先に分镜説明と動画プロンプトを生成してから、動画を一括生成してください。","lockedModel": "この話の動画モデル:",- "aiBreakdown": "分割してプロンプト生成","listTitle": "動画タスク一覧","listMeta": "ショット順 · {n} 件のタスク","metricPending": "{n} 生成中",@@ -742,7 +742,8 @@"confirmModel": "動画モデル","confirmResolution": "解像度","confirmNote": "上記の設定でショットごとに生成を開始します。失敗したタスクは後で「失敗を再試行」からまとめて再実行できます。",- "confirmStart": "生成開始 ({n})"+ "confirmStart": "生成開始 ({n})",+ "selectMissing": "未生成を選択"},"inspector": {"videoPromptPlaceholder": "{'@'}キャラクター名 / {'@'}シーン名 で参照素材を指定(生成時に参照画像へ自動マッピング)。時間帯ごとに画面の動きとカメラを記述…",@@ -760,7 +761,9 @@"durationUnit": "s(4-15)","durationUnitWan": "秒(2-30)","durationHint": "変更はすぐ分镜に保存され、リストと一括生成にも反映されます",- "effective": "今回の生成:{model} · {res} · {dur}秒"+ "effective": "今回の生成:{model} · {res} · {dur}秒",+ "boundRefs": "绑定参照画像",+ "noBoundRefs": "绑定された素材なし(中央の「参照素材」で绑定)"},"tasks": {"title": "生成タスク一覧",diff --git a/frontend/app/locales/ko.json b/frontend/app/locales/ko.jsonindex 98ba020..7a889da 100644--- a/frontend/app/locales/ko.json+++ b/frontend/app/locales/ko.json@@ -159,6 +159,7 @@"statusTitle": "클릭하여 이 화의 상태 설정","resTitle": "클릭하여 이 화의 영상 해상도 변경","deleteTitle": "이 화 삭제",+ "enter": "제작 열기","scriptReady": "대본 입력됨","merged": "병합됨","emptyCreateTitle": "클릭하여 제 1화 만들기",@@ -347,7 +348,9 @@"scriptRewriter": "대본 재작성","extractor": "캐릭터·장면 추출","storyboardBreaker": "스토리보드 분해",- "promptGenerator": "프롬프트 생성"+ "promptGenerator": "프롬프트 생성",+ "langFallback": "중국어로 폴백",+ "langPickerTitle": "편집할 언어 버전 선택 (생성 시 AI 콘텐츠 언어로 로드)"},"skills": {"agentList": "Agent 목록",@@ -456,10 +459,8 @@"production": "제작","assets": "에셋","assetsDesc": "캐릭터 / 장면 / 소품",- "storyboard": "스토리보드",- "storyboardDesc": "스토리보드 분해와 프롬프트",- "videos": "영상",- "videosDesc": "영상 작업 및 생성",+ "videos": "영상 제작",+ "videosDesc": "스토리보드 분해 및 영상 생성","export": "납출","exportDesc": "병합하여 영상 출력","mergeExport": "병합 납출",@@ -486,8 +487,8 @@"skipDone": "AI 재작성을 건거이습니다. 원문을 그대로 사용합니다"},"prod": {- "assets": "에셋",- "videos": "영상 생성",+ "assets": "에셋 제작",+ "videos": "영상 제작","notReady": "아직 준비되지 않았습니다","readyCount": "{ready}/{total} 준비 완료","extract": "{type} 추출",@@ -695,7 +696,6 @@"emptyTitle": "먼저 스토리보드 생성","emptyDesc": "영상 작업은 스토리보드 분해 결과에서 만들어집니다. 먼저 스토리보드 설명과 영상 프롬프트를 생성한 후 영상을 일괄 생성하세요.","lockedModel": "이 화의 영상 모델: ",- "aiBreakdown": "분할 및 프롬프트 생성","listTitle": "영상 작업 목록","listMeta": "샷 순서 · 작업 {n}개","metricPending": "{n} 생성 중",@@ -742,7 +742,8 @@"confirmModel": "영상 모델","confirmResolution": "해상도","confirmNote": "위 설정으로 샷별로 생성을 시작합니다. 실패한 작업은 나중에 「실패 재시도」로 한 번에 다시 실행할 수 있습니다.",- "confirmStart": "생성 시작 ({n})"+ "confirmStart": "생성 시작 ({n})",+ "selectMissing": "미생성 선택"},"inspector": {"videoPromptPlaceholder": "{'@'}캐릭터명 / {'@'}장멸명 으로 참조 소재를 지정(생성 시 참조 이미지로 자동 매핑). 시간대별로 화면의 움직임과 침라를 기술…",@@ -760,7 +761,9 @@"durationUnit": "초(4-15)","durationUnitWan": "초(2-30)","durationHint": "변경 즉시 스토리보드에 저장되며 목록과 일괄 생성에도 적용됩니다",- "effective": "이번 생성: {model} · {res} · {dur}초"+ "effective": "이번 생성: {model} · {res} · {dur}초",+ "boundRefs": "바인딩 참조 이미지",+ "noBoundRefs": "바인딩된 에셋 없음(중앙 \"참조 에셋\"에서 바인딩)"},"tasks": {"title": "생성 작업 목록",diff --git a/frontend/app/locales/zh.json b/frontend/app/locales/zh.jsonindex c1d79bb..128167d 100644--- a/frontend/app/locales/zh.json+++ b/frontend/app/locales/zh.json@@ -159,6 +159,7 @@"statusTitle": "点击标记本集状态","resTitle": "点击修改本集视频分辨率","deleteTitle": "删除本集",+ "enter": "进入制作","scriptReady": "剧本已录入","merged": "已合成","emptyCreateTitle": "点击创建第一集",@@ -347,7 +348,9 @@"scriptRewriter": "剧本改写","extractor": "角色场景提取","storyboardBreaker": "分镜拆解",- "promptGenerator": "提示词"+ "promptGenerator": "提示词",+ "langFallback": "跟随中文",+ "langPickerTitle": "选择要编辑的语言版本(生成时按 AI 内容语言加载)"},"skills": {"agentList": "Agent 列表",@@ -456,10 +459,8 @@"production": "制作","assets": "资产","assetsDesc": "角色 / 场景 / 道具",- "storyboard": "分镜",- "storyboardDesc": "分镜拆分与提示词",- "videos": "视频",- "videosDesc": "视频任务与生成",+ "videos": "视频制作",+ "videosDesc": "分镜拆分与视频生成","export": "导出","exportDesc": "拼接与成片输出","mergeExport": "拼接导出",@@ -486,8 +487,8 @@"skipDone": "已跳过 AI 改写,当前将直接使用原始内容"},"prod": {- "assets": "资产",- "videos": "视频生成",+ "assets": "资产制作",+ "videos": "视频制作","notReady": "尚未准备就绪","readyCount": "{ready}/{total} 已就绪","extract": "提取{type}",@@ -695,7 +696,6 @@"emptyTitle": "先生成分镜","emptyDesc": "视频任务来自分镜拆分结果。先生成分镜描述和视频提示词,再批量生成视频。","lockedModel": "当前集视频模型:",- "aiBreakdown": "拆分分镜并生成提示词","listTitle": "视频任务列表","listMeta": "按镜头顺序 · {n} 个任务","metricPending": "{n} 生成中",@@ -742,7 +742,8 @@"confirmModel": "视频模型","confirmResolution": "分辨率","confirmNote": "将按以上配置逐镜头发起生成;失败的任务之后可点「重试失败」一键重跑。",- "confirmStart": "开始生成 ({n})"+ "confirmStart": "开始生成 ({n})",+ "selectMissing": "选未生成"},"inspector": {"videoPromptPlaceholder": "用 {'@'}角色名 / {'@'}场景名 引用参考素材,生成时自动映射为参考图片;再按时间段描述画面运动与镜头…",@@ -760,7 +761,9 @@"durationUnit": "s(4-15)","durationUnitWan": "s(2-30)","durationHint": "修改即保存到分镜,列表与批量生成同步生效",- "effective": "本次生成:{model} · {res} · {dur}s"+ "effective": "本次生成:{model} · {res} · {dur}s",+ "boundRefs": "绑定参考图",+ "noBoundRefs": "暂无绑定素材(在中间「参考素材」区点击绑定)"},"tasks": {"title": "生成任务列表",diff --git a/frontend/app/pages/settings.vue b/frontend/app/pages/settings.vueindex 1af116a..a0110cb 100644--- a/frontend/app/pages/settings.vue+++ b/frontend/app/pages/settings.vue@@ -385,19 +385,30 @@</button></div>- <!-- 子 tab:System Prompt / Skills -->+ <!-- 子 tab:System Prompt / Skills + 语言切换 --><div class="agent-pane-tabs"><button :class="['agent-pane-tab', { active: agentPane === 'prompt' }]" @click="agentPane = 'prompt'">System Prompt</button><button :class="['agent-pane-tab', { active: agentPane === 'skills' }]" @click="agentPane = 'skills'">Skills<template v-if="agentSkillCount(selectedAgent) > 0"> ({{ agentSkillCount(selectedAgent) }})</template></button>+ <div class="agent-lang-picker" :title="t('settings.agents.langPickerTitle')">+ <button+ v-for="l in contentLangOptions"+ :key="l.value"+ type="button"+ :class="['agent-lang-option', { on: editLang === l.value }]"+ @click="setEditLang(l.value)"+ >{{ l.shortLabel || l.label }}</button>+ </div></div><!-- Prompt 面板 --><div v-if="agentPane === 'prompt'" class="card agent-card"><div class="agent-card-body" style="border-top:none"><label class="field">- <span class="field-label">System Prompt <span class="dim">({{ t('settings.agents.promptHint', { file: `workspace/prompts/${selectedAgent}.md` }) }})</span></span>+ <span class="field-label">System Prompt <span class="dim">({{ t('settings.agents.promptHint', { file: promptFileName }) }})</span>+ <span v-if="agentPromptFallback" class="tag agent-fallback-tag">{{ t('settings.agents.langFallback') }}</span>+ </span><textarea v-model="agentForm.system_prompt" class="textarea agent-prompt-input" rows="16" :placeholder="t('settings.agents.promptPlaceholder')" /></label><div class="agent-card-foot">@@ -449,7 +460,8 @@:placeholder="t('settings.skills.contentPlaceholder')"/><div class="skill-card-foot">- <span class="dim" style="font-size:11px">skills/{{ s.id }}/SKILL.md</span>+ <span class="dim" style="font-size:11px">skills/{{ s.id }}/{{ skillFileName }}</span>+ <span v-if="skillContentFallback" class="tag agent-fallback-tag">{{ t('settings.agents.langFallback') }}</span><span v-if="skillSaved === s.id" class="tag tag-success" style="margin-left:8px"><Check :size="10" /> {{ t('common.saved') }}</span>@@ -890,18 +902,22 @@ async function loadAgents() {async function loadAgentPrompt(type) {try {- const cfg = await promptAPI.get(type)- if (selectedAgent.value === type) agentForm.system_prompt = cfg.system_prompt || ''+ const cfg = await promptAPI.get(type, editLang.value)+ if (selectedAgent.value === type) {+ agentForm.system_prompt = cfg.system_prompt || ''+ agentPromptFallback.value = editLang.value !== 'zh' && !!cfg.is_default+ }agentSaved.value = null} catch (e) { toastError(e) }}async function resetAgentPrompt(type) {try {- await promptAPI.reset(type)+ await promptAPI.reset(type, editLang.value)await loadAgents()- const cfg = await promptAPI.get(type)+ const cfg = await promptAPI.get(type, editLang.value)agentForm.system_prompt = cfg.system_prompt || ''+ agentPromptFallback.value = editLang.value !== 'zh' && !!cfg.is_defaulttoast.success(t('settings.agents.promptReset'))} catch (e) { toastError(e) }}@@ -913,8 +929,9 @@ async function saveAgentCfg(type) {await promptAPI.update(type, {name: agentDefs.value.find(a => a.type === type)?.label || type,system_prompt: agentForm.system_prompt,- })+ }, editLang.value)await loadAgents()+ agentPromptFallback.value = falseagentSaved.value = typetoast.success(t('settings.agents.saved', { agent: agentDefs.value.find(a => a.type === type)?.label }))setTimeout(() => { if (agentSaved.value === type) agentSaved.value = null }, 3000)@@ -942,11 +959,28 @@ const selectedAgentIcon = computed(() => agentDefs.value.find(a => a.type === se// ===== 通用:AI 内容语言(全局设置,与界面语言相互独立) =====const contentLanguage = ref('zh')const contentLangOptions = [- { value: 'zh', label: '中文' },- { value: 'en', label: 'English' },- { value: 'ja', label: '日本語' },- { value: 'ko', label: '한국어' },+ { value: 'zh', label: '中文', shortLabel: '中文' },+ { value: 'en', label: 'English', shortLabel: 'EN' },+ { value: 'ja', label: '日本語', shortLabel: '日本語' },+ { value: 'ko', label: '한국어', shortLabel: '한국어' },]+// ===== Agent 配置:prompt/skill 编辑的语言版本(默认跟随内容语言) =====+const editLang = ref('zh')+const agentPromptFallback = ref(false) // 当前语言无独立 prompt 文件,展示的是回退内容+const skillContentFallback = ref(false) // 同上,skill 编辑器+const promptFileName = computed(() => `workspace/prompts/${selectedAgent.value}${editLang.value !== 'zh' ? `.${editLang.value}` : ''}.md`)+const skillFileName = computed(() => `SKILL${editLang.value !== 'zh' ? `.${editLang.value}` : ''}.md`)++async function setEditLang(lang) {+ if (editLang.value === lang) return+ editLang.value = lang+ await loadAgentPrompt(selectedAgent.value)+ if (editingSkill.value) {+ const id = editingSkill.value+ editingSkill.value = null+ await toggleSkillEdit(id)+ }+}// ===== 通用:外观主题(localStorage 持久化,即时生效) =====const { themeMode, setThemeMode } = useTheme()const themeOptions = computed(() => [@@ -956,7 +990,11 @@ const themeOptions = computed(() => [])async function loadContentLanguage() {- try { contentLanguage.value = (await settingsAPI.contentLanguage())?.language || 'zh' } catch { /* 保持默认 */ }+ try {+ const lang = (await settingsAPI.contentLanguage())?.language || 'zh'+ contentLanguage.value = lang+ editLang.value = lang // Agent 编辑器默认跟随内容语言+ } catch { /* 保持默认 */ }}async function setContentLanguage(lang) {if (contentLanguage.value === lang) return@@ -1043,8 +1081,9 @@ async function confirmDelSkill() {async function toggleSkillEdit(id) {if (editingSkill.value === id) { editingSkill.value = null; return }try {- const res = await skillsAPI.get(id)+ const res = await skillsAPI.get(id, editLang.value)skillContent.value = res.content+ skillContentFallback.value = editLang.value !== 'zh' && !!res.is_defaultskillSaved.value = nulleditingSkill.value = id} catch (e) { toastError(e) }@@ -1054,8 +1093,9 @@ async function saveSkill(id) {skillSaving.value = trueskillSaved.value = nulltry {- await skillsAPI.update(id, skillContent.value)+ await skillsAPI.update(id, skillContent.value, editLang.value)await loadAllSkills()+ skillContentFallback.value = falseskillSaved.value = idtoast.success(t('common.saved'))setTimeout(() => { if (skillSaved.value === id) skillSaved.value = null }, 3000)@@ -1557,6 +1597,28 @@ onBeforeUnmount(stopUsagePoll).agent-pane-tab:hover { color: var(--text-0); }.agent-pane-tab.active { background: var(--accent-bg); color: var(--accent-text); }+/* 语言版本切换(prompt/skill 编辑器右上角) */+.agent-lang-picker {+ margin-left: auto;+ display: flex; gap: 2px; padding: 2px;+ border-radius: 7px; background: var(--bg-2);+}+.agent-lang-option {+ padding: 3px 10px; border: none; border-radius: 5px;+ background: transparent; color: var(--text-3);+ font: 600 11px var(--font-body); cursor: pointer;+ transition: background 0.15s, color 0.15s;+}+.agent-lang-option:hover { color: var(--text-1); }+.agent-lang-option.on { background: var(--surface-raised); color: var(--text-0); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }++/* 「跟随中文」回退提示 */+.agent-fallback-tag {+ margin-left: 6px;+ background: var(--bg-2); color: var(--text-3);+ font-size: 10px; font-weight: 500;+}+/* 编辑器尽量占满剩余视口高度,仍可手动拖拽 */.agent-prompt-input { min-height: max(320px, calc(100vh - 340px)); resize: vertical; }.skill-content-input { min-height: max(300px, calc(100vh - 420px)); resize: vertical; }