WORK-052
ID:WORK-052Status:ready

Create-Refrakt Project Type Defaults

Priority:mediumComplexity:simpleMilestone:v1.0.0Source:SPEC-001
changeset-release/main View source

Criteria completion

No incremental history — criteria tracking started on Apr 19.

Branches 3
History 7
  1. 59ded4a
    Content editedby Claude
    Implement SPEC-037 plan package hardening: all 7 work items
  2. f262d7b
    Content editedby Claude
    Backfill source attributes on all 123 work items
  3. 2637549
    Content editedby Björn Andersson
    chore(plan): create v1.0.0 milestone, complete v0.9.0, fix acceptance cr
  4. 6d13c51
    Content editedby Claude
    chore(plan): update v0.9.0 work item statuses after review
  5. a129a9e
    Content editedby Claude
    Assign all new work items (WORK-051–068) to v0.9.0 milestone
  6. a333007
    Content editedby Claude
    Add work items for SPEC-024 (Metadata) and SPEC-025 (Universal Theming)
  7. 2f24c14
    Created (ready)by Claude
    Add work items for SPEC-001 and SPEC-002

Summary

New projects created with create-refrakt should pre-install official packages relevant to their use case. "Starting a landing page" pre-installs @refrakt-md/marketing. "Starting a docs site" pre-installs @refrakt-md/docs. Users can remove packages they don't need or add community packages afterward.

Acceptance Criteria

  • create-refrakt prompts for project type (or accepts it as an argument via --type)
  • Project type determines which official packages are pre-installed
  • Pre-installed packages are added to package.json dependencies
  • Pre-installed packages are listed in refrakt.config.json packages array
  • A "blank" or "minimal" option installs no extra packages (core only)
  • Template mapping covers at least: landing page → marketing, docs site → docs, blog → none (core only), storytelling → storytelling

Approach

Add a project type selector to the create-refrakt scaffold flow. Define a mapping from project type to package list. When generating package.json and refrakt.config.json, include the selected packages. The template already derives dependency versions from its own package.json at runtime, so version sync is automatic.

References

  • SPEC-001 (Community Runes — New Project Defaults)