sigmap 3.3.0 → 3.3.1
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 +11 -0
- package/README.md +53 -42
- package/gen-context.js +26 -7
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,17 @@ Format: [Semantic Versioning](https://semver.org/)
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [3.3.1] — 2026-04-10 — Patch: `--each --adapter` flag combination
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **`--each --adapter <name>` now works correctly** · [#37](https://github.com/manojmallick/sigmap/issues/37)
|
|
17
|
+
- Running `sigmap --each --adapter claude` (or any adapter) from a parent directory containing multiple git repos now correctly writes the chosen adapter output (e.g. `CLAUDE.md`) inside each sub-repo.
|
|
18
|
+
- Root cause: the `--adapter` handler ran before `--each` in `main()`, so `--each` was never reached when both flags were supplied together. The `--each` block is now evaluated first.
|
|
19
|
+
- `runEach()` accepts an optional `adapterOverride` parameter that merges `outputs`/`adapters` into each sub-repo's config before calling `runGenerate`, mirroring how the standalone `--adapter` flag works.
|
|
20
|
+
- Invalid adapter names passed alongside `--each` now exit non-zero with a clear error message listing valid adapters.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
13
24
|
## [3.3.0] — 2026-04-08 — Context-Aware CLI & Command Switcher
|
|
14
25
|
|
|
15
26
|
### Added
|
package/README.md
CHANGED
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
Multiple install options. Zero runtime dependencies. Requires only Node.js 18+.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
+
<img src="docs/sigmap-banner.png" alt="SigMap — AI context engine" width="700">
|
|
13
|
+
|
|
12
14
|
<!-- Status -->
|
|
13
15
|
[](https://www.npmjs.com/package/sigmap)
|
|
14
|
-
[](https://github.com/manojmallick/sigmap/actions/workflows/ci.yml)
|
|
15
17
|
[](package.json)
|
|
16
18
|
[](https://github.com/manojmallick/sigmap/commits/main)
|
|
17
19
|
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
|---|---|
|
|
40
42
|
| [What it does](#-what-it-does) | Token reduction table, pipeline overview |
|
|
41
43
|
| [Quick start](#-quick-start) | Install (binary or npm), generate in 60 seconds |
|
|
42
|
-
| [Standalone binaries](docs/binaries.md) | macOS, Linux, Windows — no Node required |
|
|
44
|
+
| [Standalone binaries](docs/readmes/binaries.md) | macOS, Linux, Windows — no Node required |
|
|
43
45
|
| [VS Code extension](#-vs-code-extension) | Status bar, stale alerts, commands |
|
|
44
46
|
| [JetBrains plugin](#-jetbrains-plugin) | IntelliJ IDEA, WebStorm, PyCharm support |
|
|
45
47
|
| [Languages supported](#-languages-supported) | 21 languages |
|
|
@@ -53,7 +55,7 @@
|
|
|
53
55
|
| [Project structure](#-project-structure) | File-by-file map |
|
|
54
56
|
| [Principles](#-principles) | Design decisions |
|
|
55
57
|
|
|
56
|
-
> 📖 **New to SigMap?** Read the **[Complete Getting Started Guide](docs/GETTING_STARTED.md)** — token savings walkthrough, every command, VS Code plugin, and CI setup.
|
|
58
|
+
> 📖 **New to SigMap?** Read the **[Complete Getting Started Guide](docs/readmes/GETTING_STARTED.md)** — token savings walkthrough, every command, VS Code plugin, and CI setup.
|
|
57
59
|
|
|
58
60
|
---
|
|
59
61
|
|
|
@@ -198,7 +200,7 @@ shasum -a 256 sigmap-darwin-arm64
|
|
|
198
200
|
# Compare with sigmap-checksums.txt
|
|
199
201
|
```
|
|
200
202
|
|
|
201
|
-
Full guide: [docs/binaries.md](docs/binaries.md)
|
|
203
|
+
Full guide: [docs/readmes/binaries.md](docs/readmes/binaries.md)
|
|
202
204
|
|
|
203
205
|
</details>
|
|
204
206
|
|
|
@@ -327,7 +329,7 @@ chmod +x ./sigmap-darwin-arm64
|
|
|
327
329
|
./sigmap-darwin-arm64
|
|
328
330
|
```
|
|
329
331
|
|
|
330
|
-
See [docs/binaries.md](docs/binaries.md) for Gatekeeper / SmartScreen notes and checksum verification.
|
|
332
|
+
See [docs/readmes/binaries.md](docs/readmes/binaries.md) for Gatekeeper / SmartScreen notes and checksum verification.
|
|
331
333
|
|
|
332
334
|
**npm** (requires Node.js 18+):
|
|
333
335
|
|
|
@@ -402,7 +404,7 @@ The `jetbrains-plugin/` directory contains a Kotlin-based plugin for JetBrains I
|
|
|
402
404
|
|
|
403
405
|
Compatible with **IntelliJ IDEA 2024.1+** (Community & Ultimate), **WebStorm**, **PyCharm**, **GoLand**, **RubyMine**, **PhpStorm**, and all other IntelliJ-based IDEs.
|
|
404
406
|
|
|
405
|
-
**Install:** [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/31109-sigmap--ai-context-engine/) | [Manual setup guide](docs/JETBRAINS_SETUP.md)
|
|
407
|
+
**Install:** [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/31109-sigmap--ai-context-engine/) | [Manual setup guide](docs/readmes/JETBRAINS_SETUP.md)
|
|
406
408
|
|
|
407
409
|
---
|
|
408
410
|
|
|
@@ -484,7 +486,7 @@ One `.github/context-<module>.md` per top-level source directory, plus a tiny ov
|
|
|
484
486
|
|
|
485
487
|
Recently committed files are **hot** (auto-injected). Everything else is **cold** (on-demand via MCP). Best reduction available — ~200 tokens always-on.
|
|
486
488
|
|
|
487
|
-
📖 Full guide: [docs/CONTEXT_STRATEGIES.md](docs/CONTEXT_STRATEGIES.md) — decision tree, scenario comparisons, migration steps.
|
|
489
|
+
📖 Full guide: [docs/readmes/CONTEXT_STRATEGIES.md](docs/readmes/CONTEXT_STRATEGIES.md) — decision tree, scenario comparisons, migration steps.
|
|
488
490
|
|
|
489
491
|
---
|
|
490
492
|
|
|
@@ -511,7 +513,7 @@ node gen-context.js --mcp
|
|
|
511
513
|
|
|
512
514
|
Reads files on every call — no stale state, no restart needed.
|
|
513
515
|
|
|
514
|
-
📖 Setup guide: [docs/MCP_SETUP.md](docs/MCP_SETUP.md)
|
|
516
|
+
📖 Setup guide: [docs/readmes/MCP_SETUP.md](docs/readmes/MCP_SETUP.md)
|
|
515
517
|
|
|
516
518
|
---
|
|
517
519
|
|
|
@@ -519,48 +521,57 @@ Reads files on every call — no stale state, no restart needed.
|
|
|
519
521
|
|
|
520
522
|
> See [CHANGELOG.md](CHANGELOG.md) for the full history.
|
|
521
523
|
|
|
524
|
+
All flags are the same regardless of how you invoke SigMap — swap the prefix to match your install:
|
|
525
|
+
|
|
526
|
+
> `sigmap` · `npx sigmap` · `gen-context` · `node gen-context.js`
|
|
527
|
+
|
|
528
|
+
<details>
|
|
529
|
+
<summary><strong>All flags</strong></summary>
|
|
530
|
+
|
|
522
531
|
```
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
532
|
+
sigmap Generate once and exit
|
|
533
|
+
sigmap --watch Generate and watch for file changes
|
|
534
|
+
sigmap --setup Generate + install git hook + start watcher
|
|
535
|
+
sigmap --diff Generate context for git-changed files only
|
|
536
|
+
sigmap --diff --staged Staged files only (pre-commit check)
|
|
537
|
+
sigmap --mcp Start MCP server on stdio
|
|
529
538
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
539
|
+
sigmap --query "<text>" Rank files by relevance to a query
|
|
540
|
+
sigmap --query "<text>" --json Ranked results as JSON
|
|
541
|
+
sigmap --query "<text>" --top <n> Limit results to top N files (default 10)
|
|
533
542
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
543
|
+
sigmap --analyze Per-file breakdown (sigs / tokens / extractor / coverage)
|
|
544
|
+
sigmap --analyze --json Analysis as JSON
|
|
545
|
+
sigmap --analyze --slow Include extraction timing per file
|
|
546
|
+
sigmap --diagnose-extractors Self-test all 21 extractors against fixtures
|
|
538
547
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
548
|
+
sigmap --benchmark Run retrieval quality benchmark (hit@5 / MRR)
|
|
549
|
+
sigmap --benchmark --json Benchmark results as JSON
|
|
550
|
+
sigmap --eval Alias for --benchmark
|
|
542
551
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
552
|
+
sigmap --report Token reduction stats
|
|
553
|
+
sigmap --report --json Structured JSON report (exits 1 if over budget)
|
|
554
|
+
sigmap --report --history Usage log summary
|
|
555
|
+
sigmap --report --history --json Usage history as JSON
|
|
547
556
|
|
|
548
|
-
|
|
549
|
-
|
|
557
|
+
sigmap --health Composite health score (0–100, grade A–D)
|
|
558
|
+
sigmap --health --json Machine-readable health JSON
|
|
550
559
|
|
|
551
|
-
|
|
552
|
-
|
|
560
|
+
sigmap --suggest-tool "<task>" Recommend model tier for a task
|
|
561
|
+
sigmap --suggest-tool "<task>" --json Machine-readable tier recommendation
|
|
553
562
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
563
|
+
sigmap --monorepo Per-package context for monorepos (packages/, apps/, services/)
|
|
564
|
+
sigmap --each Process each sub-repo under a parent directory
|
|
565
|
+
sigmap --routing Include model routing hints in output
|
|
566
|
+
sigmap --format cache Write Anthropic prompt-cache JSON
|
|
567
|
+
sigmap --track Append run metrics to .context/usage.ndjson
|
|
559
568
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
569
|
+
sigmap --init Write config + .contextignore scaffold
|
|
570
|
+
sigmap --version Version string
|
|
571
|
+
sigmap --help Usage information
|
|
563
572
|
```
|
|
573
|
+
</details>
|
|
574
|
+
|
|
564
575
|
|
|
565
576
|
### Task classification — `--suggest-tool`
|
|
566
577
|
|
|
@@ -689,7 +700,7 @@ Copy `examples/self-healing-github-action.yml` to `.github/workflows/` to auto-r
|
|
|
689
700
|
run: node gen-context.js
|
|
690
701
|
```
|
|
691
702
|
|
|
692
|
-
📖 Full guide: [docs/ENTERPRISE_SETUP.md](docs/ENTERPRISE_SETUP.md)
|
|
703
|
+
📖 Full guide: [docs/readmes/ENTERPRISE_SETUP.md](docs/readmes/ENTERPRISE_SETUP.md)
|
|
693
704
|
|
|
694
705
|
### Prompt caching — 60% API cost reduction
|
|
695
706
|
|
|
@@ -699,7 +710,7 @@ node gen-context.js --format cache
|
|
|
699
710
|
# Format: { type: 'text', text: '...', cache_control: { type: 'ephemeral' } }
|
|
700
711
|
```
|
|
701
712
|
|
|
702
|
-
📖 Full guide: [docs/REPOMIX_CACHE.md](docs/REPOMIX_CACHE.md)
|
|
713
|
+
📖 Full guide: [docs/readmes/REPOMIX_CACHE.md](docs/readmes/REPOMIX_CACHE.md)
|
|
703
714
|
|
|
704
715
|
---
|
|
705
716
|
|
package/gen-context.js
CHANGED
|
@@ -5049,7 +5049,7 @@ const path = require('path');
|
|
|
5049
5049
|
const os = require('os');
|
|
5050
5050
|
const { execSync } = require('child_process');
|
|
5051
5051
|
|
|
5052
|
-
const VERSION = '3.3.
|
|
5052
|
+
const VERSION = '3.3.1';
|
|
5053
5053
|
const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
|
|
5054
5054
|
|
|
5055
5055
|
function requireSourceOrBundled(key) {
|
|
@@ -6257,7 +6257,7 @@ function detectRepoDirs(cwd) {
|
|
|
6257
6257
|
return repos;
|
|
6258
6258
|
}
|
|
6259
6259
|
|
|
6260
|
-
function runEach(cwd, baseConfig) {
|
|
6260
|
+
function runEach(cwd, baseConfig, adapterOverride) {
|
|
6261
6261
|
const repos = detectRepoDirs(cwd);
|
|
6262
6262
|
if (repos.length === 0) {
|
|
6263
6263
|
console.warn('[sigmap] --each: no project subdirectories found');
|
|
@@ -6276,6 +6276,13 @@ function runEach(cwd, baseConfig) {
|
|
|
6276
6276
|
} catch (_) {
|
|
6277
6277
|
repoConfig = { ...baseConfig };
|
|
6278
6278
|
}
|
|
6279
|
+
// --adapter override: apply on top of per-repo config
|
|
6280
|
+
if (adapterOverride) {
|
|
6281
|
+
repoConfig = Object.assign({}, repoConfig, {
|
|
6282
|
+
outputs: adapterOverride === 'claude' ? ['claude'] : [adapterOverride],
|
|
6283
|
+
adapters: [adapterOverride],
|
|
6284
|
+
});
|
|
6285
|
+
}
|
|
6279
6286
|
console.warn(`[sigmap] --each: processing ${name} …`);
|
|
6280
6287
|
try {
|
|
6281
6288
|
runGenerate(repoDir, repoConfig, false);
|
|
@@ -6748,6 +6755,23 @@ function main() {
|
|
|
6748
6755
|
process.exit(0);
|
|
6749
6756
|
}
|
|
6750
6757
|
|
|
6758
|
+
// ── --each [--adapter <name>] ────────────────────────────────────────────
|
|
6759
|
+
// Must be checked before --adapter so that --each --adapter <name> is
|
|
6760
|
+
// handled here (per-repo) rather than running a single generate on the
|
|
6761
|
+
// parent directory.
|
|
6762
|
+
if (args.includes('--each')) {
|
|
6763
|
+
const VALID_ADAPTERS = ['copilot', 'claude', 'cursor', 'windsurf', 'openai', 'gemini'];
|
|
6764
|
+
const adpIdx = args.indexOf('--adapter');
|
|
6765
|
+
const adapterOverride = adpIdx >= 0 ? (args[adpIdx + 1] || '').trim().toLowerCase() : null;
|
|
6766
|
+
if (adapterOverride && !VALID_ADAPTERS.includes(adapterOverride)) {
|
|
6767
|
+
console.error(`[sigmap] --each: unknown adapter "${adapterOverride}"`);
|
|
6768
|
+
console.error(` Valid adapters: ${VALID_ADAPTERS.join(', ')}`);
|
|
6769
|
+
process.exit(1);
|
|
6770
|
+
}
|
|
6771
|
+
runEach(cwd, config, adapterOverride || null);
|
|
6772
|
+
process.exit(0);
|
|
6773
|
+
}
|
|
6774
|
+
|
|
6751
6775
|
// ── --adapter <name> ───────────────────────────────────────────────────────
|
|
6752
6776
|
if (args.includes('--adapter')) {
|
|
6753
6777
|
try {
|
|
@@ -6867,11 +6891,6 @@ function main() {
|
|
|
6867
6891
|
process.exit(0);
|
|
6868
6892
|
}
|
|
6869
6893
|
|
|
6870
|
-
if (args.includes('--each')) {
|
|
6871
|
-
runEach(cwd, config);
|
|
6872
|
-
process.exit(0);
|
|
6873
|
-
}
|
|
6874
|
-
|
|
6875
6894
|
if (args.includes('--setup')) {
|
|
6876
6895
|
runGenerate(cwd, config, false);
|
|
6877
6896
|
installHook(cwd, scriptPath);
|
package/package.json
CHANGED