ID:WORK-039Status:donePriority:highComplexity:complex
Refactor plan render pipeline to use @refrakt-md/html
The main refactor: replace the bespoke HTML shell template in @refrakt-md/plan with calls to renderFullPage() from @refrakt-md/html. This removes the hand-rolled document structure, inline styles, and direct HTML string concatenation.
Acceptance Criteria
render-pipeline.tscallsrenderFullPage()from@refrakt-md/htmlinstead of building HTML strings- The bespoke HTML shell template is removed
getLuminaBaseCss()is removed —@refrakt-md/luminais no longer a dependencyescapeHtmlutility is removed (handled by the HTML adapter)- Built-in theme CSS is served at
/__plan-theme.css(serve) or written totheme.css(build) - SSE hot reload script is injected via
headExtraoption planLayoutfrom WORK-037 is used for structural placement- Nav region from WORK-038 is passed as
regions.nav plan serveproduces identical visual output as beforeplan buildproduces identical static output as before--themeflag still works fordefault,minimal, and custom paths--base-urlflag still works correctly- All existing plan serve/build tests pass
Approach
- Add
@refrakt-md/htmlas a dependency of@refrakt-md/plan - Remove
@refrakt-md/luminadependency - Assemble a minimal
HtmlThemewithplanLayout - Replace the HTML shell with
renderFullPage()calls - Move theme CSS from inline
<style>to external stylesheet references - Update serve command to serve CSS and behaviors at dedicated routes
- Update build command to write CSS and behaviors as separate files
References
- SPEC-014 (Plan Site via HTML Adapter)
- WORK-037 (planLayout definition)
- WORK-038 (nav region builder)
Relationships
Related
- WORK-050doneworkConverge plan site renderer with shared layout engine
- WORK-041doneworkAdd client behaviors to plan site
- WORK-044doneworkCollapsible status groups in plan sidebar
- WORK-042doneworkConfig-aware theme resolution for plan site
- WORK-046doneworkEnhanced plan dashboard with progress and milestone scoping
- WORK-037doneworkDefine planLayout in @refrakt-md/transform
- WORK-038doneworkBuild nav region builder for plan site
- WORK-040doneworkAdd syntax highlighting to plan site
- WORK-043doneworkToken bridging — update plan CSS to use --rf-* tokens