WORK-451
ID:WORK-451Status:done

Template package format and template.json manifest type

SPEC-109 §2 — define the site-template package format and the template.json manifest type. The config payload is a SiteConfig partial (install = add a site); the path fields are install-derived, not author-set.

Priority:highComplexity:moderateMilestone:v0.25.0Source:SPEC-109
claude/v0.25.0-impl View source

Criteria completion

Criteria completion: 5 of 5 (100%) 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 4
  1. da9667d
    Created (done)by bjornolofandersson
  2. f7a6228
    Content editedby Claude
    feat: sandbox dir rename examplesDir → dir with back-compat (WORK-463);
  3. c36d24c
    Content editedby Claude
    plan(v0.25.0): renumber WORK-444 → WORK-465 to avoid collision with main
  4. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • A template.json type is defined: metadata (kind, name, title, description, category, a refrakt range, optional previewUrl) plus a site field that is a SiteConfig partial
  • The site partial omits contentDir/sandbox.dir — they are install-derived (SPEC-109 §2)
  • kind defaults to "site"; "section" is reserved (type-level only, not implemented)
  • The package layout (content/, optional sandboxes/) is documented as fixed source-folder names
  • The type lives in packages/types and is importable by the install path and the scaffold

Approach

Add the template.json interface alongside ThemeManifest in packages/types/src/theme.ts, reusing SiteConfig. No runtime yet — this is the shared shape the apply step and scaffold both consume.

Dependencies

  • WORK-465 — the refrakt range field

References

  • SPEC-109 §2; packages/types/src/theme.ts (SiteConfig)

Resolution

Completed: 2026-06-23

Branch: claude/v0.25.0-impl

What was done

Satisfied as part of the foundation (WORK-465): TemplateManifest + TemplateSiteConfig in packages/types/src/distribution.ts. Metadata (kind?, name, title, description?, category?, refrakt?, previewUrl?) + site: TemplateSiteConfig where TemplateSiteConfig = Omit<Partial<SiteConfig>, 'contentDir' | 'sandbox'> (the install-derived path fields are removed at the type level). kind is optional and documented as defaulting to "site"; "section" reserved. Package layout (content/, sandboxes/ fixed source folders) documented in the JSDoc. Exported from the types index; consumed by the CLI install path.