The unit of work is a routing decision or a stack update.
The durable artifact is the record of the decision with its evidence. The chief hazard is a configuration change that alters what the agent can do without anyone deciding that it should.
Trace a task: its properties go into the routing policy, which returns a route. The route selects a destination, and the endpoint guard checks the destination against the data class. A stack update runs the sentinel tasks, the gate returns reasons, and a person records a decision. Ownership is clear: policy routes, the guard enforces, and people decide updates.
Run swift test --filter RolloutAndRoutingTests. Add a data class between internal and restricted, and let the ordering show which rules change. Write the routing test for the new class first.
Read the routing rules in order and ask whether each could be reached for a task it should not match. Then read the guard and ask whether a new destination could slip through a default case. A default that throws is safe; a default that returns is not.
When a task goes to the wrong route, reproduce with the four properties. Usually one was misjudged, often verification strength. Add the misjudged example to the routing tests and write down how the property is decided.
Confirm that restricted data cannot reach a hosted destination by any path, including summaries, logs, and error reports. Confirm that every harness update is reviewed for new tools and that egress is denied outside the harness.
Test routing with one task per route and one at each boundary of the ordered rules. Test the guard with every class and destination. Test model records with each field blank in turn and with a moving name.
Review routing and the endpoint list each quarter. Require a decision record for every model, runtime, and harness change, and keep the previous configuration for rollback. Rotate someone through reading release notes as a security review.
- Routing is policy, and release authority always routes to a person.
- The endpoint guard denies by default.
- Every model has a complete, immutable record.
- Harness updates are reviewed as permission changes.
- Egress is denied outside the harness.
- Why does the order of routing rules matter more than their number?
- What is the danger of a
defaultbranch in the guard? - Which limits on your list would be removed by better checks, and which would not?
- How would you notice that a harness release added a tool?
Continue with the book
Explore the full treatment, worked examples, and exercises in Agentic iOS App Development.
Companion article for Agentic iOS App Development, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
