@smartsoft001-mobilems/claude-plugins 2.67.0 → 2.69.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/.claude-plugin/marketplace.json +4 -0
- package/package.json +1 -1
- package/plugins/flow/.claude-plugin/plugin.json +1 -1
- package/plugins/flow-legacy/.claude-plugin/README.md +143 -0
- package/plugins/flow-legacy/.claude-plugin/merge-permissions.js +80 -0
- package/plugins/flow-legacy/.claude-plugin/plugin.json +5 -0
- package/plugins/flow-legacy/.claude-plugin/settings.template.json +75 -0
- package/plugins/flow-legacy/agents/angular-component-scaffolder.md +323 -0
- package/plugins/flow-legacy/agents/angular-directive-builder.md +258 -0
- package/plugins/flow-legacy/agents/angular-guard-builder.md +322 -0
- package/plugins/flow-legacy/agents/angular-pipe-builder.md +227 -0
- package/plugins/flow-legacy/agents/angular-resolver-builder.md +332 -0
- package/plugins/flow-legacy/agents/angular-service-builder.md +271 -0
- package/plugins/flow-legacy/agents/angular-state-builder.md +473 -0
- package/plugins/flow-legacy/agents/shared-impl-orchestrator.md +161 -0
- package/plugins/flow-legacy/agents/shared-impl-reporter.md +204 -0
- package/plugins/flow-legacy/agents/shared-linear-subtask-iterator.md +187 -0
- package/plugins/flow-legacy/agents/shared-tdd-developer.md +304 -0
- package/plugins/flow-legacy/agents/shared-test-runner.md +131 -0
- package/plugins/flow-legacy/agents/shared-ui-classifier.md +137 -0
- package/plugins/flow-legacy/commands/commit.md +162 -0
- package/plugins/flow-legacy/commands/impl.md +495 -0
- package/plugins/flow-legacy/commands/plan.md +488 -0
- package/plugins/flow-legacy/commands/push.md +470 -0
- package/plugins/flow-legacy/skills/a11y-audit/SKILL.md +214 -0
- package/plugins/flow-legacy/skills/angular-patterns/SKILL.md +361 -0
- package/plugins/flow-legacy/skills/browser-capture/SKILL.md +238 -0
- package/plugins/flow-legacy/skills/debug-helper/SKILL.md +387 -0
- package/plugins/flow-legacy/skills/linear-suggestion/SKILL.md +132 -0
- package/plugins/flow-legacy/skills/maia-files-delete/SKILL.md +59 -0
- package/plugins/flow-legacy/skills/maia-files-upload/SKILL.md +57 -0
- package/plugins/flow-legacy/skills/nx-conventions/SKILL.md +371 -0
- package/plugins/flow-legacy/skills/test-unit/SKILL.md +494 -0
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
# Push Command
|
|
2
|
+
|
|
3
|
+
Push local changes to remote and optionally update Linear task status.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/push [linearTaskId]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
- `linearTaskId` - Linear task ID (e.g., MOB-123)
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
You are tasked with pushing local changes to the remote repository, summarizing what was done, and optionally moving the Linear task to "In Review".
|
|
18
|
+
|
|
19
|
+
### Step 1: Check Git Status
|
|
20
|
+
|
|
21
|
+
Run `git status` to verify:
|
|
22
|
+
|
|
23
|
+
- Current branch name
|
|
24
|
+
- Number of commits ahead of remote
|
|
25
|
+
- Any uncommitted changes (warn user if present)
|
|
26
|
+
|
|
27
|
+
If there are uncommitted changes, warn the user and ask if they want to proceed or commit first.
|
|
28
|
+
|
|
29
|
+
### Step 2: Get Commits to Push
|
|
30
|
+
|
|
31
|
+
Run `git log origin/<branch>..HEAD --oneline` to get the list of commits that will be pushed.
|
|
32
|
+
|
|
33
|
+
If no commits to push, inform the user and exit.
|
|
34
|
+
|
|
35
|
+
### Step 3: Fetch Linear Task Details (if linearTaskId provided)
|
|
36
|
+
|
|
37
|
+
If `linearTaskId` was provided, use MCP Linear server to fetch:
|
|
38
|
+
|
|
39
|
+
- Task title
|
|
40
|
+
- Current status
|
|
41
|
+
- Subtasks (if any) and their statuses
|
|
42
|
+
- Comments on subtasks (to find reasons for incomplete items)
|
|
43
|
+
|
|
44
|
+
### Step 4: Analyze Subtasks Status
|
|
45
|
+
|
|
46
|
+
For each subtask, determine:
|
|
47
|
+
|
|
48
|
+
1. **Completed subtasks**: Status is "Done", "In Review", or has implementation completed
|
|
49
|
+
2. **Incomplete subtasks**: Status is "To Do", "Blocked", or was not implemented
|
|
50
|
+
|
|
51
|
+
For incomplete subtasks, find the reason by:
|
|
52
|
+
|
|
53
|
+
- Reading comments on the subtask (look for "Analiza problemu", "Blocker", "Status: Blocked")
|
|
54
|
+
- Checking if it was marked as backend issue, external dependency, etc.
|
|
55
|
+
|
|
56
|
+
Build a summary of incomplete items with reasons.
|
|
57
|
+
|
|
58
|
+
### Step 5: Show Summary and Ask About Status Update
|
|
59
|
+
|
|
60
|
+
Show summary of what will be pushed and ask user:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## Podsumowanie
|
|
64
|
+
|
|
65
|
+
### Commity do wysłania (X)
|
|
66
|
+
|
|
67
|
+
| Commit | Opis |
|
|
68
|
+
| ------- | -------------------------- |
|
|
69
|
+
| abc1234 | feat(scope): description 1 |
|
|
70
|
+
| def5678 | fix(scope): description 2 |
|
|
71
|
+
|
|
72
|
+
### Podzadania
|
|
73
|
+
|
|
74
|
+
#### Zrealizowane
|
|
75
|
+
|
|
76
|
+
- ✅ MOB-549: Naprawić szerokość logo
|
|
77
|
+
- ✅ MOB-550: Usunąć zdublowane zdjęcia
|
|
78
|
+
|
|
79
|
+
#### Niezrealizowane
|
|
80
|
+
|
|
81
|
+
- ⚠️ MOB-554: Obsłużyć zdjęcia PNG → Problem backendu
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
**Task**: [linearTaskId] - [Task Title]
|
|
86
|
+
**Aktualny status**: [Current Status]
|
|
87
|
+
|
|
88
|
+
Czy przenieść task do "In Review" i wysłać zmiany?
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Use `AskUserQuestion` tool with options:
|
|
92
|
+
|
|
93
|
+
- "Tak, przenieś do In Review i wyślij" (Recommended)
|
|
94
|
+
- "Tylko wyślij, bez zmiany statusu"
|
|
95
|
+
- "Anuluj"
|
|
96
|
+
|
|
97
|
+
### Step 6: Update Linear Status (if confirmed)
|
|
98
|
+
|
|
99
|
+
**BEFORE pushing**, if user confirmed status change:
|
|
100
|
+
|
|
101
|
+
1. **For tasks with subtasks**: Update all completed subtasks to "In Review"
|
|
102
|
+
2. **For tasks without subtasks**: Update the task itself to "In Review"
|
|
103
|
+
|
|
104
|
+
Create a comment on the **parent task** summarizing:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## Podsumowanie Implementacji
|
|
108
|
+
|
|
109
|
+
### Branch
|
|
110
|
+
|
|
111
|
+
`<branch-name>`
|
|
112
|
+
|
|
113
|
+
### Zrealizowane Podzadania
|
|
114
|
+
|
|
115
|
+
| Podzadanie | Tytuł | Status |
|
|
116
|
+
| ---------- | ------------------------- | --------------- |
|
|
117
|
+
| MOB-549 | Naprawić szerokość logo | ✅ Zrealizowane |
|
|
118
|
+
| MOB-550 | Usunąć zdublowane zdjęcia | ✅ Zrealizowane |
|
|
119
|
+
|
|
120
|
+
### Niezrealizowane Podzadania
|
|
121
|
+
|
|
122
|
+
| Podzadanie | Tytuł | Powód |
|
|
123
|
+
| ---------- | -------------------- | ------------------------------------------------------- |
|
|
124
|
+
| MOB-554 | Obsłużyć zdjęcia PNG | ⚠️ Problem backendu - wymaga naprawy po stronie serwera |
|
|
125
|
+
|
|
126
|
+
### Commity
|
|
127
|
+
|
|
128
|
+
| Commit | Opis |
|
|
129
|
+
| ------- | -------------------------- |
|
|
130
|
+
| abc1234 | feat(scope): description 1 |
|
|
131
|
+
| def5678 | fix(scope): description 2 |
|
|
132
|
+
|
|
133
|
+
### Angular Version
|
|
134
|
+
|
|
135
|
+
Angular 14 (legacy patterns)
|
|
136
|
+
|
|
137
|
+
### Status
|
|
138
|
+
|
|
139
|
+
Task przeniesiony do "In Review".
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
_Raport wygenerowany przez Claude Code (flow-legacy)_
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Step 7: Push to Remote
|
|
147
|
+
|
|
148
|
+
Execute `git push` to push the commits to the remote repository.
|
|
149
|
+
|
|
150
|
+
If push fails:
|
|
151
|
+
|
|
152
|
+
- Show the error message
|
|
153
|
+
- Suggest possible solutions (pull first, force push if appropriate, etc.)
|
|
154
|
+
- Note: Linear status was already updated, may need to revert if push ultimately fails
|
|
155
|
+
|
|
156
|
+
### Step 8: Final Confirmation
|
|
157
|
+
|
|
158
|
+
Show final status to user:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
## Gotowe
|
|
162
|
+
|
|
163
|
+
✅ Linear task [linearTaskId] przeniesiony do "In Review"
|
|
164
|
+
✅ Zmiany wysłane do `origin/<branch-name>`
|
|
165
|
+
|
|
166
|
+
### Następne kroki
|
|
167
|
+
|
|
168
|
+
- Oczekiwanie na code review
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Step 9: Branch-Specific Post-Push Actions
|
|
172
|
+
|
|
173
|
+
After successful push, determine the next action based on the current branch:
|
|
174
|
+
|
|
175
|
+
1. **If branch is `development`**: Proceed to **Step 10** (Deployment Verification)
|
|
176
|
+
2. **If branch is a feature branch** (matches Linear issue ID pattern like `MOB-123`, `mob-123`, etc.): Proceed to **Step 9a** (PR Workflow)
|
|
177
|
+
|
|
178
|
+
#### Step 9a: Feature Branch - Check/Create Pull Request
|
|
179
|
+
|
|
180
|
+
**Applicable only when on a feature branch (not `development`).**
|
|
181
|
+
|
|
182
|
+
1. **Check if all subtasks are completed**:
|
|
183
|
+
|
|
184
|
+
Review the subtask analysis from Step 4. Consider a task "ready for PR" if:
|
|
185
|
+
|
|
186
|
+
- All subtasks are in "Done" or "In Review" status, OR
|
|
187
|
+
- Incomplete subtasks have documented reasons (backend issue, external dependency, etc.)
|
|
188
|
+
|
|
189
|
+
2. **Check if PR already exists**:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
gh pr list --head <branch-name> --base development --json number,title,state,url
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
3. **If PR exists**:
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
## Pull Request Already Exists
|
|
199
|
+
|
|
200
|
+
**PR**: #<number> - <title>
|
|
201
|
+
**Status**: <state>
|
|
202
|
+
**URL**: <url>
|
|
203
|
+
|
|
204
|
+
No action needed - PR already created.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
4. **If PR does NOT exist**, ask user:
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
## Create Pull Request?
|
|
211
|
+
|
|
212
|
+
Branch `<branch-name>` has no open PR to `development`.
|
|
213
|
+
|
|
214
|
+
### Subtasks Status
|
|
215
|
+
|
|
216
|
+
- ✅ Completed: X
|
|
217
|
+
- ⚠️ Incomplete: Y (with documented reasons)
|
|
218
|
+
|
|
219
|
+
Do you want to create a Pull Request?
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Use `AskUserQuestion` tool with options:
|
|
223
|
+
|
|
224
|
+
- "Tak, utwórz PR do development" (Recommended)
|
|
225
|
+
- "Nie, zakończ bez PR"
|
|
226
|
+
|
|
227
|
+
5. **If user confirms PR creation**:
|
|
228
|
+
|
|
229
|
+
Create PR using `gh pr create`:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
gh pr create --base development --head <branch-name> --title "<Linear-ID>: <Task Title>" --body "$(cat <<'EOF'
|
|
233
|
+
## Summary
|
|
234
|
+
|
|
235
|
+
Implementation for [<Linear-ID>](https://linear.app/issue/<Linear-ID>)
|
|
236
|
+
|
|
237
|
+
### Technology Stack
|
|
238
|
+
|
|
239
|
+
- Angular 14 (legacy patterns)
|
|
240
|
+
- Nx 14 with @nrwl/* packages
|
|
241
|
+
|
|
242
|
+
### Completed Subtasks
|
|
243
|
+
|
|
244
|
+
- ✅ <subtask-id>: <title>
|
|
245
|
+
- ✅ <subtask-id>: <title>
|
|
246
|
+
|
|
247
|
+
### Incomplete Subtasks (with reasons)
|
|
248
|
+
|
|
249
|
+
- ⚠️ <subtask-id>: <title> → <reason>
|
|
250
|
+
|
|
251
|
+
### Commits
|
|
252
|
+
|
|
253
|
+
| Commit | Description |
|
|
254
|
+
|--------|-------------|
|
|
255
|
+
| abc123 | feat: ... |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code) (flow-legacy)
|
|
260
|
+
EOF
|
|
261
|
+
)"
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
6. **Show PR creation result**:
|
|
265
|
+
|
|
266
|
+
```markdown
|
|
267
|
+
## ✅ Pull Request Created
|
|
268
|
+
|
|
269
|
+
**PR**: #<number> - <title>
|
|
270
|
+
**URL**: <url>
|
|
271
|
+
**Base**: development
|
|
272
|
+
**Head**: <branch-name>
|
|
273
|
+
|
|
274
|
+
### Następne kroki
|
|
275
|
+
|
|
276
|
+
- Oczekiwanie na code review
|
|
277
|
+
- Po zatwierdzeniu: merge do development
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**End the command here for feature branches.**
|
|
281
|
+
|
|
282
|
+
### Step 10: Ask About Deployment Verification (development branch only)
|
|
283
|
+
|
|
284
|
+
**Applicable only when on `development` branch.**
|
|
285
|
+
|
|
286
|
+
After successful push, ask the user if they want to verify deployment:
|
|
287
|
+
|
|
288
|
+
```markdown
|
|
289
|
+
## Deployment Verification
|
|
290
|
+
|
|
291
|
+
Do you want to verify the deployment on QA environment?
|
|
292
|
+
|
|
293
|
+
Verification process:
|
|
294
|
+
|
|
295
|
+
1. Monitor GitHub Actions CI pipeline until completion
|
|
296
|
+
2. Git pull and check if package.json was updated
|
|
297
|
+
3. Wait 5 minutes for deployment
|
|
298
|
+
4. Verify app version on QA site
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Use `AskUserQuestion` tool with options:
|
|
302
|
+
|
|
303
|
+
- "Yes, verify deployment" (Recommended)
|
|
304
|
+
- "No, finish now"
|
|
305
|
+
|
|
306
|
+
If user chooses not to verify, end the command here.
|
|
307
|
+
|
|
308
|
+
### Step 11: Monitor CI Pipeline via GitHub Actions
|
|
309
|
+
|
|
310
|
+
**Do NOT wait a fixed time.** Instead, actively monitor GitHub Actions workflows using `gh` CLI.
|
|
311
|
+
|
|
312
|
+
1. **Get the latest workflow run for the current branch**:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
gh run list --branch <branch-name> --limit 1 --json databaseId,status,conclusion,workflowName
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
2. **Poll workflow status** every 30 seconds until it completes:
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
gh run view <run-id> --json status,conclusion
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
3. **Show progress to user**:
|
|
325
|
+
|
|
326
|
+
```markdown
|
|
327
|
+
## CI/CD Pipeline Monitoring
|
|
328
|
+
|
|
329
|
+
🔄 Monitoring GitHub Actions workflow...
|
|
330
|
+
|
|
331
|
+
**Workflow**: <workflow-name>
|
|
332
|
+
**Run ID**: <run-id>
|
|
333
|
+
**Status**: in_progress | queued | completed
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
4. **Check workflow result**:
|
|
337
|
+
|
|
338
|
+
**If workflow FAILED**:
|
|
339
|
+
|
|
340
|
+
```markdown
|
|
341
|
+
## ❌ CI Pipeline Failed
|
|
342
|
+
|
|
343
|
+
**Workflow**: <workflow-name>
|
|
344
|
+
**Run ID**: <run-id>
|
|
345
|
+
**Conclusion**: failure
|
|
346
|
+
|
|
347
|
+
### View logs
|
|
348
|
+
|
|
349
|
+
Run `gh run view <run-id> --log-failed` to see error details.
|
|
350
|
+
|
|
351
|
+
Or visit: https://github.com/<owner>/<repo>/actions/runs/<run-id>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Stop here if workflow failed.
|
|
355
|
+
|
|
356
|
+
**If workflow SUCCEEDED**, run:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
git fetch origin
|
|
360
|
+
git pull origin <branch-name>
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Check if `package.json` version has changed and proceed to Step 12.
|
|
364
|
+
|
|
365
|
+
### Step 12: Verify Deployment on QA (App Version Check)
|
|
366
|
+
|
|
367
|
+
Wait 5 minutes for deployment to complete:
|
|
368
|
+
|
|
369
|
+
```markdown
|
|
370
|
+
## QA Deployment Verification
|
|
371
|
+
|
|
372
|
+
⏳ Waiting 5 minutes for QA deployment...
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Use `sleep 300` or equivalent to wait.
|
|
376
|
+
|
|
377
|
+
After waiting, read SITE_URL from `.env.dev` file and fetch the page to verify app version.
|
|
378
|
+
|
|
379
|
+
### Step 13: Final Deployment Status
|
|
380
|
+
|
|
381
|
+
Show complete summary:
|
|
382
|
+
|
|
383
|
+
```markdown
|
|
384
|
+
## Complete Process Summary
|
|
385
|
+
|
|
386
|
+
### Git
|
|
387
|
+
|
|
388
|
+
✅ Changes pushed to `origin/<branch-name>`
|
|
389
|
+
|
|
390
|
+
### Linear
|
|
391
|
+
|
|
392
|
+
✅ Task [linearTaskId] moved to "In Review"
|
|
393
|
+
|
|
394
|
+
### CI/CD Pipeline
|
|
395
|
+
|
|
396
|
+
✅ Package.json updated to version X.X.X
|
|
397
|
+
|
|
398
|
+
### QA Deployment
|
|
399
|
+
|
|
400
|
+
✅ Application deployed to <SITE_URL>
|
|
401
|
+
✅ Version: X.X.X
|
|
402
|
+
|
|
403
|
+
### Technology
|
|
404
|
+
|
|
405
|
+
Angular 14 (legacy patterns)
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## Guidelines
|
|
409
|
+
|
|
410
|
+
1. **Write comments in Polish**: All Linear comments must be written in Polish
|
|
411
|
+
2. **Always confirm before status change**: Never change Linear status without user confirmation
|
|
412
|
+
3. **Update Linear BEFORE push**: Status change happens before git push
|
|
413
|
+
4. **Handle errors gracefully**: If push fails after status update, inform user
|
|
414
|
+
5. **Warn about uncommitted changes**: Don't push if there are uncommitted changes without user acknowledgment
|
|
415
|
+
6. **Show clear summaries**: Always show what commits will be pushed and subtask status
|
|
416
|
+
7. **Document incomplete subtasks**: Always explain WHY a subtask wasn't completed
|
|
417
|
+
8. **Deployment verification is optional**: Always ask user before starting the verification process
|
|
418
|
+
9. **Read SITE_URL from .env.dev**: Use the SITE_URL variable from `.env.dev` file for QA verification
|
|
419
|
+
10. **Branch-specific post-push actions**:
|
|
420
|
+
- **`development` branch**: Offer deployment verification (CI monitoring + QA version check)
|
|
421
|
+
- **Feature branch (e.g., `MOB-123`)**: Check/create PR to `development` when all subtasks are ready
|
|
422
|
+
|
|
423
|
+
## Error Handling
|
|
424
|
+
|
|
425
|
+
### Push Rejected (non-fast-forward)
|
|
426
|
+
|
|
427
|
+
```markdown
|
|
428
|
+
## Push Failed
|
|
429
|
+
|
|
430
|
+
**Error**: Updates were rejected because the remote contains work that you do not have locally.
|
|
431
|
+
|
|
432
|
+
**Uwaga**: Status w Linear został już zaktualizowany do "In Review".
|
|
433
|
+
|
|
434
|
+
### Options
|
|
435
|
+
|
|
436
|
+
1. `git pull --rebase` - Pull remote changes and rebase your commits on top
|
|
437
|
+
2. `git pull` - Pull remote changes and merge
|
|
438
|
+
3. `git push --force` - Force push (⚠️ overwrites remote changes)
|
|
439
|
+
|
|
440
|
+
Which option do you want to use?
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### No Commits to Push
|
|
444
|
+
|
|
445
|
+
```markdown
|
|
446
|
+
## Nothing to Push
|
|
447
|
+
|
|
448
|
+
Your branch is up to date with `origin/<branch-name>`.
|
|
449
|
+
|
|
450
|
+
No commits to push.
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Uncommitted Changes Present
|
|
454
|
+
|
|
455
|
+
```markdown
|
|
456
|
+
## Warning: Uncommitted Changes
|
|
457
|
+
|
|
458
|
+
You have uncommitted changes in your working directory:
|
|
459
|
+
|
|
460
|
+
- modified: path/to/file1.ts
|
|
461
|
+
- modified: path/to/file2.ts
|
|
462
|
+
|
|
463
|
+
### Options
|
|
464
|
+
|
|
465
|
+
1. Commit changes first (`/commit`)
|
|
466
|
+
2. Stash changes and push
|
|
467
|
+
3. Proceed anyway (push existing commits only)
|
|
468
|
+
|
|
469
|
+
What would you like to do?
|
|
470
|
+
```
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: a11y-audit
|
|
3
|
+
description: Run accessibility audits on web pages. Ensures dev server is running, navigates to pages, captures accessibility snapshots, and runs axe-core tests.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- mcp__playwright__browser_navigate
|
|
9
|
+
- mcp__playwright__browser_snapshot
|
|
10
|
+
- mcp__playwright__browser_evaluate
|
|
11
|
+
- mcp__playwright__browser_close
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Accessibility Audit Skill
|
|
15
|
+
|
|
16
|
+
Run accessibility audits on web pages using Playwright and axe-core. Automatically ensures the development server is running before auditing.
|
|
17
|
+
|
|
18
|
+
## Capabilities
|
|
19
|
+
|
|
20
|
+
1. **Server Management**: Check if dev server is running, start if needed
|
|
21
|
+
2. **Page Navigation**: Navigate to specified URLs using Playwright
|
|
22
|
+
3. **Accessibility Snapshot**: Capture accessibility tree for analysis
|
|
23
|
+
4. **Axe-core Testing**: Run automated accessibility tests
|
|
24
|
+
|
|
25
|
+
## Server Management
|
|
26
|
+
|
|
27
|
+
### Read Port Configuration
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Default port location (Nx 14 / Angular 14 project)
|
|
31
|
+
grep -o '"port":[^,}]*' apps/web/project.json | head -1
|
|
32
|
+
# Default: 4200
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Check if Server is Running
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
lsof -i :4200 -t
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- If returns PID -> server is running
|
|
42
|
+
- If returns nothing -> server needs to be started
|
|
43
|
+
|
|
44
|
+
### Start Server if Needed
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Start in background (Nx 14 / @nrwl)
|
|
48
|
+
npm start &
|
|
49
|
+
|
|
50
|
+
# Wait for server to be ready
|
|
51
|
+
for i in {1..15}; do
|
|
52
|
+
curl -s http://localhost:4200 > /dev/null && break
|
|
53
|
+
sleep 2
|
|
54
|
+
done
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Audit Process
|
|
58
|
+
|
|
59
|
+
### 1. Ensure Server is Running
|
|
60
|
+
|
|
61
|
+
Before any audit:
|
|
62
|
+
|
|
63
|
+
1. Read port from `apps/web/project.json` (default: 4200)
|
|
64
|
+
2. Check if port is occupied: `lsof -i :PORT -t`
|
|
65
|
+
3. If not running: `npm start &` and wait ~15 seconds
|
|
66
|
+
|
|
67
|
+
### 2. Navigate to Page
|
|
68
|
+
|
|
69
|
+
Use `mcp__playwright__browser_navigate` to open the target URL.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
URL format: http://localhost:{port}/{path}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Capture Accessibility Snapshot
|
|
76
|
+
|
|
77
|
+
Use `mcp__playwright__browser_snapshot` to get the accessibility tree.
|
|
78
|
+
|
|
79
|
+
This provides:
|
|
80
|
+
|
|
81
|
+
- Element roles and names
|
|
82
|
+
- ARIA attributes
|
|
83
|
+
- Focus states
|
|
84
|
+
- Interactive element information
|
|
85
|
+
|
|
86
|
+
### 4. Run Axe-core Audit
|
|
87
|
+
|
|
88
|
+
Use `mcp__playwright__browser_evaluate` to inject and run axe-core:
|
|
89
|
+
|
|
90
|
+
```javascript
|
|
91
|
+
// Example evaluation code
|
|
92
|
+
async () => {
|
|
93
|
+
// Load axe-core from CDN
|
|
94
|
+
const script = document.createElement('script');
|
|
95
|
+
script.src =
|
|
96
|
+
'https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.8.2/axe.min.js';
|
|
97
|
+
document.head.appendChild(script);
|
|
98
|
+
|
|
99
|
+
await new Promise((resolve) => (script.onload = resolve));
|
|
100
|
+
|
|
101
|
+
// Run audit
|
|
102
|
+
const results = await axe.run();
|
|
103
|
+
return {
|
|
104
|
+
violations: results.violations,
|
|
105
|
+
passes: results.passes.length,
|
|
106
|
+
incomplete: results.incomplete,
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Usage Examples
|
|
112
|
+
|
|
113
|
+
### Full Page Audit
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Input: { path: "/articles" }
|
|
117
|
+
|
|
118
|
+
Process:
|
|
119
|
+
1. Check server running on port 4200
|
|
120
|
+
2. Start if needed, wait for ready
|
|
121
|
+
3. Navigate to http://localhost:4200/articles
|
|
122
|
+
4. Capture accessibility snapshot
|
|
123
|
+
5. Run axe-core audit
|
|
124
|
+
6. Return violations and recommendations
|
|
125
|
+
|
|
126
|
+
Output:
|
|
127
|
+
{
|
|
128
|
+
"url": "http://localhost:4200/articles",
|
|
129
|
+
"snapshot": { ... accessibility tree ... },
|
|
130
|
+
"violations": [
|
|
131
|
+
{
|
|
132
|
+
"id": "image-alt",
|
|
133
|
+
"impact": "critical",
|
|
134
|
+
"description": "Images must have alternate text",
|
|
135
|
+
"nodes": [...]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"passes": 45,
|
|
139
|
+
"incomplete": 2
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Quick Check
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Input: { path: "/", snapshotOnly: true }
|
|
147
|
+
|
|
148
|
+
Output:
|
|
149
|
+
{
|
|
150
|
+
"url": "http://localhost:4200/",
|
|
151
|
+
"snapshot": { ... accessibility tree ... }
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Report Format
|
|
156
|
+
|
|
157
|
+
When generating reports, use this structure:
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
## Accessibility Audit Report
|
|
161
|
+
|
|
162
|
+
**Page**: [URL]
|
|
163
|
+
**Date**: [Date]
|
|
164
|
+
**Standard**: WCAG 2.1 Level AA
|
|
165
|
+
|
|
166
|
+
### Critical Issues (Must Fix)
|
|
167
|
+
|
|
168
|
+
| Issue | Elements | WCAG | Fix |
|
|
169
|
+
| ----------- | -------- | ----- | ------------------------ |
|
|
170
|
+
| Missing alt | 3 images | 1.1.1 | Add descriptive alt text |
|
|
171
|
+
|
|
172
|
+
### Serious Issues (Should Fix)
|
|
173
|
+
|
|
174
|
+
| Issue | Elements | WCAG | Fix |
|
|
175
|
+
| ------------ | ---------- | ----- | ---------------- |
|
|
176
|
+
| Low contrast | 2 elements | 1.4.3 | Use darker color |
|
|
177
|
+
|
|
178
|
+
### Passed Checks
|
|
179
|
+
|
|
180
|
+
- [x] Page has lang attribute
|
|
181
|
+
- [x] Headings in correct order
|
|
182
|
+
- [x] Form inputs have labels
|
|
183
|
+
|
|
184
|
+
### Summary
|
|
185
|
+
|
|
186
|
+
- Violations: X critical, Y serious, Z minor
|
|
187
|
+
- Passed: N checks
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Error Handling
|
|
191
|
+
|
|
192
|
+
### Server Won't Start
|
|
193
|
+
|
|
194
|
+
If server fails to start after 30 seconds:
|
|
195
|
+
|
|
196
|
+
1. Check for port conflicts
|
|
197
|
+
2. Check npm logs for errors
|
|
198
|
+
3. Report error and skip audit
|
|
199
|
+
|
|
200
|
+
### Axe-core Load Fails
|
|
201
|
+
|
|
202
|
+
If axe-core fails to load:
|
|
203
|
+
|
|
204
|
+
1. Check network connectivity
|
|
205
|
+
2. Try alternative CDN
|
|
206
|
+
3. Fall back to snapshot-only audit
|
|
207
|
+
|
|
208
|
+
### Navigation Fails
|
|
209
|
+
|
|
210
|
+
If page doesn't load:
|
|
211
|
+
|
|
212
|
+
1. Verify URL is correct
|
|
213
|
+
2. Check for JavaScript errors
|
|
214
|
+
3. Report partial results
|