WORK-461
ID:WORK-461Status:in-progress

kind-keyed install apply with framework-aware and compat validation

SPEC-110 §4–§5 + ADR-023/ADR-024 — unify the apply step over the shared resolver, keyed on artifact + manifest kind, and harden post-install validation (framework-aware + compat-range).

Priority:highComplexity:moderateMilestone:v0.25.0Source:SPEC-110
claude/v0.25.0-impl View source

Criteria completion

Criteria completion: 3 of 4 (75%) checked; tracking started on Jun 23, no incremental history yet0%25%50%75%100%Jun 23Jul 11

Tracking started Jun 23 — check back for trends.

Branches 4
History 4
  1. da9667d
    Created (in-progress)by bjornolofandersson
  2. f2c6cb8
    Content editedby Claude
    feat(cli): shared install resolver, multi-site --site, framework-aware v
  3. c36d24c
    Content editedby Claude
    plan(v0.25.0): renumber WORK-444 → WORK-465 to avoid collision with main
  4. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • Install applies a kind-keyed step over the shared resolver: theme → dependency + point the selected site's theme; kind:"site" template → add a site; preset pack → dependency + validate + optional presets.json append
  • kind:"section" is reserved/forward-compatible (reuses the resolver, SiteConfig merge, and --site plumbing) but out of scope
  • Post-install validation covers a theme's exports and a template's template.json; theme validation is framework-aware per ADR-024 (./transform required, a framework export like ./svelte optional — its absence is not warned)
  • Install validates each distributable's refrakt range against the project version, failing with a clear message on mismatch

Approach

Factor the apply step as a switch on artifact/kind in packages/cli/src/commands/theme.ts (rename/extend toward a general install command). Replace the current "./svelte missing → warn" check with the framework-aware rule. Call the ADR-023 compat checker before applying. The theme, template, and preset apply-modes are implemented in their respective work items; this item owns the dispatch + validation layer.

Dependencies

  • WORK-465 — compat range checker
  • WORK-445 — shared resolver
  • WORK-446 — multi-site --site + config helpers

References

  • SPEC-110 §4, §5; ADR-023; ADR-024