# The gate holds the line

> You can write a rule down and the model may follow it for a while, but nothing notices when it stops, which is why every rule in this method comes with a check.

Page: Methodology · Build
Canonical: https://banes-lab.com/disciplined-methodology/build#the-gate-holds-the-line

This section is stop 32 of 102 in the learning route. Previous: [17 - Detect, log, fix](https://banes-lab.com/disciplined-methodology/build/detect-log-fix.md). Next: [19 - The check comes first](https://banes-lab.com/disciplined-methodology/build/the-check-comes-first.md). It builds on [07 - Where a rule lives](https://banes-lab.com/disciplined-methodology/start/from-chat-to-tree.md).

You can write a rule down and the model may follow it for a while, but nothing notices when it stops, which is why every rule in this method comes with a check. [B1·a a check's events](https://banes-lab.com/disciplined-methodology/build#the-gate-holds-the-line-panel-a) shows what happens to that check once it exists. Every other rule depends on this one. The point is not strictness for its own sake: a rule held by a check costs the same to hold on the thousandth change as on the first, while a rule held by attention costs more each time. The checks are [fitness functions](https://banes-lab.com/records/arch/fitness-functions.md), and what they do is [policy enforcement](https://banes-lab.com/records/arch/policy-enforcement.md). The architecture page turns the same idea into an account of decay, in which [an anti-pattern is a decay path](https://banes-lab.com/software-architecture/decay/an-anti-pattern-is-a-decay-path.md), and the section [seven controls, seven classes](https://banes-lab.com/software-architecture/decay/seven-controls-seven-classes.md) places each anti-pattern by the check that was missing.

### The check is the rule

Convention does not survive contact with a model or with a tired developer. The team agrees on a rule, you tell the model about it, and a month later half the tree follows it, because nothing ever refused the other half. Convention decides a rule again at every use, and the model has no reason to decide it the same way twice.

For this reason I hold a rule with a check rather than with discipline. A rule holds only while a check enforces it: the model's attention and yours both drift, and the gate runs the check on every change regardless. The check ships in the same change as the rule, rather than the rule now and the check when it bites. In practice, the check is written the moment the pattern is introduced, and it is made to catch the pattern's bypasses too. When a violation slips past it, the check is extended before the content that slipped is touched, so the gate gets stronger before the cleanup. A check is never weakened, a case is never excluded to make the run green, and no tier softer than failure is added.

To check this, introduce the pattern's nearest bypass and confirm that the same check reports it. A check that catches the pattern but not its bypass holds the line on one side only. A pattern that no static check can catch is a question for the developer who owns the work, not a license to skip the check. The honest answer to that question is a rule declared unobservable, with the evidence a check would need written beside it.

The check is the fix, and the content edit is the cleanup. The order matters because a repaired instance with an unrepaired check is the same defect waiting for its next instance, and the developer or the model who found it has already spent the attention it would take to find it again. A caught duplicate, a caught escape hatch and a better approach discovered mid-task all call for the same response: the affected rule is extended to cover the shape.

Every check returns pass or fail, which applies [fail fast](https://banes-lab.com/records/arch/fail-fast.md) to the gate. There is no warning tier and no advisory level, because a middle tier would let a run finish as successful while a failure is still open, and the verdict is binary to prevent exactly that. A red result that is tolerated is [flaky test normalization](https://banes-lab.com/records/arch/flaky-test-normalization.md) under another name. Severity survives only as the order in which failures are repaired, never as a softer verdict, so a check that would warn is either promoted to a failure or deleted. The same refusal covers exclusions. A finding is resolved by fixing the code, or by proving that it tests a false premise, in which case the finding is deleted; it is never resolved by widening an exemption or disabling the rule for one file.

B1·a a check's events

```mermaid
flowchart TB
pattern["A new pattern enters the tree"]
ships["The check ships in the same change, with a planted violation"]
slips["A violation slips past the check"]
appended["The check is extended first, then the content is repaired"]
inconvenient["A finding is inconvenient"]
stays["It stays a finding · no warn tier, no exclusion"]
disagree["Two checks disagree on one line"]
derived["Both stay on · the form that satisfies both is derived"]
uncheckable["A pattern no static check can catch"]
surfaced["Surfaced as a question, never used as license"]
pattern --> ships
slips --> appended
inconvenient --> stays
disagree --> derived
uncheckable --> surfaced
ships ~~~ slips
appended ~~~ inconvenient
stays ~~~ disagree
derived ~~~ uncheckable
```

## Links to

- [Fitness Functions](https://banes-lab.com/records/arch/fitness-functions.md)
- [Policy Enforcement](https://banes-lab.com/records/arch/policy-enforcement.md)
- [An anti-pattern is a decay path](https://banes-lab.com/software-architecture/decay/an-anti-pattern-is-a-decay-path.md)
- [Seven controls, seven classes](https://banes-lab.com/software-architecture/decay/seven-controls-seven-classes.md)
- [Fail Fast](https://banes-lab.com/records/arch/fail-fast.md)
- [Flaky Test Normalization](https://banes-lab.com/records/arch/flaky-test-normalization.md)

## Linked from

- [Three encodings](https://banes-lab.com/disciplined-methodology/start/three-encodings.md)
- [One chain](https://banes-lab.com/disciplined-methodology/ship/one-chain.md)
