WORK-026
ID:WORK-026Status:done

Add ref as Alias for xref

Priority:mediumComplexity:trivialSource:SPEC-008,SPEC-021
changeset-release/main View source

Criteria completion

No incremental history — criteria tracking started on Apr 19.

Branches 2
changeset-release/main current done
main doneclaude/file-naming-convention-LJdwR done
History 6
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. f262d7b
    Content editedby Claude
    Backfill source attributes on all 123 work items
  3. ebe0c64
    Content editedby Claude
    Migrate plan files to {% ref %} xref syntax (WORK-021)
  4. dc97198
    Content editedby Claude
    Add ref as alias for xref rune (WORK-026)
  5. 38e7523
    Content editedby Claude
    Resequence xref work items before CLI scanner
  6. 3fc7634
    Created (done)by Claude
    Add work items for remaining SPEC-021 plan runes gaps

Summary

SPEC-021 uses {% ref "SPEC-008" /%} syntax for cross-references. The codebase has {% xref %}. Add ref as an alias for xref so both syntaxes work. This keeps the plan spec examples valid and provides a shorter, more natural syntax for inline references.

Acceptance Criteria

  • {% ref "SPEC-008" /%} produces identical output to {% xref "SPEC-008" /%}
  • ref registered as alias in the xref tag schema (packages/runes/src/tags/xref.ts)
  • All xref attributes work with the ref alias (label, type)
  • Test verifying alias produces same output

Approach

Add ref to the xref tag's aliases array in the Markdoc schema definition. No changes to the transform logic needed — Markdoc handles alias resolution automatically.