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
Lint accuracy (tested against 8 real-world repos):
- Context-aware vague rule detection: skip qualified phrases like
'be consistent with X' or 'follow best practices for Y'
- Detect non-functional rules: alwaysApply:false + empty globs → ERROR
- Catch empty frontmatter values (description:, globs: with no value)
- Fix false positives on empty descriptions (array/whitespace-only)
- Fix 'body starts with description' false positive on empty descriptions
- Updated tests to match new message text (80/80 passing)
@@ -149,8 +170,13 @@ async function lintMdcFile(filePath) {
149
170
if(fm.data.alwaysApply===undefined&&!hasGlobs){
150
171
issues.push({severity: 'warning',message: 'No alwaysApply or globs set — rule may only apply when manually referenced',hint: 'Add alwaysApply: true for global rules, or add globs to scope to specific files'});
151
172
}
152
-
if(!fm.data.description){
153
-
issues.push({severity: 'warning',message: 'Missing description in frontmatter',hint: 'Add a description so Cursor knows when to apply this rule'});
issues.push({severity: 'warning',message: 'Missing or empty description in frontmatter',hint: 'Add a description so Cursor knows when to apply this rule'});
176
+
}
177
+
// Non-functional rule: alwaysApply is explicitly false and no globs
178
+
if(fm.data.alwaysApply===false&&!hasGlobs){
179
+
issues.push({severity: 'error',message: 'Rule will never load: alwaysApply is false and no globs are set',hint: 'Set alwaysApply: true for global rules, or add globs to scope to specific files'});
message: 'Rule body starts with description repeated',
@@ -619,15 +629,8 @@ async function lintSkillFile(filePath) {
619
629
issues.push({severity: 'warning',message: 'Long skill with no headings',hint: 'Add ## sections to organize instructions for better agent comprehension'});
0 commit comments