with one click
ralph
自引用循环直至任务完成,并由 architect 验证
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
自引用循环直至任务完成,并由 architect 验证
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
oh-my-kimi 的目录入口,包含面向 Kimi CLI 的 agent、skill、hook 与 MCP 套件,衍生自 oh-my-* 谱系。
面向密钥、注入、authz/authn、不安全 IO、依赖与数据外泄风险的安全评审
证据驱动的追踪通道,在 Kimi 的 Agent 工具中编排互相竞争的 tracer 假设
LLM Wiki —— 跨会话持续累积的 markdown 知识库(Karpathy 模型)
面向作家的 agentic 记忆系统 —— 跟踪人物、关系、场景与主题
跑只读的深度仓库分析,返回一份带置信度排序的综合结论,附具体文件引用、清晰区分证据与推断。当用户说 'analyze'、'investigate'、'why does'、'what's causing',或在提任何改动方案之前需要跨文件的有据解释时使用。
| name | ralph |
| description | 自引用循环直至任务完成,并由 architect 验证 |
[RALPH + ULTRAWORK - ITERATION {{ITERATION}}/{{MAX}}]
Your previous attempt did not output the completion promise. Continue working on the task.
Ralph 是一个持久化循环,会持续推进任务直到完全完成并经 architect 验证。它在 ultrawork 的并行执行外裹上会话持久化、失败自动重试,以及完成前的强制验证。<Use_When>
<Do_Not_Use_When>
autopilotplan skillultrawork
</Do_Not_Use_When><Why_This_Exists> 复杂任务常常静默失败:部分实现被宣布为「done」、测试被跳过、边界情况被遗忘。Ralph 通过持续循环直到工作真正完成、要求新鲜的验证证据后才允许完成、并通过分层的 architect 评审来确认质量,避免这些问题。 </Why_This_Exists>
<Execution_Policy>
run_in_background: truemodel 参数docs/shared/agent-tiers.md,挑选正确的 agent tierget_goal 检视当前线程 goal,把它保留为顶层停止条件,且仅在 Ralph 的完成审计证明目标真的达成后调用 update_goal({status: "complete"})。
</Execution_Policy><Tool_Usage>
ask_codex 配 agent_role: "architect" 做验证交叉核对omk state write/read --input '<json>' --json 在迭代之间持久化 ralph 模式状态get_goal 发现或复检当前目标,create_goal 仅在用户 / 系统显式要求新建 goal 且当前无激活 goal 时使用,update_goal 仅在被审计目标完全达成后使用。omx_state 调用报告其 stdio transport 不可用 / 关闭,不要重试同一 MCP 调用。改为通过受支持的 CLI 同步面用同一 payload 重试一次,并保留 workingDirectory 与 session_id:omk state write --input '<json>' --json、omk state read --input '<json>' --json 或 omk state clear --input '<json>' --json。若 CLI 路径也失败,转用 .omk/context / .omk/plans 等文件支持的工件,并报告状态持久化的阻塞。
</Tool_Usage>Codex goal mode 是长跑 Ralph 工作的线程级完成契约。Ralph state 跟踪工作流机制;goal mode 跟踪用户目标是否真的达成。当 goal 工具可用时:
get_goal。create_goal;否则只用 Ralph state。goal.objective 当作有约束力的验收范围。新用户更新可以精炼当前分支,但不要静默缩窄目标。$ralplan、$ralph)、文件、命令、测试、闸门与交付物映射到证据update_goal({status: "complete"})。不要把通过的测试、Ralph state 或 architect 通过当作通用证明,除非它们覆盖整个目标。用 CLI-first 的状态接口管 Ralph 生命周期状态(omk state write/read/clear --input '<json>' --json)。显式 MCP 兼容工具(state_write、state_read、state_clear)仅在已启用时才可用。
omk state write --input '{"mode":"ralph","active":true,"iteration":1,"max_iterations":10,"current_phase":"executing","started_at":"<now>","state":{"context_snapshot_path":"<snapshot-path>"}}' --jsonomk state write --input '{"mode":"ralph","iteration":<current>,"current_phase":"executing"}' --jsonomk state write --input '{"mode":"ralph","current_phase":"verifying"}' --json 或 omk state write --input '{"mode":"ralph","current_phase":"fixing"}' --jsonomk state write --input '{"mode":"ralph","active":false,"current_phase":"complete","completed_at":"<now>"}' --json$cancel(它应当调 omk state clear --input '{"mode":"ralph"}' --json)Good: 工作流已有清晰的下一步,用户说 continue。沿当前分支继续,不重启也不重复问同样问题。
Good: 用户只改变输出形态或下游交付步骤(例如 make a PR)。保留此前不冲突的工作流约束,并在局部应用更新。
Bad: 用户说 continue,工作流却重启发现流程,或在缺失校验 / 证据收齐之前就停下。
<Escalation_And_Stop_Conditions>
/cancel<Final_Checklist>
update_goal({status: "complete"})/cancel 做状态清理
</Final_Checklist>用户提供 --prd 标志时,在启动 ralph 循环前先初始化一份 Product Requirements Document。
检查 {{PROMPT}} 是否含 --prd 或 --PRD。
prompt 侧的 $ralph 工作流激活比 omk ralph --prd ... 更轻量。
它播种 Ralph 工作流状态与指引,但不隐式启动 CLI 入口或应用 PRD 启动闸门。把 omk ralph --prd ... 当作显式 PRD-gated 路径。
--no-deslop检查 {{PROMPT}} 是否含 --no-deslop。
若有,整段跳过步骤 7 之后的 deslop pass,沿用最近一次成功 pre-deslop 校验证据。
Ralph 执行支持视觉参考标志用于截图任务:
-i <image-path>(可多次)--images-dir <directory>例:
ralph -i refs/hn.png -i refs/hn-item.png --images-dir ./screenshots "match HackerNews layout"
$deep-interview --quick <task>.omk/interviews/{slug}-{timestamp}.md.omk/plans/prd-{slug}.md.omk/state/{scope}/ralph-progress.json(可用时用 session scope,否则用 root scope)--prd 标志之后的全部){
"project": "[Project Name]",
"branchName": "ralph/[feature-name]",
"description": "[Feature description]",
"userStories": [
{
"id": "US-001",
"title": "[Short title]",
"description": "As a [user], I want to [action] so that [benefit].",
"acceptanceCriteria": ["Criterion 1", "Typecheck passes"],
"priority": 1,
"passes": false
}
]
}
.omk/state/{scope}/ralph-progress.json 初始化权威 progress ledger用户输入:--prd build a todo app with React and TypeScript
工作流:检测标志、抽取任务、创建 .omk/plans/prd-{slug}.md、创建 .omk/state/{scope}/ralph-progress.json、开始 ralph 循环。
--prd 启动仍校验 .omk/prd.json 的机器可读 story 状态。.omk/plans/prd-{slug}.md 仍是权威存储 / 文档工件,但还不是启动校验源。.omk/prd.json 存在且权威 PRD 缺失,单向迁移到 .omk/plans/prd-{slug}.md。.omk/progress.txt 存在且权威 progress ledger 缺失,单向导入到 .omk/state/{scope}/ralph-progress.json。放后台(run_in_background: true):
阻塞前台:
Original task: {{PROMPT}}