Help us improve
Share bugs, ideas, or general feedback.
From fortran-dev-pipeline
Strictly execute detailed implementation plans without modification or questioning. Use when the user says "/implementation-executor <plan-path>", "execute the plan in <file>", "implement according to <plan>", "follow the implementation plan", or mentions running a PHASE implementation plan. This skill mechanically follows structured plans with TASK-N sections and validation commands. ALWAYS use this skill when a plan file path is given — never attempt inline execution.
npx claudepluginhub tonywu20/my-claude-marketplace --plugin fortran-dev-pipelineHow this skill is triggered — by the user, by Claude, or both
Slash command
/fortran-dev-pipeline:implementation-executorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Quick-start checklist** (read before doing anything else):
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Share bugs, ideas, or general feedback.
Quick-start checklist (read before doing anything else):
- Read the plan file first, then check for a checkpoint file (see Checkpoint / Resume). If found, skip completed tasks — but still delegate every remaining task to a subagent. Do NOT execute tasks inline.
- For every task: use
subagent_type: "fortran-dev-pipeline:implementation-executor"in the Agent call — never the default agent.- After all tasks: write the execution report to
execution_reports/.- After the report: create a git commit with all modified files.
You are executing a detailed implementation plan. Your role is strictly mechanical: read the plan, execute each task exactly as specified, validate, and commit. Do not question, interpret, or modify anything.
The user will invoke this as /implementation-executor <plan-path>. Read that plan file, then launch the implementation-executor agent to work through it task by task.
Implementation plans are TOML files following the compilable-plan-spec:
[meta]
title = "Phase X.Y: <Phase Name>"
source_branch = "branch-name"
created = "YYYY-MM-DD"
[dependencies]
# task_id = ["dep1", "dep2"] — omit if all tasks are independent
# TASK-3 = ["TASK-1", "TASK-2"] — TASK-3 depends on 1 and 2
[tasks.TASK-1]
description = "Task description"
type = "replace" # "replace" | "create" | "delete"
acceptance = [
"gfortran -c -Wall src/module.f90",
"make test",
]
[[tasks.TASK-1.changes]]
file = "path/to/file.f90"
before = '''
exact content to match
'''
after = '''
replacement content
'''
[tasks.TASK-2]
description = "Create new file"
type = "create"
acceptance = ["test -f path/to/new_module.f90"]
[[tasks.TASK-2.changes]]
file = "path/to/new_module.f90"
after = '''
file content here
'''
Before making any code changes, leverage LSP tools for understanding and validation:
Key LSP workflows:
LSP hover, LSP definition, LSP references to understand what existsLSP documentSymbol to locate subroutines/modules/types before editingLSP diagnostics to check for errors immediately after editsLSP rename for symbol renames, LSP references to find all usagesThis approach catches issues faster and produces more reliable code than edit-then-compile cycles.
documentSymbol or Grep for a unique surrounding string to find the current location. Never rely on a line number from the plan document.Before launching any task agents, the orchestrator must ensure compiled scripts are available:
<plan-dir>/compiled/manifest.json (sibling to the plan file).compiled/ directory or manifest.json does not exist, run the /compile-plan skill on the plan file first to generate them. This always succeeds with full task coverage.manifest.json exists, read it. Every task will have a compiled script at compiled/<TASK-ID>.sh.This ensures compiled scripts are always available before any task agent is launched.
This plugin includes a shared scripts/task-sidecar.sh (at the plugin root) for enumerating tasks and preparing verification sidecars. It reads from the compiled manifest.json — the single source of truth for task IDs, descriptions, and acceptance commands.
# List all task IDs from the compiled manifest
bash <plugin-root>/scripts/task-sidecar.sh list <plan-dir>/compiled/manifest.json
# Create sidecar file for hook-automated verification
bash <plugin-root>/scripts/task-sidecar.sh prepare <plan-dir>/compiled/manifest.json <TASK-ID>
Resolve <plugin-root> before running any sidecar command. Run the following command once and record the printed path — use it as the literal value everywhere <plugin-root> appears in this section:
python3 -c "
import json; from pathlib import Path
p = Path.home() / '.claude/plugins/installed_plugins.json'
data = json.loads(p.read_text())
for key in ['fortran-dev-pipeline@my-claude-marketplace', 'fortran-dev-pipeline@local']:
if key in data['plugins']:
print(data['plugins'][key][0]['installPath']); break
"
If the command prints nothing, the plugin is not registered — stop immediately and report: "Plugin root could not be resolved from installed_plugins.json." Do not guess or construct the path manually.
CRITICAL: The orchestrator must NOT run the compiled scripts or prepare commands itself. These are executed by the delegated implementation-executor subagent. The orchestrator only constructs the prompt template and launches the agent.
When launching an implementation-executor agent for a task, you must use subagent_type: "fortran-dev-pipeline:implementation-executor" in the Agent tool call — never use the default general-purpose agent. Using the wrong agent type means the coding standards and quality gates defined in the implementation-executor agent definition will not be applied.
Use this template as the prompt body:
You are executing {TASK_ID} from the plan document at {PLAN_PATH}.
Step 1: Write the verification sidecar for the post-task hook by running:
bash {SCRIPT_PATH} prepare "{MANIFEST_PATH}" {TASK_ID}
This writes acceptance criteria so the SubagentStop hook can verify your work
automatically. Do this BEFORE making any code changes.
Step 2: Run the compiled script:
bash {COMPILED_SCRIPT_PATH}
IMPORTANT: A PostToolUse hook will automatically stop you after this
command completes. You do NOT need to do anything else — no validation,
no LSP checks, no summary. The SubagentStop hook handles verification,
checkpointing, and committing. Just run the script and stop.
If the Bash tool reports a non-zero exit code, that information is
captured automatically. Do NOT attempt manual implementation — compiled
scripts are the only execution path.
Replace:
{TASK_ID} — the task identifier (e.g., TASK-3){PLAN_PATH} — absolute path to the plan document{SCRIPT_PATH} — absolute path to the plugin's scripts/task-sidecar.sh{MANIFEST_PATH} — absolute path to <plan-dir>/compiled/manifest.json{COMPILED_SCRIPT_PATH} — absolute path to the compiled .sh script for this task, constructed as <plan-dir>/compiled/<TASK-ID>.sh (e.g., plans/phase-4/compiled/TASK-3.sh). The compiled/ directory is a sibling of the plan file, generated by /compile-plan.Critical: The Agent tool call must always include
subagent_type: "fortran-dev-pipeline:implementation-executor"andname: "{TASK_ID}". Thenamefield makes the agent addressable via SendMessage and is used by the SubagentStop hook to locate the correct sidecar. Example skeleton:Agent({ subagent_type: "fortran-dev-pipeline:implementation-executor", name: "{TASK_ID}", description: "Execute TASK-3: add INTENT declarations to density_mix subroutine", prompt: "<filled template above>" })
Before doing anything else, check for a checkpoint file:
execution_reports/.checkpoint_<plan-slug>.json
where <plan-slug> is the plan filename without extension (e.g. phase-4.1 for phase-4.1.toml).
If the checkpoint exists, read it:
{
"plan": "<plan-path>",
"base_commit": "a1b2c3d4e5f6789...",
"completed": ["TASK-1", "TASK-2"],
"failed": [],
"blocked": []
}
Note in your execution report: "Resuming from checkpoint — TASK-1, TASK-2 already completed. Starting from TASK-3." Then immediately proceed to Execution Workflow below, skipping tasks in completed/failed/blocked. Do NOT stop or wait for user input — every task must be delegated to an implementation-executor subagent via the Agent tool (subagent_type: "fortran-dev-pipeline:implementation-executor"), exactly as described in the Execution Workflow.
If no checkpoint exists, start fresh. Proceed immediately to Execution Workflow step 1 — do not stop.
During execution: after each task passes validation, immediately update the checkpoint by adding the task ID to completed (or failed/blocked as appropriate). This ensures a crash or interruption at any point can be resumed from the last successful task.
On full completion (all tasks done, report written, commit created): delete the checkpoint file.
Parse the plan:
<plugin-root> using the command in the "Task Sidecar Script" section above, then run bash <plugin-root>/scripts/task-sidecar.sh list <plan-dir>/compiled/manifest.json to enumerate all task IDs[dependencies] table in the TOML plan to determine the execution order. Tasks without dependencies can run first; dependent tasks run after their prerequisites complete. If no [dependencies] section exists, fall back to ascending ID order.acceptance arrays from the tasks for final verificationCompile the plan (produces deterministic scripts for each task):
compiled/manifest.json in the same directory as the plan file/compile-plan <plan-path>, then read the resulting manifestcompiled/manifest.json. Every task has a pre-compiled shell script at compiled/<TASK-ID>.sh that applies changes deterministically via sd -FExecute tasks sequentially — one at a time:
implementation-executor agent via the Agent tool with subagent_type: "fortran-dev-pipeline:implementation-executor". This is mandatory — do NOT omit subagent_type and do NOT use the default general-purpose agent. The implementation-executor agent carries the coding standards and quality gates; a general-purpose agent will ignore them.[dependencies] table or an "Execution Order" section, treat that order as mandatory. Do NOT start TASK-N+1 until TASK-N has passed validation. A prerequisite task that fails validation is a hard blocker — do not proceed past it to any task that depends on it.implementation-executor agent call with the full list of sub-steps. Never split sub-steps across separate agent calls.implementation-executor agent using the Agent Prompt Template above. Set subagent_type: "fortran-dev-pipeline:implementation-executor", pass the script path, plan path, task ID, and compiled script path (<plan-dir>/compiled/<TASK-ID>.sh). Do NOT copy task content into the prompt; the agent runs the compiled script directly.reason field with ground-truth verification results — trust the hook's output over the subagent's claim of success/failure.before content for each [[changes]] entry in the failing taskbefore block, grep the target file for a distinctive substring (first non-whitespace line, ~40 chars)before block doesn't match → prior tasks shifted the content. Note the actual surrounding context in the retry prompt so the agent can adapt.after content is already present in the file → the change was applied but a later step failed. Skip this change entry in the retry.after not present → fundamental mismatch. Flag for manual review.implementation-executor agent (same subagent_type) to retry, with diagnostic context appended to the prompt (up to 3 attempts total)[dependencies]) MAY be launched in parallel — the sidecar mechanism uses per-task filenames (current_task_{TASK_ID}.json) so concurrent subagents do not conflict. Tasks with declared dependencies must remain sequential.Run global verification and lint sweep:
acceptance commands from the plan (deduplicated)make FFLAGS="-Wall -Wextra" 2>&1 or fpm build --flag "-Wall -Wextra" 2>&1Finalize the execution report:
execution_reports/execution_<plan-slug>_<date>.mdClean up:
execution_reports/.checkpoint_<plan-slug>.json) on full completionYou should pass these to implementation-executor agent every time you assign the task.
For each task:
acceptance arraygfortran -c -Wall <file>.f90 or project build command must succeedLSP validation workflow:
LSP diagnostics for the modified fileLSP hover to verify subroutine signatures match expectationsLSP references to ensure refactorings didn't break call sitesGlobal verification:
acceptance commands# Execution Report: <Phase Name>
**Plan**: <path-to-plan-file>
**Started**: <ISO 8601 timestamp>
**Completed**: <ISO 8601 timestamp>
**Status**: <All Passed | Partial Success | Failed>
## Task Results
### TASK-1: <description>
- **Status**: ✓ Passed
- **Attempts**: 1
- **Files modified**: <list>
- **Validation output**:
<stdout/stderr from acceptance checks>
### TASK-2: <description>
- **Status**: ✗ Failed
- **Attempts**: 3
- **Files modified**: <list>
- **Validation output**:
<stdout/stderr from last attempt>
- **Error**: <error message>
## Global Verification
```bash
<commands run>
Output:
<stdout/stderr>
Result: <Passed | Failed>
## Commit Message Format
**All tasks pass**:
feat(phase-X.Y):
All tasks completed successfully. See execution_reports/execution_phase-X.Y_.md
**Some tasks fail**:
feat(phase-X.Y): partial implementation of
✓ TASK-1: ✓ TASK-2: ✗ TASK-3: (failed after 3 attempts - )
See execution_reports/execution_phase-X.Y_.md for details.
## Rules
- **Always use the task sidecar script for sidecar preparation** — run `scripts/task-sidecar.sh prepare` before each task to write the verification sidecar. The compiled script handles all code changes.
- **Use the task sidecar script for enumeration** — at the start, run `scripts/task-sidecar.sh list` to discover all task IDs from the manifest rather than parsing the document yourself.
- **Compiled scripts are the only execution path** — never attempt manual code changes based on task descriptions. If the compiled script fails, report the error and retry; do not fall back to LLM-interpreted edits.
- **Use LSP tools first** — before editing code, use LSP to understand structure; after editing, check LSP diagnostics before compiling
- **Do not ask questions** — if something is ambiguous, make the most conservative interpretation and proceed
- **Do not modify task instructions** — execute exactly what the plan specifies, nothing more
- **Do not add improvements** — no refactoring, no "while I'm here" changes, no extra features
- **Do not skip tasks** — even if a task seems redundant or already done, execute and validate it
- **Complete one task fully before moving to the next** — including all retry attempts
- **Respect declared execution order** — if the plan specifies an order, that order is mandatory. Validation must pass for each task before its dependents begin. A failed task is a hard blocker for all tasks that depend on it.
- **Multi-part tasks are a single atomic unit** — if a task contains labelled sub-steps (a/b/c… or Change 1/2/3…), all sub-steps go to one `implementation-executor` agent call. Never split them across separate agents. Partial application leaves the codebase in a broken intermediate state.
- **A failed prerequisite blocks dependents** — if TASK-N fails after 3 attempts and TASK-M depends on TASK-N, mark TASK-M as "Blocked (TASK-N failed)" in the report without attempting it.
- **If a task is already done** (e.g., INTENT already added, file already exists with correct content): note it briefly in the report, mark as passed, continue
- **Use conservative interpretation** — when in doubt, do the minimal thing that satisfies the task description
- **Ignore line numbers as addresses** — plan documents may reference `file.f90:42`; treat the number as a hint only. Before each edit, re-locate the target using LSP `documentSymbol`, `definition`, or `Grep` for unique surrounding context. This is mandatory for every edit in a multi-edit task.
- **Stage untracked files** — if a task creates new files, stage them for commit
- **Use modern tools** — `fd` instead of `find`, `rg` instead of `grep`
- **Prefer LSP for refactoring** — use LSP rename for symbol changes, not manual find-replace
## Error Handling
- **Plan file doesn't exist**: Error immediately with clear message, do not proceed
- **Plan structure malformed** (no `[tasks.*]` sections): Error with explanation, do not proceed
- **Task validation fails**: Log failure, retry up to 3 times, then mark as failed and continue
- **Global verification fails**: Note in report, include in commit message, but still commit
- **Git commit fails**: Report error to user, do not retry