@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.
@@ -1,75 +1,111 @@
1
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>]
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 **both** audit agents on this repository **in parallel**: **ux-auditor** (guideline compliance) and **ui-auditor** (UI & usability).
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
- - `--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.
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
- Derive report paths (use today's date `YYYY-MM-DD`):
19
+ Date slug: `YYYY-MM-DD` + optional `-prod` suffix.
18
20
 
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` |
21
+ ## Required output layout
24
22
 
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.
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
- ## Step 1Shared setup (once, before agents)
42
+ Relative image paths in MD/HTML: `assets/<file>.png` never base64, never `../prod-assets/`.
28
43
 
29
- Do this yourself in the main session — **do not** delegate to either agent yet:
44
+ ## Role division (/full-audit)
30
45
 
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.
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
- ## Step 2 Launch agents in parallel
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
- Spawn **ux-auditor** and **ui-auditor** **concurrently** (two parallel agent tasks — not sequential).
56
+ ## Step 1 Shared setup (once, before agents)
40
57
 
41
- Pass each agent this context:
58
+ Do this in the main session — **do not** delegate yet:
42
59
 
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
- ```
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
- Let each agent follow its full methodology from Phase 1 onward.
69
+ ## Step 2 Launch agents in parallel
60
70
 
61
- ## Step 3 Combined summary (after both finish)
71
+ Spawn **ux-auditor**, **ui-auditor** and **a11y-auditor** **concurrently** (honor `--agents`).
62
72
 
63
- Write `<out-dir>/AUDIT-SUMMARY-<date>.md`:
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
- 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.
92
+ ## Step 3Combined 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
- Report paths, combined severity counts, top 3 issues across both audits, whether parallel run succeeded, and any limitations.
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); do not start the dev server. Note: this significantly weakens a UI audit — warn the user before proceeding.
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 location (default: `docs/ui-audit/UI-AUDIT-<date>.md`).
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
- 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.
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 location (default: `docs/ux-audit/UX-AUDIT-<date>.md`).
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
- 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.
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.