# Workspace Dispatch

Splits a mission into tasks, runs one worker per task and checks exit criteria.

- Repository: https://github.com/outsourc-e/hermes-workspace (6781 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add outsourc-e/hermes-workspace --skill workspace-dispatch -g -a claude-code -y`
Codex: `npx skills add outsourc-e/hermes-workspace --skill workspace-dispatch -g -a codex -y`
Cursor: `npx skills add outsourc-e/hermes-workspace --skill workspace-dispatch -g -a cursor -y`
Gemini CLI: `npx skills add outsourc-e/hermes-workspace --skill workspace-dispatch -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

1. **Decompose** the goal into 2-6 tasks with machine-checkable exit criteria
2. **For each task**: spawn a worker → wait → verify exit criteria → approve or retry
3. **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 exists
  - `npx tsc --noEmit`, compiles
  - `grep -q "keyword" /path`, contains expected content
  - `wc -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 dependents
```

## Worker 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}

The rest: https://github.com/outsourc-e/hermes-workspace/blob/HEAD/skills/workspace-dispatch/SKILL.md
