Infrastructure · Data Structures

Condition

Interface for patterns that evaluate to a boolean truth-value

Definition

Mechanism

A marker interface (Trait). Patterns implementing 'Condition' MUST provide an evaluation logic that returns a strict Boolean (True/False) based on provided context.

Invariants

  1. Boolean Output: Result must be binary.
  2. Decidability: Must always return a value (or error), never hang.

Risks

Failure modes

  1. Ambiguity

    Returning 'Maybe' or probabilistic float where Boolean is required.

Relationships

Root pattern: builds on nothing in this library.

Used by

References

Check

Side-effect-free observational verification yielding Verified/Falsified/Unknown

Gate

Filter payload if the target condition is not met

Society

HeldRelease

Escrow primitive: value held until condition preimage revealed or timeout

State

System condition at time T

TriGate

Generic Red/Yellow/Green flow control

Mind

WhyClimb

Recursive problem abstraction

Accepts

Contract

Binding agreement between parties

Loop

Repeated execution cycle

Mind

Refine

Critique-guided artifact revision loop

Reference

Data schema

{
  "type": "object",
  "required": [
    "predicate"
  ],
  "properties": {
    "predicate": {
      "type": "string",
      "description": "The boolean expression or check to evaluate"
    },
    "required_context": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Keys that must be present in context for evaluation"
    },
    "timeout_ms": {
      "type": "integer",
      "description": "Maximum time allowed for evaluation before returning Error"
    }
  }
}

Identity

Ref
Condition#b480
Sema ID
sema:Condition#mh:SHA-256:b480f3c4da11ba6d86f6d14e0fb8521268f3c4bb38588460f7ff4253ad8d78d5
Ring
0
Tier
1
Updated
2026-11-11