Skip to content

Commit 4eabaa7

Browse files
committed
Clarify SwiftUI ref guidance for agents
1 parent 169def3 commit 4eabaa7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# AGENTS.md
22

3-
When talking to Shaps, sacrifice grammar for concision.
3+
When talking to the user, sacrifice grammar for concision.
44

55
## First Reads
66

77
Before code work, read `CONTEXT.md`. It defines project terms, API-shape expectations, availability rules, and release policy. If an ADR exists under `docs/adr/` for the area you touch, read it too.
88

99
When implementing a SwiftUI API backport, check `refs/swiftui-*.ref` and `refs/swiftuicore-*.ref` for Xcode SwiftUI/SwiftUICore module interface references. Use the newest versioned refs to confirm native signatures, overload sets, generics, availability, and hidden helper types before shaping public API.
1010

11-
If the available SwiftUI max version is newer than the newest ref version in `refs/`, tell Shaps the ref files may need updating before relying on them.
11+
If the available SwiftUI max version is newer than the newest ref version in `refs/`, tell the user the ref files may need updating before relying on them.
1212

1313
## Project Rules
1414

1515
- This is a SwiftPM library, not an app.
1616
- Main target is `SwiftUIBackports`.
1717
- Preserve Apple SwiftUI API parity for backports: names, overloads, behavior, docs, and availability should match native APIs where practical.
18+
- Use the refs to discover official API introduction versions. Backport APIs should be deprecated on each platform at the version where the native API was introduced for that platform. Example: if `presentationBackgroundInteraction` is officially introduced on iOS 16.3, the iOS deprecation for the backport should be 16.3.
1819
- Prefer `.backport` modifiers for view/transition APIs and `Backport<Any>` for pure namespace types.
1920
- Keep UIKit/AppKit bridge details internal/private unless public API parity demands exposure.
2021
- Use `@available` and `#if os(...)` deliberately. Minimum floors are iOS 13, tvOS 13, watchOS 6, macOS 10.15.

0 commit comments

Comments
 (0)