rulesync 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,7 +62,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
62
62
  | Claude Code | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | ✅ 🌏 |
63
63
  | Codex CLI | ✅ 🌏 | | 🌏 | 🌏 | 🎮 |
64
64
  | Gemini CLI | ✅ 🌏 | ✅ | | ✅ 🌏 | 🎮 |
65
- | GitHub Copilot | ✅ | | ✅ | 🎮 | 🎮 |
65
+ | GitHub Copilot | ✅ | | ✅ || 🎮 |
66
66
  | Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | 🎮 |
67
67
  | OpenCode | ✅ | | | | |
68
68
  | Cline | ✅ | ✅ | ✅ | | |
package/dist/index.cjs CHANGED
@@ -96,7 +96,7 @@ var import_es_toolkit2 = require("es-toolkit");
96
96
 
97
97
  // src/commands/commands-processor.ts
98
98
  var import_node_path12 = require("path");
99
- var import_mini8 = require("zod/mini");
99
+ var import_mini9 = require("zod/mini");
100
100
 
101
101
  // src/utils/file.ts
102
102
  var import_node_fs = require("fs");
@@ -891,40 +891,111 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
891
891
 
892
892
  // src/commands/copilot-command.ts
893
893
  var import_node_path8 = require("path");
894
- var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
894
+ var import_mini6 = require("zod/mini");
895
+ var CopilotCommandFrontmatterSchema = import_mini6.z.object({
896
+ mode: import_mini6.z.literal("agent"),
897
+ description: import_mini6.z.string()
898
+ });
899
+ var CopilotCommand = class _CopilotCommand extends ToolCommand {
900
+ frontmatter;
901
+ body;
902
+ constructor({ frontmatter, body, ...rest }) {
903
+ if (rest.validate) {
904
+ const result = CopilotCommandFrontmatterSchema.safeParse(frontmatter);
905
+ if (!result.success) {
906
+ throw new Error(
907
+ `Invalid frontmatter in ${(0, import_node_path8.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${result.error.message}`
908
+ );
909
+ }
910
+ }
911
+ super({
912
+ ...rest,
913
+ fileContent: stringifyFrontmatter(body, frontmatter)
914
+ });
915
+ this.frontmatter = frontmatter;
916
+ this.body = body;
917
+ }
895
918
  static getSettablePaths() {
896
919
  return {
897
- relativeDirPath: ".github/commands"
920
+ relativeDirPath: (0, import_node_path8.join)(".github", "prompts")
921
+ };
922
+ }
923
+ getBody() {
924
+ return this.body;
925
+ }
926
+ getFrontmatter() {
927
+ return this.frontmatter;
928
+ }
929
+ toRulesyncCommand() {
930
+ const rulesyncFrontmatter = {
931
+ targets: ["*"],
932
+ description: this.frontmatter.description
898
933
  };
934
+ return new RulesyncCommand({
935
+ baseDir: ".",
936
+ frontmatter: rulesyncFrontmatter,
937
+ body: this.body,
938
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
939
+ relativeFilePath: this.relativeFilePath,
940
+ fileContent: this.getFileContent(),
941
+ validate: true
942
+ });
943
+ }
944
+ validate() {
945
+ if (!this.frontmatter) {
946
+ return { success: true, error: null };
947
+ }
948
+ const result = CopilotCommandFrontmatterSchema.safeParse(this.frontmatter);
949
+ if (result.success) {
950
+ return { success: true, error: null };
951
+ } else {
952
+ return {
953
+ success: false,
954
+ error: new Error(
955
+ `Invalid frontmatter in ${(0, import_node_path8.join)(this.relativeDirPath, this.relativeFilePath)}: ${result.error.message}`
956
+ )
957
+ };
958
+ }
899
959
  }
900
960
  static fromRulesyncCommand({
901
961
  baseDir = ".",
902
962
  rulesyncCommand,
903
963
  validate = true
904
964
  }) {
905
- return new _CopilotCommand(
906
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
907
- );
965
+ const paths = this.getSettablePaths();
966
+ const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
967
+ const copilotFrontmatter = {
968
+ mode: "agent",
969
+ description: rulesyncFrontmatter.description
970
+ };
971
+ const body = rulesyncCommand.getBody();
972
+ const originalFilePath = rulesyncCommand.getRelativeFilePath();
973
+ const relativeFilePath = originalFilePath.replace(/\.md$/, ".prompt.md");
974
+ return new _CopilotCommand({
975
+ baseDir,
976
+ frontmatter: copilotFrontmatter,
977
+ body,
978
+ relativeDirPath: paths.relativeDirPath,
979
+ relativeFilePath,
980
+ validate
981
+ });
908
982
  }
909
983
  static async fromFile({
910
984
  baseDir = ".",
911
985
  relativeFilePath,
912
986
  validate = true
913
987
  }) {
914
- const filePath = (0, import_node_path8.join)(
915
- baseDir,
916
- _CopilotCommand.getSettablePaths().relativeDirPath,
917
- relativeFilePath
918
- );
988
+ const paths = this.getSettablePaths();
989
+ const filePath = (0, import_node_path8.join)(baseDir, paths.relativeDirPath, relativeFilePath);
919
990
  const fileContent = await readFileContent(filePath);
920
991
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
921
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
992
+ const result = CopilotCommandFrontmatterSchema.safeParse(frontmatter);
922
993
  if (!result.success) {
923
994
  throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
924
995
  }
925
996
  return new _CopilotCommand({
926
997
  baseDir,
927
- relativeDirPath: _CopilotCommand.getSettablePaths().relativeDirPath,
998
+ relativeDirPath: paths.relativeDirPath,
928
999
  relativeFilePath: (0, import_node_path8.basename)(relativeFilePath),
929
1000
  frontmatter: result.data,
930
1001
  body: content.trim(),
@@ -1018,10 +1089,10 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1018
1089
  // src/commands/geminicli-command.ts
1019
1090
  var import_node_path10 = require("path");
1020
1091
  var import_smol_toml = require("smol-toml");
1021
- var import_mini6 = require("zod/mini");
1022
- var GeminiCliCommandFrontmatterSchema = import_mini6.z.object({
1023
- description: import_mini6.z.optional(import_mini6.z.string()),
1024
- prompt: import_mini6.z.string()
1092
+ var import_mini7 = require("zod/mini");
1093
+ var GeminiCliCommandFrontmatterSchema = import_mini7.z.object({
1094
+ description: import_mini7.z.optional(import_mini7.z.string()),
1095
+ prompt: import_mini7.z.string()
1025
1096
  });
1026
1097
  var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1027
1098
  frontmatter;
@@ -1142,10 +1213,10 @@ ${geminiFrontmatter.prompt}
1142
1213
 
1143
1214
  // src/commands/roo-command.ts
1144
1215
  var import_node_path11 = require("path");
1145
- var import_mini7 = require("zod/mini");
1146
- var RooCommandFrontmatterSchema = import_mini7.z.object({
1147
- description: import_mini7.z.string(),
1148
- "argument-hint": (0, import_mini7.optional)(import_mini7.z.string())
1216
+ var import_mini8 = require("zod/mini");
1217
+ var RooCommandFrontmatterSchema = import_mini8.z.object({
1218
+ description: import_mini8.z.string(),
1219
+ "argument-hint": (0, import_mini8.optional)(import_mini8.z.string())
1149
1220
  });
1150
1221
  var RooCommand = class _RooCommand extends ToolCommand {
1151
1222
  frontmatter;
@@ -1270,11 +1341,11 @@ var commandsProcessorToolTargets = [
1270
1341
  "copilot",
1271
1342
  "cursor"
1272
1343
  ];
1273
- var CommandsProcessorToolTargetSchema = import_mini8.z.enum(
1344
+ var CommandsProcessorToolTargetSchema = import_mini9.z.enum(
1274
1345
  // codexcli is not in the list of tool targets but we add it here because it is a valid tool target for global mode generation
1275
1346
  commandsProcessorToolTargets.concat("codexcli")
1276
1347
  );
1277
- var commandsProcessorToolTargetsSimulated = ["agentsmd", "copilot"];
1348
+ var commandsProcessorToolTargetsSimulated = ["agentsmd"];
1278
1349
  var commandsProcessorToolTargetsGlobal = [
1279
1350
  "claudecode",
1280
1351
  "cursor",
@@ -1494,13 +1565,13 @@ var CommandsProcessor = class extends FeatureProcessor {
1494
1565
  });
1495
1566
  }
1496
1567
  /**
1497
- * Load Copilot command configurations from .github/commands/ directory
1568
+ * Load Copilot command configurations from .github/prompts/ directory
1498
1569
  */
1499
1570
  async loadCopilotCommands() {
1500
1571
  return await this.loadToolCommandDefault({
1501
1572
  toolTarget: "copilot",
1502
1573
  relativeDirPath: CopilotCommand.getSettablePaths().relativeDirPath,
1503
- extension: "md"
1574
+ extension: "prompt.md"
1504
1575
  });
1505
1576
  }
1506
1577
  /**
@@ -1728,7 +1799,7 @@ function getBaseDirsInLightOfGlobal({
1728
1799
  }
1729
1800
 
1730
1801
  // src/ignore/ignore-processor.ts
1731
- var import_mini9 = require("zod/mini");
1802
+ var import_mini10 = require("zod/mini");
1732
1803
 
1733
1804
  // src/ignore/amazonqcli-ignore.ts
1734
1805
  var import_node_path14 = require("path");
@@ -2373,7 +2444,7 @@ var ignoreProcessorToolTargets = [
2373
2444
  "roo",
2374
2445
  "windsurf"
2375
2446
  ];
2376
- var IgnoreProcessorToolTargetSchema = import_mini9.z.enum(ignoreProcessorToolTargets);
2447
+ var IgnoreProcessorToolTargetSchema = import_mini10.z.enum(ignoreProcessorToolTargets);
2377
2448
  var IgnoreProcessor = class extends FeatureProcessor {
2378
2449
  toolTarget;
2379
2450
  constructor({
@@ -2548,39 +2619,39 @@ var IgnoreProcessor = class extends FeatureProcessor {
2548
2619
  };
2549
2620
 
2550
2621
  // src/mcp/mcp-processor.ts
2551
- var import_mini11 = require("zod/mini");
2622
+ var import_mini12 = require("zod/mini");
2552
2623
 
2553
2624
  // src/mcp/amazonqcli-mcp.ts
2554
2625
  var import_node_path26 = require("path");
2555
2626
 
2556
2627
  // src/mcp/rulesync-mcp.ts
2557
2628
  var import_node_path25 = require("path");
2558
- var import_mini10 = require("zod/mini");
2559
- var McpTransportTypeSchema = import_mini10.z.enum(["stdio", "sse", "http"]);
2560
- var McpServerBaseSchema = import_mini10.z.object({
2561
- type: import_mini10.z.optional(import_mini10.z.enum(["stdio", "sse", "http"])),
2562
- command: import_mini10.z.optional(import_mini10.z.union([import_mini10.z.string(), import_mini10.z.array(import_mini10.z.string())])),
2563
- args: import_mini10.z.optional(import_mini10.z.array(import_mini10.z.string())),
2564
- url: import_mini10.z.optional(import_mini10.z.string()),
2565
- httpUrl: import_mini10.z.optional(import_mini10.z.string()),
2566
- env: import_mini10.z.optional(import_mini10.z.record(import_mini10.z.string(), import_mini10.z.string())),
2567
- disabled: import_mini10.z.optional(import_mini10.z.boolean()),
2568
- networkTimeout: import_mini10.z.optional(import_mini10.z.number()),
2569
- timeout: import_mini10.z.optional(import_mini10.z.number()),
2570
- trust: import_mini10.z.optional(import_mini10.z.boolean()),
2571
- cwd: import_mini10.z.optional(import_mini10.z.string()),
2572
- transport: import_mini10.z.optional(McpTransportTypeSchema),
2573
- alwaysAllow: import_mini10.z.optional(import_mini10.z.array(import_mini10.z.string())),
2574
- tools: import_mini10.z.optional(import_mini10.z.array(import_mini10.z.string())),
2575
- kiroAutoApprove: import_mini10.z.optional(import_mini10.z.array(import_mini10.z.string())),
2576
- kiroAutoBlock: import_mini10.z.optional(import_mini10.z.array(import_mini10.z.string())),
2577
- headers: import_mini10.z.optional(import_mini10.z.record(import_mini10.z.string(), import_mini10.z.string()))
2629
+ var import_mini11 = require("zod/mini");
2630
+ var McpTransportTypeSchema = import_mini11.z.enum(["stdio", "sse", "http"]);
2631
+ var McpServerBaseSchema = import_mini11.z.object({
2632
+ type: import_mini11.z.optional(import_mini11.z.enum(["stdio", "sse", "http"])),
2633
+ command: import_mini11.z.optional(import_mini11.z.union([import_mini11.z.string(), import_mini11.z.array(import_mini11.z.string())])),
2634
+ args: import_mini11.z.optional(import_mini11.z.array(import_mini11.z.string())),
2635
+ url: import_mini11.z.optional(import_mini11.z.string()),
2636
+ httpUrl: import_mini11.z.optional(import_mini11.z.string()),
2637
+ env: import_mini11.z.optional(import_mini11.z.record(import_mini11.z.string(), import_mini11.z.string())),
2638
+ disabled: import_mini11.z.optional(import_mini11.z.boolean()),
2639
+ networkTimeout: import_mini11.z.optional(import_mini11.z.number()),
2640
+ timeout: import_mini11.z.optional(import_mini11.z.number()),
2641
+ trust: import_mini11.z.optional(import_mini11.z.boolean()),
2642
+ cwd: import_mini11.z.optional(import_mini11.z.string()),
2643
+ transport: import_mini11.z.optional(McpTransportTypeSchema),
2644
+ alwaysAllow: import_mini11.z.optional(import_mini11.z.array(import_mini11.z.string())),
2645
+ tools: import_mini11.z.optional(import_mini11.z.array(import_mini11.z.string())),
2646
+ kiroAutoApprove: import_mini11.z.optional(import_mini11.z.array(import_mini11.z.string())),
2647
+ kiroAutoBlock: import_mini11.z.optional(import_mini11.z.array(import_mini11.z.string())),
2648
+ headers: import_mini11.z.optional(import_mini11.z.record(import_mini11.z.string(), import_mini11.z.string()))
2578
2649
  });
2579
- var RulesyncMcpServersSchema = import_mini10.z.extend(McpServerBaseSchema, {
2580
- targets: import_mini10.z.optional(RulesyncTargetsSchema)
2650
+ var RulesyncMcpServersSchema = import_mini11.z.extend(McpServerBaseSchema, {
2651
+ targets: import_mini11.z.optional(RulesyncTargetsSchema)
2581
2652
  });
2582
- var RulesyncMcpConfigSchema = import_mini10.z.object({
2583
- mcpServers: import_mini10.z.record(import_mini10.z.string(), RulesyncMcpServersSchema)
2653
+ var RulesyncMcpConfigSchema = import_mini11.z.object({
2654
+ mcpServers: import_mini11.z.record(import_mini11.z.string(), RulesyncMcpServersSchema)
2584
2655
  });
2585
2656
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2586
2657
  json;
@@ -3132,7 +3203,7 @@ var mcpProcessorToolTargets = [
3132
3203
  "cursor",
3133
3204
  "roo"
3134
3205
  ];
3135
- var McpProcessorToolTargetSchema = import_mini11.z.enum(
3206
+ var McpProcessorToolTargetSchema = import_mini12.z.enum(
3136
3207
  // codexcli is not in the list of tool targets but we add it here because it is a valid tool target for global mode generation
3137
3208
  mcpProcessorToolTargets.concat("codexcli")
3138
3209
  );
@@ -3336,11 +3407,11 @@ var McpProcessor = class extends FeatureProcessor {
3336
3407
  // src/rules/rules-processor.ts
3337
3408
  var import_node_path56 = require("path");
3338
3409
  var import_fast_xml_parser = require("fast-xml-parser");
3339
- var import_mini20 = require("zod/mini");
3410
+ var import_mini21 = require("zod/mini");
3340
3411
 
3341
3412
  // src/subagents/simulated-subagent.ts
3342
3413
  var import_node_path33 = require("path");
3343
- var import_mini12 = require("zod/mini");
3414
+ var import_mini13 = require("zod/mini");
3344
3415
 
3345
3416
  // src/subagents/tool-subagent.ts
3346
3417
  var ToolSubagent = class extends ToolFile {
@@ -3375,9 +3446,9 @@ var ToolSubagent = class extends ToolFile {
3375
3446
  };
3376
3447
 
3377
3448
  // src/subagents/simulated-subagent.ts
3378
- var SimulatedSubagentFrontmatterSchema = import_mini12.z.object({
3379
- name: import_mini12.z.string(),
3380
- description: import_mini12.z.string()
3449
+ var SimulatedSubagentFrontmatterSchema = import_mini13.z.object({
3450
+ name: import_mini13.z.string(),
3451
+ description: import_mini13.z.string()
3381
3452
  });
3382
3453
  var SimulatedSubagent = class extends ToolSubagent {
3383
3454
  frontmatter;
@@ -3606,22 +3677,22 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
3606
3677
 
3607
3678
  // src/subagents/subagents-processor.ts
3608
3679
  var import_node_path36 = require("path");
3609
- var import_mini15 = require("zod/mini");
3680
+ var import_mini16 = require("zod/mini");
3610
3681
 
3611
3682
  // src/subagents/claudecode-subagent.ts
3612
3683
  var import_node_path35 = require("path");
3613
- var import_mini14 = require("zod/mini");
3684
+ var import_mini15 = require("zod/mini");
3614
3685
 
3615
3686
  // src/subagents/rulesync-subagent.ts
3616
3687
  var import_node_path34 = require("path");
3617
- var import_mini13 = require("zod/mini");
3618
- var RulesyncSubagentModelSchema = import_mini13.z.enum(["opus", "sonnet", "haiku", "inherit"]);
3619
- var RulesyncSubagentFrontmatterSchema = import_mini13.z.object({
3688
+ var import_mini14 = require("zod/mini");
3689
+ var RulesyncSubagentModelSchema = import_mini14.z.enum(["opus", "sonnet", "haiku", "inherit"]);
3690
+ var RulesyncSubagentFrontmatterSchema = import_mini14.z.object({
3620
3691
  targets: RulesyncTargetsSchema,
3621
- name: import_mini13.z.string(),
3622
- description: import_mini13.z.string(),
3623
- claudecode: import_mini13.z.optional(
3624
- import_mini13.z.object({
3692
+ name: import_mini14.z.string(),
3693
+ description: import_mini14.z.string(),
3694
+ claudecode: import_mini14.z.optional(
3695
+ import_mini14.z.object({
3625
3696
  model: RulesyncSubagentModelSchema
3626
3697
  })
3627
3698
  )
@@ -3693,10 +3764,10 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
3693
3764
  };
3694
3765
 
3695
3766
  // src/subagents/claudecode-subagent.ts
3696
- var ClaudecodeSubagentFrontmatterSchema = import_mini14.z.object({
3697
- name: import_mini14.z.string(),
3698
- description: import_mini14.z.string(),
3699
- model: import_mini14.z.optional(import_mini14.z.enum(["opus", "sonnet", "haiku", "inherit"]))
3767
+ var ClaudecodeSubagentFrontmatterSchema = import_mini15.z.object({
3768
+ name: import_mini15.z.string(),
3769
+ description: import_mini15.z.string(),
3770
+ model: import_mini15.z.optional(import_mini15.z.enum(["opus", "sonnet", "haiku", "inherit"]))
3700
3771
  });
3701
3772
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3702
3773
  frontmatter;
@@ -3847,7 +3918,7 @@ var subagentsProcessorToolTargetsSimulated = [
3847
3918
  "roo"
3848
3919
  ];
3849
3920
  var subagentsProcessorToolTargetsGlobal = ["claudecode"];
3850
- var SubagentsProcessorToolTargetSchema = import_mini15.z.enum(subagentsProcessorToolTargets);
3921
+ var SubagentsProcessorToolTargetSchema = import_mini16.z.enum(subagentsProcessorToolTargets);
3851
3922
  var SubagentsProcessor = class extends FeatureProcessor {
3852
3923
  toolTarget;
3853
3924
  global;
@@ -4132,23 +4203,23 @@ var import_node_path38 = require("path");
4132
4203
 
4133
4204
  // src/rules/rulesync-rule.ts
4134
4205
  var import_node_path37 = require("path");
4135
- var import_mini16 = require("zod/mini");
4136
- var RulesyncRuleFrontmatterSchema = import_mini16.z.object({
4137
- root: import_mini16.z.optional(import_mini16.z.optional(import_mini16.z.boolean())),
4138
- targets: import_mini16.z.optional(RulesyncTargetsSchema),
4139
- description: import_mini16.z.optional(import_mini16.z.string()),
4140
- globs: import_mini16.z.optional(import_mini16.z.array(import_mini16.z.string())),
4141
- agentsmd: import_mini16.z.optional(
4142
- import_mini16.z.object({
4206
+ var import_mini17 = require("zod/mini");
4207
+ var RulesyncRuleFrontmatterSchema = import_mini17.z.object({
4208
+ root: import_mini17.z.optional(import_mini17.z.optional(import_mini17.z.boolean())),
4209
+ targets: import_mini17.z.optional(RulesyncTargetsSchema),
4210
+ description: import_mini17.z.optional(import_mini17.z.string()),
4211
+ globs: import_mini17.z.optional(import_mini17.z.array(import_mini17.z.string())),
4212
+ agentsmd: import_mini17.z.optional(
4213
+ import_mini17.z.object({
4143
4214
  // @example "path/to/subproject"
4144
- subprojectPath: import_mini16.z.optional(import_mini16.z.string())
4215
+ subprojectPath: import_mini17.z.optional(import_mini17.z.string())
4145
4216
  })
4146
4217
  ),
4147
- cursor: import_mini16.z.optional(
4148
- import_mini16.z.object({
4149
- alwaysApply: import_mini16.z.optional(import_mini16.z.boolean()),
4150
- description: import_mini16.z.optional(import_mini16.z.string()),
4151
- globs: import_mini16.z.optional(import_mini16.z.array(import_mini16.z.string()))
4218
+ cursor: import_mini17.z.optional(
4219
+ import_mini17.z.object({
4220
+ alwaysApply: import_mini17.z.optional(import_mini17.z.boolean()),
4221
+ description: import_mini17.z.optional(import_mini17.z.string()),
4222
+ globs: import_mini17.z.optional(import_mini17.z.array(import_mini17.z.string()))
4152
4223
  })
4153
4224
  )
4154
4225
  });
@@ -4729,9 +4800,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4729
4800
 
4730
4801
  // src/rules/cline-rule.ts
4731
4802
  var import_node_path44 = require("path");
4732
- var import_mini17 = require("zod/mini");
4733
- var ClineRuleFrontmatterSchema = import_mini17.z.object({
4734
- description: import_mini17.z.string()
4803
+ var import_mini18 = require("zod/mini");
4804
+ var ClineRuleFrontmatterSchema = import_mini18.z.object({
4805
+ description: import_mini18.z.string()
4735
4806
  });
4736
4807
  var ClineRule = class _ClineRule extends ToolRule {
4737
4808
  static getSettablePaths() {
@@ -4876,10 +4947,10 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4876
4947
 
4877
4948
  // src/rules/copilot-rule.ts
4878
4949
  var import_node_path46 = require("path");
4879
- var import_mini18 = require("zod/mini");
4880
- var CopilotRuleFrontmatterSchema = import_mini18.z.object({
4881
- description: import_mini18.z.optional(import_mini18.z.string()),
4882
- applyTo: import_mini18.z.optional(import_mini18.z.string())
4950
+ var import_mini19 = require("zod/mini");
4951
+ var CopilotRuleFrontmatterSchema = import_mini19.z.object({
4952
+ description: import_mini19.z.optional(import_mini19.z.string()),
4953
+ applyTo: import_mini19.z.optional(import_mini19.z.string())
4883
4954
  });
4884
4955
  var CopilotRule = class _CopilotRule extends ToolRule {
4885
4956
  frontmatter;
@@ -5038,11 +5109,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5038
5109
 
5039
5110
  // src/rules/cursor-rule.ts
5040
5111
  var import_node_path47 = require("path");
5041
- var import_mini19 = require("zod/mini");
5042
- var CursorRuleFrontmatterSchema = import_mini19.z.object({
5043
- description: import_mini19.z.optional(import_mini19.z.string()),
5044
- globs: import_mini19.z.optional(import_mini19.z.string()),
5045
- alwaysApply: import_mini19.z.optional(import_mini19.z.boolean())
5112
+ var import_mini20 = require("zod/mini");
5113
+ var CursorRuleFrontmatterSchema = import_mini20.z.object({
5114
+ description: import_mini20.z.optional(import_mini20.z.string()),
5115
+ globs: import_mini20.z.optional(import_mini20.z.string()),
5116
+ alwaysApply: import_mini20.z.optional(import_mini20.z.boolean())
5046
5117
  });
5047
5118
  var CursorRule = class _CursorRule extends ToolRule {
5048
5119
  frontmatter;
@@ -5746,7 +5817,7 @@ var rulesProcessorToolTargets = [
5746
5817
  "warp",
5747
5818
  "windsurf"
5748
5819
  ];
5749
- var RulesProcessorToolTargetSchema = import_mini20.z.enum(rulesProcessorToolTargets);
5820
+ var RulesProcessorToolTargetSchema = import_mini21.z.enum(rulesProcessorToolTargets);
5750
5821
  var rulesProcessorToolTargetsGlobal = [
5751
5822
  "claudecode",
5752
5823
  "codexcli",
@@ -6795,6 +6866,7 @@ var gitignoreCommand = async () => {
6795
6866
  "**/.amazonq/",
6796
6867
  "**/.github/copilot-instructions.md",
6797
6868
  "**/.github/instructions/",
6869
+ "**/.github/prompts/",
6798
6870
  "**/.cursor/",
6799
6871
  "**/.cursorignore",
6800
6872
  "**/.clinerules/",
@@ -7100,7 +7172,7 @@ globs: ["**/*"]
7100
7172
  }
7101
7173
 
7102
7174
  // src/cli/index.ts
7103
- var getVersion = () => "3.4.3";
7175
+ var getVersion = () => "3.5.0";
7104
7176
  var main = async () => {
7105
7177
  const program = new import_commander.Command();
7106
7178
  const version = getVersion();
package/dist/index.js CHANGED
@@ -73,7 +73,7 @@ import { intersection } from "es-toolkit";
73
73
 
74
74
  // src/commands/commands-processor.ts
75
75
  import { basename as basename11, join as join11 } from "path";
76
- import { z as z8 } from "zod/mini";
76
+ import { z as z9 } from "zod/mini";
77
77
 
78
78
  // src/utils/file.ts
79
79
  import { globSync } from "fs";
@@ -868,40 +868,111 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
868
868
 
869
869
  // src/commands/copilot-command.ts
870
870
  import { basename as basename7, join as join7 } from "path";
871
- var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
871
+ import { z as z6 } from "zod/mini";
872
+ var CopilotCommandFrontmatterSchema = z6.object({
873
+ mode: z6.literal("agent"),
874
+ description: z6.string()
875
+ });
876
+ var CopilotCommand = class _CopilotCommand extends ToolCommand {
877
+ frontmatter;
878
+ body;
879
+ constructor({ frontmatter, body, ...rest }) {
880
+ if (rest.validate) {
881
+ const result = CopilotCommandFrontmatterSchema.safeParse(frontmatter);
882
+ if (!result.success) {
883
+ throw new Error(
884
+ `Invalid frontmatter in ${join7(rest.relativeDirPath, rest.relativeFilePath)}: ${result.error.message}`
885
+ );
886
+ }
887
+ }
888
+ super({
889
+ ...rest,
890
+ fileContent: stringifyFrontmatter(body, frontmatter)
891
+ });
892
+ this.frontmatter = frontmatter;
893
+ this.body = body;
894
+ }
872
895
  static getSettablePaths() {
873
896
  return {
874
- relativeDirPath: ".github/commands"
897
+ relativeDirPath: join7(".github", "prompts")
898
+ };
899
+ }
900
+ getBody() {
901
+ return this.body;
902
+ }
903
+ getFrontmatter() {
904
+ return this.frontmatter;
905
+ }
906
+ toRulesyncCommand() {
907
+ const rulesyncFrontmatter = {
908
+ targets: ["*"],
909
+ description: this.frontmatter.description
875
910
  };
911
+ return new RulesyncCommand({
912
+ baseDir: ".",
913
+ frontmatter: rulesyncFrontmatter,
914
+ body: this.body,
915
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
916
+ relativeFilePath: this.relativeFilePath,
917
+ fileContent: this.getFileContent(),
918
+ validate: true
919
+ });
920
+ }
921
+ validate() {
922
+ if (!this.frontmatter) {
923
+ return { success: true, error: null };
924
+ }
925
+ const result = CopilotCommandFrontmatterSchema.safeParse(this.frontmatter);
926
+ if (result.success) {
927
+ return { success: true, error: null };
928
+ } else {
929
+ return {
930
+ success: false,
931
+ error: new Error(
932
+ `Invalid frontmatter in ${join7(this.relativeDirPath, this.relativeFilePath)}: ${result.error.message}`
933
+ )
934
+ };
935
+ }
876
936
  }
877
937
  static fromRulesyncCommand({
878
938
  baseDir = ".",
879
939
  rulesyncCommand,
880
940
  validate = true
881
941
  }) {
882
- return new _CopilotCommand(
883
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
884
- );
942
+ const paths = this.getSettablePaths();
943
+ const rulesyncFrontmatter = rulesyncCommand.getFrontmatter();
944
+ const copilotFrontmatter = {
945
+ mode: "agent",
946
+ description: rulesyncFrontmatter.description
947
+ };
948
+ const body = rulesyncCommand.getBody();
949
+ const originalFilePath = rulesyncCommand.getRelativeFilePath();
950
+ const relativeFilePath = originalFilePath.replace(/\.md$/, ".prompt.md");
951
+ return new _CopilotCommand({
952
+ baseDir,
953
+ frontmatter: copilotFrontmatter,
954
+ body,
955
+ relativeDirPath: paths.relativeDirPath,
956
+ relativeFilePath,
957
+ validate
958
+ });
885
959
  }
886
960
  static async fromFile({
887
961
  baseDir = ".",
888
962
  relativeFilePath,
889
963
  validate = true
890
964
  }) {
891
- const filePath = join7(
892
- baseDir,
893
- _CopilotCommand.getSettablePaths().relativeDirPath,
894
- relativeFilePath
895
- );
965
+ const paths = this.getSettablePaths();
966
+ const filePath = join7(baseDir, paths.relativeDirPath, relativeFilePath);
896
967
  const fileContent = await readFileContent(filePath);
897
968
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
898
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
969
+ const result = CopilotCommandFrontmatterSchema.safeParse(frontmatter);
899
970
  if (!result.success) {
900
971
  throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
901
972
  }
902
973
  return new _CopilotCommand({
903
974
  baseDir,
904
- relativeDirPath: _CopilotCommand.getSettablePaths().relativeDirPath,
975
+ relativeDirPath: paths.relativeDirPath,
905
976
  relativeFilePath: basename7(relativeFilePath),
906
977
  frontmatter: result.data,
907
978
  body: content.trim(),
@@ -995,10 +1066,10 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
995
1066
  // src/commands/geminicli-command.ts
996
1067
  import { basename as basename9, join as join9 } from "path";
997
1068
  import { parse as parseToml } from "smol-toml";
998
- import { z as z6 } from "zod/mini";
999
- var GeminiCliCommandFrontmatterSchema = z6.object({
1000
- description: z6.optional(z6.string()),
1001
- prompt: z6.string()
1069
+ import { z as z7 } from "zod/mini";
1070
+ var GeminiCliCommandFrontmatterSchema = z7.object({
1071
+ description: z7.optional(z7.string()),
1072
+ prompt: z7.string()
1002
1073
  });
1003
1074
  var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1004
1075
  frontmatter;
@@ -1119,10 +1190,10 @@ ${geminiFrontmatter.prompt}
1119
1190
 
1120
1191
  // src/commands/roo-command.ts
1121
1192
  import { basename as basename10, join as join10 } from "path";
1122
- import { optional, z as z7 } from "zod/mini";
1123
- var RooCommandFrontmatterSchema = z7.object({
1124
- description: z7.string(),
1125
- "argument-hint": optional(z7.string())
1193
+ import { optional, z as z8 } from "zod/mini";
1194
+ var RooCommandFrontmatterSchema = z8.object({
1195
+ description: z8.string(),
1196
+ "argument-hint": optional(z8.string())
1126
1197
  });
1127
1198
  var RooCommand = class _RooCommand extends ToolCommand {
1128
1199
  frontmatter;
@@ -1247,11 +1318,11 @@ var commandsProcessorToolTargets = [
1247
1318
  "copilot",
1248
1319
  "cursor"
1249
1320
  ];
1250
- var CommandsProcessorToolTargetSchema = z8.enum(
1321
+ var CommandsProcessorToolTargetSchema = z9.enum(
1251
1322
  // codexcli is not in the list of tool targets but we add it here because it is a valid tool target for global mode generation
1252
1323
  commandsProcessorToolTargets.concat("codexcli")
1253
1324
  );
1254
- var commandsProcessorToolTargetsSimulated = ["agentsmd", "copilot"];
1325
+ var commandsProcessorToolTargetsSimulated = ["agentsmd"];
1255
1326
  var commandsProcessorToolTargetsGlobal = [
1256
1327
  "claudecode",
1257
1328
  "cursor",
@@ -1471,13 +1542,13 @@ var CommandsProcessor = class extends FeatureProcessor {
1471
1542
  });
1472
1543
  }
1473
1544
  /**
1474
- * Load Copilot command configurations from .github/commands/ directory
1545
+ * Load Copilot command configurations from .github/prompts/ directory
1475
1546
  */
1476
1547
  async loadCopilotCommands() {
1477
1548
  return await this.loadToolCommandDefault({
1478
1549
  toolTarget: "copilot",
1479
1550
  relativeDirPath: CopilotCommand.getSettablePaths().relativeDirPath,
1480
- extension: "md"
1551
+ extension: "prompt.md"
1481
1552
  });
1482
1553
  }
1483
1554
  /**
@@ -1705,7 +1776,7 @@ function getBaseDirsInLightOfGlobal({
1705
1776
  }
1706
1777
 
1707
1778
  // src/ignore/ignore-processor.ts
1708
- import { z as z9 } from "zod/mini";
1779
+ import { z as z10 } from "zod/mini";
1709
1780
 
1710
1781
  // src/ignore/amazonqcli-ignore.ts
1711
1782
  import { join as join13 } from "path";
@@ -2350,7 +2421,7 @@ var ignoreProcessorToolTargets = [
2350
2421
  "roo",
2351
2422
  "windsurf"
2352
2423
  ];
2353
- var IgnoreProcessorToolTargetSchema = z9.enum(ignoreProcessorToolTargets);
2424
+ var IgnoreProcessorToolTargetSchema = z10.enum(ignoreProcessorToolTargets);
2354
2425
  var IgnoreProcessor = class extends FeatureProcessor {
2355
2426
  toolTarget;
2356
2427
  constructor({
@@ -2525,39 +2596,39 @@ var IgnoreProcessor = class extends FeatureProcessor {
2525
2596
  };
2526
2597
 
2527
2598
  // src/mcp/mcp-processor.ts
2528
- import { z as z11 } from "zod/mini";
2599
+ import { z as z12 } from "zod/mini";
2529
2600
 
2530
2601
  // src/mcp/amazonqcli-mcp.ts
2531
2602
  import { join as join25 } from "path";
2532
2603
 
2533
2604
  // src/mcp/rulesync-mcp.ts
2534
2605
  import { join as join24 } from "path";
2535
- import { z as z10 } from "zod/mini";
2536
- var McpTransportTypeSchema = z10.enum(["stdio", "sse", "http"]);
2537
- var McpServerBaseSchema = z10.object({
2538
- type: z10.optional(z10.enum(["stdio", "sse", "http"])),
2539
- command: z10.optional(z10.union([z10.string(), z10.array(z10.string())])),
2540
- args: z10.optional(z10.array(z10.string())),
2541
- url: z10.optional(z10.string()),
2542
- httpUrl: z10.optional(z10.string()),
2543
- env: z10.optional(z10.record(z10.string(), z10.string())),
2544
- disabled: z10.optional(z10.boolean()),
2545
- networkTimeout: z10.optional(z10.number()),
2546
- timeout: z10.optional(z10.number()),
2547
- trust: z10.optional(z10.boolean()),
2548
- cwd: z10.optional(z10.string()),
2549
- transport: z10.optional(McpTransportTypeSchema),
2550
- alwaysAllow: z10.optional(z10.array(z10.string())),
2551
- tools: z10.optional(z10.array(z10.string())),
2552
- kiroAutoApprove: z10.optional(z10.array(z10.string())),
2553
- kiroAutoBlock: z10.optional(z10.array(z10.string())),
2554
- headers: z10.optional(z10.record(z10.string(), z10.string()))
2606
+ import { z as z11 } from "zod/mini";
2607
+ var McpTransportTypeSchema = z11.enum(["stdio", "sse", "http"]);
2608
+ var McpServerBaseSchema = z11.object({
2609
+ type: z11.optional(z11.enum(["stdio", "sse", "http"])),
2610
+ command: z11.optional(z11.union([z11.string(), z11.array(z11.string())])),
2611
+ args: z11.optional(z11.array(z11.string())),
2612
+ url: z11.optional(z11.string()),
2613
+ httpUrl: z11.optional(z11.string()),
2614
+ env: z11.optional(z11.record(z11.string(), z11.string())),
2615
+ disabled: z11.optional(z11.boolean()),
2616
+ networkTimeout: z11.optional(z11.number()),
2617
+ timeout: z11.optional(z11.number()),
2618
+ trust: z11.optional(z11.boolean()),
2619
+ cwd: z11.optional(z11.string()),
2620
+ transport: z11.optional(McpTransportTypeSchema),
2621
+ alwaysAllow: z11.optional(z11.array(z11.string())),
2622
+ tools: z11.optional(z11.array(z11.string())),
2623
+ kiroAutoApprove: z11.optional(z11.array(z11.string())),
2624
+ kiroAutoBlock: z11.optional(z11.array(z11.string())),
2625
+ headers: z11.optional(z11.record(z11.string(), z11.string()))
2555
2626
  });
2556
- var RulesyncMcpServersSchema = z10.extend(McpServerBaseSchema, {
2557
- targets: z10.optional(RulesyncTargetsSchema)
2627
+ var RulesyncMcpServersSchema = z11.extend(McpServerBaseSchema, {
2628
+ targets: z11.optional(RulesyncTargetsSchema)
2558
2629
  });
2559
- var RulesyncMcpConfigSchema = z10.object({
2560
- mcpServers: z10.record(z10.string(), RulesyncMcpServersSchema)
2630
+ var RulesyncMcpConfigSchema = z11.object({
2631
+ mcpServers: z11.record(z11.string(), RulesyncMcpServersSchema)
2561
2632
  });
2562
2633
  var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2563
2634
  json;
@@ -3109,7 +3180,7 @@ var mcpProcessorToolTargets = [
3109
3180
  "cursor",
3110
3181
  "roo"
3111
3182
  ];
3112
- var McpProcessorToolTargetSchema = z11.enum(
3183
+ var McpProcessorToolTargetSchema = z12.enum(
3113
3184
  // codexcli is not in the list of tool targets but we add it here because it is a valid tool target for global mode generation
3114
3185
  mcpProcessorToolTargets.concat("codexcli")
3115
3186
  );
@@ -3313,11 +3384,11 @@ var McpProcessor = class extends FeatureProcessor {
3313
3384
  // src/rules/rules-processor.ts
3314
3385
  import { basename as basename17, join as join55 } from "path";
3315
3386
  import { XMLBuilder } from "fast-xml-parser";
3316
- import { z as z20 } from "zod/mini";
3387
+ import { z as z21 } from "zod/mini";
3317
3388
 
3318
3389
  // src/subagents/simulated-subagent.ts
3319
3390
  import { basename as basename12, join as join32 } from "path";
3320
- import { z as z12 } from "zod/mini";
3391
+ import { z as z13 } from "zod/mini";
3321
3392
 
3322
3393
  // src/subagents/tool-subagent.ts
3323
3394
  var ToolSubagent = class extends ToolFile {
@@ -3352,9 +3423,9 @@ var ToolSubagent = class extends ToolFile {
3352
3423
  };
3353
3424
 
3354
3425
  // src/subagents/simulated-subagent.ts
3355
- var SimulatedSubagentFrontmatterSchema = z12.object({
3356
- name: z12.string(),
3357
- description: z12.string()
3426
+ var SimulatedSubagentFrontmatterSchema = z13.object({
3427
+ name: z13.string(),
3428
+ description: z13.string()
3358
3429
  });
3359
3430
  var SimulatedSubagent = class extends ToolSubagent {
3360
3431
  frontmatter;
@@ -3583,22 +3654,22 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
3583
3654
 
3584
3655
  // src/subagents/subagents-processor.ts
3585
3656
  import { basename as basename14, join as join35 } from "path";
3586
- import { z as z15 } from "zod/mini";
3657
+ import { z as z16 } from "zod/mini";
3587
3658
 
3588
3659
  // src/subagents/claudecode-subagent.ts
3589
3660
  import { join as join34 } from "path";
3590
- import { z as z14 } from "zod/mini";
3661
+ import { z as z15 } from "zod/mini";
3591
3662
 
3592
3663
  // src/subagents/rulesync-subagent.ts
3593
3664
  import { basename as basename13, join as join33 } from "path";
3594
- import { z as z13 } from "zod/mini";
3595
- var RulesyncSubagentModelSchema = z13.enum(["opus", "sonnet", "haiku", "inherit"]);
3596
- var RulesyncSubagentFrontmatterSchema = z13.object({
3665
+ import { z as z14 } from "zod/mini";
3666
+ var RulesyncSubagentModelSchema = z14.enum(["opus", "sonnet", "haiku", "inherit"]);
3667
+ var RulesyncSubagentFrontmatterSchema = z14.object({
3597
3668
  targets: RulesyncTargetsSchema,
3598
- name: z13.string(),
3599
- description: z13.string(),
3600
- claudecode: z13.optional(
3601
- z13.object({
3669
+ name: z14.string(),
3670
+ description: z14.string(),
3671
+ claudecode: z14.optional(
3672
+ z14.object({
3602
3673
  model: RulesyncSubagentModelSchema
3603
3674
  })
3604
3675
  )
@@ -3670,10 +3741,10 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
3670
3741
  };
3671
3742
 
3672
3743
  // src/subagents/claudecode-subagent.ts
3673
- var ClaudecodeSubagentFrontmatterSchema = z14.object({
3674
- name: z14.string(),
3675
- description: z14.string(),
3676
- model: z14.optional(z14.enum(["opus", "sonnet", "haiku", "inherit"]))
3744
+ var ClaudecodeSubagentFrontmatterSchema = z15.object({
3745
+ name: z15.string(),
3746
+ description: z15.string(),
3747
+ model: z15.optional(z15.enum(["opus", "sonnet", "haiku", "inherit"]))
3677
3748
  });
3678
3749
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3679
3750
  frontmatter;
@@ -3824,7 +3895,7 @@ var subagentsProcessorToolTargetsSimulated = [
3824
3895
  "roo"
3825
3896
  ];
3826
3897
  var subagentsProcessorToolTargetsGlobal = ["claudecode"];
3827
- var SubagentsProcessorToolTargetSchema = z15.enum(subagentsProcessorToolTargets);
3898
+ var SubagentsProcessorToolTargetSchema = z16.enum(subagentsProcessorToolTargets);
3828
3899
  var SubagentsProcessor = class extends FeatureProcessor {
3829
3900
  toolTarget;
3830
3901
  global;
@@ -4109,23 +4180,23 @@ import { join as join37 } from "path";
4109
4180
 
4110
4181
  // src/rules/rulesync-rule.ts
4111
4182
  import { basename as basename15, join as join36 } from "path";
4112
- import { z as z16 } from "zod/mini";
4113
- var RulesyncRuleFrontmatterSchema = z16.object({
4114
- root: z16.optional(z16.optional(z16.boolean())),
4115
- targets: z16.optional(RulesyncTargetsSchema),
4116
- description: z16.optional(z16.string()),
4117
- globs: z16.optional(z16.array(z16.string())),
4118
- agentsmd: z16.optional(
4119
- z16.object({
4183
+ import { z as z17 } from "zod/mini";
4184
+ var RulesyncRuleFrontmatterSchema = z17.object({
4185
+ root: z17.optional(z17.optional(z17.boolean())),
4186
+ targets: z17.optional(RulesyncTargetsSchema),
4187
+ description: z17.optional(z17.string()),
4188
+ globs: z17.optional(z17.array(z17.string())),
4189
+ agentsmd: z17.optional(
4190
+ z17.object({
4120
4191
  // @example "path/to/subproject"
4121
- subprojectPath: z16.optional(z16.string())
4192
+ subprojectPath: z17.optional(z17.string())
4122
4193
  })
4123
4194
  ),
4124
- cursor: z16.optional(
4125
- z16.object({
4126
- alwaysApply: z16.optional(z16.boolean()),
4127
- description: z16.optional(z16.string()),
4128
- globs: z16.optional(z16.array(z16.string()))
4195
+ cursor: z17.optional(
4196
+ z17.object({
4197
+ alwaysApply: z17.optional(z17.boolean()),
4198
+ description: z17.optional(z17.string()),
4199
+ globs: z17.optional(z17.array(z17.string()))
4129
4200
  })
4130
4201
  )
4131
4202
  });
@@ -4706,9 +4777,9 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4706
4777
 
4707
4778
  // src/rules/cline-rule.ts
4708
4779
  import { join as join43 } from "path";
4709
- import { z as z17 } from "zod/mini";
4710
- var ClineRuleFrontmatterSchema = z17.object({
4711
- description: z17.string()
4780
+ import { z as z18 } from "zod/mini";
4781
+ var ClineRuleFrontmatterSchema = z18.object({
4782
+ description: z18.string()
4712
4783
  });
4713
4784
  var ClineRule = class _ClineRule extends ToolRule {
4714
4785
  static getSettablePaths() {
@@ -4853,10 +4924,10 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4853
4924
 
4854
4925
  // src/rules/copilot-rule.ts
4855
4926
  import { join as join45 } from "path";
4856
- import { z as z18 } from "zod/mini";
4857
- var CopilotRuleFrontmatterSchema = z18.object({
4858
- description: z18.optional(z18.string()),
4859
- applyTo: z18.optional(z18.string())
4927
+ import { z as z19 } from "zod/mini";
4928
+ var CopilotRuleFrontmatterSchema = z19.object({
4929
+ description: z19.optional(z19.string()),
4930
+ applyTo: z19.optional(z19.string())
4860
4931
  });
4861
4932
  var CopilotRule = class _CopilotRule extends ToolRule {
4862
4933
  frontmatter;
@@ -5015,11 +5086,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5015
5086
 
5016
5087
  // src/rules/cursor-rule.ts
5017
5088
  import { basename as basename16, join as join46 } from "path";
5018
- import { z as z19 } from "zod/mini";
5019
- var CursorRuleFrontmatterSchema = z19.object({
5020
- description: z19.optional(z19.string()),
5021
- globs: z19.optional(z19.string()),
5022
- alwaysApply: z19.optional(z19.boolean())
5089
+ import { z as z20 } from "zod/mini";
5090
+ var CursorRuleFrontmatterSchema = z20.object({
5091
+ description: z20.optional(z20.string()),
5092
+ globs: z20.optional(z20.string()),
5093
+ alwaysApply: z20.optional(z20.boolean())
5023
5094
  });
5024
5095
  var CursorRule = class _CursorRule extends ToolRule {
5025
5096
  frontmatter;
@@ -5723,7 +5794,7 @@ var rulesProcessorToolTargets = [
5723
5794
  "warp",
5724
5795
  "windsurf"
5725
5796
  ];
5726
- var RulesProcessorToolTargetSchema = z20.enum(rulesProcessorToolTargets);
5797
+ var RulesProcessorToolTargetSchema = z21.enum(rulesProcessorToolTargets);
5727
5798
  var rulesProcessorToolTargetsGlobal = [
5728
5799
  "claudecode",
5729
5800
  "codexcli",
@@ -6772,6 +6843,7 @@ var gitignoreCommand = async () => {
6772
6843
  "**/.amazonq/",
6773
6844
  "**/.github/copilot-instructions.md",
6774
6845
  "**/.github/instructions/",
6846
+ "**/.github/prompts/",
6775
6847
  "**/.cursor/",
6776
6848
  "**/.cursorignore",
6777
6849
  "**/.clinerules/",
@@ -7077,7 +7149,7 @@ globs: ["**/*"]
7077
7149
  }
7078
7150
 
7079
7151
  // src/cli/index.ts
7080
- var getVersion = () => "3.4.3";
7152
+ var getVersion = () => "3.5.0";
7081
7153
  var main = async () => {
7082
7154
  const program = new Command();
7083
7155
  const version = getVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "3.4.3",
3
+ "version": "3.5.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",
@@ -57,7 +57,7 @@
57
57
  "@types/js-yaml": "4.0.9",
58
58
  "@types/micromatch": "4.0.9",
59
59
  "@types/node": "24.7.2",
60
- "@typescript/native-preview": "7.0.0-dev.20251011.1",
60
+ "@typescript/native-preview": "7.0.0-dev.20251012.1",
61
61
  "@vitest/coverage-v8": "3.2.4",
62
62
  "cspell": "9.2.1",
63
63
  "eslint": "9.37.0",