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,146 @@
1
+ # Dispatch and poll
2
+
3
+ `scripts/relay.mjs` wraps pi's non-interactive JSON mode, captures its event stream, and writes a
4
+ `result.json`. Run one command, then read one file.
5
+
6
+ ## Before the first run
7
+
8
+ ```bash
9
+ command -v pi
10
+ pi --version
11
+ pi --list-models # optional: pick a model id for --model
12
+ ```
13
+
14
+ Install with `npm install -g @earendil-works/pi-coding-agent`. Authenticate with `/login` inside
15
+ pi (subscription providers) or an API-key environment variable; pi stores credentials in
16
+ `~/.pi/agent/`.
17
+
18
+ ## Dispatching
19
+
20
+ ```bash
21
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
22
+ ```
23
+
24
+ `<skill-dir>` is the installed folder containing this skill's `SKILL.md`.
25
+
26
+ | Flag | Effect |
27
+ | --- | --- |
28
+ | `--brief <file>` | Brief path. Omit it to read the brief from stdin. |
29
+ | `--cd <dir>` | Working root and child process cwd (default: current directory). |
30
+ | `--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. |
31
+ | `--provider <name>` | pi provider name (default: pi's own default). Token-validated. |
32
+ | `--model <pattern>` | pi model id or pattern (default: pi's own default). Token-validated: letters, digits, `. _ : / -`. |
33
+ | `--session <id>` | Resume a specific pi session; send only the delta brief. |
34
+ | `--resume-last` | Continue the most recent pi session for this cwd (`pi --continue`); send only the delta brief. |
35
+ | `--read-only` | Restrict pi's callable tools to `--tools read,grep,find,ls`. |
36
+ | `--approve` | Trust project-local `.pi` resources for this run. The default passes `--no-approve`. |
37
+ | `--timeout <dur>` | Relay watchdog (default: `30m`; h/m/s strings). Pi has no timeout flag. |
38
+ | `--out-dir <dir>` | Artifact directory (default: a fresh directory under the system temp dir). |
39
+ | `-h`, `--help` | Print the relay's header help. |
40
+
41
+ `--session` and `--resume-last` are mutually exclusive. The child cwd pins the workspace; pi has
42
+ no add-dir flag and no sandbox, so reachability is simply the filesystem.
43
+
44
+ Remember: pi has no permission modes. A run without `--read-only` can write and execute anything
45
+ the user account can. `--read-only` removes write/edit/bash from Pi's callable tool surface, but
46
+ installed extension code still runs with the user's host permissions.
47
+
48
+ ## Artifacts and result fields
49
+
50
+ Artifacts live outside the repo by default, so they do not appear in `touchedFiles`; an
51
+ `--out-dir` inside the worktree can make the artifacts appear there:
52
+
53
+ - `brief.txt` - the exact brief.
54
+ - `events.jsonl` - raw pi stdout events (the session header, then every agent event).
55
+ - `final.txt` - assistant text joined with a blank line between chunks; absent if none was emitted.
56
+ - `stderr.txt` - complete stderr.
57
+ - `result.json` - the stable `delegate-relay.result.v1` contract.
58
+
59
+ `result.json` fields:
60
+
61
+ - `schema`, `tool` (`"pi"`), `status` (`completed` | `failed` | `timeout` | `aborted` | `pi_unavailable`), `exitCode`, and
62
+ `signal` (`null` unless the child died on a signal).
63
+ - `workdir`, requested `provider`/`model`, `projectTrusted`, `readOnly`, `resumed`, `piVersion`,
64
+ `sessionId`, `startedAt`, and `finishedAt`.
65
+ - `actualProvider`, `actualModel`, `usage`, and `stopReason` from Pi's final assistant event.
66
+ - `briefPath`, `finalPath`, `eventsPath`, and `stderrPath`.
67
+ - `sessionId` - parsed from the JSON stream's `session` header. Resume with `--session <id>`.
68
+ Note: `--continue` may mint a new session id for the continued run; the result always reports
69
+ the id of the run that just happened.
70
+ - `finalMessage` - assistant text parts joined with `"\n\n"`; tool calls and tool results are
71
+ excluded.
72
+ - `touchedFiles` - `git status --porcelain` lines for the **final working tree under `--cd` only**,
73
+ not an attribution of pi's edits: anything already dirty before dispatch shows up too. Dispatch
74
+ from a clean tree when you want the list to read as "what pi changed". `null` means git could
75
+ not report; `[]` means git ran and the tree is clean.
76
+ - `stderrTail` - the last 20 non-empty stderr lines on any run that did not complete (`failed`,
77
+ `timeout`, `aborted`), except a launch failure, which reports `failed` with no `stderrTail`.
78
+ - `error` - present for launch failures, preflight failures, when the relay watchdog fires
79
+ (`timeout`), and on an `aborted` run.
80
+
81
+ Pi's stream carries thinking and message-update events the relay archives but does not parse.
82
+
83
+ ## Waiting for completion
84
+
85
+ The relay blocks. Use the orchestrator's background-command facility, or background it in a
86
+ shell and poll for `result.json`. The run is done only when the process exits and the file
87
+ contains a `status`. The result file is written atomically, so a partial read is impossible.
88
+
89
+ A pre-run usage error exits 2 and writes no result. A missing `pi` exits 127 and writes
90
+ `status: "pi_unavailable"`.
91
+
92
+ ## When a run misbehaves
93
+
94
+ - **`status: "pi_unavailable"` (exit 127):** install pi (`npm install -g @earendil-works/pi-coding-agent`),
95
+ authenticate, and re-dispatch.
96
+ - **`status: "failed"`:** read `stderrTail`, `stderrPath`, and the tail of `events.jsonl`. Common
97
+ causes: an unknown `--model` (`Model "<x>" not found`), an expired login, or a provider error.
98
+ A final assistant event with `stopReason: "error"` or `"aborted"` is failed even if Pi exits zero.
99
+ - **`status: "failed"` with an `error` mentioning `version preflight`:** the bounded `pi --version`
100
+ probe failed or hung, so pi was never dispatched. Check the install (`pi --version` yourself).
101
+ - **`status: "aborted"`:** the relay itself was killed (its parent's timeout, a stopped task, a
102
+ closed terminal) and forwarded the kill to pi. The result is written before the relay exits;
103
+ inspect the working tree before re-dispatching. On native Windows a hard kill of the relay is
104
+ uncatchable (Node supports no `SIGTERM` handler there), so this status may never get written -
105
+ a relay process that is gone without a `result.json` is an aborted run; inspect the working
106
+ tree and `events.jsonl` directly.
107
+ - **`status: "failed"` with `signal: "SIGKILL"`:** the host killed the process, commonly through
108
+ the OOM killer or a supervisor timeout. This is not a pi error; check host memory and
109
+ re-dispatch, or split the task into smaller briefs.
110
+ - **`status: "timeout"`:** the `--timeout` watchdog killed the run; `error` reads
111
+ `pi did not finish within --timeout <dur>; killed by the relay watchdog`. Increase `--timeout`
112
+ or split the task. On POSIX the relay sends SIGTERM to the process group, waits 10 seconds,
113
+ then sends SIGKILL if needed; on Windows there is no escalation phase — the whole process tree
114
+ is felled immediately with `taskkill /pid <pid> /t /f`.
115
+ - **Empty `finalMessage`:** inspect `touchedFiles` and the diff. Add a
116
+ `<structured_output_contract>` to the next brief to require a closing report.
117
+
118
+ ## Recovering lost work
119
+
120
+ `events.jsonl` in the run directory records every event the implementer streamed. If finished
121
+ work is lost — the run killed late, or the working tree damaged afterward — read the event log
122
+ before re-dispatching: it identifies which files and tool commands were involved, which scopes
123
+ what needs redoing. Tool execution events carry the write/edit arguments, but treat any
124
+ reconstruction as unverified until it matches a working-tree diff — when the tree still holds the
125
+ work, preserve the tree rather than replaying the log.
126
+
127
+ ## What the relay runs
128
+
129
+ The launch is equivalent to:
130
+
131
+ ```bash
132
+ cat brief.txt | pi --mode json [--provider <name>] [--model <pattern>] \
133
+ [--session <id> | --continue] [--approve | --no-approve] [--tools read,grep,find,ls]
134
+ ```
135
+
136
+ The brief rides stdin, so it is not visible in the host process list and no argv size cap
137
+ applies. On native Windows `pi` is a `.cmd` shim, so the relay launches it with `shell:true`;
138
+ only the token-validated `--provider`/`--model`/`--session` values ever ride argv. Before dispatch the relay
139
+ runs a bounded `pi --version` preflight (10s cap) so a hung or crashing CLI fails fast and
140
+ explicitly instead of hanging the run. The relay passes `--no-approve` by default, so project
141
+ `.pi` settings, extensions, and skills stay untrusted; `--approve` opts in for a trusted repository.
142
+
143
+ ## The commit boundary
144
+
145
+ The relay never commits. Pi edits the working tree; the orchestrator reviews, re-runs the gates,
146
+ 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 pi 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 pi 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 pi'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 pi 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
+ Pi has no permission modes, so a write-capable rework run executes with no prompts - keep rework
81
+ briefs as narrow as the original. A `--read-only` run removes write/edit/bash from Pi's callable
82
+ tool surface, including extension/custom tools; installed extension code still runs with the
83
+ user's host permissions, so inspect `touchedFiles` 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,132 @@
1
+ # Writing the brief
2
+
3
+ A brief is the entire task as pi 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 pi.
7
+
8
+ One shortcut: pi auto-loads `AGENTS.md` and `CLAUDE.md` context files from the workspace and its
9
+ parent directories, so conventions written there reach pi without inlining. Restate the
10
+ load-bearing rules in the brief anyway - the brief is the contract.
11
+
12
+ ## Model choice and resumed sessions
13
+
14
+ Pi uses its configured default model when `--model` is omitted, so a fresh dispatch does not
15
+ require it. Pass `--model <id>` only when the human asked for a specific model, choosing from
16
+ `pi --list-models`. The relay forwards explicit ids and patterns (letters, digits, `. _ : / -`);
17
+ glob patterns with `*` are rejected because the value reaches a shell on Windows.
18
+
19
+ A resumed run keeps the session context. Send only the delta brief with `--resume-last` or
20
+ `--session <id>`.
21
+
22
+ ## The shape that works
23
+
24
+ Use a compact, block-structured brief. State the task, what done means, the few constraints that
25
+ matter, and the report pi must return.
26
+
27
+ ```xml
28
+ <task>
29
+ One or two sentences: the concrete job and where it lives. Then the specifics - current state, what to
30
+ change, and explicitly what to leave untouched. The leave-untouched list prevents unrelated refactors.
31
+ </task>
32
+
33
+ <verification_loop>
34
+ Run these before finishing and fix anything they surface, do not just report it:
35
+ <the project's real test command>
36
+ <the project's real lint/format command>
37
+ <the project's real build/typecheck command>
38
+ Confirm the working tree shows only the intended changes afterward.
39
+ </verification_loop>
40
+
41
+ <action_safety>
42
+ Keep changes scoped to the task. No unrelated refactors, renames, or cleanup unless required for
43
+ correctness. Do NOT run git add or git commit - the orchestrator commits after reviewing. Leave the
44
+ work uncommitted in the working tree.
45
+ </action_safety>
46
+
47
+ <structured_output_contract>
48
+ End with a report in this exact shape:
49
+ 1. What changed and why
50
+ 2. Files touched
51
+ 3. Gate outcomes (include test/lint counts)
52
+ 4. Anything you deviated on, left open, or want a decision on
53
+ </structured_output_contract>
54
+ ```
55
+
56
+ Add extra blocks only when the task needs them:
57
+
58
+ - **Debugging or open-ended fixes** - add `<completeness_contract>` (resolve fully, not just the
59
+ first plausible cause) and `<missing_context_gating>` (find missing repo facts or state what is
60
+ unknown).
61
+ - **Research or recommendations** - add `<research_mode>` (separate observed facts, inferences,
62
+ and open questions), and dispatch with `--read-only` so Pi cannot invoke write/edit/bash tools.
63
+
64
+ ## Always ask for the report explicitly
65
+
66
+ The relay builds `finalMessage` from assistant text in pi's JSON event stream. Without a closing
67
+ summary, the edits may exist but the result is hard to review. The `<structured_output_contract>`
68
+ block makes the expected report explicit.
69
+
70
+ ## Discover the real gates
71
+
72
+ Read the repo's `AGENTS.md`, `CLAUDE.md`, `Makefile`, `package.json`, or equivalent first and copy
73
+ the actual commands into `<verification_loop>`. A brief that says only "run the tests" makes the
74
+ implementer guess or skip them.
75
+
76
+ ## Honor repo conventions
77
+
78
+ Restate the load-bearing house rules in the brief. Pi can inspect the workspace (and auto-loads
79
+ context files), but the important constraints should be directly in front of it.
80
+
81
+ ## One task per brief
82
+
83
+ Keep each brief bounded. One brief -> one pi run -> one reviewed commit keeps the diff and
84
+ rollback clean. Split mixed implementation, review, documentation, and roadmap requests into
85
+ separate dispatches.
86
+
87
+ ## Premises freeze at dispatch
88
+
89
+ The implementer starts from the brief's facts and there is no steering channel mid-run. Audit the
90
+ fact block before sending — ownership, target branch, constraints, anything a judgment call rests
91
+ on. If a premise turns out wrong while the run is live, stop the run and re-dispatch a corrected
92
+ brief rather than discounting the output afterward; for a write-capable run, inspect the working
93
+ tree and reconcile any partial or premise-contaminated edits — keep or revert them — before the
94
+ re-dispatch.
95
+
96
+ ## A worked example
97
+
98
+ ```xml
99
+ <task>
100
+ In the payments service at services/billing/, the refund path double-charges when a refund is retried
101
+ after a network timeout. Make refund submission idempotent: check for an existing refund by idempotency
102
+ key before creating a new one. Touch only services/billing/refund.py and its tests. Leave the charge
103
+ path, API routes, and data models untouched.
104
+ </task>
105
+
106
+ <verification_loop>
107
+ Run and make green before finishing:
108
+ pytest tests/billing/ -q
109
+ ruff check services/billing/
110
+ Confirm git status shows only refund.py and its test file changed.
111
+ </verification_loop>
112
+
113
+ <action_safety>
114
+ Scope strictly to the refund idempotency fix. No unrelated refactors. Do NOT git add or commit; leave
115
+ changes in the working tree for review.
116
+ </action_safety>
117
+
118
+ <structured_output_contract>
119
+ Report: (1) the root cause and fix, (2) files touched, (3) pytest and ruff outcomes with counts,
120
+ (4) anything left open or needing a decision.
121
+ </structured_output_contract>
122
+ ```
123
+
124
+ ## Stdin delivery
125
+
126
+ The relay pipes the brief to pi on stdin. Unlike CLIs that take the brief as an argument, there
127
+ is no OS argv size cap and the brief never appears in the host process list. Large context can be
128
+ inlined, but prefer pointing pi at workspace files it can read itself. Keep secrets out of the
129
+ brief anyway on shared machines - reference environment variables or files with tight permissions.
130
+
131
+ Dispatch with [dispatch-and-poll.md](dispatch-and-poll.md), then review and commit with
132
+ [review-and-land.md](review-and-land.md).
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: qoder-delegate
3
+ description: Delegate coding tasks to the Qoder CLI (`qodercli`) only when the user
4
+ explicitly 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
+ metadata:
14
+ version: 0.5.0
15
+ ---
16
+ # Qoder Delegate
17
+
18
+ ## When to Use
19
+
20
+ - You want to delegate a bounded coding task to a separate `qoder` implementer (`Qoder`) and then review its diff yourself.
21
+ - The user explicitly asked for delegation to this implementer.
22
+
23
+ You are the **orchestrator**. Delegate one bounded coding task to a separate **implementer** - Qoder CLI -
24
+ then review what it produced and land it yourself. You write the brief and own the judgment; Qoder
25
+ edits the working tree in its session; you verify and commit.
26
+
27
+ The loop needs only shell and file access, so any comparable orchestrator can drive it.
28
+
29
+ ## When NOT to use this
30
+
31
+ - The task is small enough to do inline; delegation overhead is not worth it.
32
+ - `qodercli` is not installed or authenticated.
33
+ - You want to write the code yourself or need only an interactive Qoder session.
34
+
35
+ ## Prerequisites (check once)
36
+
37
+ ```bash
38
+ command -v qodercli
39
+ qodercli --version
40
+ qodercli --list-models
41
+ ```
42
+
43
+ If the binary is missing, install it from Qoder's
44
+ [official Quick Start](https://docs.qoder.com/en/cli/quick-start). Authenticate with `qodercli login`,
45
+ or set `QODER_PERSONAL_ACCESS_TOKEN` for automation. A successful `--list-models` confirms the current
46
+ account can return its live model catalog.
47
+
48
+ ## Choose model and context window
49
+
50
+ Qoder's available models can change. If the human requests a model, use its exact current value from
51
+ `qodercli --list-models`; never invent or pin a catalog entry. Otherwise omit `--model` and let Qoder
52
+ use its current default.
53
+
54
+ `--context-window <n>` is optional. Pass a positive integer only when the human requests a size or the
55
+ task needs an explicit budget. Qoder applies it only to supported models; surface an unsupported
56
+ model/size error instead of silently choosing another value.
57
+
58
+ ## The loop
59
+
60
+ Run these five steps per task. Steps 1, 4, and 5 require judgment; 2 and 3 are mechanical.
61
+
62
+ ### 1. Write the brief
63
+
64
+ Qoder sees the brief plus what it can inspect in the workspace, not this chat. Include the goal,
65
+ current state, what to change, what to leave untouched, the project's **actual** gates, and a closing
66
+ report contract. Tell Qoder not to commit. Keep one task per brief. See
67
+ [references/writing-the-brief.md](references/writing-the-brief.md).
68
+
69
+ ### 2. Dispatch
70
+
71
+ Use the bundled relay. It wraps Qoder's non-interactive `stream-json` mode and writes `result.json`.
72
+ `<skill-dir>` is the installed folder containing this `SKILL.md`.
73
+
74
+ ```bash
75
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
76
+ # choose a live model: add --model "<value from qodercli --list-models>"
77
+ # request a supported context window: add --context-window 32768
78
+ # resume the latest session: add --resume-last # delta brief only
79
+ # resume a specific session: add --resume <id> # delta brief only
80
+ # see every option: node .../relay.mjs --help
81
+ ```
82
+
83
+ Implementation runs default to Qoder's `auto` permission mode. The relay never bypasses permissions
84
+ unless the caller explicitly requests it, and it never commits. See
85
+ [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
86
+
87
+ ### 3. Wait for completion
88
+
89
+ The relay blocks until Qoder exits. Run it with the orchestrator's background-command facility, or
90
+ background it in the shell and wait for `result.json`. Completion means the process exited and the
91
+ file contains a `status`; do not trust a progress display.
92
+
93
+ A pre-run usage error exits 2 and writes no result. Missing `qodercli` exits 127 and writes
94
+ `status: "qoder_unavailable"` with installation guidance.
95
+
96
+ Native Windows relay launch is not yet verified; do not claim it until a native Windows smoke passes.
97
+
98
+ ### 4. Review - do not trust the self-report
99
+
100
+ Treat Qoder's final message and gate outcomes as claims:
101
+
102
+ - Re-run the project's gates yourself.
103
+ - Read the diff against the brief, starting with `touchedFiles`.
104
+ - Check any `--add-dir` workspaces separately; their changes are not in the primary tree report.
105
+ - Run relevant guard skills if installed.
106
+ - Round-trip migrations and grep for dangling references after removals or renames.
107
+
108
+ See [references/review-and-land.md](references/review-and-land.md).
109
+
110
+ ### 5. Land it
111
+
112
+ The implementer edits; **the orchestrator commits**. Commit only after the gates pass and the diff
113
+ holds. If rework is needed, send a delta brief with `--resume-last` or `--resume <id>`, then review
114
+ again.
115
+
116
+ ## Permission model
117
+
118
+ Qoder print mode cannot show approval prompts. The relay defaults to `auto`, which makes
119
+ non-interactive allow/deny decisions. `default` can deny actions that would require a prompt;
120
+ `accept_edits` permits workspace edits but may deny shell actions; `dont_ask` fails closed; `plan`
121
+ maps to `default` plus Qoder's Plan work state; and `bypass_permissions` is for explicitly trusted
122
+ runs only.
123
+
124
+ Qoder falls back to `default` when a non-default mode is requested outside a trusted directory. Check
125
+ `actualPermissionMode` in `result.json`; no requested mode replaces diff review.
126
+
127
+ ## Authorization model
128
+
129
+ Delegation is something the human opts into. Once they ask for it, landing verified, gate-passing work
130
+ is the contract. Two limits remain: **surface, do not absorb** (report Qoder's design decisions and
131
+ non-blocking deviations) and **stop for scope changes** (ask before expanding beyond the brief). See
132
+ [references/review-and-land.md](references/review-and-land.md).
133
+
134
+ ## References
135
+
136
+ - [references/writing-the-brief.md](references/writing-the-brief.md) - brief structure, real gates,
137
+ report contract, secrets, and delta briefs.
138
+ - [references/dispatch-and-poll.md](references/dispatch-and-poll.md) - flags, model/context controls,
139
+ artifacts, result fields, sessions, and failure recovery.
140
+ - [references/review-and-land.md](references/review-and-land.md) - independent review, commit boundary,
141
+ and rework.
142
+ - [references/multi-task-queues.md](references/multi-task-queues.md) - sequential queues, constraint
143
+ carry-forward, progress tracking, and final coherence.
144
+
145
+
146
+ ## Limitations
147
+
148
+ - Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `qoder` CLI, Node 18+, git.
149
+ - Relay never commits — it only returns structured result JSON; you review and land the commit.
150
+
151
+ > Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.