Context Layer

Session-Level Enforcement

10-Second Overview

Session-level enforcement accumulates constraint rules across all steps of a Flow workflow and evaluates them against the final output. Rules are surfaced to the model throughout the workflow. This ensures constraints from early steps apply to the final output.

Why Session-Level Enforcement Exists

Per-message enforcement evaluates each step's output against rules extracted from that step's message. In multi-step workflows, rules that govern the final output often appear in early messages and not in the terminal step. Per-message enforcement cannot address this.

Session-level enforcement maintains a rule set across the full workflow session. The model receives these rules as awareness context at every step. Enforcement fires when the output demonstrates sufficient coverage of the accumulated rules.

How It Works

Rule Accumulation

During Flow execution, constraint rules are accumulated across steps. Pulse and stateless executions use per-message enforcement only.

Rules as Awareness Context

At every workflow step, accumulated rules are surfaced to the model as awareness context. The model is not evaluated against these rules until enforcement fires.

Coverage-Triggered Verification

After each non-terminal step, the output is evaluated against accumulated rules. When coverage is sufficient, verification runs before the response is returned.

Workflow-End Safety Net

If rules remain accumulated when workflowEnd: true is received, verification always runs before workflow completion regardless of coverage.

Session Verification Report

Session verification produces a report attached to the response under trust_contract.session_rules_evaluation:

{
  "triggered": true,
  "pass": true,
  "violations": [],
  "rules_evaluated": [...]
}

Session Rules Lifecycle

Rules are scoped to the session and cleared after verification runs or when the session terminates.

Non-Claims

Session-level enforcement enforces coverage of accumulated constraint rules. It does not guarantee model correctness or semantic accuracy of outputs.

Related Runtime Documentation

Runtime Contract Documents the behavioral guarantees enforced during execution including session-level enforcement.

Execution Authority Describes how Execution Authority governs admission, validation, and invocation during runtime execution.

Execution Receipts Describes per-step execution artifacts including Session Verification results.