Context
Owned directly by @neo-gemini-julia under #20671 ahead of the Engine 14 cut (#21033 / #21775), so contributor labels (good first issue, help wanted) are omitted.
Inspecting apps/portal/sitemap.xml and the SEO generator pipeline in buildScripts/docs/seo/*.mjs plus buildScripts/release/prepare.mjs surfaced two coupled defects on dev:
- 2.24 MB (
79,215 lines) of orphaned generated Portal crawler bloat is still tracked in neomjs/neo:
apps/portal/sitemap.xml (78,772 lines, 2.2 MB) is a frozen 2026-08-30 (7ecd6b8b6e) <urlset> monolith advertising /home and 19k+ raw ticket/PR routes, whereas the real deployed https://neomjs.com/sitemap.xml is an 11-line (369 B) <sitemapindex> referencing sitemap-core.xml and sitemap-discussions.xml.
apps/portal/llms.txt (443 lines, 36 KB) carries a broken - [v13.4.0 (2026-11-09): Update](...) placeholder at line 33 that violates validateLlmsTxtContent (buildScripts/docs/seo/verify.mjs:380).
- Eight recent PRs (
#20931, #20994, #21003, #21182, #21278, #21362, #21435, #21495) hand-edited apps/portal/sitemap.xml or apps/portal/llms.txt assuming they were live, while neomjs/pages (buildScripts/updateNeoVersion.mjs:236-245) regenerates sitemap*.xml and llms*.txt from --corpus-root at deploy time and .npmignore:17-18 excludes both from the npm tarball.
node buildScripts/docs/seo/verify.mjs currently fails on dev, and buildScripts/release/prepare.mjs leaves seo.json stale across releases: Error: apps/portal/resources/data/seo.json is out of date with getSeoJson(). Run: node buildScripts/docs/seo/generate.mjs -f seo-json -o apps/portal/resources/data/seo.json
at runCli (buildScripts/docs/seo/verify.mjs:870:19)
apps/portal/resources/data/seo.json on dev holds 380 routes vs 392 expected — missing 12 standalone Engine 14 example routes (/examples/board/{bigData,cardEditor,columns,multiSelect}/index.html, /examples/gantt/{dependencies,taskColumns,taskEditor}/index.html, /examples/scheduler/{eventEditor,liveUpdates,resourceColumns,timeZones,zoom}/index.html) and carrying 45 stale lastmod / v14.0.0 release-note entries.
The Problem
- When
#19322 (7ff8467baa) removed resources/content/ and data-sync-pipeline.yml from neomjs/neo, and #19408 (4658fbfa00) removed rebuildContentIndexesAndSeo() from buildScripts/release/prepare.mjs:108-111 (because sitemap*.xml and llms*.txt require --corpus-root), neither PR deleted the orphaned apps/portal/sitemap.xml and apps/portal/llms.txt files or added them to .gitignore, and .npmignore:14-18 kept a false comment claiming "Tracked so the deployment can serve them... Regenerated by the release prepare step".
- Unlike
sitemap*.xml and llms*.txt, getSeoJson() (buildScripts/docs/seo/seoJson.mjs:819) requires zero --corpus-root (learn/, apps/, examples/, and .github/RELEASE_NOTES all live in neomjs/neo) — and must run inside neomjs/neo where .git history exists! When neomjs/pages runs rebuildContentIndexesAndSeo.mjs inside node_modules/neo.mjs, hasReliableGitHistory() (gitLastmod.mjs:40) is false, so getSeoJson() and getSitemapXml() depend on the pre-baked lastmod dates shipped inside apps/portal/resources/data/seo.json. Skipping getSeoJson() in buildScripts/release/prepare.mjs leaves new routes without <lastmod> in sitemap-core.xml and ships stale v14.0.0 metadata at release time.
verify.mjs (runCli, lines 850–938) validates sitemapIndexXml and llmsTxt only in memory, never failing when stale apps/portal/sitemap*.xml or apps/portal/llms*.txt artifacts are left on disk in the corpus-less Engine checkout.
The Architectural Reality
Design authority: learn/agentos/decisions/0018-neo-identity-source-of-truth-model.md §3.2 ("Generate — the surface is fully emitted from source (e.g. llms.txt/sitemap.xml from generate.mjs); fix the generator, never the output") and buildScripts/release/prepare.mjs:3-7 ("rebuilds the Portal indexes whose sources the engine holds").
- Remove vs. update decision on
apps/portal/sitemap.xml and apps/portal/llms.txt: Remove (git rm) + .gitignore, not update. In neomjs/neo, --corpus-root does not exist, so a valid sitemap-discussions.xml or llms-all.txt cannot be built here, sitemap.xml's child <loc>https://neomjs.com/sitemap-discussions.xml</loc> has no sibling in apps/portal/, zero runtime or test modules read apps/portal/sitemap.xml or apps/portal/llms.txt, .npmignore already excluded both from npm, and neomjs/pages (buildScripts/updateNeoVersion.mjs:236-245) regenerates all 7 SEO/LLM files from pinned github-content-sync before npm run build-all (copy.mjs).
.gitignore + .npmignore interaction (buildScripts/util/npmIgnoreComposition.mjs:11-18): Once apps/portal/sitemap.xml and apps/portal/llms.txt are untracked (git rm) and /apps/portal/sitemap*.xml + /apps/portal/llms*.txt live in .gitignore, .gitignore still matches zero tracked files (checkPackageContents.spec.mjs invariant) and prepack composes those ignore rules into .npmignore automatically for dirty working trees, allowing the stale 6-line block in .npmignore:13-18 to be deleted cleanly.
apps/portal/resources/data/{tickets,pulls,discussions} remain untouched: Unlike sitemap.xml and llms.txt, Portal stores (apps/portal/store/Discussions.mjs:23, etc.) read those JSON indexes during local development (#19408).
The Fix
- Delete orphaned Portal crawler files & ignore generated outputs in
neomjs/neo:
git rm apps/portal/sitemap.xml apps/portal/llms.txt.
- Add
/apps/portal/sitemap*.xml and /apps/portal/llms*.txt to .gitignore.
- Remove the obsolete comment and
/apps/portal/sitemap.xml + /apps/portal/llms.txt header entries from .npmignore:13-18, and update the explanatory comment in test/playwright/unit/buildScripts/checkPackageContents.spec.mjs:170-174.
- Sync
seo.json and run fail-closed verification in buildScripts/release/prepare.mjs:
- After
await createReleaseIndex({releaseNotesRoot: getEngineReleaseNotesRoot(root)}) in buildScripts/release/prepare.mjs, regenerate and write apps/portal/resources/data/seo.json via getSeoJson({releaseNotesRoot: getEngineReleaseNotesRoot(root), root}) so release cuts (#21775) pre-bake accurate git lastmod dates and stamped release-note metadata before npm publish.
- Fail closed on stray Engine-side
sitemap*.xml / llms*.txt files in buildScripts/docs/seo/verify.mjs:
- Export a helper (e.g.
findDisallowedCorpusLessPortalFiles(root)) invoked by verify.mjs runCli when --corpus-root is not passed, throwing an actionable Error if any apps/portal/sitemap*.xml or apps/portal/llms*.txt file exists on disk in the Engine checkout.
- Regenerate
apps/portal/resources/data/seo.json (392 routes) so node buildScripts/docs/seo/verify.mjs passes green on dev.
- Add unit test coverage in
test/playwright/unit/buildScripts/docs/seo/Verify.spec.mjs.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
apps/portal/sitemap.xml & apps/portal/llms.txt (neomjs/neo) |
buildScripts/release/prepare.mjs:108-110, neomjs/pages updateNeoVersion.mjs:236-245 |
Removed via git rm; /apps/portal/sitemap*.xml and /apps/portal/llms*.txt ignored in .gitignore; obsolete .npmignore:13-18 lines removed |
neomjs/pages generates all sitemap*.xml and llms*.txt from --corpus-root at deploy time |
.gitignore comment + checkPackageContents.spec.mjs |
npm run check-package-contents + checkPackageContents.spec.mjs |
buildScripts/release/prepare.mjs |
buildScripts/release/prepare.mjs:108-112 |
Writes refreshed apps/portal/resources/data/seo.json via getSeoJson() alongside createReleaseIndex() and createLabelIndex() |
Preserves existing lastmod when .git is shallow/absent (seoJson.mjs:870) |
JSDoc header & inline comment in prepare.mjs |
node buildScripts/docs/seo/verify.mjs |
buildScripts/docs/seo/verify.mjs (findDisallowedCorpusLessPortalFiles + runCli) |
buildScripts/docs/seo/verify.mjs:837-939 |
Throws fail-closed when --corpus-root is omitted and apps/portal/sitemap*.xml or apps/portal/llms*.txt exist on disk |
Skipped when explicit --corpus-root is passed (neomjs/pages deploy) |
JSDoc (@summary) |
Verify.spec.mjs + node buildScripts/docs/seo/verify.mjs |
Decision Record impact: aligned-with adr:0018-neo-identity-source-of-truth-model
Acceptance Criteria
Out of Scope
- Splitting
examples.json / example-captures.json / seo.json per example family to eliminate cross-PR merge conflicts (tracked in #21539).
- Removing
apps/portal/resources/data/{tickets,pulls,discussions}, which local-dev Portal stores still fetch (#19408).
neomjs/pages and Google Search Console sitemap console cleanup (business#82).
Avoided Traps
- Keeping and regenerating a partial
apps/portal/sitemap.xml inside neomjs/neo: sitemap.xml is a <sitemapindex> referencing sitemap-discussions.xml, which cannot be built without --corpus-root, and neomjs/pages overwrites apps/portal/sitemap*.xml from pinned github-content-sync on every deploy anyway — keeping any tracked sitemap.xml in neomjs/neo only recreates stale merge-conflict bloat.
- Leaving
/apps/portal/sitemap.xml in .npmignore after adding /apps/portal/sitemap*.xml to .gitignore: npmIgnoreComposition.mjs drops .gitignore rules owned by .npmignore headers; removing the header entries once untracked keeps one authoritative ignore rule in .gitignore.
Related
- Parent Epic: #20671
- Release Cut Consumers:
#21033, #21775
- Adjacent Catalog Split Ticket:
#21539
- Historical Predecessors:
#19322, #19408, #20089, #20774 (revises #20774 Out of Scope item 1, which assumed data-sync-pipeline.yml and publish.mjs still regenerated these files)
Live latest-open + closed sweep: checked latest 25 open (#21271–#21806, 57 open total — red band; filed as focused pre-cut bug leaf under #20671, 17 existing subs) + open and closed search (sitemap.xml OR llms.txt OR seo.json OR rebuildContentIndexesAndSeo, Out of Scope / Avoided Traps read on #21539, #21775, #20774) at 2026-11-21T18:37Z; no equivalent open ticket or blocking exclusion (#21775 explicitly scopes #20671 SEO map out of the release commit, and #20774's Out of Scope rested on the pre-#19322/#19408 pipeline assumption).
A2A sweep: list_messages({status: 'all', projection: 'compact', limit: 30}) checked at 2026-11-21T18:38Z (newest MESSAGE:ccc1373f at 18:34:22Z); zero overlapping [lane-claim] or [lane-intent].
MC sweep: "apps/portal/sitemap.xml apps/portal/llms.txt gitignore prepare.mjs seo.json out of date" (10 results) + ask_knowledge_base (type: 'ticket'), no prior exclusion found.
Own-assignment sweep: 3 open (#21676, #20987, parent epic #20671), none overlapping.
Origin Session ID: 664ca229-4bbd-4e00-ae41-008707688181
Retrieval Hint: "apps/portal/sitemap.xml 78772 lines orphaned bloat llms.txt prepare.mjs getSeoJson verify.mjs"
Context
Owned directly by
@neo-gemini-juliaunder#20671ahead of the Engine 14 cut (#21033/#21775), so contributor labels (good first issue,help wanted) are omitted.Inspecting
apps/portal/sitemap.xmland the SEO generator pipeline inbuildScripts/docs/seo/*.mjsplusbuildScripts/release/prepare.mjssurfaced two coupled defects ondev:79,215lines) of orphaned generated Portal crawler bloat is still tracked inneomjs/neo:apps/portal/sitemap.xml(78,772lines,2.2 MB) is a frozen2026-08-30(7ecd6b8b6e)<urlset>monolith advertising/homeand19k+raw ticket/PR routes, whereas the real deployedhttps://neomjs.com/sitemap.xmlis an11-line (369 B)<sitemapindex>referencingsitemap-core.xmlandsitemap-discussions.xml.apps/portal/llms.txt(443lines,36 KB) carries a broken- [v13.4.0 (2026-11-09): Update](...)placeholder at line 33 that violatesvalidateLlmsTxtContent(buildScripts/docs/seo/verify.mjs:380).#20931,#20994,#21003,#21182,#21278,#21362,#21435,#21495) hand-editedapps/portal/sitemap.xmlorapps/portal/llms.txtassuming they were live, whileneomjs/pages(buildScripts/updateNeoVersion.mjs:236-245) regeneratessitemap*.xmlandllms*.txtfrom--corpus-rootat deploy time and.npmignore:17-18excludes both from the npm tarball.node buildScripts/docs/seo/verify.mjscurrently fails ondev, andbuildScripts/release/prepare.mjsleavesseo.jsonstale across releases:Error: apps/portal/resources/data/seo.json is out of date with getSeoJson(). Run: node buildScripts/docs/seo/generate.mjs -f seo-json -o apps/portal/resources/data/seo.json at runCli (buildScripts/docs/seo/verify.mjs:870:19)apps/portal/resources/data/seo.jsonondevholds380routes vs392expected — missing12standalone Engine 14 example routes (/examples/board/{bigData,cardEditor,columns,multiSelect}/index.html,/examples/gantt/{dependencies,taskColumns,taskEditor}/index.html,/examples/scheduler/{eventEditor,liveUpdates,resourceColumns,timeZones,zoom}/index.html) and carrying45stalelastmod/v14.0.0release-note entries.The Problem
#19322(7ff8467baa) removedresources/content/anddata-sync-pipeline.ymlfromneomjs/neo, and#19408(4658fbfa00) removedrebuildContentIndexesAndSeo()frombuildScripts/release/prepare.mjs:108-111(becausesitemap*.xmlandllms*.txtrequire--corpus-root), neither PR deleted the orphanedapps/portal/sitemap.xmlandapps/portal/llms.txtfiles or added them to.gitignore, and.npmignore:14-18kept a false comment claiming "Tracked so the deployment can serve them... Regenerated by the release prepare step".sitemap*.xmlandllms*.txt,getSeoJson()(buildScripts/docs/seo/seoJson.mjs:819) requires zero--corpus-root(learn/,apps/,examples/, and.github/RELEASE_NOTESall live inneomjs/neo) — and must run insideneomjs/neowhere.githistory exists! Whenneomjs/pagesrunsrebuildContentIndexesAndSeo.mjsinsidenode_modules/neo.mjs,hasReliableGitHistory()(gitLastmod.mjs:40) isfalse, sogetSeoJson()andgetSitemapXml()depend on the pre-bakedlastmoddates shipped insideapps/portal/resources/data/seo.json. SkippinggetSeoJson()inbuildScripts/release/prepare.mjsleaves new routes without<lastmod>insitemap-core.xmland ships stalev14.0.0metadata at release time.verify.mjs(runCli, lines 850–938) validatessitemapIndexXmlandllmsTxtonly in memory, never failing when staleapps/portal/sitemap*.xmlorapps/portal/llms*.txtartifacts are left on disk in the corpus-less Engine checkout.The Architectural Reality
Design authority:
learn/agentos/decisions/0018-neo-identity-source-of-truth-model.md§3.2 ("Generate — the surface is fully emitted from source (e.g.llms.txt/sitemap.xmlfromgenerate.mjs); fix the generator, never the output") andbuildScripts/release/prepare.mjs:3-7("rebuilds the Portal indexes whose sources the engine holds").apps/portal/sitemap.xmlandapps/portal/llms.txt: Remove (git rm) +.gitignore, not update. Inneomjs/neo,--corpus-rootdoes not exist, so a validsitemap-discussions.xmlorllms-all.txtcannot be built here,sitemap.xml's child<loc>https://neomjs.com/sitemap-discussions.xml</loc>has no sibling inapps/portal/, zero runtime or test modules readapps/portal/sitemap.xmlorapps/portal/llms.txt,.npmignorealready excluded both from npm, andneomjs/pages(buildScripts/updateNeoVersion.mjs:236-245) regenerates all 7 SEO/LLM files from pinnedgithub-content-syncbeforenpm run build-all(copy.mjs)..gitignore+.npmignoreinteraction (buildScripts/util/npmIgnoreComposition.mjs:11-18): Onceapps/portal/sitemap.xmlandapps/portal/llms.txtare untracked (git rm) and/apps/portal/sitemap*.xml+/apps/portal/llms*.txtlive in.gitignore,.gitignorestill matches zero tracked files (checkPackageContents.spec.mjsinvariant) andprepackcomposes those ignore rules into.npmignoreautomatically for dirty working trees, allowing the stale 6-line block in.npmignore:13-18to be deleted cleanly.apps/portal/resources/data/{tickets,pulls,discussions}remain untouched: Unlikesitemap.xmlandllms.txt, Portal stores (apps/portal/store/Discussions.mjs:23, etc.) read those JSON indexes during local development (#19408).The Fix
neomjs/neo:git rm apps/portal/sitemap.xml apps/portal/llms.txt./apps/portal/sitemap*.xmland/apps/portal/llms*.txtto.gitignore./apps/portal/sitemap.xml+/apps/portal/llms.txtheader entries from.npmignore:13-18, and update the explanatory comment intest/playwright/unit/buildScripts/checkPackageContents.spec.mjs:170-174.seo.jsonand run fail-closed verification inbuildScripts/release/prepare.mjs:await createReleaseIndex({releaseNotesRoot: getEngineReleaseNotesRoot(root)})inbuildScripts/release/prepare.mjs, regenerate and writeapps/portal/resources/data/seo.jsonviagetSeoJson({releaseNotesRoot: getEngineReleaseNotesRoot(root), root})so release cuts (#21775) pre-bake accurate gitlastmoddates and stamped release-note metadata beforenpm publish.sitemap*.xml/llms*.txtfiles inbuildScripts/docs/seo/verify.mjs:findDisallowedCorpusLessPortalFiles(root)) invoked byverify.mjsrunCliwhen--corpus-rootis not passed, throwing an actionableErrorif anyapps/portal/sitemap*.xmlorapps/portal/llms*.txtfile exists on disk in the Engine checkout.apps/portal/resources/data/seo.json(392routes) sonode buildScripts/docs/seo/verify.mjspasses green ondev.test/playwright/unit/buildScripts/docs/seo/Verify.spec.mjs.Contract Ledger Matrix
apps/portal/sitemap.xml&apps/portal/llms.txt(neomjs/neo)buildScripts/release/prepare.mjs:108-110,neomjs/pagesupdateNeoVersion.mjs:236-245git rm;/apps/portal/sitemap*.xmland/apps/portal/llms*.txtignored in.gitignore; obsolete.npmignore:13-18lines removedneomjs/pagesgenerates allsitemap*.xmlandllms*.txtfrom--corpus-rootat deploy time.gitignorecomment +checkPackageContents.spec.mjsnpm run check-package-contents+checkPackageContents.spec.mjsbuildScripts/release/prepare.mjsbuildScripts/release/prepare.mjs:108-112apps/portal/resources/data/seo.jsonviagetSeoJson()alongsidecreateReleaseIndex()andcreateLabelIndex()lastmodwhen.gitis shallow/absent (seoJson.mjs:870)prepare.mjsnode buildScripts/docs/seo/verify.mjsbuildScripts/docs/seo/verify.mjs(findDisallowedCorpusLessPortalFiles+runCli)buildScripts/docs/seo/verify.mjs:837-939--corpus-rootis omitted andapps/portal/sitemap*.xmlorapps/portal/llms*.txtexist on disk--corpus-rootis passed (neomjs/pagesdeploy)@summary)Verify.spec.mjs+node buildScripts/docs/seo/verify.mjsDecision Record impact:
aligned-with adr:0018-neo-identity-source-of-truth-modelAcceptance Criteria
apps/portal/sitemap.xml(78,772lines) andapps/portal/llms.txt(443lines) are removed from git tracking,/apps/portal/sitemap*.xmland/apps/portal/llms*.txtare added to.gitignore,.npmignore:13-18removes the obsolete rules/comment, andnpm run check-package-contentspluscheckPackageContents.spec.mjspass.buildScripts/release/prepare.mjsregeneratesapps/portal/resources/data/seo.jsonviagetSeoJson()using the Engine'sreleaseNotesRoot, andapps/portal/resources/data/seo.jsonondevis refreshed (392routes, including all12missingboard/gantt/schedulerstandalone routes).buildScripts/docs/seo/verify.mjsfails closed in corpus-less mode when anyapps/portal/sitemap*.xmlorapps/portal/llms*.txtfile exists on disk,node buildScripts/docs/seo/verify.mjsexits0ondev, andVerify.spec.mjscovers both clean and stray-file cases.Out of Scope
examples.json/example-captures.json/seo.jsonper example family to eliminate cross-PR merge conflicts (tracked in#21539).apps/portal/resources/data/{tickets,pulls,discussions}, which local-dev Portal stores still fetch (#19408).neomjs/pagesand Google Search Console sitemap console cleanup (business#82).Avoided Traps
apps/portal/sitemap.xmlinsideneomjs/neo:sitemap.xmlis a<sitemapindex>referencingsitemap-discussions.xml, which cannot be built without--corpus-root, andneomjs/pagesoverwritesapps/portal/sitemap*.xmlfrom pinnedgithub-content-syncon every deploy anyway — keeping any trackedsitemap.xmlinneomjs/neoonly recreates stale merge-conflict bloat./apps/portal/sitemap.xmlin.npmignoreafter adding/apps/portal/sitemap*.xmlto.gitignore:npmIgnoreComposition.mjsdrops.gitignorerules owned by.npmignoreheaders; removing the header entries once untracked keeps one authoritative ignore rule in.gitignore.Related
#21033,#21775#21539#19322,#19408,#20089,#20774(revises#20774Out of Scopeitem 1, which assumeddata-sync-pipeline.ymlandpublish.mjsstill regenerated these files)Live latest-open + closed sweep: checked latest 25 open (
#21271–#21806,57open total — red band; filed as focused pre-cut bug leaf under#20671,17existing subs) + open and closed search (sitemap.xml OR llms.txt OR seo.json OR rebuildContentIndexesAndSeo,Out of Scope/Avoided Trapsread on#21539,#21775,#20774) at2026-11-21T18:37Z; no equivalent open ticket or blocking exclusion (#21775explicitly scopes#20671SEO map out of the release commit, and#20774'sOut of Scoperested on the pre-#19322/#19408pipeline assumption). A2A sweep:list_messages({status: 'all', projection: 'compact', limit: 30})checked at2026-11-21T18:38Z(newestMESSAGE:ccc1373fat18:34:22Z); zero overlapping[lane-claim]or[lane-intent]. MC sweep:"apps/portal/sitemap.xml apps/portal/llms.txt gitignore prepare.mjs seo.json out of date"(10results) +ask_knowledge_base(type: 'ticket'), no prior exclusion found. Own-assignment sweep:3open (#21676,#20987, parent epic#20671), none overlapping.Origin Session ID: 664ca229-4bbd-4e00-ae41-008707688181 Retrieval Hint: "apps/portal/sitemap.xml 78772 lines orphaned bloat llms.txt prepare.mjs getSeoJson verify.mjs"