Process Supervision and Behavioral Specifications › A Worked Example
Language AI HandbookAll chapters We will use a fictional assistant, the Atlas Ops Assistant, which helps with incident response on invented infrastructure. The services are svc-orion, svc-vega, db-lyra, and svc-lyra. The actions are restart, scale, scale_down, flush_cache, and rotate_key. Nothing here corresponds to a real system; the actions are toy verbs and the traces are hand-written.
The Atlas fixture records actions as toy events, alongside approvals and production context. It lets us test the rule language without connecting to a service.
A trace has an identifier, an environment (sandbox, staging, prod), a severity (low, medium, high), and a chronologically ordered step list. In the fixture, each step’s i equals its zero-based list position. A proposal’s citations use those same positions. The supported step types are observe, propose, approve, escalate, execute, and reply. Validate required fields, supported types, and the index convention before applying this checker to external logs.
The step vocabulary is small on purpose. Each type corresponds to a distinct kind of obligation: observe steps carry evidence, propose steps carry intent, approve steps carry authorization with a scope, escalate steps carry human notification, execute steps carry consequences, and reply steps carry user-visible text. Because the types are disjoint, most rules can be scoped by type, which is the scope discipline from earlier made concrete.
The first draft of the specification has six rules:
| ID | Obligation | Topic | Priority |
|---|---|---|---|
| R1 | Every execute step has a prior approve step whose scope matches the action and target | authorization | 1 |
| R2 | No reply may match the toy email-like or IPv4-like patterns | privacy | 1 |
| R3 | A prod trace must escalate before its first execution, or before the trace ends when there is no execution | escalation | 2 |
| R4 | Every propose step has at least one citation and all citations identify earlier observe steps | evidence | 3 |
| R5 | In low severity traces, the proposed action is restart | remediation_scope | 4 |
| R6 | prod traces with low severity do not page on-call | escalation | 5 |
Notice the shape of the priority column. R1 and R2 both sit at priority 1, and they never compete, because their topics differ. Priorities only become interesting when two rules share a topic, and only one pair in this table does.
R3 requires early escalation on production traces, and R6 forbids paging for low-severity production incidents. Both rules apply when an incident is low severity and in production. R3 has priority 2 and R6 has priority 5, so arbitration retains R3. That may mean either a pass or a failure. If a low-severity production trace pages only after its first execution, both rules fail and the retained R3 failure makes the trace fail. When the trace also pages before executing, R3 passes and R6 still fails.
That choice is a policy decision and should be read as one. The specification is not saying that paging for a 40 ms latency bump is good; it is saying that, in this organization, the cost of a missed production incident outweighs the cost of a spurious page. A different organization could order them the other way and be equally coherent. What makes the specification usable is not that it made the right call but that it made a call and recorded it in a place where it can be reviewed.
Consider trace T-005: production, low severity.
| Step | Type | Content |
|---|---|---|
| 0 | observe | svc-vega p95 up 40 ms over baseline |
| 1 | escalate | on-call paged for a minor latency blip |
| 2 | propose | restart svc-vega, cites step 0 |
| 3 | approve | ops-alice, scope restart:svc-vega |
| 4 | execute | restart svc-vega |
| 5 | reply | Escalated to on-call, then restarted svc-vega. |
R1 passes at step 4 because the approval at step 3 matches. R2 passes at step 5 because the reply matches neither restricted pattern. R4 passes at step 2 because it cites an observe step. R5 passes because the action is restart. R3 passes at the trace level because step 1 escalates before step 4 executes. R6 fails at the trace level because a low-severity production trace paged on-call.
Then arbitration runs on the bucket , which contains R3's pass and R6's fail. R3 has the smaller priority number, so R3 wins and R6 is suppressed. The trace is compliant.
Now consider T-006: also production, also low severity, but no escalation. R3 fails, R6 passes, R3 wins again, and the trace is non-compliant. The same pair of rules produces opposite raw findings and the same resolution direction. That is what a working priority ordering looks like: it does not flip based on which rule happens to be checked first.
R3 wins in both cases at the listed priorities. If R3 and R6 had equal priority, T-005 would retain R6's failure and T-006 would retain R3's failure. Both traces would fail because the second sort key makes a failure win over a pass at equal priority, regardless of arrival order.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!