ooo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseooo — Ouroboros Specification-First Workflow
ooo — Ouroboros规范优先开发工作流
Stop prompting. Start specifying.
oootext
Interview → Seed → Execute → Evaluate → Evolve
↓
ooo ralph
(persist until verified)停止零散提示,开始规范定义。
oootext
访谈 → 种子规范 → 执行 → 评估 → 迭代
↓
ooo ralph
(持续循环直至验证通过)Installation
安装方式
Plugin (recommended for Claude Code)
插件(推荐用于Claude Code)
bash
claude plugin marketplace add Q00/ouroborosbash
claude plugin marketplace add Q00/ouroborospip
pip安装
bash
pip install ouroboros-ai # base
pip install ouroboros-ai[all] # full: Claude, LiteLLM, MCP, TUIbash
pip install ouroboros-ai # 基础版
pip install ouroboros-ai[all] # 完整版:包含Claude、LiteLLM、MCP、TUISkill (any platform)
Skill安装(支持任意平台)
bash
npx skills add https://github.com/akillness/oh-my-skills --skill ooobash
npx skills add https://github.com/akillness/oh-my-skills --skill oooSetup runtimes
运行时配置
bash
ouroboros setup # auto-detect Claude / Codex / OpenCode
ouroboros setup --runtime claude
ouroboros setup --runtime codex
ouroboros setup --runtime opencode --opencode-mode pluginbash
ouroboros setup # 自动检测Claude / Codex / OpenCode
ouroboros setup --runtime claude
ouroboros setup --runtime codex
ouroboros setup --runtime opencode --opencode-mode pluginWhen to use
适用场景
- Vague request needs a Socratic interview before coding starts
- Requirements should become an immutable seed/spec before implementation
- Task needs a verify-before-done loop, not a one-shot answer
- You want to keep going until completion is actually verified
- Measure drift against the original contract
- Repeated failures need structured unstuck step instead of blind retries
- 需求模糊,需要在编码前进行苏格拉底式访谈
- 需求需要在实现前固化为不可变的种子/规范
- 任务需要验证通过再结束的循环,而非一次性输出结果
- 需要持续循环直至完成状态被实际验证
- 测量与原始契约的偏差
- 重复失败时需要结构化的“脱困”步骤,而非盲目重试
Do not use when
不适用场景
- Task is mainly platform setup or runtime commands → /
omc/omxohmg - Task is mainly permission posture, sandbox, trust folders → (configure via )
ouroboros setup - Task needs integrated project ledgers + plan review + cleanup workflow →
jeo - Task is only pre-implementation landscape research →
survey
- 任务以平台配置或运行时命令为主 → 使用/
omc/omxohmg - 任务以权限设置、沙箱、信任文件夹为主 →(通过配置)
ouroboros setup - 任务需要集成项目台账+计划评审+清理工作流 → 使用
jeo - 任务仅为实现前的技术调研 → 使用
survey
Core commands
核心命令
Interview — clarify before coding
访谈 — 编码前澄清需求
bash
ouroboros init start "build a task management CLI"
ouroboros init start --resume <interview-id>
ouroboros init listAmbiguity gate
- Greenfield: Goal 40% + Constraints 30% + Success 30%
- Brownfield: Goal 35% + Constraints 25% + Success 25% + Context 15%
- Do not move to seed until Ambiguity ≤ 0.2
bash
ouroboros init start "构建任务管理CLI"
ouroboros init start --resume <访谈ID>
ouroboros init list歧义门槛
- 全新项目:目标40% + 约束30% + 验收标准30%
- 存量项目:目标35% + 约束25% + 验收标准25% + 上下文15%
- 只有当歧义值 ≤ 0.2时,才能进入种子规范阶段
Seed — freeze the spec
种子规范 — 固化需求
After interview completes, a is generated in .
seed.yaml.ouroboros/seeds/yaml
undefined访谈完成后,会在目录生成文件。
.ouroboros/seeds/seed.yamlyaml
undefinedexample seed.yaml
示例seed.yaml
goal: "Build a CLI task manager with SQLite persistence"
constraints:
- "Python 3.12+"
- "No external HTTP dependencies" acceptance_criteria:
- "CRUD operations work end-to-end"
- "All unit tests pass"
undefinedgoal: "构建基于SQLite持久化的CLI任务管理器"
constraints:
- "Python 3.12+"
- "无外部HTTP依赖" acceptance_criteria:
- "CRUD操作端到端可用"
- "所有单元测试通过"
undefinedRun — execute against the seed
运行 — 依据种子规范执行
bash
ouroboros run workflow <seed.yaml>
ouroboros run workflow <seed.yaml> --sequential
ouroboros run workflow <seed.yaml> --no-qa
ouroboros run resume [execution-id]Options
| Flag | Purpose |
|---|---|
| Enable/disable orchestrator (default: on) |
| Override runtime backend |
| Execute acceptance criteria sequentially |
| Dry-run: validate without executing |
| Skip post-execution QA evaluation |
bash
ouroboros run workflow <seed.yaml>
ouroboros run workflow <seed.yaml> --sequential
ouroboros run workflow <seed.yaml> --no-qa
ouroboros run resume [执行ID]可选参数
| 参数 | 用途 |
|---|---|
| 启用/禁用编排器(默认:启用) |
| 覆盖默认运行时后端 |
| 按顺序执行验收标准 |
| 试运行:仅验证不执行 |
| 跳过执行后的QA评估 |
Evaluate — verify before done
评估 — 验证通过再结束
Three-stage gate:
- Mechanical — lint, tests, build, typecheck, coverage
- Semantic — acceptance criteria and goal alignment
- Consensus — optional multi-model agreement
bash
ouroboros status executions
ouroboros status execution <execution-id> --eventsDrift thresholds
| Range | Status |
|---|---|
| 0.00–0.15 | Excellent |
| 0.15–0.30 | Acceptable — watch closely |
| 0.30+ | Correct course before continuing |
三阶段验证:
- 机械验证 — 代码检查、测试、构建、类型校验、覆盖率
- 语义验证 — 验收标准与目标一致性
- 共识验证 — 可选的多模型一致性确认
bash
ouroboros status executions
ouroboros status execution <执行ID> --events偏差阈值
| 范围 | 状态 |
|---|---|
| 0.00–0.15 | 优秀 |
| 0.15–0.30 | 可接受 — 需密切关注 |
| 0.30+ | 调整方向后再继续 |
Ralph — persistent completion loop
Ralph — 持续完成循环
bash
undefinedbash
undefinedkeyword: ooo ralph
关键词: ooo ralph
ouroboros run workflow seed.yaml # run → verify → adjust → repeat
ouroboros run resume # resume last paused execution
Loop contract:
1. execute
2. verify (mechanical + semantic)
3. record failure evidence
4. adjust
5. continue until verified or cappedouroboros run workflow seed.yaml # 运行 → 验证 → 调整 → 重复
ouroboros run resume # 恢复上次暂停的执行
循环契约:
1. 执行
2. 验证(机械+语义)
3. 记录失败证据
4. 调整
5. 持续循环直至验证通过或达到上限Evolve — continuous refinement
迭代 — 持续优化
Runs when the ontology or solution shape is still changing.
bash
ouroboros run workflow seed.yaml # evolve loop runs automaticallyStop condition: convergence similarity ≥ 0.95
适用于本体或解决方案形态仍在变化的场景。
bash
ouroboros run workflow seed.yaml # 迭代循环自动运行停止条件:收敛相似度 ≥ 0.95
Cancel
取消执行
bash
ouroboros cancel execution <id>
ouroboros cancel execution --all
ouroboros cancel execution --reason "requirements changed"bash
ouroboros cancel execution <ID>
ouroboros cancel execution --all
ouroboros cancel execution --reason "需求变更"Config
配置管理
bash
ouroboros config show
ouroboros config show orchestrator
ouroboros config backend claude
ouroboros config backend codex
ouroboros config set orchestrator.permission_mode allowedTools
ouroboros config validatebash
ouroboros config show
ouroboros config show orchestrator
ouroboros config backend claude
ouroboros config backend codex
ouroboros config set orchestrator.permission_mode allowedTools
ouroboros config validateStatus & TUI
状态查看与TUI
bash
ouroboros status health
ouroboros status executions -n 20
ouroboros tui monitor # Textual TUI (Python)
ouroboros tui monitor --backend slt # native Rust TUITUI keyboard shortcuts
| Key | Screen |
|---|---|
| Dashboard — phase progress, drift meter, cost |
| Execution — details, timeline, phase outputs |
| Logs — filterable log viewer |
| Debug — state inspector, raw events |
| Session selector |
| Lineage view |
| Pause / resume |
| Quit |
bash
ouroboros status health
ouroboros status executions -n 20
ouroboros tui monitor # Python文本界面(TUI)
ouroboros tui monitor --backend slt # Rust原生TUITUI快捷键
| 按键 | 界面 |
|---|---|
| 仪表盘 — 阶段进度、偏差计量、成本 |
| 执行详情 — 细节、时间线、阶段输出 |
| 日志 — 可过滤的日志查看器 |
| 调试 — 状态检查器、原始事件 |
| 会话选择器 |
| lineage视图 |
| 暂停 / 恢复 |
| 退出 |
Unstuck mode
脱困模式
When repeated attempts fail, choose a deliberate persona instead of retrying blindly.
| Persona | When |
|---|---|
| Repeated similar failures |
| Too many options / paralysis |
| Missing evidence |
| Need momentum |
| Wrong foundation |
Nine agents in the pool: Socratic Interviewer, Ontologist, Seed Architect, Seed Closer, Semantic Evaluator, Consensus Reviewer, Evaluator, QA Judge, plus domain-specific specialists.
当重复尝试失败时,选择特定角色而非盲目重试。
| 角色 | 适用场景 |
|---|---|
| 重复出现相似失败 |
| 选项过多导致决策瘫痪 |
| 缺少关键证据 |
| 需要快速推进获得动力 |
| 基础架构存在问题 |
内置9个Agent:苏格拉底访谈者、本体论者、种子架构师、种子固化师、语义评估师、共识评审员、评估师、QA裁判,以及领域专家。
MCP server
MCP服务器
bash
ouroboros mcp serve # stdio transport (default)
ouroboros mcp serve --transport sse --port 8080
ouroboros mcp infobash
ouroboros mcp serve # 标准输入输出传输(默认)
ouroboros mcp serve --transport sse --port 8080
ouroboros mcp infoClaude Desktop integration
Claude Desktop集成
claude mcp add ouroboros -- uvx --from ouroboros-ai[mcp] ouroboros mcp serve
**Available MCP tools**
- `ouroboros_execute_seed` — execute a seed specification
- `ouroboros_session_status` — get session status
- `ouroboros_query_events` — query event historyclaude mcp add ouroboros -- uvx --from ouroboros-ai[mcp] ouroboros mcp serve
**可用MCP工具**
- `ouroboros_execute_seed` — 执行种子规范
- `ouroboros_session_status` — 获取会话状态
- `ouroboros_query_events` — 查询事件历史Environment variables
环境变量
| Variable | Purpose |
|---|---|
| Claude backend |
| LiteLLM / Codex |
| OpenRouter |
| Override runtime |
| Override LLM backend |
| Permission mode |
| 变量 | 用途 |
|---|---|
| Claude后端密钥 |
| LiteLLM / Codex密钥 |
| OpenRouter密钥 |
| 覆盖默认运行时 |
| 覆盖默认LLM后端 |
| 权限模式 |
Configuration files
配置文件
| File | Location |
|---|---|
| |
| |
| |
| |
| 文件 | 位置 |
|---|---|
| |
| |
| |
| |
Operating rules
操作规则
- Clarify before coding — do not move to seed until ambiguity ≤ 0.2
- Freeze the seed — do not rewrite the contract mid-run
- Measure drift against the original seed, not latest chat rationale
- Verify before done — tests, checks, and acceptance criteria matter more than confidence
- Treat failure as data — every failed loop feeds the next attempt
- Keep runtime ownership separate — platform hooks belong in /
omc/omxohmg
- 编码前先澄清 — 只有当歧义值 ≤ 0.2时,才能进入种子规范阶段
- 固化种子规范 — 执行过程中不得修改契约
- 测量与原始种子的偏差 — 而非基于最新聊天记录
- 验证通过再结束 — 测试、检查和验收标准比主观信心更重要
- 将失败视为数据 — 每次失败都为下一次尝试提供参考
- 独立管理运行时 — 平台钩子应放在/
omc/omx中ohmg
Examples
使用示例
bash
undefinedbash
undefinedFull spec-first flow
完整规范优先流程
ouroboros init start "build a REST API with auth"
ouroboros run workflow .ouroboros/seeds/seed_<hash>.yaml
ouroboros status executions
ouroboros init start "构建带认证的REST API"
ouroboros run workflow .ouroboros/seeds/seed_<hash>.yaml
ouroboros status executions
Persistent verified loop (ooo ralph)
持续验证循环(ooo ralph)
ouroboros run workflow seed.yaml
ouroboros run resume
ouroboros run workflow seed.yaml
ouroboros run resume
Monitor progress
监控进度
ouroboros tui monitor
ouroboros tui monitor
Uninstall
卸载
ouroboros uninstall --keep-data
Source: [Q00/ouroboros v0.29.0](https://github.com/Q00/ouroboros/tree/v0.29.0) — MIT Licenseouroboros uninstall --keep-data
来源: [Q00/ouroboros v0.29.0](https://github.com/Q00/ouroboros/tree/v0.29.0) — MIT许可协议