Rick

Ralph Loop — Autonomous Claude Loop

tick → claude_exec → tools → holon emit → audit (daemon-required).

Ralph Loop — Autonomous Claude Loop (v2026-09-30T095331Z-5e473105f4) 2026-09-30 | tick → claude_exec → tools → holon emit → audit (daemon-required). 1 - Reception - Listen for holon work items subscribe_to_topics subscribe_to_topics kv/holon/dispatch/daemon kv/holon/dispatch/marco kv/holon/dispatch/firmware kv/holon/dispatch/tools holon_queue E_QUEUE_FULL priority 1-2: 5 minutes priority 3: work queue priority 4-5: idle rate_control RALPH_MAX_CONCURRENT=1 RALPH_RATE_PER_MINUTE=5 RALPH_RATE_PER_HOUR=50 exponential delay holon work ite… queued holons 2 - Validation & Grooming - Check holon format, dependencies, blast radius, prerequisites holon_format_validation holon_id type target_service description E_INVALID_HOLON check_dependencies check_dependencies dependencies E_DEPENDENCY_UNMET blast_radius_gate blast_radius critical|high claude approval kv/holon/approval/<holon_id> codebase_readiness target service health git branch exists no uncommitted changes branch up-to-date E_NOT_READY validated holo… dependencies c… blast radius a… 3 - Execution & Reporting - Run the holon work, capture output, publish status to bus claude_exec claude_exec POST /api/exec/claude claude:started claude:chunk claude:done result_store result_store holon_id status exit_code execution_time_seconds publish_status kv/holon/status/<holon_id> status phase progress_percent timestamp executed holons results captur… 1. Listen for holon… 2. Queue holons 3. Validate holons 4. Check dependenci… 5. Approve blast ra… 6. Check codebase r… 7. Execute holons 8. Capture results 9. Publish status Dispatch Message { "holon_id": "KAN-167", "title": "Implement user authentication", "description": "Add JWT-based auth to daemon API endpoints", "type": "coding|refactor|test|docs", "target_service": "daemon", "priority": 1-5, "blast_radius": "low|medium|high|critical", "estimated_effort": "1h|2h|4h|8h|16h", "dependencies": ["KAN-166"], "required_skills": ["python", "fastapi", "jwt"], "constraints": { "must_pass_tests": true, "coverage_minimum": 80, "no_breaking_changes": true, "max_file_changes": 5 }, "acceptance_criteria": [ "All tests pass", "Coverage >= 80%", "No security warnings", "Code review approved" ], "context": { "branch": "feature/auth-system", "base_branch": "main", "codebase_summary": "Daemon with FastAPI router at daemon/src/main.py", "relevant_files": ["daemon/src/main.py", "daemon/tests/test_auth.py"], "previous_work": "KAN-166: Added Grant schema" }, "role": "claude-architect", "timeout_seconds": 3600, "max_retries": 2, "callback_topic": "kv/holon/result/<holon_id>" } Result Message { "holon_id": "KAN-167", "status": "success|failure|timeout|cancelled", "exit_code": 0, "execution_time_seconds": 245, "commits_created": ["abc123def"], "branch": "feature/auth-system", "test_results": { "passed": 42, "failed": 0, "skipped": 2, "coverage_percent": 85 }, "validation_report": { "constraints_met": true, "acceptance_criteria_met": true, "blast_radius_actual": "low", "breaking_changes": false }, "output_summary": "Implemented JWT auth with 85% coverage. All tests pass.", "error": null, "artifacts": { "logs": "http://localhost:8001/api/ralph/logs/KAN-167", "diff": "http://localhost:8001/api/ralph/diff/KAN-167", "pr_url": "https://git.example.com/kevin/platform/pull/42" } } 24 of 45 identifiers appear only in design docs, not in code — this shows SPECIFIED behaviour, not verified implementation. Source spec is marked Draft: daemon/docs/RALPH_SPEC.md. The source does not show any specific implementation details for the blast radius gate or the codebase readiness checks. These steps are assumed to be handled by the respective processes. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-09-30 09:53 UTC, from commit 5e47310

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Rick
Slug
ralph-loop
Rendered
2026-09-30T095331Z
From commit
5e473105f4
Updated
30 Sep 2026, 09:53 UTC
Sources at
5e47310
Watches
4 paths
  • daemon/docs/RALPH_SPEC.md
  • daemon/src/claude_exec.py
  • daemon/src/claude_cost_tracker.py
  • daemon/src/ralph_control_api.py