codingwithagent 1.0.0 → 1.1.1

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 (34) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +21 -21
  3. package/README.md +131 -37
  4. package/bin/init.js +257 -257
  5. package/package.json +56 -56
  6. package/templates/accessibility/.cursorrules +342 -342
  7. package/templates/accessibility/README.md +47 -47
  8. package/templates/antigravity/accessibility/.agent/rules/accessibility.md +501 -501
  9. package/templates/antigravity/accessibility/.agent/rules/aria-patterns.md +568 -568
  10. package/templates/antigravity/accessibility/.agent/rules/wcag-standard.md +225 -225
  11. package/templates/antigravity/accessibility/README.md +42 -42
  12. package/templates/antigravity/minimal/.agent/rules/accessibility.md +53 -53
  13. package/templates/antigravity/minimal/.agent/rules/code-quality.md +86 -86
  14. package/templates/antigravity/minimal/.agent/rules/react-components.md +164 -164
  15. package/templates/antigravity/minimal/README.md +34 -34
  16. package/templates/antigravity/standard/.agent/rules/accessibility.md +98 -98
  17. package/templates/antigravity/standard/.agent/rules/code-quality.md +166 -166
  18. package/templates/antigravity/standard/.agent/rules/pull-request-review.md +192 -192
  19. package/templates/antigravity/standard/.agent/rules/react-components.md +204 -204
  20. package/templates/antigravity/standard/.agent/rules/testing.md +197 -197
  21. package/templates/antigravity/standard/README.md +39 -39
  22. package/templates/antigravity/strict/.agent/README.md +46 -46
  23. package/templates/antigravity/strict/.agent/rules/accessibility.md +199 -199
  24. package/templates/antigravity/strict/.agent/rules/code-quality.md +268 -268
  25. package/templates/antigravity/strict/.agent/rules/pull-request-review.md +114 -114
  26. package/templates/antigravity/strict/.agent/rules/react-components.md +423 -423
  27. package/templates/antigravity/strict/.agent/rules/security.md +483 -483
  28. package/templates/antigravity/strict/.agent/rules/testing.md +280 -280
  29. package/templates/minimal/.cursorrules +48 -48
  30. package/templates/minimal/README.md +40 -40
  31. package/templates/standard/.cursorrules +184 -184
  32. package/templates/standard/README.md +43 -43
  33. package/templates/strict/.cursorrules +227 -227
  34. package/templates/strict/README.md +47 -47
@@ -1,199 +1,199 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # Accessibility Standards - STRICT (Zero Tolerance)
6
-
7
- ## Compliance Requirements - MANDATORY
8
-
9
- - WCAG 2.1 Level AA MINIMUM (AAA when possible)
10
- - 100% keyboard accessibility (no exceptions)
11
- - ALL features tested with screen readers before PR approval
12
- - Automated accessibility tests REQUIRED in CI/CD
13
- - Manual accessibility testing MANDATORY for all UI changes
14
-
15
- ## POUR Principles - Strict Enforcement
16
-
17
- ### Perceivable - MUST BE ACCESSIBLE
18
-
19
- - ALL images MUST have alt text (or alt="" if decorative) - NO EXCEPTIONS
20
- - ALL videos MUST have captions
21
- - ALL audio MUST have transcripts
22
- - Color contrast MUST be 4.5:1 minimum (7:1 for AAA preferred)
23
- - NEVER use color alone to convey information
24
- - Text MUST be resizable up to 200% without loss of content
25
-
26
- ### Operable - MUST WORK WITH KEYBOARD
27
-
28
- - ALL functionality MUST work with keyboard only
29
- - Visible focus indicators REQUIRED (minimum 2px outline)
30
- - Focus order MUST be logical
31
- - NO keyboard traps (zero tolerance)
32
- - NEVER use `tabIndex > 0` (PR rejection if found)
33
- - NO time limits unless user can control them
34
-
35
- ### Understandable - MUST BE CLEAR
36
-
37
- - Proper heading hierarchy (h1 > h2 > h3, NO skipping)
38
- - Semantic HTML MANDATORY (header, nav, main, footer, button)
39
- - Form labels REQUIRED for ALL inputs
40
- - Error messages MUST be clear and actionable
41
- - Language attribute MUST be set on all pages
42
-
43
- ### Robust - MUST WORK EVERYWHERE
44
-
45
- - Valid HTML (pass W3C validator)
46
- - Test with NVDA, JAWS, VoiceOver, TalkBack (ALL required)
47
- - Works with assistive technologies
48
- - Compatible with all major browsers + screen readers
49
-
50
- ## Implementation Requirements - STRICT
51
-
52
- ### Screen Reader Support - MANDATORY
53
-
54
- - Use semantic HTML FIRST (button, not div with onClick)
55
- - ARIA ONLY when semantic HTML insufficient
56
- - role="alert" MUST be used sparingly (overuse = PR rejection)
57
- - Announce ALL state changes (loading, success, error)
58
- - Test EVERY feature with screen reader before PR
59
-
60
- ### Form Accessibility - ZERO TOLERANCE
61
-
62
- - ALL form fields MUST have associated labels (no visual-only labels)
63
- - Required fields MUST be indicated programmatically
64
- - Error messages MUST be associated with inputs (aria-describedby)
65
- - Form validation MUST happen on blur or submit (not on every keystroke)
66
- - Success confirmations MUST be announced to screen readers
67
-
68
- ### Interactive Elements - STRICT REQUIREMENTS
69
-
70
- - Buttons MINIMUM size: 44x44 CSS pixels (WCAG AAA)
71
- - Links MUST have descriptive text (no "click here", "read more")
72
- - External links MUST indicate new window/tab
73
- - Custom controls MUST have proper ARIA attributes
74
- - ALL custom actions MUST be keyboard accessible
75
-
76
- ### Mobile Accessibility - MANDATORY
77
-
78
- - Touch targets MINIMUM 44x44 pixels
79
- - Pinch-to-zoom MUST be enabled (no viewport user-scalable=no)
80
- - Test with VoiceOver (iOS) AND TalkBack (Android)
81
- - Orientation changes MUST be supported
82
- - Touch gestures MUST have keyboard alternatives
83
-
84
- ## Testing Requirements - MANDATORY
85
-
86
- ### Automated Testing - REQUIRED
87
-
88
- - axe-core or jest-axe in ALL unit tests
89
- - Lighthouse accessibility score MUST be 100
90
- - pa11y in CI/CD pipeline (build fails on errors)
91
- - ESLint jsx-a11y plugin with ALL rules enabled
92
- - NO eslint-disable for a11y rules without architect approval
93
-
94
- ### Manual Testing - REQUIRED BEFORE PR
95
-
96
- - Keyboard navigation test (Tab, Shift+Tab, Enter, Space, Escape)
97
- - Screen reader test with NVDA (Windows) OR VoiceOver (Mac)
98
- - Color contrast analyzer (ALL text and UI elements)
99
- - Zoom to 200% test (content must remain readable)
100
- - Test with CSS disabled (content must be understandable)
101
-
102
- ### Testing Checklist - ALL REQUIRED
103
-
104
- - [ ] Keyboard navigation works for ALL functionality
105
- - [ ] Visible focus indicators present
106
- - [ ] Focus order is logical
107
- - [ ] Screen reader announces content correctly
108
- - [ ] Color contrast passes 4.5:1 (7:1 preferred)
109
- - [ ] Alt text provided for ALL meaningful images
110
- - [ ] Form labels properly associated
111
- - [ ] Error messages clear and associated
112
- - [ ] NO automatic timeouts
113
- - [ ] NO flashing content
114
- - [ ] Semantic HTML used throughout
115
- - [ ] Zoom to 200% tested and working
116
- - [ ] Mobile touch targets 44x44px minimum
117
-
118
- ## Prohibited Practices - IMMEDIATE PR REJECTION
119
-
120
- ### NEVER DO THESE
121
-
122
- - NEVER use `tabIndex > 0`
123
- - NEVER use color alone to convey information
124
- - NEVER disable zoom (viewport user-scalable=no)
125
- - NEVER use flashing/blinking content
126
- - NEVER create keyboard traps
127
- - NEVER use non-semantic HTML for interactive elements
128
- - NEVER skip heading levels (h1 to h3)
129
- - NEVER use `role="presentation"` on interactive elements
130
- - NEVER use placeholder as label
131
- - NEVER auto-play audio/video
132
- - NEVER mock screen reader implementations with aria-label hacks
133
-
134
- ## ARIA - Use ONLY When Necessary
135
-
136
- ### First Rule of ARIA: Don't Use ARIA
137
-
138
- - Use semantic HTML FIRST
139
- - ARIA only when semantic HTML insufficient
140
- - NEVER change semantic meaning with ARIA
141
- - ALL ARIA controls MUST be keyboard accessible
142
-
143
- ### Allowed ARIA Patterns (Only These)
144
-
145
- - `aria-label`: When visual label not present
146
- - `aria-labelledby`: Associate existing label
147
- - `aria-describedby`: Additional description
148
- - `aria-live`: Dynamic content announcements (polite or assertive only)
149
- - `aria-expanded`: Collapsible content state
150
- - `aria-hidden="true"`: Hide decorative elements ONLY
151
- - `aria-invalid`: Form validation errors
152
-
153
- ### ARIA Violations = PR Rejection
154
-
155
- - Incorrect role usage
156
- - Missing required ARIA attributes
157
- - ARIA on non-interactive elements
158
- - Conflicting ARIA and HTML semantics
159
-
160
- ## Color Contrast - STRICT REQUIREMENTS
161
-
162
- ### Minimum Ratios (AAA Preferred)
163
-
164
- - Normal text: 4.5:1 minimum (7:1 for AAA)
165
- - Large text (18pt+ or 14pt+ bold): 3:1 minimum (4.5:1 for AAA)
166
- - UI components: 3:1 minimum
167
- - Icons: 3:1 minimum
168
- - States (hover, focus, active): 3:1 minimum
169
-
170
- ### Testing Required
171
-
172
- - Use Color Contrast Analyzer tool
173
- - Test ALL color combinations
174
- - Test hover/focus/active states
175
- - Test with grayscale view
176
- - Test with color blindness simulators
177
-
178
- ## Enforcement
179
-
180
- ### PR Review Requirements
181
-
182
- - Accessibility checklist MUST be completed
183
- - Screen reader testing video/screenshots required for UI changes
184
- - Automated tests MUST pass (100 Lighthouse score)
185
- - Manual testing MUST be documented
186
- - Architect review REQUIRED for custom ARIA usage
187
-
188
- ### Build Pipeline
189
-
190
- - Builds FAIL on accessibility violations
191
- - axe-core violations block merge
192
- - Lighthouse score < 100 blocks merge
193
- - ESLint a11y errors block merge
194
-
195
- ## Resources - MANDATORY READING
196
-
197
- - WCAG 2.1: https://www.w3.org/WAI/WCAG21/quickref/
198
- - ARIA Authoring Practices: https://www.w3.org/WAI/ARIA/apg/
199
- - WebAIM: https://webaim.org/
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # Accessibility Standards - STRICT (Zero Tolerance)
6
+
7
+ ## Compliance Requirements - MANDATORY
8
+
9
+ - WCAG 2.1 Level AA MINIMUM (AAA when possible)
10
+ - 100% keyboard accessibility (no exceptions)
11
+ - ALL features tested with screen readers before PR approval
12
+ - Automated accessibility tests REQUIRED in CI/CD
13
+ - Manual accessibility testing MANDATORY for all UI changes
14
+
15
+ ## POUR Principles - Strict Enforcement
16
+
17
+ ### Perceivable - MUST BE ACCESSIBLE
18
+
19
+ - ALL images MUST have alt text (or alt="" if decorative) - NO EXCEPTIONS
20
+ - ALL videos MUST have captions
21
+ - ALL audio MUST have transcripts
22
+ - Color contrast MUST be 4.5:1 minimum (7:1 for AAA preferred)
23
+ - NEVER use color alone to convey information
24
+ - Text MUST be resizable up to 200% without loss of content
25
+
26
+ ### Operable - MUST WORK WITH KEYBOARD
27
+
28
+ - ALL functionality MUST work with keyboard only
29
+ - Visible focus indicators REQUIRED (minimum 2px outline)
30
+ - Focus order MUST be logical
31
+ - NO keyboard traps (zero tolerance)
32
+ - NEVER use `tabIndex > 0` (PR rejection if found)
33
+ - NO time limits unless user can control them
34
+
35
+ ### Understandable - MUST BE CLEAR
36
+
37
+ - Proper heading hierarchy (h1 > h2 > h3, NO skipping)
38
+ - Semantic HTML MANDATORY (header, nav, main, footer, button)
39
+ - Form labels REQUIRED for ALL inputs
40
+ - Error messages MUST be clear and actionable
41
+ - Language attribute MUST be set on all pages
42
+
43
+ ### Robust - MUST WORK EVERYWHERE
44
+
45
+ - Valid HTML (pass W3C validator)
46
+ - Test with NVDA, JAWS, VoiceOver, TalkBack (ALL required)
47
+ - Works with assistive technologies
48
+ - Compatible with all major browsers + screen readers
49
+
50
+ ## Implementation Requirements - STRICT
51
+
52
+ ### Screen Reader Support - MANDATORY
53
+
54
+ - Use semantic HTML FIRST (button, not div with onClick)
55
+ - ARIA ONLY when semantic HTML insufficient
56
+ - role="alert" MUST be used sparingly (overuse = PR rejection)
57
+ - Announce ALL state changes (loading, success, error)
58
+ - Test EVERY feature with screen reader before PR
59
+
60
+ ### Form Accessibility - ZERO TOLERANCE
61
+
62
+ - ALL form fields MUST have associated labels (no visual-only labels)
63
+ - Required fields MUST be indicated programmatically
64
+ - Error messages MUST be associated with inputs (aria-describedby)
65
+ - Form validation MUST happen on blur or submit (not on every keystroke)
66
+ - Success confirmations MUST be announced to screen readers
67
+
68
+ ### Interactive Elements - STRICT REQUIREMENTS
69
+
70
+ - Buttons MINIMUM size: 44x44 CSS pixels (WCAG AAA)
71
+ - Links MUST have descriptive text (no "click here", "read more")
72
+ - External links MUST indicate new window/tab
73
+ - Custom controls MUST have proper ARIA attributes
74
+ - ALL custom actions MUST be keyboard accessible
75
+
76
+ ### Mobile Accessibility - MANDATORY
77
+
78
+ - Touch targets MINIMUM 44x44 pixels
79
+ - Pinch-to-zoom MUST be enabled (no viewport user-scalable=no)
80
+ - Test with VoiceOver (iOS) AND TalkBack (Android)
81
+ - Orientation changes MUST be supported
82
+ - Touch gestures MUST have keyboard alternatives
83
+
84
+ ## Testing Requirements - MANDATORY
85
+
86
+ ### Automated Testing - REQUIRED
87
+
88
+ - axe-core or jest-axe in ALL unit tests
89
+ - Lighthouse accessibility score MUST be 100
90
+ - pa11y in CI/CD pipeline (build fails on errors)
91
+ - ESLint jsx-a11y plugin with ALL rules enabled
92
+ - NO eslint-disable for a11y rules without architect approval
93
+
94
+ ### Manual Testing - REQUIRED BEFORE PR
95
+
96
+ - Keyboard navigation test (Tab, Shift+Tab, Enter, Space, Escape)
97
+ - Screen reader test with NVDA (Windows) OR VoiceOver (Mac)
98
+ - Color contrast analyzer (ALL text and UI elements)
99
+ - Zoom to 200% test (content must remain readable)
100
+ - Test with CSS disabled (content must be understandable)
101
+
102
+ ### Testing Checklist - ALL REQUIRED
103
+
104
+ - [ ] Keyboard navigation works for ALL functionality
105
+ - [ ] Visible focus indicators present
106
+ - [ ] Focus order is logical
107
+ - [ ] Screen reader announces content correctly
108
+ - [ ] Color contrast passes 4.5:1 (7:1 preferred)
109
+ - [ ] Alt text provided for ALL meaningful images
110
+ - [ ] Form labels properly associated
111
+ - [ ] Error messages clear and associated
112
+ - [ ] NO automatic timeouts
113
+ - [ ] NO flashing content
114
+ - [ ] Semantic HTML used throughout
115
+ - [ ] Zoom to 200% tested and working
116
+ - [ ] Mobile touch targets 44x44px minimum
117
+
118
+ ## Prohibited Practices - IMMEDIATE PR REJECTION
119
+
120
+ ### NEVER DO THESE
121
+
122
+ - NEVER use `tabIndex > 0`
123
+ - NEVER use color alone to convey information
124
+ - NEVER disable zoom (viewport user-scalable=no)
125
+ - NEVER use flashing/blinking content
126
+ - NEVER create keyboard traps
127
+ - NEVER use non-semantic HTML for interactive elements
128
+ - NEVER skip heading levels (h1 to h3)
129
+ - NEVER use `role="presentation"` on interactive elements
130
+ - NEVER use placeholder as label
131
+ - NEVER auto-play audio/video
132
+ - NEVER mock screen reader implementations with aria-label hacks
133
+
134
+ ## ARIA - Use ONLY When Necessary
135
+
136
+ ### First Rule of ARIA: Don't Use ARIA
137
+
138
+ - Use semantic HTML FIRST
139
+ - ARIA only when semantic HTML insufficient
140
+ - NEVER change semantic meaning with ARIA
141
+ - ALL ARIA controls MUST be keyboard accessible
142
+
143
+ ### Allowed ARIA Patterns (Only These)
144
+
145
+ - `aria-label`: When visual label not present
146
+ - `aria-labelledby`: Associate existing label
147
+ - `aria-describedby`: Additional description
148
+ - `aria-live`: Dynamic content announcements (polite or assertive only)
149
+ - `aria-expanded`: Collapsible content state
150
+ - `aria-hidden="true"`: Hide decorative elements ONLY
151
+ - `aria-invalid`: Form validation errors
152
+
153
+ ### ARIA Violations = PR Rejection
154
+
155
+ - Incorrect role usage
156
+ - Missing required ARIA attributes
157
+ - ARIA on non-interactive elements
158
+ - Conflicting ARIA and HTML semantics
159
+
160
+ ## Color Contrast - STRICT REQUIREMENTS
161
+
162
+ ### Minimum Ratios (AAA Preferred)
163
+
164
+ - Normal text: 4.5:1 minimum (7:1 for AAA)
165
+ - Large text (18pt+ or 14pt+ bold): 3:1 minimum (4.5:1 for AAA)
166
+ - UI components: 3:1 minimum
167
+ - Icons: 3:1 minimum
168
+ - States (hover, focus, active): 3:1 minimum
169
+
170
+ ### Testing Required
171
+
172
+ - Use Color Contrast Analyzer tool
173
+ - Test ALL color combinations
174
+ - Test hover/focus/active states
175
+ - Test with grayscale view
176
+ - Test with color blindness simulators
177
+
178
+ ## Enforcement
179
+
180
+ ### PR Review Requirements
181
+
182
+ - Accessibility checklist MUST be completed
183
+ - Screen reader testing video/screenshots required for UI changes
184
+ - Automated tests MUST pass (100 Lighthouse score)
185
+ - Manual testing MUST be documented
186
+ - Architect review REQUIRED for custom ARIA usage
187
+
188
+ ### Build Pipeline
189
+
190
+ - Builds FAIL on accessibility violations
191
+ - axe-core violations block merge
192
+ - Lighthouse score < 100 blocks merge
193
+ - ESLint a11y errors block merge
194
+
195
+ ## Resources - MANDATORY READING
196
+
197
+ - WCAG 2.1: https://www.w3.org/WAI/WCAG21/quickref/
198
+ - ARIA Authoring Practices: https://www.w3.org/WAI/ARIA/apg/
199
+ - WebAIM: https://webaim.org/