rulesync 2.2.0 → 3.0.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/dist/index.js CHANGED
@@ -613,10 +613,84 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
613
613
  };
614
614
 
615
615
  // src/commands/codexcli-command.ts
616
- import { basename as basename5, join as join5 } from "path";
616
+ import { basename as basename4, join as join4 } from "path";
617
+ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
618
+ static getSettablePaths() {
619
+ throw new Error("getSettablePaths is not supported for CodexcliCommand");
620
+ }
621
+ static getSettablePathsGlobal() {
622
+ return {
623
+ relativeDirPath: join4(".codex", "prompts")
624
+ };
625
+ }
626
+ toRulesyncCommand() {
627
+ const rulesyncFrontmatter = {
628
+ targets: ["*"],
629
+ description: ""
630
+ };
631
+ return new RulesyncCommand({
632
+ baseDir: ".",
633
+ // RulesyncCommand baseDir is always the project root directory
634
+ frontmatter: rulesyncFrontmatter,
635
+ body: this.getFileContent(),
636
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
637
+ relativeFilePath: this.relativeFilePath,
638
+ fileContent: this.getFileContent(),
639
+ validate: true
640
+ });
641
+ }
642
+ static fromRulesyncCommand({
643
+ baseDir = ".",
644
+ rulesyncCommand,
645
+ validate = true,
646
+ global = false
647
+ }) {
648
+ const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
649
+ return new _CodexcliCommand({
650
+ baseDir,
651
+ fileContent: rulesyncCommand.getBody(),
652
+ relativeDirPath: paths.relativeDirPath,
653
+ relativeFilePath: rulesyncCommand.getRelativeFilePath(),
654
+ validate
655
+ });
656
+ }
657
+ validate() {
658
+ return { success: true, error: null };
659
+ }
660
+ getBody() {
661
+ return this.getFileContent();
662
+ }
663
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
664
+ return this.isTargetedByRulesyncCommandDefault({
665
+ rulesyncCommand,
666
+ toolTarget: "codexcli"
667
+ });
668
+ }
669
+ static async fromFile({
670
+ baseDir = ".",
671
+ relativeFilePath,
672
+ validate = true,
673
+ global = false
674
+ }) {
675
+ const paths = global ? this.getSettablePathsGlobal() : this.getSettablePaths();
676
+ const filePath = join4(baseDir, paths.relativeDirPath, relativeFilePath);
677
+ const fileContent = await readFileContent(filePath);
678
+ const { body: content } = parseFrontmatter(fileContent);
679
+ return new _CodexcliCommand({
680
+ baseDir,
681
+ relativeDirPath: paths.relativeDirPath,
682
+ relativeFilePath: basename4(relativeFilePath),
683
+ fileContent: content.trim(),
684
+ validate
685
+ });
686
+ }
687
+ };
688
+
689
+ // src/commands/copilot-command.ts
690
+ import { basename as basename6, join as join6 } from "path";
617
691
 
618
692
  // src/commands/simulated-command.ts
619
- import { basename as basename4, join as join4 } from "path";
693
+ import { basename as basename5, join as join5 } from "path";
620
694
  import { z as z5 } from "zod/mini";
621
695
  var SimulatedCommandFrontmatterSchema = z5.object({
622
696
  description: z5.string()
@@ -682,7 +756,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
682
756
  relativeFilePath,
683
757
  validate = true
684
758
  }) {
685
- const filePath = join4(
759
+ const filePath = join5(
686
760
  baseDir,
687
761
  _SimulatedCommand.getSettablePaths().relativeDirPath,
688
762
  relativeFilePath
@@ -696,65 +770,15 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
696
770
  return {
697
771
  baseDir,
698
772
  relativeDirPath: _SimulatedCommand.getSettablePaths().relativeDirPath,
699
- relativeFilePath: basename4(relativeFilePath),
700
- frontmatter: result.data,
701
- body: content.trim(),
702
- validate
703
- };
704
- }
705
- };
706
-
707
- // src/commands/codexcli-command.ts
708
- var CodexCliCommand = class _CodexCliCommand extends SimulatedCommand {
709
- static getSettablePaths() {
710
- return {
711
- relativeDirPath: ".codex/commands"
712
- };
713
- }
714
- static fromRulesyncCommand({
715
- baseDir = ".",
716
- rulesyncCommand,
717
- validate = true
718
- }) {
719
- return new _CodexCliCommand(
720
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
721
- );
722
- }
723
- static async fromFile({
724
- baseDir = ".",
725
- relativeFilePath,
726
- validate = true
727
- }) {
728
- const filePath = join5(
729
- baseDir,
730
- _CodexCliCommand.getSettablePaths().relativeDirPath,
731
- relativeFilePath
732
- );
733
- const fileContent = await readFileContent(filePath);
734
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
735
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
736
- if (!result.success) {
737
- throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
738
- }
739
- return new _CodexCliCommand({
740
- baseDir,
741
- relativeDirPath: _CodexCliCommand.getSettablePaths().relativeDirPath,
742
773
  relativeFilePath: basename5(relativeFilePath),
743
774
  frontmatter: result.data,
744
775
  body: content.trim(),
745
776
  validate
746
- });
747
- }
748
- static isTargetedByRulesyncCommand(rulesyncCommand) {
749
- return this.isTargetedByRulesyncCommandDefault({
750
- rulesyncCommand,
751
- toolTarget: "codexcli"
752
- });
777
+ };
753
778
  }
754
779
  };
755
780
 
756
781
  // src/commands/copilot-command.ts
757
- import { basename as basename6, join as join6 } from "path";
758
782
  var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
759
783
  static getSettablePaths() {
760
784
  return {
@@ -1121,11 +1145,19 @@ var commandsProcessorToolTargets = [
1121
1145
  "geminicli",
1122
1146
  "roo",
1123
1147
  "copilot",
1148
+ "cursor"
1149
+ ];
1150
+ var CommandsProcessorToolTargetSchema = z8.enum(
1151
+ // 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
1152
+ commandsProcessorToolTargets.concat("codexcli")
1153
+ );
1154
+ var commandsProcessorToolTargetsSimulated = ["copilot"];
1155
+ var commandsProcessorToolTargetsGlobal = [
1156
+ "claudecode",
1124
1157
  "cursor",
1158
+ "geminicli",
1125
1159
  "codexcli"
1126
1160
  ];
1127
- var CommandsProcessorToolTargetSchema = z8.enum(commandsProcessorToolTargets);
1128
- var commandsProcessorToolTargetsSimulated = ["copilot", "codexcli"];
1129
1161
  var CommandsProcessor = class extends FeatureProcessor {
1130
1162
  toolTarget;
1131
1163
  global;
@@ -1188,12 +1220,13 @@ var CommandsProcessor = class extends FeatureProcessor {
1188
1220
  global: this.global
1189
1221
  });
1190
1222
  case "codexcli":
1191
- if (!CodexCliCommand.isTargetedByRulesyncCommand(rulesyncCommand)) {
1223
+ if (!CodexcliCommand.isTargetedByRulesyncCommand(rulesyncCommand)) {
1192
1224
  return null;
1193
1225
  }
1194
- return CodexCliCommand.fromRulesyncCommand({
1226
+ return CodexcliCommand.fromRulesyncCommand({
1195
1227
  baseDir: this.baseDir,
1196
- rulesyncCommand
1228
+ rulesyncCommand,
1229
+ global: this.global
1197
1230
  });
1198
1231
  default:
1199
1232
  throw new Error(`Unsupported tool target: ${this.toolTarget}`);
@@ -1293,9 +1326,10 @@ var CommandsProcessor = class extends FeatureProcessor {
1293
1326
  global: this.global
1294
1327
  });
1295
1328
  case "codexcli":
1296
- return CodexCliCommand.fromFile({
1329
+ return CodexcliCommand.fromFile({
1297
1330
  baseDir: this.baseDir,
1298
- relativeFilePath: basename10(path2)
1331
+ relativeFilePath: basename10(path2),
1332
+ global: this.global
1299
1333
  });
1300
1334
  default:
1301
1335
  throw new Error(`Unsupported tool target: ${toolTarget}`);
@@ -1349,12 +1383,13 @@ var CommandsProcessor = class extends FeatureProcessor {
1349
1383
  });
1350
1384
  }
1351
1385
  /**
1352
- * Load Roo Code command configurations from .roo/commands/ directory
1386
+ * Load Codex CLI command configurations from .codex/prompts/ directory
1353
1387
  */
1354
1388
  async loadCodexcliCommands() {
1389
+ const paths = this.global ? CodexcliCommand.getSettablePathsGlobal() : CodexcliCommand.getSettablePaths();
1355
1390
  return await this.loadToolCommandDefault({
1356
1391
  toolTarget: "codexcli",
1357
- relativeDirPath: CodexCliCommand.getSettablePaths().relativeDirPath,
1392
+ relativeDirPath: paths.relativeDirPath,
1358
1393
  extension: "md"
1359
1394
  });
1360
1395
  }
@@ -1386,7 +1421,7 @@ var CommandsProcessor = class extends FeatureProcessor {
1386
1421
  return commandsProcessorToolTargetsSimulated;
1387
1422
  }
1388
1423
  static getToolTargetsGlobal() {
1389
- return ["claudecode", "cursor", "geminicli"];
1424
+ return commandsProcessorToolTargetsGlobal;
1390
1425
  }
1391
1426
  };
1392
1427
 
@@ -1856,55 +1891,8 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
1856
1891
  }
1857
1892
  };
1858
1893
 
1859
- // src/ignore/codexcli-ignore.ts
1860
- import { join as join16 } from "path";
1861
- var CodexcliIgnore = class _CodexcliIgnore extends ToolIgnore {
1862
- static getSettablePaths() {
1863
- return {
1864
- relativeDirPath: ".",
1865
- relativeFilePath: ".codexignore"
1866
- };
1867
- }
1868
- toRulesyncIgnore() {
1869
- return this.toRulesyncIgnoreDefault();
1870
- }
1871
- static fromRulesyncIgnore({
1872
- baseDir = ".",
1873
- rulesyncIgnore
1874
- }) {
1875
- const fileContent = rulesyncIgnore.getFileContent();
1876
- return new _CodexcliIgnore({
1877
- baseDir,
1878
- relativeDirPath: this.getSettablePaths().relativeDirPath,
1879
- relativeFilePath: this.getSettablePaths().relativeFilePath,
1880
- fileContent,
1881
- validate: true
1882
- // Skip validation to allow empty patterns
1883
- });
1884
- }
1885
- static async fromFile({
1886
- baseDir = ".",
1887
- validate = true
1888
- }) {
1889
- const fileContent = await readFileContent(
1890
- join16(
1891
- baseDir,
1892
- this.getSettablePaths().relativeDirPath,
1893
- this.getSettablePaths().relativeFilePath
1894
- )
1895
- );
1896
- return new _CodexcliIgnore({
1897
- baseDir,
1898
- relativeDirPath: this.getSettablePaths().relativeDirPath,
1899
- relativeFilePath: this.getSettablePaths().relativeFilePath,
1900
- fileContent,
1901
- validate
1902
- });
1903
- }
1904
- };
1905
-
1906
1894
  // src/ignore/cursor-ignore.ts
1907
- import { join as join17 } from "path";
1895
+ import { join as join16 } from "path";
1908
1896
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1909
1897
  static getSettablePaths() {
1910
1898
  return {
@@ -1937,7 +1925,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1937
1925
  validate = true
1938
1926
  }) {
1939
1927
  const fileContent = await readFileContent(
1940
- join17(
1928
+ join16(
1941
1929
  baseDir,
1942
1930
  this.getSettablePaths().relativeDirPath,
1943
1931
  this.getSettablePaths().relativeFilePath
@@ -1954,7 +1942,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1954
1942
  };
1955
1943
 
1956
1944
  // src/ignore/geminicli-ignore.ts
1957
- import { join as join18 } from "path";
1945
+ import { join as join17 } from "path";
1958
1946
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1959
1947
  static getSettablePaths() {
1960
1948
  return {
@@ -1981,7 +1969,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1981
1969
  validate = true
1982
1970
  }) {
1983
1971
  const fileContent = await readFileContent(
1984
- join18(
1972
+ join17(
1985
1973
  baseDir,
1986
1974
  this.getSettablePaths().relativeDirPath,
1987
1975
  this.getSettablePaths().relativeFilePath
@@ -1998,7 +1986,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1998
1986
  };
1999
1987
 
2000
1988
  // src/ignore/junie-ignore.ts
2001
- import { join as join19 } from "path";
1989
+ import { join as join18 } from "path";
2002
1990
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2003
1991
  static getSettablePaths() {
2004
1992
  return {
@@ -2025,7 +2013,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2025
2013
  validate = true
2026
2014
  }) {
2027
2015
  const fileContent = await readFileContent(
2028
- join19(
2016
+ join18(
2029
2017
  baseDir,
2030
2018
  this.getSettablePaths().relativeDirPath,
2031
2019
  this.getSettablePaths().relativeFilePath
@@ -2042,7 +2030,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2042
2030
  };
2043
2031
 
2044
2032
  // src/ignore/kiro-ignore.ts
2045
- import { join as join20 } from "path";
2033
+ import { join as join19 } from "path";
2046
2034
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2047
2035
  static getSettablePaths() {
2048
2036
  return {
@@ -2069,7 +2057,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2069
2057
  validate = true
2070
2058
  }) {
2071
2059
  const fileContent = await readFileContent(
2072
- join20(
2060
+ join19(
2073
2061
  baseDir,
2074
2062
  this.getSettablePaths().relativeDirPath,
2075
2063
  this.getSettablePaths().relativeFilePath
@@ -2086,7 +2074,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2086
2074
  };
2087
2075
 
2088
2076
  // src/ignore/qwencode-ignore.ts
2089
- import { join as join21 } from "path";
2077
+ import { join as join20 } from "path";
2090
2078
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2091
2079
  static getSettablePaths() {
2092
2080
  return {
@@ -2113,7 +2101,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2113
2101
  validate = true
2114
2102
  }) {
2115
2103
  const fileContent = await readFileContent(
2116
- join21(
2104
+ join20(
2117
2105
  baseDir,
2118
2106
  this.getSettablePaths().relativeDirPath,
2119
2107
  this.getSettablePaths().relativeFilePath
@@ -2130,7 +2118,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2130
2118
  };
2131
2119
 
2132
2120
  // src/ignore/roo-ignore.ts
2133
- import { join as join22 } from "path";
2121
+ import { join as join21 } from "path";
2134
2122
  var RooIgnore = class _RooIgnore extends ToolIgnore {
2135
2123
  static getSettablePaths() {
2136
2124
  return {
@@ -2157,7 +2145,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2157
2145
  validate = true
2158
2146
  }) {
2159
2147
  const fileContent = await readFileContent(
2160
- join22(
2148
+ join21(
2161
2149
  baseDir,
2162
2150
  this.getSettablePaths().relativeDirPath,
2163
2151
  this.getSettablePaths().relativeFilePath
@@ -2174,7 +2162,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2174
2162
  };
2175
2163
 
2176
2164
  // src/ignore/windsurf-ignore.ts
2177
- import { join as join23 } from "path";
2165
+ import { join as join22 } from "path";
2178
2166
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2179
2167
  static getSettablePaths() {
2180
2168
  return {
@@ -2201,7 +2189,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2201
2189
  validate = true
2202
2190
  }) {
2203
2191
  const fileContent = await readFileContent(
2204
- join23(
2192
+ join22(
2205
2193
  baseDir,
2206
2194
  this.getSettablePaths().relativeDirPath,
2207
2195
  this.getSettablePaths().relativeFilePath
@@ -2223,7 +2211,6 @@ var ignoreProcessorToolTargets = [
2223
2211
  "augmentcode",
2224
2212
  "claudecode",
2225
2213
  "cline",
2226
- "codexcli",
2227
2214
  "cursor",
2228
2215
  "geminicli",
2229
2216
  "junie",
@@ -2281,8 +2268,6 @@ var IgnoreProcessor = class extends FeatureProcessor {
2281
2268
  return [await ClaudecodeIgnore.fromFile({ baseDir: this.baseDir })];
2282
2269
  case "cline":
2283
2270
  return [await ClineIgnore.fromFile({ baseDir: this.baseDir })];
2284
- case "codexcli":
2285
- return [await CodexcliIgnore.fromFile({ baseDir: this.baseDir })];
2286
2271
  case "cursor":
2287
2272
  return [await CursorIgnore.fromFile({ baseDir: this.baseDir })];
2288
2273
  case "geminicli":
@@ -2340,11 +2325,6 @@ var IgnoreProcessor = class extends FeatureProcessor {
2340
2325
  baseDir: this.baseDir,
2341
2326
  rulesyncIgnore: rulesyncIgnore2
2342
2327
  });
2343
- case "codexcli":
2344
- return CodexcliIgnore.fromRulesyncIgnore({
2345
- baseDir: this.baseDir,
2346
- rulesyncIgnore: rulesyncIgnore2
2347
- });
2348
2328
  case "cursor":
2349
2329
  return CursorIgnore.fromRulesyncIgnore({
2350
2330
  baseDir: this.baseDir,
@@ -2411,10 +2391,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
2411
2391
  import { z as z11 } from "zod/mini";
2412
2392
 
2413
2393
  // src/mcp/amazonqcli-mcp.ts
2414
- import { join as join25 } from "path";
2394
+ import { join as join24 } from "path";
2415
2395
 
2416
2396
  // src/mcp/rulesync-mcp.ts
2417
- import { join as join24 } from "path";
2397
+ import { join as join23 } from "path";
2418
2398
  import { z as z10 } from "zod/mini";
2419
2399
  var McpTransportTypeSchema = z10.enum(["stdio", "sse", "http"]);
2420
2400
  var McpServerBaseSchema = z10.object({
@@ -2465,7 +2445,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2465
2445
  }
2466
2446
  static async fromFile({ validate = true }) {
2467
2447
  const fileContent = await readFileContent(
2468
- join24(this.getSettablePaths().relativeDirPath, this.getSettablePaths().relativeFilePath)
2448
+ join23(this.getSettablePaths().relativeDirPath, this.getSettablePaths().relativeFilePath)
2469
2449
  );
2470
2450
  return new _RulesyncMcp({
2471
2451
  baseDir: ".",
@@ -2532,7 +2512,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2532
2512
  validate = true
2533
2513
  }) {
2534
2514
  const fileContent = await readFileContent(
2535
- join25(
2515
+ join24(
2536
2516
  baseDir,
2537
2517
  this.getSettablePaths().relativeDirPath,
2538
2518
  this.getSettablePaths().relativeFilePath
@@ -2568,7 +2548,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2568
2548
  };
2569
2549
 
2570
2550
  // src/mcp/claudecode-mcp.ts
2571
- import { join as join26 } from "path";
2551
+ import { join as join25 } from "path";
2572
2552
  var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2573
2553
  static getSettablePaths() {
2574
2554
  return {
@@ -2581,7 +2561,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2581
2561
  validate = true
2582
2562
  }) {
2583
2563
  const fileContent = await readFileContent(
2584
- join26(
2564
+ join25(
2585
2565
  baseDir,
2586
2566
  this.getSettablePaths().relativeDirPath,
2587
2567
  this.getSettablePaths().relativeFilePath
@@ -2617,7 +2597,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2617
2597
  };
2618
2598
 
2619
2599
  // src/mcp/cline-mcp.ts
2620
- import { join as join27 } from "path";
2600
+ import { join as join26 } from "path";
2621
2601
  var ClineMcp = class _ClineMcp extends ToolMcp {
2622
2602
  static getSettablePaths() {
2623
2603
  return {
@@ -2630,7 +2610,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
2630
2610
  validate = true
2631
2611
  }) {
2632
2612
  const fileContent = await readFileContent(
2633
- join27(
2613
+ join26(
2634
2614
  baseDir,
2635
2615
  this.getSettablePaths().relativeDirPath,
2636
2616
  this.getSettablePaths().relativeFilePath
@@ -2666,7 +2646,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
2666
2646
  };
2667
2647
 
2668
2648
  // src/mcp/copilot-mcp.ts
2669
- import { join as join28 } from "path";
2649
+ import { join as join27 } from "path";
2670
2650
  var CopilotMcp = class _CopilotMcp extends ToolMcp {
2671
2651
  static getSettablePaths() {
2672
2652
  return {
@@ -2679,7 +2659,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
2679
2659
  validate = true
2680
2660
  }) {
2681
2661
  const fileContent = await readFileContent(
2682
- join28(
2662
+ join27(
2683
2663
  baseDir,
2684
2664
  this.getSettablePaths().relativeDirPath,
2685
2665
  this.getSettablePaths().relativeFilePath
@@ -2715,7 +2695,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
2715
2695
  };
2716
2696
 
2717
2697
  // src/mcp/cursor-mcp.ts
2718
- import { join as join29 } from "path";
2698
+ import { join as join28 } from "path";
2719
2699
  var CursorMcp = class _CursorMcp extends ToolMcp {
2720
2700
  static getSettablePaths() {
2721
2701
  return {
@@ -2728,7 +2708,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
2728
2708
  validate = true
2729
2709
  }) {
2730
2710
  const fileContent = await readFileContent(
2731
- join29(
2711
+ join28(
2732
2712
  baseDir,
2733
2713
  this.getSettablePaths().relativeDirPath,
2734
2714
  this.getSettablePaths().relativeFilePath
@@ -2775,7 +2755,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
2775
2755
  };
2776
2756
 
2777
2757
  // src/mcp/roo-mcp.ts
2778
- import { join as join30 } from "path";
2758
+ import { join as join29 } from "path";
2779
2759
  var RooMcp = class _RooMcp extends ToolMcp {
2780
2760
  static getSettablePaths() {
2781
2761
  return {
@@ -2788,7 +2768,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
2788
2768
  validate = true
2789
2769
  }) {
2790
2770
  const fileContent = await readFileContent(
2791
- join30(
2771
+ join29(
2792
2772
  baseDir,
2793
2773
  this.getSettablePaths().relativeDirPath,
2794
2774
  this.getSettablePaths().relativeFilePath
@@ -2995,12 +2975,12 @@ var McpProcessor = class extends FeatureProcessor {
2995
2975
  };
2996
2976
 
2997
2977
  // src/rules/rules-processor.ts
2998
- import { basename as basename16, join as join54 } from "path";
2978
+ import { basename as basename16, join as join53 } from "path";
2999
2979
  import { XMLBuilder } from "fast-xml-parser";
3000
2980
  import { z as z20 } from "zod/mini";
3001
2981
 
3002
2982
  // src/subagents/simulated-subagent.ts
3003
- import { basename as basename11, join as join31 } from "path";
2983
+ import { basename as basename11, join as join30 } from "path";
3004
2984
  import { z as z12 } from "zod/mini";
3005
2985
 
3006
2986
  // src/subagents/tool-subagent.ts
@@ -3102,7 +3082,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3102
3082
  relativeFilePath,
3103
3083
  validate = true
3104
3084
  }) {
3105
- const filePath = join31(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3085
+ const filePath = join30(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3106
3086
  const fileContent = await readFileContent(filePath);
3107
3087
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3108
3088
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -3236,15 +3216,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
3236
3216
  };
3237
3217
 
3238
3218
  // src/subagents/subagents-processor.ts
3239
- import { basename as basename13, join as join34 } from "path";
3219
+ import { basename as basename13, join as join33 } from "path";
3240
3220
  import { z as z15 } from "zod/mini";
3241
3221
 
3242
3222
  // src/subagents/claudecode-subagent.ts
3243
- import { join as join33 } from "path";
3223
+ import { join as join32 } from "path";
3244
3224
  import { z as z14 } from "zod/mini";
3245
3225
 
3246
3226
  // src/subagents/rulesync-subagent.ts
3247
- import { basename as basename12, join as join32 } from "path";
3227
+ import { basename as basename12, join as join31 } from "path";
3248
3228
  import { z as z13 } from "zod/mini";
3249
3229
  var RulesyncSubagentModelSchema = z13.enum(["opus", "sonnet", "haiku", "inherit"]);
3250
3230
  var RulesyncSubagentFrontmatterSchema = z13.object({
@@ -3298,7 +3278,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
3298
3278
  static async fromFile({
3299
3279
  relativeFilePath
3300
3280
  }) {
3301
- const fileContent = await readFileContent(join32(".rulesync/subagents", relativeFilePath));
3281
+ const fileContent = await readFileContent(join31(".rulesync/subagents", relativeFilePath));
3302
3282
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3303
3283
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
3304
3284
  if (!result.success) {
@@ -3416,7 +3396,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3416
3396
  relativeFilePath,
3417
3397
  validate = true
3418
3398
  }) {
3419
- const fileContent = await readFileContent(join33(baseDir, ".claude/agents", relativeFilePath));
3399
+ const fileContent = await readFileContent(join32(baseDir, ".claude/agents", relativeFilePath));
3420
3400
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3421
3401
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
3422
3402
  if (!result.success) {
@@ -3547,7 +3527,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
3547
3527
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
3548
3528
  */
3549
3529
  async loadRulesyncFiles() {
3550
- const subagentsDir = join34(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
3530
+ const subagentsDir = join33(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
3551
3531
  const dirExists = await directoryExists(subagentsDir);
3552
3532
  if (!dirExists) {
3553
3533
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -3562,7 +3542,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
3562
3542
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
3563
3543
  const rulesyncSubagents = [];
3564
3544
  for (const mdFile of mdFiles) {
3565
- const filepath = join34(subagentsDir, mdFile);
3545
+ const filepath = join33(subagentsDir, mdFile);
3566
3546
  try {
3567
3547
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
3568
3548
  relativeFilePath: mdFile,
@@ -3665,7 +3645,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
3665
3645
  relativeDirPath,
3666
3646
  fromFile
3667
3647
  }) {
3668
- const paths = await findFilesByGlobs(join34(this.baseDir, relativeDirPath, "*.md"));
3648
+ const paths = await findFilesByGlobs(join33(this.baseDir, relativeDirPath, "*.md"));
3669
3649
  const subagents = (await Promise.allSettled(paths.map((path2) => fromFile(basename13(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
3670
3650
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
3671
3651
  return subagents;
@@ -3690,13 +3670,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
3690
3670
  };
3691
3671
 
3692
3672
  // src/rules/agentsmd-rule.ts
3693
- import { join as join37 } from "path";
3673
+ import { join as join36 } from "path";
3694
3674
 
3695
3675
  // src/rules/tool-rule.ts
3696
- import { join as join36 } from "path";
3676
+ import { join as join35 } from "path";
3697
3677
 
3698
3678
  // src/rules/rulesync-rule.ts
3699
- import { basename as basename14, join as join35 } from "path";
3679
+ import { basename as basename14, join as join34 } from "path";
3700
3680
  import { z as z16 } from "zod/mini";
3701
3681
  var RulesyncRuleFrontmatterSchema = z16.object({
3702
3682
  root: z16.optional(z16.optional(z16.boolean())),
@@ -3762,7 +3742,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3762
3742
  relativeFilePath,
3763
3743
  validate = true
3764
3744
  }) {
3765
- const filePath = join35(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
3745
+ const filePath = join34(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
3766
3746
  const fileContent = await readFileContent(filePath);
3767
3747
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3768
3748
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -3791,7 +3771,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3791
3771
  relativeFilePath,
3792
3772
  validate = true
3793
3773
  }) {
3794
- const filePath = join35(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
3774
+ const filePath = join34(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
3795
3775
  const fileContent = await readFileContent(filePath);
3796
3776
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3797
3777
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -3895,7 +3875,7 @@ var ToolRule = class extends ToolFile {
3895
3875
  });
3896
3876
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
3897
3877
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
3898
- params.relativeDirPath = join36(rulesyncFrontmatter.agentsmd.subprojectPath);
3878
+ params.relativeDirPath = join35(rulesyncFrontmatter.agentsmd.subprojectPath);
3899
3879
  params.relativeFilePath = "AGENTS.md";
3900
3880
  }
3901
3881
  return params;
@@ -3971,8 +3951,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
3971
3951
  validate = true
3972
3952
  }) {
3973
3953
  const isRoot = relativeFilePath === "AGENTS.md";
3974
- const relativePath = isRoot ? "AGENTS.md" : join37(".agents/memories", relativeFilePath);
3975
- const fileContent = await readFileContent(join37(baseDir, relativePath));
3954
+ const relativePath = isRoot ? "AGENTS.md" : join36(".agents/memories", relativeFilePath);
3955
+ const fileContent = await readFileContent(join36(baseDir, relativePath));
3976
3956
  return new _AgentsMdRule({
3977
3957
  baseDir,
3978
3958
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4012,7 +3992,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4012
3992
  };
4013
3993
 
4014
3994
  // src/rules/amazonqcli-rule.ts
4015
- import { join as join38 } from "path";
3995
+ import { join as join37 } from "path";
4016
3996
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4017
3997
  static getSettablePaths() {
4018
3998
  return {
@@ -4027,7 +4007,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4027
4007
  validate = true
4028
4008
  }) {
4029
4009
  const fileContent = await readFileContent(
4030
- join38(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4010
+ join37(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4031
4011
  );
4032
4012
  return new _AmazonQCliRule({
4033
4013
  baseDir,
@@ -4067,7 +4047,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4067
4047
  };
4068
4048
 
4069
4049
  // src/rules/augmentcode-legacy-rule.ts
4070
- import { join as join39 } from "path";
4050
+ import { join as join38 } from "path";
4071
4051
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4072
4052
  toRulesyncRule() {
4073
4053
  const rulesyncFrontmatter = {
@@ -4128,8 +4108,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4128
4108
  }) {
4129
4109
  const settablePaths = this.getSettablePaths();
4130
4110
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
4131
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join39(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4132
- const fileContent = await readFileContent(join39(baseDir, relativePath));
4111
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join38(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4112
+ const fileContent = await readFileContent(join38(baseDir, relativePath));
4133
4113
  return new _AugmentcodeLegacyRule({
4134
4114
  baseDir,
4135
4115
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -4142,7 +4122,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4142
4122
  };
4143
4123
 
4144
4124
  // src/rules/augmentcode-rule.ts
4145
- import { join as join40 } from "path";
4125
+ import { join as join39 } from "path";
4146
4126
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
4147
4127
  toRulesyncRule() {
4148
4128
  return this.toRulesyncRuleDefault();
@@ -4174,7 +4154,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
4174
4154
  validate = true
4175
4155
  }) {
4176
4156
  const fileContent = await readFileContent(
4177
- join40(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4157
+ join39(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4178
4158
  );
4179
4159
  const { body: content } = parseFrontmatter(fileContent);
4180
4160
  return new _AugmentcodeRule({
@@ -4197,7 +4177,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
4197
4177
  };
4198
4178
 
4199
4179
  // src/rules/claudecode-rule.ts
4200
- import { join as join41 } from "path";
4180
+ import { join as join40 } from "path";
4201
4181
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4202
4182
  static getSettablePaths() {
4203
4183
  return {
@@ -4206,7 +4186,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4206
4186
  relativeFilePath: "CLAUDE.md"
4207
4187
  },
4208
4188
  nonRoot: {
4209
- relativeDirPath: join41(".claude", "memories")
4189
+ relativeDirPath: join40(".claude", "memories")
4210
4190
  }
4211
4191
  };
4212
4192
  }
@@ -4229,7 +4209,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4229
4209
  if (isRoot) {
4230
4210
  const relativePath2 = paths.root.relativeFilePath;
4231
4211
  const fileContent2 = await readFileContent(
4232
- join41(baseDir, paths.root.relativeDirPath, relativePath2)
4212
+ join40(baseDir, paths.root.relativeDirPath, relativePath2)
4233
4213
  );
4234
4214
  return new _ClaudecodeRule({
4235
4215
  baseDir,
@@ -4243,8 +4223,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4243
4223
  if (!paths.nonRoot) {
4244
4224
  throw new Error("nonRoot path is not set");
4245
4225
  }
4246
- const relativePath = join41(paths.nonRoot.relativeDirPath, relativeFilePath);
4247
- const fileContent = await readFileContent(join41(baseDir, relativePath));
4226
+ const relativePath = join40(paths.nonRoot.relativeDirPath, relativeFilePath);
4227
+ const fileContent = await readFileContent(join40(baseDir, relativePath));
4248
4228
  return new _ClaudecodeRule({
4249
4229
  baseDir,
4250
4230
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -4286,7 +4266,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4286
4266
  };
4287
4267
 
4288
4268
  // src/rules/cline-rule.ts
4289
- import { join as join42 } from "path";
4269
+ import { join as join41 } from "path";
4290
4270
  import { z as z17 } from "zod/mini";
4291
4271
  var ClineRuleFrontmatterSchema = z17.object({
4292
4272
  description: z17.string()
@@ -4331,7 +4311,7 @@ var ClineRule = class _ClineRule extends ToolRule {
4331
4311
  validate = true
4332
4312
  }) {
4333
4313
  const fileContent = await readFileContent(
4334
- join42(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4314
+ join41(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4335
4315
  );
4336
4316
  return new _ClineRule({
4337
4317
  baseDir,
@@ -4344,7 +4324,7 @@ var ClineRule = class _ClineRule extends ToolRule {
4344
4324
  };
4345
4325
 
4346
4326
  // src/rules/codexcli-rule.ts
4347
- import { join as join43 } from "path";
4327
+ import { join as join42 } from "path";
4348
4328
  var CodexcliRule = class _CodexcliRule extends ToolRule {
4349
4329
  static getSettablePaths() {
4350
4330
  return {
@@ -4376,7 +4356,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4376
4356
  if (isRoot) {
4377
4357
  const relativePath2 = paths.root.relativeFilePath;
4378
4358
  const fileContent2 = await readFileContent(
4379
- join43(baseDir, paths.root.relativeDirPath, relativePath2)
4359
+ join42(baseDir, paths.root.relativeDirPath, relativePath2)
4380
4360
  );
4381
4361
  return new _CodexcliRule({
4382
4362
  baseDir,
@@ -4390,8 +4370,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4390
4370
  if (!paths.nonRoot) {
4391
4371
  throw new Error("nonRoot path is not set");
4392
4372
  }
4393
- const relativePath = join43(paths.nonRoot.relativeDirPath, relativeFilePath);
4394
- const fileContent = await readFileContent(join43(baseDir, relativePath));
4373
+ const relativePath = join42(paths.nonRoot.relativeDirPath, relativeFilePath);
4374
+ const fileContent = await readFileContent(join42(baseDir, relativePath));
4395
4375
  return new _CodexcliRule({
4396
4376
  baseDir,
4397
4377
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -4433,7 +4413,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4433
4413
  };
4434
4414
 
4435
4415
  // src/rules/copilot-rule.ts
4436
- import { join as join44 } from "path";
4416
+ import { join as join43 } from "path";
4437
4417
  import { z as z18 } from "zod/mini";
4438
4418
  var CopilotRuleFrontmatterSchema = z18.object({
4439
4419
  description: z18.optional(z18.string()),
@@ -4526,11 +4506,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4526
4506
  validate = true
4527
4507
  }) {
4528
4508
  const isRoot = relativeFilePath === "copilot-instructions.md";
4529
- const relativePath = isRoot ? join44(
4509
+ const relativePath = isRoot ? join43(
4530
4510
  this.getSettablePaths().root.relativeDirPath,
4531
4511
  this.getSettablePaths().root.relativeFilePath
4532
- ) : join44(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4533
- const fileContent = await readFileContent(join44(baseDir, relativePath));
4512
+ ) : join43(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4513
+ const fileContent = await readFileContent(join43(baseDir, relativePath));
4534
4514
  if (isRoot) {
4535
4515
  return new _CopilotRule({
4536
4516
  baseDir,
@@ -4549,7 +4529,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4549
4529
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
4550
4530
  if (!result.success) {
4551
4531
  throw new Error(
4552
- `Invalid frontmatter in ${join44(baseDir, relativeFilePath)}: ${result.error.message}`
4532
+ `Invalid frontmatter in ${join43(baseDir, relativeFilePath)}: ${result.error.message}`
4553
4533
  );
4554
4534
  }
4555
4535
  return new _CopilotRule({
@@ -4588,7 +4568,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4588
4568
  };
4589
4569
 
4590
4570
  // src/rules/cursor-rule.ts
4591
- import { basename as basename15, join as join45 } from "path";
4571
+ import { basename as basename15, join as join44 } from "path";
4592
4572
  import { z as z19 } from "zod/mini";
4593
4573
  var CursorRuleFrontmatterSchema = z19.object({
4594
4574
  description: z19.optional(z19.string()),
@@ -4715,13 +4695,13 @@ var CursorRule = class _CursorRule extends ToolRule {
4715
4695
  validate = true
4716
4696
  }) {
4717
4697
  const fileContent = await readFileContent(
4718
- join45(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4698
+ join44(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4719
4699
  );
4720
4700
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
4721
4701
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
4722
4702
  if (!result.success) {
4723
4703
  throw new Error(
4724
- `Invalid frontmatter in ${join45(baseDir, relativeFilePath)}: ${result.error.message}`
4704
+ `Invalid frontmatter in ${join44(baseDir, relativeFilePath)}: ${result.error.message}`
4725
4705
  );
4726
4706
  }
4727
4707
  return new _CursorRule({
@@ -4759,7 +4739,7 @@ var CursorRule = class _CursorRule extends ToolRule {
4759
4739
  };
4760
4740
 
4761
4741
  // src/rules/geminicli-rule.ts
4762
- import { join as join46 } from "path";
4742
+ import { join as join45 } from "path";
4763
4743
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4764
4744
  static getSettablePaths() {
4765
4745
  return {
@@ -4791,7 +4771,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4791
4771
  if (isRoot) {
4792
4772
  const relativePath2 = paths.root.relativeFilePath;
4793
4773
  const fileContent2 = await readFileContent(
4794
- join46(baseDir, paths.root.relativeDirPath, relativePath2)
4774
+ join45(baseDir, paths.root.relativeDirPath, relativePath2)
4795
4775
  );
4796
4776
  return new _GeminiCliRule({
4797
4777
  baseDir,
@@ -4805,8 +4785,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4805
4785
  if (!paths.nonRoot) {
4806
4786
  throw new Error("nonRoot path is not set");
4807
4787
  }
4808
- const relativePath = join46(paths.nonRoot.relativeDirPath, relativeFilePath);
4809
- const fileContent = await readFileContent(join46(baseDir, relativePath));
4788
+ const relativePath = join45(paths.nonRoot.relativeDirPath, relativeFilePath);
4789
+ const fileContent = await readFileContent(join45(baseDir, relativePath));
4810
4790
  return new _GeminiCliRule({
4811
4791
  baseDir,
4812
4792
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -4848,7 +4828,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4848
4828
  };
4849
4829
 
4850
4830
  // src/rules/junie-rule.ts
4851
- import { join as join47 } from "path";
4831
+ import { join as join46 } from "path";
4852
4832
  var JunieRule = class _JunieRule extends ToolRule {
4853
4833
  static getSettablePaths() {
4854
4834
  return {
@@ -4867,8 +4847,8 @@ var JunieRule = class _JunieRule extends ToolRule {
4867
4847
  validate = true
4868
4848
  }) {
4869
4849
  const isRoot = relativeFilePath === "guidelines.md";
4870
- const relativePath = isRoot ? "guidelines.md" : join47(".junie/memories", relativeFilePath);
4871
- const fileContent = await readFileContent(join47(baseDir, relativePath));
4850
+ const relativePath = isRoot ? "guidelines.md" : join46(".junie/memories", relativeFilePath);
4851
+ const fileContent = await readFileContent(join46(baseDir, relativePath));
4872
4852
  return new _JunieRule({
4873
4853
  baseDir,
4874
4854
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4908,7 +4888,7 @@ var JunieRule = class _JunieRule extends ToolRule {
4908
4888
  };
4909
4889
 
4910
4890
  // src/rules/kiro-rule.ts
4911
- import { join as join48 } from "path";
4891
+ import { join as join47 } from "path";
4912
4892
  var KiroRule = class _KiroRule extends ToolRule {
4913
4893
  static getSettablePaths() {
4914
4894
  return {
@@ -4923,7 +4903,7 @@ var KiroRule = class _KiroRule extends ToolRule {
4923
4903
  validate = true
4924
4904
  }) {
4925
4905
  const fileContent = await readFileContent(
4926
- join48(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4906
+ join47(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4927
4907
  );
4928
4908
  return new _KiroRule({
4929
4909
  baseDir,
@@ -4963,7 +4943,7 @@ var KiroRule = class _KiroRule extends ToolRule {
4963
4943
  };
4964
4944
 
4965
4945
  // src/rules/opencode-rule.ts
4966
- import { join as join49 } from "path";
4946
+ import { join as join48 } from "path";
4967
4947
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
4968
4948
  static getSettablePaths() {
4969
4949
  return {
@@ -4982,8 +4962,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
4982
4962
  validate = true
4983
4963
  }) {
4984
4964
  const isRoot = relativeFilePath === "AGENTS.md";
4985
- const relativePath = isRoot ? "AGENTS.md" : join49(".opencode/memories", relativeFilePath);
4986
- const fileContent = await readFileContent(join49(baseDir, relativePath));
4965
+ const relativePath = isRoot ? "AGENTS.md" : join48(".opencode/memories", relativeFilePath);
4966
+ const fileContent = await readFileContent(join48(baseDir, relativePath));
4987
4967
  return new _OpenCodeRule({
4988
4968
  baseDir,
4989
4969
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5023,7 +5003,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5023
5003
  };
5024
5004
 
5025
5005
  // src/rules/qwencode-rule.ts
5026
- import { join as join50 } from "path";
5006
+ import { join as join49 } from "path";
5027
5007
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5028
5008
  static getSettablePaths() {
5029
5009
  return {
@@ -5042,8 +5022,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5042
5022
  validate = true
5043
5023
  }) {
5044
5024
  const isRoot = relativeFilePath === "QWEN.md";
5045
- const relativePath = isRoot ? "QWEN.md" : join50(".qwen/memories", relativeFilePath);
5046
- const fileContent = await readFileContent(join50(baseDir, relativePath));
5025
+ const relativePath = isRoot ? "QWEN.md" : join49(".qwen/memories", relativeFilePath);
5026
+ const fileContent = await readFileContent(join49(baseDir, relativePath));
5047
5027
  return new _QwencodeRule({
5048
5028
  baseDir,
5049
5029
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5080,7 +5060,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5080
5060
  };
5081
5061
 
5082
5062
  // src/rules/roo-rule.ts
5083
- import { join as join51 } from "path";
5063
+ import { join as join50 } from "path";
5084
5064
  var RooRule = class _RooRule extends ToolRule {
5085
5065
  static getSettablePaths() {
5086
5066
  return {
@@ -5095,7 +5075,7 @@ var RooRule = class _RooRule extends ToolRule {
5095
5075
  validate = true
5096
5076
  }) {
5097
5077
  const fileContent = await readFileContent(
5098
- join51(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5078
+ join50(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5099
5079
  );
5100
5080
  return new _RooRule({
5101
5081
  baseDir,
@@ -5150,7 +5130,7 @@ var RooRule = class _RooRule extends ToolRule {
5150
5130
  };
5151
5131
 
5152
5132
  // src/rules/warp-rule.ts
5153
- import { join as join52 } from "path";
5133
+ import { join as join51 } from "path";
5154
5134
  var WarpRule = class _WarpRule extends ToolRule {
5155
5135
  constructor({ fileContent, root, ...rest }) {
5156
5136
  super({
@@ -5176,8 +5156,8 @@ var WarpRule = class _WarpRule extends ToolRule {
5176
5156
  validate = true
5177
5157
  }) {
5178
5158
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
5179
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join52(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5180
- const fileContent = await readFileContent(join52(baseDir, relativePath));
5159
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join51(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5160
+ const fileContent = await readFileContent(join51(baseDir, relativePath));
5181
5161
  return new _WarpRule({
5182
5162
  baseDir,
5183
5163
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -5217,7 +5197,7 @@ var WarpRule = class _WarpRule extends ToolRule {
5217
5197
  };
5218
5198
 
5219
5199
  // src/rules/windsurf-rule.ts
5220
- import { join as join53 } from "path";
5200
+ import { join as join52 } from "path";
5221
5201
  var WindsurfRule = class _WindsurfRule extends ToolRule {
5222
5202
  static getSettablePaths() {
5223
5203
  return {
@@ -5232,7 +5212,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
5232
5212
  validate = true
5233
5213
  }) {
5234
5214
  const fileContent = await readFileContent(
5235
- join53(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5215
+ join52(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5236
5216
  );
5237
5217
  return new _WindsurfRule({
5238
5218
  baseDir,
@@ -5546,7 +5526,6 @@ var RulesProcessor = class extends FeatureProcessor {
5546
5526
  const rootRule = toolRules[rootRuleIndex];
5547
5527
  rootRule?.setFileContent(
5548
5528
  this.generateXmlReferencesSection(toolRules) + this.generateAdditionalConventionsSection({
5549
- commands: { relativeDirPath: CodexCliCommand.getSettablePaths().relativeDirPath },
5550
5529
  subagents: {
5551
5530
  relativeDirPath: CodexCliSubagent.getSettablePaths().relativeDirPath
5552
5531
  }
@@ -5622,7 +5601,7 @@ var RulesProcessor = class extends FeatureProcessor {
5622
5601
  * Load and parse rulesync rule files from .rulesync/rules/ directory
5623
5602
  */
5624
5603
  async loadRulesyncFiles() {
5625
- const files = await findFilesByGlobs(join54(".rulesync/rules", "*.md"));
5604
+ const files = await findFilesByGlobs(join53(".rulesync/rules", "*.md"));
5626
5605
  logger.debug(`Found ${files.length} rulesync files`);
5627
5606
  const rulesyncRules = await Promise.all(
5628
5607
  files.map((file) => RulesyncRule.fromFile({ relativeFilePath: basename16(file) }))
@@ -5643,7 +5622,7 @@ var RulesProcessor = class extends FeatureProcessor {
5643
5622
  return rulesyncRules;
5644
5623
  }
5645
5624
  async loadRulesyncFilesLegacy() {
5646
- const legacyFiles = await findFilesByGlobs(join54(".rulesync", "*.md"));
5625
+ const legacyFiles = await findFilesByGlobs(join53(".rulesync", "*.md"));
5647
5626
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
5648
5627
  return Promise.all(
5649
5628
  legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: basename16(file) }))
@@ -5710,7 +5689,7 @@ var RulesProcessor = class extends FeatureProcessor {
5710
5689
  return [];
5711
5690
  }
5712
5691
  const rootFilePaths = await findFilesByGlobs(
5713
- join54(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
5692
+ join53(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
5714
5693
  );
5715
5694
  return await Promise.all(
5716
5695
  rootFilePaths.map(
@@ -5728,7 +5707,7 @@ var RulesProcessor = class extends FeatureProcessor {
5728
5707
  return [];
5729
5708
  }
5730
5709
  const nonRootFilePaths = await findFilesByGlobs(
5731
- join54(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
5710
+ join53(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
5732
5711
  );
5733
5712
  return await Promise.all(
5734
5713
  nonRootFilePaths.map(
@@ -6089,7 +6068,7 @@ var RulesProcessor = class extends FeatureProcessor {
6089
6068
  const overview = `# Additional Conventions Beyond the Built-in Functions
6090
6069
 
6091
6070
  As this project's AI coding tool, you must follow the additional conventions below, in addition to the built-in functions.`;
6092
- const commandsSection = `## Simulated Custom Slash Commands
6071
+ const commandsSection = commands ? `## Simulated Custom Slash Commands
6093
6072
 
6094
6073
  Custom slash commands allow you to define frequently-used prompts as Markdown files that you can execute.
6095
6074
 
@@ -6104,14 +6083,14 @@ s/<command> [arguments]
6104
6083
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
6105
6084
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
6106
6085
 
6107
- When users call a custom slash command, you have to look for the markdown file, \`${join54(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.`;
6108
- const subagentsSection = `## Simulated Subagents
6086
+ When users call a custom slash command, you have to look for the markdown file, \`${join53(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
6087
+ const subagentsSection = subagents ? `## Simulated Subagents
6109
6088
 
6110
6089
  Simulated subagents are specialized AI assistants that can be invoked to handle specific types of tasks. In this case, it can be appear something like custom slash commands simply. Simulated subagents can be called by custom slash commands.
6111
6090
 
6112
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join54(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
6091
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join53(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
6113
6092
 
6114
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join54(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.`;
6093
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join53(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
6115
6094
  const result = [
6116
6095
  overview,
6117
6096
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -6336,9 +6315,9 @@ async function generateSubagents(config) {
6336
6315
  }
6337
6316
 
6338
6317
  // src/cli/commands/gitignore.ts
6339
- import { join as join55 } from "path";
6318
+ import { join as join54 } from "path";
6340
6319
  var gitignoreCommand = async () => {
6341
- const gitignorePath = join55(process.cwd(), ".gitignore");
6320
+ const gitignorePath = join54(process.cwd(), ".gitignore");
6342
6321
  const rulesFilesToIgnore = [
6343
6322
  "# Generated by rulesync - AI tool configuration files",
6344
6323
  "**/.amazonq/",
@@ -6575,7 +6554,7 @@ async function importSubagents(config, tool) {
6575
6554
  }
6576
6555
 
6577
6556
  // src/cli/commands/init.ts
6578
- import { join as join56 } from "path";
6557
+ import { join as join55 } from "path";
6579
6558
  async function initCommand() {
6580
6559
  logger.info("Initializing rulesync...");
6581
6560
  await ensureDir(".rulesync");
@@ -6646,7 +6625,7 @@ globs: ["**/*"]
6646
6625
  - Follow single responsibility principle
6647
6626
  `
6648
6627
  };
6649
- const filepath = join56(".rulesync/rules", sampleFile.filename);
6628
+ const filepath = join55(".rulesync/rules", sampleFile.filename);
6650
6629
  await ensureDir(".rulesync/rules");
6651
6630
  await ensureDir(RulesyncCommand.getSettablePaths().relativeDirPath);
6652
6631
  await ensureDir(".rulesync/subagents");
@@ -6659,7 +6638,7 @@ globs: ["**/*"]
6659
6638
  }
6660
6639
 
6661
6640
  // src/cli/index.ts
6662
- var getVersion = () => "2.2.0";
6641
+ var getVersion = () => "3.0.0";
6663
6642
  var main = async () => {
6664
6643
  const program = new Command();
6665
6644
  const version = getVersion();