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

Full example

json
{
  "srcDirs": ["src", "app", "lib"],
  "outputPath": ".github/copilot-instructions.md",
  "outputs": ["copilot", "claude"],
  "maxTokens": 6000,
  "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"
  }
}

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).
maxTokensnumber6000Token budget. Files are dropped in priority order when the budget is exceeded. Raise to 800010000 for large codebases.

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.

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

.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