Case study · Method · Engineering playbook

Taming the Agent

How to let an AI coding agent move fast without breaking things. An opinionated harness of classic engineering guardrails — enforced automatically against the agent's workflow — proven daily in production on Aurum. Works with Claude Code, GitHub Copilot, Codex, or whatever agent comes next.

AI-Assisted DevelopmentTypeScript · OpenAPISecurity Scanning Static AnalysisCI/CDConference Talk
Taming the Agent — an opinionated guide to AI-assisted development
From the talk: an opinionated engineering playbook for AI-assisted agile development.
01 The problem

The agent ships five features in a minute. Then it ships the mess.

The promise is real: an AI agent doesn't tire, doesn't lose focus, and will happily refactor a module at 2am. But leave one unguarded for three days and you'll find what we show in the talk: 247 untyped anys, a secret key committed to git, 78 dead exports, and a GPL dependency quietly poisoning your license position.

The agent isn't malicious — it's a junior developer who never sleeps, never complains, and never remembers the last PR review. Infinite capacity with zero institutional memory. Without automated enforcement, your codebase reflects the agent's defaults, not your standards.

Speed without structure is technical debt on autopilot.
02 The harness

16 tools. 6 layers. Zero human nagging.

The answer isn't reviewing harder — human review doesn't scale with agent velocity. The answer is a harness: classic engineering guardrails, wired so every one fires automatically at the right moment in the agent's workflow. The agent makes mistakes; the harness corrects them; no human intervenes.

Code quality — fires on write

Lint + format with agent-tuned rules (noExplicitAny, noConsole — the exact drifts agents make under ambiguity), TypeScript strict mode as a push gate, API clients generated from the OpenAPI spec so they're always typed and always in sync, and dead-code detection that finds every export the agent orphaned while iterating.

Security — fires on push

Four scan categories: hardcoded secrets (agents do this constantly "for testing"), license violations (GPL/AGPL blocked automatically), known CVEs in dependencies, and infrastructure misconfiguration. Critical findings block the push, interactively, before anything reaches main.

Static analysis — fires on PR

Beyond lint: cognitive-complexity limits (agents love deep nesting), cross-file duplication detection (agents copy-paste instead of abstracting), and a coverage gate — new code under 75% coverage fails the PR. The agent must ship tests, not just features.

Testing — the agent's long-term memory

Unit tests with full type inference, E2E across three browser engines, AI-aware timeouts for AI-powered flows. The agent can't remember past PR reviews — tests encode those lessons permanently.

Process — structure that scales with velocity

A git-hook gauntlet (auto-fix on commit, branch-aware gates on push), enforced commit conventions that become the changelog, changesets for self-documenting releases, and ticket discipline with one golden rule: no ticket, no work. Every change traces to a task — the agent keeps its own paper trail.

Observability & automation — closing the loop

Error tracking with source maps to the agent's exact line, product analytics to see whether shipped features actually get used, a health monitor that pages your phone at emergency priority — and automated publishing: release notes flow to Slack and social automatically, because the enforced commit format makes changelogs human-readable.

The complete harness — when each of the 16 tools fires: on write, on commit, on push, on PR/CI, in production, always-on
The complete harness — every tool mapped to the moment it fires, from editor to production.
03 The results

The harness doesn't slow you down. It makes speed sustainable.

Same agent, same codebase, same velocity — measured with and without the harness on Aurum, where this entire system runs in production today, from the ETL pipeline to marketing analytics and automated release publishing.

12% 97%type safety
8% 80%test coverage
100%conventional, changelog-ready commits
High lowsecurity incident exposure
Automated publishing — changesets trigger changelog, release tagging, and notifications to Slack, X, and Discord
The loop closes past the code: releases publish their own changelogs and announcements — marketing automation as an engineering artifact.
The golden rules

Six rules that make agents safe at speed.

  • Every tool catch is a saved PR review — automated enforcement scales; human attention doesn't
  • Never allow any — a type is a contract; any breaks it silently
  • Always work from a ticket — no orphan work; every commit answers "why was this written?"
  • Commit messages are documentation — the git log is the first place anyone looks
  • Test coverage is the agent's memory — tests encode the lessons the agent can't retain
  • If it's not monitored, it doesn't exist — production is the final truth

Adopting AI coding tools on your team?

We install this harness — tuned to your stack — and train your team to run with it.

info@oandaconsult.com Next case study → Aurum