agentic coding / governance

The AI-native software lifecycle: a playbook for UK engineering teams that have to pass an audit

AI writes the code faster than your process can review, test and release it. A six-stage playbook for UK teams of 5 to 50 engineers that keeps ISO 27001 and Cyber Essentials evidence intact while the speed goes up.

A developer workstation with code on a laptop and two monitors in a bright office

Most engineering teams have let AI into the build stage and nowhere else. Code now arrives in hours, then waits days for review, testing and a change board that still meets on Thursdays. The fix is not more AI in the editor. It is a lifecycle where every stage leaves a written artefact the next stage can read, where the rules your auditor cares about are enforced by tooling rather than by meetings, and where a person still signs off anything that needs judgement.

This playbook walks the six stages: what changes in each, the first move to make, the guardrail to put in before you scale it, and how to tell whether it is working. It is written for UK teams of 5 to 50 engineers who hold ISO 27001, are working towards Cyber Essentials Plus, or supply customers who ask about both.

the tools this applies to

Code is no longer the slow part

A year ago, writing the code was the long pole in most projects. In teams using agentic coding tools, that is no longer true. A well-briefed agent produces a working feature branch in an afternoon. What has not changed is everything around it: the ticket that took a week to write, the security review queue, the test suite nobody trusts, the fortnightly release window and the change advisory board.

a typical change, idea to production / days 05101520 Write the ticket5 days, in meetings Write the codehours, with an agent Security review4 days in the queue Testing and fixes3 days, often skipped Change board, releaseup to 7 days for the next window the build stage shrank to hours / everything around it still runs on the calendar
Illustrative timings for a typical change. The build stage has collapsed. The rest of the lifecycle has not moved.

The result is a lifecycle running at two speeds. Code arrives faster than the process can absorb it, so one of two things happens. Either the review queue grows and the speed gain evaporates, or the code ships under-reviewed and the audit finds out later.

For a UK organisation that holds ISO 27001, is working towards Cyber Essentials Plus, or supplies a regulated firm, the second outcome is the expensive one. The controls were designed for a world where code was scarce. They need re-building for a world where it is cheap.

this is not an argument for removing controls

Every control objective in ISO 27001 Annex A still stands: change management, separation of duties, secure development, logging, access control. What changes is the enforcement. A rule written in a policy document and checked at a monthly meeting becomes a rule written in a configuration file and checked on every commit. The auditor gets better evidence, not less.

What an AI-native lifecycle actually is

The phrase sounds like marketing. The practical definition is simple. An AI-native software development lifecycle has three properties.

  1. Every stage commits an artefact the next stage can read. The idea becomes an intent document. The intent becomes a specification. The specification becomes a plan. The plan becomes a diff with tests. The diff becomes a pull request with review findings. The incident becomes a record that feeds the next intent. All of it lives in version control, so the git history is the audit trail.
  2. The rules are enforced by the tooling, not by the calendar. Protected paths, secrets handling, formatting, test gates, deployment approvals. Each one is a hook or a pipeline step that runs every time, with no exception process to schedule.
  3. A person stays accountable for every decision that needs judgement. The agent proposes. The engineer accepts the plan. The code owner approves the pull request. The service owner approves the production change. None of those signatures moves to the machine.
01 / planPlanCapture the idea once, properly.commits: intent.md 02 / designDesignSpec from the intent, under your rules.commits: spec.md 03 / buildBuildPlan accepted, then code, guardrails on.commits: plan.md, the diff, the tests 04 / testTestChecks pass before a person looks.commits: green run, evals 05 / deployDeployReviewed both ways. Gates in the pipeline.commits: PR with review findings 06 / maintainMaintainBounded diagnosis. Findings become intents.commits: incident record six stages, one loop / every stage commits an artefact the next can read
Six stages, one loop. Each card names the artefact that stage commits to version control.

Here is how the six stages shift.

StageTraditionalAI-native
PlanA ticket written by one person, refined over weeks of meetingsAn intent document, drafted in a working session with the agent, committed in hours
DesignA design document that drifts from the codeA specification generated from the intent, constrained by your security and brand rules
BuildEngineers write code, then ask for reviewThe agent proposes a plan, the engineer accepts it, the agent implements with guardrails on
TestA suite run at the end, often skipped under pressureThe agent runs the checks before a human sees the work, and iterates until they pass
DeployA release window and a change boardA pull request reviewed by the agent and a person, with approval gates in the pipeline
MaintainAlerts go to a rota, fixes go to the backlogAlerts start a bounded diagnosis, and the finding becomes the next intent

Stage 1: Plan

What changes. The idea is captured once, properly, as a short intent document in the repository. Not a Jira ticket with three lines and a screenshot. A page that says what problem exists, who has it, what done looks like, and what must not change. The agent helps draft it by asking the questions a good analyst would ask, and the product owner corrects it.

First move. Pick one feature in the backlog that has been stuck. Spend 45 minutes with an agent and the person who wants the feature. Write the intent. Commit it. Compare it with the ticket that existed before.

Guardrail. An intent template that forces the questions your auditor will ask later: what data is touched, who can see it, what the rollback is. Make the template part of the repository so it cannot be skipped.

How to measure it. Time from first conversation to committed intent. This should fall from weeks to a day. The lagging measure is how many intents the product owner accepts without rewriting.

Stage 2: Design

What changes. The intent becomes a specification in one working session, and the specification is constrained by rules you have already written down: how authentication works here, which data classes may leave the UK, what the logging standard is, which components the front end must use. Those rules are stored as reusable instructions the agent reads every time, so every specification starts from the same baseline.

First move. Write down the five rules every design in your organisation must follow. Most teams have them in people's heads and in a Confluence page from 2021. Put them in the repository as a short file the agent loads.

Guardrail. The specification must flag anything it could not satisfy from the rules, rather than silently working around it. That flag is what goes to the security lead for a decision.

How to measure it. Time from intent to specification, and the number of specification changes after the build starts. Rising churn means the design stage is being skipped.

Stage 3: Build

What changes. Nothing is implemented without an accepted plan. The agent reads the specification, proposes a step-by-step plan, and waits. The engineer edits it, accepts it, and only then does the agent write code. Once the guardrails below are proven, routine work can run with less supervision. Until then, every change is reviewed before it lands.

First move. Switch the default to plan-first on one repository. It feels slower for a fortnight and then it feels obvious.

Guardrails. This is where most of the governance work sits, and it is all configuration rather than policy.

  • A short, maintained instructions file at the root of the repository: what the project is, how to run the tests, what the conventions are. Keep it under a page. When the agent makes the same mistake twice, the correction goes in the file.
  • Protected paths. The agent may not touch infrastructure definitions, secrets, migration scripts or the payment module without a person in the loop.
  • Pre-commit hooks that run the formatter, the linter and a secrets scan on every change, agent or human.
  • Reusable skills for the things that must be done the same way every time: how a new API endpoint is reviewed for security, how a database migration is written, how a feature flag is added.

Legacy systems. If the real source of truth for a system lives outside the repository, in a 15-year-old ticketing tool or a vendor's portal, decide now which artefact the agent trusts. The minimum is a link from the repository to the external record. Without it, the agent builds against a fiction.

How to measure it. Share of changes that land with an accepted plan attached. Reverts per hundred changes. Both are visible in git.

Stage 4: Test

What changes. The agent verifies its own work before an engineer sees it. It runs the unit tests, the integration tests, the linter and the security scan, reads the failures, fixes them and runs again. What reaches the engineer has already passed. If a test fails, the fix goes in the code, never in the test.

First move. Give the agent one reliable command that runs the whole check. If you do not have one, that is the first piece of work, and it pays for itself in the first week.

Guardrail. A small, growing set of real tasks that the agent is run against whenever its instructions, skills or hooks change. Twenty is enough to start. Every production incident adds one. A change to the agent's configuration that lowers the pass rate does not merge. This is the AI-native version of stage-gate QA, and it is the evidence an auditor will ask for when they want to know how you control the tool.

How to measure it. Pass rate on first submission, and the number of review comments per pull request that are about correctness rather than style.

Stage 5: Deploy

Two engineers reviewing code together on a laptop
Review runs in both directions. The agent reviews human pull requests and a named code owner still approves the agent's.

What changes. Review runs in both directions. The agent reviews human pull requests and humans review the agent's. The agent review is structured: a pass for bugs, a pass for security, a pass for compliance, with findings sorted into "must fix" and "minor" and a cap on the minor ones so the review stays readable. A named code owner still approves. Then the pipeline, not a meeting, decides whether the change can go to production.

First move. Add the agent as a reviewer on one repository, read-only, for a month. Look at what it catches that the team missed, and what it flags that was noise. Tune it, then let it block.

Guardrails. Approval gates in the pipeline. A production deployment requires a passing test run, a passed security scan, an approval from a code owner and, for regulated systems, a second approval from someone who did not write the change. The gates are the same whether the author was a person or an agent. For organisations with ISO 27001 scope, the gate configuration is itself a controlled file: nobody changes the rules without a reviewed change.

How to measure it. Lead time from merged pull request to production, change failure rate, and the number of changes that went through an exception process. The last one should trend to zero.

Stage 6: Maintain

What changes. Alerts, tickets and scheduled checks can start the agent without a person. The work is bounded. At a mild deviation it logs. At a clear one it diagnoses, read-only, and writes up what it found. Only at a severe, pre-agreed threshold does it act, and only by running a runbook a person approved in advance or by opening a pull request for review. Every finding that needs real work becomes a new intent document, and the loop starts again.

First move. Take the three alerts that woke someone up most often last quarter. Write the diagnosis steps the on-call engineer runs for each. Let the agent run those steps and post the result, with no power to change anything.

Guardrail. The thresholds and the allowed actions live in a configuration file in the repository, reviewed like code. The agent's production credentials are scoped to what the runbooks need and nothing more.

How to measure it. Mean time to diagnosis, and the share of incidents where the post-mortem was written and filed within a day.

Where to start in the next 30 days

Do not try to change all six stages at once. The order that works, in our experience, is guardrails first and autonomy last.

01Guardrails firstInstructions file, protected paths, pre-commit hooks.two days 02Plan-first by defaultOne repository. Nothing implemented without an accepted plan.one week 03The test loopOne command runs every check. The agent runs it before handover.one week 04Intent documentsProduct owners join once engineers trust the build loop.two weeks 05Review and deploy gatesThe security lead agrees the gates from a month of evidence.week four 06MaintainOnly when everything above has proved trustworthy.last the first thirty days / guardrails before autonomy
The adoption order. Each step makes the next one safe.
  1. Build guardrails first. The instructions file, protected paths, pre-commit hooks. Two days. This is what makes everything else safe.
  2. Then plan-first. Switch one repository to plan mode as the default. One week to feel normal.
  3. Then the test loop. One command that runs every check, and the agent running it before handover. One week.
  4. Then the intent document. Once engineers trust the build loop, product owners will want in. Two weeks of practice.
  5. Then review and deploy gates. With a month of evidence, the security lead has what they need to agree the gates.
  6. Maintain last. It needs everything above to be trustworthy first.

Keep a one-page record of what changed and when. It is the first thing your auditor will want and the first thing your board will ask for.

where trustrak fits

Our Agentic Readiness Audit looks at exactly this: where your lifecycle is today, which guardrails are missing, and what order to put them in. It is fixed scope and you get a written plan whether or not you continue with us. The Agentic Coding Sprint then builds the first three stages inside your team, on real tickets, in two weeks. Book a free 30-minute readiness call and we will tell you plainly where you stand.

questions people ask
Does this only work with one vendor's tools?

No. The playbook is about artefacts, gates and evidence. Claude Code, GitHub Copilot, Cursor and the others all support instruction files, hooks and plan-first working in some form. We lead with Claude Code because its guardrail model is the most complete for regulated work, but the lifecycle is the same.

Will our ISO 27001 auditor accept agent-written code?

Auditors assess controls, not authors. If every change has an accepted plan, passed tests, a scan and a named approver, and the history shows it, the evidence is stronger than most human-only teams can produce. What auditors reject is an agent with production access and no record of what it did.

We are five engineers. Is this overkill?

The guardrails take two days and the plan-first switch takes a week. Small teams get the benefit faster because there is less process to replace. Skip the maintain stage until you have a production system that pages someone.

more insights

Keep reading.

next step

Not sure where to start?

Book a free 30-minute readiness call. We tell you plainly what you need, roughly what it costs, and whether you need us yet.

Book a free readiness call→