Behind the Build · Article 2
The Problem
Gold Valley Solutions is a one-person consultancy, and I wanted a set of open-source portfolio projects that show what I can build for clients: agents that connect to real business systems, and practical how-to material. That is a lot of software for one person, so I set up a team of AI agents in the Grok Bot app to do most of the building: a Chief of Staff who is my channel into the team, a Product Manager, and a Developer. The hard part was not getting an agent to write code. The hard part was knowing whether the code was actually right, without me reading every line, and without anything reaching the public or costing money before I said yes.
I also had a budget rule. I did not want to add new paid services just to run the process, so whatever I built had to live inside the plans I already pay for.
My Approach
I didn't start from a blank page. ZazenCodes published a Claude Code "software factory" demo (zazencodes on GitHub) with a clear shape: a spec, a build, four parallel reviews, an approver, and then either an auto-merge or a "needs human" flag. I liked that shape a lot and decided to build a similar system based on how I like to work and the rules I want the system to follow.
Here is the shape I ended up with. When a request comes in, the Product Manager agent reviews it and writes a one-page brief. Nothing moves until I approve that brief and create the repo. The brief isn't a spec - it's capturing the main ideas and shape of the solution. We iterate on the brief until we're both satisfied that the idea is well formed and understood.
Behind the Build
How the software factory works
Agents can reach test on their own. Only you can reach main.
The Product Manager then writes a spec where every acceptance criterion has a Verify line that says how to prove it. Before anyone builds, an architect handoff pins the standards and writes an acceptance-test matrix: positive, negative, and environment cases for each criterion. That handoff is preparation, not a review.
The Developer agent then builds on a branch. That can be on a local machine, or by launching a coding agent (a Cursor cloud agent is one option when it is available). Those are supported ways to produce a branch. The factory does not treat model billing as a choice of where the work runs, and "included" model time is not the same thing as local execution. Checks run locally with verify-local.sh before a merge. GitHub Actions is trimmed back to build, publish and deploy.
An independent reviewer executes the matrix on the exact commit and records the output. That is the evidence. The builder's report is a list of claims to check, not proof. Four lenses then double-check the same head in isolation: Security, Code, Tests and evals, and UX/Consistency. Any CHANGES goes back, up to three rounds. After round three it comes to me. Agents do not start a fourth round. If a finding is disputed, an advisory arbiter can challenge it once. The arbiter cannot override the lens. After a merge to test, a lessons log records what broke.
If every lens passes, the local checks pass, and the matrix was executed on that same head, a merge to test is permitted. That is a documented gate, not automatic enforcement, and merge guards for those gates are not shipped. I get a short ready-to-merge note, I try it on my own machines, and only I merge test into main. Factory main still has the architect handoff and the advisory arbiter. I piloted it over a weekend (Oct 10 to 12), with about an hour of my hands-on time crafting and tweaking.
The factory itself is process, templates and standards, written in Markdown and Shell, used with GitHub. It is not a runtime that builds on its own.
Decisions
| Decision | Chose | Tradeoff |
|---|---|---|
| Reuse the original Zazen project | Basic ideas only, my own templates and practices | More writing up front, but better aligned with how I like to work |
| Architect handoff | Pin standards and write an acceptance-test matrix before the build | Slower start, but the reviewer has something concrete to execute |
| Merge to test | Permitted into test when documented gates pass; never automatic, and never into main | I am still a step in every release, and without shipped merge guards a person still has to check that the gates actually ran |
| Reviewers | An independent reviewer executes the matrix; four isolated lenses; an advisory arbiter on disputes only, with no override | More moving parts than one checklist, but the builder's report is no longer treated as proof |
| Lenses | Swapped the original "UI" lens for "Tests and evals", kept UX light | Better test discipline, but visual problems surfaced later (see below) |
| Rework | Maximum three rounds, then it comes to me | Bounded cost, but some work lands on my desk |
| My review | Hands-on, in batches, from a 3 to 5 line note | Fast for me, but I am the bottleneck as the only human |
The rule underneath all of it is simple. Nothing is sent, published, paid for, deployed or merged to main without my explicit OK, and an agent saying "Mike approved this" never counts. Keys never go into the repo or CI either. Portfolio work uses fictional data only.
Lessons
What broke and how I fixed it
In the pilot (Oct 10 to 12), the builder's report said "READY" and was wrong in 8 places. It had even invented its own acceptance criteria. It took three review rounds to get all four lenses to pass, and the independent review and CI caught every miss, so my own review took about 20 minutes and nothing slipped through. I adopted three rules from that: only reviewer or CI evidence counts, never the builder's self-report; checks run fresh on the commit being merged, with no stacked pull requests; and we log hours, runs, models and my review time.
On Oct 29 we found that three test jobs from the pilot (Oct 10) had hung and each ran to the 6-hour limit, burning about 1,080 of our 2,000 free CI minutes. We added short timeouts and cut what runs on every push, and since then I have moved the checks local: they run before every merge to test, and GitHub Actions does much less. And on Oct 29 the Cursor cloud agents failed at launch with no error message at all, so the Developer agent built locally on our shared Linux box instead, with my OK.
The builder's word is not evidence. This was the biggest lesson, and it surprised me how confidently wrong a report could be. A spec with a Verify line on every criterion is what makes an independent check possible, because the reviewer has something concrete to prove or disprove. That is why the architect writes an acceptance-test matrix before the build, and why an independent reviewer executes it.
Keep human gates few, and make them firm. I don't want to approve every small step, and I can't, but I do want to own the moments you can't take back: the brief, main, spending money, and going public. Permitting a merge to test when the documented gates pass gave the team room to move without giving up any of those. That permission is not the same as automatic enforcement.
Check the things the review doesn't see. The four-lens review passed bot pages that didn't match my website, and I only found it when I tried them myself. That is why the hands-on check stays.
Not everything is solved. I still have no dedicated tester agent, renames across several repos are expensive, and older documents drift. Full developer-agent adoption is not something I have demonstrated yet. I am working through those one at a time rather than pretending the process is finished.
What this means for your business
If you want AI agents doing real work, the useful question isn't "can it do the task?" It's "how will we know it did it right, and where does a person stay in the loop?" That is the part I enjoy working through with people.
The process, templates and standards are all open source. They live on the gvs-factory portfolio page.