plugins/development-harness/skills/start-task/SKILL.md
Use when executing a SAM task — claims the task via MCP to set it IN PROGRESS, writes active-task context for hooks, loads task-level skills, implements against acceptance criteria, and marks complete via --complete flag. Triggers on task execution within the implement-feature loop or when an agent picks up a specific task from a plan file.
npx skillsauth add jamie-bitflight/claude_skills start-taskInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are implementing a specific task from a SAM task file.
<task_input> $ARGUMENTS </task_input>
MCP server availability: This skill uses mcp__plugin_dh_sam__* tools. The SAM server takes 10–30 seconds to initialize after a session restart. If unavailable or ToolSearch reports "still connecting", follow mcp-connection-check.md before proceeding.
task_file_path (required): path to a plan/tasks-*.md file--task <id> (optional): Task ID to start (defaults to first ready task)--complete <id> (optional): Task ID to mark COMPLETE--complete <task-id> Providedmcp__plugin_dh_sam__sam_task(plan="P{N}", task="T{M}", config={"action": "state", "status": "complete"}) to mark the task complete.Task {ID} marked as completeRead the task assignment via the SAM MCP tool:
mcp__plugin_dh_sam__sam_task(plan="P{N}", task="T{M}", config={"action": "read"})
The response is a TaskAssignment JSON object containing:
plan.goal — the overall feature goalplan.context — plan-level context manifest (architecture decisions, codebase notes)task — full task details: title, requirements, constraints, acceptance criteria, verification stepstask.skills — skill names to load before implementingUse the address form P{N}/T{M} where N is the plan number and M is the task number from the --task argument.
1a. Discover plan artifacts via manifest (when issue number is known):
If the TaskAssignment JSON contains a parent_issue_number or the plan has an issue field, query the artifact manifest to discover available plan artifacts:
mcp__plugin_dh_backlog__artifact_list(issue_number=N)
If the response contains artifacts (non-empty artifacts list), use artifact_read to fetch the architect spec and feature context content:
mcp__plugin_dh_backlog__artifact_read(issue_number=N, artifact_type="architect")
mcp__plugin_dh_backlog__artifact_read(issue_number=N, artifact_type="feature-context")
Use the returned content as context for implementation instead of reading filesystem paths directly. This is especially important for worktree-isolated agents that cannot access uncommitted plan files from the root worktree.
Fallback: If artifact_list returns an empty manifest (no artifacts entries) or an error, try artifact_read with types architect and feature-context directly. These artifact types are registered by the agents that produce them.
--task provided, use that IDnot-started and all dependencies are resolved (check task.dependencies in the TaskAssignment)2a. Load task-level skills (if present):
task.skills from the TaskAssignment JSON (an array of skill names).Skill(skill="{skill-name}")/implement-feature) may also include skill-loading instructions in the delegation prompt. This is intentional redundancy — loading a skill twice is a no-op.Claim the task (prevents duplicate dispatch):
Use sam_task(action='claim') MCP tool. This is the ONLY permitted way to mark a task in-progress.
Do NOT edit status or started fields directly with the Edit tool.
mcp__plugin_dh_sam__sam_task(plan="P{N}", task="T{M}", config={"action": "claim"})
If the response contains "claimed": false:
If the response contains "claimed": true:
status: in-progress and started: are written on disk.Register the active-task context via the SAM MCP tool (required for hook-driven updates):
mcp__plugin_dh_sam__sam_active_task(
config={"action": "set", "plan": "P{N}", "task": "T{M}", "parent_issue_number": N},
session_id="$CLAUDE_SESSION_ID"
)
Omit parent_issue_number from the config if the story issue number is not known. The hook
treats absence as None and skips GitHub sync.
If parent_issue_number is known and github_issue field is set in the task YAML, call
backlog_core.gh_client.update_task_status(repo, github_issue, "in-progress") after the
claim-task step to sync the in-progress status to GitHub. Failure is non-fatal — continue
regardless.
Record divergence observations during implementation.
While implementing, if you discover that the architect spec or feature-context
describes something that does not match what you are implementing, append a
divergence note to the task file under a ## Divergence Notes section.
When to record: Record a divergence note when ALL of these hold:
Divergence note format:
## Divergence Notes
### DN-1: {Brief title}
- **Plan artifact**: `artifact_read(issue_number={N}, artifact_type="architect")`, section "{section name}"
- **Plan claim**: "{quoted text from plan artifact}"
- **Actual implementation**: "{what was actually done and why}"
- **Classification**: design-refinement | intent-divergence
- **Recorded**: {ISO timestamp}
After appending a note, update divergence-notes: {count} in YAML frontmatter
(or add **Divergence Notes**: {count} in legacy format).
For full artifact classification rules and divergence thresholds, see plan-artifact-lifecycle.md.
Commit message restriction — Fixes #N trailers are PROHIBITED in task-level commits.
Task-level commits must NEVER include Fixes #N, Closes #N, or Resolves #N trailers.
These trailers trigger automatic GitHub issue closure. Issue closure is handled exclusively
by /complete-implementation in its final commit step, after all quality gates pass.
Including these trailers in task commits causes premature issue closure before verification
is complete.
Implement against the task acceptance criteria and run its verification steps.
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
testing
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.