Skip to content

feat(AGENTCOM-466): switch commerce enrichment mapper to semantic HTML#1435

Open
Comet300 wants to merge 1 commit intomainfrom
AGENTCOM-466-hast-enrichment
Open

feat(AGENTCOM-466): switch commerce enrichment mapper to semantic HTML#1435
Comet300 wants to merge 1 commit intomainfrom
AGENTCOM-466-hast-enrichment

Conversation

@Comet300
Copy link
Contributor

Summary

  • Replaces JSON passthrough (script tag in <head>) with semantic HTML as HAST appended to <body>, targeting AI bots only
  • CAS enrichment JSON is transformed into structured HTML: strings → <p>, arrays → <ul>/<li>, objects → key-value lists
  • Ordered fields rendered first with priority fallbacks (category path, description, features, variants), remaining fields in document order
  • Internal fields (rationale) excluded, sku used only as data-sku attribute

Context

Adobe Store POC confirmed HTML block in body as the highest performing variant (visibility 49% → 100%, citations 0 → 1 per prompt). Approach confirmed with @DRudolph and supported by dejan.ai research on Google grounding snippets.

Test plan

  • All existing tests updated for new HAST output format
  • New tests added for all field types (strings, arrays, objects, category paths, empty values, null values, ordered field priority)
  • 608 tests passing, 0 failing
  • 100% code coverage
  • Simulation validated against all 35 real enrichment suggestions from test site

…L output

Transform CAS enrichment JSON into semantic HTML (as HAST) appended to
body targeting AI bots, replacing the previous JSON passthrough in a
script tag in head.

Ordered fields rendered first with priority fallbacks (category path,
description, features, variants), remaining fields in document order.
Strings map to <p>, arrays to <ul>/<li>, objects to key-value lists.
Internal fields like rationale are excluded, sku used as data attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant