Run Prompt
Execute a prompt from .prompts/.
Target: $ARGUMENTS
Steps
- •
Read project guidelines
- •
CLAUDE.md(required if exists)
- •
- •
Resolve target
Input Resolves To (empty) Ask user to choose from available prompts. If no .prompts/directory exists, say: "No prompts found. Create one with/create-promptor/create-meta-prompt."3,03, or003(bare numbers — zero-padded to 3 digits).prompts/003-*.mdauth(substring match).prompts/*auth*.mdor.prompts/auth-*/prompt.mdauth-research.prompts/auth-research/prompt.mdFull path (exists) Use directly Full path (doesn't exist) Report: "File not found at {path}. Check the path and try again." If multiple matches (including numeric collisions like
003-foo.mdand003-bar.md), list and ask user to choose. When both file matches (.prompts/*auth*.md) and directory matches (.prompts/auth-*/prompt.md) exist, list all matches and ask the user to choose.When resolving targets, exclude
.progress.mdfiles from matches — these are progress tracking files, not prompts.If no prompts match the target, say: "No prompt matching
{target}found in.prompts/. Available prompts: [list]. Or create one with/create-promptor/create-meta-prompt." - •
Read the prompt and execute
Execution by Prompt Type
Task Prompts (.prompts/NNN-name.md)
Task prompts contain checkpoints as numbered subsections under ## Checkpoints (see the template in /create-prompt). Execute each checkpoint using the checkpoint workflow:
- •Implement checkpoint (code + tests)
- •Stop, report what was done
- •Wait for user: review, compile, test
- •User confirms: clean compile, tests pass, committed
- •Proceed to next checkpoint
Research Prompts (.prompts/{slug}-research/prompt.md)
Research prompts are single-pass (no checkpoint workflow, no progress tracking):
- •Read the prompt
- •Explore the codebase (read files, search for patterns)
- •Answer the research questions
- •Write findings to
.prompts/{slug}-research/research.mdwith metadata block (Status, Dependencies, Open Questions, Assumptions) - •Report: "Research complete. Written to
.prompts/{slug}-research/research.md. Run/create-meta-prompt [task](use the same task description) to generate the plan phase."
Plan Prompts (.prompts/{slug}-plan/prompt.md)
First run (no plan.md exists):
- •Read research.md (always present for plans created via
/create-meta-prompt; may be absent for manually created plan prompts). If the prompt references research.md but the file doesn't exist, inform the user: "This plan references research at.prompts/{slug}-research/research.mdwhich doesn't exist. Run/create-meta-prompt [task]to create and execute the research phase first." - •Design checkpoints per the prompt instructions
- •Write
.prompts/{slug}-plan/plan.mdwith metadata block - •Report: "Plan created. Run
/run-prompt {slug}-planagain to implement."
Second run (plan.md exists):
- •Read plan.md. If plan.md exists but is empty or contains no checkpoints, treat it as a first run (regenerate the plan).
- •Check the metadata Status field — if
failed, ask user whether to regenerate the plan. Ifpartial, inform the user and ask whether to proceed or re-run the plan phase. - •Execute checkpoints using the checkpoint workflow
- •After each checkpoint: stop, report, wait for user confirmation
- •After all checkpoints: "Implementation complete."
Checkpoint Workflow (CRITICAL)
For implementation work, execute ONE CHECKPOINT AT A TIME:
1. Check for existing progress.md - skip completed checkpoints 2. Implement checkpoint (code + unit tests for this checkpoint's code) - Unit tests are written IN the same checkpoint as the code they test - Never defer tests to a later checkpoint 3. Stop and report: - What was implemented - Files created/modified - Tests added 4. Ask user to review, compile, run tests - ALL tests (existing + new) must pass before proceeding 5. Wait for user to report results 6. Address any feedback 7. User confirms: compiles, ALL tests pass, committed 8. Update progress.md with completed checkpoint 9. Only then proceed to next checkpoint
Never batch. Never skip review. Never proceed without confirmation. Never leave tests for a later checkpoint.
Exception: a checkpoint that is purely non-code work (documentation, configuration) does not need unit tests.
Progress Tracking
Track progress in:
- •Task prompts:
.prompts/NNN-name.progress.md - •Plan prompts:
.prompts/{slug}-plan/progress.md
Before starting, check if progress.md exists:
- •If yes, read it. If all checkpoints are already marked complete, report: "All checkpoints already complete. Nothing to do. Progress: .prompts/[path]/progress.md" and stop. Otherwise, resume from first incomplete checkpoint.
- •If no, create it with all checkpoints marked pending
Also check the metadata Status field in plan.md or research.md (if applicable). If Status is partial or failed, inform the user and ask whether to proceed with the current plan or re-run the previous phase first. If research findings are insufficient to create a meaningful plan, recommend re-running research with refined questions rather than proceeding. If plan.md has Status failed, ask the user if they want to regenerate the plan (treat as a first run).
If progress.md is inconsistent with the plan (e.g., references checkpoints that don't exist, or shows out-of-order completion), report the inconsistency and ask the user how to proceed.
After user confirms each checkpoint, update progress.md:
# Progress - [x] Checkpoint 1: [description] - Files: [list of files modified] - Tests: [list of tests added] - Committed: [yes/hash] - [ ] Checkpoint 2: [description] - (pending)
Reporting
After checkpoint:
Checkpoint N of M complete: - Implemented: [summary] - Files: [list] - Tests: [list] Please review, compile, and run tests. Let me know the results.
After user confirms:
Checkpoint N confirmed. Progress saved. Proceeding to checkpoint N+1.
When resuming:
Found existing progress: checkpoints 1-2 complete. Resuming from checkpoint 3.
After all done:
All checkpoints complete. Implementation finished. Progress: .prompts/[path]/progress.md