Markdown for LLMs
LDC-E4108 — A priority naming a rule that does not exist
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E4108 — A priority naming a rule that does not exist
## What it means
Every side of a priority must name a rule declared in the package.
A misspelled or missing name leaves an edge pointing at nothing, and a
priority over a nonexistent rule never applies. The compiler refuses the
package at the edge.
Declare the missing rule, or correct the name on the priority side.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity A;
relation p(a: A) kind institutional;
relation q(a: A) kind institutional;
rule r1 defeasible { for a: A; when p(a); then q(a); }
priority e1: r1 > ghost reason demo.diagnostics.r1;
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity A;
relation p(a: A) kind institutional;
relation q(a: A) kind institutional;
rule r1 defeasible { for a: A; when p(a); then q(a); }
```
## Engine message
The engine reports this in its own wording:
```text
example.law:9:10: error LDC-E4108: priority references undeclared rule "ghost" (§192)
```
## Related
- [Priority](/constructs/priority/) — how competing rules are ordered.