Skip to content
Back to skills

Lightcraft

ASecurity

LightCraft is a native photo library and non-destructive raw developer — an open-source, clean-room reimplementation of Adobe Lightroom Classic — in pure Rust, with a desktop app, `lightcraft-cli`, a web build and an MCP/control server. Trigger whenever the user mentions LightCraft, a LightCraft library folder, `lightcraft-cli` or its control/MCP server; asks what it imports, develops or exports (RAW: DNG, CR2/CR3, ARW, NEF, RAF; images: JPEG/PNG/TIFF/WebP/HEIC/AVIF/JXL/PSD; export: JPEG/PNG/...

  • 122 stars
  • 0 votes
  • 6 copies
  • 54 views
  • Added October 16, 2026
developmentrustgoshellsqlnodeexpressawstestinggitapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add midasmatterhorn/artcraft-skills --skill lightcraft --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lightcraft?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lightcraft
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/midasmatterhorn-lightcraft/badge)](https://www.skillsdirectory.com/skills/midasmatterhorn-lightcraft)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lightcraft
description: >-
  LightCraft is a native photo library and non-destructive raw developer — an open-source, clean-room
  reimplementation of Adobe Lightroom Classic — in pure Rust, with a desktop app, `lightcraft-cli`, a
  web build and an MCP/control server. Trigger whenever the user mentions LightCraft, a LightCraft
  library folder, `lightcraft-cli` or its control/MCP server; asks what it imports, develops or exports
  (RAW: DNG, CR2/CR3, ARW, NEF, RAF; images: JPEG/PNG/TIFF/WebP/HEIC/AVIF/JXL/PSD; export:
  JPEG/PNG/TIFF/WebP/AVIF/PSD/DNG/JXL); wants to cull, batch-render, script or automate it; wants a
  Lightroom catalog migrated, camera profiles fitted, or exports, sidecars and colour verified; or
  troubleshoots it. Trigger even without the app name — "cull this shoot", "develop this RAW",
  "import my Lightroom catalog", "why won't this CR3 open" — and prefer this over generic Lightroom
  advice: LightCraft's formats, counts and gaps differ from Adobe's.
---

**Audit basis.** Refreshed 2026-12-03 against tag **v0.22.0**, commit **`84fad67b66816941bd8b35adf86f60ec5155413c`** — `git rev-parse HEAD` in the pinned checkout confirms, and the installed LightCraft bundle matches (its binary prints `lightcraft 0.22.0`). The previous release this skill described was v0.21.1 (`361e3bc0c838ffe5e5cea515b1fe5b71951989c6`).

**v0.21.1 → v0.22.0 delta.** 779 files changed (+75,563/−57,314). The engine registry gains **15 ids, zero removed** (368 → **383** non-test `cmd!` specs; 39 → 40 `specs()` extend calls): nine `aiDefringe.*`, `photo.moveToBurst`, four `print.template.*` (folder create/delete/rename, move), `segment.settings`. `UI_COMMANDS` gains four (195 → **199**): `panel.bursts`, `view.allPanels` (⇧Tab), `view.colorMixer`, `view.reduceMotion`; 18 language commands unchanged (213 → **217** UI entries, **600** live). New: **AI Defringe** in Optics (one `optics.aiDefringe` Amount 0–100, **no model ships**), a **Bursts** panel with manual burst arrangement, print Template Browser folders, a SAM 3 run-on setting (its image encoder now uses the GPU on Linux/Windows too), **process versions V10, V13 and V14** (latest V14; V9/V11/V12 name no process), **AVIF decoding in native builds**, export subfolder `{album}`/`{date}`/`{hour}`, and `library.import` reporting `skipped: {unreadable, unsupported}`. The catalog format goes **13 → 14**; an upgrade first keeps the old files byte for byte as `catalog.snap.v<format>-<seq>` / `catalog.log.v<format>-<seq>`. A library is now written only to the folder it was opened from (device + inode check before every save). Shared code was consolidated to a **single craft-libs rev** `b2d2a1e948c43d95aa769d4f0a06fe6b869edc39`; the in-repo HEIF crate is gone (now `craft-heif`) and HEIC, PSD, gain maps, PDF serialization, metadata, JPEG/GIF/JXL, raw and lens metadata now come from craft-libs (TIFF and CRW already did).

**Verify against your installed version** — the ArtCraft Launcher auto-updates, so a newer build may differ; every count quoted here was re-measured at this tag, and the measurement method for each is in `evidence.md`.

## Overview

LightCraft is a photo **library** plus a non-destructive **raw developer** — an open-source, clean-room reimplementation of Adobe Lightroom Classic 15.5 / Lightroom 9.6 (`ROADMAP.md:3`, `docs/target-app-parity.md`), written from scratch in pure Rust with no Adobe assets (`README.md`, `AGENTS.md`). Its surfaces are the desktop app (`apps/lightcraft`, eframe + wgpu + native macOS menus on the shared `craft-ui` docking), `lightcraft-cli` (headless render, batch commands, MCP server, headless UI snapshots), and a WebAssembly build of the same UI (`apps/lightcraft-web`).

**Maturity: alpha.** At this tag the generated parity summary reports **83.0% of 547 in-scope rows** (P0 97.3% of 203, P1 93.9% of 163, P2 56.9% of 180; `docs/parity-checklist.md:63`), while `ROADMAP.md:15` still prints **81.6% of 532** and `docs/target-app-parity.md:15` **83.2% of 543** — both lag the generated block. The readiness estimate is **~62%** overall, **~51%** for a mainstream working photographer and **~65%** for an essentials user; beta is an estimated ~340–600 agent-hours away (`ROADMAP.md:3-22`). The gap is quality and coverage — camera colour, render fidelity, some raw variants, AI models — not missing buttons. Source: GitHub `storytold/lightcraft`, MIT OR Apache-2.0 (`Cargo.toml`).

## Capabilities (verified)

### Library, catalog and views — implemented

- **The library is a folder, not a document.** `catalog.snap` (JSON snapshot) + `catalog.log` (append-only JSON-lines op log: `seq`, CRC-32, fsynced; a torn final record is repaired; a mid-log is preserved as `catalog.log.damaged-<seq>`), plus `presets.json`, `view.json`, `prefs.json`, `thumbs/` and `Originals/` for copy-imported photos (`crates/engine/src/library.rs:1-22`; `crates/catalog/src/journal.rs:1-40`). Default: `LightCraft Library` under the user's `Pictures` folder; `LIGHTCRAFT_LIBRARY` overrides (`crates/engine/src/library.rs`).
- **Catalog format 14, with a real way back.** Opening a v13 library upgrades it and first keeps the old `catalog.snap.v13-<seq>` and `catalog.log.v13-<seq>` byte for byte; an older build refuses format 14 safely (it changes nothing), so restore those files to go back (`crates/catalog/src/journal.rs:80-100`; `crates/catalog/src/tests_format_version.rs`; `docs/catalog-persistence.md`). `library.compact` writes and fsyncs a snapshot before returning.
- **Crash-safe, single-writer and pinned to its folder.** Every top-level command that changes the catalog persists its ops (fsynced) before replying; a failed write keeps the change in memory, reports `unsaved` and retries. One process per library: `catalog.lock` fails with "This library is already open in …". Before every save the app checks that the library path still leads to the folder it opened (device + inode, or the lock note this session wrote) — a share mounted over the folder or a folder swapped underneath it gets **no** writes: catalog, settings, lock note and thumbnails are all held, and saving resumes when the original folder returns (`crates/catalog/src/lock.rs`; `crates/catalog/src/opened_folder.rs` `OpenedFolder`; `crates/engine/src/library.rs`; `docs/parity-checklist.md` row `LRC-LIB-CATALOG-LOCK`).
- **Library model.** Albums in folders, smart albums (rule trees incl. File Path rules; "in the last…" date rules refresh when the session clock crosses a minute), stacks/auto-stack, **bursts** (Assisted Culling's groups plus a Bursts panel where `photo.moveToBurst` arranges a burst by hand and keeps that arrangement on later culls), virtual copies, versions and history, ratings/flags/colour labels + configurable label sets, filter bar with **Enable Filters** (`⌘L`, `library.toggleFilters`), fielded search (including people named on faces), sort, Photo Grid / Square Grid / People, filmstrip, Compare and Survey culling with synced zoom (Survey tiles fit the photos' shapes, centre an incomplete last row and glide when photos leave or join; ↑/↓ step the survey like ←/→), **Reference view** (⇧R, `photo.setReference`), **Local** folder browsing without import (edits go to XMP sidecars; "Add to My Photos" adopts the photo), Recently Deleted, missing-file relink, **hold view** (`library.holdView`) and **Assisted Culling** (classical focus score, clipping, burst grouping; no expression/eye detection) (`crates/engine/src/cmd/organize.rs`, `crates/engine/src/cmd/cull.rs`, `crates/engine/src/cmd/library.rs`, `crates/engine/src/cmd/filters.rs`, `crates/engine/src/cmd/query.rs`, `crates/engine/src/cmd/browse.rs`; `crates/ui-egui/src/panels/bursts.rs`; `crates/engine/src/tests/bursts.rs`; `docs/parity-checklist.md` rows `LRC-LIB-REFVIEW`, `LR-VIEW-SURVEY`, `LR-LIB-CULL`).
- **Choosing a library at launch.** Settings ▸ General ▸ **At launch**: *Open the last library* or *Ask me*; with *Ask me* (or Alt/Option held as the window appears) a window lists recent libraries with name, folder, last-opened time and a background existence check. `app.recentLibraries` returns `{path, name, exists, checking, open, lastOpened}` and `{remove: path}`/`{clear: true}`; `app.newLibrary` makes and opens one (`crates/ui-egui/src/dialogs/settings/libraries.rs`; `docs/control-protocol.md` "Choosing the library at launch").
- **Workspace.** Detail view with Edit / Info / Keywords / History panels, full-screen preview (`F`), Lights Out (`⇧L`), second window (`⌘F11`), Before/After (`Y`, `⇧Y`, `⌥Y`), soft proofing (`S`; partial — printer/paper proof profiles render on the CPU), info overlay (`⌘I`) and View Options (`⌘J`), a loupe layout-image overlay, multi-select Info panel (`view.infoSelectedPhotos` shows shared values and marks mixed fields), dockable/splittable panels via `ui.dock` / `ui.dock.reset`, and **Hide All Panels** (⇧Tab, `view.allPanels`) which restores exactly the panels that were showing (`crates/ui-egui/src/menus/ui_commands.rs`; `crates/ui-egui/src/shortcuts.rs`; `docs/control-protocol.md` "Methods").
- **Long-running tasks** (imports, exports, merges, downloads, preview builds, the face scan, AI Defringe corrections, Find Similar) live in one activity stack, visible to agents as `activity.list` / `activity.cancel`; quitting asks first (`crates/engine/src/cmd/activity.rs`; `docs/background-tasks.md:1-10`; `ui.inspect` → `quitPrompt`).
- **Previews and proxies.** `library.buildPreviews|cancelPreviews|previewProgress` build the disk thumbnail cache; `photo.smartPreview` plus `library.smartPreviews|smartPreviewsLocation` build/relocate smart previews that keep working when originals are offline (`crates/engine/src/cmd/previews.rs`; `docs/camera-preview-colour.md` "smart previews").
- **Faces and focus points.** XMP face names, editable face boxes and the People view work with no model; detection (YuNet) and recognition (SFace/AuraFace) are opt-in model installs run by LightCraft's own pure-Rust interpreter — CPU, with a wgpu GPU path used only when a load-time check matches the CPU within 1e-3 and it is faster. Faces are now read both as they are and mirrored and the two averaged before matching, so more of a person's photos match (recognition takes about twice as long; existing scans are redone in the background) (`crates/engine/src/cmd/face_models.rs`, `crates/engine/src/cmd/face_detect.rs`, `crates/engine/src/cmd/face_recognize.rs`, `crates/gpu/src/faces.rs`; `docs/faces.md`). `photo.inspect` carries `meta.focus`; View ▸ Focus Point (⌥F), zoom-to-focus and a background `photo.readFocusPoints` sweep — only Sony `ILCE-1` (α1) and `ILCE-7SM3` (A7 S III) at this tag (`docs/focus-points.md`).

### Import and raw decoding — implemented, with coverage limits

- **Importable extensions are one list of 39** in `crates/engine/src/import/files.rs` (`EXTENSIONS`): `jpg jpeg png tif tiff webp dng cr2 cr3 nef nrw arw sr2 srf raf orf rw2 rwl raw pef srw psd psb jxl gif bmp heic heif avif iiq crw mrw x3f kdc mos erf 3fr fff mef` — unchanged at v0.22.0. Support is decided by **extension** (`is_supported`), then the decoder may still refuse. `library.import` now also returns `skipped: {unreadable, unsupported}` for folder-walk leftovers, as `library.importPreview` already did (`crates/engine/src/cmd/library/specs.rs`). Modes: **Add** (reference in place), **Copy** (into `Originals/` or a destination, with date/month/flat/folder-template filing and rename templates), **Move** (copy, verify, then remove the source and its sidecars — only after the catalog is on disk); duplicates are detected by path and by content; copy imports can convert raws to DNG (`crates/engine/src/import.rs`; `crates/engine/src/cmd/library.rs`).
- **Raw decoded from sensor data** (`docs/raw-parity.md`; `crates/raw/src/lib.rs`, decoding via the pinned `craft-raw`): DNG (uncompressed, LJ92, lossy/Smart Preview, LinearRaw, Deflate, DNG 1.7 JPEG XL tiles, Apple ProRAW, row/column interleave), CR2, CR3 (lossless CRX Bayer + version 0x100/0x200 C-RAW; R5 Mark II), ARW (uncompressed, cRAW/ARW2, lossless L/M/S, A900 packed, ARW6 Compressed/HQ on the ILCE-7RM6), NEF (uncompressed, lossless/lossy, lossy-after-split, table-less 34713 strips as packed 12/14-bit), RAF (uncompressed and lossless/lossy compressed, Bayer + X-Trans), RW2/RWL/Panasonic RAW (formats 2/4/5/6/7/8 incl. tiled high-resolution format 8), PEF, ORF **uncompressed only** (incl. 12.8 bpp and supported high-resolution modes; compressed ORF is preview-only), SRW (uncompressed), ERF, MEF, Minolta MRW, 3FR/FFF, Kodak DCS520C TIFF, and Sony SR2.
- **Per-model coverage is measured, not implied.** Of Adobe's 1,446 listed models: **557 verified** from sensor data (39%), **665 decoder-path-unverified**, **187 preview-only**, **37 unsupported** (`docs/raw/coverage.tsv`, generated by `docs/raw/coverage.py`; `docs/raw-parity.md:18-24`). Use-weighted: **~94% of photographers' cameras fully decode, ~86% on a verified body** (`docs/raw-parity.md:23-24`).
- **Anything it cannot decode falls back to the embedded camera JPEG** and is flagged `previewOnly`; the app rechecks those photos in the background on version change, and headless callers use `library.recheckPreviewOnly` (`crates/engine/src/cmd/recheck.rs`). Sparse header + embedded-JPEG reads avoid pulling sensor data over a network share (`docs/raw-preview-reads.md`). Compressed ORF files previously decoded from sensor data are re-checked on library open and become preview-only (`docs/orf-compression.md`).
- **HEIC/HEIF decode** exists behind the `heif` build feature; it is off by default for HEVC-patent reasons and **on in official packaging** (`packaging/macos/package.sh:65` passes `--features lightcraft/heif`; `crates/codecs/Cargo.toml:43` still claims releases don't ship it — stale). The installed 0.22.0 binary contains 19 `craft_heif` symbols (`nm -gU`), confirming the feature; decoding now lives in the shared `craft-heif` crate.
- **AVIF now decodes in native builds.** The codecs' default features are `parallel`, `jxl` and `avif`; `avif` pulls `craft-image-codecs/avif-decode` (a pure-Rust AV1 decoder), the engine's probe accepts the format when `Format::Avif` is decodable, and the installed 0.22.0 binary exports `craft_image_codecs::decode_avif_with_depth`. The web build (wasm32) still cannot decode AVIF and its file picker omits it; in-repo docs still say AVIF import is missing — stale (`crates/codecs/Cargo.toml:45-46`; `crates/codecs/src/avif_decode.rs`; `crates/engine/src/files/probe.rs:211`; `docs/file-format-parity.md` row AVIF).
- **Lightroom Classic catalog import** (`library.inspectLightroom` / `library.importLightroom`, File ▸ Import Lightroom Catalog…): reads `.lrcat` directly (read-only pure-Rust SQLite incl. committed WAL; 16 GiB / 16,777,216-page cap), one-way and approximate, imports ratings/flags/labels/keywords/collections/virtual copies/mapped develop settings. It also takes a Lightroom **backup `.zip`** (one `.lrcat` inside), unpacks it into a temporary folder in the library, reads it and removes the copy; the zip is not changed (`crates/engine/src/lightroom_backup.rs`, `crates/engine/src/lightroom_folder.rs`; `docs/lightroom-catalog-import.md:170-200`). The app asks whether the catalog **merges into the open library or goes into a new library** — `file.importLightroom {into?: "open"|"new", name?, location?}` makes that choice headlessly (`crates/ui-egui/src/dialogs/lightroom_destination.rs`). Also `folder.scanChanges` / `folder.synchronize` and `library.autoImport` / `library.autoImportScan` (`crates/engine/src/cmd/sync.rs`).

### Develop, masks and merge — implemented

- **126 named develop sliders** in one spec table plus **10 indexed specs** (8 Point Color + 2 Red Eye), addressed as `pointColor.<i>.<control>` / `redEye.<control>`; **17 sections**: Light, Curve, Color, Mixer, BwMix, Grading, Effects, Vignette, Grain, Detail, Optics, Geometry, Profile, Calibration, PointColor, RedEye, LensBlur (`crates/develop/src/controls.rs`; count it with `lightcraft-cli controls --json`). The one addition since v0.21.1 is `optics.aiDefringe` (Optics ▸ Defringe, Amount 0–100).
- **AI Defringe** (new): a per-photo switch with an Amount that removes purple/blue-violet/green fringes with a user-installed ONNX defringe model; **no model ships**, so out of the box the section only says where to install one (Settings ▸ AI Defringe ▸ Install from file…), and an export with it on and no model fails with an explanation. The correction is computed once per photo by a pure-Rust CPU network (no GPU path) and cached as `<library>/ai-defringe/<key>.lcadf`; `aiDefringe.toggle|status|make|retry|pump|clear` and `aiDefringe.models.inspect|install|remove` drive it, and Auto Sync does not copy the switch or amount (`crates/engine/src/aidefringe.rs`, `crates/engine/src/cmd/aidefringe.rs`, `crates/denoise/src/defringe.rs`; `docs/ai-defringe.md`; parity row `LR-EDIT-OPTICS-DEFRINGE`).
- **22 built-in develop profiles** (looks, `crates/engine/src/presets.rs:519` `PROFILES`) — Color, Neutral, Vivid, Landscape, Portrait, Monochrome plus film/cinema/muted/B&W families — a profile *browser* with recent profiles; the profile is separate from the raw camera profile below. Unchanged at v0.22.0.
- The pipeline is scene-referred linear Rec.2020 32-bit float with OkLCh-based colour and a filmic shoulder for raw, pass-through for untouched JPEGs (`README.md`). **Process versions V1–V8, V10, V13 and V14 (V14 current, V1 frozen; 9, 11 and 12 name no process and render as V8/V10)**: V2 highlights/shadows, V3 pixel-scale sharpening, V4 calibrated Contrast/Blacks, V5 highlight roll-off, V6 colour-noise reduction, V7 crystal-layer film grain, V8 detail-free Highlights/Shadows base, **V10 checked Bradford white-balance fallback**, **V13 eased global Shadows / weaker negative Texture / weaker global grading wheel**, **V14 Heal/Remove spots pinned to the photo at the spot's edge**; `develop.updateProcess` moves photos forward (`docs/process-versions.md`, `docs/heal-pinned.md`; `crates/develop/src/settings.rs` `Process::ALL`).
- `develop.set` / `develop.adjust` / `develop.auto` / `develop.wb` / `develop.wbPick` / `develop.matchExposure` / `develop.copy|paste|sync|autoSync` / `develop.merge` / `develop.reset*` / `develop.beginInteraction|endInteraction`; white balance is Kelvin on raws with colour matrices or measured presets, relative (6500 = as shot) elsewhere (`crates/engine/src/cmd/develop.rs`).
- **Masking**: brush, linear/radial gradients, luminance range, colour range, Subject / Sky / Background heuristics, plus Object and Describe via an optional SAM 3 model; Add/Subtract/Intersect, invert, **17 local sliders + a colour overlay + Amount** and a **Lens Blur block** per mask. Straight agent brush strokes: `mask.brushStroke {connect: true}` (`crates/develop/src/settings.rs`; `crates/engine/src/cmd/masks.rs`; `docs/ai-masks.md`). SAM 3 runs on the GPU where one is usable (Metal on macOS; wgpu Vulkan/DX12 image encoder on Linux/Windows), and `segment.settings {runOn: "auto"|"cpu"}` selects that or all-CPU (`crates/engine/src/cmd/masks.rs`; `docs/ai-masks.md`).
- **Lens Blur** (`section.lensBlur`, ⌘6; `lensBlur.amount|boost|transition`): Apply, Blur Amount, Boost for bokeh highlights, Transition, what stays in focus (the subject estimate, any mask, or a fixed Round/Horizontal/Vertical oval that can be moved and resized), Find Subject, and Focus/Blur brush refinement with Amount/Size/Feather/Flow/Auto Mask and ⌥ to erase (`crates/pipeline/src/lens_blur.rs`; `crates/engine/src/cmd/develop.rs`; parity row `LR-EDIT-LENSBLUR`). **Partial**: CPU for both renderers, disc bokeh without halos, but no AI depth map, no Focal Range / focus picker / Visualize Depth, no bokeh shapes and no `crs:` XMP mapping.
- **Crop, geometry and repair**: crop/straighten/rotate/flip with aspect ratios that stay portrait after rotation, **aspect lock** (`crop.lockAspect`, `A`), auto-straighten, Upright Auto/Level/Vertical/Full/Guided, Constrain Crop, a live crop pixel-size readout; Heal/Clone spots with auto source, non-generative Fill (PatchMatch), editable pins, Visualize Spots, Red Eye and Pet Eye (`crates/engine/src/cmd/develop.rs`; `crates/inpaint/src/lib.rs:1-22`).
- **Photo Merge**: HDR (auto-align, deghost incl. moving lights, deterministic order, bracket batching), Panorama (spherical/cylindrical/perspective, boundary warp, auto crop, Lanczos-3 resampling; hard maxima 512 MP / 65,000 px), HDR Panorama → DNG; commands `merge.hdr|panorama|hdrPanorama|hdrBatch`; CLI `merge hdr|panorama|hdr-panorama|hdr-batch` (`docs/merge.md`; `crates/merge/src/pano.rs`).
- **GPU**: the develop pipeline as wgpu compute kernels on Metal/Vulkan/DX12, checked against the CPU pipeline to within 1/255; CPU fallback on device limits or errors (`README.md`; `docs/gpu-pipeline.md`). **AI Denoise** is a per-photo switch, Bayer RAW only: a **built-in BM3D filter needs no weights**, and an optional user-installed ONNX model (`denoise-model.json`) can replace it; results are cached under `<library>/denoise/`; `lightcraft-cli denoise-serve` serves tiles with token auth (`docs/denoise.md`).

### Presets, colour and lens data — implemented

- **41 built-in presets** with an Amount slider 0–200%; copy/paste/sync of chosen settings groups; `.lcpreset` is LightCraft's own preset file. Import also accepts XMP presets, legacy `.lrtemplate`, Luminar `.lmp`/`.mplumpack`, `.zip` bundles, `.cube` LUT profiles (now parsed by `craft-cms`) and local-adjustment effect presets (`.lrtemplate`, `.xmp`, `.lceffect`) (`crates/engine/src/presets.rs`; `crates/engine/src/cmd/preset_files.rs`, `crates/engine/src/cmd/lut_profiles.rs`, `crates/engine/src/cmd/mask_effect_files.rs`).
- **Camera colour** starts from DNG matrices, guarded per-file fits to the camera JPEG, **10 bundled profiles** (Canon EOS D60; Sony ILCA-99M2, ILCE-7CR, ILCE-7M4, ILCE-7RM5; Fujifilm X-H2S, X-T4; Nikon Z 6II, Z 8, D5300 — `crates/engine/src/camera_profiles.rs:29` `BUNDLED`; `assets/camera-profiles/`), the user's own imported `.dcp` camera profiles (`profiles.camera` / `profile.deleteCamera`, `crates/raw/src/dcp.rs`), **52 spectral matrices** (`crates/raw/src/spectral_table.rs`), or a neutral fallback. `lightcraft-cli calibrate` fits per-camera profiles from a user's own raws (Sony ARW, Nikon NEF, Fujifilm RAF). Measured ΔE against the camera JPEG is 2.9–10 (`docs/gaps.md` #1).
- **Lens corrections**: embedded DNG opcodes, Panasonic/Leica RW2/RWL distortion, Nikon Z 6II / Z 8 / Z f distortion, Sony ILCE-7RM4A / ILCE-7M3 / full-frame ILCE-7CR / ILCE-7RM6 / ILCE-6700 distortion, and **Fujifilm distortion + vignetting for 59 validated bodies**, plus lens profiles for compact cameras with a built-in lens; all go through Optics ▸ Enable Lens Corrections (parsing lives in the pinned `craft-raw`; `docs/sony-lens-corrections.md`, `docs/sony-ilce7rm6-lens-corrections.md`, `docs/nikon-lens-corrections.md`, `docs/fuji-lens-corrections.md`). For everything else a **lensfun XML database** adds distortion/TCA/vignetting: the app offers to download it on first launch (56 files, ~5 MB, pinned by size and SHA-256; `LIGHTCRAFT_LENSFUN_URL` can point at a mirror) or reads a user folder via `LIGHTCRAFT_LENSFUN_DIR`; no database is bundled, Adobe `.lcp` is never used, matching is automatic, the profile is pinned per photo, and fisheye is not corrected (`crates/lensdb/src/lib.rs`; `crates/engine/src/lensfun_download.rs`; `docs/lens-profiles.md`).

### Export and output modules — implemented

- **10 export formats** (`ExportFormat`, `crates/engine/src/export/options.rs:5`): `jpeg png tiff psd webp avif jxl original dng rendereddng`. `psd` is a **flat** PSD (8/16-bit, no layers, header/resources via `craft-psd`); `original` copies the file plus an XMP sidecar carrying the edits; `dng` writes a raw photo as DNG with edits embedded; `rendereddng` bakes the render into a linear 16-bit float DNG. Unchanged at v0.22.0.
- **Validated export options** (`ExportOptions`, `crates/engine/src/export.rs`, parsed by `from_params`): `quality 1-100`, `bitDepth 8|10|16|32` per format, `colorSpace srgb|displayP3|adobeRgb|proPhoto|rec2020` with embedded ICC, `metadata all|allExceptCamera|copyright|none`, `removeLocation` (an `original` export is refused when a PSD/PSB embeds GPS it cannot strip), `sharpen none|screen|matte|glossy` + amount, `tiffCompression`, `dngCompression`, `conflict unique|overwrite|skip`, resize by `longEdge|shortEdge|width|height|megapixels|percent` with `dontEnlarge`, `fit dimensions|widthHeight`, `ppi`, `limitKb` (JPEG, incl. HDR gain-map JPEG), text/image `watermark` (vertical, rotation, nine anchors), `hdr` with `hdrTransfer pq|hlg`, `jxlLossless|jxlEffort|jxlProgressive`, `destinationMode: "sameAsOriginal"`, and macOS-only `addToPhotos` + `photosAlbum`.
- **Subfolder templates** (new at v0.22.0) expand `{album}` (active album name, filesystem-cleaned), `{date}` (YYYYMMDD) and `{hour}` (HHMM) in local time; unknown tokens stay as typed and the result is cleaned to stay inside the destination (`crates/engine/src/export/place.rs` `expand_subfolder`, `clean_album_name`).
- **File-naming and folder templates** share one token set — `{name} {num} {seq} {seq:N} {date} {date:%Y%m%d} {folder} {camera} {lens} {iso} {rating} {title} {creator} {ext}`; unknown tokens stay as typed, illegal characters become `-`, collisions get a suffix (`crates/engine/src/rename.rs`; `photo.renameTokens` lists them).
- **Contact Sheet PDF**: A4/Letter, rows/columns, captions, 150 dpi sRGB; limits 1,000 photos / 100 pages; atomic replace; command `export.contactSheet` (`crates/engine/src/contact_sheet.rs:87-92`).
- **Print module** as `print.*` commands (`print.get/set/reset`, `print.cell.*`, `print.layout.*`, `print.exportPdf`, `print.template.list|save|apply|delete|export|import`, plus **Template Browser folders** `print.template.folder.create|rename|delete` and `print.template.move`): Single Image, Contact Sheet, Picture Package (Auto Layout), Custom Package; saved templates as `.lcprint` files; printer/paper ICC + intent + black-point compensation; 8/16-bit colour-managed PDF (serialization delegated to `craft-pdf`) (`crates/engine/src/cmd/print.rs`; `crates/engine/src/print/template.rs:34`; `crates/engine/src/print_pdf.rs`).
- **Slideshow**: playback, layouts, overlays (identity plate, rating stars, text tokens, export watermark), intro/ending titles, built-in + user templates, and background export to PDF, numbered JPEG sequence, or **AV1 video in MP4/WebM (no audio, at most 2 hours)**; commands `slideshow.*`, progress via `activity.list` (`crates/engine/src/cmd/slideshow.rs`; `crates/engine/src/slideshow_export.rs:39-42`).
- **Apple Photos (macOS only)**: `app.export {addToPhotos: true, photosAlbum}` or `export.addToPhotos {paths}`; the first run triggers a macOS Automation permission prompt (`docs/apple-photos.md`).

### Interchange — implemented

- **XMP sidecars** read/write, manual (`⌘S`, `photo.saveMetadataToFile`) or automatic (`library.xmpPreferences {autoWrite, naming: stem|full}`); LightCraft's fields plus the full develop state as `lc:settings` under `http://ns.lightcraft.app/lc/1.0/` (`crates/meta/src/xmp.rs:9`, with the packet machinery in `craft-metadata`); owned properties are replaced, foreign namespaces kept byte for byte, an existing sidecar is merged into, writes are atomic, failed writes retry and `library.retrySidecars` forces them. Sidecar and user-named reads go through an opened **regular file** under a byte cap, and a recased sidecar cannot overwrite another (`crates/engine/src/read_file.rs`; `docs/xmp-interop.md`; `crates/engine/src/cmd/xmp.rs`).
- Reading Adobe `crs:` develop settings is **approximate** and reports per-photo warnings; Lens Blur and AI Defringe are **not mapped** in either direction (`docs/xmp-interop.md:206`).
- **PSD/PSB metadata**: imports embedded EXIF (resource 1058) and XMP (resource 1060) image resources via `craft-psd`, so capture dates, GPS and descriptive fields survive; PSD edit copies keep their capture date (`crates/meta/src/psd.rs`).
- GPX track logs, offline reverse geocoding (GeoNames towns ≥15k; `metadata.reverseGeocode`), keyword lists with keyword sets (nine per set, `⌥1–⌥9`; next/previous `⌥0`/`⌥⇧0`), XMP face names (face boxes are catalog-only), capture-time edits (`photo.setCaptureTime`), and EXIF shutter speeds that round-trip exactly (`crates/meta/src/exif.rs` tests; `docs/whats-new.md`).
- macOS edit-in: **Edit in PhotoCraft / Edit in Other Editor** renders `<name>-Edit.tif` (16-bit Adobe RGB by default; flat `.psd` or 8-bit optional), stacks it and opens it; at most 50 photos per call (`crates/engine/src/cmd/convert.rs`).

### Automation surface — implemented (the strongest part of the app)

- **Everything is a command.** At this tag: **383 engine command specs** (counted from non-test `cmd!` literals in `crates/engine/src/cmd/**/*.rs`, wired by 40 `specs()` extend calls in `crates/engine/src/cmd.rs`) and **199 UI commands** in `UI_COMMANDS` + **18 language commands** = **217 UI entries**, so a running app's `engine.commands` reports **600** commands. `engine.commands` returns id, label, menu path, shortcut, parameter doc and current enablement; UI, CLI, control channel and MCP all dispatch by id. Import extensions (39), export formats (10), presets (41), develop profiles (22), spectral matrices (52) and interface languages (18) are unchanged; develop controls moved to 126 + 10 and sections stayed 17.
- **MCP server**: `lightcraft-cli mcp [--demo | --library DIR | FILES…]` headless, or `lightcraft-cli mcp --connect 127.0.0.1:7980` to drive the live app. Hand-written JSON-RPC over stdio, protocol `2025-06-18` (older revisions accepted), 7 resources (`lightcraft://document`, `//commands`, `//library`, `//photos`, `//photo/active`, `//develop/active`, `//controls`). Helpers: **17 headless / 28 connected** (`crates/mcp/src/tools.rs:79` `helper_tools`: 17 always-on + 11 UI-only when a desktop app is attached): `command_list/run/batch`, `doc_inspect`, `render_preview`, `import`, `query_photos`, `select_photos`, `list_controls`, `get_develop`, `set_develop`, `apply_preset`, `crop`, `render_photo`, `export` (plus legacy `list_commands` / `run_command`); connect mode adds `ui_inspect`, `ui_screenshot`, `screenshot`, `inspect_ui`, `set_ui`, `list_widgets`, `click`, `press_key`, `type_text`, `clipboard`, `pointer_gesture`. One generated `cmd_*` tool per reported command, so `tools/list` totals **400** tools headless (17 + 383) and **628** connected (28 + 600); `--compact` lists helpers only (`crates/mcp/src/server.rs`; `docs/mcp.md`).
- **Control channel**: `lightcraft --control 7980` (or `LIGHTCRAFT_CONTROL_PORT`) serves JSON-lines on `127.0.0.1:PORT`, **loopback only, no authentication**, at most 16 connections, 4 MiB line cap. Requests are answered on the UI thread with a 60 s timeout; a request that has not started and draws no frame for 5 s is failed and never retried; an idle connection closes after 5 minutes; a malformed line closes the connection (`apps/lightcraft/src/control_server.rs`; `docs/control-protocol.md:1-55`). **29 callable method names**, unchanged at v0.22.0 (`crates/ui-egui/src/control.rs`): `engine.execute` (aliases `ui.menu.invoke`, `command`), `engine.commands`, `ui.menu.list/tree`, `ui.inspect`, `ui.widgets`, `ui.clickWidget|dragWidget|hoverWidget`, raw `ui.move|click|drag`, image-coordinate `ui.pointer`, `ui.key`, `ui.text`, `ui.clipboard`, `ui.scroll`, `ui.zoom` (pinch), `ui.set`, `ui.dialog.confirm|cancel`, `ui.resize`, `ui.zoomFactor`, `ui.screenshot`, `ui.render`, `ui.dropFiles` (with `hover`), `app.quit`.
- **CLI subcommands** (`apps/lightcraft-cli/src/main.rs` USAGE + dispatch, **11** at this tag, unchanged): `run`, `mcp`, `render`, `snapshot`, `merge`, `synth-merge`, `denoise-serve`, `commands`, `controls`, `calibrate`, `bench-cull`. `run` takes `--demo|--library DIR|--connect [ADDR]`, repeatable `--import`, `--script FILE|-`, `--keep-going`; `render` takes `--set control=value`, `--settings look.json|.lcpreset|.xmp`, `--preset ID`, `--size`, `--quality`, and any export option via `--opt KEY=VALUE`.
- **Headless UI snapshots** need no window and no GPU: `lightcraft-cli snapshot --demo --script tour.jsonl -o out.png --size 1600x1000 --scale 2` runs the full egui UI on the CPU. In a running app use `ui.screenshot {"path": …, "headless": true}`; windowed capture falls back to headless after 2 s. In snapshot scripts `ui.settle {timeoutMs}` waits for renders (`docs/control-protocol.md` "Headless rendering").
- **Updates**: a startup update prompt with self-update delegated to the shared `craft-update` crate; a ready update installs when the app exits (now from the same craft-libs rev as everything else; `apps/lightcraft/src/main.rs`).
- **Web build automation**: `await globalThis.lightcraft.command("<id>", "<json params>")` returns JSON text; params must be a JSON object (`apps/lightcraft-web/index.html:39-40`; `apps/lightcraft-web/src/automation.rs`). The page can also frame it with `?host=parent` over `postMessage`, or load it into its own document with `data-host="page"` (`docs/web.md`).

### Platform — implemented

- Native **macOS / Windows / Linux** (deb, rpm, AppImage, Flatpak, tarball; riscv64 tarball), a **FreeBSD** tarball, and a **WebAssembly build of the same UI** (WebGL2 via eframe's glow backend) with a persistent browser library in OPFS/IndexedDB; JXL export and AVIF decode are native-only, and merges have no file access in the browser (`docs/web.md`; `README.md`). Standalone Flatpak bundles can check for and apply their own updates; repository-managed Flatpaks still use their package manager.
- **18 interface languages** in code: English, Simplified/Traditional Chinese, Japanese, Brazilian Portuguese, Spanish, German, Russian, French, Ukrainian, Polish, Czech, Italian, Georgian, Swedish, Finnish, Indonesian, Vietnamese — unchanged at v0.22.0 (`crates/ui-egui/src/i18n.rs`; one `LANGUAGE_COMMANDS` entry each). The Edit menu's 18-row Language submenu is gone; Settings carries the choice. Coverage is partial and lower-layer errors stay English; no RTL or complex-script shaping.
- Display colour management: macOS screen profile, Linux colord, Windows WCS monitor profile (`crates/wincolor`), or a chosen ICC file via Settings ▸ Display / `app.displayProfile` (`docs/display-profiles.md`). Portable mode (`portable.txt` beside the executable) and isolated automation profiles via `LIGHTCRAFT_CONFIG_DIR`.
- **Tests in CI**: Linux x64 runs `cargo xtask ci` on every push/PR; FreeBSD nightly; a Windows leg runs the crates with Windows-only code; macOS and Windows package builds but neither runs the full suite (`docs/gaps.md` #9).

## Known limitations and not-implemented

Read this before assigning work. Each item is the project's own admission or a code path that is absent.

**Raw and colour**

- **Camera colour is estimated, not measured.** Raws start from a per-file fit to the camera JPEG, the **10** bundled profiles, the user's own `.dcp` profiles, 52 spectral matrices, or a neutral fallback; measured ΔE against the camera JPEG is 2.9–10 (`docs/gaps.md` #1). `docs/raw-parity.md:25` still says "9 bundled profiles" while line 213 and the code have 10.
- **No bundled lens database.** In-file data plus a lensfun XML database downloaded on request (56 files, ~5 MB, pinned) or read from `LIGHTCRAFT_LENSFUN_DIR`; Adobe's 3,635 profiles are never used. lensfun matching is automatic (no manual picker), raws only, no fisheye, and not validated against real photos (`docs/gaps.md` #8; `docs/lens-profiles.md`).
- **Preview-only raws**: Nikon High-Efficiency (HE / HE★) NEF, several CRX variants, compressed Samsung SRW, the long tail IIQ / Hasselblad-compressed / X3F / CRW / GPR / DCR, and **compressed Olympus/OM ORF** (support withdrawn pending provenance review; uncompressed ORF still decodes) (`docs/gaps.md` #2, #6, #7, #20; `docs/orf-compression.md`).
- **PSD/PSB import is the merged composite only** — no layers or layer styles; LightCraft writes flat PSDs (`crates/codecs/src/psd.rs`).
- **Render fidelity is unmeasured**: tone, highlights, texture/clarity/dehaze, noise reduction and sharpening are tuned by eye, so edits imported from Lightroom will not look identical (`docs/gaps.md` #1, #3). Raw highlight edges were reworked at this tag (blown-out samples are excluded before white balance; smart previews of out-of-date raws are rebuilt once), so existing edits can shift slightly along sharp white edges (`docs/whats-new.md`).

**AI and enhancement**

- **AI masks**: Subject, Sky, Background (and the model's People/Landscape kinds) are classical heuristics, not models; only **Object** and **Describe** use SAM 3, and the 3.4 GB model is **not bundled**. The built-in download-mirror list is empty (`crates/segment/src/fetch.rs:46`), so the in-app download needs a user-configured `LIGHTCRAFT_SAM3_MIRRORS` or a manually installed model folder. SAM 3 can use the GPU (`segment.settings {runOn}`), but without weights it does nothing (`docs/ai-masks.md`; `docs/gaps.md` #5).
- **AI Defringe ships no model either.** It only works after the user installs a compatible ONNX file in Settings ▸ AI Defringe; there is no bundled or downloadable defringe model, no GPU path, and the correction is per photo (Auto Sync does not copy it) (`crates/engine/src/aidefringe.rs`; `docs/ai-defringe.md`).
- **AI Denoise ships no trained-network weights**: it works out of the box only because the default is a **built-in classical BM3D** filter; a user-installed ONNX model + `denoise-model.json` can replace it. Bayer RAW only, no X-Trans, and it does not run on merged linear DNGs (`docs/denoise.md`; `docs/gaps.md` #11, #29).
- **Lens Blur is partial**: no AI depth map (so no Focal Range, focus picker or Visualize Depth), no bokeh shapes, and no `crs:` XMP mapping; the blur is a distance-from-focus stand-in, not depth (`docs/parity-checklist.md` `LR-EDIT-LENSBLUR`).
- **Absent: Super Resolution, Raw Details, content-aware/generative remove, reflections and distraction removal** (`docs/gaps.md` #11, #12).

**Output and interchange**

- **Print** lacks identity plate / watermark / photo-info overlays (beyond Page Options), Cut Guides, Auto Layout for *Custom* Package, printer-driver Page Setup, direct printer output and JPEG output; it produces a colour-managed PDF (`docs/gaps.md` #15).
- **HDR display (EDR / Windows HDR) is not implemented**: HDR editing works but you edit blind on an HDR monitor (`docs/gaps.md` #14).
- **Slideshow** has playback, layouts, overlays, titles, templates and PDF/JPEG/AV1 export, but no music and no dedicated module editor (`docs/gaps.md` #16).
- **Lightroom catalog migration is one-way and approximate**; backup `.zip` import is supported, but unsupported Adobe profiles/AI settings are archived (`docs/lightroom-catalog-import.md`; `docs/gaps.md` #13).
- **No custom ICC output profile**, and **Render to DNG** exists only as the export format `rendereddng`, not as a catalog command (`docs/gaps.md` #25).
- **AVIF import is native-only** (wasm/web has no AV1 decoder, and the shared web picker still hides `.avif`); the in-repo format table still lists AVIF import as missing — the code and the installed binary disagree (`docs/file-format-parity.md:23`; `crates/codecs/src/avif_decode.rs`).

**Do not assign**

- Video (playback, trim, edits, export): a `Video` media kind exists in the catalog model, but the importer's extension list is stills-only and there is no playback or editing path (`crates/catalog/src/model.rs`; `crates/engine/src/import/files.rs`; `docs/gaps.md` #18).
- Map view, Book module, publish services, tethered capture, Lightroom plug-ins / SDK; no HDR display (`docs/gaps.md` #14, #16, #17, #19).
- **No document file format.** There is no "save as" for an edited photo: the library folder is the unit of persistence and edits live in the catalog and/or an XMP sidecar. The macOS bundle declares **no** `CFBundleDocumentTypes` (`Info.plist`; `crates/engine/src/library.rs:1-22`).

**Platform, quality and docs**

- Per-model verification is thin: **557 of 1,446** Adobe models verified (39%), ~86% of photographers on a verified body (`docs/gaps.md` #10).
- Linux runs the full suite, FreeBSD nightly and Windows only its Windows-only crates; macOS and Windows package builds do not run the full suite, and Windows/Linux GPU paths are only partly proven (`docs/gaps.md` #9, #27).
- Localization is partial; lower-layer errors stay English; no RTL or complex-script shaping (`docs/localization-parity.md`). Accessibility is partial (`docs/gaps.md` #23).
- **Docs that disagree with code (trust the code):** ROADMAP 81.6%/532 and target-app-parity 83.2%/543 vs the generated checklist 83.0%/547; `crates/codecs/Cargo.toml:43` says releases don't ship the `heif` feature while `packaging/macos/package.sh:65` passes it; `docs/gaps.md` #21 names Vietnamese as absent although it ships; `docs/raw-parity.md:25` says 9 bundled camera profiles while `BUNDLED` has 10; `docs/file-format-parity.md` says AVIF import is missing; `docs/sony-lens-corrections.md` still cites a decoder file under `crates/raw` that has since moved into `craft-raw`.

## How to operate

**Launch (macOS).** `open -a LightCraft` for the GUI, or the executable `LightCraft.app/Contents/MacOS/LightCraft` directly when you need flags. Real flags, read from `app_command` in `apps/lightcraft/src/main.rs` and the launcher protocol in `apps/lightcraft/src/launch_profile.rs` (the installed 0.22.0 binary answers `--version`):

```
lightcraft [OPTIONS] [FILES/FOLDERS…]      # positional paths are imported at launch
  --library DIR    open (or create) this library (env LIGHTCRAFT_LIBRARY; default: last library opened,
                   else ~/Pictures/LightCraft Library; Settings ▸ General ▸ At launch: Ask me shows a list)
  --no-demo        don't seed a new library with the procedural demo photos
  --memory         throwaway in-memory session (alias --demo); writes nothing
  --control PORT   serve the JSON-lines control channel on 127.0.0.1:PORT (Stable profile only)
  --launch-profile nightly-v1 --profile-root DIR --
                   Launcher/nightly protocol: select the nightly-v1 profile before startup; everything
                   after `--` is a file. Both tokens are required together and are refused as `=` forms;
                   the headless CLI rejects them with exit 2 (they belong to the app).
  --version, --help
```

Useful environment: `LIGHTCRAFT_LIBRARY`, `LIGHTCRAFT_CONTROL_PORT`, `LIGHTCRAFT_CONFIG_DIR` (isolated settings/logs/model profile), `LIGHTCRAFT_LANGUAGE=de|ja|zh-hans|…`, `LIGHTCRAFT_GPU_BACKEND=dx12|vulkan|metal|auto|off`, `LIGHTCRAFT_GPU=0`, `LIGHTCRAFT_LOG=info|debug` / `RUST_LOG`, `LIGHTCRAFT_MEMORY_MB`, `LIGHTCRAFT_NO_PREFS`, `LIGHTCRAFT_NO_NATIVE_MENU`, `LIGHTCRAFT_SAM3_DIR|_MIRRORS|_TOKEN|_REMOTE|_PROMPTS`, `LIGHTCRAFT_DEFRINGE_MODELS`, `LIGHTCRAFT_LENSFUN_DIR|_URL`, `LIGHTCRAFT_CAMERA_PROFILES`, `LIGHTCRAFT_DENOISE_MODELS|_URL|_TOKEN`, `LIGHTCRAFT_HDR_DISPLAY=0`, `LIGHTCRAFT_FPS=1`, `LIGHTCRAFT_PROFILE=1`, `LIGHTCRAFT_BUILD_CHANNEL` (`apps/lightcraft/src/{main,launch_profile}.rs`; other env vars in `crates/engine` and `crates/segment`). Logs go to the settings folder's `logs/lightcraft.log`, rotated on each start.

### Getting the CLI (the launcher installs the app, not the CLI)

The ArtCraft Launcher installs `LightCraft.app`; it does not put `lightcraft-cli` on your `PATH`. It
ships **no** CLI binary inside the bundle — the bundle holds only `LightCraft` — so a launcher-only
install has no `lightcraft-cli` at all. The CLI is published on the app's GitHub release,
`lightcraft-cli-0.22.0-macos-universal.zip` (**131,905,735 bytes ≈ 125.8 MB**, SHA-256
`ebe8f7f8f8e552d95cb46a5c698c4841e6028430882b5c30f2efed01ea4d6fb0`), so `lightcraft-cli`
answering *command not found* means "not installed yet", not "not supported".

Find it, in this order:

1. **On `PATH`** — `command -v lightcraft-cli`. If it answers, `lightcraft-cli --version` must report
   the version this skill was written against (0.22.0). A different version means the CLI and the app
   have drifted: re-read *Verify against your installed version* before trusting ids.
2. **Bundle copy** — Skip it: `find "/Applications/LightCraft.app" -name 'lightcraft-cli'` finds
   nothing (verified), so go to step 3.
3. **Install it from the release** — user-local, no `sudo`:

```sh
APP_VER=0.22.0
REL="https://github.com/storytold/lightcraft/releases/download/v$APP_VER"
ASSET="lightcraft-cli-$APP_VER-macos-universal.zip"
mkdir -p "$HOME/.local/bin" "$HOME/Downloads/lightcraft-cli" && cd "$HOME/Downloads/lightcraft-cli"
curl -fLO "$REL/$ASSET" && curl -fLO "$REL/SHA256SUMS.txt"
expected=$(grep -F "$ASSET" SHA256SUMS.txt | awk '{print $1}')
actual=$(shasum -a 256 "$ASSET" | awk '{print $1}')
[ "$expected" = "$actual" ] && echo "checksum OK" || { echo "checksum MISMATCH — stop"; exit 1; }
unzip -oq "$ASSET"
install -m 0755 "lightcraft-cli-$APP_VER-macos-universal/lightcraft-cli" "$HOME/.local/bin/lightcraft-cli"
"$HOME/.local/bin/lightcraft-cli" --version
```

`~/.local/bin` must be on `PATH` for the shell that runs the skill:
`export PATH="$HOME/.local/bin:$PATH"` (put it in your shell profile to keep it).

Rules: never `sudo` into `/usr/local`, never unzip into `/Applications`, and never replace an existing
`lightcraft-cli` of a different version without telling the user. Building from source (`cargo install
--path apps/lightcraft-cli --locked`) is a developer path only — full Rust toolchain, minutes of
compiling; prefer the release binary above.

Use the CLI and the app from the same release (`docs/mcp.md` "From an installed release").

**Window/document model.** One process = one open library; a main window (grid or Detail) plus an optional second window (`⌘F11`). There are no per-photo documents and no tabs. Switching libraries is File ▸ Open Library… (`app.openLibrary`, `⌘O`) or File ▸ New Library… (`app.newLibrary`); if a library cannot be opened, the app starts an empty session and asks (`ui.inspect` → `libraryProblem`). Pointing Open Library at a Lightroom catalog folder (or a `Backups` folder) offers the importer instead (`docs/control-protocol.md`; `docs/lightroom-catalog-import.md`).

**Keyboard (verified in the command registry and `crates/ui-egui/src/shortcuts.rs` — do not invent others).** Views: `G` grid, `D` detail, `N` survey, `⇧C` compare, `⇧R` reference, `F` full-screen preview, `⇧L` Lights Out, `⇧F` filter bar, `/` filmstrip, `F6`/`F7`/`F8` filmstrip/left/right panel, `⇧Tab` Hide All Panels, `\` Filter Bar in grids (Show Original in Detail), `Space` opens the active photo from a grid (in Detail it toggles zoom). Panels/tools: `⌘1`–`⌘6` open Light, Color, Effects, Detail, Optics and **Lens Blur** edit sections; `E` Edit, `C` Crop & Rotate, `M` Masking, `H` Remove, `I` Info, `K` Keywords, `⌘K` Add Keywords, `⇧P` Presets, `⇧V` Versions, `B`/`L`/`R`/`W` brush/linear/radial/WB picker, `A` aspect lock (crop) / Visualize Spots, `S` soft proof (in grids `S` toggles the stack), `Shift+S` stack set-top. View aids: `Z` zoom, `J` clipping, `Shift+O` crop overlay, `⇧H` tool overlay, `⌘J` View Options, `⌘I` info overlay, `⌥F` focus point, `Y`/`⇧Y`/`⌥Y` before/after. Rating: `0`–`5`, `6`–`9` labels, `P` pick, `X` reject, `U` unflag, `` ` `` cycle flag, `[`/`]` step rating, `⌘↑`/`⌘↓` flag up/down, `⇧0-9/P/X/U` apply-and-advance. Keywords: `⌥1`–`⌥9` apply a set member, `⌥0`/`⌥⇧0` next/previous set. Misc: `Enter` open/done, `Esc` back, `⌘Z` undo, `⌘L` Enable Filters, `⌘⌥⇧C`/`⌘⌥⇧V` copy/paste metadata, `⌘⇧I` import, `⌘⇧E` Edit in PhotoCraft, `⌘⌥E` Edit in Other Editor, `⌘P` print, `⌘⌥↵` slideshow. **All keys are user-remappable** (`app.setShortcut`); `⌘,` and `⌘Q` are reserved (`docs/ui-parity.md` "Shortcuts").

**Open / save / export.** Import with File ▸ Import Photos… (`⌘⇧I`, `file.addPhotos`), Import from Folder… (`file.addFolder`), or by passing paths on the command line; files dropped on the window go through the import review (`ui.dropFiles` reproduces that headlessly). There is nothing to "save": each command persists; `⌘S` (`photo.saveMetadataToFile`) writes sidecars, and File ▸ Automatically Write Changes into XMP (`library.toggleAutoWriteXmp`) drives `library.xmpPreferences`. Export with File ▸ Export… (`dialog.export`), Photo ▸ Edit In (`⌘⇧E` / `⌘⌥E`), File ▸ Contact Sheet PDF…, File ▸ Print… (`⌘P`; writes a colour-managed PDF), View ▸ Export Slideshow…, or the equivalent commands. The photo export itself is always `app.export` with the options above (`crates/engine/src/export.rs`).

**Drive it — the three supported routes**

1. One-shot CLI (best for batch work, no session state):
   ```sh
   lightcraft-cli run --import ./shoot develop.set control=light.exposure value=0.7 \
       develop.auto app.export dir=out longEdge=2048 colorSpace=displayP3 subfolder='{date}/{album}'
   lightcraft-cli run --library ./lib library.select ids=[3] develop.get
   lightcraft-cli run --demo --script steps.jsonl --keep-going    # JSON lines; stdin works too
   lightcraft-cli run --connect 127.0.0.1:7980 ui.set view=detail ui.screenshot path=ui.png
   lightcraft-cli render in.dng -o out.jpg --set light.exposure=0.5 --size 2048 --quality 92
   lightcraft-cli merge hdr-batch ./brackets                      # every bracket set in the folder
   ```
   One JSON line per command (`{command, ok, result|error, ms}`); non-zero exit on failure; a bare word starts the next command, `key=value` values parse as JSON when they can (`docs/mcp.md` "One-shot commands").
2. Control channel (best for interacting with a live UI):
   ```json
   {"id":1,"method":"engine.execute","params":{"command":"develop.set","params":{"values":{"light.highlights":-45}}}}
   {"id":2,"method":"ui.dropFiles","params":{"paths":["./shoot"]}}
   ```
   Discover identifiers with `engine.commands`, `develop.controls`, `ui.widgets`; never hard-code translated labels or widget positions. Group slider bursts in `develop.beginInteraction` / `develop.endInteraction`. On macOS `ui.key` injects egui events and does **not** synthesize Cocoa menu accelerators; use `ui.menu.invoke` with the command id when testing menu shortcuts (`docs/control-protocol.md` "Methods").
3. MCP (`lightcraft-cli mcp`): helpers plus `command_list` / `command_run` / `command_batch` / `doc_inspect` / `render_preview`, 7 resources, and one generated tool per command unless `--compact`. In connect mode the UI tools are added; in headless mode they return an error explaining how to start the app (`docs/mcp.md`).

**Look at the result.** Any UI work must be verified visually: `lightcraft-cli snapshot --demo --script tour.jsonl -o out.png` or `{"method":"ui.screenshot","params":{"path":"a.png","headless":true}}`. Before capturing, poll `ui.inspect` until the expected `loupe.photo` is active, `loupe.source` is `render` or `cached`, `loupe.pending` is false and the render queues are empty — or `loupe.failed` is set (`docs/control-protocol.md` "Before capturing a finished Detail view").

## Working with an AI agent

**Legitimate agent work**

- Pre-generate or convert inputs into supported formats before touching the library. AVIF now decodes natively but HEIC still needs the official build's `heif` feature, and an unsupported raw stays unsupported unless you convert it externally (`crates/engine/src/import/files.rs`; `crates/codecs/Cargo.toml`).
- Batch develop and export through `lightcraft-cli run --import …`, or against a persistent library with `--library DIR` so ratings and edits survive between calls (`docs/mcp.md`).
- Batch-render one image with a settings JSON: `lightcraft-cli render in.dng -o out.jpg --settings look.json` (a partial develop-settings object, or a single-preset `.lcpreset`/XMP file) plus `--set control=value` and `--opt` for export options (`apps/lightcraft-cli/src/main.rs` USAGE).
- Inspect and repair library files: `catalog.snap` and `catalog.log` are documented, CRC-checked JSON. The loader handles torn appends; the format-14 upgrade keeps byte-for-byte `catalog.snap.v13-<seq>`/`catalog.log.v13-<seq>` copies. Back the folder up before editing anything by hand (`crates/catalog/src/journal.rs`; `docs/catalog-persistence.md`).
- Verify exports by reading the returned `{path, width, height, bytes, sidecars}` and then the file itself; the encoder is pure (bytes in, bytes out) so it is testable without a window (`crates/engine/src/export.rs`).
- Read XMP sidecars to understand another tool's edits; LightCraft preserves foreign namespaces. Do not expect face regions, Lens Blur or AI Defringe settings in XMP (`docs/xmp-interop.md`).
- Rebuild camera colour profiles from a user's own raws with `lightcraft-cli calibrate`; enable lens corrections from the user's own lensfun database by setting `LIGHTCRAFT_LENSFUN_DIR` before launch.
- Drive output modules as commands: `export.contactSheet`, the `print.*` family (including `.lcprint` templates and Template Browser folders), `slideshow.*` and `export.addToPhotos`, with `activity.list` progress.
- Organise bursts after culling: run `photo.analyze` (Assisted Culling) first so the photos are scored, then `photo.moveToBurst {ids, burst|"new"|null, index}` to pin a hand-made order that later culls keep unless `resetBursts` (`crates/engine/src/cmd/cull.rs`; `crates/engine/src/tests/bursts.rs`; Window ▸ Bursts / `panel.bursts`).

**Do not**

- Do not launch the GUI and drive it with OS-level synthetic input (osascript/System Events, cliclick): it goes to whatever window is frontmost. Use the control channel, `lightcraft-cli snapshot`, or MCP connect mode (repo `AGENTS.md`: "Never send OS-level synthetic input").
- Do not assume the CLI exists — on macOS it is a separate download, not inside the `.app`.
- Do not assume a library can be opened by two programs at once (`catalog.lock`); use `--connect` instead.
- Do not move or remount a library folder while it is open and expect writes to land: saves are pinned to the opened folder's identity and report `unsaved` until the original folder is back (`crates/catalog/src/opened_folder.rs`; `docs/whats-new.md`).
- Do not assume Adobe assets or formats work: `.lcp`, Lightroom plug-ins, `.lrlibrary`. `.lrtemplate` is import-only; a user's own `.dcp` camera profile can be imported, but none ship and Adobe `.lcp` is never used (`docs/file-format-parity.md`).
- Do not promise AI subject/sky masks, AI denoise, AI defringe, face recognition, super resolution or a depth-map Lens Blur out of the box — they need optional models, and the default SAM mirror list is empty.
- Do not promise that a raw will develop from sensor data; check the format list above and expect preview-only for compressed ORF, HE Nikon NEF, some CR3 variants and compressed SRW.
- Do not treat a returned command result as proof of a correct image. Nothing here validates the pixels.
- Do not overwrite a catalogued original or its XMP sidecar: MCP `export`/`render_photo`/`screenshot` and `mask.exportEffects` refuse such a `path`; use a new output folder.

## Verification protocol

LightCraft is alpha (v0.22.0); its library is crash-safe but its output is not self-checking. For every non-trivial task:

1. **Throwaway round-trip first.** Make a scratch library (`--library` pointed at a fresh folder, or `lightcraft-cli run --demo`), import one file, change one slider, export, then reopen the export in LightCraft or any other viewer and confirm dimensions and pixels. Only then run the real batch. Use `--memory` when you only want to experiment (`apps/lightcraft/src/main.rs`).
2. **Never trust a silent export.** `app.export` reports per-file `{path, width, height, bytes, sidecars}` and can report `gpuFallback`; a size/resolution mismatch or a zero-byte file is the failure you would otherwise miss. `format: "original"` also writes an XMP sidecar (`crates/engine/src/export.rs`).
3. **Check the render, not just the command.** `ok: true` means the command ran. Poll `ui.inspect` for `loupe.pending == false` (or `loupe.failed`) and take a screenshot/PNG before declaring success.
4. **Version and back up per session.** Copy the whole library folder before a bulk operation; the catalog is an append-only log, so a copied folder is a complete restore point. On the desktop there is **no in-app backup command** (`file.backupLibrary` is wired only where the platform supplies a backup service). Keep the app and CLI from the same release.
5. **Know the format direction.** A v0.22.0 library is catalog format 14: older builds refuse it safely and the upgrade's kept `catalog.*.v13-<seq>` files are the way back. Do not hand a newer library to an older build expecting writes (`docs/catalog-persistence.md`).
6. **Update between projects, never mid-project.** Re-run step 1 after any update — the launcher auto-updates, and a new build can change rendering; process versions V1–V8, V10, V13, V14 exist for exactly that reason (`docs/process-versions.md`).
7. **Know your single-writer rule.** Any `--library` headless run fails while the desktop app holds that library. Reserve it in your plan, or drive the open app with `--connect`.
8. **Treat the control port as a local privilege.** It has no authentication and can run any command; only enable it for a task that needs it, on loopback.
9. **Expect a preview-only recheck to change appearance.** A library opened in a newer version rechecks preview-only raws, and the compressed-ORF withdrawal means those photos render from the camera JPEG; compare before trusting old edits (`docs/orf-compression.md`).

## Sources & evidence

- Repo: https://github.com/storytold/lightcraft — inspected tag **v0.22.0**, commit **`84fad67b66816941bd8b35adf86f60ec5155413c`** (`git rev-parse HEAD` in the pinned checkout), released 2026-11-28; inspection date **2026-12-03**. Target: Lightroom Classic 15.5 / Lightroom 9.6 (`ROADMAP.md:3`). License MIT OR Apache-2.0.
- Installed bundle `/Applications/LightCraft.app`: `CFBundleShortVersionString`/`CFBundleVersion` 0.22.0, binary `--version` prints `lightcraft 0.22.0`, bundle id `ai.storyteller.lightcraft` — the installed bundle matches this pin. The bundle has no `CFBundleDocumentTypes` and no `lightcraft-cli`. Its universal binary contains 19 `craft_heif` symbols (via `nm -gU`) and `craft_image_codecs::decode_avif_with_depth`, confirming HEIC and AVIF decode in the official build. **Verify against your installed version.**
- Key code files read for this skill: `README.md`, `ROADMAP.md`, `Cargo.toml`, `apps/lightcraft/src/main.rs`, `apps/lightcraft/src/control_server.rs`, `apps/lightcraft-cli/src/main.rs`, `crates/engine/src/{library,import,import/files,camera_profiles,rename,contact_sheet,presets,export,export/options,export/place,export/params,read_file,lightroom_backup,lightroom_folder,aidefringe}.rs`, `crates/engine/src/cmd.rs` and `crates/engine/src/cmd/{library,library/specs,develop,masks,aidefringe,mask_effect_files,keywords,print,export,slideshow,cull,convert,xmp,activity,recheck,previews}.rs`, `crates/develop/src/{controls,settings}.rs`, `crates/catalog/src/{journal,lock,opened_folder,tests_format_version}.rs`, `crates/raw/src/{lib,convert,spectral_table,dcp}.rs`, `crates/pipeline/src/{lens_blur,local,crystal}.rs`, `crates/denoise/src/defringe.rs`, `crates/codecs/src/{lib,avif_decode,psd,gainmap,heif}.rs` and `crates/codecs/Cargo.toml`, `crates/meta/src/{xmp,psd,exif}.rs`, `crates/mcp/src/{tools,server}.rs`, `crates/segment/src/fetch.rs`, `crates/ui-egui/src/{shortcuts,control}.rs`, `crates/ui-egui/src/menus/{ui_commands,menubar}.rs`, `crates/ui-egui/src/panels/bursts.rs`, `crates/gpu/src/faces.rs`, `packaging/macos/package.sh`, `assets/camera-profiles/`.
- Docs read: `docs/{target-app-parity,raw-parity,file-format-parity,gaps,control-protocol,mcp,merge,slideshow,denoise,ai-masks,ai-defringe,faces,focus-points,xmp-interop,process-versions,heal-pinned,catalog-persistence,grain,orf-compression,lens-profiles,sony-lens-corrections,nikon-lens-corrections,fuji-lens-corrections,camera-preview-colour,web,localization-parity,background-tasks,lightroom-catalog-import,parity-checklist,whats-new}.md`, `docs/raw/coverage.tsv`.
- Counts were measured from source at this tag (not from README/docs): 383 engine command specs (non-test `cmd!` ids; 40 `specs()` extend calls), 199 `UI_COMMANDS` + 18 language commands = 217 UI entries (600 total), 17/28 MCP helper tools, 7 MCP resources, 400/628 `tools/list` entries, 29 control method names, 11 CLI subcommands, 39 import extensions, 10 export formats, 126 + 10 develop controls, 17 sections, 41 presets, 22 develop profiles, 10 camera profiles, 52 spectral matrices, 18 languages, 1,446 Adobe raw models (557/665/187/37).
- Shared libraries `storytold/craft-libs` (read-only reference), all at rev **`b2d2a1e948c43d95aa769d4f0a06fe6b869edc39`** (`Cargo.toml`): `craft-ui`, `craft-window`, `craft-docpath`, `craft-update`, `craft-crw`, `craft-cms`, `craft-color`, `craft-develop`, `craft-geom`, `craft-gif`, `craft-jxl`, `craft-metadata`, `craft-jpeg`, `craft-image-codecs`, `craft-sniff`, `craft-media`, `craft-video`, `craft-xml`, `craft-tiff`, `craft-raw`, `craft-heif`, `craft-psd`, `craft-pdf`, `craft-gainmap`, `craft-sqlite`, `craft-zip`, `craft-plist`, `craft-mime`. LightCraft's own formats are documented in this repo.
- Evidence tiers: **implemented** (the code path exists and is reachable from UI/CLI/command), **partial/stub** (exists but visibly incomplete — what is missing is stated), **not implemented** (absent or explicitly out of scope).

**Uncertain / not verified in this pass**

- Runtime GUI behaviour, menus and dialogs were not launched: every GUI claim comes from the command registry, the control-protocol document, the parity checklist and the packaging metadata. The installed binary was inspected read-only (`--version`, `nm`).
- The exact visual/colour fidelity of renders is not compared against Lightroom; the project itself says it is unmeasured (`docs/gaps.md` #1, #3). AI Defringe, process V14 and the raw highlight-edge fix were not rendered.
- AVIF import is inferred from the code path (`Format::Avif` decodable with default features) and the installed binary's `decode_avif_with_depth` symbol; no AVIF file was imported in this pass.
- MCP tool totals are derived statically from `helper_tools` and the measured command counts, not captured from a running `tools/list`.
- Whether a specific raw variant decodes can only be settled file-by-file; the per-model table is evidence, not a guarantee.

Files in this skill

  • SKILL.md24.2 KB
  • agents/openai.yaml145 B
  • evidence.md8.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.