Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/agents/USER_AGENTS_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
```

---
Expand Down
7 changes: 5 additions & 2 deletions docs/guides/agent-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand All @@ -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

Expand Down
9 changes: 5 additions & 4 deletions docs/guides/agent-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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
```
Expand Down Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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 .`).

Expand Down
2 changes: 1 addition & 1 deletion docs/json-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down Expand Up @@ -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 |

Expand Down
2 changes: 1 addition & 1 deletion skills/rgctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions skills/rgctl/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ rgctl -r "$REPO" -f json <command> …
## 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`.
8 changes: 6 additions & 2 deletions src/cli/agent_pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> {
manifest.agents.iter().map(|a| a.id.clone()).collect()
Expand Down Expand Up @@ -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]
Expand Down
54 changes: 54 additions & 0 deletions tests/cli_output/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
29 changes: 28 additions & 1 deletion tests/install_skill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rewrite this test to use the supported flag:

install --skill --tools antigravity

Do not add regression coverage that exercises --host. We do not want to grow or validate the deprecated path for new adapters.

],
);
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");
Expand Down
2 changes: 1 addition & 1 deletion website/src/app/install/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function InstallPage() {
<TerminalBlock
lines={[
"rgctl --version",
"rgctl install --skill --with-commands --tools cursor,claude,codex,agents",
"rgctl install --skill --with-commands --tools cursor,claude,codex,antigravity,agents",
]}
/>
<p className="text-sm text-[var(--mute)]">
Expand Down