After #20089 (PR #20097) excluded the 19,436 raw GitHub archive routes (tickets, pull-requests, discussions) from the default sitemap.xml and llms.txt (469 core URLs vs 19,905 total; 40 KB vs 1.6 MB), two downstream consumer and observability requirements need a segmented Sitemap Index and tiered llms-*.txt hierarchy:
Middleware prerender route source + Search Console per-child coverage (sitemap.xml): While every ticket page sidebar already links the archive for crawler discovery (neomjs/middleware-v2#35 / #36), neomjs/middleware-v2's BuildService#fetchDynamicRoutes derives its prerender route set from sitemap.xml. Turning sitemap.xml into a <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> over sitemap-core.xml (469 core URLs) and sitemap-archive.xml (19,436 archive URLs) preserves the full 19,905 route set for middleware-v2 (once neomjs/middleware-v2#40 expands <sitemapindex>) while giving per-child coverage reporting in Google Search Console.
Tiered LLM context consumption (llms.txt vs llms-full.txt vs llms-all.txt): Following the llmstxt.org specification and the Map vs. World Atlas paradigm (ADR 0007), AI coding assistants need:
llms.txt (~40 KB Map): Curated index of core documentation, blog posts, release notes, and examples, with an ## Optional section pointing to deeper tiers.
llms-full.txt (~1.67 MB / ~427k tokens Core Documentation Atlas): Concatenated full Markdown prose of all 124 leaf guides in learn/tree.json (143 nodes minus 19 parent folders) in a single file for 1M-token context-window ingestion without N+1 fetches.
llms-all.txt (~1.26 MB Exhaustive Archive Index): Complete route index including all 19,436 ticket, PR, and discussion /raw/ links for deep forensic lookup.
Distribution copy list (buildScripts/docs/seo/copy.mjs):SEO_FILES only copies ['robots.txt', 'llms.txt', 'sitemap.xml'] into dist/{development,esm,production}/apps/portal/, omitting the segmented sitemaps and tiered llms-*.txt files.
Intended Outcome
buildScripts/docs/seo/generate.mjs:
Support onlyArchives filtering so getSitemapXml can emit either the core <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> (includeArchives: false) or the archive-only <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> (onlyArchives: true, containing tickets, pull-requests, and discussions).
Export getSitemapIndexXml({ baseUrl, sitemaps }) emitting a valid <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> referencing sitemap-core.xml and sitemap-archive.xml (with their newest <lastmod> when available).
Export getLlmsFullTxt({ baseUrl, basePath }) that walks the 124 leaf learn/tree.json guide routes and concatenates their Markdown content with canonical source URL headers.
Include a standard ## Optional section in the curated getLlmsTxt({ includeArchives: false }) output linking to llms-full.txt and llms-all.txt.
Root element changes from <urlset> to <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. Deploy order:neomjs/middleware-v2#40 MUST be deployed before any neomjs/pages deploy ships a neomjs/neo build with #20102 (pre-#40 middleware matches only <url> blocks and would silently resolve 0 routes).
sitemap-core.xml & sitemap-archive.xml
getSitemapXml (includeArchives: false / onlyArchives: true) via rebuildContentIndexesAndSeo.mjs
llms.txt (~40 KB curated Map) includes ## Optional pointing to llms-full.txt (124 leaf guides, ~1.67 MB / ~427k tokens) and llms-all.txt (19,904 links, ~1.26 MB).
Acceptance Criteria
getSitemapXml supports onlyArchives: true (emitting only tickets, pull-requests, and discussions routes) and includeArchives: false (emitting only core routes) using the standard http://www.sitemaps.org/schemas/sitemap/0.9 XML namespace.
getSitemapIndexXml emits a valid <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> pointing to sitemap-core.xml and sitemap-archive.xml, deriving each child entry's <lastmod> from the newest <lastmod> in that child <urlset> when present.
getLlmsTxt({ includeArchives: false }) includes an ## Optional section linking to llms-full.txt and llms-all.txt.
getLlmsFullTxt concatenates the Markdown prose of all 124 leaf learn/tree.json guides with # [Title](url) headers.
rebuildContentIndexesAndSeo writes sitemap.xml, sitemap-core.xml, sitemap-archive.xml, llms.txt, llms-full.txt, and llms-all.txt, and buildScripts/docs/seo/copy.mjs includes all 7 SEO/LLM files in SEO_FILES.
Unit tests in test/playwright/unit/buildScripts/docs/seo/Generate.spec.mjs and test/playwright/unit/buildScripts/docs/RebuildContentIndexesAndSeo.spec.mjs verify the segmented sitemaps, sitemap index, llms-full.txt, llms-all.txt, and rebuild pipeline.
tobiu referenced in commit a882c8b - "feat(seo): segment sitemap into core/archive index and emit llms-full.txt and llms-all.txt (#20101) (#20102) on Oct 25, 2026, 2:25 AM
Problem
After
#20089(PR #20097) excluded the19,436raw GitHub archive routes (tickets,pull-requests,discussions) from the defaultsitemap.xmlandllms.txt(469core URLs vs19,905total;40 KBvs1.6 MB), two downstream consumer and observability requirements need a segmented Sitemap Index and tieredllms-*.txthierarchy:sitemap.xml): While every ticket page sidebar already links the archive for crawler discovery (neomjs/middleware-v2#35/#36),neomjs/middleware-v2'sBuildService#fetchDynamicRoutesderives its prerender route set fromsitemap.xml. Turningsitemap.xmlinto a<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">oversitemap-core.xml(469core URLs) andsitemap-archive.xml(19,436archive URLs) preserves the full19,905route set formiddleware-v2(onceneomjs/middleware-v2#40expands<sitemapindex>) while giving per-child coverage reporting in Google Search Console.llms.txtvsllms-full.txtvsllms-all.txt): Following thellmstxt.orgspecification and the Map vs. World Atlas paradigm (ADR 0007), AI coding assistants need:llms.txt(~40 KB Map): Curated index of core documentation, blog posts, release notes, and examples, with an## Optionalsection pointing to deeper tiers.llms-full.txt(~1.67 MB / ~427k tokens Core Documentation Atlas): Concatenated full Markdown prose of all124leaf guides inlearn/tree.json(143nodes minus19parent folders) in a single file for 1M-token context-window ingestion without N+1 fetches.llms-all.txt(~1.26 MB Exhaustive Archive Index): Complete route index including all19,436ticket, PR, and discussion/raw/links for deep forensic lookup.buildScripts/docs/seo/copy.mjs):SEO_FILESonly copies['robots.txt', 'llms.txt', 'sitemap.xml']intodist/{development,esm,production}/apps/portal/, omitting the segmented sitemaps and tieredllms-*.txtfiles.Intended Outcome
buildScripts/docs/seo/generate.mjs:onlyArchivesfiltering sogetSitemapXmlcan emit either the core<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">(includeArchives: false) or the archive-only<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">(onlyArchives: true, containingtickets,pull-requests, anddiscussions).getSitemapIndexXml({ baseUrl, sitemaps })emitting a valid<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">referencingsitemap-core.xmlandsitemap-archive.xml(with their newest<lastmod>when available).getLlmsFullTxt({ baseUrl, basePath })that walks the124leaflearn/tree.jsonguide routes and concatenates their Markdown content with canonical source URL headers.## Optionalsection in the curatedgetLlmsTxt({ includeArchives: false })output linking tollms-full.txtandllms-all.txt.buildScripts/docs/rebuildContentIndexesAndSeo.mjs:sitemap.xml(index),sitemap-core.xml,sitemap-archive.xml,llms.txt,llms-full.txt, andllms-all.txtunderapps/portal/.buildScripts/docs/seo/copy.mjs:robots.txt,llms.txt,llms-full.txt,llms-all.txt,sitemap.xml,sitemap-core.xml, andsitemap-archive.xmlintodist/*/apps/portal/.Contract Ledger
sitemap.xmlgetSitemapIndexXml(buildScripts/docs/seo/generate.mjs) viarebuildContentIndexesAndSeo.mjsneomjs/middleware-v2BuildService#fetchDynamicRoutes(neomjs/middleware-v2#40)2.
neomjs/pagesbuildScripts/enhanceSeo.mjs(neomjs/pages#54)3. Search engine crawlers via
robots.txt<urlset>to<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. Deploy order:neomjs/middleware-v2#40MUST be deployed before anyneomjs/pagesdeploy ships aneomjs/neobuild with#20102(pre-#40middleware matches only<url>blocks and would silently resolve0routes).sitemap-core.xml&sitemap-archive.xmlgetSitemapXml(includeArchives: false/onlyArchives: true) viarebuildContentIndexesAndSeo.mjssitemap.xml<sitemapindex>2.
neomjs/middleware-v2#40child-sitemap fetcher3.
neomjs/pages#54enhanceSeo.mjs(OPTIONAL_SEO_FILES)<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">documents (469core URLs insitemap-core.xml;19,436archive URLs insitemap-archive.xml).llms.txt,llms-full.txt,llms-all.txtgetLlmsTxt&getLlmsFullTxtviarebuildContentIndexesAndSeo.mjsneomjs/pages#54enhanceSeo.mjs2. LLM/agent consumers (
llmstxt.orgdiscovery)3.
/raw/markdown middleware (neomjs/middleware-v2#41tracks/raw/coverage for learn/PR/discussion links)llms.txt(~40 KB curated Map) includes## Optionalpointing tollms-full.txt(124leaf guides, ~1.67 MB / ~427k tokens) andllms-all.txt(19,904links, ~1.26 MB).Acceptance Criteria
getSitemapXmlsupportsonlyArchives: true(emitting onlytickets,pull-requests, anddiscussionsroutes) andincludeArchives: false(emitting only core routes) using the standardhttp://www.sitemaps.org/schemas/sitemap/0.9XML namespace.getSitemapIndexXmlemits a valid<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">pointing tositemap-core.xmlandsitemap-archive.xml, deriving each child entry's<lastmod>from the newest<lastmod>in that child<urlset>when present.getLlmsTxt({ includeArchives: false })includes an## Optionalsection linking tollms-full.txtandllms-all.txt.getLlmsFullTxtconcatenates the Markdown prose of all124leaflearn/tree.jsonguides with# [Title](url)headers.rebuildContentIndexesAndSeowritessitemap.xml,sitemap-core.xml,sitemap-archive.xml,llms.txt,llms-full.txt, andllms-all.txt, andbuildScripts/docs/seo/copy.mjsincludes all 7 SEO/LLM files inSEO_FILES.test/playwright/unit/buildScripts/docs/seo/Generate.spec.mjsandtest/playwright/unit/buildScripts/docs/RebuildContentIndexesAndSeo.spec.mjsverify the segmented sitemaps, sitemap index,llms-full.txt,llms-all.txt, and rebuild pipeline.