ctx-packer 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ctx_packer-0.1.4/.context-pack.yaml.example +286 -0
- ctx_packer-0.1.4/AUTHORS.md +30 -0
- ctx_packer-0.1.4/CHANGELOG.md +138 -0
- ctx_packer-0.1.4/CODE_OF_CONDUCT.md +77 -0
- ctx_packer-0.1.4/CONTRIBUTING.md +396 -0
- ctx_packer-0.1.4/LICENSE +692 -0
- ctx_packer-0.1.4/MANIFEST.in +49 -0
- ctx_packer-0.1.4/PKG-INFO +477 -0
- ctx_packer-0.1.4/README.md +408 -0
- ctx_packer-0.1.4/SECURITY.md +136 -0
- ctx_packer-0.1.4/pyproject.toml +201 -0
- ctx_packer-0.1.4/setup.cfg +4 -0
- ctx_packer-0.1.4/src/context_packer/__init__.py +27 -0
- ctx_packer-0.1.4/src/context_packer/backend_selector/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/backend_selector/backend_selector.py +200 -0
- ctx_packer-0.1.4/src/context_packer/budget/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/budget/budget.py +107 -0
- ctx_packer-0.1.4/src/context_packer/chunker/__init__.py +48 -0
- ctx_packer-0.1.4/src/context_packer/chunker/base.py +49 -0
- ctx_packer-0.1.4/src/context_packer/chunker/markdown.py +98 -0
- ctx_packer-0.1.4/src/context_packer/chunker/regex.py +219 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/__init__.py +21 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/base.py +69 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/javascript.py +76 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/python.py +59 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/rust.py +45 -0
- ctx_packer-0.1.4/src/context_packer/chunker/resolvers/typescript.py +85 -0
- ctx_packer-0.1.4/src/context_packer/chunker/tree_sitter.py +160 -0
- ctx_packer-0.1.4/src/context_packer/cli/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/cli/__main__.py +4 -0
- ctx_packer-0.1.4/src/context_packer/cli/cli.py +582 -0
- ctx_packer-0.1.4/src/context_packer/config/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/config/config.py +342 -0
- ctx_packer-0.1.4/src/context_packer/domain_map/__init__.py +5 -0
- ctx_packer-0.1.4/src/context_packer/domain_map/db.py +485 -0
- ctx_packer-0.1.4/src/context_packer/domain_map/domain_map.py +107 -0
- ctx_packer-0.1.4/src/context_packer/errors/__init__.py +9 -0
- ctx_packer-0.1.4/src/context_packer/errors/errors.py +315 -0
- ctx_packer-0.1.4/src/context_packer/formatters/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/formatters/pretty_printer.py +201 -0
- ctx_packer-0.1.4/src/context_packer/graph/__init__.py +15 -0
- ctx_packer-0.1.4/src/context_packer/graph/graph.py +667 -0
- ctx_packer-0.1.4/src/context_packer/logger/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/logger/logger.py +157 -0
- ctx_packer-0.1.4/src/context_packer/models/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/models/models.py +126 -0
- ctx_packer-0.1.4/src/context_packer/monitoring/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/monitoring/performance.py +261 -0
- ctx_packer-0.1.4/src/context_packer/packer/__init__.py +8 -0
- ctx_packer-0.1.4/src/context_packer/packer/xml_packer.py +179 -0
- ctx_packer-0.1.4/src/context_packer/packer/zip_packer.py +243 -0
- ctx_packer-0.1.4/src/context_packer/py.typed +1 -0
- ctx_packer-0.1.4/src/context_packer/retrieval/__init__.py +3 -0
- ctx_packer-0.1.4/src/context_packer/retrieval/retrieval.py +555 -0
- ctx_packer-0.1.4/src/context_packer/vector_index/__init__.py +17 -0
- ctx_packer-0.1.4/src/context_packer/vector_index/vector_index.py +865 -0
- ctx_packer-0.1.4/src/context_packer/workflow/__init__.py +4 -0
- ctx_packer-0.1.4/src/context_packer/workflow/indexer.py +378 -0
- ctx_packer-0.1.4/src/context_packer/workflow/query.py +261 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/PKG-INFO +477 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/SOURCES.txt +63 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/dependency_links.txt +1 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/entry_points.txt +2 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/requires.txt +33 -0
- ctx_packer-0.1.4/src/ctx_packer.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Context Packer Configuration Example
|
|
2
|
+
# Copy this file to .context-pack.yaml in your repository root and customize as needed
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# OUTPUT SETTINGS
|
|
6
|
+
# ==============================================================================
|
|
7
|
+
|
|
8
|
+
# Output format for generated context packs
|
|
9
|
+
# Options: "xml" | "zip"
|
|
10
|
+
# - xml: Single file with Repomix-style structure (for paste workflows)
|
|
11
|
+
# - zip: Archive with preserved directory structure + manifest (for upload workflows)
|
|
12
|
+
format: zip
|
|
13
|
+
|
|
14
|
+
# Maximum token budget for LLM context window
|
|
15
|
+
# The system reserves 20% for metadata, using 80% for actual file content
|
|
16
|
+
# Common values:
|
|
17
|
+
# - Claude 3.5 Sonnet: 200000
|
|
18
|
+
# - GPT-4 Turbo: 128000
|
|
19
|
+
# - GPT-4: 8192
|
|
20
|
+
# - Claude 2: 100000
|
|
21
|
+
token_budget: 100000
|
|
22
|
+
|
|
23
|
+
# Output directory for generated context packs
|
|
24
|
+
# Relative paths are resolved from repository root
|
|
25
|
+
output_path: ./output
|
|
26
|
+
|
|
27
|
+
# ==============================================================================
|
|
28
|
+
# SCORING WEIGHTS
|
|
29
|
+
# ==============================================================================
|
|
30
|
+
|
|
31
|
+
# Weight for semantic similarity score (0.0 to 1.0)
|
|
32
|
+
# Higher values prioritize files matching the query semantically
|
|
33
|
+
# Recommended: 0.6 for query-driven workflows
|
|
34
|
+
semantic_weight: 0.6
|
|
35
|
+
|
|
36
|
+
# Weight for PageRank structural importance score (0.0 to 1.0)
|
|
37
|
+
# Higher values prioritize core dependencies and central files
|
|
38
|
+
# Recommended: 0.4 for balanced ranking
|
|
39
|
+
# Note: semantic_weight + pagerank_weight should equal 1.0
|
|
40
|
+
pagerank_weight: 0.4
|
|
41
|
+
|
|
42
|
+
# ==============================================================================
|
|
43
|
+
# FILE FILTERING
|
|
44
|
+
# ==============================================================================
|
|
45
|
+
|
|
46
|
+
# Include test files in the context pack
|
|
47
|
+
# Set to true if you want test files included in the output
|
|
48
|
+
include_tests: false
|
|
49
|
+
|
|
50
|
+
# Glob patterns for files to include
|
|
51
|
+
# Uses Python glob syntax with ** for recursive matching
|
|
52
|
+
include_patterns:
|
|
53
|
+
- "**/*.py" # Python files
|
|
54
|
+
- "**/*.js" # JavaScript files
|
|
55
|
+
- "**/*.ts" # TypeScript files
|
|
56
|
+
- "**/*.tsx" # TypeScript React files
|
|
57
|
+
- "**/*.jsx" # JavaScript React files
|
|
58
|
+
- "**/*.java" # Java files
|
|
59
|
+
- "**/*.go" # Go files
|
|
60
|
+
- "**/*.rs" # Rust files
|
|
61
|
+
- "**/*.cpp" # C++ files
|
|
62
|
+
- "**/*.c" # C files
|
|
63
|
+
- "**/*.h" # Header files
|
|
64
|
+
- "**/*.rb" # Ruby files
|
|
65
|
+
- "**/*.php" # PHP files
|
|
66
|
+
- "**/*.swift" # Swift files
|
|
67
|
+
- "**/*.kt" # Kotlin files
|
|
68
|
+
- "**/*.scala" # Scala files
|
|
69
|
+
|
|
70
|
+
# Glob patterns for files to exclude
|
|
71
|
+
# These patterns override include_patterns
|
|
72
|
+
exclude_patterns:
|
|
73
|
+
- "*.min.js" # Minified JavaScript
|
|
74
|
+
- "*.min.css" # Minified CSS
|
|
75
|
+
- "node_modules/**" # Node.js dependencies
|
|
76
|
+
- "__pycache__/**" # Python bytecode cache
|
|
77
|
+
- ".git/**" # Git repository data
|
|
78
|
+
- ".svn/**" # SVN repository data
|
|
79
|
+
- "venv/**" # Python virtual environment
|
|
80
|
+
- "env/**" # Python virtual environment
|
|
81
|
+
- ".venv/**" # Python virtual environment
|
|
82
|
+
- "dist/**" # Build output
|
|
83
|
+
- "build/**" # Build output
|
|
84
|
+
- "target/**" # Build output (Rust, Java)
|
|
85
|
+
- "*.pyc" # Python bytecode
|
|
86
|
+
- "*.pyo" # Python optimized bytecode
|
|
87
|
+
- "*.so" # Shared objects
|
|
88
|
+
- "*.dylib" # Dynamic libraries
|
|
89
|
+
- "*.dll" # Windows DLLs
|
|
90
|
+
- ".DS_Store" # macOS metadata
|
|
91
|
+
- "Thumbs.db" # Windows thumbnails
|
|
92
|
+
|
|
93
|
+
# ==============================================================================
|
|
94
|
+
# BACKEND SELECTION
|
|
95
|
+
# ==============================================================================
|
|
96
|
+
|
|
97
|
+
backends:
|
|
98
|
+
# Vector index backend for semantic search
|
|
99
|
+
# Options: "auto" | "leann" | "faiss"
|
|
100
|
+
# - auto: Try LEANN first, fall back to FAISS if unavailable
|
|
101
|
+
# - leann: Use LEANN only (97% storage savings, graph-based)
|
|
102
|
+
# - faiss: Use FAISS only (battle-tested HNSW index)
|
|
103
|
+
vector_index: auto
|
|
104
|
+
|
|
105
|
+
# Graph backend for PageRank computation
|
|
106
|
+
# Options: "auto" | "igraph" | "networkx"
|
|
107
|
+
# - auto: Try igraph first, fall back to NetworkX if unavailable
|
|
108
|
+
# - igraph: Use igraph only (C++ backend, <1s for 10k files)
|
|
109
|
+
# - networkx: Use NetworkX only (pure Python, <10s for 10k files)
|
|
110
|
+
graph: auto
|
|
111
|
+
|
|
112
|
+
# Embeddings backend for vector generation
|
|
113
|
+
# Options: "auto" | "local" | "api"
|
|
114
|
+
# - auto: Try local first, fall back to API on OOM
|
|
115
|
+
# - local: Use sentence-transformers only (requires GPU or sufficient RAM)
|
|
116
|
+
# - api: Use OpenAI API only (requires OPENAI_API_KEY env var)
|
|
117
|
+
embeddings: auto
|
|
118
|
+
|
|
119
|
+
# ==============================================================================
|
|
120
|
+
# EMBEDDINGS CONFIGURATION
|
|
121
|
+
# ==============================================================================
|
|
122
|
+
|
|
123
|
+
embeddings:
|
|
124
|
+
# Sentence-transformers model for local embeddings
|
|
125
|
+
# Popular options:
|
|
126
|
+
# - all-MiniLM-L6-v2: Fast, 384 dimensions (default)
|
|
127
|
+
# - all-mpnet-base-v2: Better quality, 768 dimensions
|
|
128
|
+
# - multi-qa-mpnet-base-dot-v1: Optimized for Q&A
|
|
129
|
+
model: all-MiniLM-L6-v2
|
|
130
|
+
|
|
131
|
+
# Device for local embeddings computation
|
|
132
|
+
# Options: "cpu" | "cuda" | "mps"
|
|
133
|
+
# - cpu: Use CPU (slower but works everywhere)
|
|
134
|
+
# - cuda: Use NVIDIA GPU (requires CUDA)
|
|
135
|
+
# - mps: Use Apple Silicon GPU (macOS only)
|
|
136
|
+
device: cpu
|
|
137
|
+
|
|
138
|
+
# Batch size for embedding generation
|
|
139
|
+
# Larger values are faster but use more memory
|
|
140
|
+
# Reduce if you encounter OOM errors
|
|
141
|
+
# Recommended values:
|
|
142
|
+
# - CPU: 16-32
|
|
143
|
+
# - GPU: 64-128
|
|
144
|
+
batch_size: 32
|
|
145
|
+
|
|
146
|
+
# API provider for fallback embeddings
|
|
147
|
+
# Options: "openai"
|
|
148
|
+
# Future: "cohere", "anthropic", "huggingface"
|
|
149
|
+
api_provider: openai
|
|
150
|
+
|
|
151
|
+
# Environment variable name containing API key
|
|
152
|
+
# Set this environment variable before running context-pack
|
|
153
|
+
# Example: export OPENAI_API_KEY="sk-..."
|
|
154
|
+
api_key_env: OPENAI_API_KEY
|
|
155
|
+
|
|
156
|
+
# ==============================================================================
|
|
157
|
+
# PERFORMANCE TUNING
|
|
158
|
+
# ==============================================================================
|
|
159
|
+
|
|
160
|
+
performance:
|
|
161
|
+
# Maximum number of worker threads for parallel processing
|
|
162
|
+
# Set to 0 to use all available CPU cores
|
|
163
|
+
# Recommended: 4 for most systems
|
|
164
|
+
max_workers: 4
|
|
165
|
+
|
|
166
|
+
# Cache embeddings to disk for faster subsequent runs
|
|
167
|
+
# Embeddings are stored in .context-pack/embeddings.cache
|
|
168
|
+
# Set to false to disable caching (saves disk space)
|
|
169
|
+
cache_embeddings: true
|
|
170
|
+
|
|
171
|
+
# Enable incremental indexing
|
|
172
|
+
# Only re-index files that have changed since last run
|
|
173
|
+
# Set to false to force full re-indexing every time
|
|
174
|
+
incremental_index: true
|
|
175
|
+
|
|
176
|
+
# ==============================================================================
|
|
177
|
+
# LOGGING CONFIGURATION
|
|
178
|
+
# ==============================================================================
|
|
179
|
+
|
|
180
|
+
logging:
|
|
181
|
+
# Log level for console output
|
|
182
|
+
# Options: "DEBUG" | "INFO" | "WARNING" | "ERROR"
|
|
183
|
+
# - DEBUG: All messages including detailed timing
|
|
184
|
+
# - INFO: Progress messages and warnings
|
|
185
|
+
# - WARNING: Warnings and errors only
|
|
186
|
+
# - ERROR: Errors only
|
|
187
|
+
console_level: INFO
|
|
188
|
+
|
|
189
|
+
# Log level for file output
|
|
190
|
+
# File logs are always written to .context-pack/logs/
|
|
191
|
+
# Recommended: DEBUG for troubleshooting
|
|
192
|
+
file_level: DEBUG
|
|
193
|
+
|
|
194
|
+
# Enable verbose mode for detailed timing information
|
|
195
|
+
# Logs execution time for each phase
|
|
196
|
+
verbose: false
|
|
197
|
+
|
|
198
|
+
# ==============================================================================
|
|
199
|
+
# ADVANCED OPTIONS
|
|
200
|
+
# ==============================================================================
|
|
201
|
+
|
|
202
|
+
advanced:
|
|
203
|
+
# PageRank damping factor (0.0 to 1.0)
|
|
204
|
+
# Higher values give more weight to incoming links
|
|
205
|
+
# Standard value: 0.85
|
|
206
|
+
pagerank_damping: 0.85
|
|
207
|
+
|
|
208
|
+
# PageRank boost factor for changed files (1.0 to 10.0)
|
|
209
|
+
# Multiplier applied to PageRank scores of changed files
|
|
210
|
+
# Higher values prioritize changed files more strongly
|
|
211
|
+
# Recommended: 2.0 for PR reviews
|
|
212
|
+
changed_file_boost: 2.0
|
|
213
|
+
|
|
214
|
+
# Maximum number of iterations for PageRank convergence
|
|
215
|
+
# Higher values improve accuracy but increase computation time
|
|
216
|
+
pagerank_max_iterations: 100
|
|
217
|
+
|
|
218
|
+
# Convergence tolerance for PageRank
|
|
219
|
+
# Stop iterating when score changes are below this threshold
|
|
220
|
+
pagerank_tolerance: 0.0001
|
|
221
|
+
|
|
222
|
+
# Minimum file size in bytes to include
|
|
223
|
+
# Files smaller than this are excluded
|
|
224
|
+
# Set to 0 to include all files
|
|
225
|
+
min_file_size: 0
|
|
226
|
+
|
|
227
|
+
# Maximum file size in bytes to include
|
|
228
|
+
# Files larger than this are excluded
|
|
229
|
+
# Set to 0 for no limit
|
|
230
|
+
# Recommended: 1000000 (1 MB) to exclude large generated files
|
|
231
|
+
max_file_size: 1000000
|
|
232
|
+
|
|
233
|
+
# Enable AST parsing round-trip validation
|
|
234
|
+
# Verifies that parse → print → parse produces equivalent structure
|
|
235
|
+
# Useful for debugging parser issues
|
|
236
|
+
# Warning: Significantly slows down indexing
|
|
237
|
+
validate_roundtrip: false
|
|
238
|
+
|
|
239
|
+
# ==============================================================================
|
|
240
|
+
# EXAMPLE CONFIGURATIONS
|
|
241
|
+
# ==============================================================================
|
|
242
|
+
|
|
243
|
+
# Example 1: PR Review Workflow
|
|
244
|
+
# Optimize for reviewing changed files and their dependencies
|
|
245
|
+
#
|
|
246
|
+
# semantic_weight: 0.4
|
|
247
|
+
# pagerank_weight: 0.6
|
|
248
|
+
# changed_file_boost: 3.0
|
|
249
|
+
# format: zip
|
|
250
|
+
|
|
251
|
+
# Example 2: Bug Investigation
|
|
252
|
+
# Optimize for semantic search with natural language queries
|
|
253
|
+
#
|
|
254
|
+
# semantic_weight: 0.8
|
|
255
|
+
# pagerank_weight: 0.2
|
|
256
|
+
# format: xml
|
|
257
|
+
# token_budget: 50000
|
|
258
|
+
|
|
259
|
+
# Example 3: Documentation Generation
|
|
260
|
+
# Optimize for core API files and public interfaces
|
|
261
|
+
#
|
|
262
|
+
# semantic_weight: 0.5
|
|
263
|
+
# pagerank_weight: 0.5
|
|
264
|
+
# include_patterns:
|
|
265
|
+
# - "**/api/**/*.py"
|
|
266
|
+
# - "**/models/**/*.py"
|
|
267
|
+
# - "**/schemas/**/*.py"
|
|
268
|
+
|
|
269
|
+
# Example 4: Minimal Dependencies (No Optional Backends)
|
|
270
|
+
# Use only core dependencies with fallback algorithms
|
|
271
|
+
#
|
|
272
|
+
# backends:
|
|
273
|
+
# vector_index: faiss
|
|
274
|
+
# graph: networkx
|
|
275
|
+
# embeddings: api
|
|
276
|
+
|
|
277
|
+
# Example 5: Maximum Performance (All Primary Backends)
|
|
278
|
+
# Use all primary backends for optimal speed
|
|
279
|
+
#
|
|
280
|
+
# backends:
|
|
281
|
+
# vector_index: leann
|
|
282
|
+
# graph: igraph
|
|
283
|
+
# embeddings: local
|
|
284
|
+
# embeddings:
|
|
285
|
+
# device: cuda
|
|
286
|
+
# batch_size: 128
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Authors
|
|
2
|
+
|
|
3
|
+
This file lists the contributors to Context Packer.
|
|
4
|
+
|
|
5
|
+
## Creator and Lead Maintainer
|
|
6
|
+
|
|
7
|
+
- **zamery** <zaob.ogn@gmail.com>
|
|
8
|
+
- Project creator and lead maintainer
|
|
9
|
+
- Initial implementation and design
|
|
10
|
+
|
|
11
|
+
## Contributors
|
|
12
|
+
|
|
13
|
+
<!-- Contributors will be added here as they contribute -->
|
|
14
|
+
|
|
15
|
+
We welcome contributions from everyone! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
16
|
+
|
|
17
|
+
## Acknowledgments
|
|
18
|
+
|
|
19
|
+
Special thanks to:
|
|
20
|
+
|
|
21
|
+
- The open source community for inspiration and tools
|
|
22
|
+
- Tree-sitter project for AST parsing capabilities
|
|
23
|
+
- FAISS team for vector indexing
|
|
24
|
+
- igraph and NetworkX teams for graph analysis
|
|
25
|
+
- Sentence Transformers for embedding models
|
|
26
|
+
- All users who report bugs and suggest improvements
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
To add yourself to this list, please include your name and email in your pull request.
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
## [0.1.4] - 2026-03-25
|
|
3
|
+
|
|
4
|
+
### Added
|
|
5
|
+
- `context-pack status` - Show index size, file count, backend info
|
|
6
|
+
- `context-pack vacuum` - Optimize SQLite database
|
|
7
|
+
- `context-pack reindex-domain` - Only rebuild domain_map.db (fast)
|
|
8
|
+
- SQLite DomainMapDB backend for large repositories (>10K files)
|
|
9
|
+
- Phase 1-4: Parallel Write → Shadow Read → SQLite Primary → Cleanup
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Tuned retrieval weights: domain_boost 0.4 → 0.25
|
|
13
|
+
- Improved query classification for better ranking
|
|
14
|
+
- Fixed DomainMapDB.drop-in compatibility with RetrievalEngine
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Missing `directories_for()` method in DomainMapDB
|
|
18
|
+
- Broken try block structure in query.py
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [0.1.3] - 2026-03-24
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- `context-pack status` - Show index size, file count, backend info
|
|
25
|
+
- `context-pack vacuum` - Optimize SQLite database
|
|
26
|
+
- `context-pack reindex-domain` - Only rebuild domain_map.db (fast)
|
|
27
|
+
- SQLite DomainMapDB backend for large repositories (>10K files)
|
|
28
|
+
- Phase 1-4: Parallel Write → Shadow Read → SQLite Primary → Cleanup
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- Tuned retrieval weights: domain_boost 0.4 → 0.25
|
|
32
|
+
- Improved query classification for better ranking
|
|
33
|
+
- Fixed DomainMapDB.drop-in compatibility with RetrievalEngine
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Missing `directories_for()` method in DomainMapDB
|
|
37
|
+
- Broken try block structure in query.py
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [0.1.2] - 2026-03-24
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
- `context-pack status` - Show index size, file count, backend info
|
|
44
|
+
- `context-pack vacuum` - Optimize SQLite database
|
|
45
|
+
- `context-pack reindex-domain` - Only rebuild domain_map.db (fast)
|
|
46
|
+
- SQLite DomainMapDB backend for large repositories (>10K files)
|
|
47
|
+
- Phase 1-4: Parallel Write → Shadow Read → SQLite Primary → Cleanup
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Tuned retrieval weights: domain_boost 0.4 → 0.25
|
|
51
|
+
- Improved query classification for better ranking
|
|
52
|
+
- Fixed DomainMapDB.drop-in compatibility with RetrievalEngine
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
- Missing `directories_for()` method in DomainMapDB
|
|
56
|
+
- Broken try block structure in query.py
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## [0.1.1] - 2026-03-24
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
- `context-pack status` - Show index size, file count, backend info
|
|
63
|
+
- `context-pack vacuum` - Optimize SQLite database
|
|
64
|
+
- `context-pack reindex-domain` - Only rebuild domain_map.db (fast)
|
|
65
|
+
- SQLite DomainMapDB backend for large repositories (>10K files)
|
|
66
|
+
- Phase 1-4: Parallel Write → Shadow Read → SQLite Primary → Cleanup
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
- Tuned retrieval weights: domain_boost 0.4 → 0.25
|
|
70
|
+
- Improved query classification for better ranking
|
|
71
|
+
- Fixed DomainMapDB.drop-in compatibility with RetrievalEngine
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
- Missing `directories_for()` method in DomainMapDB
|
|
75
|
+
- Broken try block structure in query.py
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
All notable changes to this project will be documented in this file.
|
|
80
|
+
|
|
81
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
82
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
83
|
+
|
|
84
|
+
## [Unreleased]
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
- Initial project structure with comprehensive documentation
|
|
88
|
+
- README.md with installation instructions and usage examples
|
|
89
|
+
- CONTRIBUTING.md with development guidelines
|
|
90
|
+
- CODE_OF_CONDUCT.md based on Contributor Covenant 2.1
|
|
91
|
+
- Example configuration file (.context-pack.yaml.example)
|
|
92
|
+
- GPL-3.0-or-later license
|
|
93
|
+
|
|
94
|
+
## [0.1.0] - 2025-01-XX
|
|
95
|
+
|
|
96
|
+
### Added
|
|
97
|
+
- AST-based code parsing with Tree-sitter (primary) and regex fallback
|
|
98
|
+
- Vector indexing with LEANN (primary) and FAISS (fallback)
|
|
99
|
+
- Dependency graph analysis with igraph (primary) and NetworkX (fallback)
|
|
100
|
+
- Hybrid ranking combining semantic search and PageRank
|
|
101
|
+
- Token budget management with greedy knapsack algorithm
|
|
102
|
+
- Dual output formats: XML (Repomix-style) and ZIP (with manifest)
|
|
103
|
+
- Incremental indexing with staleness detection
|
|
104
|
+
- Comprehensive fallback strategies for all components
|
|
105
|
+
- CLI interface with index, query, and pack commands
|
|
106
|
+
- Configuration management via YAML files
|
|
107
|
+
- Structured logging with dual output (console + file)
|
|
108
|
+
- Property-based testing with Hypothesis
|
|
109
|
+
- Integration tests for full workflow
|
|
110
|
+
- Performance benchmarks for all components
|
|
111
|
+
|
|
112
|
+
### Features
|
|
113
|
+
- Support for Python, JavaScript, and TypeScript parsing
|
|
114
|
+
- Local embeddings with sentence-transformers
|
|
115
|
+
- OpenAI API fallback for embeddings
|
|
116
|
+
- Changed file boosting for PR reviews
|
|
117
|
+
- Configurable semantic and PageRank weights
|
|
118
|
+
- File filtering with include/exclude patterns
|
|
119
|
+
- Automatic backend selection and fallback
|
|
120
|
+
- Round-trip validation for AST parsing
|
|
121
|
+
- Token counting with ±2% accuracy
|
|
122
|
+
|
|
123
|
+
### Performance
|
|
124
|
+
- Indexing: <5 minutes for 10,000 files (primary backends)
|
|
125
|
+
- Query: <10 seconds for 10,000 files (primary backends)
|
|
126
|
+
- Parsing: <5 seconds per 1,000 lines of code
|
|
127
|
+
- LEANN: 97% storage savings vs traditional vector indexes
|
|
128
|
+
|
|
129
|
+
### Documentation
|
|
130
|
+
- Comprehensive README with quick start guide
|
|
131
|
+
- Detailed configuration documentation
|
|
132
|
+
- API documentation with Google-style docstrings
|
|
133
|
+
- Contributing guidelines
|
|
134
|
+
- Code of Conduct
|
|
135
|
+
- Example workflows for common use cases
|
|
136
|
+
|
|
137
|
+
[Unreleased]: https://github.com/maemreyo/zmr-ctx-paker/compare/v0.1.0...HEAD
|
|
138
|
+
[0.1.0]: https://github.com/maemreyo/zmr-ctx-paker/releases/tag/v0.1.0
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
+
|
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
* Public or private harassment
|
|
24
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Enforcement Responsibilities
|
|
28
|
+
|
|
29
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **zaob.ogn@gmail.com**. All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
## Enforcement Guidelines
|
|
44
|
+
|
|
45
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
46
|
+
|
|
47
|
+
### 1. Correction
|
|
48
|
+
|
|
49
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
50
|
+
|
|
51
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
52
|
+
|
|
53
|
+
### 2. Warning
|
|
54
|
+
|
|
55
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
56
|
+
|
|
57
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
|
|
61
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
62
|
+
|
|
63
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
64
|
+
|
|
65
|
+
### 4. Permanent Ban
|
|
66
|
+
|
|
67
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
70
|
+
|
|
71
|
+
## Attribution
|
|
72
|
+
|
|
73
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
76
|
+
|
|
77
|
+
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|