Skip to main content
Anneal · Cast · Linear · Single-pour

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.

invokeCast
/anneal-cast:anneal "<task>"

Nine agents. One direction.

ProbescanMetisenrichPrometheusplanMomusauditRed-Team ×3parallelOraclesynthHephaestusvalidateAtlasemitfan-out in one message

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.

#AgentRoleModelOutput
1Probe (scout/explore)Enumerate files, skills, docssonnetProbe report (≤60 lines)
2MetisPre-plan consultant, flags ambiguityopusEnvelope: verdict, directives, clarifying questions
3Prometheus-CastPlanner — writes the plan in one passopusplan.md + phase-NN-*.md files
4MomusPost-plan reviewer, ruthless auditopusEnvelope: verdict, findings, demand-list
5Red-Team-SecurityAdversary — security attack surfacesonnetEnvelope: verdict, attack vectors, mitigations
6Red-Team-ScopeAdversary — scope creep, undefined termssonnetEnvelope: verdict, scope drift, contracts to pin
7Red-Team-AssumptionsAdversary — unstated dependenciessonnetEnvelope: verdict, assumption register
8OracleArchitecture synthesizer, bird's-eye verdictopusEnvelope: release coherence, deployment risk, breaking changes
9HephaestusFunctional validator, builds real artifactsonnetPASS/FAIL with evidence
AtlasEmitter — XML + plan directorysonnetcast-{run_id}.xml + plan/ + rollup.yaml

Cheap. Deterministic. Fast.

MetricValue
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

invokeoauth2 auth
/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.

yamloracle-envelope.yaml — excerpt
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

invokeschema 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.

yamlmomus-envelope.yaml — excerpt
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

invokestripe webhooks
/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.

yamlred-team envelopes — three 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.

SituationUse
Spec is clear, task is bounded, deadline is shortCast
Bug fix with a known root causeCast
Scoped refactor (rename, split, move)Cast
Feature with a standard integration shape (OAuth, webhooks, CRUD)Cast
Plan shape is non-obvious, multiple reasonable approaches existAlloy
Greenfield architecture for a novel problemAlloy
High-stakes, low-reversibility decisionAlloy at --versions 7
Task is well-scoped but iteration improves the planTemper
Each rewrite should learn from adversarial critiqueTemper
Auth unification, event bus redesign, convergence-friendlyTemper
You're still learning the shape of the problemStart with Cast; upgrade if re-loop >2×

Cast has failure modes. Know them.

  1. Single-point failure at Prometheus
    If 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.
  2. No learning across re-loops
    Cast'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.
  3. Red-team parallelism is load-bearing
    Dispatch 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.
  4. Hephaestus needs a real buildable artifact
    Plans 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.
  5. Worst-case latency is 3× typical
    Three 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.

FileContentsWho reads it
cast-{run_id}.xmlOpus 4.7 semantic-XML one-shot promptPaste into a fresh Claude Code session to execute the plan
plan/plan.mdOverview, phase index, scope, out-of-scopeHumans reviewing the plan
plan/phase-NN-*.mdPer-phase: steps, files touched, success criteria, riskEngineer executing a phase
rollup.yamlAll envelopes aggregated, emission decision, iteration countPost-run autopsy, benchmarking
reviews/metis-envelope.yamlMetis's directives and clarifying questionsDebugging why Prometheus made a choice
reviews/momus-envelope.yamlMomus's demand listThe strongest critique signal in the run
reviews/redteam-*-envelope.yamlOne file per adversaryThreat modeling, attack surface review
reviews/oracle-envelope.yamlRelease coherence, deployment risk, breaking changesOps-ready summary
evidence/hephaestus-*Real build logs, runtime captures, screenshotsProof 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