Always prefer newer swift features and idioms, such as #Preview instead of PreviewProvider, and @Previewable if you need @State within the #Preview. Use @Observable instead of the older @ObservableObject.
Code should always optimize for clarity, readability, and most of all, simplicity. Pause when requirements are ambiguous and ask a brief clarifying question rather than guessing and over-building. If the code you are writing is complex, rethink the solution to find a simpler path unless optimization or high performance was specifically requested.
Write code that reads like a narrative: names should do most of the explaining, control flow should be simple, and "clever" should lose to "obvious" every time. Prefer small, single-purpose functions with clear inputs/outputs over long methods with mixed responsibilities. Keep state minimal and intentional: every stored property should earn its keep, and if it exists it should be clear what invariant it represents (wh