claudex-setup 1.12.0 → 1.14.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/CHANGELOG.md CHANGED
@@ -15,6 +15,25 @@
15
15
  - README and docs now reflect snapshot artifacts, governance export, and the Claude-native skill path
16
16
  - packaged content and public-facing counts are now aligned with the current CLAUDEX state
17
17
 
18
+ ## [1.14.0] - 2026-04-03
19
+
20
+ ### Added
21
+ - Check-level test matrix: 327 verified scenarios across all 84 checks
22
+ - Golden matrix: 12 repo profile tests with expected results
23
+
24
+ ### Fixed
25
+ - `hooks` check now detects hooks in settings.json (not only .claude/hooks/ dir)
26
+ - `context7Mcp` check now reads .mcp.json
27
+ - `skillUsesPaths` now traverses skill subdirectories (skills/name/SKILL.md)
28
+ - `lintCommand` now matches npm/yarn/pnpm/bun lint commands
29
+
30
+ ## [1.13.0] - 2026-04-03
31
+
32
+ ### Added
33
+ - 10 new checks (74→84): project description, directory structure, multiple hook types, stop-failure hook, skill paths, MCP env config, gitignore local settings, .env.example, package scripts, type checking
34
+ - 15 new tests (58→73): history/compare/trend, new checks structure, CLI commands, deny depth, negative instructions, --require flag
35
+ - All references updated to 74→84 checks
36
+
18
37
  ## [1.12.0] - 2026-04-03
19
38
 
20
39
  ### Added
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # claudex-setup
2
2
 
3
- > Score your repo's Claude Code setup against 74 checks. See what's missing, apply only what you approve with rollback, and benchmark the impact — without breaking existing config.
3
+ > Score your repo's Claude Code setup against 84 checks. See what's missing, apply only what you approve with rollback, and benchmark the impact — without breaking existing config.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/claudex-setup)](https://www.npmjs.com/package/claudex-setup)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/claudex-setup)](https://www.npmjs.com/package/claudex-setup)
@@ -89,7 +89,7 @@ Most common gaps found: missing secrets protection, no deny rules, no mermaid di
89
89
  design: none (0/2)
90
90
  devops: none (0/4)
91
91
 
92
- 29/74 checks passing
92
+ 29/84 checks passing
93
93
  Next command: npx claudex-setup setup
94
94
  ```
95
95
 
@@ -105,7 +105,7 @@ That prints a compact top-3 quick scan with one clear next command.
105
105
 
106
106
  | Command | What it does |
107
107
  |---------|-------------|
108
- | `npx claudex-setup` | **Discover** - Score 0-100 against 74 checks |
108
+ | `npx claudex-setup` | **Discover** - Score 0-100 against 84 checks |
109
109
  | `npx claudex-setup discover` | **Discover** - Alias for audit mode |
110
110
  | `npx claudex-setup setup` | **Starter** - Smart CLAUDE.md + hooks + commands + agents |
111
111
  | `npx claudex-setup starter` | **Starter** - Alias for setup mode |
@@ -305,7 +305,7 @@ jobs:
305
305
  runs-on: ubuntu-latest
306
306
  steps:
307
307
  - uses: actions/checkout@v4
308
- - uses: DnaFin/claudex-setup@v1.12.0
308
+ - uses: DnaFin/claudex-setup@v1.14.0
309
309
  with:
310
310
  threshold: 50
311
311
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudex-setup",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Score your repo's Claude Code setup against 62 checks. See gaps, apply fixes selectively with rollback, govern hooks and permissions, and benchmark impact — without breaking existing config.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/techniques.js CHANGED
@@ -116,7 +116,7 @@ const TECHNIQUES = {
116
116
  name: 'CLAUDE.md contains a lint command',
117
117
  check: (ctx) => {
118
118
  const md = ctx.fileContent('CLAUDE.md') || '';
119
- return /eslint|prettier|ruff|black|clippy|golangci-lint|rubocop/.test(md);
119
+ return /eslint|prettier|ruff|black|clippy|golangci-lint|rubocop|npm run lint|yarn lint|pnpm lint|bun lint/.test(md);
120
120
  },
121
121
  impact: 'high',
122
122
  rating: 4,
@@ -413,7 +413,12 @@ const TECHNIQUES = {
413
413
  hooks: {
414
414
  id: 19,
415
415
  name: 'Hooks for automation',
416
- check: (ctx) => ctx.hasDir('.claude/hooks') && ctx.dirFiles('.claude/hooks').length > 0,
416
+ check: (ctx) => {
417
+ if (ctx.hasDir('.claude/hooks') && ctx.dirFiles('.claude/hooks').length > 0) return true;
418
+ const shared = ctx.jsonFile('.claude/settings.json') || {};
419
+ const local = ctx.jsonFile('.claude/settings.local.json') || {};
420
+ return !!(shared.hooks && Object.keys(shared.hooks).length > 0) || !!(local.hooks && Object.keys(local.hooks).length > 0);
421
+ },
417
422
  impact: 'high',
418
423
  rating: 4,
419
424
  category: 'automation',
@@ -717,9 +722,12 @@ const TECHNIQUES = {
717
722
  id: 110,
718
723
  name: 'Context7 MCP for real-time docs',
719
724
  check: (ctx) => {
720
- const settings = ctx.jsonFile('.claude/settings.local.json') || ctx.jsonFile('.claude/settings.json');
721
- if (!settings || !settings.mcpServers) return false;
722
- return Object.keys(settings.mcpServers).some(k => /context7/i.test(k));
725
+ const shared = ctx.jsonFile('.claude/settings.json') || {};
726
+ const local = ctx.jsonFile('.claude/settings.local.json') || {};
727
+ const mcp = ctx.jsonFile('.mcp.json') || {};
728
+ const all = { ...(shared.mcpServers || {}), ...(local.mcpServers || {}), ...(mcp.mcpServers || {}) };
729
+ if (Object.keys(all).length === 0) return false;
730
+ return Object.keys(all).some(k => /context7/i.test(k));
723
731
  },
724
732
  impact: 'medium',
725
733
  rating: 4,
@@ -1114,6 +1122,145 @@ const TECHNIQUES = {
1114
1122
  template: null
1115
1123
  },
1116
1124
 
1125
+ // --- New checks: depth round 2 ---
1126
+ projectDescriptionInClaudeMd: {
1127
+ id: 2022,
1128
+ name: 'CLAUDE.md describes what the project does',
1129
+ check: (ctx) => {
1130
+ const md = ctx.fileContent('CLAUDE.md') || '';
1131
+ return /what.*does|overview|purpose|about|description|project.*is/i.test(md) && md.length > 100;
1132
+ },
1133
+ impact: 'high', rating: 4, category: 'memory',
1134
+ fix: 'Start CLAUDE.md with a clear project description. Claude needs to know what your project does.',
1135
+ template: null
1136
+ },
1137
+
1138
+ directoryStructureInClaudeMd: {
1139
+ id: 2023,
1140
+ name: 'CLAUDE.md documents directory structure',
1141
+ check: (ctx) => {
1142
+ const md = ctx.fileContent('CLAUDE.md') || '';
1143
+ return /src\/|app\/|lib\/|structure|director|folder/i.test(md);
1144
+ },
1145
+ impact: 'medium', rating: 4, category: 'memory',
1146
+ fix: 'Document your directory structure in CLAUDE.md so Claude navigates your codebase efficiently.',
1147
+ template: null
1148
+ },
1149
+
1150
+ multipleHookTypes: {
1151
+ id: 2024,
1152
+ name: '2+ hook event types configured',
1153
+ check: (ctx) => {
1154
+ const shared = ctx.jsonFile('.claude/settings.json') || {};
1155
+ const local = ctx.jsonFile('.claude/settings.local.json') || {};
1156
+ const hooks = { ...(shared.hooks || {}), ...(local.hooks || {}) };
1157
+ return Object.keys(hooks).length >= 2;
1158
+ },
1159
+ impact: 'medium', rating: 3, category: 'automation',
1160
+ fix: 'Add at least 2 hook types (e.g. PostToolUse for linting + SessionStart for initialization).',
1161
+ template: null
1162
+ },
1163
+
1164
+ stopFailureHook: {
1165
+ id: 2025,
1166
+ name: 'StopFailure or error handling hook',
1167
+ check: (ctx) => {
1168
+ const shared = ctx.jsonFile('.claude/settings.json') || {};
1169
+ const local = ctx.jsonFile('.claude/settings.local.json') || {};
1170
+ return !!(shared.hooks?.StopFailure || shared.hooks?.Stop || local.hooks?.StopFailure || local.hooks?.Stop);
1171
+ },
1172
+ impact: 'low', rating: 3, category: 'automation',
1173
+ fix: 'Add a StopFailure hook to log errors for debugging. Helps track why Claude stops unexpectedly.',
1174
+ template: null
1175
+ },
1176
+
1177
+ skillUsesPaths: {
1178
+ id: 2026,
1179
+ name: 'At least one skill uses paths for scoping',
1180
+ check: (ctx) => {
1181
+ if (!ctx.hasDir('.claude/skills')) return null;
1182
+ const entries = ctx.dirFiles('.claude/skills');
1183
+ if (entries.length === 0) return null;
1184
+ for (const entry of entries) {
1185
+ // Skills can be files or dirs with SKILL.md inside
1186
+ const direct = ctx.fileContent(`.claude/skills/${entry}`) || '';
1187
+ if (/paths:/i.test(direct)) return true;
1188
+ const nested = ctx.fileContent(`.claude/skills/${entry}/SKILL.md`) || '';
1189
+ if (/paths:/i.test(nested)) return true;
1190
+ }
1191
+ return false;
1192
+ },
1193
+ impact: 'low', rating: 3, category: 'workflow',
1194
+ fix: 'Add paths to skill frontmatter to scope when skills activate (e.g. paths: ["src/**/*.ts"]).',
1195
+ template: null
1196
+ },
1197
+
1198
+ mcpHasEnvConfig: {
1199
+ id: 2027,
1200
+ name: 'MCP servers have environment configuration',
1201
+ check: (ctx) => {
1202
+ const shared = ctx.jsonFile('.claude/settings.json') || {};
1203
+ const local = ctx.jsonFile('.claude/settings.local.json') || {};
1204
+ const mcp = ctx.jsonFile('.mcp.json') || {};
1205
+ const allServers = { ...(shared.mcpServers || {}), ...(local.mcpServers || {}), ...(mcp.mcpServers || {}) };
1206
+ if (Object.keys(allServers).length === 0) return null;
1207
+ return Object.values(allServers).some(s => s.env && Object.keys(s.env).length > 0);
1208
+ },
1209
+ impact: 'low', rating: 3, category: 'tools',
1210
+ fix: 'Configure environment variables for MCP servers that need authentication (e.g. GITHUB_TOKEN).',
1211
+ template: null
1212
+ },
1213
+
1214
+ gitIgnoreClaudeLocal: {
1215
+ id: 2028,
1216
+ name: '.gitignore excludes settings.local.json',
1217
+ check: (ctx) => {
1218
+ const gitignore = ctx.fileContent('.gitignore') || '';
1219
+ return /settings\.local\.json|settings\.local/i.test(gitignore);
1220
+ },
1221
+ impact: 'medium', rating: 4, category: 'git',
1222
+ fix: 'Add .claude/settings.local.json to .gitignore. Personal overrides should not be committed.',
1223
+ template: null
1224
+ },
1225
+
1226
+ envExampleExists: {
1227
+ id: 2029,
1228
+ name: '.env.example or .env.template exists',
1229
+ check: (ctx) => {
1230
+ return !!(ctx.fileContent('.env.example') || ctx.fileContent('.env.template') || ctx.fileContent('.env.sample'));
1231
+ },
1232
+ impact: 'low', rating: 3, category: 'hygiene',
1233
+ fix: 'Add .env.example so new developers know which environment variables are needed.',
1234
+ template: null
1235
+ },
1236
+
1237
+ packageJsonHasScripts: {
1238
+ id: 2030,
1239
+ name: 'package.json has dev/test/build scripts',
1240
+ check: (ctx) => {
1241
+ const pkg = ctx.jsonFile('package.json');
1242
+ if (!pkg) return null;
1243
+ const scripts = pkg.scripts || {};
1244
+ const has = (k) => !!scripts[k];
1245
+ return has('test') || has('dev') || has('build') || has('start');
1246
+ },
1247
+ impact: 'medium', rating: 3, category: 'hygiene',
1248
+ fix: 'Add scripts to package.json (test, dev, build). Claude uses these for verification.',
1249
+ template: null
1250
+ },
1251
+
1252
+ typeCheckingConfigured: {
1253
+ id: 2031,
1254
+ name: 'Type checking configured (TypeScript or similar)',
1255
+ check: (ctx) => {
1256
+ return !!(ctx.fileContent('tsconfig.json') || ctx.fileContent('jsconfig.json') ||
1257
+ ctx.fileContent('pyrightconfig.json') || ctx.fileContent('mypy.ini'));
1258
+ },
1259
+ impact: 'medium', rating: 3, category: 'quality',
1260
+ fix: 'Add type checking configuration. Type-safe code produces fewer Claude errors.',
1261
+ template: null
1262
+ },
1263
+
1117
1264
  noDeprecatedPatterns: {
1118
1265
  id: 2009,
1119
1266
  name: 'No deprecated patterns detected',