1仕組みと動作原理
中核の工夫:装置をゼロからモデリングせず、既存の写真を採用。plate.png は展開された折りたたみスマホの実写(手、ベゼル、ヒンジを含む)であり、スキルでは再描画、CSS モデリング、画像の差し替えを厳禁としています。画像が不足している場合は自作せず、停止して再インストールします。
`assets/plate.png` IS the device. Never recreate, redraw, or CSS-model the foldable, its bezel, the hinge, or the hands, and never substitute a different image.
リグは固定ブロック:2つの .screen 矩形、それぞれの角丸、ヒンジの分割線はその写真からピクセル単位で実測されたものであり、エージェントは各 .content 内のコンテンツと単一の共有タイムラインのみを変更できます。
/* ===== LOCKED RIG — do not edit this block. Geometry is measured from the plate. ===== */
セグメンテーションではなく幾何学によるマスク:過去に輝度セグメンテーション+モルフォロジー閉演算で mask-image を作成した際、ヒンジ側の 12 px の角丸が潰れ、ヒンジ分割線のアンチエイリアスが失われたため、エッジと角丸の数値を実測して CSS の角丸矩形を直接適用する方法に変更しました。
Lesson: for device-screen replacement, measure edges and corners numerically and build the mask from geometry. Never ship a morphology-cleaned segmentation as a mask.
シーク性を担保するタイムライン規律:全体で許可される GSAP タイムラインは共有の1本のみ(マーカー箇所の tl にトゥイーンを追加)。2本目のタイムライン作成や2つ目の window.__timelines キーの登録、repeat:-1、Math.random、クロック依存の記述は禁止されています。
One timeline. Add your tweens to `tl` inside the marked hook; do not create a second `gsap.timeline` or register another `window.__timelines` key.
意図的に最小化されたスキャフォールド:build.mjs はネットワークアクセス不要、外部依存関係なしで、--out 内のみに出力。書き込み前には必ず lstat を検証し、シンボリックリンク越しの書き込みを拒否します。plate、screen-spec、(任意の)実物アイコンテーブルをプロジェクトにコピーし、フレーム仕様を 1448×1086@30fps に固定します。
if (st.isSymbolicLink()) throw new Error(`refusing to write through symlink: ${p}`);
リアリティを保証する素材収集規律:TikTok や Instagram を再現する場合、モバイル版 Web から実際のアイコンやレイアウト寸法を抽出し、実在の投稿やフォロワー数などの数値を組み合わせる必要があります。架空のアカウント名の作成は、ユーザーが明示的に架空/パロディ画面を求めた場合のみ許可されます。
Real content must be real: if the user asks for TikTok or Instagram, pull the actual UI glyphs and layout metrics from the live site and use real posts (with their real usernames and counts), not invented ones.
提供フォーマットの意図的な限定:全体サイズは 1448×1086(ベース写真ネイティブの 4:3)に固定。16:9 や 1:1 にしたい場合は後工程でのクロップとしてのみ扱い、コンテンツに合わせてリグのサイズを変更することは禁止されています。
| Plate | 1448 × 1086 |
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | HyperFrames CLI(npx hyperframes@latest;check / snapshot / render) |
| network | GSAP 3.14.2(合成页在预览/渲染时由浏览器加载;未随包分发) |
| cli | yt-dlp(取真实帖子的说明、计数与时长;登录态外可用) |
| network | Instagram Reels 直链下载(登出页面里的 scontent-*.cdninstagram.com mp4,用 Safari UA + instagram.com Referer 取;链接数小时内失效) |
| package | Node 18+(自带脚本无第三方依赖) |
| cli | 素材来源:用户自备或按上面配方自抓的片段、头像、字体(SKILL.md 把它们归为用户侧副作用,须来自有权使用的来源) |
| package | 随包的真实应用图标表(icons-tiktok.svg / icons-instagram.svg,从公开移动端 DOM 抠出的 <symbol> 集;含他人商标,声明为戏仿/评论用途) |
4推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: node scripts/build.mjs --out <dir> [--id …] [--duration 10] [--icons tiktok
- 网络端点: 外部ネットワークアクセスの宣言: registry.npmjs.org:npx 経由で HyperFrames CLI を取得(SKILL.md では @latest は可変なためバージョン固定を推奨)
- 本地工作目录: ファイル読み書きとアーティファクト出力: build.mjs は --out 内のみに書き込み:index.html、hyperframes.json、assets/{plate.png,screen-s
5二重目の独立検証
- [ok] build.mjs 是否真的无网络、无第三方依赖 — import 仅 { promises as fs } from 'node:fs'、path、fileURLToPath;无 fetch/http/https/dns/child_process。全部行为是读模板、字符串替换 __COMPOSITION_ID__/__DURATION__、写文件与拷贝资源。头注释亦声明 '// No network access. No dependencies beyond Node 18+.'
- [ok] 『不改 rig』是否只是文案(模板与 spec 是否一致) — 模板 #screen-left{left:223px;width:495px} / #screen-right{left:724px;width:498px}、.screen{top:105px;height:849px}、圆角 56px 12px 与 screen-spec.json 的 rect/outer_corner_radius_px/hinge_corner_radius_px 完全对应;build.mjs 也把可用视口打印成 '495x849' / '498x849'。
- [ok] feed-recipes.md 引用的图标 symbol 是否随包(避免抄了配方却没有图标) — grep 确认 assets/icons-instagram.svg 内含 id="ig-like-filled"(配方里 tl.set('#ig-heart-use', { attr: { href: '#ig-like-filled' } }, 2.7) 用到),另有 ig-like/ig-comment/ig-share/ig-home/ig-reels/ig-search/ig-camera/ig-verified 等 10 个 symbol;icons-tiktok.svg 含 tt-like/tt-comment/tt-bookmark/tt-share/tt-plus/tt-home/tt-discover/tt-inbox/tt-profile/tt-search/tt-add/tt-live/tt-verified/tt-note 共 14 个。
- [discrepancy] SKILL.md 的『Network and side effects (complete list)』是否真的完整 — 该清单只列 registry.npmjs.org 与 cdn.jsdelivr.net,把抓取归入『Anything YOU add to the screens … is your side effect』;但同目录的 references/sourcing-real-ui.md 给出了具体抓取路径(www.tiktok.com、instagram.com、scontent-*.cdninstagram.com)与 UA/Referer 做法,并附 ffmpeg 裁片命令。对只读 SKILL.md 的用户而言,执行期外发面被低估了(文档级出入,非代码行为不符)。
- [unlocatable] 『几何是从照片逐像素量出来的』能否在包内独立复核 — screen-spec.json 给出了量测结论(左右 rect、r=56/12、铰链 x719–723)与出处推文,但两个屏幕已被抹平、原始推文照片不在包内,且本次为只读侦查不联网取原图,故这些数值无法独立复算;references/screen-geometry.md 提供的是重测方法而非原始数据。
- [ok] 状态栏与铰链的还原是否有据可依 — screen-spec.json 的 hinge 字段(x 719 / w 5 / rgb(130,133,142))与 status_bar(左 9:41@x44,y18;右 wifi_battery_right_inset 40)给出像素级依据;feed-recipes.md 的忠实度清单要求复现该分置,SKILL.md 亦在 Flow 第 3 步复述。
- [ok] 底图与预览图的引用是否都在包内 — SKILL.md 正文  与 build.mjs 拷贝的 assets/plate.png、assets/screen-spec.json 均在包内;plate-preview.jpg 仅作预览,不参与渲染。
6結論
d33100badc2a58ee…