oh-my-opencode 4.18.0 → 4.18.2

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 (226) hide show
  1. package/.agents/skills/codex-qa/scripts/lsp-e2e.sh +3677 -0
  2. package/.agents/skills/opencode-qa/scripts/lsp-e2e.sh +3154 -0
  3. package/.agents/skills/work-with-pr/SKILL.md +16 -37
  4. package/.agents/skills/work-with-pr-workspace/evals/evals.json +3 -3
  5. package/.opencode/skills/work-with-pr/SKILL.md +16 -37
  6. package/.opencode/skills/work-with-pr-workspace/evals/evals.json +3 -3
  7. package/bin/AGENTS.md +33 -0
  8. package/dist/cli/index.js +500 -158
  9. package/dist/cli-node/index.js +500 -158
  10. package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.d.ts +6 -0
  11. package/dist/hooks/category-skill-reminder/hook.d.ts +9 -1
  12. package/dist/hooks/comment-checker/hook.d.ts +8 -1
  13. package/dist/hooks/todo-continuation-enforcer/types.d.ts +3 -0
  14. package/dist/index.js +956 -702
  15. package/dist/plugin/messages-transform.d.ts +1 -0
  16. package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +2 -0
  17. package/dist/tui.js +43 -4
  18. package/package.json +16 -16
  19. package/packages/git-bash-mcp/dist/cli.js +81 -19
  20. package/packages/lsp-core/package.json +4 -0
  21. package/packages/lsp-core/src/index.ts +1 -0
  22. package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +18 -0
  23. package/packages/lsp-core/src/lsp/cleanup-errors.ts +12 -3
  24. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +261 -0
  25. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +63 -0
  26. package/packages/lsp-core/src/lsp/client-wrapper.ts +35 -5
  27. package/packages/lsp-core/src/lsp/client.ts +262 -80
  28. package/packages/lsp-core/src/lsp/config-loader.ts +5 -17
  29. package/packages/lsp-core/src/lsp/connection.ts +12 -6
  30. package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +221 -0
  31. package/packages/lsp-core/src/lsp/directory-diagnostics.ts +61 -28
  32. package/packages/lsp-core/src/lsp/errors.ts +11 -0
  33. package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +283 -0
  34. package/packages/lsp-core/src/lsp/fixtures/workspace-edit-contract-probe.ts +196 -0
  35. package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +215 -0
  36. package/packages/lsp-core/src/lsp/formatters.ts +3 -0
  37. package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +97 -0
  38. package/packages/lsp-core/src/lsp/json-rpc-connection.ts +73 -5
  39. package/packages/lsp-core/src/lsp/server-install-state.ts +3 -6
  40. package/packages/lsp-core/src/lsp/transport-protocol.ts +52 -0
  41. package/packages/lsp-core/src/lsp/transport.ts +96 -70
  42. package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +19 -0
  43. package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +214 -0
  44. package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +113 -0
  45. package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +163 -0
  46. package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +163 -0
  47. package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +67 -0
  48. package/packages/lsp-core/src/lsp/workspace-document-state.ts +368 -0
  49. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +113 -0
  50. package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +140 -0
  51. package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +220 -0
  52. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +56 -0
  53. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +30 -0
  54. package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +44 -0
  55. package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +147 -0
  56. package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +59 -0
  57. package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +130 -0
  58. package/packages/lsp-core/src/lsp/workspace-edit-path.ts +98 -0
  59. package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +60 -0
  60. package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +73 -0
  61. package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +174 -0
  62. package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +89 -0
  63. package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +183 -0
  64. package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +53 -0
  65. package/packages/lsp-core/src/lsp/workspace-edit-text.ts +125 -0
  66. package/packages/lsp-core/src/lsp/workspace-edit-types.ts +121 -0
  67. package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +95 -0
  68. package/packages/lsp-core/src/lsp/workspace-edit.ts +49 -200
  69. package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +182 -0
  70. package/packages/lsp-core/src/mcp.ts +18 -7
  71. package/packages/lsp-core/src/missing-dependency-result.test.ts +105 -0
  72. package/packages/lsp-core/src/missing-dependency-result.ts +57 -0
  73. package/packages/lsp-core/src/post-edit/index.ts +1 -0
  74. package/packages/lsp-core/src/post-edit/orchestration.test.ts +157 -0
  75. package/packages/lsp-core/src/post-edit/orchestration.ts +178 -0
  76. package/packages/lsp-core/src/request-context.test.ts +171 -0
  77. package/packages/lsp-core/src/request-context.ts +222 -9
  78. package/packages/lsp-core/src/tool-surface.test.ts +4 -1
  79. package/packages/lsp-core/src/tools/diagnostics.ts +32 -13
  80. package/packages/lsp-core/src/tools/navigation.ts +12 -12
  81. package/packages/lsp-core/src/tools/rename.ts +10 -15
  82. package/packages/lsp-core/src/tools/symbols.ts +11 -11
  83. package/packages/lsp-core/src/tools/types.ts +2 -1
  84. package/packages/lsp-daemon/dist/cli.js +3330 -764
  85. package/packages/lsp-daemon/dist/client.d.ts +105 -0
  86. package/packages/lsp-daemon/dist/client.js +5995 -0
  87. package/packages/lsp-daemon/dist/daemon-client.d.ts +12 -7
  88. package/packages/lsp-daemon/dist/daemon-client.js +139 -32
  89. package/packages/lsp-daemon/dist/daemon-server.d.ts +1 -0
  90. package/packages/lsp-daemon/dist/daemon-server.js +40 -15
  91. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +10 -8
  92. package/packages/lsp-daemon/dist/ensure-daemon.js +135 -51
  93. package/packages/lsp-daemon/dist/index.d.ts +2 -2
  94. package/packages/lsp-daemon/dist/index.js +3093 -786
  95. package/packages/lsp-daemon/dist/ipc-protocol.d.ts +46 -0
  96. package/packages/lsp-daemon/dist/ipc-protocol.js +187 -0
  97. package/packages/lsp-daemon/dist/lock.js +14 -4
  98. package/packages/lsp-daemon/dist/ownership.d.ts +49 -0
  99. package/packages/lsp-daemon/dist/ownership.js +168 -0
  100. package/packages/lsp-daemon/dist/paths.d.ts +33 -9
  101. package/packages/lsp-daemon/dist/paths.js +72 -33
  102. package/packages/lsp-daemon/dist/proxy.d.ts +5 -0
  103. package/packages/lsp-daemon/dist/proxy.js +123 -16
  104. package/packages/lsp-daemon/dist/request-routing.d.ts +7 -2
  105. package/packages/lsp-daemon/dist/request-routing.js +71 -22
  106. package/packages/lsp-daemon/dist/run-daemon.js +9 -2
  107. package/packages/lsp-daemon/dist/runtime-contract.d.ts +21 -0
  108. package/packages/lsp-daemon/dist/runtime-contract.js +58 -0
  109. package/packages/lsp-daemon/dist/socket-jsonrpc.js +6 -1
  110. package/packages/lsp-daemon/package.json +12 -3
  111. package/packages/lsp-tools-mcp/dist/cli.js +2189 -454
  112. package/packages/lsp-tools-mcp/dist/lsp/manager.js +1741 -148
  113. package/packages/lsp-tools-mcp/dist/mcp.js +2206 -471
  114. package/packages/lsp-tools-mcp/dist/request-context.js +176 -6
  115. package/packages/lsp-tools-mcp/dist/tools.js +2119 -447
  116. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  117. package/packages/omo-codex/plugin/.mcp.json +2 -1
  118. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  119. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  120. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +100 -28
  121. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +100 -28
  122. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  123. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +21 -9
  124. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +35 -0
  125. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +69 -0
  126. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +57 -1
  127. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  128. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  129. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  130. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  131. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  132. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  133. package/packages/omo-codex/plugin/components/lsp/.mcp.json +2 -1
  134. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +55 -0
  135. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +3033 -936
  136. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +0 -4
  137. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +5 -2
  138. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +41 -62
  139. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.d.ts +1 -1
  140. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +24 -15
  141. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +3 -7
  142. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +23 -49
  143. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  144. package/packages/omo-codex/plugin/components/lsp/package.json +3 -2
  145. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +31 -1
  146. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.test.mjs +76 -0
  147. package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +201 -0
  148. package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.test.mjs +55 -0
  149. package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +0 -4
  150. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +49 -71
  151. package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +26 -15
  152. package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +26 -64
  153. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +16 -17
  154. package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +30 -4
  155. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +20 -5
  156. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
  157. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -3
  158. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  159. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  160. package/packages/omo-codex/plugin/components/start-work-continuation/README.md +2 -2
  161. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +3 -3
  162. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +2 -2
  163. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  164. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  165. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +1 -1
  166. package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +1 -1
  167. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +15 -1
  168. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +20 -0
  169. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  170. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  171. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  172. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  173. package/packages/omo-codex/plugin/components/ultrawork/directive.md +50 -33
  174. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  175. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  176. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +50 -33
  177. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +50 -33
  178. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +3 -3
  179. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +5 -6
  180. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  181. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  182. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  183. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +6 -5
  184. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +5 -6
  185. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +2 -2
  186. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  187. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  188. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  189. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  190. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  191. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  192. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  193. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  194. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  195. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  196. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  197. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  198. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  199. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  200. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  201. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  202. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  203. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  204. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  205. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  206. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  207. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  208. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  209. package/packages/omo-codex/plugin/package-lock.json +26 -14
  210. package/packages/omo-codex/plugin/package.json +1 -1
  211. package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +2 -3
  212. package/packages/omo-codex/plugin/scripts/build-components.mjs +13 -1
  213. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +9 -1
  214. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +7 -0
  215. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -1
  216. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +50 -33
  217. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  218. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +6 -5
  219. package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +8 -0
  220. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +128 -15
  221. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +10 -0
  222. package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +2 -0
  223. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +1 -0
  224. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +7 -0
  225. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +34 -3
  226. package/packages/omo-codex/scripts/install-dist/install-local.mjs +328 -63
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: work-with-pr
3
- description: "Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + review-work reviewers + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the smallest atomic, independently-mergeable PRs and builds the independent ones concurrently via one worktree per PR driven by parallel subagents or a team. Unbounded loop: any failing gate sends you back to fix-and-re-QA inside that PR's worktree. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'split into atomic PRs', 'parallel PRs', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery."
3
+ description: "Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the smallest atomic, independently-mergeable PRs and builds the independent ones concurrently via one worktree per PR driven by parallel subagents or a team. Unbounded loop: any failing gate sends you back to fix-and-re-QA inside that PR's worktree. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'split into atomic PRs', 'parallel PRs', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery."
4
4
  ---
5
5
 
6
6
  # Work With PR — Full PR Lifecycle
7
7
 
8
- You are executing a complete PR lifecycle: from fresh task-owned worktree setup, through `ulw-loop`-driven implementation with evidence-bound manual QA, PR creation, and an unbounded verification loop until the PR is merged. The loop has three gates — CI, review-work, and Cubic — and a failing gate sends you back into that PR's worktree to fix and re-QA. You keep cycling until every active gate passes at once.
8
+ You are executing a complete PR lifecycle: from fresh task-owned worktree setup, through `ulw-loop`-driven implementation with evidence-bound manual QA, PR creation, and an unbounded verification loop until the PR is merged. The loop has two gates — CI and Cubic — and a failing gate sends you back into that PR's worktree to fix and re-QA. You keep cycling until every active gate passes at once.
9
9
 
10
10
  **The unit of delivery is the smallest PR that compiles, passes, and stands on its own — not "one task, one PR."** A single task routinely splits into several atomic PRs; the lifecycle below describes ONE of them, so apply it to each, and build the independent ones concurrently (Phase 0).
11
11
 
@@ -18,8 +18,7 @@ Phase 1: Implement → Drive the work through the ulw-loop skill:
18
18
  Phase 2: PR Creation → Push, create a reviewer-readable English PR targeting dev
19
19
  Phase 3: Verify Loop → Unbounded iteration; a failing gate routes back to Phase 1:
20
20
  ├─ Gate A: CI → gh pr checks (bun test, typecheck, build)
21
- ├─ Gate B: review-work 5-agent parallel review (the reviewer subagents)
22
- └─ Gate C: Cubic → cubic-dev-ai[bot] "No issues found"
21
+ └─ Gate B: Cubic cubic-dev-ai[bot] "No issues found"
23
22
  (SKIPPED, not failed, when Cubic's quota is exhausted)
24
23
  Phase 4: Merge → Auto-merge by default; wait until actually merged, then worktree cleanup
25
24
  ```
@@ -30,7 +29,7 @@ Phase 4: Merge → Auto-merge by default; wait until actually merged, th
30
29
 
31
30
  ## Phase 0: Setup
32
31
 
33
- Create a fresh isolated worktree for each PR before implementation or review work starts. The user's main working directory is read-only context — it may have uncommitted work, and a branch checkout would destroy it. Isolation also makes parallelism cheap: one worktree per PR, so several build at once without colliding.
32
+ Create a fresh isolated worktree for each PR before implementation starts. The user's main working directory is read-only context — it may have uncommitted work, and a branch checkout would destroy it. Isolation also makes parallelism cheap: one worktree per PR, so several build at once without colliding.
34
33
 
35
34
  <setup>
36
35
 
@@ -181,7 +180,7 @@ PR_NUMBER=$(gh pr view --json number -q .number)
181
180
 
182
181
  ## Phase 3: Verification Loop
183
182
 
184
- This is the core of the skill. Every active gate must pass for the PR to be ready. The loop has no iteration cap — keep going until done. Gate ordering is intentional: CI is cheapest/fastest, review-work is most thorough, Cubic is external and asynchronous. Gate C (Cubic) is the one gate that can be SKIPPED rather than satisfied — only when its quota is exhausted; it is never skipped just because it found issues. A failing gate is not a patch-and-push: route back to Phase 1, where fixes get the same scope discipline and, if behavior changed, fresh manual-QA evidence before you re-enter the loop.
183
+ This is the core of the skill. Every active gate must pass for the PR to be ready. The loop has no iteration cap — keep going until done. Gate ordering is intentional: CI is cheapest/fastest; Cubic is external and asynchronous. Gate B (Cubic) is the one gate that can be SKIPPED rather than satisfied — only when its quota is exhausted; it is never skipped just because it found issues. A failing gate is not a patch-and-push: route back to Phase 1, where fixes get the same scope discipline and, if behavior changed, fresh manual-QA evidence before you re-enter the loop.
185
184
 
186
185
  <verify_loop>
187
186
 
@@ -189,12 +188,10 @@ This is the core of the skill. Every active gate must pass for the PR to be read
189
188
  while true:
190
189
  1. Wait for CI → Gate A
191
190
  2. If CI fails → back to Phase 1: read logs, fix + re-QA, commit, push, continue
192
- 3. Run review-work → Gate B (the reviewer subagents)
193
- 4. If review fails → back to Phase 1: fix blocking issues + re-QA, commit, push, continue
194
- 5. Check Cubic → Gate C
195
- 6. If Cubic has issues back to Phase 1: fix + re-QA, commit, push, continue
196
- 7. If Cubic quota out → record Gate C SKIPPED, stop waiting on it
197
- 8. All active gates pass → break
191
+ 3. Check Cubic → Gate B
192
+ 4. If Cubic has issues → back to Phase 1: fix + re-QA, commit, push, continue
193
+ 5. If Cubic quota out record Gate B SKIPPED, stop waiting on it
194
+ 6. All active gates pass break
198
195
  ```
199
196
 
200
197
  ### Gate A: CI Checks
@@ -219,25 +216,7 @@ gh run view "$RUN_ID" --log-failed
219
216
 
220
217
  Read the logs, then fix per the iteration discipline below.
221
218
 
222
- ### Gate B: review-work
223
-
224
- The review-work skill launches 5 parallel sub-agents (goal verification, QA, code quality, security, context mining). All 5 must pass.
225
-
226
- Invoke review-work after CI passes — there's no point reviewing code that doesn't build:
227
-
228
- ```
229
- task(
230
- category="unspecified-high",
231
- load_skills=["review-work"],
232
- run_in_background=false,
233
- description="Post-implementation review of PR changes",
234
- prompt="Review the implementation work on branch {BRANCH_NAME}. The worktree is at {WORKTREE_PATH}. Goal: {ORIGINAL_GOAL}. Constraints: {CONSTRAINTS}. Run command: bun run dev (or as appropriate)."
235
- )
236
- ```
237
-
238
- **On failure**: review-work reports blocking issues with specific files and line numbers. Fix each blocking issue per the iteration discipline below.
239
-
240
- ### Gate C: Cubic Approval
219
+ ### Gate B: Cubic Approval
241
220
 
242
221
  Cubic (`cubic-dev-ai[bot]`) is an automated review bot that comments on PRs. It does NOT use GitHub's APPROVED review state — instead it posts comments with issue counts and confidence scores.
243
222
 
@@ -245,7 +224,7 @@ Cubic (`cubic-dev-ai[bot]`) is an automated review bot that comments on PRs. It
245
224
 
246
225
  **Issue signal**: The comment lists issues with file-level detail.
247
226
 
248
- **Quota-exhausted signal**: Cubic posts a usage/quota/limit message instead of a review, or no Cubic review appears within the bounded wait below. This is the ONLY case where you skip Gate C and proceed — record it as SKIPPED in the final report, never silently. Issues are never a reason to skip.
227
+ **Quota-exhausted signal**: Cubic posts a usage/quota/limit message instead of a review, or no Cubic review appears within the bounded wait below. This is the ONLY case where you skip Gate B and proceed — record it as SKIPPED in the final report, never silently. Issues are never a reason to skip.
249
228
 
250
229
  ```bash
251
230
  # Get the latest Cubic review
@@ -255,7 +234,7 @@ CUBIC_REVIEW=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
255
234
  if echo "$CUBIC_REVIEW" | grep -q "No issues found"; then
256
235
  echo "Cubic: APPROVED"
257
236
  elif echo "$CUBIC_REVIEW" | grep -qiE "quota|usage limit|rate limit|out of (credits|reviews)|upgrade your plan"; then
258
- echo "Cubic: SKIPPED (quota exhausted)" # Gate C satisfied-by-skip; do not loop on it
237
+ echo "Cubic: SKIPPED (quota exhausted)" # Gate B satisfied-by-skip; do not loop on it
259
238
  else
260
239
  echo "Cubic: ISSUES FOUND"
261
240
  echo "$CUBIC_REVIEW"
@@ -268,7 +247,7 @@ Cubic reviews are triggered automatically on PR updates. After pushing a fix, wa
268
247
 
269
248
  ```bash
270
249
  # Wait for a NEW Cubic review after push. If none arrives within the bound,
271
- # Cubic is out of quota (or not running) → skip Gate C rather than spin forever.
250
+ # Cubic is out of quota (or not running) → skip Gate B rather than spin forever.
272
251
  PUSH_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
273
252
  for _ in $(seq 1 30); do
274
253
  LATEST_REVIEW_TIME=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
@@ -276,7 +255,7 @@ for _ in $(seq 1 30); do
276
255
  [[ "$LATEST_REVIEW_TIME" > "$PUSH_TIME" ]] && break
277
256
  timeout 20 gh pr checks "$PR_NUMBER" --watch >/dev/null 2>&1 || true # spend the interval usefully
278
257
  done
279
- # Loop exhausted without a newer review → treat Gate C as SKIPPED (quota exhausted)
258
+ # Loop exhausted without a newer review → treat Gate B as SKIPPED (quota exhausted)
280
259
  [[ "$LATEST_REVIEW_TIME" > "$PUSH_TIME" ]] || echo "Cubic: SKIPPED (no review within bound — quota exhausted)"
281
260
  ```
282
261
 
@@ -357,7 +336,7 @@ Summarize what happened:
357
336
  - **PR**: #{PR_NUMBER} — {PR_TITLE}
358
337
  - **Branch**: {BRANCH_NAME} → {BASE_BRANCH}
359
338
  - **Iterations**: {N} verification loops
360
- - **Gates**: CI pass | review-work pass | Cubic {pass | SKIPPED (quota exhausted)}
339
+ - **Gates**: CI pass | Cubic {pass | SKIPPED (quota exhausted)}
361
340
  - **Merged**: {yes | no — left for you to merge, as requested}
362
341
  - **Worktree**: cleaned up
363
342
  ```
@@ -396,7 +375,7 @@ git rebase "origin/$BASE_BRANCH"
396
375
  | Working in main worktree instead of isolated worktree | Pollutes user's working directory, may destroy uncommitted work | CRITICAL |
397
376
  | Committing or pushing without manual-QA evidence on disk | "Tests pass" never proves the feature works; the repo forbids it for OpenCode/Codex-touching changes | CRITICAL |
398
377
  | Pushing directly to dev/master | Bypasses review entirely | CRITICAL |
399
- | Skipping CI gate after code changes | review-work and Cubic may pass on stale code | CRITICAL |
378
+ | Skipping CI gate after code changes | Cubic may pass on stale code | CRITICAL |
400
379
  | Skipping Cubic because it found issues | Only an exhausted quota justifies a skip; real issues must be fixed and re-pushed | HIGH |
401
380
  | Fixing unrelated code during verification loop | Scope creep causes new failures | HIGH |
402
381
  | Deleting worktree on failure | User loses ability to inspect/resume | HIGH |
@@ -12,8 +12,8 @@
12
12
  {"id": "atomic-commits", "text": "Plan specifies multiple atomic commits for multi-file changes"},
13
13
  {"id": "local-validation", "text": "Runs bun run typecheck, bun test, and bun run build before pushing"},
14
14
  {"id": "pr-targets-dev", "text": "PR is created targeting dev branch (not master)"},
15
- {"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, and Cubic"},
16
- {"id": "gate-ordering", "text": "Gates are checked in order: CI first, then review-work, then Cubic"},
15
+ {"id": "two-gates", "text": "Verification loop includes both gates: CI and Cubic"},
16
+ {"id": "gate-ordering", "text": "Gates are checked in order: CI first, then Cubic"},
17
17
  {"id": "cubic-check-method", "text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews for 'No issues found'"},
18
18
  {"id": "worktree-cleanup", "text": "Plan includes worktree cleanup after merge"},
19
19
  {"id": "real-file-references", "text": "Code changes reference actual files in the codebase (config schema, background manager)"}
@@ -28,7 +28,7 @@
28
28
  {"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
29
29
  {"id": "minimal-fix", "text": "Fix is minimal — adds null check, doesn't refactor unrelated code"},
30
30
  {"id": "test-added", "text": "Test case added for the missing worktree_path scenario"},
31
- {"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, Cubic"},
31
+ {"id": "two-gates", "text": "Verification loop includes both gates: CI, Cubic"},
32
32
  {"id": "real-atlas-files", "text": "References actual atlas hook files in src/hooks/atlas/"},
33
33
  {"id": "fix-branch-naming", "text": "Branch name follows fix/ prefix convention"}
34
34
  ]
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: work-with-pr
3
- description: "Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + review-work reviewers + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the smallest atomic, independently-mergeable PRs and builds the independent ones concurrently via one worktree per PR driven by parallel subagents or a team. Unbounded loop: any failing gate sends you back to fix-and-re-QA inside that PR's worktree. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'split into atomic PRs', 'parallel PRs', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery."
3
+ description: "Full PR lifecycle in a fresh task-owned git worktree: implement via the ulw-loop skill with mandatory evidence-bound manual QA → reviewer-readable English PR → verification loop (CI + Cubic, where Cubic is skipped only when its quota is exhausted) → merge by default → worktree cleanup. Decomposes one task into the smallest atomic, independently-mergeable PRs and builds the independent ones concurrently via one worktree per PR driven by parallel subagents or a team. Unbounded loop: any failing gate sends you back to fix-and-re-QA inside that PR's worktree. Use whenever implementation work needs to land as a PR. Triggers: 'create a PR', 'implement and PR', 'work on this and make a PR', 'implement issue', 'land this as a PR', 'split into atomic PRs', 'parallel PRs', 'work-with-pr', 'PR workflow', 'implement end to end', even when user just says 'implement X' if the context implies PR delivery."
4
4
  ---
5
5
 
6
6
  # Work With PR — Full PR Lifecycle
7
7
 
8
- You are executing a complete PR lifecycle: from fresh task-owned worktree setup, through `ulw-loop`-driven implementation with evidence-bound manual QA, PR creation, and an unbounded verification loop until the PR is merged. The loop has three gates — CI, review-work, and Cubic — and a failing gate sends you back into that PR's worktree to fix and re-QA. You keep cycling until every active gate passes at once.
8
+ You are executing a complete PR lifecycle: from fresh task-owned worktree setup, through `ulw-loop`-driven implementation with evidence-bound manual QA, PR creation, and an unbounded verification loop until the PR is merged. The loop has two gates — CI and Cubic — and a failing gate sends you back into that PR's worktree to fix and re-QA. You keep cycling until every active gate passes at once.
9
9
 
10
10
  **The unit of delivery is the smallest PR that compiles, passes, and stands on its own — not "one task, one PR."** A single task routinely splits into several atomic PRs; the lifecycle below describes ONE of them, so apply it to each, and build the independent ones concurrently (Phase 0).
11
11
 
@@ -18,8 +18,7 @@ Phase 1: Implement → Drive the work through the ulw-loop skill:
18
18
  Phase 2: PR Creation → Push, create a reviewer-readable English PR targeting dev
19
19
  Phase 3: Verify Loop → Unbounded iteration; a failing gate routes back to Phase 1:
20
20
  ├─ Gate A: CI → gh pr checks (bun test, typecheck, build)
21
- ├─ Gate B: review-work 5-agent parallel review (the reviewer subagents)
22
- └─ Gate C: Cubic → cubic-dev-ai[bot] "No issues found"
21
+ └─ Gate B: Cubic cubic-dev-ai[bot] "No issues found"
23
22
  (SKIPPED, not failed, when Cubic's quota is exhausted)
24
23
  Phase 4: Merge → Auto-merge by default; wait until actually merged, then worktree cleanup
25
24
  ```
@@ -30,7 +29,7 @@ Phase 4: Merge → Auto-merge by default; wait until actually merged, th
30
29
 
31
30
  ## Phase 0: Setup
32
31
 
33
- Create a fresh isolated worktree for each PR before implementation or review work starts. The user's main working directory is read-only context — it may have uncommitted work, and a branch checkout would destroy it. Isolation also makes parallelism cheap: one worktree per PR, so several build at once without colliding.
32
+ Create a fresh isolated worktree for each PR before implementation starts. The user's main working directory is read-only context — it may have uncommitted work, and a branch checkout would destroy it. Isolation also makes parallelism cheap: one worktree per PR, so several build at once without colliding.
34
33
 
35
34
  <setup>
36
35
 
@@ -181,7 +180,7 @@ PR_NUMBER=$(gh pr view --json number -q .number)
181
180
 
182
181
  ## Phase 3: Verification Loop
183
182
 
184
- This is the core of the skill. Every active gate must pass for the PR to be ready. The loop has no iteration cap — keep going until done. Gate ordering is intentional: CI is cheapest/fastest, review-work is most thorough, Cubic is external and asynchronous. Gate C (Cubic) is the one gate that can be SKIPPED rather than satisfied — only when its quota is exhausted; it is never skipped just because it found issues. A failing gate is not a patch-and-push: route back to Phase 1, where fixes get the same scope discipline and, if behavior changed, fresh manual-QA evidence before you re-enter the loop.
183
+ This is the core of the skill. Every active gate must pass for the PR to be ready. The loop has no iteration cap — keep going until done. Gate ordering is intentional: CI is cheapest/fastest; Cubic is external and asynchronous. Gate B (Cubic) is the one gate that can be SKIPPED rather than satisfied — only when its quota is exhausted; it is never skipped just because it found issues. A failing gate is not a patch-and-push: route back to Phase 1, where fixes get the same scope discipline and, if behavior changed, fresh manual-QA evidence before you re-enter the loop.
185
184
 
186
185
  <verify_loop>
187
186
 
@@ -189,12 +188,10 @@ This is the core of the skill. Every active gate must pass for the PR to be read
189
188
  while true:
190
189
  1. Wait for CI → Gate A
191
190
  2. If CI fails → back to Phase 1: read logs, fix + re-QA, commit, push, continue
192
- 3. Run review-work → Gate B (the reviewer subagents)
193
- 4. If review fails → back to Phase 1: fix blocking issues + re-QA, commit, push, continue
194
- 5. Check Cubic → Gate C
195
- 6. If Cubic has issues back to Phase 1: fix + re-QA, commit, push, continue
196
- 7. If Cubic quota out → record Gate C SKIPPED, stop waiting on it
197
- 8. All active gates pass → break
191
+ 3. Check Cubic → Gate B
192
+ 4. If Cubic has issues → back to Phase 1: fix + re-QA, commit, push, continue
193
+ 5. If Cubic quota out record Gate B SKIPPED, stop waiting on it
194
+ 6. All active gates pass break
198
195
  ```
199
196
 
200
197
  ### Gate A: CI Checks
@@ -219,25 +216,7 @@ gh run view "$RUN_ID" --log-failed
219
216
 
220
217
  Read the logs, then fix per the iteration discipline below.
221
218
 
222
- ### Gate B: review-work
223
-
224
- The review-work skill launches 5 parallel sub-agents (goal verification, QA, code quality, security, context mining). All 5 must pass.
225
-
226
- Invoke review-work after CI passes — there's no point reviewing code that doesn't build:
227
-
228
- ```
229
- task(
230
- category="unspecified-high",
231
- load_skills=["review-work"],
232
- run_in_background=false,
233
- description="Post-implementation review of PR changes",
234
- prompt="Review the implementation work on branch {BRANCH_NAME}. The worktree is at {WORKTREE_PATH}. Goal: {ORIGINAL_GOAL}. Constraints: {CONSTRAINTS}. Run command: bun run dev (or as appropriate)."
235
- )
236
- ```
237
-
238
- **On failure**: review-work reports blocking issues with specific files and line numbers. Fix each blocking issue per the iteration discipline below.
239
-
240
- ### Gate C: Cubic Approval
219
+ ### Gate B: Cubic Approval
241
220
 
242
221
  Cubic (`cubic-dev-ai[bot]`) is an automated review bot that comments on PRs. It does NOT use GitHub's APPROVED review state — instead it posts comments with issue counts and confidence scores.
243
222
 
@@ -245,7 +224,7 @@ Cubic (`cubic-dev-ai[bot]`) is an automated review bot that comments on PRs. It
245
224
 
246
225
  **Issue signal**: The comment lists issues with file-level detail.
247
226
 
248
- **Quota-exhausted signal**: Cubic posts a usage/quota/limit message instead of a review, or no Cubic review appears within the bounded wait below. This is the ONLY case where you skip Gate C and proceed — record it as SKIPPED in the final report, never silently. Issues are never a reason to skip.
227
+ **Quota-exhausted signal**: Cubic posts a usage/quota/limit message instead of a review, or no Cubic review appears within the bounded wait below. This is the ONLY case where you skip Gate B and proceed — record it as SKIPPED in the final report, never silently. Issues are never a reason to skip.
249
228
 
250
229
  ```bash
251
230
  # Get the latest Cubic review
@@ -255,7 +234,7 @@ CUBIC_REVIEW=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
255
234
  if echo "$CUBIC_REVIEW" | grep -q "No issues found"; then
256
235
  echo "Cubic: APPROVED"
257
236
  elif echo "$CUBIC_REVIEW" | grep -qiE "quota|usage limit|rate limit|out of (credits|reviews)|upgrade your plan"; then
258
- echo "Cubic: SKIPPED (quota exhausted)" # Gate C satisfied-by-skip; do not loop on it
237
+ echo "Cubic: SKIPPED (quota exhausted)" # Gate B satisfied-by-skip; do not loop on it
259
238
  else
260
239
  echo "Cubic: ISSUES FOUND"
261
240
  echo "$CUBIC_REVIEW"
@@ -268,7 +247,7 @@ Cubic reviews are triggered automatically on PR updates. After pushing a fix, wa
268
247
 
269
248
  ```bash
270
249
  # Wait for a NEW Cubic review after push. If none arrives within the bound,
271
- # Cubic is out of quota (or not running) → skip Gate C rather than spin forever.
250
+ # Cubic is out of quota (or not running) → skip Gate B rather than spin forever.
272
251
  PUSH_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
273
252
  for _ in $(seq 1 30); do
274
253
  LATEST_REVIEW_TIME=$(gh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
@@ -276,7 +255,7 @@ for _ in $(seq 1 30); do
276
255
  [[ "$LATEST_REVIEW_TIME" > "$PUSH_TIME" ]] && break
277
256
  timeout 20 gh pr checks "$PR_NUMBER" --watch >/dev/null 2>&1 || true # spend the interval usefully
278
257
  done
279
- # Loop exhausted without a newer review → treat Gate C as SKIPPED (quota exhausted)
258
+ # Loop exhausted without a newer review → treat Gate B as SKIPPED (quota exhausted)
280
259
  [[ "$LATEST_REVIEW_TIME" > "$PUSH_TIME" ]] || echo "Cubic: SKIPPED (no review within bound — quota exhausted)"
281
260
  ```
282
261
 
@@ -357,7 +336,7 @@ Summarize what happened:
357
336
  - **PR**: #{PR_NUMBER} — {PR_TITLE}
358
337
  - **Branch**: {BRANCH_NAME} → {BASE_BRANCH}
359
338
  - **Iterations**: {N} verification loops
360
- - **Gates**: CI pass | review-work pass | Cubic {pass | SKIPPED (quota exhausted)}
339
+ - **Gates**: CI pass | Cubic {pass | SKIPPED (quota exhausted)}
361
340
  - **Merged**: {yes | no — left for you to merge, as requested}
362
341
  - **Worktree**: cleaned up
363
342
  ```
@@ -396,7 +375,7 @@ git rebase "origin/$BASE_BRANCH"
396
375
  | Working in main worktree instead of isolated worktree | Pollutes user's working directory, may destroy uncommitted work | CRITICAL |
397
376
  | Committing or pushing without manual-QA evidence on disk | "Tests pass" never proves the feature works; the repo forbids it for OpenCode/Codex-touching changes | CRITICAL |
398
377
  | Pushing directly to dev/master | Bypasses review entirely | CRITICAL |
399
- | Skipping CI gate after code changes | review-work and Cubic may pass on stale code | CRITICAL |
378
+ | Skipping CI gate after code changes | Cubic may pass on stale code | CRITICAL |
400
379
  | Skipping Cubic because it found issues | Only an exhausted quota justifies a skip; real issues must be fixed and re-pushed | HIGH |
401
380
  | Fixing unrelated code during verification loop | Scope creep causes new failures | HIGH |
402
381
  | Deleting worktree on failure | User loses ability to inspect/resume | HIGH |
@@ -12,8 +12,8 @@
12
12
  {"id": "atomic-commits", "text": "Plan specifies multiple atomic commits for multi-file changes"},
13
13
  {"id": "local-validation", "text": "Runs bun run typecheck, bun test, and bun run build before pushing"},
14
14
  {"id": "pr-targets-dev", "text": "PR is created targeting dev branch (not master)"},
15
- {"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, and Cubic"},
16
- {"id": "gate-ordering", "text": "Gates are checked in order: CI first, then review-work, then Cubic"},
15
+ {"id": "two-gates", "text": "Verification loop includes both gates: CI and Cubic"},
16
+ {"id": "gate-ordering", "text": "Gates are checked in order: CI first, then Cubic"},
17
17
  {"id": "cubic-check-method", "text": "Cubic check uses gh api to check cubic-dev-ai[bot] reviews for 'No issues found'"},
18
18
  {"id": "worktree-cleanup", "text": "Plan includes worktree cleanup after merge"},
19
19
  {"id": "real-file-references", "text": "Code changes reference actual files in the codebase (config schema, background manager)"}
@@ -28,7 +28,7 @@
28
28
  {"id": "worktree-isolation", "text": "Plan uses git worktree in a sibling directory"},
29
29
  {"id": "minimal-fix", "text": "Fix is minimal — adds null check, doesn't refactor unrelated code"},
30
30
  {"id": "test-added", "text": "Test case added for the missing worktree_path scenario"},
31
- {"id": "three-gates", "text": "Verification loop includes all 3 gates: CI, review-work, Cubic"},
31
+ {"id": "two-gates", "text": "Verification loop includes both gates: CI, Cubic"},
32
32
  {"id": "real-atlas-files", "text": "References actual atlas hook files in src/hooks/atlas/"},
33
33
  {"id": "fix-branch-naming", "text": "Branch name follows fix/ prefix convention"}
34
34
  ]
package/bin/AGENTS.md ADDED
@@ -0,0 +1,33 @@
1
+ # bin/ - Published Launcher Shim
2
+
3
+ ## OVERVIEW
4
+
5
+ Node-side launch surface for every public CLI alias. The root shim resolves a platform package and spawns its generated `bin/oh-my-opencode.js` launcher payload; it is not the TypeScript CLI implementation.
6
+
7
+ ## WHERE TO LOOK
8
+
9
+ | Task | Location | Notes |
10
+ |------|----------|-------|
11
+ | Main launcher | `oh-my-opencode.js` | Entry for `oh-my-opencode`, `oh-my-openagent`, `omo`, `lazycodex`, and `lazycodex-ai` |
12
+ | Platform selection | `platform.js` | OS/arch/libc package candidates and baseline fallback |
13
+ | Platform types | `platform.d.ts` | Public declarations for the plain-JS selector |
14
+ | Version mismatch output | `version-mismatch.js` | User-facing installed-wrapper/platform-package mismatch diagnostics |
15
+ | Behavior tests | `*.test.ts` | Bun tests for invocation routing, platform selection, and diagnostics |
16
+
17
+ ## RUNTIME FLOW
18
+
19
+ `oh-my-opencode.js` derives the invocation name, optionally routes the LazyCodex Node installer, resolves an ordered list of `oh-my-opencode-*` or `oh-my-openagent-*` platform package candidates, then spawns the first installed package's generated `bin/oh-my-opencode.js` launcher. Each generated Node launcher runs root `dist/cli` with Bun and, when Bun is missing or exits with `SIGILL`, falls back to root `dist/cli-node` with Node. The root shim retains ordered package fallback compatibility, including x64 `-baseline` candidates, but current generated platform payloads are identical Node scripts, so a Bun `SIGILL` is normally handled inside the selected launcher rather than by switching to a baseline package.
20
+
21
+ ## CONVENTIONS
22
+
23
+ - Keep this surface Node-compatible; the root shim and generated launcher payloads are plain Node scripts.
24
+ - Preserve all five aliases. Alias-to-platform-family behavior is shared with `postinstall.mjs` and publish-time package rewrites.
25
+ - Keep error output actionable: report the detected platform and the ordered package candidates.
26
+ - Tests run from the root with `bun test bin` or as part of `bun test`.
27
+
28
+ ## ANTI-PATTERNS
29
+
30
+ - Do not import adapter source from `packages/omo-opencode/src/`; this shim must remain usable from the published package layout.
31
+ - Do not hard-code one npm package family. `oh-my-opencode` and `oh-my-openagent` wrappers share the launcher.
32
+ - Do not edit generated launcher payloads under `packages/oh-my-opencode-*/bin/`; regenerate them through `script/build-binaries.ts`.
33
+ - Do not remove baseline fallback without updating platform tests and publish-platform coverage.