Parent epic: #20671 (Search engines and agents find and classify neomjs.com, Engine 14 Cornerstone 4 in ROADMAP.md).
Operator direction (2026-11-14, Option 2): apps/portal/resources/data/seo.json was originally small (~10 top-level routes) when Portal.service.Seo (apps/portal/service/Seo.mjs) was written for the client-side Portal SPA. Following #20688, #20700, #20727, #20915, #20917, and #20919, seo.json now indexes every /learn/* guide, /news/blog/* post, /news/releases/* note, /examples/* family, and pre-baked lastmod date (61.4 KB on dev, 74 KB on #20931, and growing linearly with content), while neomjs/middleware-v2 (SsrService#buildHeadInjection, #20700) already serves route-specific <title>, <meta name="description">, <link rel="canonical">, og:*, and data-schema-name="neo-route" JSON-LD directly from node_modules/neo.mjs/apps/portal/resources/data/seo.json for crawlers and agent HTTP fetches.
Ownership disposition: self-assigned maintainer lane per operator alignment (good first issue / help wanted omitted because this change touches cross-build asset exclusion, CI test-scope classification, and open #20671 Portal SEO stack coordination).
The Problem
Unnecessary eager payload on every client SPA boot (apps/portal/service/Seo.mjs:126-138):
A human visitor opening a single hash route in the multi-window Portal SPA downloads and parses the entire seo.json corpus (61 KB+ and growing) during Seo#initAsync().
Search crawlers (Googlebot, LLM bots) never navigate #/... hash routes and only parse SSR HTML snapshots produced by neomjs/middleware-v2, making client-side <meta name="description">, <link rel="canonical">, og:*, and data-schema-name="neo-route"ld+json mutations (Seo.mjs:170-204) pure main-thread DOM churn over worker IPC.
buildScripts/webpack/development/webpack.config.appworker.mjs:42, buildScripts/webpack/production/webpack.config.appworker.mjs:50-60, and buildScripts/build/esmodules.mjs:68-70 copy and re-minify apps/portal/resources/data/seo.json into dist/{development,production,esm}/apps/portal/resources/data/, even though no browser consumer needs it once Portal.service.Seo stops fetching it.
CI E2E false-positive fan-out (.github/workflows/classify-test-scope.yml:423-451):
classify-test-scope.yml:424 explicitly keeps seo.json inside the 14-shard E2E trigger set ('seo.json' loads on every route, mirrored in WorkflowScopeClassifier.spec.mjs:956), causing content/SEO index updates to boot all 14 browser E2E shards.
The Architectural Reality
Design authority:#20671 Intended solution shape §1 ("every canonical Portal route on neomjs.com ... serves route-specific SSR metadata, structured schema, and clean semantic HTML") + operator architectural ruling (2026-11-14: drop seo.json from the non-SSR client SPA while retaining it in source/npm for Node SSR/SSG consumers).
Server/SSG consumers (neomjs/middleware-v2, neomjs/pages, buildScripts/docs/seo/*):neomjs/middleware-v2 reads node_modules/neo.mjs/apps/portal/resources/data/seo.json (src/service/SsrService.mjs:67, src/build.mjs:82), and buildScripts/docs/rebuildContentIndexesAndSeo.mjs / generate.mjs / verify.mjs read and write apps/portal/resources/data/seo.json directly. Keeping apps/portal/resources/data/seo.json in git and the published npm package preserves every SSR/SSG consumer untouched.
Client SPA human UX (apps/portal/service/Seo.mjs, DocumentHead#setTitle): Human browsers and detached multi-window Portal tabs only use document.title (DocumentHead.setTitle({value, windowId})). Top-level sections, /news/* tabs, and /examples/* family routes are a tiny fixed set (~20 entries, < 1 KB), while deep leaf controllers (learn/MainContainerController.mjs, news/blog/MainContainerController.mjs, news/release/MainContainerController.mjs) already hold the active leaf record (record.name / record.id) in memory from their own tree stores.
Single-definition dist/* asset boundary (buildScripts/util/distAppAssets.mjs): Both webpack app-worker configs and buildScripts/build/esmodules.mjs already share distAppAssets.mjs so browser build inclusion/exclusion rules cannot drift across dist/development, dist/production, and dist/esm.
E2E spec coupling (test/playwright/e2e/portal/ConnectNL.spec.mjs:34-36 & VideosNL.spec.mjs:54): Both specs assert route-specific document.title ('Connect with Neo.mjs' and 'Neo.mjs Videos'), while ConnectNL.spec.mjs:35-36 previously asserted client-side <meta name="description"> mutation and must now verify that apps/portal/index.html's static shell <meta name="description"> remains intact on client navigation.
The Fix
Make Portal.service.Seo zero-fetch and title-only (apps/portal/service/Seo.mjs + leaf controllers):
Remove initAsync()'s fetch(Neo.config.basePath + 'apps/portal/resources/data/seo.json'), #metadata, #lastRoute, afterSetIsReady, and crawler-only DocumentHead.update payload construction (canonicalUrl, description, ldJson, og:*).
Provide synchronous getTitle(route) over the static top-level, /news/*, and /examples/* route map with parent-segment fallback, plus onRouteChanged({hashString, hash, windowId}) and setRouteTitle({route, title, windowId}) calling DocumentHead.setTitle({value: title, windowId}) guarded by a per-windowId active-route map so late async store loads cannot overwrite a newer route's title.
Wire learn/MainContainerController.mjs, news/blog/MainContainerController.mjs, and news/release/MainContainerController.mjs to refine the window title from the selected leaf record (${record.name} - Neo.mjs / Neo.mjs v${record.id} Release Notes).
Exclude server-only Portal SEO JSON files from browser dist/* builds (buildScripts/util/distAppAssets.mjs, buildScripts/util/copyFolder.mjs, webpack.config.appworker.mjs, buildScripts/build/esmodules.mjs):
Define DIST_EXCLUDED_APP_RESOURCES (apps/portal/resources/data/seo.json, apps/portal/resources/data/ssg-archive-routes.json) + isExcludedDistResource / excludedResourcesFor in buildScripts/util/distAppAssets.mjs.
Add -x, --exclude <value> support to buildScripts/util/copyFolder.mjs (skipping excluded paths on copy and removing stale copies in the target folder), wire both webpack appworker configs to pass excludedResourcesFor(resourcesPath), and gate buildScripts/build/esmodules.mjsminifyDirectory on !isExcludedDistResource(normalizedInput).
Update .github/workflows/classify-test-scope.yml so server-only Portal data (seo.json, ssg-archive-routes.json) alongside blog.json no longer triggers the 14-shard E2E tier, backed by an executable reachability tripwire in WorkflowScopeClassifier.spec.mjs verifying no apps/portal/**/*.mjs or E2E spec references seo.json or ssg-archive-routes.json.
Update Seo.spec.mjs, distAppAssets.spec.mjs, and ConnectNL.spec.mjs.
Retained in git & npm package; excluded from dist/{development,production,esm}
Missing seo.json in dist/* never queried by browser
JSDoc in distAppAssets.mjs
distAppAssets.spec.mjs, verify.mjs
.github/workflows/classify-test-scope.yml
WorkflowScopeClassifier.spec.mjs:956,1027
apps/portal/resources/data/{seo.json,ssg-archive-routes.json} excluded from run_e2e while still running unit verification
Reachability tripwire fails unit CI if browser/E2E code ever references seo.json
Inline rule block in classify-test-scope.yml
WorkflowScopeClassifier.spec.mjs
Decision Record impact: aligned-with adr:0007 (Map vs. World Atlas) and aligned-with adr:0018 (preserves apps/portal/index.html static shell head untouched).
Acceptance Criteria
Portal.service.Seo makes zero fetch() requests on startup or route navigation, updates only DocumentHead.setTitle({value, windowId}) (preserving multi-window windowId isolation and ignoring stale async leaf updates after route transitions), and leaves <meta name="description">, <link rel="canonical">, og:*, and data-schema-name="neo-organism" JSON-LD untouched in the client SPA.
Deep leaf navigation in Learn, Blog, and Releases updates document.title from the active tree record without fetching seo.json, while top-level, /news/*, and /examples/* routes resolve their section titles synchronously ('Connect with Neo.mjs', 'Neo.mjs Videos', etc.).
apps/portal/resources/data/seo.json remains intact for buildScripts/docs/seo/*, neomjs/pages, and neomjs/middleware-v2, while distAppAssets.mjs, copyFolder.mjs, both webpack.config.appworker.mjs configs, and buildScripts/build/esmodules.mjs exclude seo.json and ssg-archive-routes.json from dist/{development,production,esm}.
.github/workflows/classify-test-scope.yml excludes apps/portal/resources/data/{seo.json,ssg-archive-routes.json} from run_e2e, guarded by an executable reachability tripwire in WorkflowScopeClassifier.spec.mjs.
node buildScripts/docs/seo/verify.mjs, Seo.spec.mjs, distAppAssets.spec.mjs, WorkflowScopeClassifier.spec.mjs, ConnectNL.spec.mjs, and VideosNL.spec.mjs pass.
Out of Scope
Modifying Neo.main.addon.DocumentHead (src/main/addon/DocumentHead.mjs), which remains a general-purpose engine addon for Neo.mjs applications.
Changing how neomjs/middleware-v2 (SsrService.mjs) or buildScripts/docs/seo/* generate and consume apps/portal/resources/data/seo.json.
Avoided Traps
Option 1 — Splitting seo.json into 170+ per-route JSON files: Adds file-tree/build churn and per-navigation XHR waterfall latency solely to mutate crawler tags that no crawler ever reads on #/... hash routes.
Option 3 — Serving per-route metadata from a neomjs.com middleware endpoint to the SPA: Couples local npm run server-start and offline/self-hosted builds to production neomjs.com AJAX calls (or CORS/404 fallbacks) for crawler-only tags.
Deleting apps/portal/resources/data/seo.json from the repository or npm package: Breaks neomjs/middleware-v2 (node_modules/neo.mjs/apps/portal/resources/data/seo.json) and neomjs/pages (rebuildContentIndexesAndSeo.mjs).
Live latest-open + closed sweep: checked latest 30 open issues in neomjs/neo (#20943 down) + closed search (seo.json, read Out of Scope and Avoided Traps on #20688 and #20700) at 2026-11-14T14:41Z; no open duplicate or conflicting exclusion found (#20700 moved crawler <head> authority into middleware-v2, enabling this client-SPA removal). Backlog: 50 open, orange band (10 existing subs on parent #20671; linked as child leaf).
A2A in-flight claim sweep: checked latest 30 messages across all read-states at 2026-11-14T14:41Z; no competing claim on Portal.service.Seo or seo.json.
MC sweep: query_raw_memories on "seo.json Portal SPA eager fetch all routes client performance non-SSR", 5 results (65203744, e462389a, aad115b0), aligned with SSR-only crawler indexing decision.
Own-assignment sweep: 3 open in neomjs/neo (#20671, #20917, #20919), bodies read; orthogonal to #20917/#20919seo.json content updates (note: #20931 touches Seo.mjs only if rebased; clean against dev).
Structure map: N/A (Engine/Portal repository; zero new .mjs files created).
Context
Parent epic: #20671 (Search engines and agents find and classify neomjs.com, Engine 14 Cornerstone 4 in
ROADMAP.md).Operator direction (
2026-11-14, Option 2):apps/portal/resources/data/seo.jsonwas originally small (~10 top-level routes) whenPortal.service.Seo(apps/portal/service/Seo.mjs) was written for the client-side Portal SPA. Following#20688,#20700,#20727,#20915,#20917, and#20919,seo.jsonnow indexes every/learn/*guide,/news/blog/*post,/news/releases/*note,/examples/*family, and pre-bakedlastmoddate (61.4 KBondev,74 KBon#20931, and growing linearly with content), whileneomjs/middleware-v2(SsrService#buildHeadInjection,#20700) already serves route-specific<title>,<meta name="description">,<link rel="canonical">,og:*, anddata-schema-name="neo-route"JSON-LD directly fromnode_modules/neo.mjs/apps/portal/resources/data/seo.jsonfor crawlers and agent HTTP fetches.Ownership disposition: self-assigned maintainer lane per operator alignment (
good first issue/help wantedomitted because this change touches cross-build asset exclusion, CI test-scope classification, and open#20671Portal SEO stack coordination).The Problem
apps/portal/service/Seo.mjs:126-138):seo.jsoncorpus (61 KB+and growing) duringSeo#initAsync().Googlebot, LLM bots) never navigate#/...hash routes and only parse SSR HTML snapshots produced byneomjs/middleware-v2, making client-side<meta name="description">,<link rel="canonical">,og:*, anddata-schema-name="neo-route"ld+jsonmutations (Seo.mjs:170-204) pure main-thread DOM churn over worker IPC.dist/*copies (webpack+dist/esm):buildScripts/webpack/development/webpack.config.appworker.mjs:42,buildScripts/webpack/production/webpack.config.appworker.mjs:50-60, andbuildScripts/build/esmodules.mjs:68-70copy and re-minifyapps/portal/resources/data/seo.jsonintodist/{development,production,esm}/apps/portal/resources/data/, even though no browser consumer needs it oncePortal.service.Seostops fetching it..github/workflows/classify-test-scope.yml:423-451):classify-test-scope.yml:424explicitly keepsseo.jsoninside the 14-shard E2E trigger set ('seo.json' loads on every route, mirrored inWorkflowScopeClassifier.spec.mjs:956), causing content/SEO index updates to boot all 14 browser E2E shards.The Architectural Reality
Design authority:#20671 Intended solution shape §1 ("every canonical Portal route on neomjs.com ... serves route-specific SSR metadata, structured schema, and clean semantic HTML") + operator architectural ruling (2026-11-14: dropseo.jsonfrom the non-SSR client SPA while retaining it in source/npm for Node SSR/SSG consumers).neomjs/middleware-v2,neomjs/pages,buildScripts/docs/seo/*):neomjs/middleware-v2readsnode_modules/neo.mjs/apps/portal/resources/data/seo.json(src/service/SsrService.mjs:67,src/build.mjs:82), andbuildScripts/docs/rebuildContentIndexesAndSeo.mjs/generate.mjs/verify.mjsread and writeapps/portal/resources/data/seo.jsondirectly. Keepingapps/portal/resources/data/seo.jsonin git and the published npm package preserves every SSR/SSG consumer untouched.apps/portal/service/Seo.mjs,DocumentHead#setTitle): Human browsers and detached multi-window Portal tabs only usedocument.title(DocumentHead.setTitle({value, windowId})). Top-level sections,/news/*tabs, and/examples/*family routes are a tiny fixed set (~20 entries,< 1 KB), while deep leaf controllers (learn/MainContainerController.mjs,news/blog/MainContainerController.mjs,news/release/MainContainerController.mjs) already hold the active leafrecord(record.name/record.id) in memory from their own tree stores.dist/*asset boundary (buildScripts/util/distAppAssets.mjs): Both webpack app-worker configs andbuildScripts/build/esmodules.mjsalready sharedistAppAssets.mjsso browser build inclusion/exclusion rules cannot drift acrossdist/development,dist/production, anddist/esm.test/playwright/e2e/portal/ConnectNL.spec.mjs:34-36&VideosNL.spec.mjs:54): Both specs assert route-specificdocument.title('Connect with Neo.mjs'and'Neo.mjs Videos'), whileConnectNL.spec.mjs:35-36previously asserted client-side<meta name="description">mutation and must now verify thatapps/portal/index.html's static shell<meta name="description">remains intact on client navigation.The Fix
Portal.service.Seozero-fetch and title-only (apps/portal/service/Seo.mjs+ leaf controllers):initAsync()'sfetch(Neo.config.basePath + 'apps/portal/resources/data/seo.json'),#metadata,#lastRoute,afterSetIsReady, and crawler-onlyDocumentHead.updatepayload construction (canonicalUrl,description,ldJson,og:*).getTitle(route)over the static top-level,/news/*, and/examples/*route map with parent-segment fallback, plusonRouteChanged({hashString, hash, windowId})andsetRouteTitle({route, title, windowId})callingDocumentHead.setTitle({value: title, windowId})guarded by a per-windowIdactive-route map so late async store loads cannot overwrite a newer route's title.learn/MainContainerController.mjs,news/blog/MainContainerController.mjs, andnews/release/MainContainerController.mjsto refine the window title from the selected leaf record (${record.name} - Neo.mjs/Neo.mjs v${record.id} Release Notes).dist/*builds (buildScripts/util/distAppAssets.mjs,buildScripts/util/copyFolder.mjs,webpack.config.appworker.mjs,buildScripts/build/esmodules.mjs):DIST_EXCLUDED_APP_RESOURCES(apps/portal/resources/data/seo.json,apps/portal/resources/data/ssg-archive-routes.json) +isExcludedDistResource/excludedResourcesForinbuildScripts/util/distAppAssets.mjs.-x, --exclude <value>support tobuildScripts/util/copyFolder.mjs(skipping excluded paths on copy and removing stale copies in the target folder), wire both webpackappworkerconfigs to passexcludedResourcesFor(resourcesPath), and gatebuildScripts/build/esmodules.mjsminifyDirectoryon!isExcludedDistResource(normalizedInput)..github/workflows/classify-test-scope.yml,WorkflowScopeClassifier.spec.mjs,distAppAssets.spec.mjs,Seo.spec.mjs,ConnectNL.spec.mjs):.github/workflows/classify-test-scope.ymlso server-only Portal data (seo.json,ssg-archive-routes.json) alongsideblog.jsonno longer triggers the 14-shard E2E tier, backed by an executable reachability tripwire inWorkflowScopeClassifier.spec.mjsverifying noapps/portal/**/*.mjsor E2E spec referencesseo.jsonorssg-archive-routes.json.Seo.spec.mjs,distAppAssets.spec.mjs, andConnectNL.spec.mjs.Contract Ledger Matrix
Portal.service.Seo(apps/portal/service/Seo.mjs)apps/portal/view/ViewportController.mjs:239,#20671getTitle(route),onRouteChanged, andsetRouteTitleupdating onlyDocumentHead.setTitle({value, windowId})'/news/tickets/123'->'Neo.mjs Tickets')@summaryonPortal.service.SeoSeo.spec.mjs,ConnectNL.spec.mjs,VideosNL.spec.mjsapps/portal/resources/data/seo.jsonpackaging vsdist/*buildScripts/util/distAppAssets.mjs,neomjs/middleware-v2SsrService.mjs:67dist/{development,production,esm}seo.jsonindist/*never queried by browserdistAppAssets.mjsdistAppAssets.spec.mjs,verify.mjs.github/workflows/classify-test-scope.ymlWorkflowScopeClassifier.spec.mjs:956,1027apps/portal/resources/data/{seo.json,ssg-archive-routes.json}excluded fromrun_e2ewhile still running unit verificationseo.jsonclassify-test-scope.ymlWorkflowScopeClassifier.spec.mjsDecision Record impact:
aligned-with adr:0007(Map vs. World Atlas) andaligned-with adr:0018(preservesapps/portal/index.htmlstatic shell head untouched).Acceptance Criteria
Portal.service.Seomakes zerofetch()requests on startup or route navigation, updates onlyDocumentHead.setTitle({value, windowId})(preserving multi-windowwindowIdisolation and ignoring stale async leaf updates after route transitions), and leaves<meta name="description">,<link rel="canonical">,og:*, anddata-schema-name="neo-organism"JSON-LD untouched in the client SPA.document.titlefrom the active tree record without fetchingseo.json, while top-level,/news/*, and/examples/*routes resolve their section titles synchronously ('Connect with Neo.mjs','Neo.mjs Videos', etc.).apps/portal/resources/data/seo.jsonremains intact forbuildScripts/docs/seo/*,neomjs/pages, andneomjs/middleware-v2, whiledistAppAssets.mjs,copyFolder.mjs, bothwebpack.config.appworker.mjsconfigs, andbuildScripts/build/esmodules.mjsexcludeseo.jsonandssg-archive-routes.jsonfromdist/{development,production,esm}..github/workflows/classify-test-scope.ymlexcludesapps/portal/resources/data/{seo.json,ssg-archive-routes.json}fromrun_e2e, guarded by an executable reachability tripwire inWorkflowScopeClassifier.spec.mjs.node buildScripts/docs/seo/verify.mjs,Seo.spec.mjs,distAppAssets.spec.mjs,WorkflowScopeClassifier.spec.mjs,ConnectNL.spec.mjs, andVideosNL.spec.mjspass.Out of Scope
Neo.main.addon.DocumentHead(src/main/addon/DocumentHead.mjs), which remains a general-purpose engine addon for Neo.mjs applications.neomjs/middleware-v2(SsrService.mjs) orbuildScripts/docs/seo/*generate and consumeapps/portal/resources/data/seo.json.Avoided Traps
seo.jsoninto 170+ per-route JSON files: Adds file-tree/build churn and per-navigation XHR waterfall latency solely to mutate crawler tags that no crawler ever reads on#/...hash routes.neomjs.commiddleware endpoint to the SPA: Couples localnpm run server-startand offline/self-hosted builds to productionneomjs.comAJAX calls (or CORS/404 fallbacks) for crawler-only tags.apps/portal/resources/data/seo.jsonfrom the repository or npm package: Breaksneomjs/middleware-v2(node_modules/neo.mjs/apps/portal/resources/data/seo.json) andneomjs/pages(rebuildContentIndexesAndSeo.mjs).Related
Parent: #20671 · Related: #20688, #20700, #20915, #20917 (PR #20929), #20919 (PR #20931)
Live latest-open + closed sweep: checked latest 30 open issues in
neomjs/neo(#20943down) + closed search (seo.json, readOut of ScopeandAvoided Trapson#20688and#20700) at 2026-11-14T14:41Z; no open duplicate or conflicting exclusion found (#20700moved crawler<head>authority intomiddleware-v2, enabling this client-SPA removal). Backlog: 50 open, orange band (10existing subs on parent#20671; linked as child leaf). A2A in-flight claim sweep: checked latest 30 messages across all read-states at 2026-11-14T14:41Z; no competing claim onPortal.service.Seoorseo.json. MC sweep:query_raw_memorieson"seo.json Portal SPA eager fetch all routes client performance non-SSR", 5 results (65203744,e462389a,aad115b0), aligned with SSR-only crawler indexing decision. Own-assignment sweep: 3 open inneomjs/neo(#20671,#20917,#20919), bodies read; orthogonal to#20917/#20919seo.jsoncontent updates (note:#20931touchesSeo.mjsonly if rebased; clean againstdev). Structure map: N/A (Engine/Portal repository; zero new.mjsfiles created).Origin Session ID: 2f084437-cc03-4b7b-aace-a27bff4aa3f9 Retrieval Hint: "Portal.service.Seo drop client seo.json fetch distAppAssets classify-test-scope Option 2 #20671"