claudex-setup 1.7.0 → 1.8.0

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/src/techniques.js CHANGED
@@ -4,6 +4,12 @@
4
4
  * Each technique includes: what to check, how to fix, impact level.
5
5
  */
6
6
 
7
+ function hasFrontendSignals(ctx) {
8
+ const pkg = ctx.fileContent('package.json') || '';
9
+ return /react|vue|angular|next|svelte|tailwind|vite|astro/i.test(pkg) ||
10
+ ctx.files.some(f => /tailwind\.config|vite\.config|next\.config|svelte\.config|nuxt\.config|pages\/|components\/|app\//i.test(f));
11
+ }
12
+
7
13
  const TECHNIQUES = {
8
14
  // ============================================================
9
15
  // === MEMORY & CONTEXT (category: 'memory') ==================
@@ -142,8 +148,13 @@ const TECHNIQUES = {
142
148
  name: '.claude/ tracked in git',
143
149
  check: (ctx) => {
144
150
  if (!ctx.fileContent('.gitignore')) return true; // no gitignore = ok
145
- const content = ctx.fileContent('.gitignore');
146
- return !content.includes('.claude/') || content.includes('!.claude/');
151
+ const lines = ctx.fileContent('.gitignore')
152
+ .split(/\r?\n/)
153
+ .map(line => line.trim())
154
+ .filter(line => line && !line.startsWith('#'));
155
+ const ignoresClaudeDir = lines.some(line => /^(\/|\*\*\/)?\.claude\/?$/.test(line));
156
+ const unignoresClaudeDir = lines.some(line => /^!(\/)?\.claude(\/|\*\*)?$/.test(line));
157
+ return !ignoresClaudeDir || unignoresClaudeDir;
147
158
  },
148
159
  impact: 'high',
149
160
  rating: 4,
@@ -318,7 +329,7 @@ const TECHNIQUES = {
318
329
  name: 'Permission configuration',
319
330
  check: (ctx) => {
320
331
  const settings = ctx.jsonFile('.claude/settings.local.json') || ctx.jsonFile('.claude/settings.json');
321
- return settings && settings.permissions;
332
+ return !!(settings && settings.permissions);
322
333
  },
323
334
  impact: 'medium',
324
335
  rating: 4,
@@ -471,6 +482,7 @@ const TECHNIQUES = {
471
482
  id: 1025,
472
483
  name: 'Frontend design skill for anti-AI-slop',
473
484
  check: (ctx) => {
485
+ if (!hasFrontendSignals(ctx)) return null;
474
486
  const md = ctx.fileContent('CLAUDE.md') || '';
475
487
  return md.includes('frontend_aesthetics') || md.includes('anti-AI-slop') || md.includes('frontend-design');
476
488
  },
@@ -485,6 +497,7 @@ const TECHNIQUES = {
485
497
  id: 102501,
486
498
  name: 'Tailwind CSS configured',
487
499
  check: (ctx) => {
500
+ if (!hasFrontendSignals(ctx)) return null;
488
501
  const pkg = ctx.fileContent('package.json') || '';
489
502
  return pkg.includes('tailwind') ||
490
503
  ctx.files.some(f => /tailwind\.config/.test(f));
@@ -613,7 +626,7 @@ const TECHNIQUES = {
613
626
  if (!hasNodeSignals) return null;
614
627
  if (ctx.files.includes('.nvmrc') || ctx.files.includes('.node-version')) return true;
615
628
  const pkg = ctx.jsonFile('package.json');
616
- return pkg && pkg.engines && pkg.engines.node;
629
+ return !!(pkg && pkg.engines && pkg.engines.node);
617
630
  },
618
631
  impact: 'low',
619
632
  rating: 3,
@@ -663,7 +676,7 @@ const TECHNIQUES = {
663
676
  name: 'MCP servers configured',
664
677
  check: (ctx) => {
665
678
  const settings = ctx.jsonFile('.claude/settings.local.json') || ctx.jsonFile('.claude/settings.json');
666
- return settings && settings.mcpServers && Object.keys(settings.mcpServers).length > 0;
679
+ return !!(settings && settings.mcpServers && Object.keys(settings.mcpServers).length > 0);
667
680
  },
668
681
  impact: 'medium',
669
682
  rating: 3,
@@ -677,7 +690,7 @@ const TECHNIQUES = {
677
690
  name: '2+ MCP servers for rich tooling',
678
691
  check: (ctx) => {
679
692
  const settings = ctx.jsonFile('.claude/settings.local.json') || ctx.jsonFile('.claude/settings.json');
680
- return settings && settings.mcpServers && Object.keys(settings.mcpServers).length >= 2;
693
+ return !!(settings && settings.mcpServers && Object.keys(settings.mcpServers).length >= 2);
681
694
  },
682
695
  impact: 'medium',
683
696
  rating: 4,