---
title: "Deterministic first"
url: /patterns/deterministic-first
description: "Code checks first. Model judgment comes second and is advisory."
---

## §0 · statement

# Deterministic first

Code checks first. Model judgment comes second and is advisory.

## §1 · why

### Why it works

A deterministic check gives the same answer every run, so a failure is a fact. A model's judgment varies, so it can rank and suggest but should not gate.

## §2 · example

### Copy this

```yaml
# CI order
- run: tz check && tz lint          # deterministic
- run: npm run check:raw-values     # deterministic
- run: npm run review:voice         # model, advisory: comments, never fails the job
```

## §3 · breaks

### Where it breaks

Some rules have no deterministic form, such as tone. Those stay advisory and are labelled so.

## §4 · cases

Used in: [Case 4](/cases/validator-for-a-banking-app), [Case 5](/cases/agent-first-foundation), and the [voice-and-tone plugin](/voice-and-tone).
