Execute the complete development cycle autonomously for: **$ARGUMENTS**
Executes complete development cycle autonomously from implementation through CI passing.
/plugin marketplace add niekcandaele/claude-helpers/plugin install cata-helpers@cata-helpers-marketplacecata-proj/Execute the complete development cycle autonomously for: $ARGUMENTS
This command combines task implementation, verification, PR creation, and CI monitoring into a single autonomous loop. It only stops when:
Then you hand off to the human for final review and merge.
/cata-proj:full-execute feature-nameFULL AUTONOMY - The loop handles everything:
On first run or continuation:
Parse Arguments
$ARGUMENTS can be:
- feature-name (finds docs/design/*/tasks.md)
- path/to/tasks.md (direct path)
- feature-name --max-iterations N (override default)
Locate Configuration
.claude/ralph-loop.local.md existsCreate/Update Config (.claude/ralph-loop.local.md)
---
active: true
iteration: 1
max_iterations: 20
feature: [feature-name]
tasks_file: [path/to/tasks.md]
started_at: [ISO timestamp]
status: in_progress
phase: implementation
verify_attempts: 0
ci_attempts: 0
pr_url: null
branch: null
---
# Full Execute Loop State
## Current Status
**Iteration**: 1/20
**Phase**: implementation
**Tasks Complete**: 0/X
**Last Updated**: [timestamp]
## Phase Progress
- [ ] Implementation: All tasks complete
- [ ] Verification: Zero issues
- [ ] PR Creation: Draft PR created
- [ ] CI: All checks passing
## Iteration History
(Will be populated each iteration)
## Completion Markers
<!-- Hook reads these markers -->
Extract max_iterations
--max-iterations Nmax_iterations: NBefore doing work, check if we should stop:
Check Max Iterations
current_iteration=$(grep "^iteration:" .claude/ralph-loop.local.md | awk '{print $2}')
max_iterations=$(grep "^max_iterations:" .claude/ralph-loop.local.md | awk '{print $2}')
if [ "$current_iteration" -ge "$max_iterations" ]; then
# Write max iterations marker
# Report partial completion with phase info
# Exit (hook will allow stop)
fi
Check Full Completion
<!-- RALPH_SHIPPED --> markerIf Termination Condition Met
<!-- RALPH_SHIPPED --> if full cycle complete<!-- RALPH_MAX_ITERATIONS --> if max iterations hitactive: false in config frontmatterRead the phase field from config and route accordingly:
phase: implementation → Go to Step 4 (Implementation)
phase: verification → Go to Step 5 (Verification Loop)
phase: pr_creation → Go to Step 6 (PR Creation)
phase: ci_check → Go to Step 7 (CI Loop)
Same as ralph-execute, with phase tracking:
Locate Task Files
docs/design/*/tasks.md matching featureFind design.md
Validate tasks.md Format
- [ ] or - [x]Check if Implementation Complete
incomplete=$(grep -c '^\s*- \[ \]' "$tasks_file" || echo "0")
complete=$(grep -c '^\s*- \[x\]' "$tasks_file" || echo "0")
if [ "$incomplete" -eq 0 ] && [ "$complete" -gt 0 ]; then
# All tasks done - transition to verification phase
# Update config: phase: verification
# Write marker: <!-- TASKS_COMPLETE -->
# Continue to Step 5
fi
Implement Tasks
For each incomplete task in the next phase:
a. Read Task Details
b. Launch Research Agents (if needed)
Task tool with:
- subagent_type: "Explore"
- description: "Research [task] implementation"
- prompt: "Understand existing patterns for [task].
Find similar implementations.
Identify integration points."
c. Implement
d. Update tasks.md Checkmarks
- [ ] Task description to - [x] Task descriptione. Handle Blockers
After Implementation Work
This is the critical phase - iterate until ZERO issues:
Run /verify
Skill tool with:
- skill: "verify"
Parse Verification Results
Look for these indicators of zero issues:
CRITICAL: Zero means zero. Any issue (blocking OR non-blocking) means we need to fix it.
If Issues Found
If Zero Issues
<!-- VERIFY_CLEAN -->Stuck Detection
Smart branch handling and draft PR creation:
Determine Branch Strategy
Check current branch:
current_branch=$(git branch --show-current)
Decision logic:
a. On main/master/develop:
feature/<feature-name> or fix/<feature-name>git checkout -b "feature/$FEATURE_NAME"
b. On feature-like branch:
feature/*, fix/*, feat/*, bugfix/*, hotfix/*, chore/*, refactor/*c. On unclear branch:
AskUserQuestion with:
- question: "You're on branch '[branch-name]'. Should I use this branch for the PR, or create a new feature branch?"
- options:
- "Use current branch" - Continue with existing branch
- "Create new branch" - I'll create feature/[feature-name]
Stage and Commit
# Check for changes
git status --porcelain
# If changes exist:
git add -A
git commit -m "$(cat <<'EOF'
feat: [feature-name] implementation
- All tasks from tasks.md complete
- Verification passed with zero issues
- Ready for CI validation
EOF
)"
Push to Remote
git push -u origin $(git branch --show-current)
Create Draft PR
GitHub:
gh pr create \
--draft \
--title "[User-facing title based on feature]" \
--body "$(cat <<'EOF'
## Summary
Autonomous implementation of [feature-name]
## Changes
- [Summary of tasks completed]
## Verification
- All tasks from tasks.md complete
- /verify passed with zero issues
- Awaiting CI validation
## Status
This is a draft PR created by full-execute.
Convert to ready for review when CI passes and you're ready to merge.
EOF
)"
GitLab:
glab mr create \
--draft \
--title "[User-facing title]" \
--description "[Same body as above]"
Store PR URL
pr_url: [URL]<!-- PR_CREATED -->phase: ci_checkMonitor CI and fix failures until passing:
Check CI Status
Skill tool with:
- skill: "check-ci"
Parse CI Results
If CI Passes:
<!-- CI_PASSED --><!-- RALPH_SHIPPED -->active: falseIf CI Fails:
git add -A
git commit -m "fix: address CI failures
[Summary of what was fixed based on debugger analysis]"
git push
Stuck Detection
When all phases complete, report to human:
Full Execute Complete!
Feature: [feature-name]
Total Iterations: N/M
Duration: [start time to end time]
Phase Summary:
✅ Implementation: All X tasks complete
✅ Verification: Zero issues
✅ PR Creation: Draft PR created
✅ CI: All checks passing
Draft PR: [PR URL]
Next Steps for Human:
1. Review the draft PR at [URL]
2. Check the changes meet your expectations
3. Convert draft to "Ready for Review" when satisfied
4. Request reviewers and merge when approved
The implementation is complete and verified.
Your turn to review and merge!
Update Config Frontmatter
---
active: [true if continuing, false if done]
iteration: [incremented]
max_iterations: [unchanged]
feature: [unchanged]
tasks_file: [unchanged]
started_at: [unchanged]
status: [in_progress | shipped | max_iterations_reached]
phase: [current phase]
verify_attempts: [count]
ci_attempts: [count]
pr_url: [URL if created]
branch: [branch name]
---
Log Iteration History
### Iteration N - [timestamp]
**Phase**: [phase worked on]
**Tasks Attempted**: [list if implementation phase]
**Verify Result**: [PASS/FAIL if verification phase]
**CI Result**: [PASS/FAIL if ci phase]
**Notes**: [what happened this iteration]
Exit Naturally
Stuck Task Detection
If task fails 3+ consecutive iterations:
- Log in config: "Task X.Y stuck - attempted in iterations [1,2,3]"
- Skip this task
- Continue to next task or phase
Stuck Verification
If same verify issue persists 3+ iterations:
- Log in config: "Verify issue stuck: [issue description]"
- Continue trying (might resolve with other changes)
Stuck CI
If same CI failure persists 3+ iterations:
- Log in config: "CI failure stuck: [failure description]"
- Include debugger analysis
- Continue trying until max_iterations
Config File Issues
If config corrupted or unreadable:
- Backup to .claude/ralph-loop.local.md.backup
- Reinitialize from current state
- Log warning
The Stop hook reads these markers:
Phase Markers
<!-- TASKS_COMPLETE --> - Implementation phase done<!-- VERIFY_CLEAN --> - Verification phase done<!-- PR_CREATED --> - PR creation phase done<!-- CI_PASSED --> - CI phase doneTerminal Markers
<!-- RALPH_SHIPPED --> - Full cycle complete (all phases)<!-- RALPH_MAX_ITERATIONS --> - Max iterations reachedActive Flag
active: false - Loop should stop/cata-proj:full-execute user-auth
Finds tasks.md for user-auth feature, runs full cycle with default 20 iterations.
/cata-proj:full-execute user-auth --max-iterations 30
Allows up to 30 iterations for complex features.
/cata-proj:full-execute docs/design/2024-01-15-user-auth/tasks.md
Uses specific tasks.md file.
/cata-proj:full-execute user-auth
If .claude/ralph-loop.local.md exists with active:true, continues from current phase.
| Feature | execute | ralph-execute | full-execute |
|---|---|---|---|
| Approval gates | Yes | No | No |
| Verify iteration | Once | On task complete | Until zero issues |
| PR creation | No | No | Yes (draft) |
| CI monitoring | No | No | Yes |
| Human handoff | After verify | After tasks | After CI passes |
| Use case | Tight control | Task completion | Full autonomy |
✓ Features with clear, well-defined tasks ✓ When you want hands-off implementation through to PR ✓ When you trust the process to handle verification and CI ✓ When tasks.md and design.md are well-specified ✓ For shipping features without manual intervention
✗ Critical production features needing tight oversight ✗ When requirements are ambiguous ✗ When you need manual review at each step ✗ For exploratory work without clear tasks
Remember: Full execute is the most autonomous mode. It handles everything from implementation through CI, only stopping when the draft PR is ready for your review. Trust the process, check the final result.