Rick

Ralph Loop — Autonomous Claude Loop

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

Ralph Loop — Autonomous Claude Loop (v2026-08-02T101544Z-ab2bbdebf5) 2026-08-01 | tick → claude_exec → tools → holon emit → audit (daemon-required). 1 - Reception - Listen for holon work items MQTT broker kv/holon/dispatch/<target> subscribe_to_topics() daemon/docs/RALPH_SPEC.md:300 holon queue E_QUEUE_FULL holon work item 2 - Validation & Grooming - Check holon format, dependencies, blast radius validate_holon() daemon/docs/RALPH_SPEC.md:400 check_dependencies() daemon/src/claude_exec.py:150 groom() daemon/src/claude_exec.py:200 holon validati… 3 - Execution & Reporting - Run the holon work, capture output _run_claude() daemon/src/claude_exec.py:400 execution log http://localhost:8001/api/ralph/logs/KAN-167 Claude CLI claude --print execution outp… 1. MQTT broker publish… 2. subscribe_to_topics… 3. holon is queued in… 4. validate_holon() ch… 5. check_dependencies(… 6. groom() enhances ho… 7. _run_claude() runs… 8. execution log captu… 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": { ... }, "acceptance_criteria": [ ... ], "context": { ... }, "role": "claude-architect", "timeout_seconds": 3600, "max_retries": 2, "callback_topic": "kv/holon/result/<holon_id>"} Status Message {"holon_id": "KAN-167", "status": "queued|validating|executing|completed|failed", "phase": "validation|execution", "progress_percent": 0-100, "timestamp": "2026-05-23T18:15:00Z", "worker_id": "ralph-1", "service_version": "2026-05-23T074530Z-a3f8e2c", "message": "Validation passed, starting execution", "validation_errors": [], "execution_log_url": "http://localhost:8001/api/ralph/logs/KAN-167"} The source does not show any specific handling for blast radius approval or resource availability checks, so these are implied based on the specification. 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

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-08-02T101544Z
From commit
ab2bbdebf5
Watches
4 paths
  • daemon/docs/RALPH_SPEC.md
  • daemon/src/claude_exec.py
  • daemon/src/claude_context_api.py
  • daemon/src/claude_cost_tracker.py