codecritique 1.1.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/package.json +1 -1
- package/src/rag-analyzer.js +94 -37
package/package.json
CHANGED
package/src/rag-analyzer.js
CHANGED
|
@@ -104,43 +104,100 @@ DO NOT report "low" severity issues. Low severity issues typically include:
|
|
|
104
104
|
These concerns are handled by project linters (ESLint, Prettier, etc.) and should NOT be included in your review.
|
|
105
105
|
Only report issues with severity: "critical", "high", or "medium".
|
|
106
106
|
|
|
107
|
-
**🚨
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- "Add a comment explaining..."
|
|
117
|
-
- "
|
|
118
|
-
- "
|
|
119
|
-
- "
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- "
|
|
128
|
-
- "
|
|
129
|
-
- "
|
|
130
|
-
- "
|
|
131
|
-
- "
|
|
132
|
-
- "
|
|
133
|
-
- "
|
|
134
|
-
- "
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
107
|
+
**🚨 ABSOLUTE RULE: YOUR SUGGESTION MUST FIX BROKEN CODE 🚨**
|
|
108
|
+
|
|
109
|
+
Every issue you report MUST identify CODE THAT IS BROKEN OR INCORRECT.
|
|
110
|
+
|
|
111
|
+
Your suggestion MUST be a CODE FIX that changes program behavior, not documentation.
|
|
112
|
+
|
|
113
|
+
**🚨 COMMENTS ARE NOT CODE FIXES - DO NOT SUGGEST ADDING COMMENTS 🚨**
|
|
114
|
+
|
|
115
|
+
Adding comments is DOCUMENTATION, not a code fix. DO NOT suggest:
|
|
116
|
+
- "Add a comment explaining..."
|
|
117
|
+
- "Add a comment above..."
|
|
118
|
+
- "Add a comment to clarify..."
|
|
119
|
+
- "Include a comment..."
|
|
120
|
+
- Any suggestion that involves writing comments
|
|
121
|
+
|
|
122
|
+
Comments do not fix bugs. Comments do not change behavior. Comments are NOT acceptable suggestions.
|
|
123
|
+
|
|
124
|
+
**🚨 BANNED WORDS IN SUGGESTIONS - AUTOMATIC DELETION 🚨**
|
|
125
|
+
|
|
126
|
+
If your suggestion contains ANY of these words/phrases, DELETE THE ISSUE IMMEDIATELY:
|
|
127
|
+
- "Add a comment" / "Add comment" / "Include a comment" / "comment explaining" / "comment to clarify"
|
|
128
|
+
- "Consider" / "consider whether" / "consider normalizing"
|
|
129
|
+
- "Verify" / "verify that" / "verify the"
|
|
130
|
+
- "Ensure" / "ensure that" / "ensure all"
|
|
131
|
+
- "Document" / "document why" / "document that"
|
|
132
|
+
- "Check" / "check if" / "check whether"
|
|
133
|
+
- "Confirm" / "confirm that"
|
|
134
|
+
- "Clarify" / "make clearer" / "could be clearer" / "more explicit"
|
|
135
|
+
- "Analytics" / "dashboards" / "tracking" / "tracking system"
|
|
136
|
+
- "Migration" / "migrated" / "migrate"
|
|
137
|
+
- "Downstream" / "consumers" / "external systems"
|
|
138
|
+
- "Experiment" / "experiment results" / "experiment analysis"
|
|
139
|
+
- "Backward compatibility" / "breaking change" (unless you provide code to fix it)
|
|
140
|
+
- "Future maintainers" / "maintainability" / "for clarity"
|
|
141
|
+
|
|
142
|
+
**🚨 YOUR SUGGESTION MUST START WITH A VERB THAT CHANGES CODE 🚨**
|
|
143
|
+
|
|
144
|
+
GOOD suggestion starters:
|
|
145
|
+
- "Change X to Y"
|
|
146
|
+
- "Replace X with Y"
|
|
147
|
+
- "Add X"
|
|
148
|
+
- "Remove X"
|
|
149
|
+
- "Rename X to Y"
|
|
150
|
+
- "Move X to Y"
|
|
151
|
+
- "Update X to Y"
|
|
152
|
+
|
|
153
|
+
BAD suggestion starters (DELETE THESE):
|
|
154
|
+
- "Consider..." - NO! This is advice, not a code change
|
|
155
|
+
- "Verify that..." - NO! This asks someone to check something
|
|
156
|
+
- "Ensure that..." - NO! This is a request, not a code change
|
|
157
|
+
- "Document..." - NO! Documentation is not a code fix
|
|
158
|
+
- "Check..." - NO! This asks for verification
|
|
159
|
+
|
|
160
|
+
**EXAMPLES OF ISSUES YOU MUST DELETE:**
|
|
161
|
+
❌ Description: "The default value inconsistency could lead to confusion"
|
|
162
|
+
Suggestion: "Consider whether X should also default to Y or document why they differ"
|
|
163
|
+
WHY DELETE: "Consider" and "document" are banned. No code change provided.
|
|
164
|
+
|
|
165
|
+
❌ Description: "This could break analytics dashboards"
|
|
166
|
+
Suggestion: "Verify that the tracking system can handle the new data structure"
|
|
167
|
+
WHY DELETE: "Verify" is banned. "tracking system" is banned. No code change provided.
|
|
168
|
+
|
|
169
|
+
❌ Description: "Users might lose access to features"
|
|
170
|
+
Suggestion: "Ensure that all users are properly migrated"
|
|
171
|
+
WHY DELETE: "Ensure" is banned. "migrated" is banned. No code change provided.
|
|
172
|
+
|
|
173
|
+
❌ Description: "Tracking data format inconsistency"
|
|
174
|
+
Suggestion: "Consider normalizing the value or document that this experiment uses..."
|
|
175
|
+
WHY DELETE: "Consider" is banned. "document" is banned. "experiment" is banned.
|
|
176
|
+
|
|
177
|
+
**EXAMPLES OF ACCEPTABLE ISSUES:**
|
|
178
|
+
✅ Description: "The function returns null but the return type doesn't allow null"
|
|
179
|
+
Suggestion: "Change the return type from \`string\` to \`string | null\` on line 42"
|
|
180
|
+
WHY ACCEPT: Identifies a specific bug with a specific code change.
|
|
181
|
+
|
|
182
|
+
✅ Description: "Missing null check will cause runtime error"
|
|
183
|
+
Suggestion: "Add optional chaining: change \`user.name\` to \`user?.name\` on line 15"
|
|
184
|
+
WHY ACCEPT: Identifies a specific problem with exact code to fix it.
|
|
185
|
+
|
|
186
|
+
✅ Description: "Promise is not awaited"
|
|
187
|
+
Suggestion: "Add \`await\` before \`fetchData()\` on line 28"
|
|
188
|
+
WHY ACCEPT: Specific bug with specific code fix.
|
|
189
|
+
|
|
190
|
+
**THE ONLY ACCEPTABLE ISSUE FORMAT:**
|
|
191
|
+
1. Description: Identifies a SPECIFIC BUG or CODE QUALITY PROBLEM
|
|
192
|
+
2. Suggestion: Provides EXACT CODE CHANGE to fix it (no "consider", "verify", "ensure", "document")
|
|
193
|
+
|
|
194
|
+
**FINAL CHECK BEFORE INCLUDING ANY ISSUE:**
|
|
195
|
+
□ Does my suggestion contain "consider", "verify", "ensure", "document", "check", or "confirm"? → DELETE
|
|
196
|
+
□ Does my suggestion mention "analytics", "tracking", "migration", "downstream", or "experiment"? → DELETE
|
|
197
|
+
□ Is my suggestion a request for someone to do something (not a code change)? → DELETE
|
|
198
|
+
□ Can I write the exact code change in the suggestion? → If NO, DELETE
|
|
199
|
+
|
|
200
|
+
When in doubt, DELETE THE ISSUE. Only report issues with EXACT CODE FIXES.`;
|
|
144
201
|
}
|
|
145
202
|
|
|
146
203
|
/**
|