orca-flow 0.0.0-stage → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/LICENSE +21 -0
  3. package/README.md +86 -2
  4. package/ROADMAP.md +83 -0
  5. package/bin/oflow.mjs +80 -0
  6. package/package.json +52 -4
  7. package/references/checklists/migrations.md +8 -0
  8. package/references/checklists/performance.md +8 -0
  9. package/references/checklists/security.md +9 -0
  10. package/references/checklists/ui-a11y.md +8 -0
  11. package/site/app.js +271 -0
  12. package/site/cinema.js +125 -0
  13. package/site/data.js +243 -0
  14. package/site/favicon.svg +14 -0
  15. package/site/i18n.js +86 -0
  16. package/site/index.html +306 -0
  17. package/site/motion.js +200 -0
  18. package/site/playbook.js +221 -0
  19. package/site/styles.css +244 -0
  20. package/skills/architecture/SKILL.md +17 -0
  21. package/skills/build-ticket/SKILL.md +29 -0
  22. package/skills/debug/SKILL.md +17 -0
  23. package/skills/grill-spec/SKILL.md +26 -0
  24. package/skills/lead-effort/SKILL.md +26 -0
  25. package/skills/proto-spike/SKILL.md +17 -0
  26. package/skills/resume/SKILL.md +26 -0
  27. package/skills/retro-guardrail/SKILL.md +19 -0
  28. package/skills/setup-project/SKILL.md +26 -0
  29. package/skills/slice-tickets/SKILL.md +31 -0
  30. package/skills/verify-app/SKILL.md +22 -0
  31. package/src/agents.mjs +278 -0
  32. package/src/checkpoint.mjs +160 -0
  33. package/src/config.mjs +140 -0
  34. package/src/doctor.mjs +190 -0
  35. package/src/gate.mjs +205 -0
  36. package/src/git.mjs +149 -0
  37. package/src/hook.mjs +168 -0
  38. package/src/init.mjs +149 -0
  39. package/src/install.mjs +192 -0
  40. package/src/lock.mjs +80 -0
  41. package/src/pr.mjs +120 -0
  42. package/src/review.mjs +254 -0
  43. package/src/seal.mjs +200 -0
  44. package/src/site-server.mjs +57 -0
  45. package/src/stats.mjs +257 -0
  46. package/src/status.mjs +234 -0
  47. package/src/tracker-github.mjs +196 -0
  48. package/src/wave.mjs +193 -0
  49. package/src/worker.mjs +297 -0
@@ -0,0 +1,14 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
2
+ <rect width="32" height="32" rx="8" fill="#09090B" />
3
+ <rect x="0.75" y="0.75" width="30.5" height="30.5" rx="7.25" stroke="#27272A" stroke-width="1.5" />
4
+ <defs>
5
+ <linearGradient id="g" x1="7" y1="6" x2="25" y2="26" gradientUnits="userSpaceOnUse">
6
+ <stop offset="0%" stop-color="#38BDF8" />
7
+ <stop offset="100%" stop-color="#34D399" />
8
+ </linearGradient>
9
+ </defs>
10
+ <line x1="10" y1="7" x2="10" y2="19" stroke="url(#g)" stroke-width="2.4" stroke-linecap="round" />
11
+ <circle cx="22" cy="10" r="3" stroke="#38BDF8" stroke-width="2.2" />
12
+ <circle cx="10" cy="22" r="3" stroke="#34D399" stroke-width="2.2" />
13
+ <path d="M22 13a9 9 0 0 1-9 9" stroke="url(#g)" stroke-width="2.4" stroke-linecap="round" />
14
+ </svg>
package/site/i18n.js ADDED
@@ -0,0 +1,86 @@
1
+ export const I18N = {
2
+ en: {
3
+ "brand.tag": "v1.3.0",
4
+ "nav.cinema": "How It Works", "nav.playbook": "Playbook", "nav.guardrails": "Guardrails", "nav.skills": "Catalog (32)", "nav.cmdk": "Quick Jump",
5
+ "hero.eyebrow": "ONE WORKFLOW KIT FOR CLAUDE · CODEX · AGY",
6
+ "hero.title": "Ship multi-AI software on one device.",
7
+ "hero.sub": "Install once on macOS, Linux or Windows — drop into any repo. Isolate features in Orca worktrees, swap vendors on 429 limits, and approve PRs from your phone.",
8
+ "hero.modeNpx": "npx (1-Line)", "hero.modeUnix": "macOS / Linux", "hero.modeWin": "Windows", "hero.modeInit": "Init Repo", "hero.copyCmd": "Copy",
9
+ "hero.linkRecipes": "Usage Templates ->", "hero.linkFlow": "How It Works ↓",
10
+ "ade.title": "ORCA ADE WORKSPACE", "ade.sidebar": "WORKTREES (4)", "ade.replay": "Replay", "ade.auto": "Auto", "ade.autoOn": "Auto: ON",
11
+ "ade.clickHint": "Click a worktree to watch real oflow output", "ade.inspector": "TELEMETRY INSPECTOR",
12
+ "ade.insPatch": "Patch-ID Stamp", "ade.insCtx": "Context Budget (150k warn)", "ade.insGate": "Local Gate", "ade.insReviewer": "Assigned Model",
13
+ "cin.eyebrow": "HOW IT WORKS · TICKET LIFECYCLE",
14
+ "cin.title": "Scroll through one ticket from spec to phone merge.",
15
+ "cin.sub": "Scroll smoothly on desktop or click any stage to trace where work runs and gets verified.",
16
+ "cin.scrollHint": "SCROLL OR CLICK STAGE", "cin.hudEngine": "ACTIVE ENGINE", "cin.hudPatch": "PATCH-ID", "cin.hudCtx": "CONTEXT", "cin.hudGate": "LIVE CLI",
17
+ "pb.eyebrow": "HOW TO USE IT · 4 READY-TO-RUN RECIPES",
18
+ "pb.title": "Know what to run, where to type it, and grab templates.",
19
+ "pb.sub": "Every action lives in exactly one surface. Click a badge to filter all 32 assets, or copy a complete workflow below.",
20
+ "pb.surfCli": "$ TERMINAL (17 CLI)", "pb.surfCliDesc": "Run oflow commands in Terminal for repos, worktrees & gates",
21
+ "pb.surfSlash": "/ AI CHAT (7 /SLASH)", "pb.surfSlashDesc": "Paste /command in Claude, Codex or AGY chat to plan & slice",
22
+ "pb.surfAuto": "⚡ AI AUTO (4 SKILLS)", "pb.surfAutoDesc": "Worker AI triggers TDD, debug & Playwright verify automatically",
23
+ "pb.nextBtn": "Next Scenario ->",
24
+ "guard.eyebrow": "SMART GUARDRAILS & STACK CONFIG",
25
+ "guard.title": "Enforce rigor by blast radius — never slow docs down.",
26
+ "guard.sub": "Test Risk-beats-size review routing and inspect ready-to-use .orca-flow.json stack templates.",
27
+ "pipe.sigLabel": "TOUCHED SIGNALS", "pipe.sigAuth": "OAuth / Session", "pipe.sigBilling": "Billing / Lock",
28
+ "pipe.sigDb": "Git / Migration", "pipe.sigLarge": "> 50 LOC Diff", "pipe.sigDocs": "Docs / Copy Only",
29
+ "pipe.preLabel": "SCENARIOS", "pipe.preCrit": "Critical Auth", "pipe.preStd": "Feature > 50 LOC", "pipe.preFast": "Docs Only",
30
+ "pipe.laneLabel": "ACTIVE LANE", "pipe.approverLabel": "REQUIRED GATE",
31
+ "pipe.stRun": "ACTIVE", "pipe.stSkip": "BYPASSED", "pipe.stPeer": "CROSS-VENDOR", "pipe.stSolo": "SOLO FRESH-CTX", "pipe.stHuman": "HUMAN GATE",
32
+ "cfg.title": ".orca-flow.json Template", "cfg.rosterLabel": "ACTIVE AGENTS", "cfg.copyInit": "Copy Init CLI", "cfg.copyJson": "Copy Config",
33
+ "dir.eyebrow": "COMPLETE CHEAT-SHEET · 32 ASSETS", "dir.title": "Every CLI command, /slash prompt, auto skill & checklist.",
34
+ "dir.searchPlaceholder": "Filter 32 assets (e.g. slice, stats, wave, hook)...",
35
+ "dir.tabAll": "All (32)", "dir.tabCli": "Terminal CLI (17)", "dir.tabSlash": "Chat /Slash (7)", "dir.tabAuto": "AI Auto (4)", "dir.tabCheck": "Checklists (4)",
36
+ "dir.expandAll": "Show all 32", "dir.compactView": "Compact (8)",
37
+ "dir.thType": "SURFACE", "dir.thName": "IDENTIFIER", "dir.thDesc": "PURPOSE", "dir.thCopy": "ACTION",
38
+ "dir.empty": "No matching asset found.", "dir.resetBtn": "Reset Filter", "dir.rowHint": "Click any row or Copy button to copy invocation",
39
+ "foot.copy": "MIT · Synthesizing Matt Pocock, Vercel skills, Addy Osmani checklists & Orca ADE.",
40
+ "foot.shortcut": "Press Cmd+K anywhere to jump",
41
+ "cmdk.placeholder": "Jump to section, toggle theme/lang, or copy asset...", "cmdk.hint": "Up/Down Navigate · Enter Run/Copy · Esc Close",
42
+ "toast.copied": "Copied to clipboard"
43
+ },
44
+ vi: {
45
+ "brand.tag": "v1.3.0",
46
+ "nav.cinema": "Hoạt động", "nav.playbook": "Cách dùng", "nav.guardrails": "Cơ chế khóa", "nav.skills": "Danh mục (32)", "nav.cmdk": "Tìm nhanh",
47
+ "hero.eyebrow": "BỘ QUY TRÌNH CHUNG CHO CLAUDE · CODEX · AGY",
48
+ "hero.title": "Vận hành đa AI trên một thiết bị.",
49
+ "hero.sub": "Cài 1 lần trên macOS, Linux hoặc Windows — gắn vào mọi dự án. Chia task ra từng Orca worktree độc lập, tự đổi hãng AI khi chạm quota 429 và duyệt PR từ điện thoại.",
50
+ "hero.modeNpx": "npx (1 Dòng)", "hero.modeUnix": "macOS / Linux", "hero.modeWin": "Windows", "hero.modeInit": "Gắn vào dự án", "hero.copyCmd": "Chép",
51
+ "hero.linkRecipes": "Xem 4 Kịch bản Mẫu ->", "hero.linkFlow": "Xem Luồng Chạy ↓",
52
+ "ade.title": "KHÔNG GIAN ORCA ADE", "ade.sidebar": "WORKTREE (4)", "ade.replay": "Chạy lại", "ade.auto": "Tự đổi", "ade.autoOn": "Tự đổi: BẬT",
53
+ "ade.clickHint": "Bấm chọn worktree để xem luồng oflow thật", "ade.inspector": "GIÁM SÁT TELEMETRY",
54
+ "ade.insPatch": "Dấu Patch-ID", "ade.insCtx": "Ngân sách Context (ngưỡng 150k)", "ade.insGate": "Gate cục bộ", "ade.insReviewer": "Model phụ trách",
55
+ "cin.eyebrow": "CÁCH HOẠT ĐỘNG · VÒNG ĐỜI TICKET",
56
+ "cin.title": "Cuộn để xem một ticket đi từ spec tới duyệt trên điện thoại.",
57
+ "cin.sub": "Cuộn trên máy tính hoặc bấm từng chặng để xem mỗi AI và công cụ phối hợp ra sao.",
58
+ "cin.scrollHint": "CUỘN HOẶC BẤM CHẶNG", "cin.hudEngine": "ENGINE CHÍNH", "cin.hudPatch": "MÃ PATCH-ID", "cin.hudCtx": "NGỮ CẢNH", "cin.hudGate": "LỆNH THỰC THI",
59
+ "pb.eyebrow": "CÁCH DÙNG THỰC TẾ · 4 KỊCH BẢN MẪU",
60
+ "pb.title": "Nhìn là biết gõ gì, gõ ở đâu, có mẫu copy xài ngay.",
61
+ "pb.sub": "Mỗi thứ chỉ nằm ở 1 nơi cố định. Bấm 3 thẻ phân loại để lọc bảng lệnh bên dưới, hoặc chọn kịch bản để chép mẫu.",
62
+ "pb.surfCli": "$ TERMINAL (17 CLI)", "pb.surfCliDesc": "Gõ lệnh oflow ở Terminal để khởi tạo, mở worktree, gate & PR",
63
+ "pb.surfSlash": "/ CHAT AI (7 /SLASH)", "pb.surfSlashDesc": "Dán /lệnh vào khung chat Claude, Codex hoặc AGY để lên plan",
64
+ "pb.surfAuto": "⚡ AI TỰ CHẠY (4 SKILL)", "pb.surfAutoDesc": "Worker tự gọi TDD, debug & Playwright verify, không cần nhắc",
65
+ "pb.nextBtn": "Kịch bản tiếp ->",
66
+ "guard.eyebrow": "CƠ CHẾ BẢO VỆ & CẤU HÌNH MẪU",
67
+ "guard.title": "Siết chặt đúng vùng rủi ro — không làm chậm docs.",
68
+ "guard.sub": "Thử phân luồng kiểm duyệt theo Rủi ro và xem trước file cấu hình .orca-flow.json gắn dự án.",
69
+ "pipe.sigLabel": "VÙNG CODE CHẠM TỚI", "pipe.sigAuth": "OAuth / Phiên", "pipe.sigBilling": "Thanh toán / Lock",
70
+ "pipe.sigDb": "Git / Migration", "pipe.sigLarge": "Diff > 50 dòng", "pipe.sigDocs": "Chỉ Docs / Copy",
71
+ "pipe.preLabel": "CHỌN NHANH", "pipe.preCrit": "Auth Tối trọng", "pipe.preStd": "Feature > 50 LOC", "pipe.preFast": "Chỉ Docs",
72
+ "pipe.laneLabel": "LUỒNG ÁP DỤNG", "pipe.approverLabel": "CỔNG DUYỆT YÊU CẦU",
73
+ "pipe.stRun": "CHẠY", "pipe.stSkip": "BỎ QUA", "pipe.stPeer": "REVIEW CHÉO", "pipe.stSolo": "ĐỘC LẬP", "pipe.stHuman": "NGƯỜI DUYỆT",
74
+ "cfg.title": "File mẫu .orca-flow.json", "cfg.rosterLabel": "AI ĐANG BẬT", "cfg.copyInit": "Chép lệnh Init", "cfg.copyJson": "Chép JSON",
75
+ "dir.eyebrow": "BẢNG TRA CỨU NHANH · ĐỦ 32 THÀNH PHẦN", "dir.title": "Toàn bộ lệnh Terminal, /slash Chat AI, Auto Skill & Checklist.",
76
+ "dir.searchPlaceholder": "Tìm nhanh trong 32 mục (vd: slice, stats, wave, hook)...",
77
+ "dir.tabAll": "Tất cả (32)", "dir.tabCli": "Terminal (17)", "dir.tabSlash": "Chat /Slash (7)", "dir.tabAuto": "AI Tự chạy (4)", "dir.tabCheck": "Checklist (4)",
78
+ "dir.expandAll": "Hiện đủ 32", "dir.compactView": "Thu gọn (8)",
79
+ "dir.thType": "CHẠY Ở", "dir.thName": "ĐỊNH DANH", "dir.thDesc": "MỤC ĐÍCH", "dir.thCopy": "CHÉP",
80
+ "dir.empty": "Không có mục nào khớp từ khóa.", "dir.resetBtn": "Xóa bộ lọc", "dir.rowHint": "Bấm thẳng vào dòng hoặc nút Chép để copy lệnh/mẫu",
81
+ "foot.copy": "MIT · Tổng hợp tinh hoa Matt Pocock, Vercel skills, Addy Osmani & Orca ADE.",
82
+ "foot.shortcut": "Bấm Cmd+K ở bất kỳ đâu để tìm nhanh",
83
+ "cmdk.placeholder": "Nhảy tới mục, đổi Sáng/Tối, hoặc chép lệnh...", "cmdk.hint": "Lên/Xuống Chọn · Enter Thực thi · Esc Đóng",
84
+ "toast.copied": "Đã chép vào bộ nhớ tạm"
85
+ }
86
+ };
@@ -0,0 +1,306 @@
1
+ <!doctype html>
2
+ <html lang="en" data-theme="dark">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>orca-flow — One Workflow Kit for Claude, Codex &amp; AGY</title>
7
+ <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
8
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@700;800&display=swap" rel="stylesheet" />
11
+ <link rel="stylesheet" href="./styles.css" />
12
+ </head>
13
+ <body>
14
+ <header class="topbar">
15
+ <div class="topbar-inner">
16
+ <a href="#top" class="brand">
17
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
18
+ <line x1="6" y1="3" x2="6" y2="15" /><circle cx="18" cy="6" r="3" /><circle cx="6" cy="18" r="3" /><path d="M18 9a9 9 0 0 1-9 9" />
19
+ </svg>
20
+ <span>orca-flow</span>
21
+ <span class="brand-badge mono" data-i18n="brand.tag">v1.3.0</span>
22
+ </a>
23
+ <nav class="nav-links" aria-label="Main">
24
+ <a href="#cinema" class="nav-link" data-i18n="nav.cinema">How It Works</a>
25
+ <a href="#playbook" class="nav-link" data-i18n="nav.playbook">Playbook</a>
26
+ <a href="#guardrails" class="nav-link" data-i18n="nav.guardrails">Guardrails</a>
27
+ <a href="#directory" class="nav-link" data-i18n="nav.skills">Catalog (32)</a>
28
+ </nav>
29
+ <div class="top-controls">
30
+ <button id="cmdkBtn" class="ctrl-btn" type="button" aria-label="Open quick jump">
31
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
32
+ <circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" />
33
+ </svg>
34
+ <span data-i18n="nav.cmdk">Quick Jump</span>
35
+ <kbd class="kbd mono">Cmd+K</kbd>
36
+ </button>
37
+ <div class="lang-group" role="group" aria-label="Language">
38
+ <button id="langEn" class="lang-btn active" type="button">EN</button>
39
+ <button id="langVi" class="lang-btn" type="button">VI</button>
40
+ </div>
41
+ <a href="https://github.com/Gressi-177/orca-flow" class="ctrl-btn" target="_blank" rel="noopener noreferrer" aria-label="GitHub repository">
42
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
43
+ <path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4" /><path d="M9 18c-4.51 2-5-2-7-2" />
44
+ </svg>
45
+ </a>
46
+ <button id="themeBtn" class="ctrl-btn" type="button" aria-label="Toggle theme">
47
+ <svg id="themeIcon" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
48
+ <circle cx="12" cy="12" r="4" /><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32 1.41-1.41" />
49
+ </svg>
50
+ </button>
51
+ </div>
52
+ <div id="scrollProgress" class="scroll-progress" aria-hidden="true"></div>
53
+ </div>
54
+ </header>
55
+
56
+ <main id="top" class="page-rail">
57
+ <section class="section-frame hero-frame">
58
+ <svg class="ch ch-l" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
59
+ <svg class="ch ch-r" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
60
+
61
+ <div class="hero-center">
62
+ <div class="beam-pill hero-stagger">
63
+ <span class="beam-spin" aria-hidden="true"></span>
64
+ <span class="beam-inner mono"><span class="beam-dot"></span><span data-i18n="hero.eyebrow">ONE WORKFLOW KIT FOR CLAUDE · CODEX · AGY</span></span>
65
+ </div>
66
+ <h1 class="hero-title hero-stagger" data-i18n="hero.title">Ship multi-AI software on one device.</h1>
67
+ <p class="hero-sub hero-stagger" data-i18n="hero.sub">Install once on macOS, Linux or Windows — drop into any repo. Isolate features in Orca worktrees, swap vendors on 429 limits, and approve PRs from your phone.</p>
68
+
69
+ <div class="cli-box hero-stagger">
70
+ <div class="cli-tabs">
71
+ <button class="tab-btn" data-cli="npx" type="button" data-i18n="hero.modeNpx">npx (1-Line)</button>
72
+ <button class="tab-btn active" data-cli="unix" type="button" data-i18n="hero.modeUnix">macOS / Linux</button>
73
+ <button class="tab-btn" data-cli="win" type="button" data-i18n="hero.modeWin">Windows</button>
74
+ <button class="tab-btn" data-cli="init" type="button" data-i18n="hero.modeInit">Init Repo</button>
75
+ </div>
76
+ <div class="cli-line-row">
77
+ <pre class="cli-pre"><code class="mono" id="heroCliCode">git clone https://github.com/Gressi-177/orca-flow ~/.orca-flow
78
+ npm --prefix ~/.orca-flow link &amp;&amp; oflow install</code></pre>
79
+ <button id="heroCopyCmd" class="copy-mini mono" type="button" data-i18n="hero.copyCmd">Copy</button>
80
+ </div>
81
+ </div>
82
+ <div class="hero-links hero-stagger">
83
+ <a href="#playbook" class="hero-jump" data-i18n="hero.linkRecipes">Usage Templates -&gt;</a>
84
+ <a href="#cinema" class="hero-jump" data-i18n="hero.linkFlow">How It Works ↓</a>
85
+ </div>
86
+ </div>
87
+
88
+ <div class="ade-stage">
89
+ <div class="ade-window" id="adeWindow" aria-label="Interactive Orca ADE Workspace">
90
+ <div class="ade-bar">
91
+ <div class="ade-bar-l"><div class="ade-dots" aria-hidden="true"><span></span><span></span><span></span></div><span class="mono" data-i18n="ade.title">ORCA ADE WORKSPACE</span></div>
92
+ <div class="ade-bar-r">
93
+ <button id="adeReplayBtn" class="copy-mini mono" type="button" data-i18n="ade.replay">Replay</button>
94
+ <button id="adeAutoBtn" class="copy-mini mono" type="button" data-i18n="ade.auto">Auto</button>
95
+ <span id="adeActiveBranch" class="pill green mono">feat/auth-01</span>
96
+ </div>
97
+ </div>
98
+ <div class="ade-grid">
99
+ <div class="ade-sidebar">
100
+ <div class="ade-pane-lbl mono" data-i18n="ade.sidebar">WORKTREES (4)</div>
101
+ <div id="adeSidebarList"></div>
102
+ <div class="ade-hint mono" data-i18n="ade.clickHint">Click a worktree to watch real oflow output</div>
103
+ </div>
104
+ <div class="ade-terminal mono" id="adeTerminal"></div>
105
+ <div class="ade-inspector">
106
+ <div class="ade-pane-lbl mono" data-i18n="ade.inspector">TELEMETRY INSPECTOR</div>
107
+ <div class="ins-card"><div class="ins-k mono" data-i18n="ade.insPatch">Patch-ID Stamp</div><div class="ins-v mono" id="insPatch">e4f9a2b81c</div></div>
108
+ <div class="ins-card"><div class="ins-k mono" data-i18n="ade.insCtx">Context Budget (150k warn)</div><div class="ins-v mono" id="insCtx">48k / 150k</div><div class="ctx-track"><div id="insCtxBar" class="ctx-fill"></div></div></div>
109
+ <div class="ins-card"><div class="ins-k mono" data-i18n="ade.insGate">Local Gate</div><div class="ins-v mono" id="insGate">PASS · CRITICAL PATH</div></div>
110
+ <div class="ins-card"><div class="ins-k mono" data-i18n="ade.insReviewer">Assigned Model</div><div class="ins-v mono" id="insModel">Claude Opus -&gt; Codex 5.4</div></div>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+ </section>
116
+
117
+ <section id="cinema" class="section-frame cinema-section">
118
+ <svg class="ch ch-l" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
119
+ <svg class="ch ch-r" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
120
+ <div class="sec-head" style="margin-bottom:18px;">
121
+ <div class="eyebrow mono" data-i18n="cin.eyebrow">HOW IT WORKS · TICKET LIFECYCLE</div>
122
+ <h2 class="sec-title" data-i18n="cin.title">Scroll through one ticket from spec to phone merge.</h2>
123
+ <p class="sec-sub" data-i18n="cin.sub">Scroll smoothly on desktop or click any stage to trace where work runs and gets verified.</p>
124
+ </div>
125
+ <div class="cinema-grid">
126
+ <div class="cinema-left">
127
+ <div class="cinema-rail"><div id="cinemaRailFill" class="cinema-rail-fill"></div></div>
128
+ <div id="cinemaSteps" style="display:flex; flex-direction:column; gap:8px;"></div>
129
+ </div>
130
+ <div class="cinema-stage spot-card">
131
+ <div style="display:flex; justify-content:space-between; align-items:center; font-size:11px; color:var(--text-dim);">
132
+ <span class="mono" data-i18n="cin.scrollHint">SCROLL OR CLICK STAGE</span>
133
+ <span id="cinGate" class="pill violet mono">ISOLATED</span>
134
+ </div>
135
+ <svg class="cin-svg" viewBox="0 0 460 190" aria-hidden="true">
136
+ <path class="cin-beam" d="M104 44 L174 44" stroke-width="2" fill="none"/>
137
+ <path class="cin-beam" d="M266 44 L318 95" stroke-width="2" fill="none"/>
138
+ <path class="cin-beam" d="M104 146 L174 146 L318 95" stroke-width="2" fill="none"/>
139
+ <path class="cin-beam" d="M372 95 L414 95" stroke-width="2" fill="none"/>
140
+ <g id="nodeWorktree" class="cin-node lit"><rect x="14" y="24" width="90" height="40" rx="6"/><text x="59" y="48" text-anchor="middle" fill="currentColor" font-size="10" font-family="JetBrains Mono, monospace">Worktree</text></g>
141
+ <g id="nodeClaude" class="cin-node lit"><rect x="174" y="24" width="92" height="40" rx="6"/><text x="220" y="48" text-anchor="middle" fill="currentColor" font-size="10" font-family="JetBrains Mono, monospace">Claude Opus</text></g>
142
+ <g id="nodeCodex" class="cin-node"><rect x="14" y="126" width="90" height="40" rx="6"/><text x="59" y="150" text-anchor="middle" fill="currentColor" font-size="10" font-family="JetBrains Mono, monospace">Codex 5.4</text></g>
143
+ <g id="nodeVault" class="cin-node"><rect x="278" y="74" width="94" height="42" rx="6"/><text x="325" y="99" text-anchor="middle" fill="currentColor" font-size="10" font-family="JetBrains Mono, monospace">Patch-ID</text></g>
144
+ <g id="nodePhone" class="cin-node"><rect x="394" y="66" width="54" height="58" rx="9"/><text x="421" y="99" text-anchor="middle" fill="currentColor" font-size="9.5" font-family="JetBrains Mono, monospace">iPhone</text></g>
145
+ </svg>
146
+ <div class="cin-hud">
147
+ <div class="cin-cell"><div class="ins-k mono" data-i18n="cin.hudEngine">ACTIVE ENGINE</div><div class="ins-v mono" id="cinEngine">Claude Opus (Lead)</div></div>
148
+ <div class="cin-cell"><div class="ins-k mono" data-i18n="cin.hudPatch">PATCH-ID</div><div class="ins-v mono" id="cinPatch">e4f9a2b81c</div></div>
149
+ <div class="cin-cell"><div class="ins-k mono" data-i18n="cin.hudCtx">CONTEXT</div><div class="ins-v mono" id="cinCtx">38k / 150k</div></div>
150
+ <div class="cin-cell"><div class="ins-k mono" data-i18n="cin.hudGate">LIVE CLI</div><div class="ins-v mono" id="cinCmd">$ oflow worker feat/auth-01</div></div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </section>
155
+
156
+ <section id="playbook" class="section-frame">
157
+ <svg class="ch ch-l" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
158
+ <svg class="ch ch-r" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
159
+ <div class="sec-head reveal-item">
160
+ <div class="eyebrow mono" data-i18n="pb.eyebrow">HOW TO USE IT · 4 READY-TO-RUN RECIPES</div>
161
+ <h2 class="sec-title" data-i18n="pb.title">Know what to run, where to type it, and grab templates.</h2>
162
+ <p class="sec-sub" data-i18n="pb.sub">Every action lives in exactly one surface. Click a badge to filter all 32 assets, or copy a complete workflow below.</p>
163
+ </div>
164
+ <div class="mental-strip reveal-item">
165
+ <button class="mental-pill spot-card" data-surf-jump="cli" type="button"><span class="mental-k mono" style="color:var(--cyan);" data-i18n="pb.surfCli">$ TERMINAL (17 CLI)</span><span class="mental-d" data-i18n="pb.surfCliDesc">Run oflow commands in Terminal for repos, worktrees &amp; gates</span></button>
166
+ <button class="mental-pill spot-card" data-surf-jump="slash" type="button"><span class="mental-k mono" style="color:var(--violet);" data-i18n="pb.surfSlash">/ AI CHAT (7 /SLASH)</span><span class="mental-d" data-i18n="pb.surfSlashDesc">Paste /command in Claude, Codex or AGY chat to plan &amp; slice</span></button>
167
+ <button class="mental-pill spot-card" data-surf-jump="auto" type="button"><span class="mental-k mono" style="color:var(--green);" data-i18n="pb.surfAuto">AI AUTO (4 SKILLS)</span><span class="mental-d" data-i18n="pb.surfAutoDesc">Worker AI triggers TDD, debug &amp; Playwright verify automatically</span></button>
168
+ </div>
169
+ <div class="pb-shell reveal-item">
170
+ <div class="pb-head">
171
+ <div class="btn-group" id="pbTabs"></div>
172
+ <button id="pbNextBtn" class="copy-mini mono" type="button" data-i18n="pb.nextBtn">Next Scenario -&gt;</button>
173
+ </div>
174
+ <div class="pb-steps" id="pbSteps"></div>
175
+ </div>
176
+ </section>
177
+
178
+ <section id="guardrails" class="section-frame">
179
+ <svg class="ch ch-l" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
180
+ <svg class="ch ch-r" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
181
+ <div class="sec-head reveal-item">
182
+ <div class="eyebrow mono" data-i18n="guard.eyebrow">SMART GUARDRAILS &amp; STACK CONFIG</div>
183
+ <h2 class="sec-title" data-i18n="guard.title">Enforce rigor by blast radius — never slow docs down.</h2>
184
+ <p class="sec-sub" data-i18n="guard.sub">Test Risk-beats-size review routing and inspect ready-to-use .orca-flow.json stack templates.</p>
185
+ </div>
186
+
187
+ <div class="guard-pair reveal-item">
188
+ <div class="guard-card spot-card">
189
+ <div class="pipe-controls">
190
+ <div>
191
+ <div class="ins-k mono" data-i18n="pipe.sigLabel">TOUCHED SIGNALS</div>
192
+ <div class="sig-row">
193
+ <button class="sig-chip active" data-sig="auth" type="button"><span class="mono">!</span> <span data-i18n="pipe.sigAuth">OAuth / Session</span></button>
194
+ <button class="sig-chip" data-sig="billing" type="button"><span class="mono">!</span> <span data-i18n="pipe.sigBilling">Billing / Lock</span></button>
195
+ <button class="sig-chip" data-sig="db" type="button"><span class="mono">!</span> <span data-i18n="pipe.sigDb">Git / Migration</span></button>
196
+ <button class="sig-chip" data-sig="large" type="button"><span class="mono">&gt;</span> <span data-i18n="pipe.sigLarge">&gt; 50 LOC Diff</span></button>
197
+ <button class="sig-chip safe" data-sig="docs" type="button"><span class="mono">*</span> <span data-i18n="pipe.sigDocs">Docs / Copy Only</span></button>
198
+ </div>
199
+ </div>
200
+ <div>
201
+ <div class="ins-k mono" data-i18n="pipe.preLabel">SCENARIOS</div>
202
+ <div class="sig-row">
203
+ <button class="tab-btn active" data-preset="crit" type="button" data-i18n="pipe.preCrit">Critical Auth</button>
204
+ <button class="tab-btn" data-preset="std" type="button" data-i18n="pipe.preStd">Feature &gt; 50 LOC</button>
205
+ <button class="tab-btn" data-preset="fast" type="button" data-i18n="pipe.preFast">Docs Only</button>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ <div class="pipe-meta">
210
+ <div><div class="ins-k mono" data-i18n="pipe.laneLabel">ACTIVE LANE</div><div class="cell-title mono" id="pipeLaneOut">CRITICAL PATH</div></div>
211
+ <div><div class="ins-k mono" data-i18n="pipe.approverLabel">REQUIRED GATE</div><div class="cell-title mono" id="pipeGateOut">1x Cross-Vendor + Human Approve</div></div>
212
+ </div>
213
+ <div class="pipe-track"><div id="pipeBeam" class="pipe-beam"></div></div>
214
+ <div class="stepper" id="pipeStepper"></div>
215
+ </div>
216
+
217
+ <div class="editor-shell">
218
+ <div class="editor-top">
219
+ <strong style="font-size:13px;" data-i18n="cfg.title">.orca-flow.json Template</strong>
220
+ <div class="btn-group">
221
+ <button class="tab-btn active" data-stack="node-ts" type="button">node-ts</button>
222
+ <button class="tab-btn" data-stack="python" type="button">python</button>
223
+ <button class="tab-btn" data-stack="go" type="button">go</button>
224
+ <button class="tab-btn" data-stack="custom" type="button">custom</button>
225
+ <button id="copyInitBtn" class="copy-mini mono" type="button" data-i18n="cfg.copyInit">Copy Init CLI</button>
226
+ <button id="copyJsonBtn" class="copy-mini mono" type="button" data-i18n="cfg.copyJson">Copy Config</button>
227
+ </div>
228
+ </div>
229
+ <div class="roster-bar">
230
+ <span class="ins-k mono" data-i18n="cfg.rosterLabel">ACTIVE AGENTS</span>
231
+ <div class="sig-row" style="margin-top:0;">
232
+ <button class="sig-chip safe active" data-agent="claude" type="button">Claude</button>
233
+ <button class="sig-chip safe active" data-agent="codex" type="button">Codex</button>
234
+ <button class="sig-chip safe active" data-agent="antigravity" type="button">AGY</button>
235
+ <span class="pill cyan mono" id="rosterModePill">TRI · CROSS-VENDOR</span>
236
+ </div>
237
+ </div>
238
+ <div style="padding:7px 14px; border-bottom:1px solid var(--border); font-size:12px; color:var(--text-muted);" class="mono" id="stackSummary"></div>
239
+ <div class="editor-body mono" id="stackEditor"></div>
240
+ </div>
241
+ </div>
242
+ </section>
243
+
244
+ <section id="directory" class="section-frame">
245
+ <svg class="ch ch-l" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
246
+ <svg class="ch ch-r" viewBox="0 0 13 13" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M6.5 0v13M0 6.5h13"/></svg>
247
+ <div class="sec-head reveal-item">
248
+ <div class="eyebrow mono" data-i18n="dir.eyebrow">COMPLETE CHEAT-SHEET · 32 ASSETS</div>
249
+ <h2 class="sec-title" data-i18n="dir.title">Every CLI command, /slash prompt, auto skill &amp; checklist.</h2>
250
+ </div>
251
+ <div class="dir-toolbar">
252
+ <input id="dirSearch" class="search-input mono" type="search" placeholder="Filter 32 assets..." aria-label="Filter catalog" />
253
+ <div class="btn-group">
254
+ <span id="dirCount" class="pill cyan mono">8 / 32</span>
255
+ <button class="tab-btn active" data-cat="all" type="button" data-i18n="dir.tabAll">All (32)</button>
256
+ <button class="tab-btn" data-cat="cli" type="button" data-i18n="dir.tabCli">Terminal CLI (17)</button>
257
+ <button class="tab-btn" data-cat="slash" type="button" data-i18n="dir.tabSlash">Chat /Slash (7)</button>
258
+ <button class="tab-btn" data-cat="auto" type="button" data-i18n="dir.tabAuto">AI Auto (4)</button>
259
+ <button class="tab-btn" data-cat="check" type="button" data-i18n="dir.tabCheck">Checklists (4)</button>
260
+ <button id="dirExpandBtn" class="tab-btn" type="button" data-i18n="dir.expandAll">Show all 32</button>
261
+ </div>
262
+ </div>
263
+ <div class="table-wrap">
264
+ <table class="dir-table">
265
+ <thead><tr><th data-i18n="dir.thType">SURFACE</th><th data-i18n="dir.thName">IDENTIFIER</th><th data-i18n="dir.thDesc">PURPOSE</th><th data-i18n="dir.thCopy">ACTION</th></tr></thead>
266
+ <tbody id="dirBody"></tbody>
267
+ </table>
268
+ <div id="dirEmpty" class="dir-empty">
269
+ <span data-i18n="dir.empty">No matching asset found.</span>
270
+ <button id="dirResetBtn" class="tab-btn" type="button" data-i18n="dir.resetBtn">Reset Filter</button>
271
+ </div>
272
+ </div>
273
+ <div class="dir-foot mono"><span data-i18n="dir.rowHint">Click any row or Copy button to copy invocation</span><span>17 TERMINAL · 7 /SLASH · 4 AUTO · 4 CHECKLISTS</span></div>
274
+ </section>
275
+ </main>
276
+
277
+ <footer class="footer">
278
+ <span data-i18n="foot.copy">MIT · Synthesizing Matt Pocock, Vercel skills, Addy Osmani checklists &amp; Orca ADE.</span>
279
+ <span class="mono" data-i18n="foot.shortcut">Press Cmd+K anywhere to jump</span>
280
+ </footer>
281
+
282
+ <div id="cmdkModal" class="cmdk-backdrop" role="dialog" aria-modal="true" aria-label="Quick command palette">
283
+ <div class="cmdk-box" id="cmdkBox">
284
+ <input id="cmdkInput" class="cmdk-input mono" type="text" placeholder="Jump to section, toggle theme/lang, or copy asset..." />
285
+ <div id="cmdkList" class="cmdk-list"></div>
286
+ <div class="cmdk-foot mono" data-i18n="cmdk.hint">Up/Down Navigate · Enter Run/Copy · Esc Close</div>
287
+ </div>
288
+ </div>
289
+
290
+ <div id="copyToast" class="copy-toast" role="status" aria-live="polite">
291
+ <div class="toast-inner">
292
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="var(--green)" stroke-width="2.5" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>
293
+ <div><div style="font-weight:600;" data-i18n="toast.copied">Copied to clipboard</div><div class="toast-cmd mono" id="toastCmd"></div></div>
294
+ </div>
295
+ <div id="toastBar" class="toast-bar"></div>
296
+ </div>
297
+
298
+ <script src="https://cdn.jsdelivr.net/npm/lenis@1.2.3/dist/lenis.min.js"></script>
299
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
300
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrollTrigger.min.js"></script>
301
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/Flip.min.js"></script>
302
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrambleTextPlugin.min.js"></script>
303
+ <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrollToPlugin.min.js"></script>
304
+ <script type="module" src="./app.js"></script>
305
+ </body>
306
+ </html>
package/site/motion.js ADDED
@@ -0,0 +1,200 @@
1
+ const prefersReduced = () =>
2
+ typeof window !== "undefined" &&
3
+ window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches;
4
+
5
+ const g = () => (typeof window !== "undefined" ? window.gsap : null);
6
+
7
+ let motionReady = false;
8
+ let mm = null;
9
+ let lenis = null;
10
+
11
+ export function getLenis() { return lenis; }
12
+
13
+ export function setModalScrollLock(locked) {
14
+ if (!lenis) return;
15
+ if (locked) lenis.stop();
16
+ else lenis.start();
17
+ }
18
+
19
+ export function initMotion({ onSectionEnter } = {}) {
20
+ const gsap = g();
21
+ if (!gsap) return;
22
+ const plugins = [
23
+ window.ScrollTrigger,
24
+ window.Flip,
25
+ window.ScrambleTextPlugin,
26
+ window.ScrollToPlugin
27
+ ].filter(Boolean);
28
+ if (plugins.length) gsap.registerPlugin(...plugins);
29
+ motionReady = true;
30
+
31
+ if (typeof window.Lenis === "function" && !prefersReduced() && !lenis) {
32
+ lenis = new window.Lenis({ duration: 1.05, smoothWheel: true });
33
+ if (window.ScrollTrigger) lenis.on("scroll", window.ScrollTrigger.update);
34
+ gsap.ticker.add((t) => lenis?.raf(t * 1000));
35
+ gsap.ticker.lagSmoothing(0);
36
+ }
37
+
38
+ const topbar = document.querySelector(".topbar");
39
+ const syncTopbar = () => topbar?.classList.toggle("scrolled", window.scrollY > 24);
40
+ window.addEventListener("scroll", syncTopbar, { passive: true });
41
+ syncTopbar();
42
+
43
+ if (mm) mm.revert();
44
+ mm = gsap.matchMedia();
45
+
46
+ mm.add("(prefers-reduced-motion: no-preference)", () => {
47
+ gsap.from(".hero-stagger", {
48
+ y: 20,
49
+ autoAlpha: 0,
50
+ duration: 0.55,
51
+ stagger: 0.06,
52
+ ease: "power3.out",
53
+ clearProps: "transform,opacity,visibility"
54
+ });
55
+
56
+ if (window.ScrollTrigger) {
57
+ const bar = document.querySelector("#scrollProgress");
58
+ if (bar) {
59
+ gsap.to(bar, {
60
+ scaleX: 1,
61
+ ease: "none",
62
+ scrollTrigger: { trigger: ".page-rail", start: "top top", end: "bottom bottom", scrub: 0.12 }
63
+ });
64
+ }
65
+
66
+ document.querySelectorAll("section[id]").forEach((sec) => {
67
+ window.ScrollTrigger.create({
68
+ trigger: sec,
69
+ start: "top 46%",
70
+ end: "bottom 46%",
71
+ onEnter: () => onSectionEnter?.(sec.id),
72
+ onEnterBack: () => onSectionEnter?.(sec.id)
73
+ });
74
+ });
75
+
76
+ document.querySelectorAll(".ch").forEach((ch) => {
77
+ gsap.from(ch, {
78
+ rotation: "-90_cw",
79
+ autoAlpha: 0.3,
80
+ duration: 0.55,
81
+ ease: "power2.out",
82
+ clearProps: "transform,opacity,visibility",
83
+ scrollTrigger: { trigger: ch, start: "top 92%", once: true }
84
+ });
85
+ });
86
+
87
+ window.ScrollTrigger.batch(".reveal-item", {
88
+ start: "top 94%",
89
+ once: true,
90
+ onEnter: (els) =>
91
+ gsap.from(els, {
92
+ y: 22,
93
+ autoAlpha: 0,
94
+ duration: 0.48,
95
+ stagger: 0.06,
96
+ ease: "power3.out",
97
+ clearProps: "transform,opacity,visibility"
98
+ })
99
+ });
100
+ }
101
+ });
102
+
103
+ mm.add("(min-width: 960px) and (prefers-reduced-motion: no-preference)", () => {
104
+ const ade = document.querySelector("#adeWindow");
105
+ if (!ade || !window.ScrollTrigger) return;
106
+ gsap.fromTo(
107
+ ade,
108
+ { rotateX: 13, scale: 0.94, transformPerspective: 1400, transformOrigin: "center top" },
109
+ {
110
+ rotateX: 0,
111
+ scale: 1,
112
+ ease: "none",
113
+ scrollTrigger: { trigger: ".ade-stage", start: "top 38%", end: "top 12%", scrub: 0.65 }
114
+ }
115
+ );
116
+ });
117
+
118
+ mm.add("(hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)", () => {
119
+ const rail = document.querySelector(".page-rail");
120
+ const onRailMove = (e) => {
121
+ const card = e.target.closest?.(".spot-card");
122
+ if (!card) return;
123
+ const r = card.getBoundingClientRect();
124
+ card.style.setProperty("--mx", `${Math.round(e.clientX - r.left)}px`);
125
+ card.style.setProperty("--my", `${Math.round(e.clientY - r.top)}px`);
126
+ };
127
+ rail?.addEventListener("mousemove", onRailMove, { passive: true });
128
+ return () => rail?.removeEventListener("mousemove", onRailMove);
129
+ });
130
+ }
131
+
132
+ export function flipUpdate(targets, mutateDom) {
133
+ const gsap = g();
134
+ const Flip = typeof window !== "undefined" ? window.Flip : null;
135
+ if (!motionReady || !gsap || !Flip || prefersReduced()) { mutateDom(); return; }
136
+ const state = Flip.getState(targets);
137
+ mutateDom();
138
+ Flip.from(state, { duration: 0.24, ease: "power2.out", scale: true, nested: true });
139
+ }
140
+
141
+ export function animateAdeStream({ patchEl, patchText, ctxBarEl, ctxPct }) {
142
+ const gsap = g();
143
+ if (ctxBarEl) ctxBarEl.style.transformOrigin = "left center";
144
+ if (!motionReady || !gsap || prefersReduced()) {
145
+ if (patchEl) patchEl.textContent = patchText;
146
+ if (ctxBarEl) ctxBarEl.style.transform = `scaleX(${ctxPct / 100})`;
147
+ return;
148
+ }
149
+ gsap.fromTo("#adeTerminal .term-line", { x: -8, autoAlpha: 0 }, { x: 0, autoAlpha: 1, duration: 0.24, stagger: 0.03, ease: "power2.out", overwrite: "auto", clearProps: "transform,opacity,visibility" });
150
+ if (patchEl && window.ScrambleTextPlugin) gsap.to(patchEl, { duration: 0.4, scrambleText: { text: patchText, chars: "0123456789abcdef", speed: 0.7 } });
151
+ else if (patchEl) patchEl.textContent = patchText;
152
+ if (ctxBarEl) gsap.to(ctxBarEl, { scaleX: ctxPct / 100, duration: 0.45, ease: "power3.out", overwrite: "auto" });
153
+ }
154
+
155
+ export function animatePipeline({ beamEl, ratio }) {
156
+ const gsap = g();
157
+ if (beamEl) beamEl.style.transformOrigin = "left center";
158
+ if (!motionReady || !gsap || prefersReduced()) { if (beamEl) beamEl.style.transform = `scaleX(${ratio})`; return; }
159
+ if (beamEl) gsap.to(beamEl, { scaleX: ratio, duration: 0.42, ease: "power3.out", overwrite: "auto" });
160
+ gsap.fromTo(".step-node", { y: 6, autoAlpha: 0.7 }, { y: 0, autoAlpha: 1, duration: 0.24, stagger: 0.035, ease: "power2.out", overwrite: "auto", clearProps: "transform,opacity,visibility" });
161
+ }
162
+
163
+ export function animateToastShow(toastEl, barEl) {
164
+ const gsap = g();
165
+ toastEl.classList.add("show");
166
+ if (barEl) barEl.style.transformOrigin = "left center";
167
+ if (!motionReady || !gsap || prefersReduced()) { if (barEl) barEl.style.transform = "scaleX(1)"; return; }
168
+ gsap.killTweensOf([toastEl, barEl]);
169
+ gsap.fromTo(toastEl, { y: 14, autoAlpha: 0 }, { y: 0, autoAlpha: 1, duration: 0.24, ease: "power3.out" });
170
+ if (barEl) gsap.fromTo(barEl, { scaleX: 1 }, { scaleX: 0, duration: 1.75, ease: "none" });
171
+ }
172
+
173
+ export function animateToastHide(toastEl) {
174
+ const gsap = g();
175
+ if (!motionReady || !gsap || prefersReduced()) { toastEl.classList.remove("show"); return; }
176
+ gsap.to(toastEl, { y: 10, autoAlpha: 0, duration: 0.2, ease: "power2.in", onComplete: () => toastEl.classList.remove("show") });
177
+ }
178
+
179
+ export function animateModalOpen(boxEl) {
180
+ const gsap = g();
181
+ if (!motionReady || !gsap || prefersReduced() || !boxEl) return;
182
+ gsap.fromTo(boxEl, { y: 12, scale: 0.97, autoAlpha: 0 }, { y: 0, scale: 1, autoAlpha: 1, duration: 0.22, ease: "power3.out", clearProps: "transform,opacity,visibility" });
183
+ }
184
+
185
+ export function scrollToTarget(hash) {
186
+ const el = typeof hash === "string" ? document.querySelector(hash) : null;
187
+ if (!el) return;
188
+ if (lenis && !prefersReduced()) { lenis.scrollTo(el, { offset: -58 }); return; }
189
+ const gsap = g();
190
+ if (motionReady && gsap && window.ScrollToPlugin && !prefersReduced()) gsap.to(window, { duration: 0.55, scrollTo: { y: hash, offsetY: 58 }, ease: "power3.out" });
191
+ else el.scrollIntoView({ behavior: "auto" });
192
+ }
193
+
194
+ let refreshTimer = null;
195
+ export function refreshTriggers() {
196
+ const ST = typeof window !== "undefined" ? window.ScrollTrigger : null;
197
+ if (!ST) return;
198
+ clearTimeout(refreshTimer);
199
+ refreshTimer = setTimeout(() => ST.refresh(), 80);
200
+ }