1实现原理 · 为什么它能做到
整体是「两阶段八门」的状态机:Phase 1 一次访谈问全(Gate 1-4),Phase 2 逐门建造(Gate 5-8),每门必须产出下一门要消费的具体产物,且明令不许跳门。
Two phases, eight sequential gates. Every gate produces a concrete artifact the next gate consumes. Don't skip gates.
入口先做分流:URL → website-to-hyperframes;9:16 口播带人脸 → 先用本 skill 跑到 Gate 4 再交给 short-form-edit;只要框架规则 → hyperframes。
**Hand off when:** - The user pastes a URL and wants a video from that site → invoke `/website-to-hyperframes` … - The user asks for framework rules, not a video → invoke `/hyperframes`
访谈阶段有硬门:Gate 1 收齐六项(用途/受众/时长/画幅/帧率/平台约束),Gate 4 必须写 BRIEF.md 并等用户明确点头才允许开工。
4. **Show the brief. WAIT for explicit approval.** Don't proceed to Gate 5 without a clear "yes, build it."
风格阶段先盘点、后提问,绝不替用户选品牌:先扫 workspace 与项目 assets,再渐进式问调色/字体/logo/参考片/节奏/音乐;只有当用户明确拒绝提供时才回落到 MOTION_PHILOSOPHY 默认值。
**Before asking the user anything, inventory existing assets.** Check `<workspace-root>/assets/` and any project `assets/` folder. Don't ask for what's already there.
建造阶段给的是可复制的骨架:npx hyperframes init(或复用同型项目的 hyperframes.json/meta.json)、assets/style-profile.md 作单一事实源、故事板每拍写清概念/视觉元素/运动语言/缓动/退出/音频,并建议三幕 20% / 55% / 25% 结构。
- Act 1 (hook) ≈ 20% of duration - Act 2 (body) ≈ 55% - Act 3 (payoff + outro with 4–6 second hold) ≈ 25%
子组合的模板写死三件套:作用域样式([data-composition-id])、IIFE 包裹的暂停 GSAP 时间线、以及末尾的 SLOT 锚补时 tween;时间线注册到 window.__timelines。
tl.to({}, { duration: SLOT_DURATION }, 0); // anchor — MOTION_PHILOSOPHY Law 11 … window.__timelines["scene-name"] = tl;
确定性是硬约束:禁 Math.random()/Date.now()/渲染期 fetch(),改用种子 PRNG 或谐波正弦哈希。
No `Math.random()`, no `Date.now()`, no render-time `fetch()`. Use seeded PRNGs or harmonic-sin hashes (MOTION_PHILOSOPHY §3.10).
两道强制预览门 + 抽帧目检:lint 与 Studio(localhost:3002)通过并获用户明确同意后才渲染草稿;草稿必须用 ffmpeg 抽帧、用 Read 工具真的看图,再用本地服务器让人试播并获签核,最后才终渲。
3. **Call the `Read` tool on every PNG.** The Read tool loads the image into context — don't just list filenames. … Do NOT use Python's `http.server` — it doesn't support HTTP Range requests, so scrubbing breaks.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | HyperFrames CLI(init / lint / preview / render / transcribe / tts / add,仓库依赖 hyperframes 包) |
| cli | ffmpeg(从草稿成片抽帧做目检) |
| cli | npx serve(本地静态服务器,供用户试播签核;文档明确禁用 Python http.server 因无 Range 支持) |
| network | HyperFrames Studio 预览服务器(本地) |
| network | Google Fonts(**产物期**:style-intake 的默认字体对在生成的 composition 里按需引,浏览器/渲染器加载) |
| cli | 宿主问答工具 AskUserQuestion(访谈阶段逐题提问) |
| package | 工作区外部依赖 MOTION_PHILOSOPHY.md(作者自述为『本 skill 唯一假定存在的外部参考』) |
4风险提醒 风险提醒:蓝色 · 知晓即可
- 门禁多、回合长,急性子用户容易想跳门 — 两道预览门 + 两处审批门意味着至少四次往返;文档用 Non-negotiables 明确禁止跳门,实际使用需预留沟通时间。
- 渲染依赖本地 Chromium/Playwright 与节点环境 — render 走本地无头浏览器;环境缺件或 WebGL 软件回退时可能出现卡住现象——文档已提示有 WebGL shader 块时要先看单个 composition URL。
- 模板供应链相邻面 — catalog 块经 npx hyperframes add 从官方 registry 拉入并合进工程;虽要求立即 scope CSS,但第三方模板内容仍进入项目,需自行评估来源可信度。
- 风格默认值可能被误当作推荐 — MOTION_PHILOSOPHY 默认(黑底、chrome 字、透视网格)风格特征强;若用户没有明确偏好且访谈不充分,成片会明显带上作者审美。
- 本地文件系统写盘范围较大 — 会在工作区建项目目录、拷入资产并渲染 MP4;建议在受版本控制的目录内使用,误操作时便于回滚。
5第二遍独立确认
- [ok] 目录文件清单与脚本面 — find 返回 SKILL.md(12.6KB)+ references/{build-checklist,catalog-intent-map,composition-scaffold,interview-questions,storyboard-template,style-intake}.md;无 scripts/、无 .js/.mjs/.py,无隐藏文件。
- [ok] URL/网络面归类 — 命中的 URL 三类:localhost:3002(Studio)、localhost:8080(试播)、fonts.googleapis.com(默认字体对,产物期)。无第三方 API 端点、无上传路径、无云服务名。
- [ok] 凭证面反例搜索 — 0 处 env/API_KEY/TOKEN/SECRET 命中;全文未要求账号、配额或密钥(与 edit-video 形成对照:那里把服务前置与成本纪律写进主流程)。
- [ok] 门禁与非协商条款回源 — Gate 4 的 'WAIT for explicit approval.'、Gate 7 的 'Silence is not approval.'、Gate 8 的 Read-every-PNG、SLOT 锚、class="clip" 禁令、Math.random/Date.now 禁令、'Never put index.html at the workspace root.' 均在源码定位到,无遗漏改写。
- [ok] references 引用完整性 — SKILL.md References 段列的 6 个文件全部存在于 references/ 目录,且每个文件开头自述所属 Gate(Gate 1-3 / Gate 5 / Gate 6 / Gates 7-8),引用链无死链。
- [ok] CLI 能力是否被误记为云服务 — 文档只写 `npx hyperframes tts --help` 与 `npx hyperframes transcribe ...`,未指定服务商或密钥;故 external_deps 只记 CLI 本体,不虚增 API 条目。
6结论
d16534f6ceefd132…0d30152a82