welcome
Skill6.2k starsChanged 4 months agoMITView on GitHub
First-touch experience for new Ouroboros users
2 other projects use a version of this.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- ajayjohn/tars-work-assistanttheir own version, first seen May 3, 2026
- adraalabs/skillstheir own version, first seen Mar 25, 2026
Who's talking about Q00/ouroboros
- A Hacker News story“Ouroboros – AI agent framework that asks "why?" before writing code”Hacker News · Jan 28, 2026 · 5 points
- @pythonhub.dev“ouroboros Ouroboros is an open-source AI coding framework that turns vague ideas into verified code through …”Bluesky · Oct 2, 2026 · 1 likes
- @agentwire.thecompound.tech“https://github.com/Q00/ouroboros more like this: https://agentwire.thecompound.tech/aw/1c5qt1”Bluesky · Sep 21, 2026 · 1 likes
- A Hacker News story“Show HN: I built a harness that blocks AI from building until ambiguity < 0.2”Hacker News · Mar 9, 2026 · 1 points
- A Hacker News story“Show HN: Preventing infinite agent loops with mathematical convergence gates”Hacker News · Mar 3, 2026 · 1 points
The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 40
Talked about on GitHub, Hacker News and Bluesky (40 times).
On GitHub · 35
- Oct 4, 2026codex-marketplaces.github.q00.ouroboros: init at 0.55.4 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.q00.ouroboros: 0.54.5 → 0.55.4 — sudosubin/agents.nix0 reactions
- Oct 1, 2026agent-skills.github.q00.ouroboros: init at 0.54.5 — sudosubin/agents.nix0 reactions
- Sep 29, 2026backlog: 2026-09-29分の候補4件を追記 — Matsushima-A-830/ai-100days0 reactions
- Sep 7, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 1 comment
30 more on GitHub
- Aug 31, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 2 comments
- Aug 29, 2026catalog: add q00-dsh-ouroboros (community curation, created by @Q00) — diegosouzapw/awesome-omni-dsh-plugins0 reactions
- Aug 24, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 1 comment
- Aug 23, 2026fix(runtime): preserve external skill and MCP routing — Yeachan-Heo/gajae-code0 reactions · 2 comments
- Aug 20, 2026Represent verified non-npm sources without an unsafe Install button — sandbaseai/dsh-plugin-store0 reactions · 1 comment
- Aug 17, 2026Weekly discovery: new DeepSeek Harness ecosystem candidates — fendouai/awesome-deepseek-harness0 reactions · 1 comment
- Aug 10, 2026ouroboros-ai 0.51.1 (new formula) — Homebrew/homebrew-core0 reactions · 2 comments
- Aug 10, 2026Add project: Ouroboros — RyanAlberts/best-of-Agent-Harnesses0 reactions · 1 comment
- Aug 10, 2026Add project: Ouroboros — RyanAlberts/best-of-Agent-Harnesses0 reactions · 2 comments
- Aug 10, 2026ouroboros-ai: init at 0.51.1 — NixOS/nixpkgs0 reactions · 8 comments
- Aug 10, 2026Add Ouroboros to Coding Agents — ARUNAGIRINATHAN-K/awesome-ai-agents-20260 reactions · 5 comments
- Aug 9, 2026Add Ouroboros to AI Coding (both EN/CN) — ikaijua/Awesome-AITools0 reactions · 5 comments
- Aug 9, 2026【开源自荐】Ouroboros,一个让 AI 先把需求问清楚再写代码、并且防止它「刷分」的 Agent OS — GitHubDaily/GitHubDaily0 reactions · 1 comment
- Aug 9, 2026【开源自荐】Ouroboros,一个让 AI 先把需求问清楚再写代码、并且防止它「刷分」的 Agent OS — GitHubDaily/GitHubDaily0 reactions · 4 comments
- Aug 9, 2026【开源自荐】Ouroboros:先把需求问清楚再让 AI 写代码的 Agent OS,顺便不让它「刷分」 — ruanyf/weekly0 reactions · 4 comments
- Aug 9, 2026[开源推荐] Ouroboros:一个不让 AI 看着答案写代码的 Agent OS — 521xueweihan/HelloGitHub0 reactions · 8 comments
- Aug 8, 2026Add Ouroboros (Agent OS) to Software Development — kyrolabs/awesome-agents0 reactions
- Aug 8, 2026Add Q00/ouroboros to Coding Agents 🤖🤖🤖 — punkpeye/awesome-mcp-servers0 reactions · 5 comments
- Aug 8, 2026[Resource]: Ouroboros — hesreallyhim/awesome-claude-code0 reactions · 3 comments
- Jul 11, 2026Ouroboros P3: Active Conductor attention events (upstream RFC) — danielsmithdevelopment/ClawQL0 reactions
- Jul 11, 2026Ouroboros P0-A: 3-component drift measurement + ouroboros_measure_drift MCP tool — danielsmithdevelopment/ClawQL0 reactions
- Jun 17, 2026📝 https://github.com/Q00/ouroboros 이거 hermes 랑 비슷한 급의 도구라고 하던데, 이런 도구들에 대해 research하고 내가 학습할 수 있는 자료 만들어줘 tool-study — adszzz11/study0 reactions
- Jun 8, 2026feat(ff-loop): add Ouroboros-inspired failure taxonomy, stagnation detection, convergence tracking — gimso2x/forgeflow0 reactions
- May 8, 2026Audit candidate: Q00/ouroboros — xiaolai/nlpm0 reactions · 3 comments
- May 7, 2026📱 SNS 콘텐츠 - 2026-05-07 11:55 KST — leaf468/autothreads0 reactions
- May 7, 2026🤖 AI 트렌드 리포트 - 2026-05-07 11:55 KST — leaf468/autothreads0 reactions
- May 4, 2026📱 SNS 콘텐츠 - 2026-05-04 11:56 KST — leaf468/autothreads0 reactions
- May 4, 2026🤖 AI 트렌드 리포트 - 2026-05-04 11:56 KST — leaf468/autothreads0 reactions
- May 1, 2026Test issue to check pipeline — Deep070203/autoharness0 reactions
- Apr 18, 2026Audit candidate: Q00/ouroboros — xiaolai/nlpm0 reactions · 2 comments
On Hacker News · 3
- Jan 28, 2026Ouroboros – AI agent framework that asks "why?" before writing code5 points · 1 comment
- Mar 9, 2026Show HN: I built a harness that blocks AI from building until ambiguity < 0.21 point
- Mar 3, 2026Show HN: Preventing infinite agent loops with mathematical convergence gates1 point · 1 comment
On Bluesky · 2
- Oct 2, 2026ouroboros Ouroboros is an open-source AI coding framework that turns vague ideas into verified code through structured interviews,… — @pythonhub.dev1 likes and repost
- Sep 21, 2026https://github.com/Q00/ouroboros more like this: https://agentwire.thecompound.tech/aw/1c5qt1 — @agentwire.thecompound.tech1 likes and repost
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ajayjohn/tars-work-assistant★ 4same name
- adraalabs/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- autoSkill
- brownfieldSkill
- cancelSkill
- ouroboros-configSkill
- evaluateSkill
- evolveSkill
- ouroboros-helpSkill
- interviewSkill
- maintainSkill
- oooSkill
- pmSkill
- publishSkill
- qaSkill
- ralphSkill
- resume-sessionSkill
- ouroboros-runSkill
- seedSkill
- setupSkill
- ouroboros-statusSkill
- tutorialSkill
- unstuckSkill
- updateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 4 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When this skill is invoked, follow this flow:
- Very specific: line 24
Before running any shell snippet below, define this resolver in the same shell.
- Distinctive: line 28
Only the probe and child interpreter discard inherited CPython path-selection overrides.
- Distinctive: line 97
Before honoring that completion marker, determine whether setup is ready for the active runtime.
- Very specific: line 178
If SETUP_READY is not true, determine whether the Codex setup is ready:
- Very specific: line 504
gpt-5 고정 유지하기: do not change config.yaml.
- Very specific: line 550
If the welcome was completed but neither SETUP_READY nor CODEX_READY is true, bypass this completion prompt and continue to the Setup Gate …
- Very specific: line 589
Before showing the welcome banner, check whether setup is prepared for the active runtime on this machine.
- Very specific: line 673
If the Claude gate printed SETUP_READY, setup is complete: skip the Codex gate below and continue directly to the welcome banner.
- Very specific: line 849
If neither gate reports ready (the Claude gate printed SETUP_REQUIRED and the Codex gate printed CODEX_SETUP_REQUIRED), ask one concise …
- Very specific: line 875
설정하고 시작하기: Run the setup command for the active host.
- Distinctive: line 885
After successful Codex setup, immediately ask:
- Very specific: line 908
직접 모델 설정하기: Read and follow ../config/SKILL.md.
- Very specific: line 919
Do not show this gate again once Codex is ready.
- Very specific: line 983
If the active runtime does not expose Ouroboros MCP tools, AskUserQuestion:
- Very specific: line 1043
Start a project: Ask "What do you want to build?" → execute ../interview/SKILL.md
- Very specific: line 1051
Check gh availability first:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/ouroboros:welcome
Interactive onboarding for new Ouroboros users.
Usage
/ouroboros:welcome # First-time or update onboarding
/ouroboros:welcome --skip # Skip welcome, mark as shown
/ouroboros:welcome --force # Force re-run welcome even if shownInstructions
When this skill is invoked, follow this flow:
Python Runtime (Required)
Before running any shell snippet below, define this resolver in the same shell.
It accepts only Python 3.12 or newer, prefers python3 and then python, and
uses uv as the final fallback. Call ouroboros_python directly and quote every
argument passed to it; the function preserves arguments and heredoc/stdin input.
Only the probe and child interpreter discard inherited CPython path-selection
overrides; the caller shell keeps its environment unchanged.
<!-- ouroboros-python-resolver:start -->ouroboros_python() {
if command -v python3 >/dev/null 2>&1 &&
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python3 -c 'import sys; raise SystemExit(sys.version_info < (3, 12))') >/dev/null 2>&1
then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python3 "$@")
return
fi
if command -v python >/dev/null 2>&1 &&
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python -c 'import sys; raise SystemExit(sys.version_info < (3, 12))') >/dev/null 2>&1
then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command python "$@")
return
fi
if command -v uv >/dev/null 2>&1; then
(unset PYTHONHOME PYTHONPATH PYTHONPLATLIBDIR PYTHONEXECUTABLE __PYVENV_LAUNCHER__; command uv run --no-project --quiet --python '>=3.12' python "$@")
return
fi
printf '%s\n' 'Ouroboros skills require Python >= 3.12 or uv on PATH.' >&2
return 127
}<!-- ouroboros-python-resolver:end -->Pre-Check: Already Completed?
First, check ~/.ouroboros/prefs.json for welcomeCompleted. For upgrades from older releases, also treat legacy welcomeShown: true as completed so the welcome prompt does not reappear forever:
PREFFILE="$HOME/.ouroboros/prefs.json"
if [ -f "$PREFFILE" ]; then
WELCOME_COMPLETED=$(ouroboros_python - <<'PY'
import json, os
path = os.path.expanduser('~/.ouroboros/prefs.json')
try:
prefs = json.load(open(path, encoding='utf-8'))
except Exception:
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
print(prefs.get('welcomeCompleted') or ('legacy-welcomeShown' if prefs.get('welcomeShown') else ''))
PY
)
WELCOME_VERSION=$(ouroboros_python - <<'PY'
import json, os
path = os.path.expanduser('~/.ouroboros/prefs.json')
try:
prefs = json.load(open(path, encoding='utf-8'))
except Exception:
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
print(prefs.get('welcomeVersion') or '')
PY
)
if [ -n "$WELCOME_COMPLETED" ] && [ "$WELCOME_COMPLETED" != "null" ]; then
ALREADY_COMPLETED="true"
fi
fiBefore honoring that completion marker, determine whether setup is ready for the active runtime. A previously completed welcome must never hide the setup gate from a user who chose 나중에 or whose setup was later removed.
First accept a completed Claude Code setup:
if ouroboros_python - "$HOME/.ouroboros/config.yaml" <<'PY'
from __future__ import annotations
import sys
from pathlib import Path
try:
import yaml
except ModuleNotFoundError:
yaml = None
config_path = Path(sys.argv[1])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
"""Read the top-level mapping scalars this readiness gate owns."""
if yaml is not None:
loaded = yaml.safe_load(source) or {}
return loaded if isinstance(loaded, dict) else {}
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
def scalar_value(raw: str) -> str:
return raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip().strip("'\"")
def flow_mapping(raw: str) -> dict[str, str]:
value = raw.strip().split(" #", 1)[0].strip()
if not (value.startswith("{") and value.endswith("}")):
return {}
fields: dict[str, str] = {}
for part in value[1:-1].split(","):
key, separator, field_value = part.partition(":")
if separator:
fields[key.strip().strip("'\"")] = scalar_value(field_value)
return fields
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
if indent == 0:
section = key.strip("'\"")
parsed[section] = flow_mapping(raw_value)
elif section is not None:
parsed.setdefault(section, {})[key.strip("'\"")] = scalar_value(raw_value)
return parsed
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
except (OSError, ValueError):
raise SystemExit(1)
orchestrator = config.get("orchestrator") if isinstance(config, dict) else None
llm = config.get("llm") if isinstance(config, dict) else None
# Existing YAML form: runtime_backend: claude. Parsing avoids assuming its order.
# The marketplace plugin owns its MCP capability. Host-owned
# ~/.claude/mcp.json is intentionally not part of SDK setup readiness.
ready = (
isinstance(orchestrator, dict)
and orchestrator.get("runtime_backend") in {"claude", "claude_mcp"}
and isinstance(llm, dict)
and llm.get("backend") == "claude"
)
raise SystemExit(0 if ready else 1)
PY
then
SETUP_READY="true"
fiIf SETUP_READY is not true, determine whether the Codex setup is ready:
CODEX_HOME_DIR="${CODEX_HOME:-$HOME/.codex}"
case "$CODEX_HOME_DIR" in
"~") CODEX_HOME_DIR="$HOME" ;;
"~/"*) CODEX_HOME_DIR="$HOME/${CODEX_HOME_DIR#"~/"}" ;;
esac
if ouroboros_python - "$HOME/.ouroboros/config.yaml" "$CODEX_HOME_DIR/config.toml" <<'PY'
from __future__ import annotations
import re
import os
import shutil
import sys
from pathlib import Path
try:
import tomllib
except ModuleNotFoundError: # Python 3.10 and earlier hosts
tomllib = None
try:
import yaml
except ModuleNotFoundError:
yaml = None
config_path, codex_config_path = map(Path, sys.argv[1:])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
"""Read only the top-level mapping scalars owned by this readiness gate."""
if yaml is not None:
loaded = yaml.safe_load(source) or {}
return loaded if isinstance(loaded, dict) else {}
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
def scalar_value(raw: str) -> str:
return raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip().strip("'\"")
def flow_mapping(raw: str) -> dict[str, str]:
value = raw.strip().split(" #", 1)[0].strip()
if not (value.startswith("{") and value.endswith("}")):
return {}
fields: dict[str, str] = {}
for part in value[1:-1].split(","):
key, separator, field_value = part.partition(":")
if separator:
fields[key.strip().strip("'\"")] = scalar_value(field_value)
return fields
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
if indent == 0:
section = key.strip("'\"")
parsed[section] = flow_mapping(raw_value)
elif section is not None:
parsed[section][key.strip("'\"")] = scalar_value(raw_value)
return parsed
def toml_mcp_servers(source: str) -> dict[str, dict[str, object]]:
"""Read MCP server table membership when the host lacks ``tomllib``."""
servers: dict[str, dict[str, object]] = {}
table: list[str] = []
def scalar_value(raw: str) -> str:
value = raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip()
return value.strip("'\"").strip()
def inline_value(raw: str, key: str) -> str | None:
match = re.search(rf"\b{re.escape(key)}\s*=\s*(\"[^\"]*\"|'[^']*'|[^,}}]+)", raw)
if match is None:
return None
return scalar_value(match.group(1))
for raw_line in source.splitlines():
line = raw_line.strip()
if not line or line.startswith("#"):
continue
if line.startswith("[") and line.endswith("]"):
table = [part.strip().strip("'\"") for part in line[1:-1].split(".")]
if len(table) >= 2 and table[0] == "mcp_servers":
servers.setdefault(table[1], {})
continue
if table == ["mcp_servers"] and "=" in line:
key, raw_value = line.split("=", 1)
server = servers.setdefault(key.strip().strip("'\""), {})
for field in ("command", "url"):
value = inline_value(raw_value, field)
if value is not None:
server[field] = value
continue
if len(table) >= 2 and table[0] == "mcp_servers" and "=" in line:
key, raw_value = line.split("=", 1)
key = key.strip().strip("'\"")
if key in {"command", "url"}:
servers.setdefault(table[1], {})[key] = scalar_value(raw_value)
return servers
def executable_candidate(candidate: str) -> bool:
"""Return whether a CLI candidate points to something runnable."""
value = candidate.strip()
if not value:
return False
if "/" not in value:
return shutil.which(value) is not None
path = Path(value).expanduser()
return path.is_file() and os.access(path, os.X_OK)
def codex_cli_ready(candidate: object) -> bool:
"""Return whether Codex runtime would have an executable launch candidate."""
if not isinstance(candidate, str):
return executable_candidate("codex")
value = candidate.strip()
if not value:
return executable_candidate("codex")
return executable_candidate(value)
def mcp_endpoint_ready(entry: object) -> bool:
"""Return whether the configured MCP endpoint can actually launch."""
if not isinstance(entry, dict):
return False
command = entry.get("command")
if isinstance(command, str) and command.strip():
return executable_candidate(command)
url = entry.get("url")
return isinstance(url, str) and bool(url.strip())
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
codex_source = codex_config_path.read_text(encoding="utf-8")
codex_config = tomllib.loads(codex_source) if tomllib is not None else {
"mcp_servers": toml_mcp_servers(codex_source)
}
except (OSError, ValueError):
raise SystemExit(1)
orchestrator = config.get("orchestrator") if isinstance(config, dict) else None
llm = config.get("llm") if isinstance(config, dict) else None
# Equivalent to [mcp_servers\.ouroboros], including quoted TOML key forms.
mcp_servers = codex_config.get("mcp_servers") if isinstance(codex_config, dict) else None
ouroboros_mcp = mcp_servers.get("ouroboros") if isinstance(mcp_servers, dict) else None
codex_cli_path = os.environ.get("OUROBOROS_CODEX_CLI_PATH")
if not codex_cli_path and isinstance(orchestrator, dict):
codex_cli_path = orchestrator.get("codex_cli_path")
ready = (
isinstance(orchestrator, dict)
and orchestrator.get("runtime_backend") == "codex"
and isinstance(llm, dict)
and llm.get("backend") == "codex"
and codex_cli_ready(codex_cli_path)
and mcp_endpoint_ready(ouroboros_mcp)
)
raise SystemExit(0 if ready else 1)
PY
then
CODEX_READY="true"
fiLegacy Codex Model Migration
Some older Ouroboros configurations saved gpt-5 into all four stage-model
fields. That was a historical default, but it is now an explicit pin and would
stop Codex App/CLI model changes from taking effect. Do not silently rewrite a
possible user pin. Instead, when Codex is ready, detect that exact legacy
shape once before honoring the welcome-completed marker:
if ouroboros_python - "$HOME/.ouroboros/config.yaml" "$HOME/.ouroboros/prefs.json" <<'PY'
from __future__ import annotations
import json
import sys
from pathlib import Path
config_path, prefs_path = map(Path, sys.argv[1:])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
value = raw_value.strip().split(" #", 1)[0].strip().strip("'\"")
if indent == 0:
section = key.strip("'\"")
parsed.setdefault(section, {})
elif section is not None:
parsed[section][key.strip("'\"")] = value
return parsed
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
except OSError:
raise SystemExit(1)
try:
prefs = json.loads(prefs_path.read_text(encoding="utf-8"))
except (OSError, ValueError):
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
stage_values = (
config.get("clarification", {}).get("default_model"),
config.get("execution", {}).get("default_model"),
config.get("evaluation", {}).get("semantic_model"),
config.get("resilience", {}).get("reflect_model"),
)
legacy_gpt5 = all(value == "gpt-5" for value in stage_values)
partial_automatic_migration = (
any(value == "gpt-5" for value in stage_values)
and any(value == "default" for value in stage_values)
and all(value in {"gpt-5", "default"} for value in stage_values)
)
handled = prefs.get("codexModelMigration") in {"automatic-v1", "kept-gpt-5-v1"}
raise SystemExit(0 if (legacy_gpt5 or partial_automatic_migration) and not handled else 1)
PY
then
LEGACY_CODEX_MODEL_MIGRATION_REQUIRED="true"
fiIf CODEX_READY is true and LEGACY_CODEX_MODEL_MIGRATION_REQUIRED is true:
Use AskUserQuestion:
{
"questions": [{
"question": "현재 설정은 모든 단계에서 gpt-5를 고정해 두고 있어요. Codex에서 선택한 모델을 자동으로 사용하도록 바꿀까요?",
"header": "모델 설정",
"options": [
{
"label": "Codex 선택으로 전환하기 (권장)",
"description": "App이나 CLI에서 바꾼 모델을 모든 단계가 자동으로 따라가요"
},
{
"label": "gpt-5 고정 유지하기",
"description": "지금처럼 모든 단계를 gpt-5로 계속 실행해요"
}
],
"multiSelect": false
}]
}- Codex 선택으로 전환하기: atomically rewrite the four legacy model pins on the current host:
ouroboros_python - "$HOME/.ouroboros/config.yaml" <<'PY'
from __future__ import annotations
import os
import sys
import tempfile
from pathlib import Path
path = Path(sys.argv[1])
original = path.read_text(encoding="utf-8")
replacements = {
("clarification", "default_model"): "default",
("execution", "default_model"): "default",
("evaluation", "semantic_model"): "default",
("resilience", "reflect_model"): "default",
}
seen: set[tuple[str, str]] = set()
section: str | None = None
output: list[str] = []
for line in original.splitlines(keepends=True):
stripped = line.strip()
indent = len(line) - len(line.lstrip())
key = stripped.split(":", 1)[0].strip("'\"") if ":" in stripped else ""
if indent == 0 and ":" in stripped:
section = key
target = (section or "", key)
if indent > 0 and target in replacements:
newline = "\n" if line.endswith("\n") else ""
prefix = line[:indent]
comment = ""
value_part = line.strip().split(":", 1)[1]
if " #" in value_part:
comment = " #" + value_part.split(" #", 1)[1].rstrip("\n")
output.append(f"{prefix}{key}: {replacements[target]}{comment}{newline}")
seen.add(target)
else:
output.append(line)
missing = set(replacements) - seen
if missing:
raise SystemExit(f"Cannot migrate Codex model pins; missing keys: {sorted(missing)}")
updated = "".join(output)
fd, tmp_name = tempfile.mkstemp(prefix=".config.yaml.", dir=str(path.parent))
try:
with os.fdopen(fd, "w", encoding="utf-8") as tmp:
tmp.write(updated)
tmp.flush()
os.fsync(tmp.fileno())
os.replace(tmp_name, path)
finally:
try:
os.unlink(tmp_name)
except FileNotFoundError:
pass
PYdefault deliberately sends no model pin to Codex; it does not name a model
called "default". Confirm that the rewrite succeeded before recording the
decision. If this step is interrupted before the marker is written, the next
readiness check recognizes the partial gpt-5/default state and offers the
migration again.
- gpt-5 고정 유지하기: do not change
config.yaml.
For either completed choice, merge exactly one marker into
~/.ouroboros/prefs.json without deleting existing keys:
ouroboros_python - "automatic-v1" <<'PY'
import json, os, sys
path = os.path.expanduser('~/.ouroboros/prefs.json')
try:
prefs = json.load(open(path, encoding='utf-8'))
except Exception:
prefs = {}
if not isinstance(prefs, dict):
prefs = {}
prefs['codexModelMigration'] = sys.argv[1]
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, 'w', encoding='utf-8') as f:
json.dump(prefs, f, indent=2)
f.write('\n')
PYPass kept-gpt-5-v1 instead of automatic-v1 for the keep choice. If welcome
was already completed, show a short confirmation and exit after recording this
decision; do not make the user answer the generic welcome question too.
If ALREADY_COMPLETED is true, SETUP_READY or CODEX_READY is true, AND no --force flag:
Use AskUserQuestion:
{
"questions": [{
"question": "Ouroboros welcome was already completed on $WELCOME_COMPLETED. What would you like to do?",
"header": "Welcome",
"options": [
{ "label": "Skip", "description": "Continue to work (recommended)" },
{ "label": "Re-run welcome", "description": "Go through the interactive onboarding again" }
],
"multiSelect": false
}]
}- Skip: Mark as complete and exit
- Re-run welcome: Continue to Step 1 below
If the welcome was completed but neither SETUP_READY nor CODEX_READY is
true, bypass this completion prompt and continue to the Setup Gate below.
If --skip flag present:
- Merge
welcomeShown: true,welcomeCompleted: <current timestamp>, andwelcomeVersioninto~/.ouroboros/prefs.jsonwithout deleting existing keys:
ouroboros_python - <<'PY' import json, os from datetime import UTC, datetime path = os.path.expanduser('~/.ouroboros/prefs.json') os.makedirs(os.path.dirname(path), exist_ok=True) try: with open(path, encoding='utf-8') as f: prefs = json.load(f) if not isinstance(prefs, dict): prefs = {} except Exception: prefs = {} prefs.update({ 'welcomeShown': True, 'welcomeCompleted': datetime.now(UTC).isoformat(), 'welcomeVersion': '0.50.5', }) with open(path, 'w', encoding='utf-8') as f: json.dump(prefs, f, indent=2) f.write('\n') PY
- Show brief message:Ouroboros welcome skipped. Run /ouroboros:welcome --force to re-run onboarding.
- Exit
---
### Setup Gate: First Use
Before showing the welcome banner, check whether setup is prepared for the
active runtime on this machine. A global `config.yaml` alone is not enough: it
must name a runtime this gate recognizes.
First accept a completed **Claude Code** setup. The marketplace plugin owns
its MCP capability; host-owned `~/.claude/mcp.json` is intentionally not part
of SDK setup readiness:
```bash
if ouroboros_python - "$HOME/.ouroboros/config.yaml" <<'PY'
from __future__ import annotations
import sys
from pathlib import Path
try:
import yaml
except ModuleNotFoundError:
yaml = None
config_path = Path(sys.argv[1])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
"""Read only the top-level mapping scalars owned by this readiness gate."""
if yaml is not None:
loaded = yaml.safe_load(source) or {}
return loaded if isinstance(loaded, dict) else {}
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
def scalar_value(raw: str) -> str:
return raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip().strip("'\"")
def flow_mapping(raw: str) -> dict[str, str]:
value = raw.strip().split(" #", 1)[0].strip()
if not (value.startswith("{") and value.endswith("}")):
return {}
fields: dict[str, str] = {}
for part in value[1:-1].split(","):
key, separator, field_value = part.partition(":")
if separator:
fields[key.strip().strip("'\"")] = scalar_value(field_value)
return fields
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
if indent == 0:
section = key.strip("'\"")
parsed[section] = flow_mapping(raw_value)
elif section is not None:
parsed.setdefault(section, {})[key.strip("'\"")] = scalar_value(raw_value)
return parsed
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
except (OSError, ValueError):
raise SystemExit(1)
orchestrator = config.get("orchestrator") if isinstance(config, dict) else None
llm = config.get("llm") if isinstance(config, dict) else None
# Existing YAML form: runtime_backend: claude. Parsing avoids assuming its order.
# The marketplace plugin owns its MCP capability. Host-owned
# ~/.claude/mcp.json is intentionally not part of SDK setup readiness.
ready = (
isinstance(orchestrator, dict)
and orchestrator.get("runtime_backend") in {"claude", "claude_mcp"}
and isinstance(llm, dict)
and llm.get("backend") == "claude"
)
raise SystemExit(0 if ready else 1)
PY
then
echo "SETUP_READY"
else
echo "SETUP_REQUIRED"
fiIf the Claude gate printed SETUP_READY, setup is complete: skip the Codex
gate below and continue directly to the welcome banner.
Otherwise check whether Codex is prepared:
CODEX_HOME_DIR="${CODEX_HOME:-$HOME/.codex}"
case "$CODEX_HOME_DIR" in
"~") CODEX_HOME_DIR="$HOME" ;;
"~/"*) CODEX_HOME_DIR="$HOME/${CODEX_HOME_DIR#"~/"}" ;;
esac
if ouroboros_python - "$HOME/.ouroboros/config.yaml" "$CODEX_HOME_DIR/config.toml" <<'PY'
from __future__ import annotations
import re
import os
import shutil
import sys
from pathlib import Path
try:
import tomllib
except ModuleNotFoundError: # Python 3.10 and earlier hosts
tomllib = None
try:
import yaml
except ModuleNotFoundError:
yaml = None
config_path, codex_config_path = map(Path, sys.argv[1:])
def yaml_mapping(source: str) -> dict[str, dict[str, str]]:
"""Read only the top-level mapping scalars owned by this readiness gate."""
if yaml is not None:
loaded = yaml.safe_load(source) or {}
return loaded if isinstance(loaded, dict) else {}
parsed: dict[str, dict[str, str]] = {}
section: str | None = None
def scalar_value(raw: str) -> str:
return raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip().strip("'\"")
def flow_mapping(raw: str) -> dict[str, str]:
value = raw.strip().split(" #", 1)[0].strip()
if not (value.startswith("{") and value.endswith("}")):
return {}
fields: dict[str, str] = {}
for part in value[1:-1].split(","):
key, separator, field_value = part.partition(":")
if separator:
fields[key.strip().strip("'\"")] = scalar_value(field_value)
return fields
for raw_line in source.splitlines():
if not raw_line.strip() or raw_line.lstrip().startswith("#"):
continue
indent = len(raw_line) - len(raw_line.lstrip())
key, separator, raw_value = raw_line.strip().partition(":")
if not separator:
continue
if indent == 0:
section = key.strip("'\"")
parsed[section] = flow_mapping(raw_value)
elif section is not None:
parsed.setdefault(section, {})[key.strip("'\"")] = scalar_value(raw_value)
return parsed
def toml_mcp_servers(source: str) -> dict[str, dict[str, object]]:
"""Read MCP table membership when the host lacks the TOML standard library."""
servers: dict[str, dict[str, object]] = {}
table: list[str] = []
def scalar_value(raw: str) -> str:
value = raw.strip().split(" #", 1)[0].strip().rstrip(",}").strip()
return value.strip("'\"").strip()
def inline_value(raw: str, key: str) -> str | None:
match = re.search(rf"\b{re.escape(key)}\s*=\s*(\"[^\"]*\"|'[^']*'|[^,}}]+)", raw)
if match is None:
return None
return scalar_value(match.group(1))
for raw_line in source.splitlines():
line = raw_line.strip()
if not line or line.startswith("#"):
continue
if line.startswith("[") and line.endswith("]"):
table = [part.strip().strip("'\"") for part in line[1:-1].split(".")]
if len(table) >= 2 and table[0] == "mcp_servers":
servers.setdefault(table[1], {})
continue
if table == ["mcp_servers"] and "=" in line:
key, raw_value = line.split("=", 1)
server = servers.setdefault(key.strip().strip("'\""), {})
for field in ("command", "url"):
value = inline_value(raw_value, field)
if value is not None:
server[field] = value
continue
if len(table) >= 2 and table[0] == "mcp_servers" and "=" in line:
key, raw_value = line.split("=", 1)
key = key.strip().strip("'\"")
if key in {"command", "url"}:
servers.setdefault(table[1], {})[key] = scalar_value(raw_value)
return servers
def executable_candidate(candidate: str) -> bool:
"""Return whether a CLI candidate points to something runnable."""
value = candidate.strip()
if not value:
return False
if "/" not in value:
return shutil.which(value) is not None
path = Path(value).expanduser()
return path.is_file() and os.access(path, os.X_OK)
def codex_cli_ready(candidate: object) -> bool:
"""Return whether Codex runtime would have an executable launch candidate."""
if not isinstance(candidate, str):
return executable_candidate("codex")
value = candidate.strip()
if not value:
return executable_candidate("codex")
return executable_candidate(value)
def mcp_endpoint_ready(entry: object) -> bool:
"""Return whether the configured MCP endpoint can actually launch."""
if not isinstance(entry, dict):
return False
command = entry.get("command")
if isinstance(command, str) and command.strip():
return executable_candidate(command)
url = entry.get("url")
return isinstance(url, str) and bool(url.strip())
try:
config = yaml_mapping(config_path.read_text(encoding="utf-8"))
codex_source = codex_config_path.read_text(encoding="utf-8")
codex_config = tomllib.loads(codex_source) if tomllib is not None else {
"mcp_servers": toml_mcp_servers(codex_source)
}
except (OSError, ValueError):
raise SystemExit(1)
orchestrator = config.get("orchestrator") if isinstance(config, dict) else None
llm = config.get("llm") if isinstance(config, dict) else None
# This is equivalent to checking [mcp_servers\.ouroboros], but TOML parsing
# also accepts a quoted "ouroboros" key and does not depend on table ordering.
mcp_servers = codex_config.get("mcp_servers") if isinstance(codex_config, dict) else None
ouroboros_mcp = mcp_servers.get("ouroboros") if isinstance(mcp_servers, dict) else None
codex_cli_path = os.environ.get("OUROBOROS_CODEX_CLI_PATH")
if not codex_cli_path and isinstance(orchestrator, dict):
codex_cli_path = orchestrator.get("codex_cli_path")
ready = (
isinstance(orchestrator, dict)
and orchestrator.get("runtime_backend") == "codex"
and isinstance(llm, dict)
and llm.get("backend") == "codex"
and codex_cli_ready(codex_cli_path)
and mcp_endpoint_ready(ouroboros_mcp)
)
raise SystemExit(0 if ready else 1)
PY
then
echo "CODEX_READY"
else
echo "CODEX_SETUP_REQUIRED"
fiIf neither gate reports ready (the Claude gate printed SETUP_REQUIRED and
the Codex gate printed CODEX_SETUP_REQUIRED), ask one concise question in
the user's language. This includes a user whose existing Ouroboros
configuration names a runtime neither gate recognizes. For a Korean
conversation, use:
{
"questions": [{
"question": "Ouroboros를 처음 사용하시네요. 시작하기 전에 실행 환경을 설정할까요?",
"header": "Ouroboros 시작하기",
"options": [
{
"label": "설정하고 시작하기 (권장)",
"description": "한 번만 설정하면 바로 사용할 수 있어요"
},
{
"label": "나중에",
"description": "지금은 기본 안내만 보고 나중에 설정할게요"
}
],
"multiSelect": false
}]
}- 설정하고 시작하기: Run the setup command for the active host. In Codex
App or Codex CLI, use
ouroboros setup --runtime codexwhen the executable is installed. For a Marketplace-plugin-only install, useuvx --isolated --python '>=3.12' --from 'ouroboros-ai[mcp]' ouroboros setup --runtime codexinstead. In Claude Code, follow../setup/SKILL.md. Do not ask the user to copy a command when the current host can run it. - 나중에: Continue with the welcome flow, but do not claim that MCP-only execution features are ready.
After successful Codex setup, immediately ask:
{
"questions": [{
"question": "설정이 완료됐어요. 기본적으로 Codex에서 선택한 모델을 사용합니다. 모델은 언제든 나중에 바꿀 수 있어요.",
"header": "준비 완료",
"options": [
{
"label": "바로 시작하기 (권장)",
"description": "기본 모델로 바로 작업을 시작해요"
},
{
"label": "직접 모델 설정하기",
"description": "단계별로 모델을 바꾸거나 목록에 없는 모델 ID를 입력해 고정해요"
}
],
"multiSelect": false
}]
}- 바로 시작하기: Continue to Step 1.
- 직접 모델 설정하기: Read and follow
../config/SKILL.md. On the user's local Codex App or Codex CLI this opens the settings UI in their browser at a temporarylocalhostaddress; it is not an external website. The UI offers Use Codex default model for the current Codex selection and Enter another model ID… for a deliberate stage pin. After the settings session ends, continue to Step 1.
For Claude Code, ../setup/SKILL.md presents the equivalent model
choice during its own completion flow. Do not show this Codex-specific question
a second time; continue to Step 1 after the Claude setup skill returns.
Do not show this gate again once Codex is ready. The normal settings UI remains
available later through ooo config, so a model choice made now is never
permanent.
Step 1: Welcome Banner
Display:
Welcome to Ouroboros!
The serpent that eats itself -- better every loop.
Most AI coding fails at the input, not the output.
Ouroboros fixes this by exposing hidden assumptions
BEFORE any code is written.
Interview -> Seed -> Execute -> Evaluate
^ |
+---- Evolutionary Loop -----+Step 2: Persona Detection
AskUserQuestion:
{
"questions": [{
"question": "What brings you to Ouroboros?",
"header": "Welcome",
"options": [
{
"label": "New project idea",
"description": "I have a vague idea and want to crystallize it into a clear spec"
},
{
"label": "Tired of rewriting prompts",
"description": "AI keeps building the wrong thing because my requirements are unclear"
},
{
"label": "Just exploring",
"description": "Heard about Ouroboros and want to see what it does"
}
],
"multiSelect": false
}]
}Give brief personalized response (1-2 sentences) based on choice.
Step 3: Advanced Runtime Check
Ordinary Claude setup uses the default [claude] Agent SDK profile on MCP 1.x.
It intentionally leaves host-owned ~/.claude/mcp.json untouched; do not
inspect or mutate that file as an onboarding health check. The dependency-free
worker is the explicit [claude-cli] profile used by an isolated MCP 2 process.
If the active runtime does not expose Ouroboros MCP tools, AskUserQuestion:
{
"questions": [{
"question": "Advanced MCP workflows require a host-managed MCP 2 launcher. What would you like to do?",
"header": "Runtime",
"options": [
{ "label": "Continue native (Recommended)", "description": "Use Claude-native interview, seed, evaluate, and unstuck workflows" },
{ "label": "Show MCP setup", "description": "See supported Codex, OpenCode, Kiro, Copilot, or Hermes setup commands" }
],
"multiSelect": false
}]
}- Continue native: Continue to Step 4
- Show MCP setup: Explain that the Claude marketplace plugin or another
supported host setup owns the isolated
[mcp]launcher. Never combine[claude-sdk]with[mcp]. Then continue to Step 4.
Step 4: Quick Reference
Available Commands:
+---------------------------------------------------+
| Command | What It Does |
|-----------------|----------------------------------|
| ooo interview | Socratic Q&A -- expose hidden |
| | assumptions in your requirements |
| ooo seed | Crystallize answers into spec |
| ooo run | Execute with visual TUI |
| ooo evaluate | 3-stage verification |
| ooo unstuck | Lateral thinking when stuck |
| ooo config | Settings GUI: agents & models |
| ooo help | Full command reference |
+---------------------------------------------------+Step 4: First Action
AskUserQuestion:
{
"questions": [{
"question": "What would you like to do first?",
"header": "Get started",
"options": [
{ "label": "Start a project", "description": "Run a Socratic interview on your idea right now" },
{ "label": "Try the tutorial", "description": "Interactive hands-on learning with a sample project" },
{ "label": "Read the docs", "description": "Full command reference and architecture overview" }
],
"multiSelect": false
}]
}Based on choice:
- Start a project: Ask "What do you want to build?" → execute
../interview/SKILL.md - Try the tutorial: Execute
../tutorial/SKILL.md - Read the docs: Execute
../help/SKILL.md
Step 5: GitHub Star (Last Step)
Check gh availability first:
gh auth status &>/dev/null && echo "GH_OK" || echo "GH_MISSING"If GH_OK AND star_asked not true:
AskUserQuestion:
{
"questions": [{
"question": "If you're enjoying Ouroboros, would you like to star it on GitHub?",
"header": "Community",
"options": [
{ "label": "Star on GitHub", "description": "Takes 1 second -- helps the project grow" },
{ "label": "Maybe later", "description": "Skip for now" }
],
"multiSelect": false
}]
}- Star on GitHub:
gh api -X PUT /user/starred/Q00/ouroboros - Both choices: merge the welcome completion fields into
~/.ouroboros/prefs.jsonwithout deleting existing keys. Setstar_asked: trueafter either star prompt choice so the star prompt is not repeated:
ouroboros_python - <<'PY' import json, os from datetime import UTC, datetime path = os.path.expanduser('~/.ouroboros/prefs.json') os.makedirs(os.path.dirname(path), exist_ok=True) try: with open(path, encoding='utf-8') as f: prefs = json.load(f) if not isinstance(prefs, dict): prefs = {} except Exception: prefs = {} prefs.update({ 'star_asked': True, 'welcomeShown': True, 'welcomeCompleted': datetime.now(UTC).isoformat(), 'welcomeVersion': '0.50.5', }) with open(path, 'w', encoding='utf-8') as f: json.dump(prefs, f, indent=2) f.write('\n') PY
**If `GH_MISSING` or `star_asked` is true:**
Merge the welcome completion fields into `~/.ouroboros/prefs.json` without deleting existing keys:
```bash
ouroboros_python - <<'PY'
import json, os
from datetime import UTC, datetime
path = os.path.expanduser('~/.ouroboros/prefs.json')
os.makedirs(os.path.dirname(path), exist_ok=True)
try:
with open(path, encoding='utf-8') as f:
prefs = json.load(f)
if not isinstance(prefs, dict):
prefs = {}
except Exception:
prefs = {}
prefs.update({
'welcomeShown': True,
'welcomeCompleted': datetime.now(UTC).isoformat(),
'welcomeVersion': '0.50.5',
})
with open(path, 'w', encoding='utf-8') as f:
json.dump(prefs, f, indent=2)
f.write('\n')
PYCompletion Message
Ouroboros Setup Complete!
MAGIC KEYWORDS (optional shortcuts):
Just include these naturally in your request:
| Keyword | Effect | Example |
|---------|--------|---------|
| interview | Socratic Q&A | "interview me about my app idea" |
| seed | Crystallize spec | "seed the requirements" |
| evaluate | 3-stage check | "evaluate this implementation" |
| stuck | Lateral thinking | "I'm stuck on the auth flow" |
REAL-TIME MONITORING (TUI):
When running ooo run or ooo evolve, open a separate terminal:
uvx --python '>=3.12' --from 'ouroboros-ai[tui]' ouroboros tui monitor
Press 1-4 to switch screens (Dashboard, Execution, Logs, Debug).
READY TO BUILD:
- ooo interview "your project idea"
- ooo tutorial # Interactive learning
- ooo help # Full referencePrefs File Structure
~/.ouroboros/prefs.json:
{
"welcomeShown": true,
"welcomeCompleted": "2025-02-23T15:30:00+09:00",
"welcomeVersion": "0.50.5",
"star_asked": true
}RFC #1392 State Breadcrumb Footer
Your final response MUST end with exactly one breadcrumb footer line:
◆ <current state> → next: <recommended action>Derive <current state> from live session state via ouroboros_session_status when that MCP projection is available; otherwise derive it from this skill's actual outcome. Never use a linear Step N of M footer because Ouroboros is an evolutionary loop. When the next action is genuinely a choice, list 2-3 honest options in the next: clause. The breadcrumb line must be the last line of the response.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

