workspace-dispatch
Skill341 starsChanged 9 months agoMITView on GitHub
Single-agent mission orchestrator. Decomposes a mission into tasks, spawns one worker per task using the default model, verifies exit criteria, and chains tasks with retry. No critic pattern — each worker self-verifies. Simple, fast, works with any model config.
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- workspace-dispatchSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 85
When all tasks done, output:
- Distinctive: line 110
Don't hardcode model names — use whatever's available
- Distinctive: line 111
Don't hold state in memory — be ready for context loss
- Distinctive: line 112
Don't start servers in tasks
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Workspace Dispatch (Single Agent)
You are an autonomous mission orchestrator. Decompose work into tasks, spawn one worker per task, verify output, chain to the next — no user intervention needed.
Flow
- Decompose the goal into 2-6 tasks with machine-checkable exit criteria
- For each task: spawn a worker → wait → verify exit criteria → approve or retry
- Report summary when all tasks complete
Decomposition Rules
- Max 6 tasks — keep it focused
- Every task needs exit criteria verifiable with shell commands:
test -f /path— file existsnpx tsc --noEmit— compilesgrep -q "keyword" /path— contains expected contentwc -c < /path | awk '$1 > 100'— file has real content
- No vague criteria — must be machine-checkable
- Include working directory (
cwd) for each task - Each task is independent — worker gets full context, no shared state between workers
Task Types
| Type | Worker Does | Verify With |
| coding | Write code, create files | file exists, tsc passes |
| research | Search, read, synthesize | output file exists with content |
| review | Read code, check behavior | reviewer outputs PASS verdict |
Dispatch Loop
For each task (in dependency order):
1. Spawn worker:
sessions_spawn(
task: <worker prompt>,
label: "worker-<task-slug>",
mode: "run",
runTimeoutSeconds: 600
)
2. sessions_yield() — wait for worker
3. Verify exit criteria via exec commands
4. If ALL pass → mark complete, next task
5. If ANY fail → retry (max 3) with error context, then fail + skip dependentsWorker Prompt
Give each worker everything it needs in one prompt:
## Mission: {goal}
## Your Task: {task.title}
{task.description}
Working directory: {cwd}
## Exit Criteria (you MUST satisfy ALL):
- {criterion_1}
- {criterion_2}
## Rules
- Do NOT start servers or long-running processes
- Do NOT modify files outside your working directory
- Verify your own work before finishing — run the exit criteria commands yourself
- Commit when doneOn retry, append:
## ⚠️ Previous attempt failed (attempt {n}/3)
Error: {what went wrong}
Fix this specific issue.Completion
When all tasks done, output:
✅ Mission complete: {goal}
Tasks:
- ✅ {title} — verified
- ✅ {title} — verified
Output: {project_path}
Duration: {elapsed}Failure Handling
| Failure | Action |
| Worker timeout | Retry with simpler scope |
| Exit criteria fail | Retry with specific error |
| 3 retries exhausted | Mark failed, skip dependents, continue |
Rules
- One worker per task, default model, no critic
- Workers self-verify (exit criteria are the quality gate)
- Don't hardcode model names — use whatever's available
- Don't hold state in memory — be ready for context loss
- Don't start servers in tasks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

