WORK-011
ID:WORK-011Status:pending

Build prerequisite Rune

Priority:lowComplexity:unknownSource:SPEC-008
Branches 3
History 4
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. f262d7b
    Content editedby Claude
  3. ebe0c64
    Content editedby Claude
    Migrate plan files to {% ref %} xref syntax (WORK-021)
  4. d275b2a
    Created (pending)by Claude
    Add work items for 16 unbuilt runes from SPEC-008

Summary

Declares dependencies between content pages. "Complete X before starting this lesson." Themes can render these as a learning path or dependency graph.

Attributes

NameTypeDefaultRequiredDescription
pathStringYesPath to the prerequisite page (relative URL)
labelStringNoDisplay label (defaults to the target page's title)
requiredBooleantrueNoWhether this is a hard requirement or a recommendation

Content Model

  • Self-closing tag (no children). All data comes from attributes.
  • Multiple {% prerequisite %} tags can appear on a page.

Transform Output

  • typeof: Prerequisite
  • Tag: <a> or <div>
  • Properties: path, label, required

Implementation Tasks

  1. Create schema in runes/learning/src/tags/prerequisite.ts
  2. Add RuneConfig entry in runes/learning/src/config.ts
  3. Write CSS in packages/lumina/styles/runes/prerequisite.css
  4. Import CSS in packages/lumina/index.css
  5. Implement cross-page dependency graph collection via @refrakt-md/learning package's register() pipeline hook
  6. Write tests in runes/learning/test/tags/prerequisite.test.ts
  7. Create inspector fixture

Implementation Notes

The rune itself is simple — the complexity is in the build pipeline integration. The content pipeline collects all prerequisite declarations and builds a dependency graph. Themes can render this as a progress tracker, learning path visualization, or simple prerequisite list.