seo-entity-linking
seo-entity-linking (M6)
Entity linkage tells search engines and AI systems which real-world thing a page is about and ties it to the Knowledge Graph. Reference: references/schema-tier1.md (the sameAs/@id/Person+Organization rules). This module owns the sameAs detail M5 defers here.
Inputs
Work from the PageSnapshot named in your dispatch envelope: read parsed from <run_dir>/pages/<slug>.json (jsonld[], anchors[]); Grep pages/<slug>.html for verbatim evidence; site artifacts live in <run_dir>/site/{robots.json,sitemaps.json,discovery.json}. Deterministic findings already emitted by audit.mjs are listed in <run_dir>/findings.deterministic.json — do not re-emit those ids; add model-judged findings only. If invoked directly with a URL/path and no snapshot exists, first run node "${CLAUDE_PLUGIN_ROOT}/scripts/snapshot.mjs" <target> --out "${CLAUDE_PLUGIN_DATA}/runs" and use the printed snapshot path.
Audits
Working from the PageSnapshot (parsed_rendered when render.used is not none, else parsed):
- sameAs identity links: for
Organization/Personentities, check forsameAs[]resolving to canonical identities — Wikidata QID, Wikipedia, LinkedIn, Crunchbase, official social/company profiles. Wikidata is the strongest Knowledge Graph target. - Primary entity defined: confirm exactly one clear primary entity per page (via
@id+mainEntity/mainEntityOfPage), not an ambiguous or missing subject. - Entity consistency (local): for
LocalBusiness, verify NAP (name, address, telephone) in schema matches visible on-page NAP and is internally consistent across blocks. - Entity density: count distinct linked/marked entities (
@idd nodes,sameAstargets,about/mentions) — flag thin pages with no resolvable entity references.
Fixes
- AUTO (
fixable: auto): inject asameAs[]array onOrganization/Personusing only user-confirmed URLs, and addabout/mentionsentity references to existing schema. Additive, deterministic diffs forfix. Never invent identity links — if a URL is unconfirmed, leave a clearly-markedTODOplaceholder the user fills. - PROPOSED (
fixable: proposed): a candidate Wikidata/LinkedIn match found by lookup — drafted for per-item human accept, never auto-written. - ADVISORY (
fixable: advisory): "establish a Wikidata entity / claim profiles" when none exist — guidance only, the tool writes nothing.