diff --git a/CLAUDE.md b/CLAUDE.md index aad1b64..719e9cd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -46,6 +46,12 @@ get_domain_summary("custodian") # workstreams, blocking decisions, recent prog ``` If the call fails, the API is offline: `cd ~/the-custodian/state-hub && make api` +**Step 1b — Check the agent inbox** +``` +get_messages(to_agent="activity-core", unread_only=True) +``` +Mark messages read with `mark_message_read(message_id)`. Act on any coordination requests before proceeding. + **Step 2 — Scan local workplans** Read every `.md` file under `workplans/`. For each file with `status: active`, extract and note: @@ -170,6 +176,24 @@ make ingest-sbom REPO=activity-core SCAN=1 REPO_PATH=$(pwd) --- +### Ralph Loop — Workplan-Tied Usage + +**Rule: always use `/ralph-workplan` instead of `/ralph-loop` directly.** + +``` +/ralph-workplan workplans/-.md [--max-iterations 20] +``` + +This skill guards against runaway loops: +1. **Refuses to start** if the workplan `status` is already `done` +2. **Self-retires** — re-reads the workplan file each iteration; outputs `HEUREKA` the moment all tasks are `done` +3. Always sets `--completion-promise HEUREKA` and a bounded iteration count + +**Never** start a ralph loop with a raw static implementation prompt. A static prompt +has no completion awareness and will loop forever even after the work is done. + +--- + ### Quick Reference `~/the-custodian/state-hub/mcp_server/TOOLS.md` — compact MCP tool reference