@exxatdesignux/ui 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.11
4
+
5
+ ### Patch Changes
6
+
7
+ - **Senior-UX discovery gate now actually gates.** The 0.5.6 senior-UX layer was missing two enforcement teeth that made it skippable in practice — confirmed by a real-world failure where the agent was prompted "create new page of student details page instead of what we have currently" and immediately wrote 4 files without posting a brief. The fix tightens three documents:
8
+ - **`.cursor/rules/exxat-ux-discovery-protocol.mdc`** — gains a literal **`STOP — read before you write any file`** banner before the H1, an explicit fires-on / does-not-fire-on table (rebuild / redesign / replace / "instead of what we have" / "from scratch" all fire), and a new **MUST #0**: *"Output the brief, then WAIT. Do not bundle the brief and the first file edit in the same turn. After posting the brief, end your turn with 'Ready to build — confirm or edit.' Resume only on the user's next message."* Adds an explicit MUST NOT for "Skip the brief because the prompt sounds like a refactor."
9
+ - **`.cursor/skills/exxat-senior-ux/SKILL.md`** — description string now lists the trigger verbs that previously slipped through (`rebuild`, `redesign`, `replace`, `redo`, `refresh`, `modernize`, `re-imagine`, `"make a new version"`, `"instead of what we have"`, `"from scratch"`) so Cursor's skill auto-discovery picks up refactor-shaped prompts. Adds a new **Hard gate** section under "When to load" and restructures the five-step protocol as **sequential checkpoints** with **step 3 (Synthesis) ending the turn** — the user's reply is the green light to step 4 (Build).
10
+ - **`.cursor/rules/exxat-ds-agents.mdc` Top-of-stack** — renamed the brief instruction from a passive bullet to a bold **"Brief-before-code is a CHECKPOINT, not a preamble"** sub-section that lists the protocol as three numbered actions and ends with: *"If your next tool call would be `write_file` / `str_replace` / `create_file` and you have not posted a brief + received user confirmation, you are violating the protocol. Stop, post the brief, end the turn."*
11
+ - **Why it failed silently before:** the rule's trigger language was "**new** route, page, template, wizard" — the agent reading "create new page of student details page **instead of what we have currently**" semantically parsed "instead of what we have" as a refactor of an existing route, so the gate didn't fire. The MUST list also said "before writing files" which the agent could satisfy by writing the brief + 200 lines of code in the same turn — not a checkpoint.
12
+ - **Consumer impact:** `npx exxat-ui sync-extras` overwrites `.cursor/rules/exxat-ux-discovery-protocol.mdc`, `.cursor/rules/exxat-ds-agents.mdc`, and `.cursor/skills/exxat-senior-ux/SKILL.md` with the tightened versions. No code changes in the UI library; no app routes are modified.
13
+
3
14
  ## 0.5.10
4
15
 
5
16
  ### Patch Changes
@@ -15,12 +15,22 @@ Before implementing or reviewing **list / table / board / dashboard / data-heavy
15
15
 
16
16
  **`.cursor/skills/exxat-senior-ux/SKILL.md`** is the persona every other rule and skill is downstream of. It defines the **five-step protocol** (Discovery → Research → Synthesis → Build → Audit), the **brief format**, and the **push-back triggers**. Pair with:
17
17
 
18
- - **`.cursor/rules/exxat-ux-discovery-protocol.mdc`** — brief-before-code gate + question bank per surface type.
18
+ - **`.cursor/rules/exxat-ux-discovery-protocol.mdc`** — brief-before-code gate + question bank per surface type. **`alwaysApply: true`** — fires on every design task automatically.
19
19
  - **`.cursor/rules/exxat-ux-principles.mdc`** — 20 principles (P1–P20) split into **always-follow (P1–P8)** and **default-follow with stated reason (P9–P20)**. Every deviation MUST be named in the design brief.
20
20
  - **`apps/web/docs/modern-saas-patterns.md`** — the 12 modern SaaS patterns (M1–M12) the DS works against; cite by `(Mx)` codes.
21
21
  - **`apps/web/docs/jobs/`** — canonical references per **job-to-be-done** (start with `record-detail.md`). If no job doc matches, write one.
22
22
 
23
- On any **new** route / page / hub / detail / wizard / settings / dashboard / overlay, output a **design brief** in chat BEFORE writing files. On trivial edits (copy tweaks, single-class restyles, bug fixes), skip the brief.
23
+ ### Brief-before-code is a CHECKPOINT, not a preamble
24
+
25
+ On any task that **decides what a surface should be** — including *new* pages **and** *rebuilds / redesigns / replacements of existing pages* — the protocol is:
26
+
27
+ 1. **Post the brief in chat. END THE TURN with "Ready to build — confirm or edit."**
28
+ 2. **Wait for the user's next message.** Silence is not consent until the next user reply arrives.
29
+ 3. **Only then** call code-mutating tools.
30
+
31
+ Treat **"rebuild X"**, **"redesign X"**, **"replace what we have"**, **"make a new version of X"**, **"from scratch"**, and **"instead of what we currently have"** identically to "create new X" — all of them make a design decision, all of them require the brief checkpoint. The only exempt edits are trivial ones (copy tweaks, single-class restyles, bug fixes, dep bumps, ESLint passes, adding a column to an existing `HubTable` without changing IA).
32
+
33
+ If your next tool call would be `write_file` / `str_replace` / `create_file` and you have not posted a brief + received user confirmation, **you are violating the protocol**. Stop, post the brief, end the turn.
24
34
 
25
35
  **Reviewing existing work?** Load **`.cursor/skills/exxat-ux-audit/SKILL.md`** instead. It runs an EXISTING surface (route / file / component / customer-app path / screenshot) through the same P1–P20 / M1–M12 rubric and outputs a **Blocker / Issue / Nit** findings report with code citations, a fix plan, and an offer to auto-apply text-only Blocker fixes. Triggers: "audit X", "review the X page", "is this following DS?", "what's wrong with this screen", "do a UX review", or a route URL with a symptom.
26
36
 
@@ -1,25 +1,72 @@
1
1
  ---
2
- description: Exxat DS — output a design brief before writing files for any new surface; question bank by surface type
2
+ description: Exxat DS — STOP before code on any surface design (new, rebuild, redesign, replace); output a design brief and WAIT for user go-ahead
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
6
  # Exxat DS — UX discovery protocol
7
7
 
8
- On any task that creates a **new route, page, template, wizard, or
9
- significant component**, the assistant MUST output a **design brief in chat**
10
- BEFORE writing files. Brief format is defined in
11
- `.cursor/skills/exxat-senior-ux/SKILL.md` §3.
8
+ ## STOP read before you write any file
9
+
10
+ If the user's prompt asks you to **design, create, build, rebuild, redesign,
11
+ replace, redo, refresh, modernize, re-imagine, or "make a new version of"**
12
+ any **page, route, screen, hub, detail view, wizard, settings section,
13
+ dashboard, dialog, sheet, drawer, panel, layout, or significant component**:
14
+
15
+ 1. **Do NOT write code, do NOT edit files, do NOT call edit tools yet.**
16
+ 2. **Output the design brief** (template below) in chat.
17
+ 3. **Wait for the user to reply** with `yes` / `proceed` / `ship it` / edits.
18
+ 4. **Only then** move to implementation.
19
+
20
+ If your next tool call would be `write_file`, `str_replace`, `create_file`,
21
+ or any code-mutating action **and** you have not posted a brief and received
22
+ go-ahead, you are violating this rule. **Stop and post the brief.**
23
+
24
+ ## When this gate fires (and when it doesn't)
25
+
26
+ This gate fires on **any task that decides what a surface should look like
27
+ or how it works** — whether the surface exists today or not. Treat
28
+ "replace what we have" and "create from scratch" identically — both need a
29
+ brief, because both make a design decision.
30
+
31
+ **Fires (brief required):**
32
+
33
+ - "Create a new student detail page."
34
+ - "Rebuild the dashboard."
35
+ - "Redesign the settings screen instead of what we have."
36
+ - "Make a new version of the placements table."
37
+ - "Replace the current onboarding flow."
38
+ - "Build a wizard for adding a site."
39
+ - "Design a sheet for inviting collaborators."
40
+ - User attaches a screenshot / mockup / Figma link and asks to "build this".
41
+
42
+ **Does NOT fire (brief not required, edit freely):**
43
+
44
+ - Single-class restyle of an existing surface that already follows DS rules.
45
+ - Copy / label edits.
46
+ - Bug fixes (a11y violation, broken state, wrong data).
47
+ - Dependency bumps, ESLint passes, type fixes, test-only changes.
48
+ - Adding a new column / filter to an *existing* `HubTable` that doesn't
49
+ change the page's IA.
50
+
51
+ When in doubt, ask: **"Am I deciding what this surface should be?"** Yes →
52
+ brief. No → edit.
12
53
 
13
54
  ## MUST
14
55
 
15
- 1. **No code without a brief.** New surfaces require the brief. Trivial edits
16
- to existing surfaces (copy tweak, single-class change, bug fix, refactor)
17
- are exempt.
56
+ 0. **Output the brief, then WAIT.** The brief is a checkpoint, not a
57
+ preamble. Do not bundle the brief and the first file edit in the same
58
+ turn. After posting the brief, end your turn with an explicit
59
+ "Ready to build — confirm or edit." prompt. Resume only on the user's
60
+ next message.
61
+ 1. **No code without a confirmed brief.** "Confirmed" means the user wrote
62
+ `yes`, `proceed`, `ship it`, `LGTM`, `build it`, accepted edits, or asked
63
+ a follow-up that implies acceptance. Silence is not consent.
18
64
  2. **Cite a reference.** Every brief names **one repo reference** + **two
19
- modern SaaS analogues** (Linear / Notion / Stripe / Figma / Vercel / etc.)
20
- that solve the same **job-to-be-done**. Cite the SaaS analogues by
21
- product name + pattern codes from
22
- `apps/web/docs/modern-saas-patterns.md` (e.g. `Linear issue detail (M1, M4, M7)`).
65
+ modern SaaS analogues** (Linear / Notion / Stripe / Figma / Vercel /
66
+ Linear / Airtable / Coda / Height / etc.) that solve the same
67
+ **job-to-be-done**. Cite the SaaS analogues by product name + pattern
68
+ codes from `apps/web/docs/modern-saas-patterns.md` (e.g.
69
+ `Linear issue detail (M1, M4, M7)`).
23
70
  3. **Name principles + breaks.** Brief lists the principles applied
24
71
  (`exxat-ux-principles.mdc`) and any deviations with one-sentence reasons.
25
72
  **Never-break** principles (P1–P8) cannot be deviated from.
@@ -30,6 +77,11 @@ BEFORE writing files. Brief format is defined in
30
77
 
31
78
  ## MUST NOT
32
79
 
80
+ - **Skip the brief because the prompt sounds like a refactor.** "Rebuild",
81
+ "redesign", "replace", "instead of what we have", and "from scratch" are
82
+ design decisions, not refactors. Brief required.
83
+ - **Post a brief and then write 8 files in the same turn.** That's not a
84
+ brief — that's a press release. End the turn after the brief.
33
85
  - Generate files before the brief.
34
86
  - Ask more than **3** questions in one batch.
35
87
  - Ask questions whose answer is already in the prompt, the file tree, or
@@ -1,11 +1,16 @@
1
1
  ---
2
2
  name: exxat-senior-ux
3
3
  description: >-
4
- Make the agent behave like a senior UX designer — understand the problem
5
- before designing, study how modern SaaS solves the same job, propose a
6
- brief before writing code, follow principles, know when to break them,
7
- audit your own work. Load FIRST on any design / UI / page / hub / detail /
8
- wizard / settings task, BEFORE opening AGENTS.md or any blueprint.
4
+ Make the agent behave like a senior UX designer — STOP before writing
5
+ code, understand the problem, study how modern SaaS solves the same job,
6
+ propose a design brief, WAIT for user go-ahead, then build. Load FIRST
7
+ on ANY task that decides what a surface should be create, build, design,
8
+ rebuild, redesign, replace, redo, refresh, modernize, re-imagine, "make a
9
+ new version", "instead of what we have", "from scratch" — for any page,
10
+ route, hub, detail view, wizard, settings section, dashboard, dialog,
11
+ sheet, drawer, panel, layout, or significant component. Also load when
12
+ the user attaches a screenshot / mockup / Figma link and asks to build
13
+ it. Load BEFORE opening AGENTS.md, blueprints, or any other DS doc.
9
14
  user-invocable: true
10
15
  ---
11
16
 
@@ -17,15 +22,32 @@ products). You design for the **user's job**, not the user's words.
17
22
 
18
23
  ## When to load this skill
19
24
 
20
- - The user asks for a **new** page, route, hub, detail screen, wizard,
21
- settings section, dashboard, dialog/sheet flow, or significant component.
22
- - The user attaches a screenshot or mockup.
23
- - The user asks "how should I build X" / "design X" / "make it modern".
24
- - Any task where the prompt names a *surface* rather than a single line of
25
- code.
25
+ Load on **any task that decides what a surface should be** whether the
26
+ surface exists today or not. The user's verb is the strongest signal:
26
27
 
27
- Do **not** load on: typo fixes, dependency bumps, ESLint passes, single-class
28
- restyles of an existing surface that already follows DS rules.
28
+ | Phrase in the prompt | Load? |
29
+ |---|---|
30
+ | "create / build / make / add a new page / hub / detail / wizard / dashboard" | **Yes** |
31
+ | "rebuild / redesign / replace / redo / refresh / modernize / re-imagine X" | **Yes** |
32
+ | "make a new version of X" / "instead of what we have currently" / "from scratch" | **Yes** |
33
+ | "design X" / "how should I build X" / "make it modern" | **Yes** |
34
+ | User attaches a screenshot, mockup, Figma link, or legacy app capture | **Yes** |
35
+ | "Move that button up two pixels" / "change copy" / "fix the type error" | **No** |
36
+ | "Bump dep" / "ESLint pass" / "single-class restyle of a DS-compliant page" | **No** |
37
+ | "Add a column to the existing HubTable" / "another filter chip" | **No** *(unless IA changes)* |
38
+
39
+ When in doubt, ask yourself: **"Am I deciding what this surface should be,
40
+ or am I editing what's already decided?"** Decide → load. Edit → don't.
41
+
42
+ ## Hard gate (read this if you remember nothing else)
43
+
44
+ If you loaded this skill, your **next message must be the design brief**
45
+ (template in §3.1). It must NOT also contain `write_file` / `str_replace`
46
+ / `create_file` / edit tool calls. End the turn after the brief with
47
+ "Ready to build — confirm or edit." The user's reply is your green light.
48
+
49
+ Silence, a thumbs-up, or "ok" all count as confirmation. A new design
50
+ question or "actually let's change X" means revise the brief, don't build.
29
51
 
30
52
  ## Mindset (5 lines, memorize)
31
53
 
@@ -38,7 +60,11 @@ restyles of an existing surface that already follows DS rules.
38
60
  5. **The DS is the vocabulary, not the design.** Composition is the means;
39
61
  clarity for the user is the end.
40
62
 
41
- ## The five-step protocol (mandatory on new surfaces)
63
+ ## The five-step protocol (mandatory on any surface decision)
64
+
65
+ The five steps are **sequential checkpoints**, not a single turn. Each
66
+ checkpoint ends with you yielding to the user — except step 4 (Build) and
67
+ step 5 (Audit), which run together.
42
68
 
43
69
  ### 1. Discovery — ask, infer, or state assumptions
44
70
 
@@ -50,10 +76,37 @@ Use the **question bank by surface type** in
50
76
  `.cursor/rules/exxat-ux-discovery-protocol.mdc`.
51
77
 
52
78
  If the user said "no questions, build it", still output the brief + your
53
- assumptions, then build.
79
+ assumptions.
54
80
 
55
81
  ### 2. Research — recognize the pattern, don't reinvent
56
82
 
83
+ Run research **before posting the brief in step 3**, so the brief can name
84
+ specific references. (See research methods below.)
85
+
86
+ ### 3. Synthesis — post the brief and STOP
87
+
88
+ After research, post the brief (template below). **End your turn here** with
89
+ the explicit prompt:
90
+
91
+ > *Ready to build — confirm or edit.*
92
+
93
+ Do **not** call any code-mutating tool (`write_file`, `str_replace`,
94
+ `create_file`, `edit_notebook`, MCP write tools) in this turn. The user's
95
+ next message is your green light.
96
+
97
+ Acceptable confirmations:
98
+
99
+ - Plain `yes`, `proceed`, `ship it`, `LGTM`, `build it`, `go ahead`.
100
+ - Implicit acceptance — a follow-up question that assumes the brief
101
+ (e.g. "and add a section for X").
102
+ - Silence followed by a new design question — treat as accepted.
103
+
104
+ If the user replies with edits ("change the pattern to a sheet", "drop the
105
+ timeline section"), revise the brief and post again. Only build after a
106
+ confirmed brief.
107
+
108
+ ### Research methods (used inside step 2)
109
+
57
110
  1. Check this repo first — does a canonical reference solve the same **job**?
58
111
  See `apps/web/docs/jobs/`.
59
112
  2. If unfamiliar, call **Mobbin** `search_screens` for the **job type**
@@ -67,7 +120,7 @@ assumptions, then build.
67
120
  5. Extract **patterns** (IA, hierarchy, action placement), never pixels
68
121
  (`exxat-no-image-pixel-copy.mdc`).
69
122
 
70
- ### 3. Synthesis output a one-screen brief
123
+ ### 3.1 Brief template (copy verbatim into chat)
71
124
 
72
125
  ```
73
126
  Problem: <one sentence — the user's pain, not the feature>
@@ -82,7 +135,7 @@ Out of scope: <what this surface intentionally does not do>
82
135
  Open questions: <max 2; ideally 0>
83
136
  ```
84
137
 
85
- Then build against the brief. Every decision references it.
138
+ End the turn with: *Ready to build confirm or edit.*
86
139
 
87
140
  ### 4. Build — compose, don't invent
88
141
 
@@ -10,7 +10,7 @@ declare function useAppTheme(): {
10
10
  brand: Brand;
11
11
  setBrand: (b: Brand) => void;
12
12
  /** The user's preference: "system" | "normal" | "high" | "windows" */
13
- contrastPref: "system" | "normal" | "high" | "windows";
13
+ contrastPref: "normal" | "high" | "system" | "windows";
14
14
  /** The resolved contrast mode actually applied to the DOM. */
15
15
  contrast: ContrastMode;
16
16
  /** Set the contrast preference. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exxatdesignux/ui",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "Exxat shared design system (components, hooks, tokens). Monorepo setup: clone repo then pnpm bootstrap at workspace root — see github.com/ExxatDesign/Exxat-DS-Workspace README.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Exxat Design",