@mushi-mushi/ux 0.3.1 → 0.5.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mushi-mushi/ux
2
2
 
3
- > **Your AI wrote it. Mushi Mushi tells you why it broke.**
3
+ > **Your AI built it. Mushi Mushi makes it better.**
4
4
 
5
5
  For people who build with an AI coding agent and keep hearing that a screen is cramped, unreadable or broken on a phone. This [Mushi Mushi](https://github.com/kensaurus/mushi-mushi) tool finds the UX problems on every screen of your app before your users do, and lets the coding agent you already pay for fix them one screen at a time. Every change is measured. Only the ones that help are kept, on a branch you review.
6
6
 
@@ -74,8 +74,10 @@ With `--steps` (on by default in the studio) the agent first plans 2–5 small c
74
74
  | `mushi-ux run --dev "<cmd with {port}>"` | Run the loop from the terminal |
75
75
  | `mushi-ux discover --url <url>` | List the screens, change nothing |
76
76
  | `mushi-ux audit --url <live url> --profile-dir <dir>` | Find UX bugs on signed-in screens and file them as Mushi Mushi reports (below) |
77
+ | `mushi-ux scorecard --url <live url> --profile-dir <dir>` | Score every page 1–10 on a written UX rubric and file the root causes (below) |
77
78
  | `mushi-ux explore --url <live url> --profile-dir <dir>` | Let a model use the signed-in app like a careless user; file the errors a replay confirms (below) |
78
79
  | `mushi-ux fresh-eyes --url <landing> --goal "<text>"` | Try one goal as a first-time visitor; time the path and file what stops them (below) |
80
+ | `mushi-ux clips --url <url> --release <id> --flow "name:/a,/b"` | Record short clips of your top flows into a release kit for a product video (below) |
79
81
  | `mushi-ux login --url <url>` | Sign in once, in a visible browser |
80
82
  | `mushi-ux models` / `mushi-ux skills` | What `--model` and `--skill` accept |
81
83
  | `mushi-ux open <runId>` | The local dashboard for a past run |
@@ -108,6 +110,25 @@ mushi-ux audit --url https://example.com/admin \
108
110
  - `--profile-dir` opens the profile with your installed Chrome (`--channel chromium` for one Chromium made). A signed-out profile stops the run: sign it in once by hand.
109
111
  - Output: `~/.cache/mushi/ux-audits/<run>/` (summary, findings, screenshots).
110
112
 
113
+ ## Score every page: the UX scorecard
114
+
115
+ `mushi-ux scorecard` scores each page of the live app 1–10 against a written rubric, groups what is wrong into root causes, and can file the top causes as Mushi Mushi reports (ADR 0067).
116
+
117
+ ```bash
118
+ mushi-ux scorecard --url https://example.com/admin/ \
119
+ --profile-dir ~/.playwright-cli-profiles/example \
120
+ --paths-file pages.txt --sync --file --dry-run
121
+ ```
122
+
123
+ - **The rubric:** clarity, hierarchy and density, consistency with the app's own pages, states (loading, empty, error, locked), truthfulness (does the page claim what its own data contradicts), copy, accessibility and speed. A page's score follows its worst dimension. The settle time and axe cap the speed and accessibility scores.
124
+ - **What it reads:** the tab title, headings, visible text (with banners outside the content), controls, a screenshot about a second into the load and one once the page settles, the settle time and axe. It never clicks, only navigates.
125
+ - **Pages:** `--path` (repeatable) or `--paths-file`, else the routes in your source (`--routes-from <dir>`), else a crawl under the URL. `/team?view=sso` and `/team?view=billing` are two pages. A console with its own nav registry should pass that list as `--paths-file`; `--routes-from` reads route files and `<Route path>` literals, and misses views kept in the query string.
126
+ - **Who scores:** `--score-via server` (default) sends each page to Mushi, which uses your app's AI key, then Mushi's. `claude-code`, `cursor` or `anthropic-api` score on your machine.
127
+ - **The viewport:** desktop first, 1440×900. Set it per app on the console, or pass `--viewport 390x844`.
128
+ - **Root causes:** problems that come from one shared thing (a component, a banner, a status rule) become one cause with every page it touches. So do two pages that disagree about the same fact. `--file` files at most 5 causes a run, one report per cause. A cause that is already open only gets its pages refreshed.
129
+ - **`--from-captures <dir>`** scores captures another browser driver wrote as `<dir>/pages/<page>/{facts.json, early.png, settled.png}`. Use it when the signed-in profile is already open in another browser.
130
+ - **Output:** `scorecard.md` and `scorecard.json` in the run folder. `--sync` shows the run on the console (UX runs → Scorecard), with each page's trend across runs.
131
+
111
132
  ## Explore signed-in screens
112
133
 
113
134
  `mushi-ux explore` runs short sessions where a model picks what a curious or careless user would do next (forms with odd input, back and reload mid-task, double-clicks, filters that match nothing), in the same read-only browser and cached profile as the audit. The model only chooses actions; code decides what is a bug.
@@ -141,6 +162,19 @@ mushi-ux fresh-eyes --url https://example.com --goal "get my first report" \
141
162
  - What the model reads: the page's main content first, then its navigation, never a control a mouse user cannot see. A window a click opens on the app (a sign-in popup) is followed. A wait that hits its 20 s cap is marked on its step and never counted as the app's time. `--steps` defaults to 30, or 60 with a test account; the minted account's user id is in the log and timeline (never its password).
142
163
  - Output: `timeline.md` (each step, its screenshot, app wait and reading time, where it stalled), `result.json` and `shots/`. `--out <dir>` chooses the folder. `--sync` mirrors the run to the console's First-time user test page (a `--dry-run` too, marked "look around only"). `--request-stdin` reads the run (its id, start page, goal, visitors and test accounts) as JSON on stdin: how a local worker runs a test the console queued, so nothing it was given sits in argv.
143
164
 
165
+ ## Release-kit clips
166
+
167
+ `mushi-ux clips` records each flow you name as one short Playwright video (WebM), read-only through the same write guard, and uploads it into a release's kit, where a product-video tool picks it up (Releases → the release → Release kit).
168
+
169
+ ```bash
170
+ mushi-ux clips --url https://staging.example.com --release <releaseId> \
171
+ --flow "signup:/,/signup" --flow "pricing:/pricing" --viewport 390x844
172
+ ```
173
+
174
+ - **Opt-in:** the app turns on "Record clips for release kits" in the kit first; until then the upload is refused and the clips stay in `--out` (default `.mushi-ux/clips`).
175
+ - **Capped:** at most 5 flows of 6 screens, each clip stops before `--max-seconds` (default 30, at most 60) and is dropped above `--max-mb` (default 25, at most 100, and the app's own cap).
176
+ - A clip is source footage, not an App Store preview: Mushi does not transcode. `--no-upload` records only. Needs `MUSHI_API_KEY` / `MUSHI_PROJECT_ID` to upload; `--profile-dir` records signed in.
177
+
144
178
  ## On GitHub Actions
145
179
 
146
180
  Copy [`docs/templates/mushi-ux.yml`](https://github.com/kensaurus/mushi-mushi/blob/master/docs/templates/mushi-ux.yml) to `.github/workflows/mushi-ux.yml` and set its `dev-command`. Start it from the Actions tab, or with **Run in the cloud** on the console's [UX runs](https://kensaur.us/mushi-mushi/docs/admin/ux-runs) page. It uses `cursor-cloud`, sees the app signed out, and opens one draft PR. Its pushes go to `mushi-ux/**`, so add `branches-ignore: ['mushi-ux/**']` to any CI that runs on every push.