WORK-026
ID:WORK-026Status:done

Add ref as Alias for xref

Priority:mediumComplexity:trivialSource:SPEC-008,SPEC-021

Criteria completion

Criteria completion: 4 of 4 (100%) checked; history from Mar 22 to Mar 230%25%50%75%100%Mar 22Mar 23
Branches 2
History 5
  1. e900a90
    Created (done)by bjornolofandersson
  2. f262d7b
    Content editedby Claude
  3. dc97198
    • ☑ `{% 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
    by Claude
  4. 38e7523
    Content editedby Claude
  5. 3fc7634
    Created (pending)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.