codecortex 0.18.0__tar.gz → 0.20.0__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 (138) hide show
  1. {codecortex-0.18.0/src/codecortex.egg-info → codecortex-0.20.0}/PKG-INFO +32 -4
  2. {codecortex-0.18.0 → codecortex-0.20.0}/README.md +31 -3
  3. {codecortex-0.18.0 → codecortex-0.20.0/src/codecortex.egg-info}/PKG-INFO +32 -4
  4. {codecortex-0.18.0 → codecortex-0.20.0}/src/codecortex.egg-info/SOURCES.txt +11 -0
  5. codecortex-0.20.0/src/codeintel/__init__.py +1 -0
  6. codecortex-0.20.0/src/codeintel/__main__.py +624 -0
  7. codecortex-0.20.0/src/codeintel/c4.py +1160 -0
  8. codecortex-0.20.0/src/codeintel/commands/c4.py +182 -0
  9. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/install.py +61 -0
  10. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/query.py +15 -8
  11. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/gateway.py +117 -0
  12. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/http_server.py +16 -0
  13. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/indexer.py +10 -0
  14. codecortex-0.20.0/src/codeintel/injector.py +271 -0
  15. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/mapper.py +62 -13
  16. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/onboarding.py +21 -19
  17. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/providers/graph.py +431 -14
  18. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/providers/lsp.py +103 -5
  19. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/providers/semantic.py +120 -21
  20. codecortex-0.20.0/src/codeintel/query_ops.py +17 -0
  21. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/server.py +181 -39
  22. codecortex-0.20.0/tests/test_c4.py +608 -0
  23. codecortex-0.20.0/tests/test_c4_model.py +180 -0
  24. codecortex-0.20.0/tests/test_c4_output.py +413 -0
  25. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_cli_commands.py +14 -10
  26. codecortex-0.20.0/tests/test_cli_help.py +474 -0
  27. codecortex-0.20.0/tests/test_cli_install_dry_run.py +115 -0
  28. codecortex-0.20.0/tests/test_cli_install_offer_injection.py +119 -0
  29. codecortex-0.20.0/tests/test_edge_confidence.py +146 -0
  30. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_graph_failure_population.py +15 -0
  31. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_graph_provider.py +60 -0
  32. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_graph_real.py +5 -5
  33. codecortex-0.20.0/tests/test_lsp_language_coverage.py +100 -0
  34. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_mapper.py +190 -2
  35. codecortex-0.20.0/tests/test_mcp_server.py +218 -0
  36. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_never_raise.py +30 -4
  37. codecortex-0.20.0/tests/test_null_reason_and_ripple.py +194 -0
  38. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_onboarding.py +6 -2
  39. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_rbac.py +43 -0
  40. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_semantic_provider.py +130 -0
  41. codecortex-0.18.0/src/codeintel/__init__.py +0 -1
  42. codecortex-0.18.0/src/codeintel/__main__.py +0 -299
  43. codecortex-0.18.0/src/codeintel/injector.py +0 -114
  44. codecortex-0.18.0/tests/test_cli_help.py +0 -136
  45. codecortex-0.18.0/tests/test_mcp_server.py +0 -78
  46. {codecortex-0.18.0 → codecortex-0.20.0}/LICENSE +0 -0
  47. {codecortex-0.18.0 → codecortex-0.20.0}/pyproject.toml +0 -0
  48. {codecortex-0.18.0 → codecortex-0.20.0}/setup.cfg +0 -0
  49. {codecortex-0.18.0 → codecortex-0.20.0}/src/codecortex.egg-info/dependency_links.txt +0 -0
  50. {codecortex-0.18.0 → codecortex-0.20.0}/src/codecortex.egg-info/entry_points.txt +0 -0
  51. {codecortex-0.18.0 → codecortex-0.20.0}/src/codecortex.egg-info/requires.txt +0 -0
  52. {codecortex-0.18.0 → codecortex-0.20.0}/src/codecortex.egg-info/top_level.txt +0 -0
  53. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/agent_prompt.py +0 -0
  54. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/auth.py +0 -0
  55. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/cache.py +0 -0
  56. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/__init__.py +0 -0
  57. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/_common.py +0 -0
  58. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/doctor.py +0 -0
  59. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/gen_token.py +0 -0
  60. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/graph.py +0 -0
  61. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/index.py +0 -0
  62. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/map.py +0 -0
  63. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/prompt.py +0 -0
  64. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/reset.py +0 -0
  65. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/serve.py +0 -0
  66. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/serve_http.py +0 -0
  67. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/setup.py +0 -0
  68. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/commands/status.py +0 -0
  69. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/config.py +0 -0
  70. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/containment.py +0 -0
  71. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/doctor.py +0 -0
  72. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/graph_backend.py +0 -0
  73. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/graph_render.py +0 -0
  74. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/graph_resolution.py +0 -0
  75. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/grapher.py +0 -0
  76. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/installer.py +0 -0
  77. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/loc.py +0 -0
  78. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/logconfig.py +0 -0
  79. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/metrics.py +0 -0
  80. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/outcome.py +0 -0
  81. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/paths.py +0 -0
  82. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/policy.py +0 -0
  83. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/progress.py +0 -0
  84. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/provider.py +0 -0
  85. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/providers/__init__.py +0 -0
  86. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/providers/none.py +0 -0
  87. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/py.typed +0 -0
  88. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/redact.py +0 -0
  89. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/reindexer.py +0 -0
  90. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/reset.py +0 -0
  91. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/searcher.py +0 -0
  92. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/semantic_db.py +0 -0
  93. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/source_kind.py +0 -0
  94. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/term.py +0 -0
  95. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/verify.py +0 -0
  96. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/viewer/__init__.py +0 -0
  97. {codecortex-0.18.0 → codecortex-0.20.0}/src/codeintel/viewer/graph_template.html +0 -0
  98. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_agent_prompt.py +0 -0
  99. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_backend_reaper.py +0 -0
  100. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_cache.py +0 -0
  101. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_chunking.py +0 -0
  102. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_cold_process.py +0 -0
  103. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_config.py +0 -0
  104. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_corpus.py +0 -0
  105. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_docs_ci_claims.py +0 -0
  106. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_docs_deadcode_withdrawal.py +0 -0
  107. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_doctor.py +0 -0
  108. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_e2e.py +0 -0
  109. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_engine_adoption.py +0 -0
  110. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_enterprise.py +0 -0
  111. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_gateway.py +0 -0
  112. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_graph_stdin.py +0 -0
  113. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_grapher.py +0 -0
  114. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_hardening.py +0 -0
  115. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_http_auth.py +0 -0
  116. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_http_server.py +0 -0
  117. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_incompleteness.py +0 -0
  118. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_index_progress.py +0 -0
  119. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_indexer_binary.py +0 -0
  120. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_installer.py +0 -0
  121. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_integration.py +0 -0
  122. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_loc_census.py +0 -0
  123. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_lsp_provider.py +0 -0
  124. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_lsp_real.py +0 -0
  125. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_mcp_handshake.py +0 -0
  126. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_model_dimension.py +0 -0
  127. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_redaction_boundary.py +0 -0
  128. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_reindexer.py +0 -0
  129. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_rerank.py +0 -0
  130. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_reset.py +0 -0
  131. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_source_kind.py +0 -0
  132. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_staleness.py +0 -0
  133. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_symbol_context.py +0 -0
  134. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_term.py +0 -0
  135. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_treesitter.py +0 -0
  136. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_verify.py +0 -0
  137. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_verify_call.py +0 -0
  138. {codecortex-0.18.0 → codecortex-0.20.0}/tests/test_version_skew.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.18.0
3
+ Version: 0.20.0
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -61,7 +61,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
61
61
 
62
62
  **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
63
63
 
64
- - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
64
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller [`USING_CODEINTEL.md`](USING_CODEINTEL.md) guide the block points to — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
65
65
  - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
66
66
  - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
67
67
 
@@ -78,6 +78,8 @@ Without structural tools, an agent dropped into unfamiliar code falls back on `g
78
78
 
79
79
  Net effect: fewer, sharper tool calls, less re-reading, and an agent that can see *structure* — callers, impact, call chains — that plain search can't.
80
80
 
81
+ **The honest framing.** Agentic grep is still the backbone, and codeintel doesn't claim otherwise — Claude Code itself ships grep-only and that is a reasonable default for most of what an agent reads. The defensible claim is narrower: a structural index *where it pays*, degrading to grep the moment an engine is missing or not indexed, which is exactly what the safe-null contract above already does under the hood. Worth saying explicitly rather than leaving it implicit in a failure mode.
82
+
81
83
  ## What your agent can ask
82
84
 
83
85
  It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the default) codeintel picks the engine per operation:
@@ -279,7 +281,7 @@ Then it launches the exact command it registered and drives a real MCP handshake
279
281
  ```text
280
282
  v claude: registered at /Users/you/.claude.json
281
283
 
282
- v verified: codeintel 0.18.0 — 4 tools (code.query, code.status, code.doctor, code.map)
284
+ v verified: codeintel 0.20.0 — 4 tools (code.query, code.status, code.doctor, code.map)
283
285
  ```
284
286
 
285
287
  If the command is not on `PATH`, or the server fails to start, install says so and exits non-zero
@@ -404,6 +406,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
404
406
  | `codeintel doctor [project_root] [--deep] [--json]` | Diagnose per-engine health + repo index status, with a fix for each gap |
405
407
  | `codeintel map [project_root]` | Generate the `CODE_INTEL.md` orientation file |
406
408
  | `codeintel graph [project_root] [--html] [--out FILE] [--limit N]` | Emit the call graph as `{nodes,edges}` JSON, or `--html` a self-contained interactive viewer — see [docs/graph-viewer.md](docs/graph-viewer.md) |
409
+ | `codeintel c4 [project_root] [--out DIR] [--depth N] [--scope PATH] [--include-tests] [--no-index] [--json]` | Write a LikeC4 architecture model (`.c4`) of the repo's file/directory structure and its import graph — committable, diffable, hand-editable source rather than a rendered picture. Indexes the repo first if it has no graph index. See [docs/c4.md](docs/c4.md) |
407
410
  | `codeintel reset [project_root] [--all] [--yes] [--json]` | Clear this repo's index — **both** semantic and graph — so it's as if never indexed; `--all` wipes every repo. Recovers from a corrupt/stale DB |
408
411
  | `codeintel gen-token` | Print a secure random bearer token (for `serve-http` / RBAC `auth.toml`) |
409
412
 
@@ -462,7 +465,22 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
462
465
 
463
466
  Not sure what's installed? `codeintel doctor` reports exactly which backends are present, whether this repo is indexed, and the command to fix each gap.
464
467
 
465
- **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5` weights once (cached under `~/.cache`, fully offline thereafter); the optional backends also install on first use *if you opt in*. After that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on a private repo.
468
+ **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5`
469
+ weights once — cached under `fastembed`'s own default (`$TMPDIR/fastembed_cache`, **not**
470
+ `~/.cache`; override with `FASTEMBED_CACHE_PATH` for a location that survives a `/tmp` cleanup),
471
+ fully offline thereafter; the optional backends also install on first use *if you opt in*. After
472
+ that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on
473
+ a private repo. Behind a proxy or fully air-gapped, this download is the one step that can fail —
474
+ see [Offline / air-gapped install](docs/install.md#offline--air-gapped-install) for a documented
475
+ workaround.
476
+
477
+ **What codeintel writes to disk.** `~/.codeintel/semantic.db` is a **single file shared across
478
+ every repo you've ever indexed** with this machine's default embedding model (rows are
479
+ partitioned internally by repo) — 239 MB was observed here after indexing a handful of repos.
480
+ `codeintel reset <repo>` clears that repo's rows but does not shrink the file (SQLite doesn't
481
+ reclaim space without a `VACUUM`); `codeintel reset --all` removes the file outright. Separately,
482
+ the **LSP** engine's backend (serena) writes a `.serena/` directory *into each project you index*
483
+ — add it to that project's `.gitignore` (codeintel's own repo does).
466
484
 
467
485
  ## For agents
468
486
 
@@ -583,6 +601,16 @@ engines safe-null and you get a fraction of the capability table above. `codeint
583
601
  installs what it can and `codeintel doctor` tells you exactly what is missing and how to fix it.
584
602
  Run `doctor` first if the tool seems quieter than the docs suggest.
585
603
 
604
+ **The graph backend is the closest competitor, and it should be named as one.**
605
+ `codebase-memory-mcp` already ships semantic vector search, hybrid LSP type resolution, impact
606
+ analysis, and auto-registration with several agents on its own. A user who installs it alone gets
607
+ most of this project's capability table with less setup. The marginal value of codeintel over its
608
+ own backend is the unification, the safe-null contract, and the LSP merge — one call across three
609
+ engines instead of three separate tools to learn, a never-raise contract enforced by
610
+ fault-injection tests rather than convention, and answers that merge graph structure with exact
611
+ LSP locations instead of picking one. That's real and defensible, and considerably narrower than
612
+ "three engines" makes it sound.
613
+
586
614
  **Maintenance.** One maintainer, MIT licensed, issues and PRs welcome. There is no support
587
615
  guarantee — factor that into anything load-bearing.
588
616
 
@@ -24,7 +24,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
24
24
 
25
25
  **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
26
26
 
27
- - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
27
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller [`USING_CODEINTEL.md`](USING_CODEINTEL.md) guide the block points to — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
28
28
  - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
29
29
  - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
30
30
 
@@ -41,6 +41,8 @@ Without structural tools, an agent dropped into unfamiliar code falls back on `g
41
41
 
42
42
  Net effect: fewer, sharper tool calls, less re-reading, and an agent that can see *structure* — callers, impact, call chains — that plain search can't.
43
43
 
44
+ **The honest framing.** Agentic grep is still the backbone, and codeintel doesn't claim otherwise — Claude Code itself ships grep-only and that is a reasonable default for most of what an agent reads. The defensible claim is narrower: a structural index *where it pays*, degrading to grep the moment an engine is missing or not indexed, which is exactly what the safe-null contract above already does under the hood. Worth saying explicitly rather than leaving it implicit in a failure mode.
45
+
44
46
  ## What your agent can ask
45
47
 
46
48
  It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the default) codeintel picks the engine per operation:
@@ -242,7 +244,7 @@ Then it launches the exact command it registered and drives a real MCP handshake
242
244
  ```text
243
245
  v claude: registered at /Users/you/.claude.json
244
246
 
245
- v verified: codeintel 0.18.0 — 4 tools (code.query, code.status, code.doctor, code.map)
247
+ v verified: codeintel 0.20.0 — 4 tools (code.query, code.status, code.doctor, code.map)
246
248
  ```
247
249
 
248
250
  If the command is not on `PATH`, or the server fails to start, install says so and exits non-zero
@@ -367,6 +369,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
367
369
  | `codeintel doctor [project_root] [--deep] [--json]` | Diagnose per-engine health + repo index status, with a fix for each gap |
368
370
  | `codeintel map [project_root]` | Generate the `CODE_INTEL.md` orientation file |
369
371
  | `codeintel graph [project_root] [--html] [--out FILE] [--limit N]` | Emit the call graph as `{nodes,edges}` JSON, or `--html` a self-contained interactive viewer — see [docs/graph-viewer.md](docs/graph-viewer.md) |
372
+ | `codeintel c4 [project_root] [--out DIR] [--depth N] [--scope PATH] [--include-tests] [--no-index] [--json]` | Write a LikeC4 architecture model (`.c4`) of the repo's file/directory structure and its import graph — committable, diffable, hand-editable source rather than a rendered picture. Indexes the repo first if it has no graph index. See [docs/c4.md](docs/c4.md) |
370
373
  | `codeintel reset [project_root] [--all] [--yes] [--json]` | Clear this repo's index — **both** semantic and graph — so it's as if never indexed; `--all` wipes every repo. Recovers from a corrupt/stale DB |
371
374
  | `codeintel gen-token` | Print a secure random bearer token (for `serve-http` / RBAC `auth.toml`) |
372
375
 
@@ -425,7 +428,22 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
425
428
 
426
429
  Not sure what's installed? `codeintel doctor` reports exactly which backends are present, whether this repo is indexed, and the command to fix each gap.
427
430
 
428
- **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5` weights once (cached under `~/.cache`, fully offline thereafter); the optional backends also install on first use *if you opt in*. After that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on a private repo.
431
+ **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5`
432
+ weights once — cached under `fastembed`'s own default (`$TMPDIR/fastembed_cache`, **not**
433
+ `~/.cache`; override with `FASTEMBED_CACHE_PATH` for a location that survives a `/tmp` cleanup),
434
+ fully offline thereafter; the optional backends also install on first use *if you opt in*. After
435
+ that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on
436
+ a private repo. Behind a proxy or fully air-gapped, this download is the one step that can fail —
437
+ see [Offline / air-gapped install](docs/install.md#offline--air-gapped-install) for a documented
438
+ workaround.
439
+
440
+ **What codeintel writes to disk.** `~/.codeintel/semantic.db` is a **single file shared across
441
+ every repo you've ever indexed** with this machine's default embedding model (rows are
442
+ partitioned internally by repo) — 239 MB was observed here after indexing a handful of repos.
443
+ `codeintel reset <repo>` clears that repo's rows but does not shrink the file (SQLite doesn't
444
+ reclaim space without a `VACUUM`); `codeintel reset --all` removes the file outright. Separately,
445
+ the **LSP** engine's backend (serena) writes a `.serena/` directory *into each project you index*
446
+ — add it to that project's `.gitignore` (codeintel's own repo does).
429
447
 
430
448
  ## For agents
431
449
 
@@ -546,6 +564,16 @@ engines safe-null and you get a fraction of the capability table above. `codeint
546
564
  installs what it can and `codeintel doctor` tells you exactly what is missing and how to fix it.
547
565
  Run `doctor` first if the tool seems quieter than the docs suggest.
548
566
 
567
+ **The graph backend is the closest competitor, and it should be named as one.**
568
+ `codebase-memory-mcp` already ships semantic vector search, hybrid LSP type resolution, impact
569
+ analysis, and auto-registration with several agents on its own. A user who installs it alone gets
570
+ most of this project's capability table with less setup. The marginal value of codeintel over its
571
+ own backend is the unification, the safe-null contract, and the LSP merge — one call across three
572
+ engines instead of three separate tools to learn, a never-raise contract enforced by
573
+ fault-injection tests rather than convention, and answers that merge graph structure with exact
574
+ LSP locations instead of picking one. That's real and defensible, and considerably narrower than
575
+ "three engines" makes it sound.
576
+
549
577
  **Maintenance.** One maintainer, MIT licensed, issues and PRs welcome. There is no support
550
578
  guarantee — factor that into anything load-bearing.
551
579
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.18.0
3
+ Version: 0.20.0
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -61,7 +61,7 @@ Prefer plain text? `codeintel map` writes a **readable architecture overview** t
61
61
 
62
62
  **What `CODE_INTEL.md` is for.** It's a *static, committable* snapshot of a codebase's shape — meant to be read (by a person or an agent) **first**, instead of reconstructing structure by grepping. It covers the cases the live `code.query` tool doesn't:
63
63
 
64
- - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a pointer into `CLAUDE.md` / `AGENTS.md`, so an agent picks up the codebase's structure automatically at the start of a session.
64
+ - **Agents & hosts that don't speak MCP.** Not every agent supports MCP, and the server isn't always running. `codeintel map` writes a plain file any agent can read; `codeintel map --inject` also drops a short, tool-naming pointer block into `AGENTS.md` (the cross-tool surface read by Codex, Cursor, Zed, and others — created with your consent if it doesn't exist yet) plus a one-line `@AGENTS.md` import into `CLAUDE.md`, and writes the fuller [`USING_CODEINTEL.md`](USING_CODEINTEL.md) guide the block points to — so an agent knows to reach for `code.query` before it reaches for grep, not just that a `CODE_INTEL.md` exists.
65
65
  - **A committed, diffable overview.** It lives *in the repo* — reviewable in a PR, browsable on GitHub, available offline. Re-run `codeintel map` after `codeintel index` to refresh it.
66
66
  - **The load-bearing code at a glance.** Ranking symbols by caller count surfaces what most of the codebase depends on (the risky-to-change core) plus the entry points — the first things a newcomer, or an agent, should understand before touching anything.
67
67
 
@@ -78,6 +78,8 @@ Without structural tools, an agent dropped into unfamiliar code falls back on `g
78
78
 
79
79
  Net effect: fewer, sharper tool calls, less re-reading, and an agent that can see *structure* — callers, impact, call chains — that plain search can't.
80
80
 
81
+ **The honest framing.** Agentic grep is still the backbone, and codeintel doesn't claim otherwise — Claude Code itself ships grep-only and that is a reasonable default for most of what an agent reads. The defensible claim is narrower: a structural index *where it pays*, degrading to grep the moment an engine is missing or not indexed, which is exactly what the safe-null contract above already does under the hood. Worth saying explicitly rather than leaving it implicit in a failure mode.
82
+
81
83
  ## What your agent can ask
82
84
 
83
85
  It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the default) codeintel picks the engine per operation:
@@ -279,7 +281,7 @@ Then it launches the exact command it registered and drives a real MCP handshake
279
281
  ```text
280
282
  v claude: registered at /Users/you/.claude.json
281
283
 
282
- v verified: codeintel 0.18.0 — 4 tools (code.query, code.status, code.doctor, code.map)
284
+ v verified: codeintel 0.20.0 — 4 tools (code.query, code.status, code.doctor, code.map)
283
285
  ```
284
286
 
285
287
  If the command is not on `PATH`, or the server fails to start, install says so and exits non-zero
@@ -404,6 +406,7 @@ Full system docs live in [`docs/`](docs/) — start with the index:
404
406
  | `codeintel doctor [project_root] [--deep] [--json]` | Diagnose per-engine health + repo index status, with a fix for each gap |
405
407
  | `codeintel map [project_root]` | Generate the `CODE_INTEL.md` orientation file |
406
408
  | `codeintel graph [project_root] [--html] [--out FILE] [--limit N]` | Emit the call graph as `{nodes,edges}` JSON, or `--html` a self-contained interactive viewer — see [docs/graph-viewer.md](docs/graph-viewer.md) |
409
+ | `codeintel c4 [project_root] [--out DIR] [--depth N] [--scope PATH] [--include-tests] [--no-index] [--json]` | Write a LikeC4 architecture model (`.c4`) of the repo's file/directory structure and its import graph — committable, diffable, hand-editable source rather than a rendered picture. Indexes the repo first if it has no graph index. See [docs/c4.md](docs/c4.md) |
407
410
  | `codeintel reset [project_root] [--all] [--yes] [--json]` | Clear this repo's index — **both** semantic and graph — so it's as if never indexed; `--all` wipes every repo. Recovers from a corrupt/stale DB |
408
411
  | `codeintel gen-token` | Print a secure random bearer token (for `serve-http` / RBAC `auth.toml`) |
409
412
 
@@ -462,7 +465,22 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
462
465
 
463
466
  Not sure what's installed? `codeintel doctor` reports exactly which backends are present, whether this repo is indexed, and the command to fix each gap.
464
467
 
465
- **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5` weights once (cached under `~/.cache`, fully offline thereafter); the optional backends also install on first use *if you opt in*. After that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on a private repo.
468
+ **The only network touch is first-run setup:** `fastembed` downloads the `BAAI/bge-small-en-v1.5`
469
+ weights once — cached under `fastembed`'s own default (`$TMPDIR/fastembed_cache`, **not**
470
+ `~/.cache`; override with `FASTEMBED_CACHE_PATH` for a location that survives a `/tmp` cleanup),
471
+ fully offline thereafter; the optional backends also install on first use *if you opt in*. After
472
+ that, **no code or data leaves your machine** — which is what makes `--engine all` safe to run on
473
+ a private repo. Behind a proxy or fully air-gapped, this download is the one step that can fail —
474
+ see [Offline / air-gapped install](docs/install.md#offline--air-gapped-install) for a documented
475
+ workaround.
476
+
477
+ **What codeintel writes to disk.** `~/.codeintel/semantic.db` is a **single file shared across
478
+ every repo you've ever indexed** with this machine's default embedding model (rows are
479
+ partitioned internally by repo) — 239 MB was observed here after indexing a handful of repos.
480
+ `codeintel reset <repo>` clears that repo's rows but does not shrink the file (SQLite doesn't
481
+ reclaim space without a `VACUUM`); `codeintel reset --all` removes the file outright. Separately,
482
+ the **LSP** engine's backend (serena) writes a `.serena/` directory *into each project you index*
483
+ — add it to that project's `.gitignore` (codeintel's own repo does).
466
484
 
467
485
  ## For agents
468
486
 
@@ -583,6 +601,16 @@ engines safe-null and you get a fraction of the capability table above. `codeint
583
601
  installs what it can and `codeintel doctor` tells you exactly what is missing and how to fix it.
584
602
  Run `doctor` first if the tool seems quieter than the docs suggest.
585
603
 
604
+ **The graph backend is the closest competitor, and it should be named as one.**
605
+ `codebase-memory-mcp` already ships semantic vector search, hybrid LSP type resolution, impact
606
+ analysis, and auto-registration with several agents on its own. A user who installs it alone gets
607
+ most of this project's capability table with less setup. The marginal value of codeintel over its
608
+ own backend is the unification, the safe-null contract, and the LSP merge — one call across three
609
+ engines instead of three separate tools to learn, a never-raise contract enforced by
610
+ fault-injection tests rather than convention, and answers that merge graph structure with exact
611
+ LSP locations instead of picking one. That's real and defensible, and considerably narrower than
612
+ "three engines" makes it sound.
613
+
586
614
  **Maintenance.** One maintainer, MIT licensed, issues and PRs welcome. There is no support
587
615
  guarantee — factor that into anything load-bearing.
588
616
 
@@ -11,6 +11,7 @@ src/codeintel/__init__.py
11
11
  src/codeintel/__main__.py
12
12
  src/codeintel/agent_prompt.py
13
13
  src/codeintel/auth.py
14
+ src/codeintel/c4.py
14
15
  src/codeintel/cache.py
15
16
  src/codeintel/config.py
16
17
  src/codeintel/containment.py
@@ -35,6 +36,7 @@ src/codeintel/policy.py
35
36
  src/codeintel/progress.py
36
37
  src/codeintel/provider.py
37
38
  src/codeintel/py.typed
39
+ src/codeintel/query_ops.py
38
40
  src/codeintel/redact.py
39
41
  src/codeintel/reindexer.py
40
42
  src/codeintel/reset.py
@@ -46,6 +48,7 @@ src/codeintel/term.py
46
48
  src/codeintel/verify.py
47
49
  src/codeintel/commands/__init__.py
48
50
  src/codeintel/commands/_common.py
51
+ src/codeintel/commands/c4.py
49
52
  src/codeintel/commands/doctor.py
50
53
  src/codeintel/commands/gen_token.py
51
54
  src/codeintel/commands/graph.py
@@ -68,10 +71,15 @@ src/codeintel/viewer/__init__.py
68
71
  src/codeintel/viewer/graph_template.html
69
72
  tests/test_agent_prompt.py
70
73
  tests/test_backend_reaper.py
74
+ tests/test_c4.py
75
+ tests/test_c4_model.py
76
+ tests/test_c4_output.py
71
77
  tests/test_cache.py
72
78
  tests/test_chunking.py
73
79
  tests/test_cli_commands.py
74
80
  tests/test_cli_help.py
81
+ tests/test_cli_install_dry_run.py
82
+ tests/test_cli_install_offer_injection.py
75
83
  tests/test_cold_process.py
76
84
  tests/test_config.py
77
85
  tests/test_corpus.py
@@ -79,6 +87,7 @@ tests/test_docs_ci_claims.py
79
87
  tests/test_docs_deadcode_withdrawal.py
80
88
  tests/test_doctor.py
81
89
  tests/test_e2e.py
90
+ tests/test_edge_confidence.py
82
91
  tests/test_engine_adoption.py
83
92
  tests/test_enterprise.py
84
93
  tests/test_gateway.py
@@ -96,6 +105,7 @@ tests/test_indexer_binary.py
96
105
  tests/test_installer.py
97
106
  tests/test_integration.py
98
107
  tests/test_loc_census.py
108
+ tests/test_lsp_language_coverage.py
99
109
  tests/test_lsp_provider.py
100
110
  tests/test_lsp_real.py
101
111
  tests/test_mapper.py
@@ -103,6 +113,7 @@ tests/test_mcp_handshake.py
103
113
  tests/test_mcp_server.py
104
114
  tests/test_model_dimension.py
105
115
  tests/test_never_raise.py
116
+ tests/test_null_reason_and_ripple.py
106
117
  tests/test_onboarding.py
107
118
  tests/test_rbac.py
108
119
  tests/test_redaction_boundary.py
@@ -0,0 +1 @@
1
+ __version__ = "0.20.0"