Changelog
Leadtype 0.3
Leadtype 0.3 adds browser-side WebMCP docs tools, plus config-driven RSS and Atom feed generation for changelogs, release notes, blogs, news, and any generated docs content selected by canonical URL prefix. It also hardens docs search for large corpora with prototype-safe indexing and linear query scaling, validated by a new benchmark against real TanStack-scale docs.
Browser WebMCP
- Added
leadtype/webmcpfor registering generated docs as browser-side WebMCP tools withdocument.modelContextornavigator.modelContext. - Added default
search-docsandget-pagetools over the generated search index and Markdown mirror, with bounded search limits, page-path validation, and default known-page checks. - Added React, Vue, and Svelte lifecycle helpers so host apps can register and clean up docs tools from framework-owned client entry points.
- Added
leadtype init --webmcpscaffolding for framework examples. - Documented the distinction between browser WebMCP and the server-side
leadtype/mcpendpoint.
Feeds
- Added a
feedsconfig field fordocs.config.tsandleadtype.config.ts. - Added
leadtype/feedwithgenerateFeedArtifacts(),renderRssFeed(), andrenderAtomFeed()for custom pipelines. - Added site-mode generation for configured feeds, with generated paths reported
in JSON output under
files.feeds.<id>. - Added RSS 2.0 and Atom output, including XML escaping, control-character stripping, stable Atom entry IDs, absolute canonical links, feed-level author metadata, and newest-first entry sorting.
- Added support for mounted changelog URLs such as
/changelog, so feed entries do not have to live under/docs.
Date handling
- Feed entries use stable frontmatter dates. Changelogs and release notes should
set an explicit
datebecause the publication date is part of the release record. - Pages where the feed should represent source edits can use Git-derived
lastModified;leadtype generatewrites it automatically when git metadata is available. - Generation fails when a selected feed page has no
dateorlastModifiedfrontmatter, so feed order does not churn based on CI-generated file mtimes. - The default docs lint schema now accepts optional
datefrontmatter, including YAML dates parsed asDatevalues.
CLI defaults and deprecations
leadtype generatenow enriches generated markdown with Git-derivedlastModifiedandlastAuthorby default. Enrichment is best-effort: missing.gitmetadata, shallow history, untracked files, or a missinggitbinary skip those fields without failing generation.- Git-derived
lastAuthornow skips bot and automation commits, falling back to the latest human author for the page while keepinglastModifiedtied to the latest commit. Projects can add repo-specific automation names withgit.ignoredAuthorsindocs.config.ts. - Package-mode MCP artifacts are inferred from
agents.mcp.enabledindocs.config.ts, soleadtype generate --bundleis enough for packages that configure MCP support. - Deprecated shortcut flags that duplicate config or defaults:
leadtype generate --mcp,leadtype generate --enrich-git, andleadtype init --webmcp. They still work for compatibility and print warnings; new docs and scripts should usedocs.config.tsor explicit app code instead.
Search reliability and scaling
- Fixed a crash when indexed content or a search query contains a term that
collides with an
Object.prototypemember, such asconstructor. The term postings record is now built with a null prototype and query-time lookups, including synonym expansion, useObject.hasOwnguards. Previously such a term crashed bothcreateDocsSearchIndexat build time andsearchDocsin the browser. - Made
searchDocslatency scale linearly with corpus size. Chunk lookups now use a cached map instead of a per-result linear scan, and excerpts are built only for results that survive the limit. Ranking is unchanged. On a 20,000-chunk corpus this cuts p95 query latency from roughly 665 ms to 186 ms; at the scale of the combined TanStack Router, Start, and Query docs (about 5,000 chunks), median queries run in about 13 ms. - Added a search scalability benchmark (
pipeline:search-benchin the TanStack example) that measures index build time, artifact sizes, parse cost, memory, and query latency across real and synthetically grown corpora.
Validation and safety
- Agent Skills discovery manifests now emit the v0.2.0 format: the
$schemaURL plus per-entrytype: "skill-md", a relativeurl, and asha256:hexdigest, so spec-conformant clients (such as Vercel'sskillstool) resolve every entry. The pre-0.2.0 leadtypepath/integrityfields are still emitted alongside for older consumers, and skill descriptions over the spec's 1024-character cap now fail generation instead of being silently dropped by clients. - Organization JSON-LD now supports
email,sameAs,contactPoint, andaddressfields fromdocs.config.ts, so hosted docs can publish direct email contact details, brand-disambiguation links, and Schema.orgContactPoint/PostalAddressdata. These objects are emitted verbatim into JSON-LD, so config validation rejects unknowncontactPoint/addresskeys (catching typos liketelphone) and emptyaddressobjects. - Feed generation requires
--base-urlor a deployment URL environment variable so RSS and Atom item links are absolute. - Search generation now treats
shared/and_shared/route segments as internal by default, so template content does not appear as duplicate public search results or answer citations unless a page explicitly setssearch: true. - Feed output paths must start with
/, end with.xml, resolve inside the output directory, and be unique across all configured feeds. - Pages with
draft: trueare excluded from feeds when that field reaches generated markdown. - Locale-prefixed generated pages are excluded from root feeds so localized mirrors do not duplicate entries.
Crawler artifacts
- Site-mode generation now writes
robots.txt,sitemap.xml, andsitemap.mdat the output root only. Nested/docssitemap and robots copies are no longer emitted because crawlers treat the origin-rootrobots.txtas the authoritative policy file.
Agent artifacts without a docs tree
- Added
generateAgentArtifacts()toleadtype/llmfor sites without.mdxdocs — CMS-backed blogs, marketing sites, and data-driven pages. It takes an in-memory page list and emits llms.txt (plus the/.well-knowncopy), per-page Markdown mirrors at${urlPath}.mdwithcanonical_urlandlast_updatedfrontmatter,sitemap.xml,sitemap.md,robots.txtwith Content-Signals, and a root-level agent-readability manifest. - Page inputs fall back from explicit fields to frontmatter inside
contentto the URL slug; duplicate, relative, and query-bearing routes fail loudly before anything is written. emitRootCrawlerFiles: falsesupports microfrontend fragments whose host app owns the origin-level crawler files and merges fragment manifests.- Root URL mounts (
urlPrefix: "/") now resolve correctly instead of emitting//pagepaths.
Docs reorganization
- The docs are now organized by capability: Docs Pipeline, AEO & Agent
Readability, Writing for Agents, Search & AI Answers, Package Docs, and
Integrations. Because navigation drives
llms.txtandsitemap.md, the new structure is also the agent-facing index. - Added an AEO overview page mapping every agent artifact to the Vercel agent-readability spec and the ora scoring rubric, with an audit workflow.
- Page URLs moved (
/docs/build/*and/docs/sources/*→/docs/pipeline|aeo|integrations/*,/docs/authoring/*→/docs/writing/*); leadtype.dev serves 301 redirects from every old path and its.mdmirror.
Dogfooding
- The Leadtype docs now publish
/changelog/rss.xmland/changelog/atom.xmlfrom the real changelog. - The Next.js, Astro, Nuxt, SvelteKit, and TanStack examples now generate the changelog feeds. Next.js, Nuxt, SvelteKit, and TanStack smoke-test the feed endpoints.
- The TanStack custom pipeline calls
generateFeedArtifacts()directly so the lower-level API stays covered outside the CLI. - Added a task-focused guide for feed setup, feed date policy, output validation, and verification steps.