The unit of work is one component or one state change.
The durable artifact is a component with a documented contract and tests on its data. The main hazard is a view that compiles and renders but is wrong in a state or a text size that nobody looked at.
Trace a state into pixels: the view model produces a JobsViewState, the list view switches on it, a row receives a Job, and a badge receives a SyncIndicator. Each hop passes data one way. Nothing in the view layer reaches back into a model, a store, or the network.
Record the baseline with swift test --filter DesignSystemTests. Add a new sync state, .paused, and let the compiler show you every switch that must change. Add its title, symbol, and spoken value, and extend the tests so that a missing symbol fails.
Review the data before the view. Read the state enum, then the presentation values, then the tests, and only then the layout. In the layout, look for raw numbers, fixed heights, default branches, and offsets used as identity.
When a screen is wrong on a device but right in a preview, suspect text size, identity, or a state the preview never shows. Reproduce with the largest accessibility text size and with a reordered data set, and add the case to a test.
Views must not display what the policy forbids. Check that rows show only fields the screen needs, that no log or accessibility label embeds precise location or customer data beyond what the user already sees, and that the map does not request the device’s location.
Test presentation as data, and test behavior in the model. Use previews for human review of layout and snapshots only where a visual regression is the actual risk. Keep each test small enough that its failure message names the rule that broke.
Review new components against the tokens and the examples index. Agree on one place where an accessibility decision is recorded, and who may approve a deviation. Treat a new raw number as a review comment.
- Components use tokens, never raw spacing or fonts.
- Every state is rendered by an exhaustive switch.
- Rows and pins are keyed by model identity.
- Each state has text, a symbol, and a spoken value.
- Tap targets meet the minimum size.
- Why is a
switchwithout a default better than anifladder for state? - What does a component’s narrow input protect against?
- Why does the badge need a symbol as well as a color?
- How would you test that a row still reads well at the largest text size?
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.
