Help us improve
Share bugs, ideas, or general feedback.
From fortran-dev-pipeline
Orchestrates a multi-agent pipeline to produce a detailed, reviewed, executor-ready TOML implementation plan from a high-level plan document. Use this skill when the user asks to "enrich the plan", "elaborate the next implementation plan", "prepare the TOML plan", "break down the plan into tasks", or wants to turn a high-level plan file into a concrete, executor-ready task breakdown. Run after /plan-review has approved the plan.
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:enrich-phase-planThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Takes an approved high-level plan document and produces a detailed, executor-ready TOML implementation plan by running a pipeline of specialized agents over it.
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.
Takes an approved high-level plan document and produces a detailed, executor-ready TOML implementation plan by running a pipeline of specialized agents over it.
fortran-architect (elaborate)
↓
plan-decomposer (break down into TOML)
↓
impl-plan-reviewer (review)
↓ [loop if Needs More Detail]
plan-decomposer (revise)
↓
dry-run compile (validate)
↓ [loop if fails, max 2]
fortran-architect (final review)
Ask the user for the path to the existing plan file if not already provided. Read it before proceeding.
Deferred improvements: Search for deferred improvement files from prior phases:
fd deferred.md notes/pr-reviews/
If any are found, read them and include their contents in the fortran-architect elaboration prompt (Step 2) as additional context. This gives the architect visibility into improvements that were explicitly deferred — some may now be relevant to include.
Cross-round failure patterns: Search for fix plans from prior phases:
fd fix-plan.toml notes/pr-reviews/ | head -3
If any are found, read them and extract recurring issue categories. Look for patterns such as:
use ModuleName statements (module wiring)public :: declarations for symbols needed by other modulesused)use statements after refactoringSummarize the recurring categories as KNOWN_FAILURE_MODES. These will be passed to the plan-decomposer in Step 3 as proactive checks.
If no fix plans or deferred files exist, proceed without this context.
Invoke the fortran-dev-pipeline:fortran-architect agent with this prompt:
You are reviewing the following implementation plan for the NEXT phase of work on a Fortran scientific codebase.
<plan>
{{PLAN_FILE_CONTENTS}}
</plan>
<deferred_improvements>
{{DEFERRED_CONTENTS — or "None" if no deferred.md files were found}}
</deferred_improvements>
Your job:
1. Identify what the next phase is trying to achieve.
2. Elaborate on implementation details that are underspecified — concrete subroutine signatures, INTENT declarations, MODULE locations, KIND parameters, error handling strategy (IOSTAT/STAT patterns).
3. Call out architectural cautions: numerical stability pitfalls, interface mismatches, module boundary violations, API surface decisions that are hard to reverse, places where the plan may conflict with Fortran idioms or the project's established patterns.
4. **Use LSP tools** to understand the current codebase state:
- Use `LSP documentSymbol` to locate existing modules/subroutines mentioned in the plan
- Use `LSP hover` to verify current subroutine signatures before proposing changes
- Use `LSP references` to understand how existing subroutines are called
- Use `LSP definition` to navigate to type/interface definitions
- Check `LSP diagnostics` to identify any existing issues that might affect the plan
5. Do NOT decompose into tasks. Output a single enriched narrative that a plan-decomposer agent can use as input.
Capture the output as ELABORATED_PLAN.
Invoke the fortran-dev-pipeline:plan-decomposer agent with this prompt:
Break down the following elaborated implementation plan into minimum-viable, SRP-aligned subtasks for a Fortran implementation-executor agent.
<elaborated_plan>
{{ELABORATED_PLAN}}
</elaborated_plan>
<known_failure_modes>
{{KNOWN_FAILURE_MODES — or "None" if no fix-plan.toml files were found}}
</known_failure_modes>
**Proactive failure prevention**: Review the known failure modes above. For each task in your decomposition, verify that it does not repeat any of these patterns. Pay special attention to module wiring (`use` statements) and consumer-side updates.
**Output format**: The plan MUST be a TOML file following the compilable-plan-spec so it can be compiled into deterministic `sd`-based scripts. Use this exact structure:
```toml
[meta]
title = "Phase X.Y: <Phase Name>"
source_branch = "<branch>"
created = "<YYYY-MM-DD>"
[dependencies]
# task_id = ["dep1", "dep2"] — omit section if all tasks are independent
[tasks.TASK-N]
description = "Short description"
type = "replace" # "replace" | "create" | "delete"
acceptance = [
"gfortran -c -Wall src/module.f90",
"make test",
]
[[tasks.TASK-N.changes]]
file = "relative/path/from/root.f90"
before = '''
exact content copied verbatim from the source file — no paraphrasing, no elision with `...`
'''
after = '''
exact replacement content
'''
Rules for before/after blocks (critical for automated application):
Read tool or git show. Whitespace must match exactly.replace).[[tasks.TASK-N.changes]] entries, each with its own file, before, and after.''') for code content. If code contains ''', use """ with escaping.TASK-N.Additional guidance:
[dependencies] table
Capture the output as `DECOMPOSED_PLAN`.
## Step 4 — impl-plan-reviewer loop
Invoke the `fortran-dev-pipeline:impl-plan-reviewer` agent with this prompt:
Review the following decomposed implementation plan. For each task, report whether it is CLEAR, UNCLEAR, or BLOCKED. End with your overall verdict.
<decomposed_plan> {{DECOMPOSED_PLAN}} </decomposed_plan>
- If the verdict is **Ready to Implement**: proceed to Step 4.5.
- If the verdict is **Needs More Detail**: collect the flagged issues, then re-invoke `fortran-dev-pipeline:plan-decomposer` with the original decomposed plan plus the reviewer's feedback, asking it to revise only the flagged tasks. Repeat this loop (max 3 iterations). If still not passing after 3 iterations, surface the remaining issues to the user and ask how to proceed.
## Step 4.5 — Dry-run compilation
After the reviewer approves the decomposed plan, validate that the plan's combined changes produce a compilable project before the final architect review:
1. **Create a temporary worktree**:
```bash
git worktree add /tmp/plan-dryrun-$(date +%s) HEAD
Apply all changes from the TOML plan to the worktree. For each task (in dependency order), for each [[changes]] entry:
type = "create": write the after content to the target filetype = "replace": use sd -F to replace before with after in the target filetype = "delete": use sd -F to remove before from the target fileRun project-wide compilation in the worktree:
make 2>&1 || fpm build 2>&1
Always clean up the worktree (even on failure):
git worktree remove --force /tmp/plan-dryrun-*
If compilation succeeds: proceed to Step 5.
If compilation fails: feed the error output back to the fortran-dev-pipeline:plan-decomposer agent with this prompt:
The decomposed plan failed dry-run compilation. Here are the errors:
<compilation_errors>
{{BUILD_OUTPUT}}
</compilation_errors>
Revise ONLY the tasks that caused these errors. Common causes:
- Missing `use ModuleName` statement for a new module
- Missing `public ::` declaration for a symbol needed by another module
- Stale `use` path after a prior task moved or renamed a symbol
- Interface mismatch from a changed subroutine signature
Return the full revised TOML plan.
Update DECOMPOSED_PLAN with the revision and repeat the dry-run (max 2 revision iterations). If still failing after 2 iterations, present the compilation errors to the user and ask how to proceed.
Invoke the fortran-dev-pipeline:fortran-architect agent with this prompt:
You performed an architectural elaboration earlier. Now review the final decomposed plan below to ensure it has not drifted from the architectural intent.
<original_elaboration>
{{ELABORATED_PLAN}}
</original_elaboration>
<final_decomposed_plan>
{{DECOMPOSED_PLAN}}
</final_decomposed_plan>
Flag any tasks that:
- Contradict the architectural cautions you raised (numerical stability, interface mismatches, module boundary violations)
- Introduce scope creep beyond the next phase
- Are missing from the elaboration but implied by it
- Have acceptance criteria that would not actually verify correctness (e.g., compiler accepts it but algorithm is wrong)
End with: APPROVED or NEEDS REVISION (with specific items to fix).
If APPROVED: present the final plan to the user. If NEEDS REVISION: apply the architect's corrections to the decomposed plan and present both the corrections and the final plan to the user.
Present the final plan as the primary output. Include a brief summary of: