a11y-loop 0.2.0 → 0.2.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.
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "chanmeng-a11y-loop",
3
+ "owner": {
4
+ "name": "Chan Meng",
5
+ "url": "https://github.com/ChanMeng666"
6
+ },
7
+ "metadata": {
8
+ "description": "Makes AI coding agents decide accessibility while the work is still being planned and write accessible UI by default, then verify it in a real browser across the states they built — and say exactly what could not be checked. Ships the a11y-loop Agent Skill, a /a11y-plan command, and a plan-mode gate that declines a UI plan with no accessibility content in it.",
9
+ "version": "0.2.2"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "a11y-loop",
14
+ "source": "./",
15
+ "version": "0.2.2",
16
+ "description": "Accessibility in the plan, not after the pull request. Adds §0 plan rules (conformance target, per-component criteria, the product decisions that foreclose accessibility, color tokens before components), standing WCAG 2.2 AA generation rules, and a PreToolUse hook on ExitPlanMode that declines a UI-touching plan with no accessibility content — once, handing back the section to fill in. Verification is the a11y-loop CLI: axe-core in Chromium across default, dark, forced-colors, reduced-motion and 320px passes.",
17
+ "author": {
18
+ "name": "Chan Meng",
19
+ "url": "https://github.com/ChanMeng666"
20
+ },
21
+ "homepage": "https://ChanMeng666.github.io/a11y-loop/",
22
+ "repository": "https://github.com/ChanMeng666/a11y-loop",
23
+ "license": "MIT",
24
+ "keywords": [
25
+ "accessibility",
26
+ "a11y",
27
+ "wcag",
28
+ "wcag22",
29
+ "axe-core",
30
+ "playwright",
31
+ "plan-mode",
32
+ "agent-skills",
33
+ "aria",
34
+ "contrast",
35
+ "screen-reader",
36
+ "audit"
37
+ ]
38
+ }
39
+ ]
40
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "a11y-loop",
4
4
  "displayName": "a11y-loop",
5
- "version": "0.2.0",
5
+ "version": "0.2.2",
6
6
  "description": "Hard-gates plan mode: a plan that changes UI has to say what it decided about accessibility before it can be approved. Ships the a11y-loop skill and a /a11y-plan command alongside it.",
7
7
  "author": {
8
8
  "name": "Chan Meng",
@@ -21,7 +21,5 @@
21
21
  "hooks",
22
22
  "agent-skills"
23
23
  ],
24
- "skills": "./skill/",
25
- "commands": "./commands/",
26
- "hooks": "./hooks/hooks.json"
24
+ "skills": "./skill/"
27
25
  }
package/README.md CHANGED
@@ -335,7 +335,36 @@ secondary format for tools that consume it.
335
335
  - Node.js ≥ 20
336
336
  - A Chromium install for Playwright (installed in the steps below)
337
337
 
338
- ### Installation
338
+ > **Point your agent at this section.** Every command below is non-interactive, idempotent, and
339
+ > safe to re-run — no prompts, no TTY, no menus. An agent can install and verify the whole thing
340
+ > without asking you to click anything. The one exception is called out explicitly at the end.
341
+
342
+ ### Install everything (agent-runnable, one block)
343
+
344
+ ```bash
345
+ npm i -g a11y-loop
346
+ npx playwright install chromium
347
+ mkdir -p ~/.claude/skills
348
+ cp -r "$(npm root -g)/a11y-loop/skill/a11y-loop" ~/.claude/skills/
349
+ claude plugin marketplace add ChanMeng666/a11y-loop
350
+ claude plugin install a11y-loop@chanmeng-a11y-loop --scope user
351
+ ```
352
+
353
+ That is: the CLI, its browser, the portable skill, and the optional Claude Code plugin. No `git
354
+ clone` — the skill ships inside the npm package. Verify:
355
+
356
+ ```bash
357
+ a11y-loop --version
358
+ test -f ~/.claude/skills/a11y-loop/references/plan-phase.md && echo "skill ok"
359
+ claude plugin list | grep -A2 'a11y-loop@' # expect: Status: ✔ enabled
360
+ ```
361
+
362
+ Skip the last two lines if you only want the portable skill, or the `mkdir`/`cp` pair if you only
363
+ want the plugin. Do not do both: the plugin carries its own copy, so the model ends up seeing
364
+ `a11y-loop` *and* the directory-qualified `a11y-loop:a11y-loop`, paying the always-on token cost
365
+ twice. If both names show up, delete `~/.claude/skills/a11y-loop` and keep the plugin.
366
+
367
+ ### Installation (details)
339
368
 
340
369
  ```bash
341
370
  # Run it directly, no install
@@ -363,18 +392,22 @@ browser) — e.g. `PLAYWRIGHT_BROWSERS_PATH=D:\playwright-browsers`.
363
392
 
364
393
  ### Installing the Agent Skill
365
394
 
366
- Copy the skill directory into any Agent Skills-compatible client:
395
+ The skill is a directory. Copy it wherever your client reads skills from — no clone required, since
396
+ `npm i -g a11y-loop` already put it on disk:
367
397
 
368
398
  ```bash
399
+ SKILL_SRC="$(npm root -g)/a11y-loop/skill/a11y-loop"
400
+
369
401
  # Personal, all projects (Claude Code and other clients that read ~/.claude/skills)
370
- cp -r skill/a11y-loop ~/.claude/skills/a11y-loop
402
+ mkdir -p ~/.claude/skills && cp -r "$SKILL_SRC" ~/.claude/skills/
371
403
 
372
- # Or project-scoped
373
- cp -r skill/a11y-loop .claude/skills/a11y-loop
404
+ # Or project-scoped, committed with the repo
405
+ mkdir -p .claude/skills && cp -r "$SKILL_SRC" .claude/skills/
374
406
  ```
375
407
 
376
- Any client implementing the [Agent Skills specification](https://agentskills.io/specification)
377
- can load it the same way — Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, and more.
408
+ From a checkout, `skill/a11y-loop` is the same directory. Any client implementing the
409
+ [Agent Skills specification](https://agentskills.io/specification) loads it the same way — Claude
410
+ Code, Cursor, GitHub Copilot, Codex, Gemini CLI, and more. Re-running the copy upgrades in place.
378
411
 
379
412
  ### Optional: the Claude Code plugin layer
380
413
 
@@ -383,10 +416,37 @@ Claude-Code-only layer that adds one thing the portable skill cannot do — enfo
383
416
  plan mode:
384
417
 
385
418
  ```bash
386
- # From a checkout, in Claude Code
387
- /plugin install .
419
+ claude plugin marketplace add ChanMeng666/a11y-loop
420
+ claude plugin install a11y-loop@chanmeng-a11y-loop --scope user
421
+ ```
422
+
423
+ Both are ordinary CLI commands — no TTY, no prompts, safe to re-run. (They also exist as `/plugin
424
+ marketplace add …` and `/plugin install …` inside a session, but an agent should use the CLI form.)
425
+ Managing it later is equally non-interactive: `claude plugin disable a11y-loop`, `claude plugin
426
+ enable a11y-loop`, `claude plugin uninstall a11y-loop@chanmeng-a11y-loop` — add `-y` only if you
427
+ pass `--prune`, which is the single flag that asks for confirmation.
428
+
429
+ From a local checkout, `claude plugin marketplace add ./` registers the working copy instead, so the
430
+ plugin tracks your edits rather than the published repo.
431
+
432
+ **Team-wide, declaratively.** `--scope project` writes `.claude/settings.json`, which you commit —
433
+ after that a clone needs no install commands at all:
434
+
435
+ ```json
436
+ {
437
+ "extraKnownMarketplaces": {
438
+ "chanmeng-a11y-loop": { "source": { "source": "github", "repo": "ChanMeng666/a11y-loop" } }
439
+ },
440
+ "enabledPlugins": { "a11y-loop@chanmeng-a11y-loop": true }
441
+ }
388
442
  ```
389
443
 
444
+ **The one thing an agent cannot do for you.** Project-scoped plugins and hooks are gated behind
445
+ Claude Code's workspace-trust prompt the first time that directory is opened. That is a deliberate
446
+ security boundary in Claude Code — code from a repo should not execute because a file said so — and
447
+ nothing here can or should bypass it. `--scope user` avoids it entirely, which is why the
448
+ agent-runnable block above uses user scope.
449
+
390
450
  It contributes:
391
451
 
392
452
  - a `PreToolUse` hook matched to `ExitPlanMode`. When a plan changes UI work and says nothing about
@@ -403,7 +463,7 @@ and a human.
403
463
 
404
464
  | | Portable skill | Plugin layer |
405
465
  |---|---|---|
406
- | Install | copy `skill/a11y-loop` | `/plugin install .` |
466
+ | Install | copy `skill/a11y-loop` | `claude plugin install a11y-loop@…` |
407
467
  | Works in | 40+ Agent Skills clients | Claude Code only |
408
468
  | Gives you | §0 planning, §1 generation, §2 the loop, §3 honest reporting | plan-mode enforcement, `/a11y-plan` |
409
469
  | Required? | yes | no |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "a11y-loop",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Makes AI coding agents decide accessibility while the work is still being planned and write accessible UI by default, then proves what it can prove with a real browser audit across the states they built — and tells you exactly what it could not check.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,7 @@ compatibility: >-
28
28
  The generation and honesty rules apply with or without the CLI; every step
29
29
  that says "audit" requires it.
30
30
  metadata:
31
- "a11y-loop/version": "0.2.0"
31
+ "a11y-loop/version": "0.2.2"
32
32
  allowed-tools: 'Bash(a11y-loop *) Bash(npx a11y-loop *) Bash(node ${CLAUDE_SKILL_DIR}/../../src/cli.js *)'
33
33
  ---
34
34