Shipping to spec: multi-agent QA for agency web builds.
Client · Digital agency (public-sector web builds)Industry · Web developmentEngagement · QA automation systemStack · 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.
Spec drift. PMs revise documents after QA has started. One PM delivered a new mockup version described as "only fixing items I noticed". It also carried three new designer instructions nobody had announced.
Coverage by memory. Testers check what they remember of a scope. Some rules cannot be checked by eye. "Every text link has at least a 24px hit area" applied to 3,599 links on the flagship site.
Late discovery. Defects first appeared in client review, when they cost the most to fix and the most goodwill to explain.
Unspecified behaviour. Gaps in the scope, such as what happens when a closing date is blank, surfaced mid-build as rework or arguments.
No traceability. Findings did not cite the requirement they broke. Every report became a debate between PM and developer about whether something was a defect.
The source material added friction.
Some Word documents had numbered clauses. Others had only descriptive headings.
Some mockups were meant literally. Others were indicative.
Reference folders held stale versions, archived drafts, and, in one case, three spec documents from a different client that synced in mid-run.
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:
QA run. Tests a build against the scope.
Gap analysis. Reads only the documents, and runs at scope review, before any code exists.
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
Context discipline. Each agent gets a short brief and only its own slice of the requirements. It reads knowledge files by path instead of having them pasted in, so no agent has to hold the whole project at once.
Model economics. A mid-tier model does the bulk drafting and checking. The most capable model is kept for the audit and for judgement-heavy work, such as deciding which agent tests which requirement.
Optional auto-fix. When switched on, a fixer agent works in an isolated copy of the codebase and reruns the affected tests. It hands back a diff for a person to review, and stops after two cycles.
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.
It converts the PDF into a numbered document, using the PDF's own table of contents to decide where each heading ends.
It turns the design file into a document of designer notes, plus 74 true-size renders of every board and state.
Its output is byte-stable, which I verified, so repeat runs still produce identical output.
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 (Sept 29–30). Four drafting agents wrote 85 unit tests, 349 browser tests, and 135 Given/When/Then cases. The run stopped for developer approval. Three specialist agents then ran in parallel, and the senior auditor reviewed everything they reported. Verdict: not ready, with 2 high, 7 medium, and 5 low issues. The audit also found 11 problems in the tests themselves, including one that passed when it should have failed.
Round 2 (Sept 30, same day). The report went to the developer's build session. Each issue carried its spec quote, steps to reproduce, the file and line, and a suggested fix. After their fixes, the re-run verified 11 of 17 findings fixed in code and 4 more resolved in the CMS. On the first pass, 67 tests failed. The audit traced 28 to one wrong assumption in a shared test helper and 31 to defects in the tests. Only 8 were real defects. The live site decided the verdict.
Round 3 (Oct 5–6). The PM sent a third QA list with 15 annotated screenshots and a new mockup version. The system wrote a fix plan for each item, with the measured cause and acceptance criteria. All 8 fixes passed on the first cycle. The re-run executed 618 tests. 615 passed, and the 3 failures were all genuine content problems, with no false failures.
Open issues fell from 14 to 5, and high and medium severity reached zero
Open issues after each QA round on the flagship project, by severity
HighMediumLow
14 open
2
7
5
7 open
2
5
5 open
5
Round 1Sept 30, morning
Round 2Sept 30, evening
Round 3Oct 6
check_circleEvery high- and medium-severity issue closed by round 3.
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.
The live site set the verdict
Why 67 tests failed on the first pass of round 2
28
31
8
One wrong assumption in a shared test helperDefects in the testsReal defects
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.
104 tracked issues from two review rounds over the same documents
Alongside 96 acceptance criteria. Each issue is tied to a verbatim quote or a spreadsheet cell reference, so the PM can find it in their own document.
72
12
20
72 gaps12 conflicts between sources20 open questions
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.
Hours per round on the flagship project
Manual QA is an estimate. Automated time is measured.
Manual QA, estimatedAutomated, measured
Round 1 · first full QA$50 compute
Manual
~40 h
Automated
~1 h
Manual: read the scope and mockups, plan, test 106 requirements at 5 breakpoints, write up findings. Automated: test approval to report, after test generation and the approval pause.
Round 2 · verify fixes, check for regressions$31 compute
Manual
12–16 h
Automated
70 min
Round 3 · PM's list, new mockups, full re-test$33 compute
Manual
12–16 h
Automated
87 min
Automated time includes regenerating a 618-test suite.
Project total$114 compute
Manual
65–70 h
Automated
~3.5 h
Automated total is measured, plus round 1's test generation and human time at the approval gates.
Several of the checks above would not happen at all by hand.
Every page, every round. The auditor crawled all 241 live pages, at several text sizes, to check rules that apply site-wide.
Every link. It measured the hit area of 3,599 body links. No tester would measure a tenth of them.
Every requirement, re-tested every time. A manual re-test checks the reported issues. The automated suite re-runs all 618 tests, which is how it caught fixes that broke something next to them.
Evidence on every finding. Each one arrives with the scope quote, the measurement, steps to reproduce, the file and line, and a suggested fix. The developer's build session acted on findings directly, with no translation step.
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
fact_check
Tests need approval before they count. Generated tests are drafts until the developer approves them. If a drafting agent reports "I read X as Y", that becomes a question at the approval gate. One unasked interpretation of a design layer once became a false pass, which the auditor later caught.
balance
Defects and decisions stay separate. If the design file shows a faint tint and the site shows solid orange, the system records a decision for the client with both options laid out. Early on it marked an intentional breakpoint difference as a defect for two rounds, and the developer corrected it. The rule since: report what you measured, and let the owner judge intent.
build_circle
Auto-fix proposes and never merges. It needs a command flag and a configuration switch. It works in an isolated copy of the codebase, stops after two cycles, and produces a diff for review. In its first real use it produced a clean, minimal fix. The developer then explained the behaviour was intended, so the proposal was withdrawn and nothing changed. Items the PM has struck through as accepted count as decisions, never as fix requests.
verified_user
Real-world side effects need explicit permission. Live form and publishing tests tag their submissions so nobody mistakes them for real ones. The publishing workflow ran end to end and then rejected the change, so nothing went live. A halted live action never resumes without a person's go-ahead.
lock
Sensitive material is excluded structurally. Files known to hold credentials are excluded from every agent brief by path, and database access is sandboxed. Agents cannot reach those files.
image_search
A mockup alone never proves a gap. Some mockups are literal and some are indicative, and a model cannot tell which. A claim based only on a mockup goes to the PM as a question.
checklist
People get the checks only people can do. Every run ends with a plain-language Manual Review Checklist: whether the design feels right next to the mockups, content tone, ambiguous scope points, and anything a machine cannot judge. Each item traces back to a requirement.
Approach
Start from failure modes. Every component exists because something went wrong without it: stale scopes, tests that could not fail, unchecked work reaching a client.
Keep AI out of anything that must be repeatable. Document conversion, requirement IDs, and change detection are plain deterministic code. Models draft tests, probe edge cases, and audit evidence.
Make the audit independent, and give it authority. A fresh-context reviewer on a stronger model re-measures every claim. Its findings outrank the agents', and on the flagship project they outranked the tests too.
Engineer for honesty. Every number in a report is re-derived from the data, every quote is checked against the source, and the verdict says "not ready" until it is true.
Build memory into the process. Every run reads the run log before it starts and adds to it when it finishes.
Keep it portable. The engine names no client, and a new client is a new configuration file. The core logic is plain Python, so moving to a different AI coding tool means rewriting only the agent definitions.
If your team builds to a written spec and quality assurance is where projects stall, I can build you one.