← Prompts
System / Understand Agent Rules (steipete)

Modern Swift Development

# Modern Swift Development Write idiomatic SwiftUI code following Apple's latest architectural recommendations and best practices. ## Core Philosophy - SwiftUI is the default UI paradigm for Apple

# Modern Swift Development

Write idiomatic SwiftUI code following Apple's latest architectural recommendations and best practices.

## Core Philosophy

- SwiftUI is the default UI paradigm for Apple platforms - embrace its declarative nature
- Avoid legacy UIKit patterns and unnecessary abstractions
- Focus on simplicity, clarity, and native data flow
- Let SwiftUI handle the complexity - don't fight the framework

## Architecture Guidelines

### 1. Embrace Native State Management

Use SwiftUI's built-in property wrappers appropriately:
- `@State` - Local, ephemeral view state
- `@Binding` - Two-way data flow between views
- `@Observable` - Shared state (iOS 17+)
- `@ObservableObject` - Legacy shared state (pre-iOS 17)
- `@Environment` - Dependency injection for app-wide concerns

### 2. State Ownership Principles

- Views own their local state unless sharing is required

Sign in to view the full prompt.

Sign In

Classification

System Behavioral rules defining AI identity and persona
System Understand
Explain or analyze
Scope Project
This codebase
Manual Manually placed / Persistent