How to build with AI, engineering-first
Treat the requirements as the source code and the model as the compiler.
An illustration of the corpus, not a screenshot of a client’s.
The method in one paragraph
On a live engagement this method produced a working proof of concept in two weeks, extracting information from PDFs into business intelligence on Azure and covering ground that had previously taken roughly twelve months. It works by treating the requirements as the source code and the model as the compiler. Instead of writing software and using AI to autocomplete it, you convert every requirement into structured markdown, have AI map and interrogate that corpus for gaps and contradictions before any code exists, and resolve those with the business. Only then do you ask a model at maximum reasoning to build the whole thing against the full requirement set, pair-programmed throughout with an engineer from the receiving organisation. The client engineer who paired on it finished at 70% confident they could run the process unaided.
Prefer to talk it through? Ask us on a discovery call →
- to a working proof of concept, extracting information from PDFs into business intelligence on Azure
- 2 weeks
- of ground the business had previously been circling
- ~12 months
- how confident the client engineer who paired on it was that they could run the process unaided
- 70%
- one live engagement behind these figures, not a portfolio of them
- n=1
Evidence basis: a live engagement inside a major London insurance business, where our founder is embedded as interim Agentic Lead. A two-week proof of concept is not a production deployment. Productionising it is a separate four-to-six week phase with a dedicated team, and on that engagement the external penetration test ran in month one against the pre-existing product rather than against the AI-built proof of concept.
- CostRests on: two weeks
- A fortnight of a small paired team is a different order of spend from continuing to circle ground the business had been circling for roughly twelve months, and the rung that buys exactly this fortnight is published at £20k–£55k fixed rather than quoted.
- Elapsed timeRests on: roughly twelve months of prior ground
- The decision moves inside one planning cycle instead of across several, because the argument about whether the thing is feasible is replaced by a working thing people can open, in two weeks rather than in the next budget round.
- Handover riskRests on: 70%, self-reported
- The client engineer who paired on it put their own confidence at 70% that they could run the process unaided, which is the honest ceiling on what a fortnight transfers. It is one engineer's own estimate on one engagement, and it is the number to hold us to rather than a claim that handover is solved.
All three rest on one engagement, not a portfolio of them, and a two-week proof of concept is not a production deployment. Productionising it is a separate four-to-six week phase with a dedicated team.
One engagement, and what it does and does not prove
The fortnight was paired throughout with one of the client’s own engineers, which is the part that matters more than the speed: the capability stayed in the building when we stopped. It ran inside a major London insurance business where our founder is embedded as interim Agentic Lead, so it is one engagement rather than a pattern, and the write-up says so. Productionising the result is a separate four-to-six week phase with a dedicated team, and the external penetration test on that engagement ran in month one against the pre-existing product rather than against anything the method built.
This runs inside client engineering teams as an Embedded Agentic Lead engagement. The method itself is published in full and you owe us nothing for using it.
Why most teams get less from AI than they expected
Most teams using AI to build are still doing conventional engineering with a faster autocomplete.
The requirements stay in PDFs, tickets and people's heads; the model sees one file at a time; and nobody discovers the contradiction between requirement 14 and requirement 61 until it has been built twice.
The leverage is not in generating code faster. It is in giving the model the entire, machine-readable requirement set up front, and in using it to find the holes in that set before writing anything.
The method, step by step
Each step includes the specific failure it exists to prevent, because a method without failure modes is a description of a happy path.
Build the corpus
Everything the product has to do, in one machine-readable place both the team and the model can read.
- 01
Collect every source of requirement, in whatever state it is in
PDFs, slide decks, architecture diagrams, screenshots, email threads, spreadsheets. Do not tidy them first and do not exclude anything for being messy or out of date. Completeness matters more than quality at this stage.
Why this step existsThe requirements you leave out are the ones that surface in week three as a rebuild.
- 02
Convert all of it to markdown, using AI
Have a model transcribe and structure every source into markdown files, including describing diagrams and images in prose. The output should be readable by a human and parseable by a model, with one concern per file.
Why this step existsA model cannot reason across a corpus it has to re-read as binary attachments every time. Markdown is the format that makes the requirement set addressable.
- 03
Store it somewhere both humans and AI can reach
A Git repository or a knowledge base like Obsidian. Version-controlled, diffable, and open to the whole team, not a folder on someone's laptop.
Why this step existsRequirements change during the build. If the canonical set is not somewhere both parties read from, the model and the business drift apart within days.
- 04
Have AI build a knowledge map across the requirements
Ask the model to link the requirements to each other: dependencies, shared entities, conflicting assumptions, ordering constraints. The map is a working artefact for downstream decisions, not a diagram for a deck.
Why this step existsThe relationships between requirements are where the design decisions actually live, and they are almost never written down anywhere.
- 05
Create the empty project
A blank repository. Nothing scaffolded, no starter template, no opinionated framework chosen in advance.
Why this step existsScaffolding before the requirements are understood bakes in architectural choices the requirements may not support.
Interrogate it before you build
The two steps almost everyone skips, and the two that decide whether the build happens once or twice.
- 06
First prompt: find the gaps and contradictions
Before asking for a single line of code, ask the model to read every markdown file and flag gaps, contradictions and ambiguities. This is the highest-value prompt in the entire process.
Why this step existsThis is the step almost everyone skips, and it is the one that pays. Contradictions found here cost a conversation. Found after the build, they cost the build.
- 07
Resolve the gaps with the business and the subject-matter experts
Take the flagged list to the people who own the answers. Resolve what you can, and make an explicit, recorded decision about what you will proceed without, based on risk tolerance and how long the answer would take to get.
Why this step existsSome questions are not worth blocking on. The point is that proceeding is a decision someone made, not an omission nobody noticed.
Build, verify and transfer
Maximum reasoning against the whole requirement set, reviewed on a cadence, paired with someone who has to live with it.
- 08
Build, at maximum reasoning, against the whole requirement set
With current frontier models on their highest thinking settings, the opening prompt can be genuinely high-level: review all requirements and build a production-ready product, with high coverage of automation and integration tests, and be confident every requirement is met. You are not hand-holding it file by file.
Why this step existsPrompting file-by-file reimposes the bottleneck you just removed. The model's advantage is holding the whole system at once.
In a client estateThis runs under the named-tool-only policy: no client data, code or documentation goes into any AI tool you have not named and approved in writing, and where you have an approved enterprise AI tenancy we work inside it rather than bringing our own. The full AI tooling position →
- 09
Iterate, and expect a predictable curve
As a baseline on real engagements: two to three days to get to roughly 80% right, and a further three to five days to reach roughly 95%. The last few percent is where the human judgement concentrates.
Why this step existsKnowing the shape of the curve stops teams abandoning the method on day two, when the output is visibly 80% and feels like it has stalled.
- 10
Security review every fifth prompt, on top of a pipeline that checks every commit
Roughly once every five iterations, stop and ask the model to run a security review of the whole system. That cadence sits on top of controls that run without being asked: static analysis with quality gates (SonarQube or Semgrep) on every commit, dependency and vulnerability scanning (Snyk or Dependabot), secrets scanning with push protection, and protected branches so no change merges without human code review. All of it runs in the receiving organisation's pipeline, on its infrastructure.
Why this step existsA model reviewing its own output is one control, not a control environment. Layered this way, the model reviews the system, the pipeline reviews every commit and a human reviews every merge, so nothing is marking its own homework.
- 11
Feed new requirements back through the markdown, never straight to the model
When something new arrives, update the markdown files first, then ask the model to re-evaluate the project against the amended set and build the new requirement.
Why this step existsPrompting a change directly desynchronises the code from the canonical requirements, and the next full re-evaluation silently undoes it.
- 12
Pair-program it with someone who has to live with it
Do not build it in a corner and hand it over. Run the whole build alongside an engineer from the receiving organisation, on their machine as much as yours. On the engagement this method came from, the entire two-week build was pair-programmed with one of the client's own engineers, who finished the fortnight putting themselves at 70% confident they could run the process unaided.
Why this step existsA proof of concept nobody internal can reproduce is a demonstration, not a capability. Speed that only works while you are in the room is a dependency you have just sold them.
- 13
Combine automated, manual and user testing, and feed the results back in the same way
Document all testing feedback. On a live engagement, a transcript of a user-testing session was converted to markdown and handed to the model, which was asked to review and improve the product against it directly.
Why this step existsUser feedback in a spreadsheet gets triaged and forgotten. User feedback as markdown in the requirement corpus gets built.
A model will happily write code that passes tests and violates every convention your team holds.
Which is why an enforceable engineering standard matters more in this model, not less. We publish ours as an open-source handbook, written to be enforced by an AI agent rather than remembered by a human.
- 72 rules
- the whole standard
- RFC 2119
- severities, not suggestions
- Stable IDs
- citable in a review
- CC BY 4.0 + MIT
- free to use, including commercially
Where this goes wrong
These are the four we watch for.
- 01
Prototyping speed outrunning production readiness
Two weeks to a working proof of concept is not two weeks to a production system. Pipeline integration, observability, governance, independent penetration testing and the security standards of the receiving organisation are a separate phase, on our own engagement, a four-to-six week one with a dedicated team. The build runs on your infrastructure under your policies throughout, so the evidence those controls produce lands in your audit trail rather than ours.
- 02
Skipping step six because the requirements “look fine”
They never are. The gap-and-contradiction pass reliably surfaces things the business did not know were ambiguous, and it costs one prompt.
- 03
Letting the code become the source of truth
The moment the markdown stops being maintained, you are back to conventional engineering with a faster autocomplete, and the next full rebuild loses everything not written down.
- 04
No agreed standard for what “good” means
A model will happily generate code that passes tests and violates every convention your team holds. Agreeing an enforceable engineering standard up front is what stops the output being unmaintainable by humans.
Building with AI: your questions
Does the method work on an existing system, or only greenfield?
The method's delivered evidence is greenfield: the two-week build started from a blank repository. The steps are designed to carry across to a running system, with three changes. The corpus grows: the existing system's behaviour becomes part of the requirement set, converted to structured markdown the same way, so the model reasons over what must be preserved as well as what must change. Verification hardens: characterisation and regression tests are written against current behaviour before anything is modified, and they join the pipeline's quality gates as hard checks. And the increments shrink: changes land behind existing interfaces in smaller steps, inside your branch protection and review process, rather than as a rebuild. What does not change is the control set: static analysis, dependency and secrets scanning, the model-led security review roughly every fifth prompt, and human review before merge. When the full method has run against a brownfield estate we will publish the write-up, dated, like the greenfield one.
What does AI-engineering-first mean?
It means treating the requirements as the source code and the model as the compiler. Every requirement is converted into structured markdown, stored where both humans and AI can read it, mapped for relationships, and interrogated for gaps and contradictions before any code is written. Only then does the model build against the full requirement set. It is the opposite of writing software conventionally and using AI as a faster autocomplete.
How long does it take to build a product this way?
On a live engagement in specialty insurance, a product representing roughly twelve months of prior work was rebuilt as a working proof of concept in two weeks. The typical iteration curve is two to three days to reach roughly 80% correct, and a further three to five days to reach roughly 95%. Turning a proof of concept into a production system is a separate phase, and on that engagement it is scoped at four to six weeks with a dedicated team.
Why convert requirements to markdown first?
Because a model cannot reason across a corpus of PDFs, diagrams and slide decks that it has to re-read as attachments each time. Markdown makes the whole requirement set addressable, diffable and version-controlled, so the model can hold all of it at once, humans can review changes, and the canonical requirements stay synchronised with the code as things change.
What is the single highest-value step?
Asking the model to read every requirement file and flag gaps and contradictions before writing any code. It is the step almost everyone skips. A contradiction found at that point costs a conversation with the business; the same contradiction found after the build costs the build.
How do you stop AI-generated code accumulating security problems?
With layered controls rather than a single review. Static analysis with quality gates, through SonarQube or Semgrep, runs on every commit, alongside dependency and vulnerability scanning through Snyk or Dependabot and secrets scanning with push protection. Branches are protected, so no merge lands without human code review. On top of that pipeline, roughly every fifth prompt the model runs a security review of the whole system, which catches the drift that per-commit checks cannot see. At productionisation, an independent penetration test assesses the AI-built system in its production shape. On the engagement this method came from, the external pen test in month one covered the pre-existing product, and the test of what the method built is scoped into the productionisation phase, against the finished system and to the receiving organisation's standards.
How do you stop this creating a dependency on the person who built it?
Pair-program the entire build with an engineer from the receiving organisation, rather than building it separately and handing it over. On the engagement this method came from, the whole two-week build was paired with one of the client's own engineers, who at the end put themselves at 70% confident they could follow the process and deliver the next outcome without us. Seventy per cent after a fortnight is not full independence, but it is the difference between a client who has bought a proof of concept and one who has started to acquire a capability.
Does this replace engineers?
No. It moves where their time goes. The research, drafting, scaffolding and first-pass review compress dramatically; the judgement calls concentrate: resolving requirement contradictions with the business, deciding what to proceed without, and the last few percent of correctness where the model stops being reliable. Someone still has to know what good looks like, which is why an enforceable engineering standard matters more in this model, not less.
How do you keep AI-generated code maintainable?
By agreeing an enforceable engineering standard up front, so the model is generating against explicit rules rather than its own defaults. Tenhaw publishes the standard it uses as an open-source engineering handbook of 72 rules with stable identifiers, RFC 2119 severities and full rationale, designed to be enforced by an AI agent rather than remembered by a human.
Want this running inside your teams?
The method is published in full and you owe us nothing for using it. If you would rather have operators install it alongside your engineers and stay until it sticks, that is what an Embedded Agentic Lead engagement does.
Most organisations start with a fixed-price Agent-Readiness Audit · £30k–£90k · 6–8 weeks