@appfire-ux/audit-agent 0.20260702.2 → 0.20260706.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 +18 -11
- package/bin/install.js +3 -2
- package/package.json +8 -3
- package/scripts/a11y-audit-scan.mjs +150 -0
- package/scripts/build-html-reports.mjs +243 -0
- package/scripts/ux-audit-capture.mjs +23 -18
- package/templates/agents/a11y-auditor.md +167 -0
- package/templates/agents/ui-auditor.md +58 -29
- package/templates/agents/ux-auditor.md +131 -22
- package/templates/commands/a11y-audit.md +22 -0
- package/templates/commands/full-audit.md +85 -49
- package/templates/commands/ui-audit.md +7 -4
- package/templates/commands/ux-audit.md +6 -3
|
@@ -1,75 +1,111 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run ux-auditor and
|
|
3
|
-
argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out-dir <path>]
|
|
2
|
+
description: Run ux-auditor, ui-auditor and a11y-auditor in parallel — guideline compliance + UI/usability + accessibility/VPAT audit
|
|
3
|
+
argument-hint: [scope-path] [--agents ux,ui,a11y] [--static-only] [--lang pl|en] [--out-dir <path>] [--prod]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Run **
|
|
6
|
+
Run **all three** audit agents on this repository **in parallel**: **ux-auditor** (guideline compliance), **ui-auditor** (UI & usability) and **a11y-auditor** (accessibility / VPAT readiness).
|
|
7
7
|
|
|
8
8
|
Arguments passed by the user: `$ARGUMENTS`
|
|
9
9
|
|
|
10
10
|
## Parse arguments
|
|
11
11
|
|
|
12
12
|
- **Scope path** — optional directory (default: whole repo).
|
|
13
|
-
- `--
|
|
14
|
-
- `--
|
|
15
|
-
- `--
|
|
13
|
+
- `--agents ux,ui,a11y` — subset of agents to run (default: all three).
|
|
14
|
+
- `--static-only` — skip runtime/screenshots/scans for all agents; warn the user that the UI audit will be much weaker and most a11y criteria become NEEDS_MANUAL_REVIEW.
|
|
15
|
+
- `--lang pl|en` — report language for all agents (default: English; a11y JSON/criterion map stays English).
|
|
16
|
+
- `--out-dir <path>` — parent folder for outputs (default: `docs/audits`).
|
|
17
|
+
- `--prod` — append `-prod` to report filenames (auditing production/staging URL).
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Date slug: `YYYY-MM-DD` + optional `-prod` suffix.
|
|
18
20
|
|
|
19
|
-
|
|
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` |
|
|
21
|
+
## Required output layout
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
```
|
|
24
|
+
<out-dir>/
|
|
25
|
+
├── AUDIT-SUMMARY-<date>[-prod].md
|
|
26
|
+
├── AUDIT-SUMMARY-<date>[-prod].html
|
|
27
|
+
├── prod-assets/ # only when orchestrator shares PNG captures across agents
|
|
28
|
+
├── ux-audit/
|
|
29
|
+
│ ├── UX-AUDIT-<date>[-prod].md
|
|
30
|
+
│ ├── UX-AUDIT-<date>[-prod].html
|
|
31
|
+
│ └── assets/*.png
|
|
32
|
+
├── ui-audit/
|
|
33
|
+
│ ├── UI-AUDIT-<date>[-prod].md
|
|
34
|
+
│ ├── UI-AUDIT-<date>[-prod].html
|
|
35
|
+
│ └── assets/*.png
|
|
36
|
+
└── a11y-audit/
|
|
37
|
+
├── A11Y-AUDIT-<date>[-prod].{md,html,json}
|
|
38
|
+
├── assets/*.png
|
|
39
|
+
└── axe-results/*.json
|
|
40
|
+
```
|
|
26
41
|
|
|
27
|
-
|
|
42
|
+
Relative image paths in MD/HTML: `assets/<file>.png` — never base64, never `../prod-assets/`.
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
## Role division (/full-audit)
|
|
30
45
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
| Agent | Owns | Same protocol |
|
|
47
|
+
|-------|------|----------------|
|
|
48
|
+
| **ux-auditor** | Guideline compliance: tokens, a11y, copy, messaging, personas | STOP & ASK, MD+HTML+PNG, Definition of done |
|
|
49
|
+
| **ui-auditor** | IA, consistency, layout, interaction, responsiveness | STOP & ASK, MD+HTML+PNG, Definition of done |
|
|
50
|
+
| **a11y-auditor** | Deep accessibility: WCAG 2.2 A/AA, axe-core scan, VPAT/ACR datapoints | STOP & ASK, MD+HTML+PNG+JSON, no over-claiming |
|
|
36
51
|
|
|
37
|
-
|
|
52
|
+
- Each agent writes to its own `ux-audit/`, `ui-audit/` or `a11y-audit/` subfolder with its own `assets/`.
|
|
53
|
+
- Use `prod-assets/` **only** when orchestrator captures once and agents reuse identical PNGs — each agent copies into local `assets/` for Confluence-relative paths.
|
|
54
|
+
- Do **not** duplicate capture work unless one agent needs extra viewports/states the other missed.
|
|
38
55
|
|
|
39
|
-
|
|
56
|
+
## Step 1 — Shared setup (once, before agents)
|
|
40
57
|
|
|
41
|
-
|
|
58
|
+
Do this in the main session — **do not** delegate yet:
|
|
42
59
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
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
|
-
```
|
|
60
|
+
1. **Refresh audit toolchain (Phase 0):**
|
|
61
|
+
- **0a** — `@appfire-ux/audit-agent@latest` + `npx @appfire-ux/audit-agent`
|
|
62
|
+
- **0b** — `@appfire-ux/guidelines@latest` + `npx @appfire-ux/guidelines`
|
|
63
|
+
- **0c** (when a11y-auditor runs) — `npm ls playwright axe-core --depth=0 || npm install -D playwright axe-core`; `npx playwright install chromium`
|
|
64
|
+
- Record versions for the summary appendix.
|
|
65
|
+
2. **Resolve base URL** — do not assume localhost. If blind-alley signals (OAuth redirect, auth wall, wrong UI) → **STOP & ASK** user with the template from ux-auditor before launching agents.
|
|
66
|
+
3. Unless `--static-only`: start **one** dev server OR use user-provided logged-in URL. Note base URL for all agents.
|
|
67
|
+
4. Optional shared capture: if Browser MCP or Playwright script runs here, save to `<out-dir>/prod-assets/` and tell agents to copy into their `assets/` folders.
|
|
58
68
|
|
|
59
|
-
|
|
69
|
+
## Step 2 — Launch agents in parallel
|
|
60
70
|
|
|
61
|
-
|
|
71
|
+
Spawn **ux-auditor**, **ui-auditor** and **a11y-auditor** **concurrently** (honor `--agents`).
|
|
62
72
|
|
|
63
|
-
|
|
73
|
+
```
|
|
74
|
+
Phase 0 COMPLETE. Orchestrator context:
|
|
75
|
+
- audit-agent version: …
|
|
76
|
+
- guidelines version: …
|
|
77
|
+
- Base URL: [url | static-only]
|
|
78
|
+
- Scope: …
|
|
79
|
+
- Language: …
|
|
80
|
+
- ux report: <out-dir>/ux-audit/UX-AUDIT-<date>[-prod].md
|
|
81
|
+
- ui report: <out-dir>/ui-audit/UI-AUDIT-<date>[-prod].md
|
|
82
|
+
- a11y report: <out-dir>/a11y-audit/A11Y-AUDIT-<date>[-prod].md (+ .json datapoints, axe-results/)
|
|
83
|
+
- Shared prod-assets: [path or none — copy to local assets/ if used]
|
|
84
|
+
- STOP & ASK already resolved: [yes/no — what user provided]
|
|
85
|
+
|
|
86
|
+
Skip Phase 0 npm. Begin Phase 1.
|
|
87
|
+
Reuse base URL; do not start another server.
|
|
88
|
+
Follow Shared deliverables: MD+HTML+PNG, Definition of done.
|
|
89
|
+
If STOP & ASK triggers mid-run, pause and ask user — do not fake verified-runtime.
|
|
90
|
+
```
|
|
64
91
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
92
|
+
## Step 3 — Combined summary + HTML (after all agents finish)
|
|
93
|
+
|
|
94
|
+
1. Write `<out-dir>/AUDIT-SUMMARY-<date>[-prod].md`:
|
|
95
|
+
- Executive overview (all lenses)
|
|
96
|
+
- Links to all MD reports
|
|
97
|
+
- Combined scorecard + severity totals
|
|
98
|
+
- Top 5 cross-cutting issues (deduplicated)
|
|
99
|
+
- Merged handoffs
|
|
100
|
+
- Shared Limitations (URL, viewports, roles, capture gaps)
|
|
101
|
+
- Suggested remediation order
|
|
102
|
+
2. Generate HTML for **all** reports:
|
|
103
|
+
```bash
|
|
104
|
+
node node_modules/@appfire-ux/audit-agent/scripts/build-html-reports.mjs --dir <out-dir>
|
|
105
|
+
```
|
|
106
|
+
(or repo-local `docs/audits/build-html-reports.mjs` if present)
|
|
107
|
+
3. Optionally serve preview: `npx --yes serve <out-dir> -p 4173` and give user links to `*.html`.
|
|
72
108
|
|
|
73
109
|
## Relay to the user
|
|
74
110
|
|
|
75
|
-
|
|
111
|
+
MD + HTML paths (all reports), combined severity counts, Baseline Accessibility Score + safe conclusion (a11y), top 3 issues, capture coverage, Limitations, local preview URLs, whether parallel run and STOP & ASK occurred. Remind the user the a11y `.json` feeds "AI Agent: VPAT Document" (Confluence, CRUX) for the ACR draft.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Run a UI & usability audit of this repo (consistency, IA, interaction design)
|
|
3
|
-
argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out <path>]
|
|
3
|
+
argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out <path>] [--prod]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Use the **ui-auditor** agent to run a full UI & usability audit of this repository.
|
|
@@ -9,8 +9,11 @@ Arguments passed by the user: `$ARGUMENTS`
|
|
|
9
9
|
|
|
10
10
|
Interpretation:
|
|
11
11
|
- A path argument limits the audit scope to that directory (default: whole repo, primary-persona surfaces prioritized).
|
|
12
|
-
- `--static-only` — skip Phase 3 (runtime capture);
|
|
12
|
+
- `--static-only` — skip Phase 3 (runtime capture); warn the user this significantly weakens the audit.
|
|
13
13
|
- `--lang pl` — write the report in Polish (default: English).
|
|
14
|
-
- `--out <path>` — report
|
|
14
|
+
- `--out <path>` — report MD path (default: `docs/audits/ui-audit/UI-AUDIT-<date>[-prod].md`).
|
|
15
|
+
- `--prod` — append `-prod` to the report filename.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Deliverables: **MD + HTML + PNG in `assets/`** (Confluence-ready). STOP & ASK on auth/login walls before faking visual evidence. Generate HTML via `build-html-reports.mjs` after the MD report.
|
|
18
|
+
|
|
19
|
+
Launch the agent with these parameters and let it follow its full methodology, including Phase 0 toolchain refresh and Phase 7 Definition of done. Relay: MD + HTML paths, preview URL if served, finding counts, top 3 issues, capture coverage, Limitations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Run a comprehensive UX audit of this repo against @appfire-ux/guidelines
|
|
3
|
-
argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out <path>]
|
|
3
|
+
argument-hint: [scope-path] [--static-only] [--lang pl|en] [--out <path>] [--prod]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Use the **ux-auditor** agent to run a full UX audit of this repository.
|
|
@@ -11,6 +11,9 @@ Interpretation:
|
|
|
11
11
|
- A path argument limits the audit scope to that directory (default: whole repo, UI code prioritized).
|
|
12
12
|
- `--static-only` — skip Phase 4 (runtime verification); do not start the dev server.
|
|
13
13
|
- `--lang pl` — write the report in Polish (default: English).
|
|
14
|
-
- `--out <path>` — report
|
|
14
|
+
- `--out <path>` — report MD path (default: `docs/audits/ux-audit/UX-AUDIT-<date>[-prod].md`).
|
|
15
|
+
- `--prod` — append `-prod` to the report filename (production/staging URL audit).
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Deliverables: **MD + HTML + PNG in `assets/`** (Confluence-ready). Follow STOP & ASK if runtime capture hits auth walls. Generate HTML via `build-html-reports.mjs` after the MD report.
|
|
18
|
+
|
|
19
|
+
Launch the agent with these parameters and let it follow its full methodology, including Phase 0 toolchain refresh and Phase 7 Definition of done. Relay: MD + HTML paths, preview URL if served, finding counts, top 3 issues, Limitations.
|