WORK-460
ID:WORK-460Status:done

Preset-pack install apply and refrakt theme presets list

SPEC-111 §4 + SPEC-110 §4 — the lightest apply (add dep + validate + optional append) plus a discovery command.

Priority:mediumComplexity:moderateMilestone:v0.25.0Source:SPEC-111

Criteria completion

Criteria completion: 3 of 3 (100%) checked; history from Jun 23 to Jun 240%25%50%75%100%Jun 23Jun 24
Branches 3
History 3
  1. f6e6a38
    • ☑ Preset-pack install rides the shared resolver; apply adds the dependency, validates `presets.json`, and optionally appends the chosen preset to `site.theme.presets` — no scaffold-copy, no site creation, no `theme`-field change
    • ☑ `refrakt theme presets list` lists presets resolvable from installed packs + the active theme, filterable by `--scope` and by compatibility with the active theme (universal always shown; `palette` flagged outside its `tunedFor`)
    • ☑ Multi-site `--site` is honoured for the optional append
    by bjornolofandersson
  2. dede57e
    Created (ready)by bjornolofandersson
  3. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • Preset-pack install rides the shared resolver; apply adds the dependency, validates presets.json, and optionally appends the chosen preset to site.theme.presets — no scaffold-copy, no site creation, no theme-field change
  • refrakt theme presets list lists presets resolvable from installed packs + the active theme, filterable by --scope and by compatibility with the active theme (universal always shown; palette flagged outside its tunedFor)
  • Multi-site --site is honoured for the optional append

Approach

Add the preset-pack branch to the kind-keyed apply work item and a theme presets list subcommand. Capability discovery is independent of kind — a theme package may also be a preset pack.

Dependencies

  • WORK-456 — pack format
  • WORK-445 — shared resolver
  • WORK-446 — multi-site --site

References

  • SPEC-111 §4; SPEC-110 §4

Resolution

Completed: 2026-06-23

Branch: claude/v0.25.0-impl

What was done

  • theme presets list — discovers installed packs + the active theme's pack, filterable by --scope, flagging palette presets not tunedFor the active theme (advisory ⚠, never blocking).
  • theme presets validate — pack-manifest validation (WORK-459).
  • theme presets install <source> [--use <id>] [--site] [--registry] — the lightest apply: resolve via the shared resolver, install via the package manager, validate presets.json + refrakt compat, and optionally append <pkg>/<id> to the target site's theme.presets (multi-site --site honoured). No scaffold-copy, no site creation, no theme-field change.
  • Wired under refrakt theme presets <list|validate|install> in bin.ts. Verified end-to-end against Lumina.