# The reasoning–execution boundary

**NR-002** · Control pattern · v1.0.0 · Reference / illustrative

A concrete contract for allowing probabilistic systems to propose actions while deterministic services retain authority to execute them.

![The reasoning–execution boundary](diagram.svg)

## Architecture problem
An LLM may interpret language and propose actions but is not a safe owner of financial, contractual or transactional invariants.

## Apply when
- Designing AI-assisted finance or ERP workflows
- Creating tool-calling agents with real side effects
- Reviewing whether an action may execute without human approval

## Not intended for
- Treating model confidence as authorization
- Letting a prompt replace domain validation
- Persisting model output directly as committed business state

## Design rules
1. Model output is a proposal, never proof of permission.
2. Validate schema, identity, scope, preconditions and policy before any side effect.
3. Distinguish read, propose, approve, execute and compensate permissions.
4. Use idempotency keys and transactional boundaries for state changes.
5. Retain structured evidence of decision, execution and outcome.

## Trade-offs
- Approvals improve risk control but add handoff latency.
- Schema constraints narrow model flexibility but make integrations testable.
- Compensation may be unavailable for irreversible external effects; design compensating business processes.

## Review questions
- Can a malicious or mistaken prompt bypass execution policy?
- How are stale context and concurrent updates rejected?
- Where does an irreversible action require escalation?
- Can we replay the audit without replaying the model?

## Download / adapt
- `diagram.drawio` — primary editable diagrams.net file
- `diagram.dot` — independent Graphviz concept source
- `diagram.mmd` — editable Mermaid interpretation
- `diagram.svg` — scalable figure
- `diagram.png` — high-resolution figure
- `metadata.yaml` — structured pattern description

**Reuse:** CC BY 4.0; credit nishtnr, link the license, and indicate changes. Conceptual reference only.
