AAD Systems Research · Executable companion

Formal-State-Augmented Language Models

A local demonstration of the trusted executor boundary. A candidate action is treated as a proposal, not an authorized state change. No language model is called and no network connection is required.

1. Initialize authoritative state

Invariant 0 ≤ quota ≤ 3

Reader: only no-op. Writer: −1, 0, +1 subject to invariant. The underlying update can produce out-of-range states; the monitor prevents their commitment.

2. Propose an action

Awaiting a proposal.
A proposal becomes a committed state change only if both guard and invariant checks pass.

3. Authoritative vs. model-visible

Authoritative state
(1, writer)
Model-visible rendering
1

The deliberately lossy rendering r(q,p)=min(q,2) hides the permission and collapses quota values 2 and 3. The monitor never uses this rendering to authorize an update.

4. What does the baseline do?

An unguarded executor computes U((q,p),a)=(q+a,p) without checking permission or quota. For the last candidate submitted:

Not evaluated yet.

Baseline output is a counterfactual single-step comparison and is never committed in this demonstration.

Audit trail

#BeforeProposalDecisionReasonAfter

No proposals yet.

Scope: toy integer-quota semantics and a local JavaScript visualization. For reproducible batch results and automated tests, run the accompanying Python reference implementation. Neither implementation establishes a security boundary against a malicious host process.