Promote refrakt.config.json from a site-only file into the unified root config defined in ADR-010. Add type-level support for plugins, plan, site, and sites, normalize the three valid input shapes (flat / singular site / plural sites) into a canonical internal form, and publish a JSON Schema so editors can autocomplete and validate the file.
Replace the lazy runPlugin import-on-demand pattern in packages/cli/src/bin.ts with a first-class discoverPlugins() helper that returns the full set of installed plugins. The helper has four consumers in v0.11.0 — CLI dispatch, refrakt --help, refrakt plugins list, and the new MCP server — and centralizing the logic eliminates three different implementations of the same scan.
Add three optional fields to the CliPluginCommand interface so plugin commands can declare structured input/output schemas and an MCP-friendly handler that bypasses argv parsing. Existing plugins keep working unchanged — the fields are purely additive.
Switch the CLI's plugin dispatch in packages/cli/src/bin.ts from blind import('@refrakt-md/<namespace>/cli-plugin') to a discoverPlugins() lookup. This produces a friendlier "did you mean?" error when a namespace is misspelled (since we know the full set of installed plugins) and centralizes plugin loading on the new helper.
Update all five framework adapter packages — @refrakt-md/sveltekit, @refrakt-md/astro, @refrakt-md/nuxt, @refrakt-md/next, @refrakt-md/eleventy — to accept a site?: string option. Each adapter resolves its target site via the shared normalizer from WORK-159, then reads contentDir, theme, target, packages, routeRules, icons, backgrounds from the resolved site entry instead of the top-level config. Single-site projects and the legacy flat shape continue to work without changes; multi-site repos pick a target per adapter.
Wire the @refrakt-md/plan CLI commands with the new schema fields from WORK-161 so the MCP server exposes them as cleanly typed tools. Each command gets a JSON Schema for its inputs and an mcpHandler that bypasses argv parsing and accepts a structured object directly.
Wire @refrakt-md/plan to the unified refrakt.config.json. plan init scaffolds the config (creating it or extending an existing one with a plan section), and plan serve / plan build / other plan commands read plan.dir from the loaded config instead of relying solely on the --dir flag and defaults. The plan section currently exposes only dir; specs path remains derived from dir (a child folder), and surfacing it as a config field can come later if real-world projects demand it.
Create the @refrakt-md/mcp package: stdio MCP server entry point, auto-detection of plan and site contexts from the unified config and the filesystem, and the initial set of core CLI-mirroring tools (refrakt.inspect, refrakt.contracts, refrakt.validate, refrakt.reference, refrakt.package_validate).
Wire plugin-contributed tools (notably the @refrakt-md/plan commands) into the MCP server via discoverPlugins(), and implement the read-only resources (refrakt://detect, refrakt://reference, refrakt://contracts, refrakt://rune/<name>, refrakt://plan/*) so agents that prefer pull semantics have first-class URIs.
The collection rune core — a sentinel-emitting schema plus a postProcess resolver that queries the registry (filter/sort/group/limit) and renders the built-in layouts, with the pinned $item bound-variable contract and the per-layout body interpretation.
The built-in adapter (in @refrakt-md/content) that turns site.entityRoutes into contributed pages: selects entities by type + filter, substitutes placeholders, renders an inline render string or a render-template partial per entity with $item bound, and back-fills sourceUrl.
Make plan entities embeddable so {% expand $item.id /%} renders their bodies in entityRoutes detail pages. The plan register hook currently sets sourceUrl only; add sourceFile and an extract that returns the entity rune's transformed body. This is the prerequisite the SPEC-071 dogfood depends on.
Wire refrakt's own plan/ as a sites.plan site and author its plan-site/ content, proving that entityRoutes + collection replace the bespoke plan serve. This is the milestone's proof-of-practice.
Surface the installed plugin set in two places: the top-level refrakt --help output (so users discover available namespaces without reading docs) and a dedicated refrakt plugins list command (canonical machine-readable output for tooling, including MCP clients debugging their setup).
Site-scoped commands (inspect, contracts, validate, scaffold-css, package validate) need to know which site they are operating on when the project declares multiple. Add a --site <name> flag that selects an entry from the normalized sites map; for single-site projects the flag is optional and resolves to the lone entry.
Move site/refrakt.config.json to a unified refrakt.config.json at the repo root, declaring plugins, the plan section, and sites.main (or whatever name we settle on) for the existing site. Validates the design against our own project and gives us a multi-site-ready structure for any future additions (separate plan dashboard site, blog, etc.).
create-refrakt currently writes a flat-shape site/refrakt.config.json for site projects and (via plan init) no config at all for plan projects. Update both paths to produce the new unified root-shape config — site projects get a sites.main section, plan projects get a plan section, and any combined scaffolds (future) declare both.
Document the unified refrakt.config.json at site/content/docs/configuration/. Cover the three valid shapes (flat / singular site / plural sites), each section (plugins, plan, site/sites), the multi-site workflow, and the migration story for existing flat-shape configs.
Document the new @refrakt-md/mcp server (registration, tool reference, resource reference) at site/content/docs/mcp/, update the existing plugin authoring docs to cover the new cli-plugin schema fields (inputSchema, outputSchema, mcpHandler), and add a brief pointer in the root CLAUDE.md so AI agents know the MCP server exists when registered.
The rich-table path: a table collection's body uses the sections content model (heading = column separator + label, body = per-cell markdoc template with $item), with collection owning the <table>/<thead> and row alignment.
Add a plan project type to create-refrakt that scaffolds a complete, runnable plan site: config (plugin + entityRoutes), a seed plan/, and a plan-site/ content dir (layout + dashboards), for a chosen adapter target.
SPEC-104 §6 + docs: document the bg guest body, the bare-surface guardrail, the sandbox preset (with the refrakt.config.json example), and the boot-frame layering; ship the music-blog backdrop pattern as a working showcase exercising the layout-cascade + SPEC-006 audio-bridge composition.
The static gallery (the visual-regression harness from WORK-409) transforms pages with merged.config — i.e. coreConfig plus the enabled plugins' configs — but never calls assembleThemeConfig. The site assembles core → plugins → theme so theme-level overrides reach the engine; the gallery does not, so it can only ever render base output.This is a latent gap in the regression net: any override a theme applies via mergeThemeConfig (tints, icon swaps, and — after WORK-425 — per-rune defaultElevation/defaultProminence deltas) is invisible in the gallery. The gallery shows what a plugin ships, not what a theme actually renders.Not a blocker for WORK-425. Under the agreed Option A, base surface defaults live in core + plugin configs, which the gallery already loads, so default data-elevation/data-prominence emission is gallery-verifiable today. This item only matters once a theme overrides those defaults (Lumina currently inherits the base defaults unchanged).
With WORK-604 landed, playlist's tracks field can declare emitTag: 'track' and receive one homogeneous, document-ordered array instead of a mix of list nodes and track tags.That deletes the interleaving machinery at plugins/media/src/tags/playlist.ts:316-353 — the listCursor consuming tracksData by list length, and the defensive tail for "a shape the resolver collected but this loop did not recognise".It does not delete adoptNestedTrack. See below.
The second proving set for SPEC-143: the storytelling entity runes whose sections arrive as already-rendered child runes (emitTag). Together with WORK-616 this covers both sides of the emitTag split, which is what proves the mechanism rather than one shape of it.Same gate (D7): no drift in contracts or the SEO baseline, per rune.recipe is the standing proof that the escape hatch is still needed (D3). It is not migrated, and it is not bent to fit.
Add a lint pass to refrakt package validate that checks a package's cli-plugin export for structural issues — missing namespace, missing descriptions, malformed inputSchema, namespace conflicts with already-installed plugins. Catches problems at package-publish time rather than at runtime when the MCP server tries to advertise the broken tool.
Add a small migration command that rewrites a flat-shape refrakt.config.json into the nested form (site.* and explicit plugins). Optional for users — the flat shape stays valid indefinitely — but useful for projects adopting the unified config or moving to multi-site.
The first core plain-presentational card rune — ordinary attributes, no $item/registry knowledge — shipped as the reference implementation for collection body templates. Proves the "cards are plain runes; the template wires entity fields into attributes" model.
Mark plan build and plan serve deprecated, pointing users at the site approach, once refrakt's own plan site proves the replacement. Keep the authoring CLI. Removing the bespoke render stack is a later release, out of scope here.
Once cancelled / superseded exist, review the plan corpus for items that should be retired rather than left dangling. The main pool is the 13 pending work items, all sourced from SPEC-008 (unbuilt runes): stat, math, concept, exercise, glossary, objective, prerequisite, quiz, partner, job, album, artist, video. A reviewed, per-item judgment pass — not an automated flip.
loadContent takes fourteen positional parameters (packages/content/src/site.ts:697) and is exported from @refrakt-md/content. WORK-575 adds an options-bag overload beside it rather than a fifteenth positional, which is the right move for that change and deliberately not a redesign.This item is the redesign question, deferred to where it belongs: a public function's shape is much cheaper to change before 1.0 than after.
WORK-628 ran @adobe/structured-data-validator over contracts/seo-baseline/. Its rich-result layer was mostly noise for refrakt. Its schema.org layer was the opposite: zero false positives. It checks that a type exists and that every property is in that type's domain. Over the baseline's history it caught the NonProfit type and the nested Offer.offers over-match. On today's baseline it caught three defects nobody had recorded (BUG-033), on rows whose comments say nothing checks them.SPEC-145 D25 keeps the ban on user schema because this check is too narrow to stand in for a reviewer. It is still a cheap net under the reviewer for first-party rows. This item adds it to CI as a maintainer-side check. Nothing ships to users.
Build the core Vite plugin that intercepts .md files and emits JS modules with rendered HTML, frontmatter, SEO data, and serialized tree. This is the Level 1 (static, per-file) integration — no cross-page awareness.
Implement virtual:refrakt/styles module that imports theme tokens, per-rune CSS, and package CSS. Supports tree-shaking to include only CSS for runes actually used in content.
Implement the canonical field:value selector grammar from SPEC-070 as a single shared module in @refrakt-md/runes, consumed by collection, entityRoutes (SPEC-069), and backlog. The existing plugins/plan/src/filter.ts folds into it, gaining glob/regex, url resolution, and case-consistency while preserving backlog behavior.
Implement the deferBody mechanism SPEC-070's prototype validated: a catalog flag plus a pre-transform pass in the content loader that captures a rune's pristine body as a source string and empties it, so postProcess can re-parse and transform it per entity with a bound variable. Capture must happen before the page transform — by schema-transform time Markdoc has already resolved the body's $item interpolations to undefined.
Add the Plugin.contributePages hook and a contribution phase in the content loader (after file-page registration, before aggregation) that collects ContributedPage[] and runs them through the normal pipeline — the underlying primitive both the entityRoutes adapter and third-party plugins build on.
refrakt edit cannot launch in a multi-site project: EditOptions is just port/contentDir/devServer/noOpen, and resolveSite() throws when multiple sites are declared, telling the user to pass --content-dir — which bypasses config resolution entirely, losing plugins, tints, icons, and route rules. Refrakt's own repo (sites main + plan) hits this. Add a --site flag and an in-editor site switcher so the editor works first-class against multi-site configs.
In block mode, registry-resolved runes — collection, relationships, aggregate, xref, expand, and data-bound sandbox — render as unresolved sentinel shells with no explanation. They resolve in core postProcess against coreData.registry, which the client-side block renderer never runs; RUNTIME_ONLY_TYPES in block-renderer.ts only placeholders nav*. The server already holds the registry and resolvers (the full-page iframe preview uses them), so render these blocks server-side; where that's not possible, show an honest placeholder instead of an empty shell.
Implement the level: 'pipeline' mode that runs the full four-phase cross-page pipeline at build time, enabling breadcrumbs, nav, glossary auto-linking, and other entity-dependent features.
With WORK-110 through WORK-114 complete, convert the 5 postTransform uses identified in SPEC-033 to their declarative equivalents. Validate identical HTML output before and after each migration.
Register a small set of author-facing markdoc functions — currency, date, number, join — in @refrakt-md/runes as the shared value-formatting layer, usable anywhere markdoc transforms run: collection cells, body templates, and entityRoutes render strings. Keeps formatting out of fields and out of any bespoke projection DSL.
Generalize SPEC-066's sourceFile + extract into the embed() contract: an entity is embeddable if it has embed() or (sourceFile + extract). expand and the entityRoutes adapter accept either, so external plugins can make entities embeddable without a source file on disk.
Implements SPEC-095: an explicit group-order attribute so authors can sequence groups over a non-enum field (e.g. category, plugin, edge kind), which today render in arbitrary insertion order.
editHints drive click-to-edit in the block editor; every rune without them is one where clicking a section silently does nothing. Coverage today is 93/130 runes (71.5%): business, design, docs, places, and storytelling are at 100%, but core is at 58% (35/60), plan at 45% (5/11), media at 60% (3/5), learning at 67% (2/3), and marketing at 80% (12/15). Close the gaps using the established SPEC-009 playbook (visible elements as refs/data-name, hints declared in the rune's config).
The engine grew a rich soft-lint system (posture demotion, escape-hatch lints, nesting validation, entity-id collisions) but the editor actively swallows it: runPreviewPostProcess in packages/editor/src/preview.ts collects PipelineWarnings into an array and drops it, and hook errors hit a bare catch {} ("degrade silently"). Authors only discover problems at build time. Pipe warnings through to the UI as a validation rail.This is the warning channel that SPEC-098's inline lints build on.
Execute ADR-019: move bento + bento-cell from @refrakt-md/marketing to core (@refrakt-md/runes + @refrakt-md/lumina) as Layout primitives, with a back-compat re-export shim from marketing. Not a blocker for WORK-350; target a future minor.
Deferred from WORK-409 (its final acceptance criterion). The harness runs end-to-end locally and in the pinned Playwright container; what's left is the CI automation, which needs a browser-backed runner to develop against — hence its own item, unassigned to a milestone until a browser CI environment is in place.
Every rune that declares sequence: names the container holding its items — except one. Steps builds its <ol> at plugins/marketing/src/tags/steps.ts:166 and pushes it straight into children two lines later, so the element carries no data-name, gets no BEM element class, and cannot be addressed from a layout tree.
runMigrateIds sorts colliding claimants by path and keeps the first (plugins/plan/src/commands/migrate-ids.ts:165), so on a branch it can renumber the entity already on main and leave the local draft holding the ID.The safety argument in the code — that it only acts when nothing references the ID — rests on a check that reads plan files only (migrate-ids.ts:170-182). Plan IDs are referenced from four published CHANGELOGs (runes 130, transform 120, lumina 80, content 51), where a renumber is permanent and invisible.
A metaFields entry can render its value as marks: rating: { total } makes the engine emit total spans, the first value of them data-filled="true" (buildRatingValue, packages/transform/src/engine.ts). The mechanism is generic (its own doc comment says "star ratings, progress dots, etc."), but the output is not:
Export a thin initBehaviors() wrapper from @refrakt-md/vite/behaviors that frameworks can call after navigation to re-initialize interactive rune behaviors (accordion, tabs, datatable, etc.).
Internal-only cleanup that lands the rest of WORK-323 once WORK-331 has stopped emitting the dual-emit metas. Remove the now-dead legacy read/strip path so data-rune-fields is the engine's only field-data input. No external/contract benefit beyond Tier 1 — this is for a single internal representation and a smaller engine.
accordion's mainEntity, how-to's step and tool, and recipe's recipeIngredient and recipeInstructions are collections that still serialise as a bare object when they hold one item and an array when they hold two.Every other collection in the catalog has been declared: pricing's offers, playlist's track / hasPart, breadcrumb's and timeline's itemListElement. These five are the remainder.
Build the Astro framework adapter — the first non-SvelteKit target. Astro is MPA-first and SSG-focused, making it the simplest adapter to build and validate.
ADR-029 records three couplings as open questions rather than asserting them. Each is answerable by reading code and running existing tooling; none needs a design. This item answers all three and writes the answers back into the ADR, so the implementing spec is built on measurements rather than expectations.It is a research item. The deliverable is three findings, not a code change.
scripts/generate-changelog.mjs writes site/content/releases.md as one flat list of changeset bullets per version. This item gives the changelog the shape SPEC-176 describes: an index of summaries at /releases, and a page per release with drawers and the full list of changes (D4, revised while implementing this item).
Indenting the content of a tag by a tab or four spaces breaks it today: the indented lines become a code block, with no error. Composition templates nest runes several levels deep, so this is the first thing an author of a definition runs into. Markdoc's allowIndentation tokenizer option fixes it, and SPEC-170 measured that it changes no existing parse.Markdoc.parse( is called directly in about 20 source files across packages and plugins. This item replaces them with one shared parse (SPEC-170 D1), so a page cannot render one way and validate, or preview, another.
A composition's content.type must be sequence or sections (packages/runes/src/lib/composition.ts). Five runes split their content on --- and need to address a field inside a zone: hero, feature, step, recipe and playlist. None of them can be a composition until the parser accepts type: delimited. The DelimitedModel type already exists (packages/types/src/content-model.ts), so this is a parser and resolver change, not a new model (SPEC-169 D1).
section's sections declare preamble, headline and blurb but no body, so reading and dropcap silently do nothing on a section. This is the case packages/transform/src/section-roles.ts exists to catch (SPEC-160 D1). It stands on its own and is the first step of SPEC-160's order.
card is the only primitive with a media split, so every composition that wants a titled region with media places a drawn object. ADR-041 moves the split onto section. This item gives section the split attributes, cover, and a media attribute that stamps data-media, while card's output stays exactly as it is (SPEC-160 D2, D3).
Once WORK-645 allows indentation, SPEC-170 D5 sets the rule for when to indent: a block tag's content is indented only when it contains another block tag. A rule nobody can apply mechanically drifts, and no existing tool applies this one:
section reads a leading paragraph as an eyebrow even when no heading follows. A composition that places prose in a section gets it re-roled without any warning, and so does a standalone section used as a region with media. ADR-046 anchors the grammar to the headline, adds a header attribute, and warns when slot content lands in a header role it is not named for.It lands before WORK-653 and WORK-654, which both compose over section.
Every package pins "@markdoc/markdoc": "0.4.0" exactly: packages/runes, transform, content, svelte, editor, cli, language-server, plugins/places, site and plan-site. 0.4.0 was released in December 2023; 0.5.10 in September 2026, eleven releases later. Nothing in the plan or the git history records why the version is pinned. SPEC-123 and WORK-556 only call it "the pinned 0.4.0".The 0.4.0 → 0.5.10 source was read, not run. The changes that matter here:Worth having:
refrakt validate --deep passes a page containing {% ref "SPEC-99999" /%}. Only the site build reports it, as one "entity not found" warning among hundreds. A mistyped ID in a release note would therefore ship as a dead drawer.
Once the generator handles notes, the existing page needs content in the summary slot where the milestone fallback is missing or reads badly. See the migration table in SPEC-176.
implicitSection exists on the sections model (packages/types/src/content-model.ts): when no section heading is found, all children become one section instead of preamble. The composition parser does not accept the key, so itinerary, whose conditional content model only exists to add it, cannot be expressed. Accepting it removes that rune's need for a conditional model (SPEC-169 D2, D3).
Today each iterates a list only when the field has an itemModel with an emitTag. A list whose items need no extraction, where each item's content is placed as it is, has no way in. That blocks steps, which takes its steps from headings or from an ordered list (SPEC-169 D4).
28 transforms pass property: 'contentSection' to createComponentRenderable, which emits data-field="content-section" on the rune root. Nothing reads it. The one consumer that ever existed, the Page document node, compares the camelCase 'contentSection' against the kebab-cased attribute, so it could never match, and it is never registered by any Markdoc config. Page also stamps typeof="PageSection", which is not a schema.org type. SPEC-133 decided the removal; v0.35.0 deferred it because it changes HTML on every section rune, and nothing has carried it out since.It lands first in v0.43.0 because it touches the runes SPEC-160 changes next, and it removes one recorded plugin-vs-composed difference from the four composed-storytelling tests before WORK-653 re-runs those comparisons.
The composed character, realm and faction place {% card %}, because it was the only primitive with a media split. Once section has the split, they move to it (SPEC-160 D4). The expected differences are listed in D4: rf-section__* element classes, a real <header> for title and description, no surface, and the portrait regaining data-media="portrait".
Buttons are a convention, not a primitive. hero and cta render links through linkItem, and the CSS that makes them buttons is copied into both runes in both packages:
Only card and bento-cell can make a whole region a link, each through its own href. Both stretched overlays are aria-hidden="true" tabindex="-1", so keyboard and screen-reader users cannot reach them. SPEC-160 D8 extends the existing link tag to wrap blocks, and both href attributes become shorthand that renders through it.
An eyebrow that holds a link renders as a pill with a stretched link. The rules for it are copied into nine runes: hero, cta, section, feature, pricing, reveal, tabs, accordion and steps. Each copy is in both packages/skeleton/styles/runes/ (the stretched link) and packages/lumina/styles/runes/ (the pill), so there are 18 copies of one pattern. A theme has to restyle the pill in nine places, and a new rune with an eyebrow gets it only by copying it again. card has an eyebrow but no pill.The cause is that the eyebrow has no section role. The shared roles (header, preamble, title, description, body, footer, media) are styled by [data-section] in the sections dimension, whatever the rune; the eyebrow is styled only by its BEM class. With section as the composition base (ADR-041) and hero and cta heading for compositions with no rune CSS (SPEC-160 D7), the pill belongs to the anatomy, not to each rune. This follows the same pattern as WORK-654, which moves button CSS out of hero and cta.
The documentation site is the largest body of refrakt content in the repository, and the first place a reader copies examples from. Once WORK-657 can apply SPEC-170 D5 mechanically, run it over the site, so nested runes read as nested and the examples teach the rule.
RuneConfig.sequence takes a literal ('numbered' | 'connected' | 'plain'), while sequenceDirection beside it takes { fromModifier, default } (packages/transform/src/types.ts). plot needs its sequence style keyed on its structure modifier, so it uses a postTransform (plugins/storytelling/src/config.ts), one of four left in the codebase. Giving sequence the same form deletes it (SPEC-147 Finding 1, implementation note 1).