WORK-453
ID:WORK-453Status:ready

Template apply as add-a-site: copy content, derive dirs, pin deps

SPEC-109 §2–§3 + SPEC-110 §4 (kind: "site") — installing a full-site template adds a site: write the manifest's site SiteConfig, derive the content/sandbox destinations, scaffold-copy the package's trees, and pin the derived deps. This is the heart of the template mechanism.

Priority:highComplexity:complexMilestone:v0.25.0Source:SPEC-109
claude/v0.25.0-workitems View source

Criteria completion

Criteria completion: 0 of 5 (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
History 1
  1. a6bdcba
    Created (ready)by bjornolofandersson

Acceptance Criteria

  • Template apply writes the manifest's site SiteConfig into sites.<key> (sites.default/singular for a new project, sites.<name> for a multi-site add), deep-merged per SPEC-115
  • Content/sandbox destinations are derived from (framework starter layout) × (target site key); the package's content//sandboxes/ are copied in; the resolved contentDir/sandbox.dir are written into the SiteConfig
  • Deps are derived from site.plugins + site.theme.package and pinned as live dependencies; content is scaffold-copied (author-owned)
  • Full-site templates seed a new project or new site only (no overlay onto an existing site — the deferred section case)
  • --site names a new site; collision with an existing site errors (WORK-446)

Approach

Implement the kind: "site" apply branch over the shared resolver (WORK-445) and the multi-site helpers (WORK-446), using the template.json type (WORK-451). Greenfield runs through create-refrakt; add-a-site runs through the install surface — both share this apply.

Dependencies

  • WORK-451template.json type
  • WORK-445 — shared resolver
  • WORK-446 — multi-site --site + config helpers

References

  • SPEC-109 §2, §3; SPEC-110 §4