@appfire-ux/audit-agent 0.20260702.0 → 0.20260702.2

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,11 @@
1
1
  # @appfire-ux/audit-agent
2
2
 
3
- One-command install of two Claude Code audit agents for Appfire repos. Both bootstrap/refresh `@appfire-ux/guidelines` by themselves (Phase 0):
3
+ One-command install of two Claude Code audit agents for Appfire repos. **Every audit run refreshes both npm packages to `@latest`** (Phase 0):
4
+
5
+ - **`@appfire-ux/audit-agent`** — agent/command definitions in `.claude/`
6
+ - **`@appfire-ux/guidelines`** — rules, skills, and `guidelines/` kit
7
+
8
+ Agents:
4
9
 
5
10
  - **ux-auditor** (`/ux-audit`) — guideline-compliance UX audit: design tokens, spacing/typography, accessibility, UX writing, messaging patterns, persona fit.
6
11
  - **ui-auditor** (`/ui-audit`) — UI & usability audit from a UI Designer's perspective: cross-screen consistency, layout & visual hierarchy, information architecture, navigation, interaction design, forms, data-dense views, responsiveness. Screenshot-driven (browser MCP or bundled Playwright fallback).
@@ -16,8 +21,9 @@ npm install -D @appfire-ux/audit-agent
16
21
  The postinstall script copies the agent and command into `<repo>/.claude/`. Done — open Claude Code and run:
17
22
 
18
23
  ```
19
- /ux-audit # or
20
- /ui-audit
24
+ /full-audit # both audits in parallel (recommended)
25
+ /ux-audit # compliance only
26
+ /ui-audit # UI & usability only
21
27
  ```
22
28
 
23
29
  Once, for all repos on your machine:
@@ -26,11 +32,14 @@ Once, for all repos on your machine:
26
32
  npx @appfire-ux/audit-agent --global # installs into ~/.claude/
27
33
  ```
28
34
 
29
- ## Update
35
+ ## Update (manual, optional)
36
+
37
+ Phase 0 on every `/ux-audit`, `/ui-audit`, or `/full-audit` run already calls `npm update` + `@latest` for both packages. Use this only when you want to refresh **without** running an audit:
30
38
 
31
39
  ```bash
32
- npm update @appfire-ux/audit-agent
40
+ npm update @appfire-ux/audit-agent @appfire-ux/guidelines
33
41
  npx @appfire-ux/audit-agent
42
+ npx @appfire-ux/guidelines
34
43
  ```
35
44
 
36
45
  ## What gets installed
@@ -41,12 +50,13 @@ npx @appfire-ux/audit-agent
41
50
  | `.claude/commands/ux-audit.md` | `/ux-audit [scope] [--static-only] [--lang pl] [--out <path>]` |
42
51
  | `.claude/agents/ui-auditor.md` | 8-phase UI & usability audit: guidelines bootstrap → screen/pattern inventory → screenshot capture → consistency/IA/interaction passes → report → self-verification |
43
52
  | `.claude/commands/ui-audit.md` | `/ui-audit [scope] [--static-only] [--lang pl] [--out <path>]` |
53
+ | `.claude/commands/full-audit.md` | `/full-audit [scope] [--static-only] [--lang pl] [--out-dir <path>]` — runs **ux-auditor** and **ui-auditor** in parallel with shared guidelines bootstrap and one dev server |
44
54
 
45
- The audits complement each other: `ux-audit` checks *compliance with the guidelines*, `ui-audit` checks *the interface as designed*. Findings each agent notices outside its lane are handed off to the other's report section.
55
+ The audits complement each other: `ux-audit` checks *compliance with the guidelines*, `ui-audit` checks *the interface as designed*. Use `/full-audit` when you want both at once; findings each agent notices outside its lane are handed off to the other's report section, and the combined summary deduplicates cross-cutting issues.
46
56
 
47
57
  ## Publishing (maintainers)
48
58
 
49
- **CI (preferred):** pushes to `main` that touch `appfire-ux-audit-agent/**` or the canonical agent/command files in `.claude/` (`ux-auditor.md`, `ux-audit.md`, `ui-auditor.md`, `ui-audit.md`) run [`.github/workflows/publish-audit-agent.yml`](../.github/workflows/publish-audit-agent.yml). The workflow assembles the package (syncing templates from `.claude/`), bumps a date-based version (`0.YYYYMMDD.PATCH`), and publishes `@appfire-ux/audit-agent` using the `NPM_TOKEN` secret — same pattern as `@appfire-ux/guidelines` and `@appfire-ux/fonts`.
59
+ **CI (preferred):** pushes to `main` that touch `appfire-ux-audit-agent/**` or the canonical agent/command files in `.claude/` (`ux-auditor.md`, `ux-audit.md`, `ui-auditor.md`, `ui-audit.md`, `full-audit.md`) run [`.github/workflows/publish-audit-agent.yml`](../.github/workflows/publish-audit-agent.yml). The workflow assembles the package (syncing templates from `.claude/`), bumps a date-based version (`0.YYYYMMDD.PATCH`), and publishes `@appfire-ux/audit-agent` using the `NPM_TOKEN` secret — same pattern as `@appfire-ux/guidelines` and `@appfire-ux/fonts`.
50
60
 
51
61
  **Manual:**
52
62
 
package/bin/install.js CHANGED
@@ -69,8 +69,10 @@ console.log('[appfire-ux-audit-agent] Installed ' + copied.length + ' file(s) in
69
69
  for (const f of copied) console.log(' - ' + f);
70
70
  console.log('');
71
71
  console.log('Usage (in Claude Code, inside your repo):');
72
+ console.log(' /full-audit both audits in parallel (recommended for full coverage)');
72
73
  console.log(' /ux-audit guideline-compliance UX audit (tokens, a11y, content, messaging)');
73
74
  console.log(' /ui-audit UI & usability audit (consistency, IA, interaction design)');
74
- console.log(' Both accept: [scope-path] [--static-only] [--lang pl] [--out <path>]');
75
+ console.log(' All accept: [scope-path] [--static-only] [--lang pl]');
76
+ console.log(' /full-audit also: [--out-dir <path>] /ux-audit|/ui-audit: [--out <path>]');
75
77
  console.log('');
76
78
  console.log('Tip: run "npx appfire-ux-audit-agent --global" to install into ~/.claude for all repos.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appfire-ux/audit-agent",
3
- "version": "0.20260702.0",
3
+ "version": "0.20260702.2",
4
4
  "description": "Claude Code audit agents for Appfire apps — installs ux-auditor (/ux-audit: guideline compliance) and ui-auditor (/ui-audit: UI consistency, IA, interaction design), auditing against @appfire-ux/guidelines",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -20,9 +20,17 @@ You are a senior UI Designer at Appfire doing a design critique of a shipped pro
20
20
 
21
21
  Work through the phases below IN ORDER. Do not skip Phase 0 or Phase 7.
22
22
 
23
- ## Phase 0 — Bootstrap @appfire-ux/guidelines
23
+ ## Phase 0 — Bootstrap audit toolchain
24
24
 
25
- Same kit as ux-auditor (npm: `@appfire-ux/guidelines`, source: github.com/fuegokit/appfire-ux-guidelines; postinstall copies `.cursor/rules/ux-*.mdc`, `.cursor/skills/`, `guidelines/` into the project root). Assume it is NOT installed yet.
25
+ Run **0a** then **0b** before any audit work. Record installed versions and any stale/failed steps in the report appendix.
26
+
27
+ ### 0a — Refresh @appfire-ux/audit-agent
28
+
29
+ Same steps as ux-auditor Phase 0a: update/install `@appfire-ux/audit-agent@latest`, run `npx @appfire-ux/audit-agent`, verify `.claude/agents/` and `.claude/commands/` exist. Flag **"audit-agent possibly stale"** on npm failure when older files remain; STOP if no agent files and npm fails.
30
+
31
+ ### 0b — Bootstrap @appfire-ux/guidelines
32
+
33
+ Same kit as ux-auditor (npm: `@appfire-ux/guidelines`, source: github.com/fuegokit/appfire-ux-guidelines; postinstall copies `.cursor/rules/ux-*.mdc`, `.cursor/skills/`, `guidelines/` into the project root).
26
34
 
27
35
  1. Locate the repo-root `package.json` (monorepo → workspace root; none anywhere → `npm init -y` and note it in the appendix).
28
36
  2. Kit present (`guidelines/` with `foundations/` + `personas/` AND at least one `.cursor/rules/ux-*.mdc`) → refresh:
@@ -15,9 +15,38 @@ You are a principal UX auditor at Appfire. You produce the most comprehensive, e
15
15
 
16
16
  Work through the phases below IN ORDER. Do not skip Phase 0 or Phase 7.
17
17
 
18
- ## Phase 0 — Bootstrap @appfire-ux/guidelines
18
+ ## Phase 0 — Bootstrap audit toolchain
19
19
 
20
- The audit is driven by the Appfire UX Guidelines kit (npm: `@appfire-ux/guidelines`, source: github.com/fuegokit/appfire-ux-guidelines). Its postinstall script copies `.cursor/rules/ux-*.mdc`, `.cursor/skills/`, and `guidelines/` into the project root. Assume it is NOT installed yet.
20
+ Run **0a** then **0b** before any audit work. Record installed versions and any stale/failed steps in the report appendix.
21
+
22
+ ### 0a — Refresh @appfire-ux/audit-agent
23
+
24
+ This package ships the agent/command definitions in `.claude/`. Refresh them on every audit so methodology updates are picked up automatically.
25
+
26
+ 1. At the repo-root `package.json` (monorepo → workspace root):
27
+ - **Listed in `devDependencies` or `dependencies`** → refresh:
28
+ ```bash
29
+ npm update @appfire-ux/audit-agent
30
+ npx @appfire-ux/audit-agent
31
+ ```
32
+ Compare `npm ls @appfire-ux/audit-agent --depth=0` with `npm view @appfire-ux/audit-agent version`. If still behind, force: `npm install @appfire-ux/audit-agent@latest`, then `npx @appfire-ux/audit-agent`.
33
+ - **Not listed** but `.claude/agents/ux-auditor.md` exists (e.g. global install) → refresh in place:
34
+ ```bash
35
+ npx @appfire-ux/audit-agent@latest
36
+ ```
37
+ - **Neither** → install as a dev tool, then copy agents:
38
+ ```bash
39
+ npm install -D @appfire-ux/audit-agent@latest
40
+ ```
41
+ (postinstall runs `npx` automatically; if not, run `npx @appfire-ux/audit-agent` explicitly). Note the fresh install in the appendix.
42
+ 2. Verify post-conditions — these MUST exist before continuing:
43
+ - `.claude/agents/ux-auditor.md`, `.claude/agents/ui-auditor.md`
44
+ - `.claude/commands/ux-audit.md`, `.claude/commands/ui-audit.md`, `.claude/commands/full-audit.md`
45
+ 3. Failure handling: npm fails but older `.claude/` files exist → proceed and flag **"audit-agent possibly stale"**. npm fails and no agent files → STOP and report the npm error.
46
+
47
+ ### 0b — Bootstrap @appfire-ux/guidelines
48
+
49
+ The audit is driven by the Appfire UX Guidelines kit (npm: `@appfire-ux/guidelines`, source: github.com/fuegokit/appfire-ux-guidelines). Its postinstall script copies `.cursor/rules/ux-*.mdc`, `.cursor/skills/`, and `guidelines/` into the project root.
21
50
 
22
51
  1. Locate the correct install directory: the repo-root `package.json`. In a monorepo, use the workspace root. If there is no `package.json` anywhere, run `npm init -y` first and note this in the report appendix.
23
52
  2. Detect an existing kit: BOTH `guidelines/` (containing `foundations/` and `personas/`) AND at least one `.cursor/rules/ux-*.mdc` must exist.
@@ -0,0 +1,75 @@
1
+ ---
2
+ description: Run ux-auditor and ui-auditor in parallel — full guideline compliance + UI/usability audit
3
+ argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out-dir <path>]
4
+ ---
5
+
6
+ Run **both** audit agents on this repository **in parallel**: **ux-auditor** (guideline compliance) and **ui-auditor** (UI & usability).
7
+
8
+ Arguments passed by the user: `$ARGUMENTS`
9
+
10
+ ## Parse arguments
11
+
12
+ - **Scope path** — optional directory (default: whole repo).
13
+ - `--static-only` — skip runtime/screenshots for both agents; warn the user that the UI audit will be much weaker.
14
+ - `--lang pl|en` — report language for both agents (default: English).
15
+ - `--out-dir <path>` — parent folder for outputs (default: `docs/audits`). Individual reports go in subfolders; do not use `--out` here.
16
+
17
+ Derive report paths (use today's date `YYYY-MM-DD`):
18
+
19
+ | Agent | Report |
20
+ |-------|--------|
21
+ | ux-auditor | `<out-dir>/ux-audit/UX-AUDIT-<date>.md` |
22
+ | ui-auditor | `<out-dir>/ui-audit/UI-AUDIT-<date>.md` |
23
+ | summary | `<out-dir>/AUDIT-SUMMARY-<date>.md` |
24
+
25
+ Screenshot assets: `docs/ui-audit/assets/` and `docs/ux-audit/assets/` (per each agent's defaults) unless you consolidate under `<out-dir>/` — if so, tell both agents the same asset dir to avoid duplicate captures.
26
+
27
+ ## Step 1 — Shared setup (once, before agents)
28
+
29
+ Do this yourself in the main session — **do not** delegate to either agent yet:
30
+
31
+ 1. **Refresh audit toolchain (Phase 0 from ux-auditor):**
32
+ - **0a** — `@appfire-ux/audit-agent@latest`: `npm update` / `npm install @latest` as needed, then `npx @appfire-ux/audit-agent`. Verify `.claude/agents/` and `.claude/commands/` are current.
33
+ - **0b** — `@appfire-ux/guidelines@latest`: `npm update` / `npm install @latest` as needed, then `npx @appfire-ux/guidelines`. Verify `.cursor/rules/ux-*.mdc` and `guidelines/` exist.
34
+ - Record both package versions and any stale/failed steps for the summary appendix.
35
+ 2. Unless `--static-only`: detect dev command (`npm run dev`, etc.), start **one** dev server, note the base URL. Both agents will reuse it — do not start a second server.
36
+
37
+ ## Step 2 — Launch agents in parallel
38
+
39
+ Spawn **ux-auditor** and **ui-auditor** **concurrently** (two parallel agent tasks — not sequential).
40
+
41
+ Pass each agent this context:
42
+
43
+ ```
44
+ Phase 0 (audit toolchain bootstrap) is ALREADY COMPLETE in the main session.
45
+ - audit-agent version: [npm ls / npm view]
46
+ - guidelines version: [npm ls / npm view]
47
+ - Kit verified at: [list key paths]
48
+ - Dev server: [running at URL | not started — static-only]
49
+ - Scope: [path or whole repo]
50
+ - Language: [en|pl]
51
+ - Report path: [agent-specific path above]
52
+ - Asset dir: [shared or per-agent path]
53
+
54
+ Skip Phase 0 npm install. Begin at your Phase 1.
55
+ For runtime/screenshot phases: reuse the dev server URL above; do not start another server.
56
+ When done: complete through Phase 7 and return report path, severity counts, top 3 issues, limitations.
57
+ ```
58
+
59
+ Let each agent follow its full methodology from Phase 1 onward.
60
+
61
+ ## Step 3 — Combined summary (after both finish)
62
+
63
+ Write `<out-dir>/AUDIT-SUMMARY-<date>.md`:
64
+
65
+ 1. **Executive overview** — 5–8 sentences, both lenses combined.
66
+ 2. **Reports** — links to both markdown files.
67
+ 3. **Combined scorecard** — ux-auditor categories + ui-auditor categories, total findings by severity.
68
+ 4. **Top 5 cross-cutting issues** — deduplicated; note if ux and ui flagged the same surface differently.
69
+ 5. **Handoffs merged** — items each agent deferred to the other.
70
+ 6. **Shared limitations** — static-only, capture gaps, bootstrap notes.
71
+ 7. **Suggested order of work** — quick wins that satisfy both audits first.
72
+
73
+ ## Relay to the user
74
+
75
+ Report paths, combined severity counts, top 3 issues across both audits, whether parallel run succeeded, and any limitations.
@@ -13,4 +13,4 @@ Interpretation:
13
13
  - `--lang pl` — write the report in Polish (default: English).
14
14
  - `--out <path>` — report location (default: `docs/ui-audit/UI-AUDIT-<date>.md`).
15
15
 
16
- Launch the agent with these parameters and let it follow its full methodology, including bootstrapping/refreshing `@appfire-ux/guidelines` (Phase 0), early screenshot capture (Phase 3), and mandatory self-verification (Phase 7). When it finishes, relay: the report path, finding counts by severity, top 3 issues, capture coverage, and any limitations it reported.
16
+ Launch the agent with these parameters and let it follow its full methodology, including bootstrapping/refreshing `@appfire-ux/audit-agent` and `@appfire-ux/guidelines` (Phase 0), early screenshot capture (Phase 3), and mandatory self-verification (Phase 7). When it finishes, relay: the report path, finding counts by severity, top 3 issues, capture coverage, and any limitations it reported.
@@ -13,4 +13,4 @@ Interpretation:
13
13
  - `--lang pl` — write the report in Polish (default: English).
14
14
  - `--out <path>` — report location (default: `docs/ux-audit/UX-AUDIT-<date>.md`).
15
15
 
16
- Launch the agent with these parameters and let it follow its full methodology, including bootstrapping/refreshing `@appfire-ux/guidelines` (Phase 0) and mandatory self-verification (Phase 7). When it finishes, relay: the report path, finding counts by severity, top 3 issues, and any limitations it reported.
16
+ Launch the agent with these parameters and let it follow its full methodology, including bootstrapping/refreshing `@appfire-ux/audit-agent` and `@appfire-ux/guidelines` (Phase 0) and mandatory self-verification (Phase 7). When it finishes, relay: the report path, finding counts by severity, top 3 issues, and any limitations it reported.