为编码代理构建基于本体的结构化项目记忆,提升代码变更决策可追溯性。
Ontology-Grounded Project Memory for Coding Agents
- 用本体构建知识图谱,记录架构决策与理由,通过MCP接口供代理访问。
- 在835条记录上测试,准确率高达0.98~1.00,远超基线工具的6%~27%。
- 适合需要高可追溯性、复杂决策支持的软件开发团队使用。
编码代理已成为众多软件项目生成新代码的主要方式,但快速变更带来的决策原因追踪困难。本文提出MOOSEDev系统,为编码代理提供结构化、基于本体的项目记忆。该系统将架构决策、经验教训、约束条件和推理依据以知识图谱形式存储,并通过模型上下文协议(MCP)接口向代理开放。记录包含生命周期状态、来源信息和替代关系,可通过专有的神经符号引擎MOOSE查询。在包含835个带类型记录的公共语料库上对比测试,MOOSEDev在替代关系、集合完整性及否定问题上返回正确答案的比例为0.98~1.00,而基线向量记忆工具仅达6%~27%。两者在相关性召回率和令牌成本方面相近。此外,文中还介绍了自研代码库的时间序列提交历史初始化、预注册实时试验及经验总结。
原文摘要 · Abstract (English)
Coding agents have become the primary means of generating new code in many software projects, and the resulting velocity of changes makes keeping track of the reasons behind those changes challenging. This paper introduces MOOSEDev, a system designed to give coding agents structured, ontology-grounded project memory. The system captures architectural decisions, lessons, constraints, and rationales in a knowledge graph exposed to agents via a Model Context Protocol (MCP) interface. Records carry lifecycle status, provenance, and supersession links, queryable via MOOSE, a proprietary neurosymbolic engine that treats the symbolic layer as the primary reasoning substrate. We compared MOOSEDev against a production vector-memory tool on a neutral public corpus of 835 typed records. MOOSEDev returned the expected answer set essentially in full (0.98-1.00) on supersession, set-completeness, and negation questions, whereas the baseline's top-k retrieval surfaced between 6% and 27%. Conversely, relevance recall and token cost were largely equivalent between the two systems. We also describe a temporal commit-history bootstrap of our own codebase, a pre-registered live trial, and lessons learned.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。