code-context-engine 0.4.5__tar.gz → 0.4.6__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.
Files changed (87) hide show
  1. {code_context_engine-0.4.5/src/code_context_engine.egg-info → code_context_engine-0.4.6}/PKG-INFO +14 -15
  2. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/README.md +12 -13
  3. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/pyproject.toml +2 -2
  4. {code_context_engine-0.4.5 → code_context_engine-0.4.6/src/code_context_engine.egg-info}/PKG-INFO +14 -15
  5. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/cli.py +11 -7
  6. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/retrieval/confidence.py +2 -2
  7. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/retrieval/retriever.py +17 -1
  8. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_uninstall.py +1 -1
  9. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/LICENSE +0 -0
  10. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/setup.cfg +0 -0
  11. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/code_context_engine.egg-info/SOURCES.txt +0 -0
  12. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/code_context_engine.egg-info/dependency_links.txt +0 -0
  13. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/code_context_engine.egg-info/entry_points.txt +0 -0
  14. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/code_context_engine.egg-info/requires.txt +0 -0
  15. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/code_context_engine.egg-info/top_level.txt +0 -0
  16. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/__init__.py +0 -0
  17. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/cli_style.py +0 -0
  18. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/__init__.py +0 -0
  19. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/compressor.py +0 -0
  20. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/ollama_client.py +0 -0
  21. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/output_rules.py +0 -0
  22. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/prompts.py +0 -0
  23. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/compression/quality.py +0 -0
  24. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/config.py +0 -0
  25. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/dashboard/__init__.py +0 -0
  26. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/dashboard/_page.py +0 -0
  27. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/dashboard/server.py +0 -0
  28. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/editors.py +0 -0
  29. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/event_bus.py +0 -0
  30. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/__init__.py +0 -0
  31. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/chunker.py +0 -0
  32. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/embedder.py +0 -0
  33. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/embedding_cache.py +0 -0
  34. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/git_hooks.py +0 -0
  35. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/git_indexer.py +0 -0
  36. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/ignorefile.py +0 -0
  37. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/manifest.py +0 -0
  38. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/pipeline.py +0 -0
  39. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/secrets.py +0 -0
  40. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/indexer/watcher.py +0 -0
  41. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/integration/__init__.py +0 -0
  42. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/integration/bootstrap.py +0 -0
  43. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/integration/git_context.py +0 -0
  44. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/integration/mcp_server.py +0 -0
  45. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/integration/session_capture.py +0 -0
  46. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/__init__.py +0 -0
  47. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/compressor.py +0 -0
  48. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/db.py +0 -0
  49. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/extractive.py +0 -0
  50. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/grammar.py +0 -0
  51. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/hook_installer.py +0 -0
  52. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/hook_server.py +0 -0
  53. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/hooks.py +0 -0
  54. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/memory/migrate.py +0 -0
  55. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/models.py +0 -0
  56. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/pricing.py +0 -0
  57. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/project_commands.py +0 -0
  58. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/retrieval/__init__.py +0 -0
  59. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/retrieval/query_parser.py +0 -0
  60. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/serve_http.py +0 -0
  61. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/services.py +0 -0
  62. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/__init__.py +0 -0
  63. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/backend.py +0 -0
  64. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/fts_store.py +0 -0
  65. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/graph_store.py +0 -0
  66. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/local_backend.py +0 -0
  67. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/remote_backend.py +0 -0
  68. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/storage/vector_store.py +0 -0
  69. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/src/context_engine/utils.py +0 -0
  70. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_init_probe.py +0 -0
  71. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_mcp_config.py +0 -0
  72. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_savings.py +0 -0
  73. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_savings_buckets.py +0 -0
  74. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_savings_e2e.py +0 -0
  75. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_serve.py +0 -0
  76. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_sessions_export.py +0 -0
  77. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_sessions_status.py +0 -0
  78. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_cli_smoke.py +0 -0
  79. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_config.py +0 -0
  80. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_e2e.py +0 -0
  81. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_event_bus.py +0 -0
  82. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_models.py +0 -0
  83. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_project_commands.py +0 -0
  84. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_real_life.py +0 -0
  85. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_services.py +0 -0
  86. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_token_efficiency.py +0 -0
  87. {code_context_engine-0.4.5 → code_context_engine-0.4.6}/tests/test_token_packing.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-context-engine
3
- Version: 0.4.5
4
- Summary: Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex.
3
+ Version: 0.4.6
4
+ Summary: Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex.
5
5
  Author-email: Fazle Elahee <felahee@gmail.com>, Raj <rajkumar.sakti@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/elara-labs/code-context-engine
@@ -54,7 +54,7 @@ Dynamic: license-file
54
54
  <h1 align="center">Code Context Engine</h1>
55
55
 
56
56
  <p align="center">
57
- <strong>Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked.</strong>
57
+ <strong>Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked.</strong>
58
58
  </p>
59
59
 
60
60
  <p align="center">
@@ -122,7 +122,7 @@ Multiple editors in the same project? All get configured in one command.
122
122
  ```
123
123
  my-project · 38 queries
124
124
 
125
- ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 93% tokens saved
125
+ ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 94% tokens saved
126
126
 
127
127
  Without CCE 48.0k tokens $0.24
128
128
  With CCE 3.4k tokens $0.02
@@ -136,7 +136,7 @@ Multiple editors in the same project? All get configured in one command.
136
136
 
137
137
  ## Why this matters
138
138
 
139
- Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 93% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
139
+ Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
140
140
 
141
141
  ```
142
142
  Without CCE: Claude reads payments.py + shipping.py = 45,000 tokens
@@ -154,17 +154,16 @@ With CCE: context_search "payment flow" = 800 tokens
154
154
 
155
155
  ## Benchmark: FastAPI (independently verified)
156
156
 
157
- We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 source files, 19K lines of Python) with 20 real coding questions. No cherry-picking, no synthetic queries.
157
+ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 source files, 180K tokens) with 20 real coding questions. No cherry-picking, no synthetic queries.
158
158
 
159
159
  **Methodology:** For each query, "without CCE" means reading the full content of every file the query touches. "With CCE" means the relevant chunks after compression. This is conservative (agents often read more files than needed).
160
160
 
161
161
  | Metric | Result |
162
162
  |--------|--------|
163
- | **Retrieval** | **93%** savings (75,3555,381 tokens/query) |
164
- | **+ Compression** | **90%** additional (5,381541 tokens/query) |
165
- | **Combined** | **99.3%** (75,355541 tokens/query) |
166
- | Recall@10 (found the right files) | 0.80 |
167
- | Precision@10 | 0.30 |
163
+ | **Retrieval** | **94%** savings (83,6814,927 tokens/query) |
164
+ | **+ Compression** | **89%** additional (4,927523 tokens/query) |
165
+ | **Combined** | **99.4%** (83,681523 tokens/query) |
166
+ | Recall@10 (found the right files) | 0.90 |
168
167
  | Latency p50 | 0.4ms |
169
168
  | Queries tested | 20 |
170
169
 
@@ -172,8 +171,8 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 sou
172
171
 
173
172
  | Layer | What it does | Savings | Method |
174
173
  |-------|-------------|---------|--------|
175
- | **Retrieval** | Full files → relevant code chunks | 93% | measured |
176
- | **Chunk Compression** | Raw chunks → signatures + docstrings | 90% | measured |
174
+ | **Retrieval** | Full files → relevant code chunks | 94% | measured |
175
+ | **Chunk Compression** | Raw chunks → signatures + docstrings | 89% | measured |
177
176
  | **Output Compression** | Reduces Claude's reply length | 65% | estimated |
178
177
  | **Grammar** | Drops articles/fillers from memory text | 13% | measured |
179
178
 
@@ -246,7 +245,7 @@ Re-indexing after edits takes under 1 second (96% embedding cache hit rate). Git
246
245
 
247
246
  Output compression tools (like Caveman) save 20-75% on output tokens. Output is 5-15% of your bill. Net savings: ~11%.
248
247
 
249
- CCE saves on **input** tokens (93% retrieval + 90% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
248
+ CCE saves on **input** tokens (94% retrieval + 89% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
250
249
 
251
250
  ### It actually understands your code
252
251
 
@@ -416,7 +415,7 @@ No GPU required. Embedding model runs on CPU via ONNX Runtime.
416
415
  - [x] Clean uninstall (removes all CCE artifacts)
417
416
  - [x] AST-aware chunking for PHP, Go, Rust, Java (tree-sitter)
418
417
  - [x] Multi-editor support (Cursor, VS Code/Copilot, Gemini CLI)
419
- - [x] Reproducible benchmark suite (93% savings on FastAPI, per-layer breakdown)
418
+ - [x] Reproducible benchmark suite (94% savings on FastAPI, per-layer breakdown)
420
419
  - [x] Session savings visibility (shown at every session start)
421
420
  - [ ] Tree-sitter support for C, C++, Ruby, Swift, Kotlin
422
421
  - [ ] Docker support for remote mode
@@ -5,7 +5,7 @@
5
5
  <h1 align="center">Code Context Engine</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked.</strong>
8
+ <strong>Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked.</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
@@ -73,7 +73,7 @@ Multiple editors in the same project? All get configured in one command.
73
73
  ```
74
74
  my-project · 38 queries
75
75
 
76
- ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 93% tokens saved
76
+ ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 94% tokens saved
77
77
 
78
78
  Without CCE 48.0k tokens $0.24
79
79
  With CCE 3.4k tokens $0.02
@@ -87,7 +87,7 @@ Multiple editors in the same project? All get configured in one command.
87
87
 
88
88
  ## Why this matters
89
89
 
90
- Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 93% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
90
+ Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
91
91
 
92
92
  ```
93
93
  Without CCE: Claude reads payments.py + shipping.py = 45,000 tokens
@@ -105,17 +105,16 @@ With CCE: context_search "payment flow" = 800 tokens
105
105
 
106
106
  ## Benchmark: FastAPI (independently verified)
107
107
 
108
- We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 source files, 19K lines of Python) with 20 real coding questions. No cherry-picking, no synthetic queries.
108
+ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 source files, 180K tokens) with 20 real coding questions. No cherry-picking, no synthetic queries.
109
109
 
110
110
  **Methodology:** For each query, "without CCE" means reading the full content of every file the query touches. "With CCE" means the relevant chunks after compression. This is conservative (agents often read more files than needed).
111
111
 
112
112
  | Metric | Result |
113
113
  |--------|--------|
114
- | **Retrieval** | **93%** savings (75,3555,381 tokens/query) |
115
- | **+ Compression** | **90%** additional (5,381541 tokens/query) |
116
- | **Combined** | **99.3%** (75,355541 tokens/query) |
117
- | Recall@10 (found the right files) | 0.80 |
118
- | Precision@10 | 0.30 |
114
+ | **Retrieval** | **94%** savings (83,6814,927 tokens/query) |
115
+ | **+ Compression** | **89%** additional (4,927523 tokens/query) |
116
+ | **Combined** | **99.4%** (83,681523 tokens/query) |
117
+ | Recall@10 (found the right files) | 0.90 |
119
118
  | Latency p50 | 0.4ms |
120
119
  | Queries tested | 20 |
121
120
 
@@ -123,8 +122,8 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 sou
123
122
 
124
123
  | Layer | What it does | Savings | Method |
125
124
  |-------|-------------|---------|--------|
126
- | **Retrieval** | Full files → relevant code chunks | 93% | measured |
127
- | **Chunk Compression** | Raw chunks → signatures + docstrings | 90% | measured |
125
+ | **Retrieval** | Full files → relevant code chunks | 94% | measured |
126
+ | **Chunk Compression** | Raw chunks → signatures + docstrings | 89% | measured |
128
127
  | **Output Compression** | Reduces Claude's reply length | 65% | estimated |
129
128
  | **Grammar** | Drops articles/fillers from memory text | 13% | measured |
130
129
 
@@ -197,7 +196,7 @@ Re-indexing after edits takes under 1 second (96% embedding cache hit rate). Git
197
196
 
198
197
  Output compression tools (like Caveman) save 20-75% on output tokens. Output is 5-15% of your bill. Net savings: ~11%.
199
198
 
200
- CCE saves on **input** tokens (93% retrieval + 90% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
199
+ CCE saves on **input** tokens (94% retrieval + 89% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
201
200
 
202
201
  ### It actually understands your code
203
202
 
@@ -367,7 +366,7 @@ No GPU required. Embedding model runs on CPU via ONNX Runtime.
367
366
  - [x] Clean uninstall (removes all CCE artifacts)
368
367
  - [x] AST-aware chunking for PHP, Go, Rust, Java (tree-sitter)
369
368
  - [x] Multi-editor support (Cursor, VS Code/Copilot, Gemini CLI)
370
- - [x] Reproducible benchmark suite (93% savings on FastAPI, per-layer breakdown)
369
+ - [x] Reproducible benchmark suite (94% savings on FastAPI, per-layer breakdown)
371
370
  - [x] Session savings visibility (shown at every session start)
372
371
  - [ ] Tree-sitter support for C, C++, Ruby, Swift, Kotlin
373
372
  - [ ] Docker support for remote mode
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "code-context-engine"
3
- version = "0.4.5"
4
- description = "Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex."
3
+ version = "0.4.6"
4
+ description = "Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex."
5
5
  readme = {file = "README.md", content-type = "text/markdown"}
6
6
  license = "MIT"
7
7
  authors = [
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-context-engine
3
- Version: 0.4.5
4
- Summary: Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex.
3
+ Version: 0.4.6
4
+ Summary: Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked on FastAPI. Works with Claude Code, Cursor, VS Code, Gemini CLI, and Codex.
5
5
  Author-email: Fazle Elahee <felahee@gmail.com>, Raj <rajkumar.sakti@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/elara-labs/code-context-engine
@@ -54,7 +54,7 @@ Dynamic: license-file
54
54
  <h1 align="center">Code Context Engine</h1>
55
55
 
56
56
  <p align="center">
57
- <strong>Index your codebase. AI searches instead of re-reading files. 93% token savings, benchmarked.</strong>
57
+ <strong>Index your codebase. AI searches instead of re-reading files. 94% token savings, benchmarked.</strong>
58
58
  </p>
59
59
 
60
60
  <p align="center">
@@ -122,7 +122,7 @@ Multiple editors in the same project? All get configured in one command.
122
122
  ```
123
123
  my-project · 38 queries
124
124
 
125
- ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 93% tokens saved
125
+ ⛁ ⛁ ⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ 94% tokens saved
126
126
 
127
127
  Without CCE 48.0k tokens $0.24
128
128
  With CCE 3.4k tokens $0.02
@@ -136,7 +136,7 @@ Multiple editors in the same project? All get configured in one command.
136
136
 
137
137
  ## Why this matters
138
138
 
139
- Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 93% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
139
+ Input tokens are 85-95% of your Claude Code bill. CCE cuts them by 94% ([benchmarked on FastAPI](#benchmark-fastapi-independently-verified)).
140
140
 
141
141
  ```
142
142
  Without CCE: Claude reads payments.py + shipping.py = 45,000 tokens
@@ -154,17 +154,16 @@ With CCE: context_search "payment flow" = 800 tokens
154
154
 
155
155
  ## Benchmark: FastAPI (independently verified)
156
156
 
157
- We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 source files, 19K lines of Python) with 20 real coding questions. No cherry-picking, no synthetic queries.
157
+ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (53 source files, 180K tokens) with 20 real coding questions. No cherry-picking, no synthetic queries.
158
158
 
159
159
  **Methodology:** For each query, "without CCE" means reading the full content of every file the query touches. "With CCE" means the relevant chunks after compression. This is conservative (agents often read more files than needed).
160
160
 
161
161
  | Metric | Result |
162
162
  |--------|--------|
163
- | **Retrieval** | **93%** savings (75,3555,381 tokens/query) |
164
- | **+ Compression** | **90%** additional (5,381541 tokens/query) |
165
- | **Combined** | **99.3%** (75,355541 tokens/query) |
166
- | Recall@10 (found the right files) | 0.80 |
167
- | Precision@10 | 0.30 |
163
+ | **Retrieval** | **94%** savings (83,6814,927 tokens/query) |
164
+ | **+ Compression** | **89%** additional (4,927523 tokens/query) |
165
+ | **Combined** | **99.4%** (83,681523 tokens/query) |
166
+ | Recall@10 (found the right files) | 0.90 |
168
167
  | Latency p50 | 0.4ms |
169
168
  | Queries tested | 20 |
170
169
 
@@ -172,8 +171,8 @@ We benchmarked CCE against [FastAPI](https://github.com/fastapi/fastapi) (48 sou
172
171
 
173
172
  | Layer | What it does | Savings | Method |
174
173
  |-------|-------------|---------|--------|
175
- | **Retrieval** | Full files → relevant code chunks | 93% | measured |
176
- | **Chunk Compression** | Raw chunks → signatures + docstrings | 90% | measured |
174
+ | **Retrieval** | Full files → relevant code chunks | 94% | measured |
175
+ | **Chunk Compression** | Raw chunks → signatures + docstrings | 89% | measured |
177
176
  | **Output Compression** | Reduces Claude's reply length | 65% | estimated |
178
177
  | **Grammar** | Drops articles/fillers from memory text | 13% | measured |
179
178
 
@@ -246,7 +245,7 @@ Re-indexing after edits takes under 1 second (96% embedding cache hit rate). Git
246
245
 
247
246
  Output compression tools (like Caveman) save 20-75% on output tokens. Output is 5-15% of your bill. Net savings: ~11%.
248
247
 
249
- CCE saves on **input** tokens (93% retrieval + 90% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
248
+ CCE saves on **input** tokens (94% retrieval + 89% compression on FastAPI, [independently benchmarked](#benchmark-fastapi-independently-verified)). Input is 85-95% of your bill.
250
249
 
251
250
  ### It actually understands your code
252
251
 
@@ -416,7 +415,7 @@ No GPU required. Embedding model runs on CPU via ONNX Runtime.
416
415
  - [x] Clean uninstall (removes all CCE artifacts)
417
416
  - [x] AST-aware chunking for PHP, Go, Rust, Java (tree-sitter)
418
417
  - [x] Multi-editor support (Cursor, VS Code/Copilot, Gemini CLI)
419
- - [x] Reproducible benchmark suite (93% savings on FastAPI, per-layer breakdown)
418
+ - [x] Reproducible benchmark suite (94% savings on FastAPI, per-layer breakdown)
420
419
  - [x] Session savings visibility (shown at every session start)
421
420
  - [ ] Tree-sitter support for C, C++, Ruby, Swift, Kotlin
422
421
  - [ ] Docker support for remote mode
@@ -1674,12 +1674,10 @@ def search(ctx: click.Context, query: str, top_k: int) -> None:
1674
1674
  lines.append(f" {DOT} {dim('No results found')}")
1675
1675
  else:
1676
1676
  # Compute tokens
1677
- raw_tokens = 0
1678
1677
  served_tokens = 0
1679
1678
  seen_files: set[str] = set()
1680
1679
  for r in results:
1681
1680
  chunk_tokens = max(1, len(r.content) // 4)
1682
- raw_tokens += chunk_tokens
1683
1681
  served_tokens += chunk_tokens
1684
1682
  seen_files.add(r.file_path)
1685
1683
 
@@ -1702,7 +1700,8 @@ def search(ctx: click.Context, query: str, top_k: int) -> None:
1702
1700
  lines.append(f" {dim(first_line)}")
1703
1701
 
1704
1702
  lines.append("")
1705
- lines.append(f" {CHECK} {success(f'{len(results)} results')} {dim(f'{served_tokens} tokens served vs {full_file_tokens} full file tokens')}")
1703
+ savings_pct = int((1 - served_tokens / full_file_tokens) * 100) if full_file_tokens > 0 else 0
1704
+ lines.append(f" {CHECK} {success(f'{len(results)} results')} {dim(f'{served_tokens} tokens served vs {full_file_tokens} full file tokens ({savings_pct}% saved)')}")
1706
1705
 
1707
1706
  # Update stats
1708
1707
  stats_path = storage_dir / "stats.json"
@@ -1711,10 +1710,8 @@ def search(ctx: click.Context, query: str, top_k: int) -> None:
1711
1710
  except (json.JSONDecodeError, OSError):
1712
1711
  stats = {}
1713
1712
  stats["queries"] = stats.get("queries", 0) + 1
1714
- stats["raw_tokens"] = stats.get("raw_tokens", 0) + raw_tokens
1713
+ stats["full_file_tokens"] = stats.get("full_file_tokens", 0) + full_file_tokens
1715
1714
  stats["served_tokens"] = stats.get("served_tokens", 0) + served_tokens
1716
- stats.setdefault("full_file_tokens", 0)
1717
- stats["full_file_tokens"] = max(stats["full_file_tokens"], full_file_tokens)
1718
1715
  stats_path.write_text(json.dumps(stats))
1719
1716
 
1720
1717
  lines.append("")
@@ -1724,12 +1721,19 @@ def search(ctx: click.Context, query: str, top_k: int) -> None:
1724
1721
 
1725
1722
 
1726
1723
  @main.command()
1727
- def uninstall() -> None:
1724
+ @click.option("--yes", "-y", is_flag=True, help="Skip confirmation prompt")
1725
+ def uninstall(yes: bool) -> None:
1728
1726
  """Remove CCE from the current project (hooks, .mcp.json entry, CLAUDE.md block)."""
1729
1727
  from context_engine.cli_style import section, animate, value, dim, success, warn, CHECK, CROSS, DOT
1730
1728
 
1731
1729
  project_dir = Path.cwd()
1732
1730
  project_name = project_dir.name
1731
+
1732
+ if not yes:
1733
+ if not click.confirm(f"Remove CCE from {project_name}?", default=False):
1734
+ click.echo("Cancelled.")
1735
+ return
1736
+
1733
1737
  lines: list[str] = []
1734
1738
  lines.append("")
1735
1739
  lines.append(section(f"Uninstall · {project_name}"))
@@ -14,8 +14,8 @@ import time
14
14
  from context_engine.models import Chunk
15
15
 
16
16
  _VECTOR_WEIGHT = 0.5
17
- _KEYWORD_WEIGHT = 0.3
18
- _RECENCY_WEIGHT = 0.2
17
+ _KEYWORD_WEIGHT = 0.4
18
+ _RECENCY_WEIGHT = 0.1
19
19
  _MAX_KEYWORD_DISTANCE = 5
20
20
  _RECENCY_HALF_LIFE = 7 * 24 * 3600 # 1 week
21
21
 
@@ -15,6 +15,9 @@ _RRF_K = 60
15
15
  # [0,1] by the best score in the candidate set so an exact-match FTS rank-1 hit
16
16
  # scores the same as a vector rank-1 hit instead of being clamped to ~1.0.
17
17
  _CONFIDENCE_WEIGHT = 0.5
18
+ # Max chunks from the same file in the final result set. Prevents one large
19
+ # file from dominating results and improves file-level precision.
20
+ _MAX_CHUNKS_PER_FILE = 3
18
21
  # When the parsed query looks like a code lookup, give FTS more pull because
19
22
  # exact-identifier hits are usually what the user wants.
20
23
  _FTS_BOOST_CODE_LOOKUP = 1.5
@@ -129,7 +132,20 @@ class HybridRetriever:
129
132
  scored.append((chunk, final_score))
130
133
 
131
134
  scored.sort(key=lambda x: x[1], reverse=True)
132
- ranked = [chunk for chunk, _ in scored[:top_k]]
135
+
136
+ # File diversity: cap chunks per file so one large file doesn't
137
+ # dominate the result set. This improves precision by letting
138
+ # chunks from more files surface into the top-k.
139
+ file_counts: dict[str, int] = {}
140
+ diverse: list[Chunk] = []
141
+ for chunk, _ in scored:
142
+ count = file_counts.get(chunk.file_path, 0)
143
+ if count < _MAX_CHUNKS_PER_FILE:
144
+ diverse.append(chunk)
145
+ file_counts[chunk.file_path] = count + 1
146
+ if len(diverse) >= top_k:
147
+ break
148
+ ranked = diverse
133
149
 
134
150
  # Graph expansion: fetch 1-2 bonus chunks from files reachable via
135
151
  # CALLS/IMPORTS edges from the top results.
@@ -31,7 +31,7 @@ def _run_uninstall_in(runner, project_dir: Path):
31
31
  original = Path.cwd()
32
32
  try:
33
33
  os.chdir(project_dir)
34
- return runner.invoke(main, ["uninstall"])
34
+ return runner.invoke(main, ["uninstall", "--yes"])
35
35
  finally:
36
36
  os.chdir(original)
37
37