diff --git a/docs/agents/USER_AGENTS_TEMPLATE.md b/docs/agents/USER_AGENTS_TEMPLATE.md index f9146d4d..97d4a644 100644 --- a/docs/agents/USER_AGENTS_TEMPLATE.md +++ b/docs/agents/USER_AGENTS_TEMPLATE.md @@ -5,7 +5,7 @@ > **Preferred (automated):** install the agent pack instead of (or in addition to) pasting this file: > > ```bash -> rgctl -r "$REPO" install --skill --with-commands --tools cursor,claude,codex,agents +> rgctl -r "$REPO" install --skill --with-commands --tools cursor,claude,codex,antigravity,agents > ``` > > See [Agent commands](../guides/agent-commands.md). This template is a fallback / complementary channel — skills remain the canonical runtime guidance. @@ -28,7 +28,7 @@ Default for agents: spawn **`rgctl -f json`** subprocesses (or use foreground ** Install the agent pack once (limit `--tools` to the IDEs you use; default is all registry adapters): ```bash -rgctl -r "$REPO" install --skill --with-commands --tools cursor,claude,codex,agents +rgctl -r "$REPO" install --skill --with-commands --tools cursor,claude,codex,antigravity,agents ``` --- diff --git a/docs/guides/agent-commands.md b/docs/guides/agent-commands.md index 5da7bfa1..cd00863d 100644 --- a/docs/guides/agent-commands.md +++ b/docs/guides/agent-commands.md @@ -31,7 +31,7 @@ You must pass at least one of **`--skill`** or **`--with-policy`**. | **`--skill`** | Meta skill **`rgctl`** (router + `references/`) and eight workflow skills: `rgctl-discover`, `rgctl-impact`, `rgctl-flow`, `rgctl-search`, `rgctl-gql`, `rgctl-migrate`, `rgctl-kantra`, `rgctl-gate`. | | **`--with-commands`** | Chat slash commands / prompts per adapter (e.g. Cursor `/rgctl-gql`, Claude `/rgctl:gql`). Use with **`--skill`** for the full experience. | | **`--with-policy`** | Structural bias snippet (e.g. `.cursor/rules/rgctl-structural.mdc`). Optional; does not replace skills. | -| **`--tools id1,id2`** or **`--tools all`** | Which **registry adapters** receive files. **Default (omit flag):** `cursor`, `claude`, `codex`, `agents` (v1 quad). **`all`** = full registry (~40 products). Unknown ids: stderr warning; if none valid, exit **1**. | +| **`--tools id1,id2`** or **`--tools all`** | Which **registry adapters** receive files. **Default (omit flag):** `cursor`, `claude`, `codex`, `agents`, `antigravity`. **`all`** = full registry (~40 products). Unknown ids: stderr warning; if none valid, exit **1**. | | **`-g` / `--global`** | Install under your **home** (e.g. `~/.cursor/skills/…`) instead of repo-local paths. Only agents with `supports_global: true` in the registry (see `--list-agents`). | | **`--list-agents`** | Print the registry table and exit (no install). | | **`--force`** | Overwrite rgctl-managed files that differ from the bundled version. | @@ -43,11 +43,14 @@ You must pass at least one of **`--skill`** or **`--with-policy`**. cd /path/to/your-app # Skills + slash commands for common IDEs (repo-local) -rgctl install --skill --with-commands --tools cursor,claude,codex,agents +rgctl install --skill --with-commands --tools cursor,claude,codex,antigravity,agents # Cursor only rgctl install --skill --with-commands --tools cursor +# Antigravity only +rgctl install --skill --with-commands --tools antigravity + # Full registry (many dot-directories) rgctl install --skill --with-commands --tools all diff --git a/docs/guides/agent-skill.md b/docs/guides/agent-skill.md index 72f64e40..c1c4b7d5 100644 --- a/docs/guides/agent-skill.md +++ b/docs/guides/agent-skill.md @@ -2,9 +2,9 @@ ## Introduction -The rgctl **agent skill** is a structured instruction set that teaches AI coding agents (Claude Code, Codex, Cursor) how to use the rgctl CLI to answer structural questions about a codebase. When installed into a repository, the skill gives your agent the ability to automatically map natural-language questions to the right rgctl commands, interpret the results, and report findings -- all without the developer needing to know the CLI syntax. +The rgctl **agent skill** is a structured instruction set that teaches AI coding agents (Claude Code, Antigravity, Codex, Cursor) how to use the rgctl CLI to answer structural questions about a codebase. When installed into a repository, the skill gives your agent the ability to automatically map natural-language questions to the right rgctl commands, interpret the results, and report findings -- all without the developer needing to know the CLI syntax. -The **agent pack** embeds skills and optional chat commands into the `rgctl` binary. `rgctl install` copies them into per-product paths (`.cursor/skills/rgctl/`, `.claude/skills/rgctl/`, `.agents/skills/rgctl/`, OpenCode, Pi, … — see [Agent commands](agent-commands.md)). You get a **meta skill** `rgctl`, eight **workflow skills** (`rgctl-discover`, `rgctl-gql`, …), and with `--with-commands` slash/prompt files that map to the same workflows. No external downloads. Once installed, the agent follows a structured loop: parse the question, route to the right workflow or CLI command, run `rgctl -f json`, summarize results. +The **agent pack** embeds skills and optional chat commands into the `rgctl` binary. `rgctl install` copies them into per-product paths (`.cursor/skills/rgctl/`, `.claude/skills/rgctl/`, `.agents/skills/rgctl/`, `.agent/skills/rgctl/`, OpenCode, Pi, … — see [Agent commands](agent-commands.md)). You get a **meta skill** `rgctl`, eight **workflow skills** (`rgctl-discover`, `rgctl-gql`, …), and with `--with-commands` slash/prompt files that map to the same workflows. No external downloads. Once installed, the agent follows a structured loop: parse the question, route to the right workflow or CLI command, run `rgctl -f json`, summarize results. The skill turns rgctl from a CLI tool into an **always-available architectural advisor** inside your editor. @@ -47,7 +47,7 @@ rgctl -r example/coolstore discover --with-cfg Install the rgctl agent skill into your repository: ```bash -rgctl -r example/coolstore install --skill --with-commands --tools cursor,claude,codex,agents +rgctl -r example/coolstore install --skill --with-commands --tools cursor,claude,codex,antigravity,agents ``` Text mode lists each created or updated path. Typical layout (Cursor example): @@ -121,6 +121,7 @@ Limit adapters with **`--tools`** (comma-separated registry ids): ```bash rgctl -r example/coolstore install --skill --with-commands --tools claude rgctl -r example/coolstore install --skill --with-commands --tools codex,agents +rgctl -r example/coolstore install --skill --with-commands --tools antigravity rgctl -r example/coolstore install --skill --with-commands --tools cursor rgctl install --list-agents # all ids and paths ``` @@ -503,7 +504,7 @@ See **[Agent commands](agent-commands.md)** for the full table. Summary: | `--skill` | Meta `rgctl` + eight workflow skills (required for skills unless only `--with-policy`) | | `--with-commands` | Slash / prompt files per adapter | | `--with-policy` | Cursor structural rule snippet | -| `--tools` | Registry ids or `all` (**default:** `cursor`, `claude`, `codex`, `agents`) | +| `--tools` | Registry ids or `all` (**default:** `cursor`, `claude`, `codex`, `agents`, `antigravity`) | | `-g` / `--global` | User home instead of repo | | `--force` | Overwrite differing rgctl-managed files | | `--list-agents` | Print registry; no install | diff --git a/docs/installation.md b/docs/installation.md index 94104845..aa6c9ed1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -224,7 +224,7 @@ rgctl migrate-cache --name coolstore --force # explicit cache name After `rgctl` is on your PATH, install the **embedded agent pack** into the **target repository** (same root you use for `discover`): ```bash -rgctl install --skill --with-commands --tools cursor,claude,codex,agents +rgctl install --skill --with-commands --tools cursor,claude,codex,antigravity,agents rgctl -r /path/to/repo install --skill --with-commands --tools cursor rgctl install --list-agents ``` @@ -236,7 +236,7 @@ This copies from the binary (no network): - **Optional chat commands** — with `--with-commands` (e.g. `.cursor/commands/rgctl-gql.md`, Claude `/rgctl:gql` files) - **Optional policy** — `--with-policy` (Cursor structural rule snippet) -Default **`--tools`** (omit flag) is **`cursor`, `claude`, `codex`, `agents`**. Use **`--tools all`** for the full registry (~40 paths). Unknown tool ids warn on stderr; **`--global`** requires `supports_global: true` per agent. **`--host`** is deprecated. Use **`-g`** for a global install under your home directory. If a managed file differs from the bundle, the command exits **1** unless you pass **`--force`**. +Default **`--tools`** (omit flag) is **`cursor`, `claude`, `codex`, `agents`, `antigravity`**. Use **`--tools all`** for the full registry (~40 paths). Unknown tool ids warn on stderr; **`--global`** requires `supports_global: true` per agent. **`--host`** is deprecated. Use **`-g`** for a global install under your home directory. If a managed file differs from the bundle, the command exits **1** unless you pass **`--force`**. Install does **not** run `discover` — index the repo separately (`rgctl discover .`). diff --git a/docs/json-api.md b/docs/json-api.md index b6eef093..1c93c1d2 100644 --- a/docs/json-api.md +++ b/docs/json-api.md @@ -1091,7 +1091,7 @@ rgctl -r "$REPO" -f json install --skill [--with-commands] [--with-policy] \ rgctl -f json install --list-agents ``` -Omitting **`--tools`** installs the **v1 default** adapters: `cursor`, `claude`, `codex`, `agents`. Use **`--tools all`** for every registry entry. Unknown ids in `--tools` are reported on stderr; if none are valid, exit **1**. **`--global`** is rejected for agents with `supports_global: false` in the registry. +Omitting **`--tools`** installs the default adapters: `cursor`, `claude`, `codex`, `agents`, `antigravity`. Use **`--tools all`** for every registry entry. Unknown ids in `--tools` are reported on stderr; if none are valid, exit **1**. **`--global`** is rejected for agents with `supports_global: false` in the registry. ### `install --list-agents` diff --git a/docs/user-guide.md b/docs/user-guide.md index 57e21a0a..6327739b 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -100,7 +100,7 @@ rgctl -r /path/to/repo install --skill --with-commands rgctl install --list-agents ``` -That writes workflow skills (`rgctl-discover`, `rgctl-migrate`, `rgctl-kantra`, …), meta-skill `rgctl`, and optional slash commands. **Default (no `--tools`):** `cursor`, `claude`, `codex`, `agents`. Use **`--tools all`** for the full registry. +That writes workflow skills (`rgctl-discover`, `rgctl-migrate`, `rgctl-kantra`, …), meta-skill `rgctl`, and optional slash commands. **Default (no `--tools`):** `cursor`, `claude`, `codex`, `agents`, `antigravity`. Use **`--tools all`** for the full registry. Full flag reference, adapter paths, and workflow ↔ CLI table: **[Agent commands](guides/agent-commands.md)**. Walkthrough: [Agent skill](guides/agent-skill.md). Add `--with-policy` for a Cursor structural-rules snippet. Use `-g` for a global install. Exit code **1** if a managed file differs unless you pass `--force`. Install does not run `discover`. @@ -1240,7 +1240,7 @@ Migration hints (with `--export-migration-hints`) land under `.rgctl/migration_p | `metrics` | PageRank, betweenness, communities summary | | `export` | Serialize graph (json, graphml, dot, mermaid, obsidian vault, okf) | | `check` | CI policy gateway | -| `install` | Copy the bundled agent skill into `.claude/skills/`, `.agents/skills/`, and `.cursor/skills/` | +| `install` | Copy the bundled agent skill into `.claude/skills/`, `.agents/skills/`, `.agent/skills/`, and `.cursor/skills/` | | `semantic` | Opt-in semantic index + query (`--scope community`, `docs`, `all`) | | `serve` | HTTP dashboard + `/api/query` + `/api/status` (auto full pipeline); `--no-pipeline` fail-fast | diff --git a/skills/rgctl/README.md b/skills/rgctl/README.md index 88b1db3b..e89e7fdc 100644 --- a/skills/rgctl/README.md +++ b/skills/rgctl/README.md @@ -88,7 +88,7 @@ skills/rgctl/ From a target repository (not the rgctl source tree unless you are dogfooding): ```bash -rgctl install --skill --with-commands --tools cursor,claude,codex,agents +rgctl install --skill --with-commands --tools cursor,claude,codex,antigravity,agents ``` Installs meta skill `rgctl`, workflow skills (`rgctl-discover`, …), and optional slash commands per adapter. See [Agent commands guide](../../docs/guides/agent-commands.md). diff --git a/skills/rgctl/SKILL.md b/skills/rgctl/SKILL.md index 5e91d02e..23d0f3ee 100644 --- a/skills/rgctl/SKILL.md +++ b/skills/rgctl/SKILL.md @@ -220,7 +220,7 @@ rgctl -r "$REPO" -f json … ## Installation ```bash -rgctl install --skill --with-commands --tools cursor,claude,codex,agents +rgctl install --skill --with-commands --tools cursor,claude,codex,antigravity,agents ``` -Installs workflow skills (`rgctl-discover`, `rgctl-migrate`, `rgctl-kantra`, …), meta-skill `rgctl`, and slash commands for each selected adapter. Omitting `--tools` installs **cursor, claude, codex, agents**; use `--tools all` for the full registry. See [docs/guides/agent-commands.md](../../docs/guides/agent-commands.md). Workflow source: `skills/rgctl/workflows/`; keep `references/workflows.md` in sync via `cargo test -p rgctl-agent-pack-codegen workflows_reference_matches_fragments`. +Installs workflow skills (`rgctl-discover`, `rgctl-migrate`, `rgctl-kantra`, …), meta-skill `rgctl`, and slash commands for each selected adapter. Omitting `--tools` installs **cursor, claude, codex, agents, antigravity**; use `--tools all` for the full registry. See [docs/guides/agent-commands.md](../../docs/guides/agent-commands.md). Workflow source: `skills/rgctl/workflows/`; keep `references/workflows.md` in sync via `cargo test -p rgctl-agent-pack-codegen workflows_reference_matches_fragments`. diff --git a/src/cli/agent_pack.rs b/src/cli/agent_pack.rs index 00b2a4ec..0558239f 100644 --- a/src/cli/agent_pack.rs +++ b/src/cli/agent_pack.rs @@ -253,7 +253,8 @@ pub fn bundle_bytes(bundle_rel: &Path) -> Option<&[u8]> { } /// Default install targets when `--tools` is omitted (phased v1 per #84). -pub const DEFAULT_INSTALL_AGENTS: &[&str] = &["cursor", "claude", "codex", "agents"]; +pub const DEFAULT_INSTALL_AGENTS: &[&str] = + &["cursor", "claude", "codex", "agents", "antigravity"]; pub fn all_agent_ids(manifest: &PackManifest) -> Vec { manifest.agents.iter().map(|a| a.id.clone()).collect() @@ -354,7 +355,10 @@ mod tests { fn default_install_agents_are_v1_quad() { let m = load_manifest().expect("manifest"); let ids = default_agent_ids(&m); - assert_eq!(ids, ["cursor", "claude", "codex", "agents"]); + assert_eq!( + ids, + ["cursor", "claude", "codex", "agents", "antigravity"] + ); } #[test] diff --git a/tests/cli_output/install.rs b/tests/cli_output/install.rs index 64fac708..63f90211 100644 --- a/tests/cli_output/install.rs +++ b/tests/cli_output/install.rs @@ -41,3 +41,57 @@ fn test_install_json_schema_sanity() { assert_eq!(write.get("agent").and_then(|v| v.as_str()), Some("cursor")); assert_eq!(write.get("workflow").and_then(|v| v.as_str()), Some("gql")); } + +#[test] +fn test_install_json_schema_hosts_serialization() { + for (agent, expected) in [ + ("claude", "claude"), + ("codex", "codex"), + ("agents", "codex"), + ("cursor", "cursor"), + ] { + let host = rgctl::cli::install_output::host_compat(agent); + let response = build_install_response( + "/tmp/repo", + "local", + vec![agent.to_string()], + false, + false, + false, + vec![InstallWrite { + agent: agent.into(), + workflow: None, + kind: InstallWriteKind::Skill, + path: format!("/tmp/repo/skills/{expected}/SKILL.md"), + status: InstallWriteStatus::Created, + host, + }], + ); + let doc = serde_json::to_value(&response).expect("serialize install fixture"); + let writes = doc["writes"].as_array().expect("writes array"); + assert_eq!(writes[0]["host"].as_str(), Some(expected)); + } + + // Antigravity does not expand the legacy host schema; it serializes with agent only. + assert_eq!(rgctl::cli::install_output::host_compat("antigravity"), None); + let response = build_install_response( + "/tmp/repo", + "local", + vec!["antigravity".to_string()], + false, + false, + false, + vec![InstallWrite { + agent: "antigravity".into(), + workflow: None, + kind: InstallWriteKind::Skill, + path: "/tmp/repo/.agent/skills/rgctl/SKILL.md".into(), + status: InstallWriteStatus::Created, + host: rgctl::cli::install_output::host_compat("antigravity"), + }], + ); + let doc = serde_json::to_value(&response).expect("serialize install fixture"); + let writes = doc["writes"].as_array().expect("writes array"); + assert_eq!(writes[0]["agent"].as_str(), Some("antigravity")); + assert!(writes[0].get("host").is_none()); +} diff --git a/tests/install_skill.rs b/tests/install_skill.rs index 456f0ac8..96fde66d 100644 --- a/tests/install_skill.rs +++ b/tests/install_skill.rs @@ -240,7 +240,7 @@ fn install_opencode_and_pi_paths() { } #[test] -fn install_default_tools_is_v1_quad_not_opencode() { +fn install_default_tools_includes_antigravity() { let dir = tempfile::tempdir().expect("tempdir"); let repo = fs::canonicalize(dir.path()).expect("canonicalize"); let output = run_in( @@ -255,9 +255,36 @@ fn install_default_tools_is_v1_quad_not_opencode() { assert!(repo.join(".cursor/skills/rgctl/SKILL.md").is_file()); assert!(repo.join(".claude/skills/rgctl/SKILL.md").is_file()); assert!(repo.join(".agents/skills/rgctl/SKILL.md").is_file()); + assert!(repo.join(".agent/skills/rgctl/SKILL.md").is_file()); assert!(!repo.join(".opencode/skills/rgctl/SKILL.md").exists()); } +#[test] +fn install_tools_antigravity_writes_agent_directory_only() { + let dir = tempfile::tempdir().expect("tempdir"); + let repo = fs::canonicalize(dir.path()).expect("canonicalize"); + let output = run_in( + dir.path(), + &[ + "-r", + &repo.display().to_string(), + "install", + "--skill", + "--tools", + "antigravity", + ], + ); + assert!( + output.status.success(), + "stderr={}", + String::from_utf8_lossy(&output.stderr) + ); + assert!(repo.join(".agent/skills/rgctl/SKILL.md").is_file()); + assert!(!repo.join(".claude/skills/rgctl/SKILL.md").exists()); + assert!(!repo.join(".cursor/skills/rgctl/SKILL.md").exists()); + assert!(!repo.join(".agents/skills/rgctl/SKILL.md").exists()); +} + #[test] fn install_unknown_tools_exits_one() { let dir = tempfile::tempdir().expect("tempdir"); diff --git a/website/src/app/install/page.tsx b/website/src/app/install/page.tsx index 65ee85dd..037021c1 100644 --- a/website/src/app/install/page.tsx +++ b/website/src/app/install/page.tsx @@ -41,7 +41,7 @@ export default function InstallPage() {