Context
D#19051 (graduated 2026-09-24) sets the gate for deleting the engine's resources/content (item 3): no runtime reader derives resources/content from projectRoot, cwd or __dirname, and the KB's literal-prefix source typing counts as a reader. The mirror froze on 2026-08-26. A reader that still derives it serves four-week-old data without saying so, and it will break when the tree is deleted, which the operator decided to do fully on 2026-09-23.
The Problem
The gate is a state, and nothing measures it. A plain mention count on origin/dev (2026-09-24) finds source files naming resources/content in:
neomjs/neo: about 30 source files: the portal models, four index generators, the retired data-sync pipeline and its watchdog, release scripts, workflows and build utilities. A 09-22 count across tracked files, including data, found 58.
neomjs/neo-agent-brain: about 30 files, among them the github-workflow contentRoot default (cwd-derived), SyncService, ConceptDiscoveryService, IssueIngestor, GoldenPathSynthesizer, the fleet activity read, and QueryService.mjs:841 / SearchService.mjs:326.
neomjs/middleware-v2: three readers, the content fetch, the SSR service and the SEO bucket build (reported on #17416 by @neo-opus-ada, 2026-09-24).
Mentions are not readers. Some are writers of the retired pipeline, some are build-time, some are comments, and some already take a declared root, such as #454's temporal summary. Only a classified census says which must move.
The Fix
Classify every mention, per repository, as runtime reader, build reader, writer or comment, and record each one's disposition: repoint to the corpus, repoint to a declared root, retire, or leave. Repointing uses the corpus's pinned-checkout shape from neomjs/pages#10 (contentPins.json) or an existing declared root. Add a guard in neo that fails when new code derives resources/content from projectRoot/cwd/__dirname. The repoint work itself is filed from the census as leaves under #17416.
Acceptance Criteria
Out of Scope
- The release notes: #19157, a sibling that must land before the deletion.
- The concepts (#19093).
- The deletion itself: its own leaf, blocked by this one.
- Repointing any single reader, which comes from the census leaves.
Related
#17416 (parent) · D#19051 (item 3) · #19157 · #19093 · neomjs/neo-agent-brain#443 / PR #454 (a reader moved already) · neomjs/middleware-v2#15 (single-source content, now answered by the corpus)
Live latest-open sweep: latest 20 open neomjs/neo issues at 2026-09-24T12:49Z, none equivalent. Org exact search (cutover gate resources/content, "resources/content" delete): none. MC sweep (6 results): the 09-22 consumer maps by @neo-fable-clio and @neo-fable; no prior decision on a guard. Own-assignment sweep: #17416 only. A2A in-flight: no claim.
unowned-rationale: filed by #17416's steward and open to any seat. The steward takes it if it is unclaimed once today's plane cut is done; the census needs only read access to the three repositories.
Origin Session ID: 9f7b8241-8b3c-4954-a9e5-2f9c1e41d669
Authored by Vega (Claude Opus 5.5, Claude Code) 🌿
Contract Ledger
A claimer-authored section by @neo-opus-grace, for #19167. Anchors are at 6ae62557cf.
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
CLI node buildScripts/util/check-content-root-derivations.mjs (NEO_INLINE_CODE_37) |
AC-2; D#19051 acknowledgment AC 2 |
Scans every tracked .mjs under SCAN_SURFACE, this module included. Exit 0 with an OK summary when live findings equal the baseline. Exit 1 listing each new path (file:line 'literal'), and/or each baselined row that is gone or reduced |
none: a failure blocks the commit or the PR |
the module JSDoc (NEO_INLINE_CODE_42) |
the Content Root Derivation Lint job; the real-tree arms on #19167 |
Detector findMirrorLiterals(source, file) (NEO_INLINE_CODE_45) |
AC-2 |
Records a path into resources/content where literals first form it: one string or template literal, consecutive literal call arguments joined with /, or consecutive literal operands of one + chain. Comments do not count. Paths assembled from non-literal values are out of reach, as stated in the JSDoc |
— |
the same JSDoc, What counts |
test/playwright/unit/buildScripts/checkContentRootDerivations.spec.mjs |
Baseline buildScripts/util/check-content-root-derivations-baseline.json |
AC-1 census (IC 5815306776) |
Rows are {file, literal, count}, sorted by file::literal (NEO_INLINE_CODE_53). It fails upward on an unlisted key or a live count above its row, and downward on a row whose live count falls, until the row is edited (NEO_INLINE_CODE_54) |
— |
JSDoc, Why a baseline |
the spec's ratchet arms; the real-tree up and down arms |
SCAN_SURFACE (NEO_INLINE_CODE_56) |
this module, as the SSOT; check-guard-ci-parity |
apps/**/*.mjs, buildScripts/**/*.mjs, src/**/*.mjs. The CI workflow's paths: must cover it |
— |
its JSDoc |
the Guard CI Parity job |
Triggers: lint-staged {apps,buildScripts,src}/**/*.mjs (NEO_INLINE_CODE_64); NEO_INLINE_CODE_65 |
the guard-CI parity rule |
The pre-commit hook runs on staged scanned files. CI runs on pull_request and push to dev touching those trees, the baseline or the workflow |
--no-verify skips the hook, but the CI mirror still runs |
the workflow's header |
#19167's CI run |
Context
D#19051 (graduated 2026-09-24) sets the gate for deleting the engine's
resources/content(item 3): no runtime reader derivesresources/contentfromprojectRoot,cwdor__dirname, and the KB's literal-prefix source typing counts as a reader. The mirror froze on 2026-08-26. A reader that still derives it serves four-week-old data without saying so, and it will break when the tree is deleted, which the operator decided to do fully on 2026-09-23.The Problem
The gate is a state, and nothing measures it. A plain mention count on
origin/dev(2026-09-24) finds source files namingresources/contentin:neomjs/neo: about 30 source files: the portal models, four index generators, the retired data-sync pipeline and its watchdog, release scripts, workflows and build utilities. A 09-22 count across tracked files, including data, found 58.neomjs/neo-agent-brain: about 30 files, among them the github-workflowcontentRootdefault (cwd-derived),SyncService,ConceptDiscoveryService,IssueIngestor,GoldenPathSynthesizer, the fleet activity read, andQueryService.mjs:841/SearchService.mjs:326.neomjs/middleware-v2: three readers, the content fetch, the SSR service and the SEO bucket build (reported on #17416 by @neo-opus-ada, 2026-09-24).Mentions are not readers. Some are writers of the retired pipeline, some are build-time, some are comments, and some already take a declared root, such as #454's temporal summary. Only a classified census says which must move.
The Fix
Classify every mention, per repository, as runtime reader, build reader, writer or comment, and record each one's disposition: repoint to the corpus, repoint to a declared root, retire, or leave. Repointing uses the corpus's pinned-checkout shape from neomjs/pages#10 (
contentPins.json) or an existing declared root. Add a guard inneothat fails when new code derivesresources/contentfromprojectRoot/cwd/__dirname. The repoint work itself is filed from the census as leaves under #17416.Acceptance Criteria
neo,neo-agent-brainandmiddleware-v2.neofails a newresources/contentderivation fromprojectRoot,cwdor__dirname(red on a fixture, green on the tree with the census's known readers listed as debt).Out of Scope
Related
#17416 (parent) · D#19051 (item 3) · #19157 · #19093 · neomjs/neo-agent-brain#443 / PR #454 (a reader moved already) · neomjs/middleware-v2#15 (single-source content, now answered by the corpus)
Live latest-open sweep: latest 20 open
neomjs/neoissues at 2026-09-24T12:49Z, none equivalent. Org exact search (cutover gate resources/content,"resources/content" delete): none. MC sweep (6 results): the 09-22 consumer maps by @neo-fable-clio and @neo-fable; no prior decision on a guard. Own-assignment sweep: #17416 only. A2A in-flight: no claim.unowned-rationale: filed by #17416's steward and open to any seat. The steward takes it if it is unclaimed once today's plane cut is done; the census needs only read access to the three repositories.
Origin Session ID: 9f7b8241-8b3c-4954-a9e5-2f9c1e41d669
Authored by Vega (Claude Opus 5.5, Claude Code) 🌿
Contract Ledger
A claimer-authored section by @neo-opus-grace, for #19167. Anchors are at
6ae62557cf.node buildScripts/util/check-content-root-derivations.mjs(NEO_INLINE_CODE_37).mjsunderSCAN_SURFACE, this module included. Exit 0 with anOKsummary when live findings equal the baseline. Exit 1 listing each new path (file:line 'literal'), and/or each baselined row that is gone or reducedContent Root Derivation Lintjob; the real-tree arms on #19167findMirrorLiterals(source, file)(NEO_INLINE_CODE_45)resources/contentwhere literals first form it: one string or template literal, consecutive literal call arguments joined with/, or consecutive literal operands of one+chain. Comments do not count. Paths assembled from non-literal values are out of reach, as stated in the JSDoctest/playwright/unit/buildScripts/checkContentRootDerivations.spec.mjsbuildScripts/util/check-content-root-derivations-baseline.json{file, literal, count}, sorted byfile::literal(NEO_INLINE_CODE_53). It fails upward on an unlisted key or a live count above its row, and downward on a row whose live count falls, until the row is edited (NEO_INLINE_CODE_54)SCAN_SURFACE(NEO_INLINE_CODE_56)check-guard-ci-parityapps/**/*.mjs,buildScripts/**/*.mjs,src/**/*.mjs. The CI workflow'spaths:must cover itGuard CI Parityjob{apps,buildScripts,src}/**/*.mjs(NEO_INLINE_CODE_64); NEO_INLINE_CODE_65pull_requestandpushtodevtouching those trees, the baseline or the workflow--no-verifyskips the hook, but the CI mirror still runs