• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WebMEM™

The Protocol for Structuring, Delivering, and Conditioning Trust-Scored AI Memory on the Open Web

  • Primer
  • Memory-First
  • Protocols
    • SDT Specification
    • WebMEM SemanticMap
    • WebMEM MapPointer
    • Digest Endpoint Specification
    • ProvenanceMeta Specification
    • AI Retrieval Feedback Loop Specification
    • Semantic Feedback Interface (SFI) Specification
    • Glossary Term Protocol (GTP) Specification
    • Examples
  • RFC
  • Glossary
  • About
    • WebMEM License
    • Mission
    • Charter

SDT Fragment Header Mapping

Part of the WebMEM Protocol
Location: /specification/sdt/yaml-in-html/header/
Last Updated: 2025-07-28


Overview

The SDT Fragment Header is a required YAML block placed at the top of every YAML-in-HTML memory fragment. It declares the class, scope, entity, glossary alignment, and digest grouping that govern how the fragment is retrieved, cited, and trusted.

These header values must be mirrored in the outer <template> tag’s data-* attributes to enable AI discoverability, DOM scanning, and export tooling.


Canonical YAML Header Fields

Field Required Description
data-sdt-class ✅ Fragment type (e.g., DataFragment)
entity ✅ Real-world subject of the fragment (e.g., plan:H5521-290-0)
digest ✅ Digest collection ID this fragment belongs to
glossary_scope ⚠️ Recommended Term namespace for glossary alignment
fragment_scope ✅ Semantic publishing scope (e.g., semantic-digest)

Canonical HTML Attribute Equivalents

These data-* attributes must appear on the outer <template> tag and match their YAML equivalents exactly.

Attribute YAML Equivalent Required Purpose
data-sdt-class data-sdt-class: ✅ Fragment type
data-entity entity: ✅ Entity identifier
data-digest digest: ✅ Digest ID
data-glossary-scope glossary_scope: ⚠️ Glossary alignment context
data-fragment-scope fragment_scope: ✅ Publishing or memory layer
data-type="text/yaml" — ✅ Format declaration for YAML parsing
data-visibility-fragment — ✅ Declares the fragment as AI-visible

Example: YAML Fragment Header

data-sdt-class: DataFragment
entity: plan:H5521-290-0
digest: 2025-cms-ma-mapd-plan
glossary_scope: cms_landscape
fragment_scope: semantic-digest

Example: Equivalent HTML Fragment

<template
  id="fragment-h5521-290-0-primary-care"
  data-visibility-fragment
  data-type="text/yaml"
  data-sdt-class="DataFragment"
  data-entity="plan:H5521-290-0"
  data-digest="2025-cms-ma-mapd-plan"
  data-glossary-scope="cms_landscape"
  data-fragment-scope="semantic-digest">

Implementation Rule

If data-* attributes are provided on the <template> tag, they must exactly match the values in the YAML Fragment Header.

The outer tag assists with detection. The YAML header governs memory alignment, glossary resolution, and trust scoring.


Learn More

  • Fragment Classes
  • Attributes Reference
  • ProvenanceMeta Block
  • Semantic Data Atoms

Primary Sidebar

YAML-in-HTML SDT

  1. Semantic Data Templates (SDT) Specification
  2. YAML-in-HTML Embedding
  3. Anatomy of a Semantic DataFragment
  4. SDT Fragment Header Mapping
  5. Field Inheritance Across Fragments (inherits_from)
  6. Cross-Fragment Indexing (related_fragments)
  7. ProvenanceMeta Best Practices
  8. SDT YAML-in-HTML: HTML Container Attributes
  9. Semantic Data Atoms: Fields Block Specification
  10. Fragment Relationships and Referencing
  11. Semantic Data Template (SDT) Fragment Classes Overview
    1. DataFragment
    2. DerivedStatsFragment
    3. IndexFragment
    4. DefinedTermFragment
    5. FAQFragment
    6. MetaFragment
    7. ExplainerFragment
    8. DirectoryFragment
    9. EligibilityFragment
    10. ProcedureFragment
    11. GlossaryFragment
    12. PersonaFragment
    13. PolicyFragment
    14. RecommendationFragment

Copyright © 2026 · David Bynon · Log in