sigmap 6.14.0 → 7.0.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 +798 -401
- package/CHANGELOG.md +52 -0
- package/README.md +11 -11
- package/gen-context.js +3432 -1197
- package/llms-full.txt +295 -0
- package/llms.txt +56 -0
- package/package.json +31 -13
- package/packages/adapters/claude.js +0 -6
- package/packages/adapters/codex.js +1 -61
- package/packages/adapters/copilot.js +0 -8
- package/packages/adapters/cursor.js +0 -4
- package/packages/adapters/gemini.js +0 -2
- package/packages/adapters/openai.js +0 -2
- package/packages/adapters/windsurf.js +0 -4
- package/packages/cli/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/src/extractors/prdiff.js +28 -3
- package/src/format/usage-guidance.js +28 -0
- package/src/format/verify-report.js +164 -0
- package/src/mcp/handlers.js +44 -1
- package/src/mcp/server.js +4 -3
- package/src/mcp/tools.js +20 -2
- package/src/nudge.js +97 -0
- package/src/session/notes.js +99 -0
- package/src/squeeze/cilog.js +71 -0
- package/src/squeeze/classify.js +115 -0
- package/src/squeeze/index.js +69 -0
- package/src/squeeze/jsonpayload.js +54 -0
- package/src/squeeze/stacktrace.js +135 -0
- package/src/verify/closest-match.js +145 -0
- package/src/verify/hallucination-guard.js +109 -18
- package/src/verify/parsers.js +51 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,54 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [7.0.0] — 2026-06-14
|
|
14
|
+
|
|
15
|
+
Major release — **Squeeze** makes `ask` minimize pasted input by default, a behavioral change to the core command.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Squeeze — input minimization (#238):** `sigmap ask` now classifies a pasted blob (stack trace / CI log / JSON) and minimizes it before ranking — deduping frames, stripping vendor noise, collapsing repeated array items — and **enriches the top stack frame** with its real signature from the symbol index. New `sigmap squeeze <file|->` command and `--squeeze` (auto-accept), `--no-squeeze`, `--squeeze-threshold N` flags. New `src/squeeze/{classify,cilog,stacktrace,jsonpayload,index}.js`; zero-dep, deterministic, offline.
|
|
19
|
+
- **Star Nudge (#238):** a one-time, race-safe GitHub-star prompt after ≥10 runs / ≥8 successes (`.context/usage.json`).
|
|
20
|
+
- **`llms.txt` + `llms-full.txt` generator (#243):** SigMap's own LLM reference is generated from source of truth (MCP tools, config keys, languages, `version.json` metrics, CLI help), validated in CI so it can never go stale, and published to the docs site + repo root. `npm run generate:llms` / `validate:llms`; `prepublishOnly` regenerates before publish.
|
|
21
|
+
- **npm discoverability + GitHub Sponsors (#241):** benefit-driven description, 20 keywords, `funding` field + `.github/FUNDING.yml`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- **BREAKING: `sigmap ask` now classifies its input and may prompt** to minimize large pasted stack traces / logs / JSON before ranking. Interactive only — piped/CI usage is unaffected (no prompt), and `--no-squeeze` fully disables it.
|
|
25
|
+
- **Token budget keeps full signatures (#240):** when context exceeds `maxTokens`, low-priority files are dropped (and only marginal overflow collapses to anchors) — signatures keep their parameters/return types instead of being gutted to bare line anchors. The repo's own context config raises `maxTokens` (auto-scaling off) so it fits all files with full signatures.
|
|
26
|
+
- **One consistent usage block (#240):** every generated context file (CLAUDE.md / AGENTS.md / copilot-instructions.md / …) now carries a single canonical `## SigMap commands` block emitted from `formatOutput`; the redundant `## Tools` JSON in AGENTS.md was removed.
|
|
27
|
+
- **Benchmark repos pinned to fixed commits (#236):** retrieval/token benchmarks now clone pinned SHAs, so metrics move only when SigMap changes — not when upstream repos do.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- **Signatures no longer gutted under budget (#240):** the headline regression in the generated context files is resolved (see Changed).
|
|
31
|
+
- **prdiff symbol-name extraction (#247):** the changes block no longer emits phantom 2-char fragments (e.g. `+is`/`~is`); `extractName` now handles `export class`, `const x = () =>`, async/visibility modifiers, and returns nothing for re-export lines.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## [6.15.0] — 2026-06-09
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- **`verify-ai-output` — Hallucination Guard Reliable MVP (Phase 1, #232):**
|
|
39
|
+
- Two new deterministic detectors — **`fake-test-file`** (a referenced `*.test`/`*.spec`/`__tests__`/`test_*.py` path absent on disk, reported separately from `fake-file`) and **`fake-npm-script`** (`npm run X` where `X` is not a `package.json` script).
|
|
40
|
+
- **Closest-match suggestions** (`src/verify/closest-match.js`) — Levenshtein + file-proximity over the symbol index attaches a heuristic hint to flagged names ("Did you mean `loadConfig()` in `src/config/loader.js:42`?"). Labeled as heuristic, with its own confidence bucketing.
|
|
41
|
+
- **Finalized JSON schema** — every issue now carries `{ type, value, line, location, message, confidence, suggestion }`; `summary` gains `withSuggestion`. Detection confidence is `high` for path/dep/script checks and `medium` for symbol checks.
|
|
42
|
+
- **Parser hardening** — multi-line `import { … } from '…'` statements and TypeScript `import X = require('…')` are now detected; `npm`/`pnpm`/`yarn run` script references are extracted.
|
|
43
|
+
- **HTML report view** (`src/format/verify-report.js`) — `sigmap verify-ai-output <answer> --report [out.html]` writes a standalone, self-contained red/amber/green report (no external assets/scripts); a Markdown renderer shares the same structure for CI/PR comments.
|
|
44
|
+
- **Proof harness** — `npm run benchmark:verify` scores each detector group against labeled cases and enforces precision targets (file ≥ 95%, import ≥ 85%, symbol ≥ 75%, script ≥ 95%), emitting a precision/recall CSV. Runs offline via a synthetic self-test; point it at real repos with `--manifest`.
|
|
45
|
+
- New guide: `docs-vp/guide/verify-ai-output.md`.
|
|
46
|
+
- **Memory tools — `note`, `status`, and the `read_memory` MCP tool (Phase 1.5, #233):** closes the cold-start gap so an agent can recall *what we were doing and why* without re-scanning the repo.
|
|
47
|
+
- **`sigmap note "<text>"`** — append to a cross-session decision log stored as append-only NDJSON at `.context/notes.ndjson` (each entry records text, ISO timestamp, and git branch). `sigmap note` with no text lists recent notes (`--list <N>`, `--json`). New module `src/session/notes.js`.
|
|
48
|
+
- **`sigmap status`** — repo state at a glance: branch (with an unborn-branch fallback), dirty-file count, last index run (time, version, file count) with a **staleness** signal (tracked files modified since the last index), and notes summary. `--json` supported.
|
|
49
|
+
- **`read_memory` MCP tool (11th tool)** — returns recent notes (most recent first) plus the last ranking-session focus from `ask`, formatted for agent consumption. Registered in `src/mcp/tools.js`, `handlers.js`, and `server.js`; bundled into the standalone binary.
|
|
50
|
+
- New guide: `docs-vp/guide/memory.md`.
|
|
51
|
+
- The `verify-ai-output` (29 cases) and new `memory-tools` (13 cases) integration suites are now part of `npm run test:integration`.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- MCP server now exposes **11 tools** (was 10) with the addition of `read_memory`; `version.json` `mcp_tools`, the `mcp.md` guide, and all tool-count test gates updated accordingly.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
- `npm run test:integration` referenced a non-existent `test/integration/mcp-server.test.js`; corrected to `test/integration/mcp/server.test.js`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
13
61
|
## [6.14.0] — 2026-06-07
|
|
14
62
|
|
|
15
63
|
### Added
|
|
@@ -20,6 +68,10 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
20
68
|
- Markdown report by default, `--json` for CI (`{ file, issues, summary }`). Exits `1` when any issue is found, `0` when clean.
|
|
21
69
|
- New modules `src/verify/parsers.js` (file/import/symbol/code-block extraction) and `src/verify/hallucination-guard.js` (`verify(answerText, cwd, opts)`); all external lookups are injectable so the core is unit-testable.
|
|
22
70
|
|
|
71
|
+
### Fixed
|
|
72
|
+
|
|
73
|
+
- **Standalone binary build:** registered the new `src/verify/parsers` and `src/verify/hallucination-guard` modules in the `gen-context.js` `__factories` bundle. Without them the Release Binaries (Node SEA) build failed its pre-flight check (`missing from __factories`); `requireSourceOrBundled` falls back to `__require` in the single-file binary where `src/` is not present.
|
|
74
|
+
|
|
23
75
|
---
|
|
24
76
|
|
|
25
77
|
## [6.13.0] — 2026-06-05
|
package/README.md
CHANGED
|
@@ -47,10 +47,10 @@ SigMap extracts function and class signatures from your codebase and feeds the r
|
|
|
47
47
|
|
|
48
48
|
## Why SigMap?
|
|
49
49
|
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
53
|
-
- **1.
|
|
50
|
+
- **75.6% hit@5** — right file found in top 5 results (vs 13.6% baseline)
|
|
51
|
+
- **97.0% token reduction** — average across 21 real repos
|
|
52
|
+
- **52.2% task success rate** — up from 10% without context
|
|
53
|
+
- **1.72 prompts per task** — down from 2.84 (39.4% fewer retries)
|
|
54
54
|
- **31 languages supported** — TypeScript, Python, Go, Rust, Java, R, and 25 others
|
|
55
55
|
- **No vendor lock-in** — works with any AI assistant or local LLM
|
|
56
56
|
- **No API costs** — use local models (Ollama, llama.cpp, vLLM) with zero token fees
|
|
@@ -63,7 +63,7 @@ SigMap extracts function and class signatures from your codebase and feeds the r
|
|
|
63
63
|
|
|
64
64
|
| Without SigMap | With SigMap |
|
|
65
65
|
|---|---|
|
|
66
|
-
| ❌ Guessing which files are relevant | ✅ Right file in context —
|
|
66
|
+
| ❌ Guessing which files are relevant | ✅ Right file in context — 76% of the time |
|
|
67
67
|
| ❌ Sending the full repo to your AI | ✅ Minimal context — only what matters |
|
|
68
68
|
| ❌ Embeddings / vector DB required | ✅ Grounded answers, no infra needed |
|
|
69
69
|
|
|
@@ -87,13 +87,13 @@ Ask → Rank → Context → Validate → Judge → Learn
|
|
|
87
87
|
## Benchmark
|
|
88
88
|
|
|
89
89
|
```
|
|
90
|
-
Benchmark : sigmap-
|
|
91
|
-
Date : 2026-06-
|
|
90
|
+
Benchmark : sigmap-v7.0-main (21 repositories, including R language)
|
|
91
|
+
Date : 2026-06-14
|
|
92
92
|
|
|
93
|
-
Hit@5 :
|
|
94
|
-
Token reduction:
|
|
95
|
-
Prompt reduction :
|
|
96
|
-
Task success :
|
|
93
|
+
Hit@5 : 75.6% (baseline 13.6% — 5.6× lift)
|
|
94
|
+
Token reduction: 97.0% (across 21 repos)
|
|
95
|
+
Prompt reduction : 39.4% (2.84 → 1.72 prompts per task)
|
|
96
|
+
Task success : 52.2% (baseline 10%)
|
|
97
97
|
Repos tested : 21 (JavaScript, Python, Go, Rust, Java, R, C++, C#, Dart, Swift, Ruby, PHP, Scala, Kotlin, and more)
|
|
98
98
|
```
|
|
99
99
|
|