Skip to content
Closed
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
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,30 @@ See [Quick Start guide](https://dyoshikawa.github.io/rulesync/getting-started/qu

## Supported Tools and Features

| Tool | --targets | rules | ignore | mcp | commands | subagents | skills | hooks |
| ------------------ | ------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: |
| AGENTS.md | agentsmd | ✅ | | | 🎮 | 🎮 | 🎮 | |
| AgentsSkills | agentsskills | | | | | | ✅ | |
| Claude Code | claudecode | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| Codex CLI | codexcli | ✅ 🌏 | | ✅ 🌏 🔧 | 🌏 | ✅ | ✅ 🌏 | |
| Gemini CLI | geminicli | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | ✅ 🌏 | ✅ 🌏 |
| Goose | goose | ✅ 🌏 | ✅ | | | | | |
| GitHub Copilot | copilot | ✅ 🌏 | | ✅ | ✅ | ✅ | ✅ | ✅ |
| Cursor | cursor | ✅ | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Factory Droid | factorydroid | ✅ 🌏 | | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| OpenCode | opencode | ✅ 🌏 | | ✅ 🌏 🔧 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| Cline | cline | ✅ | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | |
| Kilo Code | kilo | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | |
| Roo Code | roo | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 | |
| Qwen Code | qwencode | ✅ | ✅ | | | | | |
| Kiro | kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Google Antigravity | antigravity | ✅ | | | ✅ | | ✅ 🌏 | |
| JetBrains Junie | junie | ✅ | ✅ | ✅ | ✅ 🌏 | ✅ | ✅ | |
| AugmentCode | augmentcode | ✅ | ✅ | | | | | |
| Windsurf | windsurf | ✅ | ✅ | | | | | |
| Warp | warp | ✅ | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | |
| Zed | zed | | ✅ | | | | | |
| Tool | --targets | rules | ignore | mcp | commands | subagents | skills | hooks | permissions |
| ------------------ | ------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: | :---------: |
| AGENTS.md | agentsmd | ✅ | | | 🎮 | 🎮 | 🎮 | | |
| AgentsSkills | agentsskills | | | | | | ✅ | | |
| Claude Code | claudecode | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Codex CLI | codexcli | ✅ 🌏 | | ✅ 🌏 🔧 | 🌏 | ✅ | ✅ 🌏 | | ✅ |
| Gemini CLI | geminicli | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | ✅ 🌏 | ✅ 🌏 | |
| Goose | goose | ✅ 🌏 | ✅ | | | | | | |
| GitHub Copilot | copilot | ✅ 🌏 | | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Cursor | cursor | ✅ | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ | |
| Factory Droid | factorydroid | ✅ 🌏 | | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | |
| OpenCode | opencode | ✅ 🌏 | | ✅ 🌏 🔧 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Cline | cline | ✅ | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | | |
| Kilo Code | kilo | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | | |
| Roo Code | roo | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 | | |
| Qwen Code | qwencode | ✅ | ✅ | | | | | | |
| Kiro | kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | |
| Google Antigravity | antigravity | ✅ | | | ✅ | | ✅ 🌏 | | |
| JetBrains Junie | junie | ✅ | ✅ | ✅ | ✅ 🌏 | ✅ | ✅ | | |
| AugmentCode | augmentcode | ✅ | ✅ | | | | | | |
| Windsurf | windsurf | ✅ | ✅ | | | | | | |
| Warp | warp | ✅ | | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | | |
| Zed | zed | | ✅ | | | | | | |

- ✅: Supports project mode
- 🌏: Supports global mode
Expand Down
45 changes: 45 additions & 0 deletions docs/reference/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,51 @@ You can control which individual tools from an MCP server are enabled or disable
- `enabledTools`: An array of tool names that should be explicitly enabled for this server.
- `disabledTools`: An array of tool names that should be explicitly disabled for this server.

## `.rulesync/permissions.json`

Permissions define tool-level access controls (allow/ask/deny) for AI coding tools. Each entry specifies a tool, a pattern, and an action.

- **Supported targets:** Claude Code (`claudecode`), OpenCode (`opencode`), Codex CLI (`codexcli`)
- Codex CLI only supports `bash` tool permissions; non-bash entries are skipped with a warning.
Comment thread
dyoshikawa-claw marked this conversation as resolved.

Example:

```json
{
"$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/permissions-schema.json",
"permissions": [
{ "tool": "bash", "pattern": ["npm", "*"], "action": "allow" },
{ "tool": "bash", "pattern": ["rm", "-rf", "*"], "action": "deny" },
{ "tool": "read", "pattern": ["*", ".env"], "action": "ask" },
{ "tool": "read", "pattern": ["src", "**"], "action": "allow" },
{ "tool": "edit", "pattern": ["src", "**"], "action": "allow" }
]
}
```

**Fields:**

- `tool`: Canonical tool name (`bash`, `read`, `edit`, `write`, `webfetch`, `grep`, `glob`, or MCP tool names with `mcp__` prefix)
- `pattern`: Array of pattern segments. For `bash`, segments are space-separated (e.g., `["npm", "*"]` → `npm *`). For file path tools, segments are `/`-separated (e.g., `["src", "**"]` → `src/**`).
- `action`: One of `allow`, `ask`, or `deny`

**Tool-specific output:**

- **Claude Code** (`.claude/settings.json`): Stored as `{ "permissions": { "allow": ["Bash(npm *)"], "deny": ["Bash(rm -rf *)"] } }` with PascalCase tool names
- **OpenCode** (`opencode.json`): Stored as `{ "permission": { "bash": { "npm *": "allow" } } }` with lowercase tool names
Comment thread
dyoshikawa-claw marked this conversation as resolved.
- **Codex CLI** (`.codex/config.toml`): Stored as TOML `rules.prefix_rules` with action mappings (`allow` → `allow`, `ask` → `prompt`, `deny` → `forbidden`)

#### JSON Schema Support

Rulesync provides a JSON Schema for editor validation and autocompletion. Add the `$schema` property to your `.rulesync/permissions.json`:

```json
{
"$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/permissions-schema.json",
"permissions": []
}
```

## `.rulesync/.aiignore` or `.rulesyncignore`

Rulesync supports a single ignore list that can live in either location below:
Expand Down
48 changes: 24 additions & 24 deletions docs/reference/supported-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

Rulesync supports both **generation** and **import** for All of the major AI coding tools:

| Tool | --targets | rules | ignore | mcp | commands | subagents | skills | hooks |
| ------------------ | ------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: |
| AGENTS.md | agentsmd | ✅ | | | 🎮 | 🎮 | 🎮 | |
| AgentsSkills | agentsskills | | | | | | ✅ | |
| Claude Code | claudecode | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| Codex CLI | codexcli | ✅ 🌏 | | ✅ 🌏 🔧 | 🌏 | ✅ | ✅ 🌏 | |
| Gemini CLI | geminicli | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | ✅ 🌏 | ✅ 🌏 |
| GitHub Copilot | copilot | ✅ 🌏 | | ✅ | ✅ | ✅ | ✅ | ✅ |
| Goose | goose | ✅ 🌏 | ✅ | | | | | |
| Cursor | cursor | ✅ | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Factory Droid | factorydroid | ✅ 🌏 | | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| OpenCode | opencode | ✅ 🌏 | | ✅ 🌏 🔧 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
| Cline | cline | ✅ | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | |
| Kilo Code | kilo | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | |
| Roo Code | roo | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 | |
| Qwen Code | qwencode | ✅ | ✅ | | | | | |
| Kiro | kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Google Antigravity | antigravity | ✅ | | | ✅ | | ✅ 🌏 | |
| JetBrains Junie | junie | ✅ | ✅ | ✅ | ✅ 🌏 | ✅ | ✅ | |
| AugmentCode | augmentcode | ✅ | ✅ | | | | | |
| Windsurf | windsurf | ✅ | ✅ | | | | | |
| Warp | warp | ✅ | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | |
| Zed | zed | | ✅ | | | | | |
| Tool | --targets | rules | ignore | mcp | commands | subagents | skills | hooks | permissions |
| ------------------ | ------------ | :---: | :----: | :------: | :------: | :-------: | :----: | :---: | :---------: |
| AGENTS.md | agentsmd | ✅ | | | 🎮 | 🎮 | 🎮 | | |
| AgentsSkills | agentsskills | | | | | | ✅ | | |
| Claude Code | claudecode | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Codex CLI | codexcli | ✅ 🌏 | | ✅ 🌏 🔧 | 🌏 | ✅ | ✅ 🌏 | | ✅ |
| Gemini CLI | geminicli | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | ✅ 🌏 | ✅ 🌏 | |
Comment thread
dyoshikawa-claw marked this conversation as resolved.
| GitHub Copilot | copilot | ✅ 🌏 | | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Goose | goose | ✅ 🌏 | ✅ | | | | | | |
| Cursor | cursor | ✅ | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ | |
| Factory Droid | factorydroid | ✅ 🌏 | | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | |
| OpenCode | opencode | ✅ 🌏 | | ✅ 🌏 🔧 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 | ✅ |
| Cline | cline | ✅ | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | | |
| Kilo Code | kilo | ✅ 🌏 | ✅ | ✅ | ✅ 🌏 | | ✅ 🌏 | | |
| Roo Code | roo | ✅ | ✅ | ✅ | ✅ | 🎮 | ✅ 🌏 | | |
| Qwen Code | qwencode | ✅ | ✅ | | | | | | |
| Kiro | kiro | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | |
| Google Antigravity | antigravity | ✅ | | | ✅ | | ✅ 🌏 | | |
| JetBrains Junie | junie | ✅ | ✅ | ✅ | ✅ 🌏 | ✅ | ✅ | | |
| AugmentCode | augmentcode | ✅ | ✅ | | | | | | |
| Windsurf | windsurf | ✅ | ✅ | | | | | | |
| Warp | warp | ✅ | | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | | |
| Zed | zed | | ✅ | | | | | | |

- ✅: Supports project mode
- 🌏: Supports global mode
Expand Down
15 changes: 14 additions & 1 deletion scripts/generate-json-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { ConfigFileSchema } from "../src/config/config.js";
import {
RULESYNC_CONFIG_SCHEMA_URL,
RULESYNC_MCP_SCHEMA_URL,
RULESYNC_PERMISSIONS_SCHEMA_URL,
} from "../src/constants/rulesync-paths.js";
import { RulesyncMcpFileSchema } from "../src/features/mcp/rulesync-mcp.js";
import { RulesyncPermissionsFileSchema } from "../src/features/permissions/rulesync-permissions.js";

type SchemaMeta = {
$id: string;
Expand Down Expand Up @@ -56,5 +58,16 @@ generateSchema(
mcpOutputPath,
);

const permissionsOutputPath = join(process.cwd(), "permissions-schema.json");
generateSchema(
RulesyncPermissionsFileSchema,
{
$id: RULESYNC_PERMISSIONS_SCHEMA_URL,
title: "Rulesync Permissions Configuration",
description: "Permissions configuration file for Rulesync CLI tool",
},
permissionsOutputPath,
);

// Format generated schema files with oxfmt for consistent formatting
execFileSync("npx", ["oxfmt", outputPath, mcpOutputPath]);
execFileSync("npx", ["oxfmt", outputPath, mcpOutputPath, permissionsOutputPath]);
45 changes: 45 additions & 0 deletions skills/rulesync/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,51 @@ You can control which individual tools from an MCP server are enabled or disable
- `enabledTools`: An array of tool names that should be explicitly enabled for this server.
- `disabledTools`: An array of tool names that should be explicitly disabled for this server.

## `.rulesync/permissions.json`

Permissions define tool-level access controls (allow/ask/deny) for AI coding tools. Each entry specifies a tool, a pattern, and an action.

- **Supported targets:** Claude Code (`claudecode`), OpenCode (`opencode`), Codex CLI (`codexcli`)
- Codex CLI only supports `bash` tool permissions; non-bash entries are skipped with a warning.
Comment thread
dyoshikawa-claw marked this conversation as resolved.

Example:

```json
{
"$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/permissions-schema.json",
"permissions": [
{ "tool": "bash", "pattern": ["npm", "*"], "action": "allow" },
{ "tool": "bash", "pattern": ["rm", "-rf", "*"], "action": "deny" },
{ "tool": "read", "pattern": ["*", ".env"], "action": "ask" },
{ "tool": "read", "pattern": ["src", "**"], "action": "allow" },
{ "tool": "edit", "pattern": ["src", "**"], "action": "allow" }
]
}
```

**Fields:**

- `tool`: Canonical tool name (`bash`, `read`, `edit`, `write`, `webfetch`, `grep`, `glob`, or MCP tool names with `mcp__` prefix)
- `pattern`: Array of pattern segments. For `bash`, segments are space-separated (e.g., `["npm", "*"]` → `npm *`). For file path tools, segments are `/`-separated (e.g., `["src", "**"]` → `src/**`).
- `action`: One of `allow`, `ask`, or `deny`

**Tool-specific output:**

- **Claude Code** (`.claude/settings.json`): Stored as `{ "permissions": { "allow": ["Bash(npm *)"], "deny": ["Bash(rm -rf *)"] } }` with PascalCase tool names
- **OpenCode** (`opencode.json`): Stored as `{ "permission": { "bash": { "npm *": "allow" } } }` with lowercase tool names
Comment thread
dyoshikawa-claw marked this conversation as resolved.
- **Codex CLI** (`.codex/config.toml`): Stored as TOML `rules.prefix_rules` with action mappings (`allow` → `allow`, `ask` → `prompt`, `deny` → `forbidden`)

#### JSON Schema Support

Rulesync provides a JSON Schema for editor validation and autocompletion. Add the `$schema` property to your `.rulesync/permissions.json`:

```json
{
"$schema": "https://github.com/dyoshikawa/rulesync/releases/latest/download/permissions-schema.json",
"permissions": []
}
```

## `.rulesync/.aiignore` or `.rulesyncignore`

Rulesync supports a single ignore list that can live in either location below:
Expand Down
Loading
Loading