FRANK
ANAYA

Work / Field guide

The Production AI Field Guide

Everything I know about making AI agents actually productive on a real codebase, condensed to one page you can act on this week. From a year of daily production use — the failures included. Free. Steal it.

1 · Hard rules
enforced by tooling, not memory
2 · Context
skills, runbooks, memory index
3 · Gates
validation before anything lands
4 · Judgment
deterministic first, model last

The four layers, fully argued on the method page. Below: how to actually install them.

The checklist

Onboard an agent to your codebase in seven steps.

Do these in order. Steps 1–3 take an afternoon and pay back the same week. Steps 4–7 are what separate "we tried AI" from "AI is part of how we ship."

1

Write the constitution — under 100 lines

One project instructions file with only the rules that prevent damage. If everything is important, nothing is. Agents (and humans) skim.

2

Build a one-command briefing

A custom skill that loads architecture, constraints, and current priorities in one shot. Onboarding an agent should take seconds, not a context-pasting ritual.

3

Runbook every gotcha the day you hit it

Written for a reader with zero context — because that's what next session's agent is. One lesson, learned once, forever.

4

Put a validator in front of your riskiest artifact

Whatever breaks production when malformed — components, configs, migrations — gets an automated check the agent must pass before anything lands.

5

Index your durable knowledge

A memory file the agent consults per task, loading the two notes that matter instead of everything. Context is a budget. Spend it like one.

6

Enforce the non-negotiables in tooling

Hooks the runtime executes: never skip verification, never commit secrets, rotate at source on leaks. Rules in tooling survive; rules in memory don't.

7

Convert every agent failure into a rule

The agent broke something? Document the trap where the agent loads it at session start. The system gets safer the longer it runs — most teams let the same mistake repeat forever.

Want this as a one-pager for your team?

Download the PDF

The decision that saves the budget

Script, or model?

The most expensive habit in AI adoption is prompting a frontier model to do work a script does better. Before every task, one question: is this mechanical or does it need judgment?

Mechanical and repeating — batch renames, data transforms, audits — gets a script: free forever, deterministic, testable. Judgment — architecture, naming, tricky debugging, writing — gets the model. And the best pattern is the hybrid: have the model write the script, review it once, then run it deterministically for the rest of time.

Mechanical + recurring → 30-line script. Runs free, forever.
Needs judgment → the model, with your context infrastructure behind it.
The power move → model writes the script once; you keep the deterministic tool.

The toolbelt

What I actually reach for, in order.

Claude Code + custom skills

The daily driver — with project-specific slash commands that encode conventions: briefing, auditing, validation, diffing.

Deterministic scripts (Python / Bash / PHP)

Batch transforms, audits, migrations. If the task is mechanical, the script wins on cost, speed, and repeatability. Every time.

Log-first debugging

Read the application log before touching files — one watchdog query replaces ten misdirected greps. I taught the agent this habit; it changed every debugging session.

Headless Chrome as a debugging instrument

Dump the rendered DOM when curl doesn't explain a bug. Browsers reveal layout problems that view-source hides.

ripgrep + regex fluency

Pattern design beats prompt iteration for finding and transforming code. The unglamorous 10x tool.

Git worktrees

Parallel working copies of one repo — so multiple agent sessions can work simultaneously without stepping on each other.

Worth your time

The short list I actually recommend.

Anthropic's documentation and courses

The primary source for agentic patterns. Free, current, and better than most paid courses.

The Drupal AI Initiative

Where CMS meets agents — 28 organizations funding the roadmap. If you're in the CMS world, this is the frontier.

axe DevTools + the WCAG quick reference

Automated accessibility checks catch maybe half the issues — but that half should never reach review.

Architecture Decision Records (adr.github.io)

The habit that outlasts every framework: write down the why. Documents end debates; opinions restart them.

web.dev

Still the best free curriculum for performance and Core Web Vitals fundamentals.

And the meta-resource

Your own runbook tree. The most valuable AI resource in any organization is the documented record of what already went wrong. Start it today.

Useful? This is how I work every day — and I'm hireable.