ralph by yeachan-heo/oh-my-claudecode
npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill ralph[RALPH + ULTRAWORK - 迭代 {{ITERATION}}/{{MAX}}]
你之前的尝试没有输出完成承诺。请继续处理该任务。
<使用时机>
<不使用时>
autopilotplan 技能ultrawork
</不使用时><存在原因> 复杂任务常常无声地失败:部分实现被宣布为“完成”,测试被跳过,边界情况被遗忘。Ralph 通过以下方式防止这种情况:
<PRD_模式> 默认情况下,ralph 在 PRD 模式下运行。如果启动 ralph 时不存在 prd.json,则会自动生成一个脚手架 prd.json。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
选择退出: 如果 {{PROMPT}} 包含 --no-prd,则跳过 PRD 生成,在传统模式下工作(无故事跟踪,通用验证)。用于琐碎的快速修复。
Deslop 选择退出: 如果 {{PROMPT}} 包含 --no-deslop,则完全跳过强制性的评审后 deslop 阶段。仅当清理阶段有意不在本次运行范围内时使用此选项。
评审员选择: 在 Ralph 提示中传递 --critic=architect、--critic=critic 或 --critic=codex 以选择该次运行的完成评审员。architect 保持为默认值。
</PRD_模式>
<执行策略>
run_in_background: truemodel 参数docs/shared/agent-tiers.md 以选择正确的代理层级<工作流程>
初始化:读取 progress.txt 和 prd.json(如果存在)。如果不存在 prd.json 且未指定 --no-prd,则生成一个脚手架 prd.json,其中包含从 {{PROMPT}} 派生的用户故事和通用验收标准。
选择下一个故事:读取 prd.json 并选择 passes: false 的最高优先级故事。这是你当前的重点。
实现当前故事:
prd.jsonrun_in_background: true验证当前故事的验收标准: a. 对于故事中的每一个验收标准,用新的证据验证其是否满足 b. 运行相关检查(测试、构建、lint、类型检查)并读取输出 c. 如果有任何标准未满足,继续工作——不要将故事标记为完成
标记故事完成:
a. 当所有验收标准都验证通过后,在 prd.json 中为此故事设置 passes: true
b. 在 progress.txt 中记录进度:实现了什么、更改了哪些文件、为未来迭代总结的学习内容
c. 将发现的任何代码库模式添加到 progress.txt
检查 PRD 完成情况:
a. 读取 prd.json——是否所有故事都标记为 passes: true?
b. 如果并非全部完成,则循环回步骤 2(选择下一个故事)
c. 如果全部完成,则继续步骤 7(架构师验证)
评审员验证(分层,针对验收标准):
<5 个文件,<100 行且具有完整测试:至少 STANDARD 层级(architect-medium / Sonnet)
标准更改:STANDARD 层级(architect-medium / Sonnet)
20 个文件或安全/架构更改:THOROUGH 层级(architect / Opus)
如果 --critic=critic,则使用 Claude critic 代理进行批准阶段
如果 --critic=codex,则运行 omc ask codex --agent-prompt critic "..." 进行批准阶段
Ralph 底线:即使对于小更改,也至少为 STANDARD 层级
选定的评审员根据 prd.json 中的特定验收标准进行验证,而不是模糊的“是否完成?”
7.5 强制 Deslop 阶段:
{{PROMPT}} 包含 --no-deslop,否则在标准模式下(非 --review)对仅在当前 Ralph 会话期间更改的文件运行 oh-my-claudecode:ai-slop-cleaner。7.6 回归重新验证:
--no-deslop)后,才继续完成。批准后:在步骤 7.6 通过后(步骤 7.5 已完成,或通过 --no-deslop 跳过),运行 /oh-my-claudecode:cancel 以干净地退出并清理所有状态文件
拒绝后:修复提出的问题,使用相同的评审员重新验证,然后循环回检查是否需要将故事标记为未完成
<工具使用>
Task(subagent_type="oh-my-claudecode:architect", ...) 进行架构师验证交叉检查--critic=critic 时,使用 Task(subagent_type="oh-my-claudecode:critic", ...)--critic=codex 时,使用 omc ask codex --agent-prompt critic "..."state_write / state_read 在迭代间持久化 ralph 模式状态
</工具使用><示例>
<好>
细化后的验收标准:
acceptanceCriteria: [ "detectNoPrdFlag('ralph --no-prd fix') returns true", "detectNoPrdFlag('ralph fix this') returns false", "stripNoPrdFlag removes --no-prd and trims whitespace", "TypeScript compiles with no errors (npm run build)" ]
为什么好:通用标准被替换为具体的、可测试的标准。
</好>
<好>
正确的并行委托:
Task(subagent_type="oh-my-claudecode:executor", model="haiku", prompt="Add type export for UserConfig") Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="Implement the caching layer for API responses") Task(subagent_type="oh-my-claudecode:executor", model="opus", prompt="Refactor auth module to support OAuth2 flow")
为什么好:三个独立任务在适当的层级同时触发。
</好>
<好>
逐个故事验证:
为什么好:每个故事在标记完成前都根据其自身的验收标准进行了验证。
</好>
<差>
未经 PRD 验证即声称完成:
"所有更改看起来都不错,实现应该能正确工作。任务完成。"
为什么差:使用了“应该”和“看起来不错”——没有新的证据,没有逐个故事验证,没有架构师评审。
</差>
<差>
独立任务的顺序执行:
Task(executor, "Add type export") → 等待 → Task(executor, "Implement caching") → 等待 → Task(executor, "Refactor auth")
为什么差:这些是应该并行运行而非顺序执行的独立任务。
</差>
<差>
保留通用验收标准:
"prd.json 已创建,标准为:实现完成,代码编译。继续编码。"
为什么差:没有将脚手架标准细化为特定于任务的标准。这是 PRD 形式主义。
</差>
</示例>
<升级和停止条件>
/oh-my-claudecode:cancel<最终检查清单>
passes: true(没有未完成的故事)--no-deslop)/oh-my-claudecode:cancel 以进行干净的状态清理
</最终检查清单><高级>
在后台运行 (run_in_background: true):
阻塞运行(前台):
原始任务: {{PROMPT}}
每周安装量
177
代码仓库
GitHub 星标数
11.2K
首次出现
2026年1月22日
安全审计
安装于
opencode162
gemini-cli158
codex155
cursor147
claude-code145
github-copilot143
[RALPH + ULTRAWORK - ITERATION {{ITERATION}}/{{MAX}}]
Your previous attempt did not output the completion promise. Continue working on the task.
<Use_When>
<Do_Not_Use_When>
autopilot insteadplan skill insteadultrawork directly </Do_Not_Use_When><Why_This_Exists> Complex tasks often fail silently: partial implementations get declared "done", tests get skipped, edge cases get forgotten. Ralph prevents this by:
<PRD_Mode> By default, ralph operates in PRD mode. A scaffold prd.json is auto-generated when ralph starts if none exists.
Opt-out: If {{PROMPT}} contains --no-prd, skip PRD generation and work in legacy mode (no story tracking, generic verification). Use this for trivial quick fixes.
Deslop opt-out: If {{PROMPT}} contains --no-deslop, skip the mandatory post-review deslop pass entirely. Use this only when the cleanup pass is intentionally out of scope for the run.
Reviewer selection: Pass --critic=architect, --critic=critic, or --critic=codex in the Ralph prompt to choose the completion reviewer for that run. architect remains the default. </PRD_Mode>
<Execution_Policy>
run_in_background: true for long operations (installs, builds, test suites)model parameter explicitly when delegating to agentsdocs/shared/agent-tiers.md before first delegation to select correct agent tiersPick next story : Read prd.json and select the highest-priority story with passes: false. This is your current focus.
Implement the current story :
prd.jsonrun_in_background: trueVerify the current story's acceptance criteria : a. For EACH acceptance criterion in the story, verify it is met with fresh evidence b. Run relevant checks (test, build, lint, typecheck) and read the output c. If any criterion is NOT met, continue working -- do NOT mark the story as complete
Mark story complete : a. When ALL acceptance criteria are verified, set passes: true for this story in b. Record progress in : what was implemented, files changed, learnings for future iterations c. Add any discovered codebase patterns to
7.5 Mandatory Deslop Pass :
{{PROMPT}} contains --no-deslop, run oh-my-claudecode:ai-slop-cleaner in standard mode (not --review) on the files changed during the current Ralph session only.7.6 Regression Re-verification :
--no-deslop was explicitly specified).On approval : After Step 7.6 passes (with Step 7.5 completed, or skipped via --no-deslop), run /oh-my-claudecode:cancel to cleanly exit and clean up all state files
On rejection : Fix the issues raised, re-verify with the same reviewer, then loop back to check if the story needs to be marked incomplete
<Tool_Usage>
Task(subagent_type="oh-my-claudecode:architect", ...) for architect verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integrationTask(subagent_type="oh-my-claudecode:critic", ...) when --critic=criticomc ask codex --agent-prompt critic "..." when --critic=codexstate_write / state_read for ralph mode state persistence between iterations </Tool_Usage>After refinement: acceptanceCriteria: [ "detectNoPrdFlag('ralph --no-prd fix') returns true", "detectNoPrdFlag('ralph fix this') returns false", "stripNoPrdFlag removes --no-prd and trims whitespace", "TypeScript compiles with no errors (npm run build)" ]
Why good: Generic criteria replaced with specific, testable criteria.
</Good>
<Good>
Correct parallel delegation:
Task(subagent_type="oh-my-claudecode:executor", model="haiku", prompt="Add type export for UserConfig") Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="Implement the caching layer for API responses") Task(subagent_type="oh-my-claudecode:executor", model="opus", prompt="Refactor auth module to support OAuth2 flow")
Why good: Three independent tasks fired simultaneously at appropriate tiers.
</Good>
<Good>
Story-by-story verification:
Why good: Each story verified against its own acceptance criteria before marking complete.
</Good>
<Bad>
Claiming completion without PRD verification:
"All the changes look good, the implementation should work correctly. Task complete."
Why bad: Uses "should" and "look good" -- no fresh evidence, no story-by-story verification, no architect review.
</Bad>
<Bad>
Sequential execution of independent tasks:
Task(executor, "Add type export") → wait → Task(executor, "Implement caching") → wait → Task(executor, "Refactor auth")
Why bad: These are independent tasks that should run in parallel, not sequentially.
</Bad>
<Bad>
Keeping generic acceptance criteria:
"prd.json created with criteria: Implementation is complete, Code compiles. Moving on to coding."
Why bad: Did not refine scaffold criteria into task-specific ones. This is PRD theater.
</Bad>
</Examples>
<Escalation_And_Stop_Conditions>
- Stop and report when a fundamental blocker requires user input (missing credentials, unclear requirements, external service down)
- Stop when the user says "stop", "cancel", or "abort" -- run `/oh-my-claudecode:cancel`
- Continue working when the hook system sends "The boulder never stops" -- this means the iteration continues
- If the selected reviewer rejects verification, fix the issues and re-verify (do not stop)
- If the same issue recurs across 3+ iterations, report it as a potential fundamental problem
</Escalation_And_Stop_Conditions>
<Final_Checklist>
- [ ] All prd.json stories have `passes: true` (no incomplete stories)
- [ ] prd.json acceptance criteria are task-specific (not generic boilerplate)
- [ ] All requirements from the original task are met (no scope reduction)
- [ ] Zero pending or in_progress TODO items
- [ ] Fresh test run output shows all tests pass
- [ ] Fresh build output shows success
- [ ] lsp_diagnostics shows 0 errors on affected files
- [ ] progress.txt records implementation details and learnings
- [ ] Selected reviewer verification passed against specific acceptance criteria
- [ ] ai-slop-cleaner pass completed on changed files (or `--no-deslop` specified)
- [ ] Post-deslop regression tests pass
- [ ] `/oh-my-claudecode:cancel` run for clean state cleanup
</Final_Checklist>
<Advanced>
## Background Execution Rules
**Run in background** (`run_in_background: true`):
- Package installation (npm install, pip install, cargo build)
- Build processes (make, project build commands)
- Test suites
- Docker operations (docker build, docker pull)
**Run blocking** (foreground):
- Quick status checks (git status, ls, pwd)
- File reads and edits
- Simple commands
</Advanced>
Original task:
{{PROMPT}}
Weekly Installs
177
Repository
GitHub Stars
11.2K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode162
gemini-cli158
codex155
cursor147
claude-code145
github-copilot143
开源项目教练指南 - 诊断问题、制定行动计划、优化开源项目运营
33,600 周安装
prd.jsonprogress.txtprogress.txtCheck PRD completion : a. Read prd.json -- are ALL stories marked passes: true? b. If NOT all complete, loop back to Step 2 (pick next story) c. If ALL complete, proceed to Step 7 (architect verification)
Reviewer verification (tiered, against acceptance criteria):
<5 files, <100 lines with full tests: STANDARD tier minimum (architect-medium / Sonnet)
Standard changes: STANDARD tier (architect-medium / Sonnet)
20 files or security/architectural changes: THOROUGH tier (architect / Opus)
If --critic=critic, use the Claude critic agent for the approval pass
If --critic=codex, run omc ask codex --agent-prompt critic "..." for the approval pass
Ralph floor: always at least STANDARD, even for small changes
The selected reviewer verifies against the SPECIFIC acceptance criteria from prd.json, not vague "is it done?"