5.4 KiB
5.4 KiB
name, description, argument-hint, allowed-tools
| name | description | argument-hint | allowed-tools | |||||
|---|---|---|---|---|---|---|---|---|
| run-prompt | Delegate one or more prompts to fresh sub-task contexts with parallel or sequential execution | <prompt-number(s)-or-name> [--parallel|--sequential] |
|
Single prompt:
- Empty (no arguments): Run the most recently created prompt (default behavior)
- A prompt number (e.g., "001", "5", "42")
- A partial filename (e.g., "user-auth", "dashboard")
Multiple prompts:
- Multiple numbers (e.g., "005 006 007")
- With execution flag: "005 006 007 --parallel" or "005 006 007 --sequential"
- If no flag specified with multiple prompts, default to --sequential for safety
<step2_resolve_files> For each prompt number/name:
- If empty or "last": Find with
!ls -t ./prompts/*.md | head -1 - If a number: Find file matching that zero-padded number (e.g., "5" matches "005-.md", "42" matches "042-.md")
- If text: Find files containing that string in the filename
<matching_rules>
- If exactly one match found: Use that file
- If multiple matches found: List them and ask user to choose
- If no matches found: Report error and list available prompts </matching_rules> </step2_resolve_files>
<step3_execute> <single_prompt>
- Read the complete contents of the prompt file
- Delegate as sub-task using Task tool with subagent_type="general-purpose"
- Wait for completion
- Archive prompt to
./prompts/completed/with metadata - Commit all work:
- Stage files YOU modified with
git add [file](nevergit add .) - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
- Commit with format:
[type]: [description](lowercase, specific, concise)
- Stage files YOU modified with
- Return results </single_prompt>
<parallel_execution>
- Read all prompt files
- Spawn all Task tools in a SINGLE MESSAGE (this is critical for parallel execution): Use Task tool for prompt 005 Use Task tool for prompt 006 Use Task tool for prompt 007 (All in one message with multiple tool calls)
- Wait for ALL to complete
- Archive all prompts with metadata
- Commit all work:
- Stage files YOU modified with
git add [file](nevergit add .) - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
- Commit with format:
[type]: [description](lowercase, specific, concise)
- Stage files YOU modified with
- Return consolidated results </parallel_execution>
<sequential_execution>
- Read first prompt file
- Spawn Task tool for first prompt
- Wait for completion
- Archive first prompt
- Read second prompt file
- Spawn Task tool for second prompt
- Wait for completion
- Archive second prompt
- Repeat for remaining prompts
- Archive all prompts with metadata
- Commit all work:
- Stage files YOU modified with
git add [file](nevergit add .) - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
- Commit with format:
[type]: [description](lowercase, specific, concise)
- Stage files YOU modified with
- Return consolidated results </sequential_execution> </step3_execute>
<context_strategy> By delegating to a sub-task, the actual implementation work happens in fresh context while the main conversation stays lean for orchestration and iteration. </context_strategy>
✓ Executed: ./prompts/005-implement-feature.md ✓ Archived to: ./prompts/completed/005-implement-feature.md [Summary of what the sub-task accomplished]<parallel_output> ✓ Executed in PARALLEL:
- ./prompts/005-implement-auth.md
- ./prompts/006-implement-api.md
- ./prompts/007-implement-ui.md
✓ All archived to ./prompts/completed/
[Consolidated summary of all sub-task results]<sequential_output> ✓ Executed SEQUENTIALLY:
- ./prompts/005-setup-database.md → Success
- ./prompts/006-create-migrations.md → Success
- ./prompts/007-seed-data.md → Success
✓ All archived to ./prompts/completed/
[Consolidated summary showing progression through each step]<critical_notes>
- For parallel execution: ALL Task tool calls MUST be in a single message
- For sequential execution: Wait for each Task to complete before starting next
- Archive prompts only after successful completion
- If any prompt fails, stop sequential execution and report error
- Provide clear, consolidated results for multiple prompt execution </critical_notes>