Development Protocol Historical Notes Archive v396

Version introduced: v396

Status: Preserved historical protocol archive

Source archived from: Project Documentation/Active/DEVELOPMENT_PROTOCOL.md before the v396 compactness pass

Purpose

This file preserves the older accumulated development protocol notes that were previously embedded below the active protocol section. They remain useful historical context, but they are no longer the active build-cycle procedure.

Current procedure is controlled by:

1. Project Documentation/Active/DISPATCH_SPOT_BUILD_RULES.md

2. Project Documentation/00_CURRENT_OPERATING_MANUAL.md

3. Project Documentation/06_CONSOLIDATED_ACTIVE_PRODUCT_ARCHITECTURE_MANUAL_V394.md

4. Project Documentation/Active/DISPATCH_SPOT_DOCUMENTATION_SOURCE_OF_TRUTH.md

Do not use the archived notes below to override current placement, settings, language, packaging, or Rule Check requirements.

---

v395 Active Development Protocol

This top section is the active protocol. Older sections below are retained for history and must not override the current controlled documentation path.

Before each build, read in this order:

1. Current user prompt and stated server baseline.

2. Project Documentation/Active/DISPATCH_SPOT_BUILD_RULES.md.

3. Project Documentation/00_CURRENT_OPERATING_MANUAL.md.

4. Project Documentation/06_CONSOLIDATED_ACTIVE_PRODUCT_ARCHITECTURE_MANUAL_V394.md.

5. Project Documentation/Active/DISPATCH_SPOT_DOCUMENTATION_SOURCE_OF_TRUTH.md.

6. Project Documentation/Active/DISPATCH_SPOT_SUPERSEDED_GUIDANCE_REGISTER.md.

7. Project Documentation/01_PREVIOUS_CHAT_REQUIREMENTS_REGISTER.md.

8. Project Documentation/Active/PROJECT_HANDOFF.md latest entry.

Current documentation placement rule

Durable documentation now belongs inside Project Documentation/. The app root should not collect new documentation files. The root README.md is only a pointer to the controlled documentation folder.

Historical documentation is preserved inside the controlled folders, especially Build History/, Superseded/, Duplicates or Retired Scaffolds/, and HTML Mirrors/. Historical documents do not override active build rules.

WHM command rule

WHM commands must visibly show unzip output. Do not use unzip -q.

When deploying v395 over an older package, run:


node scripts/dispatchspot-doc-relocation-cleanup-v395.mjs

This removes old root documentation copies only after the relocated copies exist in Project Documentation/.

Current baseline

Current baseline after controlled documentation relocation: v395.

---

v370 Surface Cleanup Protocol

v369 BUILD GOVERNANCE UPDATE

Before every future build cycle, review DISPATCH_SPOT_BUILD_RULES.md.

Future builds must enforce these placement rules:

Current baseline: v369

Next package: v370

DEVELOPMENT_PROTOCOL

Architecture governance update

Current baseline: v77

Next package: v78

Current baseline: v71

Next package: v72

Current baseline: v60

Next planned package: v61

Current baseline: v58

Next package: v59

Current baseline: v57

Next package: v58

Current baseline: v56

Next package: v57

Current baseline: v54

Next package: v55

Current baseline: v51

Next package: v52

Current deployed baseline: v50.1

Next planned package: v51

Current deployed baseline: v49

Next planned package: v50

Current baseline: v48

Next planned package: v49

Current baseline: v45.1

Next planned package: v46

Development Protocol

CURRENT CANONICAL BASELINE

Version: v42

Status: CRM assignment reminders and assignee queue visibility

Next planned package: v43

Required Workflow

Packaging Rules

Build Validation Rules

Commenting Standard

Use professional comments that explain purpose, structure, and non-obvious business rules. Avoid noisy comments that restate simple syntax.

Architecture Governance Rules

CORI Live Call Copilot governing document

v371 Page Cleanup Enforcement

The Page Usefulness Rule is now active in cleanup work. Before keeping a page in normal navigation, confirm the page helps the user complete one clear job. Pages that are confusing, duplicated, premature, or mostly internal should be hidden, merged, redirected, or moved to settings/admin.

As of v371, Load Board, Intelligence, Reports, report subpages, and Workspace Administration are retired from normal sidebar navigation and redirect to simpler destinations. Do not restore these as normal pages unless a later check-in approves a rebuilt version with one clear user job.

v372 Cleanup enforcement

Before adding or restoring any setup feature, confirm whether it belongs on /company or /company/integrations.

v373 Build Process Note

Before future cleanup or feature builds, review DISPATCH_SPOT_BUILD_RULES.md and confirm each page has one clear job. When a page shares data with another page, do not merge or duplicate it automatically. Decide based on user job:

v374 List Surface Cleanup Enforcement

Before expanding any list page, confirm the page has one clear job and does not reintroduce duplicate navigation, retired report links, internal readiness panels, or technical continuity language.

Current placement rules:

If a feature does not support the page's one clear job, move it to CORI, Workspace Settings, Super Admin, or a later rebuilt surface.

v375 Detail Page Cleanup Enforcement

Before changing any detail page, check DISPATCH_SPOT_BUILD_RULES.md, especially the Detail Page Cleanup Rule.

Detail pages must show the record, key people/assets, key money/route/status facts, and the next useful action first. Deeper support tools such as setup checks, assignment ownership, follow-up controls, and activity history should be collapsed unless they are essential to the user's immediate task.

Do not use CRM/internal lifecycle wording on normal user surfaces when simpler words are available.

v375.1 - Detail Page Import Build Fix

v376 Form and Subpage Cleanup Enforcement

Before changing forms, invoice views, truck subpages, Profile & Security, Workspace Settings, or Third-Party Integrations, review DISPATCH_SPOT_BUILD_RULES.md, especially the Form, Invoice, and Subpage Cleanup Rule.

Forms should save records. Invoice pages should show invoices first. Optional checks should be collapsed. Setup remains in Workspace Settings or Third-Party Integrations. Retired pages such as Load Board, Intelligence, and Reports should not be linked from normal user workflows unless they are rebuilt and approved later. Notifications were rebuilt in v382 as a simple top-bar alert feed.

v377 High-Use Surface Cleanup Enforcement

Before changing CORI Briefing, Dispatch Board, Paperwork, Billing Records, or any CORI page, review DISPATCH_SPOT_BUILD_RULES.md, especially the High-Use Work Surface Cleanup Rule.

Do not place roadmap notes, provider internals, readiness language, technical configuration, or development-review explanations on normal user work pages. If the content explains the system instead of helping the user finish the current job, move it to root documentation, Workspace Settings, Super Admin, or remove it from the normal surface.

v378 Hidden Section Language Enforcement

Before future cleanup or feature builds, remember that collapsed sections still count as user-facing surfaces. Do not leave internal build wording inside a collapsed panel simply because it is not visible on first page load.

For normal users, replace internal wording with plain work language:

CORI's Quotes and Routes should stay assistant-like and action-focused.

v379 Protocol Reminder — Admin Placement and Plain Work Language

Before each build, review DISPATCH_SPOT_BUILD_RULES.md, including the v379 Admin Placement and Truck Command Cleanup Rule.

Daily pages must not direct users into Super Admin language or expose internal terms. Admin setup belongs in Workspace Settings or Third-Party Integrations. Platform support and deep review belong in Super Admin. Truck, route, CRM, and CORI pages must remain plain work surfaces.

v380 Protocol Addition — Final Language Sweep

Every build must now include a final pass against DISPATCH_SPOT_BUILD_RULES.md, especially the Final User-Facing Language Sweep Rule.

Check both first-visible content and collapsed/helper sections. A hidden panel is still part of the user experience and must not read like engineering, roadmap, readiness, or internal support language.

v381 Handoff Note — Cleanup Closeout and Build Preflight Guard

v381 closes the broad cleanup cycle unless live UI review identifies a specific remaining confusing page. Future changes should resume feature development with DISPATCH_SPOT_BUILD_RULES.md enforced before every build.

A new preflight command is now available and should run before TypeScript and Next build:


npm run dispatchspot:preflight

This command checks local source imports for missing files and prints non-blocking language warnings for selected internal terms on normal user-facing surfaces. It is designed to catch cleanup bridge mistakes earlier, especially after renaming helper components or moving content between user surfaces and settings/admin pages.

No Prisma schema changes were added in v381.

v382 protocol note

Before expanding notifications, check DISPATCH_SPOT_BUILD_RULES.md.

Notifications must stay simple for normal users. Do not reintroduce provider setup, delivery diagnostics, sender governance, API keys, webhooks, or technical readiness panels on /notifications or in the top-bar bell.

v383 Protocol Note - Notification Preferences

Before modifying notifications, check DISPATCH_SPOT_BUILD_RULES.md, especially the Notification Preference Rule.

Historical note superseded by v390: notifications must remain app-style and easy to understand, but user preferences must not live on /notifications. Preferences belong in Workspace Settings > Notifications. Provider setup, SMTP, Twilio, push provider setup, API keys, delivery logs, and debug details must remain out of the user notification page.

v384 protocol note

Historical note superseded by v390: provider setup stays in Workspace Settings > Third-Party Integrations. Delivery readiness and user choices belong in Workspace Settings > Notifications, not on /notifications. The normal Notifications page must not expose SMTP credentials, Twilio tokens, API keys, webhooks, delivery debug panels, preference controls, or delivery-readiness controls.

v385 protocol note

Historical note superseded by v390: urgent text alerts require explicit user opt-in, and a phone number alone is not consent. Phone number fields, opt-in language, and turn-off controls belong in Workspace Settings > Notifications. Twilio setup and provider details belong in Workspace Settings > Third-Party Integrations.

v386 protocol note

Urgent text alerts now have a guarded preview path only. Real SMS sending must remain locked until a future build adds final approval, audit records, delivery error handling, and safe Twilio send execution.

Historical note superseded by v390: before changing text alerts, check DISPATCH_SPOT_BUILD_RULES.md, especially the Guarded Urgent Text Delivery Prep Rule and the Notification Settings Relocation rule. The normal Notifications page must not show text status, delivery previews, opt-in controls, or provider details. Those belong in Workspace Settings > Notifications or Third-Party Integrations as appropriate.

v387 Protocol Note — Guarded SMS Send

When adding user-triggered outbound delivery, the normal user page may show only the result, preview, and clear approval step. Provider credentials and setup remain in Workspace Settings or Super Admin.

For urgent text alerts, every send must require:

1. user phone number,

2. explicit opt-in,

3. Twilio setup through Workspace Integrations,

4. message preview,

5. user approval,

6. audit record.

Do not add SMS provider diagnostics, auth tokens, API keys, webhook setup, or raw delivery logs to /notifications.