Ralph for Claude Code - Implementation Plan

January 10, 2026 ยท View on GitHub

Version: v0.9.8 | Tests: 276 passing (100% pass rate) | CI/CD: GitHub Actions


Current Phase

Phase 1: CLI Modernization (In Progress)

Phase 1 focuses on modernizing Ralph's CLI integration with Claude Code, including JSON output parsing, session management, and documentation.

Status: Core features complete (1.1-1.4), remaining items are documentation and bug fixes.

IssueTitlePriorityStatus
#51Phase 1.5: Implement session expiration for .claude_session_idP2Open
#24Phase 1.9: Create TESTING.md documentationP3Open
#25Phase 1.10: Create CONTRIBUTING.md guideP3Open
#26Phase 1.11: Update README with testing instructionsP3Open
#27Phase 1.12: Add badges to READMEP3Open

Completed Phase 1 Issues: #28 (CLI commands), #29 (JSON parsing), #30 (session management), #31 (ralph-import), #48 (security), #50 (input validation)


Planned Development

Phase 2: Agent SDK Integration (P2)

Migrate from CLI-only execution to a hybrid CLI/SDK architecture using Claude's Agent SDK.

IssueTitlePriorityStatus
#32Phase 2.1: Create Agent SDK proof of conceptP2Open
#33Phase 2.2: Define custom tools for Agent SDKP2Open
#34Phase 2.3: Implement hybrid CLI/SDK architectureP2Open
#35Phase 2.4: Document SDK migration strategyP2Open

Phase 3: Configuration & Infrastructure (P2-P3)

Add configuration file support, infrastructure features, and advanced functionality.

IssueTitlePriorityStatus
#36Phase 3.1: Add JSON configuration file supportP2Open
#37Phase 3.2: Update installation for SDK supportP2Open
#18Phase 3.4: Implement log rotation featureP2Open
#19Phase 3.5: Implement dry-run mode featureP2Open
#20Phase 3.6: Implement config file support (.ralphrc)P2Open
#38Phase 3.3: Create CLI and SDK documentationP3Open
#21Phase 3.7: Implement metrics and analyticsP3Open
#22Phase 3.8: Implement notification systemP3Open
#23Phase 3.9: Implement backup and rollback systemP3Open

Phase 4: Validation Testing (P2-P3)

Comprehensive testing for all new features and integration scenarios.

IssueTitlePriorityStatus
#14Phase 4.4: Implement tmux integration testsP2Open
#15Phase 4.5: Implement monitor dashboard testsP2Open
#16Phase 4.6: Implement status update testsP2Open
#39Phase 4.1: Implement CLI enhancement testsP3Open
#40Phase 4.2: Implement SDK integration testsP3Open
#41Phase 4.3: Implement backward compatibility testsP3Open
#17Phase 4.7: Implement E2E full loop testsP3Open

Phase 5: GitHub Issue Integration (P4)

Enable Ralph to import development plans directly from GitHub issues.

IssueTitlePriorityStatus
#69Phase 5.1: Allow plan import from GitHub IssueP4Open
#70Phase 5.2: Assess issue completeness and generate implementation planP4Open
#71Phase 5.3: Filter and select GitHub issues by metadataP4Open
#72Phase 5.4: Batch processing and issue queue managementP4Open
#73Phase 5.5: Issue lifecycle management and completion workflowsP4Open

Summary: Import single issues (#69), generate plans for incomplete issues (#70), filter by labels/assignees (#71), process multiple issues (#72), and manage issue lifecycle (#73).


Phase 6: Sandbox Execution Environments (P4)

Run Ralph in isolated sandbox environments for security and reproducibility.

IssueTitlePriorityStatus
#49Phase 6.0: Sandbox execution environments (umbrella)P4Open
#74Phase 6.1: Local Docker Sandbox ExecutionP4Open
#75Phase 6.2: E2B Cloud Sandbox IntegrationP4Open
#76Phase 6.3: Sandbox File SynchronizationP4Open
#77Phase 6.4: Sandbox Security and Resource PoliciesP4Open
#78Phase 6.5: Generic Sandbox Interface and Plugin ArchitectureP4Open
#79Phase 6.6: Daytona Sandbox IntegrationP4Open
#80Phase 6.7: Cloudflare Sandbox IntegrationP4Open

First-class providers: Docker (local), E2B, Daytona, Cloudflare Plugin-based (via Phase 6.5): Gitpod, Codespaces, Modal, Replit, etc.


Priority Legend

PriorityDescriptionTarget
P0Critical - Foundation/BlockingImmediate
P1High - Core featuresNear-term
P2Medium - Important enhancementsMid-term
P3Low - Nice to haveWhen available
P4Enhancements - New functionalityFuture

Implementation Order

Recommended sequence:

  1. Phase 1 Completion (P2-P3): Finish documentation and bug fixes
  2. Phase 3 Core (P2): Log rotation, dry-run, config file support
  3. Phase 4 Testing (P2): tmux, monitor, status tests
  4. Phase 2 SDK (P2): Agent SDK integration (can run parallel with Phase 3)
  5. Phase 3 Advanced (P3): Metrics, notifications, backup
  6. Phase 4 Validation (P3): CLI, SDK, backward compatibility tests
  7. Phase 5 GitHub (P4): GitHub issue integration
  8. Phase 6 Sandbox (P4): Sandbox execution environments

Test Coverage

Current: 276 tests across 11 test files (100% pass rate)

CategoryTestsFiles
CLI Parsing27test_cli_parsing.bats
CLI Modern29test_cli_modern.bats
JSON Parsing36test_json_parsing.bats
Session Continuity26test_session_continuity.bats
Exit Detection20test_exit_detection.bats
Rate Limiting15test_rate_limiting.bats
Loop Execution20test_loop_execution.bats
Edge Cases20test_edge_cases.bats
Installation14test_installation.bats
Project Setup36test_project_setup.bats
PRD Import33test_prd_import.bats

Completed Development

Click to expand completed work

Phase 1: CLI Modernization (Completed Issues)

IssueTitleStatus
#28Phase 1.1: Update CLI commands with modern optionsClosed
#29Phase 1.2: Enhance response parsing for JSON outputClosed
#30Phase 1.3: Add session management for continuityClosed
#31Phase 1.4: Update ralph-import with CLI enhancementsClosed
#48MAJOR-01: Enhance shell escaping to prevent command injectionClosed
#50MAJOR-02: Add input validation for --allowed-tools flagClosed

Testing Issues (Completed)

IssueTitleStatus
#10Implement CLI parsing testsClosed
#11Implement installation testsClosed
#12Implement project setup testsClosed
#13Implement PRD import testsClosed

Bug Fixes (Completed)

IssueTitleStatus
#1Cannot find file ~/.ralph/lib/response_analyzer.shClosed
#2is_error: false triggers "error" circuit breaker incorrectlyClosed
#5Bug: date: illegal option -- d on macOSClosed
#7Review codebase for updated Anthropic CLIClosed
#42Windows: Git Bash windows spawn when running Ralph loopClosed
#55--prompt-file flag does not exist in Claude Code CLIClosed

Other Completed

IssueTitleStatus
#56Project featured in Awesome Claude Code!Closed
#63Fix IMPLEMENTATION_PLANClosed

Version History

VersionKey Changes
v0.9.8Modern CLI for PRD import with JSON output
v0.9.7Session lifecycle management with auto-reset
v0.9.6JSON output and session management
v0.9.5PRD import tests (22 tests)
v0.9.4Project setup tests (36 tests)
v0.9.3Installation tests (14 tests)
v0.9.2Prompt file fix (-p flag)
v0.9.1Modern CLI commands (Phase 1.1)
v0.9.0Circuit breaker enhancements

Last Updated: 2026-01-10 Status: Phase 1 in progress, Phases 2-6 planned