From 0c35f56bb9faae5fef108fd7873c168aa507d0e5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 29 Oct 2026 13:09:32 +0000 Subject: [PATCH] Sync middleware product-ui guidance. Write docs/guidance/product-ui.md and add the marked guidance block to AGENTS.md so agents read the product-ui profile before changing this repository. Co-authored-by: harsh --- AGENTS.md | 7 +++++++ docs/guidance/product-ui.md | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 docs/guidance/product-ui.md diff --git a/AGENTS.md b/AGENTS.md index 5c4bd672..e7e2a645 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,13 @@ An Nx monorepo (Angular 21, standalone components, NgRx, Tailwind v4) with two a - `apps/36-blocks`: the customer dashboard and the marketing site. - `apps/36-blocks-widget`: an embeddable auth widget, built into one script (proxy-auth.js) that customer sites load and call through `window.initVerification(config)`. + +## Guidance for this kind of repository + +Kept by the middleware (version 046fbf2131b2). Read these before changing anything here: +- [docs/guidance/product-ui.md](docs/guidance/product-ui.md) + + Both apps are client-only and call a backend "proxy" API that lives in another repo. ## Commands diff --git a/docs/guidance/product-ui.md b/docs/guidance/product-ui.md new file mode 100644 index 00000000..a4880ba4 --- /dev/null +++ b/docs/guidance/product-ui.md @@ -0,0 +1,10 @@ + + +Product UI work: the product must stay coherent for the person in the middle of a task. +- Follow the journey before and after the changed step: navigation, shared components, state, saved preferences, permissions, analytics events, responsiveness, accessibility, loading, empty and error states, and recovery. +- A reported defect in one place usually has siblings: inspect the shared component, its callers and sibling flows; fix the confirmed instances within scope; keep intentional differences and record them. +- Reuse the design system, tokens and existing components. Do not introduce a parallel pattern for one screen. +- Keep business rules and API behaviour shared; UI changes must not fork them. +- Verify in the browser where possible and say what you verified. A working button is not a finished task if the end-to-end outcome still fails. +- For different roles, check what each role sees and can do after the change. +- A/B tests need no backend: when this prompt has an Experiments section, assign the variant in the browser and send exposure and conversion events with its snippet (hash assignment, sendBeacon to the events URL with the publishable key, both read from the site's environment variables, never written in the code), fire-and-forget: the page never waits for the middleware and works the same when it is down. Without that section, report a blocker whose "needed" is "Experiments enabled for this repository in the middleware (allowed origins) and experiment defined", not a missing API.