WORK-022
ID:WORK-022Status:done

Build backlog Rune

Priority:mediumComplexity:complexSource:SPEC-021

Criteria completion

Criteria completion: 11 of 11 (100%) checked; history from Mar 22 to Mar 230%25%50%75%100%Mar 22Mar 23
Branches 3
History 8
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. f262d7b
    Content editedby Claude
  3. cf0cfc0
    Content editedby Claude
    Revert "Fix plan site truncation by escaping Markdoc tags in code fences
  4. 703b85a
    Content editedby Claude
    Fix plan site truncation by escaping Markdoc tags in code fences
  5. 28a3e49
    • ☑ CSS in `packages/lumina/styles/runes/backlog.css`
    by Claude
  6. bcb01d8
    • ☑ Rune schema in `runes/plan/src/tags/backlog.ts` with filter/sort/group/show attributes
    • ☑ Filter parser handles `field:value` syntax with AND/OR semantics
    • ☑ `aggregate()` pipeline hook queries entity registry for work and bug entities
    • ☑ Results sorted by specified field
    • ☑ Results grouped into sections when `group` specified
    • ☑ Summary card rendering with BEM classes (`rf-backlog`, `rf-backlog__card`, etc.)
    • ☑ Engine config in `runes/plan/src/config.ts`
    • ☑ Tests for filter parsing, sorting, grouping, and card rendering
    • ☑ Type definition in `runes/plan/src/types.ts`
    • ☑ Exported from `runes/plan/src/index.ts`
    by Claude
  7. ebe0c64
    Content editedby Claude
    Migrate plan files to {% ref %} xref syntax (WORK-021)
  8. 3fc7634
    Created (pending)by Claude
    Add work items for remaining SPEC-021 plan runes gaps

Summary

Aggregation rune that queries the entity registry and renders a filtered, sorted, grouped view of work items and bugs. This is the first Phase 2 rune in the plan package — it requires the cross-page pipeline and entity registration (WORK-020) to function.

The backlog rune is also the rendering primitive used by the milestone auto-backlog feature (WORK-025).

Attributes

NameTypeDefaultDescription
filterStringFilter expression: field:value pairs (e.g., status:ready priority:high)
sortStringprioritySort order: priority, status, id, assignee, complexity, milestone
groupStringGroup items by: status, priority, assignee, milestone, type, tags
showStringallEntity types to include: all, work, bug

Filter Syntax

Space-separated field:value pairs. Multiple values for the same field act as OR. Different fields act as AND.

{% backlog filter="status:ready priority:high" /%}
{% backlog filter="milestone:v0.5.0" sort="priority" group="status" /%}
{% backlog filter="assignee:bjorn status:in-progress" /%}
{% backlog filter="tags:tint" show="work" /%}

Card Layout

Each entity renders as a compact summary card showing id, status badge, priority badge, complexity dots, title, milestone, and checklist progress (if available).

Acceptance Criteria

  • Rune schema in runes/plan/src/tags/backlog.ts with filter/sort/group/show attributes
  • Filter parser handles field:value syntax with AND/OR semantics
  • aggregate() pipeline hook queries entity registry for work and bug entities
  • Results sorted by specified field
  • Results grouped into sections when group specified
  • Summary card rendering with BEM classes (rf-backlog, rf-backlog__card, etc.)
  • Engine config in runes/plan/src/config.ts
  • CSS in packages/lumina/styles/runes/backlog.css
  • Tests for filter parsing, sorting, grouping, and card rendering
  • Type definition in runes/plan/src/types.ts
  • Exported from runes/plan/src/index.ts

Dependencies

  • WORK-020 (entity registration) must be complete first
  • Uses PackagePipelineHooks.aggregate() from @refrakt-md/types