Context
In the cloud cold walk for neomjs/neo#20114 (2026-10-26, npx neo-app@13.3.2), the install log shows:
> myapp@0.1.0 postinstall
> cd node_modules/neo.mjs && npm i && npm run bundle-parse5 && npm run bundle-marked
> neo.mjs@13.3.1 prepare
> node ./buildScripts/util/prepare.mjs
.git can't be foundneo-agent-skills: materialized 39 link(s) into .claude/skills → node_modules
neo-agent-skills: .claude/skills/ must be git-ignored — these are projection artifacts, never committed bytes.
added 543 packages, and audited 544 packages in 19s
The Problem
Every scaffolded workspace runs the engine's maintainer prepare inside its dependency:
- husky prints
.git can't be found with no trailing newline, so the next line runs into it;
- the skills materializer links 39 maintainer skills into
node_modules/neo.mjs/.claude/skills, from the engine's own neo-agent-skills devDependency rather than the workspace's app audience.
That means confusing install output, maintainer artifacts in a consumer's node_modules, and work no consumer needs.
The Architectural Reality
buildScripts/util/prepare.mjs guards both stages with isDependencyBuild({env, root}), which returns true only when INIT_CWD differs from the package root. That catches a git-dependency install.
- The workspace's
postinstall (written by neomjs/create-app tasks/createPackageJson.mjs) runs npm i with its cwd inside node_modules/neo.mjs, so INIT_CWD equals root and the guard reads "not a dependency".
The Fix
Extend isDependencyBuild so a package root that sits inside a node_modules directory also counts as a dependency build. That keeps the two stages scoped to a real checkout, without depending on how the consumer invokes npm. A maintainer clone is unchanged.
Acceptance Criteria
Out of Scope
- Whether the workspace's nested
npm i in node_modules/neo.mjs is needed at all (543 packages, 19 s of the 58 s install). That is the scaffold's postinstall design, a separate question for neomjs/create-app.
Related
Parent: neomjs/neo#20114 · neomjs/create-app#51
Sweeps (2026-10-26T16:06Z): live latest-open, the 5 newest neomjs/neo issues since the 15:52Z full sweep, no equivalent; keyword prepare.mjs / isDependencyBuild / husky, none open; A2A, latest 30 messages, no claim; own-assignment, #20114, #20128, #20129, none overlapping. This promotes the defect-note "neo-app workspace install is wrong in its output" with the cloud agent's root-cause evidence.
Origin Session ID: 9853627c-2129-4d41-b905-0c74bec35a48
Retrieval Hint: "prepare.mjs isDependencyBuild INIT_CWD node_modules nested npm i workspace postinstall husky .git can't be found skills materialize"
Context
In the cloud cold walk for neomjs/neo#20114 (2026-10-26,
npx neo-app@13.3.2), the install log shows:The Problem
Every scaffolded workspace runs the engine's maintainer
prepareinside its dependency:.git can't be foundwith no trailing newline, so the next line runs into it;node_modules/neo.mjs/.claude/skills, from the engine's ownneo-agent-skillsdevDependency rather than the workspace's app audience.That means confusing install output, maintainer artifacts in a consumer's
node_modules, and work no consumer needs.The Architectural Reality
buildScripts/util/prepare.mjsguards both stages withisDependencyBuild({env, root}), which returns true only whenINIT_CWDdiffers from the package root. That catches a git-dependency install.postinstall(written by neomjs/create-apptasks/createPackageJson.mjs) runsnpm iwith its cwd insidenode_modules/neo.mjs, soINIT_CWDequalsrootand the guard reads "not a dependency".The Fix
Extend
isDependencyBuildso a package root that sits inside anode_modulesdirectory also counts as a dependency build. That keeps the two stages scoped to a real checkout, without depending on how the consumer invokes npm. A maintainer clone is unchanged.Acceptance Criteria
isDependencyBuildreturns true for a root insidenode_moduleseven whenINIT_CWDequals that root, and stays false for a top-level clone (unit arms, red-first ondev).prepare.mjsruns neither husky nor the materializer, and prints nothing.npx neo-appinstall log no longer shows.git can't be foundor a skills materialization insidenode_modules/neo.mjs.Out of Scope
npm iinnode_modules/neo.mjsis needed at all (543 packages, 19 s of the 58 s install). That is the scaffold'spostinstalldesign, a separate question for neomjs/create-app.Related
Parent: neomjs/neo#20114 · neomjs/create-app#51
Sweeps (2026-10-26T16:06Z): live latest-open, the 5 newest
neomjs/neoissues since the 15:52Z full sweep, no equivalent; keywordprepare.mjs/isDependencyBuild/ husky, none open; A2A, latest 30 messages, no claim; own-assignment, #20114, #20128, #20129, none overlapping. This promotes the defect-note "neo-app workspace install is wrong in its output" with the cloud agent's root-cause evidence.Origin Session ID: 9853627c-2129-4d41-b905-0c74bec35a48 Retrieval Hint: "prepare.mjs isDependencyBuild INIT_CWD node_modules nested npm i workspace postinstall husky .git can't be found skills materialize"