sigmap 8.12.0 → 8.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/AGENTS.md CHANGED
@@ -35,20 +35,15 @@ src/extractors/python_ast.py ← ast
35
35
 
36
36
  ## changes (last 5 commits — 0 seconds ago)
37
37
  ```
38
+ src/graph/blast-radius.js +tierFor +_normRel +_bfs +methodBlastRadius
39
+ src/graph/call-graph.js +calls +maskRust +name +goDefs
40
+ src/mcp/handlers.js +that +getMethodImpact ~queryContext ~squeezeOutput
41
+ src/mcp/server.js ~dispatch
42
+ src/mcp/tools.js +it
43
+ src/review/pr-evidence.js ~buildPrEvidence ~formatPrEvidenceMarkdown
44
+ src/review/review-pr.js ~isSource ~reviewPr
38
45
  src/format/terse.js +splitAnchor +encodeTerseSig +encodeTerseSigs +_tokens
39
46
  src/wiki/generate.js +_rel +_pct +_identity +_modules
40
- src/conventions/extract.js ~classifyNaming ~scoreConvention
41
- src/conventions/fix.js ~buildFixList
42
- src/extractors/javascript.js ~extract ~extractClassMembers ~extractBlock ~buildReturnHints
43
- src/extractors/typescript.js ~extract ~extractInterfaceMembers ~extractClassMembers ~extractBlock
44
- src/graph/builder.js +probeJs +resolveJsPath +stripJsonc +loadAliasMap
45
- src/graph/impact.js ~formatImpact
46
- src/health/scorer.js +gradeFor +composeHealth +score ~score
47
- src/judge/judge-engine.js +extracts +claimGrounding ~groundedness ~judge
48
- src/plan/planner.js +createPlan ~createPlan
49
- src/review/pr-evidence.js ~formatPrEvidenceMarkdown
50
- src/review/review-pr.js ~reviewPr
51
- src/util/truncate.js +members +capWithNotice +block +capMembersWithNotice
52
47
  ```
53
48
 
54
49
  ## packages
@@ -180,42 +175,99 @@ code-fence ---
180
175
 
181
176
  ## src
182
177
 
183
- ### src/config/defaults.js
178
+ ### src/graph/blast-radius.js
184
179
  ```
185
- module.exports = { DEFAULTS } :161-161
180
+ module.exports = { methodBlastRadius, tierFor, DIRECT_WEIGHT, TRANSITIVE_WEIGHT } :132-132
181
+ function tierFor(score) :25-31
182
+ function _normRel(p) :33-35
183
+ function _bfs(seedIds, reverse, maxDepth) :38-60
184
+ function methodBlastRadius(changedFiles, cwd, opts = {}) → { * available: boolean, * :78-130
186
185
  ```
187
186
 
188
- ### src/format/terse.js
187
+ ### src/graph/call-graph.js
189
188
  ```
190
- module.exports = { encodeTerseSig, encodeTerseSigs, measureTerse, splitAnchor } :86-86
191
- function splitAnchor(sig) → { text: string, suffix: s :25-30
192
- function encodeTerseSig(sig) → string :37-50
193
- function encodeTerseSigs(sigs) string[] :57-59
194
- function _tokens(sigs) :62-64
195
- function measureTerse(sigsList) → { beforeTokens: number, a :72-84
189
+ module.exports = { buildCallGraph, methodImpact, methodCallees, formatCallGraph, formatCallGraphJSON, extractDefs, maskJs, maskPy, maskRust } :527-531
190
+ function normalizePath(p) :41-41
191
+ function toRel(cwd, f) :42-42
192
+ function symId(cwd, absFile, name) :43-43
193
+ function maskJs(src) :49-65
194
+ function maskRust(src) :70-91
195
+ function maskPy(src) :93-110
196
+ function matchDelim(masked, openIdx, open, close) :113-120
197
+ function lineAt(src, idx) :122-127
198
+ function jsDefs(masked) :132-237
199
+ function pyDefs(masked) :200-220
200
+ function goDefs(masked) :224-344
201
+ function javaDefs(masked) :250-367
202
+ function rustDefs(masked) :278-401
203
+ function maskFor(filePath, src) :300-305
204
+ function extractDefs(filePath, src) :307-315
205
+ function callsInRange(masked, start, end) :318-330
206
+ function _walk(dir, excludeSet, out, depth) :334-347
207
+ function buildCallGraph(cwd, opts = {}) → { * forward: Map<string,s :363-446
208
+ function _resolveSymbol(symbol, defs) :449-454
209
+ function _bfs(seedIds, graph, maxDepth) :457-470
210
+ function methodImpact(symbol, cwd, opts = {}) → { symbol:string, resolved :480-486
211
+ function methodCallees(symbol, cwd, opts = {}) → { symbol:string, resolved :492-498
212
+ function formatCallGraph(result, kind) :501-513
213
+ function formatCallGraphJSON(result, kind) :515-525
214
+ ```
215
+
216
+ ### src/mcp/handlers.js
217
+ ```
218
+ module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getMethodImpact, getImpact, getLines, readMemory, getCalleeSignatures, notifyFileCreated, notifySymbolAdded, notifyFileDeleted, getDiffContext, getArchitectureOverview, verifySuggestion, squeezeOutput } :966-966
219
+ function _readContextFiles(cwd) :10-17
220
+ function readContext(args, cwd) :36-66
221
+ function searchSignatures(args, cwd) :74-100
222
+ function getMap(args, cwd) :108-131
223
+ function createCheckpoint(args, cwd) :143-215
224
+ function getRouting(args, cwd) :224-261
225
+ function explainFile(args, cwd) :269-356
226
+ function listModules(args, cwd) :364-403
227
+ function queryContext(args, cwd) :411-429
228
+ function getMethodImpact(args, cwd) :437-451
229
+ function getImpact(args, cwd) :459-471
230
+ function getLines(args, cwd) :480-528
231
+ function readMemory(args, cwd) :536-571
232
+ function getCalleeSignatures(args, cwd) :580-625
233
+ function _pkgVersion(cwd) :632-635
234
+ function notifyFileCreated(args, cwd) :639-661
235
+ function notifySymbolAdded(args, cwd) :664-684
236
+ function notifyFileDeleted(args, cwd) :687-701
237
+ function _changedFiles(cwd, args) :707-719
238
+ function getDiffContext(args, cwd) :728-799
239
+ function getArchitectureOverview(args, cwd) :808-876
240
+ function verifySuggestion(args, cwd) :886-921
241
+ function squeezeOutput(args, cwd) :931-964
196
242
  ```
197
243
 
198
244
  ### src/mcp/server.js
199
245
  ```
200
- module.exports = { start } :140-140
246
+ module.exports = { start } :141-141
201
247
  function respond(id, result) :28-30
202
248
  function respondError(id, code, message) :32-36
203
- function dispatch(msg, cwd) :41-107
204
- function start(cwd) :112-138
249
+ function dispatch(msg, cwd) :41-108
250
+ function start(cwd) :113-139
205
251
  ```
206
252
 
207
- ### src/wiki/generate.js
253
+ ### src/mcp/tools.js
208
254
  ```
209
- module.exports = { buildWiki, renderWikiMarkdown } :250-250
210
- function _rel(cwd, f) :22-24
211
- function _pct(fraction) :26-28
212
- function _identity(cwd) :31-37
213
- function _modules(index) :40-67
214
- function _flow(cwd) :70-97
215
- function _conventions(cwd, index) :100-117
216
- function _health(cwd) :119-127
217
- function buildWiki(cwd, opts = {}) → { data: object, markdown: :137-162
218
- function renderWikiMarkdown(data, sigmapVersion) → string :171-248
255
+ module.exports = { TOOLS } :392-392
256
+ ```
257
+
258
+ ### src/review/pr-evidence.js
259
+ ```
260
+ module.exports = { buildPrEvidence, formatPrEvidenceMarkdown } :157-157
261
+ function buildPrEvidence(changedFiles, cwd, opts = {}) → { scope:string, files:obj :31-84
262
+ function formatPrEvidenceMarkdown(evidence, opts = {}) :89-155
263
+ ```
264
+
265
+ ### src/review/review-pr.js
266
+ ```
267
+ module.exports = { reviewPr, SECURITY_PATTERNS, GOD_NODE_THRESHOLD, SCOPE_DIR_THRESHOLD } :150-150
268
+ function isTestFile(p) :32-34
269
+ function isSource(p) :35-37
270
+ function reviewPr(changedFiles, cwd, opts = {}) → { findings: object[], bla :48-148
219
271
  ```
220
272
 
221
273
  ### src/analysis/coverage-score.js
@@ -255,6 +307,11 @@ function getChangedFiles(files, cache) → { changed: string[], unch :71-88
255
307
  function updateCacheEntries(cache, extracted) :96-103
256
308
  ```
257
309
 
310
+ ### src/config/defaults.js
311
+ ```
312
+ module.exports = { DEFAULTS } :161-161
313
+ ```
314
+
258
315
  ### src/config/loader.js
259
316
  ```
260
317
  module.exports = { loadConfig, loadBaseConfig } :313-313
@@ -929,6 +986,16 @@ function detectVersion(cwd) :13-19
929
986
  function format(context, cwd, writtenFiles, sigmapVersion) :21-69
930
987
  ```
931
988
 
989
+ ### src/format/terse.js
990
+ ```
991
+ module.exports = { encodeTerseSig, encodeTerseSigs, measureTerse, splitAnchor } :86-86
992
+ function splitAnchor(sig) → { text: string, suffix: s :25-30
993
+ function encodeTerseSig(sig) → string :37-50
994
+ function encodeTerseSigs(sigs) → string[] :57-59
995
+ function _tokens(sigs) :62-64
996
+ function measureTerse(sigsList) → { beforeTokens: number, a :72-84
997
+ ```
998
+
932
999
  ### src/format/usage-guidance.js
933
1000
  ```
934
1001
  module.exports = { usageBlock } :28-28
@@ -961,30 +1028,6 @@ function build(files, cwd, ctx) → { forward: Map<string,str :387-426
961
1028
  function buildFromCwd(cwd, opts) → { forward: Map<string,str :438-492
962
1029
  ```
963
1030
 
964
- ### src/graph/call-graph.js
965
- ```
966
- module.exports = { buildCallGraph, methodImpact, methodCallees, formatCallGraph, formatCallGraphJSON, extractDefs, maskJs, maskPy } :397-401
967
- function normalizePath(p) :35-35
968
- function toRel(cwd, f) :36-36
969
- function symId(cwd, absFile, name) :37-37
970
- function maskJs(src) :43-59
971
- function maskPy(src) :61-78
972
- function matchDelim(masked, openIdx, open, close) :81-88
973
- function lineAt(src, idx) :90-95
974
- function jsDefs(masked) :100-206
975
- function pyDefs(masked) :168-188
976
- function extractDefs(filePath, src) :190-195
977
- function callsInRange(masked, start, end) :198-210
978
- function _walk(dir, excludeSet, out, depth) :214-227
979
- function buildCallGraph(cwd, opts = {}) → { * forward: Map<string,s :243-316
980
- function _resolveSymbol(symbol, defs) :319-324
981
- function _bfs(seedIds, graph, maxDepth) :327-340
982
- function methodImpact(symbol, cwd, opts = {}) → { symbol:string, resolved :350-356
983
- function methodCallees(symbol, cwd, opts = {}) → { symbol:string, resolved :362-368
984
- function formatCallGraph(result, kind) :371-383
985
- function formatCallGraphJSON(result, kind) :385-395
986
- ```
987
-
988
1031
  ### src/graph/impact.js
989
1032
  ```
990
1033
  module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON } :240-240
@@ -1099,33 +1142,6 @@ function shouldSkipFile(rel) :18-21
1099
1142
  function analyze(files, cwd) :23-125
1100
1143
  ```
1101
1144
 
1102
- ### src/mcp/handlers.js
1103
- ```
1104
- module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact, getLines, readMemory, getCalleeSignatures, notifyFileCreated, notifySymbolAdded, notifyFileDeleted, getDiffContext, getArchitectureOverview, verifySuggestion, squeezeOutput } :944-944
1105
- function _readContextFiles(cwd) :10-17
1106
- function readContext(args, cwd) :36-66
1107
- function searchSignatures(args, cwd) :74-100
1108
- function getMap(args, cwd) :108-131
1109
- function createCheckpoint(args, cwd) :143-215
1110
- function getRouting(args, cwd) :224-261
1111
- function explainFile(args, cwd) :269-356
1112
- function listModules(args, cwd) :364-403
1113
- function queryContext(args, cwd) :411-429
1114
- function getImpact(args, cwd) :437-449
1115
- function getLines(args, cwd) :458-506
1116
- function readMemory(args, cwd) :514-549
1117
- function getCalleeSignatures(args, cwd) :558-603
1118
- function _pkgVersion(cwd) :610-613
1119
- function notifyFileCreated(args, cwd) :617-639
1120
- function notifySymbolAdded(args, cwd) :642-662
1121
- function notifyFileDeleted(args, cwd) :665-679
1122
- function _changedFiles(cwd, args) :685-697
1123
- function getDiffContext(args, cwd) :706-777
1124
- function getArchitectureOverview(args, cwd) :786-854
1125
- function verifySuggestion(args, cwd) :864-899
1126
- function squeezeOutput(args, cwd) :909-942
1127
- ```
1128
-
1129
1145
  ### src/mcp/install.js
1130
1146
  ```
1131
1147
  module.exports = { CLIENTS, listClients, installClient, resolveTarget } :142-142
@@ -1138,11 +1154,6 @@ function _installYaml(filePath, scriptPath) :99-117
1138
1154
  function installClient(client, opts = {}) → client, label, path, stat :124-140
1139
1155
  ```
1140
1156
 
1141
- ### src/mcp/tools.js
1142
- ```
1143
- module.exports = { TOOLS } :363-363
1144
- ```
1145
-
1146
1157
  ### src/nudge.js
1147
1158
  ```
1148
1159
  module.exports = { checkStarNudge, readUsage, usagePath, showStarNudge, RUN_THRESHOLD, SUCCESS_THRESHOLD } :92-92
@@ -1200,21 +1211,6 @@ module.exports = { tokenize, STOP_WORDS } :54-54
1200
1211
  function tokenize(text, opts) → string[] :31-52
1201
1212
  ```
1202
1213
 
1203
- ### src/review/pr-evidence.js
1204
- ```
1205
- module.exports = { buildPrEvidence, formatPrEvidenceMarkdown } :140-140
1206
- function buildPrEvidence(changedFiles, cwd, opts = {}) → { scope:string, files:obj :31-77
1207
- function formatPrEvidenceMarkdown(evidence, opts = {}) :82-138
1208
- ```
1209
-
1210
- ### src/review/review-pr.js
1211
- ```
1212
- module.exports = { reviewPr, SECURITY_PATTERNS, GOD_NODE_THRESHOLD, SCOPE_DIR_THRESHOLD } :128-128
1213
- function isTestFile(p) :32-34
1214
- function isSource(p) :35-37
1215
- function reviewPr(changedFiles, cwd, opts = {}) → { findings: object[], bla :48-126
1216
- ```
1217
-
1218
1214
  ### src/routing/classifier.js
1219
1215
  ```
1220
1216
  module.exports = { classify, classifyAll } :102-102
@@ -1412,6 +1408,20 @@ function extractNpmScripts(text) → { name: string, line: num :168-184
1412
1408
  function extractSymbols(text) → { name: string, line: num :192-209
1413
1409
  ```
1414
1410
 
1411
+ ### src/wiki/generate.js
1412
+ ```
1413
+ module.exports = { buildWiki, renderWikiMarkdown } :250-250
1414
+ function _rel(cwd, f) :22-24
1415
+ function _pct(fraction) :26-28
1416
+ function _identity(cwd) :31-37
1417
+ function _modules(index) :40-67
1418
+ function _flow(cwd) :70-97
1419
+ function _conventions(cwd, index) :100-117
1420
+ function _health(cwd) :119-127
1421
+ function buildWiki(cwd, opts = {}) → { data: object, markdown: :137-162
1422
+ function renderWikiMarkdown(data, sigmapVersion) → string :171-248
1423
+ ```
1424
+
1415
1425
  ### src/workspace/detector.js
1416
1426
  ```
1417
1427
  module.exports = { detectWorkspaces, inferPackage, scopeToPackage } :4-4
package/CHANGELOG.md CHANGED
@@ -10,6 +10,24 @@ Format: [Semantic Versioning](https://semver.org/)
10
10
 
11
11
  ---
12
12
 
13
+ ## [8.14.0] — 2026-07-11
14
+
15
+ Minor release — **call-graph support for Java, Go, and Rust** (GR1 language expansion). The method-level call-graph goes from 2 to 5 languages, and every consumer — `--callers`/`--callees`, blast-radius scoring, `review-pr` method-blast findings, `get_method_impact` — inherits them with no further changes.
16
+
17
+ ### Added
18
+ - **Java/Go/Rust call-graph (#471, PR #472):** new def extractors in `src/graph/call-graph.js` — Go `func` + receiver methods (parenthesized return lists handled), Java methods + constructors (generics/`throws` tolerated; control-flow and `new Foo(){}` anonymous classes rejected), Rust `fn` incl. generics + `where` clauses and `impl` methods (bodiless trait declarations skipped). New **lifetime-safe `maskRust`** masker: `'a` lifetimes pass through untouched while char literals and strings are masked, preserving offsets. **Same-package resolution scope:** Go/Java call same-package functions across files with no import statement, so same-directory same-language siblings join the resolution scope (sorted, deterministic). Per North-Star #1, unparseable constructs are skipped — never a parser dep. Surface claims updated to "JS/TS, Python, Java, Go, Rust" in `--help`, the `get_method_impact` description, and the MCP guide.
19
+
20
+ ---
21
+
22
+ ## [8.13.0] — 2026-07-11
23
+
24
+ Minor release — **method-level blast-radius scoring** (GR2, the biggest Phase-2 lever in the master plan §7.4). The D4 call-graph finally has consumers: review findings, the PR Evidence report, and a 20th MCP tool now answer *which functions break*, not just which files.
25
+
26
+ ### Added
27
+ - **Method-level blast-radius scoring (#468, PR #469):** new `src/graph/blast-radius.js` — for each changed file, reverse-BFS the method call-graph and score the change with a documented deterministic formula (`min(100, direct×4 + transitive×1)`; tiers none/low/medium/high/critical). Wired into three consumers: `review-pr` gains a `methodBlast` result field and a `method-blast` finding on high/critical tiers; the **PR Evidence** report gains a per-file `Method blast radius: N function(s) impacted (score X/100, tier)` line with top caller ids; and the new **`get_method_impact`** MCP tool (`symbol`, `direction: callers|callees`, `depth`) exposes per-symbol blast radius to agents — **19 → 20 MCP tools**. Graceful degradation when no call graph resolves; byte-stable output for a fixed tree.
28
+
29
+ ---
30
+
13
31
  ## [8.12.0] — 2026-07-11
14
32
 
15
33
  Minor release — **`sigmap wiki`** (D9, the final unstarted in-boundary item from the master plan §3.5 backlog). With this, every in-boundary initiative D1–D9 has shipped.
package/README.md CHANGED
@@ -122,7 +122,7 @@ Ask → Rank → Context → Validate → Judge → Learn
122
122
 
123
123
  <!--SM:benchmarkBlock-->
124
124
  ```
125
- Benchmark : sigmap-v8.12-main (21 repositories, including R language)
125
+ Benchmark : sigmap-v8.14-main (21 repositories, including R language)
126
126
  Date : 2026-07-11
127
127
 
128
128
  Hit@5 : 87.8% (baseline 13.6% — 6.5× lift)
@@ -222,7 +222,7 @@ Use SigMap with open-source tools and fully self-hosted setups:
222
222
  | **JetBrains** | [Marketplace](https://plugins.jetbrains.com/plugin/31109-sigmap--ai-context-engine/) | [github.com/manojmallick/sigmap-jetbrains](https://github.com/manojmallick/sigmap-jetbrains) | IntelliJ IDEA, WebStorm, PyCharm, GoLand — tool window + actions |
223
223
  | **Neovim** | lazy.nvim / packer / vim-plug | [github.com/manojmallick/sigmap.nvim](https://github.com/manojmallick/sigmap.nvim) | `:SigMap`, `:SigMapQuery` float window, statusline widget |
224
224
 
225
- **MCP server** — 19 on-demand tools for Claude Code and Cursor:
225
+ **MCP server** — 20 on-demand tools for Claude Code and Cursor:
226
226
 
227
227
  ```bash
228
228
  sigmap --mcp
@@ -267,7 +267,7 @@ SigMap treats coding agents as **consumers, not competitors**: it hands them a d
267
267
 
268
268
  | Agent | One-time setup | How it consumes SigMap |
269
269
  |---|---|---|
270
- | **Claude Code** | `sigmap mcp install claude` | 19 MCP tools (`search_signatures`, `get_lines`, `get_diff_context`, `squeeze_output`…) |
270
+ | **Claude Code** | `sigmap mcp install claude` | 20 MCP tools (`search_signatures`, `get_lines`, `get_diff_context`, `squeeze_output`…) |
271
271
  | **Cursor** | `sigmap mcp install cursor` | MCP tools, plus the `cursor` adapter writes `.cursorrules` |
272
272
  | **Cline** | `sigmap mcp install cursor` | Reads `.cursorrules`; same MCP server |
273
273
  | **Continue** | `sigmap mcp install vscode` | MCP tools inside the Continue extension |