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,221 @@
1
+ import { flipUpdate } from "./motion.js";
2
+
3
+ const g = () => (typeof window !== "undefined" ? window.gsap : null);
4
+ const prefersReduced = () =>
5
+ typeof window !== "undefined" &&
6
+ window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches;
7
+
8
+ export const PLAYBOOK_RECIPES = [
9
+ {
10
+ id: "setup",
11
+ enTab: "01 · First Setup (5m)",
12
+ viTab: "01 · Cài Lần Đầu (5p)",
13
+ steps: [
14
+ {
15
+ surf: "cli", badgeEn: "$ TERMINAL (MAC / LINUX)", badgeVi: "$ TERMINAL (MAC / LINUX)", copyable: true,
16
+ cmd: "git clone https://github.com/Gressi-177/orca-flow ~/.orca-flow\nnpm --prefix ~/.orca-flow link && oflow install",
17
+ enOut: "Installs global oflow CLI + links 11 skills across Claude, Codex & AGY.",
18
+ viOut: "Cài lệnh oflow toàn máy + symlink 11 skill sang Claude, Codex & AGY."
19
+ },
20
+ {
21
+ surf: "cli", badgeEn: "$ POWERSHELL (WINDOWS)", badgeVi: "$ POWERSHELL (WINDOWS)", copyable: true,
22
+ cmd: "git clone https://github.com/Gressi-177/orca-flow \"$HOME\\.orca-flow\"\nnpm --prefix \"$HOME\\.orca-flow\" link; oflow install",
23
+ enOut: "Windows setup: links oflow globally and registers 11 skills safely.",
24
+ viOut: "Cho Windows: cài oflow toàn máy và đồng bộ 11 skill an toàn."
25
+ },
26
+ {
27
+ surf: "cli", badgeEn: "$ ANY PROJECT", badgeVi: "$ DỰ ÁN BẤT KỲ", copyable: true,
28
+ cmd: "cd your-app && oflow init --preset auto",
29
+ enOut: "Generates .orca-flow.json, AGENTS.md, CLAUDE.md symlink & .scratch/.",
30
+ viOut: "Sinh .orca-flow.json, AGENTS.md ngắn gọn, symlink CLAUDE.md & .scratch/."
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ id: "feature",
36
+ enTab: "02 · Build Feature",
37
+ viTab: "02 · Làm Feature Mới",
38
+ steps: [
39
+ {
40
+ surf: "slash", badgeEn: "/ LEAD AI CHAT", badgeVi: "/ CHAT LEAD AI", copyable: true,
41
+ cmd: "/grill-spec Add Google OAuth PKCE login with session rotation. Ask edge cases first.",
42
+ enOut: "AI interviews you to expose blind spots before writing code.",
43
+ viOut: "AI hỏi xoáy để bịt sạch lỗ hổng spec trước khi viết dòng code đầu tiên."
44
+ },
45
+ {
46
+ surf: "slash", badgeEn: "/ LEAD AI CHAT", badgeVi: "/ CHAT LEAD AI", copyable: true,
47
+ cmd: "/slice-tickets Split approved spec into parallel non-overlapping slices in .scratch/",
48
+ enOut: "Breaks work into conflict-free vertical tickets with Blocked by order.",
49
+ viOut: "Cắt spec thành các ticket dọc chạy song song không đụng file nhau."
50
+ },
51
+ {
52
+ surf: "cli", badgeEn: "$ TERMINAL + AUTO", badgeVi: "$ TERMINAL + AUTO", copyable: true,
53
+ cmd: "oflow worker T-01 --type feat",
54
+ enOut: "Spawns isolated Orca worktree; worker AI auto-runs architecture + TDD + verify-app.",
55
+ viOut: "Mở Orca worktree riêng; worker AI tự chạy architecture + TDD + verify-app."
56
+ },
57
+ {
58
+ surf: "cli", badgeEn: "$ TERMINAL", badgeVi: "$ TERMINAL", copyable: true,
59
+ cmd: "oflow gate && oflow review run && oflow pr",
60
+ enOut: "Seals merge-base Patch-ID, runs peer AI review & opens risk-labeled PR.",
61
+ viOut: "Khóa dấu Patch-ID, review chéo AI khác hãng & tạo GitHub PR."
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ id: "bug",
67
+ enTab: "03 · Fix Bug",
68
+ viTab: "03 · Sửa Bug Khó",
69
+ steps: [
70
+ {
71
+ surf: "cli", badgeEn: "$ TERMINAL", badgeVi: "$ TERMINAL", copyable: true,
72
+ cmd: "oflow worker fix-race --type fix",
73
+ enOut: "Opens clean bugfix worktree so trial fixes never dirty main.",
74
+ viOut: "Mở worktree sửa bug cô lập, thử nghiệm thoải mái không làm bẩn main."
75
+ },
76
+ {
77
+ surf: "auto", badgeEn: "AI AUTO", badgeVi: "AI TỰ CHẠY", copyable: true,
78
+ cmd: "Fix flaky 401 refresh race in auth tests (keep root-cause proof before editing)",
79
+ enOut: "Paste bug report in Worker Chat -> auto-triggers debug & verify-app.",
80
+ viOut: "Dán lỗi vào Chat Worker -> AI tự kích hoạt skill debug & verify-app."
81
+ },
82
+ {
83
+ surf: "cli", badgeEn: "$ TERMINAL", badgeVi: "$ TERMINAL", copyable: true,
84
+ cmd: "oflow gate && oflow pr",
85
+ enOut: "Verifies 300-line ratchet + regression test pass before PR.",
86
+ viOut: "Kiểm tra lại file dưới 300 dòng & unit test chống tái phát rồi mở PR."
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ id: "failover",
92
+ enTab: "04 · 429 Failover",
93
+ viTab: "04 · Đảo AI Lúc 429",
94
+ steps: [
95
+ {
96
+ surf: "cli", badgeEn: "$ TERMINAL", badgeVi: "$ TERMINAL", copyable: true,
97
+ cmd: "oflow checkpoint handoff",
98
+ enOut: "Triggered when Claude/Codex hits 429 or 150k context ceiling -> packs 3-item summary.",
99
+ viOut: "Chạy khi chạm 429 hoặc ngưỡng 150k token -> đóng gói bàn giao 3 ý."
100
+ },
101
+ {
102
+ surf: "slash", badgeEn: "/ NEXT AI CHAT", badgeVi: "/ CHAT AI MỚI", copyable: true,
103
+ cmd: "/resume Continue from latest .orca-flow handoff packet and finish remaining checks.",
104
+ enOut: "Paste in Codex / AGY / Claude session -> continues seamlessly with zero lost diff.",
105
+ viOut: "Dán vào cửa sổ AI hãng mới -> tiếp tục mượt mà trên đúng diff cũ."
106
+ },
107
+ {
108
+ surf: "phone", badgeEn: "IPHONE ORCA", badgeVi: "ĐIỆN THOẠI", copyable: false,
109
+ cmd: "Orca Mobile Push -> Tap Approve Merge",
110
+ enOut: "Receive Push alert when gate & cross-vendor review pass; approve away from desk.",
111
+ viOut: "Nhận thông báo khi Gate & Review chéo xong; bấm duyệt ngay từ điện thoại."
112
+ }
113
+ ]
114
+ }
115
+ ];
116
+
117
+ let activeId = "setup";
118
+ let curLang = "en";
119
+ let onCopy = () => {};
120
+ let onSurfaceJump = () => {};
121
+
122
+ function renderRecipe(animate = false) {
123
+ const recipe = PLAYBOOK_RECIPES.find((r) => r.id === activeId) || PLAYBOOK_RECIPES[0];
124
+ const tabsBox = document.querySelector("#pbTabs");
125
+ if (tabsBox) {
126
+ const drawTabs = () => {
127
+ tabsBox.replaceChildren();
128
+ PLAYBOOK_RECIPES.forEach((r) => {
129
+ const b = document.createElement("button");
130
+ b.type = "button";
131
+ b.dataset.flipId = `pb-${r.id}`;
132
+ b.className = `tab-btn ${r.id === activeId ? "active" : ""}`;
133
+ b.textContent = curLang === "vi" ? r.viTab : r.enTab;
134
+ b.onclick = () => selectPlaybookStep(r.id, true);
135
+ tabsBox.appendChild(b);
136
+ });
137
+ };
138
+ if (animate) flipUpdate("#pbTabs .tab-btn", drawTabs);
139
+ else drawTabs();
140
+ }
141
+
142
+ const body = document.querySelector("#pbSteps");
143
+ if (!body) return;
144
+ body.replaceChildren();
145
+ const toneMap = { cli: "cyan", slash: "violet", auto: "green", phone: "amber" };
146
+
147
+ recipe.steps.forEach((st, idx) => {
148
+ const row = document.createElement("div");
149
+ row.className = "pb-step";
150
+
151
+ const top = document.createElement("div");
152
+ top.className = "pb-step-top";
153
+ const num = document.createElement("span");
154
+ num.className = "mono pb-idx";
155
+ num.textContent = `0${idx + 1}`;
156
+ const pill = document.createElement("span");
157
+ pill.className = `pill ${toneMap[st.surf] || "cyan"} mono`;
158
+ pill.textContent = curLang === "vi" ? st.badgeVi : st.badgeEn;
159
+ top.append(num, pill);
160
+
161
+ const cmdWrap = document.createElement("div");
162
+ cmdWrap.className = "pb-cmd-row";
163
+ const code = document.createElement("code");
164
+ code.className = "mono";
165
+ code.textContent = st.cmd;
166
+ cmdWrap.appendChild(code);
167
+
168
+ if (st.copyable) {
169
+ const btn = document.createElement("button");
170
+ btn.type = "button";
171
+ btn.className = "copy-mini mono";
172
+ btn.textContent = curLang === "vi" ? "Chép" : "Copy";
173
+ btn.onclick = () => onCopy(st.cmd);
174
+ cmdWrap.appendChild(btn);
175
+ }
176
+
177
+ const out = document.createElement("div");
178
+ out.className = "pb-out";
179
+ out.textContent = curLang === "vi" ? st.viOut : st.enOut;
180
+
181
+ row.append(top, cmdWrap, out);
182
+ body.appendChild(row);
183
+ });
184
+
185
+ const gsap = g();
186
+ if (animate && gsap && !prefersReduced()) {
187
+ gsap.fromTo(
188
+ "#pbSteps .pb-step",
189
+ { y: 10, autoAlpha: 0 },
190
+ { y: 0, autoAlpha: 1, duration: 0.28, stagger: 0.05, ease: "power2.out", clearProps: "transform,opacity,visibility" }
191
+ );
192
+ }
193
+ }
194
+
195
+ export function selectPlaybookStep(idOrIdx, animate = true) {
196
+ if (typeof idOrIdx === "number") {
197
+ const item = PLAYBOOK_RECIPES[Math.max(0, Math.min(PLAYBOOK_RECIPES.length - 1, idOrIdx))];
198
+ activeId = item.id;
199
+ } else {
200
+ activeId = idOrIdx;
201
+ }
202
+ renderRecipe(animate);
203
+ }
204
+
205
+ export function renderPlaybook(lang = curLang) {
206
+ curLang = lang;
207
+ renderRecipe(false);
208
+ }
209
+
210
+ export function initPlaybook({ copyText, onFilterCatalog } = {}) {
211
+ if (copyText) onCopy = copyText;
212
+ if (onFilterCatalog) onSurfaceJump = onFilterCatalog;
213
+ document.querySelector("#pbNextBtn")?.addEventListener("click", () => {
214
+ const i = PLAYBOOK_RECIPES.findIndex((r) => r.id === activeId);
215
+ selectPlaybookStep((i + 1) % PLAYBOOK_RECIPES.length, true);
216
+ });
217
+ document.querySelectorAll("[data-surf-jump]").forEach((btn) => {
218
+ btn.addEventListener("click", () => onSurfaceJump(btn.dataset.surfJump));
219
+ });
220
+ renderRecipe(false);
221
+ }
@@ -0,0 +1,244 @@
1
+ :root,
2
+ [data-theme="dark"] {
3
+ --bg: #050507; --surface: #0C0C10; --surface-2: #14141A; --surface-hover: #1C1C25;
4
+ --border: rgba(255, 255, 255, 0.09); --spec: rgba(255, 255, 255, 0.2);
5
+ --text: #FAFAFA; --text-muted: #A1A1AA; --text-dim: #8A8A96;
6
+ --cta-bg: #FAFAFA; --cta-fg: #050507; --cta-hover: #E4E4E7;
7
+ --title-grad: linear-gradient(180deg, #FFFFFF 35%, #9CA3AF 100%);
8
+ --green: #34D399; --green-bg: rgba(16, 185, 129, 0.13);
9
+ --cyan: #38BDF8; --cyan-bg: rgba(56, 189, 248, 0.13);
10
+ --amber: #FBBF24; --amber-bg: rgba(245, 158, 11, 0.13);
11
+ --violet: #A78BFA; --violet-bg: rgba(167, 139, 250, 0.13);
12
+ --rose: #FB7185; --rose-bg: rgba(244, 63, 94, 0.13);
13
+ --glass: rgba(10, 10, 14, 0.78); --grid-line: rgba(255, 255, 255, 0.04); --card-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
14
+ --aurora: radial-gradient(ellipse 75% 48% at 50% -6%, rgba(56, 189, 248, 0.2), rgba(52, 211, 153, 0.08) 45%, transparent 74%);
15
+ }
16
+ [data-theme="light"] {
17
+ --bg: #FAFAF7; --surface: #FFFFFF; --surface-2: #F2F2EC; --surface-hover: #E8E8E0;
18
+ --border: rgba(9, 9, 11, 0.1); --spec: rgba(9, 9, 11, 0.22);
19
+ --text: #09090B; --text-muted: #52525B; --text-dim: #63636B;
20
+ --cta-bg: #18181B; --cta-fg: #FAFAFA; --cta-hover: #27272A;
21
+ --title-grad: linear-gradient(180deg, #09090B 40%, #52525B 100%);
22
+ --green: #047857; --green-bg: rgba(4, 120, 87, 0.09);
23
+ --cyan: #0369A1; --cyan-bg: rgba(3, 105, 161, 0.09);
24
+ --amber: #B45309; --amber-bg: rgba(180, 83, 9, 0.09);
25
+ --violet: #6D28D9; --violet-bg: rgba(109, 40, 217, 0.09);
26
+ --rose: #BE123C; --rose-bg: rgba(190, 18, 60, 0.09);
27
+ --glass: rgba(250, 250, 247, 0.86); --grid-line: rgba(9, 9, 11, 0.045); --card-shadow: 0 12px 30px rgba(9, 9, 11, 0.09);
28
+ --aurora: radial-gradient(ellipse 75% 48% at 50% -6%, rgba(3, 105, 161, 0.11), rgba(4, 120, 87, 0.06) 45%, transparent 74%);
29
+ }
30
+
31
+ *, *::before, *::after { box-sizing: border-box; }
32
+ html { scroll-behavior: auto; }
33
+ body { margin: 0; background: var(--bg); color: var(--text); font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
34
+ code, pre, kbd, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
35
+ h1, h2, h3 { font-family: "Plus Jakarta Sans", "Inter", sans-serif; letter-spacing: -0.025em; margin: 0; }
36
+ button, input { font: inherit; color: inherit; }
37
+ button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
38
+ section[id] { scroll-margin-top: 64px; }
39
+
40
+ .topbar { position: sticky; top: 0; z-index: 45; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); transition: background 0.2s ease, border-color 0.2s ease; }
41
+ .topbar.scrolled { background: transparent; border-bottom-color: transparent; }
42
+ .topbar-inner { position: relative; max-width: 1200px; margin: 0 auto; height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); transition: transform 0.25s ease, border-radius 0.25s ease, background 0.25s ease, box-shadow 0.25s ease; }
43
+ .topbar.scrolled .topbar-inner { transform: translateY(8px); background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--spec); border-radius: 12px; box-shadow: var(--card-shadow); }
44
+ .scroll-progress { position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--green), var(--cyan), var(--violet)); transform-origin: left center; transform: scaleX(0); will-change: transform; pointer-events: none; }
45
+ .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 15px; flex-shrink: 0; }
46
+ .brand-badge { font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface); }
47
+ .nav-links { display: flex; align-items: center; gap: 16px; }
48
+ .nav-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 500; padding: 4px 2px; border-bottom: 2px solid transparent; transition: color 0.15s ease, border-color 0.15s ease; }
49
+ .nav-links a:hover, .nav-links a.active { color: var(--text); border-bottom-color: var(--cyan); }
50
+ .top-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
51
+ .ctrl-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
52
+ .ctrl-btn:hover { background: var(--surface-2); color: var(--text); }
53
+ .kbd { font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); }
54
+ .lang-group { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); height: 32px; }
55
+ .lang-btn { border: 0; background: transparent; padding: 0 9px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
56
+ .lang-btn.active { background: var(--cta-bg); color: var(--cta-fg); }
57
+
58
+ .page-rail { max-width: 1200px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
59
+ .section-frame { position: relative; padding: clamp(44px, 5vw, 68px) clamp(18px, 3.6vw, 44px); border-bottom: 1px solid var(--border); }
60
+ .ch { position: absolute; top: -7px; width: 13px; height: 13px; color: var(--text-dim); pointer-events: none; z-index: 2; }
61
+ .ch-l { left: -7px; } .ch-r { right: -7px; }
62
+
63
+ /* Act 1 Hero */
64
+ .hero-frame {
65
+ padding-top: clamp(32px, 4vw, 48px);
66
+ background-image: var(--aurora), linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
67
+ background-size: 100% 100%, 48px 48px, 48px 48px;
68
+ }
69
+ .hero-center { max-width: 820px; margin: 0 auto 26px; text-align: center; display: flex; flex-direction: column; align-items: center; }
70
+ @keyframes beamSpin { to { transform: rotate(360deg); } }
71
+ .beam-pill { position: relative; display: inline-flex; padding: 1px; border-radius: 999px; overflow: hidden; background: var(--border); margin-bottom: 14px; }
72
+ .beam-spin { position: absolute; inset: -180%; background: conic-gradient(from 0deg, transparent 0 265deg, var(--cyan) 315deg, var(--green) 345deg, transparent 360deg); animation: beamSpin 4.2s linear infinite; will-change: transform; }
73
+ .beam-inner { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: var(--surface); font-size: 11px; letter-spacing: 0.08em; color: var(--text-muted); }
74
+ .beam-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
75
+ .hero-title { font-size: clamp(2.45rem, 5.2vw, 4.35rem); line-height: 1.03; font-weight: 800; margin-bottom: 14px; background: var(--title-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: var(--text); }
76
+ .hero-sub { font-size: clamp(0.98rem, 1.35vw, 1.1rem); color: var(--text-muted); max-width: 60ch; margin: 0 0 18px; }
77
+
78
+ .cli-box { border: 1px solid var(--spec); background: var(--surface); border-radius: 9px; overflow: hidden; width: 100%; max-width: 660px; text-align: left; box-shadow: var(--card-shadow); }
79
+ .cli-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
80
+ .cli-line-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: 12.5px; }
81
+ .cli-pre { margin: 0; flex: 1 1 auto; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; line-height: 1.6; }
82
+ .cli-pre code { color: var(--cyan); white-space: pre-wrap; overflow-wrap: anywhere; }
83
+ .hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 14px; font-size: 13px; }
84
+ .hero-links a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dashed var(--border); padding-bottom: 2px; transition: color 0.15s ease, border-color 0.15s ease; }
85
+ .hero-links a:hover { color: var(--text); border-bottom-color: var(--cyan); }
86
+ .copy-mini { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 4px; padding: 4px 9px; font-size: 11.5px; cursor: pointer; flex-shrink: 0; }
87
+ .copy-mini:hover { background: var(--surface-hover); }
88
+
89
+ .spot-card { position: relative; overflow: hidden; }
90
+ .spot-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.12), transparent 65%); }
91
+ .spot-card:hover::before { opacity: 1; }
92
+
93
+ /* 3D Perspective ADE Stage */
94
+ .ade-stage { perspective: 1400px; }
95
+ .ade-window { position: relative; border: 1px solid var(--spec); border-radius: 10px; background: var(--surface); overflow: hidden; box-shadow: var(--card-shadow), 0 0 40px rgba(56, 189, 248, 0.08); min-width: 0; max-width: 100%; transform-origin: center top; will-change: transform; }
96
+ .ade-window::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; z-index: 2; background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent); }
97
+ .ade-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; }
98
+ .ade-bar-l, .ade-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
99
+ .ade-dots { display: inline-flex; gap: 6px; }
100
+ .ade-dots span { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); }
101
+ .ade-grid { display: grid; grid-template-columns: 225px minmax(0, 1fr) 235px; min-height: 270px; }
102
+ .ade-sidebar { border-right: 1px solid var(--border); padding: 10px; background: var(--bg); display: flex; flex-direction: column; }
103
+ .ade-pane-lbl { font-size: 10.5px; letter-spacing: 0.08em; color: var(--text-dim); padding: 4px 8px 8px; text-transform: uppercase; }
104
+ .wt-btn { width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 8px 10px; margin-bottom: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
105
+ .wt-btn:hover { background: var(--surface-2); } .wt-btn.active { background: var(--surface); border-color: var(--spec); }
106
+ .wt-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
107
+ .wt-model { font-size: 11px; color: var(--text-muted); }
108
+ .ade-hint { margin-top: auto; padding: 8px; font-size: 11px; color: var(--text-dim); border-top: 1px solid var(--border); }
109
+
110
+ .pill { display: inline-flex; align-items: center; white-space: nowrap; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; letter-spacing: 0.04em; border: 1px solid transparent; }
111
+ .pill.green { color: var(--green); background: var(--green-bg); } .pill.cyan { color: var(--cyan); background: var(--cyan-bg); }
112
+ .pill.amber { color: var(--amber); background: var(--amber-bg); } .pill.violet { color: var(--violet); background: var(--violet-bg); }
113
+ .pill.rose { color: var(--rose); background: var(--rose-bg); }
114
+
115
+ .ade-terminal { padding: 14px 16px; background: var(--surface); font-size: 12.5px; line-height: 1.62; overflow-x: auto; min-width: 0; }
116
+ .term-line { display: flex; gap: 12px; padding: 1px 6px; border-radius: 4px; white-space: pre; }
117
+ .term-ln { color: var(--text-dim); user-select: none; min-width: 18px; text-align: right; }
118
+ .term-line.cmd { color: var(--text); font-weight: 600; } .term-line.ok { color: var(--green); }
119
+ .term-line.warn { color: var(--amber); } .term-line.info { color: var(--cyan); } .term-line.meta { color: var(--text-muted); }
120
+ .term-line.diffAdd { color: var(--green); background: var(--green-bg); } .term-line.diffDel { color: var(--rose); background: var(--rose-bg); }
121
+ .ade-inspector { border-left: 1px solid var(--border); padding: 12px 14px; background: var(--bg); }
122
+ .ins-card { padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); margin-bottom: 8px; }
123
+ .ins-k { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
124
+ .ins-v { font-size: 12.5px; font-weight: 600; margin-top: 2px; word-break: break-word; }
125
+ .ctx-track { height: 5px; border-radius: 3px; background: var(--bg); border: 1px solid var(--border); margin-top: 7px; overflow: hidden; }
126
+ .ctx-fill { height: 100%; background: var(--green); transform-origin: left center; will-change: transform; }
127
+
128
+ /* Act 2 Cinema */
129
+ .cinema-section { background: radial-gradient(ellipse 60% 50% at 75% 50%, rgba(56, 189, 248, 0.08), transparent 70%); }
130
+ .cinema-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 22px; align-items: stretch; }
131
+ .cinema-left { position: relative; padding-left: 14px; display: flex; flex-direction: column; gap: 8px; }
132
+ .cinema-rail { position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
133
+ .cinema-rail-fill { width: 100%; height: 100%; background: linear-gradient(180deg, var(--green), var(--cyan), var(--amber)); transform-origin: top center; transform: scaleY(0.25); will-change: transform; }
134
+ .cin-step { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 12px 14px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; opacity: 0.68; transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
135
+ .cin-step.active { opacity: 1; border-color: var(--cyan); background: var(--surface-2); box-shadow: 0 0 24px rgba(56, 189, 248, 0.12); }
136
+ .cin-num { font-size: 12px; font-weight: 700; color: var(--cyan); padding-top: 2px; flex-shrink: 0; }
137
+ .cin-step-title { font-size: 14px; display: block; margin-bottom: 2px; }
138
+ .cin-step-desc { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.45; }
139
+ .cinema-stage { border: 1px solid var(--spec); border-radius: 10px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
140
+ .cin-svg { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
141
+ .cin-beam { stroke: var(--text-dim); stroke-opacity: 0.28; stroke-dasharray: 5 5; transition: stroke 0.25s ease, stroke-opacity 0.25s ease; }
142
+ .cin-beam.lit { stroke: var(--cyan); stroke-opacity: 1; stroke-dasharray: none; }
143
+ .cin-node rect { stroke: var(--border); fill: var(--surface); transition: stroke 0.25s ease; }
144
+ .cin-node.lit rect { stroke: var(--cyan); stroke-width: 1.6; }
145
+ .cin-hud { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
146
+ .cin-cell { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; background: var(--bg); min-width: 0; }
147
+
148
+ /* Act 3 Playbook */
149
+ .sec-head { max-width: 68ch; margin-bottom: 22px; }
150
+ .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; }
151
+ .sec-title { font-size: clamp(1.5rem, 2.7vw, 2.15rem); line-height: 1.12; font-weight: 700; margin-bottom: 8px; }
152
+ .sec-sub { color: var(--text-muted); margin: 0; }
153
+
154
+ .mental-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
155
+ .mental-pill { text-align: left; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 13px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: border-color 0.15s ease, background 0.15s ease; }
156
+ .mental-pill:hover { border-color: var(--spec); background: var(--surface-2); }
157
+ .mental-k { font-size: 11.5px; font-weight: 700; }
158
+ .mental-d { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
159
+
160
+ .pb-shell { border: 1px solid var(--spec); border-radius: 10px; background: var(--surface); overflow: hidden; }
161
+ .pb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
162
+ .pb-steps { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
163
+ .pb-step { border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
164
+ .pb-step-top { display: flex; align-items: center; gap: 8px; }
165
+ .pb-idx { font-size: 11.5px; color: var(--text-dim); font-weight: 700; }
166
+ .pb-cmd-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: 9px 11px; }
167
+ .pb-cmd-row code { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--cyan); white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; line-height: 1.6; }
168
+ .pb-out { font-size: 12.5px; color: var(--text-muted); }
169
+
170
+ /* Act 4 Paired Guardrails */
171
+ .tab-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 5px; padding: 5px 10px; font-size: 12px; font-weight: 500; cursor: pointer; }
172
+ .tab-btn.active { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }
173
+ .btn-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
174
+
175
+ .guard-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
176
+ .guard-card { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 16px; min-width: 0; display: flex; flex-direction: column; }
177
+ .pipe-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
178
+ .sig-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
179
+ .sig-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; cursor: pointer; }
180
+ .sig-chip.active { border-color: var(--amber); background: var(--amber-bg); color: var(--text); }
181
+ .sig-chip.safe.active { border-color: var(--green); background: var(--green-bg); }
182
+ .pipe-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
183
+ .cell-title { font-size: 15px; font-weight: 700; }
184
+ .pipe-track { height: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
185
+ .pipe-beam { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); transform-origin: left center; will-change: transform; }
186
+ .stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
187
+ .step-node { border: 1px solid var(--border); background: var(--bg); border-radius: 6px; padding: 8px 6px; display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; font-weight: 600; }
188
+ .step-node.active { border-color: var(--cyan); background: var(--cyan-bg); }
189
+ .step-node.human { border-color: var(--amber); background: var(--amber-bg); }
190
+ .step-node.bypassed { opacity: 0.6; border-style: dashed; }
191
+
192
+ .editor-shell { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
193
+ .editor-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
194
+ .roster-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
195
+ .editor-body { padding: 14px 16px; font-size: 12px; line-height: 1.55; overflow-x: auto; }
196
+ .json-k { color: var(--cyan); } .json-s { color: var(--green); } .json-n { color: var(--amber); }
197
+
198
+ /* Act 5 4-Column Catalog */
199
+ .dir-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
200
+ .search-input { flex: 1 1 240px; max-width: 360px; height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
201
+ .table-wrap { border: 1px solid var(--border); border-radius: 9px; background: var(--surface); overflow-x: auto; }
202
+ .dir-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
203
+ .dir-table th, .dir-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
204
+ .dir-table th { font-size: 11px; color: var(--text-dim); background: var(--surface-2); letter-spacing: 0.05em; }
205
+ .dir-row { cursor: pointer; } .dir-row:hover td { background: var(--surface-2); }
206
+ .dir-empty { display: none; padding: 28px 16px; text-align: center; color: var(--text-muted); }
207
+ .dir-empty.show { display: flex; flex-direction: column; align-items: center; gap: 10px; }
208
+ .dir-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--text-dim); }
209
+ .footer { max-width: 1200px; margin: 0 auto; padding: 22px 20px 44px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-muted); }
210
+
211
+ .cmdk-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
212
+ .cmdk-backdrop.open { display: flex; }
213
+ .cmdk-box { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--spec); border-radius: 10px; overflow: hidden; box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55); }
214
+ .cmdk-input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 14px 16px; font-size: 14px; outline: none; }
215
+ .cmdk-list { max-height: 300px; overflow-y: auto; padding: 6px; }
216
+ .cmdk-item { width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
217
+ .cmdk-item:hover, .cmdk-item.active { background: var(--surface-2); }
218
+ .cmdk-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-dim); background: var(--surface-2); }
219
+
220
+ .copy-toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: none; flex-direction: column; min-width: 240px; max-width: min(360px, calc(100vw - 36px)); background: var(--surface-2); border: 1px solid var(--spec); border-radius: 8px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45); overflow: hidden; }
221
+ .copy-toast.show { display: flex; }
222
+ .toast-inner { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-size: 12.5px; }
223
+ .toast-cmd { color: var(--cyan); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
224
+ .toast-bar { height: 2px; background: var(--green); transform-origin: left center; will-change: transform; }
225
+
226
+ @media (max-width: 1240px) { .ch { display: none; } }
227
+ @media (max-width: 960px) {
228
+ .cinema-grid, .mental-strip, .guard-pair { grid-template-columns: minmax(0, 1fr); }
229
+ .ade-grid { grid-template-columns: minmax(0, 1fr); }
230
+ .ade-grid > * { min-width: 0; max-width: 100%; }
231
+ .ade-sidebar, .ade-inspector { border: 0; border-bottom: 1px solid var(--border); }
232
+ .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
233
+ }
234
+ @media (max-width: 720px) {
235
+ .topbar.scrolled .topbar-inner { transform: none; border-radius: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-top: 0; }
236
+ .topbar-inner { padding: 0 12px; gap: 8px; }
237
+ .nav-links, .brand-badge, #cmdkBtn span, #cmdkBtn .kbd { display: none; }
238
+ .stepper, .cin-hud { grid-template-columns: minmax(0, 1fr); }
239
+ .beam-inner { font-size: 9.5px; letter-spacing: 0.03em; padding: 4px 10px; }
240
+ }
241
+ @media (prefers-reduced-motion: reduce) {
242
+ .beam-spin { animation: none !important; }
243
+ *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
244
+ }
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: architecture
3
+ version: 1.3.0
4
+ description: Design deep modules with narrow interfaces and sketch two competing structural options before writing code across module boundaries.
5
+ ---
6
+
7
+ # Architecture
8
+
9
+ Shape boundaries before locking callers into brittle internals.
10
+
11
+ ## Principles
12
+
13
+ 1. **Model the domain**: Represent state machines, variants, and invariants in typed structures or lookup tables rather than scattered conditionals.
14
+ 2. **Design it twice**: Sketch two genuinely different shapes (types, module boundaries, ownership) before picking one.
15
+ 3. **Prefer deep modules**: Small public surface hiding rich, cohesive implementation behind clear boundary validation.
16
+ 4. **Keep callers decoupled**: Stable domain modules must never import volatile transport, CLI, or UI details.
17
+ 5. **Single owner per state**: Every mutable table, lock, or record has one authoritative writer.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: build-ticket
3
+ version: 1.3.0
4
+ description: Execute one scoped ticket end-to-end inside an Orca worker across Claude, Codex, or Antigravity, prove it with real-app checks, run cross-vendor review, open the PR, and report worker_done.
5
+ ---
6
+
7
+ # Build Ticket
8
+
9
+ Execute exactly one ticket inside an isolated Orca worktree under the `< 150,000` token budget.
10
+
11
+ ## Hard rules
12
+
13
+ - Never spawn nested orchestrators or extra worktrees. Keep direct read-only subagents `<= 4`.
14
+ - Read source files in bounded ranges, never whole large files.
15
+ - Never self-merge or push straight to `main`.
16
+ - Stop and report via `orca orchestration ask` or `worker_done --outcome failed` after **3 failed repair rounds** (bounded repair) or **2 identical gate failures**.
17
+
18
+ ## Execution sequence
19
+
20
+ 1. **Read & Checkpoint**: Read the ticket, `AGENTS.md`, and `.orca-flow.json`. Save initial checkpoint: `oflow checkpoint save <slug> --phase build --agent <your-agent>`.
21
+ 2. **Design check**: If the change adds or reshapes a module boundary, apply `architecture` first. If debugging an unknown failure, apply `debug` first.
22
+ 3. **Implement cleanly**: Write focused, minimal code and behavior tests (that fail without your change).
23
+ 4. **Gate (`<= 2` runs)**: Run `oflow gate` after edits. Fix failures at the root cause rather than rerunning blindly.
24
+ 5. **Real-app verify**: For UI or flow changes, follow `verify-app` (`commands.verify` with isolated `VERIFY_PORT`). Save screenshots/logs.
25
+ 6. **Independent review & Patch-id**:
26
+ - Check triggered checklists: `oflow review checklists`.
27
+ - Run review: `oflow review run --author <your-agent>` (automatically picks a cross-vendor peer in 2–3 agent repos, or fresh-context independent review in 1-agent repos; or record a peer verdict with `oflow review record --by agent:<reviewer>`).
28
+ - Fix P0/P1 findings (at most 1 re-review round); record P2s in the PR description. Never edit code after `oflow review check` passes without re-verifying.
29
+ 7. **Open PR & Report**: Run `oflow pr` (which runs secret scan, verifies `patch-id`, pushes, opens PR, and links it via `orca reference add`), then call `orca orchestration worker_done --outcome succeeded` and stop.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: debug
3
+ version: 1.3.0
4
+ description: Diagnose an unknown bug or test failure by writing a minimal failing reproduction first, tracing the root cause, and verifying the fix.
5
+ ---
6
+
7
+ # Debug
8
+
9
+ Fix root causes, never symptoms.
10
+
11
+ ## Steps
12
+
13
+ 1. **Reproduce red first**: Write a failing test or standalone command that deterministically triggers the reported bug. Never guess before seeing a red reproduction.
14
+ 2. **Trace backwards**: Follow the failing state back to the first boundary where invalid data or wrong behavior entered.
15
+ 3. **Attack the premise**: If **two consecutive fixes fail** the same check, stop patching. State your underlying assumption, inspect the real runtime/DB/DOM state directly, and form a new hypothesis.
16
+ 4. **Fix & Verify**: Apply the minimal root-cause fix, confirm the reproduction turns green, then run `oflow gate`.
17
+ 5. **Escalate cleanly**: After **3 failed repair rounds**, stop and report the exact reproduction command, observed output, and ruled-out hypotheses.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: grill-spec
3
+ version: 1.3.0
4
+ description: Search multi-vendor session history with Orca, resolve design and product choices through focused questioning, update domain docs, and write spec.md.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Grill and Spec
9
+
10
+ Turn an accepted idea into a tight, unambiguous spec grounded in repository truth.
11
+
12
+ ## Steps
13
+
14
+ 1. Check `.orca-flow.json` for `tracker`, `criticalPaths`, and source-of-truth docs.
15
+ 2. Search prior cross-vendor history on this host before touching existing subsystems:
16
+ ```sh
17
+ orca search "<subsystem or feature>" --limit 20
18
+ ```
19
+ 3. Inspect the target code in bounded ranges. Resolve observable facts from code yourself; ask the user only product, preference, or irreversible design questions (present options A–D with a clear recommendation).
20
+ 4. For hard-to-reverse boundaries or data models, apply the `architecture` skill (or `/proto-spike` if an empirical question needs runnable numbers). Update `GLOSSARY.md` and `docs/adr/` when terms or irreversible decisions settle.
21
+ 5. Write the spec at `.scratch/<effort>/spec.md` (or tracker equivalent) with: Problem, User Stories, Chosen Design & Seams, Testing Plan, and Out of Scope.
22
+
23
+ ## Done when
24
+
25
+ - Every open product or boundary question is resolved.
26
+ - Domain terms and ADRs match the spec, with no duplicate truth docs.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: lead-effort
3
+ version: 1.3.0
4
+ description: Coordinate one effort end-to-end as the Orca Lead across enabled workers (1, 2, or 3 vendors), waking on worker_done and gating merges safely.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Lead Effort
9
+
10
+ Own orchestration, review verification, and safe integration for one active effort.
11
+
12
+ ## Loop
13
+
14
+ 1. Inspect effort ticket DAGs, ready slices, scope overlaps, checkpoints, and verdicts with `oflow status`, then launch a conflict-free parallel wave with `oflow worker --ready` (or a single ticket with `oflow worker <ticket> [--agent claude|codex|agy]`). Keep concurrent workers within `.orca-flow.json` (`maxConcurrentWorkers`, default `3` on a single MacBook). Use `--agent` to override the ticket vendor for quota failover across active agents.
15
+ 2. End your turn and wait for Orca to wake you (`worker_done`, `question`, `escalation`). Never poll terminals.
16
+ 3. On `worker_done`:
17
+ - Read the PR, diff, real-app evidence, and `oflow stats <transcript>` (report any budget breach).
18
+ - Verify `oflow review check` returns `verdict=current` for the final `HEAD` (`agent:<peer>` in multi-vendor or `agent:<vendor>-independent` in solo fresh-context mode — never blindly trust a passing worker status if review findings exist).
19
+ - Ensure full checks (`commands.fullCheck`) pass against the rebased target branch.
20
+ 4. Merge discipline:
21
+ - If changed files touch `criticalPaths`, report the summary (<= 10 lines) and wait for human approval (notifying via Orca Mobile if away from desk).
22
+ - Otherwise squash-merge, clean up the worktree (`orca worktree rm --worktree name:<name>`), update `.scratch/NOW.md`, and dispatch newly unblocked tickets.
23
+
24
+ ## Recovery safety
25
+
26
+ - On `escalation` (`lost` / `unverifiable`), inspect `orca orchestration worker-show` before sending mail or retrying. Never spawn a duplicate worker on `unverifiable` liveness.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: proto-spike
3
+ version: 1.3.0
4
+ description: Build a throwaway prototype spike to settle an empirical UI or logic fork before locking the spec or production code.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Proto Spike
9
+
10
+ Answer a concrete design question by running code instead of guessing.
11
+
12
+ ## Rules
13
+
14
+ 1. Name the single question the spike must answer (UX interaction, API behavior, performance budget, or state machine).
15
+ 2. Build the smallest runnable spike isolated from production modules (scratch script or temporary route).
16
+ 3. Run it and capture observed behavior (timing, output, or browser screenshots).
17
+ 4. Record the settled choice in `spec.md` or an ADR, then delete the throwaway spike before feature implementation begins.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: resume
3
+ version: 1.3.0
4
+ description: Resume an interrupted ticket or hand off work across Claude, Codex, and Antigravity after re-proving real repository state.
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Resume
9
+
10
+ Pick up paused or quota-exhausted work without trusting stale chat claims.
11
+
12
+ ## Steps
13
+
14
+ 1. Inspect repo state, effort DAG, checkpoints, and live Orca state:
15
+ ```sh
16
+ oflow status
17
+ oflow checkpoint list
18
+ oflow checkpoint check <slug>
19
+ git status -sb && git log -n 5 --oneline
20
+ ```
21
+ 2. Re-prove claims against the repository:
22
+ - If `oflow checkpoint check <slug>` exits `3` (`head-moved` or `branch-moved`), inspect `git log <recorded-head>..HEAD` before continuing.
23
+ - Run `oflow gate` to verify the current head is actually green.
24
+ - Check `oflow review check` to see whether a prior review `patch-id` still holds.
25
+ 3. If switching vendors due to a 5-hour quota limit (or starting a fresh context in solo-vendor mode), export a sanitized handoff (`oflow checkpoint handoff <slug>`) and dispatch the remaining steps in a fresh Orca worker (`oflow worker <ticket> --agent <available-vendor>`).
26
+ 4. Resume at the verified phase with `build-ticket` or `lead-effort`.