WORK-447
ID:WORK-447Status:done

create-refrakt --type plugin|template|preset-pack dispatch

create-refrakt --type accepts only site|theme|plan (packages/create-refrakt/src/bin.ts). SPEC-116 §1 extends it with the three distributable kinds and dispatches each to its own scaffolder. This is the thin CLI seam; the scaffolder bodies land in their own work items (plugin, theme, template, preset-pack).

Priority:highComplexity:simpleMilestone:v0.25.0Source:SPEC-116

Criteria completion

Criteria completion: 4 of 4 (100%) checked; history from Jun 23 to Jun 240%25%50%75%100%Jun 23Jun 24
Branches 6
History 5
  1. ac87cf4
    • ☑ `--type` accepts `plugin`, `template`, `preset-pack` alongside `site|theme|plan`; `site` stays the default
    by bjornolofandersson
  2. c3fe915
    • ☑ Each new kind dispatches to its scaffolder; the existing `--scope` plumbing is reused for package naming
    by bjornolofandersson
  3. f6e6a38
    • ☑ An invalid `--type` value errors with the full list of valid kinds
    • ☑ Existing `site`/`theme`/`plan` behaviour is unchanged
    by bjornolofandersson
  4. dede57e
    Created (ready)by bjornolofandersson
  5. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • --type accepts plugin, template, preset-pack alongside site|theme|plan; site stays the default
  • Each new kind dispatches to its scaffolder; the existing --scope plumbing is reused for package naming
  • An invalid --type value errors with the full list of valid kinds
  • Existing site/theme/plan behaviour is unchanged

Approach

Update flag parsing + the dispatch table in bin.ts. Keep the scaffolder functions in scaffold.ts (or a scaffolders/ split) so each kind's work item can land independently.

References

  • SPEC-116 §1
  • packages/create-refrakt/src/bin.ts, packages/create-refrakt/src/scaffold.ts

Resolution

Completed: 2026-06-24

Branch: claude/v0.25.0-impl-2/-3. create-refrakt --type now accepts site|theme|plan|preset-pack|plugin|template, each dispatched to its scaffolder (scaffoldPresetPack/scaffoldPlugin/scaffoldTheme/scaffoldTemplate), with --scope plumbing and an updated error message + interactive options. Existing site/theme/plan behaviour preserved (verified by bin.test.ts).