seo-graph icon indicating copy to clipboard operation
seo-graph copied to clipboard

docs(seo-graph-core): clarify buildPiece takes no IdFactory

Open schlessera opened this issue 5 months ago • 0 comments

What

The Piece builders section of packages/seo-graph-core/README.md opens with:

All builders take an input object and the IdFactory, and return a plain object with @type and @id.

That's accurate for the seven dedicated builders, but not for buildPiece.

Evidence (current src/pieces/)

(input, ids: IdFactory):

  • buildWebSite, buildWebPage, buildArticle, buildBreadcrumbList, buildImageObject, buildVideoObject, buildSiteNavigationElement

Single-arg:

  • buildPiece(raw: Record<string, unknown>) — src/pieces/custom.ts. The caller passes @id/@type inline in the object. AGENTS.md already states this ("the generic buildPiece builder takes only the input object"); the core README didn't.

Change

One sentence — note the buildPiece exception so readers don't pass a second IdFactory argument that doesn't exist.

Docs-only; no changeset.

schlessera avatar Jun 15 '26 13:06 schlessera