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
- Boolean Output: Result must be binary.
- Decidability: Must always return a value (or error), never hang.
Risks
Failure modes
Ambiguity
Returning 'Maybe' or probabilistic float where Boolean is required.
Relationships
Root pattern: builds on nothing in this library.
Used by
References
Side-effect-free observational verification yielding Verified/Falsified/Unknown
Mind
Entropy-based stopping condition for recursion
Society
Runtime functionality toggle
Filter payload if the target condition is not met
Society
Escrow primitive: value held until condition preimage revealed or timeout
System condition at time T
Generic Red/Yellow/Green flow control
Mind
Recursive problem abstraction
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"
}
}
}