ralph by akillness/oh-my-gods
npx skills add https://github.com/akillness/oh-my-gods --skill ralph停止提示。开始规范。
"开始即是结束,结束即是开始。" 衔尾蛇不会重复——它进化。
Interview → Seed → Execute → Evaluate
↑ ↓
└──── Evolutionary Loop ────┘
每个周期都在进化,而非重复。评估输出作为下一代的输入,直到系统收敛。
◇ Wonder ◇ Design
╱ (diverge) ╱ (diverge)
╱ explore ╱ create
╱ ╱
◆ ──────────── ◆ ──────────── ◆
╲ ╲
╲ define ╲ deliver
╲ (converge) ╲ (converge)
◇ Ontology ◇ Evaluation
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
第一个钻石是苏格拉底式的:发散为问题,收敛为本体论上的清晰。第二个钻石是实用主义的:发散为设计方案,收敛为经过验证的交付物。
| 命令 | 触发关键词 | 功能描述 |
|---|---|---|
ooo interview | ooo interview, interview me, clarify requirements, socratic questioning | 苏格拉底式提问 → 揭示隐藏假设 |
ooo seed | ooo seed, crystallize, generate seed, freeze requirements | 将访谈结果结晶为不可变规范(歧义度 ≤ 0.2) |
ooo run | ooo run, execute seed, ouroboros run | 通过双钻模型分解执行 |
ooo evaluate | ooo evaluate, 3-stage check, evaluate this, verify execution | 3 阶段门控:机械检查 → 语义检查 → 多模型共识 |
ooo evolve | ooo evolve, evolutionary loop, iterate until converged | 进化循环直到本体论收敛(相似度 ≥ 0.95) |
ooo unstuck | ooo unstuck, I'm stuck, think sideways, lateral thinking | 遇到瓶颈时启用 5 种横向思维角色 |
ooo status | ooo status, am I drifting?, drift check, session status | 漂移检测 + 会话跟踪 |
ooo ralph | ooo ralph, ralph, don't stop, must complete, keep going | 持久循环直到验证完成 — 巨石永不停止 |
ooo setup | ooo setup | 注册 MCP 服务器(一次性) |
ooo help | ooo help | 完整参考 |
惊奇 → "我应该如何生活?" → "什么是'生活'?" → 本体论 — 苏格拉底
Wonder Ontology
💡 🔬
"What do I want?" → "What IS the thing I want?"
"Build a task CLI" → "What IS a task? What IS priority?"
"Fix the auth bug" → "Is this the root cause, or a symptom?"
ooo interview "I want to build a task management CLI"
苏格拉底式访谈者会持续提问,直到歧义度 ≤ 0.2。
歧义度公式:
Ambiguity = 1 − Σ(clarityᵢ × weightᵢ)
Greenfield: Goal(40%) + Constraint(30%) + Success(30%)
Brownfield: Goal(35%) + Constraint(25%) + Success(25%) + Context(15%)
Threshold: Ambiguity ≤ 0.2 → ready for Seed
示例评分:
Goal: 0.9 × 0.4 = 0.36
Constraint: 0.8 × 0.3 = 0.24
Success: 0.7 × 0.3 = 0.21
──────
Clarity = 0.81
Ambiguity = 1 − 0.81 = 0.19 ≤ 0.2 → ✓ Ready for Seed
ooo seed
生成 YAML 规范:
goal: Build a CLI task management tool
constraints:
- Python 3.14+
- No external database
- SQLite for persistence
acceptance_criteria:
- Tasks can be created
- Tasks can be listed
- Tasks can be marked complete
ontology_schema:
name: TaskManager
fields:
- name: tasks
type: array
- name: title
type: string
ooo run seed.yaml
ooo run # uses seed from conversation context
ooo evaluate <session_id>
| 阶段 | 成本 | 检查内容 |
|---|---|---|
| 机械检查 | $0 | 代码规范检查、构建、测试、覆盖率 |
| 语义检查 | 标准 | 验收标准符合度、目标对齐度、漂移分数 |
| 共识检查 | 前沿模型(可选) | 多模型投票、多数比例 |
漂移阈值:
0.0 – 0.15 — 优秀:进展顺利0.15 – 0.30 — 可接受:密切监控0.30+ — 超出:需要调整方向ooo ralph "fix all failing tests"
/ouroboros:ralph "fix all failing tests"
"巨石永不停止。" 每次失败都是下一次尝试的数据。只有完全成功或达到最大迭代次数才会停止。
┌─────────────────────────────────┐
│ 1. EXECUTE (parallel) │
│ Independent tasks │
│ concurrent scheduling │
├─────────────────────────────────┤
│ 2. VERIFY │
│ Check completion │
│ Validate tests pass │
│ Measure drift vs seed │
├─────────────────────────────────┤
│ 3. LOOP (if failed) │
│ Analyze failure │
│ Fix identified issues │
│ Repeat from step 1 │
├─────────────────────────────────┤
│ 4. PERSIST (checkpoint) │
│ .omc/state/ralph-state.json │
│ Resume after interruption │
└─────────────────────────────────┘
启动时创建 .omc/state/ralph-state.json:
{
"mode": "ralph",
"session_id": "<uuid>",
"request": "<user request>",
"status": "running",
"iteration": 0,
"max_iterations": 10,
"last_checkpoint": null,
"verification_history": []
}
while iteration < max_iterations:
result = execute_parallel(request, context)
verification = verify_result(result, acceptance_criteria)
state.verification_history.append({
"iteration": iteration,
"passed": verification.passed,
"score": verification.score,
"timestamp": <now>
})
if verification.passed:
save_checkpoint("complete")
break
iteration += 1
save_checkpoint("iteration_{iteration}")
[Ralph Iteration 1/10]
Executing in parallel...
Verification: FAILED
Score: 0.65
Issues:
- 3 tests still failing
- Type errors in src/api.py
The boulder never stops. Continuing...
[Ralph Iteration 3/10]
Executing in parallel...
Verification: PASSED
Score: 1.0
Ralph COMPLETE
==============
Request: Fix all failing tests
Duration: 8m 32s
Iterations: 3
Verification History:
- Iteration 1: FAILED (0.65)
- Iteration 2: FAILED (0.85)
- Iteration 3: PASSED (1.0)
| 操作 | 命令 |
|---|---|
| 保存检查点并退出 | /ouroboros:cancel |
| 强制清除所有状态 | /ouroboros:cancel --force |
| 中断后恢复 | ooo ralph continue 或 ralph continue |
ooo evolve "build a task management CLI"
ooo evolve "build a task management CLI" --no-execute # ontology-only, fast mode
Gen 1: Interview → Seed(O₁) → Execute → Evaluate
Gen 2: Wonder → Reflect → Seed(O₂) → Execute → Evaluate
Gen 3: Wonder → Reflect → Seed(O₃) → Execute → Evaluate
...until ontology converges (similarity ≥ 0.95) or max 30 generations
Similarity = 0.5 × name_overlap + 0.3 × type_match + 0.2 × exact_match
Threshold: Similarity ≥ 0.95 → CONVERGED
Gen 1: {Task, Priority, Status}
Gen 2: {Task, Priority, Status, DueDate} → similarity 0.78 → CONTINUE
Gen 3: {Task, Priority, Status, DueDate} → similarity 1.00 → CONVERGED ✓
| 信号 | 条件 | 含义 |
|---|---|---|
| 停滞 | 连续 3 代相似度 ≥ 0.95 | 本体论已稳定 |
| 振荡 | 第 N 代 ≈ 第 N-2 代(周期为 2 的循环) | 在两个设计方案间反复跳转 |
| 重复反馈 | 跨越 3 代的问题重叠度 ≥ 70% | 惊奇阶段反复询问相同内容 |
| 硬性上限 | 达到 30 代 | 安全阀 |
Ralph Cycle 1: evolve_step(lineage, seed) → Gen 1 → action=CONTINUE
Ralph Cycle 2: evolve_step(lineage) → Gen 2 → action=CONTINUE
Ralph Cycle 3: evolve_step(lineage) → Gen 3 → action=CONVERGED ✓
└── Ralph stops.
The ontology has stabilized.
ooo evolve --status <lineage_id> # check lineage status
ooo evolve --rewind <lineage_id> <gen_N> # roll back to generation N
按需加载 — 从不预加载:
| 智能体 | 角色 | 核心问题 |
|---|---|---|
| 苏格拉底式访谈者 | 仅提问。从不构建。 | "你假设了什么?" |
| 本体论者 | 寻找本质,而非表象 | "这到底是什么?" |
| 种子架构师 | 从对话中结晶出规范 | "这是完整且无歧义的吗?" |
| 评估者 | 3 阶段验证 | "我们构建了正确的东西吗?" |
| 反对者 | 挑战每一个假设 | "如果相反的情况成立呢?" |
| 黑客 | 寻找非常规路径 | "哪些约束是真实存在的?" |
| 简化者 | 移除复杂性 | "最简单可行的方案是什么?" |
| 研究者 | 停止编码,开始调查 | "我们实际拥有哪些证据?" |
| 架构师 | 识别结构性原因 | "如果我们重新开始,会这样构建吗?" |
在多次失败后遇到瓶颈时,选择一个角色:
ooo unstuck # auto-select based on situation
ooo unstuck simplifier # cut scope to MVP — "Start with exactly 2 tables"
ooo unstuck hacker # make it work first, elegance later
ooo unstuck contrarian # challenge all assumptions
ooo unstuck researcher # stop coding, find missing information
ooo unstuck architect # restructure the approach entirely
何时使用每种角色:
contrarian(挑战假设)simplifier(缩减范围)researcher(寻找数据)hacker(先让它工作起来)architect(重新设计)# Install
claude plugin marketplace add Q00/ouroboros
claude plugin install ouroboros@ouroboros
# One-time setup
ooo setup
# Use
ooo interview "I want to build a task CLI"
ooo seed
ooo run
ooo evaluate <session_id>
ooo ralph "fix all failing tests"
所有 ooo 命令均可原生使用。钩子自动激活:
UserPromptSubmit → keyword-detector.mjs 检测触发词PostToolUse(Write|Edit) → drift-monitor.mjs 跟踪偏差SessionStart → 会话初始化Claude Code hooks.json(安装在 ${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json):
{
"hooks": {
"SessionStart": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\"", "timeout": 5 }] }],
"UserPromptSubmit": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"", "timeout": 5 }] }],
"PostToolUse": [{ "matcher": "Write|Edit", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/drift-monitor.mjs\"", "timeout": 3 }] }]
}
}
Codex CLI 没有原生的 AfterAgent 钩子。使用设置脚本进行配置:
# Setup
bash <your-agent-skills>/ralph/scripts/setup-codex-hook.sh
# Restart Codex, then use:
/prompts:ralph # load ralph loop context
/prompts:ouroboros # load full ouroboros context
# Use ooo commands in conversation:
ooo interview "build a REST API"
ooo ralph "fix all TypeScript errors"
Codex ralph 循环契约:
/ralph "<task>" [--completion-promise=TEXT] [--max-iterations=N] 视为契约命令<promise>VALUE</promise>完成承诺语法:
<promise>DONE</promise>
Codex 的手动状态管理:
.omc/state/ralph-state.jsoniteration 计数器status: "complete"DONE | 默认最大迭代次数:10# Install via extensions
gemini extensions install https://github.com/Q00/ouroboros
# OR install skills-template
gemini extensions install https://github.com/supercent-io/skills-template
需要在 ~/.gemini/settings.json 中配置:
{
"hooksConfig": { "enabled": true },
"context": {
"includeDirectories": ["~/.gemini/extensions/ralph"]
}
}
用于循环继续的 AfterAgent 钩子(添加到 ~/.gemini/settings.json):
{
"hooks": {
"AfterAgent": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "bash ~/.gemini/hooks/ralph-check.sh",
"timeout": 10
}]
}]
}
}
在沙盒 + YOLO 模式下运行以防止持续出现确认提示:
gemini -s -y
然后直接使用 ooo 命令:
ooo interview "build a task CLI"
ooo ralph "fix all tests"
⚠️ Gemini v0.30.0 错误:钩子 JSON 中的 stop_hook_active 始终为 false。解决方法:直接检查 .omc/state/ralph-state.json,而不是依赖钩子字段。
| 平台 | 原生支持 | 机制 | ooo 命令 | 循环 |
|---|---|---|---|---|
| Claude Code | ✅ 完整 | 插件 + 钩子 | 所有 ooo 命令 | 通过钩子自动 |
| Codex CLI | 🔧 适配 | bash + /prompts:ralph | 通过对话 | 手动状态文件 |
| Gemini CLI | ✅ 原生 | AfterAgent 钩子 | 所有 ooo 命令 | 通过钩子自动 |
| OpenCode | ✅ 原生 | 技能系统 | 所有 ooo 命令 | 通过循环自动 |
| 操作 | 命令 |
|---|---|
| 苏格拉底式访谈 | ooo interview "topic" |
| 生成规范 | ooo seed |
| 执行规范 | ooo run [seed.yaml] |
| 3 阶段评估 | ooo evaluate <session_id> |
| 进化直到收敛 | ooo evolve "topic" |
| 持久循环 | ooo ralph "task" |
| 突破停滞 | ooo unstuck [persona] |
| 检查漂移 | ooo status [session_id] |
| 首次设置 | ooo setup |
| 取消 | /ouroboros:cancel |
| 强制取消 + 清除 | /ouroboros:cancel --force |
| 恢复 | ooo ralph continue |
| 取消(Gemini/Codex) | /ralph:cancel |
# Claude Code
claude plugin marketplace add Q00/ouroboros
claude plugin install ouroboros@ouroboros
ooo setup
# Codex CLI
bash <skills>/ralph/scripts/setup-codex-hook.sh
# Gemini CLI (extensions)
gemini extensions install https://github.com/Q00/ouroboros
# All platforms via skills-template
npx skills add https://github.com/supercent-io/skills-template --skill ralph
来源:Q00/ouroboros — MIT 许可证
每周安装数
1
仓库
首次出现
1 天前
安全审计
安装于
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1
Stop prompting. Start specifying.
"The beginning is the end, and the end is the beginning." The serpent doesn't repeat — it evolves.
Interview → Seed → Execute → Evaluate
↑ ↓
└──── Evolutionary Loop ────┘
Each cycle evolves , not repeats. Evaluation output feeds back as input for the next generation until the system converges.
◇ Wonder ◇ Design
╱ (diverge) ╱ (diverge)
╱ explore ╱ create
╱ ╱
◆ ──────────── ◆ ──────────── ◆
╲ ╲
╲ define ╲ deliver
╲ (converge) ╲ (converge)
◇ Ontology ◇ Evaluation
The first diamond is Socratic : diverge into questions, converge into ontological clarity. The second diamond is pragmatic : diverge into design options, converge into verified delivery.
| Command | Trigger Keywords | What It Does |
|---|---|---|
ooo interview | ooo interview, interview me, clarify requirements, socratic questioning | Socratic questioning → expose hidden assumptions |
ooo seed | ooo seed, crystallize, , |
Wonder → "How should I live?" → "What IS 'live'?" → Ontology — Socrates
Wonder Ontology
💡 🔬
"What do I want?" → "What IS the thing I want?"
"Build a task CLI" → "What IS a task? What IS priority?"
"Fix the auth bug" → "Is this the root cause, or a symptom?"
ooo interview "I want to build a task management CLI"
The Socratic Interviewer asks questions until Ambiguity ≤ 0.2.
Ambiguity formula:
Ambiguity = 1 − Σ(clarityᵢ × weightᵢ)
Greenfield: Goal(40%) + Constraint(30%) + Success(30%)
Brownfield: Goal(35%) + Constraint(25%) + Success(25%) + Context(15%)
Threshold: Ambiguity ≤ 0.2 → ready for Seed
Example scoring:
Goal: 0.9 × 0.4 = 0.36
Constraint: 0.8 × 0.3 = 0.24
Success: 0.7 × 0.3 = 0.21
──────
Clarity = 0.81
Ambiguity = 1 − 0.81 = 0.19 ≤ 0.2 → ✓ Ready for Seed
ooo seed
Generates YAML specification:
goal: Build a CLI task management tool
constraints:
- Python 3.14+
- No external database
- SQLite for persistence
acceptance_criteria:
- Tasks can be created
- Tasks can be listed
- Tasks can be marked complete
ontology_schema:
name: TaskManager
fields:
- name: tasks
type: array
- name: title
type: string
ooo run seed.yaml
ooo run # uses seed from conversation context
ooo evaluate <session_id>
| Stage | Cost | What It Checks |
|---|---|---|
| Mechanical | $0 | Lint, build, tests, coverage |
| Semantic | Standard | AC compliance, goal alignment, drift score |
| Consensus | Frontier (optional) | Multi-model vote, majority ratio |
Drift thresholds:
0.0 – 0.15 — Excellent: on track0.15 – 0.30 — Acceptable: monitor closely0.30+ — Exceeded: course correction neededooo ralph "fix all failing tests"
/ouroboros:ralph "fix all failing tests"
"The boulder never stops." Each failure is data for the next attempt. Only complete success or max iterations stops it.
┌─────────────────────────────────┐
│ 1. EXECUTE (parallel) │
│ Independent tasks │
│ concurrent scheduling │
├─────────────────────────────────┤
│ 2. VERIFY │
│ Check completion │
│ Validate tests pass │
│ Measure drift vs seed │
├─────────────────────────────────┤
│ 3. LOOP (if failed) │
│ Analyze failure │
│ Fix identified issues │
│ Repeat from step 1 │
├─────────────────────────────────┤
│ 4. PERSIST (checkpoint) │
│ .omc/state/ralph-state.json │
│ Resume after interruption │
└─────────────────────────────────┘
Create .omc/state/ralph-state.json on start:
{
"mode": "ralph",
"session_id": "<uuid>",
"request": "<user request>",
"status": "running",
"iteration": 0,
"max_iterations": 10,
"last_checkpoint": null,
"verification_history": []
}
while iteration < max_iterations:
result = execute_parallel(request, context)
verification = verify_result(result, acceptance_criteria)
state.verification_history.append({
"iteration": iteration,
"passed": verification.passed,
"score": verification.score,
"timestamp": <now>
})
if verification.passed:
save_checkpoint("complete")
break
iteration += 1
save_checkpoint("iteration_{iteration}")
[Ralph Iteration 1/10]
Executing in parallel...
Verification: FAILED
Score: 0.65
Issues:
- 3 tests still failing
- Type errors in src/api.py
The boulder never stops. Continuing...
[Ralph Iteration 3/10]
Executing in parallel...
Verification: PASSED
Score: 1.0
Ralph COMPLETE
==============
Request: Fix all failing tests
Duration: 8m 32s
Iterations: 3
Verification History:
- Iteration 1: FAILED (0.65)
- Iteration 2: FAILED (0.85)
- Iteration 3: PASSED (1.0)
| Action | Command |
|---|---|
| Save checkpoint & exit | /ouroboros:cancel |
| Force clear all state | /ouroboros:cancel --force |
| Resume after interruption | ooo ralph continue or ralph continue |
ooo evolve "build a task management CLI"
ooo evolve "build a task management CLI" --no-execute # ontology-only, fast mode
Gen 1: Interview → Seed(O₁) → Execute → Evaluate
Gen 2: Wonder → Reflect → Seed(O₂) → Execute → Evaluate
Gen 3: Wonder → Reflect → Seed(O₃) → Execute → Evaluate
...until ontology converges (similarity ≥ 0.95) or max 30 generations
Similarity = 0.5 × name_overlap + 0.3 × type_match + 0.2 × exact_match
Threshold: Similarity ≥ 0.95 → CONVERGED
Gen 1: {Task, Priority, Status}
Gen 2: {Task, Priority, Status, DueDate} → similarity 0.78 → CONTINUE
Gen 3: {Task, Priority, Status, DueDate} → similarity 1.00 → CONVERGED ✓
| Signal | Condition | Meaning |
|---|---|---|
| Stagnation | Similarity ≥ 0.95 for 3 consecutive gens | Ontology has stabilized |
| Oscillation | Gen N ≈ Gen N-2 (period-2 cycle) | Stuck bouncing between two designs |
| Repetitive feedback | ≥ 70% question overlap across 3 gens | Wonder asking the same things |
| Hard cap | 30 generations reached | Safety valve |
Ralph Cycle 1: evolve_step(lineage, seed) → Gen 1 → action=CONTINUE
Ralph Cycle 2: evolve_step(lineage) → Gen 2 → action=CONTINUE
Ralph Cycle 3: evolve_step(lineage) → Gen 3 → action=CONVERGED ✓
└── Ralph stops.
The ontology has stabilized.
ooo evolve --status <lineage_id> # check lineage status
ooo evolve --rewind <lineage_id> <gen_N> # roll back to generation N
Loaded on-demand — never preloaded:
| Agent | Role | Core Question |
|---|---|---|
| Socratic Interviewer | Questions-only. Never builds. | "What are you assuming?" |
| Ontologist | Finds essence, not symptoms | "What IS this, really?" |
| Seed Architect | Crystallizes specs from dialogue | "Is this complete and unambiguous?" |
| Evaluator | 3-stage verification | "Did we build the right thing?" |
| Contrarian | Challenges every assumption | "What if the opposite were true?" |
| Hacker | Finds unconventional paths | "What constraints are actually real?" |
| Simplifier | Removes complexity |
When blocked after repeated failures, choose a persona:
ooo unstuck # auto-select based on situation
ooo unstuck simplifier # cut scope to MVP — "Start with exactly 2 tables"
ooo unstuck hacker # make it work first, elegance later
ooo unstuck contrarian # challenge all assumptions
ooo unstuck researcher # stop coding, find missing information
ooo unstuck architect # restructure the approach entirely
When to use each:
contrarian (challenge assumptions)simplifier (reduce scope)researcher (seek data)hacker (just make it work)architect (redesign)# Install
claude plugin marketplace add Q00/ouroboros
claude plugin install ouroboros@ouroboros
# One-time setup
ooo setup
# Use
ooo interview "I want to build a task CLI"
ooo seed
ooo run
ooo evaluate <session_id>
ooo ralph "fix all failing tests"
All ooo commands work natively. Hooks auto-activate:
UserPromptSubmit → keyword-detector.mjs detects triggersPostToolUse(Write|Edit) → drift-monitor.mjs tracks deviationSessionStart → session initializationClaude Code hooks.json (installed at ${CLAUDE_PLUGIN_ROOT}/hooks/hooks.json):
{
"hooks": {
"SessionStart": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\"", "timeout": 5 }] }],
"UserPromptSubmit": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"", "timeout": 5 }] }],
"PostToolUse": [{ "matcher": "Write|Edit", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/drift-monitor.mjs\"", "timeout": 3 }] }]
}
}
Codex CLI has no native AfterAgent hooks. Use the setup script to configure:
# Setup
bash <your-agent-skills>/ralph/scripts/setup-codex-hook.sh
# Restart Codex, then use:
/prompts:ralph # load ralph loop context
/prompts:ouroboros # load full ouroboros context
# Use ooo commands in conversation:
ooo interview "build a REST API"
ooo ralph "fix all TypeScript errors"
Codex ralph loop contract:
/ralph "<task>" [--completion-promise=TEXT] [--max-iterations=N] as a contract command<promise>VALUE</promise>Completion promise syntax:
<promise>DONE</promise>
Manual state management for Codex:
.omc/state/ralph-state.json at loop startiteration counter each cyclestatus: "complete" when promise foundDONE | Default max iterations: 10# Install via extensions
gemini extensions install https://github.com/Q00/ouroboros
# OR install skills-template
gemini extensions install https://github.com/supercent-io/skills-template
Required in ~/.gemini/settings.json:
{
"hooksConfig": { "enabled": true },
"context": {
"includeDirectories": ["~/.gemini/extensions/ralph"]
}
}
AfterAgent hook for loop continuation (add to ~/.gemini/settings.json):
{
"hooks": {
"AfterAgent": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "bash ~/.gemini/hooks/ralph-check.sh",
"timeout": 10
}]
}]
}
}
Run in sandbox + YOLO mode to prevent constant confirmation prompts:
gemini -s -y
Then use ooo commands directly:
ooo interview "build a task CLI"
ooo ralph "fix all tests"
⚠️ Gemini v0.30.0 bug : stop_hook_active always false in hook JSON. Workaround: check .omc/state/ralph-state.json directly instead of relying on the hook field.
| Platform | Native Support | Mechanism | ooo Commands | Loop |
|---|---|---|---|---|
| Claude Code | ✅ Full | Plugin + hooks | All ooo commands | Auto via hooks |
| Codex CLI | 🔧 Adapted | bash + /prompts:ralph | Via conversation | Manual state file |
| Gemini CLI | ✅ Native | AfterAgent hook | All ooo commands | Auto via hook |
| Action | Command |
|---|---|
| Socratic interview | ooo interview "topic" |
| Generate spec | ooo seed |
| Execute spec | ooo run [seed.yaml] |
| 3-stage evaluate | ooo evaluate <session_id> |
| Evolve until converged | ooo evolve "topic" |
| Persistent loop | ooo ralph "task" |
# Claude Code
claude plugin marketplace add Q00/ouroboros
claude plugin install ouroboros@ouroboros
ooo setup
# Codex CLI
bash <skills>/ralph/scripts/setup-codex-hook.sh
# Gemini CLI (extensions)
gemini extensions install https://github.com/Q00/ouroboros
# All platforms via skills-template
npx skills add https://github.com/supercent-io/skills-template --skill ralph
Source: Q00/ouroboros — MIT License
Weekly Installs
1
Repository
First Seen
1 day ago
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
155,300 周安装
generate seedfreeze requirements| Crystallize interview into immutable spec (Ambiguity ≤ 0.2) |
ooo run | ooo run, execute seed, ouroboros run | Execute via Double Diamond decomposition |
ooo evaluate | ooo evaluate, 3-stage check, evaluate this, verify execution | 3-stage gate: Mechanical → Semantic → Multi-Model Consensus |
ooo evolve | ooo evolve, evolutionary loop, iterate until converged | Evolutionary loop until ontology converges (similarity ≥ 0.95) |
ooo unstuck | ooo unstuck, I'm stuck, think sideways, lateral thinking | 5 lateral thinking personas when stuck |
ooo status | ooo status, am I drifting?, drift check, session status | Drift detection + session tracking |
ooo ralph | ooo ralph, ralph, don't stop, must complete, keep going | Persistent loop until verified — The boulder never stops |
ooo setup | ooo setup | Register MCP server (one-time) |
ooo help | ooo help | Full reference |
| Researcher | Stops coding, starts investigating | "What evidence do we actually have?" |
| Architect | Identifies structural causes | "If we started over, would we build it this way?" |
| ✅ Native |
| Skills system |
All ooo commands |
| Auto via loop |
| Break stagnation | ooo unstuck [persona] |
| Check drift | ooo status [session_id] |
| First-time setup | ooo setup |
| Cancel | /ouroboros:cancel |
| Force cancel + clear | /ouroboros:cancel --force |
| Resume | ooo ralph continue |
| Cancel (Gemini/Codex) | /ralph:cancel |