One planner.
One red team.
One emit.
Cast is the fastest Anneal variant. A single Prometheus call, a single Momus audit, three parallel Red-Team adversaries, Oracle synthesis, Hephaestus validation, Atlas emission. Linear, single-pour, purpose-built for tasks where the spec is clear.
/anneal-cast:anneal "<task>"
Nine agents. One direction.
Agents 5, 6, 7 fan out in parallel in a single assistant message. Every other agent runs synchronously. The pipeline is linear in time except for the red-team burst at stage 5. Parallelism is load-bearing — dispatch all three in one message, neverrun_in_background: true.
The linear nine.
| # | Agent | Role | Model | Output |
|---|---|---|---|---|
| 1 | Probe (scout/explore) | Enumerate files, skills, docs | sonnet | Probe report (≤60 lines) |
| 2 | Metis | Pre-plan consultant, flags ambiguity | opus | Envelope: verdict, directives, clarifying questions |
| 3 | Prometheus-Cast | Planner — writes the plan in one pass | opus | plan.md + phase-NN-*.md files |
| 4 | Momus | Post-plan reviewer, ruthless audit | opus | Envelope: verdict, findings, demand-list |
| 5 | Red-Team-Security | Adversary — security attack surface | sonnet | Envelope: verdict, attack vectors, mitigations |
| 6 | Red-Team-Scope | Adversary — scope creep, undefined terms | sonnet | Envelope: verdict, scope drift, contracts to pin |
| 7 | Red-Team-Assumptions | Adversary — unstated dependencies | sonnet | Envelope: verdict, assumption register |
| 8 | Oracle | Architecture synthesizer, bird's-eye verdict | opus | Envelope: release coherence, deployment risk, breaking changes |
| 9 | Hephaestus | Functional validator, builds real artifact | sonnet | PASS/FAIL with evidence |
| — | Atlas | Emitter — XML + plan directory | sonnet | cast-{run_id}.xml + plan/ + rollup.yaml |
Cheap. Deterministic. Fast.
| Metric | Value |
|---|---|
| Agent spawns per successful run | ~8 |
| Wall-clock per run | ~4 min |
| Worst case (3 re-loops) | ~12 min |
| Token cost (Opus pricing) | ~$0.35 per successful run |
| Disk usage per run | ~2–5 MB |
| vs Alloy (N=5) | ~5× cheaper |
| vs Temper (depth=3) | ~3× cheaper |
The cost delta between Cast and Alloy/Temper is the budget you're spending for breadth (Alloy) or depth (Temper) when Cast's single pass isn't enough.
Three real invocations.
Example 1 — Ship user authentication with OAuth2
/anneal-cast:anneal "Ship user authentication with OAuth2 (Google + GitHub providers), magic-link fallback, session persistence in Postgres, and a /logout endpoint that invalidates server-side"
Classification: new-feature with a clear spec. Cast handles this well — the acceptance criteria are explicit, the integration points are named, no ambiguity for Metis to escalate.
verdict: SAFErelease_coherence: Phases 0-5 ship in order; no backwards-incompatible breaks.deployment_risk:- OAuth secrets must live in env vars before phase 0 runs; add a preflight.- Rate-limit magic-link endpoint or phase 3 introduces a spam vector.breaking_changes:- None within the auth boundary. Downstream services that read a custom session cookie will need to migrate in a follow-up — tracked in plan.md § "Out of Scope".monitoring_recommendations:- Alarm on /logout 5xx rate > 1% — likely session store degradation.- Track callback failures by provider — uneven rates indicate config drift.
Example 2 — PostgreSQL schema tenant isolation migration
/anneal-cast:anneal "Migrate the PostgreSQL schema to add a tenant_id column on users, orders, and products, backfill from current organization_id, and add a row-level security policy that filters by tenant_id on every read"
Classification: infra-change with high deployment risk. Cast is a good fit because the scope is bounded (three tables, one column, one RLS policy), but Momus will be strict and Oracle will flag deployment-risk specifics.
verdict: CAUTIONfindings:- issue: backfill without a migration windowseverity: highdemand: "Phase the migration: add column NULLable → backfill in batches → mark NOT NULL → add RLS policy. Single-transaction migration will lock tables."- issue: RLS policy without a session variableseverity: criticaldemand: "Every connection must SET app.current_tenant_id before any query. Add a connection-pool hook in Phase N."- issue: existing queries do not carry tenant contextseverity: highdemand: "Add a codebase sweep phase: rg 'FROM users' should produce zero hits that don't pass through the tenant-aware repository."
Example 3 — Stripe webhook handler with idempotency
/anneal-cast:anneal "Build a Stripe webhook handler at POST /api/webhooks/stripe that verifies the signature, processes charge.succeeded and charge.refunded events, is idempotent by event ID, and persists event processing state to Postgres"
Why Cast earns its keep here: Three parallel Red-Team adversaries each find distinct failure modes.
# redteam-security-envelope.yamlverdict: RISKYattack_vectors:- Missing signature verification → replay attack- Signature verification without constant-time compare → timing leak- Event body read after verification fails → downstream injectionmitigations_demanded:- Use stripe.webhooks.constructEvent() with raw body- Reject events where header is missing, malformed, or stale (>5min)- Log and drop; do NOT respond with error detail# redteam-scope-envelope.yamlverdict: CAUTIONscope_drift:- "charge.succeeded and charge.refunded" is underspecified — also need dispute.created, charge.failed, payment_intent.payment_failed- Idempotency means storing event IDs forever; document retention policy# redteam-assumptions-envelope.yamlverdict: SAFEassumption_register:- Assumes Postgres is reachable from the handler — add a liveness probe- Assumes Stripe signing secret is in env — add preflight check in phase 0- Stripe does NOT guarantee event delivery order
Cast vs Alloy vs Temper.
| Situation | Use |
|---|---|
| Spec is clear, task is bounded, deadline is short | Cast |
| Bug fix with a known root cause | Cast |
| Scoped refactor (rename, split, move) | Cast |
| Feature with a standard integration shape (OAuth, webhooks, CRUD) | Cast |
| Plan shape is non-obvious, multiple reasonable approaches exist | Alloy |
| Greenfield architecture for a novel problem | Alloy |
| High-stakes, low-reversibility decision | Alloy at --versions 7 |
| Task is well-scoped but iteration improves the plan | Temper |
| Each rewrite should learn from adversarial critique | Temper |
| Auth unification, event bus redesign, convergence-friendly | Temper |
| You're still learning the shape of the problem | Start with Cast; upgrade if re-loop >2× |
Cast has failure modes. Know them.
- Single-point failure at PrometheusIf the one planner hallucinates a dependency or misreads the probe, Cast has no second opinion. For high-stakes work, use Alloy — the tournament surfaces exactly this kind of error via bias disagreement.
- No learning across re-loopsCast's re-loop folds failures into Metis directives, but each retry is still a single Prometheus pass. Temper's deepen loop, by contrast, rewrites the plan with the prior plan and its score as input.
- Red-team parallelism is load-bearingDispatch all three adversaries in one message. Setting run_in_background: true is the most common mistake — it makes dispatches fire-and-forget and the pipeline stops waiting on them.
- Hephaestus needs a real buildable artifactPlans whose Phase 0 is purely design ('write an ADR') cannot be validated. Let Hephaestus validate the fixtures or the first phase that produces code instead.
- Worst-case latency is 3× typicalThree re-loops stack to ~12 min. If you hit that, re-run through Alloy or Temper instead of fighting Cast.
Every Cast run writes these files.
| File | Contents | Who reads it |
|---|---|---|
cast-{run_id}.xml | Opus 4.7 semantic-XML one-shot prompt | Paste into a fresh Claude Code session to execute the plan |
plan/plan.md | Overview, phase index, scope, out-of-scope | Humans reviewing the plan |
plan/phase-NN-*.md | Per-phase: steps, files touched, success criteria, risk | Engineer executing a phase |
rollup.yaml | All envelopes aggregated, emission decision, iteration count | Post-run autopsy, benchmarking |
reviews/metis-envelope.yaml | Metis's directives and clarifying questions | Debugging why Prometheus made a choice |
reviews/momus-envelope.yaml | Momus's demand list | The strongest critique signal in the run |
reviews/redteam-*-envelope.yaml | One file per adversary | Threat modeling, attack surface review |
reviews/oracle-envelope.yaml | Release coherence, deployment risk, breaking changes | Ops-ready summary |
evidence/hephaestus-* | Real build logs, runtime captures, screenshots | Proof the plan actually works |
"Cast is the variant you should install first and reach for most often. Save Alloy for genuinely novel architecture. Save Temper for tasks where each rewrite must learn from the last."— cast deep-dive