WORK-452
ID:WORK-452Status:done

create-refrakt framework x purpose axis (--framework and --template)

SPEC-109 §1,§5 — split the overloaded single axis: --framework selects the adapter, --template selects the purpose (the site template). Both default to preserve today's behaviour, and scaffolding composes framework starter + site template + theme.

Priority:highComplexity:moderateMilestone:v0.25.0Source:SPEC-109

Criteria completion

Criteria completion: 4 of 4 (100%) checked; history from Jun 23 to Jun 240%25%50%75%100%Jun 23Jun 24
Branches 3
History 3
  1. ac87cf4
    • ☑ `--framework <name>` selects the adapter (svelte/astro/next/nuxt/eleventy/html), reconciling the existing `--type`/`--target` plumbing; the rename is documented
    • ☑ `--template <name>` selects the purpose; absent → today's minimal starter (existing behaviour preserved)
    • ☑ Scaffolding composes the three inputs (framework starter, site template `site` config, theme), injecting the framework-specific `target`/wiring
    • ☑ A `--template` value may be a bundled name, a local directory, or a package identifier (resolution shared with {% ref "WORK-445" /%})
    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

  • --framework <name> selects the adapter (svelte/astro/next/nuxt/eleventy/html), reconciling the existing --type/--target plumbing; the rename is documented
  • --template <name> selects the purpose; absent → today's minimal starter (existing behaviour preserved)
  • Scaffolding composes the three inputs (framework starter, site template site config, theme), injecting the framework-specific target/wiring
  • A --template value may be a bundled name, a local directory, or a package identifier (resolution shared with WORK-445)

Approach

Update bin.ts flag parsing and the compose step in scaffold.ts. The template's site config is framework-agnostic; the scaffolder injects the adapter wiring.

Dependencies

  • WORK-447--type dispatch / flag plumbing

References

  • SPEC-109 §1, §5; packages/create-refrakt/src/bin.ts

Resolution

Completed: 2026-06-24

Branch: claude/v0.25.0-impl-3. Split the axes: --framework <adapter> (author-facing name; --target kept as alias), --template <name|dir> (purpose). scaffold() composes framework starter + site template (applyTemplate) + theme; --template resolves a bundled name or local directory (resolveTemplateDir); absent → today's minimal starter. Usage documents the rename.