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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ See [Quick Start guide](https://dyoshikawa.github.io/rulesync/getting-started/qu
| Windsurf | windsurf | ✅ | ✅ | | | | ✅ 🌏 | | |
| Warp | warp | ✅ | | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | | |
| Pi Coding Agent | pi | ✅ 🌏 | | | ✅ 🌏 | | ✅ 🌏 | | |
| Zed | zed | | ✅ | | | | | | |

- ✅: Supports project mode
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ antigravity: # antigravity specific parameters
turbo: true # (Optional, default: true) Append // turbo for auto-execution
takt: # takt specific parameters (optional; emitted under .takt/facets/instructions/)
name: "renamed-stem" # (optional) override the emitted filename stem (no path separators or "..")
pi: # pi coding agent specific parameters (optional)
argument-hint: "[message]" # Hint shown in Pi's command palette
---

target_pr = $ARGUMENTS
Expand Down
1 change: 1 addition & 0 deletions docs/reference/supported-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
| Windsurf | windsurf | ✅ | ✅ | | | | ✅ 🌏 | | |
| Warp | warp | ✅ | | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | | |
| Pi Coding Agent | pi | ✅ 🌏 | | | ✅ 🌏 | | ✅ 🌏 | | |
| Zed | zed | | ✅ | | | | | | |

- ✅: Supports project mode
Expand Down
2 changes: 2 additions & 0 deletions skills/rulesync/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ antigravity: # antigravity specific parameters
turbo: true # (Optional, default: true) Append // turbo for auto-execution
takt: # takt specific parameters (optional; emitted under .takt/facets/instructions/)
name: "renamed-stem" # (optional) override the emitted filename stem (no path separators or "..")
pi: # pi coding agent specific parameters (optional)
argument-hint: "[message]" # Hint shown in Pi's command palette
---

target_pr = $ARGUMENTS
Expand Down
1 change: 1 addition & 0 deletions skills/rulesync/supported-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
| Windsurf | windsurf | ✅ | ✅ | | | | ✅ 🌏 | | |
| Warp | warp | ✅ | | | | | | | |
| Replit | replit | ✅ | | | | | ✅ | | |
| Pi Coding Agent | pi | ✅ 🌏 | | | ✅ 🌏 | | ✅ 🌏 | | |
| Zed | zed | | ✅ | | | | | | |

- ✅: Supports project mode
Expand Down
7 changes: 6 additions & 1 deletion src/cli/commands/gitignore-entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const GITIGNORE_ENTRY_REGISTRY: ReadonlyArray<GitignoreEntryTag> = [
{ target: "common", feature: "general", entry: "**/AGENTS.local.md" },

// AGENTS.md
{ target: "agentsmd", feature: "rules", entry: "**/AGENTS.md" },
{ target: ["agentsmd", "pi"], feature: "rules", entry: "**/AGENTS.md" },
{ target: "agentsmd", feature: "rules", entry: "**/.agents/" },

// Augment Code
Expand Down Expand Up @@ -194,6 +194,11 @@ export const GITIGNORE_ENTRY_REGISTRY: ReadonlyArray<GitignoreEntryTag> = [
entry: "**/.opencode/package-lock.json",
},

// Pi Coding Agent
{ target: "pi", feature: "rules", entry: "**/.agents/memories/" },
{ target: "pi", feature: "commands", entry: "**/.pi/prompts/" },
{ target: "pi", feature: "skills", entry: "**/.pi/skills/" },

// Qwen Code
{ target: "qwencode", feature: "rules", entry: "**/QWEN.md" },
{ target: "qwencode", feature: "general", entry: "**/.qwen/memories/" },
Expand Down
4 changes: 4 additions & 0 deletions src/e2e/e2e-commands.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe("E2E: commands", () => {
{ target: "antigravity", outputPath: join(".agent", "workflows", "review-pr.md") },
{ target: "junie", outputPath: join(".junie", "commands", "review-pr.md") },
{ target: "takt", outputPath: join(".takt", "facets", "instructions", "review-pr.md") },
{ target: "pi", outputPath: join(".pi", "prompts", "review-pr.md") },
])("should generate $target commands", async ({ target, outputPath }) => {
const testDir = getTestDir();

Expand Down Expand Up @@ -90,6 +91,7 @@ Check the PR diff and provide feedback.
{ target: "kiro", orphanPath: join(".kiro", "prompts", "orphan.md") },
{ target: "antigravity", orphanPath: join(".agent", "workflows", "orphan.md") },
{ target: "junie", orphanPath: join(".junie", "commands", "orphan.md") },
{ target: "pi", orphanPath: join(".pi", "prompts", "orphan.md") },
])(
"should fail in check mode when delete would remove an orphan $target command file",
async ({ target, orphanPath }) => {
Expand Down Expand Up @@ -132,6 +134,7 @@ describe("E2E: commands (import)", () => {
{ target: "kiro", sourcePath: join(".kiro", "prompts", "review-pr.md") },
{ target: "antigravity", sourcePath: join(".agent", "workflows", "review-pr.md") },
{ target: "junie", sourcePath: join(".junie", "commands", "review-pr.md") },
{ target: "pi", sourcePath: join(".pi", "prompts", "review-pr.md") },
])("should import $target commands", async ({ target, sourcePath }) => {
const testDir = getTestDir();

Expand Down Expand Up @@ -163,6 +166,7 @@ describe("E2E: commands (global mode)", () => {
target: "takt",
outputPath: join(".takt", "facets", "instructions", "review-pr.md"),
},
{ target: "pi", outputPath: join(".pi", "agent", "prompts", "review-pr.md") },
])("should generate $target commands in home directory", async ({ target, outputPath }) => {
const projectDir = getProjectDir();
const homeDir = getHomeDir();
Expand Down
3 changes: 3 additions & 0 deletions src/e2e/e2e-rules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe("E2E: rules", () => {
{ target: "junie", outputPath: join(".junie", "guidelines.md") },
{ target: "warp", outputPath: "WARP.md" },
{ target: "replit", outputPath: "replit.md" },
{ target: "pi", outputPath: "AGENTS.md" },
])("should generate $target rules", async ({ target, outputPath }) => {
const testDir = getTestDir();

Expand Down Expand Up @@ -202,6 +203,7 @@ describe("E2E: rules (import)", () => {
},
{ target: "warp", sourcePath: "WARP.md", importedFileName: "overview.md" },
{ target: "replit", sourcePath: "replit.md", importedFileName: "overview.md" },
{ target: "pi", sourcePath: "AGENTS.md", importedFileName: "overview.md" },
{
target: "cline",
sourcePath: join(".clinerules", "overview.md"),
Expand Down Expand Up @@ -264,6 +266,7 @@ describe("E2E: rules (global mode)", () => {
{ target: "kilo", outputPath: join(".config", "kilo", "AGENTS.md") },
{ target: "rovodev", outputPath: join(".rovodev", "AGENTS.md") },
{ target: "takt", outputPath: join(".takt", "facets", "policies", "overview.md") },
{ target: "pi", outputPath: join(".pi", "agent", "AGENTS.md") },
])("should generate $target rules in home directory", async ({ target, outputPath }) => {
const projectDir = getProjectDir();
const homeDir = getHomeDir();
Expand Down
10 changes: 10 additions & 0 deletions src/e2e/e2e-skills.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ describe("E2E: skills", () => {
target: "takt",
outputPath: join(".takt", "facets", "knowledge", "test-skill.md"),
},
{
target: "pi",
outputPath: join(".pi", "skills", "test-skill", "SKILL.md"),
},
])("should generate $target skills", async ({ target, outputPath }) => {
const testDir = getTestDir();

Expand Down Expand Up @@ -154,6 +158,7 @@ This is the test skill body content.
{ target: "junie", orphanPath: join(".junie", "skills", "orphan-skill", "SKILL.md") },
{ target: "replit", orphanPath: join(".agents", "skills", "orphan-skill", "SKILL.md") },
{ target: "agentsskills", orphanPath: join(".agents", "skills", "orphan-skill", "SKILL.md") },
{ target: "pi", orphanPath: join(".pi", "skills", "orphan-skill", "SKILL.md") },
])(
"should fail in check mode when delete would remove an orphan $target skill file",
async ({ target, orphanPath }) => {
Expand Down Expand Up @@ -202,6 +207,7 @@ describe("E2E: skills (import)", () => {
{ target: "antigravity", sourcePath: join(".agent", "skills", "test-skill", "SKILL.md") },
{ target: "junie", sourcePath: join(".junie", "skills", "test-skill", "SKILL.md") },
{ target: "replit", sourcePath: join(".agents", "skills", "test-skill", "SKILL.md") },
{ target: "pi", sourcePath: join(".pi", "skills", "test-skill", "SKILL.md") },
])("should import $target skills", async ({ target, sourcePath }) => {
const testDir = getTestDir();

Expand Down Expand Up @@ -273,6 +279,10 @@ describe("E2E: skills (global mode)", () => {
target: "takt",
outputPath: join(".takt", "facets", "knowledge", "test-skill.md"),
},
{
target: "pi",
outputPath: join(".pi", "agent", "skills", "test-skill", "SKILL.md"),
},
])("should generate $target skills in home directory", async ({ target, outputPath }) => {
const projectDir = getProjectDir();
const homeDir = getHomeDir();
Expand Down
3 changes: 3 additions & 0 deletions src/features/commands/commands-processor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ describe("CommandsProcessor", () => {
"kilo",
"kiro",
"opencode",
"pi",
"roo",
"takt",
]),
Expand All @@ -1158,6 +1159,7 @@ describe("CommandsProcessor", () => {
"kilo",
"kiro",
"opencode",
"pi",
"roo",
"takt",
]),
Expand All @@ -1179,6 +1181,7 @@ describe("CommandsProcessor", () => {
"codexcli",
"kilo",
"opencode",
"pi",
"takt",
]),
);
Expand Down
15 changes: 15 additions & 0 deletions src/features/commands/commands-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { JunieCommand } from "./junie-command.js";
import { KiloCommand } from "./kilo-command.js";
import { KiroCommand } from "./kiro-command.js";
import { OpenCodeCommand } from "./opencode-command.js";
import { PiCommand } from "./pi-command.js";
import { RooCommand } from "./roo-command.js";
import { RulesyncCommand } from "./rulesync-command.js";
import { TaktCommand } from "./takt-command.js";
Expand Down Expand Up @@ -78,6 +79,7 @@ const commandsProcessorToolTargetTuple = [
"kilo",
"kiro",
"opencode",
"pi",
"roo",
"takt",
] as const;
Expand Down Expand Up @@ -274,6 +276,19 @@ const toolCommandFactories = new Map<CommandsProcessorToolTarget, ToolCommandFac
},
},
],
[
"pi",
{
class: PiCommand,
meta: {
extension: "md",
supportsProject: true,
supportsGlobal: true,
isSimulated: false,
supportsSubdirectory: false,
},
},
],
[
"roo",
{
Expand Down
Loading
Loading