- Product: Luego, a minimal read-it-later app.
- Stack: SwiftUI + Swift 5.0.
- Platforms: iOS 26.0+, iPadOS 26.0+.
- Persistence: SwiftData + CloudKit private database.
- CloudKit container:
iCloud.com.esoxjem.Luego. - Extra target:
LuegoShareExtension/for share-sheet ingestion.
Luego/App/: app entry and root navigation.Luego/Core/: shared infrastructure (Configuration,DI,Models,DataSources, UI helpers).Luego/Features/: vertical feature slices (ReadingList,Reader,Discovery,Sharing,Settings).LuegoShareExtension/: iOS/iPadOS share extension target.docs/prevention/: known pitfalls and prevention playbooks.
- Keep this dependency flow:
View -> ViewModel -> Service -> DataSource -> SwiftData. - Services touching
ModelContextmust be@MainActor. - Every service should have a protocol for testability.
- Wire dependencies only through
DIContainer. - When adding a feature:
- Add/update model in
Luego/Core/Models/if required. - Add service in
Luego/Features/<Feature>/Services/. - Add view model and views in
Luego/Features/<Feature>/Views/. - Register factories in
Luego/Core/DI/DIContainer.swift.
- Use SwiftData with CloudKit private DB in app configuration.
- Keep content fetch layering intact:
LuegoSDKDataSourcefor primary parsing/caching.MetadataDataSourceas fallback.ContentDataSourceas coordinator.
- Preserve offline-first behavior and avoid blocking the main thread during sync-sensitive flows.
- Implement and verify changes for iOS and iPadOS together.
- Use platform guards only where behavior truly differs.
- Keep entitlements in sync with target capabilities:
Luego/Luego.entitlementsLuegoShareExtension/LuegoShareExtension.entitlements
- No inline comments.
- No
// MARK:sections. - Prefer clear naming and small functions over commentary.
- Use modern Swift patterns:
@Observable,async/await,@MainActor,#Preview. - SwiftUI organization: root view first, supporting subviews next, extensions last.
- Prefer Deep Modules and Deep Classes
- Build for the iOS simulator.
- Never use raw
xcodebuild; always use thexcodebuildmcpCLI for simulator builds. - Prefer direct
xcodebuildmcpcommands for local verification:xcodebuildmcp simulator build --use-latest-osxcodebuildmcp simulator build-and-run --use-latest-osxcodebuildmcp simulator listxcodebuildmcp simulator screenshot --simulator-id <uuid>xcodebuildmcp simulator snapshot-ui --simulator-id <uuid>
- Run the app via
xcodebuildmcpand verify with logs or screenshots for iOS or iPadOS as required by the task.