Sanity Library Reference Docs
    Preparing search index...

    A leaf predicate after boolean decomposition — the unit "why is this condition failing" reasoning works on. And/Or/Not structure is folded into the ConditionClause tree (negation pushed down to the leaves, so !(a && b) decomposes to any of two negated atoms); everything else is an atom.

    interface ConditionAtom {
        groq: string;
        kind: "atom";
        negated: boolean;
        node: unknown;
        reads: ConditionRead[];
    }
    Index

    Properties

    groq: string

    Canonical GROQ for display, via groq-js unparse (negation rendered as a !(...) wrapper). Display-only: unparse collapses ['dotted.key'] access to .dotted.key, so re-parsing this string can change meaning — the insight machinery evaluates the opaque ConditionAtom.node.

    kind: "atom"
    negated: boolean

    The condition needs this atom NOT to hold (it sat under a !).

    node: unknown

    The parsed sub-expression — deliberately opaque: the groq-js AST shape is not part of the public contract. Do not rely on its structure.

    reads: ConditionRead[]