@qazuor/claude-code-config 0.1.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.
Files changed (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1248 -0
  3. package/dist/bin.cjs +11886 -0
  4. package/dist/bin.cjs.map +1 -0
  5. package/dist/bin.d.cts +1 -0
  6. package/dist/bin.d.ts +1 -0
  7. package/dist/bin.js +11869 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/index.cjs +3887 -0
  10. package/dist/index.cjs.map +1 -0
  11. package/dist/index.d.cts +1325 -0
  12. package/dist/index.d.ts +1325 -0
  13. package/dist/index.js +3835 -0
  14. package/dist/index.js.map +1 -0
  15. package/package.json +86 -0
  16. package/templates/.log/notifications.log +1775 -0
  17. package/templates/agents/README.md +164 -0
  18. package/templates/agents/_registry.json +443 -0
  19. package/templates/agents/design/content-writer.md +353 -0
  20. package/templates/agents/design/ux-ui-designer.md +382 -0
  21. package/templates/agents/engineering/astro-engineer.md +293 -0
  22. package/templates/agents/engineering/db-drizzle-engineer.md +360 -0
  23. package/templates/agents/engineering/express-engineer.md +316 -0
  24. package/templates/agents/engineering/fastify-engineer.md +399 -0
  25. package/templates/agents/engineering/hono-engineer.md +263 -0
  26. package/templates/agents/engineering/mongoose-engineer.md +473 -0
  27. package/templates/agents/engineering/nestjs-engineer.md +429 -0
  28. package/templates/agents/engineering/nextjs-engineer.md +451 -0
  29. package/templates/agents/engineering/node-typescript-engineer.md +347 -0
  30. package/templates/agents/engineering/prisma-engineer.md +432 -0
  31. package/templates/agents/engineering/react-senior-dev.md +394 -0
  32. package/templates/agents/engineering/tanstack-start-engineer.md +447 -0
  33. package/templates/agents/engineering/tech-lead.md +269 -0
  34. package/templates/agents/product/product-functional.md +329 -0
  35. package/templates/agents/product/product-technical.md +578 -0
  36. package/templates/agents/quality/debugger.md +514 -0
  37. package/templates/agents/quality/qa-engineer.md +390 -0
  38. package/templates/agents/specialized/enrichment-agent.md +277 -0
  39. package/templates/agents/specialized/i18n-specialist.md +322 -0
  40. package/templates/agents/specialized/seo-ai-specialist.md +387 -0
  41. package/templates/agents/specialized/tech-writer.md +300 -0
  42. package/templates/code-style/.editorconfig +27 -0
  43. package/templates/code-style/.prettierignore +25 -0
  44. package/templates/code-style/.prettierrc +12 -0
  45. package/templates/code-style/biome.json +78 -0
  46. package/templates/code-style/commitlint.config.js +44 -0
  47. package/templates/commands/README.md +175 -0
  48. package/templates/commands/_registry.json +420 -0
  49. package/templates/commands/add-new-entity.md +211 -0
  50. package/templates/commands/audit/accessibility-audit.md +360 -0
  51. package/templates/commands/audit/performance-audit.md +290 -0
  52. package/templates/commands/audit/security-audit.md +231 -0
  53. package/templates/commands/code-check.md +127 -0
  54. package/templates/commands/five-why.md +225 -0
  55. package/templates/commands/formatting/format-markdown.md +197 -0
  56. package/templates/commands/git/commit.md +247 -0
  57. package/templates/commands/meta/create-agent.md +257 -0
  58. package/templates/commands/meta/create-command.md +312 -0
  59. package/templates/commands/meta/create-skill.md +321 -0
  60. package/templates/commands/meta/help.md +318 -0
  61. package/templates/commands/planning/check-completed-tasks.md +224 -0
  62. package/templates/commands/planning/cleanup-issues.md +248 -0
  63. package/templates/commands/planning/planning-cleanup.md +251 -0
  64. package/templates/commands/planning/sync-planning-github.md +133 -0
  65. package/templates/commands/planning/sync-todos-github.md +203 -0
  66. package/templates/commands/quality-check.md +211 -0
  67. package/templates/commands/run-tests.md +159 -0
  68. package/templates/commands/start-feature-plan.md +232 -0
  69. package/templates/commands/start-refactor-plan.md +244 -0
  70. package/templates/commands/sync-planning.md +176 -0
  71. package/templates/commands/update-docs.md +242 -0
  72. package/templates/docs/CHECKPOINT-SYSTEM.md +504 -0
  73. package/templates/docs/INDEX.md +677 -0
  74. package/templates/docs/RECOMMENDED-HOOKS.md +415 -0
  75. package/templates/docs/_registry.json +329 -0
  76. package/templates/docs/diagrams/README.md +220 -0
  77. package/templates/docs/diagrams/agent-hierarchy.mmd +55 -0
  78. package/templates/docs/diagrams/documentation-map.mmd +61 -0
  79. package/templates/docs/diagrams/tools-relationship.mmd +55 -0
  80. package/templates/docs/diagrams/workflow-decision-tree.mmd +38 -0
  81. package/templates/docs/doc-sync.md +533 -0
  82. package/templates/docs/examples/end-to-end-workflow.md +1505 -0
  83. package/templates/docs/glossary.md +495 -0
  84. package/templates/docs/guides/mockup-prompt-engineering.md +644 -0
  85. package/templates/docs/guides/mockup-setup.md +737 -0
  86. package/templates/docs/learnings/README.md +250 -0
  87. package/templates/docs/learnings/common-architectural-patterns.md +123 -0
  88. package/templates/docs/learnings/common-mistakes-to-avoid.md +149 -0
  89. package/templates/docs/learnings/markdown-formatting-standards.md +104 -0
  90. package/templates/docs/learnings/monorepo-command-execution.md +64 -0
  91. package/templates/docs/learnings/optimization-tips.md +146 -0
  92. package/templates/docs/learnings/planning-linear-sync-workflow.md +70 -0
  93. package/templates/docs/learnings/shell-compatibility-fish.md +46 -0
  94. package/templates/docs/learnings/test-organization-structure.md +68 -0
  95. package/templates/docs/mcp-installation.md +613 -0
  96. package/templates/docs/mcp-servers.md +989 -0
  97. package/templates/docs/notification-installation.md +570 -0
  98. package/templates/docs/quick-start.md +354 -0
  99. package/templates/docs/standards/architecture-patterns.md +1064 -0
  100. package/templates/docs/standards/atomic-commits.md +513 -0
  101. package/templates/docs/standards/code-standards.md +993 -0
  102. package/templates/docs/standards/design-standards.md +656 -0
  103. package/templates/docs/standards/documentation-standards.md +1160 -0
  104. package/templates/docs/standards/testing-standards.md +969 -0
  105. package/templates/docs/system-maintenance.md +604 -0
  106. package/templates/docs/templates/PDR-template.md +561 -0
  107. package/templates/docs/templates/TODOs-template.md +534 -0
  108. package/templates/docs/templates/tech-analysis-template.md +800 -0
  109. package/templates/docs/workflows/README.md +519 -0
  110. package/templates/docs/workflows/atomic-task-protocol.md +955 -0
  111. package/templates/docs/workflows/decision-tree.md +482 -0
  112. package/templates/docs/workflows/edge-cases.md +856 -0
  113. package/templates/docs/workflows/phase-1-planning.md +957 -0
  114. package/templates/docs/workflows/phase-2-implementation.md +896 -0
  115. package/templates/docs/workflows/phase-3-validation.md +792 -0
  116. package/templates/docs/workflows/phase-4-finalization.md +927 -0
  117. package/templates/docs/workflows/quick-fix-protocol.md +505 -0
  118. package/templates/docs/workflows/task-atomization.md +537 -0
  119. package/templates/docs/workflows/task-completion-protocol.md +448 -0
  120. package/templates/hooks/on-notification.sh +28 -0
  121. package/templates/schemas/checkpoint.schema.json +97 -0
  122. package/templates/schemas/code-registry.schema.json +84 -0
  123. package/templates/schemas/pdr.schema.json +314 -0
  124. package/templates/schemas/problems.schema.json +55 -0
  125. package/templates/schemas/tech-analysis.schema.json +404 -0
  126. package/templates/schemas/telemetry.schema.json +298 -0
  127. package/templates/schemas/todos.schema.json +234 -0
  128. package/templates/schemas/workflows.schema.json +69 -0
  129. package/templates/scripts/add-changelogs.sh +105 -0
  130. package/templates/scripts/generate-code-registry.ts +270 -0
  131. package/templates/scripts/health-check.sh +343 -0
  132. package/templates/scripts/sync-registry.sh +40 -0
  133. package/templates/scripts/telemetry-report.ts +36 -0
  134. package/templates/scripts/validate-docs.sh +224 -0
  135. package/templates/scripts/validate-registry.sh +225 -0
  136. package/templates/scripts/validate-schemas.ts +283 -0
  137. package/templates/scripts/validate-structure.sh +165 -0
  138. package/templates/scripts/worktree-cleanup.sh +81 -0
  139. package/templates/scripts/worktree-create.sh +63 -0
  140. package/templates/sessions/planning/.gitkeep +0 -0
  141. package/templates/sessions/planning/archived/.gitkeep +0 -0
  142. package/templates/settings.json +202 -0
  143. package/templates/settings.local.json +138 -0
  144. package/templates/skills/README.md +197 -0
  145. package/templates/skills/_registry.json +473 -0
  146. package/templates/skills/audit/accessibility-audit.md +309 -0
  147. package/templates/skills/audit/performance-audit.md +257 -0
  148. package/templates/skills/audit/security-audit.md +217 -0
  149. package/templates/skills/auth/nextauth-patterns.md +308 -0
  150. package/templates/skills/brand-guidelines.md +240 -0
  151. package/templates/skills/documentation/markdown-formatter.md +302 -0
  152. package/templates/skills/git/git-commit-helper.md +321 -0
  153. package/templates/skills/i18n/i18n-patterns.md +251 -0
  154. package/templates/skills/patterns/error-handling-patterns.md +242 -0
  155. package/templates/skills/patterns/tdd-methodology.md +342 -0
  156. package/templates/skills/qa/qa-criteria-validator.md +383 -0
  157. package/templates/skills/qa/web-app-testing.md +398 -0
  158. package/templates/skills/react/react-hook-form-patterns.md +359 -0
  159. package/templates/skills/state/redux-toolkit-patterns.md +272 -0
  160. package/templates/skills/state/tanstack-query-patterns.md +299 -0
  161. package/templates/skills/state/zustand-patterns.md +301 -0
  162. package/templates/skills/tech/mermaid-diagram-specialist.md +195 -0
  163. package/templates/skills/tech/shadcn-specialist.md +252 -0
  164. package/templates/skills/tech/vercel-specialist.md +297 -0
  165. package/templates/skills/testing/api-app-testing.md +254 -0
  166. package/templates/skills/testing/performance-testing.md +275 -0
  167. package/templates/skills/testing/security-testing.md +348 -0
  168. package/templates/skills/utils/add-memory.md +295 -0
  169. package/templates/skills/utils/json-data-auditor.md +283 -0
  170. package/templates/skills/utils/pdf-creator-editor.md +342 -0
  171. package/templates/tools/format-markdown.sh +185 -0
@@ -0,0 +1,360 @@
1
+ ---
2
+ name: accessibility-audit
3
+ description: Comprehensive accessibility audit and WCAG compliance validation
4
+ type: audit
5
+ category: quality
6
+ config_required:
7
+ - WCAG_LEVEL: "Target WCAG level (A, AA, AAA)"
8
+ - FRONTEND_FRAMEWORK: "Frontend framework (e.g., React, Astro, Vue)"
9
+ - A11Y_TESTING_TOOL: "Accessibility testing tool (e.g., axe, pa11y)"
10
+ ---
11
+
12
+ # Accessibility Audit Command
13
+
14
+ ## Purpose
15
+
16
+ Performs comprehensive accessibility audit validating WCAG compliance, ARIA implementation, keyboard navigation, and assistive technology support.
17
+
18
+ ## ⚙️ Configuration
19
+
20
+ | Setting | Description | Example |
21
+ |---------|-------------|---------|
22
+ | WCAG_LEVEL | Target WCAG level | `A`, `AA`, `AAA` |
23
+ | FRONTEND_FRAMEWORK | Frontend framework | `React`, `Astro`, `Vue` |
24
+ | A11Y_TESTING_TOOL | Testing tool | `axe`, `pa11y`, `lighthouse` |
25
+ | REPORT_OUTPUT | Report file path | `.claude/reports/accessibility-audit-report.md` |
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ /accessibility-audit [options]
31
+ ```
32
+
33
+ ### Options
34
+
35
+ - `--scope <area>`: Focus on specific area (navigation, forms, content, all)
36
+ - `--level <wcag>`: WCAG level (A, AA, AAA) - default: {{WCAG_LEVEL}}
37
+ - `--report`: Generate detailed report
38
+ - `--automated-only`: Run only automated tests
39
+
40
+ ## WCAG 2.1 Audit Checklist
41
+
42
+ ### 1. Perceivable - Information must be presentable
43
+
44
+ #### Text Alternatives (1.1)
45
+
46
+ | Check | Validation |
47
+ |-------|------------|
48
+ | Image alt text | All images have meaningful alt attributes |
49
+ | Form labels | All inputs have associated labels |
50
+ | Button text | Descriptive button text or ARIA labels |
51
+ | Link text | Links have descriptive text (not "click here") |
52
+ | Icon accessibility | Icons have accessible names |
53
+
54
+ #### Adaptable (1.3)
55
+
56
+ | Check | Validation |
57
+ |-------|------------|
58
+ | Semantic HTML | Proper HTML5 elements used |
59
+ | Heading hierarchy | Logical h1-h6 structure (no skipped levels) |
60
+ | Landmarks | header, nav, main, aside, footer defined |
61
+ | ARIA usage | Valid and necessary ARIA attributes |
62
+ | Reading order | Logical order when CSS disabled |
63
+
64
+ #### Distinguishable (1.4)
65
+
66
+ | Check | Validation |
67
+ |-------|------------|
68
+ | Color contrast | Normal text: ≥4.5:1, Large text: ≥3:1 |
69
+ | Color usage | Information not by color alone |
70
+ | Text resizing | Resizable to 200% without content loss |
71
+ | Focus indicators | Visible with ≥3:1 contrast |
72
+ | No horizontal scroll | At 320px width |
73
+
74
+ ### 2. Operable - UI must be operable
75
+
76
+ #### Keyboard Accessible (2.1)
77
+
78
+ | Check | Validation |
79
+ |-------|------------|
80
+ | Keyboard navigation | All interactive elements accessible |
81
+ | Tab order | Logical and intuitive |
82
+ | No keyboard traps | Can tab out of all elements |
83
+ | Skip links | Skip navigation present |
84
+ | Focus visible | Always visible during navigation |
85
+
86
+ #### Navigable (2.4)
87
+
88
+ | Check | Validation |
89
+ |-------|------------|
90
+ | Page titles | Unique and descriptive |
91
+ | Focus order | Follows logical sequence |
92
+ | Link purpose | Clear from text or context |
93
+ | Headings | Describe content sections |
94
+ | Current location | Indicated (breadcrumbs, active state) |
95
+
96
+ #### Input Modalities (2.5)
97
+
98
+ | Check | Validation |
99
+ |-------|------------|
100
+ | Touch targets | Minimum 44x44 pixels |
101
+ | Pointer gestures | Keyboard alternatives available |
102
+ | Click activation | On up event (can cancel) |
103
+ | Label matching | Label text matches accessible name |
104
+
105
+ ### 3. Understandable - Information must be understandable
106
+
107
+ #### Readable (3.1)
108
+
109
+ | Check | Validation |
110
+ |-------|------------|
111
+ | Page language | lang attribute declared |
112
+ | Language changes | Marked with lang on elements |
113
+
114
+ #### Predictable (3.2)
115
+
116
+ | Check | Validation |
117
+ |-------|------------|
118
+ | Focus behavior | No unexpected changes on focus |
119
+ | Input behavior | No unexpected changes on input |
120
+ | Consistent navigation | Navigation consistent across pages |
121
+ | Consistent naming | Components identified consistently |
122
+
123
+ #### Input Assistance (3.3)
124
+
125
+ | Check | Validation |
126
+ |-------|------------|
127
+ | Error messages | Clear and specific |
128
+ | Form labels | Labels and instructions provided |
129
+ | Error suggestions | Suggestions when possible |
130
+ | Error prevention | Confirmation for destructive actions |
131
+ | Help text | Available for complex inputs |
132
+
133
+ ### 4. Robust - Content must be robust
134
+
135
+ #### Compatible (4.1)
136
+
137
+ | Check | Validation |
138
+ |-------|------------|
139
+ | Valid HTML | No parsing errors |
140
+ | Unique IDs | IDs unique within page |
141
+ | Valid ARIA | Roles, states, properties valid |
142
+ | Status messages | Appropriate ARIA for updates |
143
+ | Component roles | Name, role, value available |
144
+
145
+ ## Testing Categories
146
+
147
+ ### Automated Testing
148
+
149
+ - Run {{A11Y_TESTING_TOOL}} automated checks
150
+ - Validate color contrast
151
+ - Check HTML validity
152
+ - Verify ARIA usage
153
+
154
+ ### Keyboard Testing
155
+
156
+ - Tab through entire application
157
+ - Test all interactive elements
158
+ - Verify focus indicators
159
+ - Test keyboard shortcuts
160
+
161
+ ### Screen Reader Testing
162
+
163
+ - Test with NVDA (Windows)
164
+ - Test with VoiceOver (macOS/iOS)
165
+ - Test with JAWS (Windows)
166
+ - Test with TalkBack (Android)
167
+
168
+ ### Mobile Testing
169
+
170
+ - Test touch target sizes
171
+ - Verify zoom functionality
172
+ - Test screen reader compatibility
173
+ - Check orientation support
174
+
175
+ ## Output Format
176
+
177
+ ### Terminal Output
178
+
179
+ ```text
180
+ ♿ Accessibility Audit Report
181
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
+
183
+ 📊 Overall Score: {{SCORE}}/100 ({{GRADE}})
184
+ WCAG {{WCAG_LEVEL}} Compliance: {{COMPLIANCE_PERCENTAGE}}%
185
+
186
+ 🔴 Critical Issues ({{COUNT}})
187
+ {{#each CRITICAL_ISSUES}}
188
+ {{INDEX}}. {{TITLE}}
189
+ Location: {{FILE}}:{{LINE}}
190
+ WCAG: {{CRITERION}} (Level {{LEVEL}})
191
+ Impact: {{IMPACT}}
192
+ Fix: {{FIX_SUGGESTION}}
193
+ {{/each}}
194
+
195
+ 🟠 Serious Issues ({{COUNT}})
196
+ {{#each SERIOUS_ISSUES}}
197
+ {{INDEX}}. {{TITLE}}
198
+ Location: {{FILE}}:{{LINE}}
199
+ WCAG: {{CRITERION}}
200
+ Fix: {{FIX_SUGGESTION}}
201
+ {{/each}}
202
+
203
+ 🟡 Warnings ({{COUNT}})
204
+ {{#each WARNINGS}}
205
+ {{INDEX}}. {{TITLE}}
206
+ {{/each}}
207
+
208
+ 📈 WCAG 2.1 Compliance
209
+
210
+ Level A (Required):
211
+ {{STATUS}} Text Alternatives: {{PERCENTAGE}}%
212
+ {{STATUS}} Keyboard Accessible: {{PERCENTAGE}}%
213
+ {{STATUS}} Distinguishable: {{PERCENTAGE}}%
214
+ {{STATUS}} Readable: {{PERCENTAGE}}%
215
+
216
+ Level AA (Target):
217
+ {{STATUS}} Contrast: {{PERCENTAGE}}%
218
+ {{STATUS}} Resize Text: {{PERCENTAGE}}%
219
+ {{STATUS}} Input Assistance: {{PERCENTAGE}}%
220
+ {{STATUS}} Compatible: {{PERCENTAGE}}%
221
+
222
+ 📊 Component Scores
223
+
224
+ {{#each COMPONENT_SCORES}}
225
+ {{COMPONENT}}: {{SCORE}}/100 {{STATUS}}
226
+ - Keyboard: {{PERCENTAGE}}% {{STATUS}}
227
+ - Screen Reader: {{PERCENTAGE}}% {{STATUS}}
228
+ - Mobile: {{PERCENTAGE}}% {{STATUS}}
229
+ {{/each}}
230
+
231
+ 💡 Top Recommendations
232
+ {{#each RECOMMENDATIONS}}
233
+ {{INDEX}}. {{RECOMMENDATION}} ({{IMPROVEMENT}})
234
+ {{/each}}
235
+
236
+ 🧪 Testing Summary
237
+ Automated Tests: {{COUNT}} checks
238
+ Manual Tests: {{COUNT}} checks
239
+ Screen Reader: {{TOOLS_TESTED}}
240
+ Keyboard: Full navigation tested
241
+
242
+ 📄 Detailed report: {{REPORT_OUTPUT}}
243
+ ```
244
+
245
+ ### Report File Structure
246
+
247
+ ```markdown
248
+ # Accessibility Audit Report
249
+
250
+ **Date**: {{AUDIT_DATE}}
251
+ **WCAG Version**: 2.1
252
+ **Conformance Level**: {{WCAG_LEVEL}}
253
+ **Scope**: {{SCOPE}}
254
+
255
+ ## Executive Summary
256
+
257
+ Overall Accessibility Score: {{SCORE}}/100
258
+
259
+ **Compliance Status:**
260
+ - WCAG 2.1 Level A: {{PERCENTAGE}}% compliant
261
+ - WCAG 2.1 Level AA: {{PERCENTAGE}}% compliant
262
+ - WCAG 2.1 Level AAA: {{PERCENTAGE}}% compliant
263
+
264
+ ## Critical Issues
265
+
266
+ ### A11Y-{{ID}}: {{TITLE}}
267
+ - **Severity**: Critical
268
+ - **WCAG**: {{CRITERION}} (Level {{LEVEL}})
269
+ - **Location**: {{FILE}}:{{LINE}}
270
+ - **Impact**: {{IMPACT}}
271
+ - **Fix**: {{FIX_STEPS}}
272
+ - **Testing**: {{TESTING_INSTRUCTIONS}}
273
+
274
+ ## WCAG 2.1 Compliance Report
275
+
276
+ | Guideline | Criterion | Status | Issues |
277
+ |-----------|-----------|--------|--------|
278
+ | {{GUIDELINE}} | {{CRITERION}} | {{STATUS}} | {{COUNT}} |
279
+
280
+ ## Component Analysis
281
+
282
+ {{#each COMPONENTS}}
283
+ ### {{COMPONENT_NAME}}
284
+
285
+ **Score**: {{SCORE}}/100
286
+
287
+ **Strengths**: {{STRENGTHS}}
288
+ **Issues**: {{ISSUES}}
289
+ **Recommendations**: {{RECOMMENDATIONS}}
290
+ {{/each}}
291
+
292
+ ## Testing Results
293
+
294
+ ### Screen Reader Testing
295
+ {{SCREEN_READER_RESULTS}}
296
+
297
+ ### Keyboard Testing
298
+ {{KEYBOARD_RESULTS}}
299
+
300
+ ### Mobile Testing
301
+ {{MOBILE_RESULTS}}
302
+
303
+ ## Recommendations
304
+
305
+ ### Immediate Actions
306
+ {{IMMEDIATE_ACTIONS}}
307
+
308
+ ### Short Term
309
+ {{SHORT_TERM_ACTIONS}}
310
+
311
+ ### Long Term
312
+ {{LONG_TERM_ACTIONS}}
313
+ ```
314
+
315
+ ## Integration with Workflow
316
+
317
+ ### Phase 3 - Validation
318
+
319
+ Run during validation phase:
320
+ - After implementation complete
321
+ - Before deployment
322
+ - As part of `/quality-check`
323
+
324
+ ### Continuous Monitoring
325
+
326
+ ```yaml
327
+ - name: Accessibility Audit
328
+ run: {{CLI_TOOL}} /accessibility-audit --automated-only --report
329
+ schedule:
330
+ - cron: '0 0 * * 1' # Weekly
331
+ ```
332
+
333
+ ## Common Accessibility Issues
334
+
335
+ ### Critical
336
+ - Missing alt text on images
337
+ - Insufficient color contrast
338
+ - Keyboard traps
339
+ - Missing form labels
340
+ - Inaccessible custom controls
341
+
342
+ ### Serious
343
+ - Poor heading structure
344
+ - Missing landmarks
345
+ - Unclear error messages
346
+ - Insufficient touch targets
347
+ - No focus indicators
348
+
349
+ ### Minor
350
+ - Redundant ARIA
351
+ - Missing page titles
352
+ - Inconsistent navigation
353
+ - Missing skip links
354
+
355
+ ## Related Commands
356
+
357
+ - `/quality-check` - Comprehensive validation (includes accessibility)
358
+ - `/security-audit` - Security audits
359
+ - `/performance-audit` - Performance optimization
360
+ - `/code-check` - Code quality validation
@@ -0,0 +1,290 @@
1
+ ---
2
+ name: performance-audit
3
+ description: Comprehensive performance audit and optimization analysis
4
+ type: audit
5
+ category: quality
6
+ config_required:
7
+ - DATABASE_ORM: "Database ORM/library (e.g., Drizzle, Prisma)"
8
+ - FRONTEND_FRAMEWORK: "Frontend framework (e.g., React, Astro, Vue)"
9
+ - BUNDLER: "Build tool/bundler (e.g., Vite, Webpack)"
10
+ - API_FRAMEWORK: "API framework (e.g., Hono, Express)"
11
+ ---
12
+
13
+ # Performance Audit Command
14
+
15
+ ## Purpose
16
+
17
+ Performs comprehensive performance audit analyzing database queries, API response times, frontend rendering, bundle sizes, and identifying optimization opportunities.
18
+
19
+ ## ⚙️ Configuration
20
+
21
+ | Setting | Description | Example |
22
+ |---------|-------------|---------|
23
+ | DATABASE_ORM | Database library | `Drizzle`, `Prisma` |
24
+ | FRONTEND_FRAMEWORK | Frontend framework | `React`, `Astro`, `Vue` |
25
+ | BUNDLER | Build tool | `Vite`, `Webpack` |
26
+ | API_FRAMEWORK | API framework | `Hono`, `Express` |
27
+ | REPORT_OUTPUT | Report file path | `.claude/reports/performance-audit-report.md` |
28
+
29
+ ## Usage
30
+
31
+ ```bash
32
+ /performance-audit [options]
33
+ ```
34
+
35
+ ### Options
36
+
37
+ - `--scope <area>`: Focus on specific area (database, api, frontend, all)
38
+ - `--profile`: Enable detailed profiling
39
+ - `--report`: Generate detailed report
40
+ - `--benchmarks`: Compare against baselines
41
+
42
+ ## Audit Checklist
43
+
44
+ ### 1. Database Performance
45
+
46
+ | Check | Target | Validation |
47
+ |-------|--------|------------|
48
+ | N+1 query detection | 0 found | Scan for missing eager loading |
49
+ | Query execution time | <100ms (p95) | Measure query performance |
50
+ | Missing indexes | None | Analyze query plans |
51
+ | Large result sets | Paginated | Check for missing pagination |
52
+ | Connection pooling | Optimized | Verify pool configuration |
53
+
54
+ ### 2. API Performance
55
+
56
+ | Check | Target | Validation |
57
+ |-------|--------|------------|
58
+ | Response time | <200ms (p95) | Measure endpoint latency |
59
+ | Payload size | <100KB | Analyze response sizes |
60
+ | Response compression | Enabled | Verify compression |
61
+ | Caching headers | Present | Check cache configuration |
62
+ | Blocking operations | None | Identify sync operations |
63
+
64
+ ### 3. Frontend Performance
65
+
66
+ | Check | Target | Validation |
67
+ |-------|--------|------------|
68
+ | Largest Contentful Paint | <2.5s | Core Web Vitals |
69
+ | First Input Delay | <100ms | Interaction responsiveness |
70
+ | Cumulative Layout Shift | <0.1 | Visual stability |
71
+ | Time to Interactive | <3.5s | Full interactivity |
72
+ | Unnecessary re-renders | Minimized | {{FRONTEND_FRAMEWORK}} profiling |
73
+
74
+ ### 4. Bundle Size & Assets
75
+
76
+ | Check | Target | Validation |
77
+ |-------|--------|------------|
78
+ | Main bundle size | <200KB (gzipped) | Analyze {{BUNDLER}} output |
79
+ | Total JS size | <500KB (gzipped) | Bundle size audit |
80
+ | Code splitting | Implemented | Route-based splitting |
81
+ | Tree shaking | Enabled | Dead code elimination |
82
+ | Image optimization | >80% | Compression analysis |
83
+
84
+ ### 5. Rendering Performance
85
+
86
+ | Check | Target | Validation |
87
+ |-------|--------|------------|
88
+ | Component render time | <16ms (60fps) | {{FRONTEND_FRAMEWORK}} profiler |
89
+ | DOM tree size | <1500 nodes | DOM complexity |
90
+ | Virtual scrolling | For lists >100 items | List rendering |
91
+ | Animation performance | 60fps | Frame rate monitoring |
92
+ | Layout thrashing | None | Layout shift detection |
93
+
94
+ ### 6. Network Performance
95
+
96
+ | Check | Target | Validation |
97
+ |-------|--------|------------|
98
+ | HTTP/2 usage | Enabled | Protocol verification |
99
+ | Resource preloading | Critical resources | Priority hints |
100
+ | CDN usage | Static assets | Distribution check |
101
+ | Cache hit rate | >80% | Cache effectiveness |
102
+ | Connection pooling | Optimized | Connection reuse |
103
+
104
+ ### 7. Memory & Resources
105
+
106
+ | Check | Target | Validation |
107
+ |-------|--------|------------|
108
+ | Memory leaks | None detected | Heap snapshot analysis |
109
+ | GC pauses | <50ms | Garbage collection |
110
+ | Resource cleanup | Proper | Event listener cleanup |
111
+ | Heap size | <100MB (typical) | Memory profiling |
112
+ | Detached DOM nodes | None | DOM leak detection |
113
+
114
+ ## Performance Benchmarks
115
+
116
+ ```javascript
117
+ {
118
+ "database": {
119
+ "queryTime": "{{DB_QUERY_TARGET}}ms",
120
+ "indexCoverage": "{{INDEX_COVERAGE_TARGET}}%"
121
+ },
122
+ "api": {
123
+ "responseTime": "{{API_RESPONSE_TARGET}}ms",
124
+ "payloadSize": "{{PAYLOAD_SIZE_TARGET}}KB"
125
+ },
126
+ "frontend": {
127
+ "bundleSize": "{{BUNDLE_SIZE_TARGET}}KB",
128
+ "lcp": "{{LCP_TARGET}}s",
129
+ "fid": "{{FID_TARGET}}ms"
130
+ }
131
+ }
132
+ ```
133
+
134
+ ## Output Format
135
+
136
+ ### Terminal Output
137
+
138
+ ```text
139
+ ⚡ Performance Audit Report
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+
142
+ 📊 Overall Score: {{SCORE}}/100 ({{GRADE}})
143
+
144
+ 🔴 Critical Issues ({{COUNT}})
145
+ {{#each CRITICAL_ISSUES}}
146
+ {{INDEX}}. {{TITLE}}
147
+ Location: {{FILE}}:{{LINE}}
148
+ Impact: {{IMPACT}}
149
+ Fix: {{FIX_SUGGESTION}}
150
+ {{/each}}
151
+
152
+ 🟠 Performance Warnings ({{COUNT}})
153
+ {{#each WARNINGS}}
154
+ {{INDEX}}. {{TITLE}}
155
+ Impact: {{IMPACT}}
156
+ Fix: {{FIX_SUGGESTION}}
157
+ {{/each}}
158
+
159
+ 📈 Metrics
160
+
161
+ Database:
162
+ {{STATUS}} Avg query time: {{ACTUAL}}ms (target: <{{TARGET}}ms)
163
+ {{STATUS}} N+1 queries detected: {{COUNT}} locations
164
+ {{STATUS}} Index coverage: {{ACTUAL}}%
165
+
166
+ API:
167
+ {{STATUS}} Avg response time: {{ACTUAL}}ms (target: <{{TARGET}}ms)
168
+ {{STATUS}} Throughput: {{ACTUAL}} req/s
169
+ {{STATUS}} Compression: {{STATUS}}
170
+
171
+ Frontend:
172
+ {{STATUS}} LCP: {{ACTUAL}}s (target: <{{TARGET}}s)
173
+ {{STATUS}} FID: {{ACTUAL}}ms (target: <{{TARGET}}ms)
174
+ {{STATUS}} Bundle size: {{ACTUAL}}KB (target: <{{TARGET}}KB)
175
+
176
+ 💡 Top Recommendations
177
+ {{#each RECOMMENDATIONS}}
178
+ {{INDEX}}. {{RECOMMENDATION}} ({{IMPROVEMENT}})
179
+ {{/each}}
180
+
181
+ 📄 Detailed report: {{REPORT_OUTPUT}}
182
+ ```
183
+
184
+ ### Report File Structure
185
+
186
+ ```markdown
187
+ # Performance Audit Report
188
+
189
+ **Date**: {{AUDIT_DATE}}
190
+ **Scope**: {{SCOPE}}
191
+ **Profile**: {{PROFILE_ENABLED}}
192
+
193
+ ## Executive Summary
194
+
195
+ Overall Performance Score: {{SCORE}}/100 ({{GRADE}})
196
+
197
+ **Key Findings:**
198
+ - {{CRITICAL_COUNT}} critical performance issues
199
+ - {{OPTIMIZATION_COUNT}} optimization opportunities
200
+ - Estimated improvement potential: {{IMPROVEMENT_PERCENTAGE}}%
201
+
202
+ ## Critical Issues
203
+
204
+ ### PERF-{{ID}}: {{TITLE}}
205
+ - **Severity**: Critical
206
+ - **Location**: {{FILE}}:{{LINE}}
207
+ - **Impact**: {{IMPACT_DESCRIPTION}}
208
+ - **Current Performance**: {{CURRENT}}
209
+ - **Expected After Fix**: {{EXPECTED}}
210
+ - **Fix**: {{FIX_STEPS}}
211
+
212
+ ## Performance Metrics
213
+
214
+ | Metric | Current | Target | Status |
215
+ |--------|---------|--------|--------|
216
+ | {{METRIC}} | {{CURRENT}} | {{TARGET}} | {{STATUS}} |
217
+
218
+ ## Optimization Opportunities
219
+
220
+ ### Database Optimizations
221
+ {{DATABASE_OPTIMIZATIONS}}
222
+
223
+ ### API Optimizations
224
+ {{API_OPTIMIZATIONS}}
225
+
226
+ ### Frontend Optimizations
227
+ {{FRONTEND_OPTIMIZATIONS}}
228
+
229
+ ## Recommendations
230
+
231
+ ### Immediate Actions
232
+ {{IMMEDIATE_ACTIONS}}
233
+
234
+ ### Short Term
235
+ {{SHORT_TERM_ACTIONS}}
236
+
237
+ ### Long Term
238
+ {{LONG_TERM_ACTIONS}}
239
+ ```
240
+
241
+ ## Integration with Workflow
242
+
243
+ ### Phase 3 - Validation
244
+
245
+ Run during validation phase:
246
+ - After implementation complete
247
+ - Before deployment
248
+ - As part of `/quality-check`
249
+
250
+ ### Continuous Monitoring
251
+
252
+ ```yaml
253
+ - name: Performance Audit
254
+ run: {{CLI_TOOL}} /performance-audit --benchmarks --report
255
+ schedule:
256
+ - cron: '0 0 * * 1' # Weekly
257
+ ```
258
+
259
+ ## Common Performance Issues
260
+
261
+ ### Database
262
+ - N+1 query problems
263
+ - Missing indexes
264
+ - Inefficient queries
265
+ - Large result sets without pagination
266
+
267
+ ### API
268
+ - Blocking operations
269
+ - Missing caching
270
+ - Large payloads
271
+ - Synchronous processing
272
+
273
+ ### Frontend
274
+ - Large bundles
275
+ - Unnecessary re-renders
276
+ - Missing code splitting
277
+ - Unoptimized images
278
+
279
+ ### Network
280
+ - Missing compression
281
+ - No resource prioritization
282
+ - Inefficient caching
283
+ - Too many requests
284
+
285
+ ## Related Commands
286
+
287
+ - `/quality-check` - Comprehensive validation
288
+ - `/security-audit` - Security audits
289
+ - `/accessibility-audit` - Accessibility checks
290
+ - `/code-check` - Code quality validation