Menu

1 / 2

I let AI agents ship to production for two months. Here are the five guardrails that survived

DEV Community: typescript·Ops Panel·about 5 hours ago
#h82XQVe9
#devtotypescript#devto#dev#agent#file
Long article (1189 words) — no AI summary yet.
Reading 0:00
15s threshold

I run a small business on a dashboard I wrote myself. It runs on a PC in my room — no server bill, no managed database — and an AI agent edits it almost every day.

That setup broke in interesting ways. Every guardrail below exists because something went wrong first. After two months, these five are the ones I would put in on day one if I started again.

1. Split "deciding" from "touching"

src/lib/tasks-core.ts decides. pure functions, no fs, no fetch, no clock src/lib/store.ts touches. reads and writes files src/app/api/tasks/route.ts connects the two

Enter fullscreen mode

Exit fullscreen mode

A pure function takes the current time as an argument instead of calling Date.now() . That sounds like a style preference until you hand the code to an agent.

Two things change:

Tests stop needing setup. No mocks, no temp directories — a decision function is called with values and checked against values.

You can scope what the agent sees.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.