study8677/antigravity-workspace-template

🧠 RepoBrain (formerly Antigravity) — Give your repo a brain. ChatGPT for your codebase: works in Claude Code, Cursor, Codex, Windsurf & more.

What it solves

RepoBrain 提供一个跨 IDE 的仓库知识引擎,防止 AI 编码代理产生幻觉或忘记项目特定的约定。它取代了代理需要手动在成千上万行代码或文档中 grep 的需求,这往往导致高幻觉率以及在询问“X 是如何工作的?”时响应缓慢。

How it works

RepoBrain 使用多代理集群自主分析代码库。在一次 rb-refresh 循环中,它会根据 import 图和目录结构对文件进行分组,为每个模块分配专属代理,生成完整的 Markdown 知识文档。随后 Map Agent 将这些文档索引成路由映射。当用户通过 rb-ask 提问时,Router 会识别相关模块,并将对应的代理文档传递给合成器,生成基于实际源代码(包括文件路径和行号)的答案。

Who it’s for

使用 AI 驱动的 IDE 和 CLI 工具(如 Claude Code、Cursor、Windsurf、Codex CLI、VS Code + Copilot、Cline、Aider)的开发者,想要获得更准确且有依据的代码库问答。

Highlights

  • Cross-IDE Compatibility: Uses a shared .repobrain/ knowledge layer that works across different AI tools and IDEs.
  • Language Agnostic: Analyzes code using LLMs rather than AST parsing or regex, making it compatible with any programming language.
  • Robotic Knowledge Generation: Automatically generates project-level documentation like conventions.md and structure.md.
  • MCP Server Support: Can be registered as a Model Context Protocol (MCP) server, allowing agents like Claude Code to call ask_project as a live tool.
  • Git Integration: Includes a dedicated GitAgent to analyze git history for insights into why changes were made.