sniff-qa 0.4.0 → 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
@@ -41,7 +41,18 @@ npx sniff-qa --url https://myapp.com # production URL
41
41
  Sniff ships as an MCP server. Add it to your editor, then ask your AI to scan.
42
42
 
43
43
  <details>
44
- <summary><b>Claude Code</b></summary>
44
+ <summary><b>Claude Code plugin marketplace</b> (one-command install)</summary>
45
+
46
+ ```bash
47
+ claude plugin marketplace add Aboudjem/10x
48
+ claude plugin install sniff@10x
49
+ ```
50
+
51
+ This installs sniff as a Claude Code plugin from the [10x marketplace](https://github.com/Aboudjem/10x). Skills, commands, and the MCP server are wired up automatically.
52
+ </details>
53
+
54
+ <details>
55
+ <summary><b>Claude Code (MCP server only)</b></summary>
45
56
 
46
57
  ```bash
47
58
  claude mcp add sniff-qa npx sniff-qa --mcp
@@ -110,9 +121,9 @@ clawhub install sniff-qa
110
121
  ```
111
122
  </details>
112
123
 
113
- Then ask: *"Scan this project for issues"* or *"Check accessibility on localhost:3000"*
124
+ Then ask: *"Scan this project for issues"* or *"Check accessibility on localhost:3000"* or *"Discover and run E2E tests"*
114
125
 
115
- **MCP tools:** `sniff_scan` (source) · `sniff_run` (browser) · `sniff_report` (results)
126
+ **MCP tools:** `sniff({ mode: "scan" | "run" | "discover" | "report" })` — unified entry point. Plus `sniff_install` when Playwright's Chromium is missing. The legacy per-mode tools (`sniff_scan`, `sniff_run`, `sniff_discover`, `sniff_report`) remain available but are deprecated in v0.5 and will be removed in v0.7.
116
127
 
117
128
  ### Install as a dev dependency
118
129
 
@@ -141,9 +152,12 @@ npx sniff-qa # scan source + auto-detect
141
152
  npx sniff-qa --url https://myapp.com # scan source + specific URL
142
153
  npx sniff-qa ./path/to/project # scan a specific directory
143
154
  npx sniff-qa --ci # CI mode (JUnit output, no AI explorer)
155
+ npx sniff-qa --verbose # show classifier top 3 + matched signals
156
+ npx sniff-qa discover --dry-run # preview generated scenarios, no browser
157
+ npx sniff-qa discover --force-app-type saas # skip classification, treat as SaaS
144
158
  ```
145
159
 
146
- Sniff auto-detects your dev server by reading `package.json` scripts and probing common ports (3000, 5173, 8080, 4200). If it finds a running server, browser checks run automatically.
160
+ Sniff auto-detects your dev server by reading `package.json` scripts plus `vite.config`, `nuxt.config`, `astro.config`, and `angular.json`, then probing the framework's default port *and* the next 20 after it (to catch auto-increment when the default is taken). If a port responds with framework markers (Next.js, Vite, Nuxt, Astro, Remix, SvelteKit, Angular), browser checks run automatically. Ghost-process ports like macOS AirPlay on `:5000` no longer collide.
147
161
 
148
162
  ---
149
163
 
@@ -210,10 +224,15 @@ sniff --version Show version
210
224
  | `--no-browser` | Source only even if `--url` is set |
211
225
  | `--max-steps <n>` | Limit AI explorer steps (default: 50) |
212
226
  | `--no-headless` | Show the browser window |
227
+ | `--headed` | Alias for `--no-headless` |
213
228
  | `--format html,json,junit` | Choose report formats |
214
229
  | `--fail-on critical,high` | Severities that cause non-zero exit |
215
230
  | `--track-flakes` | Track test flakiness across runs |
216
231
  | `--json` | JSON output for scripts |
232
+ | `--verbose` | Print classifier top-3 guesses and matched signals per dimension |
233
+ | `--dry-run` | Discover: generate scenarios without launching browser or writing reports |
234
+ | `--force-app-type <type>` | Discover: bypass the classifier (e.g. `saas`, `ecommerce`, `booking`) |
235
+ | `--app-type <types>` | Discover: filter classifier guesses to these app types (comma-separated) |
217
236
 
218
237
  </details>
219
238
 
@@ -244,7 +263,9 @@ API discovery also supports **Fastify**, **Hono**, **tRPC**, and **GraphQL**.
244
263
  Sniff works with zero config. Only create a config file if you want to customize.
245
264
 
246
265
  ```bash
247
- npx sniff-qa init
266
+ npx sniff-qa init # auto-detects: .ts if TypeScript, .mjs if ESM, .js otherwise
267
+ npx sniff-qa init --ts # force TypeScript config
268
+ npx sniff-qa init --js # force JavaScript config (respects package.json "type")
248
269
  ```
249
270
 
250
271
  <details>
@@ -346,7 +367,11 @@ sniff discover # run against the detected dev server
346
367
  sniff discover --regenerate-only # write sniff-scenarios/ and exit (no run)
347
368
  ```
348
369
 
349
- `sniff discover` reads your source (Prisma, Drizzle, TypeORM, Zod, GraphQL, OpenAPI, TS types), classifies what the app is (ecommerce, booking, saas, social, content, crm, auth-only, marketing, admin), generates happy-path journeys with real personas, enumerates edge variants (invalid email, XSS, payment declined, empty cart, offline, and more), and drives everything through Playwright.
370
+ `sniff discover` reads your source (Prisma, Drizzle, TypeORM, Zod, GraphQL, OpenAPI, TS types), classifies what the app is (ecommerce, booking, saas, social, content, crm, auth-only, marketing, admin) with route tokens in **English, French, Spanish, German, Portuguese, and Italian** (a French SaaS on `/fr/tableau-de-bord` classifies correctly), generates happy-path journeys with real personas, enumerates edge variants (invalid email, XSS, payment declined, empty cart, offline, and more), and drives everything through Playwright.
371
+
372
+ Pass `--verbose` to see the top-3 candidates and every matched signal — useful for understanding *why* a classification happened. Pass `--force-app-type <type>` to skip classification entirely. Pass `--dry-run` to preview scenarios without launching a browser or writing reports.
373
+
374
+ **Multilingual projects supported.** The classifier matches French, Spanish, German, Portuguese (BR/PT), and Italian equivalents for every signature token, so a French SaaS on `/fr/tableau-de-bord` classifies the same as an English one on `/dashboard`.
350
375
 
351
376
  **What you get:**
352
377
 
@@ -365,11 +390,15 @@ sniff discover --regenerate-only # write sniff-scenarios/ and exit (no run)
365
390
  | `--realism <profile>` | `robot`, `careful-user`, `casual-user` (default), `frustrated-user`, `power-user` |
366
391
  | `--seed <n>` | Replay a specific random seed |
367
392
  | `--only <filter>` | Filter scenarios by id substring or app type |
368
- | `--app-type <types>` | Force app types (comma-separated) |
393
+ | `--app-type <types>` | Filter classifier guesses to these app types (comma-separated, kept for back-compat) |
394
+ | `--force-app-type <type>` | Bypass the classifier entirely — treat the app as this type |
395
+ | `--verbose` | Print classifier breakdown (top 3 guesses + matched signals per dimension) |
396
+ | `--dry-run` | Generate scenarios without launching the browser or writing reports |
369
397
  | `--regenerate` | Regenerate `sniff-scenarios/` before running |
370
398
  | `--regenerate-only` | Regenerate and exit (no browser) |
371
399
  | `--force-regenerate` | Overwrite hand-edits without prompting |
372
400
  | `--non-interactive` | Skip prompts and the production-URL countdown |
401
+ | `--verbose` | Print classification breakdown (top 3 guesses + matched signals per dimension) |
373
402
  | `--no-llm` | Skip Claude Code CLI polish (deterministic only) |
374
403
 
375
404
  **Production-URL safety:** when the target is not a local address, sniff prints a 5-second countdown banner before running. Hit Ctrl+C to cancel. No `--allow-destructive` flag.