oh-my-opencode 4.17.1 → 4.18.1
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.
- package/.agents/skills/codex-qa/SKILL.md +2 -0
- package/.agents/skills/codex-qa/scripts/lsp-e2e.sh +3654 -0
- package/.agents/skills/opencode-qa/scripts/lsp-e2e.sh +3071 -0
- package/.agents/skills/work-with-pr/SKILL.md +16 -37
- package/.agents/skills/work-with-pr-workspace/evals/evals.json +3 -3
- package/.opencode/skills/work-with-pr/SKILL.md +16 -37
- package/.opencode/skills/work-with-pr-workspace/evals/evals.json +3 -3
- package/dist/cli/get-local-version/types.d.ts +1 -1
- package/dist/cli/index.js +498 -165
- package/dist/cli-node/index.js +498 -165
- package/dist/index.js +425 -392
- package/dist/skills/frontend/SKILL.md +1 -1
- package/dist/skills/frontend/references/design/README.md +9 -0
- package/dist/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/dist/skills/frontend/references/design/layout-skill.md +107 -0
- package/dist/skills/programming/SKILL.md +12 -2
- package/package.json +17 -16
- package/packages/lsp-core/package.json +4 -0
- package/packages/lsp-core/src/index.ts +1 -0
- package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +18 -0
- package/packages/lsp-core/src/lsp/cleanup-errors.ts +12 -3
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +261 -0
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +63 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +35 -5
- package/packages/lsp-core/src/lsp/client.ts +262 -80
- package/packages/lsp-core/src/lsp/config-loader.ts +5 -17
- package/packages/lsp-core/src/lsp/connection.ts +12 -6
- package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +104 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics.ts +60 -27
- package/packages/lsp-core/src/lsp/errors.ts +11 -0
- package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +283 -0
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-contract-probe.ts +196 -0
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +215 -0
- package/packages/lsp-core/src/lsp/formatters.ts +3 -0
- package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +97 -0
- package/packages/lsp-core/src/lsp/json-rpc-connection.ts +73 -5
- package/packages/lsp-core/src/lsp/server-install-state.ts +3 -6
- package/packages/lsp-core/src/lsp/transport-protocol.ts +52 -0
- package/packages/lsp-core/src/lsp/transport.ts +96 -70
- package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +19 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +214 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +113 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +163 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +163 -0
- package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +67 -0
- package/packages/lsp-core/src/lsp/workspace-document-state.ts +368 -0
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +113 -0
- package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +140 -0
- package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +220 -0
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +56 -0
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +30 -0
- package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +44 -0
- package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +147 -0
- package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +59 -0
- package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +130 -0
- package/packages/lsp-core/src/lsp/workspace-edit-path.ts +98 -0
- package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +60 -0
- package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +73 -0
- package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +174 -0
- package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +89 -0
- package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +183 -0
- package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +53 -0
- package/packages/lsp-core/src/lsp/workspace-edit-text.ts +125 -0
- package/packages/lsp-core/src/lsp/workspace-edit-types.ts +121 -0
- package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +95 -0
- package/packages/lsp-core/src/lsp/workspace-edit.ts +49 -200
- package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +182 -0
- package/packages/lsp-core/src/mcp.ts +18 -7
- package/packages/lsp-core/src/missing-dependency-result.test.ts +105 -0
- package/packages/lsp-core/src/missing-dependency-result.ts +57 -0
- package/packages/lsp-core/src/post-edit/index.ts +1 -0
- package/packages/lsp-core/src/post-edit/orchestration.test.ts +157 -0
- package/packages/lsp-core/src/post-edit/orchestration.ts +178 -0
- package/packages/lsp-core/src/request-context.test.ts +171 -0
- package/packages/lsp-core/src/request-context.ts +222 -9
- package/packages/lsp-core/src/tool-surface.test.ts +4 -1
- package/packages/lsp-core/src/tools/diagnostics.ts +32 -13
- package/packages/lsp-core/src/tools/navigation.ts +12 -12
- package/packages/lsp-core/src/tools/rename.ts +10 -15
- package/packages/lsp-core/src/tools/symbols.ts +11 -11
- package/packages/lsp-core/src/tools/types.ts +2 -1
- package/packages/lsp-daemon/dist/cli.js +3114 -747
- package/packages/lsp-daemon/dist/client.d.ts +105 -0
- package/packages/lsp-daemon/dist/client.js +5851 -0
- package/packages/lsp-daemon/dist/daemon-client.d.ts +11 -6
- package/packages/lsp-daemon/dist/daemon-client.js +113 -30
- package/packages/lsp-daemon/dist/daemon-server.d.ts +1 -0
- package/packages/lsp-daemon/dist/daemon-server.js +40 -15
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +8 -7
- package/packages/lsp-daemon/dist/ensure-daemon.js +67 -44
- package/packages/lsp-daemon/dist/index.d.ts +2 -2
- package/packages/lsp-daemon/dist/index.js +2862 -754
- package/packages/lsp-daemon/dist/ipc-protocol.d.ts +46 -0
- package/packages/lsp-daemon/dist/ipc-protocol.js +187 -0
- package/packages/lsp-daemon/dist/lock.js +14 -4
- package/packages/lsp-daemon/dist/ownership.d.ts +49 -0
- package/packages/lsp-daemon/dist/ownership.js +168 -0
- package/packages/lsp-daemon/dist/paths.d.ts +33 -9
- package/packages/lsp-daemon/dist/paths.js +72 -33
- package/packages/lsp-daemon/dist/proxy.d.ts +3 -0
- package/packages/lsp-daemon/dist/proxy.js +54 -3
- package/packages/lsp-daemon/dist/request-routing.d.ts +7 -2
- package/packages/lsp-daemon/dist/request-routing.js +71 -22
- package/packages/lsp-daemon/dist/run-daemon.js +9 -2
- package/packages/lsp-daemon/dist/runtime-contract.d.ts +21 -0
- package/packages/lsp-daemon/dist/runtime-contract.js +58 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.js +6 -1
- package/packages/lsp-daemon/package.json +12 -3
- package/packages/lsp-tools-mcp/dist/cli.js +2115 -442
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1741 -148
- package/packages/lsp-tools-mcp/dist/mcp.js +2127 -454
- package/packages/lsp-tools-mcp/dist/request-context.js +176 -6
- package/packages/lsp-tools-mcp/dist/tools.js +2118 -446
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +55 -0
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +2959 -944
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +0 -4
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +5 -2
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +41 -62
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.d.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +24 -15
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +3 -7
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +23 -49
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +3 -2
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +31 -1
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.test.mjs +76 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +201 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.test.mjs +55 -0
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +0 -4
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +49 -71
- package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +26 -15
- package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +26 -64
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +16 -17
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +30 -4
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +19 -5
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +8 -6
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +37 -10
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +37 -10
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +37 -10
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +10 -9
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +26 -14
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +2 -3
- package/packages/omo-codex/plugin/scripts/build-components.mjs +13 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +9 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/packages/omo-codex/plugin/skills/frontend/references/design/layout-skill.md +107 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +12 -2
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +37 -10
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +10 -9
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +8 -0
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +128 -15
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +10 -0
- package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +2 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +351 -74
- package/packages/shared-skills/skills/frontend/SKILL.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/README.md +9 -0
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/packages/shared-skills/skills/frontend/references/design/layout-skill.md +107 -0
- package/packages/shared-skills/skills/programming/SKILL.md +12 -2
|
@@ -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 +
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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.
|
|
193
|
-
4. If
|
|
194
|
-
5.
|
|
195
|
-
6.
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 |
|
|
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 |
|
|
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": "
|
|
16
|
-
{"id": "gate-ordering", "text": "Gates are checked in order: CI first, then
|
|
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": "
|
|
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 +
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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.
|
|
193
|
-
4. If
|
|
194
|
-
5.
|
|
195
|
-
6.
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 |
|
|
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 |
|
|
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": "
|
|
16
|
-
{"id": "gate-ordering", "text": "Gates are checked in order: CI first, then
|
|
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": "
|
|
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
|
]
|
|
@@ -5,7 +5,7 @@ export interface VersionInfo {
|
|
|
5
5
|
isLocalDev: boolean;
|
|
6
6
|
isPinned: boolean;
|
|
7
7
|
pinnedVersion: string | null;
|
|
8
|
-
status: "up-to-date" | "outdated" | "local-dev" | "pinned" | "pinned-mismatch" | "error" | "unknown";
|
|
8
|
+
status: "up-to-date" | "outdated" | "local-dev" | "dev" | "pinned" | "pinned-mismatch" | "error" | "unknown";
|
|
9
9
|
}
|
|
10
10
|
export interface GetLocalVersionOptions {
|
|
11
11
|
directory?: string;
|