// Code Custodian File ID: 6342DE64-6FA3-4617-8D14-CE9D166D9D0F # THE FACTORY: XCODE NATIVE AGENT DIRECTIVES (MONKEY CANNON) You are an autonomous Apple developer operating inside Xcode for The Factory on Apple Silicon. ### 1. File ID Directive (CRITICAL) If you edit a file containing a `// Code Custodian File ID: [UUID]` comment, you MUST retain that exact comment block at the very top of the file verbatim. ### 2. Swift 6 Strict Concurrency & Architecture - **Strict Concurrency:** Strict Swift 6 `@MainActor` boundaries must be enforced. Never use `@unchecked Sendable` as a shortcut. - **SwiftData Isolation:** Never use `default.store` or generic `ModelContainer` setups. Always use isolated SQLite stores via `FactoryPaths.databaseURL(for:storeName:)`. - **Modern State:** NEVER use `ObservableObject`, `@ObservedObject`, or `@Published`. MUST use `@Observable` and `@Bindable`. - **Modern Environment:** Use `@Entry` inside `EnvironmentValues` extensions. - **Testing:** Use modern `import Testing` (`@Suite`, `@Test`, `#expect`), never `XCTest`. - **Workspace Relative Paths:** Standard app source files reside at `[ProjectName]/[FileName].swift` relative to workspace root. Do not duplicate the project folder name. ### 3. Apple Documentation Search & Framework Stubs - **Local Documentation Search:** When encountering modern SwiftUI view composition, unfamiliar Apple SDKs, or Tahoe/macOS APIs beyond your base training, use the native `DocumentationSearch` tool to query Xcode's offline developer documentation in real time. - **Framework Stubs (Read-Only):** Files in `Framework_Stubs/*.api.swift` are read-only C-style headers dynamically linked from `$SHARED_BINARIES`. Do NOT edit or search for framework implementations. Reference this index directly: * `FactoryKit.api.swift` ➔ `FactoryPaths`, `FactoryRegistryManager`, `FactoryRegistry`, `FactoryProject`, `FactoryComms`, `PDSRouter` * `StreamlineFoundation.api.swift` ➔ `runCommand`, `runAppleScript`, `Date.standardTime`, String/Array utilities * `CacheKit.api.swift` ➔ `CacheKitController` * `DriveKit.api.swift` ➔ `KeychainHelper`, `DriveAuthManager`, `DriveSyncEngine` * `WarehouseKit.api.swift` ➔ `factoryToast`, `ColumnView`, `TokenField`, `SchemaGuardian` * `ThemeKit.api.swift` ➔ Theme constants, CSS generators * `BrowserKit.api.swift` ➔ `BrowserCDPEngine`, Chrome DevTools Protocol, browser automation ### 4. Project Bundles Off-Limits You are strictly FORBIDDEN from reading, searching, or editing `*.xcodeproj` or `project.pbxproj` files. File membership is handled automatically by Xcode via disk groups. ### 5. Dead Drop Webhook (.sidecar_result.json) When all code edits and build validations are 100% complete and verified, write or overwrite `.sidecar_result.json` directly in the project root. **Do NOT inspect, `sed`, or test for existing `.sidecar_result.json` files.** Execute a direct, blind overwrite.