diff --git a/README.md b/README.md index 0d0651752..e9d91341e 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ The tables below show whether each tool supports a given feature (✅ = supporte ### Deprecation notes - **Gemini CLI (`geminicli`)** — Google is retiring Gemini CLI on **June 18, 2026**, when it stops serving requests for Google AI Pro/Ultra and free Gemini Code Assist for individuals (Enterprise plans are unaffected). The successor is the **Antigravity CLI (`antigravity-cli`)**. `geminicli` is **not** removed from rulesync — Enterprise access continues and existing `GEMINI.md`/`.gemini/` repositories still rely on it — but new projects should prefer `antigravity-cli`. See the [Gemini CLI → Antigravity CLI migration guide](https://dyoshikawa.github.io/rulesync/guide/geminicli-to-antigravity-cli). -- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products with separate global config trees: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). For project-scope rules, `antigravity-ide` emits the root rule as a plain cross-tool **`AGENTS.md`** at the project root (read by the IDE since v1.20.3, with `GEMINI.md` taking precedence on conflict) and non-root rules under `.agents/rules/`. +- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products with separate global config trees: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). For project-scope rules, **both `antigravity-ide` and `antigravity-cli`** emit the root rule as a plain cross-tool **`AGENTS.md`** at the project root (the Gemini-lineage discovery order is `AGENTS.md`, `CONTEXT.md`, `GEMINI.md`; the IDE has read `AGENTS.md` since v1.20.3) and non-root rules under `.agents/rules/`. Some features accept per-feature options (e.g., Claude Code's `ignore` feature supports `fileMode: "local"` to write to `settings.local.json` instead of `settings.json`). See [Configuration > Per-feature options](https://dyoshikawa.github.io/rulesync/guide/configuration#per-feature-options) for details. diff --git a/docs/guide/geminicli-to-antigravity-cli.md b/docs/guide/geminicli-to-antigravity-cli.md index cd526cb7c..e0231d6c9 100644 --- a/docs/guide/geminicli-to-antigravity-cli.md +++ b/docs/guide/geminicli-to-antigravity-cli.md @@ -31,7 +31,7 @@ transition. | Feature | `geminicli` | `antigravity-cli` | | ----------- | -------------------------------------- | ------------------------------------------------------------------------------------------- | -| rules | root `GEMINI.md` + `.gemini/memories/` | root `GEMINI.md` + `.agents/rules/`; global `~/.gemini/GEMINI.md` | +| rules | root `GEMINI.md` + `.gemini/memories/` | root `AGENTS.md` + `.agents/rules/`; global `~/.gemini/GEMINI.md` | | skills | `.gemini/skills/` | `.agents/skills/`; global `~/.gemini/antigravity-cli/skills/` | | mcp | `.gemini/settings.json` (`mcpServers`) | `.agents/mcp_config.json`; global `~/.gemini/config/mcp_config.json` (shared config dir) | | hooks | `.gemini/` (Gemini hook shape) | `.agents/hooks.json`; global `~/.gemini/config/hooks.json` (Claude-Code-like matcher shape) | @@ -41,6 +41,13 @@ transition. ### Notable differences +- **Root rules file**: `antigravity-cli` emits the project root rule as the + cross-tool **`AGENTS.md`** (matching `antigravity-ide`), not `GEMINI.md`. The + CLI reads both, with the Gemini-lineage discovery order `AGENTS.md`, + `CONTEXT.md`, `GEMINI.md`. If you previously generated `antigravity-cli` output + and have a generated root `GEMINI.md`, rulesync no longer manages it — delete + the stale `GEMINI.md` manually after regenerating. Global scope is unchanged + (`~/.gemini/GEMINI.md`). - **MCP**: Antigravity uses `serverUrl` (not `url`) for HTTP servers and honors a `disabledTools` array. Rulesync emits the Antigravity-compatible shape automatically. diff --git a/docs/reference/supported-tools.md b/docs/reference/supported-tools.md index fc41153ae..680ca39c3 100644 --- a/docs/reference/supported-tools.md +++ b/docs/reference/supported-tools.md @@ -45,4 +45,4 @@ Rulesync supports both **generation** and **import** for All of the major AI cod ## Deprecation notes - **Gemini CLI (`geminicli`)** — Google is retiring Gemini CLI on **June 18, 2026**, when it stops serving requests for Google AI Pro/Ultra and free Gemini Code Assist for individuals (Enterprise plans are unaffected). The successor is the **Antigravity CLI (`antigravity-cli`)**. `geminicli` is **not** removed from rulesync — Enterprise access continues and existing `GEMINI.md`/`.gemini/` repositories still rely on it — but new projects should prefer `antigravity-cli`. See the [Gemini CLI → Antigravity CLI migration guide](../guide/geminicli-to-antigravity-cli.md). -- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). As of Antigravity 2.0 the IDE reads its global MCP config and skills from the shared `~/.gemini/config/` tree — `~/.gemini/config/mcp_config.json` and `~/.gemini/config/skills/`, matching the current [MCP](https://antigravity.google/docs/mcp) and [Skills](https://antigravity.google/docs/skills) docs. The `antigravity-cli` global MCP config also lives in the shared `~/.gemini/config/mcp_config.json`, while the CLI keeps its own global skills tree at `~/.gemini/antigravity-cli/skills/`. Both targets also intentionally **share** the global rule file `~/.gemini/GEMINI.md` and the global hooks file `~/.gemini/config/hooks.json` — enabling both targets in `--global` mode writes those shared files once. For project-scope rules, `antigravity-ide` emits the root rule as a plain cross-tool **`AGENTS.md`** at the project root (read by the Antigravity IDE since v1.20.3 in addition to `GEMINI.md`, which takes precedence on conflict) and non-root rules under `.agents/rules/` with trigger frontmatter. +- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). As of Antigravity 2.0 the IDE reads its global MCP config and skills from the shared `~/.gemini/config/` tree — `~/.gemini/config/mcp_config.json` and `~/.gemini/config/skills/`, matching the current [MCP](https://antigravity.google/docs/mcp) and [Skills](https://antigravity.google/docs/skills) docs. The `antigravity-cli` global MCP config also lives in the shared `~/.gemini/config/mcp_config.json`, while the CLI keeps its own global skills tree at `~/.gemini/antigravity-cli/skills/`. Both targets also intentionally **share** the global rule file `~/.gemini/GEMINI.md` and the global hooks file `~/.gemini/config/hooks.json` — enabling both targets in `--global` mode writes those shared files once. For project-scope rules, **both `antigravity-ide` and `antigravity-cli`** emit the root rule as a plain cross-tool **`AGENTS.md`** at the project root (the Gemini-lineage discovery order is `AGENTS.md`, `CONTEXT.md`, `GEMINI.md`; the IDE has read `AGENTS.md` since v1.20.3) and non-root rules under `.agents/rules/` (the IDE adds trigger frontmatter to non-root rules; the CLI keeps them as plain markdown). diff --git a/skills/rulesync/geminicli-to-antigravity-cli.md b/skills/rulesync/geminicli-to-antigravity-cli.md index cd526cb7c..e0231d6c9 100644 --- a/skills/rulesync/geminicli-to-antigravity-cli.md +++ b/skills/rulesync/geminicli-to-antigravity-cli.md @@ -31,7 +31,7 @@ transition. | Feature | `geminicli` | `antigravity-cli` | | ----------- | -------------------------------------- | ------------------------------------------------------------------------------------------- | -| rules | root `GEMINI.md` + `.gemini/memories/` | root `GEMINI.md` + `.agents/rules/`; global `~/.gemini/GEMINI.md` | +| rules | root `GEMINI.md` + `.gemini/memories/` | root `AGENTS.md` + `.agents/rules/`; global `~/.gemini/GEMINI.md` | | skills | `.gemini/skills/` | `.agents/skills/`; global `~/.gemini/antigravity-cli/skills/` | | mcp | `.gemini/settings.json` (`mcpServers`) | `.agents/mcp_config.json`; global `~/.gemini/config/mcp_config.json` (shared config dir) | | hooks | `.gemini/` (Gemini hook shape) | `.agents/hooks.json`; global `~/.gemini/config/hooks.json` (Claude-Code-like matcher shape) | @@ -41,6 +41,13 @@ transition. ### Notable differences +- **Root rules file**: `antigravity-cli` emits the project root rule as the + cross-tool **`AGENTS.md`** (matching `antigravity-ide`), not `GEMINI.md`. The + CLI reads both, with the Gemini-lineage discovery order `AGENTS.md`, + `CONTEXT.md`, `GEMINI.md`. If you previously generated `antigravity-cli` output + and have a generated root `GEMINI.md`, rulesync no longer manages it — delete + the stale `GEMINI.md` manually after regenerating. Global scope is unchanged + (`~/.gemini/GEMINI.md`). - **MCP**: Antigravity uses `serverUrl` (not `url`) for HTTP servers and honors a `disabledTools` array. Rulesync emits the Antigravity-compatible shape automatically. diff --git a/skills/rulesync/supported-tools.md b/skills/rulesync/supported-tools.md index fc41153ae..680ca39c3 100644 --- a/skills/rulesync/supported-tools.md +++ b/skills/rulesync/supported-tools.md @@ -45,4 +45,4 @@ Rulesync supports both **generation** and **import** for All of the major AI cod ## Deprecation notes - **Gemini CLI (`geminicli`)** — Google is retiring Gemini CLI on **June 18, 2026**, when it stops serving requests for Google AI Pro/Ultra and free Gemini Code Assist for individuals (Enterprise plans are unaffected). The successor is the **Antigravity CLI (`antigravity-cli`)**. `geminicli` is **not** removed from rulesync — Enterprise access continues and existing `GEMINI.md`/`.gemini/` repositories still rely on it — but new projects should prefer `antigravity-cli`. See the [Gemini CLI → Antigravity CLI migration guide](../guide/geminicli-to-antigravity-cli.md). -- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). As of Antigravity 2.0 the IDE reads its global MCP config and skills from the shared `~/.gemini/config/` tree — `~/.gemini/config/mcp_config.json` and `~/.gemini/config/skills/`, matching the current [MCP](https://antigravity.google/docs/mcp) and [Skills](https://antigravity.google/docs/skills) docs. The `antigravity-cli` global MCP config also lives in the shared `~/.gemini/config/mcp_config.json`, while the CLI keeps its own global skills tree at `~/.gemini/antigravity-cli/skills/`. Both targets also intentionally **share** the global rule file `~/.gemini/GEMINI.md` and the global hooks file `~/.gemini/config/hooks.json` — enabling both targets in `--global` mode writes those shared files once. For project-scope rules, `antigravity-ide` emits the root rule as a plain cross-tool **`AGENTS.md`** at the project root (read by the Antigravity IDE since v1.20.3 in addition to `GEMINI.md`, which takes precedence on conflict) and non-root rules under `.agents/rules/` with trigger frontmatter. +- **Google Antigravity (`antigravity`)** — Antigravity 2.0 splits into two products: the desktop **`antigravity-ide`** and the **`antigravity-cli`** (`agy`). The legacy `antigravity` target is now a **deprecated alias for `antigravity-ide`** that keeps its original `.agent/` (singular) paths for backward compatibility. Migrate to `antigravity-ide` (desktop IDE) or `antigravity-cli` (CLI). As of Antigravity 2.0 the IDE reads its global MCP config and skills from the shared `~/.gemini/config/` tree — `~/.gemini/config/mcp_config.json` and `~/.gemini/config/skills/`, matching the current [MCP](https://antigravity.google/docs/mcp) and [Skills](https://antigravity.google/docs/skills) docs. The `antigravity-cli` global MCP config also lives in the shared `~/.gemini/config/mcp_config.json`, while the CLI keeps its own global skills tree at `~/.gemini/antigravity-cli/skills/`. Both targets also intentionally **share** the global rule file `~/.gemini/GEMINI.md` and the global hooks file `~/.gemini/config/hooks.json` — enabling both targets in `--global` mode writes those shared files once. For project-scope rules, **both `antigravity-ide` and `antigravity-cli`** emit the root rule as a plain cross-tool **`AGENTS.md`** at the project root (the Gemini-lineage discovery order is `AGENTS.md`, `CONTEXT.md`, `GEMINI.md`; the IDE has read `AGENTS.md` since v1.20.3) and non-root rules under `.agents/rules/` (the IDE adds trigger frontmatter to non-root rules; the CLI keeps them as plain markdown). diff --git a/src/cli/commands/gitignore-entries.test.ts b/src/cli/commands/gitignore-entries.test.ts index 39c72e791..5f0a61da8 100644 --- a/src/cli/commands/gitignore-entries.test.ts +++ b/src/cli/commands/gitignore-entries.test.ts @@ -128,7 +128,18 @@ describe("filterGitignoreEntries", () => { // non-root rules under .agents/rules/. expect(result).toContain("**/AGENTS.md"); expect(result).toContain("**/.agents/rules/"); - // The CLI-only GEMINI.md must NOT be included for the IDE target. + // GEMINI.md (a geminicli-only entry) must NOT be included for this target. + expect(result).not.toContain("**/GEMINI.md"); + }); + + it("should include the root AGENTS.md and .agents/rules entries for antigravity-cli", () => { + const result = filterGitignoreEntries({ logger, targets: ["antigravity-cli"] }); + + // antigravity-cli now emits the project root rule as AGENTS.md (matching + // antigravity-ide), not GEMINI.md, plus non-root rules under .agents/rules/. + expect(result).toContain("**/AGENTS.md"); + expect(result).toContain("**/.agents/rules/"); + // The project root is no longer GEMINI.md (that is a geminicli-only entry). expect(result).not.toContain("**/GEMINI.md"); }); diff --git a/src/cli/commands/gitignore-entries.ts b/src/cli/commands/gitignore-entries.ts index 1e7608a69..b5cbc0568 100644 --- a/src/cli/commands/gitignore-entries.ts +++ b/src/cli/commands/gitignore-entries.ts @@ -52,7 +52,7 @@ export const GITIGNORE_ENTRY_REGISTRY: ReadonlyArray = [ // AGENTS.md { - target: ["agentsmd", "amp", "antigravity-ide", "pi", "vibe", "warp"], + target: ["agentsmd", "amp", "antigravity-cli", "antigravity-ide", "pi", "vibe", "warp"], feature: "rules", entry: "**/AGENTS.md", }, @@ -68,16 +68,15 @@ export const GITIGNORE_ENTRY_REGISTRY: ReadonlyArray = [ { target: "amp", feature: "skills", entry: "**/.agents/skills/" }, // Antigravity (IDE + CLI, Antigravity 2.0) - // Both targets share the `.agents/` project tree; the IDE additionally writes - // a root `AGENTS.md` (handled by the shared AGENTS.md entry above) and the CLI - // a root `GEMINI.md`. Global-scope paths (under the home directory) are + // Both targets share the `.agents/` project tree and both write a root + // `AGENTS.md` (handled by the shared AGENTS.md entry above). Global-scope + // paths (under the home directory, e.g. `~/.gemini/GEMINI.md`) are // intentionally not gitignored. { target: ["antigravity-ide", "antigravity-cli"], feature: "rules", entry: "**/.agents/rules/", }, - { target: "antigravity-cli", feature: "rules", entry: "**/GEMINI.md" }, { target: "antigravity-cli", feature: "ignore", entry: "**/.geminiignore" }, { target: "antigravity-ide", diff --git a/src/constants/antigravity-cli-paths.ts b/src/constants/antigravity-cli-paths.ts index f003a6a10..405130a94 100644 --- a/src/constants/antigravity-cli-paths.ts +++ b/src/constants/antigravity-cli-paths.ts @@ -15,4 +15,12 @@ export { export const ANTIGRAVITY_AGENTS_DIR = ANTIGRAVITY_DIR; -export const ANTIGRAVITY_RULE_FILE_NAME = "GEMINI.md"; +// Project-root rules file. The CLI reads the cross-tool `AGENTS.md` standard at +// the workspace root (Gemini-lineage discovery order is `AGENTS.md`, +// `CONTEXT.md`, `GEMINI.md`), so rulesync emits `AGENTS.md` to align with the +// standard and the `antigravity-ide` target. +export const ANTIGRAVITY_RULE_FILE_NAME = "AGENTS.md"; + +// Global (user-scope) rules file lives in `~/.gemini/` and stays `GEMINI.md`, +// matching the `antigravity-ide` global file and the shared Gemini home config. +export const ANTIGRAVITY_GLOBAL_RULE_FILE_NAME = "GEMINI.md"; diff --git a/src/e2e/e2e-rules.spec.ts b/src/e2e/e2e-rules.spec.ts index f12da4808..cf6dbaeab 100644 --- a/src/e2e/e2e-rules.spec.ts +++ b/src/e2e/e2e-rules.spec.ts @@ -27,7 +27,7 @@ describe("E2E: rules", () => { { target: "copilot", outputPath: join(".github", "copilot-instructions.md") }, { target: "opencode", outputPath: "AGENTS.md" }, { target: "geminicli", outputPath: "GEMINI.md" }, - { target: "antigravity-cli", outputPath: "GEMINI.md" }, + { target: "antigravity-cli", outputPath: "AGENTS.md" }, { target: "antigravity-ide", outputPath: "AGENTS.md" }, { target: "goose", outputPath: ".goosehints" }, { target: "copilotcli", outputPath: join(".github", "copilot-instructions.md") }, @@ -285,7 +285,7 @@ describe("E2E: rules (import)", () => { }, { target: "antigravity-cli", - sourcePath: "GEMINI.md", + sourcePath: "AGENTS.md", importedFileName: "overview.md", }, { diff --git a/src/features/rules/antigravity-cli-rule.test.ts b/src/features/rules/antigravity-cli-rule.test.ts index 234db3600..109d61f92 100644 --- a/src/features/rules/antigravity-cli-rule.test.ts +++ b/src/features/rules/antigravity-cli-rule.test.ts @@ -35,11 +35,11 @@ describe("AntigravityCliRule", () => { }); describe("getSettablePaths", () => { - it("should return root GEMINI.md and nonRoot .agents/rules for project scope", () => { + it("should return root AGENTS.md and nonRoot .agents/rules for project scope", () => { const paths = AntigravityCliRule.getSettablePaths(); expect(paths.root.relativeDirPath).toBe("."); - expect(paths.root.relativeFilePath).toBe("GEMINI.md"); + expect(paths.root.relativeFilePath).toBe("AGENTS.md"); const nonRoot = (paths as { nonRoot: { relativeDirPath: string } }).nonRoot; expect(nonRoot.relativeDirPath).toBe(join(".agents", "rules")); }); @@ -53,7 +53,7 @@ describe("AntigravityCliRule", () => { }); describe("fromRulesyncRule", () => { - it("should place a root rule in root GEMINI.md", () => { + it("should place a root rule in root AGENTS.md", () => { const rulesyncRule = new RulesyncRule({ relativeDirPath: RULESYNC_RELATIVE_DIR_PATH, relativeFilePath: "overview.md", @@ -69,7 +69,7 @@ describe("AntigravityCliRule", () => { expect(cliRule).toBeInstanceOf(AntigravityCliRule); expect(cliRule.getRelativeDirPath()).toBe("."); - expect(cliRule.getRelativeFilePath()).toBe("GEMINI.md"); + expect(cliRule.getRelativeFilePath()).toBe("AGENTS.md"); expect(cliRule.isRoot()).toBe(true); expect(cliRule.getFileContent().trim()).toBe("# Root Memory\n\nPlain body."); }); diff --git a/src/features/rules/antigravity-cli-rule.ts b/src/features/rules/antigravity-cli-rule.ts index 010090556..b487915ca 100644 --- a/src/features/rules/antigravity-cli-rule.ts +++ b/src/features/rules/antigravity-cli-rule.ts @@ -3,6 +3,7 @@ import { join } from "node:path"; import { ANTIGRAVITY_AGENTS_DIR, ANTIGRAVITY_GEMINI_DIR, + ANTIGRAVITY_GLOBAL_RULE_FILE_NAME, ANTIGRAVITY_RULE_FILE_NAME, } from "../../constants/antigravity-cli-paths.js"; import { readFileContent } from "../../utils/file.js"; @@ -34,10 +35,11 @@ export type AntigravityCliRuleSettablePathsGlobal = ToolRuleSettablePathsGlobal; * successor in Antigravity 2.0). * * The CLI reads the same plain-markdown context files as Gemini CLI — a root - * `GEMINI.md` plus non-root memory files in `.agents/rules/` — so this class + * context file plus non-root memory files in `.agents/rules/` — so this class * mirrors {@link GeminiCliRule} but points at the new `.agents/` tree. * - * - Project scope: root `GEMINI.md`; non-root `.agents/rules/*.md`. + * - Project scope: root `AGENTS.md` (the cross-tool standard, matching + * `antigravity-ide`); non-root `.agents/rules/*.md`. * - Global scope: a single plain `~/.gemini/GEMINI.md` (shared with the IDE). */ export class AntigravityCliRule extends ToolRule { @@ -52,7 +54,7 @@ export class AntigravityCliRule extends ToolRule { return { root: { relativeDirPath: buildToolPath(ANTIGRAVITY_GEMINI_DIR, ".", excludeToolDir), - relativeFilePath: ANTIGRAVITY_RULE_FILE_NAME, + relativeFilePath: ANTIGRAVITY_GLOBAL_RULE_FILE_NAME, }, }; } diff --git a/src/features/rules/rules-processor.ts b/src/features/rules/rules-processor.ts index 5cce0598f..4dbb7e69e 100644 --- a/src/features/rules/rules-processor.ts +++ b/src/features/rules/rules-processor.ts @@ -294,7 +294,8 @@ export const toolRuleFactories = new Map