Skip to content

Commit ccb88b0

Browse files
committed
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]>
1 parent 8c9acca commit ccb88b0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.claude/commands/api-review.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ You MUST use this EXACT format for ALL review feedback:
2828

2929
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.
3030

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+
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.
39+
3140
## Step 1: Pre-flight checks and determine review mode
3241

3342
First, I'll check the arguments and determine whether to review a PR or local changes:
@@ -131,13 +140,16 @@ fi
131140
echo "✅ Linting checks passed."
132141
```
133142

134-
## Step 4: Documentation validation
143+
## Step 4: Documentation and API conventions validation
135144

136145
For each changed API file, I'll validate:
137146

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
147+
1. **Kubernetes API Conventions**: All changes must comply with https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md
148+
2. **OpenShift API Conventions**: All changes must comply with https://github.com/openshift/enhancements/blob/master/dev-guide/api-conventions.md
149+
3. **Field Documentation**: All struct fields must have documentation comments
150+
4. **Optional Field Behavior**: Optional fields must explain what happens when they are omitted
151+
5. **Validation Documentation**: Validation rules must be documented and match markers
152+
6. **Cross-field Validation**: Documented field relationships must have corresponding XValidation rules
141153

142154
Let me check each changed file for these requirements:
143155

0 commit comments

Comments
 (0)