# SteerSpec diagnostic codes

Each code has a page at `https://steerspec.dev/docs/diagnostics/<CODE>/`.

- [CHK002](https://steerspec.dev/docs/diagnostics/CHK002/) (Warning): Config does not match its schema. .strspc/config.yaml does not match the published config.v1 schema. The check continues. Fix: Correct the key or value the message names in `.strspc/config.yaml`.
- [CHK003](https://steerspec.dev/docs/diagnostics/CHK003/) (Warning): Inherited rules not evaluated. An entity declares inherits in a source with no realm.json, so its inherited rules are not evaluated. Fix: Add a `realm.json` to the rule source so that the `inherits` target resolves, or remove `inherits`.
- [EC001](https://steerspec.dev/docs/diagnostics/EC001/) (Info): Evaluation cache recreated. The evaluation cache file was corrupt and has been discarded and recreated. Fix: No action is needed. Verdicts lost with the old cache are evaluated again on the next run.
- [RD000](https://steerspec.dev/docs/diagnostics/RD000/) (Error): Entity file unavailable for comparison. The base or head entity file is nil, cannot be read, or cannot be parsed. Fix: Check that the file exists and parses at both versions, and that both git refs are available.
- [RD001](https://steerspec.dev/docs/diagnostics/RD001/) (Error): Invalid Draft body edit. A Draft rule body was edited without incrementing the revision, or together with a state change. Fix: Change the body in its own change, apart from any state change, and raise the revision by exactly 1. `strspc rule update` does this.
- [RD002](https://steerspec.dev/docs/diagnostics/RD002/) (Error): Immutable rule body edited. The body of a rule that has left Draft was edited. Fix: Restore the original body. To change the text, add a replacement with `strspc rule supersede`.
- [RD003](https://steerspec.dev/docs/diagnostics/RD003/) (Error): Illegal state transition. A state transition is not allowed by the state machine (§3.2). Fix: Use only D→P, D→A, P→I, I→R and R→T; `A` and `T` are final. `strspc rule promote`, `retire` and `abandon` apply these.
- [RD004](https://steerspec.dev/docs/diagnostics/RD004/) (Error): Invalid new rule. A new rule has revision ≠ 0 or state ≠ D, or new rule numbers are not consecutive. Fix: Add rules with `strspc rule add`, which starts them at revision 0 in state `D` with the next number.
- [RD005](https://steerspec.dev/docs/diagnostics/RD005/) (Error): Deleted content. A rule, sub-entity or entity file present in the base version was deleted. Fix: Restore what was deleted. To end a rule, abandon it from Draft with `strspc rule abandon` or take it to `T` with `strspc rule retire`.
- [RD006](https://steerspec.dev/docs/diagnostics/RD006/) (Warning): Superseded rule not retired. A superseding rule reached I but the superseded rule is missing or not in state R. Fix: Retire the superseded rule with `strspc rule retire`, or restore it if it is missing.
- [RD007](https://steerspec.dev/docs/diagnostics/RD007/) (Error): Rule set version not raised. rule_set.version is not valid semver or not strictly higher than the base version. Fix: Set `rule_set.version` to a valid semantic version above the base version.
- [RD008](https://steerspec.dev/docs/diagnostics/RD008/) (Error): Invalid rule set hash. rule_set.hash cannot be computed or differs from the Blake3 hash of the head file. Fix: Run `strspc entity rehash <EUID>`. Make later changes through `strspc rule` and `strspc note`, which keep the hash valid.
- [RD009](https://steerspec.dev/docs/diagnostics/RD009/) (Error): Rule set timestamp unchanged. rule_set.timestamp is unchanged from the base version. Fix: Update `rule_set.timestamp` to the time of the change. `strspc rule` and `strspc note` commands do this.
- [RD010](https://steerspec.dev/docs/diagnostics/RD010/) (Error): Rule number reused. A new rule reuses a rule number present in the base version. Fix: Give the new rule the next unused number. `strspc rule add` picks it.
- [RD011](https://steerspec.dev/docs/diagnostics/RD011/) (Error): Missing added_by. A new rule or new note has an empty added_by. Fix: Set `added_by` to the contributor's email address or `@handle`.
- [RD012](https://steerspec.dev/docs/diagnostics/RD012/) (Error): Append-only note removed or retyped. An append-only note (changelog, supersedes, extends, related) was removed or retyped. Fix: Restore the note as it was, and add a new note for any correction.
- [RD013](https://steerspec.dev/docs/diagnostics/RD013/) (Error): Note revision out of step. A note's content or type changed without its revision incrementing by exactly 1, or its revision changed without a content or type change. Fix: Raise the note's revision by exactly 1 with each content or type change, and leave it alone otherwise. `strspc note update` does this.
- [RD014](https://steerspec.dev/docs/diagnostics/RD014/) (Error): Note removed. A note that is not append-only and is present in the base version was removed. Fix: Restore the note. Revise it with `strspc note update` instead of removing it.
- [RD015](https://steerspec.dev/docs/diagnostics/RD015/) (Error): Invalid new note revision. A new note has revision ≠ 0. Fix: Set the new note's revision to 0, or add it with `strspc note add`.
- [RD016](https://steerspec.dev/docs/diagnostics/RD016/) (Error): Append-only note edited. The content of an append-only note changed. Fix: Restore the note as it was, and add a new note for any correction.
- [RD017](https://steerspec.dev/docs/diagnostics/RD017/) (Error): Inheritance changed after Draft. inherits changed on an entity whose base version has a rule beyond Draft, or was removed on one whose base version has a Published or Implemented rule. Fix: Restore `inherits`. It is fixed once a rule has left Draft, so give a different parent to a new entity. To drop it, first retire the entity's rules.
- [RD018](https://steerspec.dev/docs/diagnostics/RD018/) (Error): Override changed after Draft. overrides was added, removed or retargeted on a rule that has left Draft. Fix: Restore `overrides`. To override a different target, add a new rule with `strspc rule add --overrides`.
- [RD019](https://steerspec.dev/docs/diagnostics/RD019/) (Error): Malformed added_by. A new rule or new note has an added_by that is not an email address or @handle. Fix: Write `added_by` as an email address or an `@handle`.
- [RD020](https://steerspec.dev/docs/diagnostics/RD020/) (Info / Error): Visibility changed. visibility changed. Info for a new or changed value, naming the realm.version bump a narrowing or widening needs; Error when the key is removed. Fix: Set `public` explicitly rather than removing the key. Bump `realm.version` as the message says.
- [RD021](https://steerspec.dev/docs/diagnostics/RD021/) (Error): Revision moved without a body change. A rule's revision changed with no edit to it: an edit is a change to the body, or one to the overrides or supersedes of a Draft rule, by one revision (NTE-018). Fix: Restore the revision. It counts edits to the rule, and a note never moves it.
- [RD022](https://steerspec.dev/docs/diagnostics/RD022/) (Error): Standard note retyped. A note changed to or from type standard other than through reference, or a withdrawal to reference changed its content (NTE-017, NTE-019). Fix: Retype a `standard` note only to `reference`, with its content unchanged, and only `reference` back to `standard`.
- [RE001](https://steerspec.dev/docs/diagnostics/RE001/) (Warning / Error): Rule violated. The diff violates a rule; Error when the rule's state is in fail_on, Warning otherwise. Fix: Change the code to satisfy the rule, or supersede the rule if it no longer holds. The `fail_on` setting decides whether a violation blocks.
- [RE002](https://steerspec.dev/docs/diagnostics/RE002/) (Warning): AI evaluation failed. The AI provider failed for a rule or entity, or returned no verdict or an unrecognized one. Fix: Read the provider error in the message and run the check again. The affected rules were not judged; this warning never blocks on its own.
- [RE003](https://steerspec.dev/docs/diagnostics/RE003/) (Info): AI evaluation skipped. AI evaluation skipped because the evaluator runs in static-only mode. Fix: No action is needed for a static run. To evaluate rules with AI, set `evaluator.provider` to `claude` and provide `ANTHROPIC_API_KEY`.
- [RE004](https://steerspec.dev/docs/diagnostics/RE004/) (Info): Nothing to evaluate. The diff is empty; nothing to evaluate. Fix: No action is needed. If you expected changes, check the refs being compared.
- [RF001](https://steerspec.dev/docs/diagnostics/RF001/) (Error): Citation of an unknown rule. The cited rule does not exist in the sources, or the citation names a Realm that is not one of them. Fix: Correct the rule ID or its Realm qualifier, or add the Realm to the sources the check reads.
- [RF002](https://steerspec.dev/docs/diagnostics/RF002/) (Error): Citation of an abandoned rule. The cited rule is in state A. Fix: Cite a rule still in force, or remove the citation.
- [RF003](https://steerspec.dev/docs/diagnostics/RF003/) (Warning): Citation of a retired rule. The cited rule is in state R or T, whether or not a rule supersedes it. Fix: Cite the rule that replaced it, if there is one, or remove the citation.
- [RF004](https://steerspec.dev/docs/diagnostics/RF004/) (Error): Citation of a superseded rule. The cited rule, in D, P or I, is superseded by a rule in I, R or T. Fix: Cite the rule that supersedes it, which the message names.
- [RF005](https://steerspec.dev/docs/diagnostics/RF005/) (Warning): Citation of a rule being replaced. The cited rule, in D, P or I, is superseded by a rule in P, so it stays in force until that rule reaches I (§3.3). Fix: Move the citation to the replacement, which the message names, before that rule reaches `I`.
- [RF006](https://steerspec.dev/docs/diagnostics/RF006/) (Warning): Citation of a Draft rule. The cited rule is in state D and no rule supersedes it. Fix: Promote the rule with `strspc rule promote`, or cite a rule already Published.
- [RF007](https://steerspec.dev/docs/diagnostics/RF007/) (Error): Copied rule body. The text holds the whole body of a rule of five words or more, ignoring case, punctuation and line breaks. Fix: Replace the copied text with a citation of the rule's ID, which the message names.
- [RL000](https://steerspec.dev/docs/diagnostics/RL000/) (Error): Entity file unreadable. The entity file is nil, or a file or directory cannot be read while scanning. Fix: Check that the file or directory exists and is readable.
- [RL001](https://steerspec.dev/docs/diagnostics/RL001/) (Error): Invalid entity JSON. The file is not valid JSON or does not parse into the entity structure. Fix: Fix the JSON syntax, or the field whose type does not match the entity structure.
- [RL002](https://steerspec.dev/docs/diagnostics/RL002/) (Info / Error): Schema validation failed. Info if no schema fetcher is set; Error if the schema fails to load or validation fails. Fix: Fix the fields the schema error names. If the schema failed to load, check the `dev.steerspec.core` version the Realm pins and your network connection. The Info form means the caller set no schema fetcher, so validation was skipped.
- [RL003](https://steerspec.dev/docs/diagnostics/RL003/) (Error): Malformed EUID. The EUID is not 3–18 alphanumeric characters. Fix: Use an entity ID of 3 to 18 letters and digits, with no separators, and change the rule IDs to match.
- [RL004](https://steerspec.dev/docs/diagnostics/RL004/) (Error): Malformed rule ID. A rule ID is not <EUID>-<NNN>, or its prefix differs from the entity ID. Fix: Write the rule ID as `<EUID>-<NNN>`, with exactly three digits and the entity's ID as the prefix.
- [RL005](https://steerspec.dev/docs/diagnostics/RL005/) (Error): Rule numbers out of sequence. Rule numbers are duplicated or not sequential from 001. Fix: Number the rules from 001 with no gaps or repeats. Restore a deleted rule rather than renumbering the others.
- [RL006](https://steerspec.dev/docs/diagnostics/RL006/) (Error): Unknown rule state. A rule state is outside D, A, P, I, R, T. Fix: Set the state to one of `D`, `A`, `P`, `I`, `R` or `T`.
- [RL007](https://steerspec.dev/docs/diagnostics/RL007/) (Error): Sub-entity parent mismatch. A sub-entity parent differs from the containing entity ID. Fix: Set the sub-entity's `parent` to the ID of the entity that contains it.
- [RL008](https://steerspec.dev/docs/diagnostics/RL008/) (Error): Note references a missing rule. A note rule_ref names a rule that does not exist in the same entity. Fix: Point `rule_ref` at a rule in this entity, or add the rule it names.
- [RL009](https://steerspec.dev/docs/diagnostics/RL009/) (Error): Malformed note ID. A note ID is not <rule_id>/<NN>, or its prefix differs from rule_ref. Fix: Write the note ID as `<rule_id>/<NN>`, with exactly two digits and the same rule ID as `rule_ref`.
- [RL010](https://steerspec.dev/docs/diagnostics/RL010/) (Error): Unknown note type. A note type is outside the closed enum. Fix: Use one of `rationale`, `example`, `counter_example`, `reference`, `applies_to`, `changelog`, `clarification`, `deprecation_notice`, `supersedes`, `extends` or `related`.
- [RL011](https://steerspec.dev/docs/diagnostics/RL011/) (Error): Invalid rule set hash. rule_set.hash is malformed, cannot be computed, or differs from the Blake3 hash of the file. Fix: Run `strspc entity rehash <EUID>`. Make later changes through `strspc rule` and `strspc note`, which keep the hash valid.
- [RL012](https://steerspec.dev/docs/diagnostics/RL012/) (Warning): Superseded rule not found. A rule's supersedes names a rule ID not found in the scanned files. Fix: Correct the rule ID in `supersedes`, or include the file that holds the rule in the scan.
- [RL013](https://steerspec.dev/docs/diagnostics/RL013/) (Error): Invalid rule set version. rule_set.version is not valid semver. Fix: Set `rule_set.version` to a semantic version such as `1.2.0`.
- [RL014](https://steerspec.dev/docs/diagnostics/RL014/) (Warning): Note reference not found. A supersedes/extends/related note references an unqualified rule ID that was not found. Fix: Correct the rule ID, or qualify it as `<realm-id>:<EUID>-NNN` if the rule lives in another Realm.
- [RL015](https://steerspec.dev/docs/diagnostics/RL015/) (Error): Note numbers out of sequence. Note numbers under a rule are duplicated or not sequential from 01. Fix: Number the notes under each rule from 01 with no gaps or repeats.
- [RL016](https://steerspec.dev/docs/diagnostics/RL016/) (Warning): Inheritance target not found. An unqualified inherits target is not an entity in the scanned files, or an unqualified overrides target is not a rule in them. Fix: Correct the target, or qualify it with its Realm, as in `<realm-id>:<EUID>-NNN`, if it lives in a dependency.
- [RL017](https://steerspec.dev/docs/diagnostics/RL017/) (Error): Duplicate override. Two live rules of one entity override the same target. A rule is live unless it is A or T or a rule that is not A supersedes it. Fix: Keep one override of the target. Abandon a Draft duplicate with `strspc rule abandon`, or replace a later-stage rule with `strspc rule supersede`.
- [RL018](https://steerspec.dev/docs/diagnostics/RL018/) (Error): Inheritance chain invalid. An inherits chain followed through the scanned files (or, for a single file, through its own entities) is cyclic or longer than three hops. Fix: Change `inherits` so the chain visits no entity twice and ends within three hops.
- [RL019](https://steerspec.dev/docs/diagnostics/RL019/) (Warning): Body reference not found. The body of a D, P or I rule references an unqualified rule ID that was not found. Text in backticks is ignored. Fix: Correct the rule ID, or wrap the text in backticks if it is not a reference.
- [RL020](https://steerspec.dev/docs/diagnostics/RL020/) (Warning): Reference to an abandoned rule. The body of a D, P or I rule, or an extends/related note on one, references an unqualified rule ID in state A. Text in backticks is ignored in bodies. Fix: Point the reference at a rule still in force. In a body, wrap the ID in backticks if it is not a reference.
- [RL021](https://steerspec.dev/docs/diagnostics/RL021/) (Warning): Rule body has no key word. A D rule's body has no key word from KWRD-002 to KWRD-006, or DEFINES. Text in backticks and rule IDs are ignored. Fix: Reword the rule around a key word such as MUST or SHOULD, or `DEFINES` for a definition, with `strspc rule update`.
- [RL022](https://steerspec.dev/docs/diagnostics/RL022/) (Warning): Rule body has several sentences. A D rule's body has more than one sentence (RUL-004). Text in backticks is ignored. Fix: Cut the body to one sentence with `strspc rule update`, and put any further requirement in its own rule.
- [RL023](https://steerspec.dev/docs/diagnostics/RL023/) (Error): Unknown visibility. An entity declares a visibility other than private, protected or public (ENT-011). Fix: Use one of the three values, or remove the field to take the default.
- [RL024](https://steerspec.dev/docs/diagnostics/RL024/) (Error): Sub-entity wider than its container. A sub-entity declares a visibility wider than the effective visibility of the entity containing it (ENT-015). Fix: Narrow the sub-entity, or remove the field to take the container's visibility.
- [RL025](https://steerspec.dev/docs/diagnostics/RL025/) (Error): Superseding across entities. A rule's supersedes names a rule of another entity (RUL-012). Fix: Supersede within the same entity. To reuse another entity's rule, inherit it or cite it in a `related` note.
- [RL026](https://steerspec.dev/docs/diagnostics/RL026/) (Warning): Inline example. A D rule's body, or a note on one of a type other than example and counter_example, holds such as, e.g., for example or cf. (NTE-020). Text in backticks is ignored. Fix: Move the example to a note of type `example`, or wrap the text in backticks if it is not an example.
- [RL027](https://steerspec.dev/docs/diagnostics/RL027/) (Info): Rule body may hold two statements. A D rule's body has more than one key word, so it may hold two statements (RUL-004). Text in backticks and rule IDs are ignored. Fix: Split the rule if it makes two statements. A relative clause with its own key word is still one statement, and needs no change.
- [RL028](https://steerspec.dev/docs/diagnostics/RL028/) (Error): Invalid standards entry. An entry of entity.standards has a bad id, an unknown relation or a url that is not http or https, or repeats an id (STDREF-002 to STDREF-004, STDREF-008). Fix: Use a dot-separated lowercase `id`, a `relation` of `implements` or `derived_from`, and an absolute http or https `url`.
- [RL029](https://steerspec.dev/docs/diagnostics/RL029/) (Error): Malformed standard note. The content of a standard note is not <id>:<clause>, where the clause is printable with no space around it (NTE-014). Fix: Write the standard's `id`, a colon and a clause that is not blank.
- [RL030](https://steerspec.dev/docs/diagnostics/RL030/) (Error): Duplicate standard note. A rule holds two standard notes with the same content (NTE-015). Fix: Keep one note. To withdraw the other, retype it to `reference`.
- [RL031](https://steerspec.dev/docs/diagnostics/RL031/) (Error): Undeclared standard. The <id> of a standard note matches no reference declared by the entity, an entity containing it, its Realm or that Realm's parent (NTE-016). Fix: Declare the standard in a `standards` array, or fix the `id`. An `inherits` declaration passes on no references.
- [RM001](https://steerspec.dev/docs/diagnostics/RM001/) (Error): Realm manifest unreadable. realm.json cannot be read or parsed. Fix: Check that `realm.json` exists, is readable and holds valid JSON.
- [RM002](https://steerspec.dev/docs/diagnostics/RM002/) (Info / Error): Realm schema validation failed. Info if no schema fetcher is set; Error if the schema fails to load or validation fails. Fix: Fix the fields the schema error names. If the schema failed to load, check the `dev.steerspec.core` version the Realm pins and your network connection. The Info form means the caller set no schema fetcher, so validation was skipped.
- [RM003](https://steerspec.dev/docs/diagnostics/RM003/) (Error): Missing _schema/ directory. _schema/ is missing, inaccessible, or not a directory. Fix: Create `_schema/` as a directory in the Realm, holding the schemas of the core version it pins.
- [RM004](https://steerspec.dev/docs/diagnostics/RM004/) (Error): Missing entity schema. _schema/entity.v1.schema.json is missing or inaccessible. Fix: Add `_schema/entity.v1.schema.json`, copied from the `dev.steerspec.core` release the Realm pins.
- [RM005](https://steerspec.dev/docs/diagnostics/RM005/) (Info / Error): Entity files not linted. Info if no rule linter is configured; Error if a path cannot be accessed or the walk fails. Fix: Check that the reported path exists and is readable. The Info form means the caller set no rule linter, so entity files were skipped.
- [RM006](https://steerspec.dev/docs/diagnostics/RM006/) (Error): Duplicate EUID in the Realm. The same EUID appears in more than one entity or sub-entity of the realm. Fix: Rename one of the entities so that each EUID appears once in the Realm.
- [RM007](https://steerspec.dev/docs/diagnostics/RM007/) (Error): Invalid Realm identity. realm.id is missing or not reverse-domain notation, or realm.version is missing or not semver. Fix: Set `realm.id` in reverse-domain notation, such as `dev.example.billing`, and `realm.version` to a semantic version.
- [RM008](https://steerspec.dev/docs/diagnostics/RM008/) (Error): Invalid sub-realm entry. A sub_realms entry is not a clean directory name, or its directory does not exist. Fix: Make the entry a plain directory name inside the Realm, and create that directory if it is missing.
- [RM009](https://steerspec.dev/docs/diagnostics/RM009/) (Error): Sub-realm manifest invalid. A sub-realm has no realm.json, or it cannot be parsed. Fix: Give the sub-realm a valid `realm.json`. `strspc realm add-subrealm` scaffolds one.
- [RM010](https://steerspec.dev/docs/diagnostics/RM010/) (Error): Sub-realm ID mismatch. A sub-realm realm.id is not <parent id>.<directory name>. Fix: Set the sub-realm's `realm.id` to `<parent id>.<directory name>`.
- [RM011](https://steerspec.dev/docs/diagnostics/RM011/) (Error): Nested sub-realms. A sub-realm declares its own sub_realms. Fix: Remove `sub_realms` from the sub-realm: Realms nest one level only. Declare the Realm on the top-level manifest instead.
- [RM012](https://steerspec.dev/docs/diagnostics/RM012/) (Error): EUID collision with a sub-realm. An EUID in a sub-realm collides with the parent realm or a sibling sub-realm. Fix: Rename one of the entities so that each EUID appears once across the parent and its sub-realms.
- [RM013](https://steerspec.dev/docs/diagnostics/RM013/) (Error): Sub-realm sets a rule identifier format. A sub-realm realm.json sets rule_identifier_format; a sub-realm inherits its parent's format (RLM-015). Fix: Remove `rule_identifier_format` from the sub-realm's `realm.json`, and set it on the parent if you need it.
- [RM014](https://steerspec.dev/docs/diagnostics/RM014/) (Error): Dependency pin mismatch. A dependency's version differs from the release tag in its github:// source, or the dependency's own manifest declares another realm.id or realm.version. Fix: Make the dependency's `version`, the tag in its `source` and its own manifest agree.
- [RM015](https://steerspec.dev/docs/diagnostics/RM015/) (Warning): _schema/ differs from the pinned core. A file in _schema/ holds different JSON from the file of the same name in the pinned dev.steerspec.core, or cannot be compared with it. Files the core lacks are ignored, as are core files the Realm lacks. Skipped when the fetched core is not the one pinned, which RM014 reports. Fix: Copy the file from the pinned `dev.steerspec.core` release into `_schema/`, or pin the release you meant.
- [RM016](https://steerspec.dev/docs/diagnostics/RM016/) (Warning): Dependency unavailable. A pinned dependency or its manifest cannot be fetched or read, so the manifest half of RM014 and any RM015 comparison with it could not run. Fix: Check the dependency's `source`, your network connection and your GitHub token, then run the check again.
- [RM017](https://steerspec.dev/docs/diagnostics/RM017/) (Error): Sub-realm sets a language. A sub-realm realm.json sets realm.language; a sub-realm inherits its parent's language (RLM-018). Fix: Remove `language` from the sub-realm's `realm.json`, and set it on the parent if you need it.
- [RM018](https://steerspec.dev/docs/diagnostics/RM018/) (Error): Invalid realm standards entry. An entry of realm.standards has a bad id, an unknown relation or a url that is not http or https, or repeats an id (STDREF-002 to STDREF-004, STDREF-008). Fix: Use a dot-separated lowercase `id`, a `relation` of `implements` or `derived_from`, and an absolute http or https `url`.
- [RR000](https://steerspec.dev/docs/diagnostics/RR000/) (Error): Realm resolution interrupted. The context was cancelled or timed out during resolution. Fix: Run it again with a longer timeout, or find what cancelled it.
- [RR001](https://steerspec.dev/docs/diagnostics/RR001/) (Error): Invalid dependency source. A dependency source is empty, absolute, or escapes the repository root of the realm's origin. Fix: Use a relative path that stays inside the repository, or a `github://<owner>/<repo>@<ref>[/<path>]` reference.
- [RR002](https://steerspec.dev/docs/diagnostics/RR002/) (Error): Dependency cannot be loaded. Dependency directory or realm.json cannot be loaded, or an entity file is unreadable or invalid. Fix: Check that the directory holds a valid `realm.json`, then run `strspc realm validate` on it to find the entity file at fault.
- [RR003](https://steerspec.dev/docs/diagnostics/RR003/) (Error): Dependency Realm ID mismatch. A dependency's realm.id differs from the declared realm_id. Fix: Set `realm_id` to the `realm.id` in the dependency's `realm.json`, or point `source` at the Realm you meant.
- [RR004](https://steerspec.dev/docs/diagnostics/RR004/) (Error): Dependency version mismatch. A dependency's realm.version differs from the declared version. Fix: Set `version` to the `realm.version` in the dependency's `realm.json`, or point `source` at the release you meant.
- [RR005](https://steerspec.dev/docs/diagnostics/RR005/) (Error): EUID collision between Realms. An EUID collides between the parent realm and a dependency, or between two dependencies. Fix: Rename the entity in a Realm you own, or drop one of the colliding dependencies.
- [RR006](https://steerspec.dev/docs/diagnostics/RR006/) (Error): Realm depends on itself. A dependency's realm_id is the realm or sub-realm that declares it. Fix: Remove the dependency: a Realm or sub-realm cannot depend on itself.
- [RR007](https://steerspec.dev/docs/diagnostics/RR007/) (Error): Invalid sub-realm entry. A sub_realms entry is not a clean directory name, or its directory does not exist. Fix: Make the entry a plain directory name inside the Realm, and create that directory if it is missing.
- [RR008](https://steerspec.dev/docs/diagnostics/RR008/) (Error): Sub-realm manifest unreadable. A sub-realm's realm.json cannot be loaded. Fix: Give the sub-realm a valid `realm.json`. `strspc realm add-subrealm` scaffolds one.
- [RR009](https://steerspec.dev/docs/diagnostics/RR009/) (Error): Sub-realm ID mismatch. A sub-realm realm.id is not <parent id>.<directory name>. Fix: Set the sub-realm's `realm.id` to `<parent id>.<directory name>`.
- [RR010](https://steerspec.dev/docs/diagnostics/RR010/) (Error): Nested sub-realms. A sub-realm declares its own sub_realms. Fix: Remove `sub_realms` from the sub-realm: Realms nest one level only. Declare the Realm on the top-level manifest instead.
- [RR011](https://steerspec.dev/docs/diagnostics/RR011/) (Error): EUID collision with a sub-realm. An EUID in a sub-realm collides with the parent, a sibling sub-realm, or an effective dependency. Fix: Rename the entity in the sub-realm, or in another Realm you own, so that the EUID is unique.
- [RR012](https://steerspec.dev/docs/diagnostics/RR012/) (Error): Dependency cannot be fetched. A github:// dependency cannot be fetched (bad reference, no fetcher or cache dir, download error). Fix: Check the reference against `github://<owner>/<repo>@<ref>[/<path>]` and your network connection. For a private repository, set `GITHUB_TOKEN` and list its owner in `STRSPC_TOKEN_OWNERS`.
- [RR013](https://steerspec.dev/docs/diagnostics/RR013/) (Error): Unresolved inherits target. An inherits target cannot be resolved: no such entity, a qualifier that is not a dependency of the hop's Realm, a dependency that failed to resolve, or a short EUID that only exists in a dependency. Fix: Correct the target, qualify it with a Realm that is a dependency of this one, and fix any dependency that failed to resolve.
- [RR014](https://steerspec.dev/docs/diagnostics/RR014/) (Error): Inheritance chain invalid across Realms. An inheritance chain, followed across Realms, is cyclic or longer than three hops. Fix: Change `inherits` so the chain visits no entity twice and ends within three hops.
- [RR015](https://steerspec.dev/docs/diagnostics/RR015/) (Error): Invalid overrides target. A live rule's overrides target is not in the entity's inherited rule set: the entity inherits nothing, the target is unknown, or an ancestor already overrides it. Fix: Point `overrides` at a rule this entity inherits, and check that `inherits` is set and that no ancestor already overrides the target.
- [RR016](https://steerspec.dev/docs/diagnostics/RR016/) (Warning): Override has no effect. A live rule's overrides target exists in the chain but is not Published or Implemented, so it is not inherited and the override has no effect. Fix: Promote the target to Published, or override a rule that is Published or Implemented.
- [RR017](https://steerspec.dev/docs/diagnostics/RR017/) (Error): Note names an unknown Realm. A supersedes/extends/related note of a live rule qualifies a reference with a Realm outside the tree that is neither a dependency of the note's Realm nor a declared sub-realm of one (NTE-007). Fix: Correct the qualifier, or add the Realm with `strspc realm dep add`.
- [RR018](https://steerspec.dev/docs/diagnostics/RR018/) (Error): Note names a missing rule. A supersedes/extends/related note of a live rule qualifies a reference with a known Realm that holds no such rule at the pinned version. Fix: Correct the rule ID, or pin a version of the dependency that holds the rule.
- [RR019](https://steerspec.dev/docs/diagnostics/RR019/) (Warning): Reference to a rule no longer in force. An extends/related note or the body of a live rule makes a qualified reference to a rule that is Abandoned, Terminated or superseded. Text in backticks is ignored in bodies. Fix: Point the reference at the rule that replaced it, or remove it. In a body, wrap the text in backticks if it is not a reference.
- [RR020](https://steerspec.dev/docs/diagnostics/RR020/) (Warning): Body names an unknown Realm. The body of a live rule qualifies a reference with a Realm outside the tree that is neither a dependency of the rule's Realm nor a declared sub-realm of one. Text in backticks is ignored. Fix: Correct the qualifier, or add the Realm with `strspc realm dep add`. Wrap the text in backticks if it is not a reference.
- [RR021](https://steerspec.dev/docs/diagnostics/RR021/) (Warning): Body names a missing rule. The body of a live rule qualifies a reference with a known Realm that holds no such rule at the pinned version. Text in backticks is ignored. Fix: Correct the rule ID, or pin a version of the dependency that holds the rule. Wrap the text in backticks if it is not a reference.
- [RR022](https://steerspec.dev/docs/diagnostics/RR022/) (Error): Inheritance not permitted. An entity inherits an entity whose visibility does not permit inheritance from its Realm (ENT-014, ENT-016). Fix: Inherit a different entity, or ask its owner to widen it. An `inherits` that has shipped can be removed once no rule is Published or Implemented (RD017).
- [RR023](https://steerspec.dev/docs/diagnostics/RR023/) (Error): Override not permitted. A rule that is not Abandoned, Retired or Terminated overrides a rule, and the visibility of an entity from the inherited entity up to the rule's owner does not permit it from the declaring Realm, whatever the state of the target (ENT-013, ENT-014, ENT-016). Fix: Supersede the rule without restating `overrides`, then retire it.
- [RR024](https://steerspec.dev/docs/diagnostics/RR024/) (Error): Wider than the inherited entity. An entity is wider than the entity it inherits (ENT-015). An absent visibility counts as public. Fix: Declare a `visibility` no wider than the inherited entity's.
- [RR025](https://steerspec.dev/docs/diagnostics/RR025/) (Error): `extends` target not permitted. An extends note on a rule that is not Abandoned, Retired or Terminated references a rule whose entity's visibility does not permit inheritance from the note's Realm or is narrower than that of the entity holding the note (NTE-012). Short references count. Fix: Reference another rule, or supersede the rule and retire it: the note itself can't change.
- [RSV000](https://steerspec.dev/docs/diagnostics/RSV000/) (Error): Rule resolution interrupted. The context was cancelled or timed out during resolution. Fix: Run it again with a longer timeout, or find what cancelled it.
- [RSV002](https://steerspec.dev/docs/diagnostics/RSV002/) (Error): Local source unreadable. A local source path cannot be resolved, is not a directory, or cannot be walked or read. Fix: Check that the source path exists, is a directory and is readable.
- [RSV003](https://steerspec.dev/docs/diagnostics/RSV003/) (Error): Invalid entity file in a source. An entity file cannot be parsed, or its entity.id is empty. Fix: Fix the JSON in the file, and make sure `entity.id` is set.
- [RSV004](https://steerspec.dev/docs/diagnostics/RSV004/) (Error): Invalid rule set hash in a source. rule_set.hash cannot be computed or differs from the Blake3 hash of the file. Fix: Run `strspc entity rehash <EUID>` in the repository that owns the file. For a remote source, pin a release with valid hashes.
- [RSV005](https://steerspec.dev/docs/diagnostics/RSV005/) (Error): EUID provided by two sources. The same EUID is provided by two different sources. Fix: Remove one source from the Configuration, or rename the entity in a source you own.
- [RSV006](https://steerspec.dev/docs/diagnostics/RSV006/) (Warning): Source holds no entities. A source directory yields no entity files and produced no errors. Fix: Point the source at the directory that holds the entity files, or remove it from the Configuration.
- [RSV007](https://steerspec.dev/docs/diagnostics/RSV007/) (Error): Remote source unavailable. A github:// source cannot be parsed, has no fetcher, or cannot be downloaded. Fix: Check the reference against `github://<owner>/<repo>@<ref>[/<path>]` and your network connection. For a private repository, set `GITHUB_TOKEN` and list its owner in `STRSPC_TOKEN_OWNERS`.

