Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
90
90%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
This document explains how to run the Ralph Loop across all supported CLI environments using the Python orchestrator script.
The Ralph Loop uses a Python script (ralph_loop.py) as the central orchestrator:
fix_plan.json┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ ralph_loop.py │────▶│ fix_plan.json │────▶│ Your CLI │
│ (orchestrator) │ │ (state file) │ │ (Claude/Codex/ │
│ │ │ │ │ Copilot/Kimi) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
▲ │
│ ▼
└──────────────────────────────────────────────┘
(you run script again)| CLI | Agent Code | Command Prefix | Example |
|---|---|---|---|
| Claude Code | claude | / | /specs:task-implementation |
| Codex CLI | codex | (none) | task-implementation |
| Copilot CLI | copilot | (none) | task-implementation |
| Kimi CLI | kimi | / | /specs:task-implementation |
# Use python3 on macOS, python on Windows/Linux
python3 plugins/developer-kit-specs/skills/ralph-loop/scripts/ralph_loop.py \
--action=start \
--spec=docs/specs/001-feature/ \
--from-task=TASK-036 \
--to-task=TASK-041 \
--agent=claudepython3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/Output shows the command to execute:
🔄 Ralph Loop | Iteration 0 | Step: implementation
→ Implementation: TASK-036
Execute:
/specs:task-implementation --task=TASK-036
After execution, update state:
python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/In your CLI, run the shown command:
/specs:task-implementation --task=TASK-036Run the loop command again:
python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/# Initialize
python3 ralph_loop.py --action=start \
--spec=docs/specs/001-feature/ \
--from-task=TASK-036 --to-task=TASK-041 \
--agent=claude
# With /loop for automation
/loop 5m python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/Commands will be formatted as: /specs:task-implementation --task=TASK-036
# Initialize
python3 ralph_loop.py --action=start \
--spec=docs/specs/001-feature/ \
--from-task=TASK-036 --to-task=TASK-041 \
--agent=codex
# Loop
python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/Commands will be formatted as: task-implementation --task=TASK-036
# Initialize
python3 ralph_loop.py --action=start \
--spec=docs/specs/001-feature/ \
--agent=copilot
# Loop
python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/# Initialize
python3 ralph_loop.py --action=start \
--spec=docs/specs/001-feature/ \
--agent=kimi
# Loop
python3 ralph_loop.py --action=loop --spec=docs/specs/001-feature/Commands will be formatted as: /specs:task-implementation --task=TASK-036
Set default agent for all tasks:
python3 ralph_loop.py --action=start --spec=... --agent=codexOverride per task in task file frontmatter:
---
id: TASK-036
title: Refactor service
agent: codex
---#!/bin/bash
# ralph-loop.sh - Run until complete
SPEC="docs/specs/001-feature"
PYTHON="python3" # Use python3 on macOS
while true; do
# Run one step
OUTPUT=$($PYTHON ralph_loop.py --action=loop --spec="$SPEC" 2>&1)
echo "$OUTPUT"
# Check if complete or failed
if echo "$OUTPUT" | grep -q "COMPLETE"; then
echo "✅ All done!"
break
fi
if echo "$OUTPUT" | grep -q "FAILED"; then
echo "❌ Loop failed!"
exit 1
fi
# The script shows the command to execute
# In automation, you would need to execute it programmatically
# For manual use, execute the shown command then continue
echo "Execute the shown command, then press Enter to continue..."
read
done# This will run the loop every 5 minutes
/loop 5m python3 plugins/developer-kit-specs/skills/ralph-loop/scripts/ralph_loop.py \
--action=loop \
--spec=docs/specs/001-feature/Note: With /loop, you'll see the command to execute each iteration. Execute it manually, then the next /loop will continue.
All state lives in fix_plan.json:
{
"spec_id": "001-feature",
"spec_folder": "docs/specs/001-feature/",
"task_range": {
"from": "TASK-036",
"to": "TASK-041",
"total_in_range": 6
},
"default_agent": "claude",
"tasks": [...],
"pending": ["TASK-036", "TASK-037"],
"done": [],
"state": {
"step": "implementation",
"current_task": "TASK-036",
"current_task_file": "docs/specs/001-feature/tasks/TASK-036.md",
"current_task_lang": "java",
"iteration": 0,
"retry_count": 0,
"last_updated": "2026-04-05T10:30:00",
"range_progress": {
"done_in_range": 0,
"total_in_range": 6
}
}
}For non-Claude CLIs without the Python script, you can use a shell loop with prompt.md:
cd docs/specs/001-feature/_ralph_loop/
# Claude Code
while :; do cat prompt.md | claude; done
# Copilot CLI
while :; do cat prompt.md | copilot; done
# Codex CLI
while :; do cat prompt.md | codex; doneNote: The Python orchestrator is the recommended approach for all CLIs.
| Action | Description |
|---|---|
--action=start | Initialize fix_plan.json from task files |
--action=loop | Execute one step, show command to run |
--action=status | Show current state and progress |
--action=resume | Resume from current state |
| Step | Claude/Kimi | Codex/Copilot |
|---|---|---|
| Implementation | /specs:task-implementation --task=TASK-036 | task-implementation --task=TASK-036 |
| Review | /specs:task-review --task=TASK-036 | task-review --task=TASK-036 |
| Cleanup | /developer-kit-specs:specs-code-cleanup --task=TASK-036 | specs-code-cleanup --task=TASK-036 |
| Sync | /specs:spec-sync-with-code --after-task=TASK-036 | spec-sync-with-code --after-task=TASK-036 |
fix_plan.json--action=status to see progressRun --action=start first.
Check --agent matches your CLI (claude, codex, copilot, or kimi).
Ensure task files are in tasks/TASK-XXX.md format with YAML frontmatter.
If you were using the shell loop approach:
while :; do cat prompt.md | claude; donepython3 ralph_loop.py --action=start --spec=...
python3 ralph_loop.py --action=loop --spec=...
# Execute shown command
python3 ralph_loop.py --action=loop --spec=...The Python script provides:
docs
plugins
developer-kit-ai
developer-kit-aws
agents
docs
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
aws-cloudformation-bedrock
aws-cloudformation-cloudfront
aws-cloudformation-cloudwatch
aws-cloudformation-dynamodb
aws-cloudformation-ec2
aws-cloudformation-ecs
aws-cloudformation-elasticache
references
aws-cloudformation-iam
references
aws-cloudformation-lambda
aws-cloudformation-rds
aws-cloudformation-s3
aws-cloudformation-security
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
references
developer-kit-core
agents
commands
skills
developer-kit-devops
developer-kit-java
agents
commands
docs
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
clean-architecture
graalvm-native-image
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
references
unit-test-controller-layer
unit-test-exception-handler
references
unit-test-json-serialization
unit-test-mapper-converter
references
unit-test-parameterized
unit-test-scheduled-async
references
unit-test-service-layer
references
unit-test-utility-methods
unit-test-wiremock-rest-api
references
developer-kit-php
developer-kit-project-management
developer-kit-python
developer-kit-specs
commands
docs
hooks
test-templates
tests
skills
developer-kit-tools
developer-kit-typescript
agents
docs
hooks
rules
skills
aws-cdk
aws-lambda-typescript-integration
better-auth
clean-architecture
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
shadcn-ui
tailwind-css-patterns
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities
references
github-spec-kit