smart-context-mcp 1.16.0 → 1.16.2

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/README.md CHANGED
@@ -56,7 +56,7 @@ Restart your AI client. Done.
56
56
  # Check installed version
57
57
  npm list -g smart-context-mcp
58
58
 
59
- # Should show: smart-context-mcp@1.16.0 (or later)
59
+ # Should show: smart-context-mcp@1.16.2 (or later)
60
60
 
61
61
  # Update to latest version
62
62
  npm update -g smart-context-mcp
@@ -66,7 +66,18 @@ npm uninstall -g smart-context-mcp
66
66
  npm install -g smart-context-mcp
67
67
  ```
68
68
 
69
- **After updating:** Restart your AI client to load the new version.
69
+ **After updating:** The binary is updated globally, but agent rules (`.cursorrules`, `CLAUDE.md`, `AGENTS.md`) in each project are generated from the installed version and are **not updated automatically**.
70
+
71
+ Re-run init after each update to get the latest rules:
72
+
73
+ ```bash
74
+ # Re-apply rules to a project after updating
75
+ npx smart-context-init --target /path/to/your/project --clients cursor
76
+ # or for all clients
77
+ npx smart-context-init --target /path/to/your/project --clients all
78
+ ```
79
+
80
+ Then restart your AI client to load the new version.
70
81
 
71
82
  ---
72
83
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "smart-context-mcp",
3
3
  "mcpName": "io.github.Arrayo/smart-context-mcp",
4
- "version": "1.16.0",
4
+ "version": "1.16.2",
5
5
  "description": "MCP server that reduces agent token usage by 90% with intelligent context compression, task checkpoint persistence, and workflow-aware agent guidance.",
6
6
  "author": "Francisco Caballero Portero <fcp1978@hotmail.com>",
7
7
  "type": "module",
@@ -369,16 +369,18 @@ const updateCodexConfig = (targetDir, serverConfig, dryRun) => {
369
369
  const HOOK_SECTION_START = '# devctx:start';
370
370
  const HOOK_SECTION_END = '# devctx:end';
371
371
 
372
- const buildPreCommitHookSection = (targetDir) => {
373
- const scriptPath = normalizeCommandPath(path.relative(targetDir, path.join(devctxDir, 'scripts', 'check-repo-safety.js')));
372
+ const buildPreCommitHookSection = () => {
374
373
  return `${HOOK_SECTION_START}
375
374
  # Prevent committing project-local devctx state.
376
375
  repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
377
- "${process.execPath}" "${scriptPath}" --project-root "$repo_root"
378
- status=$?
379
- if [ "$status" -ne 0 ]; then
380
- echo "devctx: commit blocked by repo safety checks." >&2
381
- exit "$status"
376
+ devctx_script="$(npm root -g 2>/dev/null)/smart-context-mcp/scripts/check-repo-safety.js"
377
+ if [ -f "$devctx_script" ]; then
378
+ node "$devctx_script" --project-root "$repo_root"
379
+ status=$?
380
+ if [ "$status" -ne 0 ]; then
381
+ echo "devctx: commit blocked by repo safety checks." >&2
382
+ exit "$status"
383
+ fi
382
384
  fi
383
385
  ${HOOK_SECTION_END}`;
384
386
  };
@@ -392,7 +394,7 @@ const updatePreCommitHook = (targetDir, dryRun) => {
392
394
 
393
395
  const filePath = path.resolve(targetDir, hookPathResult.stdout);
394
396
  const current = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : '';
395
- const nextBody = upsertSentinelSection(current, HOOK_SECTION_START, HOOK_SECTION_END, buildPreCommitHookSection(targetDir));
397
+ const nextBody = upsertSentinelSection(current, HOOK_SECTION_START, HOOK_SECTION_END, buildPreCommitHookSection());
396
398
  const nextContent = nextBody.startsWith('#!') ? nextBody : `#!/bin/sh\n\n${nextBody}`;
397
399
  writeFile(filePath, nextContent, dryRun);
398
400
 
@@ -414,6 +416,12 @@ Prefer devctx MCP for non-trivial tasks:
414
416
  - smart_shell instead of Shell for safe diagnostics
415
417
  - smart_turn(end, event=milestone) after meaningful progress
416
418
 
419
+ Tool substitution rules (use devctx INSTEAD of native tools):
420
+ - smart_search OVER Grep/SemanticSearch for any codebase exploration or "how does X work" queries
421
+ - smart_read/smart_read_batch OVER Read when reading multiple files or large files (>200 lines) for context
422
+ - smart_shell OVER Shell for build/test/lint/git checks
423
+ - smart_turn(end, event=milestone) after EVERY significant code change, not just at session end
424
+
417
425
  If devctx MCP is installed and enabled, default to devctx on every non-trivial multi-file or multi-step task. Skip it only for genuinely trivial work, and then state why it was skipped.
418
426
 
419
427
  Client contract:
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/Arrayo/smart-context-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.16.0",
9
+ "version": "1.16.2",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "smart-context-mcp",
14
- "version": "1.16.0",
14
+ "version": "1.16.2",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },