RawCull Packages

Architecture guide to the four reusable Swift packages used by RawCull.

RawCull Packages

RawCull is split across four reusable Swift packages. Each package owns one kind of knowledge and deliberately avoids importing the others. RawCull is the composition root: it decodes a file and capture metadata with RawParserKit, asks PhotoAnalysisKit or PhotoAIKit to measure or index it, translates the evidence into RawCullCore values and decisions, and presents or persists the outcome.

flowchart LR
    Files["ARW, NEF, and rendered files"] --> Parser["RawParserKit\ndecode + capture metadata"]
    Parser --> Host["RawCull adapters\nsource and cache policy"]
    Host --> Analysis["PhotoAnalysisKit\nsharpness + focus evidence"]
    Host --> AI["PhotoAIKit\nimage/text embeddings + segmentation"]
    Analysis --> Host
    AI --> Host
    Host --> Core["RawCullCore\nburst grouping + ranking"]
    Core --> App["RawCull UI, persistence, and culling actions"]

The arrows are runtime data flow, not package dependencies. The four sibling packages do not depend on one another; the RawCull application imports and adapts them.

PackageOwnsDeliberately leaves to RawCull
PhotoAIKitModel validation, CLIP image and text embeddings, image/text semantic comparison, SAM 3, Vision similarity artifacts, AI workflows, and optional storage codecsModel installation, RAW decoding, query and result presentation, cache locations, and culling policy
PhotoAnalysisKitSharpness scoring, saliency and classification, focus evidence and masks, calibration, and Vision feature printsFile decoding, source identity, persistence, settings wording, and culling decisions
RawCullCorePackage-safe metadata, capture-time and exposure-aware burst grouping, evidence-based ranking, focus-point normalization, and luminance histogramsRAW parsing, image analysis, application state, storage, and presentation
RawParserKitVendor dispatch, MakerNote and embedded-JPEG parsing, image loading, orientation, structured capture/EXIF extraction, and bounded decode workAnalysis, scoring, catalogs, cache policy, and UI
  1. Start with RawParserKit to see how a file becomes a normalized image and metadata.
  2. Continue with PhotoAnalysisKit to see how a decoded image becomes sharpness and focus evidence.
  3. Read RawCullCore to see how measurements become burst boundaries and recommendations.
  4. Read PhotoAIKit for optional CLIP image similarity, text-query semantic search, and SAM 3 segmentation workflows.

The source for this section is the current PhotoAIKit, PhotoAnalysisKit, RawCullCore, RawParserKit, and RawCull repositories under /Users/thomas/GitHub/RawCull. In each package guide, paths beginning with Sources/ and Tests/ are relative to that package. Paths beginning with RawCull/ are relative to the RawCull application repository.


How PhotoAIKit Is Constructed

A detailed guide to PhotoAIKit’s contracts, CLIP image and text inference, semantic comparison, SAM 3, workflows, storage, concurrency, and model identity.

How PhotoAnalysisKit Is Constructed

A detailed guide to PhotoAnalysisKit’s image-analysis boundary, sharpness pipeline, focus evidence, masks, calibration, batching, feature prints, resources, and concurrency.

How RawCullCore Is Constructed

A detailed guide to RawCullCore’s package-safe models, capture-time and EV-aware burst grouping, ranking evidence, confidence rules, histograms, concurrency, and tests.

How RawParserKit Is Constructed

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.


Last modified July 30, 2026: new TechDocRawCull (e743456)