sigmap 2.6.0 → 2.8.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/CHANGELOG.md +57 -1
- package/README.md +19 -22
- package/gen-context.js +1 -1
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/README.md +2 -4
- package/packages/core/package.json +1 -1
- package/src/mcp/server.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,63 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## [2.
|
|
9
|
+
## [2.8.0] — upcoming · [#21](https://github.com/manojmallick/sigmap/issues/21) · branch: `feat/v2.8-snippet-retrieval`
|
|
10
|
+
|
|
11
|
+
### Planned additions
|
|
12
|
+
- **Snippet extraction** — `src/retrieval/snippets.js`: extract relevant code blocks (functions, classes, methods) from ranked files
|
|
13
|
+
- **Hybrid scoring** — combine file-level relevance with snippet-level relevance; snippets inherit file score + get their own local score
|
|
14
|
+
- **`--query --snippets` CLI flag** — return top-k snippets (not full file sigs), with line numbers and context
|
|
15
|
+
- **`query_context` MCP enhancement** — add `snippets: true` option; response includes snippet text + line ranges
|
|
16
|
+
- **Smart context window** — include 2-3 lines before/after snippet for context
|
|
17
|
+
- **Configuration** — `retrieval.snippets: { enabled: true, minLines: 3, maxSnippets: 5 }`
|
|
18
|
+
- **`test/integration/snippets.test.js`** — 12 tests: snippet extraction, scoring, line number accuracy, context window
|
|
19
|
+
|
|
20
|
+
### Go / No-go criteria
|
|
21
|
+
- All tests green (21 extractor + all integration)
|
|
22
|
+
- `--query "extract signatures" --snippets` returns 3-5 relevant snippets with correct line numbers
|
|
23
|
+
- MCP `query_context` with `snippets: true` returns snippet text
|
|
24
|
+
- Snippet relevance improves precision@3 by ≥10% over full-file retrieval
|
|
25
|
+
- Performance: <150ms for 1000-file repos with snippets enabled
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## [2.7.0] — 2026-04-05 · [#19](https://github.com/manojmallick/sigmap/issues/19)
|
|
30
|
+
|
|
31
|
+
### Planned additions
|
|
32
|
+
- **Fine-tuned ranking weights** — optimize `exactToken`, `symbolMatch`, `prefixMatch`, `pathMatch`, and `recencyBoost` weights in `src/retrieval/ranker.js` based on benchmark-driven evaluation
|
|
33
|
+
- **TF-IDF scoring option** — add TF-IDF (term frequency-inverse document frequency) as an alternative scoring method for better semantic relevance in large codebases
|
|
34
|
+
- **Configurable weight presets** — `precision`, `balanced`, `recall` presets for different use cases; configurable via `retrieval.preset` in config
|
|
35
|
+
- **`formatRankTable` and `formatRankJSON` improvements** — better output formatting for ranked results with score breakdown and relevance explanation
|
|
36
|
+
- **Performance optimization** — optimize ranking algorithm for large codebases (10K+ files), target <100ms for --query on 1000-file repos
|
|
37
|
+
- **Regression tests** — ensure hit@5 maintains ≥ 0.80 (no regression from v2.6)
|
|
38
|
+
- **Precision improvement** — target precision@5 improvement of ≥ 5% over v2.6
|
|
39
|
+
|
|
40
|
+
### Config additions
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"retrieval": {
|
|
44
|
+
"topK": 10,
|
|
45
|
+
"recencyBoost": 1.5,
|
|
46
|
+
"preset": "balanced",
|
|
47
|
+
"weights": {
|
|
48
|
+
"exactToken": 1.0,
|
|
49
|
+
"symbolMatch": 0.5,
|
|
50
|
+
"prefixMatch": 0.3,
|
|
51
|
+
"pathMatch": 0.8
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Go / No-go criteria
|
|
58
|
+
- All tests green (21 extractor + all integration suites)
|
|
59
|
+
- Benchmark hit@5 ≥ 0.80 (no regression from v2.6)
|
|
60
|
+
- Precision@5 improves by ≥ 5%
|
|
61
|
+
- `--query` performance <100ms for 1000-file repos
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## [2.6.0] — 2026-04-05 · [#16](https://github.com/manojmallick/sigmap/issues/16)
|
|
10
66
|
|
|
11
67
|
### Planned additions
|
|
12
68
|
- **`benchmarks/repos/`** — register 5 real open-source repos (express, flask, gin, spring-petclinic, rails) as git submodules or clone targets for evaluation
|
package/README.md
CHANGED
|
@@ -86,28 +86,6 @@ AI agent session starts with full context
|
|
|
86
86
|
|
|
87
87
|
---
|
|
88
88
|
|
|
89
|
-
## 🔭 What's next — v2.5-v2.6 (in progress · [#14](https://github.com/manojmallick/sigmap/issues/14) · [#16](https://github.com/manojmallick/sigmap/issues/16))
|
|
90
|
-
|
|
91
|
-
### v2.5 — Impact Layer
|
|
92
|
-
|
|
93
|
-
| Feature | Description |
|
|
94
|
-
|---|---|
|
|
95
|
-
| **`--impact <file>`** | Show every file that transitively depends on a changed file — instant blast-radius awareness |
|
|
96
|
-
| **`--impact --json`** | Machine-readable output for CI pipelines |
|
|
97
|
-
| **`get_impact` MCP tool** | 9th MCP tool — `{ file, depth? }` → impacted files + signatures |
|
|
98
|
-
| **`src/map/dep-graph.js`** | Reverse-dependency graph built from the import analysis; circular deps handled safely |
|
|
99
|
-
| **15 new tests** | `impact.test.js` — direct deps, transitive deps, depth limit, JSON output |
|
|
100
|
-
|
|
101
|
-
### v2.6 — Research Mode
|
|
102
|
-
|
|
103
|
-
| Feature | Description |
|
|
104
|
-
|---|---|
|
|
105
|
-
| **`--benchmark --repo <path>`** | Run benchmarks against any external repository (express, flask, gin, spring-petclinic, rails) |
|
|
106
|
-
| **`--report --paper`** | Generate paper-ready metrics: markdown + LaTeX tables for academic publishing |
|
|
107
|
-
| **50 real eval tasks** | JSONL task file covering 5 real open-source repos — `benchmarks/tasks/retrieval-real.jsonl` |
|
|
108
|
-
| **`src/eval/paper.js`** | Zero-dependency LaTeX table formatter for token reduction, hit@5, MRR, latency (p50/p95/p99) |
|
|
109
|
-
| **8 new tests** | `paper.test.js` — report generation, LaTeX syntax validation, graceful failures |
|
|
110
|
-
|
|
111
89
|
## 🆕 What's new in 2.4
|
|
112
90
|
|
|
113
91
|
| Feature | Description |
|
|
@@ -132,6 +110,25 @@ AI agent session starts with full context
|
|
|
132
110
|
|
|
133
111
|
---
|
|
134
112
|
|
|
113
|
+
## 🔭 What's next — v2.8 (in progress · [#21](https://github.com/manojmallick/sigmap/issues/21))
|
|
114
|
+
|
|
115
|
+
### v2.8 — Hybrid Depth: Snippet Retrieval
|
|
116
|
+
|
|
117
|
+
| Feature | Description |
|
|
118
|
+
|---|---|
|
|
119
|
+
| **Snippet extraction** | Extract relevant code blocks (functions, classes, methods) from ranked files |
|
|
120
|
+
| **Hybrid scoring** | Combine file-level + snippet-level relevance for precision |
|
|
121
|
+
| **`--query --snippets`** | Return top-k snippets with line numbers and context (not full files) |
|
|
122
|
+
| **MCP enhancement** | `query_context` with `snippets: true` returns snippet text + line ranges |
|
|
123
|
+
| **Smart context** | Include 2-3 lines before/after each snippet for readability |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
| **`get_impact` MCP tool** | 9th MCP tool — `{ file, depth? }` → impacted files + signatures |
|
|
127
|
+
| **`src/map/dep-graph.js`** | Reverse-dependency graph built from the import analysis; circular deps handled safely |
|
|
128
|
+
| **15 new tests** | `impact.test.js` — direct deps, transitive deps, depth limit, JSON output |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
135
132
|
## 🚀 Quick start
|
|
136
133
|
|
|
137
134
|
**No install required — just Node.js 18+.**
|
package/gen-context.js
CHANGED
|
@@ -4304,7 +4304,7 @@ const path = require('path');
|
|
|
4304
4304
|
const os = require('os');
|
|
4305
4305
|
const { execSync } = require('child_process');
|
|
4306
4306
|
|
|
4307
|
-
const VERSION = '2.
|
|
4307
|
+
const VERSION = '2.8.0';
|
|
4308
4308
|
const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
|
|
4309
4309
|
|
|
4310
4310
|
function requireSourceOrBundled(key) {
|
package/package.json
CHANGED
package/packages/core/README.md
CHANGED
|
@@ -128,11 +128,9 @@ const health = score('/path/to/project');
|
|
|
128
128
|
|
|
129
129
|
All existing CLI flags (`--generate`, `--watch`, `--mcp`, `--query`, `--analyze`, `--benchmark`, `--health`, …) are unchanged.
|
|
130
130
|
|
|
131
|
-
## What's next — v2.
|
|
131
|
+
## What's next — v2.8
|
|
132
132
|
|
|
133
|
-
v2.
|
|
134
|
-
|
|
135
|
-
v2.6 adds benchmark and paper reporting capabilities — run evaluations against external repos and export metrics in LaTeX format for academic papers. See [issue #16](https://github.com/manojmallick/sigmap/issues/16).
|
|
133
|
+
v2.8 adds hybrid depth snippet retrieval — return not just relevant files, but the exact code snippets within those files. Includes `--query --snippets` CLI flag and `snippets: true` option for MCP `query_context`. See [issue #21](https://github.com/manojmallick/sigmap/issues/21).
|
|
136
134
|
|
|
137
135
|
See the full [roadmap](https://manojmallick.github.io/sigmap/roadmap.html).
|
|
138
136
|
|
package/src/mcp/server.js
CHANGED