IA

invariance-ai/gps

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 3 forks 质量 70 趋势 14MIT

编码代理的代码库上下文。结构 + 测试 + 来源 + 不变量,可通过 MCP 调用。

概览

教你的编码代理一次你的仓库是怎么工作的。当相关代码被触及时,GPS会带回那段记忆。 GPS 是 Claude Code、Codex、Cursor 以及基于 shell 的编码代理的内存层。它存储了人类通常需要重复的内容:仓库约定、最佳实践、用户偏好、不变项、决策、TODO、测试命令以及从过去编辑中获得的艰难经验。然后在代理编辑前,它会检索相关切片。 —— 它是什么,命令引用,以及设置文档。 GPS会给你的代理代码记忆;TARS(TARS)教它如何工作——它从你最干净的会话中学习编排方法(在编辑前探索,完成前测试),并在下一个提示时反馈回来。知识+方法。 从仓库根节点发出一个命令。选择你使用的代理: 同时安装多个集成:npx -y @invariance/GPS 设置 --是的 --with -claude --with -codex --with -cursor。更喜欢全局安装?

概述(AI 翻译)

教你的编码代理一次你的仓库如何运作。当相关代码被触及时,GPS 会带回那段记忆。

gps 是 Claude Code、Codex、Cursor 以及基于 shell 的编码代理的内存层。它存储了人类通常需要重复的内容:仓库惯例、最佳实践、用户偏好、不变式、决策、TODO、测试命令以及从过去编辑中艰难获得的经验教训。然后在代理编辑前,它会检索相关切片。

产品页面→ useinvariance.com/product/gps——它是什么,命令参考,以及设置文档。

与tars配对。 GPS会给你的代理你的代码记忆;TARS教它如何工作——它从你最干净的会话中学习编排方法(在编辑前探索,完成前测试),并在下一个提示时反馈。知识+方法。

目录

  • 快速启动
  • 为什么要GPS
  • 核心环路的运作
  • 命令
  • 代理集成
  • 捕获与晋升政策
  • 概念:笔记、不变量、决策
  • 比较如何
  • 基准测试
  • 实验性:现场纪录片
  • 地位与限制
  • 许可证

快速开始

从仓库根节点发出一个命令。选择你使用的代理:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

gps — repo memory for coding agents

Teach your coding agent how your repo works once. GPS brings that memory back when the relevant code is touched.

gps is a memory layer for Claude Code, Codex, Cursor, and shell-based coding agents. It stores the things humans usually have to repeat: repo conventions, best practices, user preferences, invariants, decisions, TODOs, test commands, and hard-won lessons from past edits. Then it retrieves the relevant slice before the agent edits.

Product page → useinvariance.com/product/gps — what it is, the command reference, and setup docs.

Pairs with tars. gps gives your agent memory of your code; tars teaches it how to work — it learns the orchestration method from your cleanest sessions (explore before editing, test before done) and feeds it back on the next prompt. Knowledge + method.

Contents

Quickstart

One command from the repo root. Pick the agent you use:

cd your-repo
npx -y @invariance/gps setup --yes --with-claude   # Claude Code
npx -y @invariance/gps setup --yes --with-codex    # Codex CLI
npx -y @invariance/gps setup --yes --with-cursor   # Cursor

Install several integrations at once: npx -y @invariance/gps setup --yes --with-claude --with-codex --with-cursor. Prefer a global install? npm install -g @invariance/gps && gps setup --yes --with-claude.

setup does the full first-run path: writes .gps/config.yml and .gps/invariants.yml, builds .gps/index/symbols.json, lifts TODO(symbol): and FIXME(symbol): comments into notes, and installs the selected agent integration.

Then it’s normal agent usage. This is the core loop to remember:

gps next                                                  # first useful commands after install
gps prepare  --intent "what I am about to change"   # decision-ready brief before edits
gps remember "hard-won fact worth reusing"                  # save a durable lesson
gps save-this "use the shared errors module here" --symbol createRefund   # preview a save command
gps remember "still need to update the fixture" --reminder --symbol createRefund
gps done                                                    # post-edit self-audit: changed symbols, tests, invariants
gps doc --base HEAD                                         # optional shareable review doc for the diff
在 GitHub 查看完整 README

安装

npx -y @invariance/gps setup --yes --with-claude # Claude Code
新手?先看 mcpskill.org 教程 →