Skip to main content
Glama

cie —— 唯一知道哪些任务和测试真正实现了你的代码的代码图谱。

CI Release [License: MIT(LICENSE) ![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg MCP tree-sitter Neo4j Tests Keep a Changelog

GitHub issues PRs Contributors Stars Last commit Commit activity Code size Repo size Platform Status

Code Insight Engine. 在所考察过的代码图谱工具中,没有其他工具能用一个查询回答“哪些文件实现了这个任务,它们是否经过了测试?”——它们全都只是纯检索。cie 可以,因为任务/QA 可追溯性与代码位于同一张图谱中。它还能扩展到没有 LSP、也没有 tree-sitter 语法的语言(已在 Nirdosha —— 一种从零编写的语言 —— 上得到验证,仅通过编译器自身的 AST 转储而已)。

一个真实的 cie-mcp 服务器通过实际的 Model Context Protocol 针对 psf/requests 回答“谁真正调用 close()?”——close() 在该代码库中定义了 4 次,grep 找到 6 个原始匹配项,却无法分辨每个匹配属于哪个类;callers() 通过实际调用图解析出 3 个真实调用方

以上每一行都是针对 psf/requests 真实克隆体的真实命令(52k+ stars,不是本项目自己的代码)——先是 cie index .,然后一个真实的 MCP stdio 客户端在一个运行中的 cie-mcp --embedded 服务器上调用 callers("close")。你可以自行复现:scripts/record_demo.sh。完整方法论(包括这个精确查询在哪些地方解析不足——6 个真实调用点中只解析出 3 个,这是一个没有隐藏的真实缺口)见 docs/benchmarks-requests.md

一个真实数字,针对一个真实的 36 文件代码库实测(完整方法论见 docs/benchmarks.md,包括一个它没有帮助的案例):解析一个歧义函数名的所有真实调用方只需 1 次 cie 工具调用(callers(),它返回的每个结果构造上就是正确的),而仅用 grep 需要 3 次(1 次 grep + 2 次读取来消歧,仍然不能保证正确)。并非每个任务都适合图谱——同一份文档诚实地报告了一次平局和一次真实的失败,而不只是胜利——并且在第二个独立的公共仓库(psf/requests,不是本项目自己的代码)上重新运行于 docs/benchmarks-requests.md,该规律在一个真实的胜利中成立(一个 1,184 行的文件骨架化后只有原始大小的 43%),同时也暴露出一个真实的失败(同样的歧义调用方查询在那个仓库上只解析出 6 个真实调用点中的 3 个)——发布是因为它是真实的,而不是为了好看而调整过的。

**第二个经过实测而非臆断的钩子:**cie 提供 ~121 个可供 LLM 调用的工具——不是那种让模型不得不临时凑合出变通方案的通用“运行任意代码”表面,而是具体的工具(callersfile_skeletontraceability_orphans...),让模型可以直接表达意图。一个显而易见的担忧是:工具越多,选错工具的机会就越多——我们测试了这一点,而不是想当然:一个全新的 agent,面对 cie 的真实工具列表外加 14 个特意挑选得容易混淆的任务(仅 cie 就有 5 个名称带 “coverage” 的工具),在完整的 81 个工具表面上选出了完全正确的工具 14/14——与它在 14 个工具子集上得到的结果完全相同。只跑了一次,相关文档中列出了真实的注意事项——但“工具越多,越容易搞砸”的担忧在真正检查时并未成立。

用两条命令即可试用,无需服务器,无需注册——将项目索引到本地 SQLite 文件,然后把它提供给 Claude Code、Cursor 或任何 MCP 客户端,包括任务/QA 可追溯性。如果想要真正的团队/多项目设置,也可以将它指向 Neo4j(每种模式下包含什么,请参见下面的 Quickstart)。

完整对比 CodeGraph、CodeGraphContext、Serena 及其他工具,请参见 docs/competitive-landscape.md,包括 cie 在某些方面诚实地落后于它们的地方。

Quickstart(零配置,无需 Neo4j)

pip install "cie[mcp]"
cie index /path/to/your/project
cie-mcp /path/to/your/project --embedded

这是一个基于 stdio 的 MCP 服务器——你可以像添加任何其他本地 MCP 服务器一样,把它添加到 Claude Code / Cursor / Codex / 任何 MCP 客户端,然后它就能针对你项目的真实调用图调用 search_symbolcallerscalleesfile_skeletonpath_between 以及 cie.tools.ToolService 中的其他一切工具,索引本地存储在 .cie/graph.db

如果你希望连接的客户端只能看到只读工具,可以使用 --policy inspector(只读)——参见 cie/tool_policy.py。任务/QA 跟踪在这里也同样可用,由第二个本地 SQLite 文件(.cie/tasks.db,通过 cie.embedded_task_repository.EmbeddedTaskRepository)支撑——如果你宁愿跳过创建它,就向 cie-mcp 传入 --no-task-tracking

完整的拆解(结构提取、~121 个工具、任务/QA 层)请参见下方的“它是什么——三层结构”。

Related MCP server: AtlasMemory

安装

pip install cie             # core: graph, tools, task/hierarchy layer over Neo4j
pip install "cie[mcp]"      # + the MCP server (cie-mcp) — what most people want
pip install "cie[http]"     # + the HTTP tool-mount / mock server (cie/routes.py)

核心依赖(pyproject.toml):Neo4j 驱动、Pydantic v2、tree-sitter(+ Python/JS/TS/Java/Go/Rust 语法)、watchdog、Click、Rich。需要 Python ≥ 3.10。只有 routes.py / mock_server.py 引入 FastAPI/uvicorn([htp] 额外依赖);只有 mcp_server.py 引入 MCP SDK([map] 额外依赖)。查询引擎、提取、任务/层级仓库以及 ToolService 本身完全没有 HTTP 依赖


它是什么——三层结构

  • 通用代码图谱。 通过可插拔的 LanguageAdapters 进行结构化提取(符号、调用图、导入、继承、测试链接)——开箱即用地支持 Python / JavaScript / TypeScript / Java / Go / Rust 的 tree-sitter(Go/Rust:函数+方法提取、签名、接收者/实现方法的调用解析;这两者的导入边提取和 docstring 是有文档记载的缺口——参见 cie/extract.py 的模块 docstring);通过 cie.lang_adapter.register_adaptercie.language_adaters 入口点组,可以为你自己的任何其他语言添加适配器(包装编译器自己的 AST 转储、LSP 服务器或 tree-sitter 语法),无需对本包做任何代码更改

  • ~121 个可供 LLM 调用的工具cie.tools.ToolService,以 1:1 的方式暴露为 MCP 工具和 POST /tools/{tool} 端点)——符号搜索、调用图遍历、克隆/社区/漂移检测、质量报告、测试智能、可追溯性、置信度评分、分解、APM,以及一个受限的虚拟文件系统(view_file/write_file/edit_file/delete_file/write_files_atomic),全部自描述(ToolService.describe()),可暴露为类型化的 JSON-Schema 工具定义(cie.tool_schema),支持按智能体类型授权(cie.tool_policy),并可通过真正的 Model Context Protocol(cie.mcp_servercie-mcp)提供服务。

  • 任务 / PRD 层级结构层cie.task_repositorycie.hierarchy),用于跟踪原子化的开发/QA 任务以及(可选)项目的 PRD 分解树。任务/QA 的 CRUD 和可追溯性(cie.task_repository.TaskRepository —— 推送/列表/状态、依赖遍历、覆盖率/循环/API 契约验证)也零配置可用,通过 cie.embedded_task_repository.EmbeddedTaskRepository(SQLite,.cie/tasks.db;向 build_tool_service_embedded 传入 task_tracking=False,或向 cie-mcp 传入 --no-task-tracking,可以改用 cie.embedded_repository.NullTaskRepository 的快速失败行为)。独立的 PRD 分解树(cie.hierarchyprd_coverage/prd_orphans/prd_traceability_chain仍然仅支持 Neo4j——无论哪个后端构建了 ToolService,这三个工具都会直接调用 cie.factory.get_hierarchy_repo

能力(有代码支撑)

cie/ 包有 ~28k 行,分布在 ~60 个模块中。能力表面与代码在自己的模块 docstring 中所记载的规范章节一一对应。下面没有任何一项是愿景——每一项都是一个真实模块,并且在注明的地方,是 ToolService / CLI / HTTP 路由上的一个真实工具。

两遍代码图谱提取与加载(extract.pycallgraph.pytestlink.py

  • 第 1 遍(extract.py):用 tree-sitter 解析每个受支持的文件,得到文件/类/函数/方法 Nodes,带有 signatureline_start/line_enddocstring,以及第 2 遍所需的原始输入——importscall_sites。纯解析:没有数据库/文件系统副作用。

  • 第 2 遍(callgraph.py):将调用点解析为带置信度标签的 calls 边——EXTRACTED(同一文件中的定义或通过导入映射解析)、INFERRED(接收者类型启发式)或 AMBIGUOUS(整个项目中恰好有一个同名符号)。同时解析 inheritance/extends 边,并为无法解析的基类合成 external:: 桩节点。

  • testlink.py:第三遍,通过三种启发式方法,从测试符号到它们所测试的实现符号生成 TESTS 边——命名约定(test_foofoo)、当命名匹配得到真实 calls 边支持时进行置信度升级,以及 @patch(...)/@mock.patch(...) 装饰器解析。

  • 加载器:cie load <dirs> --project <name>(Neo4j,完整替换一个项目的节点)和 cie index <path>(嵌入式 SQLite,零配置)。reindex / reindex_file 用于补丁后的增量单文件刷新;watch 用于文件系统驱动的自动重新索引(watchdog)。

核心数据模型(models.pyrepository.pyneo4j_repository.pyin_memory_repository.pyembedded_repository.py

  • NodeKind 涵盖结构种类(FILE/CLASS/FUNC/METHOD/SYMBOL) 以及所有分析结果种类——CloneCluster、AntiPattern、 DriftFinding、MetricSnapshot、CommunitySummary、Type、Package、Document、 Contract、TestSkeleton、StateMachine、State、Transition、AgentVerdict、 ConfidenceReport、JustificationTrace、InvariantViolation、 SemanticDiffinding、RuntimeErrorTrace、Page、ImpliedPage、 IneractiveElement、DerivedTaskHint、TestExecution、MockEndoint、 MockCall、ContractViolation、ApmMetric、PerformanceBaseline、 PerformanceRegression、CoverageGap。分析节点从不由 extract.py 产生—— 仅由按需 pass 产生,通过 replace_analysis_nodes 写入。

  • Edge 置信度:EXTRACTED / INFERRED / AMBIGUOUS,带有 IN-08 溯源信息(extracted_atextractor_versionsource_ref)。

  • 三个 Repository 后端基于同一个 Protocol:Neo4jRepository (Cypher、按项目命名空间、向量索引、查询/写入/模式超时)、 InMemoryRepository(两个后端都对照验证的参考测试替身)和 EmbeddedRepository(SQLite、两张表、每次调用重新持久化完整图—— 简单、单项目、本地优先)。

  • QueryEnginequery.py):轻量、后端无关的编排——搜索、遍历、 邻居、社区、god 节点、统计、最短路径、签名、类方法、文件列表、 特征发现、语义搜索(需要在加载时写入 embeddings)。

存储后端与配置(config.pyfactory.py

  • Neo4jConfig.from_env() —— 读取 NEO4J_*(或旧版 CIE_NEO4J_* 覆盖)以及每个操作超时 (CIE_NEO4J_QUERY_TIMEOUT_S..._WRITE_TIMEOUT_S..._SCHEMA_TIMEOUT_S)。 仅靠驱动级限制无法阻止锁等待挂起;cie.timeouts 在每次查询往返周围强制执行独立的挂钟时间预算。

  • CieConfig —— 面向外部调用者的一个显式引导对象 (项目根目录、项目名、Neo4j 配置、允许的根目录、文件大小 上限、语言适配器)。没有“禁用沙箱”开关——文件工具 无条件进行沙箱限制(cie.tools.view._jail)。

  • factory.py 以三种方式构建 ToolServicebuild_tool_service (Neo4j,按项目缓存的引擎/任务仓库共享同一个 driver)、 build_tool_service_from_config(一次调用,无需环境变量)和 build_tool_service_embedded(SQLite 图 + 默认的 EmbeddedTaskRepository,通过 task_tracking=False 启用 NullTaskRepository)。

工具表面——ToolServicecie/tools/__init__.py~121 个方法)

每个方法都返回标准 SPEC §0 响应封装(ok/tool/results/ truncated/total/hint/elapsed_mscie.envelope);错误带有 必需的 hint。按能力分组(全部也通过 MCP 和 POST /tools/{tool} 暴露):

核心图导航——search_symbolresolve_importsemantic_searchcallerscaleesfile_skeletonpath_betweenfailing_contextaffected_byclass_hierarchytest_mapactual_callersdead_code_confirmhybrid_search(词法 + 稠密 向量 + 图中心性,带各组件分数)、entity_contextview_file(分窗口、带行号、与符号索引联结)。

GraphRAG Q&A——qacie.graphrag):一个真正的流水线—— query_plan.classify 选择检索策略,hybrid_search 检索,rerank 根据 LLM 相关性判断重新排序, entity_context 扩展邻域,最后由一次 LLM 调用作答, 引用独立于图组装(LLM 本身从不生成引用)。

第 13 节——代码智能(按需分析 pass 以分析节点写入):

  • 克隆检测clone_detect.py,CI-01..05):三种融合信号 ——token-Jaccard(复制粘贴)、AST 形状 Jaccard(重命名克隆)、 embedding 余弦(语义克隆)→ CloneCluster 节点。工具: clone_detect_runclone_clustersclone_find

  • 性能分析perf_analyze.py,CI-06..08):Big-O 估算(循环嵌套 + 递归)写入 F UNC/METHOD 节点, 外加反模式检测(N+1 查询、嵌套循环、循环内同步 I/O、无界增长)。 工具:performance_analyze_runperformance_profileantipattern_scan

  • 漂移检测drift_detect.py,CI-10..12):需求缺口 (任务 file_path 与已索引的 FILE 节点)、API 契约漂移(复用 api_routes 提取)、架构漂移。工具: drift_detect_rundrift_reportarchitecture_check

  • 指标metrics.py,CI-19..21):将克隆/漂移/技术债 汇总到仅追加的 MetricSnapshot(趋势可从历史回答)。 工具:metricstech_debt_reportmetric_trend

  • 社区community_detect.py,RQ-04/AI-03):标签传播 检测(Node.community 背后的真实写路径——此前只读且没有任何填充)

    • 携带 embeddings 的 LLM 主题化 CommunitySummary 节点。 工具:community_detect_runcommunity_summarize_runcommunity_search

  • 质量治理accuracy_checkfreshness_reportcomprehensiveness_reportsalience_report

第 0 节——填充与实时同步sync.py):双图模型 (推测性 vs 规范性)、4 阶段 GateRunner 质量门、分级 置信度、符号级 AST 增量 + 移动检测、回滚时软删除、 幂等的提交关联批量填充、同步事件分类。 工具:sync_quality_gatesync_promotesync_revertsync_ast_deltasync_evict_speculativesync_load_commitconfigure_layer_rulesget_layer_rulesinstall_git_hook

第 1 节——核心数据模型扩展data_model.py):export_rdfrelated_edgesvalidate_property_constraints、类型流解析 (type_flow_run/type_flow)、依赖图(dependency_graph_run/ dependency_graph)、从 markdown 生成文档图(doc_graph_run/ doc_search)。

第 14 节——置信度框架(规范与代码一致性保障):

  • 契约contracts.py,CF-01..03):python_assert 形式的 契约、按名称尽力绑定到 PRD 范围、参数名域类型验证、 inject_assertions/stip_assertions。 工具:contracts_runcontractsvalidate_typesinject_assertionsstip_assertions

  • 测试综合test_synthsis.py,CF-04/05):模板生成的 跨六种测试类型的骨架,通过 DM-14 使用的相同 TESTS 边绑定到代码。工具:test_skeletons_runtest_skeletonstest_coverage

  • 状态机state_machine.py,CF-06/07):FSM 提取、 死状态/不可达状态检测(真实图算法)、结构化 代码与 FS M 对比检查。工具:state_machine_runstate_machinefsm_validate

  • 可追溯性traceability.py,CF-08/09):在代码侧 PRD 层级侧的图遍历覆盖率/孤儿/链。 工具:traceability_coveragetraceability_orphanstraceability_chainprd_traceability_coverageprd_traceability_orphansprd_traceability_chain

  • 语义差异semantic_diff.py,CF-10/11):模式匹配的 规范与代码对比检查(刻意保守,设计上具有高假阴性率)。 工具:semantic_diff

  • 多智能体共识consensus.py,CF-12/14):判定存储 + 查询(此处明确构建持久化的恰好一次总线)。 工具:record_verdictagent_verdicts

  • 置信度评分confidence.py,CF-15/16):契约/测试/共识信号的 纯组合;生成层和运行时层报告为 None。 工具:confidence_reportjustification(CF-17/18)。

  • 不变量与遥测回流invariants.py,CF-19..21):针对状态快照的 安全契约表达式求值 + 违规记录;从代码节点回溯到其 契约/测试的图遍历。工具:check_invariantinvariant_violationstelemetry_to_spec

第 15 节——分解引擎decompose.py):复用现有的 HTML walker + 交互元素检测器,将页面分解为 Page/ImpliedPage/IneractiveElement/DerivedTaskHint 节点。 工具:decompose_pagepage_treepromote_hint_to_taskelement_coverageimplied_pages_runimplied_pages

第 16 节——测试执行与 APMtest_orchestration.pymockng.pymock_server.pyapm.py):基于交互元素/契约/状态 转换/API 端点/PRD 错误场景生成测试计划、测试执行、覆盖缺口报告、 边角测试、统一覆盖报告;第三方 mock 编排带 真正可运行的 FastAPI mock 服务器(显式 base-URL 覆盖,而非网络拦截); APM 指标摄取,包括自动 pytest --junitxml 计时收集、基线、回归检测。 工具:test_planrun_testsrecord_test_resulttest_resultscoverage_gapsnook_and_corner_testunified_coverage_reportmock_registry_runmock_registrymock_coveragestart_mock_serverstop_mock_servermock_violationsrecord_apm_metricapm_metricsperformance_baselineperformance_regressions

第 17 节——系统智能subsystems.py):本代码库中实际构建的 每个子系统的静态注册表,带有 (rep, project) -> int 填充查询(可调用,而非原始 Cypher,因此同一测试可同时通过 Neo4j 和内存替身)。工具:subsystem_healthsubsystem_gapssubsystem_dependency_graphsubsystem_dependency_graph_runpopulation_path

运行时遥测摄取telemetry.py,CI-15..17):通过 OTLP/HTTP 配合 JSON 编码 接收真实的 OpenTelemetry span 摄取 (在 POST /telemetry/otlp 接收),与测试时 APM 区分。刻意不尝试 原始 protobuf 解码。

虚拟文件系统与沙箱cie/tools/view.pyedit.pyrunner.pyblame.py):受限的 view_file(带行号、带 图联结的符号索引、可配置大小上限)、write_filewrite_files_atomicedit_filedelete_filerun(子进程 + cwd 沙箱 + 硬超时——CIE_RUN_ROOT 扩大沙箱范围)、blame_history (与任务图工件联结的 git 历史)。每次写入都保持进程内启发式符号索引 增量新鲜,并重新解析未更改文件的调用者。

启发式回退cie/tools/index.pyheuristic.py):当 图调用失败或返回空时,ToolService 通过遍历+解析项目树 惰性构建内存中的 SymbolIndex,因此 search_symbol/file_skeleton/view_file 在未索引或部分索引的 树上继续工作——与图支持路径相同的结果塑造代码路径。

任务与 PRD 层级层(tasks.pytask_repository.pyembedded_task_repository.pyhierarchy.py

  • AtomicTask / AtomicTaskBatch(pydantic,摄取时进行 schema 版本化),支持状态/尝试次数回写、工件、修复事件、依赖 循环验证、覆盖验证、API 契约验证。

  • Neo4jTaskRepository(真正的写后实体缓存,cie.graph_cache) 或 EmbeddedTaskRepository(SQLite,零配置——相同 TaskRepository 协议、相同 plan_push 验证代码,无需 Neo4j) —— NullTaskRepository 仍可作为显式选择退出方式使用。

  • hierarchy.py:存储/遍历 PRD 树(Module → Feature → Workflow → UseCase → UserStory → REALIZED_BY AtomicTask), 无 APOC 的 Cypher——仅限 Neo4j,尚未移植到嵌入式后端(其 三个工具——prd_coverage/prd_orphans/prd_traceability_chain—— 直接调用 cie.factory.get_hierarchy_repo)。CLI:hierarchy:pushhierarchy:childrenhierarchy:lineage

三个前端,同一封装

  • MCPcie.mcp_server / cie-mcp):基于官方 mcp SDK 构建的真正 Model Context Protocol,通过 stdio(或 sse / streamable-http)提供。每个工具的 JSON Schema 来自 SDK 对绑定方法的自省——单一事实来源。被策略拒绝的工具永远不会被注册,而不仅仅是拒绝调用。策略:forge/orchestrator(读+写)、miner/inspector(只读)。

  • HTTPcie.routes.py):router 挂载到宿主 FastAPI 应用中(而非独立进程)。POST /tools/{tool}(kwargs 在请求体中)、GET /toolsGET /healthGET /schema-version,以及专门的 POST /tasksGET /tasks/{name}GET /tasks/pendingPOST /hierarchyPOST /telemetry/otlp 等。

  • CLIcie.cli,49 个命令):默认输出人类可读的 Rich 表格;每个命令都支持 --json(分组级,位于子命令之前),输出与 HTTP 接口相同的 SPEC §0 信封格式,因此 agent 可以完全通过 JSON 驱动 cie。命令与上述工具一一对应(searchnodeneighborscommunitycommunitiesgodstatssearch-symbolview-filecallerscalleesskeletonfailing-contextaffected-byblamerunreindexwatchtasks:*hierarchy:*coverage:*validate:*schema-versionschema:dump、……)。

安全与确定性说明(摘自代码)

  • 文件工具无条件将操作隔离在项目根目录之下(cie.tools.view._jail);CIE_RUN_ROOT 只能扩大 run 的隔离范围。不存在"禁用隔离"的选项。

  • 每条边都带有溯源信息(extracted_at/extractor_version/source_ref);置信度在写入时打上标记,绝不是由纯提取器虚构的。

  • 每次操作的墙上时钟超时(cie.timeouts)限制了锁等待引起的挂起,而驱动自身的超时做不到这一点——这是 cie.timeouts 中记录的一次真实的 2026-08-04 Aura schema-lock 事件带来的直接教训。

  • GraphRAG 中的引用是从图中组装出来的,绝不是由 LLM 输出的,因此不可能在生成过程中被捏造。

两个层级

cie 分为两个层级,这种划分是刻意为之——它们面向两类不同的受众:

获取层——零配置、嵌入式。 一个本地 SQLite 文件,没有服务器,无需配置任何内容(见快速入门)。完整的代码图(搜索、遍历、调用图、文件骨架、虚拟文件系统、启发式回退、GraphRAG Q&A)+ 通过 MCP/HTTP/CLI 提供的 ~121 个工具。没有任务/QA 跟踪,没有质量治理层(克隆/漂移检测、置信度、契约)。这是独立开发者或初次来访者会尝试的层级——赢得第一颗星的锐利钩子。

留存层——以 Neo4j 为后端。 所有能力、多项目命名空间,以及团队每天都会持续查询的东西(而非一次性的"wow"):任务/QA 可追溯性(哪些任务和测试实现了哪些代码)、持续质量治理、PRD 层级结构和覆盖率趋势。这是让 cie 值得在第一周之后继续安装的层级——任何纯代码图都不具备的故事。

from pathlib import Path
from cie.config import CieConfig, Neo4jConfig
from cie.factory import build_tool_service_from_config

config = CieConfig(
    project_root=Path("/path/to/your/project"),
    project="my-project",
    neo4j=Neo4jConfig(uri="bolt://localhost:7687", user="neo4j", password="password"),
)
service = build_tool_service_from_config(config)

service.reindex()
print(service.search_symbol("main"))

或者通过 MCP:cie-mcp /path/to/your/project(不带 --embedded)——读取 CIE_NEO4J_*/NEO4J_* 环境变量,或显式传入 --neo4j-uri/--neo4j-user/--neo4j-password

文档

  • 竞争格局 — 最接近的竞品(CodeGraphContext、CodeGraph、Serena 等)、cie 与它们的差异,以及它如实落后的地方。

  • 基准测试——psf/requests — 相同的方法论在一个本项目并未编写的知名公共仓库上重新运行,而非自指式的证明案例;一个真实的胜出之处和一个真实的召回率缺口,两者都有报告。

  • 工具选择准确度 — 拥有 81+ 个工具而不是 ~14 个,会不会让 agent 在选择准确度上付出代价?实测而非断言:两种条件下均为 14/14 正确,单次运行——"广度会损害准确度"的假设在这里并不成立。

  • 基准测试 — 针对真实代码库的真实工具调用/响应大小测量,如实公开(包括未胜出的地方)。

  • 竞品基准测试 — 同一个真实代码库,使用实际安装并运行(而非估算)的 CodeGraphContext 和 Serena 进行索引和查询;包括这次深挖发现、精确定位并修复的一个真实歧义名称解析 bug。

  • 添加一门语言 — 为 cie 从未见过的语言提供一个完整、经过验证的 LanguageAdapter,不涉及 tree-sitter 语法或 LSP。

项目结构

cie/
  models.py            # NodeKind/Edge/Confidence + all result dataclasses (one source of truth)
  repository.py        # Repository Protocol
  neo4j_repository.py  # Neo4j (Cypher) backend
  in_memory_repository.py  # reference test double + embedded query/traversal logic
  embedded_repository.py   # zero-config SQLite backend
  query.py             # QueryEngine (backend-agnostic orchestration)
  extract.py           # tree-sitter extraction (Python/JS/TS/Java/Go/Rust)
  callgraph.py         # pass-2 calls/inheritance edge resolution
  testlink.py          # TESTS edge resolution
  lang_adapter.py      # pluggable language-adapter registry + entry points
  config.py factory.py # bootstrap (Neo4jConfig / CieConfig / build_tool_service*)
  tools/               # ToolService (~121 tools) + jailed fs/run/blame helpers
  mcp_server.py        # real MCP server (cie-mcp)
  routes.py            # FastAPI router (mounted into host app)
  cli.py               # 49-command CLI (Rich tables + --json envelope)
  tool_schema.py tool_policy.py  # typed JSON-Schema + per-agent authorization
  # analysis passes (on-demand, write analysis nodes):
  clone_detect.py perf_analyze.py drift_detect.py metrics.py
  community_detect.py graphrag.py query_plan.py graph_diff.py
  contracts.py test_synthesis.py state_machine.py traceability.py
  semantic_diff.py consensus.py confidence.py justification.py
  invariants.py telemetry.py decompose.py subsystems.py
  sync.py data_model.py api_routes.py source_analysis.py
  test_orchestration.py mocking.py mock_server.py apm.py
  tasks.py task_repository.py hierarchy.py   # task / PRD-hierarchy layer
  envelope.py embed.py graph_cache.py timeouts.py telemetry.py
tests/                # test_standalone_smoke / test_mcp_server / test_embedded_repository

许可证

cie 以 MIT License 许可证发布。

贡献即表示您同意您的贡献以相同的 MIT 许可证授权——参见 CONTRIBUTING.md

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
5Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Semantic code indexer with GraphRAG knowledge graph. Index your codebase, search in natural language, and expose everything via MCP so AI agents understand architecture — not just files.
    460
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Turn any codebase into an AI-readable neural map — with proof. Every claim linked to code anchors (line + SHA-256 hash), every context window optimized with greedy token budgeting, every session protected by drift detection. Tree-sitter indexing across 11 languages, cross-session learning, AI enrichment, and 28 MCP tools. Zero config — just connect and your AI agent remembers everything.
    45
    13
    GPL 3.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Multi-language code-graph MCP server with 18 tools for structural code queries — find_symbol, callers, callees, blast_radius, dead_code, and cross-stack dataflow_trace from HTTP request through service layers to SQL. Tree-sitter parsing for Python, TypeScript, JavaScript, and Go; local-first, no API key required.
    15
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Deterministic code-graph (GraphRAG) over your repo for LLM agents — local-first, git-native, zero-infra, served via MCP. Python, TS/JS, Rust, Go, Java, C#.
    8
    12
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).

  • Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.

  • Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kannamma-labs/cie'

If you have feedback or need assistance with the MCP directory API, please join our Discord server