Ship · 4 min read + build task

Build a pipeline you can afford

Put budgets, retries, caching, and offline boundaries around the production pipeline.

cost budgetsretry ceilingsproduction pipeline
GenerateValidateReviewImport
A valid file still needs a human decision before it enters the game.
YOU’LL LEARN TO
  • Estimate cost and latency per pipeline stage before running it at scale.
  • Add cache keys, retry ceilings, and deterministic fallbacks.
  • Distinguish development-time generation from optional runtime calls.

Bring with you Lesson 11 and a layered evaluation suite.

Cost is a design constraint

An AI-assisted pipeline spends more than money. It spends developer attention, wall-clock time, context, review effort, and failure tolerance. Estimate those before multiplying a prototype across hundreds of assets.

For each stage, record unit count, calls per unit, input size, expected output size, model or local tool, retry ceiling, and human review minutes. Use current prices from your chosen provider at planning time; do not bake a course example into production assumptions.

Track actuals beside estimates. The gap reveals hidden retries, oversized context, and review work that a token-only budget misses.

Map the Signal Garden pipeline

Stage Runs when AI required? Failure behavior
relay data validation every data change no reject file
map generation/checks development or build no reject seed
field-note drafts development optional keep authored draft
tone review development optional queue human review
repair reaction runtime extension only optional show local fallback

The base game ships with validated data and authored reactions. Development-time generation can be rerun deliberately. Runtime calls have tighter latency, privacy, moderation, and availability requirements, so use them only where variation visibly improves the experience.

Bound every variable loop

Retries need a ceiling and a reason. Retry transient transport failure once or twice with backoff. Do not retry a semantic violation unchanged. A refiner may receive the exact error, but it still stops after the contract limit.

Cache immutable results using a key derived from input hash, contract version, model/version, and relevant settings. A cache without versioning can return output made under old rules. Never cache private player input without a retention policy.

Set a wall-clock timeout as well as an attempt limit. Three stalled calls are not meaningfully bounded if each can wait forever.

Keep context and output small

Send the relay state and tone excerpt needed for one reaction, not the whole project. Context engineering guidance treats context as something to select deliberately. Require structured output where integration needs it, while retaining semantic validation as described in the Structured Outputs guide.

Smaller or local models may suit narrow development tasks, but benchmark them on your fixtures rather than assuming “small” means adequate. A deterministic script is cheaper and more reliable when rules are already expressible in code.

Failure modes and tradeoffs

Prototype multiplication prices one successful call and ignores volume, retries, and review. Infinite repair spends more trying to rescue weak output than rewriting it. Cache confusion serves stale results after a style or schema update. Runtime dependency creep moves essential instructions into generated dialogue.

Budgets reduce exploration, but unlimited exploration rarely creates proportionate value. Reserve a small experiment budget and a separate production ceiling. When the ceiling is reached, stop, inspect, and choose whether the task deserves more investment.

Build task: run the manifest

Create a manifest for one complete production pass: three relay records, three field-note drafts, one map batch, and all validators. Estimate best case, expected case, and ceiling. Run it once, record actuals, then update the estimate. Force one failure to prove the retry and fallback paths.

Audit this Signal Garden pipeline plan for cost and failure risk.
For each stage, identify unit volume, variable-cost action, retry ceiling,
cache key, validator, and fallback. Flag any essential gameplay step that
depends on a network or model call. Do not estimate vendor prices without
provided current rates. Recommend one simplification, not a new service.

Completion evidence

The manifest is complete when every variable-cost stage has a ceiling, every retry has a classified reason, and the offline game remains complete at zero runtime calls. Compare estimated and actual counts, time, and review effort. The run log and checkpoint should make the pass resumable, following the durable-artifact principles in long-running harness research.

YOUR TAKEAWAY

A costed pipeline manifest and one full Signal Garden production run.

A QUICK CHECK

What is the safest response after a runtime dialogue call exhausts its retry ceiling?

Go a little deeper.

Primary sources behind this chapter. Signal Garden is our original teaching example.

AnthropicEffective context engineering for AI agentsOpenAIStructured model outputsAnthropicEffective harnesses for long-running agents

Search the course

Try “context”, “worlds”, “evaluation” or “shipping”.