Get the FREE Ultimate OpenClaw Setup Guide →

implement-plan

npx machina-cli add skill mkrtchian/spec-driven-dev/implement-plan --openclaw
Files (1)
SKILL.md
4.0 KB

Objective

Execute a reviewed plan through its implementation steps. Each step gets a dedicated implementer agent, followed by a step hardener that verifies completeness and fixes emergent issues. After all steps, a standards review and final review close the loop.

Context

Plan file: $ARGUMENTS

If no argument provided, use AskUserQuestion to ask: "Which plan file should I implement?" with a hint to provide the path.

0. Validate

Read the plan file at $ARGUMENTS. If it doesn't exist, error and stop.

Check that the plan has an ## Implementation steps section. If not, tell the user: "This plan has no implementation steps. Run /write-plan first, or add an ## Implementation steps section manually."

Record the current git HEAD before any changes:

BASELINE_SHA=$(git rev-parse HEAD)

Parse the implementation steps from the plan. Each step starts with ### Step N: or **Step N:.

1. Execute steps

For each step in order:

1a. Implement (fresh sub-agent)

Display:

--- Step N: [step title] ---
Spawning implementer...

Spawn a sub-agent:

Task(
  subagent_type="spec-driven-dev:sdd-implementer",
  model="opus",
  description="Implement step N",
  prompt="
    ## Step to implement

    {content of step N from the plan}

    ## Full plan context

    {content of the plan file, for reference — but focus on the step above}
  "
)

If the implementer reports FAIL on verification: present to user, ask how to proceed.

1b. Step hardening (fresh sub-agent)

Display:

--- Step N: Hardening ---
Verifying and fixing if needed...

Spawn a sub-agent:

Task(
  subagent_type="spec-driven-dev:sdd-step-hardener",
  model="opus",
  description="Harden step N",
  prompt="
    ## Step that was supposed to be implemented

    {content of step N from the plan}

    ## Plan file path

    $ARGUMENTS
  "
)

Handle the result:

  • STEP COMMITTED: Continue to next step.
  • STEP COMMITTED WITH FIXES: Note the fixes applied, continue to next step.
  • ISSUES FOUND: No commit was made. Present the issues to the user. Ask: "Fix these issues, skip them, or stop implementation?"
    • If fix: spawn another implementer to address the issues, then re-harden
    • If skip: the orchestrator commits as-is, then continue to next step
    • If stop: go directly to the summary

Record the step result (committed / committed with fixes / issues found + action taken).

2. Standards enforcement (fresh sub-agent)

Display:

--- Standards Enforcement ---
Checking all changes against project coding standards...

Get the full diff since baseline:

CHANGED_FILES=$(git diff $BASELINE_SHA..HEAD --name-only)

Spawn a sub-agent:

Task(
  subagent_type="spec-driven-dev:sdd-standards-enforcer",
  model="opus",
  description="Enforce standards compliance",
  prompt="
    These files were modified since baseline ($BASELINE_SHA):
    $CHANGED_FILES
  "
)

Handle the result:

  • STANDARDS COMPLIANT: Continue.
  • STANDARDS ENFORCED: Note the fixes applied, continue.
  • ISSUES FOUND: Present the issues to the user and ask how to proceed.

3. Final review (fresh sub-agent)

Display:

--- Final Review ---
Reviewing implementation against the full plan...

Spawn a sub-agent:

Task(
  subagent_type="spec-driven-dev:sdd-final-reviewer",
  model="opus",
  description="Final implementation review",
  prompt="
    Plan file: $ARGUMENTS
    Baseline: $BASELINE_SHA
  "
)

4. Summary

Display:

--- Implementation Complete ---

Plan: $ARGUMENTS

Steps:
  Step 1: [title] — [committed / committed with N fixes / issues: action taken]
  Step 2: [title] — [committed / committed with N fixes / issues: action taken]
  ...

Standards enforcement: [COMPLIANT / N fixes applied]

Commits: (list all commits from $BASELINE_SHA to HEAD with hash and message)

Final review remarks:
[remarks from the final review agent]

Source

git clone https://github.com/mkrtchian/spec-driven-dev/blob/main/skills/implement-plan/SKILL.mdView on GitHub

Overview

This skill executes a reviewed plan by iterating through each implementation step with a dedicated implementer sub-agent, followed by a step hardener, a standards-enforcement pass, and a final review. It records outcomes and ensures changes meet project standards before closing the loop.

How This Skill Works

Given a plan file path, the system validates presence and the 'Implementation steps' section, records the baseline git HEAD, then processes each step in order, spawning an implementer sub-agent to perform the work and a subsequent step-hardener to verify, fix, or report issues. After all steps, it runs a standards-enforcer against the diff since baseline and finishes with a final reviewer before producing a summary.

When to Use It

  • You have a validated plan file and need its steps executed in order with verification.
  • You require a traceable change process with per-step accountability and clear outcomes.
  • You need standards-compliant changes checked against the repository baseline before finalization.
  • You want a final review that confirms alignment with the full plan across all steps.
  • You seek a structured summary of per-step outcomes and overall standards status.

Quick Start

  1. Step 1: Provide the plan file path as the argument (e.g., /path/to/plan.md).
  2. Step 2: System validates plan, captures BASELINE_SHA, and parses '## Implementation steps'.
  3. Step 3: Execution proceeds through each step, with per-step implementer, hardener, standards check, and final summary.

Best Practices

  • Ensure the plan includes an explicit '## Implementation steps' section before execution.
  • Record BASELINE_SHA (git rev-parse HEAD) before applying changes and until completion.
  • Review each step's result before proceeding to the next to maintain correctness.
  • Audit the diff after all steps with the standards enforcer to ensure compliance.
  • Keep detailed logs of actions, outcomes, and any issues found with proposed resolutions.

Example Use Cases

  • Plan to add an authentication module with 3 steps: implement, harden, and validate, followed by standards check and final review.
  • Refactoring a component library where Step 1 creates changes, Step 2 fixes edge cases, Step 3 runs standards enforcement, and a final review closes the task.
  • Plan-driven migration of a feature set using per-step implementers and hardeners, ensuring each step is committed or clearly marked as needing fixes.
  • Security-related plan where the implementer introduces changes, the hardener verifies vulnerability coverage, and the standards enforcer checks for coding standard compliance.
  • UI overhaul plan implemented step-by-step, with a final review comparing the full plan to the resulting codebase and documenting any deviations.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers