# Deterministic tests beat written instructions for enforcing agent rules

> Original title: Deterministic tests > Written instructions

- Source: Santiago
- Published: 2026-10-31T13:10:00.000Z
- Bad Influence: https://badinfluence.news/items/j3uwxa999mfk1v8uql0r1wbvz
- Original: https://x.com/svpino/status/2116518048664625215

## Summary

Santiago argues that anything checkable should be enforced by deterministic tooling rather than written instructions. He lists unit and integration tests for behavior, formatters and linters for formatting, static type checkers for types, schema validation for API contracts, and static analysis and security scans for security. He says telling an agent to follow rules that tests could enforce wastes tokens.

## Post

Deterministic tests > Written instructions

Anything that should be checked automatically should have a test case:

• Checking behavior → Unit and integration tests
• Checking formatting → Formatters and linters
• Checking types → Static type checkers
• Checking API contracts → Schema validation
• Checking edge cases → Targeted tests
• Checking regressions → Regression tests
• Checking security → Static analysis and security scans

Don't waste tokens telling an agent to follow rules you could enforce with deterministic tests.
