SOM-first websites

SOM is usually something agents generate by compiling a web page.

A SOM-first website goes one step further. It is built so that:

  1. The HTML and DOM compile into a high-signal SOM with minimal noise
  2. Optionally, the site publishes SOM as an official alternate representation

This page is a best-practices guide for site owners and a checklist for Plasmate Labs properties.


Goals


Level 1: Make your DOM SOM-friendly

This is the most important step. If the HTML is semantic and stable, Plasmate can compile it into a great SOM.

Semantic structure

Real interactive elements

Labels and accessibility

Server-side rendering for primary content

Stability

Reduce noise


Level 2: Publish SOM as an alternate representation

This is optional, but powerful. A site can publish a canonical SOM JSON file so agents do not need to render or compile.

A. A well-known SOM URL

Publish a SOM JSON representation at:

This is easy to host on static sites.

Add an alternate link in your HTML:

<link
  rel="alternate"
  type="application/som+json"
  href="/.well-known/som.json"
  title="SOM"
/>

If you control HTTP headers, you can also send:

Link: </.well-known/som.json>; rel="alternate"; type="application/som+json"; title="SOM"

C. Content negotiation

If you run an application server, you can support a dedicated endpoint, for example:

This is more complex but can be made fully automatic.


How to generate a SOM file

If you own the site, you can generate the SOM using Plasmate and publish it as a static file.

Example:

plasmate fetch https://example.com > som.json
# publish som.json at /.well-known/som.json

Checklist for Plasmate Labs properties

All Plasmate Labs properties should aim to:

If a property cannot publish SOM yet, it should at least meet the Level 1 DOM guidelines.