How PhotoAIKit Is Constructed
A detailed guide to PhotoAIKit’s contracts, CLIP image and text inference, semantic comparison, SAM 3 and EfficientSAM, workflows, storage, concurrency, and model identity.
RawCull is the composition root for four architecture packages and four small
rsync/persistence support packages. The package repositories are separately
versioned. They are not copied source snapshots inside TechDocRawCull; paths
under Sources/ and Tests/ in these guides refer to the named package
repository. The revision notes at the start of each guide say whether its detailed
walkthrough was reviewed at the app’s current pin. In particular, the PhotoAIKit
and RawParserKit guides preserve their earlier architecture audits while the
lockfile table below records what the current app builds.
This table is derived from
RawCull.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved.
This snapshot is from the current RawCull checkout on September 30, 2026.
“App” means RawCull links a product directly; “transitive” means another package
owns the dependency. A revision-only pin has no semantic-version label.
| Identity | Relationship | Version/branch | Revision |
|---|---|---|---|
| PhotoAIKit | app | revision pin | 77cc1d84a5d98a485caa15be102c8a55eb3d7698 |
| PhotoAnalysisKit | app | 1.3.1 | 2a1466e04d821fa2628d6985296643e0d0c7e465 |
| RawCullCore | app | 1.1.2 | d25a51e65ad32a82bf82f86fa0ec07d6e14498e9 |
| RawParserKit | app | 1.3.1 | f0e5b02a10294798afd86781da5d6510e146a7ba |
| RsyncArguments | app | 1.0.0 | 0ff6518136c208dfbecc1a918f045048ca79853d |
| RsyncProcessStreaming | app | 1.0.0 | dd86f012b352888fd146e0b6e103740dc237f740 |
| ParseRsyncOutput | app | 1.0.0 | e079e0c9d34bf07f7f2a4312b40feea79ae14847 |
| DecodeEncodeGeneric | app | 1.0.0 | b5ecbbbe1b244191efec1532a979f6ae342d6617 |
| coreai-models | transitive from PhotoAIKit | revision pin | 475c585fdb0fe82a83c8f777f259e9414bd44c98 |
| EventSource | transitive | 1.5.1 | 86b5096ac59ab46e66bd1f6377c604bc1dab0bc2 |
| swift-asn1 | transitive | 1.7.3 | 3b6410f7dee09eb33cdd26260c5fd47fda19b0e2 |
| swift-collections | transitive | 1.7.1 | 98ef3c98609a1e31b7e157b5b619579001a789d6 |
| swift-crypto | transitive | 4.5.2 | da9d28d69ebe3894b18376c8f2395c2f37b8448f |
| swift-huggingface | transitive | 0.11.0 | f2f99991f2d7d8fdb3187e4fd539cd2facf5c13d |
| swift-jinja | transitive | 2.5.1 | 4588064a20f3fc093c95f2f7d3359999bf30cae5 |
| swift-transformers | transitive | 1.3.4 | c21fdcde390313a6d98d8e33a346f2c3486c3ab0 |
| xgrammar | transitive | 0.2.2 | 4d145cc13d878c751ebeed36af1c013074be76bc |
| yyjson | transitive | 0.12.0 | 8b4a38dc994a110abaec8a400615567bd996105f |
Do not infer the app boundary from every transitive pin. Xcode product references and source imports define what RawCull actually consumes.
| Package | Products imported by RawCull | Values or protocols crossing the boundary |
|---|---|---|
| RawParserKit | RawParserKit | RawImageLoader, RawImageMetadata, RawFocusPoint, RawFormatRegistry, CGImage results; the app maps them through RawParserKitImageLoader |
| PhotoAnalysisKit | PhotoAnalysisKit | PhotoAnalyzer, PhotoAnalysisInput, PhotoAnalysisDescriptor, PhotoAnalysisResult, focus evidence and mask values |
| RawCullCore | RawCullCore | RawCullFileItem, RawCullSourceCatalog, ExifMetadata, burst inputs/results/configurations, ranking evidence, histograms; the app exposes compatibility typealiases such as FileItem |
| PhotoAIKit | PhotoAIContracts, CoreAICLIPBackend, CoreAISAM3Backend, CoreAIEfficientSAMBackend, VisionFeaturePrintBackend, PhotoAIWorkflows, PhotoAIStorage | AIImageSource, model identities/resources, similarity artifacts/descriptors, provider protocols, segmentation requests/results, mask stores and workflows |
| RsyncArguments | RsyncArguments | rsync argument builders used by Params and ArgumentsSynchronize |
| RsyncProcessStreaming | RsyncProcessStreaming | RsyncProcess and ProcessHandlers used by the copy executor |
| ParseRsyncOutput | ParseRsyncOutput | parsed transfer progress and totals used by RemoteDataNumbers |
| DecodeEncodeGeneric | DecodeEncodeGeneric | generic JSON encode/decode used by saved-file persistence |
RawCull owns the translations between these vocabularies. None of the four architecture packages imports another merely to share an app model.
flowchart TD
UI["RawCull SwiftUI"] --> Host["RawCull composition, adapters, policy, persistence"]
Host --> Parser["RawParserKit\nRAW decode + normalized metadata"]
Host --> Analysis["PhotoAnalysisKit\nmeasurements + masks"]
Host --> AI["PhotoAIKit products\nAI contracts + backends + workflows"]
Host --> Core["RawCullCore\npure grouping + ranking"]
Host --> Args["RsyncArguments"]
Host --> Process["RsyncProcessStreaming"]
Host --> Output["ParseRsyncOutput"]
Host --> JSON["DecodeEncodeGeneric"]
Parser -. "app adapter" .-> Core
Analysis -. "app adapter" .-> Core
AI -. "app adapter" .-> Core
Args --> Process
Process --> OutputSolid arrows are compile-time imports by the app or support flow. Dotted arrows are value translation performed by RawCull, not package dependencies.
When a package pin changes, compare its manifest and public source at the new resolved revision before updating this documentation. A sibling checkout may be ahead of the revision RawCull actually builds.
A detailed guide to PhotoAIKit’s contracts, CLIP image and text inference, semantic comparison, SAM 3 and EfficientSAM, workflows, storage, concurrency, and model identity.
A detailed guide to PhotoAnalysisKit’s image-analysis boundary, sharpness pipeline, focus evidence, masks, calibration, batching, feature prints, resources, and concurrency.
A detailed guide to RawCullCore’s package-safe models, capture-time and EV-aware burst grouping, ranking evidence, confidence rules, histograms, concurrency, and tests.
A detailed guide to RawParserKit’s vendor dispatch, TIFF and MakerNote parsing, embedded previews, structured capture and exposure metadata, orientation, decode limiting, cancellation, compatibility APIs, and tests.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.