๐Ÿ›  #1899 build preflight โ€” actionable error vs cryptic ENOENT

When you run npm run build in a fresh checkout without node_modules (very common after git worktree add), the build fails 30+ seconds in with a confusing js-yaml ENOENT error from inside packages/hook-contract codegen. This PR adds a 30-line scripts/check-install.sh preflight wired into the root prebuild npm script โ€” failing in <1s with a clear "run npm install first" message.

Toggle state

no node_modules โ†’ CRYPTIC FAILURE (before) / CLEAR ERROR (after)

BEFORE


  

AFTER


  

The change

scripts/check-install.sh    NEW ยท ~30 LOC bash
  - 'set -euo pipefail'
  - Resolve PROJECT_ROOT relative to script
  - If node_modules/ missing:
      ยท print actionable error to stderr
      ยท point at git-worktree as the common cause
      ยท suggest 'npm install' fix
      ยท exit 1
  - Otherwise: exit 0 silent

package.json
  prebuild:
-  "echo '๐Ÿ”จ Building plugins from source...' && bash scripts/sync-shared-scripts.sh"
+  "bash scripts/check-install.sh && echo '๐Ÿ”จ Building plugins from source...' && bash scripts/sync-shared-scripts.sh"

tests/build/test-check-install.sh    NEW ยท 2 cases
  - missing node_modules โ†’ exit 1 + actionable stderr
  - present node_modules โ†’ exit 0 silent