All free guides
Free guide
Ship with AI coding agents, safely
An adoption framework for an AI-assisted software delivery lifecycle (AI-SDLC). It is the process behind more than 5,000 merged pull requests on two production platforms.
Download PDFAlso in Deutsch, Español
One production SaaS built with this process, anonymized
- pull requests merged in ten months
- 3,025
- automated test files
- 1,048
- serverless functions
- 160
- apps: web, iOS and Android
- 3
What's inside
1. Write the guardrails first
- A short instruction file per repository: architecture, conventions, what the agent may and may not do.
- Hard rules: authentication, payments, data deletion and secrets always need a human approval.
- Agents never touch production data or real customer accounts, only test accounts.
2. Keep every change small and reversible
- One ticket, one pull request. Branch protection and a PR-only workflow, no direct pushes.
- Database migrations idempotent and dry-run against the target database before merge.
3. Staging first, always
- Every change reaches a staging environment before production, with the same build and config.
- Only changed functions or services are deployed, to keep each release small.
4. Verify like a user
- Unit and end-to-end tests, plus type-check and lint baselines that can only improve.
- An AI browser test in a real Chrome: the flow described in plain language, a pass or fail with errors and a fix prompt.
5. Analyse the impact before production
- A short table per release: what changes, who is affected, the risk and the way back.
- A human approves the production merge.
6. Ship and watch
- Smoke tests on vital routes after every deploy, and the deploy turns red if one breaks.
- Outcome monitoring, and one issue opened automatically per failure, closed when it recovers.
7. Close the loop
- Customer replies drafted by the agent and sent by a person.
- Every lesson goes back into the instruction files, so the process improves itself.
Rolling it out, by company size
- Startup: guardrails, staging and browser checks in one to two weeks. Speed comes from the loop, not from skipping it.
- Mid-sized company: one pilot team for four to six weeks, a security review, then the rollout to the other teams.
- Enterprise: governance first: an approved model and provider list, data classification, local models for sensitive code, an audit trail and a platform team that enables the others.
What to measure
- Lead time from ticket to production, change failure rate, merged pull requests per week and bugs found by users.
Mistakes I see most often
- Agents pushing straight to the main branch, or holding production credentials.
- Pull requests with thousands of lines that nobody can really review.
- Skipping staging because the tests are green.
- No instruction file, so every session starts from zero and repeats old mistakes.
- Measuring lines of code instead of lead time and change failure rate.
Want this running in your team?
Book a 30-minute callGet in touch
Tell me what you're building. I'll reply within 1–2 business days.

- Company
- MADO Consulting
- Follow me on LinkedIn
Available worldwide, remote. On-site on request, depending on the country.
Opens Calendly's booking calendar here. Loading it sends data to Calendly (see Impressum).