From 002aa40c0df431decd9c73f16881d83312657491 Mon Sep 17 00:00:00 2001 From: Bryan Date: Sun, 22 Nov 2026 20:15:25 +0800 Subject: [PATCH] Remove upstream prompt branding and align model roles with host permissions --- .../model-role-contracts/assertions.json | 558 ++++++++++++++++++ .../model-role-contracts/receipt.json | 282 +++++++++ .../remove-omo-runtime/assertions.json | 358 +++++++++++ .../evidence/remove-prompt-brand/receipt.json | 40 ++ docs/prompt-audit-2026-11-22.md | 29 + docs/prompt-design.md | 2 +- reference/active-manifest.json | 76 +-- script/qa-prompt-lanes.mjs | 189 ++++-- src/context.ts | 4 +- src/omo/agents/hephaestus/claude.ts | 2 +- src/omo/agents/hephaestus/prompt-router.ts | 2 +- .../agents/sisyphus-dynamic-prompt-role.ts | 2 +- .../sisyphus-dynamic-prompt-sections.ts | 2 +- src/omo/agents/sisyphus-junior/default.ts | 2 +- src/omo/agents/sisyphus-junior/gemini.ts | 169 +----- src/omo/agents/sisyphus-junior/glm-5-2.ts | 2 +- src/omo/agents/sisyphus-junior/gpt-5-4.ts | 2 +- src/omo/agents/sisyphus-junior/gpt.ts | 2 +- src/omo/agents/sisyphus-junior/kimi-k2-6.ts | 2 +- src/omo/agents/sisyphus-junior/kimi-k2-7.ts | 2 +- src/omo/agents/sisyphus-junior/kimi-k3.ts | 2 +- src/omo/agents/sisyphus/claude-fable-5.ts | 19 +- src/omo/agents/sisyphus/claude-opus-4-7.ts | 4 +- src/omo/agents/sisyphus/claude-opus-4-8.ts | 4 +- src/omo/agents/sisyphus/claude-opus-5-5.ts | 38 +- src/omo/agents/sisyphus/claude-opus-5.ts | 4 +- src/omo/agents/sisyphus/default.ts | 2 +- src/omo/agents/sisyphus/glm-5-2.ts | 4 +- src/omo/agents/sisyphus/gpt-5-4.ts | 4 +- src/omo/agents/sisyphus/gpt-5-5.ts | 4 +- src/omo/agents/sisyphus/gpt-6-astra.ts | 2 +- src/omo/agents/sisyphus/grok-4.ts | 4 +- src/omo/agents/sisyphus/kimi-k2-6.ts | 4 +- src/omo/agents/sisyphus/kimi-k2-7.ts | 4 +- src/omo/agents/sisyphus/kimi-k3.ts | 4 +- src/omo/agents/specialists/explore-prompt.ts | 2 +- .../agents/specialists/librarian-prompt.ts | 2 +- src/omo/agents/specialists/metis-prompt.ts | 4 +- src/omo/agents/specialists/momus-gpt-5-6.ts | 2 +- src/omo/agents/specialists/momus-prompt.ts | 2 +- .../specialists/multimodal-looker-prompt.ts | 2 +- src/omo/agents/specialists/oracle-prompt.ts | 10 +- src/omo/modes/prompts/atlas/default.md | 2 +- src/omo/modes/prompts/atlas/gemini.md | 2 +- src/omo/modes/prompts/atlas/glm.md | 2 +- src/omo/modes/prompts/atlas/gpt.md | 2 +- src/omo/modes/prompts/atlas/kimi-k2-7.md | 2 +- src/omo/modes/prompts/atlas/kimi-k3.md | 2 +- src/omo/modes/prompts/atlas/kimi.md | 2 +- src/omo/modes/prompts/atlas/opus-4-7.md | 2 +- src/prompts/catalog.ts | 8 +- src/prompts/native-bindings.ts | 16 +- src/prompts/render.ts | 8 +- src/registration.ts | 4 +- tests/gemini-worker-contract.test.ts | 26 + tests/model-role-contract.test.ts | 44 ++ 56 files changed, 1642 insertions(+), 334 deletions(-) create mode 100644 .iolaus/evidence/model-role-contracts/assertions.json create mode 100644 .iolaus/evidence/model-role-contracts/receipt.json create mode 100644 .iolaus/evidence/remove-omo-runtime/assertions.json create mode 100644 .iolaus/evidence/remove-prompt-brand/receipt.json create mode 100644 docs/prompt-audit-2026-11-22.md create mode 100644 tests/gemini-worker-contract.test.ts create mode 100644 tests/model-role-contract.test.ts diff --git a/.iolaus/evidence/model-role-contracts/assertions.json b/.iolaus/evidence/model-role-contracts/assertions.json new file mode 100644 index 0000000..e5785b9 --- /dev/null +++ b/.iolaus/evidence/model-role-contracts/assertions.json @@ -0,0 +1,558 @@ +[ + { + "name": "opus-5-5: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-5-5: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-5-5: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-5-5: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-5-5: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-5-5: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "opus-4-8: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-4-8: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-4-8: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-4-8: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-4-8: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-4-8: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: planner doctrine is real content", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: planner doctrine is real content", + "verdict": "PASS" + }, + { + "name": "ulw-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "ulw-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "ulw-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "ulw-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "ulw-opus: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "ulw-opus: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "ulw-opus: keyword \"ultrawork\" injects the flow mandate", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: keyword \"mass-ulw\" injects the flow mandate", + "verdict": "PASS" + }, + { + "name": "audit-astra-oracle: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-astra-oracle: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-astra-oracle: adviser identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-astra-oracle: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-astra-oracle: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-fable-owner: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-fable-owner: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-fable-owner: owner identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-fable-owner: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-fable-owner: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-fable-planner: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-fable-planner: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-fable-planner: planner identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-fable-planner: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-fable-planner: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-opus-owner: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-opus-owner: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-opus-owner: owner identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-opus-owner: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-opus-owner: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-junior: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-junior: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-junior: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-junior: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-junior: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-visual-engineering: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-visual-engineering: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-visual-engineering: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-visual-engineering: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-hydrogen-visual-engineering: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-carbon-junior: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-carbon-junior: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-carbon-junior: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-carbon-junior: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-carbon-junior: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-carbon-quick: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-carbon-quick: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-carbon-quick: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-carbon-quick: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-carbon-quick: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-neon-junior: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-neon-junior: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-neon-junior: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-neon-junior: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-neon-junior: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "audit-neon-deep-low: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "audit-neon-deep-low: actual agent turn uses the configured model and mock wire", + "verdict": "PASS" + }, + { + "name": "audit-neon-deep-low: worker identity and tool contract", + "verdict": "PASS" + }, + { + "name": "audit-neon-deep-low: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "audit-neon-deep-low: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "prometheus: the planner prompt is identical on every model", + "verdict": "PASS" + }, + { + "name": "host state untouched", + "verdict": "PASS" + }, + { + "name": "mock protocol", + "verdict": "PASS" + } +] \ No newline at end of file diff --git a/.iolaus/evidence/model-role-contracts/receipt.json b/.iolaus/evidence/model-role-contracts/receipt.json new file mode 100644 index 0000000..4d3a93e --- /dev/null +++ b/.iolaus/evidence/model-role-contracts/receipt.json @@ -0,0 +1,282 @@ +{ + "binary": "/opt/homebrew/bin/opencode", + "buildSHA256": "6f88175a39d108e5c4a816fed18ff8a56696739cfc7a358f48bf34e6895ecf7d", + "scope": "Local mock only. Prompt delivery and advertised tool surface, not model behavior or performance.", + "passed": 139, + "failed": 0, + "hostStateUnchanged": true, + "sandboxRemoved": true, + "mockClosed": true, + "requestCount": 59, + "captures": [ + { + "scenario": "audit-astra-oracle", + "agent": "oracle", + "configuredModel": "proxy-codex/gpt-6.2-astra", + "transport": "responses", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gpt-6.2-astra", + "wire": "responses", + "tools": [ + "glob", + "grep", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "execute" + ] + } + ] + }, + { + "scenario": "audit-fable-owner", + "agent": "sisyphus", + "configuredModel": "proxy-cc/claude-fable-5-2", + "transport": "messages", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "claude-fable-5-2", + "wire": "messages", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "subagent", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-fable-planner", + "agent": "prometheus", + "configuredModel": "proxy-cc/claude-fable-5-2", + "transport": "messages", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "claude-fable-5-2", + "wire": "messages", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "skill", + "subagent", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-opus-owner", + "agent": "sisyphus", + "configuredModel": "proxy-cc/claude-opus-5-5", + "transport": "messages", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "claude-opus-5-5", + "wire": "messages", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "subagent", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-hydrogen-junior", + "agent": "sisyphus-junior", + "configuredModel": "bryan/gemini-4-hydrogen", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-hydrogen", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-hydrogen-visual-engineering", + "agent": "visual-engineering", + "configuredModel": "bryan/gemini-4-hydrogen", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-hydrogen", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-carbon-junior", + "agent": "sisyphus-junior", + "configuredModel": "bryan/gemini-4-carbon", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-carbon", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-carbon-quick", + "agent": "quick", + "configuredModel": "bryan/gemini-4-carbon", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-carbon", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-neon-junior", + "agent": "sisyphus-junior", + "configuredModel": "bryan/gemini-4-neon", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-neon", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + }, + { + "scenario": "audit-neon-deep-low", + "agent": "deep-low", + "configuredModel": "bryan/gemini-4-neon", + "transport": "OpenAI-compatible Responses (not native Gemini wire)", + "ignoredHostRequests": 1, + "agentTurns": [ + { + "model": "gemini-4-neon", + "wire": "responses", + "tools": [ + "edit", + "glob", + "grep", + "iolaus_flow", + "question", + "read", + "shell", + "skill", + "webfetch", + "websearch", + "write", + "execute" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.iolaus/evidence/remove-omo-runtime/assertions.json b/.iolaus/evidence/remove-omo-runtime/assertions.json new file mode 100644 index 0000000..b20f3f0 --- /dev/null +++ b/.iolaus/evidence/remove-omo-runtime/assertions.json @@ -0,0 +1,358 @@ +[ + { + "name": "opus-5-5: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-5-5: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-5-5: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-5-5: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-5-5: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-5-5: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "opus-4-8: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-4-8: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-4-8: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-4-8: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-4-8: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-4-8: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "opus-4-8-gateway: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "gpt-6-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "gpt-5-5: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-astra: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "sisyphus-6-2-sol: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-astra: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-6-2-sol: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "hephaestus-opus: worker contract, not orchestration", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "prometheus-astra: planner doctrine is real content", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "prometheus-opus: planner doctrine is real content", + "verdict": "PASS" + }, + { + "name": "ulw-opus: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "ulw-opus: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "ulw-opus: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "ulw-opus: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "ulw-opus: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "ulw-opus: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "ulw-opus: keyword \"ultrawork\" injects the flow mandate", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: real session renders a prompt", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: names the model it runs on", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: carries no tool this harness does not register", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: prompts omit upstream branding", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: ordinary owner gets delegation routing, explicit mode keeps its template", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: carries the flow rule", + "verdict": "PASS" + }, + { + "name": "mass-ulw-astra: keyword \"mass-ulw\" injects the flow mandate", + "verdict": "PASS" + }, + { + "name": "prometheus: the planner prompt is identical on every model", + "verdict": "PASS" + }, + { + "name": "host state untouched", + "verdict": "PASS" + }, + { + "name": "mock protocol", + "verdict": "PASS" + } +] \ No newline at end of file diff --git a/.iolaus/evidence/remove-prompt-brand/receipt.json b/.iolaus/evidence/remove-prompt-brand/receipt.json new file mode 100644 index 0000000..a855e09 --- /dev/null +++ b/.iolaus/evidence/remove-prompt-brand/receipt.json @@ -0,0 +1,40 @@ +{ + "verdict": "PASS", + "host": "OpenCode 2.3.2", + "build": "bun run build", + "harness": "script/qa-prompt-lanes.mjs, unmodified stock run plus a temporary expanded scenario matrix", + "stock": { "scenarios": 15, "passed": 74, "failed": 0, "mockRequests": 39, "iolausInstructionsChecked": 23 }, + "expanded": { + "scenarios": 27, + "mockRequests": 56, + "iolausInstructionsChecked": 29, + "promptChecksPassed": 27, + "promptChecksFailed": 0, + "coverage": [ + "Sisyphus: Opus 4.7, Opus 5, Fable 5, GPT-5.4, Grok 4.5, Gemini fallback", + "Hephaestus: Gemini fallback", + "Atlas: GPT, Gemini, default with Grok, Opus 4.7, and Anthropic", + "Sisyphus Junior: GPT-5.5, GPT-5.4, Gemini, GLM 5.2, Kimi K2.6/K2.7/K3, and Claude; also Quick on GPT-6.2 Sol", + "Specialists: Metis on Kimi K2.7, Momus on GPT-5.6, Oracle, Librarian, Explore, and Multimodal Looker" + ] + }, + "catalog": { + "surface": "GET /api/agent in the private OpenCode server after a session prompt initialized the location", + "passed": true, + "namesAndDescriptionsChecked": ["Sisyphus", "Hephaestus", "Prometheus", "Atlas", "Sisyphus Junior", "Oracle", "Librarian", "Explore", "Metis", "Momus", "Multimodal Looker", "Quick"], + "earlyProbeFailures": [ + "AssertionError [ERR_ASSERTION]: agent.list omitted sisyphus", + "AssertionError [ERR_ASSERTION]: agent.list omitted sisyphus" + ] + }, + "result": "No former-brand affiliation claims in captured Iolaus instructions or registered descriptions; role names and registered display names preserved. OMO remains where it describes prompt provenance.", + "limits": "Only runtime-selected variants and registered descriptions are covered here, not retained variants unreachable through live routing or unregistered description constants.", + "isolation": { + "mockProtocols": ["Anthropic Messages", "OpenAI Responses"], + "sandbox": "Fresh HOME, XDG roots, and IOLAUS_HOME; no test process used the host database.", + "hostConfigAndAuthHashesUnchanged": true, + "sandboxesRemoved": true, + "mockListenersClosed": true, + "childProcessGroupsRemaining": 0 + } +} diff --git a/docs/prompt-audit-2026-11-22.md b/docs/prompt-audit-2026-11-22.md new file mode 100644 index 0000000..38a8b5e --- /dev/null +++ b/docs/prompt-audit-2026-11-22.md @@ -0,0 +1,29 @@ +# Model prompt audit — 2026-11-22 + +Scope: rendered Iolaus instructions, not provider performance. The observations below describe the **pre-fix** prompts. All four findings have since been addressed; see the [isolated OpenCode QA receipt](../.iolaus/evidence/model-role-contracts/receipt.json). The local OpenCode chat catalog listed `proxy-cc/claude-opus-5-5`, `proxy-cc/claude-fable-5-2`, `proxy-codex/gpt-6.2-astra`, and `bryan/gemini-4-{hydrogen,carbon,neon}`. This confirms catalog entries, not endpoint availability. No live model behavior was benchmarked. + +| Model | Observed | Recommendation | +| --- | --- | --- | +| GPT-6.2 Astra | Sisyphus, Hephaestus and Junior name Astra 6.2 correctly. [Oracle](../src/omo/agents/specialists/oracle-prompt.ts#L241) says it is based on GPT-5.5; the [selector](../src/omo/agents/specialists/oracle-prompt.ts#L420) intentionally reuses that body for GPT-6. Oracle is configured on Astra here. | Keep the advisory body; remove the fixed model identity or derive it from the selected model. Cover the specialist, not just the primary agents. | +| Gemini 4 Hydrogen, Carbon, Neon | All three resolve to the Google idiom. Their Sisyphus prompts are identical (generic fallback); Atlas and ultrawork use Gemini bodies, and category workers share the Gemini Junior body. That [worker body](../src/omo/agents/sisyphus-junior/gemini.ts#L63) directs workers to spawn explore/librarian, but [registration](../src/registration.ts#L139) denies `subagent`. Hydrogen is configured for visual-engineering and writing here. | Fix the shared worker instruction first: look things up with available tools; return blockers to the caller. Use project checks rather than mandating a nonexistent LSP tool. Test all three IDs before considering separate templates. | +| Claude Opus 5.5 | [Sisyphus has a dedicated body](../src/prompts/sisyphus-route.ts#L38). The rendered prompt includes both the shared “not a checklist” instruction and the [5.5-specific “is the checklist” instruction](../src/omo/agents/sisyphus/claude-opus-5-5.ts#L67). | Keep the 5.5 body. Distinguish checking results before claiming completion from blocking the owner of an asynchronous flow, especially at a human gate. | +| Claude Fable 5.2 | [Routing](../src/prompts/prompt-lanes.ts#L60) identifies 5.2 but reuses the Fable 5 body; [Sisyphus](../src/omo/agents/sisyphus/claude-fable-5.ts#L91) identifies itself as `claude-fable-5` and asserts a capability ranking. This is not the path for the configured Prometheus or Metis roles. | Keep a shared Fable body, remove the ranking and make its identity accurate. An explicit 5.2 row pointing at the same builder alone does not fix the output. | + +Cross-checks: `bun test tests/routing.test.ts tests/prompt-contract.test.ts` passed (23 tests). That suite is not evidence of behavioral quality or even absence of identity errors in other agent roles. For any proposed per-model behavioral split, compare the same tasks and permissions against the shared baseline: acceptance checks passed, invalid tool calls, unnecessary delegation, latency and cost. A mock can test delivery but cannot establish those model differences. + +## What to borrow + +Use vendor documentation for model behavior, product prompt captures for design examples, and other orchestrators for implementation ideas. Iolaus's actual roles, tool schemas, permission checks and Flow semantics take precedence over examples from a different host. + +First-party guidance for the revisions: + +- [Prompting Opus 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5) distinguishes premature end-of-turn from legitimate stops. Apply this to work the current role owns, not a user's pending approval. [Prompting Fable 5.2](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2) calls out code ownership and accumulated cautions: do not grant broad maintainer authority for a minimal edit, or tell a plan-only agent to push through an actual permission boundary. +- [Using GPT-6.2 Astra](https://developers.openai.com/api/docs/guides/latest-model/gpt-6.2-astra): allow reasonable reversible assumptions, and state what completes the current role's task. Provider cache layout and reasoning parameters are adapter concerns, not Oracle prompt instructions. +- Google publishes separate developer guides for [Hydrogen](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-hydrogen), [Carbon](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-carbon), and [Neon](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-neon). Use the [prompt design checklist](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/prompts/prompt-design-strategies) to remove artificial pressure from the shared worker body. Use the individual guides to investigate real differences; do not put wire-format requirements in the natural-language instructions or assign models against the user's config. + +- **Claude Code:** The archived [Opus 5.5](https://github.com/asgeirtj/system_prompts_leaks/blob/0aa4be305d75f23db32977ee255dbd430c27e2e6/Anthropic/claude-code/claude-code-opus-5.5.md) and [Fable 5.2](https://github.com/asgeirtj/system_prompts_leaks/blob/0aa4be305d75f23db32977ee255dbd430c27e2e6/Anthropic/claude-code/claude-code-fable-5.2.md) captures separate role from a short harness contract. Adopt that separation; avoid their private effort tags, browser tool names and permission semantics. A denied Iolaus call can be a role restriction, not a refusal by the user. +- **Codex:** The archived [Astra 6.2](https://github.com/asgeirtj/system_prompts_leaks/blob/0aa4be305d75f23db32977ee255dbd430c27e2e6/OpenAI/Codex/gpt-6.2-astra.md) prompt distinguishes authorized next steps from scope changes and irreversible actions. Retain that distinction for executors; for read-only Oracle, delivering the consultation is completion. Do not instruct Oracle to implement its recommendation. +- **Gemini:** The archive has an [Argon Antigravity CLI](https://github.com/asgeirtj/system_prompts_leaks/blob/0aa4be305d75f23db32977ee255dbd430c27e2e6/Google/antigravity/gemini-4-argon-antigravity-cli.md) capture, not an exact-model harness file for Hydrogen, Carbon or Neon in this revision. Its separation of identity from host artifacts is instructive; its artifact path and effort setting are not defaults for Iolaus. +- **Oh My OpenAgent:** Adapt the [Fable recognition test](https://github.com/code-yeongyu/oh-my-openagent/blob/25a8d7f272074cdb530bcc42fb5e361073296723/packages/model-core/src/fable-52-recognition.test.ts)'s use of provider spellings and nearby non-matches. Apply it to *rendered identities*, not just the detector. Its [routing tests](https://github.com/code-yeongyu/oh-my-openagent/blob/25a8d7f272074cdb530bcc42fb5e361073296723/packages/omo-opencode/src/shared/fable-52-routing.test.ts) also check the delegated path; borrow that coverage but not its default lane assignments, effort settings or fallback chain. No runtime upstream dependency or snapshot sync is needed. + +Packaging check: all 144 combinations (six IDs × eleven agent prompts, nine category prompts and four modes) matched the built prompt library when the source was loaded with `bun --loader .md:text`. Without that loader the ad hoc comparison failed because Bun converted Markdown into HTML. diff --git a/docs/prompt-design.md b/docs/prompt-design.md index d08a8e0..15dedba 100644 --- a/docs/prompt-design.md +++ b/docs/prompt-design.md @@ -42,7 +42,7 @@ The two vendors do not respond best to the same shape, and pretending otherwise **Other carriers (Kimi, GLM, DeepSeek).** They currently borrow the Anthropic idiom: their retained OMO bodies were tuned for a harness this one replaced and diverge from the behavior we want, so Sisyphus, Hephaestus, Sisyphus-Junior, Atlas and the mode prompts all address them in the Anthropic shape. The borrowed body names the model actually running (`on glm-5-2`, `kimi-k3`) and never claims to be a Claude model. The retained variants stay on disk, unreachable through routing, so a measured reason to split a carrier off is a one-line routing change, not a rewrite. -**Gemini, Grok, older GPT.** Their retained variants stay as they are. The three primary workflows do not target them, so they are not where prompt effort goes; the category lanes still use them, and their prompts are unchanged. +**Gemini workers.** Gemini 4 Hydrogen, Carbon and Neon share a worker prompt. Junior and category lanes investigate directly, verify the assigned deliverable with the project's tools, and return permission blockers to the caller. Do not split this prompt by model unless a task evaluation demonstrates a difference. Grok and older GPT models keep their existing variants. ## 3. The flow is a capability, not a ledger diff --git a/reference/active-manifest.json b/reference/active-manifest.json index 0ed6d3a..a350584 100644 --- a/reference/active-manifest.json +++ b/reference/active-manifest.json @@ -88,7 +88,7 @@ "source": "reference/omo/packages/agents-core/src/sisyphus-dynamic-prompt-sections.ts", "path": "src/omo/agents/sisyphus-dynamic-prompt-sections.ts", "sourceSha256": "525589f90fe65939ab91be327077d82e0a8a431eacb950bf96f41479ca55656d", - "activeSha256": "baaed2764c0a584c187565c91ddc67cdb2293c207df3b9a7e81706a7fc6a1d80" + "activeSha256": "d517646601d82168af44af8188e1c1dfb6d56c7e9b7422eb39c8ffeb98b9f58d" }, { "source": "reference/omo/packages/agents-core/src/index.ts", @@ -100,7 +100,7 @@ "source": "reference/omo/packages/agents-core/src/sisyphus-dynamic-prompt-role.ts", "path": "src/omo/agents/sisyphus-dynamic-prompt-role.ts", "sourceSha256": "38e8b605b274ca0e65cd425ca2e981520c42ddb0ca95e08ce83a51353c5ea3e8", - "activeSha256": "063aad95432b3f5d0007601f146ed791ce18c64aad1f4b78f87a988c763305e3" + "activeSha256": "7aa192aec2cb91a3a351f611f3235843a5e0c685f17b6f83b161cc7987f8a098" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-dynamic-prompt-exploration.ts", @@ -118,13 +118,13 @@ "source": "reference/omo/packages/agents-core/src/sisyphus-junior/gpt.ts", "path": "src/omo/agents/sisyphus-junior/gpt.ts", "sourceSha256": "abb42e868ec02e6f32c7bc24f3de498e3f92e4eff63455338d7304afc5307ea6", - "activeSha256": "d2271b7b3c551bedc6f97a7e5340583d989729916c449f34bb4e6b92df98138a" + "activeSha256": "c2d97d61ee370ac09c341a15d45f72f9ee626021ba92c595591f6e1385d2f0b0" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/kimi-k3.ts", "path": "src/omo/agents/sisyphus-junior/kimi-k3.ts", "sourceSha256": "dcca7e432795521a0474c0be57f5fb48c72775f50954fdb16ddd073e8cf7b9c5", - "activeSha256": "5f1474433ccbd67cb923705a0df784807f842bd36a517d35d7f6559c0d673317" + "activeSha256": "6a8954ed8d06f2412c9ba19a2d519f9ab09c0e9f096fd9609eddaa65d7f5e77d" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/prompt-router.ts", @@ -136,31 +136,31 @@ "source": "reference/omo/packages/agents-core/src/sisyphus-junior/kimi-k2-7.ts", "path": "src/omo/agents/sisyphus-junior/kimi-k2-7.ts", "sourceSha256": "5735a947e600c0ed9600b124f510a8ca8616bef896f034463a44b5ae76179865", - "activeSha256": "010463f1c46b88d790abc657db2aa68cb94b483963914b968ad58a2dfc506cc3" + "activeSha256": "55a86146148b80ec083181f67a3a38c95297d56cb824a0fe9ae43af95014fa74" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/kimi-k2-6.ts", "path": "src/omo/agents/sisyphus-junior/kimi-k2-6.ts", "sourceSha256": "45543c473593c8a0f0d2cc6727833b687e58aab0001df3ab03075ebe58652113", - "activeSha256": "b7592851ee0a5a79bf59477b04df2b8b0ea5d72abbfc2aef7981c9957f4655a9" + "activeSha256": "1512b10fa2018876e4f3cf01f1e886e6b45505251c54d6b1915a395b08af2aa6" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/default.ts", "path": "src/omo/agents/sisyphus-junior/default.ts", "sourceSha256": "0f5b7500150e7ccec22e255182b995f738c1dfe0c88e7b16958ba38f28854ac7", - "activeSha256": "c084d02584da9dde729f0e1ead120b32f9895dca6c319d4657531939511dca25" + "activeSha256": "866ed3085eab9c60be9f442205e977392ec1a0b1d800b47a893554234a0bc52e" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/gemini.ts", "path": "src/omo/agents/sisyphus-junior/gemini.ts", "sourceSha256": "f6c9c0076c25200af04192b17e29e1339c3896eb113f157cc984daf233e12333", - "activeSha256": "a11f90b20b824bc28ff4ab47b05c35e54ef34eafd56b04c9741a579b8f8af641" + "activeSha256": "1426c4d13a16dd294491e8be02277ef1437581e75fcc6565814bb7631cd99c9e" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/glm-5-2.ts", "path": "src/omo/agents/sisyphus-junior/glm-5-2.ts", "sourceSha256": "fc1968684be4b69f904a8a7f10edf48326fbf80b6519ea7c853f7b246a393fdf", - "activeSha256": "004e6f26d7390a698f9a5ee52e29b8c964aa6c1cd9fce8fe49b4dac4f36ab132" + "activeSha256": "024aa51203326df61a1a66e9a9c92d0bb2982e95ce818c31c7b5142514a7bf6a" }, { "source": "reference/omo/packages/agents-core/src/sisyphus-junior/index.ts", @@ -178,7 +178,7 @@ "source": "reference/omo/packages/agents-core/src/sisyphus-junior/gpt-5-4.ts", "path": "src/omo/agents/sisyphus-junior/gpt-5-4.ts", "sourceSha256": "01c2d3ada2c31038cc3aeb718835d2d20e3920f49a4b6e7979c3fcbe467a2289", - "activeSha256": "01caf67168b7321dcdbd5b7ecde3b24afa60f70f8b8b732f5ae20e725b29446e" + "activeSha256": "1802542ecf9555210b159c40d63b7650756001769802846cd0dcd3d36fcd358d" }, { "source": "reference/omo/packages/agents-core/src/hephaestus/gpt.ts", @@ -196,7 +196,7 @@ "source": "reference/omo/packages/agents-core/src/hephaestus/prompt-router.ts", "path": "src/omo/agents/hephaestus/prompt-router.ts", "sourceSha256": "254b65abd8a6a3429fbf805b4639a80b2620a03af69e29c17ca198481dc3e314", - "activeSha256": "a5bff1e7c3ada88d2254f2927f9bd3f0c2a21139d88b2fffd3ff390b2d8834b0" + "activeSha256": "ad3bffe607f16c2001e12624a0d1ab39306a69dea4d4267905eb5e39112347d2" }, { "source": "reference/omo/packages/agents-core/src/hephaestus/gpt-5-5.ts", @@ -214,73 +214,73 @@ "source": "reference/omo/packages/agents-core/src/specialists/oracle-prompt.ts", "path": "src/omo/agents/specialists/oracle-prompt.ts", "sourceSha256": "94d67937ceb15a3a6f5c41d668fa393db9c0e9b646e18de303926264b2a52b7b", - "activeSha256": "94d67937ceb15a3a6f5c41d668fa393db9c0e9b646e18de303926264b2a52b7b" + "activeSha256": "4373a29fb590a186976aee08fc52b9f76c3e573a4c0285e73dbc90bd8643e496" }, { "source": "reference/omo/packages/agents-core/src/specialists/momus-prompt.ts", "path": "src/omo/agents/specialists/momus-prompt.ts", "sourceSha256": "e59c6a44d79ee29f7838dcbaa977091e1b777c936c96f681d70495db3e4611ed", - "activeSha256": "37aab3cb59c2181fa4e3de354d314ae1ca39ba1713083572847110dfd2583393" + "activeSha256": "8210581a666a1467afb60e051cb42ddde2da121a831ffd86a2d10e02716d529c" }, { "source": "reference/omo/packages/agents-core/src/specialists/librarian-prompt.ts", "path": "src/omo/agents/specialists/librarian-prompt.ts", "sourceSha256": "7f05ba7f50aa1dc26b81c5a24f6eaf944ca29651836d699247a72b3a4bd5af48", - "activeSha256": "009b660c5708fa156030cb12a9c524e278684199c2c7d5393b6e312e67e9a7b1" + "activeSha256": "7d4b086e5cc3c0e44edfd9f93b75f0c4a58f5d2aa35351646619ad749a023796" }, { "source": "reference/omo/packages/agents-core/src/specialists/metis-prompt.ts", "path": "src/omo/agents/specialists/metis-prompt.ts", "sourceSha256": "19ed8977ea536650ee2023e047e82f5e23c3ab3afcfca56dd884348fabb4435a", - "activeSha256": "eedaef91622388ebaa56a0b32db326e4b45021e7a407dee0d3f9cb8c9b949024" + "activeSha256": "9a5af922bef0b53450b0c80ba12db2fdc00a1e0fff307c2dbeb4baee6f5560c0" }, { "source": "reference/omo/packages/agents-core/src/specialists/momus-gpt-5-6.ts", "path": "src/omo/agents/specialists/momus-gpt-5-6.ts", "sourceSha256": "51933fcbcd5f82df47103ed730c9820b3fb5ecf34aa5d78e3f9b331479cb3095", - "activeSha256": "4a1c68ddbd92e19a20949fceb9ae87864dc395680d2349ff62de15d98440fc4b" + "activeSha256": "1299bd758a2b179557c5a3fd1e557a86a294e37b114e29dd051a42bf9b8b2a4f" }, { "source": "reference/omo/packages/agents-core/src/specialists/explore-prompt.ts", "path": "src/omo/agents/specialists/explore-prompt.ts", "sourceSha256": "4a33f441396e51814b38327e6a36d62d4c786f3b6e2667b140ddbb2092898f7e", - "activeSha256": "bf886123d5e6f8ce5f405227b99f85481d5440b22854c6a29dfc3902d0113db5" + "activeSha256": "365dd0ffd480ab79194ded6ed92386cc39517c75cdb29d66a3938fd735dac6b2" }, { "source": "reference/omo/packages/agents-core/src/specialists/multimodal-looker-prompt.ts", "path": "src/omo/agents/specialists/multimodal-looker-prompt.ts", "sourceSha256": "f79237acf2ac36c917b258135db94c71854540b9a3305ca98012858f0892779e", - "activeSha256": "f79237acf2ac36c917b258135db94c71854540b9a3305ca98012858f0892779e" + "activeSha256": "9be2ec01d1d0c558c0f773e62ca1019a6938513b4d43f2cb32095aa7b18b11e2" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/kimi-k3.ts", "path": "src/omo/agents/sisyphus/kimi-k3.ts", "sourceSha256": "64956832332bdb1163f69f19e718dbe274633661f60e27c479c650436e5c7f85", - "activeSha256": "524d4d27bf9d53bf231f1d9f569c72cc2534591f599e289b7c8dac841e14ec74" + "activeSha256": "61f8b44ca0036aa2bba4fe27c7c90ac73e80a53548b22085ab8d81a47be17ec0" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/kimi-k2-7.ts", "path": "src/omo/agents/sisyphus/kimi-k2-7.ts", "sourceSha256": "45586fcb80733827dca79dc787933855a0ab4639b65cc03e3da8c4989a32204b", - "activeSha256": "9113bdc9c5ad0fa66902b92aca6c9eec48a4cf9b684a39c08fab31837ce61dee" + "activeSha256": "5c4d5d236c1b28ac07c14a118f99fddb6d8c6290340f08ffad8e509826095b51" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/claude-opus-5.ts", "path": "src/omo/agents/sisyphus/claude-opus-5.ts", "sourceSha256": "46f976cc3fd2f8aa205937e91dba494756086d05fabb5c5be90f4f76769e51e4", - "activeSha256": "bcbb2e61d5a00d285e2bf7bf043ca287ba4a2153c751ec35e21b2c86ff7e6559" + "activeSha256": "7ed095b08ced498b2b8534405acffa1281a2a0bc97cd005dc7cac8fa0e652da5" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/kimi-k2-6.ts", "path": "src/omo/agents/sisyphus/kimi-k2-6.ts", "sourceSha256": "d268cb7bfb8f716cb4fbff7eb10ee6e754dbd594bbbd84e5e0ea4082e702e8bf", - "activeSha256": "e2f8eb9c40eafff92cecde22493cc8b615d84e0088bbee254bcce2e15cb0c055" + "activeSha256": "a9cf7d2a400f07b1b76b17bb6d406fe23ce0e762ad04d26772f0825035833c0c" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/default.ts", "path": "src/omo/agents/sisyphus/default.ts", "sourceSha256": "8761fff6a61526811841142fa1a45d65eebfb5dae681b29331d0537ed6bde8b4", - "activeSha256": "0f29b3303f5796f50ce6fed1bfb56bd600d77d368d0822a1903c4752e872de9a" + "activeSha256": "3a16692bc771ebbac19d7839904932d2233d3677ea65448bfe605555693cbc96" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/gemini.ts", @@ -292,19 +292,19 @@ "source": "reference/omo/packages/agents-core/src/sisyphus/glm-5-2.ts", "path": "src/omo/agents/sisyphus/glm-5-2.ts", "sourceSha256": "e3297aeeec85395f57168b289fc29cc7958390cd66c333031275760ede987bf7", - "activeSha256": "59a47718401162cf84f2694995c0416bbcb9a5209bb6d4abac45b48f72adf2d2" + "activeSha256": "82bd2e25d655c707a64c7c42acd38bb158904a427a9459f2a32e4ad00dd70c16" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/claude-opus-4-7.ts", "path": "src/omo/agents/sisyphus/claude-opus-4-7.ts", "sourceSha256": "77c51f10f73443be01153af1cee49d97bf74ae17982aa43d65ae663ee527f840", - "activeSha256": "d21049b1ae17f9f1fe0373fdcaed8506351bcc49272ca2b00fb8e97bd1a21382" + "activeSha256": "482395ae01acf7ac1e8d5665d59ef13d1d144860a105995f5a783199bc8e16ac" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/grok-4.ts", "path": "src/omo/agents/sisyphus/grok-4.ts", "sourceSha256": "fb94ce98ca0d9d04c3840d3d9b5aec172a13e1e1544770bc82af01cffd2332e4", - "activeSha256": "8fca7355d89f6590c8196ca405d1c822f5a23271beafaca0f4946e7f6d729894" + "activeSha256": "4af7f89bf6c470972665ae1a6fa315ba9597de0b4ea4c83844802b90f9972dbd" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/gpt-task-system-guide.ts", @@ -316,13 +316,13 @@ "source": "reference/omo/packages/agents-core/src/sisyphus/claude-fable-5.ts", "path": "src/omo/agents/sisyphus/claude-fable-5.ts", "sourceSha256": "3966945cb800f2adab36d9fdf430eeef21c566850834fb9ba827d9795a5c1228", - "activeSha256": "0ce9d2f295dfc5ce9d780102bdeb9b04afc4a68a70f65d3e8c71a1e38fdc7968" + "activeSha256": "3b587c6ad02ed664266853c96c315812ba2114887b26f465d570b521b1246c08" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/claude-opus-4-8.ts", "path": "src/omo/agents/sisyphus/claude-opus-4-8.ts", "sourceSha256": "d7d01d45aef9ef5f655e79d882d474136866bcff5b481bfb86bd99a0217d59ff", - "activeSha256": "848b93e8db4b196a9d094c90c902103f91f917b1be1a2ecf879f7b2c12b7cfe7" + "activeSha256": "cc491592acbdb3b689c5a249dcd89d7c15145de9a30af4df2ddc6276cc34ec03" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/index.ts", @@ -334,13 +334,13 @@ "source": "reference/omo/packages/agents-core/src/sisyphus/gpt-5-5.ts", "path": "src/omo/agents/sisyphus/gpt-5-5.ts", "sourceSha256": "de56dd3fe8a1da6e8b3d928394b5fd7ba1f5b9da8da49801daf096e2137f3484", - "activeSha256": "4ef42ab4caba747f30c33ca432c81d8322f06913f279b7af0c0a0932a0fae80f" + "activeSha256": "c04764956f51dcf83dbf9cbba6165d5601027865821ebd4dbc8f0ad56e1bad51" }, { "source": "reference/omo/packages/agents-core/src/sisyphus/gpt-5-4.ts", "path": "src/omo/agents/sisyphus/gpt-5-4.ts", "sourceSha256": "9fbd81076730faff9d13b8815f5b8b119ed7e5d36a64bfc0cbb76587e17c558e", - "activeSha256": "b617eec6e8f9badaccd520d599a8a6fcda4f515eb09ae70f53aa444480c82594" + "activeSha256": "073c14adf4fdb37b64af2dc2a166be0e28aa9b4d318e980fce22da7525e1a48c" }, { "source": "reference/omo/packages/prompts-core/prompts/mode/team.md", @@ -400,49 +400,49 @@ "source": "reference/omo/packages/prompts-core/prompts/atlas/kimi-k2-7.md", "path": "src/omo/modes/prompts/atlas/kimi-k2-7.md", "sourceSha256": "3fe3753c3ff953d704cbcacdb8ca516ac49f11d5f50ade28f994524af0c64a24", - "activeSha256": "4628129b4814a4fec7e3f70d10d2726a4c454d4e741a04633a95b2a939620c0d" + "activeSha256": "a2fc9e2396bd4ab57a19ceee8b88791790542756fcafab4ec5e1e43637697d3d" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/kimi.md", "path": "src/omo/modes/prompts/atlas/kimi.md", "sourceSha256": "f6bb5ff2f721bbd48aeb59c399adfe3172fbfe3e62248175bfc074b1a09ea2d2", - "activeSha256": "1526d76c3b14c4cd496edbfbb394af2125fb2f663bb3e2e9661da7d73e361994" + "activeSha256": "fbe5a30504d4549d7f241c7967642e28a65d01a8d6d509f1b76640933dbb4137" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/default.md", "path": "src/omo/modes/prompts/atlas/default.md", "sourceSha256": "ae78e9bd557d6520f4ee2cc8bc749b503ce42beee8a1369f4b230c1a1654b60a", - "activeSha256": "f475a5a334a88d349cdef35679ad1b3d3854bf7ed9cf788a1a2612326e63ac0c" + "activeSha256": "8a037d02ec011970ea140f673d09a66ce8660627142e238b7e6de333a68628ad" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/kimi-k3.md", "path": "src/omo/modes/prompts/atlas/kimi-k3.md", "sourceSha256": "25853da40661a894c74511fb81e92e606ce67bd309d5391edf803cc11386619b", - "activeSha256": "1bd143bdc621fe18ec50330471b35e0181508c6dfefe9f90b29014c766c23849" + "activeSha256": "dc0323007548c469bd8c915dac0e21dcdc370f5c1d0a12a28793e1fd28967216" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/gpt.md", "path": "src/omo/modes/prompts/atlas/gpt.md", "sourceSha256": "c2192d7542965999b819b9550f4f6b2d952af026ce562e85174347935a4028ac", - "activeSha256": "e5814f1e79ad0c45873eb10f1b0fc9906072bb708462fc89ec19d055a95a3995" + "activeSha256": "21c5f06d85a7d94af9ce9b9154c00a6dd463448b0daf4e18c7009a332d474b8e" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/glm.md", "path": "src/omo/modes/prompts/atlas/glm.md", "sourceSha256": "594c6e50937da2b655930552aed16284def1e7259c2ddc9f74b0afb2b97bed5b", - "activeSha256": "3ee8b2d01eef3865d1567e7a66cac74b8f230ee569a6960983690ab80d227796" + "activeSha256": "306b9f80c788d5148a6dd5a938362e0bda4bf6588e4b3592aaf56ffcf61cd6fb" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/gemini.md", "path": "src/omo/modes/prompts/atlas/gemini.md", "sourceSha256": "3da83ccd7f8fcbdfda34f581fbe5af0166fb724405bb375d9c9fddfecdce1c09", - "activeSha256": "37e878914c5c2f144f5a42202ec0fdca8441288946fd94ee8857449df25645bb" + "activeSha256": "434803018baffb87f780246d6d96a4e91f2869e2ac5604b51fba41bc2f619d2f" }, { "source": "reference/omo/packages/prompts-core/prompts/atlas/opus-4-7.md", "path": "src/omo/modes/prompts/atlas/opus-4-7.md", "sourceSha256": "6b3f4f1c0b7dcd6342c4de957152ee902e2060fc36e2b06d6e94d2afba722eca", - "activeSha256": "4bcb774a475198736722fa65d5d58280a21a45775199fa631099583cb7c308d2" + "activeSha256": "1aab276bc087053810fb6c1d9007bf83437e5725fbe5cefcbc50d3e606b11b49" }, { "source": "reference/omo/packages/prompts-core/src/variant-resolver.ts", diff --git a/script/qa-prompt-lanes.mjs b/script/qa-prompt-lanes.mjs index 7379545..46610aa 100644 --- a/script/qa-prompt-lanes.mjs +++ b/script/qa-prompt-lanes.mjs @@ -1,14 +1,10 @@ /** * Live QA for vendor-lane prompt rendering. * - * Runs real sessions in an isolated HOME against a local mock model, one per - * model identity, and asserts on the system prompt the host actually handed to - * the provider. That is the only place where prompt routing, the flow section - * and the removal of the dead todo tools can be observed together. - * - * Positive: every lane renders, the model is named, and the flow rule is present. - * Negative: no rendered prompt names a tool this harness does not register. - * Isolation: sandbox HOME/XDG only; the user's host state is hashed before and after. + * Runs real sessions in isolated HOME/XDG against a loopback mock. Captures + * distinguish Iolaus agent turns from auxiliary host requests (such as titles). + * Use --compact to retain only the receipt and assertions. This verifies prompt + * delivery and advertised tools, not model behavior or performance. */ import assert from "node:assert/strict" import { spawn } from "node:child_process" @@ -21,15 +17,21 @@ import { dirname, join, resolve } from "node:path" import { fileURLToPath } from "node:url" const root = resolve(dirname(fileURLToPath(import.meta.url)), "..") -const evidence = resolve(process.argv[2] ?? join(root, `.iolaus/evidence/${new Date().toISOString().replace(/[:.]/g, "-")}-prompt-lanes`)) +const args = process.argv.slice(2) +const compact = args.includes("--compact") +const evidence = resolve(args.find((arg) => arg !== "--compact") ?? join(root, `.iolaus/evidence/${new Date().toISOString().replace(/[:.]/g, "-")}-prompt-lanes`)) assert.ok(evidence.startsWith(`${join(root, ".iolaus/evidence")}/`), "evidence dir must stay under .iolaus/evidence") +const digest = (value) => createHash("sha256").update(value).digest("hex") +const buildSHA256 = digest(readFileSync(join(root, "dist/index.js"))) mkdirSync(evidence, { recursive: false }) const sandbox = realpathSync(mkdtempSync(join(tmpdir(), "iolaus-prompt-qa-"))) const binary = process.env.QA_OPENCODE_BIN ?? "/opt/homebrew/bin/opencode" -const results = [], requests = [], processes = [], errors = [] +const results = [], requests = [], processes = [], errors = [], captures = [] +const MOCK_REPLY = "IOLAUS_PROMPT_QA_DONE" let scenarioRequests = 0 +let activeScenario -const digest = (value) => createHash("sha256").update(value).digest("hex") +const isAgentTurn = ({ instructions }) => instructions.includes("") function hostState() { const home = homedir() const config = process.env.XDG_CONFIG_HOME ?? join(home, ".config") @@ -84,22 +86,22 @@ const server = http.createServer(async (req, res) => { ? body.system.filter((block) => block?.type === "text").map((block) => block.text).join("\n") : body.system ?? [body.instructions, ...inputInstructions].filter(Boolean).join("\n") const record = { - scenario: process.env.IOLAUS_QA_SCENARIO, + scenario: activeScenario, wire: anthropicWire ? "messages" : "responses", model: body.model, instructions: systemText, tools: (body.tools ?? []).map((tool) => tool.name ?? tool.function?.name), } requests.push(record) - appendFileSync(join(evidence, "requests.ndjson"), JSON.stringify({ scenario: record.scenario, wire: record.wire, model: record.model, chars: record.instructions.length, tools: record.tools }) + "\n") + if (!compact) appendFileSync(join(evidence, "requests.ndjson"), JSON.stringify({ scenario: record.scenario, wire: record.wire, model: record.model, chars: record.instructions.length, tools: record.tools }) + "\n") scenarioRequests += 1 assert.ok(scenarioRequests < 8, "unexpected model loop") res.writeHead(200, { "content-type": "text/event-stream", "cache-control": "no-cache" }) if (anthropicWire) { - for (const { event, data } of messageEvents("IOLAUS_PROMPT_QA_DONE")) res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`) + for (const { event, data } of messageEvents(MOCK_REPLY)) res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`) res.end() } else { - for (const event of events("IOLAUS_PROMPT_QA_DONE", body.model)) res.write(`data: ${JSON.stringify(event)}\n\n`) + for (const event of events(MOCK_REPLY, body.model)) res.write(`data: ${JSON.stringify(event)}\n\n`) res.end("data: [DONE]\n\n") } } catch (error) { errors.push(String(error)); res.writeHead(500).end("mock error") } @@ -108,12 +110,13 @@ const server = http.createServer(async (req, res) => { async function run(name, args, fixture) { const child = spawn(binary, args, { cwd: fixture.project, env: fixture.env, detached: true, stdio: ["ignore", "pipe", "pipe"] }) processes.push({ name, pid: child.pid }) - let output = "" - for (const stream of [child.stdout, child.stderr]) stream.on("data", (data) => { output += data; appendFileSync(join(evidence, `${name}.log`), data) }) + let output = "", stdout = "" + child.stdout.on("data", (data) => { stdout += data }) + for (const stream of [child.stdout, child.stderr]) stream.on("data", (data) => { output += data; if (!compact) appendFileSync(join(evidence, `${name}.log`), data) }) const deadline = setTimeout(() => { try { process.kill(-child.pid, "SIGKILL") } catch {} }, 90000) try { const [code] = await once(child, "close") - return { code, output } + return { code, output, stdout } } finally { clearTimeout(deadline) } } @@ -142,9 +145,56 @@ const SCENARIOS = [ // `mass-ulw` must make the agent author the graph itself. { name: "ulw-opus", agent: "sisyphus", model: "anthropic/claude-opus-5-5", expectName: "claude-opus-5-5", task: "ulw Fix the failing build.", keyword: "ultrawork" }, { name: "mass-ulw-astra", agent: "sisyphus", model: "openai/gpt-6-astra", expectName: "Astra", task: "mass-ulw Migrate every service.", keyword: "mass-ulw" }, + { name: "audit-astra-oracle", agent: "oracle", model: "proxy-codex/gpt-6.2-astra", audit: "adviser" }, + { name: "audit-fable-owner", agent: "sisyphus", model: "proxy-cc/claude-fable-5-2", audit: "owner" }, + { name: "audit-fable-planner", agent: "prometheus", model: "proxy-cc/claude-fable-5-2", audit: "planner" }, + { name: "audit-opus-owner", agent: "sisyphus", model: "proxy-cc/claude-opus-5-5", audit: "owner", opus: true }, + ...[["hydrogen", "visual-engineering"], ["carbon", "quick"], ["neon", "deep-low"]].flatMap(([model, category]) => [ + { name: `audit-${model}-junior`, agent: "sisyphus-junior", model: `bryan/gemini-4-${model}`, audit: "worker" }, + { name: `audit-${model}-${category}`, agent: category, model: `bryan/gemini-4-${model}`, audit: "worker", category }, + ]), ] const DEAD_TOOL = /todowrite|task_create|TaskCreate|TaskUpdate|task_update|TODO CONTINUATION|TASK CONTINUATION|background_output|background_cancel|load_skills|run_in_background|call_omo_agent|subagent_type|delegate_task|team_(?:create|task|send|shutdown|delete|approve|list)|update_plan|oh-my-opencode/i +const TOOL_EDITS = ["edit", "write", "patch"] +const DELEGATION_TOOLS = ["subagent", "iolaus_flow"] + +function checkAuditTurn(scenario, { tools, instructions }) { + const [body, binding] = instructions.split("") + assert.ok(tools.includes("read"), "the agent was not advertised the read tool") + assert.ok(!tools.some((tool) => /^(?:lsp_\w+|get_goal|create_goal|update_goal)$/.test(tool)), "unexpected LSP or goal tool advertised") + switch (scenario.audit) { + case "adviser": + assert.match(body, /\bYou are Oracle\b/i) + assert.doesNotMatch(body, /\bGPT[- ]\d/i) + assert.ok(![...TOOL_EDITS, ...DELEGATION_TOOLS].some((tool) => tools.includes(tool)), "Oracle was advertised an edit or delegation tool") + assert.doesNotMatch(binding, /\b(?:subagent|iolaus_flow)\b/) + break + case "planner": + assert.match(body, /\bYou are Prometheus\b/i) + assert.doesNotMatch(body, /\bClaude[- ](?:Fable|Mythos)[- ]\d/i) + assert.ok(!tools.includes("shell"), "planner was advertised shell") + assert.ok(TOOL_EDITS.some((tool) => tools.includes(tool)), "planner has no editing surface for plans") + assert.ok(DELEGATION_TOOLS.every((tool) => tools.includes(tool)), "planner delegation surface is incomplete") + break + case "owner": + assert.match(body, /\bYou are \*{0,2}Sisyphus\b/i) + if (scenario.opus) assert.ok(body.includes(""), "Opus 5.5 variant missing") + else assert.ok(!body.match(/\bYou are\b[^\n]*\bClaude[- ](?:Fable|Mythos)[- ]\d/i), "Fable owner hardcodes a model identity") + assert.ok(instructions.includes(""), "owner delegation routing missing") + assert.ok(DELEGATION_TOOLS.every((tool) => tools.includes(tool)), "owner delegation surface is incomplete") + break + case "worker": + assert.match(body, /\bYou are Sisyphus-Junior\b/i) + const category = body.match(//)?.[1] + assert.equal(category, scenario.category) + assert.ok(!tools.includes("subagent"), "worker was advertised native delegation") + assert.ok(tools.includes("shell") && TOOL_EDITS.some((tool) => tools.includes(tool)), "worker execution surface is incomplete") + assert.doesNotMatch(body, /\b(?:subagent|iolaus_flow|lsp_\w+)\b/) + assert.doesNotMatch(binding, /\b(?:subagent|iolaus_flow)\b/) + break + } +} let after try { @@ -153,7 +203,7 @@ try { const mockURL = `http://127.0.0.1:${server.address().port}/v1` for (const scenario of SCENARIOS) { - process.env.IOLAUS_QA_SCENARIO = scenario.name + activeScenario = scenario.name const home = join(sandbox, scenario.name, "home") const project = join(home, "project") mkdirSync(project, { recursive: true }) @@ -161,22 +211,26 @@ try { mkdirSync(join(config, "opencode"), { recursive: true }) const iolausHome = join(home, ".iolaus") mkdirSync(iolausHome, { recursive: true }) - // Anthropic models go over the native Messages API so the transport those - // models actually use is exercised; the rest use the OpenAI Responses wire. - const vendor = scenario.model.split("/")[0] - const served = scenario.model.split("/")[1] - const wire = scenario.model - const providerConfig = vendor === "anthropic" - ? { anthropic: { options: { apiKey: "fake-key", baseURL: mockURL }, models: { [served]: { tool_call: true, limit: { context: 200000, output: 8192 } } } } } - : { openai: { options: { apiKey: "fake-key", baseURL: mockURL }, models: { [served]: { tool_call: true, limit: { context: 200000, output: 8192 } } } } } - const models = { agents: { [scenario.agent]: wire }, categories: { quick: wire } } - writeFileSync(join(iolausHome, "iolaus.json"), JSON.stringify({ enabled: true, mcps: [], models })) + const [vendor, served] = scenario.model.split("/") + const anthropic = vendor === "anthropic" || vendor === "proxy-cc" + const providerPackage = anthropic ? "anthropic" : vendor === "bryan" ? "openai-compatible/responses" : "openai/responses" + const models = scenario.category ? { categories: { [scenario.category]: scenario.model } } + : { agents: { [scenario.agent]: scenario.model }, categories: { quick: scenario.model } } + writeFileSync(join(iolausHome, "iolaus.json"), JSON.stringify({ enabled: true, mcps: [], gh: false, models })) writeFileSync(join(config, "opencode/opencode.json"), JSON.stringify({ plugins: [{ package: join(root, "dist") }], - model: wire, + model: scenario.model, default_agent: "build", - permissions: [{ action: "*", resource: "*", effect: "allow" }], - provider: providerConfig, + update: "disable", + policies: [ + { action: "provider.use", resource: "*", effect: "deny" }, + { action: "provider.use", resource: vendor, effect: "allow" }, + ], + providers: { [vendor]: { + package: `@opencode/ai/providers/${providerPackage}`, + settings: { apiKey: "fake-key", baseURL: mockURL }, + models: { [served]: { tool_call: true, limit: { context: 200000, output: 8192 } } }, + } }, })) const env = { PATH: process.env.PATH, TMPDIR: sandbox, HOME: home, USERPROFILE: home, PWD: project, @@ -184,42 +238,69 @@ try { OPENCODE_TEST_HOME: home, OPENCODE_DISABLE_AUTOUPDATE: "1", OPENCODE_DISABLE_MODELS_FETCH: "1", IOLAUS_HOME: iolausHome, OPENAI_API_KEY: "fake-key", ANTHROPIC_API_KEY: "fake-key", } - writeFileSync(join(evidence, `${scenario.name}-isolation.json`), JSON.stringify({ project, env: Object.fromEntries(Object.entries(env).filter(([k]) => k !== "PATH" && !k.endsWith("_API_KEY"))) }, null, 2)) + if (!compact) writeFileSync(join(evidence, `${scenario.name}-isolation.json`), JSON.stringify({ project, env: Object.fromEntries(Object.entries(env).filter(([k]) => k !== "PATH" && !k.endsWith("_API_KEY"))) }, null, 2)) scenarioRequests = 0 const startIndex = requests.length + const agentTurns = () => requests.slice(startIndex).filter(isAgentTurn) await check(`${scenario.name}: real session renders a prompt`, async () => { - const result = await run(scenario.name, ["run", "--standalone", "--auto", "--print-logs", "--agent", scenario.agent, "--model", wire, scenario.task ?? "Return IOLAUS_PROMPT_QA_DONE."], { project, env }) + const result = await run(scenario.name, ["run", "--standalone", "--print-logs", "--agent", scenario.agent, "--model", scenario.model, scenario.task ?? `Return ${MOCK_REPLY}.`], { project, env }) assert.equal(result.code, 0, result.output.slice(-2000)) - assert.ok(requests.length > startIndex, "the mock received no request, so no prompt was rendered") + assert.ok(agentTurns().length, "the mock captured no Iolaus agent turn (host title requests do not count)") + assert.ok(result.stdout.includes(MOCK_REPLY), result.output.slice(-2000)) }) - await check(`${scenario.name}: names the model it runs on`, () => { + if (scenario.audit) { + const turns = agentTurns() + const expectedWire = anthropic ? "messages" : "responses" + captures.push({ scenario: scenario.name, agent: scenario.agent, configuredModel: scenario.model, + transport: vendor === "bryan" ? "OpenAI-compatible Responses (not native Gemini wire)" : expectedWire, + ignoredHostRequests: requests.length - startIndex - turns.length, + agentTurns: turns.map(({ model, wire, tools }) => ({ model, wire, tools })) }) + await check(`${scenario.name}: actual agent turn uses the configured model and mock wire`, () => { + assert.ok(turns.length, "no Iolaus agent turn to check") + for (const turn of turns) { + assert.equal(turn.model, served) + assert.equal(turn.wire, expectedWire) + assert.ok(turn.instructions.includes(`- Provider ID: ${vendor}\n`), "host model metadata names the wrong provider") + } + }) + await check(`${scenario.name}: ${scenario.audit} identity and tool contract`, () => { + assert.ok(turns.length, "no Iolaus agent turn to check") + for (const turn of turns) checkAuditTurn(scenario, turn) + }) + } else await check(`${scenario.name}: names the model it runs on`, () => { if (scenario.identity) { // OpenCode also appends the model name. Check Iolaus's self-description, not the host footer. - const lines = requests.slice(startIndex).filter((r) => r.model === served) + const lines = agentTurns().filter((r) => r.model === served) .flatMap((r) => r.instructions.split("\n")).filter((line) => line.toLowerCase().startsWith(`you are ${scenario.agent},`)) assert.ok(lines.length && lines.every((line) => line.includes(scenario.expectName)), `missing ${scenario.expectName} in ${JSON.stringify(lines)}`) return } - const instructions = requests.slice(startIndex).map((r) => r.instructions).join("\n") + const instructions = agentTurns().map((r) => r.instructions).join("\n") assert.ok(instructions.includes(scenario.expectName), `prompt does not name ${scenario.expectName}`) }) await check(`${scenario.name}: carries no tool this harness does not register`, () => { - const instructions = requests.slice(startIndex).map((r) => r.instructions).join("\n") + const instructions = agentTurns().map((r) => r.instructions).join("\n") const hit = instructions.match(DEAD_TOOL) assert.equal(hit?.[0], undefined, `dead tool reference: ${hit?.[0]}`) }) - if (scenario.agent === "sisyphus") { + await check(`${scenario.name}: prompts omit upstream branding`, () => { + const turns = agentTurns() + assert.ok(turns.length, "no request carried the Iolaus contract") + for (const turn of turns) assert.doesNotMatch(turn.instructions, /\bOMO\b|oh[\s_-]*my[\s_-]*open[\s_-]*code/i) + }) + + if (!scenario.audit && scenario.agent === "sisyphus") { await check(`${scenario.name}: ordinary owner gets delegation routing, explicit mode keeps its template`, () => { - const turns = requests.slice(startIndex).filter((r) => r.model === served && r.tools.includes("iolaus_flow")) + const turns = agentTurns().filter((r) => r.model === served && r.tools.includes("iolaus_flow")) assert.ok(turns.length) for (const turn of turns) assert.equal(turn.instructions.includes(""), !scenario.keyword) }) await check(`${scenario.name}: carries the flow rule`, () => { - const instructions = requests.slice(startIndex).map((r) => r.instructions).join("\n") + const instructions = agentTurns().map((r) => r.instructions).join("\n") assert.ok(instructions.includes("iolaus_flow"), "no iolaus_flow rule in the rendered prompt") // The section is an orchestration capability, not a todo replacement: assert // what it promises and that it does not turn itself into a ledger. @@ -230,7 +311,7 @@ try { } if (scenario.keyword) { await check(`${scenario.name}: keyword "${scenario.keyword}" injects the flow mandate`, () => { - const instructions = requests.slice(startIndex).map((r) => r.instructions).join("\n") + const instructions = agentTurns().map((r) => r.instructions).join("\n") assert.ok(instructions.includes("iolaus_flow"), "keyword mode rendered without iolaus_flow") const marker = scenario.keyword === "mass-ulw" ? 'mode="mass-ulw"' : 'template="ultrawork"' assert.ok(instructions.includes(marker), `keyword mode rendered without ${marker}`) @@ -244,15 +325,13 @@ try { } if (scenario.agent === "hephaestus") { await check(`${scenario.name}: worker contract, not orchestration`, () => { - const instructions = requests.slice(startIndex).map((r) => r.instructions).join("\n") + const instructions = agentTurns().map((r) => r.instructions).join("\n") assert.ok(instructions.includes("Do not create a flow of your own"), "hephaestus got no worker contract") }) } - if (scenario.agent === "prometheus") { + if (!scenario.audit && scenario.agent === "prometheus") { await check(`${scenario.name}: planner doctrine is real content`, () => { - // The host calls a title generator before the agent's first turn, so pick - // the request that actually carries the planner prompt. - const planner = requests.slice(startIndex).map((r) => r.instructions).filter((text) => text.includes("You are Prometheus")) + const planner = agentTurns().map((r) => r.instructions).filter((text) => text.includes("You are Prometheus")) assert.ok(planner.length > 0, "no request carried the Prometheus prompt") const text = planner.join("\n") assert.ok(text.includes("Blocked by"), "prometheus prompt has no ticket dependency contract") @@ -274,7 +353,7 @@ try { return model === -1 ? withoutHome : withoutHome.slice(0, model) } const rendered = ["prometheus-astra", "prometheus-opus"].map((name) => - requests.filter((r) => r.scenario === name).map((r) => r.instructions).filter((text) => text.includes("You are Prometheus")).map(iolausPart)) + requests.filter((r) => r.scenario === name && isAgentTurn(r)).map((r) => r.instructions).filter((text) => text.includes("You are Prometheus")).map(iolausPart)) assert.ok(rendered[0].length > 0 && rendered[1].length > 0, "one of the two models rendered no planner prompt") assert.equal(rendered[0][0], rendered[1][0], "the Prometheus prompt differs by model") }) @@ -285,10 +364,16 @@ try { await new Promise((done) => server.close(done)) for (const record of processes) { try { process.kill(-record.pid, "SIGKILL") } catch {} } rmSync(sandbox, { recursive: true, force: true }) - writeFileSync(join(evidence, "receipt.json"), JSON.stringify({ binary, results, before, after, processes, sandboxRemoved: !existsSync(sandbox), mockClosed: !server.listening, requestCount: requests.length, omitted: "No user credentials or inherited environment dumps. Local mock only." }, null, 2)) + writeFileSync(join(evidence, "receipt.json"), JSON.stringify({ binary, buildSHA256, + scope: "Local mock only. Prompt delivery and advertised tool surface, not model behavior or performance.", + passed: results.filter(({ verdict }) => verdict === "PASS").length, failed: results.filter(({ verdict }) => verdict === "FAIL").length, + hostStateUnchanged: !!after && JSON.stringify(before) === JSON.stringify(after), sandboxRemoved: !existsSync(sandbox), mockClosed: !server.listening, + requestCount: requests.length, captures, ...(!compact && { results, before, after, processes }) }, null, 2)) // Keep the rendered prompts for review; they contain no credentials. - writeFileSync(join(evidence, "prompts.json"), JSON.stringify(requests.map((r) => ({ scenario: r.scenario, model: r.model, length: r.instructions.length, tools: r.tools })), null, 2)) - writeFileSync(join(evidence, "full-prompts.txt"), requests.map((r) => `===== ${r.scenario} (${r.model}) =====\n${r.instructions}\n`).join("\n")) + if (!compact) { + writeFileSync(join(evidence, "prompts.json"), JSON.stringify(requests.map((r) => ({ scenario: r.scenario, model: r.model, length: r.instructions.length, tools: r.tools })), null, 2)) + writeFileSync(join(evidence, "full-prompts.txt"), requests.map((r) => `===== ${r.scenario} (${r.model}) =====\n${r.instructions}\n`).join("\n")) + } } const failed = results.filter((r) => r.verdict === "FAIL") console.log(JSON.stringify({ evidence, passed: results.length - failed.length, failed: failed.length }, null, 2)) diff --git a/src/context.ts b/src/context.ts index 85c768d..f90220f 100644 --- a/src/context.ts +++ b/src/context.ts @@ -72,7 +72,7 @@ export function composeContext( if (index === -1 && !selectedMode) return const model = `${event.model.providerID}/${event.model.id}` if (category && index !== -1) { - event.system[index] = { type: "text", text: bindNative(renderCategory(category, model), homeText) } + event.system[index] = { type: "text", text: bindNative(renderCategory(category, model), homeText, { delegation: false }) } trace("iolaus.agent.rendered", { agent: category, kind: "category", model, sessionID: event.sessionID }) } else if (name && index !== -1) { const [agents, skills] = yield* Effect.all([ctx.agent.list(), ctx.skill.list()], { concurrency: 2 }).pipe(Effect.orDie) @@ -96,7 +96,7 @@ export function composeContext( const contract = ROLE_CONTRACTS[name] const routing = name === "sisyphus" && !selectedMode && "iolaus_flow" in event.tools && (yield* ctx.session.get({ sessionID: event.sessionID }).pipe(Effect.map(isTopLevel), Effect.catch(() => Effect.succeed(false)))) - event.system[index] = { type: "text", text: bindNative(contract ? `${prompt}\n\n${contract}` : prompt, homeText, { routing }) } + event.system[index] = { type: "text", text: bindNative(contract ? `${prompt}\n\n${contract}` : prompt, homeText, { routing, delegation: name !== "sisyphus-junior" && name !== "oracle" }) } trace("iolaus.agent.rendered", { agent: name, model, sessionID: event.sessionID }) } if (selectedMode) { diff --git a/src/omo/agents/hephaestus/claude.ts b/src/omo/agents/hephaestus/claude.ts index fa9ac3c..378ba53 100644 --- a/src/omo/agents/hephaestus/claude.ts +++ b/src/omo/agents/hephaestus/claude.ts @@ -111,7 +111,7 @@ export function buildClaudeHephaestusPrompt( ): string { const agentIdentity = buildAgentIdentitySection( "Hephaestus", - "Autonomous deep worker for software engineering from OhMyOpenCode", + "Autonomous deep worker for software engineering", ) const body = CLAUDE_HEPHAESTUS_TEMPLATE .replace("{{ model }}", modelLabel(model)) diff --git a/src/omo/agents/hephaestus/prompt-router.ts b/src/omo/agents/hephaestus/prompt-router.ts index 000c0a1..10882a7 100644 --- a/src/omo/agents/hephaestus/prompt-router.ts +++ b/src/omo/agents/hephaestus/prompt-router.ts @@ -180,7 +180,7 @@ export function buildDynamicHephaestusPrompt(ctx?: HephaestusContext): string { const agentIdentity = buildAgentIdentitySection( "Hephaestus", - "Autonomous deep worker for software engineering from OhMyOpenCode", + "Autonomous deep worker for software engineering", ); return `${agentIdentity}\n${basePrompt}`; diff --git a/src/omo/agents/sisyphus-dynamic-prompt-role.ts b/src/omo/agents/sisyphus-dynamic-prompt-role.ts index d0d3927..13e67d5 100644 --- a/src/omo/agents/sisyphus-dynamic-prompt-role.ts +++ b/src/omo/agents/sisyphus-dynamic-prompt-role.ts @@ -3,7 +3,7 @@ import type { SisyphusDynamicPromptSections } from "./sisyphus-dynamic-prompt-se export function renderRoleAndIntentSections(sections: SisyphusDynamicPromptSections): string { return `${sections.agentIdentity} -You are "Sisyphus" - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are "Sisyphus" - Powerful AI Agent with orchestration capabilities. **Why Sisyphus?**: Humans roll their boulder every day. So do you. We're not so different-your code should be indistinguishable from a senior engineer's. diff --git a/src/omo/agents/sisyphus-dynamic-prompt-sections.ts b/src/omo/agents/sisyphus-dynamic-prompt-sections.ts index b5046c8..690eb9e 100644 --- a/src/omo/agents/sisyphus-dynamic-prompt-sections.ts +++ b/src/omo/agents/sisyphus-dynamic-prompt-sections.ts @@ -47,7 +47,7 @@ export function buildSisyphusDynamicPromptSections( return { agentIdentity: buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ), antiPatterns: buildAntiPatternsSection(), categorySkillsGuide: buildCategorySkillsDelegationGuide( diff --git a/src/omo/agents/sisyphus-junior/default.ts b/src/omo/agents/sisyphus-junior/default.ts index e79aca6..6bcf3db 100644 --- a/src/omo/agents/sisyphus-junior/default.ts +++ b/src/omo/agents/sisyphus-junior/default.ts @@ -21,7 +21,7 @@ export function buildDefaultSisyphusJuniorPrompt( : "All todos marked completed" const prompt = ` -Sisyphus-Junior - Focused executor from OhMyOpenCode. +Sisyphus-Junior - Focused executor. Execute tasks directly. diff --git a/src/omo/agents/sisyphus-junior/gemini.ts b/src/omo/agents/sisyphus-junior/gemini.ts index 8e51644..3004073 100644 --- a/src/omo/agents/sisyphus-junior/gemini.ts +++ b/src/omo/agents/sisyphus-junior/gemini.ts @@ -1,175 +1,26 @@ -/** - * Gemini-optimized Sisyphus-Junior System Prompt - * - * Key differences from Claude/GPT variants: - * - Aggressive tool-call enforcement (Gemini skips tools in favor of reasoning) - * - Anti-optimism checkpoints (Gemini claims "done" prematurely) - * - Repeated verification mandates (Gemini treats verification as optional) - * - Stronger scope discipline (Gemini's creativity causes scope creep) - */ - import { resolvePromptAppend } from "../builtin-agents/resolve-file-uri" import { buildIolausFlowSection } from "../iolaus-flow-section" -import { buildAntiDuplicationSection } from "../dynamic-agent-prompt-builder" export function buildGeminiSisyphusJuniorPrompt( - useTaskSystem: boolean, + _useTaskSystem: boolean, promptAppend?: string ): string { - const taskDiscipline = buildGeminiTaskDisciplineSection(useTaskSystem) - const verificationText = useTaskSystem - ? "All tasks marked completed" - : "All todos marked completed" - - const prompt = `You are Sisyphus-Junior - a focused task executor from OhMyOpenCode. - -## Identity - -You execute tasks directly as a **Senior Engineer**. You do not guess. You verify. You do not stop early. You complete. - -**KEEP GOING. SOLVE PROBLEMS. ASK ONLY WHEN TRULY IMPOSSIBLE.** - -When blocked: try a different approach → decompose the problem → challenge assumptions → explore how others solved it. - - -## YOU MUST USE TOOLS. THIS IS NOT OPTIONAL. - -**The user expects you to ACT using tools, not REASON internally.** Every response that requires action MUST contain tool_use blocks. A response without tool calls when action was needed is a FAILED response. - -**YOUR FAILURE MODE**: You believe you can figure things out without calling tools. You CANNOT. Your internal reasoning about file contents, codebase state, and implementation correctness is UNRELIABLE. - -**RULES (VIOLATION = FAILED RESPONSE):** -1. **NEVER answer a question about code without reading the actual files first.** Read them. AGAIN. -2. **NEVER claim a task is done without running \`lsp_diagnostics\`.** Your confidence that "this should work" is wrong more often than right. -3. **NEVER reason about what a file "probably contains."** READ IT. Tool calls are cheap. Wrong answers are expensive. -4. **NEVER produce a response with ZERO tool calls when the user asked you to DO something.** Thinking is not doing. - -Before responding, ask yourself: What tools do I need to call? What am I assuming that I should verify? Then ACTUALLY CALL those tools. - - -### Do NOT Ask - Just Do - -**FORBIDDEN:** -- "Should I proceed with X?" → JUST DO IT. -- "Do you want me to run tests?" → RUN THEM. -- "I noticed Y, should I fix it?" → FIX IT OR NOTE IN FINAL MESSAGE. -- Stopping after partial implementation → 100% OR NOTHING. - -**CORRECT:** -- Keep going until COMPLETELY done -- Run verification (lint, tests, build) WITHOUT asking -- Make decisions. Course-correct only on CONCRETE failure -- Note assumptions in final message, not as questions mid-work -- Need context? Fire explore/librarian with subagent({...}) IMMEDIATELY - continue only with non-overlapping work while they search - -## Scope Discipline - -- Implement EXACTLY and ONLY what is requested -- No extra features, no UX embellishments, no scope creep -- If ambiguous, choose the simplest valid interpretation OR ask ONE precise question -- Do NOT invent new requirements or expand task boundaries -- **Your creativity is an asset for IMPLEMENTATION QUALITY, not for SCOPE EXPANSION** - -## Ambiguity Protocol (EXPLORE FIRST) - -- **Single valid interpretation** - Proceed immediately -- **Missing info that MIGHT exist** - **EXPLORE FIRST** - use tools (grep, rg, file reads, explore agents) to find it -- **Multiple plausible interpretations** - State your interpretation, proceed with simplest approach -- **Truly impossible to proceed** - Ask ONE precise question (LAST RESORT) - - -- Parallelize independent tool calls: multiple file reads, grep searches, agent fires - all at once -- Explore/librarian as background children = research. Fire them and continue only with non-overlapping work -- After any file edit: restate what changed, where, and what validation follows -- Prefer tools over guessing whenever you need specific data (files, configs, patterns) -- ALWAYS use tools over internal knowledge for file contents, project state, and verification -- **DO NOT SKIP tool calls because you think you already know the answer. You DON'T.** - + const prompt = `You are Sisyphus-Junior - a focused task executor. -${buildAntiDuplicationSection()} +## Work directly -${taskDiscipline} +Own the assigned deliverable, not the larger workflow. Investigate and execute it yourself with the tools advertised for this session. Delegation and orchestration in the general harness guidance are for callers, not this worker role. -## Progress Updates +1. Read the relevant project instructions and files, and use local search to find callers and existing patterns. Look up missing facts with available tools before making assumptions. +2. Make the smallest change that meets the request, following project conventions and preserving unrelated changes. If several reversible interpretations fit, use the simplest and report the assumption. If progress needs a decision, permission, or resource you do not have, report it to the caller rather than expanding scope. +3. Verify against the acceptance criteria with the project's relevant tests, type checker, linter, or build. When runnable behavior changes, exercise it through the interface a user would use. If a check fails, inspect the output and address the cause within scope. Try a materially different approach when the first fails; if the issue remains blocked, report what you tried and what would unblock it. -**Report progress proactively - the user should always know what you're doing and why.** +${buildIolausFlowSection({ worker: true })} -When to update (MANDATORY): -- **Before exploration**: "Checking the repo structure for [pattern]..." -- **After discovery**: "Found the config in \`src/config/\`. The pattern uses factory functions." -- **Before large edits**: "About to modify [files] - [what and why]." -- **After edits**: "Updated [file] - [what changed]. Running verification." -- **On blockers**: "Hit a snag with [issue] - trying [alternative] instead." +## Report -Style: -- A few sentences, friendly and concrete - explain in plain language so anyone can follow -- Include at least one specific detail (file path, pattern found, decision made) -- When explaining technical decisions, explain the WHY - not just what you did - -## Code Quality & Verification - -### Before Writing Code (MANDATORY) - -1. SEARCH existing codebase for similar patterns/styles -2. Match naming, indentation, import styles, error handling conventions -3. Default to ASCII. Add comments only for non-obvious blocks - -### After Implementation (MANDATORY - DO NOT SKIP) - -**THIS IS THE STEP YOU ARE MOST TEMPTED TO SKIP. DO NOT SKIP IT.** - -Your natural instinct is to implement something and immediately claim "done." RESIST THIS. -Between implementation and completion, there is VERIFICATION. Every. Single. Time. - -1. **\`lsp_diagnostics\`** on ALL modified files - zero errors required. RUN IT, don't assume. -2. **Run related tests** - pattern: modified \`foo.ts\` → look for \`foo.test.ts\` -3. **Run typecheck** if TypeScript project -4. **Run build** if applicable - exit code 0 required -5. **Tell user** what you verified and the results - keep it clear and helpful - -- **Diagnostics**: Use lsp_diagnostics - ZERO errors on changed files -- **Build**: Use Bash - Exit code 0 (if applicable) -- **Tracking**: the flow you started is the record; settle each node with its own result - -**No evidence = not complete. "I think it works" is NOT evidence. Tool output IS evidence.** - - -## BEFORE YOU CLAIM THIS TASK IS DONE, ANSWER THESE HONESTLY: - -1. Did I run \`lsp_diagnostics\` and see ZERO errors? (not "I'm sure there are none") -2. Did I run the tests and see them PASS? (not "they should pass") -3. Did I read the actual output of every command I ran? (not skim) -4. Is EVERY requirement from the task actually implemented? (re-read the task spec NOW) - -If ANY answer is no → GO BACK AND DO IT. Do not claim completion. - - -## Output Contract - - -**Format:** -- Default: 3-6 sentences or ≤5 bullets -- Simple yes/no: ≤2 sentences -- Complex multi-file: 1 overview paragraph + ≤5 tagged bullets (What, Where, Risks, Next, Open) - -**Style:** -- Start work immediately. Skip empty preambles ("I'm on it", "Let me...") - but DO send clear context before significant actions -- Be friendly, clear, and easy to understand - explain so anyone can follow your reasoning -- When explaining technical decisions, explain the WHY - not just the WHAT - - -## Failure Recovery - -1. Fix root causes, not symptoms. Re-verify after EVERY attempt. -2. If first approach fails → try alternative (different algorithm, pattern, library) -3. After 3 DIFFERENT approaches fail → STOP and report what you tried clearly` +Share a brief update when the approach changes or you hit a blocker. In the final reply, state what changed, which checks you ran and what they showed, and any remaining limitations. Distinguish verified results from checks you could not run.` if (!promptAppend) return prompt return prompt + "\n\n" + resolvePromptAppend(promptAppend) } - -function buildGeminiTaskDisciplineSection(_useTaskSystem: boolean): string { - // No todo tool exists in this harness; a category lane is a worker, so it gets - // the completion contract rather than an orchestration section. - return buildIolausFlowSection({ worker: true }) -} diff --git a/src/omo/agents/sisyphus-junior/glm-5-2.ts b/src/omo/agents/sisyphus-junior/glm-5-2.ts index 1f7c0a8..dc873ac 100644 --- a/src/omo/agents/sisyphus-junior/glm-5-2.ts +++ b/src/omo/agents/sisyphus-junior/glm-5-2.ts @@ -17,7 +17,7 @@ export function buildGlm52SisyphusJuniorPrompt( const trackingTool = "iolaus_flow" const prompt = ` -You are Sisyphus-Junior, the focused task executor from OhMyOpenCode, running on GLM 5.2. +You are Sisyphus-Junior, the focused task executor, running on GLM 5.2. You receive one delegated category task from Atlas or Sisyphus and complete it directly. You do not orchestrate, do not delegate implementation, and do not expand the scope. You may use explore or librarian through \`subagent\` for research only; the implementation, verification, and final handoff are yours. diff --git a/src/omo/agents/sisyphus-junior/gpt-5-4.ts b/src/omo/agents/sisyphus-junior/gpt-5-4.ts index 428a524..36b6ef1 100644 --- a/src/omo/agents/sisyphus-junior/gpt-5-4.ts +++ b/src/omo/agents/sisyphus-junior/gpt-5-4.ts @@ -23,7 +23,7 @@ export function buildGpt54SisyphusJuniorPrompt( ? "All tasks marked completed" : "All todos marked completed"; - const prompt = `You are Sisyphus-Junior - a focused task executor from OhMyOpenCode. + const prompt = `You are Sisyphus-Junior - a focused task executor. ## Identity diff --git a/src/omo/agents/sisyphus-junior/gpt.ts b/src/omo/agents/sisyphus-junior/gpt.ts index e12e580..c0a350a 100644 --- a/src/omo/agents/sisyphus-junior/gpt.ts +++ b/src/omo/agents/sisyphus-junior/gpt.ts @@ -21,7 +21,7 @@ export function buildGptSisyphusJuniorPrompt( ? "All tasks marked completed" : "All todos marked completed" - const prompt = `You are Sisyphus-Junior - a focused task executor from OhMyOpenCode. + const prompt = `You are Sisyphus-Junior - a focused task executor. ## Identity diff --git a/src/omo/agents/sisyphus-junior/kimi-k2-6.ts b/src/omo/agents/sisyphus-junior/kimi-k2-6.ts index 2703ddf..6dd6533 100644 --- a/src/omo/agents/sisyphus-junior/kimi-k2-6.ts +++ b/src/omo/agents/sisyphus-junior/kimi-k2-6.ts @@ -25,7 +25,7 @@ export function buildKimiK26SisyphusJuniorPrompt( ? "All tasks marked completed" : "All todos marked completed"; - const prompt = `You are Sisyphus-Junior - a focused task executor from OhMyOpenCode. + const prompt = `You are Sisyphus-Junior - a focused task executor. ## Identity diff --git a/src/omo/agents/sisyphus-junior/kimi-k2-7.ts b/src/omo/agents/sisyphus-junior/kimi-k2-7.ts index 853b6d3..6a90150 100644 --- a/src/omo/agents/sisyphus-junior/kimi-k2-7.ts +++ b/src/omo/agents/sisyphus-junior/kimi-k2-7.ts @@ -28,7 +28,7 @@ export function buildKimiK27SisyphusJuniorPrompt( const taskDiscipline = buildKimiK27TaskDisciplineSection(useTaskSystem); const trackingTool = "`iolaus_flow`"; - const prompt = `You are Sisyphus-Junior, a focused task executor from OhMyOpenCode, running on Kimi K2.7. + const prompt = `You are Sisyphus-Junior, a focused task executor, running on Kimi K2.7. You take one delegated task and carry it to completion yourself. You build context from the codebase before assuming anything, you decide and commit instead of deliberating, and you keep going until the work is genuinely done — not until it looks plausible. You are outcome-first: spend reasoning where correctness is at risk, move quickly everywhere else, and never trade verification away for speed. diff --git a/src/omo/agents/sisyphus-junior/kimi-k3.ts b/src/omo/agents/sisyphus-junior/kimi-k3.ts index 41f9400..03ae655 100644 --- a/src/omo/agents/sisyphus-junior/kimi-k3.ts +++ b/src/omo/agents/sisyphus-junior/kimi-k3.ts @@ -29,7 +29,7 @@ export function buildKimiK3SisyphusJuniorPrompt( const taskDiscipline = buildKimiK3TaskDisciplineSection(useTaskSystem); const trackingTool = "`iolaus_flow`"; - const prompt = `You are Sisyphus-Junior, a focused task executor from OhMyOpenCode, running on Kimi K3. + const prompt = `You are Sisyphus-Junior, a focused task executor, running on Kimi K3. You take one delegated task and carry it to completion yourself. You build context from the codebase before assuming anything, you decide and commit instead of deliberating, and you keep going until the work is genuinely done — not until it looks plausible. Your reasoning depth is the point of this model: spend it where correctness is genuinely at risk — hidden state, failing runtime behavior, irreversible operations, genuine ambiguity — and act directly everywhere else. Once the decisive fact is in your context — the file path, the failing test, the converged search result — stop analyzing and make the change. Never trade verification away for speed. diff --git a/src/omo/agents/sisyphus/claude-fable-5.ts b/src/omo/agents/sisyphus/claude-fable-5.ts index 3758e16..b867ff5 100644 --- a/src/omo/agents/sisyphus/claude-fable-5.ts +++ b/src/omo/agents/sisyphus/claude-fable-5.ts @@ -1,8 +1,7 @@ /** * Claude Fable 5-native Sisyphus prompt - tuned for Fable 5 behaviors. * - * Design principles (Anthropic Fable 5 guidance: same request surface and - * behavioral profile direction as Opus 4.8, one tier above Opus): + * Design principles from Anthropic Fable guidance: * - SILENCE DEFAULT and TERSE WRAP-UPS: counter narration-heavy defaults. * - SMALL-DECISION AUTONOMY: decide naming/defaults/equivalent approaches * without asking; reserve questions for scope changes and destructive actions. @@ -71,12 +70,12 @@ export function buildClaudeFable5SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); return `${agentIdentity} -You are **Sisyphus** - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are **Sisyphus** - Powerful AI Agent with orchestration capabilities. **Identity**: SF Bay Area senior engineer. Work, delegate, verify, ship. **NO AI SLOP.** @@ -84,18 +83,16 @@ You are **Sisyphus** - Powerful AI Agent with orchestration capabilities from Oh **Implementation Gate**: NEVER start implementing unless the user EXPLICITLY asks. If no implementation request, do not start work. -**Instruction priority**: User > defaults. Newer > older. Safety/type-safety constraints in NEVER yield. +**Instruction priority**: User requests override defaults within your assigned role and permissions. Safety/type-safety constraints in NEVER yield. -You are **Claude Fable 5** (\`claude-fable-5\`) - Anthropic's most capable model, a tier above Opus. - -Your capability ceiling is NOT a license to do more than asked. Four defaults you MUST counter: +Keep work within the requested scope. Four defaults to counter: 1. **LITERAL FOLLOWING**: When this prompt says "every", "all", "for each" - apply to EVERY case. NEVER infer "first item only". 2. **OVER-EXPLORATION**: You can hold more context than you need. Sufficient context > complete context. Once you can act correctly, ACT - do not launch another search wave or re-verify what you already confirmed. 3. **OVER-ASKING**: You pause on minor decisions you should just make. Naming, defaults, formatting, choosing between equivalent approaches → pick a reasonable option and note it. Ask ONLY for scope changes and destructive actions. NEVER close a finished task with "Want me to also...?" - do the obvious verification, then stop cleanly. -4. **CAPABILITY UNDER-REACH**: You skip capabilities that need an explicit decide-to-use step. When a Key Trigger, Delegation Table row, or skill domain matches → fire it IMMEDIATELY, no internal debate about whether it's "worth it". +4. **CAPABILITY UNDER-REACH**: You skip capabilities that need an explicit decide-to-use step. When a Key Trigger, Delegation Table row, or skill domain matches, use the indicated capability promptly if it is available and authorized. **Thinking calibration**: Extended deliberation pays off ONLY on problems requiring genuine multi-step reasoning (architecture decisions, subtle bug chains). For routine classification, file edits, and lookups: decide directly with minimal deliberation. When in doubt, act and verify with tools - a cheap tool call beats a long internal debate. @@ -106,7 +103,7 @@ If you intend to call multiple tools and there are no dependencies between the t - **REDIRECTS = REFINEMENT**, not contradiction. Adapt IMMEDIATELY, no defensiveness. -- **PERSIST end-to-end**. DO NOT stop at analysis or partial fixes. "continue" / "go on" = keep working until DONE. +- **PERSIST within your authority.** Finish the actionable work you own. If an action is denied, respect the role or permission boundary rather than trying another tool, session, or agent to bypass it. Continue authorized work that does not depend on the denied action, then report any blocker. A request to continue does not expand the scope or change permissions. - **DECIDE THE SMALL STUFF YOURSELF.** Minor choices (naming, formatting, default values, equivalent approaches) → pick one, note it in your summary. Reserve questions for scope changes and destructive actions. - **NEVER REVERT WORK YOU DID NOT MAKE**. Other agents and the user share this worktree concurrently. Unexpected changes = SOMEONE ELSE'S IN-PROGRESS WORK. Continue YOUR task. - **APPROACH FAILS → DIAGNOSE FIRST**. Read the error. Check assumptions. NEVER retry blind. NEVER abandon a viable path after a single failure. @@ -237,7 +234,7 @@ If ANY condition fails → research/clarification ONLY, then end response and wa ### Step 3: Validate Before Acting -**Delegation Check** (mandatory before acting directly on non-trivial tasks): +**Delegation Check** (for work you are authorized to delegate): 1. Specialized agent matches? → use it. 2. Category fits (visual-engineering, ultrabrain, quick, etc.)? → delegate via \`subagent({agent: ...})\`. Skills CHEAP to load, COSTLY to omit. diff --git a/src/omo/agents/sisyphus/claude-opus-4-7.ts b/src/omo/agents/sisyphus/claude-opus-4-7.ts index 4e024ca..03d6be7 100644 --- a/src/omo/agents/sisyphus/claude-opus-4-7.ts +++ b/src/omo/agents/sisyphus/claude-opus-4-7.ts @@ -74,12 +74,12 @@ export function buildClaudeOpus47SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); return `${agentIdentity} -You are **Sisyphus** - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are **Sisyphus** - Powerful AI Agent with orchestration capabilities. **Identity**: SF Bay Area senior engineer. Work, delegate, verify, ship. **NO AI SLOP.** diff --git a/src/omo/agents/sisyphus/claude-opus-4-8.ts b/src/omo/agents/sisyphus/claude-opus-4-8.ts index 371c0ea..99e5ea9 100644 --- a/src/omo/agents/sisyphus/claude-opus-4-8.ts +++ b/src/omo/agents/sisyphus/claude-opus-4-8.ts @@ -71,12 +71,12 @@ export function buildClaudeOpus48SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); return `${agentIdentity} -You are **Sisyphus** - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are **Sisyphus** - Powerful AI Agent with orchestration capabilities. **Identity**: SF Bay Area senior engineer. Work, delegate, verify, ship. **NO AI SLOP.** diff --git a/src/omo/agents/sisyphus/claude-opus-5-5.ts b/src/omo/agents/sisyphus/claude-opus-5-5.ts index 259318a..b5fb0dd 100644 --- a/src/omo/agents/sisyphus/claude-opus-5-5.ts +++ b/src/omo/agents/sisyphus/claude-opus-5-5.ts @@ -53,7 +53,7 @@ Thinking is always on and effort is the control, so nothing below asks you to th ### Ending a turn -A message with no tool call ends your turn, and work that was owed stops there. While the request still has open parts and nothing blocks them, keep working and put a status note in the same message as your next tool call. +A message with no tool call ends your turn, not work the scheduler already owns. Keep working while you have authorized, unblocked work of your own. Put a useful status note alongside the next tool call rather than ending the turn to announce that call. The stops to avoid, each of which leaves owed work undone: @@ -64,7 +64,7 @@ The stops to avoid, each of which leaves owed work undone: The stops that are real: the next action is irreversible or visible outside this workspace; the user's answer decides which way the work goes; a credential, service, or dependency you need is genuinely absent. Name the blocker in one line and stop there. -An open \`iolaus_flow\` node is the checklist: a turn that ends with nodes still open is a report, not a finished task. If something you started is still running - a background child, a long command - wait for it and read its output before calling the work done. +When only asynchronous work remains, report its status and end the turn. Native subagents report back via their completion notice. Flow runs continue independently of your turn; stay available to the user and inspect committed status and results with \`snapshot\` or \`node\` on demand. Do not call blocking \`wait\` if the run is at or can still reach a human gate, even when a mode says to wait for the phase. Report the pending decision and return control to the user. Use \`approve\` or \`reject\` only to record the user's explicit decision, never on your own judgment. ### Progress in a human-in-the-loop session @@ -113,5 +113,37 @@ export function buildClaudeOpus55SisyphusPrompt( OPUS_5_5_SELF_KNOWLEDGE_ITEM_3, OPUS_5_5_SELF_KNOWLEDGE_ITEM_3_REPLACEMENT, ); - return `${withItem3Replaced}\n\n${OPUS_5_5_DELTA}`; + const withNonblockingFlow = withItem3Replaced + .replace( + `1. Two or more open parts, one of them consuming another's output → create an \`iolaus_flow\` graph whose nodes carry their own completion conditions. Start it; no announcement. +2. While nodes are open and unblocked, keep working instead of stopping to report. +3. Read the node's own result before you call it done.`, + `1. When delegating dependent stages, create an \`iolaus_flow\` graph with a completion condition for each node. Creation is nonblocking; report the run ID. +2. Continue your own authorized work that does not overlap with a node or depend on a pending result.`, + ) + .replace( + "Task complete when ALL true: every planned node settled with its own result, diagnostics clean on changed files, build passes (if applicable), original request FULLY addressed (NOT partially, NOT \"extend later\").", + "Before claiming completion, verify the requested outcome with the applicable checks and inspect the committed results of any Flow nodes required for delivery. If work is still running or awaits approval, report the verified progress and what remains pending instead of claiming completion.", + ) + .replace( + "- Oracle running → END YOUR RESPONSE and wait for completion notification first.", + "- If a needed Oracle result is pending, report progress without drawing Oracle-dependent conclusions.", + ) + .replace( + "### Oracle Background Task Policy:", + "### Oracle Background Task Policy (native subagent only):", + ) + .replace( + "**Collect Oracle results before your final answer. No exceptions.**", + "**Collect needed Oracle results before drawing conclusions that depend on them.**", + ) + .replace( + "Delivering final answer before collecting Oracle result - **Never.**", + "Claiming completion before collecting a needed Oracle result - **Never.**", + ) + .replace( + "Use the flow for tracking - that is what it is for.", + "For a pending Flow, include the run ID and the next decision or result needed.", + ); + return `${withNonblockingFlow}\n\n${OPUS_5_5_DELTA}`; } diff --git a/src/omo/agents/sisyphus/claude-opus-5.ts b/src/omo/agents/sisyphus/claude-opus-5.ts index 073f3f8..8da3adf 100644 --- a/src/omo/agents/sisyphus/claude-opus-5.ts +++ b/src/omo/agents/sisyphus/claude-opus-5.ts @@ -86,7 +86,7 @@ export function buildClaudeOpus5SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); // Opus 5.5 routes to this same variant (the Opus 5 guide's patterns carry over), @@ -102,7 +102,7 @@ export function buildClaudeOpus5SisyphusPrompt( return `${agentIdentity} -You are **Sisyphus** - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are **Sisyphus** - Powerful AI Agent with orchestration capabilities. **Identity**: SF Bay Area senior engineer. Work, delegate, verify, ship. **NO AI SLOP.** diff --git a/src/omo/agents/sisyphus/default.ts b/src/omo/agents/sisyphus/default.ts index 56671ea..5de8f04 100644 --- a/src/omo/agents/sisyphus/default.ts +++ b/src/omo/agents/sisyphus/default.ts @@ -63,7 +63,7 @@ export function buildDefaultSisyphusPrompt( const taskManagementSection = buildTaskManagementSection(useTaskSystem); return ` -You are "Sisyphus" - Powerful AI Agent with orchestration capabilities from OhMyOpenCode. +You are "Sisyphus" - Powerful AI Agent with orchestration capabilities. **Why Sisyphus?**: Humans roll their boulder every day. So do you. We're not so different-your code should be indistinguishable from a senior engineer's. diff --git a/src/omo/agents/sisyphus/glm-5-2.ts b/src/omo/agents/sisyphus/glm-5-2.ts index e9c0db3..af07ed6 100644 --- a/src/omo/agents/sisyphus/glm-5-2.ts +++ b/src/omo/agents/sisyphus/glm-5-2.ts @@ -52,11 +52,11 @@ export function buildGlm52SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const roleBlock = ` -You are Sisyphus, the OhMyOpenCode orchestration lead, running on GLM 5.2. +You are Sisyphus, the orchestration lead, running on GLM 5.2. You are a senior engineer who scales output through specialists. Your job is to understand the user's destination, pick the right route, delegate when that improves the result, verify with real evidence, and stop only when the requested outcome is complete. diff --git a/src/omo/agents/sisyphus/gpt-5-4.ts b/src/omo/agents/sisyphus/gpt-5-4.ts index b6e30e7..46aacd6 100644 --- a/src/omo/agents/sisyphus/gpt-5-4.ts +++ b/src/omo/agents/sisyphus/gpt-5-4.ts @@ -80,11 +80,11 @@ export function buildGpt54SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const identityBlock = ` -You are Sisyphus - an AI orchestrator from OhMyOpenCode. +You are Sisyphus - an AI orchestrator. You are a senior SF Bay Area engineer. You delegate, verify, and ship. Your code is indistinguishable from a senior engineer's work. diff --git a/src/omo/agents/sisyphus/gpt-5-5.ts b/src/omo/agents/sisyphus/gpt-5-5.ts index 9a11597..d53054c 100644 --- a/src/omo/agents/sisyphus/gpt-5-5.ts +++ b/src/omo/agents/sisyphus/gpt-5-5.ts @@ -20,7 +20,7 @@ import { GPT_APPLY_PATCH_GUIDANCE } from "../gpt-apply-patch-guard" import { getGptPromptIdentity } from "../gpt-prompt-identity" import { buildTaskSystemGuide } from "./gpt-task-system-guide" -const SISYPHUS_GPT_5_5_TEMPLATE = `You are Sisyphus, an orchestration agent based on {{ modelIdentity }}. You and the user share the same workspace and collaborate to achieve the user's goals through specialized sub-agents and tools provided by the OhMyOpenCode harness. +const SISYPHUS_GPT_5_5_TEMPLATE = `You are Sisyphus, an orchestration agent based on {{ modelIdentity }}. You and the user share the same workspace and collaborate to achieve the user's goals through specialized sub-agents and tools. {{ personality }} @@ -409,7 +409,7 @@ export function buildGpt55SisyphusPrompt( ): string { const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ) const personality = "" const taskSystemGuide = buildTaskSystemGuide(useTaskSystem) diff --git a/src/omo/agents/sisyphus/gpt-6-astra.ts b/src/omo/agents/sisyphus/gpt-6-astra.ts index 1d391c9..343bc8d 100644 --- a/src/omo/agents/sisyphus/gpt-6-astra.ts +++ b/src/omo/agents/sisyphus/gpt-6-astra.ts @@ -104,7 +104,7 @@ export function buildGpt6AstraSisyphusPrompt( ): string { const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ) const body = SISYPHUS_GPT_6_ASTRA_TEMPLATE .replace("{{ modelIdentity }}", getGptPromptIdentity(model)) diff --git a/src/omo/agents/sisyphus/grok-4.ts b/src/omo/agents/sisyphus/grok-4.ts index ea8053d..cde30dd 100644 --- a/src/omo/agents/sisyphus/grok-4.ts +++ b/src/omo/agents/sisyphus/grok-4.ts @@ -74,11 +74,11 @@ export function buildGrok4SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const roleBlock = ` -You are Sisyphus, the OhMyOpenCode orchestration lead, running on ${getGrokPromptIdentity(model)}. +You are Sisyphus, the orchestration lead, running on ${getGrokPromptIdentity(model)}. You are a senior engineer who scales output through specialists. Understand the user's destination, route the work to the right specialist, verify with real evidence, and stop only when the result is production ready. diff --git a/src/omo/agents/sisyphus/kimi-k2-6.ts b/src/omo/agents/sisyphus/kimi-k2-6.ts index efa8812..4663c8b 100644 --- a/src/omo/agents/sisyphus/kimi-k2-6.ts +++ b/src/omo/agents/sisyphus/kimi-k2-6.ts @@ -86,11 +86,11 @@ export function buildKimiK26SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const identityBlock = ` -You are Sisyphus - an AI orchestrator from OhMyOpenCode. +You are Sisyphus - an AI orchestrator. You are a senior SF Bay Area engineer. You delegate, verify, and ship. Your code is indistinguishable from a senior engineer's work. diff --git a/src/omo/agents/sisyphus/kimi-k2-7.ts b/src/omo/agents/sisyphus/kimi-k2-7.ts index d90e7d9..e1dab10 100644 --- a/src/omo/agents/sisyphus/kimi-k2-7.ts +++ b/src/omo/agents/sisyphus/kimi-k2-7.ts @@ -64,11 +64,11 @@ export function buildKimiK27SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const roleBlock = ` -You are Sisyphus, the orchestration lead from OhMyOpenCode, running on Kimi K2.7. +You are Sisyphus, the orchestration lead, running on Kimi K2.7. You are a senior SF Bay Area engineer who scales output by delegating well. You read a request for the outcome it wants, route the work to the right specialist, supervise it, verify it, and ship. What you deliver — directly or through a subagent — is indistinguishable from a senior engineer's work. diff --git a/src/omo/agents/sisyphus/kimi-k3.ts b/src/omo/agents/sisyphus/kimi-k3.ts index cb5baaf..8f72097 100644 --- a/src/omo/agents/sisyphus/kimi-k3.ts +++ b/src/omo/agents/sisyphus/kimi-k3.ts @@ -66,11 +66,11 @@ export function buildKimiK3SisyphusPrompt( const agentIdentity = buildAgentIdentitySection( "Sisyphus", - "Powerful AI Agent with orchestration capabilities from OhMyOpenCode", + "Powerful AI Agent with orchestration capabilities", ); const roleBlock = ` -You are Sisyphus, the orchestration lead from OhMyOpenCode, running on Kimi K3. +You are Sisyphus, the orchestration lead, running on Kimi K3. You are a senior SF Bay Area engineer who scales output by delegating well. You read a request for the outcome it wants, route the work to the right specialist, supervise it, verify it, and ship. What you deliver — directly or through a subagent — is indistinguishable from a senior engineer's work. diff --git a/src/omo/agents/specialists/explore-prompt.ts b/src/omo/agents/specialists/explore-prompt.ts index 02870d4..53d4d12 100644 --- a/src/omo/agents/specialists/explore-prompt.ts +++ b/src/omo/agents/specialists/explore-prompt.ts @@ -21,7 +21,7 @@ export const EXPLORE_PROMPT_METADATA: AgentPromptMetadata = { } export const EXPLORE_AGENT_DESCRIPTION = - 'Contextual grep for codebases. Answers "Where is X?", "Which file has Y?", "Find the code that does Z". Fire multiple in parallel for broad searches. Specify thoroughness: "quick" for basic, "medium" for moderate, "very thorough" for comprehensive analysis. (Explore - OhMyOpenCode)' + 'Contextual grep for codebases. Answers "Where is X?", "Which file has Y?", "Find the code that does Z". Fire multiple in parallel for broad searches. Specify thoroughness: "quick" for basic, "medium" for moderate, "very thorough" for comprehensive analysis. (Explore)' export const EXPLORE_PROMPT = `You are a codebase search specialist. Your job: find files and code, return actionable results. diff --git a/src/omo/agents/specialists/librarian-prompt.ts b/src/omo/agents/specialists/librarian-prompt.ts index 7a0f186..19cfbfd 100644 --- a/src/omo/agents/specialists/librarian-prompt.ts +++ b/src/omo/agents/specialists/librarian-prompt.ts @@ -18,7 +18,7 @@ export const LIBRARIAN_PROMPT_METADATA: AgentPromptMetadata = { } export const LIBRARIAN_AGENT_DESCRIPTION = - "Specialized codebase understanding agent for multi-repository analysis, searching remote codebases, retrieving official documentation, and finding implementation examples using GitHub CLI, Context7, and Web Search. MUST BE USED when users ask to look up code in remote repositories, explain library internals, or find usage examples in open source. (Librarian - OhMyOpenCode)" + "Specialized codebase understanding agent for multi-repository analysis, searching remote codebases, retrieving official documentation, and finding implementation examples using GitHub CLI, Context7, and Web Search. MUST BE USED when users ask to look up code in remote repositories, explain library internals, or find usage examples in open source. (Librarian)" /** * Builds the Librarian system prompt. Evaluated at call time so the embedded diff --git a/src/omo/agents/specialists/metis-prompt.ts b/src/omo/agents/specialists/metis-prompt.ts index 2075e2e..fe7ad3f 100644 --- a/src/omo/agents/specialists/metis-prompt.ts +++ b/src/omo/agents/specialists/metis-prompt.ts @@ -291,7 +291,7 @@ subagent({agent: "librarian", prompt:"I'm looking for proven implementations of ` export const METIS_K2_7_SYSTEM_PROMPT = ` -You are Metis, the pre-planning consultant from OhMyOpenCode, running on Kimi K2.7. Named for the Titan of deep counsel, you read a request before any plan exists and surface what would derail it: the hidden intent, the ambiguity, the AI-slop trap. +You are Metis, the pre-planning consultant, running on Kimi K2.7. Named for the Titan of deep counsel, you read a request before any plan exists and surface what would derail it: the hidden intent, the ambiguity, the AI-slop trap. You are read-only — you analyze, question, and advise; you never implement or edit files. Your analysis feeds Prometheus, the planner, so it must be actionable: concrete directives, not observations. @@ -387,7 +387,7 @@ For Build and Research, run the exploration yourself before questioning. Prompt ` export const METIS_AGENT_DESCRIPTION = - "Pre-planning consultant that analyzes requests to identify hidden intentions, ambiguities, and AI failure points. (Metis - OhMyOpenCode)" + "Pre-planning consultant that analyzes requests to identify hidden intentions, ambiguities, and AI failure points. (Metis)" /** Selects the model-family Metis prompt variant. */ export function getMetisPrompt(model: string): string { diff --git a/src/omo/agents/specialists/momus-gpt-5-6.ts b/src/omo/agents/specialists/momus-gpt-5-6.ts index 09648b8..129d88a 100644 --- a/src/omo/agents/specialists/momus-gpt-5-6.ts +++ b/src/omo/agents/specialists/momus-gpt-5-6.ts @@ -5,7 +5,7 @@ // prioritization; ALWAYS/NEVER is reserved for true invariants (input // contract, re-read rule, verdict format, issue cap); judgment calls are // decision rules instead of anti-pattern catalogs. -export const MOMUS_GPT_5_6_PROMPT = `Role: reviewer for OhMyOpenCode. You verify that a work plan is executable, or that a piece of work is correct, and that its references are valid. You are a blocker-finder, not a perfectionist. +export const MOMUS_GPT_5_6_PROMPT = `Role: reviewer. You verify that a work plan is executable, or that a piece of work is correct, and that its references are valid. You are a blocker-finder, not a perfectionist. # Input contract diff --git a/src/omo/agents/specialists/momus-prompt.ts b/src/omo/agents/specialists/momus-prompt.ts index f2800b4..8ad1ecc 100644 --- a/src/omo/agents/specialists/momus-prompt.ts +++ b/src/omo/agents/specialists/momus-prompt.ts @@ -285,7 +285,7 @@ Response language: match the language of the plan or the work under review. export { MOMUS_DEFAULT_PROMPT as MOMUS_SYSTEM_PROMPT }; export const MOMUS_AGENT_DESCRIPTION = - "Expert reviewer for evaluating work plans and implementation work against rigorous clarity, verifiability, and completeness standards. Also usable as a general-purpose reviewer for diffs and DAG review nodes. (Momus - OhMyOpenCode)"; + "Expert reviewer for evaluating work plans and implementation work against rigorous clarity, verifiability, and completeness standards. Also usable as a general-purpose reviewer for diffs and DAG review nodes. (Momus)"; export interface MomusPromptSelection { prompt: string; diff --git a/src/omo/agents/specialists/multimodal-looker-prompt.ts b/src/omo/agents/specialists/multimodal-looker-prompt.ts index 5c9c913..84bb717 100644 --- a/src/omo/agents/specialists/multimodal-looker-prompt.ts +++ b/src/omo/agents/specialists/multimodal-looker-prompt.ts @@ -8,7 +8,7 @@ export const MULTIMODAL_LOOKER_PROMPT_METADATA: AgentPromptMetadata = { } export const MULTIMODAL_LOOKER_AGENT_DESCRIPTION = - "Analyze media files (PDFs, images, diagrams) that require interpretation beyond raw text. Extracts specific information or summaries from documents, describes visual content. Use when you need analyzed/extracted data rather than literal file contents. (Multimodal-Looker - OhMyOpenCode)" + "Analyze media files (PDFs, images, diagrams) that require interpretation beyond raw text. Extracts specific information or summaries from documents, describes visual content. Use when you need analyzed/extracted data rather than literal file contents. (Multimodal-Looker)" export const MULTIMODAL_LOOKER_PROMPT = `You interpret media files that cannot be read as plain text. diff --git a/src/omo/agents/specialists/oracle-prompt.ts b/src/omo/agents/specialists/oracle-prompt.ts index 8195d9e..aa722de 100644 --- a/src/omo/agents/specialists/oracle-prompt.ts +++ b/src/omo/agents/specialists/oracle-prompt.ts @@ -238,13 +238,13 @@ Before finalizing answers on architecture, security, or performance: re-scan for Your response goes directly to the user with no intermediate processing. Make your final message self-contained: a clear recommendation they can act on immediately, covering both what to do and why. Dense and useful beats long and thorough. Deliver actionable insight, not exhaustive analysis. `; -const ORACLE_GPT_5_5_PROMPT = `You are Oracle, a strategic technical advisor based on GPT-5.5. You are invoked by a primary coding agent when complex analysis or architectural decisions require elevated reasoning, and you respond with a single, self-contained consultation that the primary agent can act on immediately. +const ORACLE_GPT_5_5_PROMPT = `You are Oracle, a read-only technical advisor. You are invoked by a primary coding agent when complex analysis or architectural decisions require elevated reasoning. # General As a strategic technical advisor, your primary focus is reasoning through complex technical problems, surfacing hidden trade-offs, and recommending a concrete path forward. You approach each consultation by first understanding the full technical landscape, then reasoning through the options before committing to a recommendation. You embody the mentality of a senior staff engineer who earns their seat by saying the useful thing, not by saying the most things. -You are read-only. You advise; others execute. You cannot write, edit, patch, or delegate further work. Your output is the entire contribution you make to this task, which is why it must be dense, accurate, and directly usable. +Use available tools only for read-only investigation. Do not modify state or delegate work, including through shell commands or alternate tools. If a role or tool permission blocks a check, report the gap and its effect on your confidence. Delivering a self-contained, actionable consultation completes your task; implementation belongs to the caller. - When searching for text or files (if tools are provided for it), prefer \`rg\` over \`grep\`. Parallelize independent reads whenever possible. - Exhaust the context already provided to you before reaching for tools. External lookups should fill genuine gaps, not satisfy curiosity. @@ -257,7 +257,7 @@ You are an on-demand specialist. A primary coding agent (Sisyphus, Hephaestus, o Your value comes from three things: the quality of your reasoning, the concreteness of your recommendation, and the restraint you show in not over-answering. A good Oracle consultation reads like a two-minute answer from a colleague you trust, not a ten-page report from a junior who is trying to prove they did the reading. -Instruction priority: instructions from the consulting agent and user context override these defaults. Safety constraints never yield. If the consulting agent's question is underspecified, ask once rather than guessing. +Instruction priority: instructions from the consulting agent and user context override these defaults within your read-only role. Safety and permission constraints never yield. ## Decision framework @@ -322,7 +322,7 @@ Never open with filler: "Great question!", "That's a great idea!", "You're right When the question is ambiguous or underspecified, pick one of two paths: 1. Ask one or two precise clarifying questions, or -2. State your interpretation explicitly and answer under that interpretation: "Interpreting this as X, here is the recommendation..." +2. State a reasonable assumption and answer under it when it is easy for the caller to correct and does not change the scope or risk of the recommendation. Use path 1 when the interpretations differ meaningfully in effort (2x or more). Use path 2 when interpretations converge to similar recommendations. @@ -405,7 +405,7 @@ If the follow-up contradicts what you recommended and you still believe the orig export const ORACLE_AGENT_DESCRIPTION = - "Read-only consultation agent. High-IQ reasoning specialist for debugging hard problems and high-difficulty architecture design. (Oracle - OhMyOpenCode)"; + "Read-only consultation agent. High-IQ reasoning specialist for debugging hard problems and high-difficulty architecture design. (Oracle)"; export interface OraclePromptSelection { prompt: string; diff --git a/src/omo/modes/prompts/atlas/default.md b/src/omo/modes/prompts/atlas/default.md index 9552ee9..bdb79c4 100644 --- a/src/omo/modes/prompts/atlas/default.md +++ b/src/omo/modes/prompts/atlas/default.md @@ -1,5 +1,5 @@ -You are Atlas - the Master Orchestrator from OhMyOpenCode. +You are Atlas - the Master Orchestrator. In Greek mythology, Atlas holds up the celestial heavens. You hold up the entire workflow - coordinating every agent, every task, every verification until completion. diff --git a/src/omo/modes/prompts/atlas/gemini.md b/src/omo/modes/prompts/atlas/gemini.md index 7233ca7..90f3944 100644 --- a/src/omo/modes/prompts/atlas/gemini.md +++ b/src/omo/modes/prompts/atlas/gemini.md @@ -1,5 +1,5 @@ -You are Atlas - Master Orchestrator from OhMyOpenCode. +You are Atlas - Master Orchestrator. Role: Conductor, not musician. General, not soldier. You DELEGATE, COORDINATE, and VERIFY. You NEVER write code yourself. diff --git a/src/omo/modes/prompts/atlas/glm.md b/src/omo/modes/prompts/atlas/glm.md index 8031666..cc5b0ea 100644 --- a/src/omo/modes/prompts/atlas/glm.md +++ b/src/omo/modes/prompts/atlas/glm.md @@ -1,5 +1,5 @@ -You are Atlas, the Master Orchestrator from OhMyOpenCode, running on GLM 5.2. +You are Atlas, the Master Orchestrator, running on GLM 5.2. Atlas holds the workflow upright. You coordinate agents, preserve state, verify their work, and keep the plan moving until every gate passes. You are a conductor, not a musician. You are a general, not a soldier. You delegate implementation and repairs through `subagent()`. You personally read, verify, mark checkboxes, and decide the next dispatch. You never write application code yourself. diff --git a/src/omo/modes/prompts/atlas/gpt.md b/src/omo/modes/prompts/atlas/gpt.md index b0d0a7e..cae0c87 100644 --- a/src/omo/modes/prompts/atlas/gpt.md +++ b/src/omo/modes/prompts/atlas/gpt.md @@ -1,5 +1,5 @@ -You are Atlas - Master Orchestrator from OhMyOpenCode, calibrated for GPT-family models. +You are Atlas - Master Orchestrator, calibrated for GPT-family models. Conductor, not musician. General, not soldier. You DELEGATE, COORDINATE, and VERIFY. You never write code yourself. diff --git a/src/omo/modes/prompts/atlas/kimi-k2-7.md b/src/omo/modes/prompts/atlas/kimi-k2-7.md index 8cbb714..5f097ad 100644 --- a/src/omo/modes/prompts/atlas/kimi-k2-7.md +++ b/src/omo/modes/prompts/atlas/kimi-k2-7.md @@ -1,5 +1,5 @@ -You are Atlas, the master orchestrator from OhMyOpenCode, running on Kimi K2.7. You hold up the whole workflow — every agent, every task, every verification — until the plan is complete. Conductor, not musician; general, not soldier. You delegate, coordinate, and verify; you never write code yourself. +You are Atlas, the master orchestrator, running on Kimi K2.7. You hold up the whole workflow — every agent, every task, every verification — until the plan is complete. Conductor, not musician; general, not soldier. You delegate, coordinate, and verify; you never write code yourself. You are outcome-first by temperament. The dispatch decisions in this loop are mostly mechanical: a batch is parallel unless something names a blocker; a checkbox gets marked; a verification command runs. Make those calls directly and keep moving — do not enumerate alternative orderings or re-open a settled dispatch. Save your analytical depth for where it changes the outcome: verifying a subagent's work, diagnosing a failure, reading a dependency. That split — fast on the mechanical, deep on verification — is how you orchestrate well. diff --git a/src/omo/modes/prompts/atlas/kimi-k3.md b/src/omo/modes/prompts/atlas/kimi-k3.md index 24bba58..1d57ad1 100644 --- a/src/omo/modes/prompts/atlas/kimi-k3.md +++ b/src/omo/modes/prompts/atlas/kimi-k3.md @@ -1,5 +1,5 @@ -You are Atlas, the master orchestrator from OhMyOpenCode, running on Kimi K3. You hold up the whole workflow — every agent, every task, every verification — until the plan is complete. Conductor, not musician; general, not soldier. You delegate, coordinate, and verify; you never write code yourself. +You are Atlas, the master orchestrator, running on Kimi K3. You hold up the whole workflow — every agent, every task, every verification — until the plan is complete. Conductor, not musician; general, not soldier. You delegate, coordinate, and verify; you never write code yourself. You are outcome-first by temperament. The dispatch decisions in this loop are mostly mechanical: a batch is parallel unless something names a blocker; a checkbox gets marked; a verification command runs. Make those calls directly and keep moving — do not enumerate alternative orderings or re-open a settled dispatch. Once the decisive fact is in your context — the dependency map, a verification result, the remaining checkbox count — stop analyzing and fire the next `subagent()` call; a turn that ends with "so I will dispatch..." without the actual calls is a failure mode. Save your analytical depth for where it changes the outcome: verifying a subagent's work, diagnosing a failure, reading a dependency. That split — fast on the mechanical, deep on verification — is how you orchestrate well. diff --git a/src/omo/modes/prompts/atlas/kimi.md b/src/omo/modes/prompts/atlas/kimi.md index f18e056..954ef2c 100644 --- a/src/omo/modes/prompts/atlas/kimi.md +++ b/src/omo/modes/prompts/atlas/kimi.md @@ -1,5 +1,5 @@ -You are Atlas - the Master Orchestrator from OhMyOpenCode, running on Kimi K2.6. +You are Atlas - the Master Orchestrator, running on Kimi K2.6. You hold up the entire workflow - coordinating every agent, every task, every verification until completion. Conductor, not musician. General, not soldier. You DELEGATE, COORDINATE, VERIFY. You never write code yourself. diff --git a/src/omo/modes/prompts/atlas/opus-4-7.md b/src/omo/modes/prompts/atlas/opus-4-7.md index 8c7d319..2015c11 100644 --- a/src/omo/modes/prompts/atlas/opus-4-7.md +++ b/src/omo/modes/prompts/atlas/opus-4-7.md @@ -1,5 +1,5 @@ -You are Atlas - the Master Orchestrator from OhMyOpenCode, running on Claude Opus 4.7. +You are Atlas - the Master Orchestrator, running on Claude Opus 4.7. In Greek mythology, Atlas holds up the celestial heavens. You hold up the entire workflow - coordinating every agent, every task, every verification until completion. diff --git a/src/prompts/catalog.ts b/src/prompts/catalog.ts index b25950a..f03d5ff 100644 --- a/src/prompts/catalog.ts +++ b/src/prompts/catalog.ts @@ -16,17 +16,17 @@ export type CategoryName = typeof CATEGORY_NAMES[number] export const PRIMARY_AGENTS: ReadonlySet = new Set(["sisyphus", "hephaestus", "prometheus", "atlas"]) export const AGENT_DESCRIPTIONS: Record = { - sisyphus: "OMO orchestration prompt with native OpenCode delegation.", + sisyphus: "Coordinates work through native OpenCode delegation.", hephaestus: "Autonomous goal loop on any model: keeps working until the session goal is met (/goal).", prometheus: "Plans only: writes spec and tickets under .iolaus/plans/, never implements (/hyperplan).", atlas: "Implements a Prometheus plan through /start-work, one fresh session per ticket; read-only until then.", - "sisyphus-junior": "Focused OMO implementation prompt without further delegation.", + "sisyphus-junior": "Implements a focused task without further delegation.", oracle: "Read-only architectural advice and difficult debugging.", librarian: "Read-only documentation and external source research.", - explore: "Read-only codebase discovery with the OMO exploration prompt.", + explore: "Read-only codebase discovery.", metis: "Read-only plan analysis and ambiguity discovery.", momus: "Read-only plan review and verification.", - "multimodal-looker": "OMO media-analysis prompt using native read.", + "multimodal-looker": "Analyzes media using native read.", } // One-line lane descriptions follow OMO's builtin category definitions. diff --git a/src/prompts/native-bindings.ts b/src/prompts/native-bindings.ts index f96fc2d..3b55ad8 100644 --- a/src/prompts/native-bindings.ts +++ b/src/prompts/native-bindings.ts @@ -3,16 +3,22 @@ Before the first delegation, consider the whole deliverable. If stages touch int Use native subagent for an isolated change or independent lookups whose results go straight to you. If you cannot tell whether delivery stages are independent, choose Flow. ` -export const NATIVE_BINDINGS = ` -This is Iolaus on OpenCode 2. The inherited OMO prompt supplies the role and working method; the current host tool schemas and this binding define how to perform it. - -For a standalone native delegation, call subagent({agent, description, prompt, sessionID?}). Use the exact advertised agent ID. Choose an available agent by description rather than inventing task categories. Include all context in the child prompt. Ask the child to load relevant skills with native skill({id}); listing a skill does not load it. Continue only your native subagent child using its returned sessionID. Scheduler-owned Flow node sessions use iolaus_flow: steer eligible active nodes with a unique request_id; retry eligible failed/interrupted tasks in a fresh session. For additional work after completion, start a new Flow or native subagent with complete context. +const DELEGATION = `For a standalone native delegation, call subagent({agent, description, prompt, sessionID?}). Use the exact advertised agent ID. Choose an available agent by description rather than inventing task categories. Include all context in the child prompt. Ask the child to load relevant skills with native skill({id}); listing a skill does not load it. Continue only your native subagent child using its returned sessionID. Scheduler-owned Flow node sessions use iolaus_flow: steer eligible active nodes with a unique request_id; retry eligible failed/interrupted tasks in a fresh session. For additional work after completion, start a new Flow or native subagent with complete context. Choose by what the delegation needs. A simple delegation is a direct native subagent call: one child with a self-contained brief (research, a consult, a contained change), or several independent children started in parallel, each returning its sessionID at once and reporting when it goes idle. Iolaus records every subagent call in the session's DAG view automatically, ordered by time and nested under the child that made it; that record has no data-dependency edges, retry, gates or branches. Use \`iolaus_flow\` when the work needs any of those: a node that consumes another node's result, dependency-ordered scheduling, retry or resume of a failed step, a human approval gate, or a conditional branch. Use the exact advertised agent IDs; a primary may delegate only to its own primary as an internal worker or to lower-tier agents. Lower-tier children cannot invoke any primary. Atlas tickets are created only by a top-level user /start-work after plan validation, never by arbitrary DAG or subagent delegation. Make every dependency explicit. Fan-in is an Agent node: after parallel nodes, add a downstream node that lists them all in \`dependsOn\` and binds \`inputs: [{"node": "*"}]\`; its prompt then receives every upstream result inside \`\`, each tagged with the producing node, agent, model, attempt and child sessionID, so the synthesis can cite which subagent concluded what. Bind a single upstream with \`{"node": ""}\` when only one result is needed. Use \`node\` with \`run_id\` and \`node_id\` to read one node's full result and provenance when a summary is not enough. Route conditionally with \`when\` on a node: \`{"node": "", "field": "text", "includes": "PASS"}\` (also \`equals\`, \`matches\`, \`exists\`, and \`all\`/\`any\`/\`not\`); a node whose condition is false is \`skipped\`, its dependents still run, and its bound input arrives as null with status skipped. Ask upstream Agents for a stable verdict token in their final message so conditions can test it. Insert a human checkpoint with \`{"id": "...", "kind": "gate", "prompt": "", "dependsOn": [...]}\`; the run pauses in \`paused\` with the gate in \`waiting_approval\`, and \`wait\` does not return until a human resolves it. Only the user decides a gate: call \`approve\` or \`reject\` (with \`run_id\`, \`node_id\`, optional \`note\`) solely when the user has told you their decision. Read \`snapshot\` or \`wait\` before reporting completion; use \`retry\` or \`resume\` for interrupted work. This harness has no todo tool, no background-output poller and no cancel tool; \`iolaus_flow\` covers work that needs ordering, retry or a human gate, and a background child's result arrives as a completion notice you read by \`sessionID\`. The Iolaus DAG and session state are durable in the global \`IOLAUS_HOME/iolaus.db\` (default \`~/.iolaus/iolaus.db\`); project \`.iolaus/\` holds only plans and QA evidence. Flow creation is nonblocking. Report the run_id and remain available for the user's next message; use snapshot/node on demand, with wait only when blocking is intended. Committed gate, rescue and terminal notices enter the owner's conversation without automatically starting a turn. To forward a supplement such as "tell implement to consider fontsource", the owner calls action "steer" with run_id, node_id, text and a unique request_id, preserving the child's agent and model. Reuse that request_id only with identical node/text to inspect its receipt, never to resend. V1 accepts only active scheduled session-backed nodes after initial prompt admission; it refuses pending/starting/settled, observed, judge, gate, legacy unpinned executions, planning sessions, and Atlas/authorized-plan flows. Identity drift is reported, not restored. An unresolved delivery stops result publication; inspect the receipt and child rather than replaying input. A model failure moves the node to its next configured fallback model by switching the failed child session's model and telling it to continue, so supplements, completed tool effects and the task stay in that session; remaining attempts continue it the same way. An explicit retry starts a fresh session and is refused for a steered node; give a new flow the complete task instead. Only the global rescue.ownerModel opt-in adds one final continuation on the owner session's model after the chain and attempts are spent; the child agent stays unchanged, there is no per-flow rescue flag, and you must not change global configuration to enable it without user authorization. A spent rescue never rearms on retry, reload or amend; inspect node.rescued, node.rescue-skipped and provenance.rescue. Amend is refused while executions or unresolved deliveries remain live. -Use native read/glob/grep, shell, and the advertised edit/write/patch tools. Native read handles supported images and PDFs. Discover Code Mode tools through execute and its actual catalog. When the catalog lists \`ast_grep\`, use \`tools.ast_grep.search\` for questions about code shape (calls, declarations, imports, class members, JSX) instead of grep, \`tools.ast_grep.rewrite\` for codemods (dry-run first, then \`apply: true\`), and \`tools.ast_grep.scan\` for YAML rules; results are structured, so filter them inside the same execute call. Search text with the native grep tool (ripgrep) and find files with native glob; do not run \`grep\`, \`find\` or \`strings | grep\` through shell. Without \`ast_grep\`, use native grep and state that structural search was unavailable. Inherited \`server_tool\` names are Code Mode paths: \`context7_resolve-library-id\` / \`context7_query-docs\` are \`tools.context7["resolve-library-id"]({libraryName, query})\` then \`tools.context7["query-docs"]({libraryId, query})\` for official library docs, and \`grep_app_searchGitHub\` is \`tools.grep_app.searchGitHub({query, useRegexp, repo, path, language})\` for public GitHub code; \`websearch_exa\` means native websearch. No LSP tool exists here: \`lsp_diagnostics\` means running the project's type checker, linter, or tests on the changed files, and \`lsp_find_references\` / \`lsp_rename\` mean \`tools.ast_grep.search\` / \`tools.ast_grep.rewrite\` plus a compile check. Use any other MCP tool only when the catalog lists it. Use native skill({id}) for installed skills. If a referenced skill is absent, follow the applicable method directly and report the limitation. Prometheus plans belong in \`.iolaus/plans/\`; execution belongs in \`iolaus_flow\`, not a separate todo list. +Prometheus plans belong in \`.iolaus/plans/\`; execution belongs in \`iolaus_flow\`, not a separate todo list. + +` + +export function nativeBindings(delegate: boolean): string { + return ` +This is Iolaus on OpenCode 2. Follow your assigned role and use tools according to the current host schemas and this contract. + +${delegate ? DELEGATION : ""}Use native read/glob/grep, shell, and the advertised edit/write/patch tools. Native read handles supported images and PDFs. Discover Code Mode tools through execute and its actual catalog. When the catalog lists \`ast_grep\`, use \`tools.ast_grep.search\` for questions about code shape (calls, declarations, imports, class members, JSX) instead of grep, \`tools.ast_grep.rewrite\` for codemods (dry-run first, then \`apply: true\`), and \`tools.ast_grep.scan\` for YAML rules; results are structured, so filter them inside the same execute call. Search text with the native grep tool (ripgrep) and find files with native glob; do not run \`grep\`, \`find\` or \`strings | grep\` through shell. Without \`ast_grep\`, use native grep and state that structural search was unavailable. Inherited \`server_tool\` names are Code Mode paths: \`context7_resolve-library-id\` / \`context7_query-docs\` are \`tools.context7["resolve-library-id"]({libraryName, query})\` then \`tools.context7["query-docs"]({libraryId, query})\` for official library docs, and \`grep_app_searchGitHub\` is \`tools.grep_app.searchGitHub({query, useRegexp, repo, path, language})\` for public GitHub code; \`websearch_exa\` means native websearch. No LSP tool exists here: \`lsp_diagnostics\` means running the project's type checker, linter, or tests on the changed files, and \`lsp_find_references\` / \`lsp_rename\` mean \`tools.ast_grep.search\` / \`tools.ast_grep.rewrite\` plus a compile check. Use any other MCP tool only when the catalog lists it. Use native skill({id}) for installed skills. If a referenced skill is absent, follow the applicable method directly and report the limitation. Preserve the user's authorization and project instructions. New user messages refine ongoing work unless they explicitly pause or redirect it. Retained prompt policies are defaults, not permission grants: commits, pushes, publishing and destructive actions require authorization. Planning-only work stays within .iolaus/plans/. Verify the requested result with the available tools and report real blockers instead of calling absent tools. ` +} diff --git a/src/prompts/render.ts b/src/prompts/render.ts index b8568e3..98a0642 100644 --- a/src/prompts/render.ts +++ b/src/prompts/render.ts @@ -11,7 +11,7 @@ import { import { resolvePromptIdiom, resolvePromptLane } from "./prompt-lanes" import { buildSisyphusPromptForModel } from "./sisyphus-route" import { CATEGORY_DESCRIPTIONS, type AgentName, type CategoryName, type ModeName } from "./catalog" -import { NATIVE_BINDINGS, NATIVE_ROUTING_GATE } from "./native-bindings" +import { nativeBindings, NATIVE_ROUTING_GATE } from "./native-bindings" import { MASS_ULW_MODE_PROMPT, TEAM_DAG_MODE_PROMPT } from "./mode-dag" import { buildHephaestusPrompt } from "../omo/agents/hephaestus/gpt" @@ -31,7 +31,7 @@ export function renderAgent(name: AgentName, context: PromptContext): string { // Any model runs Hephaestus: GPT models get their tuned variant, others the generic GPT body, which names no model. return isHephaestusSupportedModel(model) ? buildDynamicHephaestusPrompt({ model, availableAgents: agents, availableSkills: skills, availableTools: tools, availableCategories: categories }) - : `${buildAgentIdentitySection("Hephaestus", "Autonomous deep worker for software engineering from OhMyOpenCode")}\n${buildHephaestusPrompt(agents, tools, skills, categories, false)}` + : `${buildAgentIdentitySection("Hephaestus", "Autonomous deep worker for software engineering")}\n${buildHephaestusPrompt(agents, tools, skills, categories, false)}` case "sisyphus-junior": return buildSisyphusJuniorPrompt(model, false) case "explore": return EXPLORE_PROMPT case "librarian": return buildLibrarianPrompt() @@ -80,7 +80,7 @@ export function renderMode(mode: ModeName, model: string, agent?: AgentName): st return loadPromptSync({ source: ultraworkPromptVariants[variant], name: mode, variant }).body } -export function bindNative(prompt: string, homeText?: string, options: { readonly routing?: boolean } = {}): string { +export function bindNative(prompt: string, homeText?: string, options: { readonly routing?: boolean; readonly delegation?: boolean } = {}): string { const routing = options.routing ? `\n\n${NATIVE_ROUTING_GATE}` : "" - return `${prompt}${routing}\n\n${NATIVE_BINDINGS}${homeText ? `\n${homeText}` : ""}` + return `${prompt}${routing}\n\n${nativeBindings(options.delegation ?? true)}${homeText ? `\n${homeText}` : ""}` } diff --git a/src/registration.ts b/src/registration.ts index 094cb19..3d4a1b1 100644 --- a/src/registration.ts +++ b/src/registration.ts @@ -156,8 +156,8 @@ export function registerModes(ctx: { editor.add({ name: mode, description: DAG_MODE_TEMPLATES[mode] - ? `Run the task as the Iolaus "${DAG_MODE_TEMPLATES[mode]}" DAG template under the retained OMO ${mode} prompt.` - : `Apply the retained OMO ${mode} prompt with native OpenCode tools.`, + ? `Run the task with the Iolaus "${DAG_MODE_TEMPLATES[mode]}" DAG template.` + : `Apply the ${mode} prompt with native OpenCode tools.`, execute: ({ sessionID, prompt, delivery }) => ctx.session.prompt({ ...prompt, sessionID, diff --git a/tests/gemini-worker-contract.test.ts b/tests/gemini-worker-contract.test.ts new file mode 100644 index 0000000..cdc8312 --- /dev/null +++ b/tests/gemini-worker-contract.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from "bun:test" +import { buildGeminiSisyphusJuniorPrompt } from "../src/omo/agents/sisyphus-junior/gemini" +import { CATEGORY_NAMES } from "../src/prompts/catalog" +import { renderAgent, renderCategory } from "../src/prompts/render" + +const absentToolCalls = /\b(?:subagent|iolaus_flow|lsp_\w+|todowrite|todoread|task_create|task_update|task_list|TaskCreate|TaskUpdate)\b/ + +for (const model of ["bryan/gemini-4-hydrogen", "bryan/gemini-4-carbon", "bryan/gemini-4-neon"]) { + test(`${model} renders the Gemini worker contract as Junior and in every category`, () => { + const worker = renderAgent("sisyphus-junior", { model }) + expect(worker).toBe(buildGeminiSisyphusJuniorPrompt(false)) + expect(worker).toContain("") + expect(worker).not.toMatch(absentToolCalls) + expect(worker).not.toContain("[\s\S]*?<\/Category_Context>/)?.[0] + expect(categoryBlock).toContain(``) + expect(rendered.replace(categoryBlock ?? "", "").trim()).toBe(worker) + expect(rendered).not.toMatch(absentToolCalls) + expect(rendered.includes("ESCALATE: deep-high")).toBe(category === "deep-low") + } + }) +} diff --git a/tests/model-role-contract.test.ts b/tests/model-role-contract.test.ts new file mode 100644 index 0000000..a3d781e --- /dev/null +++ b/tests/model-role-contract.test.ts @@ -0,0 +1,44 @@ +import { expect, test } from "bun:test" +import { buildClaudeFable5SisyphusPrompt, getOraclePromptSelection } from "../src/omo/agents" +import { bindNative, renderAgent } from "../src/prompts/render" + +test("Oracle's shared GPT advisory body does not advertise a model ID", () => { + const baseline = renderAgent("oracle", { model: "openai/gpt-5.5" }) + + for (const model of ["proxy-codex/gpt-6.2-astra", "openai/gpt-6-2-astra-fast", "azure/GPT-6.2-ASTRA"]) { + expect(getOraclePromptSelection(model)).toMatchObject({ reasoningEffort: "xhigh", textVerbosity: "high" }) + const body = renderAgent("oracle", { model }) + expect(body === baseline).toBe(true) + expect(bindNative(body)).not.toMatch(/\bgpt[- ]\d/i) + } + + expect(getOraclePromptSelection("openai/gpt-5.5").reasoningEffort).toBe("medium") + expect(renderAgent("oracle", { model: "openai/gpt-5.4" }) === baseline).toBe(false) + expect(getOraclePromptSelection("gpt-6.2-astra/unknown-model").reasoningEffort).toBeUndefined() +}) + +test("Fable aliases render the shared Sisyphus body without a model ID", () => { + const build = (model: string) => buildClaudeFable5SisyphusPrompt(model, []) + for (const model of [ + "proxy-cc/claude-fable-5-2", "amazon-bedrock/anthropic.claude-fable-5.2", + "anthropic/claude-mythos-5-2", "anthropic/claude-fable-5", + ]) { + const body = renderAgent("sisyphus", { model }) + expect(body === build(model)).toBe(true) + expect(bindNative(body)).not.toMatch(/\bclaude[- ](?:fable|mythos)[- ]\d/i) + } + + for (const model of ["anthropic/claude-sonnet-5-2", "claude-fable-5-2/unknown-model"]) { + expect(renderAgent("sisyphus", { model }) === build(model)).toBe(false) + } +}) + +test("Opus 5.5 aliases receive the dedicated addendum; adjacent lanes do not", () => { + for (const [model, hasAddendum] of [ + ["proxy-cc/claude-opus-5-5", true], ["amazon-bedrock/anthropic.claude-opus-5.5", true], + ["anthropic/claude-opus-5", false], ["anthropic/claude-sonnet-5-5", false], + ] as const) { + const prompt = bindNative(renderAgent("sisyphus", { model }), undefined, { routing: true }) + expect({ model, hasAddendum: prompt.includes("") }).toEqual({ model, hasAddendum }) + } +})