LearnNewsExamplesServices
Frontmatter
id17272
titleClass B of the engine→Brain burndown: five misfiled Brain files leave `buildScripts/`
stateClosed
labels
enhancementairefactoringarchitecturebuild
assigneesneo-opus-ada
createdAtAug 17, 2026, 9:29 AM
updatedAtAug 17, 2026, 11:14 AM
githubUrlhttps://github.com/neomjs/neo/issues/17272
authorneo-opus-ada
commentsCount0
parentIssue17239
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 17, 2026, 11:14 AM

Class B of the engine→Brain burndown: five misfiled Brain files leave buildScripts/

Closed Backlog/active-chunk-17 enhancementairefactoringarchitecturebuild
neo-opus-ada
neo-opus-ada commented on Aug 17, 2026, 9:29 AM

Context

Slice of #17239. That ticket's census found 9 crossings across 7 files, all under buildScripts/, and @neo-opus-grace's review split them into two classes that share an AC but not a fix:

  • Class A (3 crossings) — engine tooling genuinely reaching a Brain service. The fix moves a concern, and one of the three is buildScripts/release/publish.mjs, the atomic dev → main release path. Sequencing-sensitive. Not this ticket.
  • Class B (6 crossings, 4 files) — Brain files sitting in an engine directory. The fix moves a file.

This ticket is Class B only. #17239 stays open on Class A.

Independent corroboration that Class B is agent-serving rather than engine code: all of them are already classified agent-side by a pre-existing structural audit of engine-directory files, derived by reading each one before #17239 existed.

The Problem

Two of the four reach ai/graph/identityRoots.mjs — the identity graph itself, deeper than any Class A target. A misfiled file reaching the identity registry is a worse smell than a build script calling a service, which is why this slice goes first.

A fifth file is dragged in and the ticket must name it: buildScripts/util/check-commit-authorship.mjs imports ./agentCoAuthorEmails.mjs relatively. Moving the roster alone converts that import into ../../ai/graph/… — a new engine→Brain crossing manufactured by the fix for engine→Brain crossings, leaving the baseline smaller and the real count unchanged. Its own header settles the direction: "Refuses to push commits authored with the OPERATOR's identity from an agent checkout" — a repo with no agents has no use for it.

The Fix

Relocate against the tree, not against a prescription. #17239's Fix section names buildScripts/ai/** as "the existing sibling precedent"; that directory does not exist, and it would have failed #17239's own primary AC, since it is still under buildScripts/.

file destination
buildScripts/util/agentCoAuthorEmails.mjs ai/graph/ — beside the registry it is keyed to
buildScripts/util/check-commit-authorship.mjs ai/scripts/lint/ — the cascade above
buildScripts/util/deriveFleetRoster.mjs ai/scripts/fleet/
buildScripts/util/agent-preflight.mjs ai/scripts/
buildScripts/devCockpit.mjs ai/scripts/fleet/

Depends on the guard from #17256 existing, so the burndown is mechanically provable rather than asserted.

Acceptance Criteria

  • The six Class B rows leave check-engine-brain-boundary-baseline.json in the same commit that removes the crossings; the guard reports 3 remaining, all Class A.
  • The burndown direction of the ratchet is re-proved live: a burned-down row re-added to the baseline fails the guard.
  • Every relocated entry point is exercised from its new home rather than reasoned about — the agent-preflight gate spawn, deriveFleetRoster --check, and the devCockpit launcher boot.
  • Every root computed from a moved file's own location is re-derived and asserted to resolve where it claims. A literal-specifier sweep cannot see these: they still produce a path after the move and fail at runtime, not at import.
  • Any guard whose verdict changes because a file entered or left its scan surface is named with its disposition — silence there is the failure mode, not the guard.
  • No new engine→Brain crossing is created by the relocation itself.

Out of Scope

  • Class A (labels.mjs, rebuildContentIndexesAndSeo.mjs, publish.mjs) — stays on #17239.
  • Renaming agent-preflight's npm script to the ai:* prefix. lint-script-plane and lint-npm-script-entrypoints both read entrypoints from ai:* scripts, so the moved file sits in ai/scripts/ without their coverage — but it had none at buildScripts/util/ either, so this is not a coverage regression, and renaming touches every skill and hook that invokes npm run agent-preflight. Separable, and worth its own decision.

Avoided Traps

  • Moving the roster without its consumer. Net-zero burndown: the baseline shrinks while the violation relocates one directory over.
  • Trusting the ticket's prescribed destination. #17239 named a directory that does not exist. The destination is validated against the tree at pickup.
  • Letting a spec's tier change pass silently. brainTestMatch is /[\\/]ai[\\/].*\.spec\.mjs$/, so a spec moving under ai/ joins the Brain-tier matrix whether or not it needs Brain capabilities.

Related

#17239 (parent — Class A remains) · #17256 / PR #17257 (the guard this burns down) · #17237 (same boundary, opposite direction)

Live latest-open sweep: latest 20 open issues checked 2026-08-17T07:5xZ; no equivalent. Search sweep on buildScripts relocation Brain returned only #17239, #17256, #14304, #14560 — none covering this scope.

Origin Session ID: 80b326bf-b37a-4efd-8313-1a9eae09e9c4

tobiu closed this issue on Aug 17, 2026, 11:14 AM