# Rules with names

> Every behavioural rule is written as one line with three parts: a stable name, a directive, and either the name of the check that enforces it or a statement…

Page: Methodology · Start
Canonical: https://banes-lab.com/disciplined-methodology#rules-with-names

This section is stop 8 of 102 in the learning route. Previous: [07 - Where a rule lives](https://banes-lab.com/disciplined-methodology/start/from-chat-to-tree.md). Next: [09 - A seat is a contract](https://banes-lab.com/disciplined-methodology/start/a-seat-is-a-contract.md). It builds on [07 - Where a rule lives](https://banes-lab.com/disciplined-methodology/start/from-chat-to-tree.md).

Every behavioural rule is written as one line with three parts: a stable name, a directive, and either the name of the check that enforces it or a statement that no check can. [H1·a a policy file](https://banes-lab.com/disciplined-methodology#rules-with-names-panel-a) shows such lines, and [H1·b a rule record](https://banes-lab.com/disciplined-methodology#rules-with-names-panel-b) shows the shape they are read into. The name is what a correction attaches to and what a citation points to. When I correct the model, the correction is written down in the same turn as a named rule and a memory, so that the rule is there for the next session instead of the correction having to be given again, as shown in [H1·c a correction hardens](https://banes-lab.com/disciplined-methodology#rules-with-names-panel-c).

### A correction lands on a name

Instructions written as prose have no fixed place for a correction to attach to. The same correction is made in three sessions, each time as a new paragraph, and the three paragraphs end up contradicting each other. A correction with nowhere to attach is remembered by the developer and forgotten by the model, so it has to be given again the following week.

For this reason I keep behaviour as a set of named rules, so that a correction becomes permanent rather than being repeated. Each rule gets a name that a correction can attach to, rather than a paragraph that corrections are appended to. In practice, each rule is one line: a short stable name, a directive in the present tense, and the gate that enforces it. The name is cited wherever the rule applies. When a correction arrives, it is assigned to [one home](https://banes-lab.com/disciplined-methodology/build/one-home.md), the rule is written first, then its reason and how it applies, a memory is stored beside it, and every place it was written to is confirmed by searching rather than by recollection. What is captured is the kind of mistake the correction belongs to, never the single case that triggered it.

To check this, take the last correction you gave the model and look for its name among the rules. If it has no name, you will have to give it again. A rule may mention the measured failure that led to it, in the past tense and only inside that rule, because that clause is part of what the rule depends on. It describes the shape of the failure and how it showed up, never who caused it, when, or in what order.

The shape of the line is the whole design. A name is a stable identity, so a rule can be cited from a digest, a memory, a finding or another party's message without quoting its text, and the citation survives any rewording; the names are the [ubiquitous language](https://banes-lab.com/records/arch/ubiquitous-language.md) the developer, the model and the tooling share. A directive that fits on one line cannot hide a second instruction, so it reads as a single step. The gate field is the honest part: it names the check that enforces the rule, or it says that no artifact can show whether the rule held, and a rule that says neither has never been assessed. That field is written in exactly one place per rule, because a [single source of truth](https://banes-lab.com/records/arch/single-source-of-truth.md) allows no second place to declare it. A rule without its reason gets argued over again, and a rule without its application gets admired and ignored, so the digest that expands a rule carries both; a digest is an [architecture decision record](https://banes-lab.com/records/arch/architecture-decision-records.md) for one line of conduct.

The reason and the application are written in the developer's own sharpest words wherever there are any, because a paraphrase loses the distinction that made the correction necessary. For example, one wrong path becomes a rule about checking paths, and one missed reference becomes a rule about places that find files by pattern.

The rules are grouped into the ones that apply every turn and the ones that apply when a particular kind of task comes up, plus a small set of declared exceptions. That grouping helps the reader and means nothing to the checks. A check reads the gate field and never the heading, which is why a rule can move between groups without any mechanism noticing, and why a new rule is one added line rather than a new section.

Once parsed, a rule is a record, and that record is what the inventory, the coverage walk and the leak check all read; [coverage is derived](https://banes-lab.com/disciplined-methodology/verify/coverage-is-derived.md) from that inventory rather than counted. The gate field has two allowed forms, a check or conduct, rather than being optional, so a rule that declares neither cannot be written down at all; the unassessed state is impossible rather than merely discouraged.

H1·a a policy file

```markdown
## <rules that bite every turn>

- `read_before_claim`: a claim about a file is a lie until the file is read in this session · gate: conduct
- `finding_not_principle`: the model is directed with a location and a mismatch, never with a principle · gate: conduct
- `one_run_is_the_answer`: a check runs once per state and its first output is read whole · gate: conduct

## <rules that fire on a matching task>

- `rename_by_hand`: a move is done by hand, every reference enumerated before and verified after · gate: reference
- `ask_at_the_uncertainty`: a question is raised where it appears, with a recommendation, before the dependent work · gate: conduct
```

H1·b a rule record

```typescript
export type Tier = "always" | "situational" | "exception";
export type Gate = { readonly kind: "check"; readonly id: GateId } | { readonly kind: "conduct" };

export interface RuleRecord {
readonly slug: string;
readonly directive: string;
readonly tier: Tier;
readonly gate: Gate;
readonly locked: boolean;
readonly source: DocumentId;
}

export interface Digest {
readonly slug: RuleRecord["slug"];
readonly why: string;
readonly how: string;
readonly measured?: { readonly shape: string; readonly presents: string };
}
```

H1·c a correction hardens

```mermaid
flowchart TB
correction["A correction arrives"]
classify["Classified to one encoding"]
rule["One line · slug, directive, gate"]
reason["Its reason · why it exists"]
application["Its application · how it applies"]
memory["A memory file · the fact, its why, its how"]
search["Verified by search, never by recollection"]
correction --> classify --> rule --> reason --> application --> memory --> search
rule -. the class, never the instance .-> rule
```

## Links to

- [One home](https://banes-lab.com/disciplined-methodology/build/one-home.md)
- [Ubiquitous Language](https://banes-lab.com/records/arch/ubiquitous-language.md)
- [Single Source of Truth](https://banes-lab.com/records/arch/single-source-of-truth.md)
- [Architecture Decision Records (ADR)](https://banes-lab.com/records/arch/architecture-decision-records.md)
- [Coverage is derived](https://banes-lab.com/disciplined-methodology/verify/coverage-is-derived.md)

## Linked from

- [Three encodings](https://banes-lab.com/disciplined-methodology/start/three-encodings.md)
- [The behaviour document](https://banes-lab.com/disciplined-methodology/start/the-behaviour-document.md)
- [The developer and the model](https://banes-lab.com/disciplined-methodology/collaborate/the-human-and-the-ai.md)
