-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault_config.toml
More file actions
164 lines (140 loc) · 4.69 KB
/
default_config.toml
File metadata and controls
164 lines (140 loc) · 4.69 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# dirpack.toml - Project configuration
[output]
format = "pipe" # "pipe" | "full" | "json"
default_budget_tokens = 4000
default_budget_bytes = 16000
[scanning]
use_gitignore = true # Respect .gitignore
include_hidden = false # Include .dotfiles/dirs
max_depth = 20 # Max recursion depth
follow_symlinks = false
no_git_safety = true # Apply safety exclusions in --no-git mode
max_file_size_bytes = 2097152 # 2 MiB. Files above this appear in spine
# but are skipped for signature/content reads.
# Set to 0 to disable the limit.
# File categories - used for prioritization and signature extraction
# content_weight scales priority during the content phase (phase 4) only.
# 1.0 = full weight, 0.0 = never include content. Spine and signatures
# are unaffected.
[categories.code]
extensions = ["rs", "go", "py", "ts", "tsx", "js", "jsx", "c", "cpp", "h", "hpp", "java", "rb", "ex", "exs"]
priority = 100
content_weight = 1.0
[categories.docs]
extensions = ["md", "mdx", "txt", "rst", "adoc"]
priority = 90
content_weight = 1.0
[categories.config]
extensions = ["toml", "yaml", "yml", "json", "ini", "cfg"]
priority = 80
content_weight = 0.2 # configs appear in spine but rarely need content
[categories.build]
extensions = ["lock", "sum"]
priority = 20
content_weight = 0.0 # never include lock file content
[categories.data]
extensions = ["csv", "sql"]
priority = 30
content_weight = 0.0 # never include raw data content
# Priority rules - higher = more important, included first in budget
# Optional "extract" field transforms content before budget accounting.
# Built-in extractors:
# json_keys:key1,key2 - include only named top-level JSON keys
# toml_sections:sec1,sec2 - include only named TOML sections
# lines_matching:prefix1|pfx2 - include lines starting with any prefix
# api_surface - first 5 lines + all pub/export declarations
[[priority_rules]]
pattern = "README*"
priority = 200
[[priority_rules]]
pattern = "AGENTS.md"
priority = 200
[[priority_rules]]
pattern = "CLAUDE.md"
priority = 200
[[priority_rules]]
pattern = "Cargo.toml"
priority = 150
extract = "toml_sections:dependencies,dev-dependencies"
[[priority_rules]]
pattern = "package.json"
priority = 150
extract = "json_keys:dependencies,devDependencies,scripts"
[[priority_rules]]
pattern = "go.mod"
priority = 150
extract = "lines_matching:require |module "
[[priority_rules]]
pattern = "src/main.*"
priority = 140
[[priority_rules]]
pattern = "src/lib.*"
priority = 140
extract = "api_surface"
[[priority_rules]]
pattern = "**/mod.rs"
priority = 130
extract = "api_surface"
[[priority_rules]]
pattern = "**/*_test.*"
priority = 50
[[priority_rules]]
pattern = "**/test_*"
priority = 50
[[priority_rules]]
pattern = "**/*.lock"
priority = 10
# Priority weight adjustments - tune scoring for specific file types
# These modify the base priority score based on file characteristics
[priority]
# default_priority = 50 # Base score for files not matching any rule
# entrypoint_boost = 40 # Bonus for main.rs, lib.rs, index.ts, etc.
# root_code_boost = 20 # Bonus for code files at repository root
# focus_dir_boost = 15 # Bonus for files in src/, lib/, cmd/, pkg/
# test_penalty = -40 # Penalty for test files and directories
# fixture_penalty = -25 # Penalty for fixture/mock files and directories
# depth_penalty_step = -5 # Penalty per depth level beyond 2
# max_depth_penalty = -30 # Maximum total depth penalty
# test_content_weight = 0.0 # Content multiplier for test files (0=never)
# fixture_content_weight = 0.0 # Content multiplier for fixture files (0=never)
# Exclude patterns (gitignore syntax)
[exclude]
patterns = [
"target/",
"node_modules/",
"dist/",
"build/",
".git/",
"__pycache__/",
"*.pyc",
".DS_Store",
"*.min.js",
"*.min.css",
"vendor/",
".venv/",
"venv/",
]
# Tree-sitter signature extraction
[signatures]
enabled = true
languages = ["rust", "go", "python", "typescript", "javascript", "c", "cpp"]
include_functions = true
include_structs = true
include_traits = true
include_interfaces = true
include_classes = true
include_types = true
include_constants = true
max_signature_length = 200
# Content inclusion (progressive disclosure phase 4)
[content]
enabled = true
full_budget_ratio = 0.6
max_full_tokens = 500
max_snippet_tokens = 200
exclude_patterns = ["*.lock", "*.min.js", "*.min.css"]
# On-disk pack cache
[cache]
enabled = true # Disable with --no-cache, DIRPACK_NO_CACHE=1,
# or set to false here. Cache lives under
# ${XDG_CACHE_HOME:-~/.cache}/dirpack/packs/