Markdown for LLMs
LDC-Q4002 — A condition is not a well-formed atom
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-Q4002 — A condition is not a well-formed atom
## What it means
Each condition in a question over a package must be a single atom: a
predicate name applied to its arguments in parentheses. Anything else —
a bare word with no argument list, a stray token — cannot be matched
against the package, so the engine reports the offending text instead of
guessing what was meant.
Rewrite the condition as a predicate applied to arguments, using only
names the target package declares.
## Example
```lawql
query q over "demo.diagnostics" { for x: Applicant; where blah; select resident(x); }
```
## Fix
```lawql
from r in rules select r
```
## Engine message
The engine reports this in its own wording:
```text
LDC-Q4002: expected an atom predicate(args), got 'blah'.
```
## Related
- [Questions to the engine](/constructs/queries/) — the shape of a question over a package.
- [LDC-Q4004](/diagnostics/LDC-Q4004/) — when the predicate itself is unknown.