FIRST EDITION · 320 PAGES · 12 CHAPTERS · FULL COMPANION REPO

Building software with AI agents you can trust.

When you have to inspect every line an agent produces, you haven’t delegated the work—you’ve traded typing for reviewing. This book shows you how to close the trust gap with runtime verification, concise codebase maps, hard CI guardrails, and gated merges.

STACK Claude Code · Cursor · Codex · Agy
The Autonomous Engineer by Michael John Peña — Book Cover
7.0″ × 9.1875″ PRINT & PDF EDITION · THEAUTONOMOUSENGINEER.COM
THE CORE ARCHITECTURE

Not a smarter prompt. A deterministic harness.

Model benchmarks change every quarter. Verification loops, architectural boundaries, and merge gates last for years. The Autonomous Engineer replaces brittle prompt tricks with four composable layers that let teams earn autonomy one task type at a time.

4 Parts from local loop to multi-agent scale
12 Field-tested operational rules
1 Complete runnable repo (brewqueue/)
ARCHITECTURE GATED AUTONOMY
WORKTREE 1 WORKTREE 2 WORKTREE 3 PARALLEL AGENTS CI + VERIFIER GATE MAIN
01 VERIFY → 02 MAP → 03 CONSTRAIN → 04 MERGE
CURRICULUM

Inside the book

PART I

The Shift

Establish the mental models every later technique depends on: how coding agents operate under the hood, why the harness beats raw benchmarks, and how to earn autonomy per task type.

CH 01

From Code Generation to Earned Autonomy

The overnight merge case study and the verification infrastructure beneath the waterline—runtime checks, refactoring, hard rules, and small PRs.

CH 02

Inside an AI Coding Agent

Language models, tool calls, context windows, and verification loops in plain engineering terms—and why the surrounding harness drives reliability.

CH 03

The Trust Ladder and the Sleep Test

A six-rung Trust Ladder for assigning autonomy by task type, plus the Sleep Test for deciding what may merge unattended.

PART II

Trust

Equip a single agent with the three foundations it cannot work reliably without: runtime proof against the live app, concise repository maps, and evaluated skills.

CH 04

Closing the Verification Loop

Launch the seeded app, reproduce failures, capture Playwright traces and screenshots, and attach verifiable proof so you review evidence instead of lines.

CH 05

Context Engineering: Maps, Not Manuals

Replace sprawling wikis with a concise AGENTS.md table of contents and user-centric feature maps kept fresh by automated drift checks.

CH 06

Reusable Skills and Blind Evaluations

Turn repeated agent mistakes into single-principle SKILL.md playbooks verified through blinded, rubric-based evaluations.

PART III

Guardrails

Shape the repository so the shortest path is the compliant path, and build the deterministic gate from an agent-opened PR to a safe overnight merge.

CH 07

Designing Agent-First Codebase Architecture

Use directory structure and feature colocation to guide agent behavior and eliminate cross-feature leakage by design.

CH 08

Turning Review Comments into Hard CI Rules

Promote recurring review feedback into red-build CI checks—ESLint, dependency-cruiser, AST structural tests, and teaching error messages.

CH 09

Atomic Pull Requests, Verifier Agents, and Auto-Merge

Combine small atomic PRs, independent verifier agents, branch protection, and GitHub merge queues to make auto-merge safe for two-way doors.

PART IV

Scale

Move from one verified loop to parallel agent teams, extend guardrails to SQL data contracts and operations, and lead adoption across your organization.

CH 10

Orchestrating Multi-Agent Teams

Organize parallel agents into explicit roles—coordinators, workers, and independent verifiers—using Git worktrees and token budgets.

CH 11

Extending Guardrailed Agents Across Roles and Operations

Apply permission tiers and SQL data contracts across product, design, data, and ops while defending against prompt injection and the lethal trifecta.

CH 12

The Autonomous Engineer in Practice

How engineering judgment shifts upstream toward interfaces, invariants, and acceptance criteria—closing with a concrete 90-day adoption plan.

PLUS 3 APPENDICES Appendix A: Starter Kit Appendix B: The Twelve Rules Appendix C: Glossary & 100-Term Index
APPENDIX B PREVIEW

The Twelve Rules

Each chapter distills its operational principle into one rule you can pin beside your pull request queue.

  1. 01

    Autonomy is earned, not granted.

    Agents earn permission to act independently one task type at a time, and only with verifiable evidence.

  2. 02

    An agent is only as good as its loop.

    The tools an agent can invoke, the checks it can execute, and its stopping criteria matter more than the model.

  3. 03

    Trust the task, not the tool.

    The same agent can handle a dependency update and be barred from payment capture logic. Assign autonomy per task.

  4. 04

    No evidence, no done.

    Work is incomplete until the agent attaches observable proof that a reviewer—or an automated gate—can verify.

  5. 05

    Give maps, not manuals.

    Short, mechanically checked pointers outperform long documents that neither humans nor agents read to the end.

  6. 06

    Every scar becomes a skill.

    When an agent fails the same way twice, encode the recovery method as a skill and test it with blind evaluations.

  7. 07

    Make the right path the shortest path.

    Agents follow the path of least resistance; structure the codebase so the easiest route is the architecturally correct one.

  8. 08

    Say it three times, make it a rule.

    By the third time you leave the same review comment, convert it into a CI check that fails the build and teaches the fix.

  9. 09

    Never let the writer grade its own homework.

    Independent verification requires fresh verifier contexts and deterministic rules that cannot be talked around.

  10. 10

    Scale trust, not agents.

    Add parallel agents only as fast as your verification pipeline and merge queue can prove their output works.

  11. 11

    Draft freely, send carefully.

    Let agents prepare drafts and analyses anywhere, but allow only proven, reversible actions to execute unattended.

  12. 12

    Own the outcome.

    Regardless of who or what wrote the diff, you remain accountable for what ships to production.

COMPANION REPOSITORY

Every pattern verified in real code: brewqueue/

No toy snippets or fictional dialogue. Every chapter builds on BrewQueue—a complete, runnable full-stack reference application with real CI gates, structural architecture rules, SQL data contracts, reusable SKILL.md playbooks, and a blind worktree evaluation harness.

  • FastAPI
  • SQLite / PostgreSQL DDL
  • React + TypeScript + Vite
  • Playwright + CDP
  • ESLint 9
  • dependency-cruiser
  • Ruff & Mypy --strict
  • Pytest
  • GitHub merge_group CI
  • SKILL.md + Blind Evals
brewqueue/scripts/verify.py
$ python scripts/verify.py
[PASS] ruff check & mypy --strict
[PASS] pytest (API integration + SQL data contracts)
[PASS] AST structural checks (BQ-007 boundaries, BQ-012 integer cents)
[PASS] check_feature_maps.py (0 map drift)
[PASS] eslint + dependency-cruiser + tsc --noEmit
[PASS] playwright test --trace on (Mobile Menu, Barista Board, Owner Portal)

All verification gates passed. Ready for merge queue.
AUDIENCE

Written for practitioners who ship

Software Engineers

Move beyond interactive autocomplete to coding agents that verify their own changes against the running app and ship clean PRs.

Data & Analytics Engineers

Protect SQL pipelines, transformations, and data contracts with deterministic guardrails before trusting agents near production data.

Tech Leads & Managers

Adopt agentic workflows safely with an incremental, evidence-based rollout model and a concrete 90-day team plan.

Technical Builders

For product managers, designers, and founders who can read code and want to ship scoped changes inside automated guardrails.

ABOUT THE AUTHOR

Michael John Peña

Michael John Peña is a Director at Data Chain Consulting in Sydney and the author of Azure Data Fundamentals (O’Reilly) and Microsoft Fabric Data Engineer (DP-700) Study Guide (O’Reilly).

His consulting and engineering practice sits at the intersection of data engineering, cloud platforms, and applied AI systems. He works with coding agents every day, shipping cloud and data platforms, desktop software, and verification pipelines with Claude Code, GitHub Copilot CLI, Google Antigravity, and local GPU models, and he trains engineering teams across Australia and the Asia-Pacific region on guardrailed agent workflows. The Autonomous Engineer is his third book.

BIBLIOGRAPHY
  • 2026
    The Autonomous Engineer Building Software with AI Agents You Can Trust
  • O’REILLY
    Azure Data Fundamentals O’Reilly Media · ISBN 9781098164720
  • O’REILLY
    Microsoft Fabric Data Engineer (DP-700) Study Guide O’Reilly Media
EARLY ACCESS

Be first to know when the First Edition drops.

Follow the author on Amazon to hear when print, PDF, and the public brewqueue/ companion repo go live. Zero spam, no weekly AI hype newsletters.

Amazon notifies followers when a new book is released. No email is collected on this site.