You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
claude: take latest OpenShift and Kubernetes API conventions into account
It would be good if claude uses the latest conventions to do the review.
On top of that it should check for naming convention issues during the
documentation checks.
Signed-off-by: Sascha Grunert <[email protected]>
Copy file name to clipboardExpand all lines: .claude/commands/api-review.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ You MUST use this EXACT format for ALL review feedback:
28
28
29
29
I'll run a comprehensive API review for OpenShift API changes. This can review either a specific GitHub PR or local changes against upstream master.
30
30
31
+
## API Conventions
32
+
33
+
**CRITICAL**: All API changes MUST comply with both Kubernetes and OpenShift API conventions:
34
+
35
+
1.**Kubernetes API Conventions**: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md
36
+
2.**OpenShift API Conventions**: https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md
37
+
38
+
**Naming Conventions**: All new fields MUST adhere to OpenShift and Kubernetes naming conventions to avoid conflicts now or in the future. Field names in golang must be PascalCase while their JSON representation has to be camelCase. They have to be descriptive, and align with established patterns in both Kubernetes and OpenShift APIs.
39
+
40
+
Before starting the review, I will fetch and review the latest API conventions from both sources to ensure all validation checks are aligned with current requirements.
41
+
31
42
## Step 1: Pre-flight checks and determine review mode
32
43
33
44
First, I'll check the arguments and determine whether to review a PR or local changes:
@@ -131,13 +142,17 @@ fi
131
142
echo"✅ Linting checks passed."
132
143
```
133
144
134
-
## Step 4: Documentation validation
145
+
## Step 4: Documentation and API conventions validation
135
146
136
147
For each changed API file, I'll validate:
137
148
138
-
1.**Field Documentation**: All struct fields must have documentation comments
139
-
2.**Optional Field Behavior**: Optional fields must explain what happens when they are omitted
140
-
3.**Validation Documentation**: Validation rules must be documented and match markers
149
+
1.**Kubernetes API Conventions**: All changes must comply with https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md
150
+
2.**OpenShift API Conventions**: All changes must comply with https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md
151
+
3.**Field Naming Conventions**: All new fields must adhere to OpenShift and Kubernetes naming conventions to avoid conflicts now or in the future
152
+
4.**Field Documentation**: All struct fields must have documentation comments
153
+
5.**Optional Field Behavior**: Optional fields must explain what happens when they are omitted
154
+
6.**Validation Documentation**: Validation rules must be documented and match markers
155
+
7.**Cross-field Validation**: Documented field relationships must have corresponding XValidation rules
141
156
142
157
Let me check each changed file for these requirements:
143
158
@@ -194,4 +209,4 @@ fi
194
209
3. MUST fetch latest changes from the detected openshift/api remote
195
210
4. MUST compare against the detected remote's master branch
196
211
5. MUST include both committed and staged changes in analysis
197
-
6. No branch switching required since we're reviewing local changes
212
+
6. No branch switching required since we're reviewing local changes
0 commit comments