Skip to content

andyhuo520/vibe-knowledge / skills/ai-teardown

ai-teardown

Unverified

「AI 拆机课」系列课工作室:输入一个主题(AI 产品、开源项目/书、人物历史、软件教程),产出由浅入深、每句话有出处的中文讲解视频系列 + 每节互动版 + 课程总页。流水线:收集资料 → 确认对象与课时 → 大纲 → 逐节旁白(MiMo 克隆音色 + 逐字对齐)→ scenes.json 画面编排(Notion 极简手绘引擎 / 马卡龙模板引擎,IconPark 图标与插画、Noto 动态 emoji、AntV X6 流程图、像素讲解小人、截图圈注、终端录屏)或 film.js 代码成片(cine 引擎:Three.js、粒子、着色器、真片段叠加、曲库配乐)→ Hyperframes / 无头 GPU 逐帧 1080p 渲染 → Artifact 发布 → 课程总页 + 导学视频。触发:做系列课 / 做课程视频 / 把某本书或某个开源项目做成课 / 科普讲解视频 / 教学视频 / 课程地图 / 导学视频 / 互动课件 / 「拆机课」「上手课」「实战课」「编排课」/ 王炸讲解片 / 用真实会话和成片教人做视频。不用于:单支宣传片(用 promo-video)、单张信息图、纯文章写作。

FileKindSize
SKILL.mdskill md8.9 KB
engine/assets/fonts/Geist-VF.ttfbinary165.1 KB
engine/assets/fonts/GeistMono-VF.ttfbinary167.9 KB
engine/assets/fonts/LXGWWenKai-Medium.ttfbinary24.2 MB
engine/assets/fonts/LXGWWenKai-Regular.ttfbinary24.4 MB
engine/assets/fonts/NotoSansSC-VF.ttfbinary16.9 MB
engine/assets/iconsets/README.mdmarkdown834 B
engine/assets/iconsets/icon-park-outline.jsonconfig984.1 KB
engine/assets/iconsets/icon-park-solid.jsonconfig946.0 KB
engine/assets/iconsets/icon-park-twotone.jsonconfig991.3 KB
engine/assets/iconsets/icon-park.jsonconfig1.5 MB
engine/assets/iconsets/iconoir.jsonconfig648.2 KB
engine/assets/iconsets/lucide.jsonconfig563.5 KB
engine/assets/iconsets/tabler.jsonconfig2.0 MB
engine/assets/illustrations/iconpark/_sheet.htmlother9.8 KB
engine/assets/illustrations/iconpark/a1-1.svgother7.7 KB
engine/assets/illustrations/iconpark/a1-2.svgother5.7 KB
engine/assets/illustrations/iconpark/a1-3.svgother12.8 KB
engine/assets/illustrations/iconpark/a1-4.svgother7.8 KB
engine/assets/illustrations/iconpark/a10-120.svgother18.7 KB
engine/assets/illustrations/iconpark/a10-121.svgother19.6 KB
engine/assets/illustrations/iconpark/a10-122.svgother28.3 KB
engine/assets/illustrations/iconpark/a10-123.svgother33.1 KB
engine/assets/illustrations/iconpark/a11-136.svgother7.9 KB
engine/assets/illustrations/iconpark/a11-137.svgother5.2 KB
engine/assets/illustrations/iconpark/a11-138.svgother6.5 KB
engine/assets/illustrations/iconpark/a11-139.svgother7.8 KB
engine/assets/illustrations/iconpark/a12-152.svgother12.7 KB
engine/assets/illustrations/iconpark/a12-153.svgother13.7 KB
engine/assets/illustrations/iconpark/a12-154.svgother21.2 KB
engine/assets/illustrations/iconpark/a12-155.svgother9.3 KB
engine/assets/illustrations/iconpark/a13-167.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-168.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-169.svgother3.5 KB
engine/assets/illustrations/iconpark/a13-170.svgother4.6 KB
engine/assets/illustrations/iconpark/a14-184.svgother17.4 KB
engine/assets/illustrations/iconpark/a14-185.svgother27.5 KB
engine/assets/illustrations/iconpark/a14-186.svgother35.2 KB
engine/assets/illustrations/iconpark/a14-187.svgother34.1 KB
engine/assets/illustrations/iconpark/a15-200.svgother19.8 KB
engine/assets/illustrations/iconpark/a15-201.svgother20.3 KB
engine/assets/illustrations/iconpark/a15-202.svgother19.2 KB
engine/assets/illustrations/iconpark/a15-203.svgother24.3 KB
engine/assets/illustrations/iconpark/a16-215.svgother10.1 KB
engine/assets/illustrations/iconpark/a16-216.svgother16.5 KB
engine/assets/illustrations/iconpark/a16-217.svgother10.2 KB
engine/assets/illustrations/iconpark/a16-218.svgother15.2 KB
engine/assets/illustrations/iconpark/a17-230.svgother7.0 KB
engine/assets/illustrations/iconpark/a17-231.svgother6.8 KB
engine/assets/illustrations/iconpark/a17-232.svgother8.6 KB
engine/assets/illustrations/iconpark/a17-233.svgother5.5 KB
engine/assets/illustrations/iconpark/a18-245.svgother15.2 KB
engine/assets/illustrations/iconpark/a18-246.svgother14.1 KB
engine/assets/illustrations/iconpark/a18-247.svgother8.9 KB
engine/assets/illustrations/iconpark/a18-248.svgother8.7 KB
engine/assets/illustrations/iconpark/a19-265.svgother9.4 KB
engine/assets/illustrations/iconpark/a19-266.svgother11.5 KB
engine/assets/illustrations/iconpark/a19-267.svgother6.6 KB
engine/assets/illustrations/iconpark/a19-268.svgother5.5 KB
engine/assets/illustrations/iconpark/a2-11.svgother8.8 KB
engine/assets/illustrations/iconpark/a2-12.svgother10.7 KB
engine/assets/illustrations/iconpark/a2-13.svgother116.5 KB
engine/assets/illustrations/iconpark/a2-14.svgother35.3 KB
engine/assets/illustrations/iconpark/a20-280.svgother10.4 KB
engine/assets/illustrations/iconpark/a20-281.svgother17.7 KB
engine/assets/illustrations/iconpark/a20-282.svgother12.5 KB
engine/assets/illustrations/iconpark/a20-283.svgother13.1 KB
engine/assets/illustrations/iconpark/a21-295.svgother10.4 KB
engine/assets/illustrations/iconpark/a21-296.svgother21.2 KB
engine/assets/illustrations/iconpark/a21-297.svgother8.3 KB
engine/assets/illustrations/iconpark/a21-298.svgother17.5 KB
engine/assets/illustrations/iconpark/a22-327.svgother10.6 KB
engine/assets/illustrations/iconpark/a22-328.svgother12.4 KB
engine/assets/illustrations/iconpark/a22-329.svgother5.4 KB
engine/assets/illustrations/iconpark/a22-330.svgother10.5 KB
engine/assets/illustrations/iconpark/a3-19.svgother8.0 KB
engine/assets/illustrations/iconpark/a3-20.svgother8.4 KB
engine/assets/illustrations/iconpark/a3-21.svgother10.1 KB
engine/assets/illustrations/iconpark/a3-22.svgother10.4 KB
engine/assets/illustrations/iconpark/a4-31.svgother2.7 KB
engine/assets/illustrations/iconpark/a4-32.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-33.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-34.svgother1.5 KB
engine/assets/illustrations/iconpark/a5-46.svgother21.5 KB
engine/assets/illustrations/iconpark/a5-47.svgother15.0 KB
engine/assets/illustrations/iconpark/a5-48.svgother11.8 KB
engine/assets/illustrations/iconpark/a5-49.svgother19.8 KB
engine/assets/illustrations/iconpark/a6-52.svgother15.5 KB
engine/assets/illustrations/iconpark/a6-53.svgother2.9 KB
engine/assets/illustrations/iconpark/a6-54.svgother3.6 KB
engine/assets/illustrations/iconpark/a6-55.svgother4.1 KB
engine/assets/illustrations/iconpark/a7-67.svgother6.0 KB
engine/assets/illustrations/iconpark/a7-68.svgother14.1 KB
engine/assets/illustrations/iconpark/a7-71.svgother10.8 KB
engine/assets/illustrations/iconpark/a7-72.svgother21.6 KB
engine/assets/illustrations/iconpark/a8-87.svgother3.3 KB
engine/assets/illustrations/iconpark/a8-88.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-89.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-90.svgother2.5 KB
engine/assets/illustrations/iconpark/a9-101.svgother4.7 KB
engine/assets/illustrations/iconpark/a9-102.svgother5.3 KB
engine/assets/illustrations/iconpark/a9-103.svgother5.2 KB
engine/assets/illustrations/iconpark/a9-104.svgother8.9 KB
engine/assets/illustrations/iconpark/catalog.jsonconfig19.7 KB
engine/cine/audio/sfx/README.mdmarkdown404 B
engine/cine/audio/sfx/key-1.wavbinary14.7 KB
engine/cine/audio/sfx/key-2.wavbinary14.7 KB
engine/cine/audio/sfx/key-3.wavbinary14.7 KB
engine/cine/audio/sfx/key-4.wavbinary14.7 KB
engine/cine/audio/sfx/key-5.wavbinary14.7 KB
engine/cine/audio/sfx/key-6.wavbinary14.7 KB
engine/cine/audio/sfx/key-7.wavbinary14.7 KB
engine/cine/audio/sfx/key-8.wavbinary14.7 KB
engine/cine/audio/sfx/key-space.wavbinary14.7 KB
engine/cine/audio/timeline.jsonconfig38.4 KB
engine/cine/audio/tools/bed.pyscript37.0 KB
engine/cine/audio/tools/score.pyscript93.0 KB
engine/cine/engine/core.jsscript4.4 KB
engine/cine/engine/glsl.jsscript2.6 KB
engine/cine/engine/narr.jsscript2.7 KB
engine/cine/engine/post.jsscript7.4 KB
engine/cine/engine/scenes/bars.jsscript4.8 KB
engine/cine/engine/scenes/clock.jsscript8.2 KB
engine/cine/engine/scenes/liquid.jsscript4.1 KB
engine/cine/engine/scenes/particles.jsscript9.5 KB
engine/cine/engine/scenes/showroom.jsscript5.0 KB
engine/cine/engine/scenes/tunnel.jsscript4.3 KB
engine/cine/engine/ui.jsscript9.2 KB
engine/cine/engine/util.jsscript2.8 KB
engine/cine/index.htmlother1.4 KB
engine/cine/tools/browser.pyscript802 B
engine/cine/tools/clips.pyscript3.1 KB
engine/cine/tools/deliver.shexecutablescript1.3 KB
engine/cine/tools/finish.pyscript9.3 KB
engine/cine/tools/loopbed.pyscript2.3 KB
engine/cine/tools/queue.shexecutablescript1.7 KB
engine/cine/tools/record.pyscript2.8 KB
engine/cine/tools/retail.pyscript1.8 KB
engine/cine/tools/stills.pyscript2.4 KB
engine/primitives/cards.jsscript13.5 KB
engine/primitives/floaties.jsscript2.5 KB
engine/primitives/loop.jsscript8.2 KB
engine/primitives/mascot.jsscript6.8 KB
engine/primitives/mindmap.jsscript6.7 KB
engine/primitives/morph.jsscript9.2 KB
engine/primitives/motion.jsscript22.5 KB
engine/primitives/portrait.jsscript4.9 KB
engine/primitives/practice.jsscript8.6 KB
engine/primitives/sandbox.jsscript7.4 KB
engine/primitives/scribble.jsscript6.7 KB
engine/primitives/sketch.jsscript23.1 KB
engine/primitives/story.jsscript21.9 KB
engine/primitives/systemmap.jsscript11.4 KB
engine/primitives/terminal.jsscript8.5 KB
engine/primitives/timeline.jsscript7.1 KB
engine/primitives/typer.jsscript9.9 KB
engine/runtime/dom.jsscript4.1 KB
engine/runtime/ease.jsscript2.1 KB
engine/runtime/hosts/player.jsscript11.4 KB
engine/runtime/iconify.jsscript3.1 KB
engine/runtime/lesson.jsscript25.6 KB
engine/runtime/overlays.jsscript13.6 KB
engine/runtime/sketch.jsscript60.8 KB
engine/runtime/spring.jsscript2.8 KB
engine/runtime/stage.jsscript6.6 KB
engine/runtime/theme.jsscript6.5 KB
engine/runtime/typing.jsscript4.4 KB
engine/schemas/brief.schema.jsonconfig2.8 KB
engine/schemas/concepts.schema.jsonconfig3.8 KB
engine/schemas/facts.schema.jsonconfig2.4 KB
engine/schemas/lesson.schema.jsonconfig7.0 KB
engine/schemas/sources.schema.jsonconfig1.8 KB
engine/scripts/check.pyscript13.7 KB
engine/scripts/check_scenes.pyscript3.7 KB
engine/scripts/course_page.pyscript24.5 KB
engine/scripts/emoji.pyscript2.5 KB
engine/scripts/export_cues.pyscript975 B
engine/scripts/facts_js.pyscript1.6 KB
engine/scripts/fetch_images.pyscript4.6 KB
engine/scripts/fx_render.pyscript7.8 KB
engine/scripts/hf_host.pyscript4.8 KB
engine/scripts/icons.pyscript1.7 KB
engine/scripts/illus.pyscript852 B
engine/scripts/ledger.pyscript1.1 KB
engine/scripts/make_lesson.pyscript11.5 KB
engine/scripts/mark_live.pyscript1.0 KB
engine/scripts/mix.pyscript4.4 KB
engine/scripts/new_series.pyscript5.1 KB
engine/scripts/noto_emoji.pyscript3.2 KB
engine/scripts/outline.pyscript4.4 KB
engine/scripts/publish_lesson.pyscript6.3 KB
engine/scripts/rec_scan.pyscript1.2 KB
engine/scripts/render_queue.shexecutablescript770 B
engine/scripts/review_page.pyscript6.9 KB
engine/scripts/serve_range.pyscript1.4 KB
engine/scripts/sketch_publish_files.pyscript2.1 KB
engine/scripts/speed.pyscript1.8 KB
engine/scripts/stills.pyscript2.2 KB
engine/scripts/term_cut.pyscript1.1 KB
engine/scripts/term_frames.pyscript7.8 KB

engine/primitives/systemmap.js

View on GitHub
/**
 * SystemMap 总图:节点 + 带动作标签的连线,支持逐个出现、点亮、压暗其他、打开(为推进下一层让路)。
 * 诚实编码:official 实线;inferred 虚线 + 「推断」;undisclosed 雾化填充 + 「未披露」。
 *
 * params
 *   nodes  [{id, label, sub?, subAt?, role, x, y, w=260, h=110, r=22, icon?, honesty?, facts?, ghost?, labelAt?}]
 *   edges  [{from, to, label?, labelSide?, honesty?, facts?, bend=0, both=false, gap=10}]   labelSide: above | below
 *   reveal {id | "from>to": t}   出现时刻(本地秒);缺省 0
 *   lit    {id: [[t0, t1?], ...]}  点亮窗口
 *   dim    [[t0, t1, [keepIds]]]    压暗窗口:除 keepIds 外都变暗
 *   open   {id: t}                  打开节点:标签和底色淡出,给下一层内容让位
 *   close  {id: t}                  关上:镜头拉回后,标签和底色回来
 *   font   {label=34, sub=22, edge=24}
 */
import { s, h, setStyle, setAttr, icon } from "../runtime/dom.js";
import { appear, pulse, REVEAL } from "../runtime/spring.js";
import { mix } from "../runtime/ease.js";

const CSS = `
.sm-svg{position:absolute;overflow:visible;pointer-events:none}
.sm-anchor{position:absolute;left:0;top:0;width:0;height:0}
.sm-node{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:4px;white-space:nowrap}
.sm-node .row{display:flex;align-items:center;gap:12px;position:relative}
.sm-node .t{font-weight:650;color:var(--ink);letter-spacing:.01em;line-height:1.15}
.sm-node .t.lit{position:absolute;right:0;top:0;color:#fff;opacity:0}
.sm-node .sub{font-weight:450;color:var(--ink2);line-height:1.2}
.sm-edge{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;padding:3px 10px;border-radius:8px;
  background:var(--bg);color:var(--ink2);font-weight:500;line-height:1.3}
.sm-honest{position:absolute;transform:translate(-100%,-50%);white-space:nowrap;font-weight:600;letter-spacing:.08em;
  padding:3px 9px;border-radius:7px;background:var(--bg);color:var(--ink2);border:1.5px dashed var(--ink3)}
`;

const clipToRect = (cx, cy, dx, dy, hw, hh) => {
  if (hw <= 0 && hh <= 0) return [cx, cy];
  const tx = dx === 0 ? Infinity : hw / Math.abs(dx);
  const ty = dy === 0 ? Infinity : hh / Math.abs(dy);
  const k = Math.min(tx, ty);
  return [cx + dx * k, cy + dy * k];
};

const quadLen = (p0, c, p1) => {
  let len = 0;
  let prev = p0;
  for (let i = 1; i <= 24; i++) {
    const u = i / 24;
    const x = (1 - u) * (1 - u) * p0[0] + 2 * (1 - u) * u * c[0] + u * u * p1[0];
    const y = (1 - u) * (1 - u) * p0[1] + 2 * (1 - u) * u * c[1] + u * u * p1[1];
    len += Math.hypot(x - prev[0], y - prev[1]);
    prev = [x, y];
  }
  return len;
};

export default {
  name: "SystemMap",
  create(root, p, ctx) {
    ctx.css("sm-css", CSS);
    const font = { label: 34, sub: 22, edge: 24, ...(p.font ?? {}) };
    const nodes = p.nodes.map((n) => ({ w: 260, h: 110, r: 22, honesty: "official", facts: [], ...n }));
    const byId = Object.fromEntries(nodes.map((n) => [n.id, n]));
    const reveal = p.reveal ?? {};
    const uid = ctx.id.replace(/[^a-z0-9]/gi, "");

    const pad = 80;
    const xs = nodes.flatMap((n) => [n.x - n.w / 2, n.x + n.w / 2]);
    const ys = nodes.flatMap((n) => [n.y - n.h / 2, n.y + n.h / 2]);
    const [x0, y0] = [Math.min(...xs) - pad, Math.min(...ys) - pad];
    const [W, H] = [Math.max(...xs) + pad - x0, Math.max(...ys) + pad - y0];
    const svg = s("svg", { class: "sm-svg", width: W, height: H, viewBox: `${x0} ${y0} ${W} ${H}` });
    Object.assign(svg.style, { left: `${x0}px`, top: `${y0}px` });
    svg.append(s("defs", {},
      s("marker", { id: `arr-${uid}`, viewBox: "0 0 10 10", refX: 8.5, refY: 5, markerWidth: 5.5, markerHeight: 5.5, orient: "auto-start-reverse" },
        s("path", { d: "M0,0 L10,5 L0,10 z", style: "fill:var(--ink2)" })),
      s("pattern", { id: `fog-${uid}`, width: 14, height: 14, patternUnits: "userSpaceOnUse", patternTransform: "rotate(45)" },
        s("line", { x1: 0, y1: 0, x2: 0, y2: 14, style: "stroke:var(--ink3);stroke-width:3;opacity:.45" }))));
    const gEdges = s("g");
    const gNodes = s("g");
    svg.append(gEdges, gNodes);
    root.append(svg);
    const labels = h("div", { class: "sm-anchor" });
    root.append(labels);

    // ---- nodes ----
    const nodeEls = nodes.map((n) => {
      if (n.ghost) return { n };
      const frame = s("rect", {
        x: n.x - n.w / 2, y: n.y - n.h / 2, width: n.w, height: n.h, rx: n.r,
        style: `fill:${n.honesty === "undisclosed" ? `url(#fog-${uid})` : `var(--${n.role}-t)`};stroke:var(--${n.role});stroke-width:${n.focus ? 3.2 : 2.4}${n.honesty === "inferred" ? ";stroke-dasharray:12 9" : ""}`,
      });
      const litRect = s("rect", { x: n.x - n.w / 2, y: n.y - n.h / 2, width: n.w, height: n.h, rx: n.r, style: `fill:var(--${n.role});opacity:0` });
      gNodes.append(frame, litRect);
      const label = h("div", { class: "sm-node" });
      const row = h("div", { class: "row" });
      if (n.icon) row.append(icon(n.icon, Math.round(font.label * 1.05), `var(--${n.role})`));
      const t1 = h("span", { class: "t", text: n.label });
      const t2 = h("span", { class: "t lit", text: n.label });
      t1.style.fontSize = t2.style.fontSize = `${font.label}px`;
      row.append(t1, t2);
      label.append(row);
      let sub = null;
      if (n.sub) {
        sub = h("span", { class: "sub", text: n.sub });
        sub.style.fontSize = `${font.sub}px`;
        label.append(sub);
      }
      const tl = n.labelAt === "tl";
      label.style.left = `${tl ? n.x - n.w / 2 + 34 : n.x}px`;
      label.style.top = `${tl ? n.y - n.h / 2 + 26 : n.y}px`;
      if (tl) label.style.alignItems = "flex-start";
      labels.append(label);
      let honest = null;
      if (n.honesty !== "official") {
        honest = h("div", { class: "sm-honest", text: n.honesty === "inferred" ? "推断" : "未披露" });
        honest.style.fontSize = `${Math.round(font.sub * 0.9)}px`;
        honest.style.left = `${n.x + n.w / 2 - 10}px`;
        honest.style.top = `${n.y - n.h / 2}px`;
        labels.append(honest);
      }
      return { n, frame, litRect, label, t1, t2, sub, honest, base: tl ? "translate(0,0)" : "translate(-50%,-50%)" };
    });

    // ---- edges ----
    const edgeEls = (p.edges ?? []).map((e) => {
      const a = byId[e.from];
      const b = byId[e.to];
      const gap = e.gap ?? 10;
      const d = [b.x - a.x, b.y - a.y];
      const L = Math.hypot(...d) || 1;
      const u = [d[0] / L, d[1] / L];
      const bend = e.bend ?? 0;
      const nrm = [-u[1], u[0]];
      const mid = [(a.x + b.x) / 2 + nrm[0] * bend, (a.y + b.y) / 2 + nrm[1] * bend];
      const dirA = bend ? [mid[0] - a.x, mid[1] - a.y] : d;
      const dirB = bend ? [b.x - mid[0], b.y - mid[1]] : d;
      const la = Math.hypot(...dirA) || 1;
      const lb = Math.hypot(...dirB) || 1;
      const p0 = clipToRect(a.x, a.y, dirA[0] / la, dirA[1] / la, a.ghost ? 0 : a.w / 2 + gap, a.ghost ? 0 : a.h / 2 + gap);
      const p1 = clipToRect(b.x, b.y, -dirB[0] / lb, -dirB[1] / lb, b.ghost ? 0 : b.w / 2 + gap, b.ghost ? 0 : b.h / 2 + gap);
      const dAttr = bend ? `M${p0[0]},${p0[1]} Q${mid[0]},${mid[1]} ${p1[0]},${p1[1]}` : `M${p0[0]},${p0[1]} L${p1[0]},${p1[1]}`;
      const len = bend ? quadLen(p0, mid, p1) : Math.hypot(p1[0] - p0[0], p1[1] - p0[1]);
      const path = s("path", { d: dAttr, style: `fill:none;stroke:var(--ink2);stroke-width:2.4;stroke-linecap:round${e.honesty === "inferred" ? ";stroke-dasharray:10 8" : ""}` });
      gEdges.append(path);
      let label = null;
      if (e.label) {
        const lm = bend ? [0.25 * p0[0] + 0.5 * mid[0] + 0.25 * p1[0], 0.25 * p0[1] + 0.5 * mid[1] + 0.25 * p1[1]] : [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
        const below = e.labelSide === "below";
        const off = Math.abs(u[0]) >= Math.abs(u[1]) ? [0, (below ? 1 : -1) * font.edge * 0.95] : [font.edge * 0.6, 0];
        label = h("div", { class: "sm-edge", text: e.label });
        label.style.fontSize = `${font.edge}px`;
        label.style.left = `${lm[0] + (bend ? 0 : off[0])}px`;
        label.style.top = `${lm[1] + (bend ? 0 : off[1])}px`;
        if (!bend && off[0] > 0) label.style.transform = "translate(0,-50%)";
        labels.append(label);
      }
      const key = `${e.from}>${e.to}`;
      const t0 = reveal[key] ?? Math.max(reveal[e.from] ?? 0, reveal[e.to] ?? 0) + 0.3;
      return { e, path, len, label, t0, both: e.both };
    });

    const openAmount = (id, t) =>
      p.open?.[id] == null ? 0 : appear(t, p.open[id]) * (1 - (p.close?.[id] == null ? 0 : appear(t, p.close[id])));
    const litAmount = (id, t) => (p.lit?.[id] ?? []).reduce((acc, [a, b]) => acc + pulse(t, a, b ?? Infinity), 0);
    const dimAmount = (id, t) => (p.dim ?? []).reduce((acc, [a, b, keep]) => acc + (keep.includes(id) ? 0 : pulse(t, a, b)), 0);

    const beats = [
      ...nodes.filter((n) => !n.ghost).map((n) => ({ t: reveal[n.id] ?? 0, id: `reveal:${n.id}`, label: n.label })),
      ...Object.entries(p.open ?? {}).map(([id, t]) => ({ t, id: `open:${id}`, label: `推进:${byId[id]?.label ?? id}` })),
    ].sort((a, b) => a.t - b.t);

    return {
      beats,
      render(t) {
        for (const ne of nodeEls) {
          if (ne.n.ghost) continue;
          const { n } = ne;
          const a = appear(t, reveal[n.id] ?? 0);
          const o = openAmount(n.id, t);
          const lit = Math.min(1, litAmount(n.id, t));
          const dim = 1 - 0.68 * Math.min(1, dimAmount(n.id, t));
          const vis = a * dim;
          setStyle(ne.frame, "opacity", (vis * (1 - o)).toFixed(3));
          setStyle(ne.litRect, "opacity", (lit * 0.92 * a * (1 - o)).toFixed(3));
          setStyle(ne.label, "opacity", (vis * (1 - o)).toFixed(3));
          setStyle(ne.label, "transform", `${ne.base} translateY(${((1 - a) * 12).toFixed(2)}px) scale(${mix(0.96, 1, a).toFixed(4)})`);
          setStyle(ne.t2, "opacity", lit.toFixed(3));
          setStyle(ne.t1, "opacity", (1 - lit).toFixed(3));
          if (ne.honest) setStyle(ne.honest, "opacity", (vis * (1 - o)).toFixed(3));
          if (ne.sub && n.subAt != null) setStyle(ne.sub, "opacity", appear(t, n.subAt).toFixed(3));
        }
        for (const ed of edgeEls) {
          const e = appear(t, ed.t0);
          const dim = 1 - 0.68 * Math.min(1, Math.max(dimAmount(ed.e.from, t), dimAmount(ed.e.to, t)));
          const o = Math.max(openAmount(ed.e.from, t), openAmount(ed.e.to, t));
          if (ed.e.honesty === "inferred") setStyle(ed.path, "opacity", (e * dim * (1 - o)).toFixed(3));
          else {
            setAttr(ed.path, "stroke-dasharray", `${ed.len.toFixed(1)} ${ed.len.toFixed(1)}`);
            setAttr(ed.path, "stroke-dashoffset", (ed.len * (1 - e)).toFixed(1));
            setStyle(ed.path, "opacity", (dim * (1 - o)).toFixed(3));
          }
          const done = e > 0.96;
          setAttr(ed.path, "marker-end", done ? `url(#arr-${uid})` : "none");
          setAttr(ed.path, "marker-start", done && ed.both ? `url(#arr-${uid})` : "none");
          if (ed.label) setStyle(ed.label, "opacity", (appear(t, ed.t0 + 0.25) * dim * (1 - o)).toFixed(3));
        }
      },
      hotspots(t) {
        const out = [];
        for (const ne of nodeEls) if (ne.label && ne.n.facts.length && appear(t, reveal[ne.n.id] ?? 0) > 0.5) out.push({ el: ne.label, facts: ne.n.facts, label: ne.n.label });
        for (const ed of edgeEls) if (ed.label && (ed.e.facts ?? []).length && appear(t, ed.t0) > 0.5) out.push({ el: ed.label, facts: ed.e.facts, label: ed.e.label });
        return out;
      },
    };
  },
};
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall