super-ux 0.5.0 → 0.8.0

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
@@ -4,6 +4,67 @@ All notable changes to this project are documented in this file. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions
5
5
  follow [SemVer](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.8.0] - 2026-07-23
8
+
9
+ ### Added
10
+
11
+ - **ux-flows skill** — the HOW layer (`docs/ux/flows.md`): task analysis →
12
+ mermaid user flows (screens, explicit branches, recoverable error edges,
13
+ all entry points) → screen/state tables → optional ASCII wireframes and
14
+ storyboards. Workflows: Design (forward), Reverse (backwards mode for
15
+ existing products, `inferred` tags with file:line evidence), Update,
16
+ Improve (heuristic evaluation → traced before/after redesign proposals).
17
+ - **ux-design-principles.md** — the agent's thinking playbook: the 7-step
18
+ pipeline (research → define → structure → specify → visualize → build →
19
+ verify) with forward and backwards modes, task-analysis method, flow and
20
+ screen rules, heuristics PRN-01..10 (after Nielsen) and cognitive
21
+ principles PRN-11..16 with audit questions, the improvement procedure,
22
+ wireframe/storyboard conventions, anti-patterns.
23
+ - **ux-contract v3** — scenarios become use cases: steps as `user action ->
24
+ system response`, new `Alt paths` field, `Traces` includes `FLW-NN`;
25
+ traceability now covers flows (every node and edge needs a scenario).
26
+ - `ux-audit`: verifies code against flow diagrams (nodes reachable, edges
27
+ wired, states present); new `heuristics` scope (`[PRN-NN]` findings).
28
+ - `/ux-flows` command; `/ux` menu grows to 11 actions including "Improve
29
+ existing UX"; `/ux-init` now chains foundation → flows → scenarios.
30
+
31
+ ## [0.7.0] - 2026-07-20
32
+
33
+ ### Added
34
+
35
+ - **Best-practices catalog** (`skills/references/best-practices.md`) — a
36
+ living, tag-indexed catalog (48 entries seeded from "48 Laws of
37
+ Subscription App Success", Botsi 2025): each practice has an ID (BP-NNN),
38
+ own-words summary, mechanism, applicability, and tags (stage / mechanism /
39
+ domain / effect) so agents can select what fits the product. Growable per
40
+ in-file rules.
41
+ - Integration: `ux-scenarios` consults the catalog when drafting (practices
42
+ applied only when they serve a traced job); `ux-foundation` uses it for
43
+ journey opportunities; `ux-audit` gains an optional practices pass
44
+ (suggestion findings `[BP-NNN]`, never blockers); `/ux` menu gains a
45
+ "Best-practices review" action.
46
+
47
+ ## [0.6.0] - 2026-07-20
48
+
49
+ ### Added
50
+
51
+ - **ux-foundation skill** — the WHY layer: personas, Jobs to Be Done (with
52
+ forces and success metrics), customer journey maps (stage / action /
53
+ touchpoint / emotion / pain / opportunity), user stories (INVEST,
54
+ Given/When/Then acceptance criteria). New file contract
55
+ `docs/ux/foundation.md`, template, `/ux-foundation` command, Cursor rule.
56
+ - **ux-contract v2** — scenarios gain a `Traces:` field (story/job/journey
57
+ stage) and traceability rules: every must/should story covered, every
58
+ scenario serves a story or job; orphans are findings.
59
+ - **Full-context audits** — `ux-audit` loads traced acceptance criteria as
60
+ checks and judges whether the implementation serves the job, not just
61
+ renders elements; new `coverage` scope audits the chain itself; fix plans
62
+ prioritized by Frequency × Severity × Solvability.
63
+ - **`/ux` action menu** — single entry point now reports status across all
64
+ three layers and offers the applicable actions (init/update foundation,
65
+ build scenarios, validate chain, audit, coverage audit, plan fixes) with
66
+ one recommended default.
67
+
7
68
  ## [0.5.0] - 2026-07-19
8
69
 
9
70
  ### Changed
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # super-ux
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/super-ux)](https://www.npmjs.com/package/super-ux)
4
+ [![CI](https://github.com/ssheleg/super-ux/actions/workflows/validate.yml/badge.svg)](https://github.com/ssheleg/super-ux/actions/workflows/validate.yml)
5
+ [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
6
+
3
7
  Scenario-driven UI development for AI agents (Claude Code + Cursor).
4
8
 
5
9
  AI agents generate poor interfaces because they build UI without a model of
@@ -13,25 +17,31 @@ the codebase.
13
17
 
14
18
  ```mermaid
15
19
  flowchart LR
16
- A[Feature idea] --> B[Draft scenarios]
17
- B --> C{Validate vs existing base:\nconflicts, overlaps, gaps}
18
- C -->|approved| D[Design & build UI]
20
+ W[Personas + JTBD\n+ journeys + stories] --> B[Derive scenarios\nwith Traces]
21
+ A[Feature idea] --> V{Which job? Which stage?\nValidate vs base}
22
+ W --> V
23
+ V -->|approved| D[Design & build UI]
19
24
  D --> E[Update scenarios\nin the same change]
20
- E --> F[/ux-audit: batched check\nof code vs every scenario/]
21
- F --> G[Audit report + findings]
22
- G --> H[Plan fixes] --> D
25
+ E --> F[/ux-audit: code vs scenarios\nwith story acceptance criteria/]
26
+ B --> F
27
+ F --> G[Report + findings]
28
+ G --> H[Prioritized fix plan\nFreq × Severity × Solvability] --> D
23
29
  ```
24
30
 
25
31
  ## What's inside
26
32
 
27
33
  | Piece | Purpose |
28
34
  |---|---|
29
- | skill `ux-scenarios` | Maintain `docs/ux/scenarios.md`: init (greenfield interview or existing-code inventory sweep), update on every change, validate for conflicts and coverage |
30
- | skill `ux-audit` | Batched audit loop: trace every scenario through the code, verdicts PASS/PARTIAL/FAIL/BLOCKED with `file:line` evidence, report into `docs/ux/audits/` |
31
- | `/ux` | **The one command**: sets everything up if missing (rule, `docs/ux/`, initial base), otherwise status report + one suggested next action. Idempotent |
32
- | `/ux-init` `/ux-update` `/ux-audit` `/ux-rule` | Direct controls over the skills; `/ux-rule` installs the hard rule into the project's CLAUDE.md |
33
- | `cursor/rules/*.mdc` | The same methodology for Cursor (always-on hard rule + two agent-requested rules) |
34
- | `templates/` | Skeletons for the scenario base, the audit report, and the CLAUDE.md rule snippet |
35
+ | skill `ux-foundation` | The WHY layer (`docs/ux/foundation.md`): personas, Jobs to Be Done with forces, customer journey maps, user stories with Given/When/Then acceptance criteria |
36
+ | skill `ux-flows` | The HOW layer (`docs/ux/flows.md`): task analysis, mermaid user flows (branches, error recovery, entry points), screen states, optional wireframes; heuristic UX evaluation and traced redesign proposals for existing products |
37
+ | skill `ux-scenarios` | Maintain `docs/ux/scenarios.md`: use-case scenarios (action system response, alt paths) covering every flow node/edge, `Traces:` to stories and flows, validated for conflicts, coverage, and traceability |
38
+ | skill `ux-audit` | Batched audit loop with full context: code vs every scenario + its story's acceptance criteria; verdicts PASS/PARTIAL/FAIL/BLOCKED with `file:line` evidence; `coverage` scope audits the chain itself |
39
+ | `/ux` | **The one command**: sets up whatever is missing, then status across all layers + a menu of applicable actions with one recommended default. Idempotent |
40
+ | `/ux-foundation` `/ux-flows` `/ux-init` `/ux-update` `/ux-audit` `/ux-rule` | Direct controls; `/ux-rule` installs the hard rule into the project's CLAUDE.md |
41
+ | [ux-design-principles.md](plugins/super-ux/skills/references/ux-design-principles.md) | How the agent thinks: the design pipeline (forward + backwards), task analysis, flow rules, heuristics PRN-01..16, improvement procedure, anti-patterns |
42
+ | `cursor/rules/*.mdc` | The same methodology for Cursor (always-on hard rule + three agent-requested rules) |
43
+ | `templates/` | Skeletons for the foundation, scenario base, audit report, and the CLAUDE.md rule snippet |
44
+ | [best-practices.md](plugins/super-ux/skills/references/best-practices.md) | Living, tag-indexed catalog of proven UX/growth practices (seeded with 48 subscription-app laws); agents filter by stage/domain tags and apply what serves a traced job |
35
45
 
36
46
  The format all of them share is locked in
37
47
  [scenario-format.md](plugins/super-ux/skills/references/scenario-format.md):
@@ -99,16 +109,20 @@ rules after a new release.
99
109
 
100
110
  ## Typical cycle
101
111
 
102
- 1. `/ux` — first run sets everything up and builds the base (greenfield:
103
- interview first, UI later; existing code: inventory sweep, scenarios for
104
- everything found, gaps flagged in both directions).
112
+ 1. `/ux` — first run sets everything up: foundation first (greenfield:
113
+ interview about personas, jobs, journeys; existing code:
114
+ reverse-engineer them), then scenarios derived from the stories with
115
+ full traceability.
105
116
  2. Work normally; every user-facing change updates the base in the same
106
117
  change (the always-on rule catches it; `/ux-update` for manual control).
107
- 3. `/ux` any time status + the one next action; `/ux-audit` — batched
108
- verification of code vs scenarios; report lands in
109
- `docs/ux/audits/YYYY-MM-DD.md`, statuses update in the base.
110
- 4. Turn FAIL/PARTIAL findings into a plan with your planning workflow; build;
111
- repeat.
118
+ New feature ideas are validated against the chain first: which job,
119
+ which journey stage, which story.
120
+ 3. `/ux` any time status across layers + action menu; `/ux-audit` —
121
+ batched verification of code vs scenarios (with acceptance criteria);
122
+ `/ux-audit coverage` — chain gaps. Reports land in
123
+ `docs/ux/audits/YYYY-MM-DD.md`.
124
+ 4. Findings become a prioritized fix plan (Frequency × Severity ×
125
+ Solvability) via your planning workflow; build; repeat.
112
126
 
113
127
  ## Development
114
128
 
@@ -120,11 +134,15 @@ is semver; bump `marketplace.json` + `plugin.json` + `CHANGELOG.md` together
120
134
  ## По-русски (коротко)
121
135
 
122
136
  Проблема: агенты генерируют плохие интерфейсы, потому что строят UI без
123
- модели поведения пользователя. super-ux делает базу UX-сценариев
124
- (`docs/ux/scenarios.md`) источником правды: сценарии пишутся и валидируются
125
- **до** интерфейса, обновляются тем же изменением, что и поведение, и служат
126
- чек-листом для регулярных аудитов кода (`/ux-audit`) с вердиктами
127
- PASS/PARTIAL/FAIL/BLOCKED и доказательствами `file:line`. Установка: в
137
+ модели поведения пользователя. super-ux строит цепочку: **персоны → JTBD →
138
+ карта пути user stories UX-сценарии → аудиты → планы фиксов**.
139
+ Foundation (`docs/ux/foundation.md`) отвечает на «зачем», сценарии
140
+ (`docs/ux/scenarios.md`) источник правды поведения, трассируются к
141
+ stories. Всё пишется и валидируется **до** интерфейса, обновляется тем же
142
+ изменением, что и поведение. Аудиты (`/ux-audit`) проверяют код против
143
+ сценариев вместе с acceptance criteria, вердикты PASS/PARTIAL/FAIL/BLOCKED
144
+ с доказательствами `file:line`; `/ux-audit coverage` ищет дыры в самой
145
+ цепочке. Установка: в
128
146
  Claude Code — `/plugin marketplace add ssheleg/super-ux`, в Cursor —
129
147
  `npx super-ux --cursor <проект>`. Дальше одна команда — `/ux`: сама ставит
130
148
  правило и базу, а при повторных запусках показывает статус и следующий шаг.
@@ -5,13 +5,16 @@ alwaysApply: true
5
5
 
6
6
  # UX scenarios — hard rule (super-ux)
7
7
 
8
- - `docs/ux/scenarios.md` is the source of truth for all user-facing behavior.
8
+ - `docs/ux/scenarios.md` is the source of truth for all user-facing behavior;
9
+ `docs/ux/foundation.md` (personas, JTBD, journeys, user stories) is the WHY
10
+ layer scenarios trace to.
9
11
  - Any change that touches user-facing behavior MUST update
10
12
  `docs/ux/scenarios.md` in the same change (add/adjust scenarios, statuses,
11
13
  coverage). New user-facing behavior with no scenario is a blocker, not a
12
14
  warning.
13
- - Any new feature or project STARTS with scenarios: draft them, validate
14
- against existing scenarios (conflicts, overlaps, gaps), get them approved —
15
- only then design and build UI.
16
- - Scenario maintenance workflows: see the `ux-scenarios` rule. Codebase
17
- audits against the base: see the `ux-audit` rule.
15
+ - Any new feature or project STARTS with the chain: which job does it serve,
16
+ which journey stage, which story — then scenarios, validated against the
17
+ existing base (conflicts, overlaps, gaps), approved — only then design and
18
+ build UI. An idea serving no job is challenged, not silently accepted.
19
+ - Workflows: `ux-foundation` rule (WHY layer), `ux-scenarios` rule
20
+ (scenario base), `ux-audit` rule (evidence-backed audits).
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: "Design or improve user flows (docs/ux/flows.md): apply for task analysis, flow diagrams, screen states, wireframes, heuristic UX evaluation, or any 'improve/fix the UX' request"
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # ux-flows — Design HOW Users Move
7
+
8
+ `docs/ux/flows.md` is the HOW layer between foundation (stories) and
9
+ scenarios: task analysis + mermaid user flows + screen states. IDs
10
+ `FLW-NN`, sequential, never reused; superseded flows kept with a note.
11
+
12
+ ## Flow entry (ux-contract v3)
13
+
14
+ Fields: `Traces` (story/job IDs), `Goal` (observable end state), `Entry
15
+ points` (ALL of them), `Success exit`, `Task analysis` (numbered
16
+ user-visible micro-steps), mermaid `flowchart` (screens as
17
+ `Screen: <name>`, decisions as diamonds, `*_err` error nodes with labeled
18
+ recovery edges), `Screens & states` table (each screen:
19
+ loading/empty/error/success + key elements, one primary action).
20
+
21
+ ## Design rules
22
+
23
+ - One flow = one user goal. Task analysis first: cut/merge/default-away
24
+ every step that doesn't serve the job; pull first value as early as
25
+ possible; happy path ≤5 steps or justified.
26
+ - Every decision an explicit branch; every error edge lands on recovery —
27
+ dead ends are defects; all entry points enumerated.
28
+ - Wireframes optional (`docs/ux/wireframes/FLW-NN.md`, ASCII hierarchy +
29
+ primary action, not pixels); storyboard only when usage context drives
30
+ design.
31
+ - Backwards mode (existing product): reconstruct flows as they ARE from
32
+ code with file:line evidence, tag `inferred` until confirmed; gaps
33
+ between is/should become the improvement backlog.
34
+
35
+ ## Improving existing UX
36
+
37
+ Walk flows against heuristics: system status visible; user's words not
38
+ jargon; undo/cancel/back everywhere; consistency; error prevention over
39
+ error messages; recognition over recall; shortcuts for frequent users;
40
+ minimalist screens; recovery-oriented error text; help in context;
41
+ progressive disclosure; smart defaults; limited choices; familiar
42
+ patterns; prominent primary targets; polished peaks and endings.
43
+
44
+ Violations: `[PRN-NN] node — issue — severity`. Redesign proposals MUST
45
+ trace to a pain/job/story, cite the principle/practice, show flow
46
+ before → after, and state the expected observable effect. Prioritize
47
+ Frequency × Severity × Solvability. Cascade approved changes to scenarios.
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: "Maintain docs/ux/foundation.md (personas, Jobs to Be Done, customer journeys, user stories): apply when defining who the users are and why they use the product, during product discovery, or when scenarios need a WHY layer to trace to"
3
+ alwaysApply: false
4
+ ---
5
+
6
+ # ux-foundation — The WHY Layer
7
+
8
+ `docs/ux/foundation.md` holds the chain scenarios trace to: **Personas
9
+ (P-NN) → Jobs to Be Done (JTBD-NN) → Customer journeys (JRN-NN) → User
10
+ stories (ST-NNN)**. IDs sequential, never reused; dropped entries kept, not
11
+ deleted.
12
+
13
+ ## Formats (ux-contract v2)
14
+
15
+ - **Persona `P-NN`:** 1–3 sentences, grounded in data/observation,
16
+ recognizable by a real user.
17
+ - **JTBD `JTBD-NN`:** `When <situation>, I want to <motivation>, so I can
18
+ <outcome>` + personas + type (functional|emotional|social) + forces
19
+ (push/pull/anxiety/habit) + success metric (user outcome, never a
20
+ feature).
21
+ - **Journey `JRN-NN`** (persona × job): stage table — `# | Stage | User
22
+ action | Touchpoint | Emotion (1-5) | Pain | Opportunity`; end-to-end
23
+ (before/during/after product); opportunity priority = Frequency ×
24
+ Severity × Solvability.
25
+ - **Story `ST-NNN`:** `As <persona>, I want <capability>, so that
26
+ <benefit>` + Traces (JTBD, JRN/stage) + Given/When/Then acceptance
27
+ criteria + priority (must|should|could) + status
28
+ (proposed|validated|delivered|dropped). Quality bar: INVEST.
29
+
30
+ ## Workflows
31
+
32
+ - **Init (interview):** greenfield — ask one question at a time: who uses
33
+ it; what situation triggers the job; what outcome = success; walk the
34
+ path end-to-end; derive stories from pains and outcomes.
35
+ - **Init (reverse):** existing product — reverse-engineer jobs/personas
36
+ from the UI and scenarios; tag entries observed vs inferred; flag
37
+ features serving no job and jobs with no support.
38
+ - **Update:** locate by ID, update, mark dropped (never delete), then
39
+ cascade: list scenarios tracing to changed IDs and update them in the
40
+ same change.
41
+ - **Validate:** integrity (IDs, references), quality (no features in JTBD,
42
+ INVEST, observable criteria), coverage (persona→job→journey→story chain
43
+ complete; must/should stories have scenarios).
44
+
45
+ Evidence beats opinion: mark unvalidated guesses as assumptions
46
+ (desirability/viability/feasibility/usability) and test risky ones before
47
+ building on them.
@@ -14,7 +14,12 @@ Title, then header comment, then: **Index** table
14
14
  (`| ID | Title | Feature | Persona | Status | Last audit |`), **Personas**
15
15
  (1–3 sentences each), **Scenarios** grouped by feature.
16
16
 
17
- Scenario entry fields (exact names): `Persona`, `Feature`, `Entry point`,
17
+ When `docs/ux/foundation.md` exists, scenarios derive from it: draft per
18
+ user story / journey stage, fill `Traces:` (e.g. `ST-001 (JTBD-01,
19
+ JRN-01/#2)`), enforce traceability — every must/should story covered by ≥1
20
+ scenario, every scenario serves ≥1 story or job.
21
+
22
+ Scenario entry fields (exact names): `Persona`, `Feature`, `Traces`, `Entry point`,
18
23
  `Preconditions`, `Steps` (numbered, one user action each), `Expected result`
19
24
  (observable), `UI elements` (every button/field/link/dialog/toast involved —
20
25
  this is what audits check), `States covered` (loading|empty|error|success),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-ux",
3
- "version": "0.5.0",
3
+ "version": "0.8.0",
4
4
  "description": "Scenario-driven UI development for AI agents (Claude Code + Cursor): scenario base, scenario-first hard rule, evidence-backed UX audits. This package is the installer CLI.",
5
5
  "bin": {
6
6
  "super-ux": "bin/super-ux.js"
@@ -0,0 +1,29 @@
1
+ # User Flows
2
+
3
+ <!-- Managed with super-ux (ux-contract v3). The HOW layer: task analysis
4
+ and user flows. Scenarios in scenarios.md trace to FLW-IDs and must cover
5
+ every node and edge. -->
6
+
7
+ <!-- ### FLW-01: <user goal>
8
+ - **Traces:** ST-001 (JTBD-01, JRN-01/#2)
9
+ - **Goal:** <observable end state for the user>
10
+ - **Entry points:** <all of them: screen, deep link, push, empty-state CTA>
11
+ - **Success exit:** <where the user lands on success>
12
+ - **Task analysis:**
13
+ 1. <user-visible micro-step; cut everything that doesn't serve the job>
14
+ - **Flow:**
15
+
16
+ ```mermaid
17
+ flowchart TD
18
+ A[Screen: <name>] -->|<action>| B{<decision?>}
19
+ B -->|ok| C[Screen: <next>]
20
+ B -->|fail| B_err[<error + recovery>]
21
+ B_err --> A
22
+ ```
23
+
24
+ - **Screens & states:**
25
+ | Screen | States | Key elements |
26
+ |--------|--------|--------------|
27
+ | <name> | loading, empty, error, success | <elements, one primary action> |
28
+ - **Wireframe:** wireframes/FLW-01.md (optional)
29
+ -->
@@ -0,0 +1,39 @@
1
+ # UX Foundation
2
+
3
+ <!-- Managed with super-ux (ux-contract v2). The WHY layer: personas, jobs
4
+ to be done, customer journeys, user stories. Update when the understanding
5
+ of users changes; scenarios in scenarios.md trace to the IDs defined here. -->
6
+
7
+ ## Personas
8
+
9
+ <!-- ### P-01: <name>
10
+ 1-3 sentences: who they are, what they know, what they want. Grounded in
11
+ data/observation, recognizable by a real user. -->
12
+
13
+ ## Jobs to Be Done
14
+
15
+ <!-- ### JTBD-01: <short job name>
16
+ - **Statement:** When <situation>, I want to <motivation>, so I can <expected outcome>.
17
+ - **Personas:** P-01
18
+ - **Type:** functional | emotional | social
19
+ - **Forces:** push: <...>; pull: <...>; anxiety: <...>; habit: <...>
20
+ - **Success metric:** <observable user outcome, not a feature>
21
+ -->
22
+
23
+ ## Customer journeys
24
+
25
+ <!-- ### JRN-01: <persona> — <job> (JTBD-01)
26
+ | # | Stage | User action | Touchpoint | Emotion (1-5) | Pain | Opportunity |
27
+ |---|-------|------------|------------|---------------|------|-------------|
28
+ -->
29
+
30
+ ## User stories
31
+
32
+ <!-- ### ST-001: <short name>
33
+ - **Story:** As <persona>, I want <capability>, so that <benefit>.
34
+ - **Traces:** JTBD-01, JRN-01/#2
35
+ - **Acceptance criteria:**
36
+ - Given <precondition>, when <action>, then <observable result>.
37
+ - **Priority:** must | should | could
38
+ - **Status:** proposed
39
+ -->