Ralph Implementation
Implement ticket: $ARGUMENTS
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.
Arguments
$ARGUMENTS - Ticket Context (optional)
Specify ticket to implement:
- Ticket number: "ENG-1234" - Implement specific Linear ticket
- No arguments: Fetches top 10 priority SMALL/XS issues from "ready for dev" and implements highest priority
Default Behavior
If no arguments:
- Fetches top 10 priority items from Linear in "ready for dev" status
- Selects highest priority SMALL or XS issue
- Creates worktree for implementation
- Launches implementation session with automatic commit and PR creation
Usage
# Implement specific ticket
/ralph-impl ENG-1234
# Auto-select highest priority ticket
/ralph-impl
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 understand the implementation plan and any concerns
PART I - IF NO TICKET IS MENTIOND
- read .claude/commands/linear.md
0a. fetch the top 10 priority items from linear in status "ready for dev" 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 understand the implementation plan and any concerns
PART II - NEXT STEPS
think deeply
- move the item to "in dev" using the MCP tools
1a. identify the linked implementation plan document from the
linkssection 1b. if no plan exists, move the ticket back to "ready for spec" and EXIT with an explanation
think deeply about the implementation
- set up worktree for implementation:
2a. read
hack/create-worktree.shand create a new worktree with the Linear branch name:./hack/create-worktree.sh ENG-XXXX BRANCH_NAME2b. launch implementation session:humanlayer-nightly launch --model opus --dangerously-skip-permissions --dangerously-skip-permissions-timeout 15m --title "implement ENG-XXXX" -w ~/wt/humanlayer/ENG-XXXX "/implement-plan and when you are done implementing and all tests pass, read ./claude/commands/commit.md and create a commit, then read ./claude/commands/describe-pr.md and create a PR, then add a comment to the Linear ticket with the PR link"
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.
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 implementation completes:
✅ COMMAND COMPLETE: /ralph-impl
Ticket: ENG-XXXX
Status: In Dev → Implemented
Worktree: ~/wt/project/ENG-XXXX
PR: Created (if applicable)
Next: Review and merge PR
Completion Checklist
Before marking complete:
- Ticket fetched from Linear
- Moved to "in dev" status
- Worktree created
- Implementation launched
- PR created (if tests pass)
Failure Indicators
This command has FAILED if:
- ❌ No SMALL/XS tickets found
- ❌ No implementation plan linked
- ❌ Worktree creation failed
- ❌ Tests failed
When NOT to Use
Do NOT use when:
- Ticket needs planning (use
/ralph-plan) - Large/XL ticket selected
- Linear MCP not configured
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip reading plan | Missing context | Always read linked plan |
| Implement without worktree | Branch conflicts | Use create-worktree.sh |
| Large ticket selection | Scope creep | Only SMALL/XS tickets |
Principles
This command embodies:
- #3 Complete Execution - Full implementation flow
- #5 No Assumptions - Fetch ticket context
Full Standard: CODITECT-STANDARD-AUTOMATION.md