arrow_back Back to case studies Case Study · 06

Shipping to spec: multi-agent QA for agency web builds.

Client · Digital agency (public-sector web builds) Industry · Web development Engagement · QA automation system Stack · Python · AI agents · Browser automation

I built an AI-driven QA system that reads a project manager's scope documents, writes its own tests, checks the live build with a team of specialist agents, and returns a verdict: handover-ready or not ready. On its flagship project, open issues fell from 14 to 5 over three rounds in one week, and every high- and medium-severity issue was closed. The AI compute for the whole project cost about $114.

5
Open issues, down from 14 in one week
0
High and medium issues still open, down from 9
618
Automated tests in the final round, 615 passed
$114
AI compute for the whole project
241
Live pages crawled by the auditor
3,599
Links measured for hit area

At a glance

Who it serves
A digital agency that builds and refreshes public-sector websites (municipal, regional, and provincial bodies) on WordPress and a proprietary .NET CMS.
The problem
QA was manual, ran late, and checked the build against people's memory of the scope instead of the scope itself.
The solution
A portable, multi-agent QA engine. It converts spec documents deterministically, generates tests that trace to requirements, runs specialist agents in parallel, and passes their findings through an independent senior audit. A human approves the tests before they run.
In production
14 runs across 6 engagements for 5 public-sector clients, June to October 2026.
Flagship result
A municipal website refresh with 179 requirements and 618 automated tests, plus crawls of all 241 live pages. Passing requirements rose from 73 to 91 of the 106 it tested.
Cost
About $114 in AI compute across three full QA rounds, against a planning budget of $300–800 per project.

The problem

The agency's projects run on detailed written scopes. A project manager produces discovery documents: Word specs with deeply nested headings, site-architecture spreadsheets, wireframe and mockup PDFs, and design files full of designer notes. On the flagship project the scope was a 33-page PDF plus a design file with 74 boards and states. Together they held 179 distinct requirements.

QA happened by hand at the end of the project, and it failed in five predictable ways.

The source material added friction.

The agency needed a system that treats the scope as the source of truth, checks all of it every time, and shows its evidence.

Design decisions

I started from the ways QA had failed and gave each one a structural answer. Preventing a failure never depends on someone remembering to.

Failure

QA runs against an outdated scope.

Every run starts by re-ingesting the documents. The system never trusts its own previous copy.

In practice: A new mockup version described as "only fixes" also carried 3 new designer instructions. The run found them and added tests for them.

Failure

Scope changes get lost in noise.

Ingestion is deterministic, and requirement IDs do not depend on position. The same documents always produce byte-identical output. An ID comes from a requirement's heading trail, not its clause number.

In practice: Adding a section near the top of a spec does not renumber the rest. Tests regenerate only when the requirements diff shows a real change.

Failure

Testing from memory.

Tests are generated from the requirements. Each one is tagged with the requirement it checks.

In practice: Every finding quotes the scope text it violates, so PM and developer start from the same sentence.

Failure

AI agents are confidently wrong.

A fresh-context senior auditor re-checks every finding. It runs on a stronger model, re-measures each finding on the live site, and drops what it cannot reproduce.

In practice: In the flagship project's first round it dropped 12 findings, with a measured reason for each, and found 3 real defects that no test covered.

Failure

One agent cannot hold the whole job.

Specialist agents each get only their slice: visual, code review, and behaviour. They run in parallel, read documents by path, and use a cheaper model for bulk work.

In practice: Agents stay focused, and the budget goes to the judgement-heavy steps.

Failure

Unchecked work reaches the client.

Agents that produce findings cannot write deliverables. The audit must finish before anything client-facing exists.

In practice: This rule exists because of a real incident, described under Problems solved in production.

Failure

Automation overreaches.

People approve the tests before they count. Auto-fix is off by default and needs two switches to turn on. It is limited to two cycles, works in an isolated copy, and never merges.

In practice: Every fix the system proposes is a reviewable diff, and nothing merges without a person.

Failure

Lessons get re-learned.

Every run writes to a run log, and every engine change gets a version number.

In practice: Fourteen runs have produced a log of about 1,800 lines. Each new run reads it before starting.

The system is client-agnostic. The engine names no client: each client's folders and settings live in a configuration file. Source documents are read-only. The system writes only to its own output repository, and nothing flows back into the PM's folder.

How it works

Every run follows the same fixed sequence. Plain deterministic code handles everything that must be exactly repeatable, and AI agents handle everything that needs judgement. There are two entry points:

PM's scope documents (read-only)Word specs, architecture spreadsheets, mockup PDFs, and design files with designer notes
1 · Ingest, on every runConverts every document into a knowledge base and requirements list, and compares it with the last baseline. Plain deterministic code: unchanged documents give identical output, so any diff is a real scope change.
QA runDoes the build match the scope?
2 · Generate tests, only when requirements changeUnit, browser, and Given/When/Then tests, each tagged with the requirement it checks.
Developer approval gateNothing counts until a person approves it. Agents' judgement calls arrive as questions.
3 · Three specialist agents, in parallel
VisualScreenshots against the mockups at every width
Code reviewStandards, logic, and security; read-only
BehaviourRuns the suite, then probes edge cases live
4 · Senior audit: stronger model, fresh contextRe-measures every finding on the live site and drops what it cannot reproduce. Hunts false passes and gaps.
5 · Report and verdictQA report, manual-review checklist, and a verdict: HANDOVER-READY or NOT READY, with counts.
Gap analysisWhat did the scope never say?
Gap analystsSix lenses in parallel: states, lifecycle, data, roles, non-functional, sources. Each gap quotes the scope word for word.
Gap auditorConfirms each gap is absent from every source file. A mockup alone becomes a question.
Gap report for the PMEvery gap quoted and tracked by a stable ID. Needs no build: run it before development.
Run log: read before every run starts, added to when it endsLessons, fixes, and follow-ups carry into the next run. Engine changes are versioned.
Independent auditHuman checkpointDocuments are only read. Everything the system writes goes to a separate, versioned repository.
The QA pipeline · two entry points, one audit gate each

Flagship engagement

The hardest test so far was a municipal website refresh on the agency's .NET CMS: about 240 live pages, five breakpoints, a High Contrast accessibility mode, and a new navigation system.

Setup

The requirements lived in two sources the system could not read: a 33-page PDF scope and a design-tool file. The PM's folder also held five earlier QA documents, development logs, and outdated exports. The developer asked that those be left out ("I don't want them to pollute your run"). A straight ingest would have produced zero requirements.

I wrote a client-specific bridge.

The result was 179 requirements, 106 of them testable.

Before drafting a single test, the system asked the developer's own AI build session for context. It received a code map, the current publish state, and 16 design decisions the client had already ratified. It also received a list of files to keep out of agent briefs, and every brief from then on excluded them by path.

Round by round

Round 1 · first full QA

Sept 29–30
Passing73 of 106
AI compute$50

Suite: 85 unit tests, 349 browser tests, 135 Given/When/Then cases.
Ingest to report: overnight, including the approval pause.

Round 2 · fix verification

Sept 30, same day
Passing92 of 106
AI compute$31

Suite: 96 unit tests, 390 browser tests.
Approved tests to report: 70 minutes.

Round 3 · PM's list and new mockups

Oct 5–6
Passing91 of 106
AI compute$33

Suite: 113 unit tests, 505 browser tests.
Approved tests to report: 87 minutes.

Round 3 passed one fewer requirement than round 2. Its new checks and full-site crawls turned up a few more content problems.

NOT READY

The verdict after round 3 is still not ready, and that is deliberate. Five low-severity items and five design decisions remain open, and the system does not round up. It names who owns each item: one is code, four are CMS content, and the decisions belong to the client.

What it caught

Selected findings from the agency's client projects. Names are removed and the problems are left as they were.

In the build

WordPress theme migration

A go-live trap

The new theme's timeline loaded its scripts and styles from the old theme's folder. That worked on staging, where the old theme was still installed, and would have returned 404s the day the old theme was removed.

How it surfaced: The code was injected at runtime, so one agent's code search missed it. Another agent's live page inspection caught it.

WordPress theme migrationHigh

Archives truncated to one card

The new theme dropped a one-line setting from the old one. Year archives showed 1 post instead of 7, and every date, author, and tag archive was cut short.

How it surfaced: Live comparison of production and staging, traced to the missing line. The fix was one line.

Public-sector WordPress site

A fix that could not work

A rule to hide an admin-screen advert was added to a stylesheet that loads only on the public site, so it would never run where the advert appeared.

How it surfaced: The auditor checked where each stylesheet loads as well as whether the rule existed.

Public-sector WordPress site

A fix that made a neighbouring bug worse

Moving a breakpoint fixed the logo but widened a layout mismatch band from about 13px to about 88px.

How it surfaced: The auditor measured at five widths across the new boundary.

Municipal website refreshHigh

Wrong pages in the mobile section menu

"Show pages in this section" listed the whole section, ancestors included, instead of the current page's children. It was wrong on every deep page at three breakpoints.

How it surfaced: Found independently by the code reviewer and the behaviour agent, and traced to the exact stylesheet lines.

Municipal website refresh

The landing page for every old link was out of date

The 404 page was a static leftover from before the refresh, with removed features and links to deleted pages. After launch, every retired URL would end up there.

How it surfaced: No test covered it. The behaviour agent flagged it as a question, and the auditor upgraded it to a defect because the scope counts error pages as part of the site.

Municipal website refresh

The scope's own example failed its own rule

The spec illustrates its 24px hit-area rule with one specific body link, and that link measured 16px.

How it surfaced: The auditor's live probing. A later round confirmed 3,580 of the site's 3,599 body links met the rule.

Regional government forms

One tap, two emails

A quick double-tap on a public form submitted it twice and sent two notification emails. The thank-you page appeared whether or not the email was delivered.

How it surfaced: The behaviour agent's double-submission probe, checked against the real inbox.

In the scope, before any code existed

Gap analysis reads only documents, so it finds problems while they are still cheap: before a developer builds the wrong thing.

Municipal jobs reporting module

Two different data-retention rules

The scope and one mockup page said applicant data is kept "1 year after the job's closing date". Another mockup page told applicants "1 year from submission date".

Impact: For a posting open two years, early applicants would be kept under one rule and deleted under the other. That is a privacy question.

Municipal jobs portalHigh

Undefined states

The scope never said what a job's status is when its closing date is left blank, or what happens when the application email fails to send.

Impact: Each would otherwise have been decided by whoever wrote the code.

Municipal jobs portal

A spec document that did not exist

The scope twice says "see Specs: Site-Wide Information". That document was not in the folder, and it held two values the build needed.

Impact: A missing spec is the most consequential gap there is, and nothing else had flagged it.

Problems solved in production

Each failure is dealt with once. Structural fixes go into the engine's code, operating rules go into the run log that every run reads first, and work in progress goes on a visible backlog. The engine went from v1.0 to v1.2.7 in four months.

What went wrong

A whole spec collapsed into one requirement

The first real scope document used descriptive headings with no clause numbers. One heading, "404 (404.php)", started with digits, so the parser treated the whole document as numbered and found only that one requirement.

What changed

Format detection now goes by majority: a document counts as numbered only if most of its headings are. Descriptive documents get a deterministic outline number for internal ordering. Requirement IDs come from the heading trail, so they never shift.

What went wrong

Another client's documents arrived mid-run

Three spec documents from a different client synced into the folder and blended into 890 requirements. Every document opened with "Front Matter", so sections silently overwrote each other: 55 sections produced 53 files.

What changed

IDs and file names now carry a per-document prefix, so the same heading in two documents cannot collide. The incident became a test fixture proving the engine handles both document styles.

What went wrong

A browser agent quietly downgraded itself

It could not launch a browser, fell back to reading raw HTML, and was about to report the visual check as done.

What changed

Every browser brief now states "never fall back and call it a pass". Each run test-launches the browser before any agent starts.

What went wrong

Tests that could not fail

Generated tests wrapped assertions in conditions, so a missing element skipped the check and the test went green. One test passed because of the bug it was meant to catch.

What changed

Hard assertions only. The auditor hunts false passes as part of its job, and a static check flags guarded assertions in seconds.

What went wrong

Work reached the deliverables before the audit

In one gap analysis, the analyst agents wrote and committed client documents before the auditor had run. The audit then cut 165 candidate criteria to 96.

What changed

Version 1.2.0 removed write access from every analyst and auditor agent. The audit now comes before anything client-facing exists. The bad commits stay in the history, with a correction on top.

What went wrong

A false statement about the PM's own document

A report said the scope "carries no clause numbers". Word was numbering the headings automatically, and the converter had dropped the numbers.

What changed

I confirmed it three ways, including that 58 of 59 headings matched Word's own numbering, then told the PM directly instead of fixing it quietly. Reports now cite clause numbers only when the source document provably contains them. Reading Word's automatic numbering is next on the engine backlog.

What went wrong

A clean report beside a wrong tracker

The PM-facing report quoted the scope exactly, but 8 quotes in the machine-readable tracker were not verbatim. A summary table added up to 32 against a stated 30.

What changed

A quote verifier now checks every artifact, including the data files. Summary counts are re-derived from the data and never copied from an agent's claim.

What went wrong

A failed step wiped the knowledge base's working copy

A conversion step failed, but the command after it hid the error, so ingestion ran on an empty folder. Version control restored everything.

What changed

Every step now checks the exit code and the expected file count before ingesting. In the next round the source file was moved mid-project. The check stopped the run and nothing was lost.

What went wrong

An alarm that belonged to someone else

During a live forms test, a "sending limit exceeded" alert arrived and was blamed on the test, which then halted. The alert came from an unrelated system.

What changed

Confirm an alert belongs to the system under test before acting on it. Resuming live actions, such as real form submissions, now always needs a person's explicit go-ahead. The safety layer blocked an attempt to resume silently.

What went wrong

Red tests that were not real defects

In one re-run, 31 of 67 failures were defects in the tests, because they were drafted against a build that had not been deployed.

What changed

Drafting agents now run their tests against the deployed build before approval and raise judgement calls as approval questions. The next round had zero false failures.

Time and cost

A full verification round now takes about 90 minutes of machine time and around $30 of compute. By my estimate, the same depth of checking by hand takes two to five days. The automated figures are measured from run logs and commit timestamps. The manual figures are my estimates for one experienced QA tester working to the same scope.

Several of the checks above would not happen at all by hand.

Smaller jobs cost less. On other engagements, logged runs cost between about $3 for a focused fix check and $14 for a full scope-gap review.

The developer spends the human hours at the approval gate, on design decisions, and on the manual-review checklist the system produces for what needs a person's eye.

Human controls

Approach

If your team builds to a written spec and quality assurance is where projects stall, I can build you one.