AI coding guides & resources
Engineering decisions, tutorials, and video guides from the OTF team.

Rotate production secrets with dual-key overlap, not an edit to .env
Rotate owned-backend production secrets with a versioned store, dual-read overlap, then an explicit revoke — not edit .env and hope the next deploy picks it up.
7 min read
Rate-limit your owned API at the edge and in the app, not only in memory
Protect an owned production API with coarse edge/WAF limits plus identity-aware app middleware on shared Redis, and advertise quota with RateLimit headers.
7 min read
Drives for Vercel Sandbox: persist the workspace, not the run
Drive.getOrCreate + mount in Sandbox.create; what belongs on a Drive vs ephemeral disk; when to use read-write vs concurrent read-only snapshots.
8 min read
Pin GPT-6 Sol and Luna in your agent config, not your chat window
Pin gpt-6-sol vs gpt-6-luna in agent config with reasoning.effort and Responses tools. Cost matrix and failover next to each pin — not a chat-picker default.
6 min read
GPT-Live 1 on AI Gateway: own delegation-created and the billing hop
Full-duplex voice stays up while your app handles delegation-created, pins a text model on Gateway, and splits voice vs delegated billing.
6 min read
Python Workers GA: port FastAPI or Hyperdrive without to_js glue
Python is first-class on Cloudflare Workers. Pick FastAPI, Hyperdrive, or LangChain+Workers AI first — and commit the Wrangler bindings in-repo.
8 min read
MiMo V2.6 on AI Gateway: pick Pro vs Flash vs UltraSpeed for coding agents
Pin xiaomi/mimo-v2.6-pro, flash, or pro-ultraspeed on Vercel AI Gateway. Put budgets and failover next to the tier policy in-repo.
8 min read
Worker Previews isolate Durable Objects so CI agents never share prod
npx wrangler preview gives each branch its own DO namespace, URL, and base config. Override one Preview for migrations without touching production.
8 min read
OpenRouter Batch for owned repo jobs: when to keep sync vs half-price async
Repo jobs POST /api/v1/batches, pin provider.only, poll to terminal. Keep sync interactive; custom_id isolates bad rows so one failure never kills the job.
7 min read
System One and Jev: typed calibrated decisions for builders, not chat
TypeSafe's System One model Jev (Sep 15, 2026): RLCD, parallel sampling, typed probabilistic decisions vs chat LLMs inside software.
8 min read
Grok 4.7 for builders: same $2/$6 as 4.6, pin the id you call
Grok 4.7 matches Grok 4.6 at $2/$6 per M tokens. Pin the console model id; trial harness fit in Cursor, Grok Build, API, and Copilot.
7 min read
Claude Opus 5.5 is live: pin the model id, then check the bill
Official Claude Opus 5.5 (claude-opus-5-5): $4/$20 rate card, 40% typical vs Opus 5, fast mode $8/$40, and when to change your pin.
8 min read
PII scrub at log egress: deny-list fields before agents read production logs
When agents and support can read production logs, scrub PII at the logger sink with a deny-list before egress — not after a vendor indexes raw fields.
8 min read
Honest status pages after sandbox exit: component status, timeline, and incident updates
Own an honest status page after sandbox exit: component statuses, incident timeline, severity, subscribers, maintenance windows, and postmortem links.
7 min read
Rolling deploys on an owned backend: health checks, drain, and rollback
Owned-backend rolling deploys need three things: an honest readiness probe, connection drain before exit, and a pinned previous artifact you can put back.
7 min read
Postgres connection pooling after sandbox exit so concurrent AI traffic cannot melt the DB
After leaving Lovable/Bolt, size Postgres pools with checkout timeouts and idle caps, then prove saturation with a canary so agents cannot melt the DB.
7 min read
Make product docs citation-ready with Sources, schema, and answer-first pages
Answer-first product pages plus TechArticle/FAQPage schema and a visible Sources section so AI answer engines can cite your docs.
8 min read
Timed database restore drills into an isolated target prove RTO and RPO
Run a timed restore into an isolated target, prove app boot and critical reads, and record RTO/RPO — not backup checkbox advice.
7 min read
Audit trail events for SaaS ops: append-only who-did-what you can query
Own an append-only audit event store — actor, action, resource, correlation — so support and agents answer what changed after sandbox logs.
7 min read
API timeouts and retries when your app calls AI backends you own
Own connect and total timeouts, bounded retries with jitter, and idempotency keys when your service calls AI HTTP APIs after leaving sandbox hosting.
7 min read
Structured production logs with correlation IDs agents can triage
Stable JSON log shape, correlation IDs, and agent-readable fields so production triage is filterable — not free-text guessing.
8 min read
SaaS kit: keep Issues board as owned five-column Kanban, not a ghost board
Extend SaaS Dashboard kit Issues board as five-column Kanban with backlog and tasks seams so agents change status on owned issue rows — not a ghost board.
8 min read
Fitness kit: finish every live workout as one owned row, not a ghost timer
Keep Fitness kit live sessions honest: End writes one workout row on workoutType+workout; persist sessionId so timers are not ghosts.
8 min read
SaaS kit: Stripe Customer Portal for self-serve plan changes and cancels
Add Stripe Checkout, webhooks, and a Customer Portal to the SaaS Dashboard kit; billing is not included until you implement it.
8 min read