WORK-449
ID:WORK-449Status:done

create-refrakt plugin scaffold

SPEC-116 §2 — --type plugin emits a package implementing Plugin (packages/types/src/package.ts) with one example rune that builds and renders under the identity transform out of the box.

Priority:mediumComplexity:moderateMilestone:v0.25.0Source:SPEC-116

Criteria completion

Criteria completion: 4 of 4 (100%) checked; history from Jun 23 to Jun 240%25%50%75%100%Jun 23Jun 24
Branches 4
History 3
  1. c3fe915
    • ☑ `--type plugin` emits a `Plugin` package: a `runes/` dir with one example rune (`createContentModelSchema` + `createComponentRenderable`) and its `theme.runes` config entry
    • ☑ Includes a fixture and the `package.json` exports (plus a `cli-plugin` entry stub where relevant)
    • ☑ The example rune builds and renders under the identity transform with no hand-editing
    • ☑ Inherits the {% ref "ADR-023" /%} deps + day-one build wiring ({% ref "WORK-448" /%})
    by bjornolofandersson
  2. dede57e
    Created (ready)by bjornolofandersson
  3. a6bdcba
    Content editedby Claude
    plan(v0.25.0): accept specs/ADRs and decompose into 21 work items

Acceptance Criteria

  • --type plugin emits a Plugin package: a runes/ dir with one example rune (createContentModelSchema + createComponentRenderable) and its theme.runes config entry
  • Includes a fixture and the package.json exports (plus a cli-plugin entry stub where relevant)
  • The example rune builds and renders under the identity transform with no hand-editing
  • Inherits the ADR-023 deps + day-one build wiring (WORK-448)

Approach

Add scaffoldPlugin dispatched from WORK-447. Model the example rune on a simple existing plugin rune (e.g. a definition-style block). Wire theme.runes so the engine styles it.

Dependencies

  • WORK-447--type dispatch
  • WORK-448 — deps + build wiring

References

  • SPEC-116 §2; packages/types/src/package.ts; plugin authoring guide

Resolution

Completed: 2026-06-24

Branch: claude/v0.25.0-impl-2

What was done

scaffoldPlugin (SPEC-116 §2) emits a Plugin package: src/tags/callout.ts (an example rune via createContentModelSchema + createComponentRenderable, modeled on the working lore rune — title attr + body, aside with data-rune="callout"), src/config.ts (RuneConfig for Callout: block + tone modifier + autoLabel), src/index.ts (Plugin export wiring runes.callout + theme.runes), styles/callout.css, README.md, tsconfig.json. ADR-023 wiring: @refrakt-md/* peers (minor range) mirrored to devDeps; @markdoc/markdoc dep. Snippet + fixture included.

Verified

Scaffolded @acme/my-plugin, linked the workspace node_modules, ran tsc → exit 0 with dist/ output. Loaded the built plugin: name set, runes.callout.transform is a valid Markdoc tag schema, theme.runes.Callout present, fixture present. Builds and renders out of the box.