WORK-259
Setting up your dashboard 0 entities found · 9/32 branches scanned
ID:WORK-259Status:ready

Generic data-outline-scope walkers (TOC isolation + heading-ID namespacing)

Two generic walkers that consume the data-outline-scope attribute as a neutral "this subtree is a sub-outline boundary" marker. Expand sets the attribute (WORK-260); the TOC walker and heading-ID walker honor it. Any future rune (sidenote, aside, quote, panel) can adopt the same convention and get the same behavior automatically.

These walkers are extracted from the cross-cutting concern they really are: they don't know about expand specifically and shouldn't.

Priority:mediumComplexity:simpleMilestone:v0.15.0Source:SPEC-066
claude/modal-drawer-pattern-a1Wgb View source

Criteria completion

Criteria completion: 0 of 7 (0%) checked; tracking started on May 23, no incremental history yet0%25%50%75%100%May 23Jun 15

Tracking started May 23 — check back for trends.

Branches 2
claude/modal-drawer-pattern-a1Wgb current ready
main doneclaude/v0.15.0 done
History 1
  1. c15804e
    Created (ready)by bjornolofandersson

Acceptance Criteria

  • TOC walker (used by {% toc %} and similar tooling) skips headings descended from any element with data-outline-scope set, regardless of which rune set it
  • Heading-ID walker prefixes IDs of headings inside any data-outline-scope subtree with {scope-value}-- (e.g., SPEC-023--acceptance-criteria)
  • Heading IDs use the standard slugifier for the suffix portion; the prefix is the literal value of the nearest enclosing data-outline-scope attribute
  • Both walkers are generic — they know nothing about expand or any specific rune
  • When data-outline-scope is not present (the default for normal content), behavior is unchanged from today
  • Tests cover: TOC skipping inside scoped subtrees; heading-ID prefixing; nested-scope behavior (innermost scope wins); absence of attribute = no-op
  • Authoring docs note the data-outline-scope convention as a primitive available to any rune that wants to be a sub-outline boundary

Approach

The TOC walker is the consumer side of an existing extraction; locate the heading-collection helper and add the data-outline-scope skip check.

The heading-ID walker is part of the existing heading-anchor-generation logic; add the scope-prefix lookup using the nearest enclosing ancestor's data-outline-scope value.

Both changes are small and intentionally generic — no expand-specific code.

Dependencies

  • None within v0.15.0. Independent prerequisite for WORK-260.

References

  • SPEC-066 — expand-rune spec (introduces and motivates the convention)
  • SPEC-060 — drawer rune (potential future opt-in for the same convention)