From a42ce662b8d28a10f43dc0f4c551c6b773d2c7ae Mon Sep 17 00:00:00 2001 From: John OReilly Date: Mon, 16 Mar 2026 16:52:38 -0400 Subject: [PATCH] docs: remove 11 outdated stage prompts and superseded docs Deleted 8 historical STAGE*-SESSION-PROMPT.md files (all stages complete), plus ai-session-brief.md, code-verification.md, and phase-roadmap.md (superseded by CLAUDE.md and 254-test suite). Updated QUICK-REF.md directory listing to reflect current docs structure. Co-Authored-By: Claude Opus 4.6 --- docs/QUICK-REF.md | 6 +- docs/STAGE10-UI-SESSION-PROMPT.md | 89 -------------- docs/STAGE11-SESSION-PROMPT.md | 100 ---------------- docs/STAGE3-SESSION-PROMPT.md | 176 --------------------------- docs/STAGE4-SESSION-PROMPT.md | 186 ---------------------------- docs/STAGE5-SESSION-PROMPT.md | 193 ------------------------------ docs/STAGE6-SESSION-PROMPT.md | 162 ------------------------- docs/STAGE7-SESSION-PROMPT.md | 166 ------------------------- docs/STAGE9-SESSION-PROMPT.md | 167 -------------------------- docs/ai-session-brief.md | 65 ---------- docs/code-verification.md | 124 ------------------- docs/phase-roadmap.md | 50 -------- 12 files changed, 4 insertions(+), 1480 deletions(-) delete mode 100644 docs/STAGE10-UI-SESSION-PROMPT.md delete mode 100644 docs/STAGE11-SESSION-PROMPT.md delete mode 100644 docs/STAGE3-SESSION-PROMPT.md delete mode 100644 docs/STAGE4-SESSION-PROMPT.md delete mode 100644 docs/STAGE5-SESSION-PROMPT.md delete mode 100644 docs/STAGE6-SESSION-PROMPT.md delete mode 100644 docs/STAGE7-SESSION-PROMPT.md delete mode 100644 docs/STAGE9-SESSION-PROMPT.md delete mode 100644 docs/ai-session-brief.md delete mode 100644 docs/code-verification.md delete mode 100644 docs/phase-roadmap.md diff --git a/docs/QUICK-REF.md b/docs/QUICK-REF.md index 6b1be1a..f135fed 100644 --- a/docs/QUICK-REF.md +++ b/docs/QUICK-REF.md @@ -151,7 +151,9 @@ svsmspcalc/ ├── SESSION-HANDOFF.md # Current status + next steps ├── CHECKPOINT.md # Historical checkpoint ├── MASTER-SESSION-PROMPT.md # Master rebuild prompt - ├── STAGE3-11 prompts # Historical stage prompts + ├── DECISION-LOG.md # Decision history + ├── KNOWN-ISSUES.md # Tracked bugs ├── quote-rules.md # Business logic rules - └── regression-checklist.md # QA checklist + ├── regression-checklist.md # QA checklist + └── README.md # Project overview ``` diff --git a/docs/STAGE10-UI-SESSION-PROMPT.md b/docs/STAGE10-UI-SESSION-PROMPT.md deleted file mode 100644 index 23be934..0000000 --- a/docs/STAGE10-UI-SESSION-PROMPT.md +++ /dev/null @@ -1,89 +0,0 @@ -# SVS MSP CALC — STAGE 10: UI & THEME POLISH -# Generated: 2026-03-15 - ---- - -## WHERE WE ARE - -**Stages 1–9: COMPLETE.** Beta build is production-quality for Sections I–III. -**Tests:** 254/254 passing. -**Spacing tokens:** Consolidated (150+ magic numbers → CSS custom properties). -**Retro theme visual QA:** Passed at all viewports (375/1100/1400/2500/2800px). -**Pricing:** Single source in `package-prices-data.js`, addon labels sync dynamically. - ---- - -## STAGE 10 FOCUS: UI / THEME / COLOR CONSISTENCY - -This stage is about visual polish, color consistency, and interface usability across all 4 themes. - -### Known Issues to Investigate -- **Too many similar-but-slightly-off colors** within individual themes — need audit and consolidation -- **Color consistency per theme** — some elements use raw hex where they should use tokens -- **Usability polish** — any controls, labels, or interactions that could feel tighter or more intuitive -- **Cross-theme consistency** — ensure the same UI elements feel equivalent across Dark/Light/Glass/Retro - -### Approach - -1. **Color Audit** — For each theme, extract all unique colors actually used. Group by purpose (text, surface, border, accent). Flag duplicates that are close but not identical (e.g., two slightly different grays serving the same role). - -2. **Token Consolidation** — Where colors are inconsistent, consolidate to existing tokens or define new ones. Goal: fewer unique colors, each with a clear semantic role. - -3. **Per-Theme Walkthrough** — User provides screenshots. AI audits for: - - Color contrast issues (text readability) - - Inconsistent element styling across themes - - Visual weight imbalances - - Elements that "don't belong" visually - -4. **Surgical Fixes** — Each fix is small, tested, and verified across all 4 themes. - ---- - -## SESSION WORKFLOW - -1. **Start with a color audit** — Use Explore agent to scan all theme CSS files for unique color values, group by semantic role -2. **User provides screenshots** of specific areas that feel "off" -3. **AI proposes fixes** with before/after reasoning -4. **Apply fixes surgically** — one logical change at a time -5. **User verifies visually** — confirms or adjusts -6. **Run tests** after any render/engine changes - ---- - -## HARD CONSTRAINTS - -1. DOM IDs are a contract — renaming breaks mobile sync (100+ pairs) -2. 254 tests must pass: `node svsmspcalc/tests/test-quote-engine.js` -3. All 4 themes must work after every change -4. No frameworks, no npm — vanilla only -5. Surgical changes only — read before editing -6. Sections IV–VI are placeholders — do not activate - ---- - -## THEME FILES - -| Theme | File | Base | -|-------|------|------| -| Dark (default) | `SVS-MSP-Calculator-tokens.css` | All colors defined here | -| Light | `SVS-MSP-Calculator-light.css` | Overrides dark tokens | -| Glass | `SVS-MSP-Calculator-glass.css` | Glassmorphism overrides | -| Retro | `SVS-MSP-Calculator-70retro.css` | Cyberpunk overrides | - ---- - -## VERIFICATION - -``` -node svsmspcalc/tests/test-quote-engine.js -``` - -254 tests, zero dependencies. Run after any pricing/engine/render changes. - ---- - -## CONTEXT MANAGEMENT - -After completing work: -- Update `docs/CHECKPOINT.md` with results -- If context is heavy, create `docs/STAGE11-SESSION-PROMPT.md` for the next chat diff --git a/docs/STAGE11-SESSION-PROMPT.md b/docs/STAGE11-SESSION-PROMPT.md deleted file mode 100644 index dbd9644..0000000 --- a/docs/STAGE11-SESSION-PROMPT.md +++ /dev/null @@ -1,100 +0,0 @@ -# SVS MSP CALC — STAGE 11: BETA PREP -# Generated: 2026-03-15 - ---- - -## WHERE WE ARE - -**Stages 1–10: COMPLETE.** Production-quality for Sections I–III across all 4 themes. -**Tests:** 254/254 passing. - -### Stage 10 Completed Work - -**Color Audit & Consolidation:** -- Full audit of all 4 theme CSS files — every unique color extracted, grouped by role -- Near-duplicates consolidated via aliases (e.g., 4 positive surfaces → 2 semantic tiers) -- On-accent text ladder collapsed from 5 → 3 levels -- Light theme: ~6 near-identical surfaces → 3 tiers, ~10 borders → 3 tiers -- Glass theme: 6 ice-white text values → 1 reference, 4 border opacities → 1 reference -- Retro theme: ~20 hardcoded hex in selectors → 7 `--retro-*` helper tokens -- 17 raw hex/rgba in components.css → new overlay/shadow tokens -- Retro `--sky` given distinct value (`#6366f1` indigo, was identical to `--green`) -- Unused `--text-on-accent-muted` removed - -**Sidebar / Live Quote Polish:** -- Zone backgrounds strengthened + semantically tinted (value zone gets green tint) -- Line borders: last-child removed, totals get solid top border, dashed elsewhere -- Hover tint on sidebar lines for read-tracking -- `.export-wrap` background → transparent, border removed (all themes) -- Sidebar changed from sticky to static (scrolls with page) - -**Section Grouping:** -- "MANAGED IT SERVICES (Sections I, II, III)" eyebrow label above section I -- Vertical accent bracket with top/bottom caps alongside sections I–III -- HR divider between Site Management (III) and Server Management (IV) -- Mobile: bracket hidden, sections I–III get accent left border instead -- Per-theme `--group-strip` token (blue/grey-teal/cyan/rose) - -**Mobile:** -- Quote pill repositioned: `top: 12vh` at ≤600px (percentage-based, viewport-responsive) - ---- - -## WHAT'S READY FOR BETA - -- Sections I–III fully functional with live pricing, addons, admin fee logic -- All 4 themes visually polished and color-consistent -- Sidebar live quote with clear zone separation and clean borders -- Mobile panel sync working (100+ ID pairs) -- Print/PDF export functional -- JSON import/export functional -- 254 automated tests passing - -## WHAT REMAINS (Sections IV–VI) - -Sections IV (Server Management), V (Zero Trust Networking), VI (VoIP) are **placeholders only** — basic stepper + collapsed body, no active pricing or addons wired up. Do not activate unless explicitly requested. - ---- - -## HARD CONSTRAINTS - -1. DOM IDs are a contract — renaming breaks mobile sync (100+ pairs) -2. 254 tests must pass: `node svsmspcalc/tests/test-quote-engine.js` -3. All 4 themes must work after every change -4. No frameworks, no npm — vanilla only -5. Surgical changes only — read before editing -6. Sections IV–VI are placeholders — do not activate - ---- - -## KEY FILES MODIFIED IN STAGE 10 - -| File | What Changed | -|------|-------------| -| `SVS-MSP-Calculator-tokens.css` | Semantic positive/overlay/sidebar/group tokens added; near-dupes aliased | -| `SVS-MSP-Calculator-light.css` | Surface/border consolidated; sidebar zone + group-strip tokens | -| `SVS-MSP-Calculator-glass.css` | Ice-whites + borders deduped; sidebar/group tokens; export-wrap cleaned | -| `SVS-MSP-Calculator-70retro.css` | 7 retro helper tokens; hardcoded hex → var(); distinct --sky; group-strip | -| `SVS-MSP-Calculator-components.css` | 17 raw colors tokenized; sidebar line/zone polish; group label + bracket | -| `SVS-MSP-Calculator-layout.css` | 1 raw #fff tokenized; sidebar position: static | -| `SVS-MSP-Calculator-responsive.css` | Mobile bracket → left border; group-divider; pill top: 12vh | -| `SVS-MSP-Calculator-print.css` | Group label/bracket/divider hidden in print | -| `SVS-MSP-Calculator.html` | Group label div + group divider HR added (decorative, no IDs) | - ---- - -## VERIFICATION - -``` -node svsmspcalc/tests/test-quote-engine.js -``` - -254 tests, zero dependencies. Run after any pricing/engine/render changes. - ---- - -## CONTEXT MANAGEMENT - -After completing work: -- Update `docs/CHECKPOINT.md` with results -- If context is heavy, create `docs/STAGE12-SESSION-PROMPT.md` for the next chat diff --git a/docs/STAGE3-SESSION-PROMPT.md b/docs/STAGE3-SESSION-PROMPT.md deleted file mode 100644 index 4d384e7..0000000 --- a/docs/STAGE3-SESSION-PROMPT.md +++ /dev/null @@ -1,176 +0,0 @@ -# SVS MSP CALC — STAGE 3 SESSION PROMPT -# Post-Beta Hardening & Manual QA -# Generated: 2026-03-15 - ---- - -## WHERE WE ARE - -**Beta build: COMPLETE.** Sections I–III are production-quality. -**Accessibility/performance audit: COMPLETE.** Phase 5 fixes applied. -**Tests:** 88/88 passing. -**Sections IV–VI:** Intentionally deferred as placeholders — do not activate. - -### Completed Stages -- **Stage 1** — Discovery audit (codebase mapping, doc generation) -- **Stage 2** — Beta build (Phases 1–4: bug fixes, visual polish, UX hardening, docs/QA) -- **Phase 5** — Accessibility/performance audit (aria-expanded, focus traps, stepper labels, glass scroll fix, mobile sync optimization) - ---- - -## START EVERY SESSION BY READING - -1. `svsmspcalc/docs/CHECKPOINT.md` — current status, all completed work -2. `svsmspcalc/docs/MASTER-SESSION-PROMPT.md` — full architecture, constraints, priorities -3. `svsmspcalc/docs/QUICK-REF.md` — compact file map, DOM IDs, pricing, danger zones -4. This file — session goals and context - ---- - -## PROJECT SNAPSHOT - -**App:** SVS MSP CALC — live quote/pricing calculator for SVS Managed Services -**Type:** Static HTML + Vanilla JS + Modular CSS (no frameworks, no build tools, no npm) -**Used by:** SVS sales team, live on screen during prospect calls - -### Architecture -``` -svsmspcalc/ -├── SVS-MSP-Calculator.html # Stable HTML shell (65KB) -├── SVS-MSP-Calculator.js # Orchestration (350 lines) -├── quote-engine.js # Pure quote math (197 lines) -├── quote-pricing.js # Pricing defaults + CSV override (134 lines) -├── quote-render.js # DOM rendering + nudges (729 lines) -├── quote-persistence.js # localStorage save/restore (225 lines) -├── quote-export.js # Print/PDF + JSON export (299 lines) -├── theme-manager.js # 4-theme switching (121 lines) -├── mobile-sync.js # Mobile panel sync (275 lines) -├── SVS-MSP-Calculator.css # Manifest (@imports all CSS) -├── SVS-MSP-Calculator-tokens.css # Design tokens + CSS vars -├── SVS-MSP-Calculator-base.css # Global chrome -├── SVS-MSP-Calculator-layout.css # Grid, header, main/sidebar -├── SVS-MSP-Calculator-components.css # Section cards, controls, sidebar (66KB) -├── SVS-MSP-Calculator-responsive.css # Viewport/container overrides (16KB) -├── SVS-MSP-Calculator-print.css # Print-specific rules -├── SVS-MSP-Calculator-light.css # Light theme overrides -├── SVS-MSP-Calculator-glass.css # Glass theme (glassmorphism) -├── SVS-MSP-Calculator-70retro.css # 70s Retro theme overrides -├── package-prices.csv # Overrideable pricing (31 rows) -├── tests/ -│ └── test-quote-engine.js # 88 tests (Node.js, zero deps) -└── docs/ - ├── CHECKPOINT.md # Build status checkpoint - ├── MASTER-SESSION-PROMPT.md # Full architecture brief - ├── QUICK-REF.md # Compact reference - ├── README.md - ├── code-verification.md # Known-good baseline - ├── phase-roadmap.md # Phase status - ├── quote-rules.md # Business logic rules - ├── regression-checklist.md # Test procedures - └── STAGE3-SESSION-PROMPT.md # This file -``` - ---- - -## HARD CONSTRAINTS (NON-NEGOTIABLE) - -1. DOM IDs are a contract — renaming breaks mobile sync (100+ pairs) -2. 88 tests must pass: `node svsmspcalc/tests/test-quote-engine.js` -3. localStorage keys unchanged: `svs-msp-quote-v1`, `svs-msp-quote-ref` -4. All 4 themes must work after every change -5. Mobile parity maintained -6. Print/PDF tested after CSS changes -7. No frameworks, no npm — vanilla only -8. Surgical changes only — read before editing -9. Sections IV–VI are placeholders — do not activate or build out - ---- - -## STAGE 3 GOALS — Choose priorities from this menu: - -### Option A: Browser-Based Manual QA -Full visual/functional walkthrough at all breakpoints × 4 themes. -Requires user to open the app in a browser and share screenshots or describe issues. - -**Breakpoint matrix:** -| Width | Context | Key checks | -|-------|---------|------------| -| 1800px+ | Wide desktop | Max-width constraint, sidebar positioning | -| 1400px | Standard desktop | 3:2 main/sidebar balance | -| 1100px | Tablet/narrow | Single column transition, pill appears | -| 900px | Small tablet | Tighter spacing, smaller numerals | -| 600px | Phone portrait | Stacked layout, no numeral gutter | -| 375px | Small phone | MRR pill position, bottom sheet | -| 780px landscape | Phone landscape | 2-col restored, sidebar visible | - -**Theme matrix:** Dark (default), Light, Glass, 70s Retro -**Total test grid:** 7 breakpoints × 4 themes = 28 combinations - -### Option B: Feature Work -- JSON quote import (load a previously exported .json file) -- Enhanced print/PDF with more layout control -- Sidebar focus mode refinements -- Additional nudge logic -- Any specific feature requests - -### Option C: Code Quality Pass -- Dead code removal across all modules -- CSS deduplication audit -- Magic number → token migration in components.css -- Mobile sync map completeness verification -- Export template class reference audit - -### Option D: Test Coverage Expansion -- Add DOM rendering tests (sidebar values match calculations) -- Add persistence round-trip tests -- Add export schema validation tests -- Increase from 88 to 120+ tests - ---- - -## PRICING REFERENCE - -``` -Users: M365 $140 (m2m) / $130 (annual) | BYOL $110 - ExtHrs +$25 | 1PWM +$9 | INKY +$8 | ZT +$55 -Endpoints: $35/ea | USB +$4 | BMB +$25 -Servers: $120/ea -ZT Net: $25/seat | $100/router -Admin: Floor $150 | Threshold $650 | ZT supplement +$250 | 1PWM 10% -VoIP: Basic $28 | Standard $35 | Premium $45 | Phone +$15 | Fax +$10 -Discounts: m2m 0% | 12mo 3% + 50% off onboarding | 24mo 5% + complimentary -HST: 13% (Ontario) -``` - ---- - -## WHAT WAS DONE IN PHASE 5 (for context) - -| Fix | Change | -|-----|--------| -| `aria-expanded` on toggles | 12 section/collapsible headers in HTML + JS dynamic update | -| Focus trap on reset modal | Tab cycles within modal when open | -| `aria-label` on steppers | All 12 +/- buttons have descriptive labels | -| Glass mobile scroll | `background-attachment: scroll` at ≤1100px | -| Mobile sync guard | Skips sync on desktop when panel closed; forces sync on open | -| Sync map gaps | Added `sidebarFocusClientName`, `sl-discount-detail`, `sl-value-onboarding-label` | -| FA icons invisible on `file://` | All 36 Sharp Solid SVG file refs → inline `data:image/svg+xml` URIs in components.css | - ---- - -## VERIFICATION COMMAND - -``` -node svsmspcalc/tests/test-quote-engine.js -``` - -88 tests, zero dependencies. Run after any pricing/engine/render changes. - ---- - -## CONTEXT MANAGEMENT - -After completing work: -- Update `docs/CHECKPOINT.md` with results -- If context is heavy, create `docs/STAGE4-SESSION-PROMPT.md` for the next chat -- Keep this document chain as the canonical handoff mechanism diff --git a/docs/STAGE4-SESSION-PROMPT.md b/docs/STAGE4-SESSION-PROMPT.md deleted file mode 100644 index 1e32b2f..0000000 --- a/docs/STAGE4-SESSION-PROMPT.md +++ /dev/null @@ -1,186 +0,0 @@ -# SVS MSP CALC — STAGE 4 SESSION PROMPT -# Post-Beta Feature & QA Sprint -# Generated: 2026-03-15 - ---- - -## WHERE WE ARE - -**Beta build: COMPLETE.** Sections I–III are production-quality. -**Accessibility/performance audit: COMPLETE.** Phase 5 fixes applied. -**Code quality pass: COMPLETE.** Phase 6 — hardcoded colors tokenized, CSS deduped, dead code removed. -**Tests:** 254/254 passing. -**Sections IV–VI:** Intentionally deferred as placeholders — do not activate. - -### Completed Stages -- **Stage 1** — Discovery audit (codebase mapping, doc generation) -- **Stage 2** — Beta build (Phases 1–4: bug fixes, visual polish, UX hardening, docs/QA) -- **Phase 5** — Accessibility/performance audit (aria-expanded, focus traps, stepper labels, glass scroll fix, mobile sync optimization) -- **Phase 5b** — Font Awesome icon fix (inline data URIs for file:// protocol) -- **Stage 3 / Phase 6** — Code quality pass (new `--sky` + `--transition-fast` tokens, button CSS dedup, hardcoded colors → color-mix(), dead null-check removed) - ---- - -## START EVERY SESSION BY READING - -1. `svsmspcalc/docs/CHECKPOINT.md` — current status, all completed work -2. `svsmspcalc/docs/MASTER-SESSION-PROMPT.md` — full architecture, constraints, priorities -3. `svsmspcalc/docs/QUICK-REF.md` — compact file map, DOM IDs, pricing, danger zones -4. This file — session goals and context - ---- - -## PROJECT SNAPSHOT - -**App:** SVS MSP CALC — live quote/pricing calculator for SVS Managed Services -**Type:** Static HTML + Vanilla JS + Modular CSS (no frameworks, no build tools, no npm) -**Used by:** SVS sales team, live on screen during prospect calls - -### Architecture -``` -svsmspcalc/ -├── SVS-MSP-Calculator.html # Stable HTML shell (65KB) -├── SVS-MSP-Calculator.js # Orchestration (350 lines) -├── quote-engine.js # Pure quote math (197 lines) -├── quote-pricing.js # Pricing defaults + CSV override (134 lines) -├── quote-render.js # DOM rendering + nudges (729 lines) -├── quote-persistence.js # localStorage save/restore (225 lines) -├── quote-export.js # Print/PDF + JSON export (299 lines) -├── quote-import.js # JSON quote import (50 lines) -├── theme-manager.js # 4-theme switching (121 lines) -├── mobile-sync.js # Mobile panel sync (275 lines) -├── SVS-MSP-Calculator.css # Manifest (@imports all CSS) -├── SVS-MSP-Calculator-tokens.css # Design tokens + CSS vars -├── SVS-MSP-Calculator-base.css # Global chrome -├── SVS-MSP-Calculator-layout.css # Grid, header, main/sidebar -├── SVS-MSP-Calculator-components.css # Section cards, controls, sidebar (66KB) -├── SVS-MSP-Calculator-responsive.css # Viewport/container overrides (16KB) -├── SVS-MSP-Calculator-print.css # Print-specific rules -├── SVS-MSP-Calculator-light.css # Light theme overrides -├── SVS-MSP-Calculator-glass.css # Glass theme (glassmorphism) -├── SVS-MSP-Calculator-70retro.css # 70s Retro theme overrides -├── package-prices.csv # Overrideable pricing (31 rows) -├── tests/ -│ └── test-quote-engine.js # 254 tests (Node.js, zero deps) -└── docs/ - ├── CHECKPOINT.md # Build status checkpoint - ├── MASTER-SESSION-PROMPT.md # Full architecture brief - ├── QUICK-REF.md # Compact reference - ├── README.md - ├── code-verification.md # Known-good baseline - ├── phase-roadmap.md # Phase status - ├── quote-rules.md # Business logic rules - ├── regression-checklist.md # Test procedures - ├── STAGE3-SESSION-PROMPT.md # Previous stage prompt - └── STAGE4-SESSION-PROMPT.md # This file -``` - ---- - -## HARD CONSTRAINTS (NON-NEGOTIABLE) - -1. DOM IDs are a contract — renaming breaks mobile sync (100+ pairs) -2. 254 tests must pass: `node svsmspcalc/tests/test-quote-engine.js` -3. localStorage keys unchanged: `svs-msp-quote-v1`, `svs-msp-quote-ref` -4. All 4 themes must work after every change -5. Mobile parity maintained -6. Print/PDF tested after CSS changes -7. No frameworks, no npm — vanilla only -8. Surgical changes only — read before editing -9. Sections IV–VI are placeholders — do not activate or build out - ---- - -## STAGE 4 GOALS — Choose priorities from this menu: - -### Option A: Browser-Based Manual QA -Full visual/functional walkthrough at all breakpoints × 4 themes. -Requires user to open the app in a browser and share screenshots or describe issues. - -**Breakpoint matrix:** -| Width | Context | Key checks | -|-------|---------|------------| -| 1800px+ | Wide desktop | Max-width constraint, sidebar positioning | -| 1400px | Standard desktop | 3:2 main/sidebar balance | -| 1100px | Tablet/narrow | Single column transition, pill appears | -| 900px | Small tablet | Tighter spacing, smaller numerals | -| 600px | Phone portrait | Stacked layout, no numeral gutter | -| 375px | Small phone | MRR pill position, bottom sheet | -| 780px landscape | Phone landscape | 2-col restored, sidebar visible | - -**Theme matrix:** Dark (default), Light, Glass, 70s Retro -**Total test grid:** 7 breakpoints × 4 themes = 28 combinations - -### Option B: Feature Work -- **JSON quote import** — load a previously exported .json file back into the calculator -- **Enhanced print/PDF** — more layout control, optional cover page, save-as-PDF flow -- **Sidebar focus mode refinements** — expand/collapse behavior, keyboard shortcuts -- **Additional nudge logic** — new contextual nudges based on quote configuration -- **Any specific feature requests** - -### Option C: Test Coverage Expansion — DONE -- ~~Add persistence round-trip tests~~ ✓ (6 tests) -- ~~Add export schema validation tests~~ ✓ (18 tests) -- ~~Add pricing integrity + engine edge cases~~ ✓ (89 tests) -- ~~Add import mapping + invariant tests~~ ✓ (36 tests) -- **Result: 88 → 250 tests (162 new)** -- Remaining: DOM rendering tests (requires JSDOM), theme token tests - -### Option D: Further Code Quality -- Spacing magic numbers → token migration (95+ instances of 14px/16px/20px) -- `--transition-fast` token adoption across components.css (remaining 0.15s instances) -- CSS selector specificity audit -- Print CSS hardening - ---- - -## WHAT WAS DONE IN PHASE 6 (for context) - -| Fix | Change | -|-----|--------| -| `--sky` token | New per-theme accent for import button: Dark `#38bdf8`, Light `#0e7490`, Glass `#7dd3fc`, Retro `#a34a14` | -| `--transition-fast` token | `0.15s` — used in layout.css button transitions | -| Button CSS dedup | `.btn-reset-quote` + `.btn-import-quote` merged into grouped selector (10 duplicate properties removed) | -| Hardcoded colors → tokens | 8 hardcoded rgba/hex values replaced with `var(--sky)`, `var(--amber)`, and `color-mix()` across 4 theme files | -| Dead null-check | `nudgeIndex == null ||` removed from quote-render.js (variable always initialized) | - -**Audit documented (not acted on):** -- `fmt()` duplication in render/export (intentional IIFE isolation) -- Spacing magic numbers (too many touchpoints) -- `console.warn()` statements (intentional error reporting) -- No dead functions/exports found across all 8 JS modules - ---- - -## PRICING REFERENCE - -``` -Users: M365 $140 (m2m) / $130 (annual) | BYOL $110 - ExtHrs +$25 | 1PWM +$9 | INKY +$8 | ZT +$55 -Endpoints: $35/ea | USB +$4 | BMB +$25 -Servers: $120/ea -ZT Net: $25/seat | $100/router -Admin: Floor $150 | Threshold $650 | ZT supplement +$250 | 1PWM 10% -VoIP: Basic $28 | Standard $35 | Premium $45 | Phone +$15 | Fax +$10 -Discounts: m2m 0% | 12mo 3% + 50% off onboarding | 24mo 5% + complimentary -HST: 13% (Ontario) -``` - ---- - -## VERIFICATION COMMAND - -``` -node svsmspcalc/tests/test-quote-engine.js -``` - -254 tests, zero dependencies. Run after any pricing/engine/render changes. - ---- - -## CONTEXT MANAGEMENT - -After completing work: -- Update `docs/CHECKPOINT.md` with results -- If context is heavy, create `docs/STAGE5-SESSION-PROMPT.md` for the next chat -- Keep this document chain as the canonical handoff mechanism diff --git a/docs/STAGE5-SESSION-PROMPT.md b/docs/STAGE5-SESSION-PROMPT.md deleted file mode 100644 index b7d69ee..0000000 --- a/docs/STAGE5-SESSION-PROMPT.md +++ /dev/null @@ -1,193 +0,0 @@ -# SVS MSP CALC — STAGE 5 SESSION PROMPT -# Post-Feature Sprint — QA, Polish & Next Features -# Generated: 2026-03-15 - ---- - -## WHERE WE ARE - -**Beta build: COMPLETE.** Sections I–III are production-quality. -**Accessibility/performance audit: COMPLETE.** Phase 5 fixes applied. -**Code quality pass: COMPLETE.** Phase 6 — hardcoded colors tokenized, CSS deduped, dead code removed. -**Test expansion: COMPLETE.** Phase 7 — 88 → 254 tests (pricing integrity, edge cases, export schema, persistence, import round-trip, invariants). -**Enhanced Print/PDF: COMPLETE.** Phase 8 — rep name, notes field, validity date, page breaks, CYA "Not Included" section. -**Tests:** 254/254 passing. -**Sections IV–VI:** Intentionally deferred as placeholders — do not activate. - -### Completed Stages -- **Stage 1** — Discovery audit (codebase mapping, doc generation) -- **Stage 2** — Beta build (Phases 1–4: bug fixes, visual polish, UX hardening, docs/QA) -- **Phase 5** — Accessibility/performance audit (aria-expanded, focus traps, stepper labels, glass scroll fix, mobile sync optimization) -- **Phase 5b** — Font Awesome icon fix (inline data URIs for file:// protocol) -- **Stage 3 / Phase 6** — Code quality pass (new `--sky` + `--transition-fast` tokens, button CSS dedup, hardcoded colors → color-mix(), dead null-check removed) -- **Stage 4 / Phase 7** — Test expansion (88 → 254 tests across 6 categories) -- **Stage 4 / Phase 8** — Enhanced Print/PDF (rep name, notes, validity date, page breaks, CYA section, JSON schema v1.1) - ---- - -## START EVERY SESSION BY READING - -1. `svsmspcalc/docs/CHECKPOINT.md` — current status, all completed work -2. `svsmspcalc/docs/MASTER-SESSION-PROMPT.md` — full architecture, constraints, priorities -3. `svsmspcalc/docs/QUICK-REF.md` — compact file map, DOM IDs, pricing, danger zones -4. This file — session goals and context - ---- - -## PROJECT SNAPSHOT - -**App:** SVS MSP CALC — live quote/pricing calculator for SVS Managed Services -**Type:** Static HTML + Vanilla JS + Modular CSS (no frameworks, no build tools, no npm) -**Used by:** SVS sales team, live on screen during prospect calls - -### Architecture -``` -svsmspcalc/ -├── SVS-MSP-Calculator.html # Stable HTML shell (65KB) -├── SVS-MSP-Calculator.js # Orchestration (350 lines) -├── quote-engine.js # Pure quote math (197 lines) -├── quote-pricing.js # Pricing defaults + CSV override (134 lines) -├── quote-render.js # DOM rendering + nudges (729 lines) -├── quote-persistence.js # localStorage save/restore (237 lines) -├── quote-export.js # Print/PDF + JSON export (320 lines) -├── quote-import.js # JSON quote import (166 lines) -├── theme-manager.js # 4-theme switching (121 lines) -├── mobile-sync.js # Mobile panel sync (275 lines) -├── SVS-MSP-Calculator.css # Manifest (@imports all CSS) -├── SVS-MSP-Calculator-tokens.css # Design tokens + CSS vars -├── SVS-MSP-Calculator-base.css # Global chrome -├── SVS-MSP-Calculator-layout.css # Grid, header, main/sidebar -├── SVS-MSP-Calculator-components.css # Section cards, controls, sidebar (67KB) -├── SVS-MSP-Calculator-responsive.css # Viewport/container overrides (16KB) -├── SVS-MSP-Calculator-print.css # Print-specific rules -├── SVS-MSP-Calculator-light.css # Light theme overrides -├── SVS-MSP-Calculator-glass.css # Glass theme (glassmorphism) -├── SVS-MSP-Calculator-70retro.css # 70s Retro theme overrides -├── package-prices.csv # Overrideable pricing (31 rows) -├── tests/ -│ └── test-quote-engine.js # 254 tests (Node.js, zero deps) -└── docs/ - ├── CHECKPOINT.md # Build status checkpoint - ├── MASTER-SESSION-PROMPT.md # Full architecture brief - ├── QUICK-REF.md # Compact reference - ├── README.md - ├── code-verification.md # Known-good baseline - ├── phase-roadmap.md # Phase status - ├── quote-rules.md # Business logic rules - ├── regression-checklist.md # Test procedures - ├── STAGE3-SESSION-PROMPT.md # Stage 3 prompt - ├── STAGE4-SESSION-PROMPT.md # Stage 4 prompt - └── STAGE5-SESSION-PROMPT.md # This file -``` - -### New in Phase 8 (Print/PDF Enhancements) -- **`id="repName"`** — text input below client name ("Prepared by"), persisted + exported -- **`id="quoteNotes"`** — textarea in sidebar before export buttons, persisted + exported -- **Print invoice** now includes: rep name in header/footer, notes section, computed "Valid until" date, page-break-safe tables, split config (included vs. "Not Included" CYA section) -- **JSON export schema** bumped to `v1.1` — new `repName` and `quoteNotes` fields -- **JSON import** handles new fields (backward-compatible with v1.0) - ---- - -## HARD CONSTRAINTS (NON-NEGOTIABLE) - -1. DOM IDs are a contract — renaming breaks mobile sync (100+ pairs) -2. 254 tests must pass: `node svsmspcalc/tests/test-quote-engine.js` -3. localStorage keys unchanged: `svs-msp-quote-v1`, `svs-msp-quote-ref` -4. All 4 themes must work after every change -5. Mobile parity maintained -6. Print/PDF tested after CSS changes -7. No frameworks, no npm — vanilla only -8. Surgical changes only — read before editing -9. Sections IV–VI are placeholders — do not activate or build out - ---- - -## STAGE 5 GOALS — Choose priorities from this menu: - -### Option A: Browser-Based Manual QA -Full visual/functional walkthrough at all breakpoints × 4 themes. -Requires user to open the app in a browser and share screenshots or describe issues. - -**Breakpoint matrix:** -| Width | Context | Key checks | -|-------|---------|------------| -| 1800px+ | Wide desktop | Max-width constraint, sidebar positioning | -| 1400px | Standard desktop | 3:2 main/sidebar balance | -| 1100px | Tablet/narrow | Single column transition, pill appears | -| 900px | Small tablet | Tighter spacing, smaller numerals | -| 600px | Phone portrait | Stacked layout, no numeral gutter | -| 375px | Small phone | MRR pill position, bottom sheet | -| 780px landscape | Phone landscape | 2-col restored, sidebar visible | - -**Theme matrix:** Dark (default), Light, Glass, 70s Retro -**Total test grid:** 7 breakpoints × 4 themes = 28 combinations - -### Option B: Feature Work -- **Sidebar keyboard shortcuts** — Ctrl+P print, Ctrl+E export, Ctrl+R reset, Escape close focus mode -- **Additional nudge logic** — new contextual nudges (e.g. "no endpoints but users set", "VoIP seats ≠ user count", high admin-to-MRR ratio) -- **Any specific feature requests** - -### Option C: Further Code Quality -- Spacing magic numbers → token migration (95+ instances of 14px/16px/20px) -- `--transition-fast` token adoption across components.css (remaining 0.15s instances) -- CSS selector specificity audit -- Print CSS hardening - ---- - -## WHAT WAS DONE IN PHASES 7–8 (for context) - -### Phase 7: Test Expansion -| Group | Tests | Coverage | -|-------|-------|----------| -| Pricing DEFAULTS integrity | 34 | Key existence, types, spec values, frozen, ordering | -| Engine edge cases | 55 | Admin thresholds, 100-user scale, string coercion, invalid inputs, VoIP/ZT edge cases | -| Export JSON schema | 22 | Payload structure, field types, version, labels, pricing sub-object, new fields | -| Persistence state shape | 6 | JSON round-trip, engine compatibility, zero-state | -| Import payload mapping | 12 | Term reverse-map, export→import→engine round-trip | -| Quote output invariants | 24 | 6 configs × 4 invariants | - -### Phase 8: Enhanced Print/PDF -| # | Enhancement | Details | -|---|------------|---------| -| P1 | Notes field | `