Work

Work Items

47 of 47 items
Draft 30
WORK-159 main
Unified RefraktConfig types, loader, and JSON Schema
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.
high moderate
0/10 criteria
WORK-160 main
Add discoverPlugins() helper to @refrakt-md/cli
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.
high moderate
0/10 criteria
WORK-161 main
Extend CliPluginCommand with inputSchema/outputSchema/mcpHandler
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.
high simple
0/5 criteria
WORK-162 main
Refactor runPlugin dispatch to use discoverPlugins
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.
high moderate
0/5 criteria
WORK-166 main
Framework adapters accept site option
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.
high moderate
0/12 criteria
WORK-167 main
Add inputSchema + mcpHandler to plan commands
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.
high moderate
0/7 criteria
WORK-168 main
Plan package consumes unified config (init scaffolds, serve/build read paths)
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.
high moderate
0/8 criteria
WORK-169 main
Scaffold @refrakt-md/mcp package with stdio entry, auto-detect, and core tools
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).
high complex
0/9 criteria
WORK-170 main
MCP plugin tools (via discovery) and resources
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.
high moderate
0/8 criteria
WORK-005 main
Build stat Rune
medium
WORK-006 main
Build math Rune
medium
WORK-007 main
Build concept Rune
medium
WORK-008 main
Build exercise Rune
medium
WORK-010 main
Build glossary Rune
medium
WORK-018 main
Build video Rune
medium
WORK-163 main
refrakt --help lists installed plugins + new refrakt plugins list command
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).
medium simple
0/6 criteria
WORK-164 main
Add --site flag to site-scoped CLI commands
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.
medium moderate
0/7 criteria
WORK-172 main
Migrate this repo's site config to the unified root config
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.).
medium simple
0/9 criteria
WORK-173 main
Update create-refrakt scaffolds for the unified config shape
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.
medium moderate
0/8 criteria
WORK-174 main
Site docs — configuration section
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.
medium moderate
0/5 criteria
WORK-175 main
Site docs — MCP + plugin authoring update + CLAUDE.md pointer
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.
medium moderate
0/5 criteria
WORK-009 main
Build quiz Rune
low
WORK-011 main
Build prerequisite Rune
low
WORK-012 main
Build objective Rune
low
WORK-013 main
Build partner Rune
low
WORK-014 main
Build job Rune
low
WORK-016 main
Build album Rune
low
WORK-017 main
Build artist Rune
low
WORK-165 main
Lint cli-plugin shape in refrakt package validate
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.
low simple
0/7 criteria
WORK-171 main
Add refrakt config migrate command
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.
low simple
0/8 criteria
Ready 13
WORK-055 main
Learning Package Pipeline Hooks
high complex
0/11 criteria
WORK-094 main
Create @refrakt-md/vite plugin — Level 1 static transform
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.
high moderate
0/13 criteria
WORK-095 main
Vite plugin — virtual CSS module and tree-shaking
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.
high simple
0/9 criteria
WORK-052 main
Create-Refrakt Project Type Defaults
medium simple
0/6 criteria
WORK-053 main
CSS Fallback Resolution for Third-Party Packages
medium moderate
0/6 criteria
WORK-056 main
Editor Background Entity Registry
medium complex
0/10 criteria
WORK-057 main
Editor Registry-Powered Autocomplete
medium moderate
0/7 criteria
WORK-096 main
Vite plugin — dev server HMR
Implement hot module replacement for .md file changes during development. When a markdown file is saved, re-transform it and trigger a page update.
medium simple
0/6 criteria
WORK-097 main
Vite plugin — Level 2 cross-page pipeline
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.
medium moderate
0/11 criteria
WORK-115 main
Migrate community package postTransform uses to declarative config
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.
medium moderate
0/7 criteria
WORK-116 main
Update inspect and contracts tooling for structure slots features
Update refrakt inspect and refrakt contracts to surface the new SPEC-033 features: slot assignments, projection effects, and repeated elements.
medium moderate
0/7 criteria
WORK-058 main
Pipeline Incremental Build Optimization
low complex
0/9 criteria
WORK-098 main
Vite plugin — behavior init helper export
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.).
low trivial
0/6 criteria
In Progress · median 19d 2
WORK-051 19d main
Editor Package Awareness
high complex
3/8 criteria
WORK-089 19d main
Create @refrakt-md/astro adapter package
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.
high moderate
11/12 criteria
Review 0
Done · 130 archived 2
WORK-177 main
Security policy for transform pipeline (sandbox hardening)
Today the transform pipeline assumes its input is trusted. The sandbox rune in particular concatenates author HTML/CSS/JS into a srcdoc iframe with sandbox="allow-scripts allow-same-origin" (packages/behaviors/src/elements/sandbox.ts:127), which gives author scripts the parent origin's cookies, localStorage, and DOM. That's fine for self-hosted single-author projects but unsafe for any hosted product surface that renders content from one tenant in another tenant's session.Add an opt-in security policy on the pipeline so hosts can render untrusted content with layered defences (sanitisation, CSP, iframe sandbox, optional separate origin) without breaking the trusted-default behaviour self-hosted users rely on.
high moderate
19/19 criteria
WORK-176 main
v0.11.0 config follow-ups
A handful of concerns surfaced during the v0.11.0 design review that we deliberately deferred rather than block the milestone. None are urgent; all are worth addressing before the unified config shape ossifies further.
medium moderate
11/11 criteria