Zum Hauptinhalt springen

Resource anchor integrity (fragments and routing paths resolve)

Generated from pattern-library/registry.json — do not edit by hand; change the registry and run bun run patterns:build.

Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.

Category: Docs & Agent Experience · Tier: light · Maturity: proven (verified 2026-10-10 @ 91f61a76-dirty) · Risk: low — build-time only

Every #fragment a registry doc ref names must be a heading the page renders, checked through the renderer's own slugger, and every path an agent instruction file routes to must exist — a narrow, build-time slice of W3C-style resource anchoring.

When to use: Use when docs, registries or agent context files deep-link into headings or route agents to repo paths that refactors can move.

Avoid when

  • Links are generated from the same source as their targets — they cannot drift

Docs

Code

  • src/lib/docs/heading-anchors.server.ts (GitHub · GitLab)
  • pattern-library/validate.ts — Fragment check in checkRef (GitHub · GitLab)

Tests


Machine-readable record: resource-anchor-integrity in pattern-library/registry.json.

← Back to Pattern Library

Geht dieses Pattern noch besser? Sag uns, wie.

Feedback geben