-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathdefaults.js
More file actions
105 lines (79 loc) · 3.06 KB
/
Copy pathdefaults.js
File metadata and controls
105 lines (79 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
'use strict';
/**
* Default configuration values for SigMap.
* All keys documented here. Override via gen-context.config.json.
*/
const DEFAULTS = {
// Primary output file (used when outputs includes 'copilot')
output: '.github/copilot-instructions.md',
// Output targets: 'copilot' | 'claude' | 'cursor' | 'windsurf'
outputs: ['copilot'],
// Directories to scan (relative to project root)
srcDirs: [
'src', 'app', 'lib', 'packages', 'services', 'api',
// common monorepo / multi-project top-level names
'server', 'client', 'web', 'frontend', 'backend',
'desktop', 'mobile', 'shared', 'common', 'core',
'workers', 'functions', 'lambda', 'cmd',
],
// Directory/file names to exclude entirely
exclude: [
'node_modules', '.git', 'dist', 'build', 'out',
'__pycache__', '.next', 'coverage', 'target', 'vendor',
'.context',
],
// Maximum directory depth to recurse
maxDepth: 6,
// Maximum signatures extracted per file
maxSigsPerFile: 25,
// Maximum tokens in final output before budget enforcement kicks in
maxTokens: 6000,
// Scan signatures for secrets and redact matches
secretScan: true,
// Auto-detect monorepo packages and write per-package output files
monorepo: false,
// Sort recently git-committed files higher in output
diffPriority: true,
// Context strategy controls how the output is split and injected.
// 'full' -> single context file (default)
// 'per-module' -> one context-<module>.md per top-level srcDir + thin overview
// 'hot-cold' -> recent files in primary output, older files in context-cold.md
strategy: 'full',
// For hot-cold strategy: how many recent git commits count as "hot"
hotCommits: 10,
// Debounce delay (ms) between file-system events and regeneration in watch mode
watchDebounce: 300,
// Append model routing hints section to the context output
// Routes files to fast/balanced/powerful model tiers based on complexity
routing: false,
// Output format: 'default' (markdown only) | 'cache' (also write Anthropic prompt-cache JSON)
format: 'default',
// Append run metrics to .context/usage.ndjson after each generate
tracking: false,
// MCP server configuration
mcp: {
autoRegister: true,
},
// Include a compact import dependency map at top of output
depMap: true,
// Include TODO/FIXME/HACK/XXX comments as compact section
todos: true,
// Include compact recent git changes section
changes: true,
// Number of commits used for changes section
changesCommits: 5,
// Add test coverage markers to extracted function signatures (opt-in)
testCoverage: false,
// Directories scanned for tests when testCoverage is enabled
testDirs: ['tests', 'test', '__tests__', 'spec'],
// Add reverse dependency usage hints on file headings (opt-in)
impactRadius: false,
// Query-aware retrieval settings (v2.3)
retrieval: {
// Maximum number of files to return for --query
topK: 10,
// Multiplier applied to recently-changed files (>1 boosts them up)
recencyBoost: 1.5,
},
};
module.exports = { DEFAULTS };