Skip to content

Convert execute command into an implementer skill using Haiku 4.5 #147

@maciejmalecki

Description

@maciejmalecki

Summary

Convert the existing execute command (currently backed by two legacy prompt files in .ai/backup/) into a proper Claude Code skill at .claude/skills/execute/SKILL.md, following the same governance model established by the plan skill (see MET-0002). The skill must always run under the claude-haiku-4-5-20251001 model to keep execution cost-effective.

Motivation

The plan/planner refactor (issue #146, MET-0002) split planning from mechanical file I/O. Execution is the natural next step in the same pattern:

  • The current execute logic lives in .ai/backup/execute.md and .ai/backup/h-execute.md — unregistered, undiscoverable, and not governed
  • There is no dedicated implementer skill; today execution is ad-hoc
  • Haiku 4.5 is the right model for execution: it follows a well-defined plan step-by-step and does not need the reasoning depth of Sonnet. Using it keeps costs low for long implementation runs.

Proposed Design

Skill file

.claude/skills/execute/SKILL.md

The skill is registered in .claude/settings.json (if needed for model pinning) and listed in the skills index.

Model

The skill must specify model: claude-haiku-4-5-20251001 in its frontmatter (or equivalent harness configuration) so every invocation uses Haiku 4.5 regardless of the caller's active model.

Behaviour (carry over from existing execute command, adapted for plans/)

  1. Locate the plan — scan plans/ first (new storage), fall back to .ai/ for legacy plans. Auto-suggest based on current branch name. Ask user to confirm.
  2. Read and summarise — parse phases and steps; show completion status (pending / completed / blocked / skipped).
  3. Determine scope — accept "all", a phase ("Phase 1"), specific steps ("1.1, 2.3"), or a range ("1.1–2.3").
  4. Determine interaction mode — interactive (confirm after each step), batch (confirm after each phase), or autonomous (no interruptions).
  5. Execute — for each step in scope: display step details, implement changes (Bash, Read, Edit, Write, etc.), run specified tests, mark status.
  6. Handle blockers — document, ask user: retry / skip / modify approach.
  7. Update the plan — delegate to the plan skill (OPERATION: UPDATE) to mark steps completed/skipped/blocked and add a revision history entry.
  8. Sync GitHub issue — the plan skill handles issue body sync automatically.
  9. Summarise — list completed, skipped, and blocked steps; suggest next action.

Architecture rules to enforce during execution

  • Hexagonal Architecture (domain ← ports ← adapters)
  • New modules added as compileOnly in infra/gradle
  • Parallel execution via Gradle Workers API only
  • Tests run with ./gradlew test after significant changes
  • Commit message guidelines from CLAUDE.md

Asset governance

Creating .claude/skills/execute/SKILL.md triggers the meta-log skill before any file is written.

Acceptance Criteria

  • .claude/skills/execute/SKILL.md exists and is discoverable as a user-invocable skill
  • Skill frontmatter pins the model to claude-haiku-4-5-20251011 (Haiku 4.5)
  • Plan lookup searches plans/ first, then .ai/ as legacy fallback
  • Scope selection supports all / phase / step / range inputs
  • Interaction modes: interactive, batch, autonomous
  • Completed steps are marked via the plan skill (not by writing the plan file directly)
  • Blockers are documented and surface a user decision prompt
  • Architecture rules from CLAUDE.md are enforced as execution guardrails
  • meta-log entry written before the skill file is created
  • Legacy files in .ai/backup/ are left in place (not deleted)

Notes

  • The skill replaces the .ai/backup/execute.md and .ai/backup/h-execute.md prompt files functionally — do not delete them, they are historical artifacts
  • The implementer agent (.claude/agents/implementer.md) already exists; check whether this skill should complement or replace it — if the agent already covers execution, consider whether the skill should simply wrap/invoke it with Haiku pinned
  • See MET-0002 (meta/MET-0002_add-plan-skill-refactor-planner.md) for the governance pattern this issue follows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions