Leanpub Header

Skip to main content

The Autonomous Lab: Engineering Agentic Infrastructure with MatrixClaw

Building verifiable compliance and AI-driven automation on real hardware

Image
This book is 91% completeLast updated on 2026-08-07

An AI asked to build a network and its own tooling refused — no human had signed. Six weeks later the same machinery governed bare metal serving a 740B-parameter model, every step on a committed record. This book builds that lab from the ground up: the gate, the run records, the GitLab nervous system, the audit trail — AI doing real infrastructure work you can prove afterwards.

Minimum price

$19.99

$29.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
Discussion Forum
About

About

About the Book

On the evening of January 31st 2026, an AI asked its own tooling for permission to build a small network — and was refused, because no human had signed. Six weeks later the same machinery was governing bare-metal servers carrying a 740-billion-parameter model, and every step between those two moments exists as a committed record: run records, merge requests, an append-only session log, a ledger of lessons paid for in hours.

This book teaches you to build that machinery from the ground up. Not a chatbot bolted onto a dashboard — a governed lab in which a frontier AI model plans, builds, tests and documents real infrastructure (Apache CloudStack, bare-metal servers over SSH, network switches, web consoles) while a human holds every gate that matters.

You will build, in the order the system was genuinely built:

  • The governance spine — a constitution, a single source of truth, an append-only session log, and the rule that a human merges every change
  • The engine and its gate — run records as the only admissible truth, plans bound to a hash, and an apply step that refuses to run without a recorded human approval
  • The reach — a simulator to rehearse on, a live CloudStack adapter one config line away, SSH runbooks for bare metal, a netdev layer for real switches, and browser operations that leave evidence
  • The interconnect — GitLab as the nervous system: agents and humans collaborating through issues and merge requests in one auditable history, worked by a platform team of role personas whose constraints are committed files rather than prompts
  • The audit surface — a compliance library an outsider can hold without holding any keys, and a control mapping that answers the compliance officer in their own language
  • The proof — the campaign that ran the whole stack on real iron, serving a 740B-parameter open-weights model on owned hardware, with the silent failures, demolished predictions and measured numbers that only execution finds

And you do not start from a blank page. The book ships with the complete MatrixClaw starter — a 120-file payload with a SHA-256 manifest, so you can verify byte-for-byte what you were given. Inside it: the engine, the gate, the adapters, the scenarios and the runbooks, the documentation that goes with them, and twelve role personas and fifteen agent skills — an IaC engineer, an SRE, a reviewer, a network engineer, a QA engineer, a compliance officer, a business analyst, a SOC engineer, a support engineer and the rest. That is a working platform team, not a single assistant. The engine imports the Python standard library and nothing else: no dependency tree, nothing to audit but the code in front of you. Your first governed build runs on the built-in simulator, on the machine you are reading this on.

Every decision quoted has an identifier; every figure has a run id and a date; every failure recounted — including the author's own — is in a committed log. The book was written inside the same governance it describes, chapter by chapter, each merged by a human under no obligation to be kind. It closes by naming the questions the record has not answered yet — as open research, not a roadmap.

The lab's motto is the book's: a check that cannot fail is not a check — and a book that cannot be checked is only an opinion.

Share this book

Author

About the Author

Image
Michael Hinsley

Mike Hinsley has spent more than three decades with his hands on real infrastructure — from electronics and engineering through operations, security, cloud and SaaS — and has never lost the habit of wanting to understand the machine all the way down. He is the founder of a UK infrastructure consultancy that helps organisations escape per‑core licensing lock‑in by migrating from VMware/Broadcom to sovereign, self‑owned platforms built on Apache CloudStack, with documented client savings of up to 94%. His guiding principle is one he calls GYOCYO — Grow Your Own, Cook Your Own: own the means of a capability rather than rent it as a finished product. He lives it literally. From a smallholding in rural Cheshire he runs large‑scale aquaponics, IoT‑monitored beehives, and a 28.8 kW solar array backed by 90 kWh of battery storage — the same instrument‑everything, owe‑nothing‑to‑anyone thinking he brings to enterprise clients, proven first on his own land. His HIVE‑DC concept — a data centre in a beehive — grew directly out of that overlap. Mike previously presented "Aquaponics, Apiculture, and Advanced Networking with Apache CloudStack" at the CloudStack European User Group in London. He publishes under the Leaf Spine Books imprint, and is preparing to establish a sustainable‑technology education centre uniting aquaponics, beekeeping and cloud infrastructure under one roof.

Contents

Table of Contents

The Autonomous Lab: Engineering Agentic Infrastructure with MatrixClaw

  1. On owning what you run
  2. Introduction: a book that can be checked

The Book in Full — Annotated Contents

  1. Part I — The Spine
  2. Part II — The Engine
  3. Part III — The Reach
  4. Part IV — The Interconnect
  5. Part V — The Audit Surface
  6. Part VI — Shipping It and Proving It
  7. Appendices
  8. Afterword

Chapter 1: Why an AI-First Lab

  1. What “AI-first” actually means
  2. The thesis: data over framework over model
  3. What the lab went on to prove
  4. Three products, one boundary
  5. How to read this book

Chapter 2: The Constitution

  1. Governance as executable habit
  2. The apparatus: four files that outlive every session
  3. Why “a check that cannot fail is not a check” is written into law
  4. Building yours

Chapter 3: The Run Record

  1. Fifteen fields, one life
  2. The plan-hash contract
  3. Evidence and events: two arrays, two questions
  4. The content engine’s side of the bargain
  5. Records grow up: schemas meet reality
  6. Stability rules
  7. Building yours

Chapter 4: Plan -> Approve -> Apply, Enforced in Code

  1. Two functions
  2. The funnel
  3. Drift: the plan tells the truth, so apply can refuse to lie
  4. When apply fails, the record keeps the body
  5. Teardown re-gates itself
  6. What the gate does not do
  7. Building yours

Chapter 5: The Sim Adapter

  1. One contract, two worlds
  2. A simulator with opinions
  3. What the simulator proved, and when
  4. What the simulator is for now
  5. What the simulator cannot teach

Chapter 6: The Live CloudStack Adapter

  1. Guarded by design
  2. The first lesson: signing, and the vindication of the verify-list
  3. Asynchronous truth
  4. One state shape, so the whole engine transfers
  5. The execution-found defect ledger
  6. Findings live where the code lives
  7. Building yours

Chapter 7: Scenarios and the Test Rig

  1. Anatomy of a scenario
  2. The wizard as code
  3. The test rig: one function per assertion
  4. Identity, not existence
  5. Noop fidelity: the quality bar
  6. Building yours

Chapter 8: The Deploy Layer

  1. The form, from a working specimen
  2. already: — drift detection for hosts
  3. The runbook that could not have worked
  4. The fix is structural: split at the reboot boundary
  5. Surveys: runbooks that only look
  6. Building yours

Chapter 9: The Netdev Layer

  1. The extension set
  2. Expectations that cannot lie
  3. The sentinel: why every step ends in show privilege
  4. The first real exchange is the test
  5. The secrets trap
  6. Building yours

Chapter 10: Browser Operations as Evidence

  1. Rule one: humans hold the keys
  2. Rule two: mutating clicks are gated like apply
  3. Rule three: no log, no click
  4. No hash, no shot
  5. Building yours

Chapter 11: GitLab as the Nervous System

  1. Projects are organs
  2. One write path to main
  3. One git history — what it cost to learn
  4. Two write routes, honestly split
  5. The token clock
  6. The governed memory
  7. Issues are the team’s bus
  8. Building yours

Chapter 12: Wiring the Agents

  1. Skills: the model is a guest with a briefing pack
  2. Personas: constraints wearing name badges
  3. The bus: if it isn’t on the bus, it didn’t happen
  4. Independence is manufactured, and it works
  5. External assistants: the pattern, kept honest
  6. Building yours

Chapter 13: MatrixClaw Tickets

  1. The insight: refuse to build a ticketing system
  2. d-mc-026: the change ticket
  3. d-mc-027: attestations, or who-did-what without archaeology
  4. d-mc-028: the boundary — a separate project on purpose
  5. The layer ships as a template
  6. Building yours

Chapter 14: The Compliance Hub and Library

  1. Conformance is computed, never claimed
  2. The risk register: flags that name why
  3. The audit report: evidence that travels
  4. The hub: a front door that names its own gaps
  5. The rule that caught the lab twice
  6. Building yours

Chapter 15: The Control Mapping: MatrixClaw Against the Standards

  1. 15.1 Who this chapter is for, and what it is not
  2. 15.2 The boundary that makes everything else honest: MatrixClaw is not a data processor
  3. 15.3 The mechanisms — twelve things MatrixClaw actually does
  4. 15.4 How to read the mapping tables
  5. 15.5 The AI-governance frameworks
  6. 15.6 The information-security frameworks
  7. 15.7 The sectoral and regulatory frameworks
  8. 15.8 GDPR — the honest, limited mention
  9. 15.9 One mechanism, many controls
  10. 15.10 Worked example — per-actor identity, and why a shared account fails
  11. 15.11 The gaps register — what MatrixClaw does not do
  12. 15.12 Where this goes — what has shipped, and what is still owed

Chapter 16: The Starter

  1. The law ships; the evidence doesn’t
  2. Capability-complete, content-clean
  3. Sanitisation is engineering, not redaction
  4. The verification a refresh must pass
  5. The first mile, by design
  6. Building yours

Chapter 17: The Course Engine

  1. One run, one chapter
  2. Why hand-transcription is banned
  3. Failures as narrative, not noise
  4. The redaction gate: transform, then verify independently
  5. And this book?
  6. Building yours

Chapter 18: Proving It on Real Iron

  1. The climb
  2. The measurements
  3. The silent-failure ledger
  4. The night the reasoning lost to the ruler
  5. The whole book, on one estate

Appendix A — Running MatrixClaw on an Open Model

  1. The question
  2. The honest framing first
  3. What fits where
  4. The gate this appendix must itself pass
  5. Candidate models — deliberately unnamed pending the screen

Appendix B — The Decision Register

Appendix C — The LESSONS Ledger

Appendix D — From Blank Ubuntu 24.04 to First Green Run

  1. What you need
  2. Step 1 — the toolchain (one line)
  3. Step 2 — get the starter and enter it
  4. Step 3 — plan your first build
  5. Step 4 — witness the refusal (do not skip this)
  6. Step 5 — approve, apply, test
  7. Step 6 — where you now stand
  8. The verification record (v-bmc-002)

Appendix E — Glossary

Appendix F — Your Second Lab: The VM Pair, From Bare Host to Your Own Bus

  1. F.1 What you are about to own
  2. F.2 Prepare the host — from nothing
  3. F.3 The cloud image — downloaded and proven
  4. F.4 The pair is born
  5. F.5 GitLab — yours, in a VM
  6. F.6 The lab’s own identity
  7. F.7 The starter, and the refusal that starts everything
  8. F.8 Your own bus — the team session
  9. F.9 The traps — every one paid for on 2026-08-02, so you don’t have to
  10. F.10 Prove the independence — don’t take our word for it
  11. F.11 What is and is not verified here — the honest ledger

Appendix G — The Memory System: How Your Lab Remembers

  1. G.1 Why a lab needs memory
  2. G.2 The design: an index and one fact per file
  3. G.3 The law: the repo is the source of truth
  4. G.4 The demonstration: watch your lab remember (VERIFY-on-clean-run)
  5. G.5 What memory must never become

Afterword — The Record Is Yours Now

  1. About the author
  2. Stay in touch

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub