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.
- 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,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cursor-delegate
|
|
3
|
+
description: Delegate coding tasks to the Cursor Agent CLI (`cursor-agent`) only when
|
|
4
|
+
the user explicitly requests it, while the orchestrator retains review and landing
|
|
5
|
+
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 `cursor-agent` CLI installed and authenticated, Node 18+,
|
|
15
|
+
and git. The optional `--add-dir` flag requires cursor-agent 2026.07.23 or newer.
|
|
16
|
+
The orchestrating agent must be able to run shell commands and read files. Shell
|
|
17
|
+
examples assume bash/zsh (macOS/Linux, or Git Bash/WSL on Windows).
|
|
18
|
+
metadata:
|
|
19
|
+
version: 0.5.0
|
|
20
|
+
---
|
|
21
|
+
# Cursor Delegate
|
|
22
|
+
|
|
23
|
+
## When to Use
|
|
24
|
+
|
|
25
|
+
- You want to delegate a bounded coding task to a separate `cursor` implementer (`Cursor Agent`) and then review its diff yourself.
|
|
26
|
+
- The user explicitly asked for delegation to this implementer.
|
|
27
|
+
|
|
28
|
+
You are the **orchestrator**. Hand a bounded coding task to a separate **implementer** — the Cursor
|
|
29
|
+
Agent CLI — then review what it produced and land it yourself. You write the brief and own the
|
|
30
|
+
judgment; Cursor does the typing in its own session; you verify and commit.
|
|
31
|
+
|
|
32
|
+
The loop needs only a shell command and file access, so any comparable orchestrator can drive it.
|
|
33
|
+
|
|
34
|
+
## When NOT to use this
|
|
35
|
+
|
|
36
|
+
- The task is small enough to do inline; delegation overhead is not worth it.
|
|
37
|
+
- The `cursor-agent` CLI is not installed or authenticated (run `cursor-agent login`).
|
|
38
|
+
- You want to write the code yourself, or you only need Cursor's opinion on code you wrote (a
|
|
39
|
+
`--read-only` dispatch covers that — see below — but a plain review may not need delegation at all).
|
|
40
|
+
|
|
41
|
+
## Prerequisites (check once)
|
|
42
|
+
|
|
43
|
+
1. `cursor-agent --version` succeeds. If not, follow the installer for your platform at
|
|
44
|
+
[cursor.com/cli](https://cursor.com/cli), inspect what it will run, and authenticate with
|
|
45
|
+
`cursor-agent login`.
|
|
46
|
+
2. `cursor-agent status` shows you logged in.
|
|
47
|
+
3. You are in (or will point `--cd` at) the target git repository. The relay passes `--trust`, so
|
|
48
|
+
point it only at repositories you trust.
|
|
49
|
+
|
|
50
|
+
## Choose the model
|
|
51
|
+
|
|
52
|
+
Omitting `--model` uses your Cursor default (usually `auto` — Cursor picks). To pin one, pass
|
|
53
|
+
`--model <name>` with a name from the account's live `cursor-agent models` output — select from that
|
|
54
|
+
list rather than inventing a name. Parameterized forms like `<name>[context=1m,effort=high]` are
|
|
55
|
+
forwarded as-is. The model that actually served the run is recorded as `resolvedModel` in
|
|
56
|
+
`result.json`.
|
|
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
|
+
Cursor sees only the text you send plus what it can inspect in the workspace — no chat history or
|
|
65
|
+
shared context. Include the goal, current state, what to change, what to leave untouched, the
|
|
66
|
+
project's **actual** gates, and a report contract. Tell Cursor not to commit. Keep one task per
|
|
67
|
+
brief. See [references/writing-the-brief.md](references/writing-the-brief.md).
|
|
68
|
+
|
|
69
|
+
### 2. Dispatch
|
|
70
|
+
|
|
71
|
+
Use the bundled helper. It wraps `cursor-agent -p`, feeds the brief on stdin, captures the
|
|
72
|
+
structured event stream, and writes `result.json`. (`<skill-dir>` is the installed folder containing
|
|
73
|
+
this `SKILL.md`.)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
|
|
77
|
+
# read-only (plan mode — review/diagnosis, no edits): add --read-only
|
|
78
|
+
# write-capable without automatic command approval: add --no-force
|
|
79
|
+
# explicitly override Cursor's sandbox for this run: add --sandbox enabled|disabled
|
|
80
|
+
# pin a model from `cursor-agent models`: add --model <name>
|
|
81
|
+
# resume the most recent session: add --resume-last (delta brief only)
|
|
82
|
+
# resume a specific session: add --session <id> (delta brief only)
|
|
83
|
+
# hard time limit (watchdog): add --timeout 2h (the 30m default suits short runs; implementation briefs routinely need 1-2h)
|
|
84
|
+
# see all options: node .../relay.mjs --help
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The child process's cwd pins the workspace. On Cursor `2026.07.23` or newer, use repeatable
|
|
88
|
+
`--add-dir` flags only for extra workspace directories. The relay writes artifacts under the system
|
|
89
|
+
temp dir by default and never commits. See
|
|
90
|
+
[references/dispatch-and-poll.md](references/dispatch-and-poll.md).
|
|
91
|
+
|
|
92
|
+
### 3. Wait for completion
|
|
93
|
+
|
|
94
|
+
The helper blocks until Cursor finishes. Run it with the orchestrator's background-command facility,
|
|
95
|
+
or background it in the shell and poll for `result.json`. A pre-run usage error exits 2 and writes no
|
|
96
|
+
result; a missing `cursor-agent` exits 127 and writes `status: "cursor_agent_unavailable"`.
|
|
97
|
+
|
|
98
|
+
Trust process state and the working tree over a progress display. Completion means the process exited
|
|
99
|
+
and `result.json` exists. Cursor's full report is the `finalMessage` field in `result.json` (also
|
|
100
|
+
printed in full on stdout between the report markers).
|
|
101
|
+
|
|
102
|
+
**Windows + hooks caveat:** if the user has Cursor hooks configured (`~/.cursor/hooks.json`, or
|
|
103
|
+
Claude Code `PreToolUse` hooks, which cursor-agent imports), dispatching from a Git Bash (MSYS)
|
|
104
|
+
console makes cursor-agent feed PowerShell-syntax hook wrappers to bash, so every command Cursor
|
|
105
|
+
tries to run is blocked — edits still land, gates do not run. Dispatch from a PowerShell or cmd
|
|
106
|
+
console instead. Details: [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
|
|
107
|
+
|
|
108
|
+
### 4. Review — do not trust the self-report
|
|
109
|
+
|
|
110
|
+
Treat Cursor's final message and gate claims as claims:
|
|
111
|
+
|
|
112
|
+
- Re-run the project's gates yourself.
|
|
113
|
+
- Read the diff against the brief, starting with `touchedFiles`.
|
|
114
|
+
- Run relevant guard skills if installed.
|
|
115
|
+
- Round-trip migrations and grep for dangling references after removals or renames.
|
|
116
|
+
|
|
117
|
+
See [references/review-and-land.md](references/review-and-land.md).
|
|
118
|
+
|
|
119
|
+
### 5. Land it
|
|
120
|
+
|
|
121
|
+
The implementer edits the working tree; **the orchestrator commits.** Commit only after the gates
|
|
122
|
+
pass and the diff holds. If rework is needed, send a delta brief with `--resume-last` or
|
|
123
|
+
`--session <id>`, then review again.
|
|
124
|
+
|
|
125
|
+
## Autonomy and permissions
|
|
126
|
+
|
|
127
|
+
A fresh run defaults to **write-capable with `--force`**: Cursor runs commands without approval
|
|
128
|
+
unless your Cursor config explicitly denies them, so ordinary gates (tests, linters, builds) run
|
|
129
|
+
headlessly. `--no-force` keeps the run write-capable but withholds automatic command approval;
|
|
130
|
+
commands that require approval are refused because a headless run cannot prompt. `--read-only`
|
|
131
|
+
switches to Cursor's **plan mode** (read-only analysis, no edits, no `--force`). The relay always
|
|
132
|
+
passes `--trust` to keep headless runs from stalling on the workspace-trust prompt, which is why
|
|
133
|
+
`--cd` must only ever point at repositories you trust. Pass `--sandbox enabled` or `--sandbox
|
|
134
|
+
disabled` only when you need to override Cursor's sandbox for that dispatch. The requested value is
|
|
135
|
+
recorded as `sandbox` in `result.json`; it does not claim what Cursor actually applied. The permission
|
|
136
|
+
mode Cursor reports is recorded as `permissionMode`; inspect `touchedFiles` and the diff after every
|
|
137
|
+
run.
|
|
138
|
+
|
|
139
|
+
## Read-only second opinions
|
|
140
|
+
|
|
141
|
+
`--read-only` doubles as a clean way to get an adversarial second opinion with no write risk:
|
|
142
|
+
dispatch a brief that lists the agreed points, then each contested point with both positions, and ask
|
|
143
|
+
Cursor to defend or concede each — deliverable in its final message, touching no files.
|
|
144
|
+
|
|
145
|
+
## Authorization model
|
|
146
|
+
|
|
147
|
+
Delegation is something the human opts into. Once they have ("run this queue", "proceed"), committing
|
|
148
|
+
verified, gate-passing work is the agreed contract. Two limits remain: **surface, don't absorb**
|
|
149
|
+
(report Cursor's design decisions, defensible-but-unasked turns, and non-blocking nitpicks) and
|
|
150
|
+
**stop for scope changes** (if correct completion needs going beyond the brief, ask instead of
|
|
151
|
+
expanding the mandate). See [references/review-and-land.md](references/review-and-land.md).
|
|
152
|
+
|
|
153
|
+
## References
|
|
154
|
+
|
|
155
|
+
- [references/writing-the-brief.md](references/writing-the-brief.md) — structure, report contract,
|
|
156
|
+
real gates, and delta briefs.
|
|
157
|
+
- [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — flags, artifacts,
|
|
158
|
+
`result.json`, polling, and failure recovery.
|
|
159
|
+
- [references/review-and-land.md](references/review-and-land.md) — review checklist, commit boundary,
|
|
160
|
+
and rework through Cursor sessions.
|
|
161
|
+
- [references/multi-task-queues.md](references/multi-task-queues.md) — sequential queues, constraint
|
|
162
|
+
carry-forward, progress tracking, and the final coherence pass.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## Limitations
|
|
166
|
+
|
|
167
|
+
- Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `cursor` CLI, Node 18+, git.
|
|
168
|
+
- Relay never commits — it only returns structured result JSON; you review and land the commit.
|
|
169
|
+
|
|
170
|
+
> Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Dispatch and poll
|
|
2
|
+
|
|
3
|
+
`scripts/relay.mjs` wraps Cursor's headless print mode (`cursor-agent -p`), captures its structured
|
|
4
|
+
stream, and writes a `result.json`. Run one command, then read one file.
|
|
5
|
+
|
|
6
|
+
## Before the first run
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
command -v cursor-agent
|
|
10
|
+
cursor-agent --version
|
|
11
|
+
cursor-agent status
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Follow the installer for your platform at [cursor.com/cli](https://cursor.com/cli), inspect what it
|
|
15
|
+
will run, then authenticate with `cursor-agent login`. On Windows the CLI installs as a `.cmd` shim;
|
|
16
|
+
the relay handles that launch itself, no setup needed.
|
|
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
|
+
| `--model <name>` | Cursor model for this run (default: your Cursor default, usually `auto`). Names come from `cursor-agent models`. |
|
|
32
|
+
| `--read-only` | Run in Cursor's plan mode: read-only analysis, no edits, no `--force`. |
|
|
33
|
+
| `--sandbox <mode>` | Override Cursor's sandbox for this dispatch: `enabled` or `disabled`. |
|
|
34
|
+
| `--no-force` | Keep the run write-capable but withhold `--force`; commands requiring approval are refused. |
|
|
35
|
+
| `--session <id>` | Resume a specific Cursor chat (`--resume <id>`); send only the delta brief. |
|
|
36
|
+
| `--resume-last` | Resume the most recent Cursor chat (`--continue`); send only the delta brief. |
|
|
37
|
+
| `--add-dir <dir>` | Add an extra workspace root on Cursor `2026.07.23` or newer. Repeatable. Edits there are not reported in `touchedFiles`. |
|
|
38
|
+
| `--timeout <dur>` | Relay watchdog (default: `30m`; h/m/s strings). cursor-agent has no timeout flag. |
|
|
39
|
+
| `--out-dir <dir>` | Artifact directory (default: a fresh directory under the system temp dir). |
|
|
40
|
+
| `-h`, `--help` | Print the relay's header help. |
|
|
41
|
+
|
|
42
|
+
`--session` and `--resume-last` are mutually exclusive. The child cwd pins the primary workspace;
|
|
43
|
+
`--add-dir` adds extra workspace roots only.
|
|
44
|
+
|
|
45
|
+
A fresh run defaults to write-capable with `--force` (commands run without approval unless your
|
|
46
|
+
Cursor config denies them). `--no-force` withholds automatic command approval while retaining file
|
|
47
|
+
edits; `--read-only` switches to plan mode instead. The relay always passes `--trust` so a headless
|
|
48
|
+
run never stalls on the workspace-trust prompt — point `--cd` only at repositories you trust.
|
|
49
|
+
|
|
50
|
+
## Artifacts and result fields
|
|
51
|
+
|
|
52
|
+
Artifacts live outside the repo by default, so they do not appear in `touchedFiles`; an `--out-dir`
|
|
53
|
+
inside the worktree can make the artifacts appear there:
|
|
54
|
+
|
|
55
|
+
- `brief.txt` — the exact brief.
|
|
56
|
+
- `events.jsonl` — raw cursor-agent stdout events.
|
|
57
|
+
- `final.txt` — the final report; absent if none was emitted.
|
|
58
|
+
- `stderr.txt` — complete stderr.
|
|
59
|
+
- `result.json` — the stable `delegate-relay.result.v1` contract.
|
|
60
|
+
|
|
61
|
+
`result.json` fields:
|
|
62
|
+
|
|
63
|
+
- `schema`, `tool` (`"cursor-agent"`), `status` (`completed` | `failed` | `timeout` | `aborted` |
|
|
64
|
+
`cursor_agent_unavailable`), `exitCode`, and `signal` (`null` unless the child died on a signal).
|
|
65
|
+
- `workdir`, `model` (the requested name or `null`), `resolvedModel` (the model Cursor actually
|
|
66
|
+
served, from its init event), `permissionMode` (the mode Cursor reported applying), `readOnly`,
|
|
67
|
+
`force`, `sandbox` (the requested value or `null`, not a claim about what Cursor applied),
|
|
68
|
+
`resumed`, `cursorAgentVersion`, `sessionId`, `startedAt`, and `finishedAt`.
|
|
69
|
+
- `briefPath`, `finalPath`, `eventsPath`, and `stderrPath`.
|
|
70
|
+
- `finalMessage` — the `result` field of Cursor's closing event; when the run died before emitting
|
|
71
|
+
one, the assistant text chunks joined with `"\n\n"` instead. Tool calls and tool results are
|
|
72
|
+
excluded.
|
|
73
|
+
- `touchedFiles` — `git status --porcelain` lines for the **final working tree under `--cd` only**,
|
|
74
|
+
not an attribution of Cursor's edits: anything already dirty before dispatch shows up too, and
|
|
75
|
+
edits Cursor makes inside `--add-dir` roots do not show up at all — inspect those trees yourself.
|
|
76
|
+
Dispatch from a clean tree when you want the list to read as "what Cursor changed". `null` means
|
|
77
|
+
git could not report; `[]` means git ran and the tree is clean.
|
|
78
|
+
- `usage` — Cursor's token-usage object from the closing result event, or `null` if no result event
|
|
79
|
+
supplied one.
|
|
80
|
+
- `stderrTail` — the last 20 non-empty stderr lines on any run that did not complete (`failed`,
|
|
81
|
+
`timeout`, `aborted`), except a launch failure, which reports `failed` with no `stderrTail`.
|
|
82
|
+
- `error` — present for launch failures, when the relay watchdog fires (`timeout`), on an `aborted`
|
|
83
|
+
run, and when Cursor's own result event carries `is_error: true`.
|
|
84
|
+
|
|
85
|
+
## Waiting for completion
|
|
86
|
+
|
|
87
|
+
The helper blocks. Use the orchestrator's background-command facility, or background it in a shell
|
|
88
|
+
and poll for `result.json`. The run is done only when the process exits and the file contains a
|
|
89
|
+
`status`.
|
|
90
|
+
|
|
91
|
+
A pre-run usage error exits 2 and writes no result. A missing `cursor-agent` exits 127 and writes
|
|
92
|
+
`status: "cursor_agent_unavailable"`.
|
|
93
|
+
|
|
94
|
+
## When a run misbehaves
|
|
95
|
+
|
|
96
|
+
- **`status: "cursor_agent_unavailable"` (exit 127):** install the Cursor CLI, authenticate with
|
|
97
|
+
`cursor-agent login`, and re-dispatch.
|
|
98
|
+
- **`status: "failed"`:** read `stderrTail`, `stderrPath`, and the tail of `events.jsonl`. If the
|
|
99
|
+
result event carried `is_error: true` the relay reports `failed` even on a zero exit; Cursor's own
|
|
100
|
+
message is in `finalMessage`. An unknown `--model` name fails fast — re-check against
|
|
101
|
+
`cursor-agent models`.
|
|
102
|
+
- **A version-preflight failure:** the relay writes `failed` with the probe's exit code, or `timeout`
|
|
103
|
+
with exit 124 when the probe exceeds the smaller of the run watchdog and 10 seconds. Cursor is not
|
|
104
|
+
dispatched.
|
|
105
|
+
- **`status: "aborted"`:** the relay itself was killed (its parent's timeout, a stopped task, a
|
|
106
|
+
closed terminal) and forwarded the kill to cursor-agent. The result is written before the relay
|
|
107
|
+
exits; inspect the working tree before re-dispatching. On native Windows a hard kill of the relay
|
|
108
|
+
is uncatchable (Node supports no `SIGTERM` handler there), so this status may never get written —
|
|
109
|
+
a relay process that is gone without a `result.json` is an aborted run; inspect the working tree
|
|
110
|
+
and `events.jsonl` directly.
|
|
111
|
+
- **`status: "failed"` with `signal: "SIGKILL"`:** the host killed the process, commonly through the
|
|
112
|
+
OOM killer or a supervisor timeout. This is not a Cursor error; check host memory and re-dispatch,
|
|
113
|
+
or split the task into smaller briefs.
|
|
114
|
+
- **`status: "timeout"`:** the `--timeout` watchdog killed the run; `error` reads
|
|
115
|
+
`cursor-agent did not finish within --timeout <dur>; killed by the relay watchdog`. Increase
|
|
116
|
+
`--timeout` or split the task. The relay sends SIGTERM, waits 10 seconds, then sends SIGKILL if
|
|
117
|
+
needed (on Windows a single process-tree kill).
|
|
118
|
+
- **Empty `finalMessage`:** inspect `touchedFiles` and the diff. Add a
|
|
119
|
+
`<structured_output_contract>` to the next brief to require a closing report.
|
|
120
|
+
- **Every command Cursor runs is rejected with "Hook blocked with message: … eval: … syntax error
|
|
121
|
+
near unexpected token `&`" (or Cursor reports "the terminal hook failed"):** a cursor-agent bug,
|
|
122
|
+
not a hook bug. When cursor-agent is launched from a Git Bash (MSYS) console on Windows — which
|
|
123
|
+
is what an orchestrator's bash tool uses — it selects `bash.exe` as its persistent shell while
|
|
124
|
+
still generating its hook wrappers in PowerShell syntax, so every configured hook (its own
|
|
125
|
+
`~/.cursor/hooks.json` and any imported Claude Code `PreToolUse` hooks) errors and Cursor blocks
|
|
126
|
+
the command, fail-closed. File edits still work; command execution does not — which also means
|
|
127
|
+
Cursor cannot run the gates, only claim it could not. Workaround: dispatch the relay from a
|
|
128
|
+
PowerShell or cmd console instead (observed fixed there); or temporarily remove the hook entries
|
|
129
|
+
for the run. Verified on cursor-agent 2026.07.23.
|
|
130
|
+
|
|
131
|
+
## Recovering lost work
|
|
132
|
+
|
|
133
|
+
`events.jsonl` in the run directory records every event the implementer streamed. If finished
|
|
134
|
+
work is lost — the run killed late, or the working tree damaged afterward — read the event log
|
|
135
|
+
before re-dispatching: it identifies which files and tool commands were involved, which scopes
|
|
136
|
+
what needs redoing. Whether it also carries the edit contents depends on what the CLI streams,
|
|
137
|
+
so treat any reconstruction as unverified until it matches a working-tree diff — when the tree
|
|
138
|
+
still holds the work, preserve the tree rather than replaying the log.
|
|
139
|
+
|
|
140
|
+
## What the relay runs
|
|
141
|
+
|
|
142
|
+
The argv is equivalent to:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
cursor-agent --print --output-format stream-json --trust \
|
|
146
|
+
[--force | --mode plan] [--sandbox enabled|disabled] [--model <name>] \
|
|
147
|
+
[--resume <id> | --continue] \
|
|
148
|
+
[--add-dir <dir> ...] # brief on stdin
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`--no-force` omits both `--force` and `--mode plan`; the run can edit files, but approval-gated
|
|
152
|
+
commands are refused.
|
|
153
|
+
|
|
154
|
+
The brief rides stdin, so it is not visible in the host process list and has no OS argument-size
|
|
155
|
+
cap. On Windows the launch goes through the shell so the `cursor-agent.cmd` shim resolves; the brief
|
|
156
|
+
still travels on stdin, sandbox, model, session, and directory values are validated, and spaceable
|
|
157
|
+
values are quoted.
|
|
158
|
+
|
|
159
|
+
## The commit boundary
|
|
160
|
+
|
|
161
|
+
The relay never commits. Cursor edits the working tree; the orchestrator reviews, re-runs the gates,
|
|
162
|
+
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 the
|
|
20
|
+
default because it preserves clean task boundaries.
|
|
21
|
+
|
|
22
|
+
## Carry decided constraints forward
|
|
23
|
+
|
|
24
|
+
Fresh Cursor 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 Cursor 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 items
|
|
29
|
+
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,93 @@
|
|
|
1
|
+
# Review and land
|
|
2
|
+
|
|
3
|
+
Cursor did the typing; 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 Cursor's claims, not evidence. Re-run the project's actual test, lint, and
|
|
18
|
+
build 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 Cursor 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. Write a
|
|
53
|
+
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 `git checkout`, `reset`, `clean`, or a branch switch in the
|
|
57
|
+
workspace between those two points — however messy an interrupted run looks, inspect it first:
|
|
58
|
+
`git status`, `git diff`, `git diff --cached` for anything the implementer staged (plain
|
|
59
|
+
`git diff` is blind to the index), and open any untracked files (`??` in `git status`) directly —
|
|
60
|
+
they are the implementer's new files, and no diff shows their contents. The tree is evidence,
|
|
61
|
+
not clutter. After that inspection the
|
|
62
|
+
verdict can legitimately be to discard — work built on a premise you have since corrected, for
|
|
63
|
+
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 relay
|
|
76
|
+
rejects `--resume-last` plus `--session` before launch. Rework gets the same gate rerun, test
|
|
77
|
+
review, diff review, and implementer sweep.
|
|
78
|
+
|
|
79
|
+
A resumed run carries the same autonomy flags as a fresh one — write-capable with `--force` by
|
|
80
|
+
default, write-capable without automatic command approval under `--no-force`, or plan mode under
|
|
81
|
+
`--read-only`. Confirm `touchedFiles` after every fresh or resumed run.
|
|
82
|
+
|
|
83
|
+
## Surface, do not absorb
|
|
84
|
+
|
|
85
|
+
The human opted into delegation, so committing verified, gate-passing work is the contract. Keep them
|
|
86
|
+
in the loop when the work changes shape:
|
|
87
|
+
|
|
88
|
+
- Report design decisions and defensible-but-unrequested turns.
|
|
89
|
+
- Note non-blocking nitpicks you did not block on.
|
|
90
|
+
- Stop and ask if correct completion requires going beyond the brief.
|
|
91
|
+
|
|
92
|
+
For a queue, keep these notes in the progress file described in
|
|
93
|
+
[multi-task-queues.md](multi-task-queues.md).
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Writing the brief
|
|
2
|
+
|
|
3
|
+
A brief is the entire task as Cursor 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 the
|
|
6
|
+
repo, it does not exist for Cursor.
|
|
7
|
+
|
|
8
|
+
## Model choice and resumed sessions
|
|
9
|
+
|
|
10
|
+
Omitting `--model` uses your Cursor default (usually `auto` — Cursor picks the model). Pass
|
|
11
|
+
`--model <name>` only with a name from the account's live `cursor-agent models` output. Do not
|
|
12
|
+
invent a name.
|
|
13
|
+
|
|
14
|
+
A resumed run keeps the session context. Send only the delta brief with `--resume-last` or
|
|
15
|
+
`--session <id>`.
|
|
16
|
+
|
|
17
|
+
## The shape that works
|
|
18
|
+
|
|
19
|
+
Use a compact, block-structured brief. State the task, what done means, the few constraints that
|
|
20
|
+
matter, and the report Cursor must return.
|
|
21
|
+
|
|
22
|
+
```xml
|
|
23
|
+
<task>
|
|
24
|
+
One or two sentences: the concrete job and where it lives. Then the specifics - current state, what to
|
|
25
|
+
change, and explicitly what to leave untouched. The leave-untouched list prevents unrelated refactors.
|
|
26
|
+
</task>
|
|
27
|
+
|
|
28
|
+
<verification_loop>
|
|
29
|
+
Run these before finishing and fix anything they surface, do not just report it:
|
|
30
|
+
<the project's real test command>
|
|
31
|
+
<the project's real lint/format command>
|
|
32
|
+
<the project's real build/typecheck command>
|
|
33
|
+
Confirm the working tree shows only the intended changes afterward.
|
|
34
|
+
</verification_loop>
|
|
35
|
+
|
|
36
|
+
<action_safety>
|
|
37
|
+
Keep changes scoped to the task. No unrelated refactors, renames, or cleanup unless required for
|
|
38
|
+
correctness. Do NOT run git add or git commit - the orchestrator commits after reviewing. Leave the
|
|
39
|
+
work uncommitted in the working tree.
|
|
40
|
+
</action_safety>
|
|
41
|
+
|
|
42
|
+
<structured_output_contract>
|
|
43
|
+
End with a report in this exact shape:
|
|
44
|
+
1. What changed and why
|
|
45
|
+
2. Files touched
|
|
46
|
+
3. Gate outcomes (include test/lint counts)
|
|
47
|
+
4. Anything you deviated on, left open, or want a decision on
|
|
48
|
+
</structured_output_contract>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Add extra blocks only when the task needs them:
|
|
52
|
+
|
|
53
|
+
- **Debugging or open-ended fixes** — add `<completeness_contract>` (resolve fully, not just the first
|
|
54
|
+
plausible cause) and `<missing_context_gating>` (find missing repo facts or state what is unknown).
|
|
55
|
+
- **Research or recommendations** — add `<research_mode>` (separate observed facts, inferences, and
|
|
56
|
+
open questions).
|
|
57
|
+
|
|
58
|
+
## Always ask for the report explicitly
|
|
59
|
+
|
|
60
|
+
The relay builds `finalMessage` from Cursor's closing result event, falling back to its assistant
|
|
61
|
+
text stream. Without a closing summary, the edits may exist but the result is hard to review. The
|
|
62
|
+
`<structured_output_contract>` block makes the expected report explicit.
|
|
63
|
+
|
|
64
|
+
## Discover the real gates
|
|
65
|
+
|
|
66
|
+
Read the repo's `AGENTS.md`, `CLAUDE.md`, `Makefile`, `package.json`, or equivalent first and copy the
|
|
67
|
+
actual commands into `<verification_loop>`. A brief that says only "run the tests" makes the
|
|
68
|
+
implementer guess or skip them.
|
|
69
|
+
|
|
70
|
+
## Honor repo conventions
|
|
71
|
+
|
|
72
|
+
Restate the load-bearing house rules in the brief. Cursor reads the repo's `.cursor/rules` and can
|
|
73
|
+
inspect the workspace, but the important constraints should be directly in front of it.
|
|
74
|
+
|
|
75
|
+
## One task per brief
|
|
76
|
+
|
|
77
|
+
Keep each brief bounded. One brief -> one Cursor run -> one reviewed commit keeps the diff and
|
|
78
|
+
rollback clean. Split mixed implementation, review, documentation, and roadmap requests into separate
|
|
79
|
+
dispatches.
|
|
80
|
+
|
|
81
|
+
## Premises freeze at dispatch
|
|
82
|
+
|
|
83
|
+
The implementer starts from the brief's facts and there is no steering channel mid-run. Audit the
|
|
84
|
+
fact block before sending — ownership, target branch, constraints, anything a judgment call rests
|
|
85
|
+
on. If a premise turns out wrong while the run is live, stop the run and re-dispatch a corrected
|
|
86
|
+
brief rather than discounting the output afterward; for a write-capable run, inspect the working
|
|
87
|
+
tree and reconcile any partial or premise-contaminated edits — keep or revert them — before the
|
|
88
|
+
re-dispatch.
|
|
89
|
+
|
|
90
|
+
## A worked example
|
|
91
|
+
|
|
92
|
+
```xml
|
|
93
|
+
<task>
|
|
94
|
+
In the payments service at services/billing/, the refund path double-charges when a refund is retried
|
|
95
|
+
after a network timeout. Make refund submission idempotent: check for an existing refund by idempotency
|
|
96
|
+
key before creating a new one. Touch only services/billing/refund.py and its tests. Leave the charge
|
|
97
|
+
path, API routes, and data models untouched.
|
|
98
|
+
</task>
|
|
99
|
+
|
|
100
|
+
<verification_loop>
|
|
101
|
+
Run and make green before finishing:
|
|
102
|
+
pytest tests/billing/ -q
|
|
103
|
+
ruff check services/billing/
|
|
104
|
+
Confirm git status shows only refund.py and its test file changed.
|
|
105
|
+
</verification_loop>
|
|
106
|
+
|
|
107
|
+
<action_safety>
|
|
108
|
+
Scope strictly to the refund idempotency fix. No unrelated refactors. Do NOT git add or commit; leave
|
|
109
|
+
changes in the working tree for review.
|
|
110
|
+
</action_safety>
|
|
111
|
+
|
|
112
|
+
<structured_output_contract>
|
|
113
|
+
Report: (1) the root cause and fix, (2) files touched, (3) pytest and ruff outcomes with counts,
|
|
114
|
+
(4) anything left open or needing a decision.
|
|
115
|
+
</structured_output_contract>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Delivery
|
|
119
|
+
|
|
120
|
+
The relay reads the brief from a file or stdin and feeds it to `cursor-agent` on stdin — it never
|
|
121
|
+
rides argv, so it is not visible in the host process list and has no OS argument-size cap. Large
|
|
122
|
+
context is still better referenced than inlined: put it in the workspace and tell Cursor which file
|
|
123
|
+
to read.
|
|
124
|
+
|
|
125
|
+
Dispatch with [dispatch-and-poll.md](dispatch-and-poll.md), then review and commit with
|
|
126
|
+
[review-and-land.md](review-and-land.md).
|