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.js CHANGED
@@ -19,13 +19,6 @@ import { consola } from "consola";
19
19
 
20
20
  // src/utils/vitest.ts
21
21
  var isEnvTest = process.env.NODE_ENV === "test";
22
- function getVitestWorkerId() {
23
- const vitestWorkerId = process.env.VITEST_WORKER_ID;
24
- if (!vitestWorkerId) {
25
- throw new Error("VITEST_WORKER_ID is not set");
26
- }
27
- return vitestWorkerId;
28
- }
29
22
 
30
23
  // src/utils/logger.ts
31
24
  var Logger = class {
@@ -149,7 +142,7 @@ async function removeFile(filepath) {
149
142
  }
150
143
  function getHomeDirectory() {
151
144
  if (isEnvTest) {
152
- return join("./tmp", "tests", "home", getVitestWorkerId());
145
+ throw new Error("getHomeDirectory() must be mocked in test environment");
153
146
  }
154
147
  return os.homedir();
155
148
  }
@@ -525,7 +518,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
525
518
  var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
526
519
  static getSettablePaths() {
527
520
  return {
528
- relativeDirPath: ".agents/commands"
521
+ relativeDirPath: join3(".agents", "commands")
529
522
  };
530
523
  }
531
524
  static fromRulesyncCommand({
@@ -640,7 +633,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
640
633
  }
641
634
  static getSettablePaths() {
642
635
  return {
643
- relativeDirPath: ".rulesync/commands"
636
+ relativeDirPath: join4(".rulesync", "commands")
644
637
  };
645
638
  }
646
639
  getFrontmatter() {
@@ -1209,7 +1202,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1209
1202
  body;
1210
1203
  static getSettablePaths() {
1211
1204
  return {
1212
- relativeDirPath: ".roo/commands"
1205
+ relativeDirPath: join10(".roo", "commands")
1213
1206
  };
1214
1207
  }
1215
1208
  constructor({ frontmatter, body, ...rest }) {
@@ -3753,10 +3746,13 @@ var McpProcessor = class extends FeatureProcessor {
3753
3746
  };
3754
3747
 
3755
3748
  // src/rules/rules-processor.ts
3756
- import { basename as basename17, join as join57 } from "path";
3749
+ import { basename as basename17, join as join63 } from "path";
3757
3750
  import { XMLBuilder } from "fast-xml-parser";
3758
3751
  import { z as z21 } from "zod/mini";
3759
3752
 
3753
+ // src/subagents/agentsmd-subagent.ts
3754
+ import { join as join35 } from "path";
3755
+
3760
3756
  // src/subagents/simulated-subagent.ts
3761
3757
  import { basename as basename12, join as join34 } from "path";
3762
3758
  import { z as z13 } from "zod/mini";
@@ -3889,7 +3885,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3889
3885
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3890
3886
  static getSettablePaths() {
3891
3887
  return {
3892
- relativeDirPath: ".agents/subagents"
3888
+ relativeDirPath: join35(".agents", "subagents")
3893
3889
  };
3894
3890
  }
3895
3891
  static async fromFile(params) {
@@ -3909,10 +3905,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3909
3905
  };
3910
3906
 
3911
3907
  // src/subagents/codexcli-subagent.ts
3908
+ import { join as join36 } from "path";
3912
3909
  var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3913
3910
  static getSettablePaths() {
3914
3911
  return {
3915
- relativeDirPath: ".codex/subagents"
3912
+ relativeDirPath: join36(".codex", "subagents")
3916
3913
  };
3917
3914
  }
3918
3915
  static async fromFile(params) {
@@ -3932,10 +3929,11 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3932
3929
  };
3933
3930
 
3934
3931
  // src/subagents/copilot-subagent.ts
3932
+ import { join as join37 } from "path";
3935
3933
  var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3936
3934
  static getSettablePaths() {
3937
3935
  return {
3938
- relativeDirPath: ".github/subagents"
3936
+ relativeDirPath: join37(".github", "subagents")
3939
3937
  };
3940
3938
  }
3941
3939
  static async fromFile(params) {
@@ -3955,10 +3953,11 @@ var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3955
3953
  };
3956
3954
 
3957
3955
  // src/subagents/cursor-subagent.ts
3956
+ import { join as join38 } from "path";
3958
3957
  var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3959
3958
  static getSettablePaths() {
3960
3959
  return {
3961
- relativeDirPath: ".cursor/subagents"
3960
+ relativeDirPath: join38(".cursor", "subagents")
3962
3961
  };
3963
3962
  }
3964
3963
  static async fromFile(params) {
@@ -3978,10 +3977,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3978
3977
  };
3979
3978
 
3980
3979
  // src/subagents/geminicli-subagent.ts
3980
+ import { join as join39 } from "path";
3981
3981
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
3982
3982
  static getSettablePaths() {
3983
3983
  return {
3984
- relativeDirPath: ".gemini/subagents"
3984
+ relativeDirPath: join39(".gemini", "subagents")
3985
3985
  };
3986
3986
  }
3987
3987
  static async fromFile(params) {
@@ -4001,10 +4001,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4001
4001
  };
4002
4002
 
4003
4003
  // src/subagents/roo-subagent.ts
4004
+ import { join as join40 } from "path";
4004
4005
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4005
4006
  static getSettablePaths() {
4006
4007
  return {
4007
- relativeDirPath: ".roo/subagents"
4008
+ relativeDirPath: join40(".roo", "subagents")
4008
4009
  };
4009
4010
  }
4010
4011
  static async fromFile(params) {
@@ -4024,15 +4025,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4024
4025
  };
4025
4026
 
4026
4027
  // src/subagents/subagents-processor.ts
4027
- import { basename as basename14, join as join37 } from "path";
4028
+ import { basename as basename14, join as join43 } from "path";
4028
4029
  import { z as z16 } from "zod/mini";
4029
4030
 
4030
4031
  // src/subagents/claudecode-subagent.ts
4031
- import { join as join36 } from "path";
4032
+ import { join as join42 } from "path";
4032
4033
  import { z as z15 } from "zod/mini";
4033
4034
 
4034
4035
  // src/subagents/rulesync-subagent.ts
4035
- import { basename as basename13, join as join35 } from "path";
4036
+ import { basename as basename13, join as join41 } from "path";
4036
4037
  import { z as z14 } from "zod/mini";
4037
4038
  var RulesyncSubagentModelSchema = z14.enum(["opus", "sonnet", "haiku", "inherit"]);
4038
4039
  var RulesyncSubagentFrontmatterSchema = z14.object({
@@ -4053,7 +4054,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4053
4054
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4054
4055
  if (!result.success) {
4055
4056
  throw new Error(
4056
- `Invalid frontmatter in ${join35(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4057
+ `Invalid frontmatter in ${join41(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4057
4058
  );
4058
4059
  }
4059
4060
  }
@@ -4065,7 +4066,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4065
4066
  }
4066
4067
  static getSettablePaths() {
4067
4068
  return {
4068
- relativeDirPath: ".rulesync/subagents"
4069
+ relativeDirPath: join41(".rulesync", "subagents")
4069
4070
  };
4070
4071
  }
4071
4072
  getFrontmatter() {
@@ -4085,7 +4086,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4085
4086
  return {
4086
4087
  success: false,
4087
4088
  error: new Error(
4088
- `Invalid frontmatter in ${join35(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4089
+ `Invalid frontmatter in ${join41(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4089
4090
  )
4090
4091
  };
4091
4092
  }
@@ -4093,7 +4094,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4093
4094
  static async fromFile({
4094
4095
  relativeFilePath
4095
4096
  }) {
4096
- const fileContent = await readFileContent(join35(".rulesync/subagents", relativeFilePath));
4097
+ const fileContent = await readFileContent(join41(".rulesync", "subagents", relativeFilePath));
4097
4098
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4098
4099
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4099
4100
  if (!result.success) {
@@ -4125,7 +4126,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4125
4126
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
4126
4127
  if (!result.success) {
4127
4128
  throw new Error(
4128
- `Invalid frontmatter in ${join36(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4129
+ `Invalid frontmatter in ${join42(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4129
4130
  );
4130
4131
  }
4131
4132
  }
@@ -4137,7 +4138,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4137
4138
  }
4138
4139
  static getSettablePaths(_options = {}) {
4139
4140
  return {
4140
- relativeDirPath: join36(".claude", "agents")
4141
+ relativeDirPath: join42(".claude", "agents")
4141
4142
  };
4142
4143
  }
4143
4144
  getFrontmatter() {
@@ -4163,7 +4164,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4163
4164
  // RulesyncCommand baseDir is always the project root directory
4164
4165
  frontmatter: rulesyncFrontmatter,
4165
4166
  body: this.body,
4166
- relativeDirPath: ".rulesync/subagents",
4167
+ relativeDirPath: join42(".rulesync", "subagents"),
4167
4168
  relativeFilePath: this.getRelativeFilePath(),
4168
4169
  fileContent,
4169
4170
  validate: true
@@ -4205,7 +4206,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4205
4206
  return {
4206
4207
  success: false,
4207
4208
  error: new Error(
4208
- `Invalid frontmatter in ${join36(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4209
+ `Invalid frontmatter in ${join42(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4209
4210
  )
4210
4211
  };
4211
4212
  }
@@ -4223,7 +4224,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4223
4224
  global = false
4224
4225
  }) {
4225
4226
  const paths = this.getSettablePaths({ global });
4226
- const filePath = join36(baseDir, paths.relativeDirPath, relativeFilePath);
4227
+ const filePath = join42(baseDir, paths.relativeDirPath, relativeFilePath);
4227
4228
  const fileContent = await readFileContent(filePath);
4228
4229
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4229
4230
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -4377,7 +4378,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4377
4378
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
4378
4379
  */
4379
4380
  async loadRulesyncFiles() {
4380
- const subagentsDir = join37(RulesyncSubagent.getSettablePaths().relativeDirPath);
4381
+ const subagentsDir = join43(RulesyncSubagent.getSettablePaths().relativeDirPath);
4381
4382
  const dirExists = await directoryExists(subagentsDir);
4382
4383
  if (!dirExists) {
4383
4384
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -4392,7 +4393,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4392
4393
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
4393
4394
  const rulesyncSubagents = [];
4394
4395
  for (const mdFile of mdFiles) {
4395
- const filepath = join37(subagentsDir, mdFile);
4396
+ const filepath = join43(subagentsDir, mdFile);
4396
4397
  try {
4397
4398
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
4398
4399
  relativeFilePath: mdFile,
@@ -4511,7 +4512,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4511
4512
  relativeDirPath,
4512
4513
  fromFile
4513
4514
  }) {
4514
- const paths = await findFilesByGlobs(join37(this.baseDir, relativeDirPath, "*.md"));
4515
+ const paths = await findFilesByGlobs(join43(this.baseDir, relativeDirPath, "*.md"));
4515
4516
  const subagents = (await Promise.allSettled(paths.map((path2) => fromFile(basename14(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
4516
4517
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
4517
4518
  return subagents;
@@ -4539,13 +4540,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
4539
4540
  };
4540
4541
 
4541
4542
  // src/rules/agentsmd-rule.ts
4542
- import { join as join40 } from "path";
4543
+ import { join as join46 } from "path";
4543
4544
 
4544
4545
  // src/rules/tool-rule.ts
4545
- import { join as join39 } from "path";
4546
+ import { join as join45 } from "path";
4546
4547
 
4547
4548
  // src/rules/rulesync-rule.ts
4548
- import { basename as basename15, join as join38 } from "path";
4549
+ import { basename as basename15, join as join44 } from "path";
4549
4550
  import { z as z17 } from "zod/mini";
4550
4551
  var RulesyncRuleFrontmatterSchema = z17.object({
4551
4552
  root: z17.optional(z17.optional(z17.boolean())),
@@ -4574,7 +4575,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4574
4575
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
4575
4576
  if (!result.success) {
4576
4577
  throw new Error(
4577
- `Invalid frontmatter in ${join38(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4578
+ `Invalid frontmatter in ${join44(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4578
4579
  );
4579
4580
  }
4580
4581
  }
@@ -4588,7 +4589,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4588
4589
  static getSettablePaths() {
4589
4590
  return {
4590
4591
  recommended: {
4591
- relativeDirPath: ".rulesync/rules"
4592
+ relativeDirPath: join44(".rulesync", "rules")
4592
4593
  },
4593
4594
  legacy: {
4594
4595
  relativeDirPath: ".rulesync"
@@ -4609,7 +4610,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4609
4610
  return {
4610
4611
  success: false,
4611
4612
  error: new Error(
4612
- `Invalid frontmatter in ${join38(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4613
+ `Invalid frontmatter in ${join44(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4613
4614
  )
4614
4615
  };
4615
4616
  }
@@ -4618,8 +4619,8 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4618
4619
  relativeFilePath,
4619
4620
  validate = true
4620
4621
  }) {
4621
- const legacyPath = join38(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4622
- const recommendedPath = join38(
4622
+ const legacyPath = join44(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4623
+ const recommendedPath = join44(
4623
4624
  this.getSettablePaths().recommended.relativeDirPath,
4624
4625
  relativeFilePath
4625
4626
  );
@@ -4652,7 +4653,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4652
4653
  relativeFilePath,
4653
4654
  validate = true
4654
4655
  }) {
4655
- const filePath = join38(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4656
+ const filePath = join44(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4656
4657
  const fileContent = await readFileContent(filePath);
4657
4658
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4658
4659
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -4742,7 +4743,7 @@ var ToolRule = class extends ToolFile {
4742
4743
  rulesyncRule,
4743
4744
  validate = true,
4744
4745
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
4745
- nonRootPath = { relativeDirPath: ".agents/memories" }
4746
+ nonRootPath = { relativeDirPath: join45(".agents", "memories") }
4746
4747
  }) {
4747
4748
  const params = this.buildToolRuleParamsDefault({
4748
4749
  baseDir,
@@ -4753,7 +4754,7 @@ var ToolRule = class extends ToolFile {
4753
4754
  });
4754
4755
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
4755
4756
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
4756
- params.relativeDirPath = join39(rulesyncFrontmatter.agentsmd.subprojectPath);
4757
+ params.relativeDirPath = join45(rulesyncFrontmatter.agentsmd.subprojectPath);
4757
4758
  params.relativeFilePath = "AGENTS.md";
4758
4759
  }
4759
4760
  return params;
@@ -4762,7 +4763,7 @@ var ToolRule = class extends ToolFile {
4762
4763
  return new RulesyncRule({
4763
4764
  baseDir: ".",
4764
4765
  // RulesyncRule baseDir is always the project root directory
4765
- relativeDirPath: ".rulesync/rules",
4766
+ relativeDirPath: join45(".rulesync", "rules"),
4766
4767
  relativeFilePath: this.getRelativeFilePath(),
4767
4768
  frontmatter: {
4768
4769
  root: this.isRoot(),
@@ -4819,7 +4820,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4819
4820
  relativeFilePath: "AGENTS.md"
4820
4821
  },
4821
4822
  nonRoot: {
4822
- relativeDirPath: ".agents/memories"
4823
+ relativeDirPath: join46(".agents", "memories")
4823
4824
  }
4824
4825
  };
4825
4826
  }
@@ -4829,8 +4830,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4829
4830
  validate = true
4830
4831
  }) {
4831
4832
  const isRoot = relativeFilePath === "AGENTS.md";
4832
- const relativePath = isRoot ? "AGENTS.md" : join40(".agents/memories", relativeFilePath);
4833
- const fileContent = await readFileContent(join40(baseDir, relativePath));
4833
+ const relativePath = isRoot ? "AGENTS.md" : join46(".agents", "memories", relativeFilePath);
4834
+ const fileContent = await readFileContent(join46(baseDir, relativePath));
4834
4835
  return new _AgentsMdRule({
4835
4836
  baseDir,
4836
4837
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4870,12 +4871,12 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4870
4871
  };
4871
4872
 
4872
4873
  // src/rules/amazonqcli-rule.ts
4873
- import { join as join41 } from "path";
4874
+ import { join as join47 } from "path";
4874
4875
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4875
4876
  static getSettablePaths() {
4876
4877
  return {
4877
4878
  nonRoot: {
4878
- relativeDirPath: ".amazonq/rules"
4879
+ relativeDirPath: join47(".amazonq", "rules")
4879
4880
  }
4880
4881
  };
4881
4882
  }
@@ -4885,7 +4886,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4885
4886
  validate = true
4886
4887
  }) {
4887
4888
  const fileContent = await readFileContent(
4888
- join41(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4889
+ join47(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4889
4890
  );
4890
4891
  return new _AmazonQCliRule({
4891
4892
  baseDir,
@@ -4925,7 +4926,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4925
4926
  };
4926
4927
 
4927
4928
  // src/rules/augmentcode-legacy-rule.ts
4928
- import { join as join42 } from "path";
4929
+ import { join as join48 } from "path";
4929
4930
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4930
4931
  toRulesyncRule() {
4931
4932
  const rulesyncFrontmatter = {
@@ -4939,7 +4940,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4939
4940
  // RulesyncRule baseDir is always the project root directory
4940
4941
  frontmatter: rulesyncFrontmatter,
4941
4942
  body: this.getFileContent(),
4942
- relativeDirPath: ".rulesync/rules",
4943
+ relativeDirPath: join48(".rulesync", "rules"),
4943
4944
  relativeFilePath: this.getRelativeFilePath(),
4944
4945
  validate: true
4945
4946
  });
@@ -4951,7 +4952,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4951
4952
  relativeFilePath: ".augment-guidelines"
4952
4953
  },
4953
4954
  nonRoot: {
4954
- relativeDirPath: ".augment/rules"
4955
+ relativeDirPath: join48(".augment", "rules")
4955
4956
  }
4956
4957
  };
4957
4958
  }
@@ -4986,8 +4987,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4986
4987
  }) {
4987
4988
  const settablePaths = this.getSettablePaths();
4988
4989
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
4989
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join42(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4990
- const fileContent = await readFileContent(join42(baseDir, relativePath));
4990
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join48(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4991
+ const fileContent = await readFileContent(join48(baseDir, relativePath));
4991
4992
  return new _AugmentcodeLegacyRule({
4992
4993
  baseDir,
4993
4994
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -5000,7 +5001,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5000
5001
  };
5001
5002
 
5002
5003
  // src/rules/augmentcode-rule.ts
5003
- import { join as join43 } from "path";
5004
+ import { join as join49 } from "path";
5004
5005
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5005
5006
  toRulesyncRule() {
5006
5007
  return this.toRulesyncRuleDefault();
@@ -5008,7 +5009,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5008
5009
  static getSettablePaths() {
5009
5010
  return {
5010
5011
  nonRoot: {
5011
- relativeDirPath: ".augment/rules"
5012
+ relativeDirPath: join49(".augment", "rules")
5012
5013
  }
5013
5014
  };
5014
5015
  }
@@ -5032,7 +5033,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5032
5033
  validate = true
5033
5034
  }) {
5034
5035
  const fileContent = await readFileContent(
5035
- join43(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5036
+ join49(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5036
5037
  );
5037
5038
  const { body: content } = parseFrontmatter(fileContent);
5038
5039
  return new _AugmentcodeRule({
@@ -5055,7 +5056,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5055
5056
  };
5056
5057
 
5057
5058
  // src/rules/claudecode-rule.ts
5058
- import { join as join44 } from "path";
5059
+ import { join as join50 } from "path";
5059
5060
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5060
5061
  static getSettablePaths({
5061
5062
  global
@@ -5074,7 +5075,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5074
5075
  relativeFilePath: "CLAUDE.md"
5075
5076
  },
5076
5077
  nonRoot: {
5077
- relativeDirPath: join44(".claude", "memories")
5078
+ relativeDirPath: join50(".claude", "memories")
5078
5079
  }
5079
5080
  };
5080
5081
  }
@@ -5089,7 +5090,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5089
5090
  if (isRoot) {
5090
5091
  const relativePath2 = paths.root.relativeFilePath;
5091
5092
  const fileContent2 = await readFileContent(
5092
- join44(baseDir, paths.root.relativeDirPath, relativePath2)
5093
+ join50(baseDir, paths.root.relativeDirPath, relativePath2)
5093
5094
  );
5094
5095
  return new _ClaudecodeRule({
5095
5096
  baseDir,
@@ -5103,8 +5104,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5103
5104
  if (!paths.nonRoot) {
5104
5105
  throw new Error("nonRoot path is not set");
5105
5106
  }
5106
- const relativePath = join44(paths.nonRoot.relativeDirPath, relativeFilePath);
5107
- const fileContent = await readFileContent(join44(baseDir, relativePath));
5107
+ const relativePath = join50(paths.nonRoot.relativeDirPath, relativeFilePath);
5108
+ const fileContent = await readFileContent(join50(baseDir, relativePath));
5108
5109
  return new _ClaudecodeRule({
5109
5110
  baseDir,
5110
5111
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5146,7 +5147,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5146
5147
  };
5147
5148
 
5148
5149
  // src/rules/cline-rule.ts
5149
- import { join as join45 } from "path";
5150
+ import { join as join51 } from "path";
5150
5151
  import { z as z18 } from "zod/mini";
5151
5152
  var ClineRuleFrontmatterSchema = z18.object({
5152
5153
  description: z18.string()
@@ -5191,7 +5192,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5191
5192
  validate = true
5192
5193
  }) {
5193
5194
  const fileContent = await readFileContent(
5194
- join45(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5195
+ join51(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5195
5196
  );
5196
5197
  return new _ClineRule({
5197
5198
  baseDir,
@@ -5204,7 +5205,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5204
5205
  };
5205
5206
 
5206
5207
  // src/rules/codexcli-rule.ts
5207
- import { join as join46 } from "path";
5208
+ import { join as join52 } from "path";
5208
5209
  var CodexcliRule = class _CodexcliRule extends ToolRule {
5209
5210
  static getSettablePaths({
5210
5211
  global
@@ -5223,7 +5224,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5223
5224
  relativeFilePath: "AGENTS.md"
5224
5225
  },
5225
5226
  nonRoot: {
5226
- relativeDirPath: ".codex/memories"
5227
+ relativeDirPath: join52(".codex", "memories")
5227
5228
  }
5228
5229
  };
5229
5230
  }
@@ -5238,7 +5239,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5238
5239
  if (isRoot) {
5239
5240
  const relativePath2 = paths.root.relativeFilePath;
5240
5241
  const fileContent2 = await readFileContent(
5241
- join46(baseDir, paths.root.relativeDirPath, relativePath2)
5242
+ join52(baseDir, paths.root.relativeDirPath, relativePath2)
5242
5243
  );
5243
5244
  return new _CodexcliRule({
5244
5245
  baseDir,
@@ -5252,8 +5253,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5252
5253
  if (!paths.nonRoot) {
5253
5254
  throw new Error("nonRoot path is not set");
5254
5255
  }
5255
- const relativePath = join46(paths.nonRoot.relativeDirPath, relativeFilePath);
5256
- const fileContent = await readFileContent(join46(baseDir, relativePath));
5256
+ const relativePath = join52(paths.nonRoot.relativeDirPath, relativeFilePath);
5257
+ const fileContent = await readFileContent(join52(baseDir, relativePath));
5257
5258
  return new _CodexcliRule({
5258
5259
  baseDir,
5259
5260
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5295,7 +5296,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5295
5296
  };
5296
5297
 
5297
5298
  // src/rules/copilot-rule.ts
5298
- import { join as join47 } from "path";
5299
+ import { join as join53 } from "path";
5299
5300
  import { z as z19 } from "zod/mini";
5300
5301
  var CopilotRuleFrontmatterSchema = z19.object({
5301
5302
  description: z19.optional(z19.string()),
@@ -5311,7 +5312,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5311
5312
  relativeFilePath: "copilot-instructions.md"
5312
5313
  },
5313
5314
  nonRoot: {
5314
- relativeDirPath: ".github/instructions"
5315
+ relativeDirPath: join53(".github", "instructions")
5315
5316
  }
5316
5317
  };
5317
5318
  }
@@ -5320,7 +5321,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5320
5321
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5321
5322
  if (!result.success) {
5322
5323
  throw new Error(
5323
- `Invalid frontmatter in ${join47(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5324
+ `Invalid frontmatter in ${join53(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5324
5325
  );
5325
5326
  }
5326
5327
  }
@@ -5345,7 +5346,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5345
5346
  baseDir: this.getBaseDir(),
5346
5347
  frontmatter: rulesyncFrontmatter,
5347
5348
  body: this.body,
5348
- relativeDirPath: ".rulesync/rules",
5349
+ relativeDirPath: join53(".rulesync", "rules"),
5349
5350
  relativeFilePath,
5350
5351
  validate: true
5351
5352
  });
@@ -5392,11 +5393,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5392
5393
  validate = true
5393
5394
  }) {
5394
5395
  const isRoot = relativeFilePath === "copilot-instructions.md";
5395
- const relativePath = isRoot ? join47(
5396
+ const relativePath = isRoot ? join53(
5396
5397
  this.getSettablePaths().root.relativeDirPath,
5397
5398
  this.getSettablePaths().root.relativeFilePath
5398
- ) : join47(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5399
- const fileContent = await readFileContent(join47(baseDir, relativePath));
5399
+ ) : join53(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5400
+ const fileContent = await readFileContent(join53(baseDir, relativePath));
5400
5401
  if (isRoot) {
5401
5402
  return new _CopilotRule({
5402
5403
  baseDir,
@@ -5415,7 +5416,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5415
5416
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5416
5417
  if (!result.success) {
5417
5418
  throw new Error(
5418
- `Invalid frontmatter in ${join47(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5419
+ `Invalid frontmatter in ${join53(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5419
5420
  );
5420
5421
  }
5421
5422
  return new _CopilotRule({
@@ -5439,7 +5440,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5439
5440
  return {
5440
5441
  success: false,
5441
5442
  error: new Error(
5442
- `Invalid frontmatter in ${join47(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5443
+ `Invalid frontmatter in ${join53(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5443
5444
  )
5444
5445
  };
5445
5446
  }
@@ -5459,7 +5460,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5459
5460
  };
5460
5461
 
5461
5462
  // src/rules/cursor-rule.ts
5462
- import { basename as basename16, join as join48 } from "path";
5463
+ import { basename as basename16, join as join54 } from "path";
5463
5464
  import { z as z20 } from "zod/mini";
5464
5465
  var CursorRuleFrontmatterSchema = z20.object({
5465
5466
  description: z20.optional(z20.string()),
@@ -5472,7 +5473,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5472
5473
  static getSettablePaths() {
5473
5474
  return {
5474
5475
  nonRoot: {
5475
- relativeDirPath: ".cursor/rules"
5476
+ relativeDirPath: join54(".cursor", "rules")
5476
5477
  }
5477
5478
  };
5478
5479
  }
@@ -5481,7 +5482,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5481
5482
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5482
5483
  if (!result.success) {
5483
5484
  throw new Error(
5484
- `Invalid frontmatter in ${join48(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5485
+ `Invalid frontmatter in ${join54(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5485
5486
  );
5486
5487
  }
5487
5488
  }
@@ -5553,7 +5554,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5553
5554
  return new RulesyncRule({
5554
5555
  frontmatter: rulesyncFrontmatter,
5555
5556
  body: this.body,
5556
- relativeDirPath: ".rulesync/rules",
5557
+ relativeDirPath: join54(".rulesync", "rules"),
5557
5558
  relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
5558
5559
  validate: true
5559
5560
  });
@@ -5598,13 +5599,13 @@ var CursorRule = class _CursorRule extends ToolRule {
5598
5599
  validate = true
5599
5600
  }) {
5600
5601
  const fileContent = await readFileContent(
5601
- join48(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5602
+ join54(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5602
5603
  );
5603
5604
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
5604
5605
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5605
5606
  if (!result.success) {
5606
5607
  throw new Error(
5607
- `Invalid frontmatter in ${join48(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5608
+ `Invalid frontmatter in ${join54(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5608
5609
  );
5609
5610
  }
5610
5611
  return new _CursorRule({
@@ -5627,7 +5628,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5627
5628
  return {
5628
5629
  success: false,
5629
5630
  error: new Error(
5630
- `Invalid frontmatter in ${join48(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5631
+ `Invalid frontmatter in ${join54(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5631
5632
  )
5632
5633
  };
5633
5634
  }
@@ -5647,7 +5648,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5647
5648
  };
5648
5649
 
5649
5650
  // src/rules/geminicli-rule.ts
5650
- import { join as join49 } from "path";
5651
+ import { join as join55 } from "path";
5651
5652
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5652
5653
  static getSettablePaths({
5653
5654
  global
@@ -5666,7 +5667,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5666
5667
  relativeFilePath: "GEMINI.md"
5667
5668
  },
5668
5669
  nonRoot: {
5669
- relativeDirPath: ".gemini/memories"
5670
+ relativeDirPath: join55(".gemini", "memories")
5670
5671
  }
5671
5672
  };
5672
5673
  }
@@ -5681,7 +5682,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5681
5682
  if (isRoot) {
5682
5683
  const relativePath2 = paths.root.relativeFilePath;
5683
5684
  const fileContent2 = await readFileContent(
5684
- join49(baseDir, paths.root.relativeDirPath, relativePath2)
5685
+ join55(baseDir, paths.root.relativeDirPath, relativePath2)
5685
5686
  );
5686
5687
  return new _GeminiCliRule({
5687
5688
  baseDir,
@@ -5695,8 +5696,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5695
5696
  if (!paths.nonRoot) {
5696
5697
  throw new Error("nonRoot path is not set");
5697
5698
  }
5698
- const relativePath = join49(paths.nonRoot.relativeDirPath, relativeFilePath);
5699
- const fileContent = await readFileContent(join49(baseDir, relativePath));
5699
+ const relativePath = join55(paths.nonRoot.relativeDirPath, relativeFilePath);
5700
+ const fileContent = await readFileContent(join55(baseDir, relativePath));
5700
5701
  return new _GeminiCliRule({
5701
5702
  baseDir,
5702
5703
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5738,7 +5739,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5738
5739
  };
5739
5740
 
5740
5741
  // src/rules/junie-rule.ts
5741
- import { join as join50 } from "path";
5742
+ import { join as join56 } from "path";
5742
5743
  var JunieRule = class _JunieRule extends ToolRule {
5743
5744
  static getSettablePaths() {
5744
5745
  return {
@@ -5747,7 +5748,7 @@ var JunieRule = class _JunieRule extends ToolRule {
5747
5748
  relativeFilePath: "guidelines.md"
5748
5749
  },
5749
5750
  nonRoot: {
5750
- relativeDirPath: ".junie/memories"
5751
+ relativeDirPath: join56(".junie", "memories")
5751
5752
  }
5752
5753
  };
5753
5754
  }
@@ -5757,8 +5758,8 @@ var JunieRule = class _JunieRule extends ToolRule {
5757
5758
  validate = true
5758
5759
  }) {
5759
5760
  const isRoot = relativeFilePath === "guidelines.md";
5760
- const relativePath = isRoot ? "guidelines.md" : join50(".junie/memories", relativeFilePath);
5761
- const fileContent = await readFileContent(join50(baseDir, relativePath));
5761
+ const relativePath = isRoot ? "guidelines.md" : join56(".junie", "memories", relativeFilePath);
5762
+ const fileContent = await readFileContent(join56(baseDir, relativePath));
5762
5763
  return new _JunieRule({
5763
5764
  baseDir,
5764
5765
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5798,12 +5799,12 @@ var JunieRule = class _JunieRule extends ToolRule {
5798
5799
  };
5799
5800
 
5800
5801
  // src/rules/kiro-rule.ts
5801
- import { join as join51 } from "path";
5802
+ import { join as join57 } from "path";
5802
5803
  var KiroRule = class _KiroRule extends ToolRule {
5803
5804
  static getSettablePaths() {
5804
5805
  return {
5805
5806
  nonRoot: {
5806
- relativeDirPath: ".kiro/steering"
5807
+ relativeDirPath: join57(".kiro", "steering")
5807
5808
  }
5808
5809
  };
5809
5810
  }
@@ -5813,7 +5814,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5813
5814
  validate = true
5814
5815
  }) {
5815
5816
  const fileContent = await readFileContent(
5816
- join51(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5817
+ join57(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5817
5818
  );
5818
5819
  return new _KiroRule({
5819
5820
  baseDir,
@@ -5853,7 +5854,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5853
5854
  };
5854
5855
 
5855
5856
  // src/rules/opencode-rule.ts
5856
- import { join as join52 } from "path";
5857
+ import { join as join58 } from "path";
5857
5858
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5858
5859
  static getSettablePaths() {
5859
5860
  return {
@@ -5862,7 +5863,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5862
5863
  relativeFilePath: "AGENTS.md"
5863
5864
  },
5864
5865
  nonRoot: {
5865
- relativeDirPath: ".opencode/memories"
5866
+ relativeDirPath: join58(".opencode", "memories")
5866
5867
  }
5867
5868
  };
5868
5869
  }
@@ -5872,8 +5873,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5872
5873
  validate = true
5873
5874
  }) {
5874
5875
  const isRoot = relativeFilePath === "AGENTS.md";
5875
- const relativePath = isRoot ? "AGENTS.md" : join52(".opencode/memories", relativeFilePath);
5876
- const fileContent = await readFileContent(join52(baseDir, relativePath));
5876
+ const relativePath = isRoot ? "AGENTS.md" : join58(".opencode", "memories", relativeFilePath);
5877
+ const fileContent = await readFileContent(join58(baseDir, relativePath));
5877
5878
  return new _OpenCodeRule({
5878
5879
  baseDir,
5879
5880
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5913,7 +5914,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5913
5914
  };
5914
5915
 
5915
5916
  // src/rules/qwencode-rule.ts
5916
- import { join as join53 } from "path";
5917
+ import { join as join59 } from "path";
5917
5918
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5918
5919
  static getSettablePaths() {
5919
5920
  return {
@@ -5922,7 +5923,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5922
5923
  relativeFilePath: "QWEN.md"
5923
5924
  },
5924
5925
  nonRoot: {
5925
- relativeDirPath: ".qwen/memories"
5926
+ relativeDirPath: join59(".qwen", "memories")
5926
5927
  }
5927
5928
  };
5928
5929
  }
@@ -5932,8 +5933,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5932
5933
  validate = true
5933
5934
  }) {
5934
5935
  const isRoot = relativeFilePath === "QWEN.md";
5935
- const relativePath = isRoot ? "QWEN.md" : join53(".qwen/memories", relativeFilePath);
5936
- const fileContent = await readFileContent(join53(baseDir, relativePath));
5936
+ const relativePath = isRoot ? "QWEN.md" : join59(".qwen", "memories", relativeFilePath);
5937
+ const fileContent = await readFileContent(join59(baseDir, relativePath));
5937
5938
  return new _QwencodeRule({
5938
5939
  baseDir,
5939
5940
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5970,12 +5971,12 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5970
5971
  };
5971
5972
 
5972
5973
  // src/rules/roo-rule.ts
5973
- import { join as join54 } from "path";
5974
+ import { join as join60 } from "path";
5974
5975
  var RooRule = class _RooRule extends ToolRule {
5975
5976
  static getSettablePaths() {
5976
5977
  return {
5977
5978
  nonRoot: {
5978
- relativeDirPath: ".roo/rules"
5979
+ relativeDirPath: join60(".roo", "rules")
5979
5980
  }
5980
5981
  };
5981
5982
  }
@@ -5985,7 +5986,7 @@ var RooRule = class _RooRule extends ToolRule {
5985
5986
  validate = true
5986
5987
  }) {
5987
5988
  const fileContent = await readFileContent(
5988
- join54(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5989
+ join60(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5989
5990
  );
5990
5991
  return new _RooRule({
5991
5992
  baseDir,
@@ -6040,7 +6041,7 @@ var RooRule = class _RooRule extends ToolRule {
6040
6041
  };
6041
6042
 
6042
6043
  // src/rules/warp-rule.ts
6043
- import { join as join55 } from "path";
6044
+ import { join as join61 } from "path";
6044
6045
  var WarpRule = class _WarpRule extends ToolRule {
6045
6046
  constructor({ fileContent, root, ...rest }) {
6046
6047
  super({
@@ -6056,7 +6057,7 @@ var WarpRule = class _WarpRule extends ToolRule {
6056
6057
  relativeFilePath: "WARP.md"
6057
6058
  },
6058
6059
  nonRoot: {
6059
- relativeDirPath: ".warp/memories"
6060
+ relativeDirPath: join61(".warp", "memories")
6060
6061
  }
6061
6062
  };
6062
6063
  }
@@ -6066,8 +6067,8 @@ var WarpRule = class _WarpRule extends ToolRule {
6066
6067
  validate = true
6067
6068
  }) {
6068
6069
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
6069
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join55(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6070
- const fileContent = await readFileContent(join55(baseDir, relativePath));
6070
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join61(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6071
+ const fileContent = await readFileContent(join61(baseDir, relativePath));
6071
6072
  return new _WarpRule({
6072
6073
  baseDir,
6073
6074
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -6107,12 +6108,12 @@ var WarpRule = class _WarpRule extends ToolRule {
6107
6108
  };
6108
6109
 
6109
6110
  // src/rules/windsurf-rule.ts
6110
- import { join as join56 } from "path";
6111
+ import { join as join62 } from "path";
6111
6112
  var WindsurfRule = class _WindsurfRule extends ToolRule {
6112
6113
  static getSettablePaths() {
6113
6114
  return {
6114
6115
  nonRoot: {
6115
- relativeDirPath: ".windsurf/rules"
6116
+ relativeDirPath: join62(".windsurf", "rules")
6116
6117
  }
6117
6118
  };
6118
6119
  }
@@ -6122,7 +6123,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
6122
6123
  validate = true
6123
6124
  }) {
6124
6125
  const fileContent = await readFileContent(
6125
- join56(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6126
+ join62(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6126
6127
  );
6127
6128
  return new _WindsurfRule({
6128
6129
  baseDir,
@@ -6522,7 +6523,7 @@ var RulesProcessor = class extends FeatureProcessor {
6522
6523
  * Load and parse rulesync rule files from .rulesync/rules/ directory
6523
6524
  */
6524
6525
  async loadRulesyncFiles() {
6525
- const files = await findFilesByGlobs(join57(".rulesync/rules", "*.md"));
6526
+ const files = await findFilesByGlobs(join63(".rulesync", "rules", "*.md"));
6526
6527
  logger.debug(`Found ${files.length} rulesync files`);
6527
6528
  const rulesyncRules = await Promise.all(
6528
6529
  files.map((file) => RulesyncRule.fromFile({ relativeFilePath: basename17(file) }))
@@ -6543,7 +6544,7 @@ var RulesProcessor = class extends FeatureProcessor {
6543
6544
  return rulesyncRules;
6544
6545
  }
6545
6546
  async loadRulesyncFilesLegacy() {
6546
- const legacyFiles = await findFilesByGlobs(join57(".rulesync", "*.md"));
6547
+ const legacyFiles = await findFilesByGlobs(join63(".rulesync", "*.md"));
6547
6548
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
6548
6549
  return Promise.all(
6549
6550
  legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: basename17(file) }))
@@ -6610,7 +6611,7 @@ var RulesProcessor = class extends FeatureProcessor {
6610
6611
  return [];
6611
6612
  }
6612
6613
  const rootFilePaths = await findFilesByGlobs(
6613
- join57(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6614
+ join63(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6614
6615
  );
6615
6616
  return await Promise.all(
6616
6617
  rootFilePaths.map(
@@ -6628,7 +6629,7 @@ var RulesProcessor = class extends FeatureProcessor {
6628
6629
  return [];
6629
6630
  }
6630
6631
  const nonRootFilePaths = await findFilesByGlobs(
6631
- join57(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6632
+ join63(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6632
6633
  );
6633
6634
  return await Promise.all(
6634
6635
  nonRootFilePaths.map(
@@ -7004,14 +7005,14 @@ s/<command> [arguments]
7004
7005
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
7005
7006
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
7006
7007
 
7007
- When users call a custom slash command, you have to look for the markdown file, \`${join57(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7008
+ When users call a custom slash command, you have to look for the markdown file, \`${join63(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7008
7009
  const subagentsSection = subagents ? `## Simulated Subagents
7009
7010
 
7010
7011
  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.
7011
7012
 
7012
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join57(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7013
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join63(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7013
7014
 
7014
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join57(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7015
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join63(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7015
7016
  const result = [
7016
7017
  overview,
7017
7018
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -7225,9 +7226,9 @@ async function generateSubagents(config) {
7225
7226
  }
7226
7227
 
7227
7228
  // src/cli/commands/gitignore.ts
7228
- import { join as join58 } from "path";
7229
+ import { join as join64 } from "path";
7229
7230
  var gitignoreCommand = async () => {
7230
- const gitignorePath = join58(process.cwd(), ".gitignore");
7231
+ const gitignorePath = join64(process.cwd(), ".gitignore");
7231
7232
  const rulesFilesToIgnore = [
7232
7233
  "# Generated by rulesync - AI tool configuration files",
7233
7234
  // AGENTS.md
@@ -7468,7 +7469,7 @@ async function importSubagents(config, tool) {
7468
7469
  }
7469
7470
 
7470
7471
  // src/cli/commands/init.ts
7471
- import { join as join59 } from "path";
7472
+ import { join as join65 } from "path";
7472
7473
  async function initCommand() {
7473
7474
  logger.info("Initializing rulesync...");
7474
7475
  await ensureDir(".rulesync");
@@ -7629,14 +7630,14 @@ Attention, again, you are just the planner, so though you can read any files and
7629
7630
  await ensureDir(commandPaths.relativeDirPath);
7630
7631
  await ensureDir(subagentPaths.relativeDirPath);
7631
7632
  await ensureDir(ignorePaths.relativeDirPath);
7632
- const ruleFilepath = join59(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7633
+ const ruleFilepath = join65(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7633
7634
  if (!await fileExists(ruleFilepath)) {
7634
7635
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
7635
7636
  logger.success(`Created ${ruleFilepath}`);
7636
7637
  } else {
7637
7638
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
7638
7639
  }
7639
- const mcpFilepath = join59(
7640
+ const mcpFilepath = join65(
7640
7641
  mcpPaths.recommended.relativeDirPath,
7641
7642
  mcpPaths.recommended.relativeFilePath
7642
7643
  );
@@ -7646,21 +7647,21 @@ Attention, again, you are just the planner, so though you can read any files and
7646
7647
  } else {
7647
7648
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
7648
7649
  }
7649
- const commandFilepath = join59(commandPaths.relativeDirPath, sampleCommandFile.filename);
7650
+ const commandFilepath = join65(commandPaths.relativeDirPath, sampleCommandFile.filename);
7650
7651
  if (!await fileExists(commandFilepath)) {
7651
7652
  await writeFileContent(commandFilepath, sampleCommandFile.content);
7652
7653
  logger.success(`Created ${commandFilepath}`);
7653
7654
  } else {
7654
7655
  logger.info(`Skipped ${commandFilepath} (already exists)`);
7655
7656
  }
7656
- const subagentFilepath = join59(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7657
+ const subagentFilepath = join65(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7657
7658
  if (!await fileExists(subagentFilepath)) {
7658
7659
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
7659
7660
  logger.success(`Created ${subagentFilepath}`);
7660
7661
  } else {
7661
7662
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
7662
7663
  }
7663
- const ignoreFilepath = join59(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7664
+ const ignoreFilepath = join65(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7664
7665
  if (!await fileExists(ignoreFilepath)) {
7665
7666
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
7666
7667
  logger.success(`Created ${ignoreFilepath}`);
@@ -7670,7 +7671,7 @@ Attention, again, you are just the planner, so though you can read any files and
7670
7671
  }
7671
7672
 
7672
7673
  // src/cli/index.ts
7673
- var getVersion = () => "3.12.7";
7674
+ var getVersion = () => "3.12.9";
7674
7675
  var main = async () => {
7675
7676
  const program = new Command();
7676
7677
  const version = getVersion();