EAS-02 Separation of Reasoning and Execution
The model never calls the outside world directly. It emits structured ToolRequests; deterministic, testable code in separate layers validates them, decides whether they may proceed, and carries them out.
| ID | Control | Level | Fix |
|---|---|---|---|
| EAS-02.01 | No direct model-to-effect path | L1 | local |
| EAS-02.02 | Typed tool contracts | L1 | local |
| EAS-02.03 | Argument validation in tools | L2 | local |
| EAS-02.04 | Consequential values derived, not chosen | L2 | local |
| EAS-02.05 | No inline effects in orchestration control logic | L2 | structural |
| EAS-02.06 | Validated state writes | L2 | local |
| EAS-02.07 | Layer-wise testability | L2 | local |
EAS-02.01 No direct model-to-effect path L1
Applies to: All Workflows that expose Tools to the model.
Every ToolRequest MUST pass through a blocking, deterministic interception point before any Tool code with a side effect runs. The framework MUST NOT invoke a Tool function with model-produced arguments without that interception point being able to deny the request. The interception point MUST cover every Tool, including built-in and sub-agent Tools.
Why: When the framework invokes functions directly with whatever arguments the model produced, every guarantee the system needs either lives in the model’s reasoning or does not exist. The model may request anything; the decision to honour the request belongs to code that does not read instructions from retrieved documents. Essay →
- Static
- A
tool.beforebinding (native or adapter) that can deny a ToolRequest and return a structured refusal, with coverage of every Tool registered with the model, including Tools of sub-agents. Tools passed to the framework as bare functions with no interception are findings. - Runtime
- Every
execute_toolspan is preceded, within the same Step, by aneas.policyspan for the same ToolRequest.
Remediation local: Wrap every Tool registered with the framework in a shared interceptor that implements tool.before, or route all Tools through a tool gateway. Verify coverage by enumerating registered Tools at startup.
Hooks: tool.before
· Components: tool-gateway, policy-engine
· See also: EAS-04.02
EAS-02.02 Typed tool contracts L1
Applies to: All Tools exposed to the model.
Every Tool MUST have an explicit contract consisting of an input schema, an output schema, the permission scopes it requires, and a limit on the size of the output it returns to the model.
Why: The tool layer is a set of typed capabilities; its contract is what lets the other layers validate requests, enforce permissions and bound context without trusting the model. Essay →
- Declared
- Every Tool in
tools[]hasrequired_scopesandoutput_limit_tokensset. - Static
- Each Tool definition has a machine-readable input schema and a declared output type or schema; tools typed as free-form strings or untyped dictionaries on either side are findings.
Remediation local: Define input and output models for each Tool, and record scopes and output limits in the manifest next to the Tool’s name.
Components: tool-gateway · See also: EAS-05.06, EAS-03.01
EAS-02.03 Argument validation in tools L2
Applies to: All Tools that accept arguments from the model.
Tools MUST validate model-supplied arguments against their input schema and business constraints and MUST NOT trust them. Entities whose identity determines what may be accessed or changed (the customer, the account, the order) MUST be resolved from the Run’s authenticated context, not from values the model extracted from text.
Why: A customer’s message can mention an order number that isn’t theirs, and a model will happily pass it on. Looking up the order from the authenticated customer’s identity removes that failure entirely. Essay →
- Static
- Tool implementations validate arguments before use, and resolve principal-owned entities through the Run’s Credential or session context. Tools that pass a model-supplied identifier straight to a data store or external API are findings.
- Attested
- For each Tool that touches customer data, which arguments come from the model and how is each validated?
Remediation local: Remove principal-identifying parameters from Tool signatures, inject them from the Run context, and add validation of the remaining arguments at the top of each Tool.
Components: tool-gateway, identity-broker · See also: EAS-06.01, EAS-06.02
EAS-02.04 Consequential values derived, not chosen L2
Applies to: All Tools with effect_class other than none.
Values that determine the consequence of a side effect (amounts, recipients, target records) MUST be computed by deterministic code from authoritative records and business rules. The model SHOULD supply only what requires judgement (for example a reason code), as in propose_refund(reason_code) rather than refund(order_id, amount).
Why: If the model picks the amount or the order, a wrong choice lands directly in the payment system. The model’s contribution should be what it is good at: understanding what is being asked and why. Essay →
- Static
- Signatures of effectful Tools do not accept amounts, recipients or target identifiers as model arguments where these can be derived from records; where they are accepted, code checks them against the authoritative record before use.
- Attested
- For each effectful Tool, which consequential values does the model choose, and why can they not be derived?
Remediation local: Replace direct-effect Tools with proposal Tools that take a reason or intent from the model and compute targets and amounts in code.
Components: tool-gateway, action-ledger · See also: EAS-02.03, EAS-03.02
EAS-02.05 No inline effects in orchestration control logic L2
Applies to: All Workflows that perform side effects.
The orchestration layer MUST NOT perform business side effects inline in its control logic (graph nodes, routing functions, workflow code that also decides ordering). Side effects MUST be performed by the execution layer.
Why: Effects mixed into control flow make retries and replays dangerous, because re-running the control logic re-runs the effect. Essay →
- Static
- Orchestration code (nodes, edges, routers, workflow definitions) contains no calls to payment, messaging, record-update or other effectful clients; such calls appear only in executor or Tool code behind the interception point.
Remediation structural: Move effectful calls out of control logic into Tools or executor activities, and have orchestration emit ActionIntents instead.
Components: orchestrator, executor · See also: EAS-09.01, EAS-03.05
EAS-02.06 Validated state writes L2
Applies to: All Workflows with durable state.
Model output MUST NOT mutate durable Run state without schema validation. Every write of model-derived data to state MUST be checked against a schema, and only fields the schema permits MAY be updated.
Why: State that the model can overwrite arbitrarily is state an injection can corrupt. Essay →
- Static
- State has a declared schema; reducers or update functions validate model-derived values before persisting, and the model cannot write arbitrary keys.
- Runtime
- Checkpoints that fail validation are rejected, and the rejection is visible in telemetry.
Remediation local: Define a typed state schema and validate model output in a state.checkpoint hook before the Step boundary is persisted.
Hooks: state.checkpoint
· Components: state-store, orchestrator
· See also: EAS-09.03
EAS-02.07 Layer-wise testability L2
Applies to: All Workflows.
Each layer MUST be tested on its own terms: Tools MUST have unit tests; orchestration MUST be tested by replaying recorded model outputs through it, deterministically and without live ModelCalls; execution MUST be tested for idempotency and policy enforcement with no model involved. Model behaviour SHOULD be tested statistically with an EvalSuite.
Why: Separating the layers turns one untestable end-to-end system into four testable ones and one measurable one. Essay →
- Declared
evaluation.suiteis set for the Workflow.- Static
- The test suite contains: unit tests for each Tool; orchestration tests driven by recorded or stubbed model outputs; executor tests asserting that a repeated ActionIntent produces one effect and that policy-denied intents are not executed. Tests run in CI without model credentials, except the EvalSuite.
Remediation local: Record model outputs from representative Runs as fixtures, replay them through the orchestration in CI, and add idempotency and policy tests for the executor.
Components: eval-platform, executor · See also: EAS-09.06, EAS-10.04