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,182 @@
1
+ ---
2
+ name: claude-delegate
3
+ description: Delegate coding tasks to a separate Claude Code CLI process or Claude
4
+ session only when the user explicitly requests it, while the orchestrator retains
5
+ review and landing responsibility.
6
+ risk: safe
7
+ category: agent-orchestration
8
+ source: https://github.com/amElnagdy/delegate-skills
9
+ source_repo: amElnagdy/delegate-skills
10
+ source_type: community
11
+ date_added: '2026-08-26'
12
+ license: MIT
13
+ license_source: https://github.com/amElnagdy/delegate-skills/blob/master/LICENSE
14
+ compatibility: Requires the `claude` CLI (Claude Code) installed and authenticated,
15
+ Node 18+, and git. The orchestrating agent must be able to run shell commands and
16
+ read files. Claude's shell sandbox requires macOS, Linux, or WSL2; native Windows
17
+ launch is pending verification.
18
+ metadata:
19
+ version: 0.5.0
20
+ ---
21
+ # Claude Delegate
22
+
23
+ ## When to Use
24
+
25
+ - You want to delegate a bounded coding task to a separate `claude` implementer (`Claude Code`) and then review its diff yourself.
26
+ - The user explicitly asked for delegation to this implementer.
27
+
28
+ You are the **orchestrator**. Delegate one bounded coding task to a separate **implementer** — a Claude
29
+ Code CLI session — then review what it produced and land it yourself. You write the brief and own the
30
+ judgment; the separate Claude session edits the working tree; you verify and commit.
31
+
32
+ This skill is not a signal for the current Claude to implement directly. Use it only after the human
33
+ explicitly asks for delegation to another Claude Code process or session.
34
+
35
+ ## When not to use this
36
+
37
+ - The human asked the current agent to implement the task directly.
38
+ - The task is small enough to do inline and the human did not request delegation.
39
+ - The `claude` CLI is missing or unauthenticated (`claude auth status`).
40
+ - The task needs a stronger host boundary than Claude Code's tool permissions and shell-only sandbox
41
+ provide. Use an isolated container or VM for that requirement.
42
+
43
+ ## Prerequisites
44
+
45
+ 1. `claude --version` succeeds.
46
+ 2. `claude auth status` reports an authenticated session. On macOS the live credentials sit in the
47
+ login Keychain; when the orchestrator's own sandbox blocks Keychain access (Codex's sandbox
48
+ does), `claude` falls back to a possibly stale credentials file and reports `loggedIn: false`
49
+ even though the login is valid. Re-run the check — and the dispatch itself — with that sandbox
50
+ escalated or outside it before concluding the CLI is unauthenticated.
51
+ 3. The target repository is the directory passed with `--cd`.
52
+ 4. On Linux/WSL2, Claude's sandbox dependencies are installed. The normal relay profile is
53
+ configured to fail when the sandbox is unavailable instead of silently running shell commands
54
+ unsandboxed. Existing merged settings can still affect the effective boundary.
55
+
56
+ ## The loop
57
+
58
+ ### 1. Write the brief
59
+
60
+ The separate session has no orchestrator chat history. It receives the brief on stdin and can inspect
61
+ the target working tree.
62
+
63
+ Claude Code automatically discovers the target project's `CLAUDE.md` and normal local Claude
64
+ configuration because the relay does not use `--bare`. It does **not** generically auto-load
65
+ `AGENTS.md`. Read `AGENTS.md` yourself and copy every load-bearing constraint and the real gate
66
+ commands into the brief. Tell the implementer not to commit. Keep one task per brief.
67
+
68
+ Template and details: [references/writing-the-brief.md](references/writing-the-brief.md).
69
+
70
+ ### 2. Dispatch
71
+
72
+ ```bash
73
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
74
+ # review/diagnosis only: add --read-only
75
+ # continue the latest session: add --resume-last
76
+ # continue the recorded session: add --session <id>
77
+ # choose limits: add --max-turns 40 --max-budget-usd 10
78
+ # hard relay deadline: add --timeout 2h
79
+ # inspect every option: node .../relay.mjs --help
80
+ ```
81
+
82
+ `<skill-dir>` is this installed skill directory, the folder containing this `SKILL.md`.
83
+
84
+ The relay runs `claude -p --output-format stream-json --verbose`, sends the brief through stdin, and
85
+ writes artifacts under the system temp directory by default. It never uses `--bg` or `--bare`, and it
86
+ never commits. See [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
87
+
88
+ ### 3. Wait
89
+
90
+ The relay blocks until Claude exits. Use the orchestrator's background-command facility, or run it in
91
+ the foreground and wait. Completion means the process exited and `result.json` exists.
92
+
93
+ - A pre-run usage error exits 2 and writes no `result.json`.
94
+ - A missing `claude` exits 127 and writes `status: "claude_unavailable"`.
95
+ - Timeout and caught relay signals terminate the whole implementer process tree and preserve an
96
+ outcome artifact.
97
+
98
+ Read `finalMessage`, `touchedFiles`, `resultSubtype`, and the raw artifact paths from `result.json`.
99
+
100
+ ### 4. Review
101
+
102
+ Treat the implementer's report and gate outcomes as claims:
103
+
104
+ - Review edits to existing tests before a green gate means anything.
105
+ - Re-run the project's actual gates yourself.
106
+ - Read the complete diff against the brief, starting with `touchedFiles`.
107
+ - Inspect untracked and staged content as well as the ordinary diff.
108
+ - Run relevant guard skills if installed.
109
+
110
+ Full checklist: [references/review-and-land.md](references/review-and-land.md).
111
+
112
+ ### 5. Land
113
+
114
+ The **orchestrator commits** only after the gates pass and the diff holds. For rework, resume the same
115
+ Claude session with a delta brief:
116
+
117
+ ```bash
118
+ echo "Keep the implementation, replace the mocked DB test with the migrated fixture, and remove the
119
+ unused import." | node "<skill-dir>/scripts/relay.mjs" --session <id> --cd /path/to/repo
120
+ ```
121
+
122
+ Review a resumed run exactly like the first run.
123
+
124
+ ## Permission profiles
125
+
126
+ The normal profile is deliberately explicit:
127
+
128
+ - `acceptEdits` permission mode.
129
+ - Built-in tools restricted to Read, Glob, Grep, Edit, Write, and the platform shell.
130
+ - On macOS, Linux, and WSL2, Claude's shell sandbox is enabled with startup failure on missing
131
+ dependencies and no unsandboxed retry. Commands that stay sandboxed are auto-approved so ordinary
132
+ gates can run headlessly. The sandbox governs shell processes and their children only; merged
133
+ local or managed sandbox settings can add effective paths or exclusions.
134
+ - Configured MCP discovery and Claude.ai connectors are disabled, all MCP tools are denied, and
135
+ skills, commands, and Claude's Agent tool are unavailable to the child. Project `CLAUDE.md`, hooks,
136
+ normal authentication, session persistence, and other local settings still load.
137
+ - String rules deny common direct shell forms of `git commit`, `git push`, and nested `claude`, plus
138
+ any command containing `claude-delegate`. Aliases, scripts, and wrappers can bypass them, so they
139
+ are only a speed bump; the brief's no-commit instruction and orchestrator review remain the boundary.
140
+
141
+ Native Windows does not support Claude's shell sandbox. The relay restricts the tool surface and
142
+ pre-approves PowerShell so the run remains non-interactive, but that shell is not OS-isolated. Native
143
+ `claude.exe` and npm `claude.cmd` launch paths are implemented; Windows verification is pending.
144
+
145
+ `--read-only` uses `plan` mode with only Read, Glob, and Grep. It removes edit, write, and shell paths,
146
+ then compares parsed git porcelain and fingerprints the working-tree identity and index entries of
147
+ Git-visible paths that were already dirty.
148
+ `readOnlyViolation` is `true` when either signal proves a change, `false` when coverage is complete and
149
+ detects none, and `null` when coverage is incomplete. This is a reporting tripwire, not an OS boundary:
150
+ ignored paths and perfect restores are outside it, local hooks can write, and concurrent changes cannot
151
+ be attributed to Claude.
152
+
153
+ `--dangerously-skip-permissions` is an explicit opt-in to Claude's `bypassPermissions` mode. The
154
+ restricted tool surface, direct commit/push deny rules, and supported-platform shell sandbox remain,
155
+ but direct file tools can cross normal permission boundaries. Use it only with the human's explicit
156
+ acceptance.
157
+
158
+ ## Complementary to native Claude features
159
+
160
+ Claude subagents, agent teams, and background sessions are useful when the current Claude environment
161
+ is already the orchestrator and native coordination is the goal. This skill is complementary: it
162
+ provides a cross-orchestrator contract — self-contained brief → dispatch → artifacts → review → land
163
+ — and keeps the commit with the orchestrator.
164
+
165
+ ## References
166
+
167
+ - [references/writing-the-brief.md](references/writing-the-brief.md) — context, `CLAUDE.md` versus
168
+ `AGENTS.md`, real gates, report contract, and delta briefs.
169
+ - [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — flags, profiles, artifacts,
170
+ `result.json`, polling, and failure recovery.
171
+ - [references/review-and-land.md](references/review-and-land.md) — generated-code review, the commit
172
+ boundary, and session rework.
173
+ - [references/multi-task-queues.md](references/multi-task-queues.md) — sequential queues, progress
174
+ tracking, constraint carry-forward, and final coherence.
175
+
176
+
177
+ ## Limitations
178
+
179
+ - Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `claude` CLI, Node 18+, git.
180
+ - Relay never commits — it only returns structured result JSON; you review and land the commit.
181
+
182
+ > Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.
@@ -0,0 +1,220 @@
1
+ # Dispatch and poll
2
+
3
+ `scripts/relay.mjs` wraps Claude Code's non-interactive `claude -p` mode, sends a brief on stdin,
4
+ captures the structured stream, and writes `delegate-relay.result.v1`.
5
+
6
+ ## Before the first run
7
+
8
+ ```bash
9
+ command -v claude
10
+ claude --version
11
+ claude auth status
12
+ ```
13
+
14
+ The relay performs its own `claude --version` preflight and records the answer as `claudeVersion`.
15
+ When an orchestrator is itself Claude Code, the relay removes only inherited `CLAUDECODE` from the
16
+ child environment so a separate CLI process can start. It preserves credentials,
17
+ `CLAUDE_CODE_CHILD_SESSION`, and every other environment entry. Version preflight uses that same
18
+ environment.
19
+
20
+ ## Dispatch
21
+
22
+ ```bash
23
+ node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
24
+ ```
25
+
26
+ `<skill-dir>` is the installed folder containing this skill's `SKILL.md`.
27
+
28
+ | Flag | Effect |
29
+ | --- | --- |
30
+ | `--brief <file>` | Brief path. Omit it to read stdin. The exact text is then sent to Claude on stdin, never argv. |
31
+ | `--cd <dir>` | Child process cwd and target working root (default: current directory). |
32
+ | `--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. |
33
+ | `--out-dir <dir>` | Artifact directory (default: a fresh directory under the system temp directory). |
34
+ | `--timeout <dur>` | Relay watchdog, such as `30m`, `90s`, or `2h` (default: off). |
35
+ | `--model <name>` | Claude model alias or full name (default: Claude's configured choice). The relay does not pin a model version. |
36
+ | `--effort <level>` | Claude effort: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`; availability depends on the model. |
37
+ | `--max-turns <n>` | Positive agentic-turn cap. |
38
+ | `--max-budget-usd <amount>` | Positive decimal spend cap for print mode. |
39
+ | `--resume-last` | Resume the latest session for this cwd with Claude's `--continue`; send a delta brief. |
40
+ | `--session <id>` | Resume a specific session with Claude's `--resume <id>`; mutually exclusive with `--resume-last`. |
41
+ | `--read-only` | Plan mode with only Read, Glob, and Grep, plus a Git-visible change tripwire. |
42
+ | `--dangerously-skip-permissions` | Opt into Claude's `bypassPermissions`; mutually exclusive with `--read-only`. |
43
+ | `-h`, `--help` | Print the relay header and option reference. |
44
+
45
+ Values that can reach an npm `claude.cmd` launch on Windows are token- or number-validated. The brief
46
+ never reaches a shell command line.
47
+
48
+ ## What the relay launches
49
+
50
+ The common shape is:
51
+
52
+ ```bash
53
+ claude -p --output-format stream-json --verbose \
54
+ --tools Read,Glob,Grep,Edit,Write,Bash \
55
+ --strict-mcp-config --disallowedTools 'mcp__*' \
56
+ --disable-slash-commands \
57
+ --settings <profile.json> \
58
+ --permission-mode acceptEdits \
59
+ < brief.txt
60
+ ```
61
+
62
+ On native Windows, `PowerShell` replaces `Bash` and is passed through `--allowedTools` because Claude's
63
+ shell sandbox is unavailable there. Read-only uses `--tools Read,Glob,Grep --permission-mode plan`. A
64
+ specific session adds `--resume <id>`; the latest session adds `--continue`. The permission and tool
65
+ profile is re-passed on every resumed invocation.
66
+
67
+ The relay never adds `--bg`: Claude documents background mode as incompatible with `-p`. It never adds
68
+ `--bare`, because bare mode skips `CLAUDE.md` and OAuth/keychain authentication.
69
+
70
+ `--strict-mcp-config` without an MCP config prevents configured-server discovery. The inline settings
71
+ also disable Claude.ai connectors, while `--disallowedTools 'mcp__*'` denies any MCP tool that managed
72
+ policy still supplies. `--disable-slash-commands` prevents skill and command recursion, and `--tools`
73
+ omits the Agent tool. These controls do not suppress project `CLAUDE.md` or normal authentication.
74
+
75
+ ## Permission reach
76
+
77
+ ### Normal write-capable profile
78
+
79
+ The normal profile pairs `acceptEdits` with sandbox auto-approval on supported platforms.
80
+ `acceptEdits` accepts file edits but does not, by itself, approve ordinary shell gates in a headless
81
+ run. `autoAllowBashIfSandboxed: true` approves commands that stay inside Claude's sandbox. A command
82
+ that cannot stay sandboxed fails instead of being retried outside it. Native Windows is the explicit
83
+ exception: the relay pre-approves PowerShell because no Claude shell sandbox is available there.
84
+
85
+ The generated `profile.json`:
86
+
87
+ - uses string rules to deny common direct shell forms of `git commit`, `git push`, and nested
88
+ `claude`, plus any command containing `claude-delegate`; aliases, scripts, and wrappers can bypass
89
+ these speed bumps, so the brief's no-commit instruction and orchestrator review remain the boundary;
90
+ - on macOS, Linux, and WSL2, enables Claude's Bash sandbox with `failIfUnavailable: true`,
91
+ `autoAllowBashIfSandboxed: true`, `allowUnsandboxedCommands: false`, and filesystem isolation
92
+ explicitly enabled;
93
+ - on native Windows, leaves the unsupported sandbox unconfigured and enables Claude's PowerShell
94
+ tool through its documented settings environment switch;
95
+ - disables Claude.ai connectors for every profile.
96
+
97
+ On supported platforms, the strict settings prevent a shell command from silently falling back to an
98
+ unsandboxed retry. Claude's sandbox covers **Bash and its child processes only**. Edit/Write remain
99
+ Claude Code tools governed by its permission system; the Claude process, local hooks, inherited
100
+ configuration, and unrelated host processes are not enclosed in a universal workspace sandbox.
101
+
102
+ Claude merges some sandbox arrays across settings scopes. Existing managed, user, project, or local
103
+ allowlists and `excludedCommands` can therefore affect the effective shell boundary, while managed
104
+ policy can further restrict or reject the run. Existing `ask` and `deny` permission rules take
105
+ precedence over sandbox auto-approval, so they can still stop a headless gate. Inspect both
106
+ `profile.json` and the effective local Claude configuration when the precise boundary matters. Use a
107
+ container or VM when only a host-level boundary is acceptable.
108
+
109
+ ### Read-only profile
110
+
111
+ `--read-only` removes Edit, Write, Bash/PowerShell, Agent, MCP, skills, and commands from the child and
112
+ uses `plan` mode. Local hooks still load outside that tool surface and can write. The relay compares
113
+ parsed `git status --porcelain -z -uall` and fingerprints working-tree identity and index entries for
114
+ paths that were already dirty on every outcome, including aborts:
115
+
116
+ - `readOnlyViolation: true` — either signal proves a Git-visible change.
117
+ - `readOnlyViolation: false` — coverage was complete and neither signal detected a change.
118
+ - `readOnlyViolation: null` — coverage was incomplete, for example because git could not report or a
119
+ dirty submodule or unreadable path could not be fingerprinted.
120
+
121
+ This detects new dirt and changes to readable, already-dirty Git-visible paths, but cannot attribute a
122
+ concurrent change. Ignored paths, submodule internals, and writes perfectly restored before the final
123
+ snapshot remain outside coverage. Inspect the diff whenever read-only integrity matters.
124
+
125
+ ### Permission bypass
126
+
127
+ `--dangerously-skip-permissions` passes Claude's flag and records
128
+ `permissionMode: "bypassPermissions"` unless the init event reports another value. The explicit tool
129
+ surface, commit/push deny rules, MCP/skill restrictions, and supported-platform shell sandbox remain.
130
+ However, direct file tools can cross ordinary Claude permission boundaries. This mode requires the
131
+ human's explicit acceptance.
132
+
133
+ ## Artifacts
134
+
135
+ The default artifact directory is outside the repository so relay output does not pollute
136
+ `touchedFiles`. A caller-selected `--out-dir` inside the worktree will appear in git status. For a
137
+ meaningful `--read-only` review, keep artifacts outside the worktree. The fingerprint signal excludes
138
+ only the relay-owned artifact paths, so their later writes do not prove a violation.
139
+
140
+ - `brief.txt` — exact stdin brief.
141
+ - `events.jsonl` — raw stdout bytes from `--output-format stream-json`.
142
+ - `final.txt` — final `result` event's `result` text; present even when empty.
143
+ - `stderr.txt` — complete stderr.
144
+ - `profile.json` — exact inline settings passed to Claude.
145
+ - `result.json` — stable result contract, written atomically.
146
+
147
+ ## `result.json`
148
+
149
+ Core fields:
150
+
151
+ - `schema` — `"delegate-relay.result.v1"`.
152
+ - `tool` — `"claude"`.
153
+ - `status` — `completed` | `failed` | `timeout` | `aborted` | `claude_unavailable`.
154
+ - `exitCode` — Claude's code, `127` when missing, a signal-derived code when available, or a forced
155
+ non-zero value when the watchdog or terminal error result makes a zero code non-successful.
156
+ - `signal` — terminating child/relay signal when reported, otherwise `null`.
157
+ - `claudeVersion` — version preflight text, `"unknown"` when the binary answered abnormally, or `null`
158
+ when unavailable.
159
+ - `permissionMode` — selected profile, updated from `system/init` when present.
160
+ - `sessionId` — parsed defensively from init/result events; use with `--session`.
161
+ - `resultSubtype` — final result subtype, such as `success` or an error subtype.
162
+ - `finalMessage` — final result text.
163
+ - `numTurns`, `usage`, `totalCostUsd` — terminal result metadata when present.
164
+ - `touchedFiles` — final `git status --porcelain` lines for `--cd`; `null` means git could not report,
165
+ while `[]` means git reported a clean tree. This is the whole final tree, not attribution.
166
+ - `readOnlyViolation` — present only on `--read-only`, with the three-state meaning above.
167
+
168
+ Run metadata includes `workdir`, `model`, `effort`, `maxTurns`, `maxBudgetUsd`, `timeout`, `readOnly`,
169
+ `resumed`, `resumeLast`, `toolSurface`, `shellSandbox`, `dangerouslySkipPermissions`, timestamps, and
170
+ all artifact paths. Failed, timed-out, and aborted runs include `stderrTail` when available;
171
+ launch/watchdog/signal failures include `error`.
172
+
173
+ The relay prints a concise summary and the complete final report to stdout, then exits with
174
+ `result.json`'s `exitCode`.
175
+
176
+ ## Wait for completion
177
+
178
+ The relay blocks. Use the orchestrator's background-command facility or foreground it for short work.
179
+ If using a shell's own background feature, completion requires both:
180
+
181
+ 1. the relay process has exited; and
182
+ 2. `result.json` contains a terminal `status`.
183
+
184
+ A usage error exits 2 before creating `result.json`, so also observe process exit. A missing CLI is
185
+ different: it exits 127 **with** `status: "claude_unavailable"`.
186
+
187
+ ## Failure recovery
188
+
189
+ - **`claude_unavailable`:** install Claude Code, authenticate with `claude auth login`, and verify the
190
+ same PATH the orchestrator uses.
191
+ - **`failed`:** inspect `resultSubtype`, `error`, `stderrTail`, `stderr.txt`, and the tail of
192
+ `events.jsonl`. Common causes are authentication, a model/effort mismatch, managed policy, a missing
193
+ sandbox dependency, or a gate that needs access outside the strict shell boundary.
194
+ - **`timeout`:** the relay sent termination to the whole process group/tree and escalated. The working
195
+ tree may contain partial edits; inspect it before resuming or re-dispatching.
196
+ - **`aborted`:** the relay caught SIGTERM, SIGINT, or SIGHUP, terminated the implementer tree, wrote an
197
+ outcome, then refreshed `touchedFiles` after a grace window. Native Windows cannot deliver every
198
+ termination as a catchable Node signal; a vanished relay with no result still requires direct
199
+ artifact/tree inspection.
200
+ - **Host `SIGKILL`:** the relay cannot catch its own SIGKILL. If the child reports SIGKILL, investigate
201
+ host memory or supervisor deadlines.
202
+ - **Empty `finalMessage`:** inspect the raw events and diff. Require a closing report in the next brief.
203
+
204
+ Never clean, reset, or switch branches before inspecting partial work, staged changes, and untracked
205
+ files.
206
+
207
+ ## Windows launch
208
+
209
+ The relay resolves PATH itself. A native `claude.exe` is spawned directly. An npm `claude.cmd` is
210
+ invoked through `cmd.exe /d /v:off /s /c` with every argument quoted and user-selectable values
211
+ restricted; stdin still carries the brief. `taskkill /t /f` terminates the process tree.
212
+
213
+ This path is implemented but not yet verified on native Windows. Claude's Bash sandbox is unsupported
214
+ there, so even a successful Windows smoke would verify launch and termination mechanics, not provide
215
+ the supported-platform shell boundary.
216
+
217
+ ## Commit boundary
218
+
219
+ The relay never commits. Claude edits; the orchestrator reviews, re-runs gates, and lands. See
220
+ [review-and-land.md](review-and-land.md).
@@ -0,0 +1,66 @@
1
+ # Multi-task queues
2
+
3
+ The single-task loop scales to a migration, removal, or refactor queue. Sequencing and bookkeeping,
4
+ not parallelism, keep the work reviewable.
5
+
6
+ ## Run sequentially
7
+
8
+ Dispatch one task at a time in dependency order. Review, run gates, and land it before dispatching the
9
+ next:
10
+
11
+ ```bash
12
+ node "<skill-dir>/scripts/relay.mjs" --brief task-01.txt --cd /path/to/repo
13
+ ```
14
+
15
+ - Later tasks can rely on earlier behavior only after it lands.
16
+ - One reviewed commit per task keeps rollback and history clear.
17
+ - A clean tree before each dispatch makes `touchedFiles` useful.
18
+
19
+ Use parallel dispatches only for genuinely independent tasks in separate working trees. Multiple
20
+ implementers editing one tree destroy attribution and make the review boundary unreliable.
21
+
22
+ ## Use fresh sessions for fresh tasks
23
+
24
+ Each unrelated queue item should start a new Claude session. Use `--resume-last` or `--session <id>`
25
+ only for rework on the same task; send a delta brief.
26
+
27
+ A fresh session does not remember prior queue decisions. If task 2 chose a helper name, fixture
28
+ location, interface, or migration ordering that task 5 needs, write that fact explicitly into task
29
+ 5's brief.
30
+
31
+ Claude Code will discover `CLAUDE.md`, but it does not generically auto-load `AGENTS.md`. Carry the
32
+ applicable `AGENTS.md` constraints into every brief rather than assuming the first session established
33
+ them for later sessions.
34
+
35
+ ## Keep a progress file
36
+
37
+ For more than two or three tasks, maintain one durable progress file:
38
+
39
+ - **Status:** queued / dispatched / reviewed+landed, including the commit hash.
40
+ - **Per-task review:** what landed, what was inspected, and gate outcomes.
41
+ - **Needs your eyes:** design decisions, non-blocking concerns, and questions for the human.
42
+ - **Session/artifact pointers:** the task's `sessionId` and `result.json` path for rework or diagnosis.
43
+ - **End-of-run gates:** the final cross-task verification still required.
44
+
45
+ Update it when each task lands, not in one batch at the end.
46
+
47
+ ## Close with coherence
48
+
49
+ After the last task:
50
+
51
+ - run the full project gates, not only the last task's narrow slice;
52
+ - search repository-wide for the concept the queue migrated, removed, or renamed;
53
+ - replay all new migrations from a clean state and check drift when applicable;
54
+ - inspect the final commit sequence and working tree;
55
+ - only then push and open or update the pull request.
56
+
57
+ ## Stop and ask when
58
+
59
+ Proceed on work that follows from the agreed queue. Stop and surface when:
60
+
61
+ - a task cannot be completed correctly within its brief;
62
+ - review calls the plan itself into question;
63
+ - a gate reveals a problem in an already-landed task;
64
+ - the next task requires a permission or host-boundary change the human did not approve.
65
+
66
+ Report what has landed, commit hashes, the current tree state, and the open question, then wait.
@@ -0,0 +1,117 @@
1
+ # Review and land
2
+
3
+ The separate Claude session did the typing; the orchestrator owns the judgment. Verify against the
4
+ working tree and gate output, never against the implementer's self-report.
5
+
6
+ ## Review tests before trusting gates
7
+
8
+ If existing tests changed, inspect those edits first:
9
+
10
+ - An unbriefed test edit is a contract change, not automatically part of the fix.
11
+ - Treat a new skip, disable marker, commented-out case, or deleted test as a failure until justified.
12
+ - Reject assertions weakened from exact behavior to contains/truthy, broader error types, or wider
13
+ tolerances unless the brief required that semantic change.
14
+
15
+ A green gate proves less if the implementer shortened the yardstick.
16
+
17
+ ## Re-run the gates
18
+
19
+ `finalMessage` reports Claude's claims. Run the project's actual test, lint, format, type, and build
20
+ commands yourself in the final working tree and read their output. Passing is necessary, not
21
+ sufficient.
22
+
23
+ Add verification suited to the change:
24
+
25
+ - **Migrations/schema:** apply, reverse, and re-apply from a clean scratch state; check drift.
26
+ - **Removals/renames:** search repository-wide for dangling names and stale docs/config.
27
+ - **Stateful behavior:** exercise the behavior, not only compilation.
28
+ - **Generated output:** regenerate it through the canonical command and compare.
29
+
30
+ ## Inspect the complete tree
31
+
32
+ Start with `touchedFiles`, but remember it is final git porcelain, not attribution. It includes
33
+ pre-existing dirt and can omit modifications inside ignored files. Inspect:
34
+
35
+ ```bash
36
+ git status --short
37
+ git diff
38
+ git diff --cached
39
+ ```
40
+
41
+ Open every untracked file directly; ordinary `git diff` does not show its contents. Review staged
42
+ changes even though the relay denies common direct `git commit`/`git push` shell forms and the brief
43
+ forbids staging. A local hook, another tool, or an unusual command path may still have touched the
44
+ index.
45
+
46
+ For `--read-only`, treat `readOnlyViolation: true` as a hard warning and `null` as unknown. `false`
47
+ means the Git-visible tripwire had complete coverage and detected no change. Ignored paths, submodule
48
+ internals, perfect restores, and attribution remain outside its contract. Compare the actual diff when
49
+ read-only integrity matters.
50
+
51
+ ## Hold the diff against the brief
52
+
53
+ - **Scope creep:** files or behavior the brief excluded, unrelated cleanup, opportunistic renames.
54
+ - **Scope shortfall:** missing edge cases, integration updates, cleanup, or required gates.
55
+ - **Quiet judgment calls:** defensible choices not authorized by the brief. Understand and surface
56
+ them rather than silently accepting them.
57
+ - **Repository constraints:** especially constraints copied from `AGENTS.md`, which Claude Code does
58
+ not generically auto-load.
59
+
60
+ ## Implementer sweep
61
+
62
+ Generated code can satisfy tests while remaining wrong. Check every diff for:
63
+
64
+ - hardcoded success, fixture values, or fake fallbacks on real-work paths;
65
+ - broad catches that suppress failures and return defaults;
66
+ - APIs, methods, flags, and dependencies absent from the installed versions;
67
+ - unused imports, uncalled helpers, unreachable branches, and scaffolding comments;
68
+ - a second HTTP client, error idiom, state mechanism, or logging style beside the existing one;
69
+ - tests that assert implementation details or mock the project's own behavior;
70
+ - near-duplicate tests that inflate volume without adding behavior coverage;
71
+ - optional parameters, configuration, or abstractions with no caller;
72
+ - guards for impossible internal states that obscure real trust-boundary validation;
73
+ - network or filesystem assumptions hidden by the implementer's environment.
74
+
75
+ Run relevant guard skills when installed. Anything blocking goes back through a delta brief or is
76
+ fixed in the tree, and either choice is reported to the human.
77
+
78
+ ## Preserve interrupted work
79
+
80
+ From dispatch until a reviewed commit, the uncommitted tree is the authoritative copy. Do not
81
+ reflexively run `git checkout`, `git reset`, `git clean`, or switch branches after a timeout, abort, or
82
+ failed result. First inspect status, unstaged and staged diffs, untracked files, `events.jsonl`, and
83
+ `stderr.txt`. After inspection, discarding premise-invalid work can be the correct decision.
84
+
85
+ ## Rework in the same session
86
+
87
+ Send only the review delta:
88
+
89
+ ```bash
90
+ echo "The runtime fix is correct. Replace the mocked database test with the existing migrated fixture,
91
+ remove the unused import, rerun the original gates, and leave the tree uncommitted." |
92
+ node "<skill-dir>/scripts/relay.mjs" --session <id> --cd /path/to/repo
93
+ ```
94
+
95
+ Use `--resume-last` only when the latest session for that cwd is unambiguous. `--session <id>` is safer
96
+ when several Claude sessions exist. The relay maps them to `--continue` and `--resume`, respectively,
97
+ and re-passes the permission profile.
98
+
99
+ Rework gets the same test review, gate rerun, diff review, and implementer sweep. Repeat until the work
100
+ holds.
101
+
102
+ ## Commit boundary
103
+
104
+ When the gates pass and the diff satisfies the brief, **the orchestrator commits**, never the
105
+ implementer. Write a clear message describing what landed.
106
+
107
+ ## Surface, do not absorb
108
+
109
+ The human opted into delegation, so landing verified work is the contract. Keep them informed when
110
+ the work changes shape:
111
+
112
+ - report design decisions and defensible-but-unrequested turns;
113
+ - note non-blocking concerns you chose not to block on;
114
+ - stop and ask when correct completion requires expanding the brief.
115
+
116
+ For a queue, record these in the progress file described in
117
+ [multi-task-queues.md](multi-task-queues.md).