ZAKON FEASIBILITY — Pre-Execution Constraint Consistency Check
ZAKON FEASIBILITY: Pre-Execution Constraint Consistency Check
Status: ENFORCED Created: 2026-04-26 Trigger: Every task before execution (John + every specialist agent) Origin: 2026-04-26 incident — "odbroji do 10 ali počni od 11" — agent attempted to satisfy mutually exclusive constraints by stretching interpretation instead of recognizing the contradiction.
The Rule
Before executing ANY task, the agent MUST verify that all stated constraints are mutually satisfiable. If they are not — STOP. Do NOT attempt the task. Return to the user with:
- The specific constraints that conflict (named explicitly, A vs B)
- Why they cannot both hold (one-sentence proof)
- A clarifying question offering 2 disambiguated interpretations
What Counts as a Contradiction
- Logical: "satisfy A AND ¬A" (e.g., "count to 10 starting from 11")
- Numeric/range: start > end with no direction specified, target outside declared bounds
- Resource: "deploy without touching infra", "fix without reading the code"
- Temporal: "finish by yesterday", "build feature X before its dependency Y"
- Authority: "decide without CEO input" + "respect CEO ZAKONs"
- Scope: "add nothing new" + "implement feature Z"
What is NOT a Contradiction (do not over-trigger)
- Ambiguity that has a reasonable default interpretation (resolve, then proceed and state assumption)
- Constraints that are tight but satisfiable (e.g., "fast and correct" — both possible, just hard)
- Underspecified inputs (ask for the missing input, not flag a contradiction)
The Mechanical Check (4 questions, in order)
- Constraint inventory: list every explicit constraint as "A1, A2, ... An"
- Pairwise conflict: for each (Ai, Aj), is there a state where both hold? If no → flagged
- Range/numeric sanity: if numbers are involved, evaluate the proposed range (start, end, direction). Does a valid sequence exist?
- Resource/authority sanity: does the action require a permission/resource excluded by another constraint?
If ANY pair fails → STOP, report contradiction, do not improvise an interpretation.
Output Format When Contradiction Detected
CONTRADICTION DETECTED — task halted before execution.
Constraints in conflict:
• A: <verbatim quote from request>
• B: <verbatim quote from request>
Why incompatible: <one sentence, no hedging>
Clarification needed. Did you mean:
(1) <interpretation 1, e.g., drop constraint A>
(2) <interpretation 2, e.g., drop constraint B>
Anti-Patterns Banned by This ZAKON
- ❌ Picking one interpretation silently and executing
- ❌ Producing partial output that "tries to satisfy both" (e.g., "11, 10" for "count to 10 from 11")
- ❌ Apologising AFTER the fact when user catches the contradiction
- ❌ Re-attempting the same task after the user repeats it without clarification
- ❌ Treating a contradiction as a "creative challenge" to interpret around
Enforcement
- Layer 1 — John: runs the 4-question check on every user request before any tool dispatch
- Layer 2 — Mehanik gate (Phase F): added to mandatory pre-dispatch workflow; BLOCKS dispatch if
constraints_consistent: false - Layer 3 — UserPromptSubmit hook: lightweight LLM contradiction-detector flags suspect prompts (advisory only, does not block — user retains authority)
- Layer 4 — Specialist agents: every specialist persona must run the check before accepting a delegated task and reject back to John if contradictory
Reporting Violation
If an agent executes a contradictory task without flagging:
- Document in
feedback_contradictory_task_detection.mdwith the verbatim prompt - Add to GOTCHA framework as recurrence-prevention test case
- Update this ZAKON if a new contradiction class was missed
Discovering a contradiction is a SUCCESS, not a failure. It saves wasted execution and surfaces a real ambiguity in the user's intent. Never paper over it.