# Dispatch Spot Cleanup Closeout and Build Preflight Guard — v381

## Purpose

v381 closes the broad user-surface cleanup cycle and adds a lightweight build preflight guard so future packages are less likely to ship with missing local import bridges after wording or component cleanup.

## Decision

The cleanup cycle should not continue blindly without live UI screenshots or specific page feedback. The normal pages have now been reviewed across navigation, list pages, detail pages, forms, settings, integrations, CORI surfaces, Dispatch Board, Loads, Paperwork, Billing Records, Routes, and truck command pages.

The correct next phase is to resume feature development with the Build Rules enforced before every build. If the live UI shows a confusing page later, that page should be corrected as a targeted `.1` or cleanup build instead of reopening a broad cleanup cycle.

## What changed

- Added `scripts/dispatchspot-build-preflight.mjs`.
- Added `npm run dispatchspot:preflight`.
- The preflight checks local `@/`, `./`, and `../` imports across `app`, `components`, `src`, `lib`, `types`, and `prisma`.
- The preflight fails before TypeScript if a referenced local source file is missing.
- The preflight also prints non-blocking language warnings for selected internal terms on normal dashboard/components surfaces.
- Added the Build Preflight Guard Rule to `DISPATCH_SPOT_BUILD_RULES.md`.
- Updated the root handoff and protocol files so future cycles run preflight before TypeScript and Next build.

## What stayed the same

- No user-facing page layout changed.
- No Prisma schema changed.
- No CORI Mail, CORI Briefing, Dispatch Board, Loads, Paperwork, Billing Records, Routes, or Settings feature behavior changed.

## Build rule impact

Future WHM build commands should run:

```bash
npm run dispatchspot:preflight
node node_modules/typescript/bin/tsc --noEmit
node node_modules/next/dist/bin/next build
```

This does not replace TypeScript or Next. It catches missing local files earlier and with clearer output.

## Rule Check

- User surface stayed clean: Yes
- Settings/configuration stayed in Workspace Settings: Yes
- CORI page stayed AI/action-focused: Yes
- Technical/provider details hidden from normal users: Yes
- Simple language used: Yes
- Prisma schema changed: No
