一键导入
ralph
Run an iterative implement→audit loop for a target work item. Ralph is a launcher/orchestrator, not the normal Worklog implementation workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run an iterative implement→audit loop for a target work item. Ralph is a launcher/orchestrator, not the normal Worklog implementation workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
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
Automated batch planning for intake_complete work items. Discovers all items in intake_complete status and invokes /plan for each sequentially, producing a summary report.
Provide concise project / work item status and run Worklog helpers to augment results. Trigger on user queries such as: 'What is the current status?', 'Status of the project?', 'What is the status of <work-item-id>?', 'status', 'status <work-item-id>', 'audit', 'audit <work-item-id>'
Write tests, docs and code for a Worklog work item by following a deterministic workflow. Ensure implementation meets defined acceptance criteria. Trigger on user queries such as: 'Implement <work-item-id>', 'Complete <work-item-id>', 'Work on <work-item-id>'.
Triage workflows and helpers for test-failure detection and critical issue creation. Provides a skill to search for or create critical `test-failure` work items and related resources.
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.
基于 SOC 职业分类
| name | ralph |
| description | Run an iterative implement→audit loop for a target work item. Ralph is a launcher/orchestrator, not the normal Worklog implementation workflow. |
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.skill/ralph/ralph status --json.ralph status to monitor progress.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.
When Ralph processes a parent work item with children, it creates a single feature branch at the start of the run and all child iterations reuse that branch. This ensures:
wl-<parent-id>-<short-desc>The branch is created once before the first child iteration and passed to all subsequent child implementations via the parent_branch parameter.
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.
skill/ralph/ralph (preferred wrapper that records PID/start-time and handles background runs)skill/ralph/scripts/ralph_loop.py (python3)skill/ralph/scripts/ralph_control.py, skill/ralph/scripts/structured_response.pyExample (documentation):
# Start a background Ralph run for work item SA-0MPYMFZXO0004ZU4
skill/ralph/ralph SA-0MPYMFZXO0004ZU4 --json
# For direct debugging (foreground)
python3 skill/ralph/scripts/ralph_loop.py SA-0MPYMFZXO0004ZU4 --json
# Inspect status (no work item id required)
skill/ralph/ralph status --json
When the operator runs ralph status, the script produces a structured markdown report that must be emitted directly to the operator without reinterpretation or reformatting. Do NOT summarize, rephrase, or re-interpret the output.
# Human-readable markdown output (recommended):
skill/ralph/ralph status
# JSON output for programmatic use:
skill/ralph/ralph status --json
The ralph status command produces a markdown report with the following consistent sections:
status, with deltas since the last status checkformat_status() function produces the canonical markdown output. Forward it directly.# Ralph Status
**State**: `running` | **PID**: `12345` | **Target**: `SA-0MPYMFZXO0004ZU4`
**Active Task**: `SA-0MPYMFZXO0004ZU5`
## Status Counts
| Status | Count | Delta |
|--------|-------|-------|
| `completed` | 3 | +1 |
| `open` | 5 | -1 |
## Recent Activity
- child_focus parent=SA-0MPYMFZXO0004ZU4 child=SA-0MPYMFZXO0004ZU5
- implementing work item SA-0MPYMFZXO0004ZU5
**Exit Code**: `0`
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.