WORK-448
ID:WORK-448Status:done

Bake ADR-023 peerDeps, compat range, devDeps and build wiring into scaffolds

ADR-023 compliance and the day-one-build guarantee (SPEC-116 §3–§4) must be embodied by every scaffold so an author starts correct rather than remembering the policy. This is the shared scaffolding helper the per-kind scaffolders consume.

Priority:highComplexity:moderateMilestone:v0.25.0Source:SPEC-116
changeset-release/main View source

Criteria completion

Criteria completion: 6 of 6 (100%) checked; tracking started on Jun 24, no incremental history yet0%25%50%75%100%Jun 24Jul 11

Tracking started Jun 24 — check back for trends.

Branches 5
History 5
  1. 2264093
    Created (done)by github-actions[bot]
  2. b5d4fcd
    Content editedby Claude
    feat(create-refrakt): plugin scaffold (WORK-449); close ADR-023 wiring (
  3. 0a2f563
    Content editedby Claude
    feat(create-refrakt): --type preset-pack scaffold (WORK-447/448 partial)
  4. c36d24c
    Content editedby Claude
    plan(v0.25.0): renumber WORK-444 → WORK-465 to avoid collision with main
  5. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • Scaffolded packages declare @refrakt-md/* as peerDependencies with a minor range — no exact ordinary deps on @refrakt-md/*
  • The manifest carries a matching refrakt range, pinned to the scaffolding create-refrakt version (single source)
  • Scaffolds also seed matching devDependencies (same ranges) so the peer-only deps resolve for an isolated build
  • Build is wired (tsconfig, dist/ output, exports map) so every contract path resolving to built output works after npm install && npm run build with no hand-editing
  • A freshly scaffolded package passes its own manifest-validate; build and manifest-validate scripts are present
  • A JSON-carrier preset pack is contract-valid with no compile step

Approach

A shared helper produces the package.json deps block, tsconfig, exports map, and scripts, keyed by kind. Reuse the refrakt range util (the ADR-023 manifest-fields work item) and the create-refrakt version source that the site scaffold already uses for version derivation.

Dependencies

  • WORK-465 — the refrakt range field + checker
  • WORK-447 — the --type dispatch this hangs off

References

  • SPEC-116 §3, §4; ADR-023

Resolution

Completed: 2026-06-24

Branch: claude/v0.25.0-impl-2

What was done

ADR-023 + day-one-build wiring is applied across all three extension scaffolds (preset-pack, theme, plugin):

  • @refrakt-md/* declared as peerDependencies with a minor range (refraktPeerRange() = >=MAJOR.MINOR <MAJOR.(MINOR+1)), never exact ordinary deps; mirrored into devDependencies so the package builds in isolation.
  • A refrakt compat range in the manifest where one exists (preset-pack presets.json, theme manifest.json; a plugin's contract is the Plugin export, no manifest field).
  • Build wired (tsconfig → dist/, exports map) so contract paths resolve after npm install && npm run build; verified theme + plugin tsc builds clean and the preset-pack is contract-valid with zero compile step.
  • Scripts: preset-pack validate; theme/plugin build.