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.
- package/CHANGELOG.md +28 -0
- package/LICENSE +21 -21
- package/README.md +131 -37
- package/bin/init.js +257 -257
- package/package.json +56 -56
- package/templates/accessibility/.cursorrules +342 -342
- package/templates/accessibility/README.md +47 -47
- package/templates/antigravity/accessibility/.agent/rules/accessibility.md +501 -501
- package/templates/antigravity/accessibility/.agent/rules/aria-patterns.md +568 -568
- package/templates/antigravity/accessibility/.agent/rules/wcag-standard.md +225 -225
- package/templates/antigravity/accessibility/README.md +42 -42
- package/templates/antigravity/minimal/.agent/rules/accessibility.md +53 -53
- package/templates/antigravity/minimal/.agent/rules/code-quality.md +86 -86
- package/templates/antigravity/minimal/.agent/rules/react-components.md +164 -164
- package/templates/antigravity/minimal/README.md +34 -34
- package/templates/antigravity/standard/.agent/rules/accessibility.md +98 -98
- package/templates/antigravity/standard/.agent/rules/code-quality.md +166 -166
- package/templates/antigravity/standard/.agent/rules/pull-request-review.md +192 -192
- package/templates/antigravity/standard/.agent/rules/react-components.md +204 -204
- package/templates/antigravity/standard/.agent/rules/testing.md +197 -197
- package/templates/antigravity/standard/README.md +39 -39
- package/templates/antigravity/strict/.agent/README.md +46 -46
- package/templates/antigravity/strict/.agent/rules/accessibility.md +199 -199
- package/templates/antigravity/strict/.agent/rules/code-quality.md +268 -268
- package/templates/antigravity/strict/.agent/rules/pull-request-review.md +114 -114
- package/templates/antigravity/strict/.agent/rules/react-components.md +423 -423
- package/templates/antigravity/strict/.agent/rules/security.md +483 -483
- package/templates/antigravity/strict/.agent/rules/testing.md +280 -280
- package/templates/minimal/.cursorrules +48 -48
- package/templates/minimal/README.md +40 -40
- package/templates/standard/.cursorrules +184 -184
- package/templates/standard/README.md +43 -43
- package/templates/strict/.cursorrules +227 -227
- package/templates/strict/README.md +47 -47
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: always_on
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Pull Request Standards and Review Guidelines
|
|
6
|
-
|
|
7
|
-
## PR Submission Requirements
|
|
8
|
-
|
|
9
|
-
### Must-Have Checklist
|
|
10
|
-
|
|
11
|
-
- [ ] PR form properly filled (checkmarks, labels, ticket number, description)
|
|
12
|
-
- [ ] Code coverage provided (previous vs current)
|
|
13
|
-
- [ ] Unit tests added/updated for all changed code
|
|
14
|
-
- [ ] Screenshots of new functionality included
|
|
15
|
-
- [ ] Team review completed before requesting merge
|
|
16
|
-
- [ ] All Jira tickets linked and valid
|
|
17
|
-
- [ ] No TODOs or incomplete work (create enabler if urgent)
|
|
18
|
-
|
|
19
|
-
### PR Form Structure
|
|
20
|
-
|
|
21
|
-
- **Ticket Number**: Link to Jira/Github issue
|
|
22
|
-
- **Description**: Clear explanation of changes and why
|
|
23
|
-
- **Testing Instructions**: How to manually verify changes
|
|
24
|
-
- **Coverage**: Previous and current test coverage percentage
|
|
25
|
-
- **Screenshots**: Before/after for UI changes
|
|
26
|
-
- **Team Review**: At least one peer approval
|
|
27
|
-
- **Release Notes**: User-facing changes documented
|
|
28
|
-
|
|
29
|
-
## Branching and Merging Strategy
|
|
30
|
-
|
|
31
|
-
### Branch Types
|
|
32
|
-
|
|
33
|
-
- **Feature/Epic Branches**: New functionality development
|
|
34
|
-
- **Pod Branches**: Maintenance or combined testing
|
|
35
|
-
- **Development Branch**: Integration branch for release candidates
|
|
36
|
-
|
|
37
|
-
### Merge Rules
|
|
38
|
-
|
|
39
|
-
- All PRs go to feature/epic/pod branch, NEVER directly to development
|
|
40
|
-
- One PR per user story
|
|
41
|
-
- Do NOT "Squash and merge" downstreams (difficult to solve issues)
|
|
42
|
-
- Upstream PRs require:
|
|
43
|
-
- Intended release documented
|
|
44
|
-
- List of all Jira/Github tickets
|
|
45
|
-
- Git log command output: `git log --no-merges --format=oneline origin/development..origin/epicbranch`
|
|
46
|
-
- eQA sign-off on ALL tickets
|
|
47
|
-
- Each change must relate to a ticket
|
|
48
|
-
- Global/semiglobal changes require architecture team review
|
|
49
|
-
|
|
50
|
-
### Release Readiness
|
|
51
|
-
|
|
52
|
-
- All user stories in epic/feature must have eQA sign-off
|
|
53
|
-
- Stories tested together in dev environment before merge
|
|
54
|
-
- Time allocated for code reviews, downstream and upstream merges
|
|
55
|
-
- Epic/feature scope properly defined in Jira/Github
|
|
56
|
-
|
|
57
|
-
## Code Review Standards
|
|
58
|
-
|
|
59
|
-
### Architecture and Structure
|
|
60
|
-
|
|
61
|
-
- [ ] Folder structure follows pod-based architecture
|
|
62
|
-
- [ ] No pod bubble breaches
|
|
63
|
-
- [ ] Component placed in correct directory
|
|
64
|
-
- [ ] Imports follow approved patterns
|
|
65
|
-
- [ ] No circular dependencies
|
|
66
|
-
|
|
67
|
-
### JavaScript Review
|
|
68
|
-
|
|
69
|
-
- [ ] No `window` object usage (unless approved)
|
|
70
|
-
- [ ] Lodash imports are scoped (not entire library)
|
|
71
|
-
- [ ] Keys in lists from data props, not index
|
|
72
|
-
- [ ] No eslint-disable-line without validation
|
|
73
|
-
- [ ] No `tabIndex > 0`
|
|
74
|
-
- [ ] Props drilling limited to 3 levels
|
|
75
|
-
- [ ] No console.log or debugger statements
|
|
76
|
-
- [ ] Conditional rendering uses boolean values only
|
|
77
|
-
- [ ] No code duplication
|
|
78
|
-
- [ ] String values moved to constants file
|
|
79
|
-
- [ ] Gremlins checked (invisible harmful characters)
|
|
80
|
-
|
|
81
|
-
### Component Review
|
|
82
|
-
|
|
83
|
-
- [ ] Functional components with hooks (not class components)
|
|
84
|
-
- [ ] PropTypes defined and accurate
|
|
85
|
-
- [ ] Required props marked with .isRequired
|
|
86
|
-
- [ ] Components under 200 lines
|
|
87
|
-
- [ ] No anonymous functions as event handlers
|
|
88
|
-
- [ ] Fragments used instead of empty divs
|
|
89
|
-
- [ ] useEffect dependencies correct
|
|
90
|
-
- [ ] No stale closures
|
|
91
|
-
|
|
92
|
-
### Styles Review
|
|
93
|
-
|
|
94
|
-
- [ ] Mobile-first approach used (avoid max-width)
|
|
95
|
-
- [ ] No `:global` styles (unless scoped and approved)
|
|
96
|
-
- [ ] Atmos utility classes used (atm-u, not atm-c)
|
|
97
|
-
- [ ] No CSS without parent class selector
|
|
98
|
-
- [ ] Color contrast meets 4.5:1 ratio
|
|
99
|
-
|
|
100
|
-
### Accessibility Review
|
|
101
|
-
|
|
102
|
-
- [ ] All interactive elements keyboard accessible
|
|
103
|
-
- [ ] Proper ARIA labels (not overused)
|
|
104
|
-
- [ ] role="alert" not misused
|
|
105
|
-
- [ ] External links have extDisclaimer for screen readers
|
|
106
|
-
- [ ] Color not sole information indicator
|
|
107
|
-
- [ ] Alt text provided for meaningful images
|
|
108
|
-
- [ ] Form fields have labels
|
|
109
|
-
|
|
110
|
-
### Testing Review
|
|
111
|
-
|
|
112
|
-
- [ ] Tests added for new functionality
|
|
113
|
-
- [ ] Tests updated for changed code
|
|
114
|
-
- [ ] Tests not using mock data excessively
|
|
115
|
-
- [ ] Shallow render preferred over mount (unless hooks require mount)
|
|
116
|
-
- [ ] External dependencies mocked
|
|
117
|
-
- [ ] beforeEach and afterAll for mock cleanup
|
|
118
|
-
- [ ] No setTimeout over 100ms
|
|
119
|
-
- [ ] Snapshots avoided (remove when possible)
|
|
120
|
-
|
|
121
|
-
### App-Specific Review
|
|
122
|
-
|
|
123
|
-
- [ ] Atmos components used (headers, buttons, form fields)
|
|
124
|
-
- [ ] `<TextPassage>` for paragraphs, not `<p>`
|
|
125
|
-
- [ ] `<Currency>` or getFormattedCurrency used, never type: currency
|
|
126
|
-
- [ ] pushRouteWithLocale for navigation
|
|
127
|
-
- [ ] cmsContainer for CMS content
|
|
128
|
-
- [ ] react-redux-form uses model, not state
|
|
129
|
-
- [ ] intl injected at container level only
|
|
130
|
-
- [ ] Variable messages validated before intl usage
|
|
131
|
-
|
|
132
|
-
### Data and Date Handling
|
|
133
|
-
|
|
134
|
-
- [ ] Service responses validated with null chain operator
|
|
135
|
-
- [ ] Mapper layer between services and store
|
|
136
|
-
- [ ] moment used instead of Date()
|
|
137
|
-
- [ ] Dates not mocked in future
|
|
138
|
-
- [ ] moment.now overridden in tests if needed
|
|
139
|
-
|
|
140
|
-
## Strongly Recommended Practices
|
|
141
|
-
|
|
142
|
-
### Review Process
|
|
143
|
-
|
|
144
|
-
- Ask for second review if uncertain about changes
|
|
145
|
-
- Involve previous developers/pod for context
|
|
146
|
-
- Check if data transformations can move to selectors
|
|
147
|
-
- Avoid mocked a11y implementations with aria-label
|
|
148
|
-
- Provide enabler option only for urgent blockers
|
|
149
|
-
|
|
150
|
-
### Code Quality
|
|
151
|
-
|
|
152
|
-
- Naming is critical: camelCase, PascalCase, UPPER_CASE used correctly
|
|
153
|
-
- Intermediate containers reduce prop drilling
|
|
154
|
-
- DRY principle: Save repeated data in defaulted constants
|
|
155
|
-
- PropTypes in external file for reusability
|
|
156
|
-
- Containers without JSX are easier to maintain
|
|
157
|
-
- Required props clearly marked
|
|
158
|
-
|
|
159
|
-
### Testing Quality
|
|
160
|
-
|
|
161
|
-
- Use shallow render when possible (less memory)
|
|
162
|
-
- Single component instance per test scope
|
|
163
|
-
- Avoid snapshots
|
|
164
|
-
- Mock external dependencies
|
|
165
|
-
- Quick timeouts (<100ms)
|
|
166
|
-
|
|
167
|
-
### Optimization
|
|
168
|
-
|
|
169
|
-
- isMobile/IsTablet in CSS preferred over JSX
|
|
170
|
-
- Use reduce loop instead of multiple loops
|
|
171
|
-
- Check `if(array.length)` instead of `if(array.length > 0)`
|
|
172
|
-
- No `!important` in CSS
|
|
173
|
-
- Direct children selector `>` avoided
|
|
174
|
-
|
|
175
|
-
## Auto-Merge Requirements
|
|
176
|
-
|
|
177
|
-
Auto-merge enabled when:
|
|
178
|
-
|
|
179
|
-
- [ ] Team reviewer approved PR
|
|
180
|
-
- [ ] Approver approved PR
|
|
181
|
-
- [ ] File owners approved (if applicable)
|
|
182
|
-
- [ ] No dismissals from updates (requires re-review)
|
|
183
|
-
- [ ] For release branch: Designated approver signed off
|
|
184
|
-
|
|
185
|
-
## What NOT to Merge
|
|
186
|
-
|
|
187
|
-
- Global/semiglobal changes without architect review
|
|
188
|
-
- PRs impacting multiple pages/flows without extensive review
|
|
189
|
-
- Missing eQA sign-offs on upstream PRs
|
|
190
|
-
- TODOs or incomplete work
|
|
191
|
-
- Failing tests or coverage decrease
|
|
192
|
-
- Security vulnerabilities
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Pull Request Standards and Review Guidelines
|
|
6
|
+
|
|
7
|
+
## PR Submission Requirements
|
|
8
|
+
|
|
9
|
+
### Must-Have Checklist
|
|
10
|
+
|
|
11
|
+
- [ ] PR form properly filled (checkmarks, labels, ticket number, description)
|
|
12
|
+
- [ ] Code coverage provided (previous vs current)
|
|
13
|
+
- [ ] Unit tests added/updated for all changed code
|
|
14
|
+
- [ ] Screenshots of new functionality included
|
|
15
|
+
- [ ] Team review completed before requesting merge
|
|
16
|
+
- [ ] All Jira tickets linked and valid
|
|
17
|
+
- [ ] No TODOs or incomplete work (create enabler if urgent)
|
|
18
|
+
|
|
19
|
+
### PR Form Structure
|
|
20
|
+
|
|
21
|
+
- **Ticket Number**: Link to Jira/Github issue
|
|
22
|
+
- **Description**: Clear explanation of changes and why
|
|
23
|
+
- **Testing Instructions**: How to manually verify changes
|
|
24
|
+
- **Coverage**: Previous and current test coverage percentage
|
|
25
|
+
- **Screenshots**: Before/after for UI changes
|
|
26
|
+
- **Team Review**: At least one peer approval
|
|
27
|
+
- **Release Notes**: User-facing changes documented
|
|
28
|
+
|
|
29
|
+
## Branching and Merging Strategy
|
|
30
|
+
|
|
31
|
+
### Branch Types
|
|
32
|
+
|
|
33
|
+
- **Feature/Epic Branches**: New functionality development
|
|
34
|
+
- **Pod Branches**: Maintenance or combined testing
|
|
35
|
+
- **Development Branch**: Integration branch for release candidates
|
|
36
|
+
|
|
37
|
+
### Merge Rules
|
|
38
|
+
|
|
39
|
+
- All PRs go to feature/epic/pod branch, NEVER directly to development
|
|
40
|
+
- One PR per user story
|
|
41
|
+
- Do NOT "Squash and merge" downstreams (difficult to solve issues)
|
|
42
|
+
- Upstream PRs require:
|
|
43
|
+
- Intended release documented
|
|
44
|
+
- List of all Jira/Github tickets
|
|
45
|
+
- Git log command output: `git log --no-merges --format=oneline origin/development..origin/epicbranch`
|
|
46
|
+
- eQA sign-off on ALL tickets
|
|
47
|
+
- Each change must relate to a ticket
|
|
48
|
+
- Global/semiglobal changes require architecture team review
|
|
49
|
+
|
|
50
|
+
### Release Readiness
|
|
51
|
+
|
|
52
|
+
- All user stories in epic/feature must have eQA sign-off
|
|
53
|
+
- Stories tested together in dev environment before merge
|
|
54
|
+
- Time allocated for code reviews, downstream and upstream merges
|
|
55
|
+
- Epic/feature scope properly defined in Jira/Github
|
|
56
|
+
|
|
57
|
+
## Code Review Standards
|
|
58
|
+
|
|
59
|
+
### Architecture and Structure
|
|
60
|
+
|
|
61
|
+
- [ ] Folder structure follows pod-based architecture
|
|
62
|
+
- [ ] No pod bubble breaches
|
|
63
|
+
- [ ] Component placed in correct directory
|
|
64
|
+
- [ ] Imports follow approved patterns
|
|
65
|
+
- [ ] No circular dependencies
|
|
66
|
+
|
|
67
|
+
### JavaScript Review
|
|
68
|
+
|
|
69
|
+
- [ ] No `window` object usage (unless approved)
|
|
70
|
+
- [ ] Lodash imports are scoped (not entire library)
|
|
71
|
+
- [ ] Keys in lists from data props, not index
|
|
72
|
+
- [ ] No eslint-disable-line without validation
|
|
73
|
+
- [ ] No `tabIndex > 0`
|
|
74
|
+
- [ ] Props drilling limited to 3 levels
|
|
75
|
+
- [ ] No console.log or debugger statements
|
|
76
|
+
- [ ] Conditional rendering uses boolean values only
|
|
77
|
+
- [ ] No code duplication
|
|
78
|
+
- [ ] String values moved to constants file
|
|
79
|
+
- [ ] Gremlins checked (invisible harmful characters)
|
|
80
|
+
|
|
81
|
+
### Component Review
|
|
82
|
+
|
|
83
|
+
- [ ] Functional components with hooks (not class components)
|
|
84
|
+
- [ ] PropTypes defined and accurate
|
|
85
|
+
- [ ] Required props marked with .isRequired
|
|
86
|
+
- [ ] Components under 200 lines
|
|
87
|
+
- [ ] No anonymous functions as event handlers
|
|
88
|
+
- [ ] Fragments used instead of empty divs
|
|
89
|
+
- [ ] useEffect dependencies correct
|
|
90
|
+
- [ ] No stale closures
|
|
91
|
+
|
|
92
|
+
### Styles Review
|
|
93
|
+
|
|
94
|
+
- [ ] Mobile-first approach used (avoid max-width)
|
|
95
|
+
- [ ] No `:global` styles (unless scoped and approved)
|
|
96
|
+
- [ ] Atmos utility classes used (atm-u, not atm-c)
|
|
97
|
+
- [ ] No CSS without parent class selector
|
|
98
|
+
- [ ] Color contrast meets 4.5:1 ratio
|
|
99
|
+
|
|
100
|
+
### Accessibility Review
|
|
101
|
+
|
|
102
|
+
- [ ] All interactive elements keyboard accessible
|
|
103
|
+
- [ ] Proper ARIA labels (not overused)
|
|
104
|
+
- [ ] role="alert" not misused
|
|
105
|
+
- [ ] External links have extDisclaimer for screen readers
|
|
106
|
+
- [ ] Color not sole information indicator
|
|
107
|
+
- [ ] Alt text provided for meaningful images
|
|
108
|
+
- [ ] Form fields have labels
|
|
109
|
+
|
|
110
|
+
### Testing Review
|
|
111
|
+
|
|
112
|
+
- [ ] Tests added for new functionality
|
|
113
|
+
- [ ] Tests updated for changed code
|
|
114
|
+
- [ ] Tests not using mock data excessively
|
|
115
|
+
- [ ] Shallow render preferred over mount (unless hooks require mount)
|
|
116
|
+
- [ ] External dependencies mocked
|
|
117
|
+
- [ ] beforeEach and afterAll for mock cleanup
|
|
118
|
+
- [ ] No setTimeout over 100ms
|
|
119
|
+
- [ ] Snapshots avoided (remove when possible)
|
|
120
|
+
|
|
121
|
+
### App-Specific Review
|
|
122
|
+
|
|
123
|
+
- [ ] Atmos components used (headers, buttons, form fields)
|
|
124
|
+
- [ ] `<TextPassage>` for paragraphs, not `<p>`
|
|
125
|
+
- [ ] `<Currency>` or getFormattedCurrency used, never type: currency
|
|
126
|
+
- [ ] pushRouteWithLocale for navigation
|
|
127
|
+
- [ ] cmsContainer for CMS content
|
|
128
|
+
- [ ] react-redux-form uses model, not state
|
|
129
|
+
- [ ] intl injected at container level only
|
|
130
|
+
- [ ] Variable messages validated before intl usage
|
|
131
|
+
|
|
132
|
+
### Data and Date Handling
|
|
133
|
+
|
|
134
|
+
- [ ] Service responses validated with null chain operator
|
|
135
|
+
- [ ] Mapper layer between services and store
|
|
136
|
+
- [ ] moment used instead of Date()
|
|
137
|
+
- [ ] Dates not mocked in future
|
|
138
|
+
- [ ] moment.now overridden in tests if needed
|
|
139
|
+
|
|
140
|
+
## Strongly Recommended Practices
|
|
141
|
+
|
|
142
|
+
### Review Process
|
|
143
|
+
|
|
144
|
+
- Ask for second review if uncertain about changes
|
|
145
|
+
- Involve previous developers/pod for context
|
|
146
|
+
- Check if data transformations can move to selectors
|
|
147
|
+
- Avoid mocked a11y implementations with aria-label
|
|
148
|
+
- Provide enabler option only for urgent blockers
|
|
149
|
+
|
|
150
|
+
### Code Quality
|
|
151
|
+
|
|
152
|
+
- Naming is critical: camelCase, PascalCase, UPPER_CASE used correctly
|
|
153
|
+
- Intermediate containers reduce prop drilling
|
|
154
|
+
- DRY principle: Save repeated data in defaulted constants
|
|
155
|
+
- PropTypes in external file for reusability
|
|
156
|
+
- Containers without JSX are easier to maintain
|
|
157
|
+
- Required props clearly marked
|
|
158
|
+
|
|
159
|
+
### Testing Quality
|
|
160
|
+
|
|
161
|
+
- Use shallow render when possible (less memory)
|
|
162
|
+
- Single component instance per test scope
|
|
163
|
+
- Avoid snapshots
|
|
164
|
+
- Mock external dependencies
|
|
165
|
+
- Quick timeouts (<100ms)
|
|
166
|
+
|
|
167
|
+
### Optimization
|
|
168
|
+
|
|
169
|
+
- isMobile/IsTablet in CSS preferred over JSX
|
|
170
|
+
- Use reduce loop instead of multiple loops
|
|
171
|
+
- Check `if(array.length)` instead of `if(array.length > 0)`
|
|
172
|
+
- No `!important` in CSS
|
|
173
|
+
- Direct children selector `>` avoided
|
|
174
|
+
|
|
175
|
+
## Auto-Merge Requirements
|
|
176
|
+
|
|
177
|
+
Auto-merge enabled when:
|
|
178
|
+
|
|
179
|
+
- [ ] Team reviewer approved PR
|
|
180
|
+
- [ ] Approver approved PR
|
|
181
|
+
- [ ] File owners approved (if applicable)
|
|
182
|
+
- [ ] No dismissals from updates (requires re-review)
|
|
183
|
+
- [ ] For release branch: Designated approver signed off
|
|
184
|
+
|
|
185
|
+
## What NOT to Merge
|
|
186
|
+
|
|
187
|
+
- Global/semiglobal changes without architect review
|
|
188
|
+
- PRs impacting multiple pages/flows without extensive review
|
|
189
|
+
- Missing eQA sign-offs on upstream PRs
|
|
190
|
+
- TODOs or incomplete work
|
|
191
|
+
- Failing tests or coverage decrease
|
|
192
|
+
- Security vulnerabilities
|