Home › Learn › Checks as code

Learn · spec-driven delivery · free guide

Checks as code, and the Ops gate

A checklist in a document tells people what should be true. A check as code states it precisely, attaches evidence, and can be run the same way on every project. This page explains the idea, shows how discovery, architecture and operations gates can all be built from it, and gives a detailed Ops gate checklist, in categories, so a project knows what it will be tested on before it starts.

Teach first

A document says. A check proves.

Every project has a checklist somewhere: a sheet of things to confirm before go-live. Most are written once, copied from the last project, ticked by whoever is in a hurry, and never read again. The idea of a check as code is to write the same expectations in a precise, structured form, keep them with the project, and attach evidence to each.

A documentwritten onceread at the endticked by a personcopies driftwhat is true is unknownA check as codeversioned with the projectrun at every changeevidence attachedone source, visible differenceswhat is proven is counted

The same expectations, written two ways. Only the second can be run, counted and trusted.

A document checklistA check as code
Where it livesA Word, Excel or PDF file, copied aroundIn a repository, next to the code
When it is writtenOnce, at the startContinuously, with history
Who reads itThe author, at the endEveryone, at every change
What counts as evidenceA tick by a personEvidence attached; some checks run themselves
DriftCopies diverge and old versions circulateOne source; differences are visible
Same for every projectEach project edits its own copyOne spec; 'applies when' rules trim it
RepeatabilityDepends on who runs itSame inputs, same result
CoverageUnknownCounted: passed, failed, not yet known
Cost of checkingManual every timeAutomatable for the checkable part
WeaknessIgnored once the deadline nearsNeeds upfront work; can be gamed; not everything is checkable
In one line: checks as code do not remove judgement. They make each judgement explicit, owned, evidenced and repeatable.

Spec-driven

The spec comes first. The checks follow.

In spec-driven development, a specification says what must be true, and everything else is derived from it. The same works for gates. The spec of a good discovery, a good design or a ready-to-run system is written once. The checks come from it. A gate runs the checks against evidence, and reports what is proven, failed and not yet known.

The specwhat must be trueThe checksderived from the specThe evidencedocuments, logs, testsThe reportproven, failed, unknownThe gatepass, conditional,not yetwhat the gate teaches us updates the spec, and so the checks

One spec, many gates. A gate is a view of the spec, not a new document.

The wider idea is on the spec-driven development pages, and for data platforms in spec-driven data platforms.

Anatomy

What one check looks like

The project review that this site already publishes works this way: 198 checks, each a small structured record, filterable by stage and role (see the checks and the open repository). The Ops gate uses the same fields.

id: OPS-REC-02
title: A restore has been tested, and the time measured
question: >
  Has someone restored the data and configuration from backup into a clean
  environment, with the time measured and compared with the agreed target?
why: >
  The backups ran for a year. The first real restore failed because the keys
  were not backed up. Recovery took three days instead of three hours.
applies:
  kind: [any]
  components: [storage, platform]
owner: operations
also: [tech-anchor]
evidence:
  docs: [recovery-document, restore-test-record]
  looks_like: A dated test record with the measured time and who ran it.
severity: blocker
due: 8            # lifecycle stage
fail_fast: Ask in discovery where backups live and who has ever restored one.
verify: drill
FieldWhat it holds
idA stable name, such as OPS-REC-02.
titleThe check in one sentence.
questionThe question a reviewer asks.
whyWhat goes wrong without it, in one story.
appliesWhen it applies: kind of project, components, patterns, such as 'AI in scope'.
ownerThe role accountable for passing it.
evidenceWhat must be shown: documents and what 'good' looks like.
severityBlocker, major, minor.
dueThe lifecycle stage by which it should be ready.
fail_fastThe cheapest early test to know if it will pass.

Four levels of verification

LevelWhat it meansExample
ManualA person looks at evidence and decides.Is the runbook usable? Are the definitions owned?
Semi-automatedA script collects the evidence; a person judges it.List all accounts that run production jobs; a person decides if each is allowed.
AutomatedThe check runs and returns pass or fail.Did the last 30 loads alert on a deliberate failure? Is any secret in the code?
DrillA rehearsal proves it works under stress.Restore from backup. Roll back a release. Run the runbook cold.

The gates

Each gate is a spec of checks

Requirementsstage 1 to 2Discoverystage 4Architecturestage 4Build readystage 5Teststage 7OPS GATEstage 8 to 9Closestage 10Each gate is a spec of checks, published in advance. The Ops gate is the final one before production.

Seven gates. The first two are largely covered by the existing project review. The Ops gate is written out in full below.

GateStageThe questionDecidesWhat it checksStatus
Requirements checklist1 to 2Is the request clear enough to estimate?BA lead, PMA subset of the project review checks on requirements, scope and stakeholders.Exists (subset)
Discovery gate4Is it worth doing, and do we know how?Sponsor, business ownerProject review checks for discovery; the discovery document; fail-fast test results.Exists
Architecture gate4Will the design work, safely, at cost, for operations?Client architect, security, our architectDesign checks from the project review, plus the vendor and cloud review findings.To derive from the checks
Build readiness5Can the team build and release from day one?Tech Anchor, client ITEnvironments, access, pipeline, standards.To derive
Test gate7Are the numbers right, and proven?Business owners, test leadAcceptance, reconciliation, performance and recovery evidence.To derive
Ops gate8 to 9Can operations run it at 3 a.m. without the builders?Operations, with security and the business ownerThe checklist below.New, on this page
Project close10Were the benefits delivered, and can support change it alone?SponsorBenefits report; hand-over pack.To derive

Requirement, discovery, architecture and close are views onto the same spec, filtered by stage and role. The project review already covers much of the first four. See also Reviews and sign-offs.

How a gate runs

No surprises at the gate

  1. Pre-flight. Run the checks yourself, weeks before the gate. The gate holds no surprises.
  2. Evidence pack. Gather the evidence for each check in one place, named by check ID.
  3. Gate review. Reviewers go through the report, not the whole pack. Open items only.
  4. Decision. Pass, conditional pass, or not yet. Written, with names and dates.
  5. After. Conditions tracked to closure. Lessons feed back into the spec.

Three outcomes

DecisionWhenWhat happens
PassNo open blockers. Every category has a named owner who has signed. Majors are fixed or accepted in writing with dates.Go to production.
Conditional passNo open blockers. A short list of majors, each with an owner and a date before or soon after go-live.Go, with conditions tracked weekly.
Not yetAny open blocker, or a category with no owner.Do not go. Fix, then re-run only the failed checks.

The Ops gate

The final gate before production: 101 checks in 14 categories

The question: can operations run this at 3 a.m. without the builders? Operations meet the project once, at the end. If the project knows what they will test, it can prepare for months. Start with the categories. Open the checks only where you are weak.

50 of the 101 checks are blockers. The Ops gate passes when no blocker is open and every category has a named owner who has signed. Checks marked 'applies when AI or agents are in scope' can be skipped otherwise.

Ownership and support · 6 checks · owners: Operations, PM
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-OWN-01A named owner for the system, with a deputyOwner register entryOperationsblockermanual5
OPS-OWN-02Support model agreed: hours, tiers, response times, who answersSupport page signed by operationsOperationsblockermanual5
OPS-OWN-03Escalation path from first line to the build team and vendors, with names and numbersContact sheet, tested oncePMmajordrill8
OPS-OWN-04On-call rota covers the agreed hours for the first 90 daysRotaOperationsblockermanual8
OPS-OWN-05The support team has made one real change without the buildersChange recordPMmajordrill9
OPS-OWN-06Vendor support contracts and contacts are in placeContract and contact listPMmajormanual8
Runbook and documentation · 7 checks · owners: BA, Operations, PM, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-RUN-01A runbook exists for each job: what it does, normal duration, how to rerunRunbookTech Anchorblockermanual7
OPS-RUN-02Someone who did not build it has followed the runbook and succeededTest noteOperationsblockerdrill8
OPS-RUN-03Known failure modes and their fixes are listedFailure listTech Anchormajormanual8
OPS-RUN-04The architecture picture and data flow are currentDocument with a dateTech Anchormajormanual8
OPS-RUN-05The data dictionary and metric catalogue are publishedLinkBAmajormanual8
OPS-RUN-06Lineage from source to report is documentedLineage document or tool viewTech Anchormajorsemi-automated8
OPS-RUN-07The decision log and open risks are handed overLogPMminormanual9
Monitoring and alerting · 7 checks · owners: Operations, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-MON-01Every job failure alerts a named person, not a shared mailboxAlert test resultTech Anchorblockerautomated7
OPS-MON-02Late or missing data is detected and alerted (freshness)Alert test resultTech Anchorblockerautomated7
OPS-MON-03Data quality check failures raise an alertAlert test resultTech Anchorblockerautomated7
OPS-MON-04Unusual volumes (too few or too many rows) raise an alertAlert configurationTech Anchormajorautomated7
OPS-MON-05One operations dashboard shows pipeline healthDashboard linkTech Anchormajormanual8
OPS-MON-06Alerts were tested by breaking something on purposeTest recordOperationsblockerdrill8
OPS-MON-07No alert is routinely ignored; noise has been reviewedReview noteOperationsminormanual9
Recovery and resilience · 8 checks · owners: Operations, PM, Sponsor, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-REC-01A backup or recovery method exists for the data and the configurationRecovery documentTech Anchorblockermanual7
OPS-REC-02A restore has been tested, and the time measuredRestore test recordOperationsblockerdrill8
OPS-REC-03Recovery targets (how long, how much data loss) are agreed and metAgreement and test resultSponsormajordrill8
OPS-REC-04Any job can be rerun safely without double countingRerun testTech Anchorblockerautomated6
OPS-REC-05A failed night can be recovered, including catching upDrill recordTech Anchorblockerdrill8
OPS-REC-06Raw data is kept so the pipeline can be rebuilt from itDesign and retention settingTech Anchormajormanual6
OPS-REC-07Behaviour when a source is late or down is defined and testedDocument and testTech Anchormajordrill7
OPS-REC-08A failure drill has been held with operationsDrill reportPMblockerdrill8
Release and deployment · 8 checks · owners: PM, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-REL-01Release is by pipeline, with no manual stepsPipeline runTech Anchorblockerautomated5
OPS-REL-02The same code runs in test and production; settings are kept apartConfiguration reviewTech Anchorblockersemi-automated6
OPS-REL-03Rollback has been rehearsedRehearsal reportTech Anchorblockerdrill8
OPS-REL-04A cut-over plan exists, with timings and ownersPlanPMblockermanual8
OPS-REL-05Release notes and version tags existNotesTech Anchorminormanual8
OPS-REL-06Secrets are in a secret store, not in codeScan resultTech Anchorblockerautomated6
OPS-REL-07The change approval route is agreed with client ITProcessPMmajormanual5
OPS-REL-08Test and production environments match closely enoughComparisonTech Anchormajorsemi-automated7
Data quality and reconciliation · 8 checks · owners: BA, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-DQ-01Data quality checks run on every loadRun logTech Anchorblockerautomated6
OPS-DQ-02Thresholds are agreed with the data ownersThreshold sheetBAmajormanual5
OPS-DQ-03Reconciliation to the trusted report is signed by financeSigned reconciliationBAblockermanual7
OPS-DQ-04The plan to reconcile the first production load is agreedPlanBAmajormanual8
OPS-DQ-05Rejected rows are counted and reviewed by a named personReview recordBAmajormanual7
OPS-DQ-06Late and corrected records give the right numbers (demonstrated)DemoTech Anchormajorautomated7
OPS-DQ-07Deletes at the source are reflected correctlyTest resultTech Anchormajorautomated7
OPS-DQ-08A quality scorecard is visible to the business ownersScorecard viewBAminormanual8
Data operations · 6 checks · owners: BA, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-DAT-01The load schedule and dependencies are documented and agreed with source ownersSchedule pageTech Anchorblockermanual6
OPS-DAT-02A process exists for source schema changes: notice, test, releaseProcess pageTech Anchormajormanual7
OPS-DAT-03A backfill and history reload procedure is written and testedProcedure and testTech Anchormajordrill7
OPS-DAT-04The historical load is complete and reconciledReconciliationBAblockermanual8
OPS-DAT-05Manual steps (file uploads, approvals) are listed and owned; none are hiddenManual steps listTech Anchormajormanual7
OPS-DAT-06Retention and archive jobs are scheduledScheduleTech Anchorminormanual8
Security and access · 9 checks · owners: Client IT, Security, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-SEC-01Access follows least privilege, by roleAccess matrixSecurityblockermanual6
OPS-SEC-02Roles have been tested with real people in each roleTest recordTech Anchorblockerdrill7
OPS-SEC-03No shared or personal accounts run production jobsAccount reviewTech Anchorblockerautomated6
OPS-SEC-04Keys and secrets rotate, with known ownersRotation recordTech Anchormajorautomated8
OPS-SEC-05Data is encrypted in transit and at restConfigurationTech Anchorblockerautomated6
OPS-SEC-06Audit logs capture who accessed what, kept for the agreed timeLog configurationSecuritymajorautomated7
OPS-SEC-07The security review is done and findings are closed (vulnerability scan; penetration test where required)ReportSecurityblockermanual7
OPS-SEC-08An access review process exists for joiners, movers and leaversProcessSecuritymajormanual8
OPS-SEC-09Network paths are approvedApprovalClient ITblockermanual6
Privacy and compliance · 7 checks · owners: BA, PM, Privacy, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-PRV-01Personal and sensitive data is classifiedClassification listBAblockermanual3
OPS-PRV-02Lawful basis and purpose are recorded for each useRegisterPrivacyblockermanual4
OPS-PRV-03Masking is applied where roles must not see dataTest resultTech Anchorblockerautomated7
OPS-PRV-04Retention rules are set and deletion is testedDeletion testTech Anchorblockerdrill7
OPS-PRV-05Data location (residency) meets the rulesReviewPrivacyblockermanual4
OPS-PRV-06A privacy impact assessment is done where requiredAssessmentPrivacymajormanual4
OPS-PRV-07Third-party terms allow this use of the dataTerms summaryPMmajormanual4
Performance and capacity · 6 checks · owners: Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-PRF-01A run at production volume finishes inside the window, with marginLoad testTech Anchorblockerautomated7
OPS-PRF-02Key reports meet the agreed response times at production volumeTest resultTech Anchorblockerautomated7
OPS-PRF-03Concurrent users have been tested to the expected peakTest resultTech Anchormajorautomated7
OPS-PRF-04There is at least 12 months of growth headroomForecastTech Anchormajormanual8
OPS-PRF-05Peak days (month-end, year-end) have been rehearsedRehearsalTech Anchormajordrill8
OPS-PRF-06Loads have been checked not to harm the sourceTest noteTech Anchormajormanual7
Cost and FinOps · 6 checks · owners: PM, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-CST-01A monthly budget exists, with an ownerBudget recordPMblockermanual4
OPS-CST-02Cost allocation tags are on all resourcesScan resultTech Anchormajorautomated6
OPS-CST-03A cost alert fires on a jumpAlert testTech Anchormajorautomated8
OPS-CST-04A 12-month cost forecast existsForecastTech Anchormajormanual8
OPS-CST-05Idle resources shut down automaticallyConfigurationTech Anchorminorautomated8
OPS-CST-06A monthly cost review is scheduledCalendar entryPMminormanual9
Consumer readiness · 7 checks · owners: BA, PM, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-CON-01Every consumer is named, with an owner and contactConsumer registerBAmajormanual5
OPS-CON-02Users have access and licencesAccess checkPMblockermanual7
OPS-CON-03User acceptance is signed by the business ownersSigned acceptanceBAblockermanual7
OPS-CON-04Reports show when the data was last updated, and its sourceReport viewTech Anchormajormanual7
OPS-CON-05Training and a support route for users existTraining recordPMmajormanual8
OPS-CON-06Old reports have an agreed switch-off dateAgreementBAmajormanual4
OPS-CON-07Users have been told about go-live and what changesCommunicationPMminormanual8
Governance and sign-off · 7 checks · owners: PM, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-GOV-01Open defects are listed, and each is fixed or accepted in writingDefect listPMblockermanual8
OPS-GOV-02The risk register is current, with ownersRegisterPMmajormanual8
OPS-GOV-03Design review findings are closedFindings logTech Anchorblockermanual7
OPS-GOV-04Vendor review findings are recorded as decisionsDecision logTech Anchormajormanual7
OPS-GOV-05Exceptions to this gate are recorded, with an owner and an expiryException listPMmajormanual8
OPS-GOV-06A hypercare plan with exit criteria existsPlanPMblockermanual8
OPS-GOV-07Sign-offs are collected: acceptance, security, operationsSign-off registerPMblockermanual8
AI and agent operations only when AI or agents are in scope · 9 checks · owners: BA, Operations, Risk, Security, Tech Anchor
IDCheckEvidenceOwnerSeverityHow verifiedPrepare by stage
OPS-AIO-01Evaluation results meet the thresholds for this releaseEvaluation reportTech Anchorblockerautomated7
OPS-AIO-02Guardrails are tested with attack and misuse casesTest resultSecurityblockerautomated7
OPS-AIO-03High-impact actions need human approval, with a queue and an ownerDesign and testBAblockermanual6
OPS-AIO-04Model, prompt and tool versions are recorded and can be rolled backConfiguration and rollback testTech Anchorblockerdrill7
OPS-AIO-05Cost per task is measured and within budgetReportTech Anchormajorautomated7
OPS-AIO-06Quality, drift and cost are monitored, with alertsDashboard and alert testTech Anchorblockerautomated7
OPS-AIO-07A Responsible AI review is done and the risk tier recordedReview recordRiskblockermanual4
OPS-AIO-08The incident process covers AI failures: wrong answers, injection, outageProcess and drillOperationsmajordrill8
OPS-AIO-09A kill switch exists and has been testedTest recordTech Anchorblockerdrill8

This is a starting spec. Trim it with 'applies when', add what your organisation needs, and keep it in the project's repository.

Prepare

Do the work early. The gate is the last check, not the first

WhenPrepare
Stage 3 to 4Classify sensitive data. Record lawful basis. Agree budget and owner. Agree the old-report switch-off date. Run the Responsible AI review if AI is in scope.
Stage 5Name the owner and the support model. Agree release route. Release from a pipeline from day one. Name consumers.
Stage 6Make jobs safe to rerun. Move secrets to a store. Switch on data quality checks. Tag resources. Document schedules and dependencies.
Stage 7Alerts for failure, freshness and quality. Reconciliation signed. Load and performance tests. Security review. Role tests. Test acceptance.
Stage 8Runbook followed cold by someone else. Restore tested. Rollback rehearsed. Failure drill. Cut-over plan. Hypercare plan. Collect sign-offs.
GateRun the whole checklist. Decide.

What can go wrong

Eight ways gates fail

What goes wrongHow it happensWhat it costsPrevention
Gate theatreSignatures with no evidence.Problems reach productionEvidence for each check; spot-check by a reviewer
Gate at the very endNobody sees the checklist until the week before.A rush, then a delayPublish at stage 2; run pre-flight at stage 5 onwards
Checklist bloatEvery incident adds a check and none are removed.People stop reading itReview the spec each quarter; remove what never fails
One size for every projectThe same 105 checks for a small report.Resentment and skipped checks'Applies when' rules; tiers by risk
Waivers without expiry'We will do it after go-live.'It never happensExceptions have an owner and an expiry
Automating what you do not understandA check passes because it tests the wrong thing.False confidenceRun each automated check against a known failure
Gates owned by nobodyNo one can say stop.A gate that never stops anythingName the decider, and protect them
Only the build team ticksOperations see it first at go-live.Operations reject it lateOperations own their categories from stage 5

FAQ

Questions people ask

What is the difference between a checklist and checks as code?

A checklist is a document that people read and tick. Checks as code are written in a structured, versioned form, so they can be applied the same way every time, reported on, and partly automated. The thinking is the same. The discipline is higher.

Do all checks need to be automated?

No. Many are judgements. The point of 'as code' is that each check is stated precisely, has evidence, an owner and a severity, and lives with the project, whether a person or a script verifies it.

Why one Ops gate instead of many?

Operations meet the project once, at the end, and decide whether to take it. A single published gate means they know what they will test, and the project knows what to prepare, months ahead.

Is 105 checks too many?

Not as a menu. Each category has a few checks and an owner, and the 'applies when' rules remove many. Use the categories to see where you stand, and open the checks only where you are weak.

How does this connect to spec-driven development?

A spec says what must be true. Checks are derived from the spec, and run against evidence. When the spec changes, the checks change with it, and the gate report shows which parts of the spec are proven.

Go further

Related pages