1仕組みと動作原理
本スキルは HyperFrames の「技術規約」です。HTML をレンダリング可能な動画へと記述するための完全なルールセット(単一の paused タイムライン、`data-*` タイミング属性、`class="clip"`、サブコンポジション、決定論的レンダリングの禁止事項)を提供します。SKILL.md 本文は構築ガイドとして機能し、細部は必要に応じて references/ 配下の 19 枚のカードへと体系化されています。
This skill is the **technical contract** — how to build one hyperframes project. The body below is the build guide; per-topic detail lives in `references/` (index next), read on demand.
コアモデル:コンポジション = HTML ファイル。DOM は `data-*` 属性を用いてタイミングを宣言し、コンポジションごとに厳密に 1 つの `gsap.timeline({ paused: true })` を `window.__timelines["<id>"]` に登録します。レンダリング長はルートの `data-duration` を基準とします(タイムラインの長さではありません)。
Each composition registers **exactly one** `gsap.timeline({ paused: true })` at `window.__timelines["<id>"]` (key = root `data-composition-id`).
機能の対象には実際の lint ルールセットが含まれます。SKILL.md は lint で検出可能な落とし穴(gsap_css_transform_conflict、media_crossorigin_breaks_preview、video_nested_in_timed_element、media_missing_id など)を網羅し、lint エラーによって layout や contrast の監査も連動して無効化されることを警告します。
Never put `crossorigin` on `<video>`/`<audio>`. `lint` rejects it unconditionally with `media_crossorigin_breaks_preview` (error), including for canvas/WebGL/WebAudio readback. There is no suppression.
決定論的レンダリングは(推奨事項ではなく)厳格なルールです。レンダリング時のクロック、シードなしの Math.random、ネットワークアクセス、入力状態の参照は禁止、`repeat: -1` は禁止、clip 要素に対する display や生 visibility のトゥイーンは禁止、body テキスト内の `<br>` は禁止です。
No render-time clocks / unseeded `Math.random` / network / input-state; no `repeat: -1` (use a finite count).
サブコンポジションのアセンブリ規約はファイル構造レベルまで厳密に定義されています。スタンドアロンのルートは `<template>` でラップしてはならず(lint エラー standalone_composition_wrapped_in_template)、サブコンポジションは必ず `<template>` でラップし style/script を template 内に配置しなければなりません(hasTemplate ゲートがファイル先頭の style/script を破棄するため)。また、host、inner、timeline key には同一の ID を使用します。
for a **templated** sub-composition the assembler drops the file's own `<head>` `<style>`/`<script>` (`packages/core/src/compiler/compositionAssembly.ts`, the `hasTemplate` gate), so put `<style>`/`<script>` **inside** the template.
検証ループは実際に機能し、段階的に構造化されています。`npx hyperframes check` で lint / runtime / layout / motion / contrast の 5 種類を一括実行し、snapshot でフレームを抽出して目視確認、`preview --background` で人間によるレビューを提供し、render はユーザー承認を得てから実行します。
- [ ] `npx hyperframes check` passes (0 findings across lint, runtime, layout, motion, and contrast) - [ ] Projects with sub-compositions: `npx hyperframes snapshot --at <midpoints>` and eyeball each frame
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | hyperframes CLI(check/snapshot/preview/render;命令细节在 /hyperframes-cli) |
| network | GSAP 经 CDN 进 composition(示例/骨架引 jsdelivr gsap;渲染时在 headless 浏览器加载——产物运行依赖,非 skill 自身外发) |
| package | @hyperframes/core / engine(同仓 packages/,真实校验/装配/渲染实现) |
4推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: npx hyperframes check / snapshot / preview --background / render(ローカル CLI: lin
- 网络端点: 外部ネットワークアクセスの宣言: レンダリングおよびプレビュー時、コンポジションは記述内容に従って CDN(jsdelivr。生成物レベルの依存関係であり、vendor 化により回避可能)から gsap などのランタイムライブラリを取得します
- 本地工作目录: ファイルの読み書きと成果物出力: 作成者の出力物: index.html / compositions/*.html / STORYBOARD.md / SCRIPT.md / frame.m
5二重目の独立検証
- [ok] lint 规则名与真实校验器对应 — SKILL.md 引用的编译器路径 packages/core/src/compiler/compositionAssembly.ts 在仓库 packages/core 下实测存在(仓库级 glob 复核);规则命名风格与 .oxlintrc/engine 校验一致。
- [discrepancy] 『document.fonts.ready 内构建可接受』与『禁 async 构建』是否矛盾 — 首轮将两条规则并置易误读:SKILL.md 正文允许在 async callback(fonts.ready)里构建但『register only after the build completes』;animation SKILL.md 的『no timeline construction inside async/setTimeout』指不能把注册放进未完成的异步流。两条实质一致(注册须在构建完成后同步完成),已在 how_it_works 注明而非判定矛盾。
- [ok] preview 进程存活行为 — SKILL.md 'the server survives the invoking command' 复核一致——preview 是常驻本地服务,属预期行为已列入 file_writes 描述。
- [ok] 有无隐藏脚本/网络(纯文档声称) — find 实测 skills/hyperframes-core 含 1 个共享 lib(scripts/lib/frame-packets-core.mjs,packet 数据组装,无 IO 外发);无网络代码。
- [ok] 与其它 skill 的契约引用一致性 — music-to-video frame-worker.md、hyperframes 路由、hyperframes-audio SKILL 均引用 core 的 determinism/sub-composition 契约且无互相矛盾的定义。
6結論
74bec24a87c21ea7…