Field Notes · 70 Articles · 11 Topics
Notes on systems & infrastructure
Practical build logs covering AI agent fleets, MCP servers, model gateways, commerce integrations, and self-hosted compute.
Latest
Recent posts
· Cloudflare · 10 min read
A client sign-off app on Cloudflare D1, Workers and Access
A Cloudflare D1 sign-off app: a Worker, an append-only decisions table and Cloudflare Access JWT checks, plus the OpenNext crash that upgrading fixed.
· API & Pipelines · 9 min read
EDI 850 purchase order explained for engineers
EDI 850 explained for engineers: the segments in an X12 purchase order, a worked example, how it maps to the 855 acknowledgment, and how to model it.
· AI Search & SEO · 8 min read
AI overview tracking: how to track Google AI Overviews in a rank tracker
AI overview tracking in a rank tracker: store present, cited and cited URL per check, match citations to a tracked domain or URL, and alert on changes.
· API & Pipelines · 10 min read
EDI 856 (advance ship notice) explained for engineers
EDI 856 explained for engineers: the BSN header, the HL shipment, order, pack and item hierarchy, the segments that matter, and how to model it safely.
01 · 11 articles
Mass agent orchestration
· 10 min read
Shipping a SaaS product with a fleet of AI coding agents
How AI coding agents shipped a rank tracker in seven git worktrees with build, QA, fix and re-QA waves, 465 commits, and review that caught misses.
· 11 min read
Re-brief, don't fix it yourself: the agentic coding habit that scales
In agentic coding, a failed agent run is a bug in the brief. The loop that scales is failure, diagnosis, re-brief, with a template and when to fix by hand.
· 10 min read
Git worktrees for parallel AI coding agents: one branch, port and database each
How to use git worktrees to run parallel AI coding agents: one branch, port, scratch folder and test database per agent, with strict merges.
· 8 min read
What an AI agent fleet actually costs: Claude Code cost and the context you never read
Claude Code cost in a delegated agent fleet comes down to what enters the orchestrator's context. Measured token and dollar figures from real fleet runs.
· 8 min read
AI agent orchestration in waves: the build, QA, fix and re-QA loop
AI agent orchestration that holds up: read-only QA agents audit the builders, fix briefs split by file, and merges are sequenced so main stays green.
· 8 min read
AI code review: agents report success while shipping defects
AI code review for agent-written code: the named failure modes and the targeted git, grep and build checks that catch them without reading every diff.
· 8 min read
Claude Code hooks as a quota gate, with stall detection for agent fleets
How Claude Code hooks block agent launches when quota is under 10%, and how file-touch stall detection catches runs that look alive but stopped moving.
· 9 min read
LLM routing by task: which model does what in an agent fleet
LLM routing by task, measured: a comparison of frontier, free-tier and metered models on the same brief, and the rules that decide which one gets the work.
· 9 min read
Multi agent orchestration: running AI coding agents on remote Linux machines
Multi agent orchestration over SSH on a separate Linux box: detached launches, PID files, git-based progress checks, stall detection and cleanup.
· 8 min read
WordPress migration with AI agents: 861 commits across 15 sites
How 128 request and report files ran a WordPress migration with AI agents across 15 sites and two machines, and what 861 commits on main looked like.
· 8 min read
Writing briefs that AI coding agents can't misread
A nine-section format for AI coding agent briefs: owned files, ground truth, decided judgement calls, escalation rules and output you can verify.
02 · 4 articles
AI search and content quality
· 9 min read
Generative engine optimization: the page format AI answers cite
Generative engine optimization is mostly page structure: answer-first summaries, sourced key facts and FAQ markup matching visible text. The format we use.
· 8 min read
AI overview tracking: how to track Google AI Overviews in a rank tracker
AI overview tracking in a rank tracker: store present, cited and cited URL per check, match citations to a tracked domain or URL, and alert on changes.
· 9 min read
Programmatic SEO with agent fleets and fact-check gates
Programmatic SEO with agent fleets needs quality gates: a 263-job queue across six sites, fresh-session fact checks, executable lints and a stall watchdog.
· 8 min read
Fact-checking website content: 155 owner questions before an agency site ships
How a 155-question owner Q&A, a 327-URL zero-regression baseline, a connected JSON-LD graph and an 8-page sprint shipped an agency site.
03 · 6 articles
MCP servers and agent tooling
· 8 min read
MCP OAuth from scratch: building a remote MCP server with OAuth 2.1
How a production MCP OAuth setup works: PKCE, dynamic client registration, five-minute codes, refresh-family revocation and audience binding.
· 8 min read
Designing MCP tools that models call correctly
Naming, argument shapes, dry-run defaults, confirmation gates and error text written for a model that reads prose, retries and never saw yesterday's call.
· 7 min read
MCP Streamable HTTP without sessions: running it stateless in production
Why a hosted MCP Streamable HTTP server should treat every POST as a fresh request: no session map, JSON responses, GET 405 and no sticky sessions.
· 7 min read
One tool registry behind chat and MCP: 36 tools, one set of guardrails
How 36 tools are defined once and served to both an in-app assistant and external MCP clients, with the same scopes, credit holds, dry runs and approvals.
· 8 min read
Shipping a rank tracker API, SDK and MCP server alongside a SaaS product
Building a rank tracker API: contract, REST API, generated SDK, then MCP. One OpenAPI 3.1 spec feeds types, docs, webhooks and the tools an assistant calls.
· 8 min read
Small internal MCP servers that pay for themselves
Two internal MCP servers — image generation and receipt reconciliation — and the design rules that make a small tool worth wrapping for an agent.
04 · 6 articles
Model gateways and bridges
· 10 min read
How to roll out Open WebUI as an AI workspace for a whole company
What an Open WebUI rollout needs: an OpenAI-compatible gateway, per-app tokens, a hardened container, and a guide staff actually read on day one.
· 9 min read
AI agent memory: one layer shared by several coding agents
How AI agent memory works when two coding agents share one store: provenance, repository scoping and routing memory processing to a cheaper model.
· 9 min read
Building an LLM gateway: an OpenAI-compatible API in front of tools that are not APIs
How an LLM gateway puts an OpenAI-compatible HTTP face on a CLI tool, with process pooling, sessions, quotas, SIGKILL timeouts and a hardened container.
· 8 min read
LLM failover that actually fails over: two hops, wall-clock aborts and empty completions
Why per-request retries are not failover, how a wall-clock deadline stops a hang, and how a timecard assistant went from 9.5 minutes to 96 seconds.
· 9 min read
LLMs write prose, never the numbers
How a reporting platform computes every metric in code, constrains the model with a strict schema, and validates each number before a human approves.
· 9 min read
Turning a browser-only AI tool into an HTTP API
How an HTTP bridge turns Google Flow image and video generation into a polled job API, with a paid-action gate, retries and private-network access.
05 · 4 articles
Browser automation at scale
· 9 min read
Building an in stock tracker for big-box retailers without an API
How an in stock tracker reads store-level availability at two big-box retailers every day, survives page changes, and ships an Excel report by email.
· 7 min read
Hardened Browsers for Automation: Camoufox, CloakBrowser and Stock Playwright
Camoufox, CloakBrowser and stock Playwright compared on profile persistence, engine, maintenance and footprint, with a pick for each automation job.
· 8 min read
Self-Healing Scrapers: Letting an LLM Repair Broken Recipes
How a scraper repair loop detects a broken recipe, has a model propose a fix, validates it against snapshots, and gates the release on human approval.
· 8 min read
When to Stop Scraping and Buy the Data: A Decision Framework
A decision framework for scraping versus buying retail data, with the trade-offs and three real project decisions that went in both directions.
06 · 12 articles
API integrations and data pipelines
· 10 min read
Designing a multi-brand commerce control plane
How a multi-brand control plane models ATP inventory, order routing, settlement and brand-scoped access in TypeScript, with provider rails off.
· 9 min read
EDI 850 purchase order explained for engineers
EDI 850 explained for engineers: the segments in an X12 purchase order, a worked example, how it maps to the 855 acknowledgment, and how to model it.
· 10 min read
EDI 856 (advance ship notice) explained for engineers
EDI 856 explained for engineers: the BSN header, the HL shipment, order, pack and item hierarchy, the segments that matter, and how to model it safely.
· 8 min read
Capture-first connectors: building integrations before the credentials exist
How capture-first connectors record provider requests without network calls, and why fingerprints, idempotency and overlapping checkpoints matter.
· 9 min read
Hunting an inventory double-decrement: the bug behind the drift
How a legacy inventory integration decremented stock twice, why the connection layer was the cause, and the idempotency and audit columns that fixed it.
· 8 min read
Leaving Salesforce for Odoo 19: the migration nobody budgets for
A Salesforce to Odoo 19 migration is a data-model translation, not a table copy. What breaks, how 184 corrupted rows were repaired, and how to plan it.
· 9 min read
NetSuite Shopify integration: inventory sync with drift reconciliation
A NetSuite Shopify integration with NetSuite as master: pending Shopify demand, certificate OAuth, compare-and-set writes and drift reconciliation.
· 8 min read
Offline conversion tracking for Google Ads: click IDs, hashed identities and GA4
Offline conversion tracking for phone sales: three ways to send them back to Google Ads, the identifier each needs, and how to check the value is real.
· 8 min read
Product feed management: a custom feed engine for Merchant Center, Microsoft and Meta
How a product feed management engine was built for Magento and Merchant Center: CEL rules, pgvector enrichment, channel adapters and a parallel cutover.
· 8 min read
Replacing a spreadsheet process with a typed exception engine
How a monthly NetSuite tracker process became a typed engine that patches XLSX surgically, refuses to guess names, and proves itself with 145 tests.
· 8 min read
Student-information system to GA4: admissions attribution for a school
How an admissions dashboard joins a student-information system, GA4 and Google Ads, backfills history, and keeps period counts separate from cohort rates.
· 8 min read
What is EDI? Retail X12 documents 850, 855, 856, 810 and 846 for engineers
What is EDI? A working explanation of the five retail X12 documents, how they map to an order lifecycle, and where an EDI network like SPS Commerce fits.
07 · 6 articles
Production SaaS and billing
· 10 min read
Usage based billing with a hold/charge credit ledger that never drifts
Usage based billing with prepaid credits: how a hold/charge ledger reserves, charges and releases credits atomically, with locking and idempotency rules.
· 8 min read
Better Auth in a multi-tenant SaaS: what the core covers and what you build
Better Auth in a multi-tenant Next.js SaaS: why we used the core without the organizations plugin, and how accounts, roles and tenant scoping work.
· 8 min read
Getting a Shopify app through App Store review and billing
How Shopify app billing works, why annual plans and offline-session returns break the happy path, and what App Store review checks before approval.
· 7 min read
Multi tenant architecture for a shared SERP cache, without leaking data
Multi tenant architecture for a shared SERP cache: how it is keyed, scoped and charged across tenants, and why isolation risk sits in the join.
· 8 min read
Postbacks, not polling: async SERP jobs on BullMQ and a third-party API
How signed postbacks replace polling for slow third-party jobs: the BullMQ queue, callback design, idempotency rules and a fallback poller that settles.
· 8 min read
What 24 TypeScript packages actually buy a SaaS product
How a 24-package pnpm monorepo splits an AI email platform by responsibility, contract and provider, and how parallel agents work inside the boundaries.
08 · 5 articles
Commerce systems
· 9 min read
Medusa JS in production: four stores, one Medusa v2 backend and the trade-offs
How four storefronts run one Medusa JS (v2) backend image with isolated databases, a custom Stripe Tax provider and a catalog sync that survives failure.
· 8 min read
Color families from supplier chaos: AI classification with a review queue
How a color-filter app maps supplier color names to storefront families with text and vision models, and why uncertain answers go to a human.
· 7 min read
Print-ready product customizers on Shopify: canvas, output files and the two-pass fix
How a Shopify customizer turns shopper designs into PNG, PDF and DXF production files, sends them over SFTP, and why selection handles vanish.
· 8 min read
Shopify to Medusa: what a real migration analysis covers
What a Shopify to Medusa v2 analysis must contain: a feature map, a build ledger, phases, tax, and the risks that decide whether to migrate at all.
· 8 min read
Tiered pricing with Rust and WebAssembly Shopify Functions
How Shopify Functions run tiered cart pricing as a Rust Cart Transform in WebAssembly, how the runtime limits shape the code, and what breaks in the theme.
09 · 7 articles
Cloudflare and the edge
· 9 min read
Moving 15 WordPress sites to Cloudflare Workers
How 15 WordPress sites became static Astro Workers, plus three new sites: the import, the redirect map, the cutover and what broke.
· 10 min read
A client sign-off app on Cloudflare D1, Workers and Access
A Cloudflare D1 sign-off app: a Worker, an append-only decisions table and Cloudflare Access JWT checks, plus the OpenNext crash that upgrading fixed.
· 10 min read
Hono in production: a typed API on Node, with a path to Workers
How we structure a production Hono API: app factory, typed context, auth middleware, one error shape and tests, on Node and portable to Cloudflare Workers.
· 9 min read
Cloudflare R2 in production: images, backups and static assets
What Cloudflare R2 is good for in production: customer uploads, public images and S3-compatible backups, with lifecycle rules, pricing and our mistakes.
· 8 min read
Cloudflare Tunnel and Access: zero open ports in front of everything
How a Cloudflare Tunnel plus Cloudflare Access puts internal apps, private Git and GPU services online with no inbound ports, and what broke along the way.
· 7 min read
Stopping XML-RPC bot floods on a shared WordPress host
How XML-RPC floods took a shared WordPress host to high CPU, and why ModSecurity, nginx rules and OPcache each fixed only part of the problem.
· 8 min read
When a Worker never runs: static assets and run_worker_first
Why Cloudflare served 404s to browser navigations while fetch() reached the Worker, and how generated run_worker_first routes fixed it.
10 · 6 articles
Self-hosted infrastructure
· 10 min read
Coolify in production: lessons from running a fleet of apps
Lessons from running Coolify in production across 18 apps: build limits, concurrency, remote builders, the deploy API and the failures behind each rule.
· 8 min read
A remote BuildKit server cut compose builds by 62%
How a remote BuildKit builder over mTLS and an NVMe cache cut a compose build from 678 s to 258 s, and when a BuildKit server is worth running.
· 8 min read
A systemd timer as a deploy pipeline: how cf-deploy builds and ships static sites
How a pair of systemd timer units polls git, builds changed Astro sites and deploys them with wrangler, plus the Node, env and secret traps.
· 8 min read
Capping Docker build memory with cgroup v2
How one Docker build took a host down for 21 minutes, and the cgroup v2 cap that OOM-kills any BuildKit step over 24 GB in seconds.
· 9 min read
Modernizing an office server room: audit first, then three roles and a staged move
How a three-node Proxmox, TrueNAS and 10G plan is replacing ageing office servers, with static IPs, Tailscale and encrypted Microsoft 365 backups.
· 7 min read
vLLM vs llama.cpp on one GPU: switching llama.cpp, vLLM and ComfyUI safely
vLLM vs llama.cpp on a local LLM box: how one 32 GiB AMD GPU swaps between llama.cpp, vLLM and ComfyUI with systemd Conflicts= and a health-checked switch.
11 · 3 articles
Agency operations
· 9 min read
Productized services: what a 159-repo agency audit found
How to build productized services from what you own: a 159-repo, 40-folder audit became 25 scored candidates and five offers with a paid-diagnostic ladder.
· 8 min read
ADA compliance website work: a WCAG 2.2 audit for small business sites
ADA compliance website work for two restaurants: a WCAG 2.2 audit, a WordPress remediation plugin at v1.9.x and a findings memo for counsel.
· 9 min read
Automated client reporting: monthly reports that clients can read
How automated client reporting pulls GA4, Ads, Shopify, Klaviyo and WordPress, computes every number in code, and gates LLM prose behind validators.