@allthingsclaude/blueprints 0.3.0-beta.2 → 0.3.0-beta.21

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.
Files changed (73) hide show
  1. package/README.md +72 -7
  2. package/content/agents/a11y.md +402 -0
  3. package/content/agents/audit.md +5 -5
  4. package/content/agents/bootstrap.md +31 -9
  5. package/content/agents/changelog.md +350 -0
  6. package/content/agents/cleanup.md +3 -1
  7. package/content/agents/commit.md +235 -0
  8. package/content/agents/debug.md +1 -1
  9. package/content/agents/diagram.md +365 -0
  10. package/content/agents/docs.md +344 -0
  11. package/content/agents/dry.md +7 -5
  12. package/content/agents/explain.md +195 -0
  13. package/content/agents/finalize.md +13 -10
  14. package/content/agents/handoff.md +6 -6
  15. package/content/agents/i18n.md +388 -0
  16. package/content/agents/imagine.md +2 -2
  17. package/content/agents/implement.md +38 -14
  18. package/content/agents/migrate.md +330 -0
  19. package/content/agents/onboard.md +479 -0
  20. package/content/agents/parallelize.md +21 -10
  21. package/content/agents/plan.md +108 -21
  22. package/content/agents/refactor.md +10 -62
  23. package/content/agents/release.md +502 -0
  24. package/content/agents/research-codebase.md +160 -18
  25. package/content/agents/research-docs.md +135 -19
  26. package/content/agents/research-web.md +149 -19
  27. package/content/agents/secure.md +351 -0
  28. package/content/agents/showcase.md +333 -0
  29. package/content/agents/storyboard.md +4 -4
  30. package/content/agents/test.md +2 -2
  31. package/content/agents/update.md +347 -0
  32. package/content/commands/a11y.md +49 -0
  33. package/content/commands/audit.md +4 -2
  34. package/content/commands/auto.md +386 -0
  35. package/content/commands/bootstrap.md +1 -1
  36. package/content/commands/brainstorm.md +84 -12
  37. package/content/commands/challenge.md +7 -0
  38. package/content/commands/changelog.md +50 -0
  39. package/content/commands/cleanup.md +3 -1
  40. package/content/commands/commit.md +45 -0
  41. package/content/commands/critique.md +7 -0
  42. package/content/commands/debug.md +1 -1
  43. package/content/commands/diagram.md +51 -0
  44. package/content/commands/docs.md +48 -0
  45. package/content/commands/dry.md +3 -1
  46. package/content/commands/explain.md +12 -309
  47. package/content/commands/finalize.md +2 -2
  48. package/content/commands/flush.md +6 -7
  49. package/content/commands/handoff.md +1 -1
  50. package/content/commands/i18n.md +53 -0
  51. package/content/commands/implement.md +4 -4
  52. package/content/commands/kickoff.md +9 -5
  53. package/content/commands/merge.md +78 -0
  54. package/content/commands/migrate.md +54 -0
  55. package/content/commands/onboard.md +54 -0
  56. package/content/commands/parallelize.md +2 -2
  57. package/content/commands/pickup.md +1 -1
  58. package/content/commands/plan.md +2 -1
  59. package/content/commands/refactor.md +6 -5
  60. package/content/commands/release.md +63 -0
  61. package/content/commands/secure.md +51 -0
  62. package/content/commands/showcase.md +56 -0
  63. package/content/commands/storyboard.md +2 -2
  64. package/content/commands/test.md +1 -1
  65. package/content/commands/update.md +43 -0
  66. package/content/commands/verify.md +7 -0
  67. package/dist/cli.js +11 -11
  68. package/dist/cli.js.map +1 -1
  69. package/dist/installer.d.ts +14 -1
  70. package/dist/installer.d.ts.map +1 -1
  71. package/dist/installer.js +38 -8
  72. package/dist/installer.js.map +1 -1
  73. package/package.json +1 -1
package/README.md CHANGED
@@ -39,11 +39,29 @@ npx @allthingsclaude/blueprints --path /path/to/install
39
39
 
40
40
  # Skip confirmation prompts
41
41
  npx @allthingsclaude/blueprints --global --yes
42
+
43
+ # Set agent power level (1-5, default: 4)
44
+ npx @allthingsclaude/blueprints --power 5
45
+
46
+ # Customize tasks directory name (default: tasks)
47
+ npx @allthingsclaude/blueprints --tasks-dir my-tasks
42
48
  ```
43
49
 
50
+ ### Agent Power Levels
51
+
52
+ Control which models power your agents:
53
+
54
+ | Level | Name | Lightweight | Research | Standard | Heavyweight |
55
+ |-------|------|-------------|----------|----------|-------------|
56
+ | 1 | Economy | Haiku | Haiku | Haiku | Sonnet |
57
+ | 2 | Balanced | Haiku | Haiku | Sonnet | Sonnet |
58
+ | 3 | Standard | Sonnet | Sonnet | Sonnet | Sonnet |
59
+ | **4** | **Enhanced (default)** | **Sonnet** | **Opus** | **Opus** | **Opus** |
60
+ | 5 | Maximum | Opus | Opus | Opus | Opus |
61
+
44
62
  ---
45
63
 
46
- ## Commands by Category
64
+ ## Commands (29)
47
65
 
48
66
  ### Planning & Execution
49
67
 
@@ -53,6 +71,7 @@ npx @allthingsclaude/blueprints --global --yes
53
71
  | `/kickoff` | Execute a plan interactively with approval gates (collaborative) |
54
72
  | `/implement` | Execute a plan autonomously (hands-off) |
55
73
  | `/parallelize` | Execute independent plan tasks across multiple agents simultaneously |
74
+ | `/auto` | Full autonomous development loop — from idea to committed code |
56
75
  | `/finalize` | Complete a work phase - update plans, commit changes, document decisions |
57
76
 
58
77
  ### Project Setup
@@ -75,7 +94,18 @@ npx @allthingsclaude/blueprints --global --yes
75
94
  | `/audit` | Pre-commit security and quality review |
76
95
  | `/test` | Run tests, analyze failures, generate test coverage |
77
96
  | `/cleanup` | Find and remove dead code, unused imports, technical debt |
78
- | `/refactor` | DRY analysis, pattern extraction, safe refactoring with validation |
97
+ | `/refactor` | Safe refactoring — rename, extract, inline, or move code with validation |
98
+ | `/dry` | Eliminate DRY violations without changing behavior |
99
+ | `/secure` | Run a focused security scan on your codebase |
100
+
101
+ ### Code Operations
102
+
103
+ | Command | Description |
104
+ |---------|-------------|
105
+ | `/commit` | Create a well-crafted git commit from your current changes |
106
+ | `/changelog` | Generate a changelog from git history |
107
+ | `/docs` | Generate or update project documentation |
108
+ | `/migrate` | Upgrade dependencies or migrate between framework versions |
79
109
 
80
110
  ### Thinking Modes
81
111
 
@@ -92,6 +122,13 @@ npx @allthingsclaude/blueprints --global --yes
92
122
  |---------|-------------|
93
123
  | `/debug` | Systematic investigation with root cause analysis and fix options |
94
124
 
125
+ ### Creative
126
+
127
+ | Command | Description |
128
+ |---------|-------------|
129
+ | `/imagine` | Generate images using Nano Banana Pro (Gemini/fal.ai) |
130
+ | `/storyboard` | Extract UI interaction specs from video mockups |
131
+
95
132
  ### Session Management
96
133
 
97
134
  | Command | Description |
@@ -349,25 +386,50 @@ When you have a plan, choose how to execute it:
349
386
  | **Interactive** | `/kickoff` | Complex changes where you want approval gates and collaboration |
350
387
  | **Autonomous** | `/implement` | Well-defined tasks you trust to run hands-off |
351
388
  | **Parallel** | `/parallelize` | Plans with independent tasks that can run simultaneously |
389
+ | **Full Auto** | `/auto` | End-to-end: idea → plan → implement → test → commit |
352
390
 
353
391
  ---
354
392
 
355
- ## Agents (10)
393
+ ## Agents (23)
356
394
 
357
- Agents are specialized workers launched by commands:
395
+ Agents are specialized workers launched by commands. Each agent is assigned a model based on your chosen power level and its tier classification.
396
+
397
+ ### Agent Tiers
398
+
399
+ | Tier | Agents | Description |
400
+ |------|--------|-------------|
401
+ | **Lightweight** | commit, changelog, handoff, cleanup, imagine | Rote tasks — fast models suffice |
402
+ | **Research** | research-codebase, research-docs, research-web | Search and synthesize |
403
+ | **Standard** | plan, implement, parallelize, bootstrap, refactor, test, explain, docs, dry, storyboard | Balanced reasoning |
404
+ | **Heavyweight** | audit, debug, secure | Deep reasoning, high-stakes analysis |
405
+
406
+ ### Agent List
358
407
 
359
408
  | Agent | Used By | Purpose |
360
409
  |-------|---------|---------|
361
410
  | `audit` | `/audit` | Code quality and security analysis |
362
411
  | `bootstrap` | `/bootstrap` | Project scaffolding and setup |
412
+ | `changelog` | `/changelog` | Changelog generation from git history |
413
+ | `cleanup` | `/cleanup` | Dead code and unused import removal |
414
+ | `commit` | `/commit` | Git commit message crafting |
415
+ | `debug` | `/debug` | Systematic root cause investigation |
416
+ | `docs` | `/docs` | Documentation generation and updates |
417
+ | `dry` | `/dry` | DRY violation detection and elimination |
418
+ | `explain` | `/explain` | Code and architecture explanations |
363
419
  | `finalize` | `/finalize` | Session wrap-up and commits |
364
420
  | `handoff` | `/handoff` | Context documentation |
421
+ | `imagine` | `/imagine` | Image generation via Nano Banana Pro |
365
422
  | `implement` | `/implement` | Autonomous plan execution |
423
+ | `migrate` | `/migrate` | Dependency upgrades and migrations |
366
424
  | `parallelize` | `/parallelize` | Multi-agent orchestration |
367
425
  | `plan` | `/plan` | Structured plan creation |
426
+ | `refactor` | `/refactor` | Safe code refactoring with validation |
368
427
  | `research-codebase` | `/research` | Code exploration |
369
428
  | `research-docs` | `/research` | Library documentation lookup |
370
429
  | `research-web` | `/research` | Online resource research |
430
+ | `secure` | `/secure` | Security scanning and vulnerability detection |
431
+ | `storyboard` | `/storyboard` | UI interaction spec extraction |
432
+ | `test` | `/test` | Test execution and failure analysis |
371
433
 
372
434
  ---
373
435
 
@@ -377,15 +439,16 @@ After installation, your `.claude` directory will contain:
377
439
 
378
440
  ```
379
441
  .claude/
380
- ├── commands/ # 20 command files
442
+ ├── commands/ # 29 command files
381
443
  │ ├── audit.md
444
+ │ ├── auto.md
382
445
  │ ├── bootstrap.md
383
446
  │ ├── brainstorm.md
384
447
  │ └── ...
385
- ├── agents/ # 10 agent files
448
+ ├── agents/ # 23 agent files
386
449
  │ ├── audit.md
387
450
  │ ├── bootstrap.md
388
- │ ├── finalize.md
451
+ │ ├── changelog.md
389
452
  │ └── ...
390
453
  tasks/ # Runtime artifacts (created during use)
391
454
  ├── plans/
@@ -396,6 +459,8 @@ tasks/ # Runtime artifacts (created during use)
396
459
  └── STATE.md # Active plan tracker
397
460
  ```
398
461
 
462
+ > The `tasks/` directory name is configurable during installation via `--tasks-dir`. Template variables (`{{TASKS_DIR}}`, `{{PLANS_DIR}}`, `{{SESSIONS_DIR}}`) are resolved at install time.
463
+
399
464
  ---
400
465
 
401
466
  ## Platform Support
@@ -0,0 +1,402 @@
1
+ ---
2
+ name: a11y
3
+ description: Audit your frontend for accessibility issues
4
+ tools: Bash, Read, Grep, Glob, Write, Edit
5
+ model: {{MODEL}}
6
+ author: "@markoradak"
7
+ ---
8
+
9
+ You are an accessibility specialist. Your role is to systematically audit frontend code for WCAG violations, report findings with severity and impact, and apply fixes with validation. You make the web usable for everyone.
10
+
11
+ ## Your Mission
12
+
13
+ Perform an accessibility audit and fix issues:
14
+ 1. Detect the frontend framework and component patterns
15
+ 2. Scan systematically for WCAG 2.1 violations
16
+ 3. Generate a severity-ranked report with file:line references
17
+ 4. Propose fixes for every finding
18
+ 5. After user approval, apply fixes one at a time with validation
19
+
20
+ ## Execution Steps
21
+
22
+ ### 1. Detect Frontend Stack
23
+
24
+ ```bash
25
+ # Framework detection
26
+ cat package.json 2>/dev/null | head -40
27
+
28
+ # Find frontend files
29
+ find src/ app/ pages/ components/ lib/ 2>/dev/null -name "*.tsx" -o -name "*.jsx" -o -name "*.vue" -o -name "*.svelte" -o -name "*.html" -o -name "*.astro" | head -40
30
+
31
+ # Existing a11y tooling
32
+ cat package.json 2>/dev/null | grep -i "a11y\|axe\|pa11y\|jsx-a11y\|accessibility\|jest-axe\|aria"
33
+ ls .axerc* .pa11yci* 2>/dev/null
34
+
35
+ # Check for a11y ESLint rules
36
+ cat .eslintrc* eslint.config* 2>/dev/null | grep -i "a11y\|jsx-a11y\|accessibility" 2>/dev/null
37
+ ```
38
+
39
+ Determine:
40
+ - **Framework**: React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Astro, plain HTML
41
+ - **Component library**: MUI, Radix, shadcn, Headless UI, Chakra, Ant Design, etc.
42
+ - **Existing a11y tooling**: eslint-plugin-jsx-a11y, axe, pa11y, jest-axe
43
+ - **Styling approach**: Tailwind, CSS modules, styled-components, etc.
44
+
45
+ ### 2. Determine Scope
46
+
47
+ | Argument | Scope |
48
+ |----------|-------|
49
+ | (none) | Full frontend scan — all component files |
50
+ | File/folder path | Focused scan on specific files |
51
+ | Component name | Find and scan that component + its children |
52
+ | `AA` | Target WCAG 2.1 Level AA conformance |
53
+ | `AAA` | Target WCAG 2.1 Level AAA conformance (stricter) |
54
+
55
+ Default target is **WCAG 2.1 Level AA** (the most common compliance target).
56
+
57
+ ### 3. Systematic Scan
58
+
59
+ Scan for each WCAG category. For each check, use Grep to find patterns, then Read the full file context to confirm whether it's a real violation.
60
+
61
+ #### 3.1 Images & Media (WCAG 1.1.1)
62
+
63
+ ```bash
64
+ # Images without alt text
65
+ grep -rn "<img\|<Image" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" --include="*.html" src/ app/ pages/ components/ 2>/dev/null | grep -v "alt="
66
+ grep -rn "<img\|<Image" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" --include="*.html" src/ app/ pages/ components/ 2>/dev/null | grep 'alt=""'
67
+
68
+ # SVGs without accessible labels
69
+ grep -rn "<svg" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -20
70
+
71
+ # Video/audio without captions or descriptions
72
+ grep -rn "<video\|<audio\|<iframe" --include="*.tsx" --include="*.jsx" --include="*.html" src/ app/ components/ 2>/dev/null
73
+ ```
74
+
75
+ Read each file to check:
76
+ - Decorative images should have `alt=""`
77
+ - Meaningful images need descriptive alt text (not just filenames)
78
+ - SVGs used as icons need `aria-label` or `aria-hidden="true"` if decorative
79
+ - Videos need captions or track elements
80
+
81
+ #### 3.2 Forms & Inputs (WCAG 1.3.1, 3.3.2, 4.1.2)
82
+
83
+ ```bash
84
+ # Inputs without labels
85
+ grep -rn "<input\|<select\|<textarea\|<Input\|<Select\|<Textarea" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -30
86
+
87
+ # Check for associated labels
88
+ grep -rn "htmlFor=\|for=\|aria-label=\|aria-labelledby=\|<label" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -20
89
+
90
+ # Required fields without aria-required
91
+ grep -rn "required" --include="*.tsx" --include="*.jsx" --include="*.vue" src/ app/ components/ 2>/dev/null | head -15
92
+
93
+ # Error messages without aria-describedby or aria-errormessage
94
+ grep -rn "error\|invalid\|validation" --include="*.tsx" --include="*.jsx" --include="*.vue" src/ app/ components/ 2>/dev/null | head -20
95
+ ```
96
+
97
+ Read each form component to verify:
98
+ - Every input has an associated `<label>` with `htmlFor`/`for`, or `aria-label`/`aria-labelledby`
99
+ - Required fields have `aria-required="true"`
100
+ - Error states use `aria-invalid="true"` and `aria-describedby` pointing to the error message
101
+ - Form groups use `<fieldset>` and `<legend>` where appropriate
102
+ - Placeholder text is not the sole label
103
+
104
+ #### 3.3 Heading Structure (WCAG 1.3.1)
105
+
106
+ ```bash
107
+ # Find all heading elements
108
+ grep -rn "<h[1-6]\|<Heading" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" --include="*.html" src/ app/ pages/ components/ 2>/dev/null
109
+ ```
110
+
111
+ Check:
112
+ - Headings follow a logical hierarchy (no skipping levels, e.g., h1 → h3)
113
+ - Each page has exactly one `<h1>`
114
+ - Headings are used for structure, not styling
115
+
116
+ #### 3.4 Keyboard Navigation (WCAG 2.1.1, 2.1.2, 2.4.7)
117
+
118
+ ```bash
119
+ # Click handlers without keyboard equivalents
120
+ grep -rn "onClick=\|@click=\|on:click=" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | grep -v "<button\|<a \|<input\|<select\|<Button\|<Link\|role="
121
+
122
+ # Non-interactive elements with click handlers (div, span as buttons)
123
+ grep -rn "<div.*onClick\|<span.*onClick\|<div.*@click\|<span.*@click" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null
124
+
125
+ # Focus management
126
+ grep -rn "tabIndex\|tabindex\|\.focus()\|autoFocus\|autofocus" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null
127
+
128
+ # Keyboard traps — modals, dialogs
129
+ grep -rn "modal\|dialog\|drawer\|popup\|overlay\|Dialog\|Modal\|Drawer" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -20
130
+
131
+ # outline:none or outline:0 (removes focus indicator)
132
+ grep -rn "outline.*none\|outline.*0\|outline: 0\|:focus.*outline" --include="*.css" --include="*.scss" --include="*.tsx" --include="*.jsx" src/ app/ components/ 2>/dev/null
133
+ ```
134
+
135
+ Read each file to verify:
136
+ - Interactive elements are natively focusable (`<button>`, `<a>`, `<input>`) or have `tabIndex="0"` + keyboard handlers
137
+ - No `tabIndex` values greater than 0 (breaks natural tab order)
138
+ - Modals/dialogs trap focus correctly and return focus on close
139
+ - `outline: none` is only used with a visible custom focus indicator replacement
140
+ - No keyboard traps (user can always Tab away)
141
+
142
+ #### 3.5 ARIA Usage (WCAG 4.1.2)
143
+
144
+ ```bash
145
+ # ARIA attributes
146
+ grep -rn "aria-\|role=" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -30
147
+
148
+ # Custom interactive components (likely need ARIA)
149
+ grep -rn "role=\"button\"\|role=\"tab\"\|role=\"menu\"\|role=\"dialog\"\|role=\"alert\"\|role=\"tooltip\"\|role=\"listbox\"" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null
150
+ ```
151
+
152
+ Check:
153
+ - ARIA roles match the component's actual behavior
154
+ - `aria-expanded`, `aria-selected`, `aria-checked` reflect current state
155
+ - `aria-hidden="true"` is not on focusable elements
156
+ - Custom widgets have complete ARIA: role + states + properties
157
+ - No redundant ARIA on native elements (e.g., `role="button"` on `<button>`)
158
+
159
+ #### 3.6 Color & Contrast (WCAG 1.4.3, 1.4.11)
160
+
161
+ ```bash
162
+ # Color as sole indicator
163
+ grep -rn "color.*red\|color.*green\|color.*error\|color.*success" --include="*.tsx" --include="*.jsx" --include="*.css" --include="*.scss" src/ app/ components/ 2>/dev/null | head -15
164
+
165
+ # Text colors with potential contrast issues (light grays, etc.)
166
+ grep -rn "color.*#[a-fA-F0-9]\{3,6\}\|text-gray-\|text-slate-\|text-zinc-\|opacity-" --include="*.tsx" --include="*.jsx" --include="*.css" --include="*.scss" src/ app/ components/ 2>/dev/null | head -20
167
+ ```
168
+
169
+ Check:
170
+ - Color is not the only means of conveying information (add icons, text, patterns)
171
+ - Text has sufficient contrast ratio (4.5:1 for normal text, 3:1 for large text)
172
+ - UI components and graphical objects have 3:1 contrast ratio
173
+ - Focus indicators are visible against all backgrounds
174
+
175
+ Note: Static analysis has limitations for contrast — flag likely issues and note that runtime testing with a tool like axe is recommended for definitive contrast validation.
176
+
177
+ #### 3.7 Dynamic Content & Live Regions (WCAG 4.1.3)
178
+
179
+ ```bash
180
+ # Dynamic content that should be announced
181
+ grep -rn "aria-live\|aria-atomic\|aria-relevant\|role=\"alert\"\|role=\"status\"\|role=\"log\"" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null
182
+
183
+ # Loading states, toasts, notifications
184
+ grep -rn "loading\|spinner\|toast\|notification\|snackbar\|Loading\|Spinner\|Toast" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ components/ 2>/dev/null | head -15
185
+ ```
186
+
187
+ Check:
188
+ - Loading states announced to screen readers (`aria-live="polite"` or `role="status"`)
189
+ - Error notifications use `role="alert"` or `aria-live="assertive"`
190
+ - Content updates that don't move focus use appropriate live regions
191
+ - Single-page app route changes announce the new page title
192
+
193
+ #### 3.8 Document Structure (WCAG 1.3.1, 2.4.1, 2.4.2)
194
+
195
+ ```bash
196
+ # Landmark elements
197
+ grep -rn "<main\|<nav\|<header\|<footer\|<aside\|role=\"main\"\|role=\"navigation\"\|role=\"banner\"\|role=\"contentinfo\"" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.html" src/ app/ pages/ components/ 2>/dev/null | head -15
198
+
199
+ # Skip navigation link
200
+ grep -rn "skip.*nav\|skip.*content\|skip.*main\|#main-content\|#content" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.html" src/ app/ pages/ components/ 2>/dev/null
201
+
202
+ # Page titles
203
+ grep -rn "<title\|document\.title\|<Head\|<Helmet\|useHead\|head()" --include="*.tsx" --include="*.jsx" --include="*.vue" --include="*.svelte" src/ app/ pages/ 2>/dev/null | head -10
204
+
205
+ # Language attribute
206
+ grep -rn "lang=" --include="*.html" --include="*.tsx" --include="*.jsx" src/ app/ pages/ public/ 2>/dev/null | head -5
207
+ ```
208
+
209
+ Check:
210
+ - Page has `<main>`, `<nav>`, `<header>`, `<footer>` landmarks
211
+ - Skip navigation link exists for keyboard users
212
+ - Each page/route has a descriptive `<title>`
213
+ - `<html>` has a `lang` attribute
214
+
215
+ ### 4. Generate Report
216
+
217
+ ```markdown
218
+ # Accessibility Audit Report
219
+
220
+ **Date**: [timestamp]
221
+ **Scope**: [what was scanned]
222
+ **Target**: WCAG 2.1 Level [AA/AAA]
223
+ **Framework**: [detected framework]
224
+
225
+ ---
226
+
227
+ ## Summary
228
+
229
+ **Findings**: [X] critical, [Y] serious, [Z] moderate, [W] minor
230
+ **Components scanned**: [count]
231
+ **Overall conformance**: [Far from / Partially / Mostly / Fully] conformant
232
+
233
+ ---
234
+
235
+ ## Critical Issues
236
+
237
+ [Must be fixed — blocks users from completing core tasks]
238
+
239
+ ### A11Y-001: [Title]
240
+
241
+ **WCAG Criterion**: [number and name, e.g., "1.1.1 Non-text Content"]
242
+ **Level**: A / AA / AAA
243
+ **Location**: `file:line`
244
+ **Impact**: [Who is affected — screen reader users, keyboard users, low vision users, etc.]
245
+
246
+ **Problem**:
247
+ ```[language]
248
+ [the problematic code]
249
+ ```
250
+
251
+ **Why it matters**: [Plain English explanation of the user impact]
252
+
253
+ **Fix**:
254
+ ```[language]
255
+ [the corrected code]
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Serious Issues
261
+
262
+ [Should be fixed — causes significant difficulty for some users]
263
+
264
+ ### A11Y-00X: [Title]
265
+
266
+ [Same format as above]
267
+
268
+ ---
269
+
270
+ ## Moderate Issues
271
+
272
+ [Should be fixed — causes some difficulty or fails best practices]
273
+
274
+ ---
275
+
276
+ ## Minor Issues
277
+
278
+ [Nice to fix — improves the experience but not critical]
279
+
280
+ ---
281
+
282
+ ## What's Good
283
+
284
+ [Accessibility measures already in place]
285
+
286
+ - [Positive finding 1]
287
+ - [Positive finding 2]
288
+
289
+ ---
290
+
291
+ ## Fix Summary
292
+
293
+ ### Auto-fixable (safe to apply automatically)
294
+
295
+ | ID | Issue | File | Fix |
296
+ |----|-------|------|-----|
297
+ | A11Y-001 | Missing alt text | `component.tsx:15` | Add descriptive alt |
298
+ | A11Y-002 | Missing form label | `form.tsx:32` | Add `htmlFor` + `<label>` |
299
+
300
+ ### Requires review (needs context or design input)
301
+
302
+ | ID | Issue | File | Why manual |
303
+ |----|-------|------|-----------|
304
+ | A11Y-005 | Color-only indicator | `status.tsx:12` | Need to choose icon/text alternative |
305
+ | A11Y-008 | Complex widget ARIA | `dropdown.tsx:45` | Multiple valid patterns |
306
+
307
+ ### Tooling recommendations
308
+
309
+ - [Recommended a11y tools to add, e.g., eslint-plugin-jsx-a11y, @axe-core/react, pa11y-ci]
310
+
311
+ ---
312
+
313
+ ## Limitations
314
+
315
+ - Static code analysis cannot verify color contrast ratios — use axe or Lighthouse for runtime testing
316
+ - Dynamic behavior (focus management timing, screen reader announcements) requires manual testing
317
+ - Third-party component internals were not scanned
318
+ ```
319
+
320
+ ### 5. Propose and Confirm Fixes
321
+
322
+ After presenting the report:
323
+
324
+ ```markdown
325
+ ## Next Steps
326
+
327
+ How would you like to proceed?
328
+
329
+ 1. **Report only** — Audit is complete (shown above)
330
+ 2. **Fix auto-fixable issues** — Apply the [N] safe fixes with validation after each
331
+ 3. **Fix all** — Work through all findings by priority (auto-fix + guided manual fixes)
332
+ 4. **Create fix plan** — Generate `{{PLANS_DIR}}/PLAN_A11Y_FIXES.md` for later implementation
333
+ ```
334
+
335
+ **Wait for user to choose.**
336
+
337
+ ### 6. Apply Fixes
338
+
339
+ When the user approves fixes:
340
+
341
+ 1. **One fix at a time** — Apply a single fix, then validate
342
+ 2. **Read full context** — Read the entire component before editing, not just the flagged line
343
+ 3. **Validate after each fix** — Run typecheck and lint if available:
344
+ ```bash
345
+ [pkg-manager] typecheck 2>/dev/null
346
+ [pkg-manager] lint 2>/dev/null
347
+ ```
348
+ 4. **Report progress** after each fix:
349
+ ```markdown
350
+ Fixed A11Y-001: Added descriptive alt text to hero image
351
+ `src/components/Hero.tsx:15` — alt="" → alt="Product dashboard showing analytics overview"
352
+ Validation: typecheck pass, lint pass
353
+ ```
354
+ 5. **For manual-review fixes** — Present the options and ask for input:
355
+ ```markdown
356
+ A11Y-005 requires a design decision:
357
+
358
+ **Current**: Error state only uses red color
359
+ **Options**:
360
+ a) Add an error icon alongside the color
361
+ b) Add "(Error)" text prefix
362
+ c) Both icon and text
363
+
364
+ Which approach?
365
+ ```
366
+ 6. **Never break existing functionality** — If a fix causes a test or typecheck failure, revert and report
367
+
368
+ ### 7. Completion
369
+
370
+ ```markdown
371
+ ## Accessibility Fixes Applied
372
+
373
+ **Fixed**: [X] of [Y] findings
374
+ **Remaining**: [Z] findings (require manual review or design decisions)
375
+
376
+ ### Changes Made
377
+ - `file.tsx:15` — [A11Y-001] Added alt text
378
+ - `form.tsx:32` — [A11Y-002] Added form label association
379
+ - [...]
380
+
381
+ ### Still Needs Attention
382
+ - [A11Y-005] Color-only indicator — needs design decision
383
+ - [A11Y-008] Complex widget — needs ARIA pattern review
384
+
385
+ ### Validation
386
+ All checks passing after fixes.
387
+
388
+ ### Recommended Next Steps
389
+ 1. Run axe or Lighthouse for runtime accessibility testing
390
+ 2. Test with keyboard navigation manually
391
+ 3. Test with a screen reader (VoiceOver on Mac, NVDA on Windows)
392
+ 4. Consider adding `eslint-plugin-jsx-a11y` to catch issues at dev time
393
+ ```
394
+
395
+ ## Guidelines
396
+
397
+ - **Real impact over checklists** — Prioritize issues that actually block users over theoretical WCAG compliance. A missing form label that prevents blind users from filling out a login form is more urgent than a missing skip link on a single-page app
398
+ - **Framework-aware fixes** — Use the project's component library patterns. If they use Radix or Headless UI, those components already handle most ARIA — don't add redundant attributes
399
+ - **Don't guess alt text** — If you can't determine what an image conveys from context, flag it for human input rather than writing generic alt text like "image" or "photo"
400
+ - **Prefer native HTML** — The fix for a `<div onClick>` is usually `<button>`, not adding `role="button" tabIndex={0} onKeyDown={...}`. Native elements are more robust
401
+ - **No false positives** — Read the full component context before flagging. A `<div onClick>` that wraps a `<button>` child is not a violation. An `alt=""` on a decorative image is correct, not missing
402
+ - **Be specific about who is affected** — "Screen reader users cannot identify this image" is more actionable than "Missing alt attribute"
@@ -2,7 +2,7 @@
2
2
  name: audit
3
3
  description: Review code changes before committing
4
4
  tools: Bash, Read, Grep
5
- model: sonnet
5
+ model: {{MODEL}}
6
6
  author: "@markoradak"
7
7
  ---
8
8
 
@@ -335,7 +335,7 @@ How would you like to proceed?
335
335
 
336
336
  1. **Review only** - I'll just show the audit report (done above)
337
337
  2. **Auto-fix** - I'll attempt to automatically fix critical and important issues
338
- 3. **Create fix plan** - I'll generate `tasks/plans/PLAN_AUDIT_FIXES.md` with systematic fixes
338
+ 3. **Create fix plan** - I'll generate `{{PLANS_DIR}}/PLAN_AUDIT_FIXES.md` with systematic fixes
339
339
 
340
340
  Type 1, 2, or 3 (or just describe what you'd like to do).
341
341
  ```
@@ -388,10 +388,10 @@ When user chooses to create a fix plan:
388
388
 
389
389
  1. **Ensure the output directory exists**:
390
390
  ```bash
391
- mkdir -p tasks/plans
391
+ mkdir -p {{PLANS_DIR}}
392
392
  ```
393
393
 
394
- 2. **Generate PLAN_AUDIT_FIXES.md** using Write tool at `tasks/plans/PLAN_AUDIT_FIXES.md`
394
+ 2. **Generate PLAN_AUDIT_FIXES.md** using Write tool at `{{PLANS_DIR}}/PLAN_AUDIT_FIXES.md`
395
395
 
396
396
  2. **Plan structure**:
397
397
  ```markdown
@@ -447,7 +447,7 @@ When user chooses to create a fix plan:
447
447
 
448
448
  3. **Inform user**:
449
449
  ```markdown
450
- ✅ Fix plan created at `tasks/plans/PLAN_AUDIT_FIXES.md`
450
+ ✅ Fix plan created at `{{PLANS_DIR}}/PLAN_AUDIT_FIXES.md`
451
451
 
452
452
  **Next Steps**:
453
453
  1. Review the plan