KozBon
CLAUDE.md5 starsChanged 10 days agoMITView on GitHub
KozBon is a multi-platform Apple app for discovering and managing Bonjour (mDNS) network services. Bundle ID: com.kozinga.KozBon. Execution conventions (plan multi-step edits, no self-narration, atomic edits) live in .claude/rules/claude-execution-discipline.md, which loads every session. Never push to main. Make every change on a branch and open a pull request against main. CI runs on the PR. The KozBon scheme has no test action configured; all tests run through SPM. KozBon.xcworkspace contains: - KozBon.xcodeproj — the app target (2 Swift files) -…
In this repository19 other files it gives its agents.
- app-intents-proSkill
- coredata-swift6-proSkill
- instruments-profiling-proSkill
- motion-design-proSkill
- store-compliance-proSkill
- swift-accessibility-proSkill
- swift-adaptive-layout-proSkill
- swift-concurrency-proSkill
- swiftdata-proSkill
- swift-design-system-proSkill
- swift-docc-proSkill
- swift-error-handling-proSkill
- swift-logging-proSkill
- swift-memory-storage-proSkill
- swift-modularization-proSkill
- swift-package-proSkill
- swift-testing-proSkill
- swiftui-proSkill
- xcode-security-proSkill
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 212
Use // MARK: - section headers to organize code within files
- Very specific: line 214
Use the zero-parameter onChange(of:) closure (iOS 17+), not the deprecated { _ in } form
- Very specific: line 234
Service descriptions: use serviceType.localizedDetail, not .detail.
- Very specific: line 236
Adding strings: add the key to Strings.swift and the entry with all 8 translations to Localizable.xcstrings.
- Very specific: line 256
Verify a change by building and inspecting Metadata.appintents/extract.actionsdata in the built app — autoShortcuts should list both …
- Very specific: line 280
All workflows use macos-26 runner with concurrency groups and SPM caching.
- Very specific: line 285
Info.plist NSBonjourServices: Every service type the app wants to discover must be listed here.
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Project Overview
KozBon is a multi-platform Apple app for discovering and managing Bonjour (mDNS) network services. Bundle ID: com.kozinga.KozBon.
Working with Claude
Execution conventions (plan multi-step edits, no self-narration, atomic edits) live in .claude/rules/claude-execution-discipline.md, which loads every session.
Never push to main. Make every change on a branch and open a pull request against main. CI runs on the PR.
Build & Run
# Build for iOS Simulator
xcodebuild -workspace KozBon.xcworkspace -scheme KozBon -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build
# Build for macOS
xcodebuild -workspace KozBon.xcworkspace -scheme KozBon -destination 'platform=macOS' build
# Build for visionOS Simulator
xcodebuild -workspace KozBon.xcworkspace -scheme KozBon -destination 'platform=visionOS Simulator,name=Apple Vision Pro' build
# Run tests — all tests live in the SPM package
swift test --package-path KozBonPackagesThe KozBon scheme has no test action configured; all tests run through SPM.
Architecture
- Swift 6.2 with strict concurrency checking (
SWIFT_STRICT_CONCURRENCY = complete) - SwiftUI with MVVM pattern, targeting 26 on every platform (iOS, macOS, tvOS, watchOS, visionOS). The minimums were raised together so that no
#availablegating is needed for 26-era APIs — Liquid Glass, Foundation Models, and the Apple Intelligence surfaces are all unconditional. Only two availability annotations remain in the codebase: aniOS 27 / visionOS 27check forTabRole.prominentinAppCoreScene.swift, and one@available(macOS, unavailable), which is a platform exclusion rather than a version gate. Adding a new#available(… 26 …)is a sign something is out of date.- View-model conventions are documented in
.claude/rules/apple-swiftui-mvvm.md— when to use a VM,@Statevs@Bindableownership, dependency-plumbing rules, splitting large VMs across companion files
- View-model conventions are documented in
- Modular SPM packages via
KozBonPackages/local package in the Xcode workspace - Dependency Injection via
DependencyContainer(inBonjourScanningmodule) using SwiftUI environment (@Environment(\.dependencies)) - Core Data for persistence (
iDiscover.xcdatamodeld) — all Core Data access is@MainActorviaviewContext - Localization via
BonjourLocalizationmodule with String Catalog (.xcstrings) — 8 languages supported, including right-to-left (Arabic, Hebrew) - Protocol-based abstractions:
BonjourServiceScannerProtocol,BonjourPublishManagerProtocol
Project Structure
Workspace
KozBon.xcworkspace contains:
KozBon.xcodeproj— the app target (2 Swift files)KozBonPackages/— local SPM package (16 modules)
App Target (KozBon/)
Deliberately thin — the entry point, the one type the App Intents extractor requires here, and the resources that must live in the main bundle:
KozBonApp.swift— @main entry point; pulls the root scene fromAppCoreKozBonAppShortcuts.swift—AppShortcutsProvider. Cannot move into a package; see "App Intents & Siri Strings"Localizable.xcstrings— App Intents strings (main-bundle-only)AppShortcuts.xcstrings— spoken Siri phrasesInfoPlist.xcstrings— permission usage descriptionsInfo.plist,PrivacyInfo.xcprivacy,Assets.xcassets,service-names-port-numbers.csv
SPM Modules (KozBonPackages/)
Each module follows the {name}/Sources and {name}/Tests layout:
| Module | Purpose | Key Types |
| AppCore | Root scene, its view model, macOS menu commands, top-level tab destinations | AppCoreScene, AppCoreViewModel, TopLevelDestination |
| LocalNetworkMonitor | NWPathMonitor-backed Wi-Fi / Ethernet path check so Discover can explain why a scan can't reach anything | LocalNetworkMonitor, its @MainActor protocol + mock |
| InternetConnectivity | NWPathMonitor-backed internet reachability, the ConnectivityRequirement features declare, and URLError offline classification. Gates the cloud AI backends; Bonjour and Apple Intelligence never wait on it | InternetConnectivityMonitor, its @MainActor @Observable protocol + mock, ConnectivityRequirement, ConnectivityFailure, EnvironmentValues.internetConnectivity |
| BonjourCore | Value types, constants, utilities | Constants, TransportLayer, InternetAddress, Logger, Clipboard |
| BonjourStorage | Persistence — SwiftData preferences + Core Data custom-service-type store | PreferencesStore, UserPreferences, CustomServiceType, MyCoreDataStack, MyDataManagerObject |
| BonjourLocalization | Localized strings (8 languages, including RTL: ar, he) | Strings enum, Localizable.xcstrings |
| BonjourModels | Domain models and service library | BonjourServiceType, BonjourService, BonjourServiceSortType |
| BonjourScanning | Network discovery and publishing | BonjourServiceScanner, MyBonjourPublishManager, DependencyContainer, mocks |
| BonjourAICore | Provider-agnostic AI scaffolding — protocols, value types, prompt builders, safety, mocks, simulator stubs, UI primitives, credentials-store protocol + Keychain/InMemory impls | BonjourChatSessionProtocol, BonjourServiceExplainerProtocol, BonjourChatPromptBuilder, BonjourServicePromptBuilder, AIBackend, AICloudProvider, AICloudCredentialsStore, AICloudError, KeychainAICloudCredentialsStore, InMemoryAICloudCredentialsStore, MockBonjourChatSession, MockBonjourServiceExplainer, ServiceExplanationSheet, MarkdownContentView, TypingIndicator |
| BonjourAIApple | Apple Foundation Models implementations of the BonjourAICore protocols | BonjourChatSession, BonjourChatSessionFactory, BonjourServiceExplainer, BonjourServiceExplainerFactory, AppleIntelligenceSupport, AIContextMenuItems, prepare-tool wrappers |
| BonjourAIAnthropic | Anthropic Claude implementations of the BonjourAICore protocols + the runtime model catalog and the PreferencesStore.aiCloudModelIdentifier bridge | AnthropicModel (offline fallback only), AnthropicModelOption, AnthropicModelCatalog, AnthropicModelCatalogClient, AnthropicClient, AnthropicConfiguration, AnthropicBonjourChatSession, AnthropicBonjourServiceExplainer, MockAnthropicClient |
| BonjourAIGemini | Google Gemini implementations of the BonjourAICore protocols + the runtime model catalog. Uses the Gemini Developer API (generativelanguage.googleapis.com), not Vertex AI — Vertex needs service-account OAuth the paste-an-API-key sheet can't express. | GeminiModel (offline fallback only), GeminiModelOption, GeminiModelCatalog, GeminiModelCatalogClient, GeminiClient, GeminiConfiguration, GeminiGenerateRequest, GeminiStreamEvent, GeminiBonjourChatSession, GeminiBonjourServiceExplainer, MockGeminiClient |
| BonjourAIOpenAI | OpenAI implementations of the BonjourAICore protocols + the runtime model catalog. Uses the Responses API (/v1/responses) with store: false, so OpenAI keeps no copy of the conversation. | OpenAIModel (offline fallback only), OpenAIModelOption, OpenAIModelCatalog, OpenAIModelCatalogClient, OpenAIClient, OpenAIConfiguration, OpenAIResponseRequest, OpenAIStreamEvent, OpenAIBonjourChatSession, OpenAIBonjourServiceExplainer, MockOpenAIClient |
| BonjourAI | Umbrella module — cloud-aware routing factories + @_exported import BonjourAICore so legacy import BonjourAI consumers stay working | CloudAwareBonjourChatSessionFactory, CloudAwareBonjourServiceExplainerFactory |
| BonjourAppIntents | The Siri / Shortcuts / Spotlight actions. Holds the intents and entity; the AppShortcutsProvider itself lives in the app target because Xcode won't extract or localize one declared in a package | ScanForServicesIntent, ListDiscoveredServicesIntent, FindServicesIntent, IsDeviceOnlineIntent, OpenServiceIntent, ExplainServiceTypeIntent, BroadcastServiceIntent, StopBroadcastingIntent, BonjourServiceEntity, BonjourServiceTypeEntity, ServiceCategoryAppEnum, AppIntentsBridge, RecentServiceEntities, SiriNetworkSummary, IntentScan |
| BonjourUI | SwiftUI views and view models | All views, BonjourServicesViewModel, UI components |
Dependency Graph
App → AppCore, BonjourAppIntents
AppCore → BonjourUI, BonjourAppIntents, BonjourAI, BonjourAIApple, BonjourAIAnthropic, BonjourAIGemini, BonjourAIOpenAI, BonjourScanning, BonjourModels, BonjourStorage, BonjourLocalization, BonjourCore, InternetConnectivity, Core, CoreUI
BonjourAppIntents → BonjourAI, BonjourModels, BonjourScanning, BonjourLocalization, LocalNetworkMonitor, InternetConnectivity, BonjourCore
BonjourUI → BonjourModels, BonjourScanning, BonjourLocalization, BonjourAI, BonjourAIApple, BonjourAIAnthropic, BonjourAIGemini, BonjourAIOpenAI, BonjourStorage, BonjourCore, InternetConnectivity, Core, CoreUI
BonjourAI → BonjourAICore, BonjourAIApple, BonjourAIAnthropic, BonjourAIGemini, BonjourAIOpenAI, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourAIApple → BonjourAICore, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourAIAnthropic → BonjourAICore, InternetConnectivity, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourAIGemini → BonjourAICore, InternetConnectivity, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourAIOpenAI → BonjourAICore, InternetConnectivity, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourAICore → InternetConnectivity, BonjourCore, BonjourModels, BonjourLocalization, BonjourScanning, BonjourStorage
BonjourScanning → BonjourCore, BonjourModels, LocalNetworkMonitor
BonjourModels → BonjourCore, BonjourStorage, BonjourLocalization
BonjourStorage → BonjourCore
BonjourLocalization → (Foundation only)
LocalNetworkMonitor → Core
InternetConnectivity → Core
BonjourCore → Core (BasicSwiftUtilities)AI Backend Routing
ADR 0005 introduces a pluggable AI backend (extended by ADRs 0006 and 0007). The Settings → AI Backend section exposes a picker between four options:
- Apple Intelligence (default) — on-device via
BonjourAIAppleand FoundationModels. - Anthropic Claude (opt-in) — cloud via
BonjourAIAnthropicand the user's own API key. - Google Gemini (opt-in) — cloud via
BonjourAIGeminiand the user's own Google AI Studio key. - OpenAI GPT (opt-in) — cloud via
BonjourAIOpenAIand the user's own OpenAI API key. Labelled "OpenAI GPT", not "ChatGPT": a ChatGPT subscription doesn't include API access, and the sign-in copy says so. GitHub Models was a third option until GitHub retired the service on 2026-07-30.AIBackend.githuband the wholeBonjourAIGitHubmodule are gone; a stored"github"preference migrates to Apple Intelligence viaAIBackend.resolved(rawValue:), and Settings shows a one-time notice offering to delete the orphaned Personal Access Token (the presence of that Keychain entry is the notice's only state).AICloudProvider.githubandColor.kozBonGitHubdeliberately survive — they are what that cleanup row is built from — so don't "finish the job" by deleting them.
CloudAwareBonjourChatSessionFactory / CloudAwareBonjourServiceExplainerFactory
live in the BonjourAI umbrella and sit above the per-provider factories in
BonjourAIApple / BonjourAIAnthropic / BonjourAIGemini / BonjourAIOpenAI. They read preferencesStore.aiBackend
on every makeForCurrentEnvironment(...) call and route to the right implementation.
AppCoreScene watches preferencesStore.aiBackend and aiCloudModelIdentifier via .onChange
and calls AppCoreViewModel.refreshAIBackend() so flipping the picker takes effect
without an app restart (the in-flight conversation is dropped across the swap).
Each provider's API key lives in the iOS Keychain
(whenUnlockedThisDeviceOnly, never iCloud-synced) via
KeychainAICloudCredentialsStore, keyed by the provider's raw value. Tests
substitute InMemoryAICloudCredentialsStore.
Gemini keys go in the x-goog-api-key header, never the ?key= query
parameter the Gemini docs also accept — query strings land in logs, proxies,
and crash reports, and this is a user credential.
The Claude model picker is populated at runtime by AnthropicModelCatalog
(GET /v1/models with the user's own key), not by the AnthropicModel enum —
that enum is now only the offline fallback. Resolution is three-tiered: live
fetch → this session's cached fetch (1h TTL, in-memory) → the compiled-in list.
BonjourAIGemini mirrors this with GeminiModelCatalog against
GET /v1beta/models, filtered to models advertising generateContent — the
endpoint also returns embedding, image, and TTS variants that a chat picker
must not offer. OpenAIModelCatalog does the same against GET /v1/models,
which advertises no capabilities at all, so its filter is by identifier family
(OpenAIModelCatalogClient.isChatModel) — the piece to revisit when OpenAI
adds a model family.
AIBackendAvailability (in BonjourAICore) offers only Apple Intelligence on
the China mainland App Store storefront (Storefront.countryCode == "CHN"):
App Review rejected 4.8 under Guideline 5 because ChatGPT-associated features
need a permit there, and the same rule covers every unfiled generative-AI
provider. Release notes that name a cloud provider (namesCloudProvider) are
hidden from What's New and the chat prompt there too. Settings lists only
offeredBackends, both routing factories take an isBackendOffered closure
that also blocks fallbacks, and a storefront change resets a withheld
selection to the default. An unknown storefront offers everything. App Store
metadata in every locale names no cloud AI provider — see
docs/app-store-metadata.md.
OpenAI's reasoning models spend the output budget on hidden reasoning, so the
OpenAI session caps turns at 4,096 tokens (not 1,024) and sends
reasoning.effort: "low" only to families known to accept it
(OpenAIReasoning.forModel) — an unsupported parameter fails the request.
The selected model persists per provider: aiCloudModelRawValue holds the
Claude choice, aiGeminiModelRawValue the Gemini one, and aiOpenAIModelRawValue
the OpenAI one, so switching backends and back preserves each rather than handing
Gemini a claude- identifier. Read
them through PreferencesStore.aiCloudModelIdentifier(for:) in BonjourAICore
(the no-argument property resolves the currently-selected backend). Values are
raw Strings, and an identifier the binary doesn't recognize is only
discarded when a live list proves it retired — otherwise a model newer than the
build would be silently replaced by the default.
Offline Handling
Features declare a ConnectivityRequirement: .internet for every cloud
chat session and explainer (and AIBackend.connectivityRequirement for cloud
backends), .none for Apple Intelligence, mocks, and simulator stubs. Gate on
the session's requirement, not the selected backend, because the routing
factories can fall back across backends. AppCoreViewModel owns the live
InternetConnectivityMonitor, starts it at init (Siri may run with no scene),
injects it as \.internetConnectivity, and hands AppIntentsBridge an
isInternetConnected closure.
The monitor is @Observable, so the UI follows connectivity live rather than
asking the user to retry: the chat shows ChatOfflineBanner and disables Send,
the Insights sheet runs its .task(id:) once the connection returns, and
Settings defers the model-catalog fetch the same way. Requests that still fail
for lack of a connection show AICloudError.displayMessage(for:), which
localizes .networkUnavailable instead of surfacing its English log text.
LocalNetworkMonitor answers a different question (is the local link up for
Bonjour?) and stays separate.
Siri Actions and App State
Most Siri actions scan with their own IntentScan and need nothing from
the app. The ones that act on app state (Broadcast, Stop Broadcasting,
Explain, Open in KozBon) go through AppIntentsBridge.shared, which
AppCoreViewModel.connect(to:) fills in. That happens in AppLaunch,
reached from KozBonApp.init() via AppCoreScene.prepareForLaunch(),
because the system can launch the app in the background for an action
and never build a scene. Keep that wiring out of the scene.
Code Conventions
- Use
// MARK: -section headers to organize code within files - One type per file, feature-based folder organization
- Use the zero-parameter
onChange(of:)closure (iOS 17+), not the deprecated{ _ in }form - All user-facing strings must use
BonjourLocalization.Strings.*— never hardcode English strings in views. Two compiler-enforced exceptions, both in the app target (see "App Intents & Siri Strings" below): App Intents metadata and App Shortcut phrases cannot resolve against a package bundle. What Siri says at runtime is not metadata, so it goes throughStrings.Sirilike any other string. - Service type definitions go in
MyServiceType+Library.swift— each new type needs astatic private letdefinition AND an entry intcpServiceTypesorudpServiceTypesarray AND a correspondingNSBonjourServicesentry inInfo.plist
Concurrency (project specifics)
Swift 6 language mode with complete checking; the general rules are in .claude/rules/apple-swift6-strict-concurrency.md. KozBon's specifics:
- Service classes (scanners, publishers) are
@MainActor final class. Core Data types (MyCoreDataStack,MyDataManager,CustomServiceType) are@MainActor, since all access goes throughviewContext. DependencyContainerisfinal class: Sendablewith a@MainActor init()for production and a nonisolated init for tests.@MainActorprotocols (BonjourServiceScannerProtocol,BonjourPublishManagerProtocol) inheritAnyObject, Sendable.NetServiceDelegate/NetServiceBrowserDelegateconformances use@preconcurrency, notnonisolatedmethods. When both sides of a delegate chain are@MainActor, call delegate methods directly.nonisolated(unsafe)only for statics likestatic let sortDescriptors: [NSSortDescriptor]? = nil.
Localization
General rules: .claude/rules/apple-localization-best-practices.md. KozBon's specifics:
- Module:
BonjourLocalization, String CatalogLocalizable.xcstrings, 8 languages: en (base), es, fr, de, ja, zh-Hans, ar, he. Arabic and Hebrew are right-to-left; mirror direction-dependent symbols such as the chat cards'arrow.up.rightwith.flipsForRightToLeftLayoutDirection(true). - Access:
Text(Strings.NavigationTitles.nearbyServices),String(localized: Strings.Errors.portMin), and format functions likeStrings.Errors.portMin(value). - Service descriptions: use
serviceType.localizedDetail, not.detail. - Release notes: each release in
ReleaseNotes.allhas a 1–2 paragraph Englishsummary, which is its own catalog key, shown on What's New viaStrings.Settings.releaseSummary(_:). A new or reworded summary needs all 8 locales. Thehighlightsbullets are English-only chat context and aren't translated. - Adding strings: add the key to
Strings.swiftand the entry with all 8 translations toLocalizable.xcstrings.scripts/validate-localizations.pyenforces completeness in CI.
App Intents & Siri Strings
App Intents strings are the one place the BonjourLocalization.Strings.* rule does not apply. The compiler enforces this — the constraints below are build errors, not style preferences.
They must resolve against the main bundle. Routing an intent's title through Strings fails with "AppIntents requires LocalizedStringResource to use the main bundle", because Strings accessors carry bundle: .atURL(Bundle.module.bundleURL). So these strings live in the app target's own catalogs, not in BonjourLocalization:
| Catalog | Holds | Referenced from |
KozBon/Localizable.xcstrings | intent titles, descriptions, Spotlight keywords, entity type name, shortcut tile shortTitles | .init("intent_…") in BonjourAppIntents |
KozBon/AppShortcuts.xcstrings | the spoken Siri phrases only | extracted from KozBonAppShortcuts.swift |
KozBon/InfoPlist.xcstrings | permission usage descriptions | read by iOS directly |
KozBonAppShortcuts must stay in the app target. Xcode passes --no-app-shortcuts-localization to the App Intents extractor for every SPM target and omits it only for the app target. Declared in a package, the phrases can't be localized and never reach Metadata.appintents at all — autoShortcuts comes out empty and Siri offers nothing.
Some parameters accept only a literal. title takes .init("key"), but TypeDisplayRepresentation(numericFormat:) and AppShortcut(shortTitle:) reject it — "must be initialized directly with a String literal." Those keep the literal in Swift, and the catalog entry is keyed on the literal's own text (e.g. "%lld Bonjour services", "Scan for Services").
Don't put shortTitle in AppShortcuts.xcstrings. That catalog accepts spoken phrases only; anything else draws "This phrase is not used in any App Shortcut" once per locale.
Verify a change by building and inspecting Metadata.appintents/extract.actionsdata in the built app — autoShortcuts should list both shortcuts with their phraseTemplates.
SwiftLint
- Config:
.swiftlint.yml(line length warns at 140;tododisabled). There is no Xcode build phase: CI (swiftlint.yml) runsswiftlint lint --stricton PRs that touch.swiftfiles. - Run locally:
swiftlint lintfrom the repo root. - Intentional exceptions use
// swiftlint:disable:next <rule>with a reason (e.g.force_unwrappingin Core Data,force_castinMyDataManagerObject).MyServiceType+Library.swiftdisables rules at file level.
Testing
- Framework: Swift Testing (
@Test,@Suite,#expect). General rules:.claude/rules/apple-testing-strategy.md. - Runner:
swift test --package-path KozBonPackagesis the only runner; every test lives inKozBonPackages/. CustomServiceTypeTestsin BonjourStorage need Xcode to compile.xcdatamodeld, so they're excluded from the SPM test target (testExcludes). The SwiftDataPreferencesStoretests run underswift test.- Flaky tests (Xcode 27+):
swift test --package-path KozBonPackages --maximum-repetitions 5 --repeat-until fail, scoped with--filter.
CI / GitHub Actions
| Workflow | Trigger | What it does |
Native CI (ios.yml) | Push + PR to main | Build-only on iOS Simulator (iPhone 17 Pro) and macOS — no xcodebuild test; tests run under spm-tests.yml |
SPM Package Tests (spm-tests.yml) | Push + PR when KozBonPackages/ changes | swift build + swift test |
SwiftLint (swiftlint.yml) | PR when .swift files change | Lint with inline PR annotations |
Multi-platform Build (multiplatform-build.yml) | Push + PR to main | macOS + visionOS builds in parallel |
All workflows use macos-26 runner with concurrency groups and SPM caching.
Important Gotchas
- No duplicate service types: Each
(type, transportLayer)pair must be unique in the library arrays. Duplicates cause redundant scanners and duplicate discovered services. - Info.plist NSBonjourServices: Every service type the app wants to discover must be listed here. Format:
_type._transport(e.g.,_http._tcp). No duplicates. - service-names-port-numbers.csv: IANA registry reference file bundled as a resource. Not parsed at runtime — service types are hardcoded in the Swift library.
- BonjourService.id is
logicalIdentity(name|type|domain), so it's stable across launches and dedups per-interface duplicates. - Core Data model in package:
iDiscover.xcdatamodeldlives inBonjourStorage/Sources/Resources/(alongside the SwiftData preferences container) and is loaded viaBundle.module. SPM CLI (swift test) cannot compile.xcdatamodeld— use Xcode for the Core Data tests. @_exported import Core:BonjourCore/Sources/Exports.swiftre-exports theCorepackage so downstream modules getLogger/Loggablewithout explicitly importingCore.- SF Symbol validation: All
imageSystemNamevalues inBonjourServiceType+UI.swiftare verified valid SF Symbols. When adding new ones, validate withNSImage(systemSymbolName:accessibilityDescription:).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

