Massive AI Overhaul

This commit is contained in:
John OReilly
2026-03-15 18:24:36 -04:00
parent bce93507cb
commit 42b7b06dda
9637 changed files with 403289 additions and 4217 deletions

96
docs/quote-rules.md Normal file
View File

@@ -0,0 +1,96 @@
# Quote Rules
Use this only when pricing or behavior rules are relevant. For general resume context, the four startup docs are enough.
## Pricing source of truth
- Built-in pricing defaults live in `quote-pricing.js`.
- `package-prices.json` may override them at startup.
- `readFormState()` in `quote-engine.js` maps the DOM into a normalized state object.
- `calculateQuote(state, pricing)` in `quote-engine.js` is the current pricing source of truth.
- `calcQuote()` in `SVS-MSP-Calculator.js` remains as the compatibility wrapper used by the rest of the runtime.
## Core billing rules
- User package base rate:
- `RATE_M365_M2M` ($140) when M365 Included + month-to-month
- `RATE_M365` ($130) when M365 Included + 12-month or 24-month term
- `RATE_BYOL` ($110) when BYOL is selected (all terms)
- M365 retail comparison: monthly $36, annual $29 — savings shown in UI
- User add-ons:
- Extended Hours
- 1Password
- INKY Pro
- Zero Trust User Seat
- Endpoint pricing:
- `RATE_ENDPOINT` per endpoint
- `ADDON_USB_BLOCKING` per endpoint when selected
- `ADDON_BARE_METAL_BACKUP` per endpoint when selected
- Server pricing:
- `RATE_SERVER` per server
- Zero Trust Networking:
- `ZT_SEAT_RATE` per non-user device seat
- `ZT_ROUTER_RATE` per HaaS device
- VoIP:
- tier rate per seat
- optional desk phone add-on
- optional eFax add-on priced per seat
## Site admin fee rules
- Base subtotal for threshold logic:
- user base
- endpoint base
- server base
- Site admin base:
- `max(ADMIN_FEE_FLOOR, ADMIN_FEE_MINIMUM - baseSubtotal)`
- Additional site admin charges:
- `ADMIN_FEE_ZT` when Zero Trust is active
- `ADMIN_1PWM_PCT` surcharge on 1Password MRR when 1Password is selected
- Admin fee can be manually waived
## Contract term rules
- Month-to-month: no MRR discount, full onboarding fee
- 12-month: 3% off MRR + 50% off onboarding fee
- 24-month: 5% off MRR + complimentary onboarding (fully waived)
## Onboarding fee rules
- Default onboarding fee is auto-calculated as 50% of pre-discount MRR
- 12-month term auto-applies 50% discount to onboarding (25% of MRR)
- 24-month term fully waives onboarding (complimentary)
- Manual entry overrides the auto value until reset
- Manual override value is preserved in `data-manual-value` attribute across term switches
- Waived onboarding disables the input and shows complimentary state
- Onboarding fee is not included in headline MRR
## Tax rules
- Ontario HST is optional (user toggle)
- HST is applied to discounted MRR, not base MRR
- Print/PDF export respects the user's HST toggle state (does not force HST on)
## Savings and comparison rules
- M365 bundle savings are shown when M365 Included is selected
- BYOL can trigger a missed-savings callout
- VoIP can compare against a current phone bill input
- In-house IT comparison uses internal tool-cost and salary assumptions from pricing config
## eFax pricing decision
- The approved business rule is per seat
- Current logic already calculates the eFax add-on per VoIP seat
- Any remaining `per line` sales copy should be aligned in a small approved copy pass
## JSON export rules
- Export includes `version: '1.0'` as first field in payload
- Schema defined in STAGE2-BUILD-PROMPT.md
- Intended for n8n workflow consumption
## Admin fee nudge
- When Zero Trust is active (`ztActive`), an amber nudge warns about the $250 admin fee supplement
- Nudge is informational — does not block configuration