| name | spec |
| description | Creates a concise engineering implementation plan based on user requirements and saves it to specs directory |
| argument-hint | [user prompt] |
Plan
Create a detailed implementation plan based on the user's requirements provided through the USER_PROMPT variable. Analyze the request, think through the implementation approach, and save a comprehensive specification document to PLAN_OUTPUT_DIRECTORY/spec-<name-of-plan>.md that can be used as a blueprint for actual development work. The output filename MUST begin with the spec- prefix. Follow the Instructions and work through the Workflow to create the plan.
Variables
USER_PROMPT: $1
PLAN_OUTPUT_DIRECTORY: specs/
Instructions
- IMPORTANT: If no
USER_PROMPT is provided, stop and ask the user to provide it.
- Carefully analyze the user's requirements provided in the USER_PROMPT variable
- Determine the task type (chore|feature|refactor|fix|enhancement) and complexity (simple|medium|complex)
- Think deeply (ultrathink) about the best approach to implement the requested functionality or solve the problem
- Explore the codebase to understand existing patterns and architecture
- Follow the Plan Format below to create a comprehensive implementation plan
- Include all required sections and conditional sections based on task type and complexity
- Generate a descriptive, kebab-case filename based on the main topic of the plan, prefixed with
spec- (e.g. spec-in-memory-ttl-lru-cache)
- Save the complete implementation plan to
PLAN_OUTPUT_DIRECTORY/spec-<descriptive-name>.md
- Ensure the plan is detailed enough that another developer could follow it to implement the solution
- Include code examples or pseudo-code where appropriate to clarify complex concepts
- Consider edge cases, error handling, and scalability concerns
Workflow
- Analyze Requirements - THINK HARD and parse the USER_PROMPT to understand the core problem and desired outcome
- Explore Codebase - Understand existing patterns, architecture, and relevant files
- Design Solution - Develop technical approach including architecture decisions and implementation strategy
- Document Plan - Structure a comprehensive markdown document with problem statement, implementation steps, and testing approach
- Generate Filename - Create a descriptive kebab-case filename based on the plan's main topic, prefixed with
spec-
- Save & Report - Follow the
Report section to write the plan to PLAN_OUTPUT_DIRECTORY/spec-<filename>.md and provide a summary of key components
Plan Format
Follow this format when creating implementation plans:
# Plan: <task name>
## Task Description
<describe the task in detail based on the prompt>
## Objective
<clearly state what will be accomplished when this plan is complete>
<if task_type is feature or complexity is medium/complex, include these sections:>
## Problem Statement
<clearly define the specific problem or opportunity this task addresses>
## Solution Approach
<describe the proposed solution >
Use these files to complete the task:
IMPORTANT: Execute every step in order, top to bottom.
Execute these commands to validate the task is complete:
Example: - Test to ensure the code compiles
Report
After creating and saving the implementation plan, provide a concise report with the following format:
✅ Implementation Plan Created
File: PLAN_OUTPUT_DIRECTORY/spec-<filename>.md
Topic: <brief description of what the plan covers>
Key Components:
- <main component 1>
- <main component 2>
- <main component 3>