sigmap 5.4.0 → 5.6.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
@@ -12,75 +12,60 @@ Use this marker block for all appendable context files:
12
12
  ## Auto-generated signatures
13
13
  <!-- Updated by gen-context.js -->
14
14
  You are a coding assistant with full knowledge of this codebase.
15
- Below are the code signatures extracted by SigMap v5.2.0 on 2026-04-16T23:13:56.540Z.
15
+ Below are the code signatures extracted by SigMap v5.6.0 on 2026-04-17T17:05:56.879Z.
16
16
 
17
17
  Use these signatures to answer questions about the code accurately.
18
18
 
19
19
  ## Code Signatures
20
20
 
21
- <!-- Generated by SigMap gen-context.js v5.2.0 -->
21
+ <!-- Generated by SigMap gen-context.js v5.6.0 -->
22
22
  <!-- DO NOT EDIT below the marker line — run gen-context.js to regenerate -->
23
23
 
24
24
  # Code signatures
25
25
 
26
- ## changes (last 5 commits — 46 minutes ago)
26
+ ## changes (last 5 commits — 9 minutes ago)
27
27
  ```
28
- src/config/loader.js +loadBaseConfig ~loadConfig ~deepClone
29
- src/format/dashboard.js ~computeExtractorCoverage ~readBenchmarkTrend
30
- src/judge/judge-engine.js +tokenize +groundedness +extractContextFiles +judge
31
- src/learning/weights.js +weightsPath +clampMultiplier +normalizeFile +sanitizeWeights
32
- src/mcp/handlers.js ~queryContext ~getImpact
33
- src/retrieval/ranker.js ~scoreFile ~rank
34
- packages/core/index.js ~extract
28
+ src/analysis/coverage-score.js ~coverageScore ~_walk
35
29
  ```
36
30
 
37
31
  ## packages
38
32
 
39
- ### packages/core/README.md
40
- ```
41
- h1 sigmap-core
42
- h2 Installation
43
- h2 Quick start
44
- h2 API reference
45
- h3 `extract(src, language)` → `string[]`
46
- h3 `rank(query, sigIndex, opts?)` → `Result[]`
47
- h3 `buildSigIndex(cwd)` → `Map<string, string[]>`
48
- h3 `scan(sigs, filePath)` → `{ safe: string[], redacted: boolean }`
49
- h3 `score(cwd)` → `HealthResult`
50
- h2 Migration from v2.3 and earlier
51
- h2 v3.0 — Multi-Adapter Architecture (released)
52
- h2 Zero dependencies
53
- code-fence bash
54
- code-fence plain
55
- code-fence js
56
- code-fence ---
57
- ```
58
-
59
- ### packages/core/index.js
33
+ ### packages/cli/index.js
60
34
  ```
61
- module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
62
- function _resolveExtractor(language)
63
- function extract(src, language) → string[]
64
- function rank(query, sigIndex, opts) → { file: string, score: nu
65
- function buildSigIndex(cwd) → Map<string, string[]>
66
- function scan(sigs, filePath) → { safe: string[], redacte
67
- function score(cwd) → { * score: number, * grad
68
- function adapt(context, adapterName, opts = {}) → string
35
+ module.exports = { CLI_ENTRY, run }
36
+ function run(argv, cwd) → void
69
37
  ```
70
38
 
71
- ### packages/adapters/claude.js
39
+ ### packages/adapters/codex.js
72
40
  ```
73
41
  module.exports = { name, format, outputPath, write }
74
42
  function format(context, opts = {}) → string
75
- function _confidenceMeta(opts)
76
43
  function outputPath(cwd) → string
77
44
  function write(context, cwd, opts = {})
78
45
  ```
79
46
 
80
- ### packages/adapters/codex.js
47
+ ### packages/adapters/index.js
48
+ ```
49
+ module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
50
+ function getAdapter(name) → { name: string, format: F
51
+ function listAdapters() → string[]
52
+ function adapt(context, adapterName, opts = {}) → string
53
+ function outputsToAdapters(outputs) → string[]
54
+ ```
55
+
56
+ ### packages/adapters/llm-full.js
57
+ ```
58
+ module.exports = { name: 'llm-full', format, outputPath, write }
59
+ function outputPath(cwd)
60
+ function format(context, opts)
61
+ function write(context, cwd, opts)
62
+ ```
63
+
64
+ ### packages/adapters/claude.js
81
65
  ```
82
66
  module.exports = { name, format, outputPath, write }
83
67
  function format(context, opts = {}) → string
68
+ function _confidenceMeta(opts)
84
69
  function outputPath(cwd) → string
85
70
  function write(context, cwd, opts = {})
86
71
  ```
@@ -111,23 +96,6 @@ function write(context, cwd, opts = {})
111
96
  function _confidenceMeta(opts)
112
97
  ```
113
98
 
114
- ### packages/adapters/index.js
115
- ```
116
- module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
117
- function getAdapter(name) → { name: string, format: F
118
- function listAdapters() → string[]
119
- function adapt(context, adapterName, opts = {}) → string
120
- function outputsToAdapters(outputs) → string[]
121
- ```
122
-
123
- ### packages/adapters/llm-full.js
124
- ```
125
- module.exports = { name: 'llm-full', format, outputPath, write }
126
- function outputPath(cwd)
127
- function format(context, opts)
128
- function write(context, cwd, opts)
129
- ```
130
-
131
99
  ### packages/adapters/openai.js
132
100
  ```
133
101
  module.exports = { name, format, outputPath }
@@ -144,172 +112,126 @@ function _confidenceMeta(opts)
144
112
  function outputPath(cwd) → string
145
113
  ```
146
114
 
147
- ### packages/cli/index.js
148
- ```
149
- module.exports = { CLI_ENTRY, run }
150
- function run(argv, cwd) → void
151
- ```
152
-
153
- ## src
154
-
155
- ### src/config/loader.js
115
+ ### packages/core/README.md
156
116
  ```
157
- module.exports = { loadConfig, loadBaseConfig }
158
- function loadBaseConfig(extendsVal, cwd)
159
- function detectAutoSrcDirs(cwd, excludeList) → string[]
160
- function loadConfig(cwd) → object
161
- function deepClone(obj)
117
+ h1 sigmap-core
118
+ h2 Installation
119
+ h2 Quick start
120
+ h2 API reference
121
+ h3 `extract(src, language)` → `string[]`
122
+ h3 `rank(query, sigIndex, opts?)` → `Result[]`
123
+ h3 `buildSigIndex(cwd)` → `Map<string, string[]>`
124
+ h3 `scan(sigs, filePath)` → `{ safe: string[], redacted: boolean }`
125
+ h3 `score(cwd)` → `HealthResult`
126
+ h2 Migration from v2.3 and earlier
127
+ h2 v3.0 — Multi-Adapter Architecture (released)
128
+ h2 Zero dependencies
129
+ code-fence bash
130
+ code-fence plain
131
+ code-fence js
132
+ code-fence ---
162
133
  ```
163
134
 
164
- ### src/format/dashboard.js
135
+ ### packages/core/index.js
165
136
  ```
166
- module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
167
- function toNumber(v)
168
- function percentile(values, p)
169
- function overBudgetStreak(entries)
170
- function loadConfig(cwd)
171
- function shouldExclude(rel, excludeSet)
172
- function detectLanguage(filePath)
173
- function walkFiles(dir, maxDepth, depth, out, excludeSet)
174
- function computeExtractorCoverage(cwd)
175
- function readBenchmarkTrend(cwd)
176
- function lineChartSvg(values, title, ySuffix)
177
- function barChartSvg(perLanguage)
178
- function sparkline(values)
179
- function buildDashboardData(cwd, health)
180
- function generateDashboardHtml(cwd, health)
181
- function renderHistoryCharts(cwd, health)
137
+ module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
138
+ function _resolveExtractor(language)
139
+ function extract(src, language) → string[]
140
+ function rank(query, sigIndex, opts) → { file: string, score: nu
141
+ function buildSigIndex(cwd) → Map<string, string[]>
142
+ function scan(sigs, filePath) → { safe: string[], redacte
143
+ function score(cwd) → { * score: number, * grad
144
+ function adapt(context, adapterName, opts = {}) → string
182
145
  ```
183
146
 
184
- ### src/judge/judge-engine.js
185
- ```
186
- module.exports = { groundedness, judge }
187
- function tokenize(text)
188
- function groundedness(response, context)
189
- function extractContextFiles(context, cwd)
190
- function judge(response, context, opts = {})
191
- ```
147
+ ## src
192
148
 
193
- ### src/learning/weights.js
149
+ ### src/map/route-table.js
194
150
  ```
195
- module.exports = { BASELINE, DECAY, MAX_MULT, MIN_MULT, weightsPath, clampMultiplier, normalizeFile, loadWeights, saveWeights, updateWeights, boostFiles, penalizeFiles, resetWeights }
196
- function weightsPath(cwd)
197
- function clampMultiplier(value)
198
- function normalizeFile(cwd, filePath)
199
- function sanitizeWeights(cwd, weights)
200
- function loadWeights(cwd)
201
- function saveWeights(cwd, weights)
202
- function updateWeights(cwd, opts = {})
203
- function boostFiles(cwd, files, amount = 0.15)
204
- function penalizeFiles(cwd, files, amount = 0.10)
205
- function resetWeights(cwd)
151
+ module.exports = { analyze }
152
+ function shouldSkipFile(rel)
153
+ function analyze(files, cwd)
206
154
  ```
207
155
 
208
- ### src/mcp/handlers.js
156
+ ### src/routing/classifier.js
209
157
  ```
210
- module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
211
- function readContext(args, cwd)
212
- function searchSignatures(args, cwd)
213
- function getMap(args, cwd)
214
- function createCheckpoint(args, cwd)
215
- function getRouting(args, cwd)
216
- function explainFile(args, cwd)
217
- function listModules(args, cwd)
218
- function queryContext(args, cwd)
219
- function getImpact(args, cwd)
158
+ module.exports = { classify, classifyAll }
159
+ function classify(filePath, sigs) → 'fast'|'balanced'|'powerf
160
+ function classifyAll(fileEntries, cwd) → { fast: string[], balance
220
161
  ```
221
162
 
222
- ### src/mcp/server.js
163
+ ### src/routing/hints.js
223
164
  ```
224
- module.exports = { start }
225
- function respond(id, result)
226
- function respondError(id, code, message)
227
- function dispatch(msg, cwd)
228
- function start(cwd)
165
+ module.exports = { TIERS, formatRoutingSection }
166
+ function formatRoutingSection(groups) → string
229
167
  ```
230
168
 
231
- ### src/retrieval/ranker.js
169
+ ### src/security/patterns.js
232
170
  ```
233
- module.exports = { rank, buildSigIndex, scoreFile, formatRankTable, formatRankJSON, DEFAULT_WEIGHTS, detectIntent }
234
- function scoreFile(filePath, sigs, queryTokens, weights) → number
235
- function rank(query, sigIndex, opts) → { file: string, score: nu
236
- function _parseContextFile(contextPath) → Map<string, string[]>
237
- function buildSigIndex(cwd, opts) → Map<string, string[]>
238
- function formatRankTable(results, query) → string
239
- function formatRankJSON(results, query) → object
240
- function detectIntent(query)
171
+ module.exports = { PATTERNS }
241
172
  ```
242
173
 
243
- ### src/analysis/coverage-score.js
174
+ ### src/security/scanner.js
244
175
  ```
245
- module.exports = { coverageScore }
246
- function coverageScore(cwd, fileEntries, config) → { * score: number, * grad
247
- function _walk(dir, excludeSet, out)
176
+ module.exports = { scan }
177
+ function scan(signatures, filePath) → { safe: string[], redacte
248
178
  ```
249
179
 
250
- ### src/config/defaults.js
180
+ ### src/tracking/logger.js
251
181
  ```
252
- module.exports = { DEFAULTS }
182
+ module.exports = { logRun, readLog, summarize }
183
+ function logRun(entry, cwd)
184
+ function readLog(cwd) → object[]
185
+ function summarize(entries) → object
253
186
  ```
254
187
 
255
- ### src/eval/analyzer.js
188
+ ### src/extractors/cpp.js
256
189
  ```
257
- module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
258
- function isDockerfile(name)
259
- function getExtractorName(filePath)
260
- function tokenCount(sigs)
261
- function hasCoverage(filePath, cwd)
262
- function loadExtractor(name, cwd)
263
- function analyzeFiles(files, cwd, opts) → object[]
264
- function formatAnalysisTable(stats, showSlow) → string
265
- function formatAnalysisJSON(stats) → object
190
+ module.exports = { extract }
191
+ function extract(src) → string[]
192
+ function extractBlock(src, startIndex)
193
+ function extractMembers(block)
194
+ function normalizeParams(params)
195
+ function normalizeType(type)
266
196
  ```
267
197
 
268
- ### src/eval/runner.js
198
+ ### src/extractors/csharp.js
269
199
  ```
270
- module.exports = { run, rank, loadTasks, buildSigIndex, formatTable, formatMetrics, tokenize }
271
- function buildSigIndex(cwd) → Map<string, string[]>
272
- function tokenize(text) → string[]
273
- function scoreFile(sigs, queryTokens) → number
274
- function rank(query, index, topK = 10) → { file: string, score: nu
275
- function estimateTokens(sigs) → number
276
- function loadTasks(tasksFile) → Array<{id:string, query:s
277
- function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
278
- function formatTable(taskResults) → string
279
- function formatMetrics(metrics) → string
200
+ module.exports = { extract }
201
+ function extract(src) → string[]
202
+ function extractBlock(src, startIndex)
203
+ function extractMembers(block)
204
+ function normalizeParams(params)
205
+ function normalizeType(type)
280
206
  ```
281
207
 
282
- ### src/eval/scorer.js
208
+ ### src/extractors/dart.js
283
209
  ```
284
- module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
285
- function firstRank(ranked, expected) → number
286
- function normalizePath(p) → string
287
- function hitAtK(ranked, expected, k = 5) → 0|1
288
- function reciprocalRank(ranked, expected) → number
289
- function precisionAtK(ranked, expected, k = 5) → number
290
- function aggregate(results, k = 5) → { * hitAt5: number, // fr
291
- function round(x)
210
+ module.exports = { extract }
211
+ function extract(src) → string[]
212
+ function extractBlock(src, startIndex)
213
+ function extractMembers(block)
214
+ function normalizeParams(params)
292
215
  ```
293
216
 
294
- ### src/extractors/coverage.js
217
+ ### src/extractors/deps.js
295
218
  ```
296
- module.exports = { buildTestIndex, isTested }
297
- function walkFiles(dir)
298
- function buildTestIndex(cwd, testDirs)
299
- function isTested(funcName, testIndex)
219
+ module.exports = { extractPythonDeps, extractTSDeps, buildReverseDepMap }
220
+ function extractPythonDeps(src) → string[]
221
+ function extractTSDeps(src) → string[]
222
+ function buildReverseDepMap(forwardMap) → Map<string, string[]>
300
223
  ```
301
224
 
302
- ### src/extractors/cpp.js
225
+ ### src/extractors/go.js
303
226
  ```
304
227
  module.exports = { extract }
305
228
  function extract(src) → string[]
306
229
  function extractBlock(src, startIndex)
307
- function extractMembers(block)
230
+ function extractInterfaceMethods(block)
308
231
  function normalizeParams(params)
309
- function normalizeType(type)
310
232
  ```
311
233
 
312
- ### src/extractors/csharp.js
234
+ ### src/extractors/java.js
313
235
  ```
314
236
  module.exports = { extract }
315
237
  function extract(src) → string[]
@@ -319,13 +241,19 @@ function normalizeParams(params)
319
241
  function normalizeType(type)
320
242
  ```
321
243
 
322
- ### src/extractors/css.js
244
+ ### src/extractors/javascript.js
323
245
  ```
324
246
  module.exports = { extract }
325
247
  function extract(src) → string[]
248
+ function extractBlock(src, startIndex)
249
+ function extractClassMembers(block, returnHints)
250
+ function buildReturnHints(src)
251
+ function normalizeType(type)
252
+ function formatReturnHint(type)
253
+ function normalizeParams(params)
326
254
  ```
327
255
 
328
- ### src/extractors/dart.js
256
+ ### src/extractors/kotlin.js
329
257
  ```
330
258
  module.exports = { extract }
331
259
  function extract(src) → string[]
@@ -334,48 +262,55 @@ function extractMembers(block)
334
262
  function normalizeParams(params)
335
263
  ```
336
264
 
337
- ### src/extractors/deps.js
338
- ```
339
- module.exports = { extractPythonDeps, extractTSDeps, buildReverseDepMap }
340
- function extractPythonDeps(src) → string[]
341
- function extractTSDeps(src) → string[]
342
- function buildReverseDepMap(forwardMap) → Map<string, string[]>
343
- ```
344
-
345
- ### src/extractors/dockerfile.js
265
+ ### src/extractors/php.js
346
266
  ```
347
267
  module.exports = { extract }
348
268
  function extract(src) → string[]
269
+ function extractBlock(src, startIndex)
270
+ function extractMembers(block)
271
+ function normalizeParams(params)
272
+ function normalizeType(type)
349
273
  ```
350
274
 
351
- ### src/extractors/generic.js
275
+ ### src/extractors/prdiff.js
352
276
  ```
353
- module.exports = { extract }
354
- function extract(src)
277
+ module.exports = { diffSignatures, extractName }
278
+ function diffSignatures(baseSigs, currentSigs) → {added:string[], removed:
279
+ function extractName(sig)
355
280
  ```
356
281
 
357
- ### src/extractors/go.js
282
+ ### src/extractors/python.js
358
283
  ```
359
284
  module.exports = { extract }
360
285
  function extract(src) → string[]
361
- function extractBlock(src, startIndex)
362
- function extractInterfaceMethods(block)
286
+ function extractClassMethods(stripped, startIndex)
287
+ function tryExtractDataclassFields(stripped, classIndex)
288
+ function tryExtractBaseModelFields(stripped, bodyStart)
289
+ function extractClassConstants(stripped, startIndex)
290
+ function extractReturnType(sigLine)
363
291
  function normalizeParams(params)
292
+ function extractDocHint(src, fnName, fnSigLine)
364
293
  ```
365
294
 
366
- ### src/extractors/graphql.js
295
+ ### src/extractors/ruby.js
367
296
  ```
368
297
  module.exports = { extract }
369
298
  function extract(src) → string[]
299
+ function normalizeParams(params)
300
+ function extractReturnHint(stripped, index)
370
301
  ```
371
302
 
372
- ### src/extractors/html.js
303
+ ### src/extractors/rust.js
373
304
  ```
374
305
  module.exports = { extract }
375
306
  function extract(src) → string[]
307
+ function extractBlock(src, startIndex)
308
+ function extractMethods(block)
309
+ function normalizeParams(params)
310
+ function extractReturnType(afterParen)
376
311
  ```
377
312
 
378
- ### src/extractors/java.js
313
+ ### src/extractors/scala.js
379
314
  ```
380
315
  module.exports = { extract }
381
316
  function extract(src) → string[]
@@ -385,116 +320,121 @@ function normalizeParams(params)
385
320
  function normalizeType(type)
386
321
  ```
387
322
 
388
- ### src/extractors/javascript.js
323
+ ### src/extractors/svelte.js
389
324
  ```
390
325
  module.exports = { extract }
391
326
  function extract(src) → string[]
392
- function extractBlock(src, startIndex)
393
- function extractClassMembers(block, returnHints)
394
- function buildReturnHints(src)
395
- function normalizeType(type)
396
- function formatReturnHint(type)
397
327
  function normalizeParams(params)
328
+ function normalizeType(type)
398
329
  ```
399
330
 
400
- ### src/extractors/kotlin.js
331
+ ### src/extractors/swift.js
401
332
  ```
402
333
  module.exports = { extract }
403
334
  function extract(src) → string[]
404
335
  function extractBlock(src, startIndex)
405
336
  function extractMembers(block)
406
337
  function normalizeParams(params)
338
+ function extractArrowType(str)
407
339
  ```
408
340
 
409
- ### src/extractors/markdown.js
341
+ ### src/extractors/todos.js
410
342
  ```
411
- module.exports = { extract }
412
- function extract(src) → string[]
343
+ module.exports = { extractTodos }
344
+ function extractTodos(src) → {line:number, tag:string,
413
345
  ```
414
346
 
415
- ### src/extractors/patterns.js
347
+ ### src/extractors/typescript.js
416
348
  ```
417
349
  module.exports = { extract }
418
350
  function extract(src) → string[]
351
+ function extractBlock(src, startIndex)
352
+ function extractInterfaceMembers(block)
353
+ function extractClassMembers(block)
354
+ function normalizeParams(params)
419
355
  ```
420
356
 
421
- ### src/extractors/php.js
357
+ ### src/extractors/vue.js
422
358
  ```
423
359
  module.exports = { extract }
424
360
  function extract(src) → string[]
425
- function extractBlock(src, startIndex)
426
- function extractMembers(block)
427
361
  function normalizeParams(params)
428
362
  function normalizeType(type)
429
363
  ```
430
364
 
431
- ### src/extractors/prdiff.js
365
+ ### src/eval/scorer.js
432
366
  ```
433
- module.exports = { diffSignatures, extractName }
434
- function diffSignatures(baseSigs, currentSigs) → {added:string[], removed:
435
- function extractName(sig)
367
+ module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
368
+ function firstRank(ranked, expected) → number
369
+ function normalizePath(p) → string
370
+ function hitAtK(ranked, expected, k = 5) → 0|1
371
+ function reciprocalRank(ranked, expected) → number
372
+ function precisionAtK(ranked, expected, k = 5) → number
373
+ function aggregate(results, k = 5) → { * hitAt5: number, // fr
374
+ function round(x)
436
375
  ```
437
376
 
438
- ### src/extractors/properties.js
377
+ ### src/eval/runner.js
439
378
  ```
440
- module.exports = { extract }
441
- function extract(src) → string[]
379
+ module.exports = { run, rank, loadTasks, buildSigIndex, formatTable, formatMetrics, tokenize }
380
+ function buildSigIndex(cwd) → Map<string, string[]>
381
+ function tokenize(text) → string[]
382
+ function scoreFile(sigs, queryTokens) → number
383
+ function rank(query, index, topK = 10) → { file: string, score: nu
384
+ function estimateTokens(sigs) → number
385
+ function loadTasks(tasksFile) → Array<{id:string, query:s
386
+ function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
387
+ function formatTable(taskResults) → string
388
+ function formatMetrics(metrics) → string
442
389
  ```
443
390
 
444
- ### src/extractors/protobuf.js
391
+ ### src/retrieval/tokenizer.js
445
392
  ```
446
- module.exports = { extract }
447
- function extract(src) → string[]
393
+ module.exports = { tokenize, STOP_WORDS }
394
+ function tokenize(text, opts) → string[]
448
395
  ```
449
396
 
450
- ### src/extractors/python.js
397
+ ### src/graph/builder.js
451
398
  ```
452
- module.exports = { extract }
453
- function extract(src) → string[]
454
- function extractClassMethods(stripped, startIndex)
455
- function tryExtractDataclassFields(stripped, classIndex)
456
- function tryExtractBaseModelFields(stripped, bodyStart)
457
- function extractClassConstants(stripped, startIndex)
458
- function extractReturnType(sigLine)
459
- function normalizeParams(params)
460
- function extractDocHint(src, fnName, fnSigLine)
399
+ module.exports = { build, buildFromCwd, extractFileDeps }
400
+ function resolveJsPath(dir, importStr, fileSet) → string|null
401
+ function extractFileDeps(filePath, content, fileSet) → string[]
402
+ function build(files, cwd) → { forward: Map<string,str
403
+ function buildFromCwd(cwd, opts) → { forward: Map<string,str
461
404
  ```
462
405
 
463
- ### src/extractors/python_dataclass.js
406
+ ### src/graph/impact.js
464
407
  ```
465
- module.exports = { extract }
466
- function extract(src) → string[]
408
+ module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
409
+ function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
410
+ function isTestFile(f)
411
+ function isRouteFile(f)
412
+ function getImpact(changedFile, graph, opts) → { * changed: string, * di
413
+ function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
414
+ function formatImpact(result) → string
415
+ function formatImpactJSON(result) → object
467
416
  ```
468
417
 
469
- ### src/extractors/ruby.js
418
+ ### src/mcp/tools.js
470
419
  ```
471
- module.exports = { extract }
472
- function extract(src) → string[]
473
- function normalizeParams(params)
474
- function extractReturnHint(stripped, index)
420
+ module.exports = { TOOLS }
475
421
  ```
476
422
 
477
- ### src/extractors/rust.js
423
+ ### src/health/scorer.js
478
424
  ```
479
- module.exports = { extract }
480
- function extract(src) → string[]
481
- function extractBlock(src, startIndex)
482
- function extractMethods(block)
483
- function normalizeParams(params)
484
- function extractReturnType(afterParen)
425
+ module.exports = { score }
426
+ function score(cwd) → { * score: number, * grad
485
427
  ```
486
428
 
487
- ### src/extractors/scala.js
429
+ ### src/extractors/coverage.js
488
430
  ```
489
- module.exports = { extract }
490
- function extract(src) → string[]
491
- function extractBlock(src, startIndex)
492
- function extractMembers(block)
493
- function normalizeParams(params)
494
- function normalizeType(type)
431
+ module.exports = { buildTestIndex, isTested }
432
+ function walkFiles(dir)
433
+ function buildTestIndex(cwd, testDirs)
434
+ function isTested(funcName, testIndex)
495
435
  ```
496
436
 
497
- ### src/extractors/shell.js
437
+ ### src/extractors/css.js
498
438
  ```
499
439
  module.exports = { extract }
500
440
  function extract(src) → string[]
@@ -508,22 +448,16 @@ function _cleanName(raw)
508
448
  function _normalizeParams(raw)
509
449
  ```
510
450
 
511
- ### src/extractors/svelte.js
451
+ ### src/extractors/graphql.js
512
452
  ```
513
453
  module.exports = { extract }
514
454
  function extract(src) → string[]
515
- function normalizeParams(params)
516
- function normalizeType(type)
517
455
  ```
518
456
 
519
- ### src/extractors/swift.js
457
+ ### src/extractors/protobuf.js
520
458
  ```
521
459
  module.exports = { extract }
522
460
  function extract(src) → string[]
523
- function extractBlock(src, startIndex)
524
- function extractMembers(block)
525
- function normalizeParams(params)
526
- function extractArrowType(str)
527
461
  ```
528
462
 
529
463
  ### src/extractors/terraform.js
@@ -532,65 +466,58 @@ module.exports = { extract }
532
466
  function extract(src) → string[]
533
467
  ```
534
468
 
535
- ### src/extractors/todos.js
469
+ ### src/extractors/markdown.js
536
470
  ```
537
- module.exports = { extractTodos }
538
- function extractTodos(src) → {line:number, tag:string,
471
+ module.exports = { extract }
472
+ function extract(src) → string[]
539
473
  ```
540
474
 
541
- ### src/extractors/toml.js
475
+ ### src/extractors/properties.js
542
476
  ```
543
477
  module.exports = { extract }
544
478
  function extract(src) → string[]
545
479
  ```
546
480
 
547
- ### src/extractors/typescript.js
481
+ ### src/extractors/toml.js
548
482
  ```
549
483
  module.exports = { extract }
550
484
  function extract(src) → string[]
551
- function extractBlock(src, startIndex)
552
- function extractInterfaceMembers(block)
553
- function extractClassMembers(block)
554
- function normalizeParams(params)
555
485
  ```
556
486
 
557
- ### src/extractors/typescript_react.js
487
+ ### src/extractors/xml.js
558
488
  ```
559
489
  module.exports = { extract }
560
490
  function extract(src) → string[]
561
491
  ```
562
492
 
563
- ### src/extractors/vue.js
493
+ ### src/extractors/patterns.js
564
494
  ```
565
495
  module.exports = { extract }
566
496
  function extract(src) → string[]
567
- function normalizeParams(params)
568
- function normalizeType(type)
569
497
  ```
570
498
 
571
- ### src/extractors/vue_sfc.js
499
+ ### src/extractors/python_dataclass.js
572
500
  ```
573
501
  module.exports = { extract }
574
502
  function extract(src) → string[]
575
503
  ```
576
504
 
577
- ### src/extractors/xml.js
505
+ ### src/extractors/typescript_react.js
578
506
  ```
579
507
  module.exports = { extract }
580
508
  function extract(src) → string[]
581
509
  ```
582
510
 
583
- ### src/extractors/yaml.js
511
+ ### src/extractors/vue_sfc.js
584
512
  ```
585
513
  module.exports = { extract }
586
514
  function extract(src) → string[]
587
515
  ```
588
516
 
589
- ### src/format/cache.js
517
+ ### src/extractors/generic.js
590
518
  ```
591
- module.exports = { formatCache, formatCachePayload }
592
- function formatCache(content) → string
593
- function formatCachePayload(content, model) → string
519
+ module.exports = { extract }
520
+ function extract(src)
594
521
  ```
595
522
 
596
523
  ### src/format/llm-txt.js
@@ -609,94 +536,142 @@ function detectVersion(cwd)
609
536
  function format(context, cwd, writtenFiles, sigmapVersion)
610
537
  ```
611
538
 
612
- ### src/graph/builder.js
613
- ```
614
- module.exports = { build, buildFromCwd, extractFileDeps }
615
- function resolveJsPath(dir, importStr, fileSet) → string|null
616
- function extractFileDeps(filePath, content, fileSet) → string[]
617
- function build(files, cwd) → { forward: Map<string,str
618
- function buildFromCwd(cwd, opts) → { forward: Map<string,str
619
- ```
620
-
621
- ### src/graph/impact.js
622
- ```
623
- module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
624
- function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
625
- function isTestFile(f)
626
- function isRouteFile(f)
627
- function getImpact(changedFile, graph, opts) → { * changed: string, * di
628
- function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
629
- function formatImpact(result) → string
630
- function formatImpactJSON(result) → object
631
- ```
632
-
633
- ### src/health/scorer.js
539
+ ### src/eval/analyzer.js
634
540
  ```
635
- module.exports = { score }
636
- function score(cwd) → { * score: number, * grad
541
+ module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
542
+ function isDockerfile(name)
543
+ function getExtractorName(filePath)
544
+ function tokenCount(sigs)
545
+ function hasCoverage(filePath, cwd)
546
+ function loadExtractor(name, cwd)
547
+ function analyzeFiles(files, cwd, opts) → object[]
548
+ function formatAnalysisTable(stats, showSlow) → string
549
+ function formatAnalysisJSON(stats) → object
637
550
  ```
638
551
 
639
- ### src/map/class-hierarchy.js
552
+ ### src/config/defaults.js
640
553
  ```
641
- module.exports = { analyze }
642
- function analyze(files, cwd)
554
+ module.exports = { DEFAULTS }
643
555
  ```
644
556
 
645
- ### src/map/import-graph.js
557
+ ### src/config/loader.js
646
558
  ```
647
- module.exports = { analyze }
648
- function extractImports(filePath, content, fileSet)
649
- function resolveJsPath(dir, importStr, fileSet)
650
- function detectCycles(graph)
651
- function analyze(files, cwd)
559
+ module.exports = { loadConfig, loadBaseConfig }
560
+ function loadBaseConfig(extendsVal, cwd)
561
+ function detectAutoSrcDirs(cwd, excludeList) → string[]
562
+ function loadConfig(cwd) → object
563
+ function deepClone(obj)
652
564
  ```
653
565
 
654
- ### src/map/route-table.js
566
+ ### src/format/dashboard.js
655
567
  ```
656
- module.exports = { analyze }
657
- function shouldSkipFile(rel)
658
- function analyze(files, cwd)
568
+ module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
569
+ function toNumber(v)
570
+ function percentile(values, p)
571
+ function overBudgetStreak(entries)
572
+ function loadConfig(cwd)
573
+ function shouldExclude(rel, excludeSet)
574
+ function detectLanguage(filePath)
575
+ function walkFiles(dir, maxDepth, depth, out, excludeSet)
576
+ function computeExtractorCoverage(cwd)
577
+ function readBenchmarkTrend(cwd)
578
+ function lineChartSvg(values, title, ySuffix)
579
+ function barChartSvg(perLanguage)
580
+ function sparkline(values)
581
+ function buildDashboardData(cwd, health)
582
+ function generateDashboardHtml(cwd, health)
583
+ function renderHistoryCharts(cwd, health)
659
584
  ```
660
585
 
661
- ### src/mcp/tools.js
586
+ ### src/judge/judge-engine.js
662
587
  ```
663
- module.exports = { TOOLS }
588
+ module.exports = { groundedness, judge }
589
+ function tokenize(text)
590
+ function groundedness(response, context)
591
+ function extractContextFiles(context, cwd)
592
+ function judge(response, context, opts = {})
664
593
  ```
665
594
 
666
- ### src/retrieval/tokenizer.js
595
+ ### src/learning/weights.js
667
596
  ```
668
- module.exports = { tokenize, STOP_WORDS }
669
- function tokenize(text, opts) → string[]
597
+ module.exports = { BASELINE, DECAY, MAX_MULT, MIN_MULT, weightsPath, clampMultiplier, normalizeFile, loadWeights, saveWeights, updateWeights, boostFiles, penalizeFiles, resetWeights }
598
+ function weightsPath(cwd)
599
+ function clampMultiplier(value)
600
+ function normalizeFile(cwd, filePath)
601
+ function sanitizeWeights(cwd, weights)
602
+ function loadWeights(cwd)
603
+ function saveWeights(cwd, weights)
604
+ function updateWeights(cwd, opts = {})
605
+ function boostFiles(cwd, files, amount = 0.15)
606
+ function penalizeFiles(cwd, files, amount = 0.10)
607
+ function resetWeights(cwd)
670
608
  ```
671
609
 
672
- ### src/routing/classifier.js
610
+ ### src/mcp/handlers.js
673
611
  ```
674
- module.exports = { classify, classifyAll }
675
- function classify(filePath, sigs) → 'fast'|'balanced'|'powerf
676
- function classifyAll(fileEntries, cwd) → { fast: string[], balance
612
+ module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
613
+ function readContext(args, cwd)
614
+ function searchSignatures(args, cwd)
615
+ function getMap(args, cwd)
616
+ function createCheckpoint(args, cwd)
617
+ function getRouting(args, cwd)
618
+ function explainFile(args, cwd)
619
+ function listModules(args, cwd)
620
+ function queryContext(args, cwd)
621
+ function getImpact(args, cwd)
677
622
  ```
678
623
 
679
- ### src/routing/hints.js
624
+ ### src/retrieval/ranker.js
680
625
  ```
681
- module.exports = { TIERS, formatRoutingSection }
682
- function formatRoutingSection(groups) → string
626
+ module.exports = { rank, buildSigIndex, scoreFile, formatRankTable, formatRankJSON, DEFAULT_WEIGHTS, detectIntent }
627
+ function scoreFile(filePath, sigs, queryTokens, weights) → number
628
+ function rank(query, sigIndex, opts) → { file: string, score: nu
629
+ function _parseContextFile(contextPath) → Map<string, string[]>
630
+ function buildSigIndex(cwd, opts) → Map<string, string[]>
631
+ function formatRankTable(results, query) → string
632
+ function formatRankJSON(results, query) → object
633
+ function detectIntent(query)
683
634
  ```
684
635
 
685
- ### src/security/patterns.js
686
- ```
687
- module.exports = { PATTERNS }
636
+ ### src/format/benchmark-report.js
637
+ ```
638
+ module.exports = { loadBenchmarkReports, buildBenchmarkSummary, generateBenchmarkReportHtml, writeBenchmarkReport }
639
+ function escapeHtml(value)
640
+ function formatInt(value)
641
+ function formatCompact(value)
642
+ function formatPct(value, digits = 1)
643
+ function formatMaybePct(value, digits = 1)
644
+ function formatRatio(value, digits = 1)
645
+ function formatMoney(value)
646
+ function durationLabel(ms)
647
+ function maxOrZero(values)
648
+ function readJson(filePath)
649
+ function loadBenchmarkReports(cwd)
650
+ function buildRetrievalSummary(retrieval)
651
+ function buildBenchmarkSummary(reports, matrixSummary)
652
+ function renderCard(label, value, hint, tone)
653
+ function renderProgress(label, value, max, suffix)
654
+ function renderMatrixSection(matrix)
655
+ function renderTokenSection(token)
656
+ function renderRetrievalSection(retrieval)
657
+ function renderQualitySection(quality)
658
+ function renderTaskSection(task)
659
+ function generateBenchmarkReportHtml(reports, opts = {})
660
+ function writeBenchmarkReport(cwd, opts = {})
688
661
  ```
689
662
 
690
- ### src/security/scanner.js
663
+ ### src/analysis/coverage-score.js
691
664
  ```
692
- module.exports = { scan }
693
- function scan(signatures, filePath) → { safe: string[], redacte
665
+ module.exports = { coverageScore, CODE_EXTS }
666
+ function coverageScore(cwd, fileEntries, config)
667
+ function _walk(dir, excludeSet, out)
694
668
  ```
695
669
 
696
- ### src/tracking/logger.js
670
+ ### src/mcp/server.js
697
671
  ```
698
- module.exports = { logRun, readLog, summarize }
699
- function logRun(entry, cwd)
700
- function readLog(cwd) object[]
701
- function summarize(entries) → object
672
+ module.exports = { start }
673
+ function respond(id, result)
674
+ function respondError(id, code, message)
675
+ function dispatch(msg, cwd)
676
+ function start(cwd)
702
677
  ```