WORK-459
ID:WORK-459Status:ready

Preset scope and tunedFor metadata with pack-manifest validation

SPEC-111 §2,§3,§4 — make scope a validated property, record advisory tunedFor, and validate the pack manifest (module resolvability + scope-vs-actual-tokens + tunedFor well-formedness).

Priority:mediumComplexity:moderateMilestone:v0.25.0Source:SPEC-111
claude/v0.25.0-workitems View source

Criteria completion

Criteria completion: 0 of 4 (0%) 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 3
claude/v0.25.0-workitems current ready
main donechangeset-release/main doneclaude/v0.25.0-impl done
History 1
  1. a6bdcba
    Created (ready)by bjornolofandersson

Acceptance Criteria

  • Each preset declares scope (syntax | palette) in the manifest entry; a declared syntax preset that sets chrome tokens is a validation warning (reusing filterScopeEligible)
  • tunedFor (preset → themes) is advisory; absence means universal; applying a preset outside its set is never an error
  • Pack-manifest validation checks each module resolves, scope-vs-actual-tokens agreement, and tunedFor well-formedness
  • Validation folds into the existing config/theme validation surface (and the scaffold's manifest-validate)

Approach

Reuse the engine's existing filterScopeEligible classification (packages/transform/src/token-stylesheet.ts) to compare a preset's actual token namespaces against its declared scope. Wire the checks into the shared validation surface.

Dependencies

  • WORK-456 — the pack format / manifest
  • WORK-457 — loading a preset to inspect its tokens

References

  • SPEC-111 §2, §3, §4; packages/transform/src/token-stylesheet.ts (filterScopeEligible)