1仕組みと動作原理
SKILL.mdは4層の知識のエントリポイントおよびルーターとして機能:アトミックルール(rules-index.mdがrules/<name>.md内の48のレシピをインデックス)→ 複数フェーズのシーンブループリント(blueprints-index.mdが22のブループリントをインデックス)→ transitionsディレクトリ(16ファイル)→ techniques.md、さらに12枚のランタイムアダプターカード。
All motion knowledge in one skill: **rules** (atomic recipes), **blueprints** (multi-phase scene templates), **transitions** (scene-to-scene), **techniques** (broader motion-design patterns), and **adapters** (per-runtime APIs).
デフォルトの作成手法=アトミックルールの組み合わせ:ブループリントから始めるのではなく、2〜4個のルールを選び単一の一時停止GSAPタイムラインで連結する。より高速でコード量も少なくなると主張。ブループリントはシーンが事前設計されたテンプレートに合致する場合のみ使用。
Pick 2-4 rules from `rules-index.md`, glue them together with a single paused GSAP timeline, done. This is faster and produces less code than starting from a blueprint.
すべてのレシピはcoreの決定論的規約によって厳格に制約され、アニメーション層固有のルールを追加:レイアウト定数の事前計算(tween中のgetBoundingClientRect禁止 — レンダラーの並行サンプリングで非同期化するため)、空間運動にはGSAP transformエイリアスのみを使用。
**Pre-calculated layout constants** — never derive positions from `getBoundingClientRect()` at tween time. Tween-time DOM measurements desync because the renderer samples in parallel; compute coordinates once at composition setup and reuse.
ランタイムアダプター層が実在:7種のランタイム(GSAPデフォルト + Lottie/Three.js/Anime.js/CSS/WAAPI/TypeGPU-WebGPU)がそれぞれグローバル(window.__hfLottie/window.__hfAnimeなど)に登録され、HyperFramesがすべてを一括シーク可能。アダプターカードは各ランタイムのHyperFrames内での登録/シーク規約を提示。
Multiple runtimes can coexist in one composition. Each registers its instances on the runtime-specific global so HyperFrames can seek all of them in one pass.
監査機能は実スクリプトによりサポート:animation-map.mjsがwindow.__timelines内の全GSAPタイムラインを読み取り、tweenの列挙、bboxのサンプリング、フラグ計算を行い、コレオグラフィレビュー用のanimation-map.json(デッドゾーン、staggerの一貫性、ライフサイクル警告)を出力。
Reads every GSAP timeline registered in window.__timelines, enumerates tweens, samples bboxes at N points per tween, computes flags and human-readable summaries. Outputs a single animation-map.json.
依存関係のブートストラップにはセキュリティ設計が存在:package-loader.mjsは固定されたパッケージスペックのみをインストールし、--ignore-scriptsで依存関係のライフサイクルスクリプトを無効化、shell文字列の連結ではなくargv配列でnpmをspawn、install行は表示のみで実行せず、ブートストラップ前にconfirmBootstrapで同意を要求。
// package-loader — bootstrap optional helper packages only when missing, with // defense-in-depth so a malicious or typo'd dependency can't run on install: // • install runs `npm install --ignore-scripts` — package lifecycle scripts // never execute
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| package | @hyperframes/producer / @hyperframes/core(animation-map.mjs 运行时依赖;项目优先,缺失才 bootstrap) |
| network | 产物运行期 CDN 库(gsap/three/animejs 经 jsdelivr 进 composition/示例——作品级依赖,渲染浏览器加载) |
| cli | hyperframes CLI(lint/check/snapshot/render,验证动画产出;命令细节在 hyperframes-cli) |
| package | 外部 animate-text skill(24 个具名文本动画效果的实现方) |
4推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: node skills/hyperframes-animation/scripts/animation-map.mjs <composition-di
- scripts/ 或 SKILL.md: 外部言語パッケージ依存関係の動的インストールの宣言
- 网络端点: 外部ネットワークアクセスの宣言: パッケージブートストラップ(依存関係が不足しておりユーザーが同意した場合のみ):npmレジストリ公式の@hyperframesパッケージ
- 本地工作目录: ファイルの読み書きと成果物の出力: 作成者の成果物:コンポジションのHTML/スタイル/スクリプト(プロジェクト内)
5二重目の独立検証
- [ok] rules-index/blueprints 数量与路由声称一致 — find 实测 rules/ 48 个 md、blueprints/ 22 个 md、examples/ 13 个 html、adapters/ 12 个 md、transitions/ 16 个,与 SKILL.md/rules-index 描述一致。
- [ok] 『7 个运行时适配器』声称(GSAP+Lottie+Three+Anime+CSS+WAAPI+TypeGPU) — adapters/ 目录实测含对应 7 种 + html-in-canvas-patterns + animate-text + gsap 细分 3 卡;TypeGPU 卡存在(WebGPU/WGSL)。
- [ok] package-loader 安全声称(防依赖投毒) — 源码注释与实现复核:pinned spec 断言(assertPinnedPackageSpecs)、--ignore-scripts、argv spawn、display-only installLine、confirmBootstrap 征求同意——逐条命中。
- [discrepancy] animation-map 是否会在无依赖时擅自联网 — 首轮注记偏『项目优先』;复核发现若项目无包且用户同意 bootstrap 会执行 npm install(网络)——非默认路径但确实存在,已在外联 deps/scripts_executed 如实标注并保持 blue(官方包 + consent + --ignore-scripts)。
- [ok] 有无把文档站链接误当外发依赖 — gsap.com/threejs.org/animejs.com 等仅为 adapter 卡内的 API 文档引用(人类阅读),非运行依赖,未列入 external_deps。
6結論
f370d7615a306ee2…