@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,309 @@
1
+ ---
2
+ name: accessibility-audit
3
+ category: audit
4
+ description: Comprehensive accessibility audit validating WCAG 2.1 Level AA compliance, ARIA implementation, keyboard navigation, and assistive technology support
5
+ usage: Use for accessibility compliance validation before deployment, after UI changes, or as part of regular accessibility assessments
6
+ input: Application URLs, user flows, component library, design system, accessibility requirements
7
+ output: Accessibility audit report with WCAG compliance status, violations by severity, remediation steps, and testing results
8
+ config_required:
9
+ - target_environment: "Environment to audit (dev/staging/production)"
10
+ - wcag_level: "Target compliance level (A, AA, AAA)"
11
+ - screen_readers: "Available screen readers for testing"
12
+ - test_devices: "Devices/browsers for testing"
13
+ - audit_depth: "quick (30min), standard (60min), comprehensive (90min)"
14
+ ---
15
+
16
+ # Accessibility Audit
17
+
18
+ ## Purpose
19
+
20
+ Comprehensive accessibility audit ensuring WCAG 2.1 compliance and inclusive user experience for all users.
21
+
22
+ **Category**: Audit
23
+ **Primary Users**: tech-lead
24
+ **Coordinates**: Accessibility validation and compliance verification
25
+
26
+ ## When to Use
27
+
28
+ - Before production deployment
29
+ - After major UI/UX changes
30
+ - When adding new components or pages
31
+ - Regular accessibility reviews (quarterly recommended)
32
+ - Before launching public campaigns
33
+ - When compliance requirements mandate audits
34
+ - After receiving accessibility feedback
35
+
36
+ ## Configuration
37
+
38
+ | Setting | Description | Example |
39
+ |---------|-------------|---------|
40
+ | target_environment | Environment to audit | `production`, `staging` |
41
+ | wcag_level | Target compliance level | `AA` (default), `A`, `AAA` |
42
+ | screen_readers | Available for testing | `NVDA, JAWS, VoiceOver, TalkBack` |
43
+ | test_devices | Testing matrix | `Desktop Chrome/Firefox, iOS Safari, Android Chrome` |
44
+ | audit_depth | Thoroughness level | `quick`, `standard`, `comprehensive` |
45
+ | previous_audit_date | Last audit for comparison | `2024-09-15` |
46
+
47
+ ## Audit Areas
48
+
49
+ | Area | Key Checks | Target | Output |
50
+ |------|------------|--------|--------|
51
+ | **WCAG Compliance** | Perceivable, Operable, Understandable, Robust | Level AA | Compliance score, violations by principle |
52
+ | **Semantic HTML & ARIA** | Semantic elements, ARIA roles/properties/states, landmarks, headings | Proper structure | Semantic score, ARIA gaps, structure violations |
53
+ | **Keyboard Navigation** | Tab order, focus indicators, skip links, no traps, modal focus | 100% accessible | Navigation score, inaccessible elements |
54
+ | **Screen Reader** | Reading order, labels, announcements, alt text, dynamic updates | Compatible | Compatibility score, announcement issues |
55
+ | **Visual** | Color contrast (4.5:1 text, 3:1 UI), text size, focus indicators, reflow | WCAG AA | Contrast violations, sizing issues |
56
+ | **Forms** | Labels, required fields, error messages, autocomplete, validation | All labeled | Form score, unlabeled inputs, validation issues |
57
+ | **Mobile** | Touch targets (44x44px), spacing (8px), zoom, orientation | Touch-friendly | Mobile score, target violations |
58
+ | **Content** | Reading level, language attribute, abbreviations, timing, media controls | Clear & understandable | Readability metrics, clarity issues |
59
+
60
+ ## Workflow
61
+
62
+ ### 1. Preparation (10min)
63
+
64
+ - Install browser extensions (axe DevTools, WAVE, Lighthouse)
65
+ - Configure screen reader
66
+ - Prepare test scenarios
67
+ - Document baseline
68
+
69
+ ### 2. Automated Testing (20min)
70
+
71
+ ```bash
72
+ # Lighthouse accessibility audit
73
+ lighthouse https://app-url --only-categories=accessibility --view
74
+
75
+ # Pa11y CI (command line)
76
+ pa11y-ci --sitemap https://app-url/sitemap.xml
77
+ ```
78
+
79
+ Run:
80
+ - axe DevTools on all critical pages
81
+ - WAVE evaluation
82
+ - Export and categorize results
83
+
84
+ ### 3. Manual Testing (40min)
85
+
86
+ **Keyboard Navigation:**
87
+ - Navigate entire app with keyboard only (Tab, Shift+Tab, Enter, Space, Arrows)
88
+ - Test all interactive elements
89
+ - Verify focus indicators
90
+ - Check for keyboard traps
91
+
92
+ **Screen Reader Testing:**
93
+ - Test with NVDA (Windows) or VoiceOver (macOS/iOS)
94
+ - Verify reading order
95
+ - Check dynamic content announcements
96
+ - Test forms and navigation
97
+
98
+ **Visual Testing:**
99
+ - Contrast checker (Chrome DevTools)
100
+ - Text resize to 200%
101
+ - Zoom to 400% (verify reflow)
102
+ - Reduced motion (prefers-reduced-motion)
103
+
104
+ **Form Testing:**
105
+ - Submit with errors, verify announcements
106
+ - Check autocomplete and required indicators
107
+
108
+ ### 4. Manual Review (20min)
109
+
110
+ **Code Review:**
111
+ - HTML semantics
112
+ - ARIA attributes correctness
113
+ - Heading hierarchy
114
+ - Alt text quality
115
+
116
+ **Content Review:**
117
+ - Language attribute
118
+ - Reading level
119
+ - Link/button text clarity
120
+
121
+ ### 5. Reporting (15min)
122
+
123
+ **Categorize Findings:**
124
+ - **Critical:** Blocks access (missing alt, keyboard traps, no labels)
125
+ - **High:** Severe impact (low contrast, poor focus, confusing navigation)
126
+ - **Medium:** Moderate impact (missing ARIA, suboptimal alt text)
127
+ - **Low:** Best practices (semantic HTML, heading order)
128
+
129
+ ## WCAG 2.1 Quick Reference
130
+
131
+ | Level | Requirements | Examples |
132
+ |-------|--------------|----------|
133
+ | **A (Minimum)** | Basic accessibility | Alt text, keyboard access, clear labels, no seizures |
134
+ | **AA (Target)** | Meaningful accessibility | Contrast 4.5:1 (text) / 3:1 (UI), resize 200%, consistent navigation, error suggestions |
135
+ | **AAA (Aspirational)** | Enhanced accessibility | Contrast 7:1 (text), no timing, no interruptions, enhanced errors |
136
+
137
+ ## Report Template
138
+
139
+ ```markdown
140
+ # Accessibility Audit Report
141
+
142
+ **Date:** YYYY-MM-DD
143
+ **Environment:** [environment]
144
+ **WCAG Target:** Level AA
145
+
146
+ ## Executive Summary
147
+
148
+ - WCAG Compliance: [Pass/Fail] Level AA
149
+ - Overall Score: X/100
150
+ - Critical Issues: X (blocking)
151
+ - High Issues: X (severe)
152
+ - Medium Issues: X (moderate)
153
+ - Low Issues: X (best practices)
154
+
155
+ ## WCAG 2.1 Compliance
156
+
157
+ ### Principle 1: Perceivable
158
+
159
+ | Success Criterion | Level | Status | Issues |
160
+ |-------------------|-------|--------|--------|
161
+ | 1.1.1 Non-text Content | A | ✅/❌ | X |
162
+ | 1.3.1 Info and Relationships | A | ✅/❌ | X |
163
+ | 1.4.3 Contrast (Minimum) | AA | ✅/❌ | X |
164
+ | 1.4.11 Non-text Contrast | AA | ✅/❌ | X |
165
+
166
+ ### Principle 2: Operable
167
+
168
+ | Success Criterion | Level | Status | Issues |
169
+ |-------------------|-------|--------|--------|
170
+ | 2.1.1 Keyboard | A | ✅/❌ | X |
171
+ | 2.1.2 No Keyboard Trap | A | ✅/❌ | X |
172
+ | 2.4.3 Focus Order | A | ✅/❌ | X |
173
+ | 2.4.7 Focus Visible | AA | ✅/❌ | X |
174
+
175
+ ### Principle 3: Understandable
176
+
177
+ | Success Criterion | Level | Status | Issues |
178
+ |-------------------|-------|--------|--------|
179
+ | 3.1.1 Language of Page | A | ✅/❌ | X |
180
+ | 3.3.1 Error Identification | A | ✅/❌ | X |
181
+ | 3.3.2 Labels or Instructions | A | ✅/❌ | X |
182
+
183
+ ### Principle 4: Robust
184
+
185
+ | Success Criterion | Level | Status | Issues |
186
+ |-------------------|-------|--------|--------|
187
+ | 4.1.2 Name, Role, Value | A | ✅/❌ | X |
188
+ | 4.1.3 Status Messages | AA | ✅/❌ | X |
189
+
190
+ ## Audit Scores by Area
191
+
192
+ | Area | Score | Critical | High | Medium | Low |
193
+ |------|-------|----------|------|--------|-----|
194
+ | Semantic HTML & ARIA | X/100 | X | X | X | X |
195
+ | Keyboard Navigation | X/100 | X | X | X | X |
196
+ | Screen Reader | X/100 | X | X | X | X |
197
+ | Visual | X/100 | X | X | X | X |
198
+ | Forms | X/100 | X | X | X | X |
199
+ | Mobile | X/100 | X | X | X | X |
200
+ | Content | X/100 | X | X | X | X |
201
+
202
+ ## Findings by Severity
203
+
204
+ ### Critical (Immediate Action)
205
+
206
+ 1. **[Issue Title]**
207
+ - WCAG: 1.1.1 Non-text Content (Level A)
208
+ - Severity: Critical
209
+ - Location: [Page/Component]
210
+ - Description: [Details]
211
+ - User Impact: [Impact description]
212
+ - Remediation: [Fix steps]
213
+ - Effort: [Low/Medium/High]
214
+
215
+ ## Testing Results
216
+
217
+ ### Automated
218
+ - Lighthouse: X/100
219
+ - axe DevTools: X critical, X serious, X moderate
220
+ - WAVE: X errors, X contrast errors
221
+
222
+ ### Manual
223
+ - ✅/❌ Keyboard navigation functional
224
+ - ✅/❌ Screen reader compatible
225
+ - ✅/❌ Color contrast meets AA (4.5:1)
226
+ - ✅/❌ Text scalable to 200%
227
+
228
+ ## Remediation Recommendations
229
+
230
+ ### Priority 1: Critical (Immediate)
231
+ 1. **[Recommendation]**
232
+ - Pages: [affected pages]
233
+ - Fix: [specific action]
234
+ - Effort: [hours]
235
+ - Impact: [user benefit]
236
+
237
+ ### Priority 2: High (This Sprint)
238
+ ### Priority 3: Medium (Next Sprint)
239
+ ### Priority 4: Low (Backlog)
240
+
241
+ ## Component-Specific Issues
242
+
243
+ **Navigation:** [issues]
244
+ **Forms:** [issues]
245
+ **Modals:** [issues]
246
+ **Tables:** [issues]
247
+
248
+ ## Browser/Screen Reader Testing
249
+
250
+ | Browser | Screen Reader | Status | Issues |
251
+ |---------|--------------|--------|--------|
252
+ | Chrome | NVDA | ✅/❌ | X |
253
+ | Firefox | NVDA | ✅/❌ | X |
254
+ | Safari | VoiceOver | ✅/❌ | X |
255
+ | iOS Safari | VoiceOver | ✅/❌ | X |
256
+
257
+ ## Trend Analysis
258
+
259
+ | Metric | Previous | Current | Change |
260
+ |--------|----------|---------|--------|
261
+ | Compliance Level | AA | AA | ➡️ |
262
+ | Critical Issues | X | X | ⬇️ X% |
263
+ | Score | X/100 | X/100 | ⬆️ X% |
264
+
265
+ ## Next Steps
266
+
267
+ 1. **Immediate** (Critical) - [with owners/deadlines]
268
+ 2. **Short-term** (High, this sprint)
269
+ 3. **Medium-term** (Medium, next sprint)
270
+ 4. **Long-term** (Low, backlog)
271
+ 5. **Monitoring** - Add accessibility tests to CI/CD, quarterly audits
272
+ ```
273
+
274
+ ## Success Criteria
275
+
276
+ - WCAG 2.1 Level AA compliance validated
277
+ - All critical issues identified
278
+ - Screen reader compatibility verified
279
+ - Keyboard navigation fully functional
280
+ - Visual standards met
281
+ - Remediation prioritized and documented
282
+
283
+ ## Best Practices
284
+
285
+ 1. Test early and often, don't wait for final audit
286
+ 2. Use semantic HTML first, ARIA is supplemental
287
+ 3. Test with real users with disabilities
288
+ 4. Automate where possible (CI/CD checks)
289
+ 5. Train the team - accessibility is everyone's responsibility
290
+ 6. Document patterns in component library
291
+ 7. Track compliance regularly, not one-time
292
+
293
+ ## Common Violations
294
+
295
+ | Violation | Fix | Priority |
296
+ |-----------|-----|----------|
297
+ | Missing alt text | Add descriptive alt to all images | Critical |
298
+ | Keyboard trap | Add Esc handler, manage focus | Critical |
299
+ | No labels | Associate labels with inputs (for/id) | Critical |
300
+ | Low contrast | Increase to 4.5:1 (text) / 3:1 (UI) | High |
301
+ | Poor focus indicators | Add visible 3:1 contrast focus styles | High |
302
+ | Missing skip link | Add skip-to-main navigation link | Medium |
303
+ | Improper ARIA | Remove unnecessary ARIA, fix attributes | Medium |
304
+ | Non-semantic HTML | Use proper semantic elements | Low |
305
+
306
+ ## Related Skills
307
+
308
+ - [web-app-testing](../testing/web-app-testing.md) - Development testing
309
+ - [qa-criteria-validator](../qa/qa-criteria-validator.md) - Acceptance validation
@@ -0,0 +1,257 @@
1
+ ---
2
+ name: performance-audit
3
+ category: audit
4
+ description: Comprehensive performance audit for database queries, API endpoints, frontend rendering, bundle size, and Core Web Vitals
5
+ usage: Use for performance optimization analysis, bottleneck identification, and validation against performance budgets
6
+ input: Application (database, API, frontend), performance budgets, baseline metrics, user scenarios
7
+ output: Performance audit report with metrics, bottlenecks, optimization recommendations, and trend analysis
8
+ config_required:
9
+ - target_environment: "Environment to audit (dev/staging/production)"
10
+ - performance_budgets: "Bundle size, API response time, Core Web Vitals targets"
11
+ - baseline_metrics: "Previous performance data for comparison"
12
+ - expected_load: "Concurrent users, requests/sec"
13
+ - audit_depth: "quick (30min), standard (60min), comprehensive (90min)"
14
+ ---
15
+
16
+ # Performance Audit
17
+
18
+ ## Purpose
19
+
20
+ Comprehensive performance audit analyzing database, API, frontend performance, and identifying optimization opportunities.
21
+
22
+ **Category**: Audit
23
+ **Primary Users**: tech-lead
24
+ **Coordinates**: Performance optimization and monitoring
25
+
26
+ ## When to Use
27
+
28
+ - Before production deployment
29
+ - After major feature additions
30
+ - When users report slowness
31
+ - Regular performance reviews (monthly recommended)
32
+ - After database schema changes
33
+ - When Core Web Vitals scores degrade
34
+ - Before scaling infrastructure
35
+
36
+ ## Configuration
37
+
38
+ | Setting | Description | Example |
39
+ |---------|-------------|---------|
40
+ | target_environment | Environment to audit | `production`, `staging` |
41
+ | performance_budgets | Performance targets | `LCP<2.5s, API<200ms, Bundle<500KB` |
42
+ | baseline_metrics | Previous audit data | `2024-09-15-audit.json` |
43
+ | expected_load | Anticipated traffic | `1000 concurrent users, 100 req/s` |
44
+ | audit_depth | Thoroughness level | `quick`, `standard`, `comprehensive` |
45
+ | monitoring_tools | Available APM tools | `Lighthouse, Sentry, DataDog` |
46
+
47
+ ## Audit Areas
48
+
49
+ | Area | Key Metrics | Target | Output |
50
+ |------|-------------|--------|--------|
51
+ | **Database** | Query time (p95), N+1 queries, indexes, connection pool | <100ms | Slow queries, index recommendations |
52
+ | **API** | Response time (p95), throughput, payload size, cache hit ratio | <200ms | Slow endpoints, optimization suggestions |
53
+ | **Core Web Vitals** | LCP, FID, CLS, TTI, TBT, FCP | LCP<2.5s, FID<100ms, CLS<0.1 | Web Vitals status, rendering optimizations |
54
+ | **Bundle Size** | JS/CSS size, code splitting, tree shaking, unused code | JS<500KB, CSS<100KB | Bloat detection, splitting recommendations |
55
+ | **Rendering** | Re-renders, reconciliation, memo usage, list virtualization | Minimal re-renders | Inefficient components, optimization tips |
56
+ | **Network** | HTTP version, CDN, compression, TTFB, connection reuse | HTTP/2+, gzip/brotli | CDN effectiveness, connection optimizations |
57
+ | **Memory** | Heap size, GC frequency, memory leaks, DOM nodes | Stable over time | Leak detection, cleanup recommendations |
58
+ | **Third-party** | Script size, execution time, blocking time, request count | Minimize impact | Impact analysis, alternatives evaluation |
59
+
60
+ ## Workflow
61
+
62
+ ### 1. Preparation (5min)
63
+
64
+ - Configure Lighthouse and monitoring tools
65
+ - Gather baseline metrics (Core Web Vitals, API times, bundle sizes)
66
+ - Prepare test scenarios
67
+
68
+ ### 2. Automated Analysis (15min)
69
+
70
+ ```bash
71
+ # Lighthouse audit
72
+ lighthouse https://app-url --view --preset=desktop
73
+ lighthouse https://app-url --view --preset=mobile
74
+
75
+ # Bundle analysis
76
+ npm run build --analyze
77
+ pnpm run build --analyze
78
+
79
+ # Database analysis (example for PostgreSQL)
80
+ # SELECT * FROM pg_stat_statements ORDER BY total_exec_time DESC LIMIT 20;
81
+ ```
82
+
83
+ ### 3. Manual Profiling (30min)
84
+
85
+ **Frontend Profiling:**
86
+ - React DevTools Profiler
87
+ - Chrome Performance tab
88
+ - Network waterfall analysis
89
+ - Memory profiler
90
+
91
+ **API Profiling:**
92
+ - Response time analysis
93
+ - Payload size review
94
+ - Cache effectiveness
95
+ - Database query breakdown
96
+
97
+ **User Flow Testing:**
98
+ - Critical user journeys
99
+ - Authentication flow
100
+ - Data-heavy operations
101
+
102
+ ### 4. Load Testing (20min)
103
+
104
+ ```bash
105
+ # Load testing (example with Artillery)
106
+ artillery run load-test.yml
107
+ ```
108
+
109
+ Test:
110
+ - Concurrent query load
111
+ - Connection pool stress
112
+ - Simulated concurrent users
113
+ - Network/CPU throttling
114
+
115
+ ### 5. Reporting (15min)
116
+
117
+ **Categorize Findings:**
118
+ - **Critical:** Budget violations (LCP>4s, API>1s)
119
+ - **High:** Needs improvement (LCP 2.5-4s, API 200-500ms)
120
+ - **Medium:** Optimization opportunities (bundle>300KB)
121
+ - **Low:** Best practice improvements
122
+
123
+ ## Performance Budgets
124
+
125
+ | Category | Good | Needs Improvement | Poor |
126
+ |----------|------|-------------------|------|
127
+ | **LCP** | <2.5s | 2.5-4s | >4s |
128
+ | **FID** | <100ms | 100-300ms | >300ms |
129
+ | **CLS** | <0.1 | 0.1-0.25 | >0.25 |
130
+ | **API (p95)** | <200ms | 200-500ms | >500ms |
131
+ | **DB Query (p95)** | <100ms | 100-300ms | >300ms |
132
+ | **JS Bundle** | <500KB | 500-1MB | >1MB |
133
+ | **CSS Bundle** | <100KB | 100-200KB | >200KB |
134
+ | **Total Page Weight** | <2MB | 2-5MB | >5MB |
135
+
136
+ ## Report Template
137
+
138
+ ```markdown
139
+ # Performance Audit Report
140
+
141
+ **Date:** YYYY-MM-DD
142
+ **Environment:** [environment]
143
+ **Performance Budget:** [Within/Exceeded]
144
+
145
+ ## Executive Summary
146
+
147
+ - Overall Performance Score: X/100
148
+ - Core Web Vitals: [Pass/Fail]
149
+ - Critical Issues: X
150
+ - Optimization Opportunities: X
151
+
152
+ ## Core Web Vitals
153
+
154
+ | Metric | Current | Target | Status |
155
+ |--------|---------|--------|--------|
156
+ | LCP | X.Xs | <2.5s | ✅/❌ |
157
+ | FID | Xms | <100ms | ✅/❌ |
158
+ | CLS | X.XX | <0.1 | ✅/❌ |
159
+
160
+ ## Performance Metrics
161
+
162
+ ### Database
163
+ - Average Query Time (p95): Xms (target: <100ms)
164
+ - Slow Queries: X queries >100ms
165
+ - N+1 Queries: X detected
166
+ - Missing Indexes: X tables
167
+
168
+ ### API
169
+ - Average Response Time (p95): Xms (target: <200ms)
170
+ - Slowest Endpoints: [list]
171
+ - Payload Size (avg): XKB
172
+ - Error Rate: X%
173
+
174
+ ### Frontend
175
+ - Bundle Size: XKB gzipped (target: <500KB)
176
+ - First Contentful Paint: X.Xs
177
+ - Time to Interactive: X.Xs
178
+ - Total Blocking Time: Xms
179
+
180
+ ## Findings by Priority
181
+
182
+ ### Critical (Immediate Action)
183
+
184
+ 1. **[Issue Title]**
185
+ - Impact: [User experience impact]
186
+ - Current: [Metric value]
187
+ - Target: [Goal value]
188
+ - Location: [File/Endpoint]
189
+ - Recommendation: [Specific fix]
190
+ - Effort: [Low/Medium/High]
191
+ - Expected Improvement: [Metric improvement]
192
+
193
+ ## Top 5 Bottlenecks
194
+
195
+ 1. **[Bottleneck Name]** - [Impact]
196
+ - Time/Size: [Metric]
197
+ - Root Cause: [Analysis]
198
+ - Fix: [Solution]
199
+ - Priority: [Critical/High/Medium]
200
+
201
+ ## Optimization Recommendations
202
+
203
+ ### Database
204
+ 1. Add indexes to [tables/columns]
205
+ 2. Optimize queries: [specific queries]
206
+ 3. Fix N+1 queries: [locations]
207
+
208
+ ### API
209
+ 1. Enable caching for [endpoints]
210
+ 2. Reduce payload size: pagination, field selection, compression
211
+ 3. Optimize [specific endpoints]
212
+
213
+ ### Frontend
214
+ 1. Code splitting for [routes/components]
215
+ 2. Image optimization: WebP/AVIF, lazy loading, responsive images
216
+ 3. Component optimization: memoization, virtualization, Suspense
217
+
218
+ ## Trend Analysis
219
+
220
+ | Metric | Previous | Current | Change |
221
+ |--------|----------|---------|--------|
222
+ | LCP | X.Xs | X.Xs | ±X% |
223
+ | API (p95) | Xms | Xms | ±X% |
224
+ | Bundle Size | XKB | XKB | ±X% |
225
+
226
+ ## Next Steps
227
+
228
+ 1. **Immediate Actions** (Critical) - [with owners/deadlines]
229
+ 2. **Short-term** (High, this sprint)
230
+ 3. **Medium-term** (Medium, next sprint)
231
+ 4. **Long-term** (Low, backlog)
232
+ 5. **Monitoring** - Setup continuous monitoring, track budgets in CI/CD
233
+ ```
234
+
235
+ ## Success Criteria
236
+
237
+ - All critical performance issues identified
238
+ - Core Web Vitals meet "Good" thresholds
239
+ - Performance budgets validated
240
+ - Optimization recommendations prioritized
241
+ - Trend analysis completed
242
+ - Report delivered with actionable items
243
+
244
+ ## Best Practices
245
+
246
+ 1. Monitor continuously, don't wait for audits
247
+ 2. Track budgets in CI/CD, fail builds on violations
248
+ 3. Prioritize user impact, fix critical flows first
249
+ 4. Measure real users (RUM) over synthetic tests
250
+ 5. Test on real devices, not just dev machines
251
+ 6. Compare trends, track improvements over time
252
+ 7. Document baselines for comparison
253
+
254
+ ## Related Skills
255
+
256
+ - [performance-testing](../testing/performance-testing.md) - Development testing
257
+ - [qa-criteria-validator](../qa/qa-criteria-validator.md) - Acceptance validation