AI

AI & Agents

Building features on language models, and working with coding agents without losing control

12 guides in this collection

AI Content

Authorize AI Tool Calls on the Server

The user writes the prompt and the model picks the arguments, so every id in a tool call is attacker-controlled. Check each call against a context the server built.

4 min read
AI

One Action Surface for People and for AI

Every button, shortcut and AI move goes through the same typed dispatch function. The AI can then do exactly what a person could do, and nothing else.

3 min read
AI

A Model Has No Clock

A language model does not know the time or anyone's time zone. Give it both on every turn, store real zone names, and refuse to schedule without them.

3 min read
AI Design tokens

Streaming Chat and Voice Without Leaking the Key

The provider key stays on the server. Chat streams through your own endpoint with an allow-list of models, and voice gets a short-lived token made for one session.

3 min read
AI

Small Local Models Inside a Feature

A small local model is cheap and private, and it loses count and copies its input. Gate when it runs, keep batches small, and check its output in code.

4 min read
AI

Keep Agent Instruction Files Lean

Everything in an always-loaded instruction file is paid for on every turn of every session. Keep rules and pointers there, and move subsystem detail to docs read on demand.

4 min read
AI

AGENTS.md as a Ledger of Real Failures

A rules file for coding agents earns its place one verified failure at a time. Each rule names what went wrong, and anything an agent would get right anyway is left out.

3 min read
AI

Choose a Model Tier per Job, and Write It Down

Name the model tier for each automated job in one registry file, with the reason and the date you last judged it. Scripts read the registry and never hard-code a model.

4 min read
AI

Commit as You Go, With a Checkpoint Backstop

A coding agent commits each finished unit of work locally, with specific paths, and never pushes. A session-end hook catches whatever was left uncommitted.

3 min read
AI

An Autonomy Dial, and a Cause for Every Stop

One setting decides how much an agent system may do by itself. Every time it stops, it records why, what happens next, and who owns the next move.

4 min read
AI Content

Agent-Ready Publishing That Stays Honest

Serve robots.txt, a sitemap and Markdown versions of your pages for AI agents, and advertise only what really exists. A test fails when a public page is missing.

3 min read