teach
Define logical rules for automated inference. When conditions hold, the conclusion becomes derivable through backward chaining. Supports variables and negation-as-failure.
Instructions
Define a logical rule for automatic reasoning. When body conditions hold, head becomes derivable via backward chaining. Use ?-prefixed variables; supports Negation-as-Failure. Example: 'If ?x is human AND NOT god(?x), THEN ?x is mortal'. Side effects: mutates state (additive) — rules remain active until explicitly removed. Auth: requires X-Tenant-ID header; RULE_WRITE permission when auth is enabled. Rate-limited per principal. Errors: VALIDATION_ERROR on malformed rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| head | Yes | The conclusion — what becomes true when all body conditions hold | |
| body | Yes | Conditions that must all hold. Each object has 'predicate', 'args', optional 'negated' (explicit negation) and 'naf' (closed-world negation-as-failure) | |
| scope | No | Optional scope |