Skip to content

Config reference

All configuration lives in gen-context.config.json at the project root. Generate a starter file with:

bash
sigmap --init

Copy-paste presets

Solo repo

json
{
  "srcDirs": ["src", "app", "lib"],
  "strategy": "full",
  "autoMaxTokens": true,
  "outputs": ["copilot"]
}

Large monorepo

json
{
  "srcDirs": ["packages", "apps", "services"],
  "strategy": "per-module",
  "monorepo": true,
  "autoMaxTokens": true
}

Claude Code, Cursor, Windsurf, or Zed with MCP

json
{
  "srcDirs": ["src", "app", "lib"],
  "strategy": "hot-cold",
  "hotCommits": 10,
  "diffPriority": true
}

Team shared base config

json
{
  "extends": "./configs/team-base.json",
  "srcDirs": ["src", "packages"],
  "outputs": ["copilot", "claude"]
}

Full example

json
{
  "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)

KeyTypeDefaultDescription
extendsstring(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:

json
{ "extends": "./configs/team-base.json" }

Remote URL (cached 1 hour in .context/config-cache/):

json
{ "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

KeyTypeDefaultDescription
outputPathstring.github/copilot-instructions.mdPath to write the primary context file.
outputsstring[]["copilot"]Which output files to write. Values: "copilot" (.github/copilot-instructions.md), "claude" (CLAUDE.md).

Token budget

KeyTypeDefaultDescription
autoMaxTokensbooleantrueAuto-scale the token budget based on repo size. Set false to use a fixed maxTokens.
coverageTargetnumber0.80Target fraction of source files to include (0.0–1.0). Default: 80%.
modelContextLimitnumber128000Model context window size in tokens. Hard cap = modelContextLimit × maxTokensHeadroom.
maxTokensHeadroomnumber0.20Fraction of the model context reserved for SigMap output. Default 0.20 = 25 600-token cap for 128K models.
maxTokensnumber6000Used 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):

json
{ "autoMaxTokens": false, "maxTokens": 6000 }

Source scanning

KeyTypeDefaultDescription
srcDirsstring[]["src", "app", "lib"]Directories to scan for source files. Relative to the project root.
monorepobooleanfalseWhen true, generates a separate context section per package under packages/, apps/, or services/.

Strategy

KeyTypeDefaultDescription
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.
hotCommitsnumber10Number of recent commits to include in the hot set when strategy is "hot-cold".
diffPrioritybooleanfalseWhen true, files changed in the current git diff are ranked highest in the output.

Features

KeyTypeDefaultDescription
secretScanbooleantrueScan 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.
monorepobooleanfalseSee Source scanning above.
sigCachebooleanfalseEnable 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

KeyTypeDefaultDescription
watchDebouncenumber300Debounce delay in milliseconds for file watcher events. Increase if you see multiple regenerations for a single save.

Enrichment

KeyTypeDefaultDescription
enrichTodosbooleantrueAppend a TODO/FIXME/HACK section extracted from inline comments.
enrichChangesbooleantrueAppend a recent git log summary showing files changed in the last 10 commits.
enrichCoveragebooleanfalseAppend a coverage gaps section listing source files that have no corresponding test file.
testCoveragebooleanfalseAnnotate each function signature with (tested) or (untested). Can also be set at runtime via the --coverage flag without editing this file.
testDirsstring[]["test","tests","__tests__","spec"]Directories scanned to build the test index when testCoverage is enabled.
retrieval.topKnumber10Number of top-ranked files returned by --query and the query_context MCP tool.
retrieval.recencyBoostnumber1.5Multiplier 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.

json
{
  "sigCache": true
}

Check cache health with:

bash
sigmap --health

Output will include cache stats:

sig-cache       : 142 entries, 1.2 KB

Use 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.

bash
# 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:

bash
ln -s .contextignore .repomixignore

Made in Amsterdam, Netherlands 🇳🇱

MIT License