Skip to content

🛡️ Deterministic Controls ​

🛡️ Deterministic ControlsGuards, gates, contracts & probes

Guards, gates, contracts, and probes are executable rules that return pass or fail.

Why ​

Agents generate changes faster than people can review them. Safety rules must run automatically.

A squad or agent should have to work hard to do something unsafe, and should never have to work hard to do something safe.

A written policy is not a control until it is executable.

Deterministic Controls and Persistent Context ​

Deterministic controls are not the same thing as Persistent Context, but they are part of it.

  • Different jobs. Context guides the model; controls enforce rules with pass/fail results.
  • Same distribution. Controls are versioned skills in a shared or project repository. Projects install and run them like other context. See coding-pal.

Automated checks and deterministic controls ​

Both are deterministic: a script returns pass or fail, never an opinion. They differ in what they check.

Automated checksDeterministic controls
WhatCompiler and build, type checks, linters, and automated tests generated with the codeGuards, gates, contracts, and probes
PurposeProve the code worksProve the change is safe to merge and release
Where they runIn the agent harness in 4 — Code, then again in the CI on the pull request in 5 — ProveThe same two places
Can the agent change them?The agent writes the tests, so it can edit themThe rules and scripts are fixed, and the agent runs them but does not change them. Generated test suites are held to account by Criteria Test Verification and Mutation Testing

Run checks in the agent harness for fast fixes. Repeat them in clean CI, with CI-only controls such as preview smoke tests.

The controls ​

ControlTypeRuns inEnforcementPurpose
Secret & Push ProtectionGuardAgent harness, commit time, and CIPlatform git hooks & CIBlocks commits containing credentials, tokens, or private keys immediately
Policy-as-CodeGuardAgent harness and CIOpen Policy Agent (OPA) / ConftestEnforces infrastructure, security, and cloud configuration rules deterministically
License & SAST ScanGuardAgent harness and CISemgrep / Snyk / TrivyBlocks unauthorized open-source licenses and known vulnerable dependencies
Clean CI Re-runGateCI (backstop)CI in a clean environmentRepeats the checks and controls on the pull request, where the agent cannot influence the result
Criteria Test VerificationGateAgent harness and CITest runnerProves that 100% of acceptance criteria from the Plan record have passing assertions
Mutation Testing BarGateAgent harness and CIStryker / MutmutProves that generated test suites are meaningful and actually catch injected defects
Contract & Schema CompatibilityContractAgent harness and CIOpenAPI / JSON Schema / PactProves that changes do not break external consumers or downstream APIs
API TestsContractAgent harness and CIHTTP API tests (for example Supertest)Proves each endpoint returns the agreed status codes and responses
Fuzz TestsProbeCI (preview)API fuzzing from the OpenAPI spec (for example RESTler)Proves the API handles unexpected and malformed input without errors or crashes
Database TestsGateAgent harness and CISQL assertions against a migrated databaseProves the schema and migrations behave as specified
E2E TestsProbeCI (preview)Browser tests of real user journeys (for example Playwright)Proves the main journeys work on the running application
Preview Smoke TestsProbeCI (preview)Ephemeral previewProves the application starts, routes traffic, and responds to health checks

How the controls get stronger ​

7 — Learn feeds back into this page: a defect or rollback that a control should have caught earlier becomes a stricter gate, threshold, or probe.

Failure mode to avoid ​

Controls that fire constantly on false positives get disabled. Each control has an owner who watches its signal-to-noise ratio; a control that is routinely bypassed is either fixed or removed, never left as decorative.

Published and maintained by ALTEN