Proposal (AIM 5.9) — Record lifecycle: which moves are legal
Status: draft for review — direction and prototype plan. The syntax below is a sketch to prototype, not proposed for admission in 5.9. · Author: Michael & Claude working session, 2026-09-27 · Would affect, on admission: §7.1, §12.1, §12.2, §8.6 (the recorded-pressure entry retires), §13
The problem#
§8.6 has carried this since 5.5: "Record lifecycle transition legality — the status transition table as a checkable relation. … Fails test 4 today … The strongest future rent-payer on this list — illegal-transition as a hard diagnostic."
Test 4 — demonstrated need — was the only blocker: no real model had needed it. That has changed. Since interpreted apps went live, the house models carry lifecycle rules in prose, every one of them:
| Model | States (schema enum) | Lifecycle rules written as prose |
|---|---|---|
| Expense Approval (template; process) | submitted, approved, rejected, reimbursed |
Review Expects "The claim is submitted and has not already been decided." RecordReimbursement Expects "The claim is approved and not already reimbursed." Requirements: "only after approval", "only once on a submitted claim" |
| Task Planner (template and benchmark; app) | open, done |
Complete and Reschedule Expects "The task is open." Reopen Expects "The task is done." |
| Lunch orders (benchmark; app) | Round open, closed |
three Expects "The round is open."; "Members edit or remove their own items until the round is closed, not after." |
| Sales pipeline (benchmark; app) | lead, qualified, proposal, won, lost |
"starts as a lead" |
| Financial close (test fixtures; process) | the period | "The period is locked only after executive approval." (the 5.5 evidence) |
§7.1's own Record example carries one too: ### Constraints — "An approved item's amount is fixed."
What it costs today#
The reference live engine enforces the ### Expects it can recognize, and those are all about the
caller's input: presence, a positive number, membership in a list, a number. A state guard is not an
input check, so every rule in the table reaches the interpreter as a judgment (recorded
held: null, by: 'model'). In Expense Approval, the only thing between a reimbursed claim and a second
reimbursement is the model reading "not already reimbursed" correctly on that turn. The public template's
sample restates the same transitions in TypeScript (sampleState.ts), because there is no structured form
to derive them from.
Under the owner's "interpret, don't prove" architecture this sits on the wrong side of the line. The agent
interprets; the engine bounds and commits. Enums, required fields, owner scoping and the records an
operation may write are all bounded by the engine, from declarations. Which moves a status may make is a
commitment of the same kind — and the only one of them the engine cannot bound, because the model has
nowhere to declare it.
Scope sort (§1.4)#
"Closed is terminal" and "reimbursed only after approval" are commitments a Reviewer holds a realization to; §1.4 lists "the period locks" among them. How a realization enforces them — locks, optimistic concurrency, a hidden button — is mechanics.
Why ### Expects is not enough: reach#
The 5.8 candidates note, on invariants: "The gap is not expressibility. It is reach." An Expects guard
binds only the operation that states it. An operation added later — in another intent, by another person,
by an Architect that never read RecordReimbursement — can move a claim from rejected to reimbursed,
and nothing in the model says it may not. A lifecycle declared on the Record binds every operation that
mutates it, including the ones not written yet.
Design options#
Option 1 — moves and final states on the Record (recommended core)#
## Record: Claim
### Schema
```schema
status: enum(submitted, approved, rejected, reimbursed) required default(submitted)
```
### Lifecycle
- `status`: `submitted` → `approved`, `rejected`
- `status`: `approved` → `reimbursed`
- Final: `rejected`, `reimbursed`
- A sibling of
### Constraintsand### Immutable: the Record already carries its own rules. - The start state is the field's
default(...). - Moves are declared once, on the subject. Which operation makes a move is not declared here; that
stays in the operation's
### Ensures. - Items are addressable as
#Record:Claim → ### Lifecycle [n]in work artifacts (§2.2).
Option 2 — Option 1, plus the operation that makes each move#
- `status`: `approved` → `reimbursed` — by [Contract:RecordReimbursement]
- A bracketed reference, not an edge: the form Trigger schedules already use for
after [Event:X](§7.7). It resolves and can be checked, derives no inverse and needs no verb (the 5.8 note: "prefer the reference"). - A stronger bound: the engine can refuse a legal move made by the wrong operation (
Reviewwritingreimbursedon an already-approved claim). - The costs: a passive node now names actors; cross-intent references need a qualified form the schedule
precedent does not cover; and two places say what
RecordReimbursementdoes.
Option 3 — no block; the engine recognizes state guards in ### Expects#
"The task is open." becomes: the target row's status must be open. No language change, a fast path in
the engine and never a gate. It collects part of the run-time rent for operations that state their guard,
but gives no reach, no final states, and nothing another tool can share.
Rejected — a schema-line modifier#
status: enum(…) lifecycle(submitted>approved|rejected, approved>reimbursed). Schema lines are
attributes (§3.7); a transition table is a rule, and §8.6 test 1 sends rules to blocks.
What Option 1 makes computable#
At run time — in the interpreter, or any realization that commits writes:
- Illegal move. A write that changes
statusmust follow a declared move from the row's current value. "Claim moves submitted → approved or rejected, and approved → reimbursed; this write moves approved → rejected" is refused before commit. - Final means final. A row in a final state takes no further writes. That covers the double reimbursement, and "no posting against a closed period".
- A write that leaves
statusunchanged on a non-final row is not a move;### Expectsstill governs it.
Statically:
- Hard errors: a Lifecycle naming a value outside the field's enum; a move out of a declared final state; a Lifecycle on a field that is not an enum.
- Informational: a state nothing moves into, other than the start (unreachable); a non-final state
with no move out (a dead end); a Record with a Lifecycle that no operation
mutates.
Not caught: an operation repeating a move that does not change the value, such as a second approval that overwrites the reason on an approved claim. The operation's own Expects still covers it — judged, or deterministic under Option 3.
Open questions#
- Option 1 alone, or with Option 2's
byreferences? - Self-moves: never implicit? (Proposed: a write that leaves the value unchanged is not a move.)
- Does "final" freeze the whole row (proposed), or only the field?
- More than one lifecycle field on a Record (
statusandpaymentStatus)? - Should a deciding Contract's outcomes be checked against the moves out of the state it starts from
(
Review's Approved / Rejected againstsubmitted → approved, rejected)? - The name:
### Lifecycle,### Statesor### Transitions? - Supplied starting entries (§9.4) may be in any state. Confirm that moves govern operations' writes only.
Proposed path#
- Now, no spec change. In the reference implementation: Option 3 as an engine fast path, and Option 1 as a prototype block read only in house fixtures (Expense Approval, Task Planner, Lunch orders), behind a flag. The Architect does not emit it in user models.
- Measure on the benchmarks: refusals that caught real model errors, and diagnostics that found real gaps in house models.
- Admit in the next wave (5.10) if both show rent, with the open questions answered; retire the §8.6 recorded-pressure entry.
Against §8.6 (current standing)#
- Relational commitment? Not a verb — a block, which is where test 1 sends rules. Option 2's reference is not an edge.
- Not expressible today? The prose is; reach and finality are not, and neither can be checked.
- Pays rent? A run-time refusal and hard diagnostics — the strongest on the list. To be measured (step 2).
- Demonstrated need? Now yes — the table above.
- Fully specified on arrival? No — the open questions. That is why this is a direction, not an admission.
Decision needed#
- Agree the direction: a Record-scoped block, not a verb and not Expects recognition alone?
- Prototype Option 1 alone, or with Option 2's
byreferences? Recommended: Option 1 alone; add the references only if the prototype shows operations making a legal move that is not theirs to make. - Approve the prototype path and its measurement, with admission decided in 5.10?