delegate
Delegate a bounded file-edit task to a local executor with strict write scope and runnable acceptance checks, then get a receipt with cited evidence and a diff.
Instructions
Give the local executor a bounded task in a project and get a receipt.
The contract is strict (TANDEM_STRICT=0 relaxes it): a call is refused unless it gives a goal with concrete targets, write_globs that name files, and verify_commands that can fail. When the checks only look for text or files (grep, test, ls), or the task writes files whose look no command proves (HTML, CSS, SVG, UI components), constraints are required too. For every constraint the executor must cite, at finish, the line that satisfies it: the server looks the quote up in the file, sends the work back when a constraint has none, and lists the cited lines in the receipt. Constraints are atomic: one requirement each, at most 160 characters, so that every requirement gets its own cited line. When every check already passes before the work and no constraint is given, the job stops before the executor starts, because nothing would prove the work. Accepting a job needs its job_evidence (the cited lines) or its job_diff read.
goal: what to do, precise and self-contained (files, names, exact values, expected behaviour). workspace: absolute path of the project folder; the executor cannot leave it. verify_commands: shell commands that must exit 0 for the work to be accepted (tests, build, a grep that must find or not find something). They run after the executor finishes in an isolated sandbox with secret env vars stripped; their failures go back to it for up to max_repairs attempts. Give at least one whenever you can. The files they name (and test folders) are read only for the executor unless write_globs names them. write_globs: files it may write, as globs relative to the workspace. Required; a glob that matches every file ('', '**/') is refused. allow_run: regular expressions of commands the executor itself may run (empty: none). Every part of a pipeline or chain must match one. A pattern matches anywhere in the part: start it with ^ (for example '^pytest\b') so that it names the command and not one of its arguments. immutable: files or globs relative to the workspace that are always read only. read_globs: optional files or globs relative to the workspace the executor may read via read_file, list_files, and search (empty: all workspace files). Note: if allow_run is also set, shell commands run against the mounted workspace and are not filesystem-filtered by read_globs; omit allow_run when strict read confinement is required. context: facts it needs and cannot find in the files. constraints: explicit, checkable contract requirements (coordinates, selectors, invariants) injected into the executor prompt and listed in the receipt for post-run inspection. wait_seconds: how long this call waits; a longer task keeps running, poll it with job_status. baseline: run the checks once before the work. The executor starts from their failures, and the receipt says when a check already passed, which means it proves nothing about this work. max_seconds: time limit of the job (0: none). checks_network: allow network access inside the sandbox when running verify_commands. unjailed_checks: run verify_commands outside bubblewrap (for checks needing host resources).
Every file the executor changes is journalled (and command changes are snapshotted): job_diff shows the change, job_rollback undoes it without overwriting later user edits. The syntax of every changed file is checked before the checks run. Good tasks: mechanical edits across files, a function plus its test, docs brought in line with a change, renames. Poor tasks: design choices, anything without a check.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"goal": "<goal>",
"workspace": "<workspace>"
},
"name": "delegate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | ||
| model | No | ||
| context | No | ||
| baseline | No | ||
| allow_run | No | ||
| immutable | No | ||
| max_steps | No | ||
| workspace | Yes | ||
| read_globs | No | ||
| constraints | No | ||
| max_repairs | No | ||
| max_seconds | No | ||
| write_globs | No | ||
| wait_seconds | No | ||
| checks_network | No | ||
| unjailed_checks | No | ||
| verify_commands | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |