id: mod-no-process-env-client
language: tsx
severity: error
message: process.env / globalThis.process / NODE_ENV read in a host-agnostic -react client package
note: '{"severity":"high","category":"boundary","resolution":"Never read process.env / globalThis.process / NODE_ENV in -react or client-runtime src — process is undefined on browser/edge (the kit''s target hosts), so a NODE_ENV !== ''production'' dev-branch is TRUTHY and FIRES in prod, and is not DCE-eliminable so it ships in the consumer bundle. Use import.meta.env for build-time env, or prevent the footgun BY CONSTRUCTION (e.g. internal key= auto-remount). Env reads belong only in build configs (tsup/vitest/*.config.ts). See AGENTS.md no-process-env-in-host-agnostic-client."}'
files:
  - '**/packages/*-react/src/**/*.tsx'
  - '**/.slopgate/fixtures/src/**/*.tsx'
ignores:
  - '**/*.test.*'
  - '**/*.config.*'
  - '**/*.setup.*'
rule:
  any:
    - pattern: process.env
    - pattern: globalThis.process
    - pattern: NODE_ENV
