rulesync 3.12.7 → 3.12.9

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.cjs CHANGED
@@ -42,13 +42,6 @@ var import_consola = require("consola");
42
42
 
43
43
  // src/utils/vitest.ts
44
44
  var isEnvTest = process.env.NODE_ENV === "test";
45
- function getVitestWorkerId() {
46
- const vitestWorkerId = process.env.VITEST_WORKER_ID;
47
- if (!vitestWorkerId) {
48
- throw new Error("VITEST_WORKER_ID is not set");
49
- }
50
- return vitestWorkerId;
51
- }
52
45
 
53
46
  // src/utils/logger.ts
54
47
  var Logger = class {
@@ -172,7 +165,7 @@ async function removeFile(filepath) {
172
165
  }
173
166
  function getHomeDirectory() {
174
167
  if (isEnvTest) {
175
- return (0, import_node_path.join)("./tmp", "tests", "home", getVitestWorkerId());
168
+ throw new Error("getHomeDirectory() must be mocked in test environment");
176
169
  }
177
170
  return import_node_os.default.homedir();
178
171
  }
@@ -548,7 +541,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
548
541
  var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
549
542
  static getSettablePaths() {
550
543
  return {
551
- relativeDirPath: ".agents/commands"
544
+ relativeDirPath: (0, import_node_path4.join)(".agents", "commands")
552
545
  };
553
546
  }
554
547
  static fromRulesyncCommand({
@@ -663,7 +656,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
663
656
  }
664
657
  static getSettablePaths() {
665
658
  return {
666
- relativeDirPath: ".rulesync/commands"
659
+ relativeDirPath: (0, import_node_path5.join)(".rulesync", "commands")
667
660
  };
668
661
  }
669
662
  getFrontmatter() {
@@ -1232,7 +1225,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1232
1225
  body;
1233
1226
  static getSettablePaths() {
1234
1227
  return {
1235
- relativeDirPath: ".roo/commands"
1228
+ relativeDirPath: (0, import_node_path11.join)(".roo", "commands")
1236
1229
  };
1237
1230
  }
1238
1231
  constructor({ frontmatter, body, ...rest }) {
@@ -3776,10 +3769,13 @@ var McpProcessor = class extends FeatureProcessor {
3776
3769
  };
3777
3770
 
3778
3771
  // src/rules/rules-processor.ts
3779
- var import_node_path58 = require("path");
3772
+ var import_node_path64 = require("path");
3780
3773
  var import_fast_xml_parser = require("fast-xml-parser");
3781
3774
  var import_mini21 = require("zod/mini");
3782
3775
 
3776
+ // src/subagents/agentsmd-subagent.ts
3777
+ var import_node_path36 = require("path");
3778
+
3783
3779
  // src/subagents/simulated-subagent.ts
3784
3780
  var import_node_path35 = require("path");
3785
3781
  var import_mini13 = require("zod/mini");
@@ -3912,7 +3908,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3912
3908
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3913
3909
  static getSettablePaths() {
3914
3910
  return {
3915
- relativeDirPath: ".agents/subagents"
3911
+ relativeDirPath: (0, import_node_path36.join)(".agents", "subagents")
3916
3912
  };
3917
3913
  }
3918
3914
  static async fromFile(params) {
@@ -3932,10 +3928,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3932
3928
  };
3933
3929
 
3934
3930
  // src/subagents/codexcli-subagent.ts
3931
+ var import_node_path37 = require("path");
3935
3932
  var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3936
3933
  static getSettablePaths() {
3937
3934
  return {
3938
- relativeDirPath: ".codex/subagents"
3935
+ relativeDirPath: (0, import_node_path37.join)(".codex", "subagents")
3939
3936
  };
3940
3937
  }
3941
3938
  static async fromFile(params) {
@@ -3955,10 +3952,11 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3955
3952
  };
3956
3953
 
3957
3954
  // src/subagents/copilot-subagent.ts
3955
+ var import_node_path38 = require("path");
3958
3956
  var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3959
3957
  static getSettablePaths() {
3960
3958
  return {
3961
- relativeDirPath: ".github/subagents"
3959
+ relativeDirPath: (0, import_node_path38.join)(".github", "subagents")
3962
3960
  };
3963
3961
  }
3964
3962
  static async fromFile(params) {
@@ -3978,10 +3976,11 @@ var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3978
3976
  };
3979
3977
 
3980
3978
  // src/subagents/cursor-subagent.ts
3979
+ var import_node_path39 = require("path");
3981
3980
  var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3982
3981
  static getSettablePaths() {
3983
3982
  return {
3984
- relativeDirPath: ".cursor/subagents"
3983
+ relativeDirPath: (0, import_node_path39.join)(".cursor", "subagents")
3985
3984
  };
3986
3985
  }
3987
3986
  static async fromFile(params) {
@@ -4001,10 +4000,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
4001
4000
  };
4002
4001
 
4003
4002
  // src/subagents/geminicli-subagent.ts
4003
+ var import_node_path40 = require("path");
4004
4004
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4005
4005
  static getSettablePaths() {
4006
4006
  return {
4007
- relativeDirPath: ".gemini/subagents"
4007
+ relativeDirPath: (0, import_node_path40.join)(".gemini", "subagents")
4008
4008
  };
4009
4009
  }
4010
4010
  static async fromFile(params) {
@@ -4024,10 +4024,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4024
4024
  };
4025
4025
 
4026
4026
  // src/subagents/roo-subagent.ts
4027
+ var import_node_path41 = require("path");
4027
4028
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4028
4029
  static getSettablePaths() {
4029
4030
  return {
4030
- relativeDirPath: ".roo/subagents"
4031
+ relativeDirPath: (0, import_node_path41.join)(".roo", "subagents")
4031
4032
  };
4032
4033
  }
4033
4034
  static async fromFile(params) {
@@ -4047,15 +4048,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4047
4048
  };
4048
4049
 
4049
4050
  // src/subagents/subagents-processor.ts
4050
- var import_node_path38 = require("path");
4051
+ var import_node_path44 = require("path");
4051
4052
  var import_mini16 = require("zod/mini");
4052
4053
 
4053
4054
  // src/subagents/claudecode-subagent.ts
4054
- var import_node_path37 = require("path");
4055
+ var import_node_path43 = require("path");
4055
4056
  var import_mini15 = require("zod/mini");
4056
4057
 
4057
4058
  // src/subagents/rulesync-subagent.ts
4058
- var import_node_path36 = require("path");
4059
+ var import_node_path42 = require("path");
4059
4060
  var import_mini14 = require("zod/mini");
4060
4061
  var RulesyncSubagentModelSchema = import_mini14.z.enum(["opus", "sonnet", "haiku", "inherit"]);
4061
4062
  var RulesyncSubagentFrontmatterSchema = import_mini14.z.object({
@@ -4076,7 +4077,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4076
4077
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4077
4078
  if (!result.success) {
4078
4079
  throw new Error(
4079
- `Invalid frontmatter in ${(0, import_node_path36.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4080
+ `Invalid frontmatter in ${(0, import_node_path42.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4080
4081
  );
4081
4082
  }
4082
4083
  }
@@ -4088,7 +4089,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4088
4089
  }
4089
4090
  static getSettablePaths() {
4090
4091
  return {
4091
- relativeDirPath: ".rulesync/subagents"
4092
+ relativeDirPath: (0, import_node_path42.join)(".rulesync", "subagents")
4092
4093
  };
4093
4094
  }
4094
4095
  getFrontmatter() {
@@ -4108,7 +4109,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4108
4109
  return {
4109
4110
  success: false,
4110
4111
  error: new Error(
4111
- `Invalid frontmatter in ${(0, import_node_path36.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4112
+ `Invalid frontmatter in ${(0, import_node_path42.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4112
4113
  )
4113
4114
  };
4114
4115
  }
@@ -4116,13 +4117,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4116
4117
  static async fromFile({
4117
4118
  relativeFilePath
4118
4119
  }) {
4119
- const fileContent = await readFileContent((0, import_node_path36.join)(".rulesync/subagents", relativeFilePath));
4120
+ const fileContent = await readFileContent((0, import_node_path42.join)(".rulesync", "subagents", relativeFilePath));
4120
4121
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4121
4122
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4122
4123
  if (!result.success) {
4123
4124
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
4124
4125
  }
4125
- const filename = (0, import_node_path36.basename)(relativeFilePath);
4126
+ const filename = (0, import_node_path42.basename)(relativeFilePath);
4126
4127
  return new _RulesyncSubagent({
4127
4128
  baseDir: ".",
4128
4129
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -4148,7 +4149,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4148
4149
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
4149
4150
  if (!result.success) {
4150
4151
  throw new Error(
4151
- `Invalid frontmatter in ${(0, import_node_path37.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4152
+ `Invalid frontmatter in ${(0, import_node_path43.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4152
4153
  );
4153
4154
  }
4154
4155
  }
@@ -4160,7 +4161,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4160
4161
  }
4161
4162
  static getSettablePaths(_options = {}) {
4162
4163
  return {
4163
- relativeDirPath: (0, import_node_path37.join)(".claude", "agents")
4164
+ relativeDirPath: (0, import_node_path43.join)(".claude", "agents")
4164
4165
  };
4165
4166
  }
4166
4167
  getFrontmatter() {
@@ -4186,7 +4187,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4186
4187
  // RulesyncCommand baseDir is always the project root directory
4187
4188
  frontmatter: rulesyncFrontmatter,
4188
4189
  body: this.body,
4189
- relativeDirPath: ".rulesync/subagents",
4190
+ relativeDirPath: (0, import_node_path43.join)(".rulesync", "subagents"),
4190
4191
  relativeFilePath: this.getRelativeFilePath(),
4191
4192
  fileContent,
4192
4193
  validate: true
@@ -4228,7 +4229,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4228
4229
  return {
4229
4230
  success: false,
4230
4231
  error: new Error(
4231
- `Invalid frontmatter in ${(0, import_node_path37.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4232
+ `Invalid frontmatter in ${(0, import_node_path43.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4232
4233
  )
4233
4234
  };
4234
4235
  }
@@ -4246,7 +4247,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4246
4247
  global = false
4247
4248
  }) {
4248
4249
  const paths = this.getSettablePaths({ global });
4249
- const filePath = (0, import_node_path37.join)(baseDir, paths.relativeDirPath, relativeFilePath);
4250
+ const filePath = (0, import_node_path43.join)(baseDir, paths.relativeDirPath, relativeFilePath);
4250
4251
  const fileContent = await readFileContent(filePath);
4251
4252
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4252
4253
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -4400,7 +4401,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4400
4401
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
4401
4402
  */
4402
4403
  async loadRulesyncFiles() {
4403
- const subagentsDir = (0, import_node_path38.join)(RulesyncSubagent.getSettablePaths().relativeDirPath);
4404
+ const subagentsDir = (0, import_node_path44.join)(RulesyncSubagent.getSettablePaths().relativeDirPath);
4404
4405
  const dirExists = await directoryExists(subagentsDir);
4405
4406
  if (!dirExists) {
4406
4407
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -4415,7 +4416,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4415
4416
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
4416
4417
  const rulesyncSubagents = [];
4417
4418
  for (const mdFile of mdFiles) {
4418
- const filepath = (0, import_node_path38.join)(subagentsDir, mdFile);
4419
+ const filepath = (0, import_node_path44.join)(subagentsDir, mdFile);
4419
4420
  try {
4420
4421
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
4421
4422
  relativeFilePath: mdFile,
@@ -4534,8 +4535,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
4534
4535
  relativeDirPath,
4535
4536
  fromFile
4536
4537
  }) {
4537
- const paths = await findFilesByGlobs((0, import_node_path38.join)(this.baseDir, relativeDirPath, "*.md"));
4538
- const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path38.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
4538
+ const paths = await findFilesByGlobs((0, import_node_path44.join)(this.baseDir, relativeDirPath, "*.md"));
4539
+ const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path44.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
4539
4540
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
4540
4541
  return subagents;
4541
4542
  }
@@ -4562,13 +4563,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
4562
4563
  };
4563
4564
 
4564
4565
  // src/rules/agentsmd-rule.ts
4565
- var import_node_path41 = require("path");
4566
+ var import_node_path47 = require("path");
4566
4567
 
4567
4568
  // src/rules/tool-rule.ts
4568
- var import_node_path40 = require("path");
4569
+ var import_node_path46 = require("path");
4569
4570
 
4570
4571
  // src/rules/rulesync-rule.ts
4571
- var import_node_path39 = require("path");
4572
+ var import_node_path45 = require("path");
4572
4573
  var import_mini17 = require("zod/mini");
4573
4574
  var RulesyncRuleFrontmatterSchema = import_mini17.z.object({
4574
4575
  root: import_mini17.z.optional(import_mini17.z.optional(import_mini17.z.boolean())),
@@ -4597,7 +4598,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4597
4598
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
4598
4599
  if (!result.success) {
4599
4600
  throw new Error(
4600
- `Invalid frontmatter in ${(0, import_node_path39.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4601
+ `Invalid frontmatter in ${(0, import_node_path45.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4601
4602
  );
4602
4603
  }
4603
4604
  }
@@ -4611,7 +4612,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4611
4612
  static getSettablePaths() {
4612
4613
  return {
4613
4614
  recommended: {
4614
- relativeDirPath: ".rulesync/rules"
4615
+ relativeDirPath: (0, import_node_path45.join)(".rulesync", "rules")
4615
4616
  },
4616
4617
  legacy: {
4617
4618
  relativeDirPath: ".rulesync"
@@ -4632,7 +4633,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4632
4633
  return {
4633
4634
  success: false,
4634
4635
  error: new Error(
4635
- `Invalid frontmatter in ${(0, import_node_path39.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4636
+ `Invalid frontmatter in ${(0, import_node_path45.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4636
4637
  )
4637
4638
  };
4638
4639
  }
@@ -4641,8 +4642,8 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4641
4642
  relativeFilePath,
4642
4643
  validate = true
4643
4644
  }) {
4644
- const legacyPath = (0, import_node_path39.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4645
- const recommendedPath = (0, import_node_path39.join)(
4645
+ const legacyPath = (0, import_node_path45.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4646
+ const recommendedPath = (0, import_node_path45.join)(
4646
4647
  this.getSettablePaths().recommended.relativeDirPath,
4647
4648
  relativeFilePath
4648
4649
  );
@@ -4661,7 +4662,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4661
4662
  agentsmd: result.data.agentsmd,
4662
4663
  cursor: result.data.cursor
4663
4664
  };
4664
- const filename = (0, import_node_path39.basename)(legacyPath);
4665
+ const filename = (0, import_node_path45.basename)(legacyPath);
4665
4666
  return new _RulesyncRule({
4666
4667
  baseDir: ".",
4667
4668
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
@@ -4675,7 +4676,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4675
4676
  relativeFilePath,
4676
4677
  validate = true
4677
4678
  }) {
4678
- const filePath = (0, import_node_path39.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4679
+ const filePath = (0, import_node_path45.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4679
4680
  const fileContent = await readFileContent(filePath);
4680
4681
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4681
4682
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -4690,7 +4691,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4690
4691
  agentsmd: result.data.agentsmd,
4691
4692
  cursor: result.data.cursor
4692
4693
  };
4693
- const filename = (0, import_node_path39.basename)(filePath);
4694
+ const filename = (0, import_node_path45.basename)(filePath);
4694
4695
  return new _RulesyncRule({
4695
4696
  baseDir: ".",
4696
4697
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
@@ -4765,7 +4766,7 @@ var ToolRule = class extends ToolFile {
4765
4766
  rulesyncRule,
4766
4767
  validate = true,
4767
4768
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
4768
- nonRootPath = { relativeDirPath: ".agents/memories" }
4769
+ nonRootPath = { relativeDirPath: (0, import_node_path46.join)(".agents", "memories") }
4769
4770
  }) {
4770
4771
  const params = this.buildToolRuleParamsDefault({
4771
4772
  baseDir,
@@ -4776,7 +4777,7 @@ var ToolRule = class extends ToolFile {
4776
4777
  });
4777
4778
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
4778
4779
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
4779
- params.relativeDirPath = (0, import_node_path40.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
4780
+ params.relativeDirPath = (0, import_node_path46.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
4780
4781
  params.relativeFilePath = "AGENTS.md";
4781
4782
  }
4782
4783
  return params;
@@ -4785,7 +4786,7 @@ var ToolRule = class extends ToolFile {
4785
4786
  return new RulesyncRule({
4786
4787
  baseDir: ".",
4787
4788
  // RulesyncRule baseDir is always the project root directory
4788
- relativeDirPath: ".rulesync/rules",
4789
+ relativeDirPath: (0, import_node_path46.join)(".rulesync", "rules"),
4789
4790
  relativeFilePath: this.getRelativeFilePath(),
4790
4791
  frontmatter: {
4791
4792
  root: this.isRoot(),
@@ -4842,7 +4843,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4842
4843
  relativeFilePath: "AGENTS.md"
4843
4844
  },
4844
4845
  nonRoot: {
4845
- relativeDirPath: ".agents/memories"
4846
+ relativeDirPath: (0, import_node_path47.join)(".agents", "memories")
4846
4847
  }
4847
4848
  };
4848
4849
  }
@@ -4852,8 +4853,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4852
4853
  validate = true
4853
4854
  }) {
4854
4855
  const isRoot = relativeFilePath === "AGENTS.md";
4855
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path41.join)(".agents/memories", relativeFilePath);
4856
- const fileContent = await readFileContent((0, import_node_path41.join)(baseDir, relativePath));
4856
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path47.join)(".agents", "memories", relativeFilePath);
4857
+ const fileContent = await readFileContent((0, import_node_path47.join)(baseDir, relativePath));
4857
4858
  return new _AgentsMdRule({
4858
4859
  baseDir,
4859
4860
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4893,12 +4894,12 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4893
4894
  };
4894
4895
 
4895
4896
  // src/rules/amazonqcli-rule.ts
4896
- var import_node_path42 = require("path");
4897
+ var import_node_path48 = require("path");
4897
4898
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4898
4899
  static getSettablePaths() {
4899
4900
  return {
4900
4901
  nonRoot: {
4901
- relativeDirPath: ".amazonq/rules"
4902
+ relativeDirPath: (0, import_node_path48.join)(".amazonq", "rules")
4902
4903
  }
4903
4904
  };
4904
4905
  }
@@ -4908,7 +4909,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4908
4909
  validate = true
4909
4910
  }) {
4910
4911
  const fileContent = await readFileContent(
4911
- (0, import_node_path42.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4912
+ (0, import_node_path48.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4912
4913
  );
4913
4914
  return new _AmazonQCliRule({
4914
4915
  baseDir,
@@ -4948,7 +4949,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4948
4949
  };
4949
4950
 
4950
4951
  // src/rules/augmentcode-legacy-rule.ts
4951
- var import_node_path43 = require("path");
4952
+ var import_node_path49 = require("path");
4952
4953
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4953
4954
  toRulesyncRule() {
4954
4955
  const rulesyncFrontmatter = {
@@ -4962,7 +4963,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4962
4963
  // RulesyncRule baseDir is always the project root directory
4963
4964
  frontmatter: rulesyncFrontmatter,
4964
4965
  body: this.getFileContent(),
4965
- relativeDirPath: ".rulesync/rules",
4966
+ relativeDirPath: (0, import_node_path49.join)(".rulesync", "rules"),
4966
4967
  relativeFilePath: this.getRelativeFilePath(),
4967
4968
  validate: true
4968
4969
  });
@@ -4974,7 +4975,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4974
4975
  relativeFilePath: ".augment-guidelines"
4975
4976
  },
4976
4977
  nonRoot: {
4977
- relativeDirPath: ".augment/rules"
4978
+ relativeDirPath: (0, import_node_path49.join)(".augment", "rules")
4978
4979
  }
4979
4980
  };
4980
4981
  }
@@ -5009,8 +5010,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5009
5010
  }) {
5010
5011
  const settablePaths = this.getSettablePaths();
5011
5012
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
5012
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path43.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
5013
- const fileContent = await readFileContent((0, import_node_path43.join)(baseDir, relativePath));
5013
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path49.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
5014
+ const fileContent = await readFileContent((0, import_node_path49.join)(baseDir, relativePath));
5014
5015
  return new _AugmentcodeLegacyRule({
5015
5016
  baseDir,
5016
5017
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -5023,7 +5024,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5023
5024
  };
5024
5025
 
5025
5026
  // src/rules/augmentcode-rule.ts
5026
- var import_node_path44 = require("path");
5027
+ var import_node_path50 = require("path");
5027
5028
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5028
5029
  toRulesyncRule() {
5029
5030
  return this.toRulesyncRuleDefault();
@@ -5031,7 +5032,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5031
5032
  static getSettablePaths() {
5032
5033
  return {
5033
5034
  nonRoot: {
5034
- relativeDirPath: ".augment/rules"
5035
+ relativeDirPath: (0, import_node_path50.join)(".augment", "rules")
5035
5036
  }
5036
5037
  };
5037
5038
  }
@@ -5055,7 +5056,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5055
5056
  validate = true
5056
5057
  }) {
5057
5058
  const fileContent = await readFileContent(
5058
- (0, import_node_path44.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5059
+ (0, import_node_path50.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5059
5060
  );
5060
5061
  const { body: content } = parseFrontmatter(fileContent);
5061
5062
  return new _AugmentcodeRule({
@@ -5078,7 +5079,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5078
5079
  };
5079
5080
 
5080
5081
  // src/rules/claudecode-rule.ts
5081
- var import_node_path45 = require("path");
5082
+ var import_node_path51 = require("path");
5082
5083
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5083
5084
  static getSettablePaths({
5084
5085
  global
@@ -5097,7 +5098,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5097
5098
  relativeFilePath: "CLAUDE.md"
5098
5099
  },
5099
5100
  nonRoot: {
5100
- relativeDirPath: (0, import_node_path45.join)(".claude", "memories")
5101
+ relativeDirPath: (0, import_node_path51.join)(".claude", "memories")
5101
5102
  }
5102
5103
  };
5103
5104
  }
@@ -5112,7 +5113,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5112
5113
  if (isRoot) {
5113
5114
  const relativePath2 = paths.root.relativeFilePath;
5114
5115
  const fileContent2 = await readFileContent(
5115
- (0, import_node_path45.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5116
+ (0, import_node_path51.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5116
5117
  );
5117
5118
  return new _ClaudecodeRule({
5118
5119
  baseDir,
@@ -5126,8 +5127,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5126
5127
  if (!paths.nonRoot) {
5127
5128
  throw new Error("nonRoot path is not set");
5128
5129
  }
5129
- const relativePath = (0, import_node_path45.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5130
- const fileContent = await readFileContent((0, import_node_path45.join)(baseDir, relativePath));
5130
+ const relativePath = (0, import_node_path51.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5131
+ const fileContent = await readFileContent((0, import_node_path51.join)(baseDir, relativePath));
5131
5132
  return new _ClaudecodeRule({
5132
5133
  baseDir,
5133
5134
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5169,7 +5170,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5169
5170
  };
5170
5171
 
5171
5172
  // src/rules/cline-rule.ts
5172
- var import_node_path46 = require("path");
5173
+ var import_node_path52 = require("path");
5173
5174
  var import_mini18 = require("zod/mini");
5174
5175
  var ClineRuleFrontmatterSchema = import_mini18.z.object({
5175
5176
  description: import_mini18.z.string()
@@ -5214,7 +5215,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5214
5215
  validate = true
5215
5216
  }) {
5216
5217
  const fileContent = await readFileContent(
5217
- (0, import_node_path46.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5218
+ (0, import_node_path52.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5218
5219
  );
5219
5220
  return new _ClineRule({
5220
5221
  baseDir,
@@ -5227,7 +5228,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5227
5228
  };
5228
5229
 
5229
5230
  // src/rules/codexcli-rule.ts
5230
- var import_node_path47 = require("path");
5231
+ var import_node_path53 = require("path");
5231
5232
  var CodexcliRule = class _CodexcliRule extends ToolRule {
5232
5233
  static getSettablePaths({
5233
5234
  global
@@ -5246,7 +5247,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5246
5247
  relativeFilePath: "AGENTS.md"
5247
5248
  },
5248
5249
  nonRoot: {
5249
- relativeDirPath: ".codex/memories"
5250
+ relativeDirPath: (0, import_node_path53.join)(".codex", "memories")
5250
5251
  }
5251
5252
  };
5252
5253
  }
@@ -5261,7 +5262,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5261
5262
  if (isRoot) {
5262
5263
  const relativePath2 = paths.root.relativeFilePath;
5263
5264
  const fileContent2 = await readFileContent(
5264
- (0, import_node_path47.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5265
+ (0, import_node_path53.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5265
5266
  );
5266
5267
  return new _CodexcliRule({
5267
5268
  baseDir,
@@ -5275,8 +5276,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5275
5276
  if (!paths.nonRoot) {
5276
5277
  throw new Error("nonRoot path is not set");
5277
5278
  }
5278
- const relativePath = (0, import_node_path47.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5279
- const fileContent = await readFileContent((0, import_node_path47.join)(baseDir, relativePath));
5279
+ const relativePath = (0, import_node_path53.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5280
+ const fileContent = await readFileContent((0, import_node_path53.join)(baseDir, relativePath));
5280
5281
  return new _CodexcliRule({
5281
5282
  baseDir,
5282
5283
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5318,7 +5319,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5318
5319
  };
5319
5320
 
5320
5321
  // src/rules/copilot-rule.ts
5321
- var import_node_path48 = require("path");
5322
+ var import_node_path54 = require("path");
5322
5323
  var import_mini19 = require("zod/mini");
5323
5324
  var CopilotRuleFrontmatterSchema = import_mini19.z.object({
5324
5325
  description: import_mini19.z.optional(import_mini19.z.string()),
@@ -5334,7 +5335,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5334
5335
  relativeFilePath: "copilot-instructions.md"
5335
5336
  },
5336
5337
  nonRoot: {
5337
- relativeDirPath: ".github/instructions"
5338
+ relativeDirPath: (0, import_node_path54.join)(".github", "instructions")
5338
5339
  }
5339
5340
  };
5340
5341
  }
@@ -5343,7 +5344,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5343
5344
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5344
5345
  if (!result.success) {
5345
5346
  throw new Error(
5346
- `Invalid frontmatter in ${(0, import_node_path48.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5347
+ `Invalid frontmatter in ${(0, import_node_path54.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5347
5348
  );
5348
5349
  }
5349
5350
  }
@@ -5368,7 +5369,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5368
5369
  baseDir: this.getBaseDir(),
5369
5370
  frontmatter: rulesyncFrontmatter,
5370
5371
  body: this.body,
5371
- relativeDirPath: ".rulesync/rules",
5372
+ relativeDirPath: (0, import_node_path54.join)(".rulesync", "rules"),
5372
5373
  relativeFilePath,
5373
5374
  validate: true
5374
5375
  });
@@ -5415,11 +5416,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5415
5416
  validate = true
5416
5417
  }) {
5417
5418
  const isRoot = relativeFilePath === "copilot-instructions.md";
5418
- const relativePath = isRoot ? (0, import_node_path48.join)(
5419
+ const relativePath = isRoot ? (0, import_node_path54.join)(
5419
5420
  this.getSettablePaths().root.relativeDirPath,
5420
5421
  this.getSettablePaths().root.relativeFilePath
5421
- ) : (0, import_node_path48.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5422
- const fileContent = await readFileContent((0, import_node_path48.join)(baseDir, relativePath));
5422
+ ) : (0, import_node_path54.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5423
+ const fileContent = await readFileContent((0, import_node_path54.join)(baseDir, relativePath));
5423
5424
  if (isRoot) {
5424
5425
  return new _CopilotRule({
5425
5426
  baseDir,
@@ -5438,7 +5439,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5438
5439
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5439
5440
  if (!result.success) {
5440
5441
  throw new Error(
5441
- `Invalid frontmatter in ${(0, import_node_path48.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5442
+ `Invalid frontmatter in ${(0, import_node_path54.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5442
5443
  );
5443
5444
  }
5444
5445
  return new _CopilotRule({
@@ -5462,7 +5463,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5462
5463
  return {
5463
5464
  success: false,
5464
5465
  error: new Error(
5465
- `Invalid frontmatter in ${(0, import_node_path48.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5466
+ `Invalid frontmatter in ${(0, import_node_path54.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5466
5467
  )
5467
5468
  };
5468
5469
  }
@@ -5482,7 +5483,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5482
5483
  };
5483
5484
 
5484
5485
  // src/rules/cursor-rule.ts
5485
- var import_node_path49 = require("path");
5486
+ var import_node_path55 = require("path");
5486
5487
  var import_mini20 = require("zod/mini");
5487
5488
  var CursorRuleFrontmatterSchema = import_mini20.z.object({
5488
5489
  description: import_mini20.z.optional(import_mini20.z.string()),
@@ -5495,7 +5496,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5495
5496
  static getSettablePaths() {
5496
5497
  return {
5497
5498
  nonRoot: {
5498
- relativeDirPath: ".cursor/rules"
5499
+ relativeDirPath: (0, import_node_path55.join)(".cursor", "rules")
5499
5500
  }
5500
5501
  };
5501
5502
  }
@@ -5504,7 +5505,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5504
5505
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5505
5506
  if (!result.success) {
5506
5507
  throw new Error(
5507
- `Invalid frontmatter in ${(0, import_node_path49.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5508
+ `Invalid frontmatter in ${(0, import_node_path55.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5508
5509
  );
5509
5510
  }
5510
5511
  }
@@ -5576,7 +5577,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5576
5577
  return new RulesyncRule({
5577
5578
  frontmatter: rulesyncFrontmatter,
5578
5579
  body: this.body,
5579
- relativeDirPath: ".rulesync/rules",
5580
+ relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
5580
5581
  relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
5581
5582
  validate: true
5582
5583
  });
@@ -5621,19 +5622,19 @@ var CursorRule = class _CursorRule extends ToolRule {
5621
5622
  validate = true
5622
5623
  }) {
5623
5624
  const fileContent = await readFileContent(
5624
- (0, import_node_path49.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5625
+ (0, import_node_path55.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5625
5626
  );
5626
5627
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
5627
5628
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5628
5629
  if (!result.success) {
5629
5630
  throw new Error(
5630
- `Invalid frontmatter in ${(0, import_node_path49.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5631
+ `Invalid frontmatter in ${(0, import_node_path55.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5631
5632
  );
5632
5633
  }
5633
5634
  return new _CursorRule({
5634
5635
  baseDir,
5635
5636
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
5636
- relativeFilePath: (0, import_node_path49.basename)(relativeFilePath),
5637
+ relativeFilePath: (0, import_node_path55.basename)(relativeFilePath),
5637
5638
  frontmatter: result.data,
5638
5639
  body: content.trim(),
5639
5640
  validate
@@ -5650,7 +5651,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5650
5651
  return {
5651
5652
  success: false,
5652
5653
  error: new Error(
5653
- `Invalid frontmatter in ${(0, import_node_path49.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5654
+ `Invalid frontmatter in ${(0, import_node_path55.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5654
5655
  )
5655
5656
  };
5656
5657
  }
@@ -5670,7 +5671,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5670
5671
  };
5671
5672
 
5672
5673
  // src/rules/geminicli-rule.ts
5673
- var import_node_path50 = require("path");
5674
+ var import_node_path56 = require("path");
5674
5675
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5675
5676
  static getSettablePaths({
5676
5677
  global
@@ -5689,7 +5690,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5689
5690
  relativeFilePath: "GEMINI.md"
5690
5691
  },
5691
5692
  nonRoot: {
5692
- relativeDirPath: ".gemini/memories"
5693
+ relativeDirPath: (0, import_node_path56.join)(".gemini", "memories")
5693
5694
  }
5694
5695
  };
5695
5696
  }
@@ -5704,7 +5705,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5704
5705
  if (isRoot) {
5705
5706
  const relativePath2 = paths.root.relativeFilePath;
5706
5707
  const fileContent2 = await readFileContent(
5707
- (0, import_node_path50.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5708
+ (0, import_node_path56.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5708
5709
  );
5709
5710
  return new _GeminiCliRule({
5710
5711
  baseDir,
@@ -5718,8 +5719,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5718
5719
  if (!paths.nonRoot) {
5719
5720
  throw new Error("nonRoot path is not set");
5720
5721
  }
5721
- const relativePath = (0, import_node_path50.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5722
- const fileContent = await readFileContent((0, import_node_path50.join)(baseDir, relativePath));
5722
+ const relativePath = (0, import_node_path56.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5723
+ const fileContent = await readFileContent((0, import_node_path56.join)(baseDir, relativePath));
5723
5724
  return new _GeminiCliRule({
5724
5725
  baseDir,
5725
5726
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5761,7 +5762,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5761
5762
  };
5762
5763
 
5763
5764
  // src/rules/junie-rule.ts
5764
- var import_node_path51 = require("path");
5765
+ var import_node_path57 = require("path");
5765
5766
  var JunieRule = class _JunieRule extends ToolRule {
5766
5767
  static getSettablePaths() {
5767
5768
  return {
@@ -5770,7 +5771,7 @@ var JunieRule = class _JunieRule extends ToolRule {
5770
5771
  relativeFilePath: "guidelines.md"
5771
5772
  },
5772
5773
  nonRoot: {
5773
- relativeDirPath: ".junie/memories"
5774
+ relativeDirPath: (0, import_node_path57.join)(".junie", "memories")
5774
5775
  }
5775
5776
  };
5776
5777
  }
@@ -5780,8 +5781,8 @@ var JunieRule = class _JunieRule extends ToolRule {
5780
5781
  validate = true
5781
5782
  }) {
5782
5783
  const isRoot = relativeFilePath === "guidelines.md";
5783
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path51.join)(".junie/memories", relativeFilePath);
5784
- const fileContent = await readFileContent((0, import_node_path51.join)(baseDir, relativePath));
5784
+ const relativePath = isRoot ? "guidelines.md" : (0, import_node_path57.join)(".junie", "memories", relativeFilePath);
5785
+ const fileContent = await readFileContent((0, import_node_path57.join)(baseDir, relativePath));
5785
5786
  return new _JunieRule({
5786
5787
  baseDir,
5787
5788
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5821,12 +5822,12 @@ var JunieRule = class _JunieRule extends ToolRule {
5821
5822
  };
5822
5823
 
5823
5824
  // src/rules/kiro-rule.ts
5824
- var import_node_path52 = require("path");
5825
+ var import_node_path58 = require("path");
5825
5826
  var KiroRule = class _KiroRule extends ToolRule {
5826
5827
  static getSettablePaths() {
5827
5828
  return {
5828
5829
  nonRoot: {
5829
- relativeDirPath: ".kiro/steering"
5830
+ relativeDirPath: (0, import_node_path58.join)(".kiro", "steering")
5830
5831
  }
5831
5832
  };
5832
5833
  }
@@ -5836,7 +5837,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5836
5837
  validate = true
5837
5838
  }) {
5838
5839
  const fileContent = await readFileContent(
5839
- (0, import_node_path52.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5840
+ (0, import_node_path58.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5840
5841
  );
5841
5842
  return new _KiroRule({
5842
5843
  baseDir,
@@ -5876,7 +5877,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5876
5877
  };
5877
5878
 
5878
5879
  // src/rules/opencode-rule.ts
5879
- var import_node_path53 = require("path");
5880
+ var import_node_path59 = require("path");
5880
5881
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5881
5882
  static getSettablePaths() {
5882
5883
  return {
@@ -5885,7 +5886,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5885
5886
  relativeFilePath: "AGENTS.md"
5886
5887
  },
5887
5888
  nonRoot: {
5888
- relativeDirPath: ".opencode/memories"
5889
+ relativeDirPath: (0, import_node_path59.join)(".opencode", "memories")
5889
5890
  }
5890
5891
  };
5891
5892
  }
@@ -5895,8 +5896,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5895
5896
  validate = true
5896
5897
  }) {
5897
5898
  const isRoot = relativeFilePath === "AGENTS.md";
5898
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path53.join)(".opencode/memories", relativeFilePath);
5899
- const fileContent = await readFileContent((0, import_node_path53.join)(baseDir, relativePath));
5899
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path59.join)(".opencode", "memories", relativeFilePath);
5900
+ const fileContent = await readFileContent((0, import_node_path59.join)(baseDir, relativePath));
5900
5901
  return new _OpenCodeRule({
5901
5902
  baseDir,
5902
5903
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5936,7 +5937,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5936
5937
  };
5937
5938
 
5938
5939
  // src/rules/qwencode-rule.ts
5939
- var import_node_path54 = require("path");
5940
+ var import_node_path60 = require("path");
5940
5941
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5941
5942
  static getSettablePaths() {
5942
5943
  return {
@@ -5945,7 +5946,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5945
5946
  relativeFilePath: "QWEN.md"
5946
5947
  },
5947
5948
  nonRoot: {
5948
- relativeDirPath: ".qwen/memories"
5949
+ relativeDirPath: (0, import_node_path60.join)(".qwen", "memories")
5949
5950
  }
5950
5951
  };
5951
5952
  }
@@ -5955,8 +5956,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5955
5956
  validate = true
5956
5957
  }) {
5957
5958
  const isRoot = relativeFilePath === "QWEN.md";
5958
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path54.join)(".qwen/memories", relativeFilePath);
5959
- const fileContent = await readFileContent((0, import_node_path54.join)(baseDir, relativePath));
5959
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path60.join)(".qwen", "memories", relativeFilePath);
5960
+ const fileContent = await readFileContent((0, import_node_path60.join)(baseDir, relativePath));
5960
5961
  return new _QwencodeRule({
5961
5962
  baseDir,
5962
5963
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5993,12 +5994,12 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5993
5994
  };
5994
5995
 
5995
5996
  // src/rules/roo-rule.ts
5996
- var import_node_path55 = require("path");
5997
+ var import_node_path61 = require("path");
5997
5998
  var RooRule = class _RooRule extends ToolRule {
5998
5999
  static getSettablePaths() {
5999
6000
  return {
6000
6001
  nonRoot: {
6001
- relativeDirPath: ".roo/rules"
6002
+ relativeDirPath: (0, import_node_path61.join)(".roo", "rules")
6002
6003
  }
6003
6004
  };
6004
6005
  }
@@ -6008,7 +6009,7 @@ var RooRule = class _RooRule extends ToolRule {
6008
6009
  validate = true
6009
6010
  }) {
6010
6011
  const fileContent = await readFileContent(
6011
- (0, import_node_path55.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6012
+ (0, import_node_path61.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6012
6013
  );
6013
6014
  return new _RooRule({
6014
6015
  baseDir,
@@ -6063,7 +6064,7 @@ var RooRule = class _RooRule extends ToolRule {
6063
6064
  };
6064
6065
 
6065
6066
  // src/rules/warp-rule.ts
6066
- var import_node_path56 = require("path");
6067
+ var import_node_path62 = require("path");
6067
6068
  var WarpRule = class _WarpRule extends ToolRule {
6068
6069
  constructor({ fileContent, root, ...rest }) {
6069
6070
  super({
@@ -6079,7 +6080,7 @@ var WarpRule = class _WarpRule extends ToolRule {
6079
6080
  relativeFilePath: "WARP.md"
6080
6081
  },
6081
6082
  nonRoot: {
6082
- relativeDirPath: ".warp/memories"
6083
+ relativeDirPath: (0, import_node_path62.join)(".warp", "memories")
6083
6084
  }
6084
6085
  };
6085
6086
  }
@@ -6089,8 +6090,8 @@ var WarpRule = class _WarpRule extends ToolRule {
6089
6090
  validate = true
6090
6091
  }) {
6091
6092
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
6092
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path56.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6093
- const fileContent = await readFileContent((0, import_node_path56.join)(baseDir, relativePath));
6093
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path62.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6094
+ const fileContent = await readFileContent((0, import_node_path62.join)(baseDir, relativePath));
6094
6095
  return new _WarpRule({
6095
6096
  baseDir,
6096
6097
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -6130,12 +6131,12 @@ var WarpRule = class _WarpRule extends ToolRule {
6130
6131
  };
6131
6132
 
6132
6133
  // src/rules/windsurf-rule.ts
6133
- var import_node_path57 = require("path");
6134
+ var import_node_path63 = require("path");
6134
6135
  var WindsurfRule = class _WindsurfRule extends ToolRule {
6135
6136
  static getSettablePaths() {
6136
6137
  return {
6137
6138
  nonRoot: {
6138
- relativeDirPath: ".windsurf/rules"
6139
+ relativeDirPath: (0, import_node_path63.join)(".windsurf", "rules")
6139
6140
  }
6140
6141
  };
6141
6142
  }
@@ -6145,7 +6146,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
6145
6146
  validate = true
6146
6147
  }) {
6147
6148
  const fileContent = await readFileContent(
6148
- (0, import_node_path57.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6149
+ (0, import_node_path63.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6149
6150
  );
6150
6151
  return new _WindsurfRule({
6151
6152
  baseDir,
@@ -6545,10 +6546,10 @@ var RulesProcessor = class extends FeatureProcessor {
6545
6546
  * Load and parse rulesync rule files from .rulesync/rules/ directory
6546
6547
  */
6547
6548
  async loadRulesyncFiles() {
6548
- const files = await findFilesByGlobs((0, import_node_path58.join)(".rulesync/rules", "*.md"));
6549
+ const files = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "rules", "*.md"));
6549
6550
  logger.debug(`Found ${files.length} rulesync files`);
6550
6551
  const rulesyncRules = await Promise.all(
6551
- files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path58.basename)(file) }))
6552
+ files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path64.basename)(file) }))
6552
6553
  );
6553
6554
  const rootRules = rulesyncRules.filter((rule) => rule.getFrontmatter().root);
6554
6555
  if (rootRules.length > 1) {
@@ -6566,10 +6567,10 @@ var RulesProcessor = class extends FeatureProcessor {
6566
6567
  return rulesyncRules;
6567
6568
  }
6568
6569
  async loadRulesyncFilesLegacy() {
6569
- const legacyFiles = await findFilesByGlobs((0, import_node_path58.join)(".rulesync", "*.md"));
6570
+ const legacyFiles = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "*.md"));
6570
6571
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
6571
6572
  return Promise.all(
6572
- legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path58.basename)(file) }))
6573
+ legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path64.basename)(file) }))
6573
6574
  );
6574
6575
  }
6575
6576
  /**
@@ -6633,13 +6634,13 @@ var RulesProcessor = class extends FeatureProcessor {
6633
6634
  return [];
6634
6635
  }
6635
6636
  const rootFilePaths = await findFilesByGlobs(
6636
- (0, import_node_path58.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6637
+ (0, import_node_path64.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6637
6638
  );
6638
6639
  return await Promise.all(
6639
6640
  rootFilePaths.map(
6640
6641
  (filePath) => root.fromFile({
6641
6642
  baseDir: this.baseDir,
6642
- relativeFilePath: (0, import_node_path58.basename)(filePath),
6643
+ relativeFilePath: (0, import_node_path64.basename)(filePath),
6643
6644
  global: this.global
6644
6645
  })
6645
6646
  )
@@ -6651,13 +6652,13 @@ var RulesProcessor = class extends FeatureProcessor {
6651
6652
  return [];
6652
6653
  }
6653
6654
  const nonRootFilePaths = await findFilesByGlobs(
6654
- (0, import_node_path58.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6655
+ (0, import_node_path64.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6655
6656
  );
6656
6657
  return await Promise.all(
6657
6658
  nonRootFilePaths.map(
6658
6659
  (filePath) => nonRoot.fromFile({
6659
6660
  baseDir: this.baseDir,
6660
- relativeFilePath: (0, import_node_path58.basename)(filePath),
6661
+ relativeFilePath: (0, import_node_path64.basename)(filePath),
6661
6662
  global: this.global
6662
6663
  })
6663
6664
  )
@@ -7027,14 +7028,14 @@ s/<command> [arguments]
7027
7028
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
7028
7029
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
7029
7030
 
7030
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path58.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7031
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path64.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7031
7032
  const subagentsSection = subagents ? `## Simulated Subagents
7032
7033
 
7033
7034
  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.
7034
7035
 
7035
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path58.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7036
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7036
7037
 
7037
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path58.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7038
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7038
7039
  const result = [
7039
7040
  overview,
7040
7041
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -7248,9 +7249,9 @@ async function generateSubagents(config) {
7248
7249
  }
7249
7250
 
7250
7251
  // src/cli/commands/gitignore.ts
7251
- var import_node_path59 = require("path");
7252
+ var import_node_path65 = require("path");
7252
7253
  var gitignoreCommand = async () => {
7253
- const gitignorePath = (0, import_node_path59.join)(process.cwd(), ".gitignore");
7254
+ const gitignorePath = (0, import_node_path65.join)(process.cwd(), ".gitignore");
7254
7255
  const rulesFilesToIgnore = [
7255
7256
  "# Generated by rulesync - AI tool configuration files",
7256
7257
  // AGENTS.md
@@ -7491,7 +7492,7 @@ async function importSubagents(config, tool) {
7491
7492
  }
7492
7493
 
7493
7494
  // src/cli/commands/init.ts
7494
- var import_node_path60 = require("path");
7495
+ var import_node_path66 = require("path");
7495
7496
  async function initCommand() {
7496
7497
  logger.info("Initializing rulesync...");
7497
7498
  await ensureDir(".rulesync");
@@ -7652,14 +7653,14 @@ Attention, again, you are just the planner, so though you can read any files and
7652
7653
  await ensureDir(commandPaths.relativeDirPath);
7653
7654
  await ensureDir(subagentPaths.relativeDirPath);
7654
7655
  await ensureDir(ignorePaths.relativeDirPath);
7655
- const ruleFilepath = (0, import_node_path60.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7656
+ const ruleFilepath = (0, import_node_path66.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7656
7657
  if (!await fileExists(ruleFilepath)) {
7657
7658
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
7658
7659
  logger.success(`Created ${ruleFilepath}`);
7659
7660
  } else {
7660
7661
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
7661
7662
  }
7662
- const mcpFilepath = (0, import_node_path60.join)(
7663
+ const mcpFilepath = (0, import_node_path66.join)(
7663
7664
  mcpPaths.recommended.relativeDirPath,
7664
7665
  mcpPaths.recommended.relativeFilePath
7665
7666
  );
@@ -7669,21 +7670,21 @@ Attention, again, you are just the planner, so though you can read any files and
7669
7670
  } else {
7670
7671
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
7671
7672
  }
7672
- const commandFilepath = (0, import_node_path60.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7673
+ const commandFilepath = (0, import_node_path66.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7673
7674
  if (!await fileExists(commandFilepath)) {
7674
7675
  await writeFileContent(commandFilepath, sampleCommandFile.content);
7675
7676
  logger.success(`Created ${commandFilepath}`);
7676
7677
  } else {
7677
7678
  logger.info(`Skipped ${commandFilepath} (already exists)`);
7678
7679
  }
7679
- const subagentFilepath = (0, import_node_path60.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7680
+ const subagentFilepath = (0, import_node_path66.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7680
7681
  if (!await fileExists(subagentFilepath)) {
7681
7682
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
7682
7683
  logger.success(`Created ${subagentFilepath}`);
7683
7684
  } else {
7684
7685
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
7685
7686
  }
7686
- const ignoreFilepath = (0, import_node_path60.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7687
+ const ignoreFilepath = (0, import_node_path66.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7687
7688
  if (!await fileExists(ignoreFilepath)) {
7688
7689
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
7689
7690
  logger.success(`Created ${ignoreFilepath}`);
@@ -7693,7 +7694,7 @@ Attention, again, you are just the planner, so though you can read any files and
7693
7694
  }
7694
7695
 
7695
7696
  // src/cli/index.ts
7696
- var getVersion = () => "3.12.7";
7697
+ var getVersion = () => "3.12.9";
7697
7698
  var main = async () => {
7698
7699
  const program = new import_commander.Command();
7699
7700
  const version = getVersion();