*Continent · 4 territory* ## Summary The README's conformance loop routes each expectation kind to its own evaluation call — decision and plan through evaluate and evaluatePlan, verifiedDecision and verifiedPlan through verifyAndEvaluate and verifyAndEvaluatePlan — and the plan evaluator decides each step on facts projected from earlier steps' declared effects. ## Explanation - For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below, and for a verifiedPlan expectation it must call verifyAndEvaluatePlan(rulebook, plan), the same for every step's facts and the initial facts. - For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below. - For a verifiedPlan expectation the implementation must call verifyAndEvaluatePlan(rulebook, plan) (the same, for every step's facts and the initial facts) and… - evaluatePlan takes a /1 rulebook and a /1 plan carrying a principal, a participant, optional delegation, steps with tool, scope, args, facts and note, initialFacts, optional history, clock, startTime, stepDurationSeconds, now and consumedApprovals. - evaluatePlan takes a /1 rulebook and a /1 plan { principal, participant, delegation?, steps: [{ tool, scope?, args?, facts?, note? }], initialFacts, history?,… - evaluatePlan evaluates a whole plan in which a planner proposes participant, steps, initialFacts, history, clock, startTime and stepDurationSeconds, deciding each step with the single-action evaluator on facts projected from the earlier steps' declared effects. - evaluatePlan(rulebook, plan) evaluates a whole plan in which a planner proposes participant, steps, initialFacts, history, clock, startTime and stepDurationSec… - For a decision expectation the loop compares project(evaluate(rulebook, case.request)) with case.expect.decision, and for a verifiedDecision expectation it compares project(verifyAndEvaluate(rulebook, case.request)) with case.expect.verifiedDecision. - For a decision expectation the loop compares project(evaluate(rulebook, case.request)) with case.expect.decision. - For a verifiedDecision expectation the loop compares project(verifyAndEvaluate(rulebook, case.request)) with case.expect.verifiedDecision. - For a plan expectation the loop compares project(evaluatePlan(rulebook, case.plan)) with case.expect.plan, and for a verifiedPlan expectation it compares project(verifyAndEvaluatePlan(rulebook, case.plan)) with case.expect.verifiedPlan. - For a plan expectation the loop compares project(evaluatePlan(rulebook, case.plan)) with case.expect.plan. - For a verifiedPlan expectation the loop compares project(verifyAndEvaluatePlan(rulebook, case.plan)) with case.expect.verifiedPlan. - The README does not say what the matching looks like or what an implementation should do when a plan expectation does not match. - For a plan expectation the implementation must call evaluatePlan(rulebook, plan) and match as below. - For a verifiedPlan expectation the implementation must call verifyAndEvaluatePlan(rulebook, plan) (the same, for every step's facts and the initial facts) and… ## Threads - The plan evaluator's input shape: rulebook, principal, participant, steps, initial facts, clock and timing. - evaluatePlan takes a /1 rulebook and a /1 plan { principal, participant, delegation?, steps: [{ tool, scope?, args?, facts?, note? }], initialFacts, history?,… - How evaluatePlan decides each step on facts projected from earlier steps' declared effects. - evaluatePlan(rulebook, plan) evaluates a whole plan in which a planner proposes participant, steps, initialFacts, history, clock, startTime and stepDurationSec… ## Consultant **Where it shows up** — The README's conformance loop keeps pairing expectation kinds with calls: decision with evaluate, verifiedDecision with verifyAndEvaluate, plan with evaluatePlan, verifiedPlan with verifyAndEvaluatePlan. **A question to sit with** — When a plan expectation does not match, what should the loop report — the first differing step, the whole projected plan, or both? **A way forward** — Keep the four-way pairing as it stands and write one sentence in the README on what a non-matching plan expectation reports. ## Ideas - Conformance checks should pair each expectation kind with its own evaluation call, so verified cases route through verifyAndEvaluate and verifyAndEvaluatePlan rather than the plain evaluators. ## Territories - [[Bevia/World/Territories/evaluatePlan whole-plan evaluation and its plan fields|evaluatePlan whole-plan evaluation and its plan fields]] - [[Bevia/World/Territories/evaluatePlan whole-plan evaluation and its return fields|evaluatePlan whole-plan evaluation and its return fields]] - [[Bevia/World/Territories/Four expectation kinds and their comparison calls|Four expectation kinds and their comparison calls]] - [[Bevia/World/Territories/Two plan expectation call requirements|Two plan expectation call requirements]]