sigmap 3.0.0 → 3.0.1-alpha.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 CHANGED
@@ -6,6 +6,17 @@ Format: [Semantic Versioning](https://semver.org/)
6
6
 
7
7
  ---
8
8
 
9
+ ## [Unreleased]
10
+
11
+ ### Fixed
12
+ - **`output` config key not honored for copilot adapter** · [#30](https://github.com/manojmallick/sigmap/issues/30)
13
+ - Custom `output` path in config now correctly used for copilot adapter instead of hard-wired `.github/copilot-instructions.md`
14
+ - Added `resolveAdapterPath()` helper to centralize adapter path resolution
15
+ - Other adapters (claude, cursor, windsurf) continue to use fixed paths as designed
16
+ - 5 new integration tests ensure custom paths work correctly across all config combinations
17
+
18
+ ---
19
+
9
20
  ## [3.0.0] — 2026-04-06 — Platform: Multi-Adapter Architecture
10
21
 
11
22
  ### Added
package/README.md CHANGED
@@ -26,7 +26,7 @@
26
26
  [![Changelog](https://img.shields.io/badge/changelog-CHANGELOG.md-blue)](CHANGELOG.md)
27
27
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
28
28
  [![VS Code](https://img.shields.io/badge/VS%20Code-extension-0078d4?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=manojmallick.sigmap)
29
- [![JetBrains](https://img.shields.io/badge/JetBrains-plugin-000000?logo=jetbrains)](https://plugins.jetbrains.com/plugin/sigmap)
29
+ [![JetBrains](https://img.shields.io/badge/JetBrains-plugin-000000?logo=jetbrains)](https://plugins.jetbrains.com/plugin/31109-sigmap--ai-context-engine/)
30
30
  [![Open VSX](https://img.shields.io/open-vsx/v/manojmallick/sigmap?color=a251e3&label=Open%20VSX&logo=vscodium)](https://open-vsx.org/extension/manojmallick/sigmap)
31
31
 
32
32
  </div>
@@ -123,6 +123,7 @@ AI agent session starts with full context
123
123
  | **Evaluation dashboard output** | Generate shareable HTML/JSON benchmark summaries from CLI runs |
124
124
  | **CI-friendly metrics export** | Persist machine-readable metrics for release gates and regression tracking |
125
125
  | **Release quality gates** | Add pass/fail thresholds for hit@5 and precision before publish |
126
+
126
127
  ## 🔌 v3.0 — Platform: Multi-Adapter Architecture
127
128
 
128
129
  SigMap is now an **adapter platform**. Any AI assistant — Copilot, Claude, Cursor, Windsurf, OpenAI, or Gemini — plugs in through a standard interface.
@@ -155,6 +156,13 @@ const systemPrompt = adapt(context, 'openai', { version: '3.0.0' });
155
156
  See full roadmap: [manojmallick.github.io/sigmap/roadmap.html](https://manojmallick.github.io/sigmap/roadmap.html)
156
157
 
157
158
  ---
159
+
160
+ ## ⚡ Quick start
161
+
162
+ Download the single-file CLI and generate context immediately:
163
+
164
+ ```bash
165
+ # 1. Download
158
166
  curl -O https://raw.githubusercontent.com/manojmallick/sigmap/main/gen-context.js
159
167
 
160
168
  # 2. Generate your context file
@@ -238,7 +246,7 @@ The `jetbrains-plugin/` directory contains a Kotlin-based plugin for JetBrains I
238
246
 
239
247
  Compatible with **IntelliJ IDEA 2024.1+** (Community & Ultimate), **WebStorm**, **PyCharm**, **GoLand**, **RubyMine**, **PhpStorm**, and all other IntelliJ-based IDEs.
240
248
 
241
- **Install:** [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/sigmap) | [Manual setup guide](docs/JETBRAINS_SETUP.md)
249
+ **Install:** [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/31109-sigmap--ai-context-engine/) | [Manual setup guide](docs/JETBRAINS_SETUP.md)
242
250
 
243
251
  ---
244
252
 
@@ -441,6 +449,7 @@ Copy `gen-context.config.json.example` to `gen-context.config.json`:
441
449
 
442
450
  ```json
443
451
  {
452
+ "output": ".github/copilot-instructions.md",
444
453
  "srcDirs": ["src", "app", "lib"],
445
454
  "maxTokens": 6000,
446
455
  "outputs": ["copilot"],
@@ -451,6 +460,15 @@ Copy `gen-context.config.json.example` to `gen-context.config.json`:
451
460
  }
452
461
  ```
453
462
 
463
+ **Key fields:**
464
+
465
+ - **`output`** — custom path for the primary markdown output file (used by `copilot` adapter). Default: `.github/copilot-instructions.md`
466
+ - **`outputs`** — which adapters to write to: `copilot` | `claude` | `cursor` | `windsurf`
467
+ - **`srcDirs`** — directories to scan (relative to project root)
468
+ - **`maxTokens`** — max tokens in final output before budget enforcement
469
+ - **`secretScan`** — redact secrets (AWS keys, tokens, etc.) from output
470
+ - **`strategy`** — output mode: `full` (default) | `per-module` | `hot-cold`
471
+
454
472
  Exclusions go in `.contextignore` (gitignore syntax). Also reads `.repomixignore` if present.
455
473
 
456
474
  ```
@@ -468,12 +486,25 @@ Run `node gen-context.js --init` to scaffold both files in one step.
468
486
 
469
487
  | Key | Output file | Read by |
470
488
  |---|---|---|
471
- | `"copilot"` | `.github/copilot-instructions.md` | GitHub Copilot |
489
+ | `"copilot"` | `.github/copilot-instructions.md` *(or custom path via `output`)* | GitHub Copilot |
472
490
  | `"claude"` | `CLAUDE.md` (appends below marker) | Claude Code |
473
491
  | `"cursor"` | `.cursorrules` | Cursor |
474
492
  | `"windsurf"` | `.windsurfrules` | Windsurf |
475
493
 
476
- ---
494
+ The **`output`** config key sets the primary output file path. It is used by the `copilot` adapter when enabled. Other adapters always write to their fixed paths.
495
+
496
+ **Example:**
497
+
498
+ ```json
499
+ {
500
+ "output": ".context/ai-context.md",
501
+ "outputs": ["copilot"]
502
+ }
503
+ ```
504
+
505
+ This writes to `.context/ai-context.md` instead of `.github/copilot-instructions.md`.
506
+
507
+ If `output` is omitted, the default `.github/copilot-instructions.md` is used.
477
508
 
478
509
  ## 📊 Observability
479
510
 
package/gen-context.js CHANGED
@@ -4903,7 +4903,7 @@ const path = require('path');
4903
4903
  const os = require('os');
4904
4904
  const { execSync } = require('child_process');
4905
4905
 
4906
- const VERSION = '3.0.0';
4906
+ const VERSION = '3.0.1';
4907
4907
  const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
4908
4908
 
4909
4909
  function requireSourceOrBundled(key) {
@@ -5445,6 +5445,29 @@ function ensureDir(filePath) {
5445
5445
  if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
5446
5446
  }
5447
5447
 
5448
+ // ---------------------------------------------------------------------------
5449
+ // Resolve output path for a given adapter
5450
+ // ---------------------------------------------------------------------------
5451
+ // Takes config.output into account for the copilot adapter.
5452
+ // Returns the full path where output should be written.
5453
+ function resolveAdapterPath(adapter, cwd, config) {
5454
+ config = config || {};
5455
+
5456
+ // Copilot uses config.output if available, otherwise default
5457
+ if (adapter === 'copilot') {
5458
+ return config.output
5459
+ ? path.join(cwd, config.output)
5460
+ : path.join(cwd, '.github', 'copilot-instructions.md');
5461
+ }
5462
+
5463
+ // Fixed paths for other adapters
5464
+ if (adapter === 'claude') return path.join(cwd, 'CLAUDE.md');
5465
+ if (adapter === 'cursor') return path.join(cwd, '.cursorrules');
5466
+ if (adapter === 'windsurf') return path.join(cwd, '.windsurfrules');
5467
+
5468
+ return null;
5469
+ }
5470
+
5448
5471
  // ---------------------------------------------------------------------------
5449
5472
  // Cache output writer (v0.8)
5450
5473
  // ---------------------------------------------------------------------------
@@ -5460,14 +5483,15 @@ function writeCacheOutput(content, cwd) {
5460
5483
  }
5461
5484
  }
5462
5485
 
5463
- function writeOutputs(content, targets, cwd) {
5486
+ function writeOutputs(content, targets, cwd, config) {
5487
+ config = config || {};
5464
5488
  // v3.0+: adapter-aware output targets
5465
5489
  const ADAPTER_TARGETS = new Set(['openai', 'gemini']);
5466
5490
 
5467
5491
  const targetMap = {
5468
- copilot: path.join(cwd, '.github', 'copilot-instructions.md'),
5469
- cursor: path.join(cwd, '.cursorrules'),
5470
- windsurf: path.join(cwd, '.windsurfrules'),
5492
+ copilot: resolveAdapterPath('copilot', cwd, config),
5493
+ cursor: resolveAdapterPath('cursor', cwd, config),
5494
+ windsurf: resolveAdapterPath('windsurf', cwd, config),
5471
5495
  };
5472
5496
 
5473
5497
  for (const target of targets) {
@@ -5709,7 +5733,7 @@ function runPerModuleStrategy(cwd, config, fileEntries, inputTokenTotal) {
5709
5733
  overviewLines.push('> For cross-module questions load both files.');
5710
5734
  const overviewContent = overviewLines.join('\n') + '\n';
5711
5735
  const primaryTargets = (config.outputs || ['copilot']).filter((t) => t !== 'claude');
5712
- writeOutputs(overviewContent, primaryTargets, cwd);
5736
+ writeOutputs(overviewContent, primaryTargets, cwd, config);
5713
5737
 
5714
5738
  const overviewTokens = estimateTokens(overviewContent);
5715
5739
  console.warn(`[sigmap] per-module: overview ~${overviewTokens} tokens (always-on), modules total ~${totalOut} tokens (on-demand)`);
@@ -5728,7 +5752,7 @@ function runHotColdStrategy(cwd, config, fileEntries, recentFiles, inputTokenTot
5728
5752
  ? formatOutput(hotEntries, cwd, false, config, null)
5729
5753
  : '<!-- Generated by SigMap — no recently changed files -->\n';
5730
5754
  const primaryTargets = (config.outputs || ['copilot']).filter((t) => t !== 'claude');
5731
- writeOutputs(hotContent, primaryTargets, cwd);
5755
+ writeOutputs(hotContent, primaryTargets, cwd, config);
5732
5756
  const hotTokens = estimateTokens(hotContent);
5733
5757
 
5734
5758
  // Cold → .github/context-cold.md (MCP reads this on demand)
@@ -5831,7 +5855,7 @@ function runDiff(cwd, config, stagedOnly, baseRef) {
5831
5855
  const diffSection = baseRef ? buildDiffSectionFromBase(cwd, baseRef, fileEntries, config) : [];
5832
5856
  const content = formatOutput(fileEntries, cwd, routingEnabled, config, { diffSection });
5833
5857
  const finalTokens = estimateTokens(content);
5834
- writeOutputs(content, config.outputs, cwd);
5858
+ writeOutputs(content, config.outputs, cwd, config);
5835
5859
 
5836
5860
  const scope = baseRef ? `diff-vs-${baseRef}` : (stagedOnly ? 'staged' : 'diff');
5837
5861
  console.warn(`[sigmap] ${scope} files: ${fileEntries.length}, diff tokens: ~${finalTokens}`);
@@ -5940,7 +5964,7 @@ function runGenerate(cwd, config, reportMode, reportJson = false) {
5940
5964
  const finalTokens = estimateTokens(content);
5941
5965
  const formatIdx = process.argv.indexOf('--format');
5942
5966
  const formatValue = formatIdx >= 0 ? process.argv[formatIdx + 1] : (config.format || 'default');
5943
- writeOutputs(content, config.outputs, cwd);
5967
+ writeOutputs(content, config.outputs, cwd, config);
5944
5968
  if (formatValue === 'cache') writeCacheOutput(content, cwd);
5945
5969
  result = { inputTokenTotal, finalTokens, fileCount: beforeCount, droppedCount };
5946
5970
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap",
3
- "version": "3.0.0",
3
+ "version": "3.0.1-alpha.1",
4
4
  "description": "Zero-dependency AI context engine — 97% token reduction. No npm install. Runs on Node 18+.",
5
5
  "main": "gen-context.js",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-cli",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "SigMap CLI wrapper — thin adapter for programmatic CLI invocation",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-core",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "SigMap core library — zero-dependency code signature extraction, retrieval, and security scanning",
5
5
  "main": "index.js",
6
6
  "keywords": [
package/src/mcp/server.js CHANGED
@@ -18,7 +18,7 @@ const { readContext, searchSignatures, getMap, createCheckpoint, getRouting, exp
18
18
 
19
19
  const SERVER_INFO = {
20
20
  name: 'sigmap',
21
- version: '3.0.0',
21
+ version: '3.0.1',
22
22
  description: 'SigMap MCP server — code signatures on demand',
23
23
  };
24
24