ultra11y 2.23.0 → 2.24.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
@@ -28,17 +28,37 @@ Rules needing a rendered page (computed contrast, keyboard traps) or a human cal
28
28
 
29
29
  ## Install
30
30
 
31
+ **As a CLI** — on npm, zero runtime dependencies (Node ≥ 22.18):
32
+
33
+ ```sh
34
+ npx ultra11y --help # no install
35
+ npm i -D ultra11y # or as a dev dependency
36
+ ```
37
+
38
+ **As an agent skill** — the repository ships **two** (pick at the prompt, or pass the name):
39
+ `ultra11y` for full audits, compliance reports, PRD backlogs and standards packs, and
40
+ `review-a11y` for the fast loop that audits **exactly the code under change** (staged files,
41
+ working diff, or branch vs merge-base) and reports like a code reviewer. Both bundle the same
42
+ install-free engine.
43
+
31
44
  ```sh
32
45
  npx skills add maxgfr/ultra11y
33
46
  ```
34
47
 
35
- The repository ships **two skills** (pick at the prompt, or pass the skill name):
36
- `ultra11y` — full audits, compliance reports, PRD backlogs, standards packs — and
37
- `review-a11y` — the fast review loop that audits **exactly the code under change**
38
- (staged files, working diff, or branch vs merge-base) and reports like a code reviewer.
39
- Both bundle the same install-free engine.
48
+ **As an MCP server** — so an agent drives the engine as tools instead of shelling out:
40
49
 
41
- Or clone and run the bundled engine directly (Node ≥ 22.18, zero dependencies):
50
+ ```sh
51
+ claude mcp add ultra11y -- npx -y ultra11y mcp
52
+ ```
53
+
54
+ **As a GitHub Action** — audits the PR diff and, optionally, the served pages:
55
+
56
+ ```yaml
57
+ - uses: maxgfr/ultra11y@v2
58
+ with: { since: auto, standard: rgaa, fail-on: blocking }
59
+ ```
60
+
61
+ Or clone and run the bundled engine straight from the repo:
42
62
 
43
63
  ```sh
44
64
  node scripts/ultra11y.mjs --help
@@ -66,10 +86,92 @@ ultra11y init [--hook] [--ci] [--baseline] [--fail-on blocking|major|minor]
66
86
  ultra11y pack check <pack.json> [--guidance <g.json>] | scaffold # gate an (AI-)authored standards pack
67
87
  ultra11y scan <url|file…> [--runtime auto|local|docker] [--cwd <dir>] [--storage-state <file>] [--merge <audit.json>] [--out <dir>] [--json]
68
88
  ultra11y scan --sitemap <url> | --crawl <url> [--depth <n>] [--max <n>] [--runtime …] [--merge <audit.json>] [--json]
89
+ ultra11y mcp [--transport stdio|http] [--cwd <dir>] [--allow-write] [--port <n>] [--bind <addr>] [--allow-remote]
69
90
 
70
91
  # global: --pack <paths> (load external standards pack(s) at runtime) · --override
71
92
  ```
72
93
 
94
+ ## Use it as an MCP server
95
+
96
+ The skill shells out to the CLI and parses its output. An MCP server skips both:
97
+ your agent calls ultra11y as typed tools, with JSON schemas in and structured
98
+ results out. Same engine, same standards data, no wrapper.
99
+
100
+ ```bash
101
+ # stdio — the default, and what Claude Code / Claude Desktop / Cursor expect
102
+ claude mcp add ultra11y -- node /abs/path/to/scripts/ultra11y.mjs mcp
103
+
104
+ # or over HTTP, on loopback
105
+ node scripts/ultra11y.mjs mcp --transport http --port 7341
106
+ claude mcp add --transport http ultra11y http://127.0.0.1:7341/mcp
107
+ ```
108
+
109
+ ```jsonc
110
+ // Claude Desktop takes stdio servers only — a remote URL here will not work.
111
+ { "mcpServers": { "ultra11y": { "command": "node", "args": ["/abs/path/to/scripts/ultra11y.mjs", "mcp"] } } }
112
+ // Cursor, HTTP:
113
+ { "mcpServers": { "ultra11y": { "url": "http://127.0.0.1:7341/mcp" } } }
114
+ ```
115
+
116
+ It serves all three MCP primitives, because a skill is three things: the engine
117
+ (**tools**), the method (**prompts**), and the documentation the method refers
118
+ to (**resources**). A client given only the tools runs the audit, sees no
119
+ errors, and reports the page as accessible — a false conformance claim, which is
120
+ the one output an accessibility tool must never produce.
121
+
122
+ ### Tools
123
+
124
+ Ten read tools. `ultra11y_audit` is the entry point:
125
+
126
+ | Tool | What it does |
127
+ |------|--------------|
128
+ | `ultra11y_audit` | The static pass — findings keyed by success criterion |
129
+ | `ultra11y_adjudicate` | The criteria the engine **cannot** decide, with their evidence |
130
+ | `ultra11y_criteria` | The offline standards reference — look a criterion up, don't recall it |
131
+ | `ultra11y_report` | The dated conformance report, WCAG or a country pack |
132
+ | `ultra11y_prd` | Non-conformities → remediation units with effort |
133
+ | `ultra11y_check` | The gate: nothing asserted conformant that was never tested |
134
+ | `ultra11y_verify` | Claim↔evidence worklist |
135
+ | `ultra11y_pack_check` | Validate a country standards pack against what it really ships |
136
+ | `ultra11y_sample_check` | Lint the normative page sample |
137
+ | `ultra11y_read` | A file, or a line range, from the project |
138
+
139
+ `--allow-write` additionally exposes `ultra11y_fix` (safe codemods, dry-run by
140
+ default) and `ultra11y_init` (hook/CI/baseline) — the tools that change **your**
141
+ project. `ultra11y_scan` is declared but declines over MCP: it drives a headless
142
+ browser and may pull a Docker image, which is not a subprocess lifecycle a
143
+ long-lived server should own. It tells you to run it from the CLI and re-audit.
144
+
145
+ Pass `--cwd <dir>` at startup to dedicate the server to one project — `cwd` then
146
+ becomes optional on every tool.
147
+
148
+ ### Prompts — the workflow, not just the tools
149
+
150
+ | Prompt | Arguments | What it drives |
151
+ |--------|-----------|----------------|
152
+ | `audit_wcag` | `cwd`, `globs?`, `standard?` | audit → adjudicate → rule on each → report → check, with the untested criteria named |
153
+ | `adjudicate_criteria` | `cwd`, `standard?` | What alt-text relevance, link purpose, heading structure and reading order actually ask |
154
+ | `review_diff_a11y` | `cwd`, `since?` | Audit exactly the diff, refute the false positives, state the residual risks |
155
+
156
+ Each carries the coverage arithmetic: of the 55 WCAG 2.2 AA criteria the static
157
+ engine decides a handful, a browser decides fourteen, and **thirty-eight are
158
+ yours**.
159
+
160
+ ### Resources — the skill's own documentation
161
+
162
+ `SKILL.md` and all 28 `references/*.md` are served under `skill://`, read off
163
+ disk at request time — so a documentation fix reaches every client without a
164
+ rebuild.
165
+
166
+ Two things worth knowing:
167
+
168
+ - **A criterion nobody tested is untested, never conformant.** Every tool
169
+ description and every prompt says so, because the failure mode here is not a
170
+ wrong answer — it is a confident silence.
171
+ - **The HTTP transport binds `127.0.0.1` and refuses anything else** unless you
172
+ pass `--allow-remote`. This server reads local files; an exposed port is a
173
+ read-anything primitive for whoever finds it.
174
+
73
175
  ## Standards packs (RGAA France first; add your country)
74
176
 
75
177
  WCAG 2.2 AA is the engine's canonical key. Each country standard ships as an in-repo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra11y",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Audit HTML/CSS/JSX against WCAG 2.2 AA and produce a dated compliance report, or author/review accessible markup (native-HTML-first). A skills.sh agent skill: an install-free static engine (bundled, no npm install) plus the agent's judgment, with check/verify gates against hallucinated non-conformities, and pluggable in-repo standards packs (RGAA France first; Section 508 & EN 301 549 next).",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",