You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semantic rules: allow a deterministic check as fail-fast precondition #156
Idea (option 2 from PR #151 review, docs/semantic-rules.md)
Allow a semantic rule to also carry a check. The check runs first (cheap, deterministic); the judge runs only if the check passes.
Example:
{"id": "active-assignee-role","category": "workflow","mode": "semantic","type": "opportunity","when": "current.status = 'active'","check": "(current.assignee)","rubric": "The node body states the assignee's role"}
This gives two gates before the model call (when + check), a deterministic fail-fast, and the rule is effectively an expression rule wherever the semantic part is not reached.
Open questions
Violation/severity capture: a failing check reports the rule's own severity as for an expression rule; a judged verdict maps through the verdict severity map. Spell out the combined contract.
Interaction with the default pass/fail verdicts.
Alternative considered and rejected for now: a semantic rule running both checks unconditionally; and the current case (semantic rules cannot have check).
Option 1 (stay as-is) vs option 3 (run both) vs option 2 (this proposal): option 2 preserves the no-accidental-cost property and composes with when.
Pairs with #155 (batching) as follow-ups to PR #151.
Activity