Agent skill
execution
SAM Stage 5 — Stateless execution of a single task in a fresh agent session. The task file IS the complete prompt containing all context needed. Used when dispatching a task to an agent; produces the EXECUTION artifact with implementation results and verification output.
Install this agent skill to your Project
npx add-skill https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/development-harness/skills/execution
SKILL.md
SAM Stage 5 — Execution
Role
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.
Core Principle
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.
When to Use
- After Stage 4 Task Decomposition produces ARTIFACT:TASK files
- For each task ready for execution (dependencies satisfied)
- When re-executing a task after Stage 6 returns NEEDS_WORK
Process
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])
Step 1 — Read Task File
Read the task via 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.
Step 2 — Resolve Role to Agent
Map the abstract role from the task to a concrete agent using the project's language manifest or configuration:
architectresolves to the project's design/architecture agentimplementerresolves to the project's coding agenttest-designerresolves to the project's test writing agentcode-reviewerresolves to the project's review agentdocs-writerresolves to the project's documentation agent
If no language manifest exists, use a general-purpose agent with appropriate tools.
Step 3 — Dispatch to Fresh Session
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.
Step 4 — Agent Executes Task
The agent follows the task prompt:
- Reads required inputs
- Implements requirements
- Respects constraints
- Produces expected outputs
Step 5 — Agent Runs Verification
The agent runs the verification steps embedded in the task:
- Executes verification commands
- Checks acceptance criteria
- Completes CoVe checks if present
- Reports results in the handoff section
Step 6 — Deterministic Backpressure
After the agent completes, run quality gates from the project's language manifest or standard tooling:
- Format — code formatting check
- Lint — static analysis
- Typecheck — type system validation (if applicable)
- Test — run relevant test suite
If quality gates fail, return failures to the agent for remediation before collecting results.
Input
- Single
ARTIFACT:TASKviasam_read(plan="{plan_address}", task="T{NNN}")
Output
Execution results stored via SAM:
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>
Key Constraints
- One task per agent — never batch multiple tasks into one session
- Fresh session per task — no carry-over state between executions
- Task file is authoritative — if the task file contradicts the plan, follow the task file (report the discrepancy in handoff)
- Quality gates are mandatory — execution is not complete until gates pass or failures are documented
Dependency Ordering
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.
Behavioral Rules
- Never execute a task whose dependencies have not completed
- Never modify the task file during execution — it is read-only
- If the agent cannot complete the task, status is BLOCKED with explanation
- Quality gate failures must be addressed before marking COMPLETED
- Report ALL results honestly — do not suppress failures
Success Criteria
- Task completed and all acceptance criteria verified
- Quality gates pass (format, lint, typecheck, test)
- Execution artifact documents implementation, evidence, and any remaining risks
- Handoff section provides enough information for Stage 6 review
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ccc
This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'.
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
delegate
Quick delegation template for sub-agent prompts. Use when assigning work to a sub-agent, before invoking the Agent tool, or when preparing prompts for specialized agents. Provides the WHERE-WHAT-WHY framework. For comprehensive delegation guidance, activate the agent-orchestration how-to-delegate skill.
swarm-spawning
Spawn agents and teammates in Claude Code swarms. Use when choosing between subagents vs teammates, selecting agent types (Explore, Plan, general-purpose, plugin agents), configuring spawn backends (in-process, tmux, iterm2), or setting environment variables for spawned agents.
knowledge-explorer
Manage the research/ knowledge base (KB) of tool and library research entries. Use when browsing KB topics, adding new research entries, updating existing entries with dated revisions, fetching GitHub repo metadata into a draft KB entry, or migrating old-format entries to skill-spec frontmatter. Triggers on tasks like "what do we have on X", "add this to the KB", "update the KB entry for Y", "fetch github info for owner/repo", or "migrate old entries".
design-anti-patterns
Enforce anti-AI UI design rules based on the Uncodixfy methodology. Use when generating HTML, CSS, React, Vue, Svelte, or any frontend UI code. Prevents "Codex UI" — the generic AI aesthetic of soft gradients, floating panels, oversized rounded corners, glassmorphism, hero sections in dashboards, and decorative copy. Applies constraints from Linear/Raycast/Stripe/GitHub design philosophy: functional, honest, human-designed interfaces. Triggers on: UI generation, dashboard building, frontend component creation, CSS styling, landing page design, or any task producing visual interface code.
Didn't find tool you were looking for?