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

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
Booking kit: sell session packages as owned prepaid rows, not ghost one-off appointments
Keep Booking kit session packages as owned prepaid balances; Stripe buys the pack; each booking consumes a row — not ghost one-offs.
8 min read
Landing templates: rebrand every section from one site.ts, not a ghost regenerate
Rebrand OTF landing templates from src/content/site.ts; sections stay owned; bun build to Cloudflare Pages — not a ghost regenerate.
8 min read
Booking kit: stop double-booking with range exclusions and live slots
How the Booking kit blocks overlapping appointments at write time with range exclusions, keeps live slots honest, and confirms only after checkout survives.
8 min read
Gemini Arena labels are not API pins: eval before you swap models
Arena Flash labels can hide a stronger canary. Pin GA model ids, run a multimodal eval pack, and only swap when the pack stays green.
6 min read
Better Auth on Expo: SecureStore sessions, cookiePrefix match, getCookie APIs
Cache Better Auth sessions in Expo SecureStore, align cookiePrefix with the server, and attach getCookie for API calls with credentials omit.
6 min read
Free SDK vs paid kit: when buying actually pays for itself at checkout
Already on the free SDK? Run a four-piece payback test on screens, schema, auth and agent spine to see if the $99 kit pays off.
7 min read