ralph-loop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseralph-loop - Completion Enforcement Loop
ralph-loop - 完成强制循环
When to use this skill
何时使用此Skill
- Long-running implementation tasks that tend to stop early
- Tasks that need strict completion signaling
- Workflows using /
ultraworkin OpenCodeulw - Sessions where the agent must continue until exact completion
- 容易提前终止的长期实现任务
- 需要严格完成信号的任务
- 在OpenCode中使用/
ultrawork的工作流ulw - 需要Agent持续执行直到完全完成的会话
1. Core Command Pattern
1. 核心命令模式
Use the built-in command form:
text
/ralph-loop "<task description>" [--completion-promise=TEXT] [--max-iterations=N]Defaults:
- Completion promise:
DONE - Max iterations:
100
使用内置命令格式:
text
/ralph-loop "<任务描述>" [--completion-promise=文本] [--max-iterations=数字]默认值:
- 完成承诺:
DONE - 最大迭代次数:
100
2. How the Loop Behaves
2. 循环工作机制
- Starts with your task prompt.
- On each idle cycle, verifies whether the assistant output contains:
xml
<promise>DONE</promise>- If not found, injects a continuation prompt and increments iteration.
- Stops only when:
- Completion promise is detected, or
- Max iterations is reached, or
- You run .
/cancel-ralph
- 从你的任务提示开始。
- 在每个空闲周期,检查助手输出是否包含:
xml
<promise>DONE</promise>- 如果未找到,注入续期提示并增加迭代次数。
- 仅在以下情况停止:
- 检测到完成承诺,或
- 达到最大迭代次数,或
- 你执行。
/cancel-ralph
3. Practical Usage
3. 实际用法
Standard run
标准运行
text
/ralph-loop "Refactor auth module and finish all tests"text
/ralph-loop "重构认证模块并完成所有测试"Custom promise
自定义承诺
text
/ralph-loop "Migrate API clients to v2" --completion-promise=SHIP_ITtext
/ralph-loop "将API客户端迁移到v2版本" --completion-promise=SHIP_ITBounded iteration run
限制迭代次数的运行
text
/ralph-loop "Fix flaky CI tests" --max-iterations=20text
/ralph-loop "修复不稳定的CI测试" --max-iterations=20Cancel active loop
取消活跃循环
text
/cancel-ralphtext
/cancel-ralph4. Integration Notes for skills-template
4. 与skills-template的集成说明
- Keep this skill as an operational guide for OpenCode workflows.
- Pair with orchestration skills (for example, ) when tasks require delegation.
ohmg - Require explicit completion tags in final responses to avoid premature stop.
- 将此Skill作为OpenCode工作流的操作指南。
- 当任务需要委托时,与编排类Skill(例如)配合使用。
ohmg - 要求最终响应中包含明确的完成标签,避免提前终止。
Quick Reference
快速参考
| Action | Command |
|---|---|
| Start loop | |
| Custom promise | |
| Iteration cap | |
| Cancel | |
| 操作 | 命令 |
|---|---|
| 启动循环 | |
| 自定义承诺 | |
| 迭代次数上限 | |
| 取消 | |