skill/ralph/SKILL.md
Run an iterative implement→audit loop for a target work item. Ralph is a launcher/orchestrator, not the normal Worklog implementation workflow.
npx skillsauth add sorratheorc/sorraagents ralphInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the operator asks to run ralph <work-item-id> or ralph status.
When invoked as ralph <work-item-id>, do not perform general Worklog discovery or planning steps before launching the Ralph loop. Only inspect work items when the operator explicitly asks for diagnostics or when the launch fails and you need to debug the failure.
The skill accepts a work-item id provided inline in the user's command. Supported invocation forms include:
/ralph <WORKITEM>ralph <WORKITEM>run ralph <WORKITEM>ralph loop <WORKITEM>A work-item id is any short token matching the Worklog id pattern used in your environment (for example WL-1234, CG-0MP12H40Q003Y7OU, or an 8+ char identifier). When an id is present in the command the skill will use it and will not prompt for an id. If no id is detected, the skill will ask the operator to provide one or abort, except for ralph status, which is an intentional no-id exception.
ralph status, which intentionally runs without a work-item id.ralph <work-item-id>, immediately run the deterministic loop through the skill/ralph/ralph wrapper so the run starts under nohup and the launcher records the PID, start time, and log path needed by ralph status.ralph status to inspect the current background run without needing the original work-item id.For direct foreground debugging, run the script locally:
--child <id> only when you explicitly want to focus Ralph on a single direct child work item while keeping the parent as context.--debug-persist when you need to save raw Pi payloads for no_text_extracted debugging.Delegated pi and wl commands are logged before execution in both normal console output and --json output, so operators and automation can see the exact command Ralph ran.
If streamed pi output stops producing stdout and keeps the pipe open too long, Ralph will terminate the run with a clear stall error instead of hanging indefinitely.
When Ralph's implement→audit loop ends (whether by success, cancellation, max attempts, or producer-input-required), it runs a deterministic cleanup step for any lingering Pi subprocess:
process.kill()) and waits up to 1 second for it to drain.ralph.cleanup.pi.graceful_exit) from forced termination (ralph.cleanup.pi.forced_kill) in the log output.The cleanup is safe to call even if the process has already exited — it checks process.poll() before sending any signals.
Ralph supports phase-specific model selection for intake, planning, implementation, and audit.
--model-source <remote|local> (default: local)ralph <id> remote or ralph <id> local (equivalent to --model-source)--model-intake--model-planning--model-implementation--model-auditmodel_source plus model.<phase> keys (nested object or dotted keys).--model / string model config / skill/ralph/assets/.ralph.json defaults).skill/ralph/assets/.ralph.json. Values in that file are overridden by a .ralph.json in the current working directory, which in turn are overridden by CLI flags.# Launch a background Ralph run from the skill installation.
# The wrapper handles nohup plus PID/start-time capture for status reporting.
# Preferred (skill-relative):
skill/ralph/ralph <work-item-id> --json
# Inspect the current background run (no work item id required):
skill/ralph/ralph status --json
# If you need to run the foreground loop directly for debugging:
# python3 skill/ralph/scripts/ralph_loop.py <work-item-id> --json
#
# To focus on a single direct child while keeping the parent for context:
# python3 skill/ralph/scripts/ralph_loop.py <parent-id> --child <child-id> --json
# If your skills are installed at a different location (for example a
# project-level skills directory), run the script using the full path to
# that skill directory instead, e.g.:
# python3 /path/to/skills/ralph/scripts/ralph_loop.py <work-item-id> --json
See docs/ralph.md and ralph --help for full details of the features available.
When the operator runs ralph status, keep the report brief and focused on essentials:
status, and report the totals plus deltas since the last status report.Keep any remembered values needed for status reporting, such as issue counts and the last log cursor, in the control-loop context. Do not persist them between runs.
development
Canonical push-to-dev and branch-policy enforcement for agents. Provides the push-to-dev workflow, branch naming, conflict handling, and release process guidance. Trigger with: /skill:ship push-to-dev
development
Write tests, docs and code for a single, specific Worklog work item. Unlike the `implement` skill, this skill operates on exactly one work-item without using `wl next` for recursive dependency resolution or sub-task discovery. It is designed to be invoked by Ralph's per-child loop so that each child is implemented, audited, and remediated independently. Trigger on user queries such as: 'implement-single <work-item-id>', 'complete <work-item-id> (single)', or when Ralph delegates a single-child implement step.
development
Infer a suspected owner for a failing test file using CODEOWNERS, git blame, recent commits, and an override map.
testing
Discover related work for a Worklog work item and generate a concise, auditable "Related work" report that can be appended to the work item description.