Config reference
All configuration lives in gen-context.config.json at the project root. Generate a starter file with:
sigmap --initCopy-paste presets
Solo repo
{
"srcDirs": ["src", "app", "lib"],
"strategy": "full",
"autoMaxTokens": true,
"outputs": ["copilot"]
}Large monorepo
{
"srcDirs": ["packages", "apps", "services"],
"strategy": "per-module",
"monorepo": true,
"autoMaxTokens": true
}Claude Code, Cursor, Windsurf, or Zed with MCP
{
"srcDirs": ["src", "app", "lib"],
"strategy": "hot-cold",
"hotCommits": 10,
"diffPriority": true
}Team shared base config
{
"extends": "./configs/team-base.json",
"srcDirs": ["src", "packages"],
"outputs": ["copilot", "claude"]
}Full example
{
"extends": "./team-base.json",
"srcDirs": ["src", "app", "lib"],
"outputPath": ".github/copilot-instructions.md",
"outputs": ["copilot", "claude"],
"autoMaxTokens": true,
"coverageTarget": 0.80,
"strategy": "full",
"hotCommits": 10,
"diffPriority": true,
"monorepo": false,
"watchDebounce": 300,
"secretScan": true,
"enrichTodos": true,
"enrichChanges": true,
"enrichCoverage": false,
"retrieval": {
"topK": 10,
"recencyBoost": 1.5,
"preset": "balanced"
}
}Inheritance (v5.0)
| Key | Type | Default | Description |
|---|---|---|---|
extends | string | (none) | Path to a base config JSON file (local or HTTPS URL) to inherit from before applying local overrides. |
extends
Inherit from a shared team base config. The merge order is: DEFAULTS → base → local config. Every local key overrides the base.
Local file:
{ "extends": "./configs/team-base.json" }Remote URL (cached 1 hour in .context/config-cache/):
{ "extends": "https://raw.githubusercontent.com/your-org/sigmap-config/main/base.json" }The base file is a plain gen-context.config.json without an extends key itself.
Output
| Key | Type | Default | Description |
|---|---|---|---|
outputPath | string | .github/copilot-instructions.md | Path to write the primary context file. |
outputs | string[] | ["copilot"] | Which output files to write. Values: "copilot" (.github/copilot-instructions.md), "claude" (CLAUDE.md). |
Token budget
| Key | Type | Default | Description |
|---|---|---|---|
autoMaxTokens | boolean | true | Auto-scale the token budget based on repo size. Set false to use a fixed maxTokens. |
coverageTarget | number | 0.80 | Target fraction of source files to include (0.0–1.0). Default: 80%. |
modelContextLimit | number | 128000 | Model context window size in tokens. Hard cap = modelContextLimit × maxTokensHeadroom. |
maxTokensHeadroom | number | 0.20 | Fraction of the model context reserved for SigMap output. Default 0.20 = 25 600-token cap for 128K models. |
maxTokens | number | 6000 | Used only when autoMaxTokens: false, or as a minimum floor. |
Formula: effective = clamp(ceil(totalSigTokens × coverageTarget), 4000, floor(modelContextLimit × maxTokensHeadroom))
When the hard cap prevents hitting the coverage target by more than 10 percentage points, SigMap prints a warning and suggests switching to strategy: "per-module".
To pin a fixed budget (v4.0 behaviour):
{ "autoMaxTokens": false, "maxTokens": 6000 }Source scanning
| Key | Type | Default | Description |
|---|---|---|---|
srcDirs | string[] | ["src", "app", "lib"] | Directories to scan for source files. Relative to the project root. |
monorepo | boolean | false | When true, generates a separate context section per package under packages/, apps/, or services/. |
Strategy
| Key | Type | Default | Description |
|---|---|---|---|
strategy | "full" | "per-module" | "hot-cold" | "full" | Context output strategy. full = one file, all signatures. per-module = one file per source directory. hot-cold = recently changed files auto-injected; everything else in a cold file for MCP retrieval. See Strategies. |
hotCommits | number | 10 | Number of recent commits to include in the hot set when strategy is "hot-cold". |
diffPriority | boolean | false | When true, files changed in the current git diff are ranked highest in the output. |
Features
| Key | Type | Default | Description |
|---|---|---|---|
secretScan | boolean | true | Scan output for 10 credential patterns before writing. Matching content is replaced with [REDACTED]. Patterns: AWS keys, GitHub tokens, JWTs, database URLs, SSH keys, GCP keys, Stripe keys, Twilio keys, generic passwords/api_keys. |
monorepo | boolean | false | See Source scanning above. |
sigCache | boolean | false | Enable incremental signature cache. When true, caches extracted signatures with mtime-based validation. Cache is automatically busted on version changes. Skips re-extraction of unchanged files for faster subsequent runs. |
Watch
| Key | Type | Default | Description |
|---|---|---|---|
watchDebounce | number | 300 | Debounce delay in milliseconds for file watcher events. Increase if you see multiple regenerations for a single save. |
Enrichment
| Key | Type | Default | Description |
|---|---|---|---|
enrichTodos | boolean | true | Append a TODO/FIXME/HACK section extracted from inline comments. |
enrichChanges | boolean | true | Append a recent git log summary showing files changed in the last 10 commits. |
enrichCoverage | boolean | false | Append a coverage gaps section listing source files that have no corresponding test file. |
testCoverage | boolean | false | Annotate each function signature with ✓ (tested) or ✗ (untested). Can also be set at runtime via the --coverage flag without editing this file. |
testDirs | string[] | ["test","tests","__tests__","spec"] | Directories scanned to build the test index when testCoverage is enabled. |
retrieval.topK | number | 10 | Number of top-ranked files returned by --query and the query_context MCP tool. |
retrieval.recencyBoost | number | 1.5 | Multiplier applied to recently committed files during TF-IDF ranking. |
retrieval.preset | "precision" | "balanced" | "recall" | "balanced" | Weight preset for the ranking algorithm. precision minimises false positives. recall maximises coverage. |
sigCache
Enable incremental signature caching with mtime-based validation. When enabled, caches extracted signatures in .sigmap-cache.json and skips re-extraction of unchanged files. Cache is automatically busted on version changes.
{
"sigCache": true
}Check cache health with:
sigmap --healthOutput will include cache stats:
sig-cache : 142 entries, 1.2 KBUse sigCache: true for large repositories where signature extraction is slow, or when you run generation frequently.
.contextignore
Use a .contextignore file (gitignore syntax) to exclude files and directories from the index. Run sigmap --init to generate a starter file.
# test files
**/*.test.*
**/*.spec.*
*_test.*
# build output
dist/
build/
src/generated/
coverage/
node_modules/
# generated files
*.pb.*
*.generated.*The .contextignore file uses the same gitignore syntax as .repomixignore. Symlink them to share a single exclusion list:
ln -s .contextignore .repomixignore