sigmap 6.10.0 → 6.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -56,27 +56,39 @@ Use this marker block for all appendable context files:
56
56
  | To query by topic | `sigmap --query "<topic>"` |
57
57
 
58
58
  Always run `sigmap ask` or `sigmap --query` before searching for files relevant to a task.
59
- ## changes (last 5 commits — 0 seconds ago)
59
+ ## changes (last 5 commits — 3 days ago)
60
+ ## deps
60
61
  ```
61
- src/eval/usefulness-scorer.js +scoreUsefulness +computeUsefulnessStats
62
- src/workspace/detector.js +detectWorkspaces +inferPackage +_getMatchLength +scopeToPackage
62
+ src/extractors/python_ast.py ← ast
63
63
  ```
64
64
 
65
65
  ## packages
66
66
 
67
- ### packages/cli/index.js
67
+ ### packages/core/index.js
68
68
  ```
69
- module.exports = { CLI_ENTRY, run }
70
- function run(argv, cwd) → void
69
+ module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
70
+ function _resolveExtractor(language)
71
+ function extract(src, language) → string[]
72
+ function rank(query, sigIndex, opts) → { file: string, score: nu
73
+ function buildSigIndex(cwd) → Map<string, string[]>
74
+ function scan(sigs, filePath) → { safe: string[], redacte
75
+ function score(cwd) → { * score: number, * grad
76
+ function adapt(context, adapterName, opts = {}) → string
77
+ ## changes (last 5 commits — 1 second ago)
78
+ ```
79
+ src/discovery/source-root-resolver.js ~_applySpecialRules ~_dedupeNested
80
+ src/map/import-graph.js ~analyze
81
+ packages/adapters/index.js ~getAdapter
82
+ packages/adapters/willow.js +format +outputPath +generateAtomId +fetchWithTimeout
71
83
  ```
72
84
 
73
- ### packages/adapters/index.js
85
+ ## src
86
+
87
+ ### src/discovery/sigmapignore.js
88
+ ### packages/cli/index.js
74
89
  ```
75
- module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
76
- function getAdapter(name) → { name: string, format: F
77
- function listAdapters() → string[]
78
- function adapt(context, adapterName, opts = {}) → string
79
- function outputsToAdapters(outputs) → string[]
90
+ module.exports = { CLI_ENTRY, run }
91
+ function run(argv, cwd) → void
80
92
  ```
81
93
 
82
94
  ### packages/adapters/llm-full.js
@@ -107,260 +119,260 @@ code-fence js
107
119
  code-fence ---
108
120
  ```
109
121
 
110
- ### packages/core/index.js
111
- ```
112
- module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
113
- function _resolveExtractor(language)
114
- function extract(src, language) → string[]
115
- function rank(query, sigIndex, opts) → { file: string, score: nu
116
- function buildSigIndex(cwd) → Map<string, string[]>
117
- function scan(sigs, filePath) → { safe: string[], redacte
118
- function score(cwd) → { * score: number, * grad
119
- function adapt(context, adapterName, opts = {}) → string
120
- ```
121
-
122
122
  ### packages/adapters/copilot.js
123
123
  ```
124
- module.exports = { name, format, outputPath, write }
125
- function format(context, opts = {}) → string
126
- function _confidenceMeta(opts)
127
- function outputPath(cwd) → string
128
- function write(context, cwd, opts = {})
124
+ module.exports = { loadIgnorePatterns, matchesIgnorePattern }
125
+ function loadIgnorePatterns(cwd)
126
+ function matchesIgnorePattern(dirName, patterns)
129
127
  ```
130
128
 
131
- ### packages/adapters/cursor.js
129
+ ### src/discovery/source-root-registry.js
132
130
  ```
133
- module.exports = { name, format, outputPath }
134
- function format(context, opts = {}) → string
135
- function _confidenceMeta(opts)
136
- function outputPath(cwd) → string
131
+ module.exports = { REGISTRY }
137
132
  ```
138
133
 
139
- ### packages/adapters/gemini.js
134
+ ### src/discovery/source-root-resolver.js
140
135
  ```
141
- module.exports = { name, format, outputPath, write }
142
- function format(context, opts = {}) → string
143
- function outputPath(cwd) → string
144
- function write(context, cwd, opts = {})
145
- function _confidenceMeta(opts)
136
+ module.exports = { resolveSourceRoots }
137
+ function resolveSourceRoots(cwd, opts = {})
138
+ function _detectMonorepo(cwd)
139
+ function _enumerateCandidates(cwd, isMonorepo, ignorePatterns, excludeList)
140
+ function _applySpecialRules(scored, cwd, primaryFw, fwEntry, frameworks)
141
+ function _dedupeNested(scored)
142
+ function _computeConfidence(frameworks, languages, scoredCount)
146
143
  ```
147
144
 
148
- ### packages/adapters/openai.js
145
+ ### src/discovery/source-root-scorer.js
149
146
  ```
150
- module.exports = { name, format, outputPath }
151
- function format(context, opts = {}) → string
152
- function outputPath(cwd) string
153
- function _confidenceMeta(opts)
147
+ module.exports = { scoreCandidate, getRecentlyChangedDirs, ROOT_ENTRYPOINTS, JVM_PATH_PATTERN }
148
+ function getRecentlyChangedDirs(cwd)
149
+ function scoreCandidate(dirName, fullPath, context)
150
+ function _countSourceFiles(dir, depth)
154
151
  ```
155
152
 
156
- ### packages/adapters/windsurf.js
153
+ ### src/eval/runner.js
157
154
  ```
158
- module.exports = { name, format, outputPath }
159
- function format(context, opts = {}) → string
160
- function _confidenceMeta(opts)
161
- function outputPath(cwd) → string
155
+ module.exports = { run, rank, loadTasks, buildSigIndex, formatTable, formatMetrics, tokenize }
156
+ function buildSigIndex(cwd) → Map<string, string[]>
157
+ function tokenize(text) → string[]
158
+ function scoreFile(sigs, queryTokens) → number
159
+ function rank(query, index, topK = 10) → { file: string, score: nu
160
+ function estimateTokens(sigs) → number
161
+ function loadTasks(tasksFile) → Array<{id:string, query:s
162
+ function run(tasksFile, cwd, opts = {}) → { * tasks: Array<{id, que
163
+ function formatTable(taskResults) → string
164
+ function formatMetrics(metrics) → string
162
165
  ```
163
166
 
164
- ### packages/adapters/claude.js
167
+ ### src/eval/scorer.js
165
168
  ```
166
- module.exports = { name, format, outputPath, write }
167
- function format(context, opts = {}) → string
168
- function _confidenceMeta(opts)
169
- function outputPath(cwd) → string
170
- function write(context, cwd, opts = {})
169
+ module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
170
+ function firstRank(ranked, expected) → number
171
+ function normalizePath(p) → string
172
+ function hitAtK(ranked, expected, k = 5) → 0|1
173
+ function reciprocalRank(ranked, expected) number
174
+ function precisionAtK(ranked, expected, k = 5) → number
175
+ function aggregate(results, k = 5) → { * hitAt5: number, // fr
176
+ function round(x)
171
177
  ```
172
178
 
173
- ### packages/adapters/codex.js
179
+ ### src/extractors/coverage.js
174
180
  ```
175
- module.exports = { name, format, outputPath, write }
176
- function format(context, opts = {}) → string
177
- function outputPath(cwd) → string
178
- function write(context, cwd, opts = {})
181
+ module.exports = { buildTestIndex, isTested }
182
+ function walkFiles(dir)
183
+ function buildTestIndex(cwd, testDirs)
184
+ function isTested(funcName, testIndex)
179
185
  ```
180
186
 
181
- ## src
182
-
183
- ### src/extractors/python.js
187
+ ### src/extractors/cpp.js
184
188
  ```
185
189
  module.exports = { extract }
186
190
  function extract(src) → string[]
187
- function extractClassMethods(stripped, startIndex)
188
- function tryExtractDataclassFields(stripped, classIndex)
189
- function tryExtractBaseModelFields(stripped, bodyStart)
190
- function extractClassConstants(stripped, startIndex)
191
- function extractReturnType(sigLine)
191
+ function extractBlock(src, startIndex)
192
+ function extractMembers(block)
192
193
  function normalizeParams(params)
193
- function extractDocHint(src, fnName, fnSigLine)
194
+ function normalizeType(type)
194
195
  ```
195
196
 
196
- ### src/extractors/ruby.js
197
+ ### src/extractors/csharp.js
197
198
  ```
198
199
  module.exports = { extract }
199
200
  function extract(src) → string[]
201
+ function extractBlock(src, startIndex)
202
+ function extractMembers(block)
200
203
  function normalizeParams(params)
201
- function extractReturnHint(stripped, index)
204
+ function normalizeType(type)
202
205
  ```
203
206
 
204
- ### src/extractors/rust.js
207
+ ### src/extractors/css.js
205
208
  ```
206
209
  module.exports = { extract }
207
210
  function extract(src) → string[]
208
- function extractBlock(src, startIndex)
209
- function extractMethods(block)
210
- function normalizeParams(params)
211
- function extractReturnType(afterParen)
212
211
  ```
213
212
 
214
- ### src/extractors/scala.js
213
+ ### src/extractors/dart.js
215
214
  ```
216
215
  module.exports = { extract }
217
216
  function extract(src) → string[]
218
217
  function extractBlock(src, startIndex)
219
218
  function extractMembers(block)
220
219
  function normalizeParams(params)
221
- function normalizeType(type)
222
220
  ```
223
221
 
224
- ### src/extractors/svelte.js
222
+ ### src/extractors/deps.js
225
223
  ```
226
- module.exports = { extract }
227
- function extract(src) → string[]
228
- function normalizeParams(params)
229
- function normalizeType(type)
224
+ module.exports = { extractPythonDeps, extractTSDeps, buildReverseDepMap }
225
+ function extractPythonDeps(src) → string[]
226
+ function extractTSDeps(src) → string[]
227
+ function buildReverseDepMap(forwardMap) → Map<string, string[]>
230
228
  ```
231
229
 
232
- ### src/extractors/swift.js
230
+ ### src/extractors/dockerfile.js
233
231
  ```
234
232
  module.exports = { extract }
235
233
  function extract(src) → string[]
236
- function extractBlock(src, startIndex)
237
- function extractMembers(block)
238
- function normalizeParams(params)
239
- function extractArrowType(str)
240
234
  ```
241
235
 
242
- ### src/extractors/todos.js
236
+ ### src/extractors/generic.js
243
237
  ```
244
- module.exports = { extractTodos }
245
- function extractTodos(src) → {line:number, tag:string,
238
+ module.exports = { extract }
239
+ function extract(src)
246
240
  ```
247
241
 
248
- ### src/extractors/vue.js
242
+ ### src/extractors/go.js
249
243
  ```
250
244
  module.exports = { extract }
251
245
  function extract(src) → string[]
246
+ function extractBlock(src, startIndex)
247
+ function extractInterfaceMethods(block)
252
248
  function normalizeParams(params)
253
- function normalizeType(type)
254
249
  ```
255
250
 
256
- ### src/eval/scorer.js
251
+ ### src/extractors/graphql.js
257
252
  ```
258
- module.exports = { hitAtK, reciprocalRank, precisionAtK, aggregate, firstRank }
259
- function firstRank(ranked, expected) → number
260
- function normalizePath(p) → string
261
- function hitAtK(ranked, expected, k = 5) → 0|1
262
- function reciprocalRank(ranked, expected) → number
263
- function precisionAtK(ranked, expected, k = 5) → number
264
- function aggregate(results, k = 5) → { * hitAt5: number, // fr
265
- function round(x)
253
+ module.exports = { extract }
254
+ function extract(src) → string[]
266
255
  ```
267
256
 
268
- ### src/eval/runner.js
257
+ ### src/extractors/html.js
269
258
  ```
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
259
+ module.exports = { extract }
260
+ function extract(src) → string[]
280
261
  ```
281
262
 
282
- ### src/retrieval/tokenizer.js
263
+ ### src/extractors/java.js
283
264
  ```
284
- module.exports = { tokenize, STOP_WORDS }
285
- function tokenize(text, opts) → string[]
265
+ module.exports = { extract }
266
+ function extract(src) → string[]
267
+ function extractBlock(src, startIndex)
268
+ function extractMembers(block)
269
+ function normalizeParams(params)
270
+ function normalizeType(type)
286
271
  ```
287
272
 
288
- ### src/graph/builder.js
273
+ ### src/extractors/javascript.js
289
274
  ```
290
- module.exports = { build, buildFromCwd, extractFileDeps }
291
- function resolveJsPath(dir, importStr, fileSet) → string|null
292
- function extractFileDeps(filePath, content, fileSet) → string[]
293
- function build(files, cwd) → { forward: Map<string,str
294
- function buildFromCwd(cwd, opts) → { forward: Map<string,str
275
+ module.exports = { extract }
276
+ function extract(src) → string[]
277
+ function extractBlock(src, startIndex)
278
+ function extractClassMembers(block, returnHints)
279
+ function buildReturnHints(src)
280
+ function normalizeType(type)
281
+ function formatReturnHint(type)
282
+ function normalizeParams(params)
295
283
  ```
296
284
 
297
- ### src/graph/impact.js
285
+ ### src/extractors/kotlin.js
286
+ ### packages/adapters/index.js
298
287
  ```
299
- module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
300
- function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
301
- function isTestFile(f)
302
- function isRouteFile(f)
303
- function getImpact(changedFile, graph, opts) → { * changed: string, * di
304
- function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
305
- function formatImpact(result) → string
306
- function formatImpactJSON(result) → object
288
+ module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
289
+ function getAdapter(name) → { name: string, format: F
290
+ function listAdapters() → string[]
291
+ function adapt(context, adapterName, opts = {}) → string
292
+ function outputsToAdapters(outputs) → string[]
307
293
  ```
308
294
 
309
- ### src/mcp/tools.js
295
+ ### packages/adapters/willow.js
310
296
  ```
311
- module.exports = { TOOLS }
297
+ module.exports = { name, format, outputPath, write }
298
+ function format(context, opts = {}) → string
299
+ function outputPath(cwd) → string
300
+ function generateAtomId(filepath) → string
301
+ async function fetchWithTimeout(url, opts, timeoutMs) → Promise<Response>
302
+ async function postAtomWithRetry(atom, mcpUrl, timeoutMs, maxRetries) → Promise<boolean>
303
+ async function write(context, cwd, opts = {}) → Promise<void>
312
304
  ```
313
305
 
314
- ### src/health/scorer.js
306
+ ### packages/core/index.js
315
307
  ```
316
- module.exports = { score }
308
+ module.exports = { extract, rank, buildSigIndex, scan, score, adapt }
309
+ function _resolveExtractor(language)
310
+ function extract(src, language) → string[]
311
+ function rank(query, sigIndex, opts) → { file: string, score: nu
312
+ function buildSigIndex(cwd) → Map<string, string[]>
313
+ function scan(sigs, filePath) → { safe: string[], redacte
317
314
  function score(cwd) → { * score: number, * grad
315
+ function adapt(context, adapterName, opts = {}) → string
318
316
  ```
319
317
 
320
- ### src/extractors/coverage.js
318
+ ### packages/adapters/willow.js
321
319
  ```
322
- module.exports = { buildTestIndex, isTested }
323
- function walkFiles(dir)
324
- function buildTestIndex(cwd, testDirs)
325
- function isTested(funcName, testIndex)
320
+ module.exports = { name, format, outputPath, write }
321
+ function format(context, opts = {}) → string
322
+ function outputPath(cwd) → string
323
+ function generateAtomId(filepath) → string
324
+ async function fetchWithTimeout(url, opts, timeoutMs) → Promise<Response>
325
+ async function postAtomWithRetry(atom, mcpUrl, timeoutMs, maxRetries) → Promise<boolean>
326
+ async function write(context, cwd, opts = {}) → Promise<void>
326
327
  ```
327
328
 
328
- ### src/extractors/css.js
329
+ ### packages/adapters/index.js
329
330
  ```
330
- module.exports = { extract }
331
- function extract(src) → string[]
331
+ module.exports = { getAdapter, listAdapters, adapt, outputsToAdapters }
332
+ function getAdapter(name) → { name: string, format: F
333
+ function listAdapters() → string[]
334
+ function adapt(context, adapterName, opts = {}) → string
335
+ function outputsToAdapters(outputs) → string[]
332
336
  ```
333
337
 
334
- ### src/extractors/sql.js
338
+ ## src
339
+
340
+ ### src/retrieval/tokenizer.js
335
341
  ```
336
342
  module.exports = { extract }
337
343
  function extract(src) → string[]
338
- function _cleanName(raw)
339
- function _normalizeParams(raw)
344
+ function extractBlock(src, startIndex)
345
+ function extractMembers(block)
346
+ function normalizeParams(params)
340
347
  ```
341
348
 
342
- ### src/extractors/graphql.js
349
+ ### src/extractors/markdown.js
343
350
  ```
344
351
  module.exports = { extract }
345
352
  function extract(src) → string[]
346
353
  ```
347
354
 
348
- ### src/extractors/protobuf.js
355
+ ### src/extractors/patterns.js
349
356
  ```
350
357
  module.exports = { extract }
351
358
  function extract(src) → string[]
352
359
  ```
353
360
 
354
- ### src/extractors/terraform.js
361
+ ### src/extractors/php.js
355
362
  ```
356
363
  module.exports = { extract }
357
364
  function extract(src) → string[]
365
+ function extractBlock(src, startIndex)
366
+ function extractMembers(block)
367
+ function normalizeParams(params)
368
+ function normalizeType(type)
358
369
  ```
359
370
 
360
- ### src/extractors/markdown.js
371
+ ### src/extractors/prdiff.js
361
372
  ```
362
- module.exports = { extract }
363
- function extract(src) → string[]
373
+ module.exports = { diffSignatures, extractName }
374
+ function diffSignatures(baseSigs, currentSigs) → {added:string[], removed:
375
+ function extractName(sig)
364
376
  ```
365
377
 
366
378
  ### src/extractors/properties.js
@@ -369,104 +381,150 @@ module.exports = { extract }
369
381
  function extract(src) → string[]
370
382
  ```
371
383
 
372
- ### src/extractors/toml.js
384
+ ### src/extractors/protobuf.js
373
385
  ```
374
386
  module.exports = { extract }
375
387
  function extract(src) → string[]
376
388
  ```
377
389
 
378
- ### src/extractors/xml.js
390
+ ### src/extractors/python.js
379
391
  ```
380
392
  module.exports = { extract }
381
393
  function extract(src) → string[]
394
+ function extractClassMethods(stripped, startIndex)
395
+ function tryExtractDataclassFields(stripped, classIndex)
396
+ function tryExtractBaseModelFields(stripped, bodyStart)
397
+ function extractClassConstants(stripped, startIndex)
398
+ function extractReturnType(sigLine)
399
+ function normalizeParams(params)
400
+ function extractDocHint(src, fnName, fnSigLine)
382
401
  ```
383
402
 
384
- ### src/extractors/patterns.js
403
+ ### src/extractors/python_dataclass.js
385
404
  ```
386
405
  module.exports = { extract }
387
406
  function extract(src) → string[]
388
407
  ```
389
408
 
390
- ### src/extractors/python_dataclass.js
409
+ ### src/extractors/ruby.js
391
410
  ```
392
411
  module.exports = { extract }
393
412
  function extract(src) → string[]
413
+ function normalizeParams(params)
414
+ function extractReturnHint(stripped, index)
394
415
  ```
395
416
 
396
- ### src/extractors/typescript_react.js
417
+ ### src/extractors/rust.js
397
418
  ```
398
419
  module.exports = { extract }
399
420
  function extract(src) → string[]
421
+ function extractBlock(src, startIndex)
422
+ function extractMethods(block)
423
+ function normalizeParams(params)
424
+ function extractReturnType(afterParen)
400
425
  ```
401
426
 
402
- ### src/extractors/vue_sfc.js
427
+ ### src/extractors/scala.js
403
428
  ```
404
429
  module.exports = { extract }
405
430
  function extract(src) → string[]
431
+ function extractBlock(src, startIndex)
432
+ function extractMembers(block)
433
+ function normalizeParams(params)
434
+ function normalizeType(type)
406
435
  ```
407
436
 
408
- ### src/extractors/generic.js
437
+ ### src/extractors/shell.js
409
438
  ```
410
439
  module.exports = { extract }
411
- function extract(src)
440
+ function extract(src) → string[]
412
441
  ```
413
442
 
414
- ### src/format/llm-txt.js
443
+ ### src/extractors/sql.js
415
444
  ```
416
- module.exports = { format, outputPath }
417
- function outputPath(cwd)
418
- function format(context, cwd, version)
445
+ module.exports = { extract }
446
+ function extract(src) → string[]
447
+ function _cleanName(raw)
448
+ function _normalizeParams(raw)
419
449
  ```
420
450
 
421
- ### src/format/llms-txt.js
451
+ ### src/extractors/svelte.js
422
452
  ```
423
- module.exports = { format, outputPath }
424
- function outputPath(cwd)
425
- function getShortCommit(cwd)
426
- function detectVersion(cwd)
427
- function format(context, cwd, writtenFiles, sigmapVersion)
453
+ module.exports = { extract }
454
+ function extract(src) → string[]
455
+ function normalizeParams(params)
456
+ function normalizeType(type)
428
457
  ```
429
458
 
430
- ### src/eval/analyzer.js
459
+ ### src/extractors/swift.js
431
460
  ```
432
- module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
433
- function isDockerfile(name)
434
- function getExtractorName(filePath)
435
- function tokenCount(sigs)
436
- function hasCoverage(filePath, cwd)
437
- function loadExtractor(name, cwd)
438
- function analyzeFiles(files, cwd, opts) → object[]
439
- function formatAnalysisTable(stats, showSlow) → string
440
- function formatAnalysisJSON(stats) → object
461
+ module.exports = { extract }
462
+ function extract(src) → string[]
463
+ function extractBlock(src, startIndex)
464
+ function extractMembers(block)
465
+ function normalizeParams(params)
466
+ function extractArrowType(str)
467
+ ```
468
+
469
+ ### src/extractors/terraform.js
470
+ ```
471
+ module.exports = { extract }
472
+ function extract(src) → string[]
473
+ ```
474
+
475
+ ### src/extractors/todos.js
476
+ ```
477
+ module.exports = { extractTodos }
478
+ function extractTodos(src) → {line:number, tag:string,
479
+ ```
480
+
481
+ ### src/extractors/toml.js
482
+ ```
483
+ module.exports = { extract }
484
+ function extract(src) → string[]
485
+ ```
486
+
487
+ ### src/extractors/typescript.js
488
+ ```
489
+ module.exports = { extract }
490
+ function extract(src) → string[]
491
+ function extractBlock(src, startIndex)
492
+ function extractInterfaceMembers(block)
493
+ function extractClassMembers(block)
494
+ function normalizeParams(params)
495
+ ```
496
+
497
+ ### src/extractors/typescript_react.js
498
+ ```
499
+ module.exports = { extract }
500
+ function extract(src) → string[]
501
+ ```
502
+
503
+ ### src/extractors/vue.js
504
+ ```
505
+ module.exports = { extract }
506
+ function extract(src) → string[]
507
+ function normalizeParams(params)
508
+ function normalizeType(type)
509
+ ```
510
+
511
+ ### src/extractors/vue_sfc.js
512
+ ```
513
+ module.exports = { extract }
514
+ function extract(src) → string[]
441
515
  ```
442
516
 
517
+ ### src/extractors/xml.js
443
518
  ### src/format/dashboard.js
444
519
  ```
445
- module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
446
- function toNumber(v)
447
- function percentile(values, p)
448
- function overBudgetStreak(entries)
449
- function loadConfig(cwd)
450
- function shouldExclude(rel, excludeSet)
451
- function detectLanguage(filePath)
452
- function walkFiles(dir, maxDepth, depth, out, excludeSet)
453
- function computeExtractorCoverage(cwd)
454
- function readBenchmarkTrend(cwd)
455
- function lineChartSvg(values, title, ySuffix)
456
- function barChartSvg(perLanguage)
457
- function sparkline(values)
458
- function buildDashboardData(cwd, health)
459
- function generateDashboardHtml(cwd, health)
460
- function renderHistoryCharts(cwd, health)
520
+ module.exports = { extract }
521
+ function extract(src) → string[]
461
522
  ```
462
523
 
463
- ### src/judge/judge-engine.js
524
+ ### src/extractors/yaml.js
464
525
  ```
465
- module.exports = { groundedness, judge }
466
- function tokenize(text)
467
- function groundedness(response, context)
468
- function extractContextFiles(context, cwd)
469
- function judge(response, context, opts = {})
526
+ module.exports = { extract }
527
+ function extract(src) → string[]
470
528
  ```
471
529
 
472
530
  ### src/format/benchmark-report.js
@@ -496,53 +554,83 @@ function generateBenchmarkReportHtml(reports, opts = {})
496
554
  function writeBenchmarkReport(cwd, opts = {})
497
555
  ```
498
556
 
499
- ### src/analysis/coverage-score.js
557
+ ### src/format/cache.js
500
558
  ```
501
- module.exports = { coverageScore, CODE_EXTS }
502
- function coverageScore(cwd, fileEntries, config)
503
- function _walk(dir, excludeSet, out)
559
+ module.exports = { formatCache, formatCachePayload }
560
+ function formatCache(content) string
561
+ function formatCachePayload(content, model) → string
504
562
  ```
505
563
 
506
- ### src/cache/sig-cache.js
564
+ ### src/format/dashboard.js
507
565
  ```
508
- module.exports = { loadCache, saveCache, getChangedFiles, updateCacheEntries }
509
- function cachePath(cwd)
510
- function loadCache(cwd, currentVersion) → Map<string, { mtime: numb
511
- function saveCache(cwd, currentVersion, cache)
512
- function getChangedFiles(files, cache) → { changed: string[], unch
513
- function updateCacheEntries(cache, extracted)
566
+ module.exports = { generateDashboardHtml, renderHistoryCharts, computeExtractorCoverage, percentile, overBudgetStreak }
567
+ function toNumber(v)
568
+ function percentile(values, p)
569
+ function overBudgetStreak(entries)
570
+ function loadConfig(cwd)
571
+ function shouldExclude(rel, excludeSet)
572
+ function detectLanguage(filePath)
573
+ function walkFiles(dir, maxDepth, depth, out, excludeSet)
574
+ function computeExtractorCoverage(cwd)
575
+ function readBenchmarkTrend(cwd)
576
+ function lineChartSvg(values, title, ySuffix)
577
+ function barChartSvg(perLanguage)
578
+ function sparkline(values)
579
+ function buildDashboardData(cwd, health)
580
+ function generateDashboardHtml(cwd, health)
581
+ function renderHistoryCharts(cwd, health)
514
582
  ```
515
583
 
516
- ### src/mcp/handlers.js
584
+ ### src/format/llm-txt.js
517
585
  ```
518
- module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
519
- function readContext(args, cwd)
520
- function searchSignatures(args, cwd)
521
- function getMap(args, cwd)
522
- function createCheckpoint(args, cwd)
523
- function getRouting(args, cwd)
524
- function explainFile(args, cwd)
525
- function listModules(args, cwd)
526
- function queryContext(args, cwd)
527
- function getImpact(args, cwd)
586
+ module.exports = { format, outputPath }
587
+ function outputPath(cwd)
588
+ function format(context, cwd, version)
528
589
  ```
529
590
 
530
- ### src/tracking/logger.js
591
+ ### src/format/llms-txt.js
531
592
  ```
532
- module.exports = { logRun, readLog, summarize }
533
- function logRun(entry, cwd)
534
- function readLog(cwd) → object[]
535
- function summarize(entries) → object
593
+ module.exports = { format, outputPath }
594
+ function outputPath(cwd)
595
+ function getShortCommit(cwd)
596
+ function detectVersion(cwd)
597
+ function format(context, cwd, writtenFiles, sigmapVersion)
536
598
  ```
537
599
 
538
- ### src/extractors/typescript.js
600
+ ### src/graph/builder.js
539
601
  ```
540
- module.exports = { extract }
541
- function extract(src) → string[]
542
- function extractBlock(src, startIndex)
543
- function extractInterfaceMembers(block)
544
- function extractClassMembers(block)
545
- function normalizeParams(params)
602
+ module.exports = { build, buildFromCwd, extractFileDeps }
603
+ function resolveJsPath(dir, importStr, fileSet) → string|null
604
+ function extractFileDeps(filePath, content, fileSet) → string[]
605
+ function build(files, cwd) → { forward: Map<string,str
606
+ function buildFromCwd(cwd, opts) → { forward: Map<string,str
607
+ ```
608
+
609
+ ### src/graph/impact.js
610
+ ```
611
+ module.exports = { getImpact, analyzeImpact, formatImpact, formatImpactJSON }
612
+ function bfs(startFile, reverseGraph, maxDepth) → { direct: Set<string>, tr
613
+ function isTestFile(f)
614
+ function isRouteFile(f)
615
+ function getImpact(changedFile, graph, opts) → { * changed: string, * di
616
+ function analyzeImpact(changedFiles, cwd, opts) → { file: string, impact: o
617
+ function formatImpact(result) → string
618
+ function formatImpactJSON(result) → object
619
+ ```
620
+
621
+ ### src/health/scorer.js
622
+ ```
623
+ module.exports = { score }
624
+ function score(cwd) → { * score: number, * grad
625
+ ```
626
+
627
+ ### src/judge/judge-engine.js
628
+ ```
629
+ module.exports = { groundedness, judge }
630
+ function tokenize(text)
631
+ function groundedness(response, context)
632
+ function extractContextFiles(context, cwd)
633
+ function judge(response, context, opts = {})
546
634
  ```
547
635
 
548
636
  ### src/learning/weights.js
@@ -562,43 +650,52 @@ function exportWeights(cwd, outputPath)
562
650
  function importWeights(cwd, importPath, replace)
563
651
  ```
564
652
 
565
- ### src/config/loader.js
653
+ ### src/map/class-hierarchy.js
566
654
  ```
567
- module.exports = { loadConfig, loadBaseConfig }
568
- function loadBaseConfig(extendsVal, cwd)
569
- function detectAutoSrcDirs(cwd, excludeList) → string[]
570
- function _legacyDetectAutoSrcDirs(cwd, excludeList) → string[]
571
- function loadConfig(cwd) → object
572
- function deepClone(obj)
655
+ module.exports = { analyze }
656
+ function analyze(files, cwd)
573
657
  ```
574
658
 
575
- ### src/discovery/framework-detector.js
659
+ ### src/map/import-graph.js
576
660
  ```
577
- module.exports = { detectFrameworks }
578
- function detectFrameworks(cwd)
579
- function _readDeps(cwd)
580
- function _readFile(p)
581
- function _existsAnywhere(cwd, filename, maxDepth)
582
- function _walkFind(dir, name, depth)
661
+ module.exports = { analyze }
662
+ function extractImports(filePath, content, fileSet)
663
+ function resolveJsPath(dir, importStr, fileSet)
664
+ function detectCycles(graph)
665
+ function analyze(files, cwd)
583
666
  ```
584
667
 
585
- ### src/discovery/language-detector.js
668
+ ### src/map/route-table.js
586
669
  ```
587
- module.exports = { detectLanguages }
588
- function detectLanguages(cwd)
589
- function _walkDepth(dir, depth, extCount)
670
+ module.exports = { analyze }
671
+ function shouldSkipFile(rel)
672
+ function analyze(files, cwd)
590
673
  ```
591
674
 
675
+ ### src/mcp/handlers.js
592
676
  ### src/discovery/sigmapignore.js
593
677
  ```
594
- module.exports = { loadIgnorePatterns, matchesIgnorePattern }
595
- function loadIgnorePatterns(cwd)
596
- function matchesIgnorePattern(dirName, patterns)
678
+ module.exports = { readContext, searchSignatures, getMap, createCheckpoint, getRouting, explainFile, listModules, queryContext, getImpact }
679
+ function readContext(args, cwd)
680
+ function searchSignatures(args, cwd)
681
+ function getMap(args, cwd)
682
+ function createCheckpoint(args, cwd)
683
+ function getRouting(args, cwd)
684
+ function explainFile(args, cwd)
685
+ function listModules(args, cwd)
686
+ function queryContext(args, cwd)
687
+ function getImpact(args, cwd)
597
688
  ```
598
689
 
599
- ### src/discovery/source-root-registry.js
690
+ ### src/mcp/tools.js
600
691
  ```
601
- module.exports = { REGISTRY }
692
+ module.exports = { TOOLS }
693
+ ```
694
+
695
+ ### src/plan/planner.js
696
+ ```
697
+ module.exports = { createPlan }
698
+ function createPlan(goal, cwd, config)
602
699
  ```
603
700
 
604
701
  ### src/retrieval/ranker.js
@@ -616,10 +713,34 @@ function formatRankJSON(results, query) → object
616
713
  function detectIntent(query)
617
714
  ```
618
715
 
619
- ### src/plan/planner.js
716
+ ### src/retrieval/tokenizer.js
620
717
  ```
621
- module.exports = { createPlan }
622
- function createPlan(goal, cwd, config)
718
+ module.exports = { tokenize, STOP_WORDS }
719
+ function tokenize(text, opts) → string[]
720
+ ```
721
+
722
+ ### src/routing/classifier.js
723
+ ```
724
+ module.exports = { classify, classifyAll }
725
+ function classify(filePath, sigs) → 'fast'|'balanced'|'powerf
726
+ function classifyAll(fileEntries, cwd) → { fast: string[], balance
727
+ ```
728
+
729
+ ### src/routing/hints.js
730
+ ```
731
+ module.exports = { TIERS, formatRoutingSection }
732
+ function formatRoutingSection(groups) → string
733
+ ```
734
+
735
+ ### src/security/patterns.js
736
+ ```
737
+ module.exports = { PATTERNS }
738
+ ```
739
+
740
+ ### src/security/scanner.js
741
+ ```
742
+ module.exports = { scan }
743
+ function scan(signatures, filePath) → { safe: string[], redacte
623
744
  ```
624
745
 
625
746
  ### src/session/memory.js
@@ -632,17 +753,124 @@ function mergeSessionContext(scores, session, currentIntent)
632
753
  function clearSession(cwd)
633
754
  ```
634
755
 
635
- ### src/config/defaults.js
756
+ ### src/tracking/logger.js
636
757
  ```
637
- module.exports = { DEFAULTS }
758
+ module.exports = { logRun, readLog, summarize }
759
+ function logRun(entry, cwd)
760
+ function readLog(cwd) → object[]
761
+ function summarize(entries) → object
638
762
  ```
639
763
 
640
- ### src/discovery/source-root-scorer.js
764
+ ### src/eval/analyzer.js
641
765
  ```
642
- module.exports = { scoreCandidate, getRecentlyChangedDirs, ROOT_ENTRYPOINTS, JVM_PATH_PATTERN }
643
- function getRecentlyChangedDirs(cwd)
644
- function scoreCandidate(dirName, fullPath, context)
645
- function _countSourceFiles(dir, depth)
766
+ module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
767
+ function isDockerfile(name)
768
+ function getExtractorName(filePath)
769
+ function tokenCount(sigs)
770
+ function hasCoverage(filePath, cwd)
771
+ function loadExtractor(name, cwd)
772
+ function analyzeFiles(files, cwd, opts) → object[]
773
+ function formatAnalysisTable(stats, showSlow) → string
774
+ function formatAnalysisJSON(stats) → object
775
+ ```
776
+
777
+ ### src/discovery/language-detector.js
778
+ ### src/eval/usefulness-scorer.js
779
+ ```
780
+ module.exports = { scoreUsefulness, computeUsefulnessStats }
781
+ function scoreUsefulness(taskResult, rankingScore)
782
+ function computeUsefulnessStats(taskResults)
783
+ ```
784
+
785
+ ### src/workspace/detector.js
786
+ ```
787
+ module.exports = { detectWorkspaces, inferPackage, scopeToPackage }
788
+ function detectWorkspaces(cwd)
789
+ function inferPackage(query, workspaceDirs, cwd)
790
+ function _getMatchLength(name, token)
791
+ function scopeToPackage(filePath, packageDir)
792
+ ```
793
+
794
+ ### src/discovery/language-detector.js
795
+ ```
796
+ module.exports = { detectLanguages }
797
+ function detectLanguages(cwd)
798
+ function _walkDepth(dir, depth, extCount)
799
+ ```
800
+
801
+ ### src/discovery/source-root-registry.js
802
+ ```
803
+ module.exports = { REGISTRY }
804
+ ### src/discovery/language-detector.js
805
+ ```
806
+ module.exports = { detectLanguages }
807
+ function detectLanguages(cwd)
808
+ function _walkDepth(dir, depth, extCount)
809
+ ```
810
+
811
+ ### src/extractors/gdscript.js
812
+ ```
813
+ module.exports = { extract }
814
+ function extract(src) → string[]
815
+ function extractInnerMembers(stripped, startIndex)
816
+ function normalizeParams(params)
817
+ ### src/discovery/source-root-registry.js
818
+ ```
819
+ module.exports = { REGISTRY }
820
+ ```
821
+
822
+ ### src/eval/analyzer.js
823
+ ```
824
+ module.exports = { analyzeFiles, formatAnalysisTable, formatAnalysisJSON }
825
+ function isDockerfile(name)
826
+ function getExtractorName(filePath)
827
+ function tokenCount(sigs)
828
+ function hasCoverage(filePath, cwd)
829
+ function loadExtractor(name, cwd)
830
+ function analyzeFiles(files, cwd, opts) → object[]
831
+ function formatAnalysisTable(stats, showSlow) → string
832
+ function formatAnalysisJSON(stats) → object
833
+ ```
834
+
835
+ ### src/extractors/python.js
836
+ ```
837
+ module.exports = { extract, tryNativeExtract }
838
+ function tryNativeExtract(filePath) → string[]|null
839
+ function extract(src, filePath) → string[]
840
+ function extractClassMethods(stripped, startIndex)
841
+ function tryExtractDataclassFields(stripped, classIndex)
842
+ function tryExtractBaseModelFields(stripped, bodyStart)
843
+ function extractClassConstants(stripped, startIndex)
844
+ function extractReturnType(sigLine)
845
+ function normalizeParams(params)
846
+ function extractDocHint(src, fnName, fnSigLine)
847
+ ```
848
+
849
+ ### src/extractors/python_ast.py
850
+ ```
851
+ def annotation_to_str(node) # Convert an AST annotation node to a string representation
852
+ def format_args(args_node) # Format a function arguments node into a compact signature st
853
+ def get_decorator_names(node) # Return a list of decorator name strings for a function/class
854
+ def is_dataclass(node)
855
+ def is_basemodel(bases) # Check if class bases include BaseModel or BaseSettings
856
+ def is_optional_annotation(annotation) # Check if an annotation represents an Optional type
857
+ def get_docstring_hint(node) # Extract first sentence of docstring, if present
858
+ def extract_dataclass_fields(class_node) # Return a collapsed fields string for a @dataclass class
859
+ def extract_basemodel_fields(class_node) # Return a compact {required*, optional
860
+ def extract_class_constants(class_node) # Yield ALL_CAPS constant assignments from class body
861
+ def extract_method_sig(func_node) # Format a method signature string (already indented by caller
862
+ def extract_function_sig(func_node, src_lines) # Format a top-level function signature string
863
+ def extract_fastapi_routes(tree, src_lines) # Extract FastAPI route signatures from top-level decorated fu
864
+ def extract(filepath)
865
+ def main()
866
+ ```
867
+
868
+ ### src/extractors/r.js
869
+ ```
870
+ module.exports = { extract }
871
+ function extract(src) → string[]
872
+ function readBalancedParens(src, openIdx, cap = 4096)
873
+ function normalizeParams(raw)
646
874
  ```
647
875
 
648
876
  ### src/discovery/source-root-resolver.js
@@ -656,11 +884,13 @@ function _dedupeNested(scored)
656
884
  function _computeConfidence(frameworks, languages, scoredCount)
657
885
  ```
658
886
 
659
- ### src/eval/usefulness-scorer.js
887
+ ### src/map/import-graph.js
660
888
  ```
661
- module.exports = { scoreUsefulness, computeUsefulnessStats }
662
- function scoreUsefulness(taskResult, rankingScore)
663
- function computeUsefulnessStats(taskResults)
889
+ module.exports = { analyze, extractImports }
890
+ function extractImports(filePath, content, fileSet)
891
+ function resolveJsPath(dir, importStr, fileSet)
892
+ function detectCycles(graph)
893
+ function analyze(files, cwd)
664
894
  ```
665
895
 
666
896
  ### src/mcp/server.js
@@ -671,12 +901,3 @@ function respondError(id, code, message)
671
901
  function dispatch(msg, cwd)
672
902
  function start(cwd)
673
903
  ```
674
-
675
- ### src/workspace/detector.js
676
- ```
677
- module.exports = { detectWorkspaces, inferPackage, scopeToPackage }
678
- function detectWorkspaces(cwd)
679
- function inferPackage(query, workspaceDirs, cwd)
680
- function _getMatchLength(name, token)
681
- function scopeToPackage(filePath, packageDir)
682
- ```