cut-as-code

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cut as Code Entry Point

Cut as Code 入口点

Use this as the mandatory entry point for cut-as-code video work. Own routing and project-state recovery only. The selected leaf skill owns editorial decisions, review gates, scripts, rendering details, and self-checks.
对于 cut-as-code 视频工作,必须使用此入口点。它只负责路由和项目状态恢复。所选的叶子 skill 负责编辑决策、审核关卡、脚本、渲染细节和自检。

1. Start From Project State

1. 从项目状态开始

Apply the first matching row. Do not evaluate lower rows.
StateAction
The user names a specific operation on an existing projectInspect only the state needed for that operation, then load its owning skill. Skip general intake.
An explicit project root contains
work/project.json
Read
work/project.json
,
work/timeline.json
, and only the selected operation's plan/evidence. Resume from recorded state. If the owner is not unique, ask one routing-only question.
The user supplies a source file or URL, no project, and a clear deliverableLoad
/video-understand
to initialize the project and shared evidence, then continue to the requested operation.
No project/source or no intended deliverable is identifiableAsk one concise question requesting the missing project/source and desired result. Do not start a skill yet.
The project root must be explicit; never treat the repository root as a video project. Treat
work/project.json
as the only shared manifest. Determine progress from operation
status
,
revision
,
based_on
,
check
, and render state, not from directory presence. Do not re-run verified work. If a dependency is missing or stale, complete that dependency first and then resume the requested operation.
Routing is read-only. Never repair, reset, approve, remove, or activate an operation while deciding where to send the task.
按第一行匹配项执行。不要评估后续行。
状态操作
用户指定了现有项目上的某个具体操作仅检查该操作所需的状态,然后加载其所属 skill。跳过通用需求收集。
明确指定的项目根目录中包含
work/project.json
读取
work/project.json
、
work/timeline.json
,以及仅与所选操作相关的计划/证据。从记录的状态继续。如果所属 skill 不唯一,只提出一个用于路由的问题。
用户提供了源文件或 URL,但没有项目,且交付物明确加载
/video-understand
初始化项目和共享证据,然后继续执行请求的操作。
无法识别项目/源文件或预期交付物提出一个简洁的问题,询问缺少的项目/源文件和期望结果。此时不要启动任何 skill。
项目根目录必须明确指定;绝不能将仓库根目录视为视频项目。将
work/project.json
视为唯一的共享清单文件。根据操作的
status
、
revision
、
based_on
、
check
和渲染状态确定进度,而不是根据目录是否存在来判断。不要重新运行已经验证的工作。如果依赖项缺失或已过期,应先完成该依赖项,然后继续执行请求的操作。
路由过程是只读的。在决定任务应转交给哪里时,绝不能修复、重置、批准、删除或激活操作。

2. Route by Deliverable

2. 按交付物进行路由

Match the requested output, not a keyword mentioned in passing.
Requested resultOwning skill or workflow
Probe, transcript, objective analysis, semantic understanding, or new project initialization
/video-understand
Tighten, shorten, remove weak sections, or create a first/rough cut
/video-cut
after
/video-understand
Correct color, create/select a look, or deliver/apply a LUT
/video-color-grade
; use its standalone path only when the user explicitly wants no Project Protocol delivery
Add transcript-timed visual cutaways
/video-add-b-roll
after
/video-understand
Add sourced motion graphics or animated semantic overlays
/video-add-graphic-motion
after
/video-understand
Add titles, lower-thirds, statistics, quotes, chapters, or calls to action
/video-add-content-cards
after
/video-understand
Add subtitles, captions, or karaoke captions
/video-add-captions
after
/video-understand
Compare the original with actual final pixels in source time
/video-edit-compare
after the verified main delivery exists
Select, review, and plan short-form ranges
/video-to-shorts
after
/video-understand
; do this before requested content cards and captions
Finalize and extract approved horizontal or vertical short-form derivativesResume
/video-to-shorts
after the verified main delivery exists
Compile or render an existing Project Protocol deliveryUse
build_render_plan.py
and
render_project.py
from
/video-understand
after every selected active operation passes its own gate
A generic request such as "edit this video" does not uniquely select
/video-cut
. Ask one routing question unless the desired output is clear from existing project state or the surrounding request.
根据请求的输出进行匹配,而不是根据顺带提到的关键词进行匹配。
请求的结果所属 skill 或工作流
探测、转录、客观分析、语义理解或初始化新项目
/video-understand
收紧、缩短、删除薄弱片段,或创建初剪/粗剪执行
/video-understand
后使用
/video-cut
校正色彩、创建/选择风格,或交付/应用 LUT
/video-color-grade
;仅当用户明确不需要 Project Protocol 交付方式时,才使用其独立路径
添加按转录时间轴对齐的视觉 cutaway/B-roll执行
/video-understand
后使用
/video-add-b-roll
添加具有明确来源的动态图形或动画语义叠加层执行
/video-understand
后使用
/video-add-graphic-motion
添加标题、lower-thirds、数据、引语、章节或行动号召执行
/video-understand
后使用
/video-add-content-cards
添加 subtitles、captions 或卡拉 OK 字幕执行
/video-understand
后使用
/video-add-captions
在源时间轴上将原片与实际最终像素进行比较在已验证的主交付物存在后使用
/video-edit-compare
选择、审核并规划短视频片段范围执行
/video-understand
后使用
/video-to-shorts
;应在请求的内容卡片和字幕之前执行
定稿并提取已批准的横向或纵向短视频衍生版本在已验证的主交付物存在后继续执行
/video-to-shorts
编译或渲染现有的 Project Protocol 交付物在每个已选择且处于活动状态的操作通过自身关卡后,使用
/video-understand
中的
build_render_plan.py
和
render_project.py
“剪辑这个视频”之类的通用请求无法唯一确定
/video-cut
。除非现有项目状态或 surrounding request 已明确说明期望输出,否则应提出一个路由问题。

3. Orchestrate Multi-Operation Requests

3. 编排多操作请求

Freeze only the operations the user requested; never turn the route table into a default package. Run the shared understanding prerequisite once. Execute selected main-sequence operations in canonical order:
text
cut -> color-grade -> b-roll -> captions -> content-cards -> graphic-motion
For a request that includes Shorts, content cards, or captions, use this staged flow:
text
/video-understand
-> /video-to-shorts plan and candidate review only
-> /video-add-captions
-> /video-add-content-cards
-> /video-add-graphic-motion
-> compile and render the shared main delivery once
-> /video-to-shorts finalize and extract approved derivatives
Complete any requested timeline-changing operation, such as
/video-cut
, before Shorts planning; a changed
work/timeline.json
invalidates candidate approval. Shorts planning writes shared plan/review state and must not create
final.mp4
or anything under
final/shorts/
. Captions, content cards, and graphic motion then add their own shared plans and overlay contributions in that relative order. The same order applies when only any pair is selected: captions first, content cards second, graphic motion last. Re-read
work/project.json
before each handoff. Do not run leaf skills concurrently when they can write
work/project.json
,
work/timeline.json
, an operation plan, or shared render artifacts. Build and render the main delivery once, after all selected active operations validate. Run
/video-edit-compare
and only the finalization/extraction phase of
/video-to-shorts
against that verified delivery; shorts remain outside
sequences.main.operations
.
For
/video-add-content-cards
and
/video-add-graphic-motion
, reserve the visible face and head silhouette of every primary or foreground person, speaker, presenter, interviewee, or semantically important person for the complete cue. Incidental background-only people who are not a narrative or visual focus are exempt; protect uncertain cases. If an overlay touches a protected face or head, reposition it first, then scale or redesign it; skip the cue when no compliant placement exists.
An all-skipped or zero-cue result is valid when the owning skill permits it. Do not invent filler work to keep an operation active.
仅冻结用户请求的操作;绝不能将路由表变成默认套餐。共享理解前置步骤只运行一次。按标准顺序执行所选的主序列操作:
text
cut -> color-grade -> b-roll -> captions -> content-cards -> graphic-motion
对于同时包含 Shorts、内容卡片或字幕的请求,使用以下分阶段流程:
text
/video-understand
-> /video-understands plan and candidate review only
-> /video-add-captions
-> /video-add-content-cards
-> /video-add-graphic-motion
-> compile and render the shared main delivery once
-> /video-to-shorts finalize and extract approved derivatives
完成任何会更改时间轴的请求操作,例如
/video-cut
,然后再进行 Shorts 规划;
work/timeline.json
发生更改后,候选片段的批准状态将失效。Shorts 规划会写入共享的计划/审核状态,但不得创建
final.mp4
或
final/shorts/
下的任何内容。随后,字幕、内容卡片和图形动态按该相对顺序添加各自的共享计划和叠加层内容。仅选择其中任意两项时也遵循相同顺序:字幕在前,内容卡片其次,图形动态最后。每次移交前都要重新读取
work/project.json
。如果叶子 skill 可能写入
work/project.json
、
work/timeline.json
、操作计划或共享渲染产物,则不要并发运行这些叶子 skill。待所有已选择且处于活动状态的操作验证通过后,只构建和渲染一次主交付物。针对该已验证的交付物运行
/video-edit-compare
,并且只运行
/video-to-shorts
的定稿/提取阶段;shorts 始终位于
sequences.main.operations
之外。
对于
/video-add-content-cards
和
/video-add-graphic-motion
,在完整的 cue 期间,必须为每一位主要人物、前景人物、说话者、主持人、受访者或语义上重要的人物保留可见的面部和头部轮廓。仅偶然出现在背景中、且不是叙事或视觉焦点的人物不受此限制;对于不确定的情况,应采取保护措施。如果叠加层触碰受保护的面部或头部,应先重新定位,然后缩放或重新设计;如果不存在合规的放置位置,则跳过该 cue。
当所属 skill 允许时,全部跳过或零 cue 的结果是有效的。不要为了保持操作处于活动状态而虚构填充工作。

4. Hand Off, Then Leave

4. 移交后退出

Read the selected skill's complete
SKILL.md
and every required sub-skill before acting. For one operation, hand off once and leave this entry point. For a requested multi-operation run, enter one owner at a time; after its self-check, recover project state and continue to the next frozen operation without reopening intake.
Do not ask the user to approve a route that is already unambiguous. User interaction belongs only to missing inputs, genuine routing ambiguity, credentials, or the editorial/review decisions required by the owning skill. Never substitute an Agent decision for a required human decision unless the user explicitly delegates it.
执行操作前,读取所选 skill 的完整
SKILL.md
以及每个必需的子 skill。对于单个操作,只执行一次移交,然后退出此入口点。对于请求的多操作运行,每次只进入一个所属 skill;完成其自检后,恢复项目状态并继续执行下一个已冻结的操作,无需重新进行需求收集。
不要要求用户批准已经明确无误的路由。只有在缺少输入、存在真正的路由歧义、需要凭据,或所属 skill 要求进行编辑/审核决策时,才与用户交互。除非用户明确委托,否则绝不能以 Agent 的决策替代必需的人工决策。

Example

示例

For "continue this understood and cut project by adding captions," read the current project and timeline revisions, then enter
/video-add-captions
. Do not re-transcribe, re-cut, or ask whether captions are the intended route. An unrelated pending operation does not change the route, though an active unverified operation may block the final shared render and must be reported by the compiler.
对于“继续处理这个已完成理解并剪辑的项目,添加字幕”这一请求,应读取当前的项目修订和时间轴修订,然后进入
/video-add-captions
。不要重新转录、重新剪辑,也不要询问字幕是否为目标路由。无关的待处理操作不会改变路由,但处于活动状态且尚未验证的操作可能会阻止最终的共享渲染,并且必须由编译器报告。

Failure Rules

失败规则

  • Invalid project state: report the exact validation problem; never reinitialize over it.
  • Missing leaf skill or prerequisite: stop and name it; do not reconstruct it from memory.
  • Missing source/project path: ask for it in the single routing question.
  • Conflicting requested outputs: ask which deliverable owns the current run.
  • Existing user changes or artifacts: preserve them and work with the recorded state.
  • 项目状态无效:报告确切的验证问题;绝不能无视该问题而重新初始化。
  • 缺少叶子 skill 或前置条件:停止并指明其名称;不要凭记忆重建。
  • 缺少源文件/项目路径:在唯一的路由问题中询问。
  • 请求的输出相互冲突:询问当前运行应由哪个交付结果负责。
  • 存在用户修改或产物:保留这些内容,并根据记录的状态继续工作。