opencode-skills-collection 4.0.44 → 4.0.46

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 (117) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +25 -1
  2. package/bundled-skills/agy-delegate/SKILL.md +168 -0
  3. package/bundled-skills/agy-delegate/references/dispatch-and-poll.md +140 -0
  4. package/bundled-skills/agy-delegate/references/multi-task-queues.md +59 -0
  5. package/bundled-skills/agy-delegate/references/review-and-land.md +103 -0
  6. package/bundled-skills/agy-delegate/references/writing-the-brief.md +124 -0
  7. package/bundled-skills/aider-delegate/SKILL.md +227 -0
  8. package/bundled-skills/aider-delegate/references/dispatch-and-poll.md +154 -0
  9. package/bundled-skills/aider-delegate/references/multi-task-queues.md +68 -0
  10. package/bundled-skills/aider-delegate/references/review-and-land.md +101 -0
  11. package/bundled-skills/aider-delegate/references/writing-the-brief.md +142 -0
  12. package/bundled-skills/babysit-pr/SKILL.md +343 -0
  13. package/bundled-skills/claude-delegate/SKILL.md +182 -0
  14. package/bundled-skills/claude-delegate/references/dispatch-and-poll.md +220 -0
  15. package/bundled-skills/claude-delegate/references/multi-task-queues.md +66 -0
  16. package/bundled-skills/claude-delegate/references/review-and-land.md +117 -0
  17. package/bundled-skills/claude-delegate/references/writing-the-brief.md +158 -0
  18. package/bundled-skills/cline-delegate/SKILL.md +140 -0
  19. package/bundled-skills/cline-delegate/references/dispatch-and-poll.md +142 -0
  20. package/bundled-skills/cline-delegate/references/multi-task-queues.md +58 -0
  21. package/bundled-skills/cline-delegate/references/review-and-land.md +80 -0
  22. package/bundled-skills/cline-delegate/references/writing-the-brief.md +129 -0
  23. package/bundled-skills/codex-delegate/SKILL.md +177 -0
  24. package/bundled-skills/codex-delegate/references/dispatch-and-poll.md +161 -0
  25. package/bundled-skills/codex-delegate/references/multi-task-queues.md +66 -0
  26. package/bundled-skills/codex-delegate/references/review-and-land.md +126 -0
  27. package/bundled-skills/codex-delegate/references/writing-the-brief.md +125 -0
  28. package/bundled-skills/commandcode-delegate/SKILL.md +188 -0
  29. package/bundled-skills/commandcode-delegate/references/dispatch-and-poll.md +222 -0
  30. package/bundled-skills/commandcode-delegate/references/multi-task-queues.md +81 -0
  31. package/bundled-skills/commandcode-delegate/references/review-and-land.md +144 -0
  32. package/bundled-skills/commandcode-delegate/references/writing-the-brief.md +147 -0
  33. package/bundled-skills/copilot-delegate/SKILL.md +159 -0
  34. package/bundled-skills/copilot-delegate/references/dispatch-and-poll.md +143 -0
  35. package/bundled-skills/copilot-delegate/references/multi-task-queues.md +58 -0
  36. package/bundled-skills/copilot-delegate/references/review-and-land.md +80 -0
  37. package/bundled-skills/copilot-delegate/references/writing-the-brief.md +140 -0
  38. package/bundled-skills/cursor-delegate/SKILL.md +170 -0
  39. package/bundled-skills/cursor-delegate/references/dispatch-and-poll.md +162 -0
  40. package/bundled-skills/cursor-delegate/references/multi-task-queues.md +59 -0
  41. package/bundled-skills/cursor-delegate/references/review-and-land.md +93 -0
  42. package/bundled-skills/cursor-delegate/references/writing-the-brief.md +126 -0
  43. package/bundled-skills/debate-review/SKILL.md +85 -0
  44. package/bundled-skills/debate-review/assets/prompts/review-debate.md +51 -0
  45. package/bundled-skills/debate-review/assets/prompts/review-main.md +64 -0
  46. package/bundled-skills/debate-review/assets/prompts/review-rebuttal.md +42 -0
  47. package/bundled-skills/debate-review/references/comment-format.md +63 -0
  48. package/bundled-skills/debate-review/references/schema.md +95 -0
  49. package/bundled-skills/delegate-setup/SKILL.md +215 -0
  50. package/bundled-skills/delegate-setup/references/schema.md +100 -0
  51. package/bundled-skills/delegate-setup/references/setup-dialogue.md +101 -0
  52. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  53. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  54. package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
  55. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  56. package/bundled-skills/docs/users/aas-core.md +1 -1
  57. package/bundled-skills/docs/users/bundles.md +1 -1
  58. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  59. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  60. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  61. package/bundled-skills/docs/users/usage.md +3 -3
  62. package/bundled-skills/docs/users/visual-guide.md +4 -4
  63. package/bundled-skills/falsify/SKILL.md +263 -0
  64. package/bundled-skills/falsify/references/bias-catalog.md +42 -0
  65. package/bundled-skills/falsify/references/mental-models.md +135 -0
  66. package/bundled-skills/falsify/templates/thinking-ledger.md +104 -0
  67. package/bundled-skills/graceful-shutdown/SKILL.md +379 -0
  68. package/bundled-skills/grok-delegate/SKILL.md +179 -0
  69. package/bundled-skills/grok-delegate/references/dispatch-and-poll.md +171 -0
  70. package/bundled-skills/grok-delegate/references/multi-task-queues.md +67 -0
  71. package/bundled-skills/grok-delegate/references/review-and-land.md +130 -0
  72. package/bundled-skills/grok-delegate/references/writing-the-brief.md +119 -0
  73. package/bundled-skills/kimi-delegate/SKILL.md +137 -0
  74. package/bundled-skills/kimi-delegate/references/dispatch-and-poll.md +134 -0
  75. package/bundled-skills/kimi-delegate/references/multi-task-queues.md +58 -0
  76. package/bundled-skills/kimi-delegate/references/review-and-land.md +92 -0
  77. package/bundled-skills/kimi-delegate/references/writing-the-brief.md +132 -0
  78. package/bundled-skills/omp-delegate/SKILL.md +186 -0
  79. package/bundled-skills/omp-delegate/references/dispatch-and-poll.md +155 -0
  80. package/bundled-skills/omp-delegate/references/multi-task-queues.md +59 -0
  81. package/bundled-skills/omp-delegate/references/review-and-land.md +95 -0
  82. package/bundled-skills/omp-delegate/references/writing-the-brief.md +149 -0
  83. package/bundled-skills/opencode-delegate/SKILL.md +189 -0
  84. package/bundled-skills/opencode-delegate/references/dispatch-and-poll.md +156 -0
  85. package/bundled-skills/opencode-delegate/references/multi-task-queues.md +68 -0
  86. package/bundled-skills/opencode-delegate/references/review-and-land.md +125 -0
  87. package/bundled-skills/opencode-delegate/references/writing-the-brief.md +142 -0
  88. package/bundled-skills/pi-delegate/SKILL.md +148 -0
  89. package/bundled-skills/pi-delegate/references/dispatch-and-poll.md +146 -0
  90. package/bundled-skills/pi-delegate/references/multi-task-queues.md +59 -0
  91. package/bundled-skills/pi-delegate/references/review-and-land.md +95 -0
  92. package/bundled-skills/pi-delegate/references/writing-the-brief.md +132 -0
  93. package/bundled-skills/qoder-delegate/SKILL.md +151 -0
  94. package/bundled-skills/qoder-delegate/references/dispatch-and-poll.md +119 -0
  95. package/bundled-skills/qoder-delegate/references/multi-task-queues.md +43 -0
  96. package/bundled-skills/qoder-delegate/references/review-and-land.md +66 -0
  97. package/bundled-skills/qoder-delegate/references/writing-the-brief.md +85 -0
  98. package/bundled-skills/sandbase-mcp/SKILL.md +194 -0
  99. package/bundled-skills/ui-slop-score/SKILL.md +2 -2
  100. package/bundled-skills/unsloth-finetuning/SKILL.md +352 -0
  101. package/bundled-skills/vibe-delegate/SKILL.md +147 -0
  102. package/bundled-skills/vibe-delegate/references/dispatch-and-poll.md +144 -0
  103. package/bundled-skills/vibe-delegate/references/multi-task-queues.md +59 -0
  104. package/bundled-skills/vibe-delegate/references/review-and-land.md +87 -0
  105. package/bundled-skills/vibe-delegate/references/writing-the-brief.md +131 -0
  106. package/bundled-skills/warp-delegate/SKILL.md +192 -0
  107. package/bundled-skills/warp-delegate/references/dispatch-and-poll.md +163 -0
  108. package/bundled-skills/warp-delegate/references/multi-task-queues.md +80 -0
  109. package/bundled-skills/warp-delegate/references/review-and-land.md +123 -0
  110. package/bundled-skills/warp-delegate/references/writing-the-brief.md +105 -0
  111. package/bundled-skills/zcode-delegate/SKILL.md +202 -0
  112. package/bundled-skills/zcode-delegate/references/dispatch-and-poll.md +113 -0
  113. package/bundled-skills/zcode-delegate/references/multi-task-queues.md +87 -0
  114. package/bundled-skills/zcode-delegate/references/review-and-land.md +81 -0
  115. package/bundled-skills/zcode-delegate/references/writing-the-brief.md +120 -0
  116. package/package.json +1 -1
  117. package/skills_index.json +660 -0
@@ -0,0 +1,155 @@
1
+ # Dispatch and poll
2
+
3
+ `scripts/relay.mjs` wraps omp's non-interactive JSON print mode, captures its event stream, and
4
+ writes a `result.json`. Run one command, then read one file.
5
+
6
+ ## Before the first run
7
+
8
+ ```bash
9
+ command -v omp
10
+ omp --version
11
+ omp models # list models this install can run; then pass one id as --model
12
+ # omp models --json # machine-readable catalog
13
+ # omp models find sonnet
14
+ ```
15
+
16
+ Do **not** run `omp --list-models`. That flag is a hard error.
17
+
18
+ Install with `bun install -g @oh-my-pi/pi-coding-agent`. Authenticate with `/login` inside omp
19
+ (subscription providers) or an API-key environment variable; omp stores credentials in `~/.omp/`.
20
+
21
+ ## Dispatching
22
+
23
+ ```bash
24
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
25
+ ```
26
+
27
+ `<skill-dir>` is the installed folder containing this skill's `SKILL.md`.
28
+
29
+ | Flag | Effect |
30
+ | --- | --- |
31
+ | `--brief <file>` | Brief path. Omit it to read the brief from stdin. |
32
+ | `--cd <dir>` | Working root and child process cwd (default: current directory). |
33
+ | `--lane <name>` | Fleet lane from `delegate-setup` config. Applies that lane's dials; fails if the lane's `implementer` is not this relay. Explicit dial flags win. A lane `effort` value becomes `--thinking`. |
34
+ | `--provider <name>` | omp `--provider` (default: omp's own default). Token-validated. |
35
+ | `--model <pattern>` | omp `--model` id or fuzzy pattern (default: omp's own default). Token-validated: letters, digits, `. _ : / -`. Pick the value from `omp models`, not from memory. |
36
+ | `--thinking <level>` | omp `--thinking`: `off`, `auto`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`. |
37
+ | `--session <id>` | Resume a specific omp session (`--session` / `--resume`); send only the delta brief. A value is required — bare `--resume` would open omp's picker and hang. |
38
+ | `--resume-last` | Continue the most recent omp session for this cwd (`omp --continue`); send only the delta brief. |
39
+ | `--read-only` | Restrict omp to `--tools read,grep,glob`. |
40
+ | `--approve` | Load project-local `.omp` extensions, skills, and rules. The default passes `--no-extensions --no-skills --no-rules`. |
41
+ | `--timeout <dur>` | Relay watchdog (default: `30m`; h/m/s strings). The relay does not forward omp's `--max-time`. |
42
+ | `--out-dir <dir>` | Artifact directory (default: a fresh directory under the system temp dir). |
43
+ | `-h`, `--help` | Print the relay's header help. |
44
+
45
+ `--session` and `--resume-last` are mutually exclusive. The child cwd pins the workspace; omp's
46
+ `--cwd` is not passed. omp has no sandbox, so reachability is simply the filesystem.
47
+
48
+ A run without `--read-only` can write and execute anything the user account can: the relay passes
49
+ `--yolo` so print mode does not stall on tool approval. `--read-only` removes write/edit/bash (and
50
+ the rest of omp's default tool surface) from the callable tools; installed extension code still
51
+ runs with the user's host permissions when `--approve` is set.
52
+
53
+ The relay never forwards `--api-key`.
54
+
55
+ ## Artifacts and result fields
56
+
57
+ Artifacts live outside the repo by default, so they do not appear in `touchedFiles`; an
58
+ `--out-dir` inside the worktree can make the artifacts appear there:
59
+
60
+ - `brief.txt` - the exact brief.
61
+ - `events.jsonl` - raw omp stdout events (the session header, then every agent event).
62
+ - `final.txt` - assistant text joined with a blank line between chunks; absent if none was emitted.
63
+ - `stderr.txt` - complete stderr.
64
+ - `result.json` - the stable `delegate-relay.result.v1` contract.
65
+
66
+ `result.json` fields:
67
+
68
+ - `schema`, `tool` (`"omp"`), `status` (`completed` | `failed` | `timeout` | `aborted` | `omp_unavailable`), `exitCode`, and
69
+ `signal` (`null` unless the child died on a signal).
70
+ - `workdir`, requested `provider`/`model`/`thinking`, `projectTrusted`, `readOnly`, `yolo`, `resumed`, `ompVersion`,
71
+ `sessionId`, `startedAt`, and `finishedAt`.
72
+ - `actualProvider`, `actualModel`, `usage`, and `stopReason` from omp's final assistant event.
73
+ - `briefPath`, `finalPath`, `eventsPath`, and `stderrPath`.
74
+ - `sessionId` - parsed from the JSON stream's `session` header. Resume with `--session <id>`.
75
+ Note: `--continue` may mint a new session id for the continued run; the result always reports
76
+ the id of the run that just happened.
77
+ - `finalMessage` - assistant text parts joined with `"\n\n"`; tool calls and tool results are
78
+ excluded.
79
+ - `touchedFiles` - `git status --porcelain` lines for the **final working tree under `--cd` only**,
80
+ not an attribution of omp's edits: anything already dirty before dispatch shows up too. Dispatch
81
+ from a clean tree when you want the list to read as "what omp changed". `null` means git could
82
+ not report; `[]` means git ran and the tree is clean.
83
+ - `stderrTail` - the last 20 non-empty stderr lines on any run that did not complete (`failed`,
84
+ `timeout`, `aborted`), except a launch failure, which reports `failed` with no `stderrTail`.
85
+ - `error` - present for launch failures, preflight failures, when the relay watchdog fires
86
+ (`timeout`), and on an `aborted` run.
87
+
88
+ omp's stream carries thinking and message-update events the relay archives but does not parse.
89
+
90
+ ## Waiting for completion
91
+
92
+ The relay blocks. Use the orchestrator's background-command facility, or background it in a
93
+ shell and poll for `result.json`. The run is done only when the process exits and the file
94
+ contains a `status`. The result file is written atomically, so a partial read is impossible.
95
+
96
+ A pre-run usage error exits 2 and writes no result. A missing `omp` exits 127 and writes
97
+ `status: "omp_unavailable"`.
98
+
99
+ ## When a run misbehaves
100
+
101
+ - **`status: "omp_unavailable"` (exit 127):** install omp (`bun install -g @oh-my-pi/pi-coding-agent`),
102
+ authenticate, and re-dispatch.
103
+ - **`status: "failed"`:** read `stderrTail`, `stderrPath`, and the tail of `events.jsonl`. Common
104
+ causes: an unknown `--model`, an expired login, or a provider error.
105
+ A final assistant event with `stopReason: "error"` or `"aborted"` is failed even if omp exits zero.
106
+ - **`status: "failed"` with an `error` mentioning `version preflight`:** the bounded `omp --version`
107
+ probe failed or hung, so omp was never dispatched. Check the install (`omp --version` yourself).
108
+ - **`status: "aborted"`:** the relay itself was killed (its parent's timeout, a stopped task, a
109
+ closed terminal) and forwarded the kill to omp. The result is written before the relay exits;
110
+ inspect the working tree before re-dispatching. On native Windows a hard kill of the relay is
111
+ uncatchable (Node supports no `SIGTERM` handler there), so this status may never get written -
112
+ a relay process that is gone without a `result.json` is an aborted run; inspect the working
113
+ tree and `events.jsonl` directly.
114
+ - **`status: "failed"` with `signal: "SIGKILL"`:** the host killed the process, commonly through
115
+ the OOM killer or a supervisor timeout. This is not an omp error; check host memory and
116
+ re-dispatch, or split the task into smaller briefs.
117
+ - **`status: "timeout"`:** the `--timeout` watchdog killed the run; `error` reads
118
+ `omp did not finish within --timeout <dur>; killed by the relay watchdog`. Increase `--timeout`
119
+ or split the task. On POSIX the relay sends SIGTERM to the process group, waits 10 seconds,
120
+ then sends SIGKILL if needed; on Windows there is no escalation phase — the whole process tree
121
+ is felled immediately with `taskkill /pid <pid> /t /f`.
122
+ - **Empty `finalMessage`:** inspect `touchedFiles` and the diff. Add a
123
+ `<structured_output_contract>` to the next brief to require a closing report.
124
+
125
+ ## Recovering lost work
126
+
127
+ `events.jsonl` in the run directory records every event the implementer streamed. If finished
128
+ work is lost — the run killed late, or the working tree damaged afterward — read the event log
129
+ before re-dispatching: it identifies which files and tool commands were involved, which scopes
130
+ what needs redoing. Tool execution events carry the write/edit arguments, but treat any
131
+ reconstruction as unverified until it matches a working-tree diff — when the tree still holds the
132
+ work, preserve the tree rather than replaying the log.
133
+
134
+ ## What the relay runs
135
+
136
+ The launch is equivalent to:
137
+
138
+ ```bash
139
+ cat brief.txt | omp --mode json [--provider <name>] [--model <pattern>] [--thinking <level>] \
140
+ [--session <id> | --continue] [--yolo] \
141
+ [--no-extensions --no-skills --no-rules] [--tools read,grep,glob]
142
+ ```
143
+
144
+ `--yolo` is omitted on `--read-only`. The three `--no-*` flags are omitted when `--approve` is
145
+ set.
146
+
147
+ The brief rides stdin, so it is not visible in the host process list and no argv size cap
148
+ applies. `omp` is a native binary (bun / install script / Homebrew), so the relay never launches
149
+ it through a shell. Before dispatch the relay runs a bounded `omp --version` preflight (10s cap)
150
+ so a hung or crashing CLI fails fast and explicitly instead of hanging the run.
151
+
152
+ ## The commit boundary
153
+
154
+ The relay never commits. omp edits the working tree; the orchestrator reviews, re-runs the gates,
155
+ and commits. See [review-and-land.md](review-and-land.md).
@@ -0,0 +1,59 @@
1
+ # Multi-task queues
2
+
3
+ The single-task loop scales to a queue: a removal across layers, a migration across files, or a
4
+ refactor sweep. Sequencing and bookkeeping make it trustworthy.
5
+
6
+ ## Run sequentially, one commit per task
7
+
8
+ Run tasks **one at a time, in dependency order**, landing each after review and gates before
9
+ dispatching the next:
10
+
11
+ ```bash
12
+ node "<skill-dir>/scripts/relay.mjs" --brief task-01.txt --cd /path/to/repo
13
+ ```
14
+
15
+ - Later briefs can rely on earlier work only after it lands.
16
+ - One commit per task keeps history reviewable and each step revertible.
17
+ - A clean tree before each dispatch keeps `touchedFiles` honest.
18
+
19
+ Use parallel runs only for genuinely independent tasks in separate working trees. Sequential is
20
+ the default because it preserves clean task boundaries.
21
+
22
+ ## Carry decided constraints forward
23
+
24
+ Fresh omp sessions do not remember earlier tasks. If task 2 chooses a helper name, fixture
25
+ location, or interface that task 5 needs, write that fact into task 5's brief.
26
+
27
+ Use a resumed omp session only for rework on the same task. Send a delta brief with
28
+ `--resume-last`, or with `--session <id>` from that task's `result.json`. Start unrelated queue
29
+ items in fresh sessions.
30
+
31
+ ## Keep a progress file
32
+
33
+ For more than two or three tasks, maintain one progress file beside the work:
34
+
35
+ - **Status table** - queued / at-implementer / reviewed+committed, with the commit hash.
36
+ - **Per-task review notes** - what landed, what you verified, and gate outcomes.
37
+ - **Needs your eyes** - design decisions, non-blocking nitpicks, and questions for the human.
38
+ - **End-of-run checklist** - the final cross-task verification.
39
+
40
+ Update it when each task lands, not in one batch at the end.
41
+
42
+ ## Close with a coherence check
43
+
44
+ After the last task:
45
+
46
+ - Run the full test/build once more.
47
+ - Search repo-wide for the thing the queue changed.
48
+ - Replay migrations from a clean state and check drift when applicable.
49
+ - Push and open or update the PR only after the final tree is coherent.
50
+
51
+ ## When to stop and ask
52
+
53
+ Proceed on work that follows from the agreed plan. Stop and surface when:
54
+
55
+ - A task cannot be completed correctly within its brief.
56
+ - Review calls the plan itself into question.
57
+ - Gates reveal a problem affecting already-landed tasks.
58
+
59
+ Report the landed state, commit hashes, and open question, then wait.
@@ -0,0 +1,95 @@
1
+ # Review and land
2
+
3
+ The implementer made the changes; you own the judgment. Verify against reality, never the self-report, and read
4
+ the diff as generated code because a green gate cannot catch every failure mode.
5
+
6
+ ## Check tests before trusting gates
7
+
8
+ If the diff touches existing tests, review those edits first:
9
+
10
+ - Treat unbriefed test edits as a contract change, not part of the fix.
11
+ - Treat newly skipped, disabled, or commented-out tests as failing until proven otherwise.
12
+ - Treat loosened assertions the same way: contains/truthy replacing exact matches, broadened error
13
+ types, and widened tolerances all weaken the gate.
14
+
15
+ ## Re-run the gates yourself
16
+
17
+ `result.json` carries omp's claims, not evidence. Re-run the project's actual test, lint, and build
18
+ commands in the working tree and read their output. Passing is necessary, not sufficient.
19
+
20
+ For changes with a specialized verification shape:
21
+
22
+ - **Migrations or schema:** round-trip them and check for drift.
23
+ - **Removals or renames:** grep for dangling references.
24
+ - **Stateful behavior:** exercise the behavior, not just compilation.
25
+
26
+ ## Read the diff against the brief
27
+
28
+ Start with `touchedFiles`, open the diff, and compare it to the brief:
29
+
30
+ - **Scope creep** - changes the brief excluded.
31
+ - **Scope shortfall** - missed behavior, edges, or cleanup.
32
+ - **Quiet judgment calls** - defensible but unasked decisions that need review.
33
+
34
+ ## The implementer sweep
35
+
36
+ Check every diff for patterns gates often miss:
37
+
38
+ - Hardcoded success or fixture data on a real-work path.
39
+ - Catch-all error handling that returns a default instead of propagating or recovering.
40
+ - Imports, dependencies, methods, and signatures not present in the installed version.
41
+ - Unused imports, uncalled helpers, unreachable branches, and scaffolding comments.
42
+ - A second client, error idiom, or logging style beside the repo's existing one.
43
+ - Tests that assert internals instead of behavior, or near-duplicate test bodies.
44
+ - Optional parameters, config flags, and abstractions with no caller.
45
+ - Guards for impossible cases that hide trust-boundary validation.
46
+
47
+ Send anything blocking back to omp as a delta brief, or fix it in the tree, and report either
48
+ choice to the human. Run relevant guard skills if installed.
49
+
50
+ ## The commit boundary
51
+
52
+ When the gates pass and the diff holds, **the orchestrator commits**, never the implementer.
53
+ Write a clear message describing what landed.
54
+
55
+ From dispatch until that commit, the uncommitted working tree is the authoritative copy of the
56
+ implementer's work — the only one you can commit from, and often the only copy at all. Never run
57
+ `git checkout`, `reset`, `clean`, or a branch switch in the workspace between those two points —
58
+ however messy an interrupted run looks, inspect it first: `git status`, `git diff`,
59
+ `git diff --cached` for anything the implementer staged (plain `git diff` is blind to the index),
60
+ and open any untracked files (`??` in `git status`) directly — they are the implementer's new
61
+ files, and no diff shows their contents. The tree is evidence, not clutter. After that inspection
62
+ the verdict can legitimately be to discard — work built on a premise you have since corrected,
63
+ for example — and then `git checkout`/`clean` is the right tool. The ban is on reflexive cleanup
64
+ before anyone has looked.
65
+
66
+ ## Rework: send the delta
67
+
68
+ Continue the same session with only the correction:
69
+
70
+ ```bash
71
+ echo "The fix is right, but the test mocks the DB session. Use the real migrated fixture and remove the
72
+ unused import." | node "<skill-dir>/scripts/relay.mjs" --resume-last --cd /path/to/repo
73
+ ```
74
+
75
+ Use `--session <id>` instead when resuming the specific id recorded in `result.json` - the stable
76
+ handle, since `--continue` may mint a new id for each continued run. The relay rejects
77
+ `--resume-last` plus `--session` before launch. Rework gets the same gate rerun, test review,
78
+ diff review, and implementer sweep.
79
+
80
+ A write-capable rework run passes `--yolo` and executes with no prompts - keep rework briefs as
81
+ narrow as the original. A `--read-only` run restricts omp to `read,grep,glob`; installed extension
82
+ code still runs with the user's host permissions when `--approve` is set, so inspect `touchedFiles`
83
+ and the tree after every run.
84
+
85
+ ## Surface, do not absorb
86
+
87
+ The human opted into delegation, so committing verified, gate-passing work is the contract. Keep
88
+ them in the loop when the work changes shape:
89
+
90
+ - Report design decisions and defensible-but-unrequested turns.
91
+ - Note non-blocking nitpicks you did not block on.
92
+ - Stop and ask if correct completion requires going beyond the brief.
93
+
94
+ For a queue, keep these notes in the progress file described in
95
+ [multi-task-queues.md](multi-task-queues.md).
@@ -0,0 +1,149 @@
1
+ # Writing the brief
2
+
3
+ A brief is the entire task as omp will see it. It runs in a separate session with **no memory of
4
+ your conversation, no access to prior notes, and no shared context** - only the text you send and
5
+ whatever it can inspect in the workspace. If a constraint is not in the brief or discoverable in
6
+ the repo, it does not exist for omp.
7
+
8
+ One shortcut: omp auto-loads `AGENTS.md` and `CLAUDE.md` context files from the workspace and its
9
+ parent directories, so conventions written there reach omp without inlining. Restate the
10
+ load-bearing rules in the brief anyway - the brief is the contract. Project `.omp` skills, rules,
11
+ and extensions stay undiscovered unless the dispatch passed `--approve`.
12
+
13
+ ## Model choice and resumed sessions
14
+
15
+ omp uses its configured default model when `--model` is omitted, so a fresh dispatch does not
16
+ require it. Pass `--model <id>` only when the human asked for a specific model.
17
+
18
+ **How to choose an id:**
19
+
20
+ 1. Run `omp models` (human table) or `omp models --json`. Narrow with `omp models find <substring>`
21
+ or `omp models <provider>`.
22
+ 2. Copy a catalog id (often `provider/model-id`, sometimes a unique substring omp can fuzzy-match).
23
+ 3. Pass it as the relay's `--model`. Add `--provider <name>` when two providers share a short name.
24
+
25
+ Do **not** run `omp --list-models`. That flag was removed; omp exits 2 with `unknown flag:
26
+ --list-models`. Do **not** pass `--api-key` through the relay.
27
+
28
+ `--thinking` is independent of `--model`. Use `off`, `auto`, `minimal`, `low`, `medium`, `high`,
29
+ `xhigh`, or `max`. The relay rejects any other value before dispatch.
30
+
31
+ A resumed run keeps the session context. Send only the delta brief with `--resume-last` or
32
+ `--session <id>`.
33
+
34
+ ## The shape that works
35
+
36
+ Use a compact, block-structured brief. State the task, what done means, the few constraints that
37
+ matter, and the report omp must return.
38
+
39
+ ```xml
40
+ <task>
41
+ One or two sentences: the concrete job and where it lives. Then the specifics - current state, what to
42
+ change, and explicitly what to leave untouched. The leave-untouched list prevents unrelated refactors.
43
+ </task>
44
+
45
+ <verification_loop>
46
+ Run these before finishing and fix anything they surface, do not just report it:
47
+ <the project's real test command>
48
+ <the project's real lint/format command>
49
+ <the project's real build/typecheck command>
50
+ Confirm the working tree shows only the intended changes afterward.
51
+ </verification_loop>
52
+
53
+ <action_safety>
54
+ Keep changes scoped to the task. No unrelated refactors, renames, or cleanup unless required for
55
+ correctness. Do NOT run git add or git commit - the orchestrator commits after reviewing. Leave the
56
+ work uncommitted in the working tree.
57
+ </action_safety>
58
+
59
+ <structured_output_contract>
60
+ End with a report in this exact shape:
61
+ 1. What changed and why
62
+ 2. Files touched
63
+ 3. Gate outcomes (include test/lint counts)
64
+ 4. Anything you deviated on, left open, or want a decision on
65
+ </structured_output_contract>
66
+ ```
67
+
68
+ Add extra blocks only when the task needs them:
69
+
70
+ - **Debugging or open-ended fixes** - add `<completeness_contract>` (resolve fully, not just the
71
+ first plausible cause) and `<missing_context_gating>` (find missing repo facts or state what is
72
+ unknown).
73
+ - **Research or recommendations** - add `<research_mode>` (separate observed facts, inferences,
74
+ and open questions), and dispatch with `--read-only` so omp cannot invoke write/edit/bash tools.
75
+ That restricts the tool surface; it is not a sandbox. `AGENTS.md` and `CLAUDE.md` are also
76
+ repository-controlled instructions and may load without `--approve`. Use read-only dispatches
77
+ for untrusted repositories. Leave `--approve` off unless the user trusts this repo's `.omp`
78
+ extras (the relay already passes `--no-extensions --no-skills --no-rules` unless `--approve`
79
+ is set).
80
+
81
+ ## Always ask for the report explicitly
82
+
83
+ The relay builds `finalMessage` from assistant text in omp's JSON event stream. Without a closing
84
+ summary, the edits may exist but the result is hard to review. The `<structured_output_contract>`
85
+ block makes the expected report explicit.
86
+
87
+ ## Discover the real gates
88
+
89
+ Read the repo's `AGENTS.md`, `CLAUDE.md`, `Makefile`, `package.json`, or equivalent first and copy
90
+ the actual commands into `<verification_loop>`. A brief that says only "run the tests" makes the
91
+ implementer guess or skip them.
92
+
93
+ ## Honor repo conventions
94
+
95
+ Restate the load-bearing house rules in the brief. omp can inspect the workspace (and auto-loads
96
+ context files), but the important constraints should be directly in front of it.
97
+
98
+ ## One task per brief
99
+
100
+ Keep each brief bounded. One brief -> one omp run -> one reviewed commit keeps the diff and
101
+ rollback clean. Split mixed implementation, review, documentation, and roadmap requests into
102
+ separate dispatches.
103
+
104
+ ## Premises freeze at dispatch
105
+
106
+ The implementer starts from the brief's facts and there is no steering channel mid-run. Audit the
107
+ fact block before sending — ownership, target branch, constraints, anything a judgment call rests
108
+ on. If a premise turns out wrong while the run is live, stop the run and re-dispatch a corrected
109
+ brief rather than discounting the output afterward; for a write-capable run, inspect the working
110
+ tree and reconcile any partial or premise-contaminated edits — keep or revert them — before the
111
+ re-dispatch.
112
+
113
+ ## A worked example
114
+
115
+ ```xml
116
+ <task>
117
+ In the payments service at services/billing/, the refund path double-charges when a refund is retried
118
+ after a network timeout. Make refund submission idempotent: check for an existing refund by idempotency
119
+ key before creating a new one. Touch only services/billing/refund.py and its tests. Leave the charge
120
+ path, API routes, and data models untouched.
121
+ </task>
122
+
123
+ <verification_loop>
124
+ Run and make green before finishing:
125
+ pytest tests/billing/ -q
126
+ ruff check services/billing/
127
+ Confirm git status shows only refund.py and its test file changed.
128
+ </verification_loop>
129
+
130
+ <action_safety>
131
+ Scope strictly to the refund idempotency fix. No unrelated refactors. Do NOT git add or commit; leave
132
+ changes in the working tree for review.
133
+ </action_safety>
134
+
135
+ <structured_output_contract>
136
+ Report: (1) the root cause and fix, (2) files touched, (3) pytest and ruff outcomes with counts,
137
+ (4) anything left open or needing a decision.
138
+ </structured_output_contract>
139
+ ```
140
+
141
+ ## Stdin delivery
142
+
143
+ The relay pipes the brief to omp on stdin. Unlike CLIs that take the brief as an argument, there
144
+ is no OS argv size cap and the brief never appears in the host process list. Large context can be
145
+ inlined, but prefer pointing omp at workspace files it can read itself. Keep secrets out of the
146
+ brief anyway on shared machines - reference environment variables or files with tight permissions.
147
+
148
+ Dispatch with [dispatch-and-poll.md](dispatch-and-poll.md), then review and commit with
149
+ [review-and-land.md](review-and-land.md).
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: opencode-delegate
3
+ description: Delegate coding tasks to the OpenCode CLI only when the user explicitly
4
+ requests it, while the orchestrator retains review and landing responsibility.
5
+ risk: safe
6
+ category: agent-orchestration
7
+ source: https://github.com/amElnagdy/delegate-skills
8
+ source_repo: amElnagdy/delegate-skills
9
+ source_type: community
10
+ date_added: '2026-08-26'
11
+ license: MIT
12
+ license_source: https://github.com/amElnagdy/delegate-skills/blob/master/LICENSE
13
+ compatibility: Requires the `opencode` CLI installed and authenticated, Node 18+,
14
+ and git. The orchestrating agent must be able to run shell commands and read files.
15
+ Shell examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows).
16
+ metadata:
17
+ version: 0.5.0
18
+ ---
19
+ # OpenCode Delegate
20
+
21
+ ## When to Use
22
+
23
+ - You want to delegate a bounded coding task to a separate `opencode` implementer (`OpenCode`) and then review its diff yourself.
24
+ - The user explicitly asked for delegation to this implementer.
25
+
26
+ You are the **orchestrator**. This skill lets you hand a bounded coding task to a separate
27
+ **implementer** — the OpenCode CLI — then review what it produced and land it yourself. You write
28
+ the brief and own the judgment; OpenCode does the typing in its own session; you verify and commit.
29
+
30
+ Nothing here is specific to one orchestrating agent. The loop needs only the ability to run a shell
31
+ command and read a file, so any agent with those two capabilities — Claude Code, OpenCode driving a
32
+ sibling session, or a comparable one — can drive it. (It is designed for and run on Claude Code; treat
33
+ other orchestrators as designed-for, not yet proven.)
34
+
35
+ ## When NOT to use this
36
+
37
+ - The task is small enough to just do inline — delegation overhead is not worth it.
38
+ - The `opencode` CLI is not installed or not authenticated (run `opencode auth login`).
39
+ - You want to write the code yourself, or you only need a review (use the `plan` agent via `--read-only`).
40
+
41
+ ## Prerequisites (check once)
42
+
43
+ 1. `opencode --version` succeeds. If not, install (`npm i -g opencode-ai`, or the native installer from
44
+ opencode.ai) and `opencode auth login`.
45
+ 2. **Confirm which `opencode` is on PATH.** `command -v opencode` shows the active binary and
46
+ `opencode --version` its version. The relay records the version it ran into `result.json`, so a stale
47
+ binary is visible after the fact.
48
+ 3. A model provider is authenticated — `opencode auth list` shows at least one credential.
49
+ 4. You are in (or will point `--cd` at) the target git repository.
50
+
51
+ ## Choose the implementer model
52
+
53
+ OpenCode has **no safe default** — a bare `opencode run` errors — so a fresh run needs a model via
54
+ `--model` or a fleet `--lane` that sets one (a resumed run inherits its session's model). Naming the
55
+ model is the one decision a single-model backend like codex-delegate never had, and it has two owners:
56
+
57
+ - **The human owns which models are allowed.** `opencode models` lists hundreds of entries, most billed
58
+ per token (OpenRouter and the like); only the human knows which are their flat-rate subscriptions, and
59
+ the CLI can't tell them apart. So the usable set is theirs — ideally stated once in the repo's
60
+ `AGENTS.md` or their `CLAUDE.md` (e.g. "delegate mechanical work to `opencode-go/…`, hard logic to
61
+ `…`").
62
+ - **You, the orchestrator, pick per task — from that set.** Match the model to the brief: a cheap, fast
63
+ model for a mechanical sweep (rename, migration, removal); a strong one for a subtle bug or a
64
+ money/security path.
65
+ - **If no usable set is stated, ask — don't guess.** Guessing from the catalog risks a metered model and
66
+ a surprise bill. Name the constraint to the human and let them choose.
67
+
68
+ More depth: [references/writing-the-brief.md](references/writing-the-brief.md).
69
+
70
+ ## The loop
71
+
72
+ Run these five steps per task. Steps 1, 4, and 5 are your judgment; 2 and 3 are mechanical.
73
+
74
+ ### 1. Write the brief
75
+
76
+ OpenCode sees **only** the text you send plus what it can read from the working tree — no chat history,
77
+ no shared context. Everything the task needs goes in the brief: the goal, the current state, what to
78
+ change, what to leave untouched, the project's **actual** gate commands (discover them from the repo's
79
+ AGENTS.md/CLAUDE.md/Makefile — do not assume), and a report contract. Tell OpenCode it will **not**
80
+ commit (you will). Keep one task per brief. Full guidance and a template:
81
+ [references/writing-the-brief.md](references/writing-the-brief.md).
82
+
83
+ ### 2. Dispatch
84
+
85
+ Send the brief to OpenCode with the bundled helper. It wraps `opencode run`, captures the run, and
86
+ writes a structured `result.json` — so your only job is "run a command, read a file." (`<skill-dir>`
87
+ below is this skill's installed directory — the folder containing this `SKILL.md`. Claude Code prints
88
+ it as "Base directory for this skill" when the skill loads; on other orchestrators use that same
89
+ directory — if unsure where it landed, run `find ~ -name relay.mjs -path '*opencode-delegate*'` and
90
+ substitute the directory above it.)
91
+
92
+ ```bash
93
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --model <provider/model> --cd /path/to/repo
94
+ # --model (or a --lane that sets model) is required on a fresh run
95
+ # fleet lane from delegate-setup: add --lane <name> (dials apply; flags still win)
96
+ # read-only (review/diagnosis, no edits): add --read-only (uses the plan agent)
97
+ # continue the previous OpenCode session: add --resume-last (delta brief only; keeps the model)
98
+ # hard time limit (watchdog): add --timeout 2h (default: off; implementation runs routinely need 1-2h)
99
+ # see all options: node .../relay.mjs --help
100
+ ```
101
+
102
+ The helper defaults to the write-capable `build` agent and writes its artifacts to a temp dir, so the
103
+ repo under review stays clean. It **never commits** — see step 5. Mechanics, flags, and the
104
+ `result.json` shape: [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
105
+
106
+ ### 3. Wait for completion
107
+
108
+ The helper blocks until OpenCode finishes, so back it with whatever your orchestrator offers and resume
109
+ when it returns:
110
+
111
+ - **Claude Code:** run the Bash call with `run_in_background: true`; you are notified on completion.
112
+ - **Plain shell / other agents:** run it in the foreground for short tasks, or background it and poll
113
+ the result file — `… &` in bash/zsh (including Git Bash/WSL), or your shell's equivalent (`Start-Job`
114
+ in PowerShell, `start /b` in cmd). The run is done when `result.json` exists with a `status`. (A
115
+ pre-run usage error — bad args or an empty brief — instead exits with code 2 and writes no result
116
+ file, so check the exit code too. A missing `opencode` binary exits 127 but *does* write a
117
+ `result.json` with status `opencode_unavailable`.)
118
+
119
+ Do not trust progress trackers over reality: a run is finished when `result.json` is written and the
120
+ process has exited. Read the working tree, not a status line. The implementer's full report is
121
+ the `finalMessage` field in `result.json` (also printed in full on stdout between the report markers).
122
+
123
+ ### 4. Review — do not trust the self-report
124
+
125
+ OpenCode's `result.json` includes its own final message and any gate claims. **Re-verify, don't accept:**
126
+
127
+ - **Re-run the project's gates yourself** (the test/lint/build commands from step 1). Never take
128
+ "gates passed" on faith.
129
+ - **Read the diff** against the brief: did OpenCode do what was asked, nothing more (scope creep) and
130
+ nothing less? `touchedFiles` in the result is your starting point.
131
+ - **Run the relevant guard skills** on the diff if you have them installed (clean-code-guard,
132
+ test-guard, etc. from `guard-skills`) — this skill produces the work; those skills judge it.
133
+ - For schema/migration changes, round-trip them; for removals, grep for dangling references.
134
+
135
+ Full checklist: [references/review-and-land.md](references/review-and-land.md).
136
+
137
+ ### 5. Land it
138
+
139
+ The implementer edits the working tree; **the orchestrator commits.** Committing should be the act of
140
+ the party that verified the work. Only after the gates pass and the diff holds:
141
+
142
+ - Commit the verified work yourself, with a clear message.
143
+ - If it needs changes, send a delta brief with `--resume-last` (don't restate the whole task) and
144
+ review again.
145
+
146
+ ## Autonomy model
147
+
148
+ OpenCode's autonomy is governed by the **agent**, not a sandbox enum:
149
+
150
+ - **`build`** (the relay default) — write-capable; edits files in the working dir headlessly. The
151
+ equivalent of "let it implement."
152
+ - **`plan`** (via `--read-only`) — read-only; reviews and diagnoses without touching the tree. The
153
+ equivalent of "let it look but not edit."
154
+
155
+ Permissions **auto-approve by default**: the relay passes `--auto` so a headless run never blocks on a
156
+ prompt no one can answer. That is the point of unattended delegation — the orchestrator's diff review
157
+ and the implementer sweep (step 4) are the safety net, not a per-action prompt. Pass `--no-auto` to
158
+ honor the agent's own permission config instead (allow/ask/deny per action); pair it with an agent whose
159
+ in-workspace permissions are set to *allow*, or a headless run can hang waiting on an `ask`.
160
+ **Read-only (`plan`) runs never get `--auto`** — auto-approving would let the plan agent's ask-gated
161
+ edit/bash permissions through and defeat "read-only," so a review can't be tricked into touching the tree.
162
+
163
+ ## Authorization model
164
+
165
+ Delegation is something the human opts into. Once they have ("run this queue", "proceed"), committing
166
+ verified, gate-passing work is the agreed contract — that is the whole point. Two limits on that
167
+ mandate: **surface, don't absorb** (report OpenCode's design decisions, defensible-but-unasked turns,
168
+ and non-blocking nitpicks rather than silently keeping them) and **stop for scope changes** (if correct
169
+ completion needs going beyond the brief, ask — don't expand the mandate yourself). The full treatment
170
+ is in [references/review-and-land.md](references/review-and-land.md).
171
+
172
+ ## References
173
+
174
+ - [references/writing-the-brief.md](references/writing-the-brief.md) — how to write a brief OpenCode can
175
+ execute blind: structure, XML blocks, the report contract, embedding the real gate commands.
176
+ - [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — `relay.mjs` flags, the
177
+ `result.json` contract, backgrounding per orchestrator, and recovery when a run misbehaves.
178
+ - [references/review-and-land.md](references/review-and-land.md) — the review checklist, the commit
179
+ boundary, and the rework cycle via `--resume-last`.
180
+ - [references/multi-task-queues.md](references/multi-task-queues.md) — running a sequential queue:
181
+ carrying constraints forward, progress tracking, and the end-of-run coherence check.
182
+
183
+
184
+ ## Limitations
185
+
186
+ - Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `opencode` CLI, Node 18+, git.
187
+ - Relay never commits — it only returns structured result JSON; you review and land the commit.
188
+
189
+ > Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.