Bug 57d8a047-d26d-47ce-ae6f-bc5cb98fef0e: Opus-tier tasks 404'd because
models/claude-opus-4.yaml pinned default_flags.model to "claude-opus-4-5",
a retired ID. models/claude-sonnet-4.yaml was pinned to a dated snapshot
("claude-sonnet-4-20250514") with the same problem.
Slug strategy: the registry slug (filename / RegistryEntry.name) doubles
as the literal --model argument on the workflow-template pass-through path
(task-templates/workflow/*.yaml `model:` field -> compiler WF-COMP-18 ->
payload.runtime.model -> entrypoint/runners/claude.py `--model`), which has
no translation step through this file's default_flags. So rather than
patch default_flags.model in place (leaving the slug stale and the
pass-through bug latent), rename the slug to match the current API ID:
- models/claude-opus-4.yaml, model-registry/claude-opus-4.yaml
-> claude-opus-5.yaml (name/endpoint/default_flags.model: claude-opus-5)
- models/claude-sonnet-4.yaml, model-registry/claude-sonnet-4.yaml
-> claude-sonnet-5.yaml (claude-sonnet-5)
- model-registry/claude-haiku-4.yaml -> claude-haiku-4-5.yaml
(claude-haiku-4-5); added the previously-missing models/claude-haiku-4-5.yaml
so the claude runner can actually resolve this endpoint
- model-registry/harness-roles.yaml, model-registry/tiers.yaml,
workflows/smart-agent.yaml, task-templates/workflow/{spec,plan}-review-loop@1.yaml:
updated every claude-opus-4 / claude-sonnet-4 / claude-haiku-4 reference
to the new slugs
- models/openrouter-sonnet.yaml: dated snapshot "claude-sonnet-4-20250514"
-> "claude-sonnet-5" (third-party router proxying the same retired ID)
- refreshed cost_per_1k_tokens on the three renamed registry entries to
current published pricing
Claude-Session: https://claude.ai/code/session_015nXvGNNNixJPFwZKZHNyha
129 lines
4.6 KiB
YAML
129 lines
4.6 KiB
YAML
name: plan-review-loop
|
|
version: 1
|
|
description: Opus + MiniMax review a plan, Sonnet revises, Haiku judges clean/rework
|
|
runtime: code-sonnet-tdd-repo
|
|
input:
|
|
state: plan-drafted
|
|
tags_required: []
|
|
tags_forbidden: []
|
|
required_artifacts: [plan_doc]
|
|
output:
|
|
state: plan-reviewed
|
|
scope_budget:
|
|
wall_clock_seconds_max: 7200 # WF-ITER-7: run-level ceiling across ALL iterations —
|
|
# must be >= iterations_max * per_iteration_seconds_max
|
|
# (5 * 1200 = 6000) plus slack; NOT a per-iteration value
|
|
iterations_max: 5 # WF-SCH-19: required whenever loop is set
|
|
per_iteration_seconds_max: 1200
|
|
nodes:
|
|
- id: review-opus
|
|
kind: agent
|
|
role: plan-review # M36 v0.6 (bug 69370eda fix)
|
|
model: claude-opus-5
|
|
runtime_env:
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
prompt: |
|
|
The agent-runtimes project repo is cloned at /workspace/project.
|
|
Change to that directory before doing any work.
|
|
|
|
Review the plan document for the following concept.
|
|
|
|
**Title**: ${item.title}
|
|
|
|
**Original concept**:
|
|
${item.body}
|
|
|
|
Steps:
|
|
1. cd /workspace/project
|
|
2. Find and read the plan document referenced by this item completely
|
|
3. Review it for CRITICAL and HIGH severity issues: wrong architecture,
|
|
missing requirements, unaddressed security implications, unworkable
|
|
sequencing
|
|
4. Write your findings to /workspace/.agent-output/review-opus.md
|
|
- id: review-minimax
|
|
kind: agent
|
|
role: plan-review
|
|
model: minimax-m2
|
|
runtime_env:
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
prompt: |
|
|
The agent-runtimes project repo is cloned at /workspace/project.
|
|
Change to that directory before doing any work.
|
|
|
|
Review the plan document for the following concept.
|
|
|
|
**Title**: ${item.title}
|
|
|
|
**Original concept**:
|
|
${item.body}
|
|
|
|
Steps:
|
|
1. cd /workspace/project
|
|
2. Find and read the plan document referenced by this item completely
|
|
3. Review it for CRITICAL and HIGH severity issues: wrong architecture,
|
|
missing requirements, unaddressed security implications, unworkable
|
|
sequencing
|
|
4. Write your findings to /workspace/.agent-output/review-minimax.md
|
|
- id: improve-sonnet
|
|
kind: agent
|
|
role: plan-review
|
|
tier: coding
|
|
depends_on: [review-opus, review-minimax]
|
|
runtime_env:
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
prompt: |
|
|
The agent-runtimes project repo is cloned at /workspace/project.
|
|
Change to that directory before doing any work.
|
|
|
|
Revise the plan document for the following concept to address both
|
|
reviews left on this branch.
|
|
|
|
**Title**: ${item.title}
|
|
|
|
Steps:
|
|
1. cd /workspace/project
|
|
2. Read /workspace/.agent-output/review-opus.md and
|
|
/workspace/.agent-output/review-minimax.md
|
|
3. Revise the plan document in place to address every CRITICAL/HIGH
|
|
finding from both reviews
|
|
4. Commit the revised plan on this branch
|
|
- id: judge-haiku
|
|
kind: agent
|
|
role: plan-review
|
|
model: claude-haiku-4-5
|
|
depends_on: [improve-sonnet]
|
|
runtime_env:
|
|
AGENT_REPO_URL: "git@gitea.oreillyit.nz-ai-enablement:skynet/agent-runtimes-agents.git"
|
|
AGENT_BRANCH: "task/${item.uuid}"
|
|
prompt: |
|
|
The agent-runtimes project repo is cloned at /workspace/project.
|
|
Change to that directory before doing any work.
|
|
|
|
Judge the revised plan document for the following concept.
|
|
|
|
**Title**: ${item.title}
|
|
|
|
Steps:
|
|
1. cd /workspace/project
|
|
2. Read the revised plan document
|
|
3. Check whether every CRITICAL/HIGH finding from
|
|
/workspace/.agent-output/review-opus.md and
|
|
/workspace/.agent-output/review-minimax.md has been addressed
|
|
4. Write exactly CLEAN or NEEDS_REWORK (nothing else, no trailing
|
|
punctuation or explanation) to /workspace/.workflow/verdict
|
|
- id: judge-gate
|
|
kind: script
|
|
cmd: scripts/workflow/verdict-gate
|
|
depends_on: [judge-haiku]
|
|
loop:
|
|
body: [review-opus, review-minimax, improve-sonnet, judge-haiku, judge-gate]
|
|
condition_node: judge-gate
|
|
on_max_reached: escalate
|
|
escalation:
|
|
scope_exceeded: replan-spec-opus
|
|
loop_max_reached: replan-spec-opus # WF-SCH-19/WF-ITER-5: required whenever
|
|
# on_max_reached is "escalate" (the default)
|