Technical Writing

Writing

Practical write-ups on building production AI systems - MCP servers, running agents, data pipelines, computer use. Not tutorials; notes from real deployments.

A Grapheme Cluster Cost Me an Afternoon, Twice
A Grapheme Cluster Cost Me an Afternoon, Twice

The same one-line bug hit two unrelated parsers, months apart, because Swift's Character type doesn't mean what a line-splitting function needs it to mean.

Design the Degraded State Before the Happy Path
Design the Degraded State Before the Happy Path

Most systems only have two states in the code, working and crashed, when real failures need a third: running with a known, stated reason why one part isn't.

Rewriting My Own Infrastructure as a Product
Rewriting My Own Infrastructure as a Product

I'm replacing the Java service that has run my agent fleet since early 2025 with a native Mac app I intend to sell. Field notes from the first real decisions.

One Command from Plan to Commit: Wiring the Whole Pipeline Together
One Command from Plan to Commit: Wiring the Whole Pipeline Together

The individual habits - plan first, match the model to the phase, review AI with AI - are worth more chained into one command than run by hand. Here's the single command I use to take a task from plan to commit.

Give Your AI Your Own Documents: Retrieval Without Overbuilding
Give Your AI Your Own Documents: Retrieval Without Overbuilding

Retrieval is how you get the right piece of your own material in front of the model at the moment it's needed, and most teams overbuild it before they've earned the complexity.

When an Agent Goes Sideways, Read the Tool-Call Chain
When an Agent Goes Sideways, Read the Tool-Call Chain

When an AI agent does the wrong thing, don't argue with the model. Read the sequence of tool calls it made and what each returned; the divergence is right there.

Know When to Start a Fresh Context
Know When to Start a Fresh Context

A long-running AI session accumulates stale detours and corrections that dilute attention. The skill is noticing when a conversation has gone stale and cutting a clean one, carrying forward only what still matters.

Make Your AI Return Data, Not Prose: Structured Outputs
Make Your AI Return Data, Not Prose: Structured Outputs

When another process consumes a model's answer, free-form prose is a liability. Constrain the output to a defined shape and validate it at the boundary instead of regex-parsing English.

Stop Grading AI on Vibes: Lightweight Evals for Real Work
Stop Grading AI on Vibes: Lightweight Evals for Real Work

Reading AI output and deciding it looks right is vibes-based grading that hides regressions; a small repeatable set of test cases with known-good answers gives you a real signal instead of a feeling.

Keep an Authoritative Reference Library Your AI Follows in Every Project
Keep an Authoritative Reference Library Your AI Follows in Every Project

Left alone, an AI regresses to generic patterns. It only follows your conventions when you maintain one authoritative reference library and point every project at it.

Keep a Gotchas File Your AI Reads Before It Repeats Your Mistakes
Keep a Gotchas File Your AI Reads Before It Repeats Your Mistakes

A dedicated gotchas file logs the sharp edges your AI keeps hitting, so the model consults it before acting instead of re-learning the same painful lesson every session.

Plan with Opus, Build with Sonnet: Matching the Model to the Task
Plan with Opus, Build with Sonnet: Matching the Model to the Task

Running every phase of a task on your most expensive model wastes money and rarely improves output. Use a strong model to plan and review, a fast model to generate, and match each phase to what it actually needs.

Your AI Sees Less Than You Think: Give It the Context to Work
Your AI Sees Less Than You Think: Give It the Context to Work

The quality of AI output is decided by the context you supply, not by clever wording. Point the model at the right files, paste the real errors, and state the constraints it cannot see.

Put Your AI's Reference Library in a Shared Git Repo the Whole Team Owns
Put Your AI's Reference Library in a Shared Git Repo the Whole Team Owns

The team-scale version of the reference library - put your coding conventions, patterns, and gotchas in a shared git repo every engineer's AI reads and everyone updates as they learn.

Give Your AI Tools, Not Just a Chat Box
Give Your AI Tools, Not Just a Chat Box

Moving from pasting text into a chat window to giving the model real tools it can call to read files, query a database, and take actions on your behalf.

One Repo, Two Machines: Running an AI Agent Across a Mac and a Windows VM
One Repo, Two Machines: Running an AI Agent Across a Mac and a Windows VM

I develop a Windows-only desktop app from my Mac by splitting the agent's world in two: a mounted share is where it edits, an SSH session into a Parallels VM is where it builds and tests.

Have AI Review AI: Building a Verification Loop You Can Trust
Have AI Review AI: Building a Verification Loop You Can Trust

Why the first thing a model produces is a draft, and how to build a separate adversarial review pass with a clean context that catches what the generator missed.

Plan First, Code Second: Spec-Driven Work with AI
Plan First, Code Second: Spec-Driven Work with AI

The highest-leverage habit in AI-assisted development is making the model write a plan first, correcting it while it is cheap, and only then letting it implement.

Structure Your Repo So AI Can Find Its Way Around
Structure Your Repo So AI Can Find Its Way Around

An AI navigates your codebase by reading it, the way a new engineer would but with a narrower view. A repo that is discoverable to a human is discoverable to a model, and the same things that confuse people send the model down wrong paths.

Scope the Task to the Context Window: Decomposing Big Work for AI
Scope the Task to the Context Window: Decomposing Big Work for AI

Models degrade when a task is too big to hold clearly at once. The fix is decomposition: break large work into scoped units that each fit in the model's working memory with room left for reasoning.

Guard Your Secrets: Security Hygiene When Working with AI
Guard Your Secrets: Security Hygiene When Working with AI

The practical security hygiene of working with AI - keeping secrets out of prompts, treating untrusted content as a prompt-injection vector, scoping tool permissions tightly, and gating consequential actions behind human review.

Pin Your Model Versions: Reproducibility in AI Workflows
Pin Your Model Versions: Reproducibility in AI Workflows

The model is the least stable dependency in your stack, so pin its exact version, record which model produced which output, and adopt upgrades on purpose instead of by accident.

Make AI Cost Visible: Observability for Token Spend
Make AI Cost Visible: Observability for Token Spend

AI cost accrues a fraction of a cent at a time across thousands of calls, so it hides easily. Instrument token spend, track cache hits, and alert on anomalies.

Know What to Delegate to AI and What to Keep Human
Know What to Delegate to AI and What to Keep Human

The skill that separates people who get leverage from AI from people who get burned is knowing which work to hand off and which to keep behind a human gate.

Turn Repeatable Prompts into Scheduled Agents
Turn Repeatable Prompts into Scheduled Agents

The graduation path from a prompt you keep re-running by hand into a standing agent that fires on a schedule, fetches its own inputs, and writes its own outputs.

Claude Computer Use in Production: What I Actually Use It For
Claude Computer Use in Production: What I Actually Use It For

A practical look at Claude computer use and browser automation in a real production workflow - what works, what doesn't, and where the real limits are.

Building AI Data Parsing Pipelines: Structured Extraction From Messy Documents
Building AI Data Parsing Pipelines: Structured Extraction From Messy Documents

How to build a production AI data parsing pipeline that extracts structured data from unstructured documents - architecture, tradeoffs, and what actually works.

Building a Production MCP Server with Spring AI
Building a Production MCP Server with Spring AI

Architecture decisions and implementation patterns for a Spring Boot MCP server backing a fleet of autonomous Claude agents.

Running AI Agents in Production: What the Architecture Actually Looks Like
Running AI Agents in Production: What the Architecture Actually Looks Like

What production AI agent infrastructure actually requires - the scheduler, the MCP server, agent definitions, observability, and what makes agents reliable vs. unpredictable.

More technical notes are cross-linked from klass.wiki, my broader reference library.