rulesync 3.5.0 → 3.5.2

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.
Files changed (3) hide show
  1. package/dist/index.cjs +88 -101
  2. package/dist/index.js +88 -101
  3. package/package.json +9 -9
package/dist/index.cjs CHANGED
@@ -714,12 +714,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
714
714
  this.frontmatter = frontmatter;
715
715
  this.body = body;
716
716
  }
717
- static getSettablePaths() {
718
- return {
719
- relativeDirPath: ".claude/commands"
720
- };
721
- }
722
- static getSettablePathsGlobal() {
717
+ static getSettablePaths(_options = {}) {
723
718
  return {
724
719
  relativeDirPath: (0, import_node_path6.join)(".claude", "commands")
725
720
  };
@@ -758,7 +753,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
758
753
  description: rulesyncFrontmatter.description
759
754
  };
760
755
  const body = rulesyncCommand.getBody();
761
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
756
+ const paths = this.getSettablePaths({ global });
762
757
  return new _ClaudecodeCommand({
763
758
  baseDir,
764
759
  frontmatter: claudecodeFrontmatter,
@@ -796,7 +791,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
796
791
  validate = true,
797
792
  global = false
798
793
  }) {
799
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
794
+ const paths = this.getSettablePaths({ global });
800
795
  const filePath = (0, import_node_path6.join)(baseDir, paths.relativeDirPath, relativeFilePath);
801
796
  const fileContent = await readFileContent(filePath);
802
797
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
@@ -818,10 +813,10 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
818
813
  // src/commands/codexcli-command.ts
819
814
  var import_node_path7 = require("path");
820
815
  var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
821
- static getSettablePaths() {
822
- throw new Error("getSettablePaths is not supported for CodexcliCommand");
823
- }
824
- static getSettablePathsGlobal() {
816
+ static getSettablePaths({ global } = {}) {
817
+ if (!global) {
818
+ throw new Error("CodexcliCommand only supports global mode. Please pass { global: true }.");
819
+ }
825
820
  return {
826
821
  relativeDirPath: (0, import_node_path7.join)(".codex", "prompts")
827
822
  };
@@ -848,7 +843,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
848
843
  validate = true,
849
844
  global = false
850
845
  }) {
851
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
846
+ const paths = this.getSettablePaths({ global });
852
847
  return new _CodexcliCommand({
853
848
  baseDir,
854
849
  fileContent: rulesyncCommand.getBody(),
@@ -875,7 +870,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
875
870
  validate = true,
876
871
  global = false
877
872
  }) {
878
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
873
+ const paths = this.getSettablePaths({ global });
879
874
  const filePath = (0, import_node_path7.join)(baseDir, paths.relativeDirPath, relativeFilePath);
880
875
  const fileContent = await readFileContent(filePath);
881
876
  const { body: content } = parseFrontmatter(fileContent);
@@ -931,12 +926,14 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
931
926
  targets: ["*"],
932
927
  description: this.frontmatter.description
933
928
  };
929
+ const originalFilePath = this.relativeFilePath;
930
+ const relativeFilePath = originalFilePath.replace(/\.prompt\.md$/, ".md");
934
931
  return new RulesyncCommand({
935
932
  baseDir: ".",
936
933
  frontmatter: rulesyncFrontmatter,
937
934
  body: this.body,
938
935
  relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
939
- relativeFilePath: this.relativeFilePath,
936
+ relativeFilePath,
940
937
  fileContent: this.getFileContent(),
941
938
  validate: true
942
939
  });
@@ -1013,12 +1010,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
1013
1010
  // src/commands/cursor-command.ts
1014
1011
  var import_node_path9 = require("path");
1015
1012
  var CursorCommand = class _CursorCommand extends ToolCommand {
1016
- static getSettablePaths() {
1017
- return {
1018
- relativeDirPath: (0, import_node_path9.join)(".cursor", "commands")
1019
- };
1020
- }
1021
- static getSettablePathsGlobal() {
1013
+ static getSettablePaths(_options = {}) {
1022
1014
  return {
1023
1015
  relativeDirPath: (0, import_node_path9.join)(".cursor", "commands")
1024
1016
  };
@@ -1045,7 +1037,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1045
1037
  validate = true,
1046
1038
  global = false
1047
1039
  }) {
1048
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1040
+ const paths = this.getSettablePaths({ global });
1049
1041
  return new _CursorCommand({
1050
1042
  baseDir,
1051
1043
  fileContent: rulesyncCommand.getBody(),
@@ -1072,7 +1064,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1072
1064
  validate = true,
1073
1065
  global = false
1074
1066
  }) {
1075
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1067
+ const paths = this.getSettablePaths({ global });
1076
1068
  const filePath = (0, import_node_path9.join)(baseDir, paths.relativeDirPath, relativeFilePath);
1077
1069
  const fileContent = await readFileContent(filePath);
1078
1070
  const { body: content } = parseFrontmatter(fileContent);
@@ -1103,12 +1095,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1103
1095
  this.frontmatter = parsed;
1104
1096
  this.body = parsed.prompt;
1105
1097
  }
1106
- static getSettablePaths() {
1107
- return {
1108
- relativeDirPath: ".gemini/commands"
1109
- };
1110
- }
1111
- static getSettablePathsGlobal() {
1098
+ static getSettablePaths(_options = {}) {
1112
1099
  return {
1113
1100
  relativeDirPath: (0, import_node_path10.join)(".gemini", "commands")
1114
1101
  };
@@ -1169,7 +1156,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1169
1156
  prompt = """
1170
1157
  ${geminiFrontmatter.prompt}
1171
1158
  """`;
1172
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1159
+ const paths = this.getSettablePaths({ global });
1173
1160
  return new _GeminiCliCommand({
1174
1161
  baseDir,
1175
1162
  relativeDirPath: paths.relativeDirPath,
@@ -1184,7 +1171,7 @@ ${geminiFrontmatter.prompt}
1184
1171
  validate = true,
1185
1172
  global = false
1186
1173
  }) {
1187
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1174
+ const paths = this.getSettablePaths({ global });
1188
1175
  const filePath = (0, import_node_path10.join)(baseDir, paths.relativeDirPath, relativeFilePath);
1189
1176
  const fileContent = await readFileContent(filePath);
1190
1177
  return new _GeminiCliCommand({
@@ -1578,7 +1565,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1578
1565
  * Load Claude Code command configurations from .claude/commands/ directory
1579
1566
  */
1580
1567
  async loadClaudecodeCommands() {
1581
- const paths = this.global ? ClaudecodeCommand.getSettablePathsGlobal() : ClaudecodeCommand.getSettablePaths();
1568
+ const paths = ClaudecodeCommand.getSettablePaths({ global: this.global });
1582
1569
  return await this.loadToolCommandDefault({
1583
1570
  toolTarget: "claudecode",
1584
1571
  relativeDirPath: paths.relativeDirPath,
@@ -1589,7 +1576,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1589
1576
  * Load Cursor command configurations from .cursor/commands/ directory
1590
1577
  */
1591
1578
  async loadCursorCommands() {
1592
- const paths = this.global ? CursorCommand.getSettablePathsGlobal() : CursorCommand.getSettablePaths();
1579
+ const paths = CursorCommand.getSettablePaths({ global: this.global });
1593
1580
  return await this.loadToolCommandDefault({
1594
1581
  toolTarget: "cursor",
1595
1582
  relativeDirPath: paths.relativeDirPath,
@@ -1600,7 +1587,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1600
1587
  * Load Gemini CLI command configurations from .gemini/commands/ directory
1601
1588
  */
1602
1589
  async loadGeminicliCommands() {
1603
- const paths = this.global ? GeminiCliCommand.getSettablePathsGlobal() : GeminiCliCommand.getSettablePaths();
1590
+ const paths = GeminiCliCommand.getSettablePaths({ global: this.global });
1604
1591
  return await this.loadToolCommandDefault({
1605
1592
  toolTarget: "geminicli",
1606
1593
  relativeDirPath: paths.relativeDirPath,
@@ -1611,7 +1598,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1611
1598
  * Load Codex CLI command configurations from .codex/prompts/ directory
1612
1599
  */
1613
1600
  async loadCodexcliCommands() {
1614
- const paths = this.global ? CodexcliCommand.getSettablePathsGlobal() : CodexcliCommand.getSettablePaths();
1601
+ const paths = CodexcliCommand.getSettablePaths({ global: this.global });
1615
1602
  return await this.loadToolCommandDefault({
1616
1603
  toolTarget: "codexcli",
1617
1604
  relativeDirPath: paths.relativeDirPath,
@@ -2797,24 +2784,24 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2797
2784
  getJson() {
2798
2785
  return this.json;
2799
2786
  }
2800
- static getSettablePaths() {
2787
+ static getSettablePaths({ global } = {}) {
2788
+ if (global) {
2789
+ return {
2790
+ relativeDirPath: ".claude",
2791
+ relativeFilePath: ".claude.json"
2792
+ };
2793
+ }
2801
2794
  return {
2802
2795
  relativeDirPath: ".",
2803
2796
  relativeFilePath: ".mcp.json"
2804
2797
  };
2805
2798
  }
2806
- static getSettablePathsGlobal() {
2807
- return {
2808
- relativeDirPath: ".claude",
2809
- relativeFilePath: ".claude.json"
2810
- };
2811
- }
2812
2799
  static async fromFile({
2813
2800
  baseDir = ".",
2814
2801
  validate = true,
2815
2802
  global = false
2816
2803
  }) {
2817
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2804
+ const paths = this.getSettablePaths({ global });
2818
2805
  const fileContent = await readOrInitializeFileContent(
2819
2806
  (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
2820
2807
  JSON.stringify({ mcpServers: {} }, null, 2)
@@ -2835,7 +2822,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2835
2822
  validate = true,
2836
2823
  global = false
2837
2824
  }) {
2838
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2825
+ const paths = this.getSettablePaths({ global });
2839
2826
  const fileContent = await readOrInitializeFileContent(
2840
2827
  (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
2841
2828
  JSON.stringify({ mcpServers: {} }, null, 2)
@@ -2938,10 +2925,10 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2938
2925
  getToml() {
2939
2926
  return this.toml;
2940
2927
  }
2941
- static getSettablePaths() {
2942
- throw new Error("getSettablePaths is not supported for CodexcliMcp");
2943
- }
2944
- static getSettablePathsGlobal() {
2928
+ static getSettablePaths({ global } = {}) {
2929
+ if (!global) {
2930
+ throw new Error("CodexcliMcp only supports global mode. Please pass { global: true }.");
2931
+ }
2945
2932
  return {
2946
2933
  relativeDirPath: ".codex",
2947
2934
  relativeFilePath: "config.toml"
@@ -2952,7 +2939,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2952
2939
  validate = true,
2953
2940
  global = false
2954
2941
  }) {
2955
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2942
+ const paths = this.getSettablePaths({ global });
2956
2943
  const fileContent = await readFileContent(
2957
2944
  (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
2958
2945
  );
@@ -2970,7 +2957,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2970
2957
  validate = true,
2971
2958
  global = false
2972
2959
  }) {
2973
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2960
+ const paths = this.getSettablePaths({ global });
2974
2961
  const configTomlFilePath = (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2975
2962
  const configTomlFileContent = await readOrInitializeFileContent(
2976
2963
  configTomlFilePath,
@@ -3787,12 +3774,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3787
3774
  this.frontmatter = frontmatter;
3788
3775
  this.body = body;
3789
3776
  }
3790
- static getSettablePaths() {
3791
- return {
3792
- relativeDirPath: ".claude/agents"
3793
- };
3794
- }
3795
- static getSettablePathsGlobal() {
3777
+ static getSettablePaths(_options = {}) {
3796
3778
  return {
3797
3779
  relativeDirPath: (0, import_node_path35.join)(".claude", "agents")
3798
3780
  };
@@ -3840,7 +3822,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3840
3822
  };
3841
3823
  const body = rulesyncSubagent.getBody();
3842
3824
  const fileContent = stringifyFrontmatter(body, claudecodeFrontmatter);
3843
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
3825
+ const paths = this.getSettablePaths({ global });
3844
3826
  return new _ClaudecodeSubagent({
3845
3827
  baseDir,
3846
3828
  frontmatter: claudecodeFrontmatter,
@@ -3879,7 +3861,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3879
3861
  validate = true,
3880
3862
  global = false
3881
3863
  }) {
3882
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
3864
+ const paths = this.getSettablePaths({ global });
3883
3865
  const filePath = (0, import_node_path35.join)(baseDir, paths.relativeDirPath, relativeFilePath);
3884
3866
  const fileContent = await readFileContent(filePath);
3885
3867
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
@@ -4109,7 +4091,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4109
4091
  * Load Claude Code subagent configurations from .claude/agents/ directory
4110
4092
  */
4111
4093
  async loadClaudecodeSubagents() {
4112
- const paths = this.global ? ClaudecodeSubagent.getSettablePathsGlobal() : ClaudecodeSubagent.getSettablePaths();
4094
+ const paths = ClaudecodeSubagent.getSettablePaths({ global: this.global });
4113
4095
  return await this.loadToolSubagentsDefault({
4114
4096
  relativeDirPath: paths.relativeDirPath,
4115
4097
  fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
@@ -4345,10 +4327,7 @@ var ToolRule = class extends ToolFile {
4345
4327
  this.description = description;
4346
4328
  this.globs = globs;
4347
4329
  }
4348
- static getSettablePaths() {
4349
- throw new Error("Please implement this method in the subclass.");
4350
- }
4351
- static getSettablePathsGlobal() {
4330
+ static getSettablePaths(_options = {}) {
4352
4331
  throw new Error("Please implement this method in the subclass.");
4353
4332
  }
4354
4333
  static async fromFile(_params) {
@@ -4712,7 +4691,17 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
4712
4691
  // src/rules/claudecode-rule.ts
4713
4692
  var import_node_path43 = require("path");
4714
4693
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4715
- static getSettablePaths() {
4694
+ static getSettablePaths({
4695
+ global
4696
+ } = {}) {
4697
+ if (global) {
4698
+ return {
4699
+ root: {
4700
+ relativeDirPath: ".claude",
4701
+ relativeFilePath: "CLAUDE.md"
4702
+ }
4703
+ };
4704
+ }
4716
4705
  return {
4717
4706
  root: {
4718
4707
  relativeDirPath: ".",
@@ -4723,21 +4712,13 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4723
4712
  }
4724
4713
  };
4725
4714
  }
4726
- static getSettablePathsGlobal() {
4727
- return {
4728
- root: {
4729
- relativeDirPath: ".claude",
4730
- relativeFilePath: "CLAUDE.md"
4731
- }
4732
- };
4733
- }
4734
4715
  static async fromFile({
4735
4716
  baseDir = ".",
4736
4717
  relativeFilePath,
4737
4718
  validate = true,
4738
4719
  global = false
4739
4720
  }) {
4740
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4721
+ const paths = this.getSettablePaths({ global });
4741
4722
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
4742
4723
  if (isRoot) {
4743
4724
  const relativePath2 = paths.root.relativeFilePath;
@@ -4773,7 +4754,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4773
4754
  validate = true,
4774
4755
  global = false
4775
4756
  }) {
4776
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4757
+ const paths = this.getSettablePaths({ global });
4777
4758
  return new _ClaudecodeRule(
4778
4759
  this.buildToolRuleParamsDefault({
4779
4760
  baseDir,
@@ -4859,7 +4840,17 @@ var ClineRule = class _ClineRule extends ToolRule {
4859
4840
  // src/rules/codexcli-rule.ts
4860
4841
  var import_node_path45 = require("path");
4861
4842
  var CodexcliRule = class _CodexcliRule extends ToolRule {
4862
- static getSettablePaths() {
4843
+ static getSettablePaths({
4844
+ global
4845
+ } = {}) {
4846
+ if (global) {
4847
+ return {
4848
+ root: {
4849
+ relativeDirPath: ".codex",
4850
+ relativeFilePath: "AGENTS.md"
4851
+ }
4852
+ };
4853
+ }
4863
4854
  return {
4864
4855
  root: {
4865
4856
  relativeDirPath: ".",
@@ -4870,21 +4861,13 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4870
4861
  }
4871
4862
  };
4872
4863
  }
4873
- static getSettablePathsGlobal() {
4874
- return {
4875
- root: {
4876
- relativeDirPath: ".codex",
4877
- relativeFilePath: "AGENTS.md"
4878
- }
4879
- };
4880
- }
4881
4864
  static async fromFile({
4882
4865
  baseDir = ".",
4883
4866
  relativeFilePath,
4884
4867
  validate = true,
4885
4868
  global = false
4886
4869
  }) {
4887
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4870
+ const paths = this.getSettablePaths({ global });
4888
4871
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
4889
4872
  if (isRoot) {
4890
4873
  const relativePath2 = paths.root.relativeFilePath;
@@ -4920,7 +4903,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4920
4903
  validate = true,
4921
4904
  global = false
4922
4905
  }) {
4923
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4906
+ const paths = this.getSettablePaths({ global });
4924
4907
  return new _CodexcliRule(
4925
4908
  this.buildToolRuleParamsAgentsmd({
4926
4909
  baseDir,
@@ -4990,12 +4973,14 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4990
4973
  description: this.frontmatter.description,
4991
4974
  globs: this.isRoot() ? ["**/*"] : []
4992
4975
  };
4976
+ const originalFilePath = this.getRelativeFilePath();
4977
+ const relativeFilePath = originalFilePath.replace(/\.instructions\.md$/, ".md");
4993
4978
  return new RulesyncRule({
4994
4979
  baseDir: this.getBaseDir(),
4995
4980
  frontmatter: rulesyncFrontmatter,
4996
4981
  body: this.body,
4997
4982
  relativeDirPath: ".rulesync/rules",
4998
- relativeFilePath: this.getRelativeFilePath(),
4983
+ relativeFilePath,
4999
4984
  validate: true
5000
4985
  });
5001
4986
  }
@@ -5288,7 +5273,17 @@ var CursorRule = class _CursorRule extends ToolRule {
5288
5273
  // src/rules/geminicli-rule.ts
5289
5274
  var import_node_path48 = require("path");
5290
5275
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5291
- static getSettablePaths() {
5276
+ static getSettablePaths({
5277
+ global
5278
+ } = {}) {
5279
+ if (global) {
5280
+ return {
5281
+ root: {
5282
+ relativeDirPath: ".gemini",
5283
+ relativeFilePath: "GEMINI.md"
5284
+ }
5285
+ };
5286
+ }
5292
5287
  return {
5293
5288
  root: {
5294
5289
  relativeDirPath: ".",
@@ -5299,21 +5294,13 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5299
5294
  }
5300
5295
  };
5301
5296
  }
5302
- static getSettablePathsGlobal() {
5303
- return {
5304
- root: {
5305
- relativeDirPath: ".gemini",
5306
- relativeFilePath: "GEMINI.md"
5307
- }
5308
- };
5309
- }
5310
5297
  static async fromFile({
5311
5298
  baseDir = ".",
5312
5299
  relativeFilePath,
5313
5300
  validate = true,
5314
5301
  global = false
5315
5302
  }) {
5316
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
5303
+ const paths = this.getSettablePaths({ global });
5317
5304
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
5318
5305
  if (isRoot) {
5319
5306
  const relativePath2 = paths.root.relativeFilePath;
@@ -5349,7 +5336,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5349
5336
  validate = true,
5350
5337
  global = false
5351
5338
  }) {
5352
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
5339
+ const paths = this.getSettablePaths({ global });
5353
5340
  return new _GeminiCliRule(
5354
5341
  this.buildToolRuleParamsDefault({
5355
5342
  baseDir,
@@ -6361,7 +6348,7 @@ var RulesProcessor = class extends FeatureProcessor {
6361
6348
  * Load Claude Code rule configuration from CLAUDE.md file
6362
6349
  */
6363
6350
  async loadClaudecodeRules() {
6364
- const settablePaths = this.global ? ClaudecodeRule.getSettablePathsGlobal() : ClaudecodeRule.getSettablePaths();
6351
+ const settablePaths = ClaudecodeRule.getSettablePaths({ global: this.global });
6365
6352
  return this.loadToolRulesDefault({
6366
6353
  root: {
6367
6354
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -6394,7 +6381,7 @@ var RulesProcessor = class extends FeatureProcessor {
6394
6381
  * Load OpenAI Codex CLI rule configuration from AGENTS.md and .codex/memories/*.md files
6395
6382
  */
6396
6383
  async loadCodexcliRules() {
6397
- const settablePaths = this.global ? CodexcliRule.getSettablePathsGlobal() : CodexcliRule.getSettablePaths();
6384
+ const settablePaths = CodexcliRule.getSettablePaths({ global: this.global });
6398
6385
  return await this.loadToolRulesDefault({
6399
6386
  root: {
6400
6387
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -6445,7 +6432,7 @@ var RulesProcessor = class extends FeatureProcessor {
6445
6432
  * Load Gemini CLI rule configuration from GEMINI.md file
6446
6433
  */
6447
6434
  async loadGeminicliRules() {
6448
- const settablePaths = this.global ? GeminiCliRule.getSettablePathsGlobal() : GeminiCliRule.getSettablePaths();
6435
+ const settablePaths = GeminiCliRule.getSettablePaths({ global: this.global });
6449
6436
  return await this.loadToolRulesDefault({
6450
6437
  root: {
6451
6438
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -7172,7 +7159,7 @@ globs: ["**/*"]
7172
7159
  }
7173
7160
 
7174
7161
  // src/cli/index.ts
7175
- var getVersion = () => "3.5.0";
7162
+ var getVersion = () => "3.5.2";
7176
7163
  var main = async () => {
7177
7164
  const program = new import_commander.Command();
7178
7165
  const version = getVersion();
package/dist/index.js CHANGED
@@ -691,12 +691,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
691
691
  this.frontmatter = frontmatter;
692
692
  this.body = body;
693
693
  }
694
- static getSettablePaths() {
695
- return {
696
- relativeDirPath: ".claude/commands"
697
- };
698
- }
699
- static getSettablePathsGlobal() {
694
+ static getSettablePaths(_options = {}) {
700
695
  return {
701
696
  relativeDirPath: join5(".claude", "commands")
702
697
  };
@@ -735,7 +730,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
735
730
  description: rulesyncFrontmatter.description
736
731
  };
737
732
  const body = rulesyncCommand.getBody();
738
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
733
+ const paths = this.getSettablePaths({ global });
739
734
  return new _ClaudecodeCommand({
740
735
  baseDir,
741
736
  frontmatter: claudecodeFrontmatter,
@@ -773,7 +768,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
773
768
  validate = true,
774
769
  global = false
775
770
  }) {
776
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
771
+ const paths = this.getSettablePaths({ global });
777
772
  const filePath = join5(baseDir, paths.relativeDirPath, relativeFilePath);
778
773
  const fileContent = await readFileContent(filePath);
779
774
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
@@ -795,10 +790,10 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
795
790
  // src/commands/codexcli-command.ts
796
791
  import { basename as basename6, join as join6 } from "path";
797
792
  var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
798
- static getSettablePaths() {
799
- throw new Error("getSettablePaths is not supported for CodexcliCommand");
800
- }
801
- static getSettablePathsGlobal() {
793
+ static getSettablePaths({ global } = {}) {
794
+ if (!global) {
795
+ throw new Error("CodexcliCommand only supports global mode. Please pass { global: true }.");
796
+ }
802
797
  return {
803
798
  relativeDirPath: join6(".codex", "prompts")
804
799
  };
@@ -825,7 +820,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
825
820
  validate = true,
826
821
  global = false
827
822
  }) {
828
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
823
+ const paths = this.getSettablePaths({ global });
829
824
  return new _CodexcliCommand({
830
825
  baseDir,
831
826
  fileContent: rulesyncCommand.getBody(),
@@ -852,7 +847,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
852
847
  validate = true,
853
848
  global = false
854
849
  }) {
855
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
850
+ const paths = this.getSettablePaths({ global });
856
851
  const filePath = join6(baseDir, paths.relativeDirPath, relativeFilePath);
857
852
  const fileContent = await readFileContent(filePath);
858
853
  const { body: content } = parseFrontmatter(fileContent);
@@ -908,12 +903,14 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
908
903
  targets: ["*"],
909
904
  description: this.frontmatter.description
910
905
  };
906
+ const originalFilePath = this.relativeFilePath;
907
+ const relativeFilePath = originalFilePath.replace(/\.prompt\.md$/, ".md");
911
908
  return new RulesyncCommand({
912
909
  baseDir: ".",
913
910
  frontmatter: rulesyncFrontmatter,
914
911
  body: this.body,
915
912
  relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
916
- relativeFilePath: this.relativeFilePath,
913
+ relativeFilePath,
917
914
  fileContent: this.getFileContent(),
918
915
  validate: true
919
916
  });
@@ -990,12 +987,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
990
987
  // src/commands/cursor-command.ts
991
988
  import { basename as basename8, join as join8 } from "path";
992
989
  var CursorCommand = class _CursorCommand extends ToolCommand {
993
- static getSettablePaths() {
994
- return {
995
- relativeDirPath: join8(".cursor", "commands")
996
- };
997
- }
998
- static getSettablePathsGlobal() {
990
+ static getSettablePaths(_options = {}) {
999
991
  return {
1000
992
  relativeDirPath: join8(".cursor", "commands")
1001
993
  };
@@ -1022,7 +1014,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1022
1014
  validate = true,
1023
1015
  global = false
1024
1016
  }) {
1025
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1017
+ const paths = this.getSettablePaths({ global });
1026
1018
  return new _CursorCommand({
1027
1019
  baseDir,
1028
1020
  fileContent: rulesyncCommand.getBody(),
@@ -1049,7 +1041,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1049
1041
  validate = true,
1050
1042
  global = false
1051
1043
  }) {
1052
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1044
+ const paths = this.getSettablePaths({ global });
1053
1045
  const filePath = join8(baseDir, paths.relativeDirPath, relativeFilePath);
1054
1046
  const fileContent = await readFileContent(filePath);
1055
1047
  const { body: content } = parseFrontmatter(fileContent);
@@ -1080,12 +1072,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1080
1072
  this.frontmatter = parsed;
1081
1073
  this.body = parsed.prompt;
1082
1074
  }
1083
- static getSettablePaths() {
1084
- return {
1085
- relativeDirPath: ".gemini/commands"
1086
- };
1087
- }
1088
- static getSettablePathsGlobal() {
1075
+ static getSettablePaths(_options = {}) {
1089
1076
  return {
1090
1077
  relativeDirPath: join9(".gemini", "commands")
1091
1078
  };
@@ -1146,7 +1133,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1146
1133
  prompt = """
1147
1134
  ${geminiFrontmatter.prompt}
1148
1135
  """`;
1149
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1136
+ const paths = this.getSettablePaths({ global });
1150
1137
  return new _GeminiCliCommand({
1151
1138
  baseDir,
1152
1139
  relativeDirPath: paths.relativeDirPath,
@@ -1161,7 +1148,7 @@ ${geminiFrontmatter.prompt}
1161
1148
  validate = true,
1162
1149
  global = false
1163
1150
  }) {
1164
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
1151
+ const paths = this.getSettablePaths({ global });
1165
1152
  const filePath = join9(baseDir, paths.relativeDirPath, relativeFilePath);
1166
1153
  const fileContent = await readFileContent(filePath);
1167
1154
  return new _GeminiCliCommand({
@@ -1555,7 +1542,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1555
1542
  * Load Claude Code command configurations from .claude/commands/ directory
1556
1543
  */
1557
1544
  async loadClaudecodeCommands() {
1558
- const paths = this.global ? ClaudecodeCommand.getSettablePathsGlobal() : ClaudecodeCommand.getSettablePaths();
1545
+ const paths = ClaudecodeCommand.getSettablePaths({ global: this.global });
1559
1546
  return await this.loadToolCommandDefault({
1560
1547
  toolTarget: "claudecode",
1561
1548
  relativeDirPath: paths.relativeDirPath,
@@ -1566,7 +1553,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1566
1553
  * Load Cursor command configurations from .cursor/commands/ directory
1567
1554
  */
1568
1555
  async loadCursorCommands() {
1569
- const paths = this.global ? CursorCommand.getSettablePathsGlobal() : CursorCommand.getSettablePaths();
1556
+ const paths = CursorCommand.getSettablePaths({ global: this.global });
1570
1557
  return await this.loadToolCommandDefault({
1571
1558
  toolTarget: "cursor",
1572
1559
  relativeDirPath: paths.relativeDirPath,
@@ -1577,7 +1564,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1577
1564
  * Load Gemini CLI command configurations from .gemini/commands/ directory
1578
1565
  */
1579
1566
  async loadGeminicliCommands() {
1580
- const paths = this.global ? GeminiCliCommand.getSettablePathsGlobal() : GeminiCliCommand.getSettablePaths();
1567
+ const paths = GeminiCliCommand.getSettablePaths({ global: this.global });
1581
1568
  return await this.loadToolCommandDefault({
1582
1569
  toolTarget: "geminicli",
1583
1570
  relativeDirPath: paths.relativeDirPath,
@@ -1588,7 +1575,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1588
1575
  * Load Codex CLI command configurations from .codex/prompts/ directory
1589
1576
  */
1590
1577
  async loadCodexcliCommands() {
1591
- const paths = this.global ? CodexcliCommand.getSettablePathsGlobal() : CodexcliCommand.getSettablePaths();
1578
+ const paths = CodexcliCommand.getSettablePaths({ global: this.global });
1592
1579
  return await this.loadToolCommandDefault({
1593
1580
  toolTarget: "codexcli",
1594
1581
  relativeDirPath: paths.relativeDirPath,
@@ -2774,24 +2761,24 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2774
2761
  getJson() {
2775
2762
  return this.json;
2776
2763
  }
2777
- static getSettablePaths() {
2764
+ static getSettablePaths({ global } = {}) {
2765
+ if (global) {
2766
+ return {
2767
+ relativeDirPath: ".claude",
2768
+ relativeFilePath: ".claude.json"
2769
+ };
2770
+ }
2778
2771
  return {
2779
2772
  relativeDirPath: ".",
2780
2773
  relativeFilePath: ".mcp.json"
2781
2774
  };
2782
2775
  }
2783
- static getSettablePathsGlobal() {
2784
- return {
2785
- relativeDirPath: ".claude",
2786
- relativeFilePath: ".claude.json"
2787
- };
2788
- }
2789
2776
  static async fromFile({
2790
2777
  baseDir = ".",
2791
2778
  validate = true,
2792
2779
  global = false
2793
2780
  }) {
2794
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2781
+ const paths = this.getSettablePaths({ global });
2795
2782
  const fileContent = await readOrInitializeFileContent(
2796
2783
  join26(baseDir, paths.relativeDirPath, paths.relativeFilePath),
2797
2784
  JSON.stringify({ mcpServers: {} }, null, 2)
@@ -2812,7 +2799,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2812
2799
  validate = true,
2813
2800
  global = false
2814
2801
  }) {
2815
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2802
+ const paths = this.getSettablePaths({ global });
2816
2803
  const fileContent = await readOrInitializeFileContent(
2817
2804
  join26(baseDir, paths.relativeDirPath, paths.relativeFilePath),
2818
2805
  JSON.stringify({ mcpServers: {} }, null, 2)
@@ -2915,10 +2902,10 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2915
2902
  getToml() {
2916
2903
  return this.toml;
2917
2904
  }
2918
- static getSettablePaths() {
2919
- throw new Error("getSettablePaths is not supported for CodexcliMcp");
2920
- }
2921
- static getSettablePathsGlobal() {
2905
+ static getSettablePaths({ global } = {}) {
2906
+ if (!global) {
2907
+ throw new Error("CodexcliMcp only supports global mode. Please pass { global: true }.");
2908
+ }
2922
2909
  return {
2923
2910
  relativeDirPath: ".codex",
2924
2911
  relativeFilePath: "config.toml"
@@ -2929,7 +2916,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2929
2916
  validate = true,
2930
2917
  global = false
2931
2918
  }) {
2932
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2919
+ const paths = this.getSettablePaths({ global });
2933
2920
  const fileContent = await readFileContent(
2934
2921
  join28(baseDir, paths.relativeDirPath, paths.relativeFilePath)
2935
2922
  );
@@ -2947,7 +2934,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
2947
2934
  validate = true,
2948
2935
  global = false
2949
2936
  }) {
2950
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
2937
+ const paths = this.getSettablePaths({ global });
2951
2938
  const configTomlFilePath = join28(baseDir, paths.relativeDirPath, paths.relativeFilePath);
2952
2939
  const configTomlFileContent = await readOrInitializeFileContent(
2953
2940
  configTomlFilePath,
@@ -3764,12 +3751,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3764
3751
  this.frontmatter = frontmatter;
3765
3752
  this.body = body;
3766
3753
  }
3767
- static getSettablePaths() {
3768
- return {
3769
- relativeDirPath: ".claude/agents"
3770
- };
3771
- }
3772
- static getSettablePathsGlobal() {
3754
+ static getSettablePaths(_options = {}) {
3773
3755
  return {
3774
3756
  relativeDirPath: join34(".claude", "agents")
3775
3757
  };
@@ -3817,7 +3799,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3817
3799
  };
3818
3800
  const body = rulesyncSubagent.getBody();
3819
3801
  const fileContent = stringifyFrontmatter(body, claudecodeFrontmatter);
3820
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
3802
+ const paths = this.getSettablePaths({ global });
3821
3803
  return new _ClaudecodeSubagent({
3822
3804
  baseDir,
3823
3805
  frontmatter: claudecodeFrontmatter,
@@ -3856,7 +3838,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3856
3838
  validate = true,
3857
3839
  global = false
3858
3840
  }) {
3859
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
3841
+ const paths = this.getSettablePaths({ global });
3860
3842
  const filePath = join34(baseDir, paths.relativeDirPath, relativeFilePath);
3861
3843
  const fileContent = await readFileContent(filePath);
3862
3844
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
@@ -4086,7 +4068,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4086
4068
  * Load Claude Code subagent configurations from .claude/agents/ directory
4087
4069
  */
4088
4070
  async loadClaudecodeSubagents() {
4089
- const paths = this.global ? ClaudecodeSubagent.getSettablePathsGlobal() : ClaudecodeSubagent.getSettablePaths();
4071
+ const paths = ClaudecodeSubagent.getSettablePaths({ global: this.global });
4090
4072
  return await this.loadToolSubagentsDefault({
4091
4073
  relativeDirPath: paths.relativeDirPath,
4092
4074
  fromFile: (relativeFilePath) => ClaudecodeSubagent.fromFile({
@@ -4322,10 +4304,7 @@ var ToolRule = class extends ToolFile {
4322
4304
  this.description = description;
4323
4305
  this.globs = globs;
4324
4306
  }
4325
- static getSettablePaths() {
4326
- throw new Error("Please implement this method in the subclass.");
4327
- }
4328
- static getSettablePathsGlobal() {
4307
+ static getSettablePaths(_options = {}) {
4329
4308
  throw new Error("Please implement this method in the subclass.");
4330
4309
  }
4331
4310
  static async fromFile(_params) {
@@ -4689,7 +4668,17 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
4689
4668
  // src/rules/claudecode-rule.ts
4690
4669
  import { join as join42 } from "path";
4691
4670
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4692
- static getSettablePaths() {
4671
+ static getSettablePaths({
4672
+ global
4673
+ } = {}) {
4674
+ if (global) {
4675
+ return {
4676
+ root: {
4677
+ relativeDirPath: ".claude",
4678
+ relativeFilePath: "CLAUDE.md"
4679
+ }
4680
+ };
4681
+ }
4693
4682
  return {
4694
4683
  root: {
4695
4684
  relativeDirPath: ".",
@@ -4700,21 +4689,13 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4700
4689
  }
4701
4690
  };
4702
4691
  }
4703
- static getSettablePathsGlobal() {
4704
- return {
4705
- root: {
4706
- relativeDirPath: ".claude",
4707
- relativeFilePath: "CLAUDE.md"
4708
- }
4709
- };
4710
- }
4711
4692
  static async fromFile({
4712
4693
  baseDir = ".",
4713
4694
  relativeFilePath,
4714
4695
  validate = true,
4715
4696
  global = false
4716
4697
  }) {
4717
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4698
+ const paths = this.getSettablePaths({ global });
4718
4699
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
4719
4700
  if (isRoot) {
4720
4701
  const relativePath2 = paths.root.relativeFilePath;
@@ -4750,7 +4731,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4750
4731
  validate = true,
4751
4732
  global = false
4752
4733
  }) {
4753
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4734
+ const paths = this.getSettablePaths({ global });
4754
4735
  return new _ClaudecodeRule(
4755
4736
  this.buildToolRuleParamsDefault({
4756
4737
  baseDir,
@@ -4836,7 +4817,17 @@ var ClineRule = class _ClineRule extends ToolRule {
4836
4817
  // src/rules/codexcli-rule.ts
4837
4818
  import { join as join44 } from "path";
4838
4819
  var CodexcliRule = class _CodexcliRule extends ToolRule {
4839
- static getSettablePaths() {
4820
+ static getSettablePaths({
4821
+ global
4822
+ } = {}) {
4823
+ if (global) {
4824
+ return {
4825
+ root: {
4826
+ relativeDirPath: ".codex",
4827
+ relativeFilePath: "AGENTS.md"
4828
+ }
4829
+ };
4830
+ }
4840
4831
  return {
4841
4832
  root: {
4842
4833
  relativeDirPath: ".",
@@ -4847,21 +4838,13 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4847
4838
  }
4848
4839
  };
4849
4840
  }
4850
- static getSettablePathsGlobal() {
4851
- return {
4852
- root: {
4853
- relativeDirPath: ".codex",
4854
- relativeFilePath: "AGENTS.md"
4855
- }
4856
- };
4857
- }
4858
4841
  static async fromFile({
4859
4842
  baseDir = ".",
4860
4843
  relativeFilePath,
4861
4844
  validate = true,
4862
4845
  global = false
4863
4846
  }) {
4864
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4847
+ const paths = this.getSettablePaths({ global });
4865
4848
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
4866
4849
  if (isRoot) {
4867
4850
  const relativePath2 = paths.root.relativeFilePath;
@@ -4897,7 +4880,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4897
4880
  validate = true,
4898
4881
  global = false
4899
4882
  }) {
4900
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
4883
+ const paths = this.getSettablePaths({ global });
4901
4884
  return new _CodexcliRule(
4902
4885
  this.buildToolRuleParamsAgentsmd({
4903
4886
  baseDir,
@@ -4967,12 +4950,14 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4967
4950
  description: this.frontmatter.description,
4968
4951
  globs: this.isRoot() ? ["**/*"] : []
4969
4952
  };
4953
+ const originalFilePath = this.getRelativeFilePath();
4954
+ const relativeFilePath = originalFilePath.replace(/\.instructions\.md$/, ".md");
4970
4955
  return new RulesyncRule({
4971
4956
  baseDir: this.getBaseDir(),
4972
4957
  frontmatter: rulesyncFrontmatter,
4973
4958
  body: this.body,
4974
4959
  relativeDirPath: ".rulesync/rules",
4975
- relativeFilePath: this.getRelativeFilePath(),
4960
+ relativeFilePath,
4976
4961
  validate: true
4977
4962
  });
4978
4963
  }
@@ -5265,7 +5250,17 @@ var CursorRule = class _CursorRule extends ToolRule {
5265
5250
  // src/rules/geminicli-rule.ts
5266
5251
  import { join as join47 } from "path";
5267
5252
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5268
- static getSettablePaths() {
5253
+ static getSettablePaths({
5254
+ global
5255
+ } = {}) {
5256
+ if (global) {
5257
+ return {
5258
+ root: {
5259
+ relativeDirPath: ".gemini",
5260
+ relativeFilePath: "GEMINI.md"
5261
+ }
5262
+ };
5263
+ }
5269
5264
  return {
5270
5265
  root: {
5271
5266
  relativeDirPath: ".",
@@ -5276,21 +5271,13 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5276
5271
  }
5277
5272
  };
5278
5273
  }
5279
- static getSettablePathsGlobal() {
5280
- return {
5281
- root: {
5282
- relativeDirPath: ".gemini",
5283
- relativeFilePath: "GEMINI.md"
5284
- }
5285
- };
5286
- }
5287
5274
  static async fromFile({
5288
5275
  baseDir = ".",
5289
5276
  relativeFilePath,
5290
5277
  validate = true,
5291
5278
  global = false
5292
5279
  }) {
5293
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
5280
+ const paths = this.getSettablePaths({ global });
5294
5281
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
5295
5282
  if (isRoot) {
5296
5283
  const relativePath2 = paths.root.relativeFilePath;
@@ -5326,7 +5313,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5326
5313
  validate = true,
5327
5314
  global = false
5328
5315
  }) {
5329
- const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
5316
+ const paths = this.getSettablePaths({ global });
5330
5317
  return new _GeminiCliRule(
5331
5318
  this.buildToolRuleParamsDefault({
5332
5319
  baseDir,
@@ -6338,7 +6325,7 @@ var RulesProcessor = class extends FeatureProcessor {
6338
6325
  * Load Claude Code rule configuration from CLAUDE.md file
6339
6326
  */
6340
6327
  async loadClaudecodeRules() {
6341
- const settablePaths = this.global ? ClaudecodeRule.getSettablePathsGlobal() : ClaudecodeRule.getSettablePaths();
6328
+ const settablePaths = ClaudecodeRule.getSettablePaths({ global: this.global });
6342
6329
  return this.loadToolRulesDefault({
6343
6330
  root: {
6344
6331
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -6371,7 +6358,7 @@ var RulesProcessor = class extends FeatureProcessor {
6371
6358
  * Load OpenAI Codex CLI rule configuration from AGENTS.md and .codex/memories/*.md files
6372
6359
  */
6373
6360
  async loadCodexcliRules() {
6374
- const settablePaths = this.global ? CodexcliRule.getSettablePathsGlobal() : CodexcliRule.getSettablePaths();
6361
+ const settablePaths = CodexcliRule.getSettablePaths({ global: this.global });
6375
6362
  return await this.loadToolRulesDefault({
6376
6363
  root: {
6377
6364
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -6422,7 +6409,7 @@ var RulesProcessor = class extends FeatureProcessor {
6422
6409
  * Load Gemini CLI rule configuration from GEMINI.md file
6423
6410
  */
6424
6411
  async loadGeminicliRules() {
6425
- const settablePaths = this.global ? GeminiCliRule.getSettablePathsGlobal() : GeminiCliRule.getSettablePaths();
6412
+ const settablePaths = GeminiCliRule.getSettablePaths({ global: this.global });
6426
6413
  return await this.loadToolRulesDefault({
6427
6414
  root: {
6428
6415
  relativeDirPath: settablePaths.root.relativeDirPath,
@@ -7149,7 +7136,7 @@ globs: ["**/*"]
7149
7136
  }
7150
7137
 
7151
7138
  // src/cli/index.ts
7152
- var getVersion = () => "3.5.0";
7139
+ var getVersion = () => "3.5.2";
7153
7140
  var main = async () => {
7154
7141
  const program = new Command();
7155
7142
  const version = getVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",
@@ -49,34 +49,34 @@
49
49
  "zod": "4.1.12"
50
50
  },
51
51
  "devDependencies": {
52
- "@anthropic-ai/claude-agent-sdk": "0.1.14",
53
- "@biomejs/biome": "2.2.5",
52
+ "@anthropic-ai/claude-agent-sdk": "0.1.15",
53
+ "@biomejs/biome": "2.2.6",
54
54
  "@eslint/js": "9.37.0",
55
55
  "@secretlint/secretlint-rule-preset-recommend": "11.2.5",
56
56
  "@tsconfig/node24": "24.0.1",
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.20251012.1",
60
+ "@typescript/native-preview": "7.0.0-dev.20251014.1",
61
61
  "@vitest/coverage-v8": "3.2.4",
62
62
  "cspell": "9.2.1",
63
63
  "eslint": "9.37.0",
64
64
  "eslint-plugin-import": "2.32.0",
65
65
  "eslint-plugin-no-type-assertion": "1.3.0",
66
- "eslint-plugin-oxlint": "1.22.0",
67
- "eslint-plugin-strict-dependencies": "1.3.26",
66
+ "eslint-plugin-oxlint": "1.23.0",
67
+ "eslint-plugin-strict-dependencies": "1.3.27",
68
68
  "eslint-plugin-zod-import": "0.3.0",
69
- "knip": "5.64.3",
69
+ "knip": "5.65.0",
70
70
  "lint-staged": "16.2.4",
71
71
  "o3-search-mcp": "0.0.9",
72
- "oxlint": "1.22.0",
72
+ "oxlint": "1.23.0",
73
73
  "secretlint": "11.2.5",
74
74
  "simple-git-hooks": "2.13.1",
75
75
  "sort-package-json": "3.4.0",
76
76
  "tsup": "8.5.0",
77
77
  "tsx": "4.20.6",
78
78
  "typescript": "5.9.3",
79
- "typescript-eslint": "8.46.0",
79
+ "typescript-eslint": "8.46.1",
80
80
  "vitest": "3.2.4"
81
81
  },
82
82
  "engines": {