name: replan-spec-opus version: 1 description: Re-draft a spec from the concept and review findings, Opus (escalation from spec-draft-opus scope_exceeded) runtime: spec-writing-opus-repo input: state: idea tags_required: [] tags_forbidden: [security-sensitive] required_artifacts: [] output: state: spec-draft scope_budget: files_modified_max: 5 lines_diff_max: 300 wall_clock_seconds_max: 3600 nodes: - id: agent kind: agent template: spec-writing-opus-repo model: opus prompt: | The agent-runtimes project repo is cloned at /workspace/project. Change to that directory before doing any work. The prior spec-drafting attempt for this concept (spec-draft-opus, an airouter model) was rejected as unsalvageable or exceeded its scope budget. You are the Opus escalation — re-draft the spec from the original concept, taking into account any review findings already recorded for this item (check the item's workflow history and any prior /workspace/.agent-output/review.md content on the work branch for what was flagged). **Title**: ${item.title} ${item.body} Steps: 1. cd /workspace/project 2. Read existing specs in spec/ to understand the format 3. Read any prior review findings available for this item and address them directly in the new draft 4. Create a slug from the title (lowercase, hyphens instead of spaces) 5. Write the spec to spec/.md following the project spec format 6. git add spec/.md && git commit -m "spec: opus re-draft ${item.title}" && git push 7. Call task_complete with a one-sentence summary The spec should have numbered requirement IDs, clear acceptance criteria, and error handling. Follow the format of existing specs in spec/. Note: this is an escalation path guarded by the trigger engine's loop guards (cooldown + max fires/hour per spec/workflow-triggers.md WT-LOOP) — do not assume unlimited re-draft attempts. Produce your best draft on this pass; the normal review loop (review-spec-arch-opus) re-runs against your output.