Skip to content

Development

How krites is designed and built. The specs are the source of truth; code follows them, test-first.

Specs

  • 0001 — master design: purpose & non-goals, the non-destructive shoot workspace, the cull → develop → retouch → remove → export pipeline, pluggable provider interfaces, config-driven cull profiles + looks, the studio, the phased roadmap, and the resolved design questions.
  • 0002 — interface contracts: the CLI, studio, and MCP surfaces, with the R-* requirements that anchor the godog + unit tests.
  • 0003 — studio interface contract: the studio's functional requirements, UX + mockup, and the full HTTP + SSE API contract (R-UI-*, R-API-*) — written before the studio is built.

UI mockup

A clickable, non-functional prototype of the studio (mock data, no backend) validates the 0003 interface before we build it:

  • Studio UI mockup — the shoot library and the cull-review grid + loupe. See the mockups README for what it covers and how to drive it (keyboard P/X/U/15, filters, burst compare, cull progress, export / XMP).

Resolved design decisions

The foundational questions (spec 0001 §13) are settled:

Area Decision
Target hardware Apple Silicon Mac (macOS / arm64 first)
ML runtime ONNX Runtime + CoreML for all models (face/eye, aesthetic, LaMa inpaint); pure-Go for the deterministic maths; no Python
Cloud Local by default; cloud is a first-class, user-choosable backend per capability, with disclosure
Studio stack Full Svelte SPA over a Go JSON/SSE API, served in the browser, Wails-ready for a native app later
RAW Cull on embedded previews; full RAW decode only for developed/exported keepers
Lightroom Finish-in-Lightroom is the primary (~90%) workflow; XMP carries verdicts (Phase 1) and crop/straighten/WB (Phase 2)

Ways of working

krites follows the phpboyscout toolchain conventions: spec-first, TDD + BDD (godog for user-facing commands, unit tests for the deterministic core), docs-as-you-go, and a non-destructive guarantee pinned by tests. See CLAUDE.md for the full detail.

Roadmap

  1. Phase 1 — cull MVP: ingest → blur/exposure/eye/dedup → studio review → export keepers + XMP.
  2. Phase 2 — develop: auto-straighten, composition crop, looks, bounded retouch.
  3. Phase 3 — object removal: LaMa inpainting via the studio.
  4. Phase 4 — learns your taste: adapt the cull to your keep/reject history.