opencode-skills-collection 4.0.45 → 4.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +25 -1
- package/bundled-skills/agy-delegate/SKILL.md +168 -0
- package/bundled-skills/agy-delegate/references/dispatch-and-poll.md +140 -0
- package/bundled-skills/agy-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/agy-delegate/references/review-and-land.md +103 -0
- package/bundled-skills/agy-delegate/references/writing-the-brief.md +124 -0
- package/bundled-skills/aider-delegate/SKILL.md +227 -0
- package/bundled-skills/aider-delegate/references/dispatch-and-poll.md +154 -0
- package/bundled-skills/aider-delegate/references/multi-task-queues.md +68 -0
- package/bundled-skills/aider-delegate/references/review-and-land.md +101 -0
- package/bundled-skills/aider-delegate/references/writing-the-brief.md +142 -0
- package/bundled-skills/babysit-pr/SKILL.md +343 -0
- package/bundled-skills/claude-delegate/SKILL.md +182 -0
- package/bundled-skills/claude-delegate/references/dispatch-and-poll.md +220 -0
- package/bundled-skills/claude-delegate/references/multi-task-queues.md +66 -0
- package/bundled-skills/claude-delegate/references/review-and-land.md +117 -0
- package/bundled-skills/claude-delegate/references/writing-the-brief.md +158 -0
- package/bundled-skills/cline-delegate/SKILL.md +140 -0
- package/bundled-skills/cline-delegate/references/dispatch-and-poll.md +142 -0
- package/bundled-skills/cline-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/cline-delegate/references/review-and-land.md +80 -0
- package/bundled-skills/cline-delegate/references/writing-the-brief.md +129 -0
- package/bundled-skills/codex-delegate/SKILL.md +177 -0
- package/bundled-skills/codex-delegate/references/dispatch-and-poll.md +161 -0
- package/bundled-skills/codex-delegate/references/multi-task-queues.md +66 -0
- package/bundled-skills/codex-delegate/references/review-and-land.md +126 -0
- package/bundled-skills/codex-delegate/references/writing-the-brief.md +125 -0
- package/bundled-skills/commandcode-delegate/SKILL.md +188 -0
- package/bundled-skills/commandcode-delegate/references/dispatch-and-poll.md +222 -0
- package/bundled-skills/commandcode-delegate/references/multi-task-queues.md +81 -0
- package/bundled-skills/commandcode-delegate/references/review-and-land.md +144 -0
- package/bundled-skills/commandcode-delegate/references/writing-the-brief.md +147 -0
- package/bundled-skills/copilot-delegate/SKILL.md +159 -0
- package/bundled-skills/copilot-delegate/references/dispatch-and-poll.md +143 -0
- package/bundled-skills/copilot-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/copilot-delegate/references/review-and-land.md +80 -0
- package/bundled-skills/copilot-delegate/references/writing-the-brief.md +140 -0
- package/bundled-skills/cursor-delegate/SKILL.md +170 -0
- package/bundled-skills/cursor-delegate/references/dispatch-and-poll.md +162 -0
- package/bundled-skills/cursor-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/cursor-delegate/references/review-and-land.md +93 -0
- package/bundled-skills/cursor-delegate/references/writing-the-brief.md +126 -0
- package/bundled-skills/debate-review/SKILL.md +85 -0
- package/bundled-skills/debate-review/assets/prompts/review-debate.md +51 -0
- package/bundled-skills/debate-review/assets/prompts/review-main.md +64 -0
- package/bundled-skills/debate-review/assets/prompts/review-rebuttal.md +42 -0
- package/bundled-skills/debate-review/references/comment-format.md +63 -0
- package/bundled-skills/debate-review/references/schema.md +95 -0
- package/bundled-skills/delegate-setup/SKILL.md +215 -0
- package/bundled-skills/delegate-setup/references/schema.md +100 -0
- package/bundled-skills/delegate-setup/references/setup-dialogue.md +101 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/falsify/SKILL.md +263 -0
- package/bundled-skills/falsify/references/bias-catalog.md +42 -0
- package/bundled-skills/falsify/references/mental-models.md +135 -0
- package/bundled-skills/falsify/templates/thinking-ledger.md +104 -0
- package/bundled-skills/graceful-shutdown/SKILL.md +379 -0
- package/bundled-skills/grok-delegate/SKILL.md +179 -0
- package/bundled-skills/grok-delegate/references/dispatch-and-poll.md +171 -0
- package/bundled-skills/grok-delegate/references/multi-task-queues.md +67 -0
- package/bundled-skills/grok-delegate/references/review-and-land.md +130 -0
- package/bundled-skills/grok-delegate/references/writing-the-brief.md +119 -0
- package/bundled-skills/kimi-delegate/SKILL.md +137 -0
- package/bundled-skills/kimi-delegate/references/dispatch-and-poll.md +134 -0
- package/bundled-skills/kimi-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/kimi-delegate/references/review-and-land.md +92 -0
- package/bundled-skills/kimi-delegate/references/writing-the-brief.md +132 -0
- package/bundled-skills/omp-delegate/SKILL.md +186 -0
- package/bundled-skills/omp-delegate/references/dispatch-and-poll.md +155 -0
- package/bundled-skills/omp-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/omp-delegate/references/review-and-land.md +95 -0
- package/bundled-skills/omp-delegate/references/writing-the-brief.md +149 -0
- package/bundled-skills/opencode-delegate/SKILL.md +189 -0
- package/bundled-skills/opencode-delegate/references/dispatch-and-poll.md +156 -0
- package/bundled-skills/opencode-delegate/references/multi-task-queues.md +68 -0
- package/bundled-skills/opencode-delegate/references/review-and-land.md +125 -0
- package/bundled-skills/opencode-delegate/references/writing-the-brief.md +142 -0
- package/bundled-skills/pi-delegate/SKILL.md +148 -0
- package/bundled-skills/pi-delegate/references/dispatch-and-poll.md +146 -0
- package/bundled-skills/pi-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/pi-delegate/references/review-and-land.md +95 -0
- package/bundled-skills/pi-delegate/references/writing-the-brief.md +132 -0
- package/bundled-skills/qoder-delegate/SKILL.md +151 -0
- package/bundled-skills/qoder-delegate/references/dispatch-and-poll.md +119 -0
- package/bundled-skills/qoder-delegate/references/multi-task-queues.md +43 -0
- package/bundled-skills/qoder-delegate/references/review-and-land.md +66 -0
- package/bundled-skills/qoder-delegate/references/writing-the-brief.md +85 -0
- package/bundled-skills/sandbase-mcp/SKILL.md +194 -0
- package/bundled-skills/ui-slop-score/SKILL.md +2 -2
- package/bundled-skills/unsloth-finetuning/SKILL.md +352 -0
- package/bundled-skills/vibe-delegate/SKILL.md +147 -0
- package/bundled-skills/vibe-delegate/references/dispatch-and-poll.md +144 -0
- package/bundled-skills/vibe-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/vibe-delegate/references/review-and-land.md +87 -0
- package/bundled-skills/vibe-delegate/references/writing-the-brief.md +131 -0
- package/bundled-skills/warp-delegate/SKILL.md +192 -0
- package/bundled-skills/warp-delegate/references/dispatch-and-poll.md +163 -0
- package/bundled-skills/warp-delegate/references/multi-task-queues.md +80 -0
- package/bundled-skills/warp-delegate/references/review-and-land.md +123 -0
- package/bundled-skills/warp-delegate/references/writing-the-brief.md +105 -0
- package/bundled-skills/zcode-delegate/SKILL.md +202 -0
- package/bundled-skills/zcode-delegate/references/dispatch-and-poll.md +113 -0
- package/bundled-skills/zcode-delegate/references/multi-task-queues.md +87 -0
- package/bundled-skills/zcode-delegate/references/review-and-land.md +81 -0
- package/bundled-skills/zcode-delegate/references/writing-the-brief.md +120 -0
- package/package.json +1 -1
- package/skills_index.json +660 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Writing the brief
|
|
2
|
+
|
|
3
|
+
A brief carries the task-specific context from the orchestrator to the separate Claude Code session.
|
|
4
|
+
The implementer has **no orchestrator chat history or other shared context**. It receives the brief on
|
|
5
|
+
stdin, can inspect the target working tree, and loads Claude Code's usual local context as described
|
|
6
|
+
below. A resumed session also retains its own Claude conversation.
|
|
7
|
+
|
|
8
|
+
If a fact is not in the brief, discoverable in that tree, or present in the loaded Claude context, do
|
|
9
|
+
not assume the implementer knows it.
|
|
10
|
+
|
|
11
|
+
## Know what Claude loads
|
|
12
|
+
|
|
13
|
+
The relay deliberately does not use `--bare`, so Claude Code discovers the project's `CLAUDE.md`,
|
|
14
|
+
normal local Claude settings, and session state in its usual way. The relay overrides a small,
|
|
15
|
+
inspectable subset for the child: MCP servers are not discovered, skills and commands are disabled,
|
|
16
|
+
and the built-in tool surface is restricted. Local hooks still load; account for any repository
|
|
17
|
+
effects they are configured to perform.
|
|
18
|
+
|
|
19
|
+
Claude Code does **not** generically auto-load `AGENTS.md`. Before writing the brief:
|
|
20
|
+
|
|
21
|
+
1. Read the applicable `AGENTS.md` files yourself.
|
|
22
|
+
2. Copy every load-bearing rule into the brief: scope boundaries, forbidden patterns, required
|
|
23
|
+
commands, generated-file policy, and commit policy.
|
|
24
|
+
3. Name the real gates rather than telling Claude to "run the tests."
|
|
25
|
+
|
|
26
|
+
The implementer can read an `AGENTS.md` when the brief points to it, but that is explicit task context,
|
|
27
|
+
not automatic Claude Code behavior.
|
|
28
|
+
|
|
29
|
+
## A compact structure
|
|
30
|
+
|
|
31
|
+
Use a bounded, block-structured brief:
|
|
32
|
+
|
|
33
|
+
```xml
|
|
34
|
+
<task>
|
|
35
|
+
State the concrete job, current behavior, desired behavior, and where it lives. Name what must remain
|
|
36
|
+
untouched. Include any facts from the orchestrator conversation that the implementer cannot discover
|
|
37
|
+
from the tree.
|
|
38
|
+
</task>
|
|
39
|
+
|
|
40
|
+
<repo_constraints>
|
|
41
|
+
Copy the applicable load-bearing constraints from AGENTS.md and other project instructions here.
|
|
42
|
+
Claude also loads CLAUDE.md, but restate rules whose violation would invalidate the work.
|
|
43
|
+
</repo_constraints>
|
|
44
|
+
|
|
45
|
+
<verification_loop>
|
|
46
|
+
Run these exact project gates, fix failures caused by the change, and report the final outcomes:
|
|
47
|
+
<actual test command>
|
|
48
|
+
<actual lint/format command>
|
|
49
|
+
<actual build/typecheck command>
|
|
50
|
+
Confirm the working tree contains only intended changes.
|
|
51
|
+
</verification_loop>
|
|
52
|
+
|
|
53
|
+
<action_safety>
|
|
54
|
+
Keep changes within the task. Do not perform unrelated cleanup. Do not run git add, git commit, or git
|
|
55
|
+
push. Do not invoke another Claude session or delegation skill. Leave all work uncommitted for the
|
|
56
|
+
orchestrator to review and land.
|
|
57
|
+
</action_safety>
|
|
58
|
+
|
|
59
|
+
<structured_output_contract>
|
|
60
|
+
End with:
|
|
61
|
+
1. What changed and why
|
|
62
|
+
2. Files touched
|
|
63
|
+
3. Gate outcomes, including useful counts
|
|
64
|
+
4. Deviations, open questions, and decisions the orchestrator should review
|
|
65
|
+
</structured_output_contract>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Remove empty blocks rather than adding ceremony. Add focused blocks when needed:
|
|
69
|
+
|
|
70
|
+
- **Debugging:** `<completeness_contract>` to require a full root-cause fix, and
|
|
71
|
+
`<missing_context_gating>` to prohibit guesses about missing repository facts.
|
|
72
|
+
- **Read-only diagnosis:** `<grounding_rules>` to require file/line or command evidence and clearly
|
|
73
|
+
label inference. Dispatch with `--read-only`.
|
|
74
|
+
- **Migration or removal:** an explicit repository-wide search and round-trip requirement.
|
|
75
|
+
|
|
76
|
+
## Discover the real gates
|
|
77
|
+
|
|
78
|
+
Read the repository's `CLAUDE.md`, `AGENTS.md`, `Makefile`, package scripts, and language tooling before
|
|
79
|
+
dispatch. Copy exact commands into `<verification_loop>`. Include required setup and the narrowest
|
|
80
|
+
useful test slice, but do not replace a required full gate with a guessed shortcut.
|
|
81
|
+
|
|
82
|
+
`acceptEdits` alone does not approve ordinary gate commands in non-interactive mode. On supported
|
|
83
|
+
platforms the normal relay profile auto-approves commands that stay inside Claude's shell sandbox and
|
|
84
|
+
requests failure when that sandbox is unavailable. A gate that needs network access, host services,
|
|
85
|
+
or writes outside the working tree may fail under that profile; state the need in the brief and decide
|
|
86
|
+
whether a different isolated environment is appropriate instead of silently weakening the boundary.
|
|
87
|
+
Merged local or managed settings can affect the effective sandbox. Native Windows pre-approves
|
|
88
|
+
PowerShell without that sandbox; see [dispatch-and-poll.md](dispatch-and-poll.md).
|
|
89
|
+
|
|
90
|
+
## One task per brief
|
|
91
|
+
|
|
92
|
+
One brief → one separate Claude session → one reviewed commit keeps scope and rollback clear. Split a
|
|
93
|
+
mixed request such as "fix the bug, redesign the API, update unrelated docs, and propose a roadmap"
|
|
94
|
+
into separate dispatches.
|
|
95
|
+
|
|
96
|
+
Use a resumed session only for rework on the same task. Start unrelated queue items in fresh sessions.
|
|
97
|
+
|
|
98
|
+
## Premises freeze at dispatch
|
|
99
|
+
|
|
100
|
+
There is no steering channel while the relay is running. Audit ownership, scope, branch, constraints,
|
|
101
|
+
and expected behavior before dispatch. If a premise changes during the run, stop it and inspect the
|
|
102
|
+
working tree before sending a corrected brief. Do not discard partial edits before reviewing them.
|
|
103
|
+
|
|
104
|
+
## Delta briefs for resumed sessions
|
|
105
|
+
|
|
106
|
+
`--resume-last` maps to Claude's `--continue`; `--session <id>` maps to `--resume <id>`. Both retain the
|
|
107
|
+
conversation, so send only what changed:
|
|
108
|
+
|
|
109
|
+
```xml
|
|
110
|
+
<review_delta>
|
|
111
|
+
The implementation behavior is correct. Replace the test's mocked database session with the existing
|
|
112
|
+
migrated fixture, remove the unused import, run the same gates, and leave the tree uncommitted.
|
|
113
|
+
</review_delta>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The relay re-passes the selected permission profile on resume. A resumed run receives the same review
|
|
117
|
+
as a fresh run.
|
|
118
|
+
|
|
119
|
+
## Brief delivery
|
|
120
|
+
|
|
121
|
+
The relay reads `--brief <file>` or stdin, saves the exact text as `brief.txt`, and sends it to
|
|
122
|
+
`claude -p` through stdin — never as an argv value. It therefore stays out of the process list and
|
|
123
|
+
needs no shell quoting. Claude Code caps piped stdin at 10 MB; the relay rejects a larger brief before
|
|
124
|
+
dispatch. Put large context in workspace files and reference those paths instead.
|
|
125
|
+
|
|
126
|
+
## Worked example
|
|
127
|
+
|
|
128
|
+
```xml
|
|
129
|
+
<task>
|
|
130
|
+
In services/billing/, refund retries can create a second refund because the idempotency key is checked
|
|
131
|
+
after submission. Check for an existing refund before creating one. Touch only refund handling and
|
|
132
|
+
its behavior-level tests. Leave charge creation, routes, and data models unchanged.
|
|
133
|
+
</task>
|
|
134
|
+
|
|
135
|
+
<repo_constraints>
|
|
136
|
+
Follow the repository's Python style and test conventions copied from AGENTS.md. Do not add ticket
|
|
137
|
+
identifiers to source comments. Do not add dependencies.
|
|
138
|
+
</repo_constraints>
|
|
139
|
+
|
|
140
|
+
<verification_loop>
|
|
141
|
+
Run and make green:
|
|
142
|
+
pytest tests/billing/ -q
|
|
143
|
+
ruff check services/billing/ tests/billing/
|
|
144
|
+
Confirm git status contains only the intended refund implementation and tests.
|
|
145
|
+
</verification_loop>
|
|
146
|
+
|
|
147
|
+
<action_safety>
|
|
148
|
+
No unrelated refactors. Do not git add, commit, or push; leave the work uncommitted.
|
|
149
|
+
</action_safety>
|
|
150
|
+
|
|
151
|
+
<structured_output_contract>
|
|
152
|
+
Report the root cause and fix, files touched, pytest and ruff outcomes with counts, and anything left
|
|
153
|
+
open or needing a decision.
|
|
154
|
+
</structured_output_contract>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Dispatch with [dispatch-and-poll.md](dispatch-and-poll.md), then review and land with
|
|
158
|
+
[review-and-land.md](review-and-land.md).
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cline-delegate
|
|
3
|
+
description: Delegate coding tasks to the Cline CLI (`cline`) 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 `cline` CLI installed and authenticated with `cline auth`,
|
|
14
|
+
Node 18+, and git. The orchestrator must be able to run shell commands and read
|
|
15
|
+
files.
|
|
16
|
+
metadata:
|
|
17
|
+
version: 0.5.0
|
|
18
|
+
---
|
|
19
|
+
# Cline Delegate
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- You want to delegate a bounded coding task to a separate `cline` implementer (`Cline`) and then review its diff yourself.
|
|
24
|
+
- The user explicitly asked for delegation to this implementer.
|
|
25
|
+
|
|
26
|
+
You are the **orchestrator**. Delegate a bounded coding task to a separate **implementer** - the Cline
|
|
27
|
+
coding agent CLI - then review what it produced and land it yourself. You write the brief and own
|
|
28
|
+
the judgment; the implementer makes changes in its own session in a clean working tree; you verify
|
|
29
|
+
and commit.
|
|
30
|
+
|
|
31
|
+
The loop needs only a shell command and file access, so any comparable orchestrator can drive it.
|
|
32
|
+
|
|
33
|
+
## When NOT to use this
|
|
34
|
+
|
|
35
|
+
- The task is small enough to do inline; delegation overhead is not worth it.
|
|
36
|
+
- The `cline` CLI is not installed or authenticated.
|
|
37
|
+
- You require the relay to configure a sandbox. Cline exposes sandbox controls, but this relay
|
|
38
|
+
leaves them to the CLI environment; use `--plan` when the run must be read-only.
|
|
39
|
+
|
|
40
|
+
## Prerequisites (check once)
|
|
41
|
+
|
|
42
|
+
1. Install `cline` (npm or bundled binary; the relay probes `cline --version`).
|
|
43
|
+
2. Authenticate: run `cline auth` (interactive sign-in), or configure
|
|
44
|
+
`ANTHROPIC_API_KEY` / an OpenAI-compatible base URL.
|
|
45
|
+
3. Confirm `cline --version` succeeds.
|
|
46
|
+
4. Work in, or point `--cd` at, the target git repository.
|
|
47
|
+
|
|
48
|
+
## Choose the model (optional)
|
|
49
|
+
|
|
50
|
+
Cline picks a default model. To choose another, pass the separate `--model <id>` or `--provider <name>`
|
|
51
|
+
(e.g. `anthropic`, `openai-native`, `openrouter`). The relay accepts letters, digits,
|
|
52
|
+
and `. _ : / -` only (the value reaches a shell on Windows).
|
|
53
|
+
|
|
54
|
+
## The loop
|
|
55
|
+
|
|
56
|
+
Run these five steps per task. Steps 1, 4, and 5 require judgment; 2 and 3 are mechanical.
|
|
57
|
+
|
|
58
|
+
### 1. Write a brief
|
|
59
|
+
|
|
60
|
+
Cline sees only the text you send. It cannot read your conversation: the brief must stand alone
|
|
61
|
+
with the goal, current state, what to change, what to leave untouched, the project's **real**
|
|
62
|
+
gates, and a report contract. Keep each brief to a single task. Write it to a file and pass it as
|
|
63
|
+
the relay's `--brief`. See [references/writing-the-brief.md](references/writing-the-brief.md).
|
|
64
|
+
|
|
65
|
+
### 2. Dispatch
|
|
66
|
+
|
|
67
|
+
Use the bundled relay. It runs `cline --json -v`, streams the brief on stdin behind a fixed
|
|
68
|
+
positional instruction, captures the JSON event stream, and writes `result.json`.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
|
|
72
|
+
# choose a model / provider: add --model <id> --provider <name>
|
|
73
|
+
# read-only planning pass: add --plan (forces --auto-approve false)
|
|
74
|
+
# deny approval-required tools: add --auto-approve false
|
|
75
|
+
# hard time limit (watchdog): add --timeout 2h (the 30m default suits brief runs; most implementation briefs should be 1-2h)
|
|
76
|
+
# see all options: node .../relay.mjs --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The child's cwd pins the workspace. The relay writes artifacts under the system temp dir by
|
|
80
|
+
default and never commits. See [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
|
|
81
|
+
|
|
82
|
+
### 3. Wait for completion
|
|
83
|
+
|
|
84
|
+
The relay blocks until cline finishes. Run it with the orchestrator's background-command
|
|
85
|
+
facility, or background it in the shell and poll for `result.json`. A pre-run usage error exits 2
|
|
86
|
+
and writes no result; a missing `cline` exits 127 and writes `status: "cline_unavailable"`.
|
|
87
|
+
|
|
88
|
+
Completion means the process exited and `result.json` exists - trust process state and the
|
|
89
|
+
working tree, not the progress display. Cline's final message is the `finalMessage` field of
|
|
90
|
+
`result.json`.
|
|
91
|
+
|
|
92
|
+
### 4. Review - do not trust the self-report
|
|
93
|
+
|
|
94
|
+
- Re-run the project's gates yourself.
|
|
95
|
+
- Read the diff against the brief, starting with `touchedFiles`.
|
|
96
|
+
- Run relevant guard skills if installed.
|
|
97
|
+
|
|
98
|
+
See [references/review-and-land.md](references/review-and-land.md).
|
|
99
|
+
|
|
100
|
+
### 5. Land it
|
|
101
|
+
|
|
102
|
+
If the work is good, commit it. The relay never commits - the diff and `result.json` are the
|
|
103
|
+
record; run `git status` and `git diff` first to confirm exactly what changed. If the group has a
|
|
104
|
+
PR flow, make the commit and push a branch; let human review happen. If the diff is wrong or
|
|
105
|
+
incomplete, re-dispatch a corrected brief in a fresh run and review again.
|
|
106
|
+
|
|
107
|
+
## Autonomy and permissions
|
|
108
|
+
|
|
109
|
+
The relay explicitly passes Cline's `--auto-approve`, defaulting to `true` in act mode. Cline
|
|
110
|
+
plan mode can request a switch to act mode, so `--plan` forces `--auto-approve false`; the relay
|
|
111
|
+
rejects `--plan --auto-approve true`. That pair is the read-only gate. Cline also exposes sandbox
|
|
112
|
+
through `--data-dir` / `CLINE_SANDBOX`, but the relay does not configure or override it. Plan-first
|
|
113
|
+
for anything risky, then review the plan before a separate act-mode dispatch. Malformed or malicious
|
|
114
|
+
briefs remain dangerous in act mode because commands run as the current user.
|
|
115
|
+
|
|
116
|
+
## Authorization model
|
|
117
|
+
|
|
118
|
+
Delegation is something the human opts into. Once briefed, cline works as a tool you approved use
|
|
119
|
+
of. The boundary is: **do not accept conclusions from the self-report**; verify everything on
|
|
120
|
+
disk. For anything touching credentials, production data, or irreversible operations, stop and ask
|
|
121
|
+
the human first instead of encoding it in a brief.
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
|
|
125
|
+
- [references/writing-the-brief.md](references/writing-the-brief.md) - structure, scope, gates,
|
|
126
|
+
brief delivery.
|
|
127
|
+
- [references/dispatch-and-poll.md](references/dispatch-and-poll.md) - flags, artifacts,
|
|
128
|
+
`result.json`, and failure recovery.
|
|
129
|
+
- [references/review-and-land.md](references/review-and-land.md) - what to verify before calling
|
|
130
|
+
the diff done, at the end of a run.
|
|
131
|
+
- [references/multi-task-queues.md](references/multi-task-queues.md) - sequential queues,
|
|
132
|
+
constraint carry-forward, progress tracking, and the final coherence pass.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## Limitations
|
|
136
|
+
|
|
137
|
+
- Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `cline` CLI, Node 18+, git.
|
|
138
|
+
- Relay never commits — it only returns structured result JSON; you review and land the commit.
|
|
139
|
+
|
|
140
|
+
> Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Dispatch and poll
|
|
2
|
+
|
|
3
|
+
`scripts/relay.mjs` wraps cline's headless JSON mode, captures its NDJSON event stream, and writes
|
|
4
|
+
a `result.json`. Run one command, then read one file.
|
|
5
|
+
|
|
6
|
+
## Before the first run
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
command -v cline
|
|
10
|
+
cline --version
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Install `cline`; on macOS/Linux it ships as a native binary, on Windows as an npm package (the
|
|
14
|
+
relay launches the `.cmd` shim with `shell:true`). Authenticate with `cline auth`. A headless run
|
|
15
|
+
that is not authenticated fails with `status: "failed"` (exit 1).
|
|
16
|
+
|
|
17
|
+
## Dispatching
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`<skill-dir>` is the installed folder containing this skill's `SKILL.md`.
|
|
24
|
+
|
|
25
|
+
| Flag | Effect |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| `--brief <file>` | Brief path. Omit it to read the brief from stdin. |
|
|
28
|
+
| `--cd <dir>` | Working root and child process cwd (default: current directory). |
|
|
29
|
+
| `--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. |
|
|
30
|
+
| `--provider <name>` | Cline provider name (default: cline's own default). Token-validated. |
|
|
31
|
+
| `--model <id>` | Cline model id (default: cline's own default). Provider-local and qualified ids are accepted. Token-validated: letters, digits, `. _ : / -`. |
|
|
32
|
+
| `--plan` | Plan mode with `--auto-approve false`; explicit `--auto-approve true` is rejected so Cline cannot auto-approve a switch to act mode. |
|
|
33
|
+
| `--auto-approve <bool>` | Cline tool auto-approval. Defaults to `true` in act mode and `false` with `--plan`. |
|
|
34
|
+
| `--timeout <dur>` | Relay watchdog (default: `30m`; h/m/s strings). The relay never passes it as Cline's own `-t` / `--timeout`. |
|
|
35
|
+
| `--out-dir <dir>` | Artifact directory (default: a fresh directory under the system temp dir). |
|
|
36
|
+
| `-h`, `--help` | Print the relay's header help. |
|
|
37
|
+
|
|
38
|
+
The child cwd pins the workspace; the relay does not pass Cline's `--cwd`. `-v` (verbose) exposes
|
|
39
|
+
provider and model in `run_start`. Fresh JSON runs may omit `sessionId`, and the verified headless
|
|
40
|
+
JSON path does not support resume, so the relay has no resume flag.
|
|
41
|
+
|
|
42
|
+
## Artifacts and result fields
|
|
43
|
+
|
|
44
|
+
Artifacts live outside the repo by default, so they do not appear in `touchedFiles`; an
|
|
45
|
+
`--out-dir` inside the worktree can make the artifacts appear there:
|
|
46
|
+
|
|
47
|
+
- `brief.txt` - the exact brief.
|
|
48
|
+
- `events.jsonl` - raw cline stdout events (every event cline emitted).
|
|
49
|
+
- `final.txt` - cline's final text (`run_result.text`); absent if none was emitted.
|
|
50
|
+
- `stderr.txt` - complete stderr.
|
|
51
|
+
- `result.json` - the stable `delegate-relay.result.v1` contract.
|
|
52
|
+
|
|
53
|
+
`result.json` fields:
|
|
54
|
+
|
|
55
|
+
- `schema`, `tool` (`"cline"`), `status` (`completed` | `failed` | `timeout` | `aborted` | `cline_unavailable`), `exitCode`, and `signal` (`null` unless the child died on a signal).
|
|
56
|
+
- `workdir`, requested `provider`/`model`, `planMode`, `autoApprove`, `clineVersion`, `sessionId`,
|
|
57
|
+
`startedAt`, and `finishedAt`.
|
|
58
|
+
- `actualProvider` and the initial `actualModel` from `run_start`; `run_result` can update the model
|
|
59
|
+
and supplies `finishReason`, `usage`, and `durationMs`.
|
|
60
|
+
- `briefPath`, nullable `finalPath`, `eventsPath`, and `stderrPath`. `finalPath` is `null` when
|
|
61
|
+
Cline emitted no final text and `final.txt` was not created.
|
|
62
|
+
- `sessionId` - parsed from `run_start` when Cline emits one; otherwise `null`. It is observational,
|
|
63
|
+
not a resume promise.
|
|
64
|
+
- `finalMessage` - cline's final text (`run_result.text`).
|
|
65
|
+
- `touchedFiles` - `git status --porcelain` lines for the **final working tree under `--cd` only**,
|
|
66
|
+
not an attribution of cline's edits: anything already dirty before dispatch shows up too.
|
|
67
|
+
Dispatch from a clean tree when you want the list to read as "what cline changed". `null` means
|
|
68
|
+
git could not report; `[]` means git ran and the tree is clean.
|
|
69
|
+
- `stderrTail` - the last 20 non-empty stderr lines on any run that did not complete (`failed`,
|
|
70
|
+
`timeout`, `aborted`), except a launch failure, which reports `failed` with no `stderrTail`.
|
|
71
|
+
- `error` - present for launch failures, preflight failures, when the relay watchdog fires
|
|
72
|
+
(`timeout`), and on an `aborted` run.
|
|
73
|
+
|
|
74
|
+
## Waiting for completion
|
|
75
|
+
|
|
76
|
+
The relay blocks. Use the orchestrator's background-command facility, or background it in a shell
|
|
77
|
+
and poll for `result.json`. The run is done only when the process exits and the file contains a
|
|
78
|
+
`status`. The result file is written atomically, so a partial read is impossible.
|
|
79
|
+
|
|
80
|
+
A pre-run usage error exits 2 and writes no result. A missing `cline` exits 127 and writes
|
|
81
|
+
`status: "cline_unavailable"`.
|
|
82
|
+
|
|
83
|
+
## When a run misbehaves
|
|
84
|
+
|
|
85
|
+
- **`status: "cline_unavailable"` (exit 127):** cline is not on PATH. Install it, authenticate,
|
|
86
|
+
and re-dispatch.
|
|
87
|
+
- **`status: "failed"`:** read `stderrTail`, `stderrPath`, and the tail of `events.jsonl`. Common
|
|
88
|
+
causes: an unknown `--model`, expired credentials, or a provider error. A `run_result` with a
|
|
89
|
+
`finishReason` other than `completed` is failed even if cline exits zero.
|
|
90
|
+
- **`status: "failed"` with an `error` mentioning `version preflight`:** the bounded `cline --version`
|
|
91
|
+
probe failed or hung, so cline was never dispatched. Check the install (`cline --version` yourself).
|
|
92
|
+
- **`status: "aborted"`:** the relay itself was killed (its parent's timeout, a stopped task, a
|
|
93
|
+
closed terminal) and forwarded the kill to cline. The result is written before the relay exits;
|
|
94
|
+
inspect the working tree before re-dispatching. On native Windows a hard kill of the relay is
|
|
95
|
+
uncatchable (Node supports no `SIGTERM` handler there), so this status may never get written -
|
|
96
|
+
a relay process that is gone without a `result.json` is an aborted run; inspect the working
|
|
97
|
+
tree and `events.jsonl` directly.
|
|
98
|
+
- **`status: "failed"` with `signal: "SIGKILL"`:** the host killed the process, commonly through
|
|
99
|
+
the OOM killer or a supervisor timeout. This is not a cline error; check host memory and
|
|
100
|
+
re-dispatch, or split the task into smaller briefs.
|
|
101
|
+
- **`status: "timeout"`:** the `--timeout` watchdog killed the run; `error` reads
|
|
102
|
+
`cline did not finish within --timeout <dur>; killed by the relay watchdog`. Increase
|
|
103
|
+
`--timeout` or split the task. On POSIX the relay sends SIGTERM to the process group, waits 10
|
|
104
|
+
seconds, then sends SIGKILL if needed; on Windows there is no escalation phase - the whole
|
|
105
|
+
process tree is felled immediately with `taskkill /pid <pid> /t /f`.
|
|
106
|
+
- **Empty `finalMessage`:** inspect `touchedFiles` and the diff. Add a
|
|
107
|
+
`<structured_output_contract>` to the next brief to require a closing report.
|
|
108
|
+
|
|
109
|
+
## Recovering lost work
|
|
110
|
+
|
|
111
|
+
`events.jsonl` in the run directory records every event the implementer streamed. If finished
|
|
112
|
+
work is lost - the run killed late, or the working tree damaged afterward - read the event log
|
|
113
|
+
before re-dispatching: it identifies which files and tool commands were involved, which scopes
|
|
114
|
+
what needs redoing. Tool execution events carry the write/edit arguments, but treat any
|
|
115
|
+
reconstruction as unverified until it matches a working-tree diff - when the tree still holds the
|
|
116
|
+
work, preserve the tree rather than replaying the log.
|
|
117
|
+
|
|
118
|
+
## What the relay runs
|
|
119
|
+
|
|
120
|
+
The launch is equivalent to:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
cline --json -v [--provider <name>] [--model <id>] \
|
|
124
|
+
--auto-approve <true|false> [--plan] \
|
|
125
|
+
"Follow the task instructions provided on stdin." < brief.txt
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Current Cline JSON mode checks for a positional prompt before reading piped input, so the relay
|
|
129
|
+
passes the fixed instruction and streams the real brief on stdin. The child process cwd pins the
|
|
130
|
+
workspace. Only token-validated provider/model values and fixed text reach the `shell:true` launch
|
|
131
|
+
on native Windows; the brief and cwd do not. `-v` (verbose) exposes the requested provider/model.
|
|
132
|
+
Before dispatch the relay runs a
|
|
133
|
+
bounded `cline --version` preflight (10s cap) so a hung or crashing CLI fails fast and explicitly
|
|
134
|
+
instead of hanging the run. In act mode, auto-approval defaults true. With `--plan`, the relay
|
|
135
|
+
forces it false because Cline can otherwise auto-approve a switch to act mode. Cline also exposes
|
|
136
|
+
sandbox through `--data-dir` / `CLINE_SANDBOX`; the relay leaves that control to the inherited CLI
|
|
137
|
+
environment.
|
|
138
|
+
|
|
139
|
+
## The commit boundary
|
|
140
|
+
|
|
141
|
+
The relay never commits. Cline edits the working tree; the orchestrator reviews, re-runs the
|
|
142
|
+
gates, and commits. See [review-and-land.md](review-and-land.md).
|
|
@@ -0,0 +1,58 @@
|
|
|
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 cline 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
|
+
Cline's verified headless JSON path does not support session resume. Rework and unrelated queue
|
|
28
|
+
items both use fresh runs, so every brief must carry the context it needs.
|
|
29
|
+
|
|
30
|
+
## Keep a progress file
|
|
31
|
+
|
|
32
|
+
For more than two or three tasks, maintain one progress file beside the work:
|
|
33
|
+
|
|
34
|
+
- **Status table** - queued / at-implementer / reviewed+committed, with the commit hash.
|
|
35
|
+
- **Per-task review notes** - what landed, what you verified, and gate outcomes.
|
|
36
|
+
- **Needs your eyes** - design decisions, non-blocking nitpicks, and questions for the human.
|
|
37
|
+
- **End-of-run checklist** - the final cross-task verification.
|
|
38
|
+
|
|
39
|
+
Update it when each task lands, not in one batch at the end.
|
|
40
|
+
|
|
41
|
+
## Close with a coherence check
|
|
42
|
+
|
|
43
|
+
After the last task:
|
|
44
|
+
|
|
45
|
+
- Run the full test/build once more.
|
|
46
|
+
- Search repo-wide for the thing the queue changed.
|
|
47
|
+
- Replay migrations from a clean state and check drift when applicable.
|
|
48
|
+
- Push and open or update the PR only after the final tree is coherent.
|
|
49
|
+
|
|
50
|
+
## When to stop and ask
|
|
51
|
+
|
|
52
|
+
Proceed on work that follows from the agreed plan. Stop and surface when:
|
|
53
|
+
|
|
54
|
+
- A task cannot be completed correctly within its brief.
|
|
55
|
+
- Review calls the plan itself into question.
|
|
56
|
+
- Gates reveal a problem affecting already-landed tasks.
|
|
57
|
+
|
|
58
|
+
Report the landed state, commit hashes, and open question, then wait.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Review and land
|
|
2
|
+
|
|
3
|
+
The implementer made the changes; you own the judgment. Verify against reality, never the
|
|
4
|
+
self-report, and read the diff as generated code because a green gate cannot catch every failure
|
|
5
|
+
mode.
|
|
6
|
+
|
|
7
|
+
## Check tests before trusting gates
|
|
8
|
+
|
|
9
|
+
If the diff touches existing tests, review those edits first:
|
|
10
|
+
|
|
11
|
+
- Treat unbriefed test edits as a contract change, not part of the fix.
|
|
12
|
+
- Treat newly skipped, disabled, or commented-out tests as failing until proven otherwise.
|
|
13
|
+
- Treat loosened assertions the same way: contains/truthy replacing exact matches, broadened
|
|
14
|
+
error types, and widened tolerances all weaken the gate.
|
|
15
|
+
|
|
16
|
+
## Re-run the gates yourself
|
|
17
|
+
|
|
18
|
+
`result.json` carries cline's claims, not evidence. Re-run the project's actual test, lint, and
|
|
19
|
+
build commands in the working tree and read their output. Passing is necessary, not sufficient.
|
|
20
|
+
|
|
21
|
+
## Read the diff against the brief
|
|
22
|
+
|
|
23
|
+
Start with `touchedFiles`, open the diff, and compare it to the brief:
|
|
24
|
+
|
|
25
|
+
- **Scope creep** - changes the brief excluded.
|
|
26
|
+
- **Scope shortfall** - missed behavior, edges, or cleanup.
|
|
27
|
+
- **Quiet judgment calls** - defensible but unasked decisions that need review.
|
|
28
|
+
|
|
29
|
+
## The implementer sweep
|
|
30
|
+
|
|
31
|
+
Check every diff for patterns gates often miss:
|
|
32
|
+
|
|
33
|
+
- Hardcoded success or fixture data on a real-work path.
|
|
34
|
+
- Catch-all error handling that returns a default instead of propagating or recovering.
|
|
35
|
+
- Imports, dependencies, methods, and signatures not present in the installed version.
|
|
36
|
+
- Unused imports, uncalled helpers, unreachable branches, and scaffolding comments.
|
|
37
|
+
- A second client, error idiom, or logging style beside the repo's existing one.
|
|
38
|
+
- Tests that assert internals instead of behavior, or near-duplicate test bodies.
|
|
39
|
+
- Optional parameters, config flags, and abstractions with no caller.
|
|
40
|
+
- Guards for impossible cases that hide trust-boundary validation.
|
|
41
|
+
|
|
42
|
+
Send anything blocking back to cline as a delta brief, or fix it in the tree, and report either
|
|
43
|
+
choice to the human. Run relevant guard skills if installed.
|
|
44
|
+
|
|
45
|
+
## The commit boundary
|
|
46
|
+
|
|
47
|
+
When the gates pass and the diff holds, **the orchestrator commits**, never the implementer.
|
|
48
|
+
Write a clear message describing what landed.
|
|
49
|
+
|
|
50
|
+
From dispatch until that commit, the uncommitted working tree is the authoritative copy of the
|
|
51
|
+
implementer's work - the only one you can commit from, and often the only copy at all. Never run
|
|
52
|
+
`git checkout`, `reset`, `clean`, or a branch switch in the workspace between those two points -
|
|
53
|
+
however messy an interrupted run looks, inspect it first: `git status`, `git diff`,
|
|
54
|
+
`git diff --cached` for anything the implementer staged (plain `git diff` is blind to the index),
|
|
55
|
+
and commit the intended files explicitly.
|
|
56
|
+
|
|
57
|
+
## Rework: re-dispatch a corrected brief
|
|
58
|
+
|
|
59
|
+
Re-dispatch the correction with the needed context:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
echo "The fix is right, but the tests mock the DB session: use the real migrated fixture and
|
|
63
|
+
remove the unused import." | node "<skill-dir>/scripts/relay.mjs" --cd /path/to/repo
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Cline's verified headless JSON path does not support session resume, so each correction is a fresh
|
|
67
|
+
run and its brief must restate the required context. Rework gets the same test review, diff review,
|
|
68
|
+
and implementer sweep.
|
|
69
|
+
|
|
70
|
+
## Surface, do not absorb
|
|
71
|
+
|
|
72
|
+
The human opted into delegation, so committing verified, gate-passing work is the contract. Keep
|
|
73
|
+
them in the loop when the work changes shape:
|
|
74
|
+
|
|
75
|
+
- Report design decisions and defensible-but-unrequested turns.
|
|
76
|
+
- Note non-blocking nitpicks you did not block on.
|
|
77
|
+
- Stop and ask if correct completion requires going beyond the brief.
|
|
78
|
+
|
|
79
|
+
For a queue, keep these notes in the progress file described in
|
|
80
|
+
[multi-task-queues.md](multi-task-queues.md).
|