本文へ移動
cccskills
無料GitHub で公開

execution

Executes SAM Stage 5 — opens an attempt on a single ARTIFACT:TASK, dispatches it to a fresh stateless agent session, runs quality gates, and records an ARTIFACT:EXECUTION with implementation results and verification output on the task. Use when Stage 4 Task Decomposition is complete and tasks are ready for execution, when re-executing a task after Stage 6 returns NEEDS_WORK, or when dispatching a task to a language-appropriate specialist agent via the development harness pipeline.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md8.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Load dh:dh-cli-usage before using <sam_cli/> or <dh_scripts/>.

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 as its complete context.

Core Principle

The task 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. If the task is insufficient, that is a Stage 4 defect, not a Stage 5 problem.

When to Use

  • After Stage 4 Task Decomposition produces ARTIFACT:TASK entries
  • 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]) --> R1[1. Read Task]
    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

Read the task through the SAM CLI, which answers from the work ledger:

<sam_cli/> plan read --address {plan_address}/T{NNN}

The result carries the task row — title, requirements, constraints, acceptance criteria, verification steps, and the skills list — together with the sections recorded on the task, including any Orchestrator Response from a previous attempt.

Step 2 — Resolve Role to Agent

Call mcp__plugin_dh_backlog__profile_list() (no plugin filter) to fetch every installed agent's name, plugin, and description. Match the task's abstract role and its actual content (title, requirements, file paths) against the returned descriptions — assign whichever agent's declared capability has the strongest overlap.

If no agent's description plausibly matches, dispatch dh:task-worker. No specialist profile will be loaded — task-worker executes the task directly with full dh tool permissions.

Step 3 — Dispatch to Fresh Session

Open the attempt first. An attempt is a ledger row, so a plan authored through the SAM plan operations has to be brought across before the first one — plan import --from content --plan-address {plan_address} does that, and answers exists when the ledger already holds it.

dispatch then sets the task in-progress, starts its lease, and prints the attempt number the agent carries on every command it runs:

<sam_cli/> plan dispatch --address {plan_address}/T{NNN}

leased means another runner already holds the task and not-ready means its dependencies have not landed; either way this task is not the one to execute now. Any other code stops and goes to the caller.

Then launch the resolved agent in a fresh session, naming the address and the attempt. The agent must NOT have access to other planning artifacts unless the task 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 5a — Settle the Attempt

The moment the launch returns, record what came back against the attempt:

<sam_cli/> plan settle \
  --address {plan_address}/T{NNN} --attempt {attempt} --return-text "{the agent's response}"

Do this even when the response is empty or the agent crashed. An unsettled attempt reads as a worker still at work, and the caller waits on an agent that is gone.

Step 6 — Deterministic Backpressure

After the agent completes, run the project's quality gates. Activate dh:dh-meta-docs for the Role Resolution Protocol's quality-gate discovery sequence to find each command. Run these gates:

  • 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:TASK, read with plan read --address {plan_address}/T{NNN}

Output

Execution results are recorded as a task section on the ledger, tagged with the attempt they belong to:

<sam_cli/> plan update \
  --plan-address {plan_address} --task-id T{NNN} --attempt {attempt} \
  --append-section "Execution Results" --section-content "{execution markdown below}"

The executing agent closes its own attempt with plan finish and appends the Completion Report and Verification Results sections that command requires — see /dh:start-task. This Execution Results section is the dispatcher's record of the round, written alongside them rather than in place of them.

The execution results follow this template:

# ARTIFACT:EXECUTION — TASK-{NNN}

## Task

<task title from ARTIFACT:TASK>

## 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 is authoritative — if the task contradicts the plan, follow the task (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
  • Record execution results only via the Output append operation — the task's requirements and acceptance criteria are fixed input for the duration of execution
  • 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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Add automated documentation updater to any Claude skill. Creates a Python sync script that downloads upstream docs, processes markdown for AI consumption, and maintains local cache with configurable refresh. Collects template variables, then delegates implementation through 5-phase workflow. Use when adding auto-updating reference documentation to plugins or skills.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

SAM-style feature initiation workflow — discovery through codebase analysis, architecture spec, task decomposition, validation, and context manifest. Use when a user asks to add a feature, plan a feature, or convert an idea into an executable SAM plan.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

Browser automation for AI agents using the agent-browser CLI and Playwright. Use when navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging into sites, or automating any browser task. Triggers on "open a website", "fill out a form", "click a button", "scrape data", "test this web app", "automate browser actions", or any programmatic web interaction request.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

Runs the description-drift experiment — spawns all Claude Code agents simultaneously to collect self-reported capabilities, then compares them against static frontmatter descriptions to reveal how reliable orchestrator routing based on descriptions actually is. Use when measuring description drift across the agent fleet, re-running the capability collection experiment, analyzing a specific agent's self-reported capabilities, or auditing whether frontmatter descriptions accurately reflect agent behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

Create or adapt Claude Code agent definitions. Use when creating an agent, changing subagent configuration, selecting agent scope, or designing a specialized delegation role.

日本語の概要は準備中です。原文の説明を表示しています。

Jamie-BitFlight/claude_skills672026年10月9日 更新

Jamie-BitFlight のスキルをすべて見る

このスキルの問題を報告する