codemap-core 0.3.0__tar.gz → 0.3.2__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.
- {codemap_core-0.3.0 → codemap_core-0.3.2}/CHANGELOG.md +72 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/PKG-INFO +110 -3
- {codemap_core-0.3.0 → codemap_core-0.3.2}/README.md +109 -2
- {codemap_core-0.3.0 → codemap_core-0.3.2}/pyproject.toml +1 -1
- {codemap_core-0.3.0 → codemap_core-0.3.2}/.gitignore +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/LICENSE +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0000-template.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0001-symbol-id-format.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0002-storage-backend.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0003-module-boundaries.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0004-indexer-bridge-plugin.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0005-exit-codes.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0006-schema-version.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0007-diagnostic-isolation.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0008-atomic-write.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0009-quality-gates.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0010-benchmark-regression.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0011-language-neutrality.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0012-first-language-cohort.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0013-java-engine-tree-sitter-over-scip-java.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/bridges/http_route.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/cli.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/configuration.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/indexers/python.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/performance.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/plugin-guide.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/spikes/2026-06-23-scip-java-findings.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/spikes/2026-06-24-codemap-refactor-execution-readiness.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/docs/spikes/2026-06-24-l1-refactor-next-steps.md +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/_common.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/callees.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/callers.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/config.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/diagnostics.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/doctor.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/get.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/index.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/routes.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/search.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/commands/trace.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/main.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/renderers/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/renderers/json.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/cli/renderers/text.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/config/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/config/loader.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/config/schema.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/bridge/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/bridge/base.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/bridge/http_route.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/bridge/python_cross_module.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/bridge/registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/git_hotspots.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/graph.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/models.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/store.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/core/symbol.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/diagnostics/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/diagnostics/exit_codes.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/diagnostics/logging.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/diagnostics/progress.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/emitters/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/emitters/base.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/emitters/registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/_example_lang.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/base.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/project_base.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/project_registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/python.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/indexers/registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/atomic.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/base.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/json_store.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/lock.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/io/manifest.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/src/codemap/mcp/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/bench/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/bench/conftest.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/bench/test_index_perf.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/bench/test_query_perf.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_cli.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_config_integration.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_cross_module_callers.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_diagnostics.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_error_experience.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_golden_precision.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_http_pipeline.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_incremental.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/e2e/test_query_commands.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/basics/expected/symbol_ids.txt +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/basics/input/pkg/mod.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/imports/expected/symbol_ids.txt +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/imports/input/users.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/inheritance/expected/symbol_ids.txt +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/inheritance/input/shapes.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/.gitignore +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/pom.xml +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/settings.xml +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/src/main/java/com/example/hellospring/controller/OrderController.java +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/src/main/java/com/example/hellospring/mapper/CouponMapper.java +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/src/main/java/com/example/hellospring/service/OrderService.java +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/src/main/resources/mapper/CouponMapper.xml +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/web/OrderList.vue +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/smoke/a.example +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/smoke/b.example +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/integration/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/integration/test_http_route_bridge_e2e.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/__init__.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_config.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_emitter_registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_git_hotspots.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_graph.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_http_route_bridge.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_indexer_registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_io.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_models.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_models_kinds.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_orchestration_phases.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_project_indexer_registry.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_python_cross_module_bridge.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_python_indexer.py +0 -0
- {codemap_core-0.3.0 → codemap_core-0.3.2}/tests/unit/test_symbol.py +0 -0
|
@@ -8,6 +8,78 @@ During `0.x`, MINOR may introduce breaking changes — they will be marked `BREA
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.3.2] — 2026-06-25
|
|
12
|
+
|
|
13
|
+
Lockstep version-only bump across all **20 packages** to keep the family
|
|
14
|
+
in sync; the only source change is in `codemap-aimemory`.
|
|
15
|
+
|
|
16
|
+
### `codemap-aimemory` — L0 project meta emitter (P0-3)
|
|
17
|
+
|
|
18
|
+
* New module `codemap_aimemory.project_meta` with a pure collector
|
|
19
|
+
`build_project_meta(project_root)` that returns a YAML-safe dict:
|
|
20
|
+
`schema_version`, `generated_at`, `root`, `tech_stack`
|
|
21
|
+
(`primary_language` + `manifests`), `languages` (file-extension
|
|
22
|
+
counts), `dependencies` (`runtime` + `dev`), `git`
|
|
23
|
+
(`remote` / `branch` / `head`), `top_dirs`, `configs`.
|
|
24
|
+
* `AiMemoryEmitter` now writes **`.ai-memory/project.yml`** alongside the
|
|
25
|
+
existing `entities/` and `relations/` outputs — this is the L0 sheet
|
|
26
|
+
of the four-layer memory model (per the AI-Enterprise-Delivery-System
|
|
27
|
+
knowledge-base design). Deterministic, no LLM, runs every
|
|
28
|
+
`codemap index`.
|
|
29
|
+
* Manifest detection covers `pyproject.toml` / `setup.py` /
|
|
30
|
+
`requirements.txt` / `package.json` / `pom.xml` / `build.gradle{,.kts}`
|
|
31
|
+
/ `Cargo.toml` / `go.mod` / `Gemfile`. Node primary-language picks
|
|
32
|
+
`vue` / `typescript` / `javascript` from observed file extensions.
|
|
33
|
+
* Language scan walks the tree but skips `.git` / `.venv` /
|
|
34
|
+
`node_modules` / `dist` / `build` / `target` / `__pycache__` and the
|
|
35
|
+
usual hidden caches so dependency vendoring doesn't pollute counts.
|
|
36
|
+
* Git block is best-effort via `git config`/`rev-parse`; if
|
|
37
|
+
`project_root/.git` is absent the block is empty (`{}`) — no crash.
|
|
38
|
+
|
|
39
|
+
## [0.3.1] — 2026-06-25
|
|
40
|
+
|
|
41
|
+
Quick follow-up to 0.3.0. Lockstep version-only bump across all **20
|
|
42
|
+
packages** to keep the family in sync; the only source change is in
|
|
43
|
+
`codemap-aimemory`.
|
|
44
|
+
|
|
45
|
+
### `codemap-aimemory` — LLM CLI configuration
|
|
46
|
+
|
|
47
|
+
* New subcommand group **`codemap llm config`** (registered through the
|
|
48
|
+
`codemap.cli_commands` entry-point group introduced in 0.3.0):
|
|
49
|
+
* `codemap llm config set api-key <key>` — persist to
|
|
50
|
+
`~/.config/codemap/llm.yaml` (or `$XDG_CONFIG_HOME/codemap/llm.yaml`),
|
|
51
|
+
written `chmod 600` because it carries a credential.
|
|
52
|
+
* `codemap llm config set base-url <url>` / `model` / `backend`.
|
|
53
|
+
* `codemap llm config unset <key>` — clear one field; the on-disk
|
|
54
|
+
file only contains non-`None` values.
|
|
55
|
+
* `codemap llm config show` — print the effective config with one of
|
|
56
|
+
`[env]` / `[file]` / `[default]` annotated per field; API keys are
|
|
57
|
+
masked.
|
|
58
|
+
* `codemap llm config path` — print the config file location.
|
|
59
|
+
* `codemap enrich` resolution order is now (first non-empty wins):
|
|
60
|
+
CLI flag → env var → file config (new in 0.3.1) → built-in defaults.
|
|
61
|
+
* Behavioural reminder: **API key is the LLM on/off switch.**
|
|
62
|
+
`codemap index` never calls any LLM; `codemap enrich` without a key
|
|
63
|
+
errors out cleanly, never silently. No background LLM traffic.
|
|
64
|
+
|
|
65
|
+
### Documentation
|
|
66
|
+
|
|
67
|
+
* README + README.zh-CN: new "Output formats" section documenting every
|
|
68
|
+
file under `.codemap/` and `.ai-memory/` (kind, shape, who consumes it).
|
|
69
|
+
* README + README.zh-CN: new "LLM configuration" section with the
|
|
70
|
+
three-source resolution order and a Chinese / open-source LLM endpoint
|
|
71
|
+
cheatsheet (DeepSeek, GLM, MiniMax, Kimi, Qwen, MiMo, Ollama, native
|
|
72
|
+
Anthropic) — all use `--backend openai` with their own `base-url`.
|
|
73
|
+
* INSTALL: bump heading and mention the new CLI.
|
|
74
|
+
|
|
75
|
+
### Plugin tests
|
|
76
|
+
|
|
77
|
+
19 new unit tests in `codemap-aimemory` covering: XDG path resolution,
|
|
78
|
+
load / save / unset round-trip, `chmod 600` on save, corrupt-YAML
|
|
79
|
+
graceful fallback, dash-vs-underscore key aliasing, CLI set / show /
|
|
80
|
+
unset / path, source-annotation correctness in `show`. Plugin test
|
|
81
|
+
total: 38 → 57. Other plugins unchanged.
|
|
82
|
+
|
|
11
83
|
## [0.3.0] — 2026-06-25
|
|
12
84
|
|
|
13
85
|
The four-layer-memory-model L1 release. The plugin family grows from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codemap-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Language-neutral code index for AI agents
|
|
5
5
|
Project-URL: Homepage, https://github.com/qxbyte/codemap
|
|
6
6
|
Project-URL: Repository, https://github.com/qxbyte/codemap
|
|
@@ -78,8 +78,10 @@ mappings, and cross-file relationships without grepping the entire
|
|
|
78
78
|
project. Indexing is static, fast, and reproducible — no LLM in the
|
|
79
79
|
index path.
|
|
80
80
|
|
|
81
|
-
**Status**: 0.
|
|
82
|
-
plus 17 `codemap-<lang>` plugins
|
|
81
|
+
**Status**: 0.3.1 stable. Installable from PyPI as `codemap-core`
|
|
82
|
+
plus 17 `codemap-<lang>` plugins + 2 framework / output plugins
|
|
83
|
+
(`codemap-mybatis`, `codemap-aimemory`, added in 0.3.0; 0.3.1
|
|
84
|
+
adds the `codemap llm config` CLI).
|
|
83
85
|
|
|
84
86
|
> 👉 **In a hurry?** The [`INSTALL.md`](./INSTALL.md) guide is the
|
|
85
87
|
> definitive walkthrough — it covers `pipx` / `uv tool` / `pip`,
|
|
@@ -315,6 +317,14 @@ codemap routes # HTTP routes from the http_route bridge
|
|
|
315
317
|
|
|
316
318
|
# Machine-readable output: all commands take --json
|
|
317
319
|
codemap --json callers '<symbol-id>'
|
|
320
|
+
|
|
321
|
+
# Optional LLM enrichment (codemap-aimemory plugin, 0.3.0+)
|
|
322
|
+
codemap llm config set api-key sk-xxx # persist to ~/.config/codemap/llm.yaml
|
|
323
|
+
codemap llm config set base-url https://api.deepseek.com/v1
|
|
324
|
+
codemap llm config set model deepseek-chat
|
|
325
|
+
codemap llm config show # masked-key view + value source
|
|
326
|
+
codemap enrich . # fills .ai-memory/enrichment/*.yml
|
|
327
|
+
codemap enrich . --dry-run # count fn/method symbols, no API call
|
|
318
328
|
```
|
|
319
329
|
|
|
320
330
|
Exit codes follow `sysexits.h` (ADR-005); see
|
|
@@ -322,6 +332,103 @@ Exit codes follow `sysexits.h` (ADR-005); see
|
|
|
322
332
|
|
|
323
333
|
---
|
|
324
334
|
|
|
335
|
+
## Output formats
|
|
336
|
+
|
|
337
|
+
`codemap index` produces two parallel directories at the project root:
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
<project>/
|
|
341
|
+
├── .codemap/ ← deterministic, machine-friendly index (queried by `codemap …`)
|
|
342
|
+
└── .ai-memory/ ← four-layer-memory-model L1 layout (consumed by AI agents)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### `.codemap/` — deterministic index (JSON, 7 files)
|
|
346
|
+
|
|
347
|
+
| File | Contents |
|
|
348
|
+
|---|---|
|
|
349
|
+
| `symbols.json` | All symbols keyed by `SymbolID`. Each entry: `kind`, `language`, `file`, `range`, `signature`, `annotations`, `confidence`, `extra` (per-language metadata: `pending_calls`, `http_route`, `supertypes`, `imports`, `params`, `return_type`, `change_count_90d`, …). |
|
|
350
|
+
| `edges.json` | Directed relations: `calls` / `extends` / `implements` / `overrides` / `references` / `routes_to` / `maps_to` / `imports` / `accesses_table`. Each carries `confidence` ∈ {`high`, `medium`, `low`}. |
|
|
351
|
+
| `routes.json` | HTTP routes minted by the `http_route` bridge from `extra["http_route"]`. |
|
|
352
|
+
| `aliases.json` | Synthetic intermediate ↔ real symbol links (e.g. route → handler). |
|
|
353
|
+
| `manifest.json` | Project root, `codemap_version`, registered indexers + bridges + their versions, per-file sha256 / mtime / language. |
|
|
354
|
+
| `diagnostics.json` | Indexer / bridge warnings collected during the run (severity + code + message + producer). |
|
|
355
|
+
| `.lock` | Cross-process write lock; do not edit. |
|
|
356
|
+
|
|
357
|
+
### `.ai-memory/` — four-layer memory L1 (YAML, 6 files)
|
|
358
|
+
|
|
359
|
+
Generated by `codemap-aimemory` when installed. AI agents read this
|
|
360
|
+
tree directly. Stable `entity_id` slugs are derived from the SCIP
|
|
361
|
+
`SymbolID` (e.g. `fn-calcPrice` / `cls-OrderService` / `tbl-sf_coupon`).
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
.ai-memory/
|
|
365
|
+
├── entities/
|
|
366
|
+
│ ├── functions.yml fn-* / cls-* with calls / called_by /
|
|
367
|
+
│ │ related_tables / signature / line_range /
|
|
368
|
+
│ │ confidence / change_count_90d / business_meaning
|
|
369
|
+
│ ├── tables.yml tbl-* table entities
|
|
370
|
+
│ └── files.yml file-* file entries
|
|
371
|
+
├── relations/
|
|
372
|
+
│ ├── call-graph.yml `{from, to, type=calls, confidence}`
|
|
373
|
+
│ ├── table-relations.yml `{from, to, type=accesses_table, confidence}`
|
|
374
|
+
│ └── rule-constraints.yml empty placeholder (L2 owns)
|
|
375
|
+
└── enrichment/ OPTIONAL: LLM-generated explanations
|
|
376
|
+
└── <sha1[:12]>.yml `{symbol_id, business_meaning,
|
|
377
|
+
related_rules, confidence:"llm",
|
|
378
|
+
source_model, generated_at}`
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Two-hop fan-out: when a Java method `maps_to` a `sql_mapping` that
|
|
382
|
+
`accesses_table` T, T automatically lands on the method's
|
|
383
|
+
`related_tables`. So `fn-selectByUser.related_tables = [tbl-sf_coupon]`
|
|
384
|
+
without the agent needing to follow the chain itself.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## LLM configuration (optional)
|
|
389
|
+
|
|
390
|
+
The core index is **always LLM-free** — `codemap index` never calls any
|
|
391
|
+
LLM. Only the optional `codemap enrich` command in `codemap-aimemory`
|
|
392
|
+
writes the `enrichment/` overlay, and only when **you** invoke it. The
|
|
393
|
+
existence of an API key is the on/off switch: without one, `codemap
|
|
394
|
+
enrich` exits with a clear error and no network call is made.
|
|
395
|
+
|
|
396
|
+
Three configuration sources, **first non-empty wins**:
|
|
397
|
+
|
|
398
|
+
1. **CLI flag** — `--api-key`, `--base-url`, `--model`, `--backend`
|
|
399
|
+
2. **Environment variable** — `CODEMAP_LLM_API_KEY` (also
|
|
400
|
+
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`); `CODEMAP_LLM_BASE_URL`
|
|
401
|
+
(also `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL`);
|
|
402
|
+
`CODEMAP_LLM_MODEL`; `CODEMAP_LLM_BACKEND`
|
|
403
|
+
3. **Persistent file config** — `~/.config/codemap/llm.yaml` (managed
|
|
404
|
+
by `codemap llm config set/unset/show`; written `chmod 600`)
|
|
405
|
+
4. Built-in defaults — backend `openai`, model `gpt-4o-mini`
|
|
406
|
+
|
|
407
|
+
### Common provider endpoints (OpenAI-compatible — `--backend openai`)
|
|
408
|
+
|
|
409
|
+
| Provider | Model example | Base URL |
|
|
410
|
+
|---|---|---|
|
|
411
|
+
| OpenAI | `gpt-4o-mini` | `https://api.openai.com/v1` *(default)* |
|
|
412
|
+
| DeepSeek | `deepseek-chat` | `https://api.deepseek.com/v1` |
|
|
413
|
+
| 智谱 GLM | `glm-4-flash` | `https://open.bigmodel.cn/api/paas/v4/` |
|
|
414
|
+
| MiniMax | `abab6.5s-chat` | `https://api.minimax.chat/v1` |
|
|
415
|
+
| 月之暗面 Kimi | `moonshot-v1-8k` | `https://api.moonshot.cn/v1` |
|
|
416
|
+
| 阿里通义 | `qwen-plus` | `https://dashscope.aliyuncs.com/compatible-mode/v1` |
|
|
417
|
+
| 小米 MiMo | `mimo-large` | *(per vendor docs; OpenAI-compatible)* |
|
|
418
|
+
| Ollama (local) | `llama3` | `http://localhost:11434/v1` — use `--backend ollama` (key not needed) |
|
|
419
|
+
| Anthropic native | `claude-sonnet-4-5` | *(use `--backend anthropic`; requires `anthropic` SDK via `pip install codemap-aimemory[llm]`)* |
|
|
420
|
+
|
|
421
|
+
Example with DeepSeek:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
codemap llm config set base-url https://api.deepseek.com/v1
|
|
425
|
+
codemap llm config set api-key sk-xxx
|
|
426
|
+
codemap llm config set model deepseek-chat
|
|
427
|
+
codemap enrich .
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
325
432
|
## Configuration
|
|
326
433
|
|
|
327
434
|
Project-level configuration lives at `.codemap/config.yaml` (committed
|
|
@@ -11,8 +11,10 @@ mappings, and cross-file relationships without grepping the entire
|
|
|
11
11
|
project. Indexing is static, fast, and reproducible — no LLM in the
|
|
12
12
|
index path.
|
|
13
13
|
|
|
14
|
-
**Status**: 0.
|
|
15
|
-
plus 17 `codemap-<lang>` plugins
|
|
14
|
+
**Status**: 0.3.1 stable. Installable from PyPI as `codemap-core`
|
|
15
|
+
plus 17 `codemap-<lang>` plugins + 2 framework / output plugins
|
|
16
|
+
(`codemap-mybatis`, `codemap-aimemory`, added in 0.3.0; 0.3.1
|
|
17
|
+
adds the `codemap llm config` CLI).
|
|
16
18
|
|
|
17
19
|
> 👉 **In a hurry?** The [`INSTALL.md`](./INSTALL.md) guide is the
|
|
18
20
|
> definitive walkthrough — it covers `pipx` / `uv tool` / `pip`,
|
|
@@ -248,6 +250,14 @@ codemap routes # HTTP routes from the http_route bridge
|
|
|
248
250
|
|
|
249
251
|
# Machine-readable output: all commands take --json
|
|
250
252
|
codemap --json callers '<symbol-id>'
|
|
253
|
+
|
|
254
|
+
# Optional LLM enrichment (codemap-aimemory plugin, 0.3.0+)
|
|
255
|
+
codemap llm config set api-key sk-xxx # persist to ~/.config/codemap/llm.yaml
|
|
256
|
+
codemap llm config set base-url https://api.deepseek.com/v1
|
|
257
|
+
codemap llm config set model deepseek-chat
|
|
258
|
+
codemap llm config show # masked-key view + value source
|
|
259
|
+
codemap enrich . # fills .ai-memory/enrichment/*.yml
|
|
260
|
+
codemap enrich . --dry-run # count fn/method symbols, no API call
|
|
251
261
|
```
|
|
252
262
|
|
|
253
263
|
Exit codes follow `sysexits.h` (ADR-005); see
|
|
@@ -255,6 +265,103 @@ Exit codes follow `sysexits.h` (ADR-005); see
|
|
|
255
265
|
|
|
256
266
|
---
|
|
257
267
|
|
|
268
|
+
## Output formats
|
|
269
|
+
|
|
270
|
+
`codemap index` produces two parallel directories at the project root:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
<project>/
|
|
274
|
+
├── .codemap/ ← deterministic, machine-friendly index (queried by `codemap …`)
|
|
275
|
+
└── .ai-memory/ ← four-layer-memory-model L1 layout (consumed by AI agents)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### `.codemap/` — deterministic index (JSON, 7 files)
|
|
279
|
+
|
|
280
|
+
| File | Contents |
|
|
281
|
+
|---|---|
|
|
282
|
+
| `symbols.json` | All symbols keyed by `SymbolID`. Each entry: `kind`, `language`, `file`, `range`, `signature`, `annotations`, `confidence`, `extra` (per-language metadata: `pending_calls`, `http_route`, `supertypes`, `imports`, `params`, `return_type`, `change_count_90d`, …). |
|
|
283
|
+
| `edges.json` | Directed relations: `calls` / `extends` / `implements` / `overrides` / `references` / `routes_to` / `maps_to` / `imports` / `accesses_table`. Each carries `confidence` ∈ {`high`, `medium`, `low`}. |
|
|
284
|
+
| `routes.json` | HTTP routes minted by the `http_route` bridge from `extra["http_route"]`. |
|
|
285
|
+
| `aliases.json` | Synthetic intermediate ↔ real symbol links (e.g. route → handler). |
|
|
286
|
+
| `manifest.json` | Project root, `codemap_version`, registered indexers + bridges + their versions, per-file sha256 / mtime / language. |
|
|
287
|
+
| `diagnostics.json` | Indexer / bridge warnings collected during the run (severity + code + message + producer). |
|
|
288
|
+
| `.lock` | Cross-process write lock; do not edit. |
|
|
289
|
+
|
|
290
|
+
### `.ai-memory/` — four-layer memory L1 (YAML, 6 files)
|
|
291
|
+
|
|
292
|
+
Generated by `codemap-aimemory` when installed. AI agents read this
|
|
293
|
+
tree directly. Stable `entity_id` slugs are derived from the SCIP
|
|
294
|
+
`SymbolID` (e.g. `fn-calcPrice` / `cls-OrderService` / `tbl-sf_coupon`).
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
.ai-memory/
|
|
298
|
+
├── entities/
|
|
299
|
+
│ ├── functions.yml fn-* / cls-* with calls / called_by /
|
|
300
|
+
│ │ related_tables / signature / line_range /
|
|
301
|
+
│ │ confidence / change_count_90d / business_meaning
|
|
302
|
+
│ ├── tables.yml tbl-* table entities
|
|
303
|
+
│ └── files.yml file-* file entries
|
|
304
|
+
├── relations/
|
|
305
|
+
│ ├── call-graph.yml `{from, to, type=calls, confidence}`
|
|
306
|
+
│ ├── table-relations.yml `{from, to, type=accesses_table, confidence}`
|
|
307
|
+
│ └── rule-constraints.yml empty placeholder (L2 owns)
|
|
308
|
+
└── enrichment/ OPTIONAL: LLM-generated explanations
|
|
309
|
+
└── <sha1[:12]>.yml `{symbol_id, business_meaning,
|
|
310
|
+
related_rules, confidence:"llm",
|
|
311
|
+
source_model, generated_at}`
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Two-hop fan-out: when a Java method `maps_to` a `sql_mapping` that
|
|
315
|
+
`accesses_table` T, T automatically lands on the method's
|
|
316
|
+
`related_tables`. So `fn-selectByUser.related_tables = [tbl-sf_coupon]`
|
|
317
|
+
without the agent needing to follow the chain itself.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## LLM configuration (optional)
|
|
322
|
+
|
|
323
|
+
The core index is **always LLM-free** — `codemap index` never calls any
|
|
324
|
+
LLM. Only the optional `codemap enrich` command in `codemap-aimemory`
|
|
325
|
+
writes the `enrichment/` overlay, and only when **you** invoke it. The
|
|
326
|
+
existence of an API key is the on/off switch: without one, `codemap
|
|
327
|
+
enrich` exits with a clear error and no network call is made.
|
|
328
|
+
|
|
329
|
+
Three configuration sources, **first non-empty wins**:
|
|
330
|
+
|
|
331
|
+
1. **CLI flag** — `--api-key`, `--base-url`, `--model`, `--backend`
|
|
332
|
+
2. **Environment variable** — `CODEMAP_LLM_API_KEY` (also
|
|
333
|
+
`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`); `CODEMAP_LLM_BASE_URL`
|
|
334
|
+
(also `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL`);
|
|
335
|
+
`CODEMAP_LLM_MODEL`; `CODEMAP_LLM_BACKEND`
|
|
336
|
+
3. **Persistent file config** — `~/.config/codemap/llm.yaml` (managed
|
|
337
|
+
by `codemap llm config set/unset/show`; written `chmod 600`)
|
|
338
|
+
4. Built-in defaults — backend `openai`, model `gpt-4o-mini`
|
|
339
|
+
|
|
340
|
+
### Common provider endpoints (OpenAI-compatible — `--backend openai`)
|
|
341
|
+
|
|
342
|
+
| Provider | Model example | Base URL |
|
|
343
|
+
|---|---|---|
|
|
344
|
+
| OpenAI | `gpt-4o-mini` | `https://api.openai.com/v1` *(default)* |
|
|
345
|
+
| DeepSeek | `deepseek-chat` | `https://api.deepseek.com/v1` |
|
|
346
|
+
| 智谱 GLM | `glm-4-flash` | `https://open.bigmodel.cn/api/paas/v4/` |
|
|
347
|
+
| MiniMax | `abab6.5s-chat` | `https://api.minimax.chat/v1` |
|
|
348
|
+
| 月之暗面 Kimi | `moonshot-v1-8k` | `https://api.moonshot.cn/v1` |
|
|
349
|
+
| 阿里通义 | `qwen-plus` | `https://dashscope.aliyuncs.com/compatible-mode/v1` |
|
|
350
|
+
| 小米 MiMo | `mimo-large` | *(per vendor docs; OpenAI-compatible)* |
|
|
351
|
+
| Ollama (local) | `llama3` | `http://localhost:11434/v1` — use `--backend ollama` (key not needed) |
|
|
352
|
+
| Anthropic native | `claude-sonnet-4-5` | *(use `--backend anthropic`; requires `anthropic` SDK via `pip install codemap-aimemory[llm]`)* |
|
|
353
|
+
|
|
354
|
+
Example with DeepSeek:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
codemap llm config set base-url https://api.deepseek.com/v1
|
|
358
|
+
codemap llm config set api-key sk-xxx
|
|
359
|
+
codemap llm config set model deepseek-chat
|
|
360
|
+
codemap enrich .
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
258
365
|
## Configuration
|
|
259
366
|
|
|
260
367
|
Project-level configuration lives at `.codemap/config.yaml` (committed
|
|
@@ -12,7 +12,7 @@ build-backend = "hatchling.build"
|
|
|
12
12
|
# (`codemap-java`, `codemap-go`, …) — this is the engine; the others
|
|
13
13
|
# are language adapters.
|
|
14
14
|
name = "codemap-core"
|
|
15
|
-
version = "0.3.
|
|
15
|
+
version = "0.3.2"
|
|
16
16
|
description = "Language-neutral code index for AI agents"
|
|
17
17
|
readme = "README.md"
|
|
18
18
|
license = { file = "LICENSE" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/docs/adr/0013-java-engine-tree-sitter-over-scip-java.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/basics/input/pkg/mod.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/imports/input/users.py
RENAMED
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/indexers/python/inheritance/input/shapes.py
RENAMED
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/settings.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codemap_core-0.3.0 → codemap_core-0.3.2}/tests/fixtures/scip-samples/HelloSpring/web/OrderList.vue
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|