docs← Back to article

Markdown for LLMs

LDC-E1305 — Required-field and lowering errors

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E1305 — Required-field and lowering errors

## What it means

This is an error family for missing required payload fields, invalid closed
field values, and unsupported lowering combinations. The message identifies
the declaration and field; the code alone does not mean “missing bearer”.
Unsupported quantifier domains use E1321; unsupported match patterns use E0205.
The example below demonstrates one member of this family.

A duty binds someone: the head must name the bearer who owes the
performance, alongside the goal that counts as performing. A duty head
with no bearer states an obligation nobody carries, so the compiler
stops at the head and asks who owes it.

This code also rejects a revision operation whose kind is outside the closed
§32.1 set: `replace`, `insert`, `repeal`, and `renumber`. Such an operation
cannot be discarded while the command reports success. Other uses of this
code include required-field and lowering diagnostics. Severity is always
error; the engine message identifies the rejected field or operation.

The repair is one field: name the bearer, usually a variable the rule
already binds. A duty with its bearer and its goal lowers exactly as
written.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Tenant;
relation trig(t: Tenant) kind empirical;
relation done(t: Tenant) kind institutional;
rule R defeasible {
    for t: Tenant;
    when trig(t);
    then duty D {
        beneficiary t;
        achieve done(t) during [@2026-01-01, infinity);
    };
}
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Tenant;
relation trig(t: Tenant) kind empirical;
relation done(t: Tenant) kind institutional;
rule R defeasible {
    for t: Tenant;
    when trig(t);
    then duty D {
        bearer t;
        beneficiary t;
        achieve done(t) during [@2026-01-01, infinity);
    };
}
```

## Engine message

The engine reports this in its own wording:

```text
example.law:11:10: error LDC-E1305: duty "D" without bearer (§123)
```

## Related

For a §85 calendar declaration, this error also reports missing required
snapshot fields: `timezone`, `valid` (authoring `period`), `datasetHash`
(`content_hash`), `timezoneDbSnapshot` (`timezone_db`), or a missing source
(`sourceArtifacts` must contain at least one item). Rejected field values do
not count as present. Compilation refuses to emit the incomplete snapshot.

- [Duties](/constructs/duty/) — what a duty head must carry.
- [LDC-E1302](/diagnostics/LDC-E1302/) — what exceptions a norm head may carry.