Skip to content

DES-374: Add lotus-audit-web skill (customer-facing web only)#7

Merged
OJBoon merged 1 commit into
mainfrom
feat/lotus-audit-web
May 11, 2026
Merged

DES-374: Add lotus-audit-web skill (customer-facing web only)#7
OJBoon merged 1 commit into
mainfrom
feat/lotus-audit-web

Conversation

@OJBoon
Copy link
Copy Markdown
Collaborator

@OJBoon OJBoon commented May 11, 2026

Jira: DES-374 — Lotus Design System (Epic)

Summary

Mirrors lotus-audit-ios for JustPark's customer-facing web surfaces. Same single Figma source of truth, same four-stage pipeline (parallel extract → parallel analyse → optional sub-agents → assembly), same gitignored repo-relative output with optional vault mirror.

Customer-facing scope (per [[JustPark Jargon]])

  • frontend/web — main consumer SSR SPA (primary B2C)
  • frontend/pay — Quick Pay, no-login payment flow
  • justpark/resources/views/{mobile,site,bookings,listings,referrals,auth,static,npp} — legacy PHP/Blade still serving consumer pages
  • justpark/public/assets/scss/{app,site} — legacy SCSS asset pipeline

Explicitly out of scope (deferred / different audit)

  • Operator portals — Luna (host portal), Solar (internal ops), Terra (business accounts), Enforcement. Future lotus-audit-web-portals.
  • B2B components, browser-extension, qr — internal utilities.
  • Admin/dashboard/call centre Blade views, email templates (343 files — different styling rules, future audit).
  • justpark-ui itself — it defines tokens, doesn't consume them.

Storyblok callout (in the report)

Storyblok-hosted marketing pages + brand partner themes (NCP, O2) can't be scanned via code. Notably: Storyblok intentionally allows Lotus token overrides at runtime via the CSS-custom-property surface exposed in _colors.scss — that's the designed partner-theming mechanism. The report's Scope section flags this as a future token-architecture question (which CSS variables are public override surface vs. internal).

Architecture

.claude/skills/lotus-audit-web/
├── SKILL.md              ← procedure (4-stage mermaid diagram)
├── apps.yaml             ← scan-target manifest, primary/secondary tiers
└── scripts/
    ├── fetch-figma-tokens.mjs   (identical to iOS — single Figma source)
    ├── parse-web-tokens.mjs     NEW: parses justpark-ui SCSS Lotus files
    │                              with CSS-var override-surface detection
    ├── colour-parity.mjs        NEW: Figma ↔ web _colors.scss diff
    ├── scan-web.mjs             NEW: per-app, per-file scanner for
    │                              .tsx / .scss / .css / .blade.php
    ├── token-candidates.mjs     NEW: web-flavoured candidate finder
    │                              (CSS px detection + JSX inline styles)
    └── build-report.mjs         NEW: assembles markdown report

Smoke-test (live repos + Figma)

Full pipeline ran end-to-end against frontend HEAD + justpark HEAD with the Lotus Figma file focused. 353-line report, key headlines:

  • 1,210 files scanned across customer-facing surfaces
  • 13% Lotus compliance at the top line (vs iOS's 37%)
  • 14,329 hardcoded violations dominated by 5,299+ raw Npx SCSS values and 633+ hardcoded font-size: declarations

Findings already surfaced

  • 10px × 997 and 20px × 712 uses across web — both already exist on iOS (spacingSemiSmall, spacingXMedium) but not in Figma's Padding collection. Same cross-platform gap iOS already surfaced for 10pt.
  • 51 Figma semantic colour tokens have no web equivalent (mostly the expanded Tertiary / Tapped / Link-* semantic layer — same gap iOS has).
  • Web radius scale is a perfect match with Figma (vs iOS's broken radiusFull=32).
  • Web is sRGB throughout — no P3 conversion needed (one less complexity vs iOS).
  • No typography tokens on web yet — biggest single-investment Lotus opportunity per the Recommendations section.

Test plan

  • parse-web-tokens.mjs parses 26 primitives + 22 semantic + 9 spacing + 7 radius from @justpark/ui/src/scss/lotus/.
  • colour-parity.mjs correctly identifies match / mismatch / missing-web / web-only.
  • scan-web.mjs correctly counts compliant + legacy + hardcoded across .tsx + .scss + .blade.php in customer-facing apps.
  • token-candidates.mjs surfaces 10px × 997 as a "new-candidate" relative to existing Figma + web tokens.
  • build-report.mjs assembles all sections, mermaid diagrams, Storyblok callout, recommendations.
  • Mirror to vault works; index updated.
  • Sub-agent (Stage 3) flow — documented in SKILL.md but not exercised in this PR; runs on first invocation of /lotus-audit-web.

Followups

  • Sub-agent fix proposals on first real run — same architecture as iOS; will trigger automatically when the skill is invoked.
  • Operator-portals skill (lotus-audit-web-portals) — Luna + Solar + Terra + Enforcement.
  • Email template auditresources/views/emails/ (343 files) needs its own scanner with inline-CSS-aware rules.
  • Drift comparison between consecutive audits (still open from iOS too).
  • Web typography parity — once web Lotus adds typography tokens, run the same atom-level parity as iOS.

🤖 Generated with Claude Code

Mirrors the lotus-audit-ios architecture for JustPark's customer-facing
web surfaces. Same single Figma source of truth, same four-stage pipeline
(parallel extract → parallel analyse → optional sub-agents → assembly),
same gitignored repo-relative output with optional vault mirror via
LOTUS_AUDIT_MIRROR.

Customer-facing scope (per JustPark Jargon):

- frontend/web — main consumer SSR SPA (primary B2C)
- frontend/pay — Quick Pay, no-login payment flow
- justpark/resources/views/{mobile,site,bookings,listings,referrals,
  auth,static,npp} — legacy PHP/Blade still serving consumer pages
- justpark/public/assets/scss/{app,site} — legacy SCSS asset pipeline

Explicitly excluded (operator/internal):

- Luna (host portal), Solar (internal ops), Terra (business accounts),
  Enforcement, B2B components, browser-extension (internal dev tool),
  qr utility, admin/call centre/dashboard Blade views, email templates
  (different audit), justpark-ui itself (definitions, not consumers)

Storyblok-hosted pages (marketing landing, brand partner themes) are
out of scope for a code-based audit but flagged in the report. Notably:
Storyblok ALLOWS Lotus token overrides at runtime via the
CSS-custom-property surface exposed in _colors.scss — that's the
designed partner-theming mechanism. The audit's Scope section calls
this out as a future token-architecture question.

Files:

- .claude/skills/lotus-audit-web/SKILL.md             — procedure + stage diagram
- .claude/skills/lotus-audit-web/apps.yaml            — scan-target manifest
- .claude/skills/lotus-audit-web/scripts/
  - fetch-figma-tokens.mjs  — copy of iOS skill's fetcher (single Figma)
  - parse-web-tokens.mjs    — NEW: parses _colorPrimitives + _colors
                                (with CSS-var override-surface detection)
                                + _spacing + _radius into structured JSON
  - colour-parity.mjs       — NEW: Figma semantic ↔ web _colors.scss
                                tokens, normalised name matching
  - scan-web.mjs            — NEW: per-app, per-file counter for .tsx /
                                .scss / .css / .blade.php; compliant /
                                legacy / hardcoded patterns
  - token-candidates.mjs    — NEW: web-flavoured candidate finder, with
                                CSS-context px detection + JSX inline
                                style detection
  - build-report.mjs        — NEW: assembles markdown report; per-app
                                rollup, mermaid pie + bar charts, full
                                Storyblok callout, Recommendations section

Smoke-test against the live repos (frontend HEAD + justpark HEAD, Lotus
Figma file focused): 1,210 files scanned across customer-facing apps,
13% top-line compliance, 14,329 hardcoded violations dominated by
5,299+ raw `Npx` SCSS values and 633+ hardcoded font-size declarations.
The latter confirms the known gap: web Lotus has no typography tokens.

Top findings the audit surfaces:

- `10px` × 997 and `20px` × 712 uses across web — both already exist on
  iOS (spacingSemiSmall, spacingXMedium) but not in Figma's Padding
  collection. Cross-platform divergence to resolve.
- 51 Figma semantic colour tokens have no web equivalent (mostly the
  expanded Tertiary / Tapped / Link-* layer Figma added without web
  catching up — same gap iOS has).
- Web radius scale is a perfect match with Figma (vs iOS's broken
  radiusFull=32).
- Web is sRGB throughout — no P3 conversion needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@gitstream-cm
Copy link
Copy Markdown

gitstream-cm Bot commented May 11, 2026

🚨 gitStream Monthly Automation Limit Reached 🚨

Your organization has exceeded the number of pull requests allowed for automation with gitStream.
Monthly PRs automated: 250/250

To continue automating your PR workflows and unlock additional features, please contact LinearB.

@OJBoon OJBoon merged commit 2416b48 into main May 11, 2026
8 checks passed
@OJBoon OJBoon deleted the feat/lotus-audit-web branch May 11, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant