Skip to content

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

Merged
Comet300 merged 1 commit intomainfrom
AGENTCOM-466-hast-enrichment
Mar 19, 2026
Merged

feat(AGENTCOM-466): switch commerce enrichment mapper to semantic HTML#1435
Comet300 merged 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.
@Comet300 Comet300 merged commit 05a8fd9 into main Mar 19, 2026
7 checks passed
@Comet300 Comet300 deleted the AGENTCOM-466-hast-enrichment branch March 19, 2026 08:34
solaris007 pushed a commit that referenced this pull request Mar 19, 2026
## [@adobe/spacecat-shared-tokowaka-client-v1.12.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.11.2...@adobe/spacecat-shared-tokowaka-client-v1.12.0) (2026-03-19)

### Features

* **AGENTCOM-466:** switch commerce enrichment mapper to semantic HTML ([#1435](#1435)) ([05a8fd9](05a8fd9))
@solaris007
Copy link
Member

🎉 This PR is included in version @adobe/spacecat-shared-tokowaka-client-v1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants