WORK-052
ID:WORK-052Status:ready

Create-Refrakt Project Type Defaults

Priority:mediumComplexity:simpleMilestone:v1.0.0Source:SPEC-001
claude/file-naming-convention-LJdwR View source

Criteria completion

No incremental history — criteria tracking started on Apr 21.

Branches 3
History 2
  1. bbbb94c
    Created (ready)by bjornolofandersson
  2. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand

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)