sigmap 8.16.1 → 8.18.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 +164 -192
- package/CHANGELOG.md +24 -0
- package/README.md +12 -10
- package/gen-context.js +333 -70
- package/llms-full.txt +6 -6
- package/llms.txt +5 -5
- package/package.json +2 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/src/config/defaults.js +2 -0
- package/src/extractors/csharp.js +17 -5
- package/src/extractors/dart.js +32 -8
- package/src/extractors/go.js +25 -9
- package/src/extractors/java.js +16 -5
- package/src/extractors/kotlin.js +32 -8
- package/src/extractors/php.js +31 -6
- package/src/extractors/rust.js +38 -10
- package/src/extractors/scala.js +18 -6
- package/src/extractors/swift.js +31 -7
- package/src/map/route-table.js +14 -2
- package/src/mcp/handlers.js +4 -1
- package/src/mcp/server.js +1 -1
- package/src/retrieval/bm25.js +4 -1
- package/src/retrieval/enrich-from-maps.js +55 -0
package/AGENTS.md
CHANGED
|
@@ -35,15 +35,16 @@ src/extractors/python_ast.py ← ast
|
|
|
35
35
|
|
|
36
36
|
## changes (last 5 commits — 0 seconds ago)
|
|
37
37
|
```
|
|
38
|
+
src/extractors/csharp.js ~extract ~extractMembers
|
|
39
|
+
src/extractors/dart.js ~extract ~extractMembers
|
|
40
|
+
src/extractors/go.js ~extract ~extractInterfaceMethods
|
|
41
|
+
src/extractors/java.js ~extract ~extractMembers
|
|
42
|
+
src/extractors/kotlin.js ~extract ~extractMembers
|
|
43
|
+
src/extractors/php.js ~extract ~extractMembers
|
|
44
|
+
src/extractors/rust.js ~extract ~extractMethods ~extractReturnType
|
|
45
|
+
src/extractors/scala.js ~extract ~extractMembers
|
|
46
|
+
src/extractors/swift.js ~extract ~extractMembers ~extractArrowType
|
|
38
47
|
src/evidence/pack.js +riskFactorsFor ~parseAnchor ~buildEvidencePack ~formatMarkdown
|
|
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/retrieval/ranker.js ~scoreFile ~rank
|
|
44
|
-
src/graph/blast-radius.js +tierFor +_normRel +_bfs +methodBlastRadius
|
|
45
|
-
src/review/pr-evidence.js ~buildPrEvidence ~formatPrEvidenceMarkdown
|
|
46
|
-
src/review/review-pr.js ~isSource ~reviewPr
|
|
47
48
|
```
|
|
48
49
|
|
|
49
50
|
## packages
|
|
@@ -177,84 +178,94 @@ code-fence ---
|
|
|
177
178
|
|
|
178
179
|
### src/config/defaults.js
|
|
179
180
|
```
|
|
180
|
-
module.exports = { DEFAULTS } :
|
|
181
|
+
module.exports = { DEFAULTS } :165-165
|
|
181
182
|
```
|
|
182
183
|
|
|
183
|
-
### src/
|
|
184
|
+
### src/extractors/csharp.js
|
|
184
185
|
```
|
|
185
|
-
module.exports = {
|
|
186
|
-
function
|
|
187
|
-
function
|
|
188
|
-
function
|
|
189
|
-
function
|
|
190
|
-
function
|
|
191
|
-
function findRelatedTests(relPath, allFiles) → string[] :143-154
|
|
192
|
-
function reasonFor(signals) :157-168
|
|
193
|
-
function sigTokens(sigs) :171-173
|
|
194
|
-
function canonicalize(value) → string :180-182
|
|
195
|
-
function sortKeys(value) :184-192
|
|
196
|
-
function buildEvidencePack(query, cwd, opts = {}) → object :205-281
|
|
197
|
-
function ranked0Empty(query) :284-286
|
|
198
|
-
function formatJSON(pack) :289-291
|
|
199
|
-
function formatMarkdown(pack) :294-324
|
|
186
|
+
module.exports = { extract } :71-71
|
|
187
|
+
function extract(src) → string[] :12-71
|
|
188
|
+
function extractBlock(src, startIndex) :35-44
|
|
189
|
+
function extractMembers(block) :46-59
|
|
190
|
+
function normalizeParams(params) :61-64
|
|
191
|
+
function normalizeType(type) :66-69
|
|
200
192
|
```
|
|
201
193
|
|
|
202
|
-
### src/
|
|
194
|
+
### src/extractors/dart.js
|
|
203
195
|
```
|
|
204
|
-
module.exports = {
|
|
205
|
-
function
|
|
206
|
-
function
|
|
207
|
-
function
|
|
208
|
-
function
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
function
|
|
215
|
-
function
|
|
216
|
-
function
|
|
217
|
-
function
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
function
|
|
224
|
-
function
|
|
225
|
-
function
|
|
226
|
-
function
|
|
227
|
-
function
|
|
228
|
-
|
|
229
|
-
|
|
196
|
+
module.exports = { extract } :84-84
|
|
197
|
+
function extract(src) → string[] :12-84
|
|
198
|
+
function extractBlock(src, startIndex) :54-63
|
|
199
|
+
function extractMembers(block) :65-77
|
|
200
|
+
function normalizeParams(params) :79-81
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### src/extractors/go.js
|
|
204
|
+
```
|
|
205
|
+
module.exports = { extract } :81-81
|
|
206
|
+
function extract(src) → string[] :12-81
|
|
207
|
+
function extractBlock(src, startIndex) :51-60
|
|
208
|
+
function extractInterfaceMethods(block) :62-74
|
|
209
|
+
function normalizeParams(params) :76-79
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### src/extractors/java.js
|
|
213
|
+
```
|
|
214
|
+
module.exports = { extract } :71-71
|
|
215
|
+
function extract(src) → string[] :12-71
|
|
216
|
+
function extractBlock(src, startIndex) :34-44
|
|
217
|
+
function extractMembers(block) :46-59
|
|
218
|
+
function normalizeParams(params) :61-64
|
|
219
|
+
function normalizeType(type) :66-69
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### src/extractors/kotlin.js
|
|
223
|
+
```
|
|
224
|
+
module.exports = { extract } :90-90
|
|
225
|
+
function extract(src) → string[] :12-90
|
|
226
|
+
function extractBlock(src, startIndex) :54-63
|
|
227
|
+
function extractMembers(block) :65-90
|
|
228
|
+
function normalizeParams(params) :81-88
|
|
230
229
|
```
|
|
231
230
|
|
|
232
|
-
### src/
|
|
233
|
-
```
|
|
234
|
-
module.exports = {
|
|
235
|
-
function
|
|
236
|
-
function
|
|
237
|
-
function
|
|
238
|
-
function
|
|
239
|
-
function
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
function
|
|
246
|
-
function
|
|
247
|
-
function
|
|
248
|
-
function
|
|
249
|
-
function
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
function
|
|
256
|
-
function
|
|
257
|
-
function
|
|
231
|
+
### src/extractors/php.js
|
|
232
|
+
```
|
|
233
|
+
module.exports = { extract } :96-96
|
|
234
|
+
function extract(src) → string[] :12-96
|
|
235
|
+
function extractBlock(src, startIndex) :58-67
|
|
236
|
+
function extractMembers(block) :69-96
|
|
237
|
+
function normalizeParams(params) :86-89
|
|
238
|
+
function normalizeType(type) :91-94
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### src/extractors/rust.js
|
|
242
|
+
```
|
|
243
|
+
module.exports = { extract } :110-110
|
|
244
|
+
function extract(src) → string[] :12-110
|
|
245
|
+
function extractBlock(src, startIndex) :72-81
|
|
246
|
+
function extractMethods(block) :83-110
|
|
247
|
+
function normalizeParams(params) :97-100
|
|
248
|
+
function extractReturnType(afterParen) :102-110
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### src/extractors/scala.js
|
|
252
|
+
```
|
|
253
|
+
module.exports = { extract } :88-88
|
|
254
|
+
function extract(src) → string[] :12-88
|
|
255
|
+
function extractBlock(src, startIndex) :47-56
|
|
256
|
+
function extractMembers(block) :58-88
|
|
257
|
+
function normalizeParams(params) :74-81
|
|
258
|
+
function normalizeType(type) :83-86
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### src/extractors/swift.js
|
|
262
|
+
```
|
|
263
|
+
module.exports = { extract } :97-97
|
|
264
|
+
function extract(src) → string[] :12-97
|
|
265
|
+
function extractBlock(src, startIndex) :54-63
|
|
266
|
+
function extractMembers(block) :65-97
|
|
267
|
+
function normalizeParams(params) :80-87
|
|
268
|
+
function extractArrowType(str) :89-97
|
|
258
269
|
```
|
|
259
270
|
|
|
260
271
|
### src/mcp/server.js
|
|
@@ -266,27 +277,10 @@ function dispatch(msg, cwd) :41-108
|
|
|
266
277
|
function start(cwd) :113-139
|
|
267
278
|
```
|
|
268
279
|
|
|
269
|
-
### src/
|
|
270
|
-
```
|
|
271
|
-
module.exports = { TOOLS } :392-392
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### src/retrieval/ranker.js
|
|
280
|
+
### src/retrieval/enrich-from-maps.js
|
|
275
281
|
```
|
|
276
|
-
module.exports = {
|
|
277
|
-
function
|
|
278
|
-
function _computeHubs(graph) :73-84
|
|
279
|
-
function _isHub(filePath) :87-91
|
|
280
|
-
function scoreFile(filePath, sigs, queryTokens, weights) → { score: number, signals: :102-159
|
|
281
|
-
function rank(query, sigIndex, opts) → { file: string, score: nu :177-302
|
|
282
|
-
function _parseContextFile(contextPath) → Map<string, string[]> :372-404
|
|
283
|
-
function _mergeSigIndex(target, source) :407-415
|
|
284
|
-
function _buildSigIndexFromCache(cwd) → Map<string, string[]> :422-442
|
|
285
|
-
function _enrichSigIndexFromStrategy(cwd, index) → Map<string, string[]> :450-456
|
|
286
|
-
function buildSigIndex(cwd, opts) → Map<string, string[]> :473-506
|
|
287
|
-
function formatRankTable(results, query) → string :515-551
|
|
288
|
-
function formatRankJSON(results, query) → object :560-575
|
|
289
|
-
function detectIntent(query) :590-596
|
|
282
|
+
module.exports = { enrichWithSurfaces } :55-55
|
|
283
|
+
function enrichWithSurfaces(index, cwd) → number :25-53
|
|
290
284
|
```
|
|
291
285
|
|
|
292
286
|
### src/analysis/coverage-score.js
|
|
@@ -539,6 +533,25 @@ function scoreUsefulness(taskResult, rankingScore) :11-38
|
|
|
539
533
|
function computeUsefulnessStats(taskResults) :40-66
|
|
540
534
|
```
|
|
541
535
|
|
|
536
|
+
### src/evidence/pack.js
|
|
537
|
+
```
|
|
538
|
+
module.exports = { buildEvidencePack, formatJSON, formatMarkdown, parseAnchor, riskLabelFor, riskFactorsFor, findRelatedTests, SCHEMA_VERSION, SCHEMA_URL, TEST_DISCOVERY } :326-337
|
|
539
|
+
function parseAnchor(sig) → { symbol: string, start: :64-72
|
|
540
|
+
function riskLabelFor(relPath) → 'generated'|'test'|'migra :84-86
|
|
541
|
+
function riskFactorsFor(relPath) → string[] :96-108
|
|
542
|
+
function stemOf(relPath) :111-114
|
|
543
|
+
function testTargetStem(relPath) → string :126-132
|
|
544
|
+
function findRelatedTests(relPath, allFiles) → string[] :143-154
|
|
545
|
+
function reasonFor(signals) :157-168
|
|
546
|
+
function sigTokens(sigs) :171-173
|
|
547
|
+
function canonicalize(value) → string :180-182
|
|
548
|
+
function sortKeys(value) :184-192
|
|
549
|
+
function buildEvidencePack(query, cwd, opts = {}) → object :205-281
|
|
550
|
+
function ranked0Empty(query) :284-286
|
|
551
|
+
function formatJSON(pack) :289-291
|
|
552
|
+
function formatMarkdown(pack) :294-324
|
|
553
|
+
```
|
|
554
|
+
|
|
542
555
|
### src/extractors/coverage.js
|
|
543
556
|
```
|
|
544
557
|
module.exports = { buildTestIndex, isTested } :79-79
|
|
@@ -557,31 +570,12 @@ function normalizeParams(params) :59-62
|
|
|
557
570
|
function normalizeType(type) :64-67
|
|
558
571
|
```
|
|
559
572
|
|
|
560
|
-
### src/extractors/csharp.js
|
|
561
|
-
```
|
|
562
|
-
module.exports = { extract } :59-59
|
|
563
|
-
function extract(src) → string[] :8-59
|
|
564
|
-
function extractBlock(src, startIndex) :27-36
|
|
565
|
-
function extractMembers(block) :38-47
|
|
566
|
-
function normalizeParams(params) :49-52
|
|
567
|
-
function normalizeType(type) :54-57
|
|
568
|
-
```
|
|
569
|
-
|
|
570
573
|
### src/extractors/css.js
|
|
571
574
|
```
|
|
572
575
|
module.exports = { extract } :69-69
|
|
573
576
|
function extract(src) → string[] :8-17
|
|
574
577
|
```
|
|
575
578
|
|
|
576
|
-
### src/extractors/dart.js
|
|
577
|
-
```
|
|
578
|
-
module.exports = { extract } :60-60
|
|
579
|
-
function extract(src) → string[] :8-60
|
|
580
|
-
function extractBlock(src, startIndex) :34-43
|
|
581
|
-
function extractMembers(block) :45-53
|
|
582
|
-
function normalizeParams(params) :55-57
|
|
583
|
-
```
|
|
584
|
-
|
|
585
579
|
### src/extractors/deps.js
|
|
586
580
|
```
|
|
587
581
|
module.exports = { extractPythonDeps, extractTSDeps, extractRDeps, buildReverseDepMap } :110-110
|
|
@@ -618,15 +612,6 @@ module.exports = { extract } :2-2
|
|
|
618
612
|
function extract(src) :14-26
|
|
619
613
|
```
|
|
620
614
|
|
|
621
|
-
### src/extractors/go.js
|
|
622
|
-
```
|
|
623
|
-
module.exports = { extract } :65-65
|
|
624
|
-
function extract(src) → string[] :8-65
|
|
625
|
-
function extractBlock(src, startIndex) :39-48
|
|
626
|
-
function extractInterfaceMethods(block) :50-58
|
|
627
|
-
function normalizeParams(params) :60-63
|
|
628
|
-
```
|
|
629
|
-
|
|
630
615
|
### src/extractors/graphql.js
|
|
631
616
|
```
|
|
632
617
|
module.exports = { extract } :66-66
|
|
@@ -639,16 +624,6 @@ module.exports = { extract } :39-39
|
|
|
639
624
|
function extract(src) → string[] :9-37
|
|
640
625
|
```
|
|
641
626
|
|
|
642
|
-
### src/extractors/java.js
|
|
643
|
-
```
|
|
644
|
-
module.exports = { extract } :60-60
|
|
645
|
-
function extract(src) → string[] :8-60
|
|
646
|
-
function extractBlock(src, startIndex) :27-37
|
|
647
|
-
function extractMembers(block) :39-48
|
|
648
|
-
function normalizeParams(params) :50-53
|
|
649
|
-
function normalizeType(type) :55-58
|
|
650
|
-
```
|
|
651
|
-
|
|
652
627
|
### src/extractors/javascript.js
|
|
653
628
|
```
|
|
654
629
|
module.exports = { extract } :147-147
|
|
@@ -661,15 +636,6 @@ function formatReturnHint(type) :138-140
|
|
|
661
636
|
function normalizeParams(params) :142-145
|
|
662
637
|
```
|
|
663
638
|
|
|
664
|
-
### src/extractors/kotlin.js
|
|
665
|
-
```
|
|
666
|
-
module.exports = { extract } :66-66
|
|
667
|
-
function extract(src) → string[] :8-66
|
|
668
|
-
function extractBlock(src, startIndex) :34-43
|
|
669
|
-
function extractMembers(block) :45-66
|
|
670
|
-
function normalizeParams(params) :57-64
|
|
671
|
-
```
|
|
672
|
-
|
|
673
639
|
### src/extractors/line-anchor.js
|
|
674
640
|
```
|
|
675
641
|
module.exports = { lineAt, anchor, withAnchor } :52-52
|
|
@@ -690,16 +656,6 @@ module.exports = { extract } :135-135
|
|
|
690
656
|
function extract(src) → string[] :10-133
|
|
691
657
|
```
|
|
692
658
|
|
|
693
|
-
### src/extractors/php.js
|
|
694
|
-
```
|
|
695
|
-
module.exports = { extract } :71-71
|
|
696
|
-
function extract(src) → string[] :8-71
|
|
697
|
-
function extractBlock(src, startIndex) :37-46
|
|
698
|
-
function extractMembers(block) :48-71
|
|
699
|
-
function normalizeParams(params) :61-64
|
|
700
|
-
function normalizeType(type) :66-69
|
|
701
|
-
```
|
|
702
|
-
|
|
703
659
|
### src/extractors/prdiff.js
|
|
704
660
|
```
|
|
705
661
|
module.exports = { diffSignatures, extractName } :70-70
|
|
@@ -781,26 +737,6 @@ function normalizeParams(params) :40-43
|
|
|
781
737
|
function extractReturnHint(stripped, index) :45-52
|
|
782
738
|
```
|
|
783
739
|
|
|
784
|
-
### src/extractors/rust.js
|
|
785
|
-
```
|
|
786
|
-
module.exports = { extract } :82-82
|
|
787
|
-
function extract(src) → string[] :8-82
|
|
788
|
-
function extractBlock(src, startIndex) :48-57
|
|
789
|
-
function extractMethods(block) :59-82
|
|
790
|
-
function normalizeParams(params) :69-72
|
|
791
|
-
function extractReturnType(afterParen) :74-82
|
|
792
|
-
```
|
|
793
|
-
|
|
794
|
-
### src/extractors/scala.js
|
|
795
|
-
```
|
|
796
|
-
module.exports = { extract } :76-76
|
|
797
|
-
function extract(src) → string[] :8-76
|
|
798
|
-
function extractBlock(src, startIndex) :39-48
|
|
799
|
-
function extractMembers(block) :50-76
|
|
800
|
-
function normalizeParams(params) :62-69
|
|
801
|
-
function normalizeType(type) :71-74
|
|
802
|
-
```
|
|
803
|
-
|
|
804
740
|
### src/extractors/shell.js
|
|
805
741
|
```
|
|
806
742
|
module.exports = { extract } :43-43
|
|
@@ -823,16 +759,6 @@ function normalizeParams(params) :48-51
|
|
|
823
759
|
function normalizeType(type) :53-56
|
|
824
760
|
```
|
|
825
761
|
|
|
826
|
-
### src/extractors/swift.js
|
|
827
|
-
```
|
|
828
|
-
module.exports = { extract } :73-73
|
|
829
|
-
function extract(src) → string[] :8-73
|
|
830
|
-
function extractBlock(src, startIndex) :34-43
|
|
831
|
-
function extractMembers(block) :45-73
|
|
832
|
-
function normalizeParams(params) :56-63
|
|
833
|
-
function extractArrowType(str) :65-73
|
|
834
|
-
```
|
|
835
|
-
|
|
836
762
|
### src/extractors/terraform.js
|
|
837
763
|
```
|
|
838
764
|
module.exports = { extract } :74-74
|
|
@@ -1033,6 +959,36 @@ function build(files, cwd, ctx) → { forward: Map<string,str :387-426
|
|
|
1033
959
|
function buildFromCwd(cwd, opts) → { forward: Map<string,str :438-492
|
|
1034
960
|
```
|
|
1035
961
|
|
|
962
|
+
### src/graph/call-graph.js
|
|
963
|
+
```
|
|
964
|
+
module.exports = { buildCallGraph, buildCallFileGraph, methodImpact, methodCallees, formatCallGraph, formatCallGraphJSON, extractDefs, maskJs, maskPy, maskRust } :563-567
|
|
965
|
+
function normalizePath(p) :41-41
|
|
966
|
+
function toRel(cwd, f) :42-42
|
|
967
|
+
function symId(cwd, absFile, name) :43-43
|
|
968
|
+
function maskJs(src) :49-65
|
|
969
|
+
function maskRust(src) :70-91
|
|
970
|
+
function maskPy(src) :93-110
|
|
971
|
+
function matchDelim(masked, openIdx, open, close) :113-120
|
|
972
|
+
function lineAt(src, idx) :122-127
|
|
973
|
+
function jsDefs(masked) :132-237
|
|
974
|
+
function pyDefs(masked) :200-220
|
|
975
|
+
function goDefs(masked) :224-344
|
|
976
|
+
function javaDefs(masked) :250-367
|
|
977
|
+
function rustDefs(masked) :278-401
|
|
978
|
+
function maskFor(filePath, src) :300-305
|
|
979
|
+
function extractDefs(filePath, src) :307-315
|
|
980
|
+
function callsInRange(masked, start, end) :318-330
|
|
981
|
+
function _walk(dir, excludeSet, out, depth) :334-347
|
|
982
|
+
function buildCallGraph(cwd, opts = {}) → { * forward: Map<string,s :363-446
|
|
983
|
+
function buildCallFileGraph(cwd, opts = {}) → { forward: Map<string,str :459-482
|
|
984
|
+
function _resolveSymbol(symbol, defs) :485-490
|
|
985
|
+
function _bfs(seedIds, graph, maxDepth) :493-506
|
|
986
|
+
function methodImpact(symbol, cwd, opts = {}) → { symbol:string, resolved :516-522
|
|
987
|
+
function methodCallees(symbol, cwd, opts = {}) → { symbol:string, resolved :528-534
|
|
988
|
+
function formatCallGraph(result, kind) :537-549
|
|
989
|
+
… +1 more signatures
|
|
990
|
+
```
|
|
991
|
+
|
|
1036
992
|
### src/graph/impact.js
|
|
1037
993
|
```
|
|
1038
994
|
module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON } :240-240
|
|
@@ -1140,13 +1096,6 @@ function walk(dir, cwd, depth, out) :31-62
|
|
|
1140
1096
|
function analyze(files, cwd) :64-82
|
|
1141
1097
|
```
|
|
1142
1098
|
|
|
1143
|
-
### src/map/route-table.js
|
|
1144
|
-
```
|
|
1145
|
-
module.exports = { analyze } :127-127
|
|
1146
|
-
function shouldSkipFile(rel) :18-21
|
|
1147
|
-
function analyze(files, cwd) :23-125
|
|
1148
|
-
```
|
|
1149
|
-
|
|
1150
1099
|
### src/mcp/install.js
|
|
1151
1100
|
```
|
|
1152
1101
|
module.exports = { CLIENTS, listClients, installClient, resolveTarget } :142-142
|
|
@@ -1159,6 +1108,11 @@ function _installYaml(filePath, scriptPath) :99-117
|
|
|
1159
1108
|
function installClient(client, opts = {}) → client, label, path, stat :124-140
|
|
1160
1109
|
```
|
|
1161
1110
|
|
|
1111
|
+
### src/mcp/tools.js
|
|
1112
|
+
```
|
|
1113
|
+
module.exports = { TOOLS } :392-392
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1162
1116
|
### src/nudge.js
|
|
1163
1117
|
```
|
|
1164
1118
|
module.exports = { checkStarNudge, readUsage, usagePath, showStarNudge, RUN_THRESHOLD, SUCCESS_THRESHOLD } :92-92
|
|
@@ -1192,6 +1146,24 @@ function expandQuery(qToks) → Map<string, number> :132-141
|
|
|
1192
1146
|
function bm25rank(query, candidates) → Array<object & { score: n :154-193
|
|
1193
1147
|
```
|
|
1194
1148
|
|
|
1149
|
+
### src/retrieval/ranker.js
|
|
1150
|
+
```
|
|
1151
|
+
module.exports = { rank, buildSigIndex, scoreFile, formatRankTable, formatRankJSON, DEFAULT_WEIGHTS, GRAPH_BOOST_AMOUNTS, detectIntent } :598-598
|
|
1152
|
+
function _computePenalty(filePath) :63-70
|
|
1153
|
+
function _computeHubs(graph) :73-84
|
|
1154
|
+
function _isHub(filePath) :87-91
|
|
1155
|
+
function scoreFile(filePath, sigs, queryTokens, weights) → { score: number, signals: :102-159
|
|
1156
|
+
function rank(query, sigIndex, opts) → { file: string, score: nu :177-302
|
|
1157
|
+
function _parseContextFile(contextPath) → Map<string, string[]> :372-404
|
|
1158
|
+
function _mergeSigIndex(target, source) :407-415
|
|
1159
|
+
function _buildSigIndexFromCache(cwd) → Map<string, string[]> :422-442
|
|
1160
|
+
function _enrichSigIndexFromStrategy(cwd, index) → Map<string, string[]> :450-456
|
|
1161
|
+
function buildSigIndex(cwd, opts) → Map<string, string[]> :473-506
|
|
1162
|
+
function formatRankTable(results, query) → string :515-551
|
|
1163
|
+
function formatRankJSON(results, query) → object :560-575
|
|
1164
|
+
function detectIntent(query) :590-596
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1195
1167
|
### src/retrieval/tokenizer.js
|
|
1196
1168
|
```
|
|
1197
1169
|
module.exports = { tokenize, STOP_WORDS } :54-54
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,30 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [8.18.0] — 2026-07-12
|
|
14
|
+
|
|
15
|
+
Minor release — **the §7.4 Phase-2 closer**: with these three changes, every quality-ceiling row in the master plan's scorecard is done or measure-gated-closed.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Line anchors for Kotlin, Swift, PHP, Scala, and Dart (#486, PR #487):** the v8.17 recipe applied to the remaining five brace languages — newline-preserving comment strips, brace-matched `:start-end` ranges on types, `:n-n` members, body-scan ranging for top-level functions (expression bodies and PSR next-line braces degrade to single-line anchors). All five fixture files anchor 100%; **9 brace languages** now carry Surgical Context anchors.
|
|
19
|
+
- **Route surface-enrichment, opt-in and measure-gated (#488, PR #489):** `collectRoutes` split out of the route-table analyzer (markdown unchanged); `enrichWithSurfaces` appends deterministic `route METHOD /path` pseudo-signatures to the defining file's rankable index entry (sorted, deduped, copy-on-write, idempotent). Config `retrieval.surfaceEnrichment` (default `false`) wired into `ask`/`--query`/`query_context`. **Measured** by the new `npm run benchmark:surface-enrichment` A/B: 280 route pseudo-sigs across 18 repos, 90 tasks — **delta +0** (the corpus never asks route-worded questions), so the default stays off per the gate; the fixture test proves the value case directly — a route-worded query retrieves the controller *only* when enriched.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- **Docs — the agent's live loop (#490, PR #491):** new "Your agent's live loop" section in the MCP guide framing `query_context` → `get_callee_signatures` → `get_lines` → `verify_suggestion` → `get_method_impact` as what an agentic loop *calls for grounding* (grep finds; SigMap grounds); README gains the framing and the previously missing `get_method_impact` in its tool list.
|
|
23
|
+
- **Ranking is now anchor-invariant:** BM25 strips `:start-end` line anchors before tokenizing, so adding anchors to an extractor never shifts length normalization — this moved one borderline task from partial to **rank-1** (correct 61→62/90, task-success proxy 67.8→68.9%).
|
|
24
|
+
- **Headline metric shift, documented honestly:** anchors on the five new corpus languages consume real context budget, and one already-borderline Swift task (`vapor-t002`, a route-worded query) fell out of top-5 — **hit@5 87.8% → 86.7%** (stable across repeated runs, root-caused to the vapor repo). Rank-1 accuracy and task success went **up**; the trade buys Surgical Context anchors on 9 languages.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## [8.17.0] — 2026-07-12
|
|
29
|
+
|
|
30
|
+
Minor release — **line anchors for Java, Go, Rust, and C#** (§7.4 Lang ceiling, the roadmap's long-named "anchors for the remaining extractors" item).
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- **Extractor line anchors for Java/Go/Rust/C# (#483, PR #484):** signatures from these languages now carry `:start-end` anchors — types/functions with bodies get real brace-matched ranges, single-line members get `:n-n`, Rust bodyless items (unit structs, trait declarations) get single-line anchors. Prerequisite fix folded in: the four extractors' comment strips are now **newline-preserving** (block comments previously collapsed outright, making true line numbers impossible — regression-tested with a multi-line license header above declarations). Downstream, verified: Evidence Pack `anchorCoverage` goes **0 → 1.0** on Go/Java fixtures with populated `sourceLines`, and `get_lines` (Surgical Context) works on all four languages. Expected extractor fixtures regenerated; `parseAnchor` round-trips every emitted anchor.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
13
37
|
## [8.16.1] — 2026-07-12
|
|
14
38
|
|
|
15
39
|
Patch release — **benchmark hygiene**; the published package is unchanged (scripts + tests only).
|
package/README.md
CHANGED
|
@@ -59,9 +59,9 @@ That map is exactly what agentic grep is worst at: reproducible, auditable conte
|
|
|
59
59
|
|
|
60
60
|
**Proof it pays off** (full benchmark below):
|
|
61
61
|
<!--SM:whyMetrics-->
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **
|
|
62
|
+
- **86.7% hit@5** — right file found in top 5 results (vs 13.6% baseline)
|
|
63
|
+
- **96.9% token reduction** — average across 21 real repos
|
|
64
|
+
- **68.9% task success rate** — up from 10% without context
|
|
65
65
|
- **1.44 prompts per task** — down from 2.84 (49.2% fewer retries)
|
|
66
66
|
<!--/SM:whyMetrics-->
|
|
67
67
|
- **<!--SM:languages-->33<!--/SM:languages--> languages supported** — TypeScript, Python, Go, Rust, Java, R, and more
|
|
@@ -98,7 +98,7 @@ sigmap verify answer.md --report # standalone red/amber/green HTML report
|
|
|
98
98
|
| Without SigMap | With SigMap |
|
|
99
99
|
|---|---|
|
|
100
100
|
| ❌ Non-reproducible agent guesses | ✅ Deterministic map — same input, same output, every time |
|
|
101
|
-
| ❌ "Trust me" AI answers | ✅ Grounded — right file in context <!--SM:hitWhole-->
|
|
101
|
+
| ❌ "Trust me" AI answers | ✅ Grounded — right file in context <!--SM:hitWhole-->87%<!--/SM:hitWhole--> of the time, every symbol on a real line anchor |
|
|
102
102
|
| ❌ Embeddings / vector DB required | ✅ Zero deps, no infra, fully offline |
|
|
103
103
|
|
|
104
104
|
---
|
|
@@ -122,13 +122,13 @@ Ask → Rank → Context → Validate → Judge → Learn
|
|
|
122
122
|
|
|
123
123
|
<!--SM:benchmarkBlock-->
|
|
124
124
|
```
|
|
125
|
-
Benchmark : sigmap-v8.
|
|
126
|
-
Date : 2026-07-
|
|
125
|
+
Benchmark : sigmap-v8.18-main (21 repositories, including R language)
|
|
126
|
+
Date : 2026-07-12
|
|
127
127
|
|
|
128
|
-
Hit@5 :
|
|
129
|
-
Token reduction:
|
|
128
|
+
Hit@5 : 86.7% (baseline 13.6% — 6.4× lift)
|
|
129
|
+
Token reduction: 96.9% (across 21 repos)
|
|
130
130
|
Prompt reduction : 49.2% (2.84 → 1.44 prompts per task)
|
|
131
|
-
Task success :
|
|
131
|
+
Task success : 68.9% (baseline 10%)
|
|
132
132
|
Repos tested : 21 (JavaScript, Python, Go, Rust, Java, R, C++, C#, Dart, Swift, Ruby, PHP, Scala, Kotlin, and more)
|
|
133
133
|
```
|
|
134
134
|
<!--/SM:benchmarkBlock-->
|
|
@@ -228,7 +228,9 @@ Use SigMap with open-source tools and fully self-hosted setups:
|
|
|
228
228
|
sigmap --mcp
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
Tools: `read_context`, `search_signatures`, `get_map`, `create_checkpoint`, `get_routing`, `explain_file`, `list_modules`, `query_context`, `get_impact`, `get_lines`, `read_memory`, `get_callee_signatures`, `get_diff_context` (changed files + signatures + blast radius), `get_architecture_overview` (modules, hub files, cycles), `verify_suggestion` (ground AI code against repo + installed libraries), `squeeze_output` (compress noisy tool/log/JSON output mid-session), plus the live-index notifications `sigmap_notify_file_created`, `sigmap_notify_symbol_added`, and `sigmap_notify_file_deleted`. Full reference: [llms-full.txt](llms-full.txt).
|
|
231
|
+
Tools: `read_context`, `search_signatures`, `get_map`, `create_checkpoint`, `get_routing`, `explain_file`, `list_modules`, `query_context`, `get_method_impact` (per-symbol blast radius), `get_impact`, `get_lines`, `read_memory`, `get_callee_signatures`, `get_diff_context` (changed files + signatures + blast radius), `get_architecture_overview` (modules, hub files, cycles), `verify_suggestion` (ground AI code against repo + installed libraries), `squeeze_output` (compress noisy tool/log/JSON output mid-session), plus the live-index notifications `sigmap_notify_file_created`, `sigmap_notify_symbol_added`, and `sigmap_notify_file_deleted`. Full reference: [llms-full.txt](llms-full.txt).
|
|
232
|
+
|
|
233
|
+
SigMap doesn't compete with your agent's live search — it's what the live loop **calls for grounding**: grep finds the file; `query_context` → `get_callee_signatures` → `get_lines` → `verify_suggestion` → `get_method_impact` prove the symbols, lines, calls, and blast radius — deterministically. See [the agent live-loop guide](https://sigmap.io/guide/mcp#your-agents-live-loop).
|
|
232
234
|
|
|
233
235
|
---
|
|
234
236
|
|