sigmap 8.17.0 → 8.19.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
@@ -33,16 +33,18 @@ Always run `sigmap ask` (or `sigmap --query`) before searching for files relevan
33
33
  src/extractors/python_ast.py ← ast
34
34
  ```
35
35
 
36
- ## changes (last 5 commits — 1 second ago)
36
+ ## changes (last 5 commits — 0 seconds ago)
37
37
  ```
38
38
  src/extractors/csharp.js ~extract ~extractMembers
39
+ src/extractors/dart.js ~extract ~extractMembers
39
40
  src/extractors/go.js ~extract ~extractInterfaceMethods
40
41
  src/extractors/java.js ~extract ~extractMembers
42
+ src/extractors/kotlin.js ~extract ~extractMembers
43
+ src/extractors/php.js ~extract ~extractMembers
41
44
  src/extractors/rust.js ~extract ~extractMethods ~extractReturnType
45
+ src/extractors/scala.js ~extract ~extractMembers
46
+ src/extractors/swift.js ~extract ~extractMembers ~extractArrowType
42
47
  src/evidence/pack.js +riskFactorsFor ~parseAnchor ~buildEvidencePack ~formatMarkdown
43
- src/graph/call-graph.js +buildCallFileGraph ~buildCallGraph ~formatCallGraphJSON ~_resolveSymbol
44
- src/mcp/handlers.js ~queryContext
45
- src/retrieval/ranker.js ~scoreFile ~rank
46
48
  ```
47
49
 
48
50
  ## packages
@@ -174,6 +176,11 @@ code-fence ---
174
176
 
175
177
  ## src
176
178
 
179
+ ### src/config/defaults.js
180
+ ```
181
+ module.exports = { DEFAULTS } :165-165
182
+ ```
183
+
177
184
  ### src/extractors/csharp.js
178
185
  ```
179
186
  module.exports = { extract } :71-71
@@ -184,6 +191,15 @@ function normalizeParams(params) :61-64
184
191
  function normalizeType(type) :66-69
185
192
  ```
186
193
 
194
+ ### src/extractors/dart.js
195
+ ```
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
+
187
203
  ### src/extractors/go.js
188
204
  ```
189
205
  module.exports = { extract } :81-81
@@ -203,6 +219,25 @@ function normalizeParams(params) :61-64
203
219
  function normalizeType(type) :66-69
204
220
  ```
205
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
229
+ ```
230
+
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
+
206
241
  ### src/extractors/rust.js
207
242
  ```
208
243
  module.exports = { extract } :110-110
@@ -213,6 +248,26 @@ function normalizeParams(params) :97-100
213
248
  function extractReturnType(afterParen) :102-110
214
249
  ```
215
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
269
+ ```
270
+
216
271
  ### src/mcp/server.js
217
272
  ```
218
273
  module.exports = { start } :141-141
@@ -222,6 +277,12 @@ function dispatch(msg, cwd) :41-108
222
277
  function start(cwd) :113-139
223
278
  ```
224
279
 
280
+ ### src/retrieval/enrich-from-maps.js
281
+ ```
282
+ module.exports = { enrichWithSurfaces } :55-55
283
+ function enrichWithSurfaces(index, cwd) → number :25-53
284
+ ```
285
+
225
286
  ### src/analysis/coverage-score.js
226
287
  ```
227
288
  module.exports = { coverageScore, CODE_EXTS } :105-105
@@ -259,11 +320,6 @@ function getChangedFiles(files, cache) → { changed: string[], unch :71-88
259
320
  function updateCacheEntries(cache, extracted) :96-103
260
321
  ```
261
322
 
262
- ### src/config/defaults.js
263
- ```
264
- module.exports = { DEFAULTS } :163-163
265
- ```
266
-
267
323
  ### src/config/loader.js
268
324
  ```
269
325
  module.exports = { loadConfig, loadBaseConfig } :313-313
@@ -520,15 +576,6 @@ module.exports = { extract } :69-69
520
576
  function extract(src) → string[] :8-17
521
577
  ```
522
578
 
523
- ### src/extractors/dart.js
524
- ```
525
- module.exports = { extract } :60-60
526
- function extract(src) → string[] :8-60
527
- function extractBlock(src, startIndex) :34-43
528
- function extractMembers(block) :45-53
529
- function normalizeParams(params) :55-57
530
- ```
531
-
532
579
  ### src/extractors/deps.js
533
580
  ```
534
581
  module.exports = { extractPythonDeps, extractTSDeps, extractRDeps, buildReverseDepMap } :110-110
@@ -589,15 +636,6 @@ function formatReturnHint(type) :138-140
589
636
  function normalizeParams(params) :142-145
590
637
  ```
591
638
 
592
- ### src/extractors/kotlin.js
593
- ```
594
- module.exports = { extract } :66-66
595
- function extract(src) → string[] :8-66
596
- function extractBlock(src, startIndex) :34-43
597
- function extractMembers(block) :45-66
598
- function normalizeParams(params) :57-64
599
- ```
600
-
601
639
  ### src/extractors/line-anchor.js
602
640
  ```
603
641
  module.exports = { lineAt, anchor, withAnchor } :52-52
@@ -618,16 +656,6 @@ module.exports = { extract } :135-135
618
656
  function extract(src) → string[] :10-133
619
657
  ```
620
658
 
621
- ### src/extractors/php.js
622
- ```
623
- module.exports = { extract } :71-71
624
- function extract(src) → string[] :8-71
625
- function extractBlock(src, startIndex) :37-46
626
- function extractMembers(block) :48-71
627
- function normalizeParams(params) :61-64
628
- function normalizeType(type) :66-69
629
- ```
630
-
631
659
  ### src/extractors/prdiff.js
632
660
  ```
633
661
  module.exports = { diffSignatures, extractName } :70-70
@@ -709,16 +737,6 @@ function normalizeParams(params) :40-43
709
737
  function extractReturnHint(stripped, index) :45-52
710
738
  ```
711
739
 
712
- ### src/extractors/scala.js
713
- ```
714
- module.exports = { extract } :76-76
715
- function extract(src) → string[] :8-76
716
- function extractBlock(src, startIndex) :39-48
717
- function extractMembers(block) :50-76
718
- function normalizeParams(params) :62-69
719
- function normalizeType(type) :71-74
720
- ```
721
-
722
740
  ### src/extractors/shell.js
723
741
  ```
724
742
  module.exports = { extract } :43-43
@@ -741,16 +759,6 @@ function normalizeParams(params) :48-51
741
759
  function normalizeType(type) :53-56
742
760
  ```
743
761
 
744
- ### src/extractors/swift.js
745
- ```
746
- module.exports = { extract } :73-73
747
- function extract(src) → string[] :8-73
748
- function extractBlock(src, startIndex) :34-43
749
- function extractMembers(block) :45-73
750
- function normalizeParams(params) :56-63
751
- function extractArrowType(str) :65-73
752
- ```
753
-
754
762
  ### src/extractors/terraform.js
755
763
  ```
756
764
  module.exports = { extract } :74-74
@@ -1088,41 +1096,6 @@ function walk(dir, cwd, depth, out) :31-62
1088
1096
  function analyze(files, cwd) :64-82
1089
1097
  ```
1090
1098
 
1091
- ### src/map/route-table.js
1092
- ```
1093
- module.exports = { analyze } :127-127
1094
- function shouldSkipFile(rel) :18-21
1095
- function analyze(files, cwd) :23-125
1096
- ```
1097
-
1098
- ### src/mcp/handlers.js
1099
- ```
1100
- module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getMethodImpact, getImpact, getLines, readMemory, getCalleeSignatures, notifyFileCreated, notifySymbolAdded, notifyFileDeleted, getDiffContext, getArchitectureOverview, verifySuggestion, squeezeOutput } :975-975
1101
- function _readContextFiles(cwd) :10-17
1102
- function readContext(args, cwd) :36-66
1103
- function searchSignatures(args, cwd) :74-100
1104
- function getMap(args, cwd) :108-131
1105
- function createCheckpoint(args, cwd) :143-215
1106
- function getRouting(args, cwd) :224-261
1107
- function explainFile(args, cwd) :269-356
1108
- function listModules(args, cwd) :364-403
1109
- function queryContext(args, cwd) :411-438
1110
- function getMethodImpact(args, cwd) :446-460
1111
- function getImpact(args, cwd) :468-480
1112
- function getLines(args, cwd) :489-537
1113
- function readMemory(args, cwd) :545-580
1114
- function getCalleeSignatures(args, cwd) :589-634
1115
- function _pkgVersion(cwd) :641-644
1116
- function notifyFileCreated(args, cwd) :648-670
1117
- function notifySymbolAdded(args, cwd) :673-693
1118
- function notifyFileDeleted(args, cwd) :696-710
1119
- function _changedFiles(cwd, args) :716-728
1120
- function getDiffContext(args, cwd) :737-808
1121
- function getArchitectureOverview(args, cwd) :817-885
1122
- function verifySuggestion(args, cwd) :895-930
1123
- function squeezeOutput(args, cwd) :940-973
1124
- ```
1125
-
1126
1099
  ### src/mcp/install.js
1127
1100
  ```
1128
1101
  module.exports = { CLIENTS, listClients, installClient, resolveTarget } :142-142
package/CHANGELOG.md CHANGED
@@ -10,6 +10,34 @@ Format: [Semantic Versioning](https://semver.org/)
10
10
 
11
11
  ---
12
12
 
13
+ ## [8.19.0] — 2026-07-19
14
+
15
+ Minor release — **"Honest Numbers" (v8.19, P0)**: the published retrieval lift now comes from a measured grep-agent comparison, not a random-file baseline, and every proxy metric says so on the label.
16
+
17
+ ### Added
18
+ - **Honest grep-agent baseline benchmark (#495, PR #496):** new `scripts/run-honest-benchmark.mjs` (`npm run benchmark:honest`) scores the production ranker against an internal single-shot grep-agent baseline — a pure-Node, zero-dependency, no-child-process repo scan ranked by distinct-term coverage then occurrences, `.gitignore`-aware, deterministic ordering — on the same 110-task / 19-repo corpus and the same scorer. **Measured: SigMap 86.4% hit@5 / MRR .780 vs grep 42.7% / .228 → 2.02× lift (+43.6pt)** → `benchmarks/reports/honest-baseline.json`. `computeLatest` derives `grep_baseline_hit_at_5` + `grep_lift` from the report (optional-report pattern; hermetic fixture unaffected).
19
+ - **Claim-hygiene guard test:** `test/integration/honest-baseline.test.js` (7 checks) — report shape, derived-not-hand-typed metrics, version.json mirror, and a one-way door: the 6.4×-vs-random lift, the 13.6% random baseline, and the unsourced "10% without" claim can never reappear on README or llms surfaces; the benchmark script itself is guarded to stay child-process-free.
20
+
21
+ ### Changed
22
+ - **Random-baseline lift retired from all human surfaces (#495, PR #496):** README and llms.txt/llms-full.txt now quote the measured grep-agent lift (2.02×) instead of 6.4×-vs-random; task success is labeled a **retrieval-tier proxy** ("modeled from retrieval tiers, not measured LLM sessions") and the "baseline 10%" / "up from 10%" claims are removed. The random-baseline fields (`baseline_hit_at_5`, `retrieval_lift`) remain in latest.json/version.json as data only. `readme-structure` guards advanced: README must show the grep baseline and must **not** show the random one.
23
+
24
+ ---
25
+
26
+ ## [8.18.0] — 2026-07-12
27
+
28
+ 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.
29
+
30
+ ### Added
31
+ - **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.
32
+ - **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.
33
+
34
+ ### Changed
35
+ - **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.
36
+ - **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%).
37
+ - **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.
38
+
39
+ ---
40
+
13
41
  ## [8.17.0] — 2026-07-12
14
42
 
15
43
  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).
package/README.md CHANGED
@@ -59,10 +59,10 @@ 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
- - **87.8% hit@5** — right file found in top 5 results (vs 13.6% baseline)
63
- - **97.0% token reduction** — average across 21 real repos
64
- - **67.8% task success rate** — up from 10% without context
65
- - **1.44 prompts per task** — down from 2.84 (49.2% fewer retries)
62
+ - **86.7% hit@5** — right file in top 5 results (vs 42.7% single-shot grep baseline — 2.02× lift)
63
+ - **96.9% token reduction** — average across 21 real repos
64
+ - **68.9% task-success proxy** — modeled from retrieval tiers, not measured LLM sessions
65
+ - **1.44 prompts per task** — down from 2.84 (49.2% fewer retries, modeled)
66
66
  <!--/SM:whyMetrics-->
67
67
  - **<!--SM:languages-->33<!--/SM:languages--> languages supported** — TypeScript, Python, Go, Rust, Java, R, and more
68
68
  - **No vendor lock-in** — works with any AI assistant or local LLM
@@ -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-->88%<!--/SM:hitWhole--> of the time, every symbol on a real line anchor |
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.17-main (21 repositories, including R language)
126
- Date : 2026-07-12
125
+ Benchmark : sigmap-v8.19-main (21 repositories, including R language)
126
+ Date : 2026-07-19
127
127
 
128
- Hit@5 : 87.8% (baseline 13.6% — 6.5× lift)
129
- Token reduction: 97.0% (across 21 repos)
130
- Prompt reduction : 49.2% (2.84 → 1.44 prompts per task)
131
- Task success : 67.8% (baseline 10%)
128
+ Hit@5 : 86.7% (grep-agent baseline 42.7% — 2.02× lift)
129
+ Token reduction: 96.9% (across 21 repos)
130
+ Prompt reduction : 49.2% (2.84 → 1.44 prompts per task, modeled)
131
+ Task success : 68.9% (proxy — modeled from retrieval tiers)
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