From 74bf020fb0ad5bf1f9e1ed55eba9a982b7c60462 Mon Sep 17 00:00:00 2001 From: Yasyf Mohamedali Date: Mon, 5 Oct 2026 11:22:56 -0700 Subject: [PATCH] =?UTF-8?q?models:=20=E2=99=BB=EF=B8=8F=20Route=20prose=20?= =?UTF-8?q?to=20Opus=20and=20review=20lanes=20to=20sol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context: The owner's October 5, 2026 routing has Claude Opus write all prose, gpt-6.1-sol on the standard tier take astra's review, diagnosis, and sweep lanes, and Fable only the most sensitive implementation. Summary: Invert prose_spawn_gate and prose_workflow_nudge to require Opus writers, and point the review and implementation nudges at sol. Motivation: The old gate blocked Opus agents that write their own PR bodies and changelogs, and the review nudges routed finders to astra. Details: Inline tests cover opus and unpinned allows, ship-pr, codex-wrapper and non-Opus pin blocks; 106 inline cases pass and capt-hook lint is clean. Claude-Session-Id: 49027080-0f9e-407f-9742-d7f4b6726b65 --- .../builtin_packs/general/hooks/models.py | 115 +++++++++++------- .../fragments/workflow_script_header.md | 4 +- .../models/browser_delegation_nudge.md | 4 +- .../models/implementation_spawn_nudge.md | 49 ++++---- .../hooks/prompts/models/inline_edit_nudge.md | 26 ++-- .../hooks/prompts/models/prose_spawn_gate.md | 67 +++++----- .../prompts/models/prose_workflow_nudge.md | 73 ++++++----- .../models/review_routing_spawn_nudge.md | 67 +++++----- .../models/review_routing_workflow_nudge.md | 72 +++++------ tests/test_contexts.py | 2 +- 10 files changed, 247 insertions(+), 232 deletions(-) diff --git a/captain_hook/builtin_packs/general/hooks/models.py b/captain_hook/builtin_packs/general/hooks/models.py index 60d9f58b..9191dda5 100644 --- a/captain_hook/builtin_packs/general/hooks/models.py +++ b/captain_hook/builtin_packs/general/hooks/models.py @@ -61,6 +61,7 @@ INLINE_EDIT_MIN_CHARS = 400 SUSTAINED_BROWSER_CALLS = 5 BROWSER_DRIVER = re.compile(r"(?i)\b(agent-browser|playwright)\b") +CODEX_AGENTS = ("codex-wrapper", "codex:codex-wrapper", "codex-wrapper-async", "codex:codex-wrapper-async") SOURCE_FILE_GLOBS = tuple( pattern for language, patterns in LANG_GLOBS.items() if language != "md" for pattern in patterns ) @@ -132,7 +133,7 @@ class DelegatedSpawn: tag: str = "delegated_spawn" required: bool = True - unpinned_note: str = "(none — inherits the session model, fable)" + unpinned_note: str = "(none — inherits the session model, opus)" def content(self, evt: BaseHookEvent) -> str | None: if (call := evt.as_input(TaskCall)) is None or not call.prompt: @@ -158,7 +159,7 @@ def content(self, evt: BaseHookEvent) -> str | None: class ProseSpawn(DelegatedSpawn): """Gating context: the pending spawn, present only when its prompt asks to produce a prose artifact.""" - unpinned_note: str = "(none — an unpinned subagent runs opus; subagents never inherit fable)" + unpinned_note: str = "(none — an unpinned subagent runs opus)" def content(self, evt: BaseHookEvent) -> str | None: # WORKAROUND: zero-arg super() breaks under @dataclass(slots=True), which rebuilds the class. @@ -218,53 +219,69 @@ def content(self, evt: BaseHookEvent) -> str | None: deliverable_rubric=str(Prompt.load("fragments/deliverable_rubric", verdict_attr="block")), ), message=( - "Prose deliverables are written by gpt-6-astra through codex, never by a Claude subagent. " - "Spawn `subagent_type: 'codex:codex-wrapper'` with the writing brief, or state in the prompt " - "that every sentence is delegated to codex and landed verbatim." + "Prose deliverables are written by Claude Opus, never by codex, astra, sonnet, haiku, or fable. " + "Re-spawn with `model='opus'` or no `model` pin, as a Claude agent that writes the prose itself." ), contexts=[ProseSpawn()], events=Event.PreToolUse, only_if=[Tool("Agent|Task")], skip_if=[ - ToolInput("prompt", r"(?i)\b(codex|astra)\b"), + And( + Not(ToolInput("model", r"(?i)\b(sonnet|haiku|fable)\b")), + Not(ToolInput("prompt", r"(?i)\b(codex|astra)\b")), + Not(Agent(*CODEX_AGENTS)), + ), ToolInput("prompt", r"(?i)\b(classif|label|tag|categoriz|count|extract|mechanical)"), - Agent("Explore|claude-code-guide|codex-wrapper|codex:codex-wrapper"), + Agent("Explore|claude-code-guide"), ], agent=False, transcript=False, max_context=16_000, tests={ Input(model="sonnet", prompt="Write the README quickstart for this repo"): Block(), - Input(model="opus", prompt="draft the release notes for v2"): Block(), Input(model="haiku", prompt="update the CHANGELOG entry for the fix"): Block(), Input(model="fable", prompt="write the README quickstart"): Block(), - Input(prompt="write the README quickstart"): Block(), - Input(prompt="draft the release notes for v2"): Block(), + Input( + agent_type="codex:codex-wrapper", + prompt="Rewrite the README quickstart in the technical-builder voice", + ): Block(), Input( model="opus", prompt="Orchestrate the incident-retro revision: rewrite the release notes and redraft " "the guide. Every sentence is written by gpt-6-astra at xhigh via the codex skill and " "landed verbatim; you orchestrate and never write the prose yourself.", + ): Block(), + Input(model="opus", prompt="draft the release notes for v2"): Allow(), + Input(model="claude-opus-5-5", prompt="Write the README quickstart for this repo"): Allow(), + Input(prompt="write the README quickstart"): Allow(), + Input(prompt="draft the release notes for v2"): Allow(), + Input( + agent_type="ship-pr", + prompt="Write the PR description below to a body file and open the PR.\ntitle: fix retry\nbody: ...", ): Allow(), Input( - agent_type="codex:codex-wrapper", - prompt="Rewrite the README quickstart in the technical-builder voice", + agent_type="ship-pr", + model="opus", + prompt="Write the PR description below to a body file and open the PR.\ntitle: fix retry\nbody: ...", + ): Allow(), + Input( + model="opus", + prompt="Fix the import in cli.py, have the codex skill review the diff, then draft the " + "CHANGELOG entry yourself.", + llm={"block": False}, ): Allow(), Input(model="sonnet", prompt="review the README for factual errors"): Allow(), Input(model="sonnet", prompt="update the retry backoff config"): Allow(), - Input(prompt="update the retry backoff config"): Allow(), Input(model="haiku", prompt="label each README section with its Diataxis mode"): Allow(), Input(agent_type="Explore", model="sonnet", prompt="find where the README quickstart is written"): Allow(), Input(agent_type="claude-code-guide", model="sonnet", prompt="explain how the docs get updated"): Allow(), - Input(model="opus", prompt="Update the retry backoff config per the spec in docs/plan.md"): Allow(), Input( - model="opus", + model="sonnet", prompt="Fix the failing test in cli.py. Do NOT edit the CHANGELOG — a sibling owns updating it", ): Allow(), Input( - model="opus", - prompt="Fix the failing test in cli.py; do NOT edit CHANGELOG.md. Then draft the release notes.", - llm={"block": False}, + agent_type="codex:codex-wrapper", + prompt="Review the diff for correctness; return findings as file:line JSON", ): Allow(), }, ) @@ -285,8 +302,8 @@ def content(self, evt: BaseHookEvent) -> str | None: llm_nudge( Prompt.load("models/implementation_spawn_nudge"), message=( - "Implementation subagents run on `model='opus'` and repetitive N-unit sweeps on gpt-6-astra via " - "`codex:codex-wrapper`; fable is only for sensitive or error-prone code. " + "Implementation subagents run on `model='opus'` and repetitive N-unit sweeps on gpt-6.1-sol via " + "`codex:codex-wrapper`; fable is only for the most sensitive code. " "Re-spawn with that route, at `effort='high'` for a bounded change and `effort='xhigh'` otherwise." ), contexts=[DelegatedSpawn()], @@ -307,7 +324,7 @@ def content(self, evt: BaseHookEvent) -> str | None: ), Input( prompt="Convert the eleven test modules under tests/legacy/ to pytest, one per lane, per the worked example" - ): Warn(pattern="gpt-6-astra"), + ): Warn(pattern="gpt-6.1-sol"), Input(model="opus", prompt="implement the pagination endpoint in api/users.py"): Allow(), Input(model="sonnet", prompt="scan the repo for TODO markers"): Allow(), Input(agent_type="Explore", prompt="find where the config loader lives"): Allow(), @@ -319,7 +336,7 @@ def content(self, evt: BaseHookEvent) -> str | None: Prompt.load("models/inline_edit_nudge"), message=( "Sizable implementation is delegated, not edited inline on the main loop. " - "Spawn an `Agent` with `model='opus'`, or a typed `model='fable'` subagent for sensitive code, " + "Spawn an `Agent` with `model='opus'`, or a typed `model='fable'` subagent for the most sensitive code, " "and hand it this change." ), contexts=[InlineEdit()], @@ -405,7 +422,7 @@ def content(self, evt: BaseHookEvent) -> str | None: Prompt.load("models/review_routing_spawn_nudge"), label="review_routing_spawn", message=( - "Code review, security audit, and bug diagnosis route to gpt-6-astra through codex, not a Claude subagent. " + "Code review, security audit, and bug diagnosis route to gpt-6.1-sol through codex, not a Claude subagent. " "Spawn `subagent_type: 'codex:codex-wrapper'` with the self-contained question, or run `Skill(codex)` " "from the main conversation." ), @@ -425,7 +442,7 @@ def content(self, evt: BaseHookEvent) -> str | None: agent=False, transcript=False, tests={ - Input(prompt="Review the diff for correctness and concurrency issues"): Warn(pattern="gpt-6-astra"), + Input(prompt="Review the diff for correctness and concurrency issues"): Warn(pattern="gpt-6.1-sol"), Input(model="fable", prompt="Adversarially refute this finding: the retry loop is wrong"): Warn( pattern="codex" ), @@ -450,7 +467,7 @@ def content(self, evt: BaseHookEvent) -> str | None: model="opus", prompt="Synthesize the confirmed review findings and decide which to fix", ): Allow(), - Input(prompt="Audit auth/session.py for security vulnerabilities"): Warn(pattern="gpt-6-astra"), + Input(prompt="Audit auth/session.py for security vulnerabilities"): Warn(pattern="gpt-6.1-sol"), Input(prompt="Verify the input-validation change blocks path traversal"): Warn(pattern="codex"), Input(prompt="Verify the pagination change renders the last page correctly"): Allow(), Input( @@ -488,33 +505,43 @@ def content(self, evt: BaseHookEvent) -> str | None: deliverable_rubric=DELIVERABLE_NUDGE_RUBRIC, ), message=( - "Workflow prose stages are written by gpt-6-astra through codex, which no `model:` pin reaches. " - "Give the stage `agentType: 'codex:codex-wrapper'` with a self-contained writing brief." + "Workflow prose stages are written by Claude Opus, never by codex, astra, sonnet, haiku, or fable. " + "Pin each prose stage `model: 'opus'` or leave it unpinned, with no `codex:codex-wrapper` agentType." ), contexts=[ProseWorkflowScript()], events=Event.PreToolUse, only_if=[Tool("Workflow")], + skip_if=[ + And( + Not(WorkflowScript(model=r"(?i)sonnet|haiku|fable")), + Not(WorkflowScript(pattern=r"(?i)\b(codex|astra)\b")), + ) + ], max_fires=2, max_context=16_000, agent=False, transcript=False, tests={ - Input(script="steps:\n - agent: write the README intro\n model: 'sonnet'\n"): Warn(pattern="astra"), - Input(script="steps:\n - agent: write the README intro\n"): Warn(pattern="astra"), - Input(script="steps:\n - agent: write the README intro\n model: 'fable'\n"): Warn(pattern="astra"), - Input( - script="agent('Rewrite the README quickstart', {agentType: 'codex:codex-wrapper'})", - llm={"fire": False}, - ): Allow(), + Input(script="steps:\n - agent: write the README intro\n model: 'sonnet'\n"): Warn(pattern="opus"), + Input(script="steps:\n - agent: write the README intro\n model: 'fable'\n"): Warn(pattern="opus"), + Input(script="agent('Rewrite the README quickstart', {agentType: 'codex:codex-wrapper'})"): Warn( + pattern="opus" + ), + Input(script="steps:\n - agent: write the README intro\n"): Allow(), + Input(script="agent('Rewrite the README quickstart', {model: 'opus'})"): Allow(), Input(script="steps:\n - agent: fix the retry backoff\n model: 'sonnet'\n"): Allow(), Input(script="agent('Audit docs/architecture.md for stale claims', {model: 'opus'})"): Allow(), Input( - script="agent('recon the module map', {model: 'sonnet'})\n" - "// every prose stage goes to codex:codex-wrapper\n" + script="agent('recon the module map', {model: 'sonnet'})\n// every prose stage runs on opus\n" ): Allow(), Input( script="agent('Fix the import in cli.py. Do NOT edit CHANGELOG.md — a sibling owns it', {model: 'opus'})", ): Allow(), + Input( + script="agent('Review the diff for correctness', {agentType: 'codex:codex-wrapper'})\n" + "agent('Write the CHANGELOG entry for the fix', {model: 'opus'})", + llm={"fire": False}, + ): Allow(), }, ) @@ -526,7 +553,7 @@ def content(self, evt: BaseHookEvent) -> str | None: ), label="review_routing_workflow", message=( - "Workflow review, security-audit, and bug-diagnosis stages route to gpt-6-astra through codex. " + "Workflow review, security-audit, and bug-diagnosis stages route to gpt-6.1-sol through codex. " "Give each such stage `agentType: 'codex:codex-wrapper'` with the self-contained question as its prompt." ), contexts=[WorkflowScriptSource()], @@ -544,7 +571,7 @@ def content(self, evt: BaseHookEvent) -> str | None: pattern="codex" ), Input(script="agent(`Adversarially refute: ${f.title}`, {model: 'fable', effort: 'max'})"): Warn( - pattern="gpt-6-astra" + pattern="gpt-6.1-sol" ), Input( script="agent('Write a self-contained codex prompt reviewing this diff, " @@ -571,16 +598,16 @@ def content(self, evt: BaseHookEvent) -> str | None: llm={"fire": False}, ): Allow(), Input(script="agent(`Audit the login flow for auth bypass and injection; return findings as JSON`)"): Warn( - pattern="gpt-6-astra" + pattern="gpt-6.1-sol" ), Input(script="agent('Verify the CLI renders the last page correctly')"): Allow(), Input( script=( - "const astraOrOpus = async (prompt, key) => {\n" + "const solOrOpus = async (prompt, key) => {\n" " const r = await agent(prompt, { agentType: 'codex:codex-wrapper', " - "label: `${key}:astra`, phase: 'Review', schema: REVIEW })\n" - " if (r) return { ...r, lane_model: 'astra' }\n" - " log(`${key}: astra empty — opus fallback`)\n" + "label: `${key}:sol`, phase: 'Review', schema: REVIEW })\n" + " if (r) return { ...r, lane_model: 'sol' }\n" + " log(`${key}: sol empty — opus fallback`)\n" " const f = await agent(prompt, { label: `${key}:opus`, phase: 'Review', schema: REVIEW })\n" " return f ? { ...f, lane_model: 'opus' } : null\n" "}" @@ -588,7 +615,7 @@ def content(self, evt: BaseHookEvent) -> str | None: llm={"fire": False}, ): Allow(), Input( - script="export const meta = { description: 'refuter pass; astra lane unavailable — " + script="export const meta = { description: 'refuter pass; sol lane unavailable — " "opus escalation per models table' }\n" "const f = await agent(`Adversarially refute: ${finding.title}`)", llm={"fire": False}, diff --git a/captain_hook/builtin_packs/general/hooks/prompts/fragments/workflow_script_header.md b/captain_hook/builtin_packs/general/hooks/prompts/fragments/workflow_script_header.md index 8d94e07d..56987203 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/fragments/workflow_script_header.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/fragments/workflow_script_header.md @@ -1,8 +1,8 @@ Its header quotes verbatim excerpts around the script's model pins; … marks elided text within an excerpt. A header reading "excerpts around every model pin in this script" is complete: a stage not quoted there carries no pin and so -runs opus — workflow stages never inherit fable, so an unpinned stage is -opus-routed, not fable-routed. A header reading "excerpts around the first model +runs opus — workflow stages never inherit the root's model, so an unpinned stage +is opus-routed. A header reading "excerpts around the first model pins in this script" and ending in a "… [+N more model pins not excerpted]" line was capped: absence from that header no longer proves a stage is unpinned — check the script source before concluding a stage carries no pin. diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/browser_delegation_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/browser_delegation_nudge.md index b8ebb93b..d37a096c 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/browser_delegation_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/browser_delegation_nudge.md @@ -1,7 +1,7 @@ Decide whether the main agent should delegate this sustained browser automation instead of driving it inline. -The main loop runs on fable-5; this session has been driving the browser directly — +The main loop is the opus root orchestrator; this session has been driving the browser directly — a run of `agent-browser` / `playwright` calls (click, fill, snapshot, scrape, QA step) through the recent tool calls shown below. @@ -9,7 +9,7 @@ The Model Routing rubric: sustained tool-driving — browser automation, QA swee and bulk extract/fill/snapshot — belongs on opus at xhigh. Delegate it to a model='opus' subagent at effort='xhigh' to drive agent-browser and return findings. When the site needs the user's own login, use an agent-browser-with-cookies -teammate on opus at xhigh. The session's fable model does not change that route. +teammate on opus at xhigh. The root's own model does not change that route. Keep browser work inline only for a single gated, stateful, or authenticated interaction the main agent just decided to run: a go/no-go verification, one confirming screenshot, or a login+2FA flow it must hold open. diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/implementation_spawn_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/implementation_spawn_nudge.md index 413b162f..8ac8b91d 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/implementation_spawn_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/implementation_spawn_nudge.md @@ -1,6 +1,6 @@ Decide whether this delegated subagent's implementation should route off fable-5 -to opus-5, gpt-6-astra at xhigh via codex:codex-wrapper, or sonnet at xhigh for a -sweep that must stay Claude-side. +to opus-5, gpt-6.1-sol at xhigh on the standard tier via codex:codex-wrapper, or +sonnet at xhigh for a sweep that must stay Claude-side. holds the pending Agent/Task call: its model pin, agent type, and prompt. A spawn naming no model runs opus, whatever the session model. @@ -9,27 +9,26 @@ The Model Routing rubric: opus-5 is the default implementation lane at every horizon. Use high for an individual bounded, decision-light change; use xhigh for ambiguous, exploratory, decision-dense, large net-new, or long-running implementation. Repetitive bounded N-unit sweeps never run on opus: use sonnet at -xhigh when the lanes must stay Claude-side, and gpt-6-astra at xhigh through -codex:codex-wrapper otherwise. Shell-heavy execution also routes to astra at -xhigh. Orchestration, multi-phase autonomous drives, long-horizon agentic runs, -sustained tool-driving, design/architecture review, and hard planning run on opus -at xhigh. Synthesis/accept-reject over findings defaults to opus at xhigh, and -astra at xhigh is an equally accepted route. Fable-5.1 keeps one -lane: implementation of very sensitive or error-prone code, including auth, -migrations, concurrency, data loss, crypto, and subtle algorithms, reached as a -typed model='fable' subagent. A missed implementation lane crosses between opus -xhigh and astra xhigh before reaching fable. All prose/writing, code/diff review -(finder; refuter only at audit depth), security review/audit, verification of -security-sensitive code, and bug diagnosis have astra xhigh lanes handled by -separate nudges. +xhigh when the lanes must stay Claude-side, and gpt-6.1-sol at xhigh on the +standard tier through codex:codex-wrapper otherwise. Shell-heavy execution also +routes to sol at xhigh. Orchestration, multi-phase autonomous drives, +long-horizon agentic runs, sustained tool-driving, design/architecture review, +hard planning, and synthesis/accept-reject over findings run on opus at xhigh. +Fable-5.1 is reserved for the most sensitive implementation, reached as a typed +model='fable' subagent; ordinary auth, migrations, concurrency, or error-prone +code alone does not qualify. A missed implementation lane crosses between opus +xhigh and sol xhigh before reaching fable. All prose/writing runs on opus, and +code/diff review (finder; refuter only at audit depth), security review/audit, +verification of security-sensitive code, and bug diagnosis have sol xhigh lanes; +separate nudges handle both. Set fire=true only when the spawn assigns ordinary implementation or a repetitive -bounded sweep to fable without a sensitive-implementation need or a documented -escalation after opus xhigh and astra xhigh have fallen short. An unpinned -individual implementation spawn already runs opus: fire=false. Prompts that -review, plan, design, diagnose, or write prose are outside this implementation -nudge: fire=false; judge them by their own lanes. A typed fable spawn implementing -very sensitive or error-prone code is routed correctly: fire=false. When +bounded sweep to fable without a most-sensitive-implementation need or a +documented escalation after opus xhigh and sol xhigh have fallen short. An +unpinned individual implementation spawn already runs opus: fire=false. Prompts +that review, plan, design, diagnose, or write prose are outside this +implementation nudge: fire=false; judge them by their own lanes. A typed fable +spawn implementing the most sensitive code is routed correctly: fire=false. When uncertain, fire=false — the agent may have chosen fable deliberately, and a false alarm teaches it to ignore this nudge. Keep reasoning under 40 words. @@ -48,19 +47,19 @@ Exploratory, decision-dense implementation belongs on opus at xhigh. model: fable — Convert the eleven test modules under tests/legacy/ to pytest, one per lane, per the worked example. -A repetitive bounded sweep routes to gpt-6-astra at xhigh, or sonnet at xhigh if the lanes must stay Claude-side. +A repetitive bounded sweep routes to gpt-6.1-sol at xhigh, or sonnet at xhigh if the lanes must stay Claude-side. Review the diff for correctness and concurrency issues. -Code/diff finder work routes to gpt-6-astra at xhigh through the review nudge. +Code/diff finder work routes to gpt-6.1-sol at xhigh through the review nudge. Design the migration strategy for the sharded session store. Hard planning and design belong on opus at xhigh; this is outside the implementation nudge. -model: fable — Implement the token-refresh race fix in the auth middleware. -Auth plus concurrency is sensitive implementation assigned to a typed fable subagent. +model: fable — Rotate the production signing keys and re-encrypt the stored secrets without a plaintext window. +Crypto and secret handling at this stake is the most sensitive implementation, assigned to a typed fable subagent. diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/inline_edit_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/inline_edit_nudge.md index 46525d92..f2ca7d65 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/inline_edit_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/inline_edit_nudge.md @@ -1,7 +1,7 @@ Decide whether the main agent should delegate this inline edit instead of making it itself. -The main loop runs on fable-5; this pending edit is fable implementing directly. +The main loop is the opus root orchestrator; this pending edit is the root implementing directly. names the file; / hold the text being replaced and written. @@ -9,19 +9,19 @@ The Model Routing rubric: implementation defaults to a delegated model='opus' subagent at every horizon. Use high for an individual bounded, decision-light change, and xhigh for ambiguous, exploratory, decision-dense, large net-new, or long-running implementation. Repetitive bounded N-unit sweeps never run on opus: -use sonnet at xhigh when the lanes must stay Claude-side, and gpt-6-astra at xhigh -via codex:codex-wrapper otherwise. Shell-heavy execution also routes to astra at -xhigh. Very sensitive or error-prone implementation — auth, migrations, -concurrency, data loss, crypto, or subtle algorithms — goes to a typed -model='fable' subagent, never inline. For other implementation, the inline +use sonnet at xhigh when the lanes must stay Claude-side, and gpt-6.1-sol at xhigh +on the standard tier via codex:codex-wrapper otherwise. Shell-heavy execution +also routes to sol at xhigh. The most sensitive implementation goes to a typed +model='fable' subagent, never inline; ordinary auth, migrations, concurrency, or +error-prone code alone does not qualify. For other implementation, the inline carve-out covers only a small change or one bound to judgment the main agent just exercised. A missed implementation lane crosses between opus xhigh and -astra xhigh before reaching fable. +sol xhigh before reaching fable. -Set fire=true when the edit implements sensitive or error-prone code inline, or -when it is substantial ordinary implementation a subagent can own end to end. -Sensitivity requires a typed fable subagent even when the change is small or -bound to recent judgment. For other implementation, a small fix-up or a change +Set fire=true when the edit implements the most sensitive code inline, or when +it is substantial ordinary implementation a subagent can own end to end. The +most sensitive code requires a typed fable subagent even when the change is +small or bound to recent judgment. For other implementation, a small fix-up or a change bound to judgment the main agent just exercised may stay inline: fire=false. When uncertain, fire=false — the agent may be editing inline deliberately, and a false alarm teaches it to ignore this nudge. Keep reasoning under 40 words. @@ -40,8 +40,8 @@ after_edit: a two-line fix to the retry counter the agent just diagnosed. A small fix-up bound to judgment already exercised may stay inline. -after_edit: reworking the token-refresh lock in auth/middleware.py. -Auth plus concurrency requires a typed model='fable' subagent; it never stays inline. +after_edit: rewriting the key-rotation routine that re-encrypts every stored secret. +The most sensitive implementation requires a typed model='fable' subagent; it never stays inline. diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/prose_spawn_gate.md b/captain_hook/builtin_packs/general/hooks/prompts/models/prose_spawn_gate.md index 10d24bab..1ebe55e7 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/prose_spawn_gate.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/prose_spawn_gate.md @@ -1,67 +1,72 @@ -Decide whether this delegated subagent call asks a Claude model to author prose -itself without routing the writing through codex on astra. +Decide whether this delegated subagent call routes a prose deliverable to a writer +other than Claude Opus. holds the pending Agent/Task call: its model pin, agent type, and prompt, ending with the sentences a clause prefilter matched — each asks a writing verb of a prose artifact, with negated asks ("do NOT edit the docs") already screened out. Your job is precision: is a prose artifact what this subagent is -asked to PRODUCE? +asked to PRODUCE, and does a writer other than Claude Opus produce it? The Model Routing rubric: all writing a user reads — READMEs, docs, changelogs, -release notes, blog posts, PR descriptions, any user-facing text — routes to -gpt-6-astra at xhigh through the codex skill. A model: pin takes only Claude -models, so no pin, fable included, routes prose correctly. An unpinned subagent -runs opus; subagents never inherit fable. What clears a prose spawn is the route: -the spawn is the codex:codex-wrapper agent itself, or its prompt says the subagent -delegates every sentence to astra through codex and lands it verbatim. Work that -merely mentions a prose file — as a constraint ("do NOT touch the docs"), as -reading material, or as the subject of recon or review — is not prose work. +release notes, blog posts, PR descriptions, commit messages, any user-facing text +— is written by Claude Opus. An unpinned subagent runs opus, so a model='opus' pin +or no pin routes prose correctly. Prose routed anywhere else is the misroute: a +codex:codex-wrapper spawn, a prompt that hands the writing to codex, astra, or +another gpt model, or a model pin on sonnet, haiku, or fable. A subagent that only +relays prose an Opus writer already produced, landing it verbatim, is not writing +it. Work that mentions a prose file only as a constraint ("do NOT touch the +docs"), as reading material, or as the subject of recon or review is not prose +work. Codex review or diagnosis inside an Opus subagent that writes its prose +itself is not a misroute either. {deliverable_rubric} -Set block=true only when the prompt asks the subagent to write, draft, -revise, or polish a prose artifact itself on a Claude model without a codex/astra -route. A codex:codex-wrapper spawn or a prompt that delegates every sentence to -astra through codex and lands it verbatim clears the spawn: block=false. Recon, -review, classification, and code work that references docs stay allowed: +Set block=true only when the prompt asks for a prose artifact and that prose is +written by codex, astra, another gpt model, sonnet, haiku, or fable. An opus or +unpinned subagent that writes the prose itself is routed correctly: block=false. +Recon, review, classification, and code work that references docs stay allowed: block=false. When uncertain, block=false — a wrong block stops legitimate work cold. Keep reasoning under 40 words. model: sonnet — Write the README quickstart for this repo. -The subagent writes README prose itself on sonnet, with no codex route. +Sonnet writes the README prose; prose belongs on opus. -model: opus — Update CHANGELOG.md with an entry for the retry fix. -The subagent writes changelog prose itself on opus, with no codex route. +model: haiku — Update CHANGELOG.md with an entry for the retry fix. +Haiku writes the changelog prose; prose belongs on opus. model: fable — Polish the blog post announcing the new CLI. -Fable is the sensitive-implementation lane, not the writing lane; the prompt names no codex route. +Fable is reserved for the most sensitive implementation, not writing; prose belongs on opus. -model: (none) — Draft the release notes for v2. -An unpinned subagent runs opus and writes the prose itself, with no codex route. +subagent_type: codex:codex-wrapper — Rewrite the README. +The codex agent hands the README to a gpt model; prose belongs on opus. - -model: opus — Orchestrate the incident-retro revision. Every sentence of prose is written by gpt-6-astra at xhigh via the codex skill and landed verbatim; you orchestrate and never write the prose yourself. -The spawn routes the writing onward to astra through codex; it does not author it. + +model: opus — Orchestrate the incident-retro revision. Every sentence of prose is written by gpt-6-astra at xhigh via the codex skill and landed verbatim. +The opus subagent routes the writing to astra; it should write the prose itself. -subagent_type: codex:codex-wrapper — Rewrite the README. -The spawn is the codex agent that reaches the astra writing lane. +model: opus — Draft the release notes for v2. +Opus writes the prose itself. -model: opus — Fix the failing test in cli.py. Do NOT edit CHANGELOG.md — a sibling owns it. -CHANGELOG is a constraint, not the deliverable; this is code work. +model: opus — Fix the import in cli.py, have the codex skill review the diff, then draft the CHANGELOG entry yourself. +Codex only reviews; the opus subagent writes the changelog itself. -model: sonnet — Explore the cc-interact building blocks and report where the docs pipeline is written. -Recon mentions docs but asks for no prose artifact. +model: sonnet — Fix the failing test in cli.py. Do NOT edit CHANGELOG.md — a sibling owns it. +CHANGELOG is a constraint, not the deliverable; this is code work. model: sonnet — Review the README draft for factual errors and list them. The subagent reports review findings; it does not write or revise the README. + +subagent_type: codex:codex-wrapper — Review the diff for correctness; return findings as file:line JSON. +Code review returns findings data, not prose. + diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/prose_workflow_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/prose_workflow_nudge.md index 81a812f7..3fe63079 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/prose_workflow_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/prose_workflow_nudge.md @@ -1,72 +1,67 @@ -Decide whether this workflow script asks a stage to author prose itself on a -Claude model without routing the writing through codex on astra. +Decide whether this workflow script routes a stage's prose deliverable to a writer +other than Claude Opus. holds the pending Workflow call's script source. {workflow_script_header} The header is followed by the sentences a clause prefilter matched: each asks a writing verb of a prose artifact, with negated asks ("do NOT edit CHANGELOG.md") already screened out. Your job is precision: does any stage have prose as its own -deliverable, and does it author that prose on a Claude model without a codex/astra -route? +deliverable, and does a writer other than Claude Opus produce it? The Model Routing rubric: all writing a user reads — READMEs, docs, changelogs, -release notes, blog posts, announcements, any user-facing text — routes to -gpt-6-astra at xhigh through the codex skill. A stage's deliverable is prose when -its agent() prompt asks it to write, draft, revise, or polish such an artifact. -That stage must carry agentType: 'codex:codex-wrapper', or its prompt must delegate -every sentence onward to astra through codex and land it verbatim. A model: pin -never clears it: model: takes only Claude models, fable included. An unpinned -stage runs opus. Prose keywords appearing as a constraint ("do NOT edit -CHANGELOG.md"), an ownership note, a file a stage merely reads, a meta.description, -or prose the orchestrator script assembles itself outside any agent() call are -not a stage's deliverable. +release notes, blog posts, announcements, any user-facing text — is written by +Claude Opus. A stage's deliverable is prose when its agent() prompt asks it to +write, draft, revise, or polish such an artifact. That stage carries +model: 'opus' or no model pin, since an unpinned stage runs opus. Prose routed +anywhere else is the misroute: agentType: 'codex:codex-wrapper', a prompt that +hands the writing to codex, astra, or another gpt model, or a model: pin on +sonnet, haiku, or fable. Prose keywords appearing as a constraint ("do NOT edit +CHANGELOG.md"), an ownership note, a file a stage merely reads, a +meta.description, or prose the orchestrator script assembles itself outside any +agent() call are not a stage's deliverable. A codex:codex-wrapper stage that +reviews or diagnoses code is not a prose stage. {deliverable_rubric} -Set fire=true when at least one agent() call asks a Claude model to author a -prose artifact itself without a codex/astra route. A stage carrying -agentType: 'codex:codex-wrapper' or a prompt that delegates every sentence to -astra through codex and lands it verbatim is routed correctly. If every stage -with a prose deliverable has that route, or no stage has a prose deliverable, -set fire=false. When uncertain, fire=false — a false alarm teaches the agent to -ignore this nudge. Keep reasoning under 40 words and name the offending stage. +Set fire=true when at least one agent() call routes a prose artifact to codex, +astra, another gpt model, sonnet, haiku, or fable. If every stage with a prose +deliverable runs on opus, pinned or unpinned, or no stage has a prose +deliverable, set fire=false. When uncertain, fire=false — a false alarm teaches +the agent to ignore this nudge. Keep reasoning under 40 words and name the +offending stage. -agent('Write the README quickstart section for the new CLI', {model: 'opus'}) -The quickstart stage writes README prose itself on opus, with no codex route. - - agent('Draft the docs-site page for the new CLI', {model: 'sonnet'}) -The docs-page stage writes prose itself on sonnet, with no codex route. +The docs-page stage writes prose on sonnet; prose belongs on opus. agent('Polish the release announcement', {model: 'fable'}) -The announcement stage writes prose itself; fable is the sensitive-implementation lane, not the writing lane. +The announcement stage writes prose on fable, which is reserved for the most sensitive implementation. -agent('Fix the CLI error handling', {label: 'fix:cli', model: 'opus'}) alongside agent('Reword the troubleshooting guide and CHANGELOG bullet', {label: 'fix:docs'}) -The fix:docs stage has no pin, so it runs opus and writes prose itself without a codex route. +agent('Write the README quickstart section for the new CLI', {agentType: 'codex:codex-wrapper'}) +The quickstart stage hands README prose to a gpt model through codex; prose belongs on opus. -agent('Write the README quickstart section for the new CLI', {agentType: 'codex:codex-wrapper'}) -The quickstart stage routes its writing through the codex agent to astra. +agent('Write the README quickstart section for the new CLI', {model: 'opus'}) +The quickstart stage writes README prose on opus. -agent('Orchestrate the incident-retro revision. Delegate every sentence to gpt-6-astra at xhigh via the codex skill and land it verbatim.', {model: 'opus'}) -The incident-retro stage routes the writing onward; it does not author the prose. +agent('Fix the CLI error handling', {label: 'fix:cli', model: 'sonnet'}) alongside agent('Reword the troubleshooting guide and CHANGELOG bullet', {label: 'fix:docs'}) +The fix:docs stage has no pin, so it runs opus; fix:cli is code work. -agent('Fix the failing import in cli.py. Do NOT edit CHANGELOG.md — a sibling owns it', {model: 'opus'}) -CHANGELOG appears only as a constraint; the stage's deliverable is a code fix. +agent('Review the diff for correctness', {agentType: 'codex:codex-wrapper'}) then agent('Write the CHANGELOG entry for the fix', {model: 'opus'}) +Codex reviews code; the changelog stage writes prose on opus. -meta: {description: 'verify the doc claims against actual behavior'}, then agent('run the test matrix', {model: 'opus'}) -The prose keywords appear in meta.description; the stage runs tests. +agent('Fix the failing import in cli.py. Do NOT edit CHANGELOG.md — a sibling owns it', {model: 'sonnet'}) +CHANGELOG appears only as a constraint; the stage's deliverable is a code fix. -agent('fix the three failing tests', {model: 'opus'}), then the script itself assembles CHANGELOG.md from the results -The orchestrator assembles the prose outside agent(); the stage only fixes tests. +meta: {description: 'verify the doc claims against actual behavior'}, then agent('run the test matrix', {model: 'sonnet'}) +The prose keywords appear in meta.description; the stage runs tests. agent('Read docs/architecture.md and list stale sections', {model: 'sonnet'}) diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_spawn_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_spawn_nudge.md index 0edda273..462667dc 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_spawn_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_spawn_nudge.md @@ -1,55 +1,50 @@ Decide whether this delegated subagent runs code/diff review, security review/audit or verification of security-sensitive code, or bug diagnosis that -belongs on gpt-6-astra at xhigh through codex:codex-wrapper. +belongs on gpt-6.1-sol at xhigh on the standard tier through codex:codex-wrapper. holds the pending Agent/Task call: its model pin, agent type, and prompt. A spawn naming no model runs opus, whatever the session model. -The Model Routing rubric: code/diff review is astra's finder lane; add a refuter +The Model Routing rubric: code/diff review is sol's finder lane; add a refuter only at audit depth. Security review/audit, verification of security-sensitive code (auth, input validation, crypto, secrets), and bug diagnosis also route to -gpt-6-astra at xhigh. Spawn agent type 'codex:codex-wrapper' with the -self-contained question as its prompt; use Skill(codex) from the main +gpt-6.1-sol at xhigh on the standard tier. Spawn agent type 'codex:codex-wrapper' +with the self-contained question as its prompt; use Skill(codex) from the main conversation. A Claude-model spawn that asks its agent to run the codex skill is -the retired wrapper shape. Design/architecture review and approach judgment -belong on opus at xhigh. Synthesis/accept-reject over findings defaults to opus at -xhigh, and astra at xhigh through codex:codex-wrapper is an equally accepted -route. All prose/writing routes to astra at xhigh; reading a prose artifact does -not make it code review. -Security-sensitive implementation goes directly to a typed model='fable' -subagent and is outside this review nudge. For review or diagnosis, escalate an -astra miss to opus at xhigh. Fable is available only after opus at xhigh has -actually fallen short on that work. +the retired wrapper shape. Design/architecture review, approach judgment, and +synthesis/accept-reject over findings belong on opus at xhigh. All prose/writing +runs on opus; reading a prose artifact does not make it code review. The most +sensitive implementation goes directly to a typed model='fable' subagent and is +outside this review nudge. For review or diagnosis, escalate a sol miss to opus +at xhigh. Fable is never a review or diagnosis lane. -Set fire=true when an astra-lane review or diagnosis runs on a Claude model -without the required prior attempt, or when a Claude-model spawn asks its agent -to run the codex skill itself. The retired wrapper shape stays fire=true even -when called an escalation. A codex:codex-wrapper spawn at xhigh is routed -correctly: fire=false. An opus xhigh escalation after a stated astra miss, or a -fable escalation after a stated opus xhigh miss, is allowed: fire=false. An astra -miss alone does not clear a fable spawn. Design review, prose review, and -implementation are outside this nudge: fire=false; their own lanes still apply. -Synthesis/accept-reject is outside it on either of its routes: an opus spawn and a -codex:codex-wrapper astra spawn are both fire=false. When uncertain, fire=false — -the agent may have chosen the route deliberately, and a false alarm teaches it to -ignore this nudge. Keep reasoning under 40 words. +Set fire=true when a sol-lane review or diagnosis runs on a Claude model without +a stated sol miss, when it runs on fable, or when a Claude-model spawn asks its +agent to run the codex skill itself. The retired wrapper shape stays fire=true +even when called an escalation. A codex:codex-wrapper spawn is routed correctly: +fire=false. An opus xhigh escalation after a stated sol miss is allowed: +fire=false. Design review, prose review, and implementation are outside this +nudge: fire=false; their own lanes still apply. Synthesis/accept-reject is +outside it on any route: fire=false. When uncertain, fire=false — the agent may +have chosen the route deliberately, and a false alarm teaches it to ignore this +nudge. Keep reasoning under 40 words. model: fable — Review the diff for correctness and concurrency issues; report findings as JSON. -Code/diff finder work belongs on gpt-6-astra at xhigh via codex:codex-wrapper. +Code/diff finder work belongs on gpt-6.1-sol at xhigh via codex:codex-wrapper. model: fable — At audit depth, adversarially refute this finding: the retry loop double-increments the counter. -An audit-depth code refuter belongs on gpt-6-astra at xhigh; other review depths use a finder only. +An audit-depth code refuter belongs on gpt-6.1-sol at xhigh; other review depths use a finder only. Diagnose why the exporter hangs when two workers flush concurrently. -An unpinned spawn runs opus; bug diagnosis starts on gpt-6-astra at xhigh. +An unpinned spawn runs opus; bug diagnosis starts on gpt-6.1-sol at xhigh. You are a low-cost wrapper: write a self-contained codex prompt reviewing this diff, then run the codex skill. -The retired wrapper shape: spawn codex:codex-wrapper with the question and use astra at xhigh. +The retired wrapper shape: spawn codex:codex-wrapper with the question to reach sol at xhigh. Judge these three sharding designs and recommend one. @@ -57,31 +52,31 @@ Design/architecture judgment belongs on opus at xhigh and is outside this code-r Synthesize the confirmed findings and decide which to fix before release. -Synthesis/accept-reject defaults to opus at xhigh. +Synthesis/accept-reject belongs on opus at xhigh. agentType: codex:codex-wrapper — Synthesize the confirmed review findings and decide which to fix. -Synthesis/accept-reject on astra at xhigh is an accepted route, not a misroute. +Synthesis/accept-reject is outside this nudge on any route. Review the README draft for factual errors. -Prose review is outside this code-review nudge; any prose revisions route to astra at xhigh. +Prose review is outside this code-review nudge; any prose revisions run on opus. Audit the session-token handling in auth/middleware.py for vulnerabilities. -Security review/audit belongs on gpt-6-astra at xhigh via codex:codex-wrapper. +Security review/audit belongs on gpt-6.1-sol at xhigh via codex:codex-wrapper. Verify the new input-validation layer rejects path traversal and injection payloads. -Verification of security-sensitive code belongs on gpt-6-astra at xhigh. +Verification of security-sensitive code belongs on gpt-6.1-sol at xhigh. model: fable — Implement mitigations for the security-audit findings in auth.py. -Security-sensitive implementation belongs on a typed fable subagent and is outside this review nudge. +Implementation is outside this review nudge; the implementation lane judges the fable pin. model: opus, effort: xhigh — Escalation: the codex:codex-wrapper review returned no findings despite the reproduced double-close in pool.go. Re-review src/pool.go and report findings as file:line JSON. -A stated astra miss permits opus at xhigh; fable requires an actual opus xhigh miss first. +A stated sol miss permits opus at xhigh. diff --git a/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_workflow_nudge.md b/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_workflow_nudge.md index 81b38477..1872531b 100644 --- a/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_workflow_nudge.md +++ b/captain_hook/builtin_packs/general/hooks/prompts/models/review_routing_workflow_nudge.md @@ -1,88 +1,82 @@ Decide whether this workflow script runs code/diff review, security review/audit, verification of security-sensitive code, or bug diagnosis stages outside their -gpt-6-astra xhigh lane. +gpt-6.1-sol xhigh lane. holds the pending Workflow call's script source. {workflow_script_header} -The Model Routing rubric: code/diff review is astra's finder lane, with a refuter +The Model Routing rubric: code/diff review is sol's finder lane, with a refuter only at audit depth. Security review/audit, verification of security-sensitive code (auth, input validation, crypto, secrets), and bug diagnosis also route to -gpt-6-astra at xhigh. Give each stage agentType: 'codex:codex-wrapper' and a -self-contained question as its prompt, including the files or diff to inspect. -A Claude-model stage that asks its agent to run the codex skill is the retired -wrapper shape. Design/architecture review runs on opus at xhigh. -Synthesis/accept-reject over findings defaults to opus at xhigh, and astra at -xhigh through codex:codex-wrapper is an equally accepted route. -An unpinned stage runs opus; it never inherits the -session model. An astra miss permits escalation to opus at xhigh. Fable requires -an actual opus xhigh miss on that work first, except for security-sensitive -implementation, which goes directly to a typed model='fable' subagent. +gpt-6.1-sol at xhigh on the standard tier. Give each stage agentType: +'codex:codex-wrapper' and a self-contained question as its prompt, including the +files or diff to inspect. A Claude-model stage that asks its agent to run the +codex skill is the retired wrapper shape. Design/architecture review and +synthesis/accept-reject over findings run on opus at xhigh. An unpinned stage +runs opus; it never inherits the session model. A sol miss permits escalation to +opus at xhigh. Fable is never a review or diagnosis lane. {deliverable_rubric} -Set fire=true when an astra-lane review or diagnosis stage runs on a Claude model -before the required prior attempt. A stage that asks a Claude model to run the -codex skill itself stays fire=true, including in a fallback branch. Stages -routed through codex:codex-wrapper to astra at xhigh, and design or synthesis -stages on opus at xhigh, are routed correctly: fire=false. A synthesis or -accept-reject stage is never a finding on either route, opus or -codex:codex-wrapper. An opus xhigh review -or diagnosis stage reached only after an astra stage for the same work returns -nothing is an allowed escalation: fire=false. A fable escalation requires an -opus xhigh attempt to have fallen short first. A feature flag or input check -does not establish an escalation; trace whether the review call runs before, -instead of, or only after the required attempt. Accept a stated prior failure -in meta or comments for the work it names, even when that attempt is outside -the script: "astra lane quota-dead; opus xhigh escalation" clears an opus -stage, but fable requires a stated opus xhigh miss. Judge unrelated stages +Set fire=true when a sol-lane review or diagnosis stage runs on a Claude model +before a sol attempt for the same work, or runs on fable. A stage that asks a +Claude model to run the codex skill itself stays fire=true, including in a +fallback branch. Stages routed through codex:codex-wrapper, and design or +synthesis stages on opus at xhigh, are routed correctly: fire=false. A synthesis +or accept-reject stage is never a finding on any route. An opus xhigh review or +diagnosis stage reached only after a sol stage for the same work returns nothing +is an allowed escalation: fire=false. A feature flag or input check does not +establish an escalation; trace whether the review call runs before, instead of, +or only after the sol attempt. Accept a stated prior failure in meta or comments +for the work it names, even when that attempt is outside the script: "sol lane +quota-dead; opus xhigh escalation" clears an opus stage. Judge unrelated stages separately. When uncertain, fire=false — a false alarm teaches the agent to ignore this nudge. Keep reasoning under 40 words and name the offending stage. agent(`Sweep the diff for go-correctness issues; return findings as JSON`) -An unpinned finder runs opus; use gpt-6-astra at xhigh via codex:codex-wrapper. +An unpinned finder runs opus; use gpt-6.1-sol at xhigh via codex:codex-wrapper. findings.map(f => agent(`At audit depth, adversarially refute: ${f.title}`, {effort: 'xhigh'})) -Audit-depth refuters belong on gpt-6-astra at xhigh via codex:codex-wrapper. +Audit-depth refuters belong on gpt-6.1-sol at xhigh via codex:codex-wrapper. agent('Write a self-contained codex prompt reviewing this diff, then run the codex skill', {model: 'sonnet', effort: 'low'}) -The retired wrapper shape: use agentType: 'codex:codex-wrapper' to reach astra at xhigh. +The retired wrapper shape: use agentType: 'codex:codex-wrapper' to reach sol at xhigh. agent(`Review the diff hunks in src/ for correctness; return findings as JSON`, {agentType: 'codex:codex-wrapper', effort: 'xhigh'}) -The finder routes through codex:codex-wrapper to gpt-6-astra at xhigh. +The finder routes through codex:codex-wrapper to gpt-6.1-sol at xhigh. agent(`Synthesize the confirmed findings and decide which to fix`, {model: 'opus', effort: 'xhigh'}) -Synthesis/accept-reject defaults to opus at xhigh. +Synthesis/accept-reject runs on opus at xhigh. agent(`Synthesize the confirmed findings and decide which to fix`, {agentType: 'codex:codex-wrapper', effort: 'xhigh'}) -Synthesis/accept-reject on astra at xhigh is an accepted route, not a misroute. +Synthesis/accept-reject is never a finding on any route. const r = await agent(q, { agentType: 'codex:codex-wrapper', effort: 'xhigh', phase: 'Review', schema: REVIEW }) if (r) return r -log('astra empty — opus fallback') +log('sol empty — opus fallback') return await agent(q, { effort: 'xhigh', phase: 'Review', schema: REVIEW }) -The unpinned Review call runs opus at xhigh only after astra returns nothing; this is the allowed escalation. +The unpinned Review call runs opus at xhigh only after sol returns nothing; this is the allowed escalation. -export const meta = { name: 'p1-astra-review', description: 'Opus finder+refuter at audit depth over the landed P1 commit (astra lane quota-dead; opus xhigh escalation per models table)', phases: [{ title: 'Review' }] } +export const meta = { name: 'p1-review', description: 'Opus finder+refuter at audit depth over the landed P1 commit (sol lane quota-dead; opus xhigh escalation per models table)', phases: [{ title: 'Review' }] } const f = await agent(`Review the landed diff for correctness; findings as JSON`, { effort: 'xhigh', label: 'find:opus', phase: 'Review', schema: REVIEW }) -The meta states a prior astra failure; the unpinned stage runs opus at xhigh for that work. +The meta states a prior sol failure; the unpinned stage runs opus at xhigh for that work. const findings = await agent(`Review the diff in src/ for correctness; findings as JSON`, {model: 'fable'}) -An unconditional fable review lacks the required prior attempts; route the finder to astra at xhigh via codex:codex-wrapper. +Fable is never a review lane; route the finder to gpt-6.1-sol at xhigh via codex:codex-wrapper. agent(`Audit the auth flow for injection and session-fixation issues; return findings as JSON`) -An unpinned audit runs opus; security review/audit belongs on gpt-6-astra at xhigh via codex:codex-wrapper. +An unpinned audit runs opus; security review/audit belongs on gpt-6.1-sol at xhigh via codex:codex-wrapper. diff --git a/tests/test_contexts.py b/tests/test_contexts.py index 83e3338c..063567a6 100644 --- a/tests/test_contexts.py +++ b/tests/test_contexts.py @@ -362,7 +362,7 @@ def test_mixed_prompt_keeps_the_positive_ask(self) -> None: def test_path_tokens_and_mere_mentions_do_not_match(self) -> None: assert not prose_deliverable_sentences("Update the retry backoff config per the spec in docs/plan.md") assert not prose_deliverable_sentences("Audit docs/architecture.md for stale claims") - assert not prose_deliverable_sentences("all prose stays with the main agent on fable") + assert not prose_deliverable_sentences("all prose stays with the main agent on opus") assert not prose_deliverable_sentences("review the README for factual errors")