WORK-035
ID:WORK-035Status:done

plan serve and plan build Commands

Priority:mediumComplexity:complexSource:SPEC-022

Criteria completion

Criteria completion: 10 of 10 (100%) checked; history from Mar 22 to Mar 230%25%50%75%100%Mar 22Mar 23
Branches 3
History 4
  1. e900a90
    Created (done)by bjornolofandersson
  2. f262d7b
    Content editedby Claude
  3. fb58722
    • ☑ `plan serve` starts a dev server rendering plan files as themed HTML pages
    • ☑ Hot reload on file changes — re-scan and browser refresh
    • ☑ Auto-generated dashboard if no `index.md` exists (uses `backlog` and `decision-log` runes)
    • ☑ Sidebar navigation derived from file system and entity types
    • ☑ Entity pages show full rendered content with status badges, xref links, checklist progress
    • ☑ `plan build` generates a self-contained static HTML site to `--out` directory
    • ☑ `--theme` option selects default, minimal, or path to custom CSS
    • ☑ `--base-url` for GitHub Pages deployment (prefix all URLs)
    • ☑ Dashboard uses `backlog` and `decision-log` runes for aggregate views
    • ☑ Tests for HTML generation, navigation structure, and theme application
    by Claude
  4. 30b2ae0
    Created (ready)by Claude
    Add 9 work items for SPEC-022 (Plan CLI) implementation

Summary

Dev server with hot reload (serve) and static site generation (build). Renders plan files as themed HTML pages with navigation, cross-reference links, status badges, and aggregate dashboard views using backlog and decision-log runes.

These commands share 90% of their pipeline — serve wraps it in a dev server with file watching, build writes the output as static HTML.

Acceptance Criteria

  • plan serve starts a dev server rendering plan files as themed HTML pages
  • Hot reload on file changes — re-scan and browser refresh
  • Auto-generated dashboard if no index.md exists (uses backlog and decision-log runes)
  • Sidebar navigation derived from file system and entity types
  • Entity pages show full rendered content with status badges, xref links, checklist progress
  • plan build generates a self-contained static HTML site to --out directory
  • --theme option selects default, minimal, or path to custom CSS
  • --base-url for GitHub Pages deployment (prefix all URLs)
  • Dashboard uses backlog and decision-log runes for aggregate views
  • Tests for HTML generation, navigation structure, and theme application

Approach

Build a lightweight rendering pipeline: scanner → entity registry → Markdoc parse → transform → identity transform → HTML template. Wrap entity pages in a shell template with navigation sidebar and theme CSS. For serve, use a simple HTTP server (Node http module) with fs.watch for hot reload. For build, write all pages to the output directory.

Dependencies

  • WORK-027 (plugin architecture)
  • WORK-028 (plan file scanner)
  • WORK-020 (entity registration — for xref resolution)
  • WORK-022 (backlog rune — for dashboard views)
  • WORK-023 (decision-log rune — for dashboard views)
  • WORK-034 (dashboard theme CSS)

References

  • SPEC-022 (Plan CLI)