The AI Engineering Standard. 12 rules for shipping AI-written code safely.

AI coding tools have made writing code cheap. They have not made it safe.

These are the twelve rules ZionX builds its own products under, taken from the ZionX Standard. They apply the same way to engineers and to AI agents, because the risk lies in the change itself, whoever writes it.

Read the rules Download as PDF

Six stages, and a gate between each.

Work moves through defined stages, from exploration to production to hand-over. An assurance gate in CI checks the evidence at each step, and nothing merges or ships until it passes.

A gate stands between each stage. It stays locked until the evidence is in.

  1. Stage 1 of 6

    Exploration

    Try ideas quickly to learn what works. Throwaway code is fine, and nothing reaches real users or real data.

    Gate to Demonstration

    Evidence: A written goal and what the exploration showed.

  2. Stage 2 of 6

    Demonstration

    Show a working slice to the people who will use it, on sample data only.

    Gate to Build

    Evidence: An approved design and acceptance criteria.

  3. Stage 3 of 6

    Build

    Write production code against the approved design. Every change carries its tests and an independent review.

    Gate to Production

    Evidence: Tests, security scans and review all pass on the exact release candidate.

  4. Stage 4 of 6

    Production

    The tested artefact is released to real users unchanged, never rebuilt.

    Gate to Operations

    Evidence: Monitoring, a rollback path and current release evidence are in place.

  5. Stage 5 of 6

    Operations

    The service runs live: hosted, monitored against agreed SLOs, with regular insight reports on use, cost and reliability. Changes still go through the same gates.

    Gate to Hand-over

    Evidence: A recorded decision to hand over or retire, with the new owner ready or users told, and data accounted for.

  6. Stage 6 of 6

    Hand-over

    Hand the service to its long-term owner with runbooks, access and records, or retire it cleanly: data deleted or returned, access removed.

The twelve rules

Before code

  1. Every project declares its stage.

    An experiment, a demo, a build heading for production and a live service carry different risks, so each needs a different bar. The project records its stage, and the stage decides which checks are due. Raising the stage is a reviewed change, not a feeling.

  2. Design is approved before code starts.

    An agent can write a thousand lines before anyone asks whether they should exist. New features start from an agreed design and acceptance criteria. "Just try it" is fine in an experiment and never fine on the way to production.

  3. Decisions are written down, and replaced rather than rewritten.

    Architecture decisions go into short decision records. When a decision changes, a new record supersedes the old one, and the old one stays. The next engineer, or the next agent, can see what was decided and why.

While building

  1. Every change carries its own tests.

    A pull request that changes behaviour includes the tests that prove it. Coverage is measured on the changed lines, not as a project average that old code can hide behind.

  2. Nobody approves their own work, human or AI.

    The author of a change, whether a person or an agent, never counts as its reviewer. Reviewing one model's output with another model helps, but it is not independent review.

  3. AI agents get the least access that works.

    Agents work on branches in their own workspace. They cannot push to the main branch, cannot reach production credentials, and cannot change the rules that check them.

Before merge

  1. The main branch is protected, for everyone.

    Required checks must pass before anything merges, and that includes administrators. Rules live on the server, where they cannot be skipped from a laptop.

  2. Security scanning blocks, it does not just report.

    Leaked secrets, vulnerable dependencies and known insecure patterns fail the pull request. A scan that only prints a warning gets ignored within a week.

Before release

  1. Build once, promote the same thing.

    The artefact that passed testing is the one that reaches production, promoted unchanged. Rebuilding for production means shipping something nobody tested.

  2. Every release earns its way to production.

    Each release needs current evidence on the exact candidate: tests, scans, reviews and acceptance. Last month's green build says nothing about today's change, and urgency never lowers the bar.

Always

  1. Exceptions are signed, time-boxed and visible.

    When a rule cannot be met, someone accountable signs a risk acceptance with an expiry date and a compensating control. Exceptions are never allowed on security basics such as secrets, access and data protection, and they lapse on their own.

  2. Status is never claimed without evidence.

    "Done", "tested" and "secure" mean there is a record showing it. A passing gate also says what it did not check, because green means nothing visible is wrong, not that nothing is wrong.

Speed comes from the standard, not from cutting corners.

We build our own products under this standard, and we bring client teams to it.

ZionX helps engineering teams adopt these rules in their own pipelines, with the checks that enforce them.

Take the readiness check Book a review

Download as PDF