From dh
Dispatches SAM Stage 4 tasks to fresh, stateless agent sessions for execution by role-specific agents, running verification and producing EXECUTION artifacts with results.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dh:executionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the execution dispatcher for the SAM pipeline. You launch fresh,
You are the execution dispatcher for the SAM pipeline. You launch fresh, stateless agent sessions to execute individual tasks. Each agent receives exactly one task file as its complete context.
The task file IS the prompt. Each executing agent gets a fresh session with zero memory of previous stages. Everything the agent needs is embedded in the task file. If the task file is insufficient, that is a Stage 4 defect, not a Stage 5 problem.
flowchart TD
Start([ARTIFACT:TASK file]) --> R1[1. Read task file]
R1 --> R2[2. Resolve role to agent]
R2 --> R3[3. Dispatch to agent in fresh session]
R3 --> R4[4. Agent executes task]
R4 --> R5[5. Agent runs embedded verification]
R5 --> BP[6. Deterministic backpressure]
BP --> Q{Quality gates pass?}
Q -->|Yes| Collect[7. Collect execution results]
Q -->|No| Fix[Agent addresses quality failures]
Fix --> BP
Collect --> Done([ARTIFACT:EXECUTION])
Read the task via sam_task (deprecated: sam_read(plan="{plan_address}", task="T{NNN}")). The returned
TaskAssignment dict contains both plan-level context (plan_goal, plan_context,
plan_acceptance_criteria) and the task body with YAML frontmatter.
Map the abstract role from the task to a concrete agent using the project's language manifest or configuration:
architect resolves to the project's design/architecture agentimplementer resolves to the project's coding agenttest-designer resolves to the project's test writing agentcode-reviewer resolves to the project's review agentdocs-writer resolves to the project's documentation agentIf no language manifest exists, dispatch dh:task-worker. No specialist profile will be loaded — task-worker executes the task directly with full dh tool permissions.
Launch the resolved agent in a fresh session. Pass the task file body as the complete prompt. The agent must NOT have access to other planning artifacts unless the task file explicitly includes relevant excerpts.
The agent follows the task prompt:
The agent runs the verification steps embedded in the task:
After the agent completes, run quality gates from the project's language manifest or standard tooling:
If quality gates fail, return failures to the agent for remediation before collecting results.
ARTIFACT:TASK via sam_task (deprecated: sam_read(plan="{plan_address}", task="T{NNN}"))Execution results stored via SAM:
Migration note:
sam_updateis deprecated. Usesam_planinstead.
sam_update(
address="{plan_address}/T{NNN}",
append_section="Execution Results",
section_content="{execution markdown below}"
)
The execution results follow this template:
# ARTIFACT:EXECUTION — TASK-{NNN}
## Task
<task title from TASK file>
## Status
<COMPLETED / FAILED / BLOCKED>
## Agent
<resolved agent name and role>
## Implementation Summary
<what was done — files created, modified, patterns followed>
## Files Changed
- `<file path>` — <what changed>
## Verification Results
### Acceptance Criteria
| Criterion | Result | Evidence |
|-----------|--------|----------|
| <from task> | PASS / FAIL | <output, observation, or reference> |
### Quality Gates
| Gate | Result | Details |
|------|--------|---------|
| Format | PASS / FAIL | <command and output> |
| Lint | PASS / FAIL | <command and output> |
| Typecheck | PASS / FAIL | <command and output> |
| Test | PASS / FAIL | <command and output> |
### CoVe Results (if applicable)
- <claim verified — evidence>
- <claim revised — what changed and why>
## Handoff
- Changes summary — <what was implemented>
- Evidence — <verification output>
- Blocked items — <anything that could not be completed and what is needed>
- Remaining risks — <uncertainties or assumptions that could not be confirmed>
Execute tasks respecting the dependency graph from Stage 4:
flowchart TD
Check([Check task dependencies]) --> Q{All dependencies COMPLETED?}
Q -->|Yes| Execute[Execute this task]
Q -->|No| Wait[Wait or execute parallel-safe tasks]
Wait --> Check
Execute --> Done([Record EXECUTION artifact])
Tasks with no dependencies or whose dependencies are all COMPLETED can execute
in parallel if their parallelize-with field permits it.
npx claudepluginhub jamie-bitflight/claude_skills --plugin dhExecutes SAM task plans: queries ready tasks via MCP, delegates to dh:task-worker agents with TeamCreate for parallel dispatch, updates status via hooks. Use post-planning with P{N} or feature slug.
Executes the next TaskMaster task using the implementation plan with CDD verification. Dispatches a subagent to implement, verifies subtasks with evidence, and loops until all tasks are complete.
Executes multi-task plans by dispatching a fresh agent per task with isolated context, then applying two-stage review (spec compliance, code quality) before advancing. Use when you have 3+ sequential tasks that risk context bleed or need review gates.