Task implementation skill for spec-driven workflows. Reads specifications, identifies next actionable tasks, and creates detailed execution plans. Use when ready to implement a task from an existing spec - bridges the gap between planning and coding.
Executes tasks from specifications by identifying next actionable items and creating detailed implementation plans. Triggers when ready to implement a task from an existing spec, bridging the gap between planning and coding with user approval at key checkpoints.
/plugin marketplace add tylerburleigh/claude-foundry/plugin install foundry@claude-foundryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/agent-delegation.mdreferences/autonomous-mode.mdreferences/bikelane.mdreferences/checklist.mdreferences/context-gathering.mdreferences/context-structure.mdreferences/journaling.mdreferences/parallel-mode.mdreferences/progress-tracking.mdreferences/research-workflow.mdreferences/session-management.mdreferences/spec-lifecycle.mdreferences/subagent-patterns.mdreferences/task-lifecycle.mdreferences/troubleshooting.mdreferences/verification.md/implement-cmd command after spec has been identified.
[x?]=decision ·(GATE)=user approval ·→=sequence ·↻=loop ·§=section ref
- **Entry** → LoadConfig → ModeDispatch
- LoadConfig: Call `environment action="get-config"` (returns implement + git), merge with CLI flags
- [--delegate or --parallel?] → §DelegatedMode / §ParallelMode
- [--auto?] → Skip user gates (autonomous execution)
- [interactive] → SelectTask
- [recommend] → `task action="prepare"` → ShowRecommendation
- [browse] → `task action="query"` → (GATE: task selection)
- → TypeDispatch
- [type=verify?] → §VerifyWorkflow
- [type=task?] → DeepDive
- `task action="prepare"` → ExtractContext
- DraftPlan → (GATE: approve plan)
- [approved] → PreImpl
- [changes] → ↻ back to DraftPlan
- [defer] → **Exit**
- PreImpl: LSP analysis → Explore subagent
- `task action="update-status" status="in_progress"`
- **Implement**
- PostImpl: `task action="complete"` + journal (auto)
- [success?] → SurfaceNext
- `task action="prepare"` → ShowNextTask
- (GATE: continue?) → ↻ back to SelectTask | **Exit**
- [blocked?] → HandleBlocker
- `task action="block"` → (GATE: alternatives)
- [add-dep?] → `task action="add-dependency"` | `task action="add-requirement"`
- [resolve] → ↻ back to Implement
- [skip] → SurfaceNext
§VerifyWorkflow → see references/verification.md
§ParallelMode:
- `task action="prepare-batch"` → IdentifyEligible
- [conflicts?] → ExcludeConflicting
- `task action="start-batch"` → SpawnSubagents
- For each subagent: Task(general-purpose, run_in_background=true)
- TaskOutput(block=true) → CollectResults
- `task action="complete-batch"` → AggregateResults
- [failures?] → HandlePartialFailure
- [more batches?] → ↻ back to prepare-batch | **Exit**
Flow notation: see docs/flow-notation.md
This skill interacts solely with the Foundry MCP server (foundry-mcp). Tools use the router+action pattern: mcp__plugin_foundry_foundry-mcp__<router> with action="<action>".
| Router | Key Actions |
|---|---|
task | prepare, query, info, start, complete, update-status, block, unblock, add-dependency, add-requirement, session-config, prepare-batch, start-batch, complete-batch, reset-batch |
research | node-status, node-execute, node-record, node-findings |
journal | add, list |
lifecycle | activate, move, complete |
spec | find, list |
intake | add, list, dismiss |
environment | get-config |
Critical Rules:
Four flags control execution behavior. Defaults loaded via environment action="get-config", CLI flags override.
Config Loading: At entry, call the environment tool to read configuration from foundry-mcp.toml. Returns both implement (mode flags + model) and git (commit cadence) sections. If the config file is missing or section not found, use defaults (all false for implement, model=haiku).
| Flag | Effect |
|---|---|
--auto | Skip prompts between tasks (autonomous execution) |
--delegate | Use subagent(s) for implementation |
--parallel | Run subagents concurrently (implies --delegate) |
--model <haiku|sonnet|opus> | Model for delegated tasks (default: haiku) |
Resulting combinations:
| Flags | Subagent | Concurrent | Prompts | Description |
|---|---|---|---|---|
| (none) | ❌ | ❌ | ✅ | Interactive, inline |
--auto | ❌ | ❌ | ❌ | Autonomous, inline |
--delegate | ✅ | ❌ | ✅ | Interactive, sequential subagent |
--auto --delegate | ✅ | ❌ | ❌ | Autonomous, sequential subagent |
--delegate --parallel | ✅ | ✅ | ✅ | Interactive, concurrent subagents |
--auto --delegate --parallel | ✅ | ✅ | ❌ | Autonomous, concurrent subagents |
--auto)Executes tasks continuously without user prompts between each task. Session state persists across /clear boundaries.
Key behaviors:
task action="prepare"Session tracking: Uses task action="session-config" with commands: start, status, pause, resume, end.
Full documentation: references/autonomous-mode.md Session management: references/session-management.md
--delegate --parallel)Spawns multiple subagents to execute independent tasks concurrently. File-path conflicts are detected and excluded.
Key behaviors:
task action="prepare-batch" to identify eligible tasksfile_path metadataTask(general-purpose, run_in_background=true) per taskTaskOutput and aggregates with complete-batchBatch actions: prepare-batch, start-batch, complete-batch, reset-batch
CRITICAL when using --parallel: Read references/parallel-mode.md before proceeding. Contains required JSON formats for batch operations.
--delegate)Uses subagent(s) for implementation. Fresh context per task while main agent handles orchestration.
Key behaviors:
Task(general-purpose, model={model}) for each task implementationhaiku; override with --model sonnet or --model opus--parallel--auto: skips user gates; without: preserves all gatesSubagent receives:
When to use:
See also: references/subagent-patterns.md
The skill only interacts with specs via MCP tools:
mcp__plugin_foundry_foundry-mcp__task action="prepare"mcp__plugin_foundry_foundry-mcp__task action="info"mcp__plugin_foundry_foundry-mcp__spec action="find"mcp__plugin_foundry_foundry-mcp__task action="query"Direct JSON access (Read(), cat, jq, grep, etc.) is prohibited.
Gate key decisions with AskUserQuestion (MANDATORY):
Anti-Pattern: Never use text-based numbered lists. Always use AskUserQuestion for structured choices.
This skill must NEVER invoke itself or Skill(sdd-implement). The only valid callers are:
/implement command (entry point)If you find yourself about to call Skill(sdd-implement) from within this skill, STOP and proceed with the workflow instead. The skill handles the complete task lifecycle - there is no need to re-invoke it.
For detailed context gathering patterns, see
references/context-gathering.mdFor agent delegation patterns (when to use sdd-planner), seereferences/agent-delegation.md
Execute one task at a time with explicit user approval.
Assumption: The /next-cmd command has already identified the active spec and passed it to this skill.
mcp__plugin_foundry_foundry-mcp__task action="prepare" -> surface task id, file, estimates, blockersmcp__plugin_foundry_foundry-mcp__task action="query" -> present shortlist via AskUserQuestionAfter selecting a task, check its type to determine the workflow path.
Check task type from the task action="prepare" response or via mcp__plugin_foundry_foundry-mcp__task action="info":
| Task Type | Workflow Path |
|---|---|
type: "verify" | Go to Verification Task Workflow |
type: "research" | Go to Research Node Workflow |
type: "task" (default) | Continue to Deep Dive & Plan Approval |
CRITICAL: Verification and research tasks must NOT go through the implementation workflow. They require MCP tool invocation, not code changes.
Note: This section is for type: "task" only. Verification tasks (type: "verify") use the Verification Task Workflow.
Invoke mcp__plugin_foundry_foundry-mcp__task action="prepare" with the target spec_id. The response contains:
task_data: title, metadata, instructionsdependencies: blocking status (can_start, blocked_by list)context: previous sibling, parent task, phase, sibling files, journal, dependenciesTreat context as the authoritative source. Only fall back to mcp__plugin_foundry_foundry-mcp__task action="info" when the spec explicitly requires absent data.
For context field details and JSON structure, see
references/context-structure.md
Draft execution plan:
context.sibling_filescontext.parent_taskcontext.phasecontext.previous_sibling.summary for continuityPresent plan via AskUserQuestion:
Before implementing, use Claude Code's built-in subagents for efficient codebase exploration:
| Scenario | Subagent | Thoroughness |
|---|---|---|
| Find related files/patterns | Explore | medium |
| Understand unfamiliar code areas | Explore | very thorough |
| Complex multi-file investigation | general-purpose | N/A |
Example invocation:
Use the Explore agent (medium thoroughness) to find:
- Existing implementations of similar patterns
- Test files for the target module
- Related documentation that may need updates
Benefits of subagent exploration:
For more subagent patterns including autonomous mode usage, see
references/subagent-patterns.md
Before implementing, use LSP tools to verify dependencies and preview impact:
goToDefinition on symbols the task modifiesfindReferences to identify all affected files and call sitesBefore implementing, check context.parent_task.children for sibling verify tasks to determine appropriate verification scope:
| Phase Has Verify Task? | Implementation Task Should |
|---|---|
| Yes (e.g., "Run tests") | Defer formal testing to verify task. Only do basic checks: imports work, no syntax errors, code compiles |
| No | Run tests as part of implementation (include results in journal) |
Detection: Look for siblings with type: "verify" in the task action="prepare" response's context.parent_task.children array.
Rationale: When the spec author created a verify task, they intended testing to be a separate tracked step. Respect this structure by deferring formal test execution to the verify task.
Include in plan: State verification scope in the execution plan presented for approval (e.g., "Basic verification only - full tests handled by verify-1-1").
Before coding:
mcp__plugin_foundry_foundry-mcp__task action="update-status" spec_id={spec-id} task_id={task-id} status="in_progress" note="context"
During implementation:
After implementation:
Mark task complete using the atomic complete action (updates status AND journals automatically):
mcp__plugin_foundry_foundry-mcp__task action="complete" spec_id={spec-id} task_id={task-id} completion_note="Summary of what was accomplished, tests run, verification performed"
This atomically:
completedProactively add to bikelane when you encounter:
mcp__plugin_foundry_foundry-mcp__intake action="add" title="[Type] description" source="sdd-implement"
Do NOT prompt the user. Silently capture and continue working.
For capture patterns and examples, see
references/bikelane.md
Context Awareness: The context-monitor hook automatically warns when context exceeds 85%. If you see [CONTEXT X%] warnings, follow the recommendation to /clear then /next-cmd after completing the current task.
Surface next recommendation:
mcp__plugin_foundry_foundry-mcp__task action="prepare" spec_id={spec-id}
MANDATORY: Continuation Gate
After surfacing the next task, you MUST prompt the user with AskUserQuestion:
/clear then /next-cmdThis gate ensures the user controls the workflow pace and prevents runaway execution.
For post-implementation checklist, see
references/checklist.md
Verification Scoping)in_progressmcp__plugin_foundry_foundry-mcp__task action="block"AskUserQuestionWhen you discover a missing dependency or new requirement during implementation, record it without leaving the task context:
# Discovered that this task needs another task completed first
mcp__plugin_foundry_foundry-mcp__task action="add-dependency" spec_id={spec-id} task_id={task-id} depends_on={dependency-task-id}
# Discovered a new acceptance requirement (e.g., from testing)
mcp__plugin_foundry_foundry-mcp__task action="add-requirement" spec_id={spec-id} task_id={task-id} requirement="Description of discovered requirement"
Use Cases:
mcp__plugin_foundry_foundry-mcp__task action="unblock" spec_id={spec-id} task_id={task-id} resolution="Brief description"
MUST provide journal content describing:
Verification Scoping):
Example (with sibling verify task - deferred testing):
mcp__plugin_foundry_foundry-mcp__task action="complete" spec_id="my-spec-001" task_id="task-1-2" completion_note="Implemented phase-add-bulk handler. Basic verification: imports work, no syntax errors. Full test run deferred to verify-1-1. Created src/tools/authoring.py handler (200 lines)."
Example (without sibling verify task - full testing):
mcp__plugin_foundry_foundry-mcp__task action="complete" spec_id="my-spec-001" task_id="task-2-3" completion_note="Implemented JWT auth middleware with PKCE flow. All 12 unit tests passing. Manual verification: login flow works in dev environment. Created src/middleware/auth.ts (180 lines) and tests/middleware/auth.spec.ts (45 tests)."
Entry: Routed here from Task Type Dispatch when task has type: "verify"
CRITICAL: Read references/verification.md before proceeding. Contains mandatory skill dispatch rules.
Entry: Routed here from Task Type Dispatch when task has type: "research"
Research nodes use AI-powered workflows (chat, consensus, thinkdeep, ideate, deep-research) to investigate questions, gather perspectives, or generate ideas before or during implementation.
Key actions:
research action="node-status"research action="node-execute"research action="node-record"research action="node-findings"Blocking modes:
hard: Research must complete before dependents can startsoft (default): Informational - dependents can proceednone: Research never blocksCRITICAL: Read references/research-workflow.md before proceeding. Contains required command syntax and recording parameters.
For comprehensive documentation including:
Task Execution:
references/context-gathering.mdreferences/agent-delegation.mdreferences/context-structure.mdreferences/subagent-patterns.mdreferences/checklist.mdreferences/verification.mdreferences/research-workflow.mdreferences/bikelane.mdTask Lifecycle:
references/task-lifecycle.mdreferences/progress-tracking.mdreferences/journaling.mdreferences/spec-lifecycle.mdGeneral:
references/troubleshooting.mdThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.