Ralph Plan
System Prompt
⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:
- IMMEDIATELY execute - no questions, no explanations first
- ALWAYS show full output from script/tool execution
- ALWAYS provide summary after execution completes
DO NOT:
- Say "I don't need to take action" - you ALWAYS execute when invoked
- Ask for confirmation unless
requires_confirmation: truein frontmatter - Skip execution even if it seems redundant - run it anyway
The user invoking the command IS the confirmation.
Usage
/ralph-plan
Process Linear tickets: $ARGUMENTS
Automated workflow for Linear ticket planning - fetches priority items, creates implementation plans, and manages workflow state transitions.
Arguments
$ARGUMENTS - Ticket Specification (optional)
Specify which ticket to process:
- Specific ticket: "Plan ENG-123" or "Create plan for ENG-456"
- Auto-select: No arguments - fetches top 10 priority items and selects highest SMALL/XS
- With filters: "Plan highest priority SMALL ticket"
Default Behavior
If no ticket specified:
- Fetches top 10 priority items from Linear "ready for spec"
- Selects highest priority SMALL or XS issue
- Creates implementation plan following create_plan.md
- Moves ticket through workflow states
PART I - IF A TICKET IS MENTIONED
0c. use linear cli to fetch the selected item into thoughts with the ticket number - ./thoughts/shared/tickets/ENG-xxxx.md
0d. read the ticket and all comments to learn about past implementations and research, and any questions or concerns about them
PART I - IF NO TICKET IS MENTIONED
- read .claude/commands/linear.md
0a. fetch the top 10 priority items from linear in status "ready for spec" using the MCP tools, noting all items in the
linkssection 0b. select the highest priority SMALL or XS issue from the list (if no SMALL or XS issues exist, EXIT IMMEDIATELY and inform the user) 0c. uselinearcli to fetch the selected item into thoughts with the ticket number - ./thoughts/shared/tickets/ENG-xxxx.md 0d. read the ticket and all comments to learn about past implementations and research, and any questions or concerns about them
PART II - NEXT STEPS
think deeply
- move the item to "plan in progress" using the MCP tools
1a. read ./claude/commands/create-plan.md
1b. determine if the item has a linked implementation plan document based on the
linkssection 1d. if the plan exists, you're done, respond with a link to the ticket 1e. if the research is insufficient or has unaswered questions, create a new plan document following the instructions in ./claude/commands/create-plan.md
think deeply
- when the plan is complete,
humanlayer thoughts syncand attach the doc to the ticket using the MCP tools and create a terse comment with a link to it (re-read .claude/commands/linear.md if needed) 2a. move the item to "plan in review" using the MCP tools
think deeply, use TodoWrite to track your tasks. When fetching from linear, get the top 10 items by priority but only work on ONE item - specifically the highest priority SMALL or XS sized issue.
PART III - When you're done
Print a message for the user (replace placeholders with actual values):
✅ Completed implementation plan for ENG-XXXX: [ticket title]
Approach: [selected approach description]
The plan has been:
Created at thoughts/shared/plans/YYYY-MM-DD-ENG-XXXX-description.md
Synced to thoughts repository
Attached to the Linear ticket
Ticket moved to "plan in review" status
Implementation phases:
- Phase 1: [phase 1 description]
- Phase 2: [phase 2 description]
- Phase 3: [phase 3 description if applicable]
View the ticket: https://linear.app/humanlayer/issue/ENG-XXXX/[ticket-slug]
Action Policy
<default_behavior> This command implements changes by default when user intent is clear. Proceeds with:
- Code generation/modification
- File creation/updates
- Configuration changes
- Git operations (if applicable)
Provides concise progress updates during execution. </default_behavior>
Success Output
When Ralph plan completes:
✅ COMMAND COMPLETE: /ralph-plan
Ticket: ENG-XXXX
Status: Ready for Spec → Plan in Review
Plan: thoughts/shared/plans/YYYY-MM-DD-ENG-XXXX-description.md
Synced: Yes
Attached: Yes
Next: Review plan and approve
Completion Checklist
Before marking complete:
- Ticket fetched from Linear
- Moved to "plan in progress" status
- Plan document created
- Plan synced to thoughts repository
- Attached to Linear ticket
- Moved to "plan in review"
Failure Indicators
This command has FAILED if:
- ❌ No SMALL/XS tickets found
- ❌ Research incomplete or unanswered questions
- ❌ Plan document not created
- ❌ Ticket not updated
When NOT to Use
Do NOT use when:
- Ticket needs research first (use
/ralph-research) - Large/XL ticket selected
- Linear MCP not configured
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip reading ticket comments | Missing context | Always read comments |
| Plan without research | Incomplete plan | Ensure research exists |
| Multiple tickets at once | Focus lost | One ticket at a time |
Principles
This command embodies:
- #3 Complete Execution - Full planning workflow
- #5 No Assumptions - Read all ticket context
Full Standard: CODITECT-STANDARD-AUTOMATION.md