rulesync 3.13.0 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +318 -303
  2. package/dist/index.js +308 -293
  3. package/package.json +3 -2
package/dist/index.cjs CHANGED
@@ -319,7 +319,7 @@ var AiFile = class {
319
319
  */
320
320
  global;
321
321
  constructor({
322
- baseDir = ".",
322
+ baseDir = process.cwd(),
323
323
  relativeDirPath,
324
324
  relativeFilePath,
325
325
  fileContent,
@@ -476,7 +476,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
476
476
  throw new Error("Not implemented because it is a SIMULATED file.");
477
477
  }
478
478
  static fromRulesyncCommandDefault({
479
- baseDir = ".",
479
+ baseDir = process.cwd(),
480
480
  rulesyncCommand,
481
481
  validate = true
482
482
  }) {
@@ -511,7 +511,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
511
511
  }
512
512
  }
513
513
  static async fromFileDefault({
514
- baseDir = ".",
514
+ baseDir = process.cwd(),
515
515
  relativeFilePath,
516
516
  validate = true
517
517
  }) {
@@ -545,7 +545,7 @@ var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
545
545
  };
546
546
  }
547
547
  static fromRulesyncCommand({
548
- baseDir = ".",
548
+ baseDir = process.cwd(),
549
549
  rulesyncCommand,
550
550
  validate = true
551
551
  }) {
@@ -554,7 +554,7 @@ var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
554
554
  );
555
555
  }
556
556
  static async fromFile({
557
- baseDir = ".",
557
+ baseDir = process.cwd(),
558
558
  relativeFilePath,
559
559
  validate = true
560
560
  }) {
@@ -643,7 +643,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
643
643
  const result = RulesyncCommandFrontmatterSchema.safeParse(frontmatter);
644
644
  if (!result.success) {
645
645
  throw new Error(
646
- `Invalid frontmatter in ${(0, import_node_path5.join)(rest.baseDir ?? ".", rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
646
+ `Invalid frontmatter in ${(0, import_node_path5.join)(rest.baseDir ?? process.cwd(), rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
647
647
  );
648
648
  }
649
649
  }
@@ -694,7 +694,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
694
694
  }
695
695
  const filename = (0, import_node_path5.basename)(relativeFilePath);
696
696
  return new _RulesyncCommand({
697
- baseDir: ".",
697
+ baseDir: process.cwd(),
698
698
  relativeDirPath: _RulesyncCommand.getSettablePaths().relativeDirPath,
699
699
  relativeFilePath: filename,
700
700
  frontmatter: result.data,
@@ -756,7 +756,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
756
756
  });
757
757
  }
758
758
  static fromRulesyncCommand({
759
- baseDir = ".",
759
+ baseDir = process.cwd(),
760
760
  rulesyncCommand,
761
761
  validate = true,
762
762
  global = false
@@ -799,7 +799,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
799
799
  });
800
800
  }
801
801
  static async fromFile({
802
- baseDir = ".",
802
+ baseDir = process.cwd(),
803
803
  relativeFilePath,
804
804
  validate = true,
805
805
  global = false
@@ -851,7 +851,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
851
851
  });
852
852
  }
853
853
  static fromRulesyncCommand({
854
- baseDir = ".",
854
+ baseDir = process.cwd(),
855
855
  rulesyncCommand,
856
856
  validate = true,
857
857
  global = false
@@ -878,7 +878,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
878
878
  });
879
879
  }
880
880
  static async fromFile({
881
- baseDir = ".",
881
+ baseDir = process.cwd(),
882
882
  relativeFilePath,
883
883
  validate = true,
884
884
  global = false
@@ -942,7 +942,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
942
942
  const originalFilePath = this.relativeFilePath;
943
943
  const relativeFilePath = originalFilePath.replace(/\.prompt\.md$/, ".md");
944
944
  return new RulesyncCommand({
945
- baseDir: ".",
945
+ baseDir: this.baseDir,
946
946
  frontmatter: rulesyncFrontmatter,
947
947
  body: this.body,
948
948
  relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
@@ -968,7 +968,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
968
968
  }
969
969
  }
970
970
  static fromRulesyncCommand({
971
- baseDir = ".",
971
+ baseDir = process.cwd(),
972
972
  rulesyncCommand,
973
973
  validate = true
974
974
  }) {
@@ -991,7 +991,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
991
991
  });
992
992
  }
993
993
  static async fromFile({
994
- baseDir = ".",
994
+ baseDir = process.cwd(),
995
995
  relativeFilePath,
996
996
  validate = true
997
997
  }) {
@@ -1034,7 +1034,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1034
1034
  description: ""
1035
1035
  };
1036
1036
  return new RulesyncCommand({
1037
- baseDir: ".",
1037
+ baseDir: process.cwd(),
1038
1038
  // RulesyncCommand baseDir is always the project root directory
1039
1039
  frontmatter: rulesyncFrontmatter,
1040
1040
  body: this.getFileContent(),
@@ -1045,7 +1045,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1045
1045
  });
1046
1046
  }
1047
1047
  static fromRulesyncCommand({
1048
- baseDir = ".",
1048
+ baseDir = process.cwd(),
1049
1049
  rulesyncCommand,
1050
1050
  validate = true,
1051
1051
  global = false
@@ -1072,7 +1072,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1072
1072
  });
1073
1073
  }
1074
1074
  static async fromFile({
1075
- baseDir = ".",
1075
+ baseDir = process.cwd(),
1076
1076
  relativeFilePath,
1077
1077
  validate = true,
1078
1078
  global = false
@@ -1146,7 +1146,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1146
1146
  };
1147
1147
  const fileContent = stringifyFrontmatter(this.body, rulesyncFrontmatter);
1148
1148
  return new RulesyncCommand({
1149
- baseDir: ".",
1149
+ baseDir: process.cwd(),
1150
1150
  // RulesyncCommand baseDir is always the project root directory
1151
1151
  frontmatter: rulesyncFrontmatter,
1152
1152
  body: this.body,
@@ -1157,7 +1157,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1157
1157
  });
1158
1158
  }
1159
1159
  static fromRulesyncCommand({
1160
- baseDir = ".",
1160
+ baseDir = process.cwd(),
1161
1161
  rulesyncCommand,
1162
1162
  validate = true,
1163
1163
  global = false
@@ -1181,7 +1181,7 @@ ${geminiFrontmatter.prompt}
1181
1181
  });
1182
1182
  }
1183
1183
  static async fromFile({
1184
- baseDir = ".",
1184
+ baseDir = process.cwd(),
1185
1185
  relativeFilePath,
1186
1186
  validate = true,
1187
1187
  global = false
@@ -1268,7 +1268,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1268
1268
  });
1269
1269
  }
1270
1270
  static fromRulesyncCommand({
1271
- baseDir = ".",
1271
+ baseDir = process.cwd(),
1272
1272
  rulesyncCommand,
1273
1273
  validate = true
1274
1274
  }) {
@@ -1311,7 +1311,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1311
1311
  });
1312
1312
  }
1313
1313
  static async fromFile({
1314
- baseDir = ".",
1314
+ baseDir = process.cwd(),
1315
1315
  relativeFilePath,
1316
1316
  validate = true
1317
1317
  }) {
@@ -1745,7 +1745,7 @@ var defaults = {
1745
1745
  features: ["rules"],
1746
1746
  verbose: false,
1747
1747
  delete: false,
1748
- baseDirs: ["."],
1748
+ baseDirs: [process.cwd()],
1749
1749
  configPath: "rulesync.jsonc",
1750
1750
  global: false,
1751
1751
  simulatedCommands: false,
@@ -1882,13 +1882,14 @@ function getBaseDirsInLightOfGlobal({
1882
1882
  var import_mini10 = require("zod/mini");
1883
1883
 
1884
1884
  // src/ignore/amazonqcli-ignore.ts
1885
- var import_node_path14 = require("path");
1885
+ var import_node_path15 = require("path");
1886
1886
 
1887
1887
  // src/types/tool-file.ts
1888
1888
  var ToolFile = class extends AiFile {
1889
1889
  };
1890
1890
 
1891
1891
  // src/ignore/rulesync-ignore.ts
1892
+ var import_node_path14 = require("path");
1892
1893
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1893
1894
  validate() {
1894
1895
  return { success: true, error: null };
@@ -1900,9 +1901,11 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1900
1901
  };
1901
1902
  }
1902
1903
  static async fromFile() {
1903
- const fileContent = await readFileContent(this.getSettablePaths().relativeFilePath);
1904
+ const baseDir = process.cwd();
1905
+ const filePath = (0, import_node_path14.join)(baseDir, this.getSettablePaths().relativeFilePath);
1906
+ const fileContent = await readFileContent(filePath);
1904
1907
  return new _RulesyncIgnore({
1905
- baseDir: ".",
1908
+ baseDir,
1906
1909
  relativeDirPath: this.getSettablePaths().relativeDirPath,
1907
1910
  relativeFilePath: this.getSettablePaths().relativeFilePath,
1908
1911
  fileContent
@@ -1970,7 +1973,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1970
1973
  * Supports conversion from unified rulesync format to Amazon Q CLI specific format
1971
1974
  */
1972
1975
  static fromRulesyncIgnore({
1973
- baseDir = ".",
1976
+ baseDir = process.cwd(),
1974
1977
  rulesyncIgnore
1975
1978
  }) {
1976
1979
  const body = rulesyncIgnore.getFileContent();
@@ -1986,11 +1989,11 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1986
1989
  * Supports both proposed .q-ignore and .amazonqignore formats
1987
1990
  */
1988
1991
  static async fromFile({
1989
- baseDir = ".",
1992
+ baseDir = process.cwd(),
1990
1993
  validate = true
1991
1994
  }) {
1992
1995
  const fileContent = await readFileContent(
1993
- (0, import_node_path14.join)(
1996
+ (0, import_node_path15.join)(
1994
1997
  baseDir,
1995
1998
  this.getSettablePaths().relativeDirPath,
1996
1999
  this.getSettablePaths().relativeFilePath
@@ -2007,7 +2010,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
2007
2010
  };
2008
2011
 
2009
2012
  // src/ignore/augmentcode-ignore.ts
2010
- var import_node_path15 = require("path");
2013
+ var import_node_path16 = require("path");
2011
2014
  var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2012
2015
  static getSettablePaths() {
2013
2016
  return {
@@ -2026,7 +2029,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2026
2029
  * Supports conversion from unified rulesync format to AugmentCode specific format
2027
2030
  */
2028
2031
  static fromRulesyncIgnore({
2029
- baseDir = ".",
2032
+ baseDir = process.cwd(),
2030
2033
  rulesyncIgnore
2031
2034
  }) {
2032
2035
  return new _AugmentcodeIgnore({
@@ -2041,11 +2044,11 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2041
2044
  * Reads and parses .augmentignore file
2042
2045
  */
2043
2046
  static async fromFile({
2044
- baseDir = ".",
2047
+ baseDir = process.cwd(),
2045
2048
  validate = true
2046
2049
  }) {
2047
2050
  const fileContent = await readFileContent(
2048
- (0, import_node_path15.join)(
2051
+ (0, import_node_path16.join)(
2049
2052
  baseDir,
2050
2053
  this.getSettablePaths().relativeDirPath,
2051
2054
  this.getSettablePaths().relativeFilePath
@@ -2062,7 +2065,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2062
2065
  };
2063
2066
 
2064
2067
  // src/ignore/claudecode-ignore.ts
2065
- var import_node_path16 = require("path");
2068
+ var import_node_path17 = require("path");
2066
2069
  var import_es_toolkit = require("es-toolkit");
2067
2070
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2068
2071
  constructor(params) {
@@ -2092,13 +2095,13 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2092
2095
  });
2093
2096
  }
2094
2097
  static async fromRulesyncIgnore({
2095
- baseDir = ".",
2098
+ baseDir = process.cwd(),
2096
2099
  rulesyncIgnore
2097
2100
  }) {
2098
2101
  const fileContent = rulesyncIgnore.getFileContent();
2099
2102
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
2100
2103
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
2101
- const filePath = (0, import_node_path16.join)(
2104
+ const filePath = (0, import_node_path17.join)(
2102
2105
  baseDir,
2103
2106
  this.getSettablePaths().relativeDirPath,
2104
2107
  this.getSettablePaths().relativeFilePath
@@ -2122,11 +2125,11 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2122
2125
  });
2123
2126
  }
2124
2127
  static async fromFile({
2125
- baseDir = ".",
2128
+ baseDir = process.cwd(),
2126
2129
  validate = true
2127
2130
  }) {
2128
2131
  const fileContent = await readFileContent(
2129
- (0, import_node_path16.join)(
2132
+ (0, import_node_path17.join)(
2130
2133
  baseDir,
2131
2134
  this.getSettablePaths().relativeDirPath,
2132
2135
  this.getSettablePaths().relativeFilePath
@@ -2143,7 +2146,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2143
2146
  };
2144
2147
 
2145
2148
  // src/ignore/cline-ignore.ts
2146
- var import_node_path17 = require("path");
2149
+ var import_node_path18 = require("path");
2147
2150
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2148
2151
  static getSettablePaths() {
2149
2152
  return {
@@ -2161,7 +2164,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2161
2164
  * Create ClineIgnore from RulesyncIgnore
2162
2165
  */
2163
2166
  static fromRulesyncIgnore({
2164
- baseDir = ".",
2167
+ baseDir = process.cwd(),
2165
2168
  rulesyncIgnore
2166
2169
  }) {
2167
2170
  const body = rulesyncIgnore.getFileContent();
@@ -2176,11 +2179,11 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2176
2179
  * Load ClineIgnore from .clineignore file
2177
2180
  */
2178
2181
  static async fromFile({
2179
- baseDir = ".",
2182
+ baseDir = process.cwd(),
2180
2183
  validate = true
2181
2184
  }) {
2182
2185
  const fileContent = await readFileContent(
2183
- (0, import_node_path17.join)(
2186
+ (0, import_node_path18.join)(
2184
2187
  baseDir,
2185
2188
  this.getSettablePaths().relativeDirPath,
2186
2189
  this.getSettablePaths().relativeFilePath
@@ -2197,7 +2200,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2197
2200
  };
2198
2201
 
2199
2202
  // src/ignore/cursor-ignore.ts
2200
- var import_node_path18 = require("path");
2203
+ var import_node_path19 = require("path");
2201
2204
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2202
2205
  static getSettablePaths() {
2203
2206
  return {
@@ -2214,7 +2217,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2214
2217
  });
2215
2218
  }
2216
2219
  static fromRulesyncIgnore({
2217
- baseDir = ".",
2220
+ baseDir = process.cwd(),
2218
2221
  rulesyncIgnore
2219
2222
  }) {
2220
2223
  const body = rulesyncIgnore.getFileContent();
@@ -2226,11 +2229,11 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2226
2229
  });
2227
2230
  }
2228
2231
  static async fromFile({
2229
- baseDir = ".",
2232
+ baseDir = process.cwd(),
2230
2233
  validate = true
2231
2234
  }) {
2232
2235
  const fileContent = await readFileContent(
2233
- (0, import_node_path18.join)(
2236
+ (0, import_node_path19.join)(
2234
2237
  baseDir,
2235
2238
  this.getSettablePaths().relativeDirPath,
2236
2239
  this.getSettablePaths().relativeFilePath
@@ -2247,7 +2250,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2247
2250
  };
2248
2251
 
2249
2252
  // src/ignore/geminicli-ignore.ts
2250
- var import_node_path19 = require("path");
2253
+ var import_node_path20 = require("path");
2251
2254
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2252
2255
  static getSettablePaths() {
2253
2256
  return {
@@ -2259,7 +2262,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2259
2262
  return this.toRulesyncIgnoreDefault();
2260
2263
  }
2261
2264
  static fromRulesyncIgnore({
2262
- baseDir = ".",
2265
+ baseDir = process.cwd(),
2263
2266
  rulesyncIgnore
2264
2267
  }) {
2265
2268
  return new _GeminiCliIgnore({
@@ -2270,11 +2273,11 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2270
2273
  });
2271
2274
  }
2272
2275
  static async fromFile({
2273
- baseDir = ".",
2276
+ baseDir = process.cwd(),
2274
2277
  validate = true
2275
2278
  }) {
2276
2279
  const fileContent = await readFileContent(
2277
- (0, import_node_path19.join)(
2280
+ (0, import_node_path20.join)(
2278
2281
  baseDir,
2279
2282
  this.getSettablePaths().relativeDirPath,
2280
2283
  this.getSettablePaths().relativeFilePath
@@ -2291,7 +2294,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2291
2294
  };
2292
2295
 
2293
2296
  // src/ignore/junie-ignore.ts
2294
- var import_node_path20 = require("path");
2297
+ var import_node_path21 = require("path");
2295
2298
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2296
2299
  static getSettablePaths() {
2297
2300
  return {
@@ -2303,7 +2306,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2303
2306
  return this.toRulesyncIgnoreDefault();
2304
2307
  }
2305
2308
  static fromRulesyncIgnore({
2306
- baseDir = ".",
2309
+ baseDir = process.cwd(),
2307
2310
  rulesyncIgnore
2308
2311
  }) {
2309
2312
  return new _JunieIgnore({
@@ -2314,11 +2317,11 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2314
2317
  });
2315
2318
  }
2316
2319
  static async fromFile({
2317
- baseDir = ".",
2320
+ baseDir = process.cwd(),
2318
2321
  validate = true
2319
2322
  }) {
2320
2323
  const fileContent = await readFileContent(
2321
- (0, import_node_path20.join)(
2324
+ (0, import_node_path21.join)(
2322
2325
  baseDir,
2323
2326
  this.getSettablePaths().relativeDirPath,
2324
2327
  this.getSettablePaths().relativeFilePath
@@ -2335,7 +2338,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2335
2338
  };
2336
2339
 
2337
2340
  // src/ignore/kiro-ignore.ts
2338
- var import_node_path21 = require("path");
2341
+ var import_node_path22 = require("path");
2339
2342
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2340
2343
  static getSettablePaths() {
2341
2344
  return {
@@ -2347,7 +2350,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2347
2350
  return this.toRulesyncIgnoreDefault();
2348
2351
  }
2349
2352
  static fromRulesyncIgnore({
2350
- baseDir = ".",
2353
+ baseDir = process.cwd(),
2351
2354
  rulesyncIgnore
2352
2355
  }) {
2353
2356
  return new _KiroIgnore({
@@ -2358,11 +2361,11 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2358
2361
  });
2359
2362
  }
2360
2363
  static async fromFile({
2361
- baseDir = ".",
2364
+ baseDir = process.cwd(),
2362
2365
  validate = true
2363
2366
  }) {
2364
2367
  const fileContent = await readFileContent(
2365
- (0, import_node_path21.join)(
2368
+ (0, import_node_path22.join)(
2366
2369
  baseDir,
2367
2370
  this.getSettablePaths().relativeDirPath,
2368
2371
  this.getSettablePaths().relativeFilePath
@@ -2379,7 +2382,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2379
2382
  };
2380
2383
 
2381
2384
  // src/ignore/qwencode-ignore.ts
2382
- var import_node_path22 = require("path");
2385
+ var import_node_path23 = require("path");
2383
2386
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2384
2387
  static getSettablePaths() {
2385
2388
  return {
@@ -2391,7 +2394,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2391
2394
  return this.toRulesyncIgnoreDefault();
2392
2395
  }
2393
2396
  static fromRulesyncIgnore({
2394
- baseDir = ".",
2397
+ baseDir = process.cwd(),
2395
2398
  rulesyncIgnore
2396
2399
  }) {
2397
2400
  return new _QwencodeIgnore({
@@ -2402,11 +2405,11 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2402
2405
  });
2403
2406
  }
2404
2407
  static async fromFile({
2405
- baseDir = ".",
2408
+ baseDir = process.cwd(),
2406
2409
  validate = true
2407
2410
  }) {
2408
2411
  const fileContent = await readFileContent(
2409
- (0, import_node_path22.join)(
2412
+ (0, import_node_path23.join)(
2410
2413
  baseDir,
2411
2414
  this.getSettablePaths().relativeDirPath,
2412
2415
  this.getSettablePaths().relativeFilePath
@@ -2423,7 +2426,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2423
2426
  };
2424
2427
 
2425
2428
  // src/ignore/roo-ignore.ts
2426
- var import_node_path23 = require("path");
2429
+ var import_node_path24 = require("path");
2427
2430
  var RooIgnore = class _RooIgnore extends ToolIgnore {
2428
2431
  static getSettablePaths() {
2429
2432
  return {
@@ -2435,7 +2438,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2435
2438
  return this.toRulesyncIgnoreDefault();
2436
2439
  }
2437
2440
  static fromRulesyncIgnore({
2438
- baseDir = ".",
2441
+ baseDir = process.cwd(),
2439
2442
  rulesyncIgnore
2440
2443
  }) {
2441
2444
  return new _RooIgnore({
@@ -2446,11 +2449,11 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2446
2449
  });
2447
2450
  }
2448
2451
  static async fromFile({
2449
- baseDir = ".",
2452
+ baseDir = process.cwd(),
2450
2453
  validate = true
2451
2454
  }) {
2452
2455
  const fileContent = await readFileContent(
2453
- (0, import_node_path23.join)(
2456
+ (0, import_node_path24.join)(
2454
2457
  baseDir,
2455
2458
  this.getSettablePaths().relativeDirPath,
2456
2459
  this.getSettablePaths().relativeFilePath
@@ -2467,7 +2470,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2467
2470
  };
2468
2471
 
2469
2472
  // src/ignore/windsurf-ignore.ts
2470
- var import_node_path24 = require("path");
2473
+ var import_node_path25 = require("path");
2471
2474
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2472
2475
  static getSettablePaths() {
2473
2476
  return {
@@ -2479,7 +2482,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2479
2482
  return this.toRulesyncIgnoreDefault();
2480
2483
  }
2481
2484
  static fromRulesyncIgnore({
2482
- baseDir = ".",
2485
+ baseDir = process.cwd(),
2483
2486
  rulesyncIgnore
2484
2487
  }) {
2485
2488
  return new _WindsurfIgnore({
@@ -2490,11 +2493,11 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2490
2493
  });
2491
2494
  }
2492
2495
  static async fromFile({
2493
- baseDir = ".",
2496
+ baseDir = process.cwd(),
2494
2497
  validate = true
2495
2498
  }) {
2496
2499
  const fileContent = await readFileContent(
2497
- (0, import_node_path24.join)(
2500
+ (0, import_node_path25.join)(
2498
2501
  baseDir,
2499
2502
  this.getSettablePaths().relativeDirPath,
2500
2503
  this.getSettablePaths().relativeFilePath
@@ -2702,10 +2705,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
2702
2705
  var import_mini12 = require("zod/mini");
2703
2706
 
2704
2707
  // src/mcp/amazonqcli-mcp.ts
2705
- var import_node_path26 = require("path");
2708
+ var import_node_path27 = require("path");
2706
2709
 
2707
2710
  // src/mcp/rulesync-mcp.ts
2708
- var import_node_path25 = require("path");
2711
+ var import_node_path26 = require("path");
2709
2712
  var import_object = require("es-toolkit/object");
2710
2713
  var import_mini11 = require("zod/mini");
2711
2714
  var McpTransportTypeSchema = import_mini11.z.enum(["stdio", "sse", "http"]);
@@ -2783,16 +2786,18 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2783
2786
  validate = true,
2784
2787
  modularMcp = false
2785
2788
  }) {
2789
+ const baseDir = process.cwd();
2786
2790
  const paths = this.getSettablePaths();
2787
- const recommendedPath = (0, import_node_path25.join)(
2791
+ const recommendedPath = (0, import_node_path26.join)(
2792
+ baseDir,
2788
2793
  paths.recommended.relativeDirPath,
2789
2794
  paths.recommended.relativeFilePath
2790
2795
  );
2791
- const legacyPath = (0, import_node_path25.join)(paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
2796
+ const legacyPath = (0, import_node_path26.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
2792
2797
  if (await fileExists(recommendedPath)) {
2793
2798
  const fileContent2 = await readFileContent(recommendedPath);
2794
2799
  return new _RulesyncMcp({
2795
- baseDir: ".",
2800
+ baseDir,
2796
2801
  relativeDirPath: paths.recommended.relativeDirPath,
2797
2802
  relativeFilePath: paths.recommended.relativeFilePath,
2798
2803
  fileContent: fileContent2,
@@ -2806,7 +2811,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2806
2811
  );
2807
2812
  const fileContent2 = await readFileContent(legacyPath);
2808
2813
  return new _RulesyncMcp({
2809
- baseDir: ".",
2814
+ baseDir,
2810
2815
  relativeDirPath: paths.legacy.relativeDirPath,
2811
2816
  relativeFilePath: paths.legacy.relativeFilePath,
2812
2817
  fileContent: fileContent2,
@@ -2816,7 +2821,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2816
2821
  }
2817
2822
  const fileContent = await readFileContent(recommendedPath);
2818
2823
  return new _RulesyncMcp({
2819
- baseDir: ".",
2824
+ baseDir,
2820
2825
  relativeDirPath: paths.recommended.relativeDirPath,
2821
2826
  relativeFilePath: paths.recommended.relativeFilePath,
2822
2827
  fileContent,
@@ -2903,11 +2908,11 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2903
2908
  };
2904
2909
  }
2905
2910
  static async fromFile({
2906
- baseDir = ".",
2911
+ baseDir = process.cwd(),
2907
2912
  validate = true
2908
2913
  }) {
2909
2914
  const fileContent = await readFileContent(
2910
- (0, import_node_path26.join)(
2915
+ (0, import_node_path27.join)(
2911
2916
  baseDir,
2912
2917
  this.getSettablePaths().relativeDirPath,
2913
2918
  this.getSettablePaths().relativeFilePath
@@ -2922,7 +2927,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2922
2927
  });
2923
2928
  }
2924
2929
  static fromRulesyncMcp({
2925
- baseDir = ".",
2930
+ baseDir = process.cwd(),
2926
2931
  rulesyncMcp,
2927
2932
  validate = true
2928
2933
  }) {
@@ -2943,10 +2948,10 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2943
2948
  };
2944
2949
 
2945
2950
  // src/mcp/claudecode-mcp.ts
2946
- var import_node_path28 = require("path");
2951
+ var import_node_path29 = require("path");
2947
2952
 
2948
2953
  // src/mcp/modular-mcp.ts
2949
- var import_node_path27 = require("path");
2954
+ var import_node_path28 = require("path");
2950
2955
  var ModularMcp = class _ModularMcp extends AiFile {
2951
2956
  json;
2952
2957
  constructor(params) {
@@ -2977,7 +2982,7 @@ var ModularMcp = class _ModularMcp extends AiFile {
2977
2982
  global,
2978
2983
  relativeDirPath
2979
2984
  } = {
2980
- baseDir: ".",
2985
+ baseDir: process.cwd(),
2981
2986
  global: false,
2982
2987
  relativeDirPath: void 0
2983
2988
  }) {
@@ -3001,14 +3006,14 @@ var ModularMcp = class _ModularMcp extends AiFile {
3001
3006
  args: [
3002
3007
  "-y",
3003
3008
  "@kimuson/modular-mcp",
3004
- (0, import_node_path27.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3009
+ (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3005
3010
  ],
3006
3011
  env: {}
3007
3012
  }
3008
3013
  };
3009
3014
  }
3010
3015
  static fromRulesyncMcp({
3011
- baseDir = ".",
3016
+ baseDir = process.cwd(),
3012
3017
  rulesyncMcp,
3013
3018
  validate = true,
3014
3019
  global = false,
@@ -3056,13 +3061,13 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3056
3061
  };
3057
3062
  }
3058
3063
  static async fromFile({
3059
- baseDir = ".",
3064
+ baseDir = process.cwd(),
3060
3065
  validate = true,
3061
3066
  global = false
3062
3067
  }) {
3063
3068
  const paths = this.getSettablePaths({ global });
3064
3069
  const fileContent = await readOrInitializeFileContent(
3065
- (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3070
+ (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3066
3071
  JSON.stringify({ mcpServers: {} }, null, 2)
3067
3072
  );
3068
3073
  const json = JSON.parse(fileContent);
@@ -3076,7 +3081,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3076
3081
  });
3077
3082
  }
3078
3083
  static async fromRulesyncMcp({
3079
- baseDir = ".",
3084
+ baseDir = process.cwd(),
3080
3085
  rulesyncMcp,
3081
3086
  validate = true,
3082
3087
  global = false,
@@ -3084,7 +3089,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3084
3089
  }) {
3085
3090
  const paths = this.getSettablePaths({ global });
3086
3091
  const fileContent = await readOrInitializeFileContent(
3087
- (0, import_node_path28.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3092
+ (0, import_node_path29.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3088
3093
  JSON.stringify({ mcpServers: {} }, null, 2)
3089
3094
  );
3090
3095
  const json = JSON.parse(fileContent);
@@ -3115,7 +3120,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3115
3120
  };
3116
3121
 
3117
3122
  // src/mcp/cline-mcp.ts
3118
- var import_node_path29 = require("path");
3123
+ var import_node_path30 = require("path");
3119
3124
  var ClineMcp = class _ClineMcp extends ToolMcp {
3120
3125
  json;
3121
3126
  constructor(params) {
@@ -3132,11 +3137,11 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3132
3137
  };
3133
3138
  }
3134
3139
  static async fromFile({
3135
- baseDir = ".",
3140
+ baseDir = process.cwd(),
3136
3141
  validate = true
3137
3142
  }) {
3138
3143
  const fileContent = await readFileContent(
3139
- (0, import_node_path29.join)(
3144
+ (0, import_node_path30.join)(
3140
3145
  baseDir,
3141
3146
  this.getSettablePaths().relativeDirPath,
3142
3147
  this.getSettablePaths().relativeFilePath
@@ -3151,7 +3156,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3151
3156
  });
3152
3157
  }
3153
3158
  static fromRulesyncMcp({
3154
- baseDir = ".",
3159
+ baseDir = process.cwd(),
3155
3160
  rulesyncMcp,
3156
3161
  validate = true
3157
3162
  }) {
@@ -3172,7 +3177,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3172
3177
  };
3173
3178
 
3174
3179
  // src/mcp/codexcli-mcp.ts
3175
- var import_node_path30 = require("path");
3180
+ var import_node_path31 = require("path");
3176
3181
  var smolToml = __toESM(require("smol-toml"), 1);
3177
3182
  var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3178
3183
  toml;
@@ -3202,13 +3207,13 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3202
3207
  };
3203
3208
  }
3204
3209
  static async fromFile({
3205
- baseDir = ".",
3210
+ baseDir = process.cwd(),
3206
3211
  validate = true,
3207
3212
  global = false
3208
3213
  }) {
3209
3214
  const paths = this.getSettablePaths({ global });
3210
3215
  const fileContent = await readFileContent(
3211
- (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3216
+ (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3212
3217
  );
3213
3218
  return new _CodexcliMcp({
3214
3219
  baseDir,
@@ -3219,13 +3224,13 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3219
3224
  });
3220
3225
  }
3221
3226
  static async fromRulesyncMcp({
3222
- baseDir = ".",
3227
+ baseDir = process.cwd(),
3223
3228
  rulesyncMcp,
3224
3229
  validate = true,
3225
3230
  global = false
3226
3231
  }) {
3227
3232
  const paths = this.getSettablePaths({ global });
3228
- const configTomlFilePath = (0, import_node_path30.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3233
+ const configTomlFilePath = (0, import_node_path31.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3229
3234
  const configTomlFileContent = await readOrInitializeFileContent(
3230
3235
  configTomlFilePath,
3231
3236
  smolToml.stringify({})
@@ -3266,7 +3271,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3266
3271
  };
3267
3272
 
3268
3273
  // src/mcp/copilot-mcp.ts
3269
- var import_node_path31 = require("path");
3274
+ var import_node_path32 = require("path");
3270
3275
  var CopilotMcp = class _CopilotMcp extends ToolMcp {
3271
3276
  json;
3272
3277
  constructor(params) {
@@ -3283,11 +3288,11 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3283
3288
  };
3284
3289
  }
3285
3290
  static async fromFile({
3286
- baseDir = ".",
3291
+ baseDir = process.cwd(),
3287
3292
  validate = true
3288
3293
  }) {
3289
3294
  const fileContent = await readFileContent(
3290
- (0, import_node_path31.join)(
3295
+ (0, import_node_path32.join)(
3291
3296
  baseDir,
3292
3297
  this.getSettablePaths().relativeDirPath,
3293
3298
  this.getSettablePaths().relativeFilePath
@@ -3302,7 +3307,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3302
3307
  });
3303
3308
  }
3304
3309
  static fromRulesyncMcp({
3305
- baseDir = ".",
3310
+ baseDir = process.cwd(),
3306
3311
  rulesyncMcp,
3307
3312
  validate = true
3308
3313
  }) {
@@ -3323,7 +3328,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3323
3328
  };
3324
3329
 
3325
3330
  // src/mcp/cursor-mcp.ts
3326
- var import_node_path32 = require("path");
3331
+ var import_node_path33 = require("path");
3327
3332
  var CursorMcp = class _CursorMcp extends ToolMcp {
3328
3333
  json;
3329
3334
  constructor(params) {
@@ -3340,11 +3345,11 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3340
3345
  };
3341
3346
  }
3342
3347
  static async fromFile({
3343
- baseDir = ".",
3348
+ baseDir = process.cwd(),
3344
3349
  validate = true
3345
3350
  }) {
3346
3351
  const fileContent = await readFileContent(
3347
- (0, import_node_path32.join)(
3352
+ (0, import_node_path33.join)(
3348
3353
  baseDir,
3349
3354
  this.getSettablePaths().relativeDirPath,
3350
3355
  this.getSettablePaths().relativeFilePath
@@ -3359,7 +3364,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3359
3364
  });
3360
3365
  }
3361
3366
  static fromRulesyncMcp({
3362
- baseDir = ".",
3367
+ baseDir = process.cwd(),
3363
3368
  rulesyncMcp,
3364
3369
  validate = true
3365
3370
  }) {
@@ -3391,7 +3396,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3391
3396
  };
3392
3397
 
3393
3398
  // src/mcp/geminicli-mcp.ts
3394
- var import_node_path33 = require("path");
3399
+ var import_node_path34 = require("path");
3395
3400
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3396
3401
  json;
3397
3402
  constructor(params) {
@@ -3414,13 +3419,13 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3414
3419
  };
3415
3420
  }
3416
3421
  static async fromFile({
3417
- baseDir = ".",
3422
+ baseDir = process.cwd(),
3418
3423
  validate = true,
3419
3424
  global = false
3420
3425
  }) {
3421
3426
  const paths = this.getSettablePaths({ global });
3422
3427
  const fileContent = await readOrInitializeFileContent(
3423
- (0, import_node_path33.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3428
+ (0, import_node_path34.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3424
3429
  JSON.stringify({ mcpServers: {} }, null, 2)
3425
3430
  );
3426
3431
  const json = JSON.parse(fileContent);
@@ -3434,14 +3439,14 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3434
3439
  });
3435
3440
  }
3436
3441
  static async fromRulesyncMcp({
3437
- baseDir = ".",
3442
+ baseDir = process.cwd(),
3438
3443
  rulesyncMcp,
3439
3444
  validate = true,
3440
3445
  global = false
3441
3446
  }) {
3442
3447
  const paths = this.getSettablePaths({ global });
3443
3448
  const fileContent = await readOrInitializeFileContent(
3444
- (0, import_node_path33.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3449
+ (0, import_node_path34.join)(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3445
3450
  JSON.stringify({ mcpServers: {} }, null, 2)
3446
3451
  );
3447
3452
  const json = JSON.parse(fileContent);
@@ -3465,7 +3470,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3465
3470
  };
3466
3471
 
3467
3472
  // src/mcp/roo-mcp.ts
3468
- var import_node_path34 = require("path");
3473
+ var import_node_path35 = require("path");
3469
3474
  var RooMcp = class _RooMcp extends ToolMcp {
3470
3475
  json;
3471
3476
  constructor(params) {
@@ -3482,11 +3487,11 @@ var RooMcp = class _RooMcp extends ToolMcp {
3482
3487
  };
3483
3488
  }
3484
3489
  static async fromFile({
3485
- baseDir = ".",
3490
+ baseDir = process.cwd(),
3486
3491
  validate = true
3487
3492
  }) {
3488
3493
  const fileContent = await readFileContent(
3489
- (0, import_node_path34.join)(
3494
+ (0, import_node_path35.join)(
3490
3495
  baseDir,
3491
3496
  this.getSettablePaths().relativeDirPath,
3492
3497
  this.getSettablePaths().relativeFilePath
@@ -3501,7 +3506,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
3501
3506
  });
3502
3507
  }
3503
3508
  static fromRulesyncMcp({
3504
- baseDir = ".",
3509
+ baseDir = process.cwd(),
3505
3510
  rulesyncMcp,
3506
3511
  validate = true
3507
3512
  }) {
@@ -3543,7 +3548,7 @@ var McpProcessor = class extends FeatureProcessor {
3543
3548
  global;
3544
3549
  modularMcp;
3545
3550
  constructor({
3546
- baseDir = ".",
3551
+ baseDir = process.cwd(),
3547
3552
  toolTarget,
3548
3553
  global = false,
3549
3554
  modularMcp = false
@@ -3769,15 +3774,15 @@ var McpProcessor = class extends FeatureProcessor {
3769
3774
  };
3770
3775
 
3771
3776
  // src/rules/rules-processor.ts
3772
- var import_node_path64 = require("path");
3777
+ var import_node_path65 = require("path");
3773
3778
  var import_fast_xml_parser = require("fast-xml-parser");
3774
3779
  var import_mini21 = require("zod/mini");
3775
3780
 
3776
3781
  // src/subagents/agentsmd-subagent.ts
3777
- var import_node_path36 = require("path");
3782
+ var import_node_path37 = require("path");
3778
3783
 
3779
3784
  // src/subagents/simulated-subagent.ts
3780
- var import_node_path35 = require("path");
3785
+ var import_node_path36 = require("path");
3781
3786
  var import_mini13 = require("zod/mini");
3782
3787
 
3783
3788
  // src/subagents/tool-subagent.ts
@@ -3825,7 +3830,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3825
3830
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
3826
3831
  if (!result.success) {
3827
3832
  throw new Error(
3828
- `Invalid frontmatter in ${(0, import_node_path35.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
3833
+ `Invalid frontmatter in ${(0, import_node_path36.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
3829
3834
  );
3830
3835
  }
3831
3836
  }
@@ -3846,7 +3851,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3846
3851
  throw new Error("Not implemented because it is a SIMULATED file.");
3847
3852
  }
3848
3853
  static fromRulesyncSubagentDefault({
3849
- baseDir = ".",
3854
+ baseDir = process.cwd(),
3850
3855
  rulesyncSubagent,
3851
3856
  validate = true
3852
3857
  }) {
@@ -3876,17 +3881,17 @@ var SimulatedSubagent = class extends ToolSubagent {
3876
3881
  return {
3877
3882
  success: false,
3878
3883
  error: new Error(
3879
- `Invalid frontmatter in ${(0, import_node_path35.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
3884
+ `Invalid frontmatter in ${(0, import_node_path36.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
3880
3885
  )
3881
3886
  };
3882
3887
  }
3883
3888
  }
3884
3889
  static async fromFileDefault({
3885
- baseDir = ".",
3890
+ baseDir = process.cwd(),
3886
3891
  relativeFilePath,
3887
3892
  validate = true
3888
3893
  }) {
3889
- const filePath = (0, import_node_path35.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3894
+ const filePath = (0, import_node_path36.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3890
3895
  const fileContent = await readFileContent(filePath);
3891
3896
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3892
3897
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -3896,7 +3901,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3896
3901
  return {
3897
3902
  baseDir,
3898
3903
  relativeDirPath: this.getSettablePaths().relativeDirPath,
3899
- relativeFilePath: (0, import_node_path35.basename)(relativeFilePath),
3904
+ relativeFilePath: (0, import_node_path36.basename)(relativeFilePath),
3900
3905
  frontmatter: result.data,
3901
3906
  body: content.trim(),
3902
3907
  validate
@@ -3908,7 +3913,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3908
3913
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3909
3914
  static getSettablePaths() {
3910
3915
  return {
3911
- relativeDirPath: (0, import_node_path36.join)(".agents", "subagents")
3916
+ relativeDirPath: (0, import_node_path37.join)(".agents", "subagents")
3912
3917
  };
3913
3918
  }
3914
3919
  static async fromFile(params) {
@@ -3928,11 +3933,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3928
3933
  };
3929
3934
 
3930
3935
  // src/subagents/codexcli-subagent.ts
3931
- var import_node_path37 = require("path");
3936
+ var import_node_path38 = require("path");
3932
3937
  var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3933
3938
  static getSettablePaths() {
3934
3939
  return {
3935
- relativeDirPath: (0, import_node_path37.join)(".codex", "subagents")
3940
+ relativeDirPath: (0, import_node_path38.join)(".codex", "subagents")
3936
3941
  };
3937
3942
  }
3938
3943
  static async fromFile(params) {
@@ -3952,11 +3957,11 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3952
3957
  };
3953
3958
 
3954
3959
  // src/subagents/copilot-subagent.ts
3955
- var import_node_path38 = require("path");
3960
+ var import_node_path39 = require("path");
3956
3961
  var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3957
3962
  static getSettablePaths() {
3958
3963
  return {
3959
- relativeDirPath: (0, import_node_path38.join)(".github", "subagents")
3964
+ relativeDirPath: (0, import_node_path39.join)(".github", "subagents")
3960
3965
  };
3961
3966
  }
3962
3967
  static async fromFile(params) {
@@ -3976,11 +3981,11 @@ var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3976
3981
  };
3977
3982
 
3978
3983
  // src/subagents/cursor-subagent.ts
3979
- var import_node_path39 = require("path");
3984
+ var import_node_path40 = require("path");
3980
3985
  var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3981
3986
  static getSettablePaths() {
3982
3987
  return {
3983
- relativeDirPath: (0, import_node_path39.join)(".cursor", "subagents")
3988
+ relativeDirPath: (0, import_node_path40.join)(".cursor", "subagents")
3984
3989
  };
3985
3990
  }
3986
3991
  static async fromFile(params) {
@@ -4000,11 +4005,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
4000
4005
  };
4001
4006
 
4002
4007
  // src/subagents/geminicli-subagent.ts
4003
- var import_node_path40 = require("path");
4008
+ var import_node_path41 = require("path");
4004
4009
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4005
4010
  static getSettablePaths() {
4006
4011
  return {
4007
- relativeDirPath: (0, import_node_path40.join)(".gemini", "subagents")
4012
+ relativeDirPath: (0, import_node_path41.join)(".gemini", "subagents")
4008
4013
  };
4009
4014
  }
4010
4015
  static async fromFile(params) {
@@ -4024,11 +4029,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4024
4029
  };
4025
4030
 
4026
4031
  // src/subagents/roo-subagent.ts
4027
- var import_node_path41 = require("path");
4032
+ var import_node_path42 = require("path");
4028
4033
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4029
4034
  static getSettablePaths() {
4030
4035
  return {
4031
- relativeDirPath: (0, import_node_path41.join)(".roo", "subagents")
4036
+ relativeDirPath: (0, import_node_path42.join)(".roo", "subagents")
4032
4037
  };
4033
4038
  }
4034
4039
  static async fromFile(params) {
@@ -4048,15 +4053,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4048
4053
  };
4049
4054
 
4050
4055
  // src/subagents/subagents-processor.ts
4051
- var import_node_path44 = require("path");
4056
+ var import_node_path45 = require("path");
4052
4057
  var import_mini16 = require("zod/mini");
4053
4058
 
4054
4059
  // src/subagents/claudecode-subagent.ts
4055
- var import_node_path43 = require("path");
4060
+ var import_node_path44 = require("path");
4056
4061
  var import_mini15 = require("zod/mini");
4057
4062
 
4058
4063
  // src/subagents/rulesync-subagent.ts
4059
- var import_node_path42 = require("path");
4064
+ var import_node_path43 = require("path");
4060
4065
  var import_mini14 = require("zod/mini");
4061
4066
  var RulesyncSubagentModelSchema = import_mini14.z.enum(["opus", "sonnet", "haiku", "inherit"]);
4062
4067
  var RulesyncSubagentFrontmatterSchema = import_mini14.z.object({
@@ -4077,7 +4082,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4077
4082
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4078
4083
  if (!result.success) {
4079
4084
  throw new Error(
4080
- `Invalid frontmatter in ${(0, import_node_path42.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4085
+ `Invalid frontmatter in ${(0, import_node_path43.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4081
4086
  );
4082
4087
  }
4083
4088
  }
@@ -4089,7 +4094,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4089
4094
  }
4090
4095
  static getSettablePaths() {
4091
4096
  return {
4092
- relativeDirPath: (0, import_node_path42.join)(".rulesync", "subagents")
4097
+ relativeDirPath: (0, import_node_path43.join)(".rulesync", "subagents")
4093
4098
  };
4094
4099
  }
4095
4100
  getFrontmatter() {
@@ -4109,7 +4114,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4109
4114
  return {
4110
4115
  success: false,
4111
4116
  error: new Error(
4112
- `Invalid frontmatter in ${(0, import_node_path42.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4117
+ `Invalid frontmatter in ${(0, import_node_path43.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4113
4118
  )
4114
4119
  };
4115
4120
  }
@@ -4117,15 +4122,17 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4117
4122
  static async fromFile({
4118
4123
  relativeFilePath
4119
4124
  }) {
4120
- const fileContent = await readFileContent((0, import_node_path42.join)(".rulesync", "subagents", relativeFilePath));
4125
+ const fileContent = await readFileContent(
4126
+ (0, import_node_path43.join)(process.cwd(), ".rulesync", "subagents", relativeFilePath)
4127
+ );
4121
4128
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4122
4129
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4123
4130
  if (!result.success) {
4124
4131
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${formatError(result.error)}`);
4125
4132
  }
4126
- const filename = (0, import_node_path42.basename)(relativeFilePath);
4133
+ const filename = (0, import_node_path43.basename)(relativeFilePath);
4127
4134
  return new _RulesyncSubagent({
4128
- baseDir: ".",
4135
+ baseDir: process.cwd(),
4129
4136
  relativeDirPath: this.getSettablePaths().relativeDirPath,
4130
4137
  relativeFilePath: filename,
4131
4138
  frontmatter: result.data,
@@ -4149,7 +4156,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4149
4156
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
4150
4157
  if (!result.success) {
4151
4158
  throw new Error(
4152
- `Invalid frontmatter in ${(0, import_node_path43.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4159
+ `Invalid frontmatter in ${(0, import_node_path44.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4153
4160
  );
4154
4161
  }
4155
4162
  }
@@ -4161,7 +4168,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4161
4168
  }
4162
4169
  static getSettablePaths(_options = {}) {
4163
4170
  return {
4164
- relativeDirPath: (0, import_node_path43.join)(".claude", "agents")
4171
+ relativeDirPath: (0, import_node_path44.join)(".claude", "agents")
4165
4172
  };
4166
4173
  }
4167
4174
  getFrontmatter() {
@@ -4187,14 +4194,14 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4187
4194
  // RulesyncCommand baseDir is always the project root directory
4188
4195
  frontmatter: rulesyncFrontmatter,
4189
4196
  body: this.body,
4190
- relativeDirPath: (0, import_node_path43.join)(".rulesync", "subagents"),
4197
+ relativeDirPath: (0, import_node_path44.join)(".rulesync", "subagents"),
4191
4198
  relativeFilePath: this.getRelativeFilePath(),
4192
4199
  fileContent,
4193
4200
  validate: true
4194
4201
  });
4195
4202
  }
4196
4203
  static fromRulesyncSubagent({
4197
- baseDir = ".",
4204
+ baseDir = process.cwd(),
4198
4205
  rulesyncSubagent,
4199
4206
  validate = true,
4200
4207
  global = false
@@ -4229,7 +4236,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4229
4236
  return {
4230
4237
  success: false,
4231
4238
  error: new Error(
4232
- `Invalid frontmatter in ${(0, import_node_path43.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4239
+ `Invalid frontmatter in ${(0, import_node_path44.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4233
4240
  )
4234
4241
  };
4235
4242
  }
@@ -4241,13 +4248,13 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4241
4248
  });
4242
4249
  }
4243
4250
  static async fromFile({
4244
- baseDir = ".",
4251
+ baseDir = process.cwd(),
4245
4252
  relativeFilePath,
4246
4253
  validate = true,
4247
4254
  global = false
4248
4255
  }) {
4249
4256
  const paths = this.getSettablePaths({ global });
4250
- const filePath = (0, import_node_path43.join)(baseDir, paths.relativeDirPath, relativeFilePath);
4257
+ const filePath = (0, import_node_path44.join)(baseDir, paths.relativeDirPath, relativeFilePath);
4251
4258
  const fileContent = await readFileContent(filePath);
4252
4259
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4253
4260
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -4290,7 +4297,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4290
4297
  toolTarget;
4291
4298
  global;
4292
4299
  constructor({
4293
- baseDir = ".",
4300
+ baseDir = process.cwd(),
4294
4301
  toolTarget,
4295
4302
  global = false
4296
4303
  }) {
@@ -4401,7 +4408,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4401
4408
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
4402
4409
  */
4403
4410
  async loadRulesyncFiles() {
4404
- const subagentsDir = (0, import_node_path44.join)(RulesyncSubagent.getSettablePaths().relativeDirPath);
4411
+ const subagentsDir = (0, import_node_path45.join)(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
4405
4412
  const dirExists = await directoryExists(subagentsDir);
4406
4413
  if (!dirExists) {
4407
4414
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -4416,7 +4423,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4416
4423
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
4417
4424
  const rulesyncSubagents = [];
4418
4425
  for (const mdFile of mdFiles) {
4419
- const filepath = (0, import_node_path44.join)(subagentsDir, mdFile);
4426
+ const filepath = (0, import_node_path45.join)(subagentsDir, mdFile);
4420
4427
  try {
4421
4428
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
4422
4429
  relativeFilePath: mdFile,
@@ -4535,8 +4542,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
4535
4542
  relativeDirPath,
4536
4543
  fromFile
4537
4544
  }) {
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);
4545
+ const paths = await findFilesByGlobs((0, import_node_path45.join)(this.baseDir, relativeDirPath, "*.md"));
4546
+ const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path45.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
4540
4547
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
4541
4548
  return subagents;
4542
4549
  }
@@ -4563,13 +4570,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
4563
4570
  };
4564
4571
 
4565
4572
  // src/rules/agentsmd-rule.ts
4566
- var import_node_path47 = require("path");
4573
+ var import_node_path48 = require("path");
4567
4574
 
4568
4575
  // src/rules/tool-rule.ts
4569
- var import_node_path46 = require("path");
4576
+ var import_node_path47 = require("path");
4570
4577
 
4571
4578
  // src/rules/rulesync-rule.ts
4572
- var import_node_path45 = require("path");
4579
+ var import_node_path46 = require("path");
4573
4580
  var import_mini17 = require("zod/mini");
4574
4581
  var RulesyncRuleFrontmatterSchema = import_mini17.z.object({
4575
4582
  root: import_mini17.z.optional(import_mini17.z.optional(import_mini17.z.boolean())),
@@ -4598,7 +4605,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4598
4605
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
4599
4606
  if (!result.success) {
4600
4607
  throw new Error(
4601
- `Invalid frontmatter in ${(0, import_node_path45.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4608
+ `Invalid frontmatter in ${(0, import_node_path46.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4602
4609
  );
4603
4610
  }
4604
4611
  }
@@ -4612,7 +4619,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4612
4619
  static getSettablePaths() {
4613
4620
  return {
4614
4621
  recommended: {
4615
- relativeDirPath: (0, import_node_path45.join)(".rulesync", "rules")
4622
+ relativeDirPath: (0, import_node_path46.join)(".rulesync", "rules")
4616
4623
  },
4617
4624
  legacy: {
4618
4625
  relativeDirPath: ".rulesync"
@@ -4633,7 +4640,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4633
4640
  return {
4634
4641
  success: false,
4635
4642
  error: new Error(
4636
- `Invalid frontmatter in ${(0, import_node_path45.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4643
+ `Invalid frontmatter in ${(0, import_node_path46.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4637
4644
  )
4638
4645
  };
4639
4646
  }
@@ -4642,8 +4649,12 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4642
4649
  relativeFilePath,
4643
4650
  validate = true
4644
4651
  }) {
4645
- const legacyPath = (0, import_node_path45.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4646
- const recommendedPath = (0, import_node_path45.join)(
4652
+ const legacyPath = (0, import_node_path46.join)(
4653
+ process.cwd(),
4654
+ this.getSettablePaths().legacy.relativeDirPath,
4655
+ relativeFilePath
4656
+ );
4657
+ const recommendedPath = (0, import_node_path46.join)(
4647
4658
  this.getSettablePaths().recommended.relativeDirPath,
4648
4659
  relativeFilePath
4649
4660
  );
@@ -4662,9 +4673,9 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4662
4673
  agentsmd: result.data.agentsmd,
4663
4674
  cursor: result.data.cursor
4664
4675
  };
4665
- const filename = (0, import_node_path45.basename)(legacyPath);
4676
+ const filename = (0, import_node_path46.basename)(legacyPath);
4666
4677
  return new _RulesyncRule({
4667
- baseDir: ".",
4678
+ baseDir: process.cwd(),
4668
4679
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
4669
4680
  relativeFilePath: filename,
4670
4681
  frontmatter: validatedFrontmatter,
@@ -4676,7 +4687,11 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4676
4687
  relativeFilePath,
4677
4688
  validate = true
4678
4689
  }) {
4679
- const filePath = (0, import_node_path45.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4690
+ const filePath = (0, import_node_path46.join)(
4691
+ process.cwd(),
4692
+ this.getSettablePaths().recommended.relativeDirPath,
4693
+ relativeFilePath
4694
+ );
4680
4695
  const fileContent = await readFileContent(filePath);
4681
4696
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4682
4697
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -4691,9 +4706,9 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4691
4706
  agentsmd: result.data.agentsmd,
4692
4707
  cursor: result.data.cursor
4693
4708
  };
4694
- const filename = (0, import_node_path45.basename)(filePath);
4709
+ const filename = (0, import_node_path46.basename)(filePath);
4695
4710
  return new _RulesyncRule({
4696
- baseDir: ".",
4711
+ baseDir: process.cwd(),
4697
4712
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
4698
4713
  relativeFilePath: filename,
4699
4714
  frontmatter: validatedFrontmatter,
@@ -4727,7 +4742,7 @@ var ToolRule = class extends ToolFile {
4727
4742
  throw new Error("Please implement this method in the subclass.");
4728
4743
  }
4729
4744
  static buildToolRuleParamsDefault({
4730
- baseDir = ".",
4745
+ baseDir = process.cwd(),
4731
4746
  rulesyncRule,
4732
4747
  validate = true,
4733
4748
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
@@ -4762,11 +4777,11 @@ var ToolRule = class extends ToolFile {
4762
4777
  };
4763
4778
  }
4764
4779
  static buildToolRuleParamsAgentsmd({
4765
- baseDir = ".",
4780
+ baseDir = process.cwd(),
4766
4781
  rulesyncRule,
4767
4782
  validate = true,
4768
4783
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
4769
- nonRootPath = { relativeDirPath: (0, import_node_path46.join)(".agents", "memories") }
4784
+ nonRootPath = { relativeDirPath: (0, import_node_path47.join)(".agents", "memories") }
4770
4785
  }) {
4771
4786
  const params = this.buildToolRuleParamsDefault({
4772
4787
  baseDir,
@@ -4777,7 +4792,7 @@ var ToolRule = class extends ToolFile {
4777
4792
  });
4778
4793
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
4779
4794
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
4780
- params.relativeDirPath = (0, import_node_path46.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
4795
+ params.relativeDirPath = (0, import_node_path47.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
4781
4796
  params.relativeFilePath = "AGENTS.md";
4782
4797
  }
4783
4798
  return params;
@@ -4786,7 +4801,7 @@ var ToolRule = class extends ToolFile {
4786
4801
  return new RulesyncRule({
4787
4802
  baseDir: ".",
4788
4803
  // RulesyncRule baseDir is always the project root directory
4789
- relativeDirPath: (0, import_node_path46.join)(".rulesync", "rules"),
4804
+ relativeDirPath: (0, import_node_path47.join)(".rulesync", "rules"),
4790
4805
  relativeFilePath: this.getRelativeFilePath(),
4791
4806
  frontmatter: {
4792
4807
  root: this.isRoot(),
@@ -4843,18 +4858,18 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4843
4858
  relativeFilePath: "AGENTS.md"
4844
4859
  },
4845
4860
  nonRoot: {
4846
- relativeDirPath: (0, import_node_path47.join)(".agents", "memories")
4861
+ relativeDirPath: (0, import_node_path48.join)(".agents", "memories")
4847
4862
  }
4848
4863
  };
4849
4864
  }
4850
4865
  static async fromFile({
4851
- baseDir = ".",
4866
+ baseDir = process.cwd(),
4852
4867
  relativeFilePath,
4853
4868
  validate = true
4854
4869
  }) {
4855
4870
  const isRoot = relativeFilePath === "AGENTS.md";
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));
4871
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path48.join)(".agents", "memories", relativeFilePath);
4872
+ const fileContent = await readFileContent((0, import_node_path48.join)(baseDir, relativePath));
4858
4873
  return new _AgentsMdRule({
4859
4874
  baseDir,
4860
4875
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4865,7 +4880,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4865
4880
  });
4866
4881
  }
4867
4882
  static fromRulesyncRule({
4868
- baseDir = ".",
4883
+ baseDir = process.cwd(),
4869
4884
  rulesyncRule,
4870
4885
  validate = true
4871
4886
  }) {
@@ -4894,22 +4909,22 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4894
4909
  };
4895
4910
 
4896
4911
  // src/rules/amazonqcli-rule.ts
4897
- var import_node_path48 = require("path");
4912
+ var import_node_path49 = require("path");
4898
4913
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4899
4914
  static getSettablePaths() {
4900
4915
  return {
4901
4916
  nonRoot: {
4902
- relativeDirPath: (0, import_node_path48.join)(".amazonq", "rules")
4917
+ relativeDirPath: (0, import_node_path49.join)(".amazonq", "rules")
4903
4918
  }
4904
4919
  };
4905
4920
  }
4906
4921
  static async fromFile({
4907
- baseDir = ".",
4922
+ baseDir = process.cwd(),
4908
4923
  relativeFilePath,
4909
4924
  validate = true
4910
4925
  }) {
4911
4926
  const fileContent = await readFileContent(
4912
- (0, import_node_path48.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4927
+ (0, import_node_path49.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4913
4928
  );
4914
4929
  return new _AmazonQCliRule({
4915
4930
  baseDir,
@@ -4921,7 +4936,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4921
4936
  });
4922
4937
  }
4923
4938
  static fromRulesyncRule({
4924
- baseDir = ".",
4939
+ baseDir = process.cwd(),
4925
4940
  rulesyncRule,
4926
4941
  validate = true
4927
4942
  }) {
@@ -4949,7 +4964,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4949
4964
  };
4950
4965
 
4951
4966
  // src/rules/augmentcode-legacy-rule.ts
4952
- var import_node_path49 = require("path");
4967
+ var import_node_path50 = require("path");
4953
4968
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4954
4969
  toRulesyncRule() {
4955
4970
  const rulesyncFrontmatter = {
@@ -4963,7 +4978,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4963
4978
  // RulesyncRule baseDir is always the project root directory
4964
4979
  frontmatter: rulesyncFrontmatter,
4965
4980
  body: this.getFileContent(),
4966
- relativeDirPath: (0, import_node_path49.join)(".rulesync", "rules"),
4981
+ relativeDirPath: (0, import_node_path50.join)(".rulesync", "rules"),
4967
4982
  relativeFilePath: this.getRelativeFilePath(),
4968
4983
  validate: true
4969
4984
  });
@@ -4975,12 +4990,12 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4975
4990
  relativeFilePath: ".augment-guidelines"
4976
4991
  },
4977
4992
  nonRoot: {
4978
- relativeDirPath: (0, import_node_path49.join)(".augment", "rules")
4993
+ relativeDirPath: (0, import_node_path50.join)(".augment", "rules")
4979
4994
  }
4980
4995
  };
4981
4996
  }
4982
4997
  static fromRulesyncRule({
4983
- baseDir = ".",
4998
+ baseDir = process.cwd(),
4984
4999
  rulesyncRule,
4985
5000
  validate = true
4986
5001
  }) {
@@ -5004,14 +5019,14 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5004
5019
  });
5005
5020
  }
5006
5021
  static async fromFile({
5007
- baseDir = ".",
5022
+ baseDir = process.cwd(),
5008
5023
  relativeFilePath,
5009
5024
  validate = true
5010
5025
  }) {
5011
5026
  const settablePaths = this.getSettablePaths();
5012
5027
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
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));
5028
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path50.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
5029
+ const fileContent = await readFileContent((0, import_node_path50.join)(baseDir, relativePath));
5015
5030
  return new _AugmentcodeLegacyRule({
5016
5031
  baseDir,
5017
5032
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -5024,7 +5039,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5024
5039
  };
5025
5040
 
5026
5041
  // src/rules/augmentcode-rule.ts
5027
- var import_node_path50 = require("path");
5042
+ var import_node_path51 = require("path");
5028
5043
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5029
5044
  toRulesyncRule() {
5030
5045
  return this.toRulesyncRuleDefault();
@@ -5032,12 +5047,12 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5032
5047
  static getSettablePaths() {
5033
5048
  return {
5034
5049
  nonRoot: {
5035
- relativeDirPath: (0, import_node_path50.join)(".augment", "rules")
5050
+ relativeDirPath: (0, import_node_path51.join)(".augment", "rules")
5036
5051
  }
5037
5052
  };
5038
5053
  }
5039
5054
  static fromRulesyncRule({
5040
- baseDir = ".",
5055
+ baseDir = process.cwd(),
5041
5056
  rulesyncRule,
5042
5057
  validate = true
5043
5058
  }) {
@@ -5051,12 +5066,12 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5051
5066
  );
5052
5067
  }
5053
5068
  static async fromFile({
5054
- baseDir = ".",
5069
+ baseDir = process.cwd(),
5055
5070
  relativeFilePath,
5056
5071
  validate = true
5057
5072
  }) {
5058
5073
  const fileContent = await readFileContent(
5059
- (0, import_node_path50.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5074
+ (0, import_node_path51.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5060
5075
  );
5061
5076
  const { body: content } = parseFrontmatter(fileContent);
5062
5077
  return new _AugmentcodeRule({
@@ -5079,7 +5094,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5079
5094
  };
5080
5095
 
5081
5096
  // src/rules/claudecode-rule.ts
5082
- var import_node_path51 = require("path");
5097
+ var import_node_path52 = require("path");
5083
5098
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5084
5099
  static getSettablePaths({
5085
5100
  global
@@ -5098,12 +5113,12 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5098
5113
  relativeFilePath: "CLAUDE.md"
5099
5114
  },
5100
5115
  nonRoot: {
5101
- relativeDirPath: (0, import_node_path51.join)(".claude", "memories")
5116
+ relativeDirPath: (0, import_node_path52.join)(".claude", "memories")
5102
5117
  }
5103
5118
  };
5104
5119
  }
5105
5120
  static async fromFile({
5106
- baseDir = ".",
5121
+ baseDir = process.cwd(),
5107
5122
  relativeFilePath,
5108
5123
  validate = true,
5109
5124
  global = false
@@ -5113,7 +5128,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5113
5128
  if (isRoot) {
5114
5129
  const relativePath2 = paths.root.relativeFilePath;
5115
5130
  const fileContent2 = await readFileContent(
5116
- (0, import_node_path51.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5131
+ (0, import_node_path52.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5117
5132
  );
5118
5133
  return new _ClaudecodeRule({
5119
5134
  baseDir,
@@ -5127,8 +5142,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5127
5142
  if (!paths.nonRoot) {
5128
5143
  throw new Error("nonRoot path is not set");
5129
5144
  }
5130
- const relativePath = (0, import_node_path51.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5131
- const fileContent = await readFileContent((0, import_node_path51.join)(baseDir, relativePath));
5145
+ const relativePath = (0, import_node_path52.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5146
+ const fileContent = await readFileContent((0, import_node_path52.join)(baseDir, relativePath));
5132
5147
  return new _ClaudecodeRule({
5133
5148
  baseDir,
5134
5149
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5139,7 +5154,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5139
5154
  });
5140
5155
  }
5141
5156
  static fromRulesyncRule({
5142
- baseDir = ".",
5157
+ baseDir = process.cwd(),
5143
5158
  rulesyncRule,
5144
5159
  validate = true,
5145
5160
  global = false
@@ -5170,7 +5185,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5170
5185
  };
5171
5186
 
5172
5187
  // src/rules/cline-rule.ts
5173
- var import_node_path52 = require("path");
5188
+ var import_node_path53 = require("path");
5174
5189
  var import_mini18 = require("zod/mini");
5175
5190
  var ClineRuleFrontmatterSchema = import_mini18.z.object({
5176
5191
  description: import_mini18.z.string()
@@ -5187,7 +5202,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5187
5202
  return this.toRulesyncRuleDefault();
5188
5203
  }
5189
5204
  static fromRulesyncRule({
5190
- baseDir = ".",
5205
+ baseDir = process.cwd(),
5191
5206
  rulesyncRule,
5192
5207
  validate = true
5193
5208
  }) {
@@ -5210,12 +5225,12 @@ var ClineRule = class _ClineRule extends ToolRule {
5210
5225
  });
5211
5226
  }
5212
5227
  static async fromFile({
5213
- baseDir = ".",
5228
+ baseDir = process.cwd(),
5214
5229
  relativeFilePath,
5215
5230
  validate = true
5216
5231
  }) {
5217
5232
  const fileContent = await readFileContent(
5218
- (0, import_node_path52.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5233
+ (0, import_node_path53.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5219
5234
  );
5220
5235
  return new _ClineRule({
5221
5236
  baseDir,
@@ -5228,7 +5243,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5228
5243
  };
5229
5244
 
5230
5245
  // src/rules/codexcli-rule.ts
5231
- var import_node_path53 = require("path");
5246
+ var import_node_path54 = require("path");
5232
5247
  var CodexcliRule = class _CodexcliRule extends ToolRule {
5233
5248
  static getSettablePaths({
5234
5249
  global
@@ -5247,12 +5262,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5247
5262
  relativeFilePath: "AGENTS.md"
5248
5263
  },
5249
5264
  nonRoot: {
5250
- relativeDirPath: (0, import_node_path53.join)(".codex", "memories")
5265
+ relativeDirPath: (0, import_node_path54.join)(".codex", "memories")
5251
5266
  }
5252
5267
  };
5253
5268
  }
5254
5269
  static async fromFile({
5255
- baseDir = ".",
5270
+ baseDir = process.cwd(),
5256
5271
  relativeFilePath,
5257
5272
  validate = true,
5258
5273
  global = false
@@ -5262,7 +5277,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5262
5277
  if (isRoot) {
5263
5278
  const relativePath2 = paths.root.relativeFilePath;
5264
5279
  const fileContent2 = await readFileContent(
5265
- (0, import_node_path53.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5280
+ (0, import_node_path54.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5266
5281
  );
5267
5282
  return new _CodexcliRule({
5268
5283
  baseDir,
@@ -5276,8 +5291,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5276
5291
  if (!paths.nonRoot) {
5277
5292
  throw new Error("nonRoot path is not set");
5278
5293
  }
5279
- const relativePath = (0, import_node_path53.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5280
- const fileContent = await readFileContent((0, import_node_path53.join)(baseDir, relativePath));
5294
+ const relativePath = (0, import_node_path54.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5295
+ const fileContent = await readFileContent((0, import_node_path54.join)(baseDir, relativePath));
5281
5296
  return new _CodexcliRule({
5282
5297
  baseDir,
5283
5298
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5288,7 +5303,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5288
5303
  });
5289
5304
  }
5290
5305
  static fromRulesyncRule({
5291
- baseDir = ".",
5306
+ baseDir = process.cwd(),
5292
5307
  rulesyncRule,
5293
5308
  validate = true,
5294
5309
  global = false
@@ -5319,7 +5334,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5319
5334
  };
5320
5335
 
5321
5336
  // src/rules/copilot-rule.ts
5322
- var import_node_path54 = require("path");
5337
+ var import_node_path55 = require("path");
5323
5338
  var import_mini19 = require("zod/mini");
5324
5339
  var CopilotRuleFrontmatterSchema = import_mini19.z.object({
5325
5340
  description: import_mini19.z.optional(import_mini19.z.string()),
@@ -5335,7 +5350,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5335
5350
  relativeFilePath: "copilot-instructions.md"
5336
5351
  },
5337
5352
  nonRoot: {
5338
- relativeDirPath: (0, import_node_path54.join)(".github", "instructions")
5353
+ relativeDirPath: (0, import_node_path55.join)(".github", "instructions")
5339
5354
  }
5340
5355
  };
5341
5356
  }
@@ -5344,7 +5359,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5344
5359
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5345
5360
  if (!result.success) {
5346
5361
  throw new Error(
5347
- `Invalid frontmatter in ${(0, import_node_path54.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5362
+ `Invalid frontmatter in ${(0, import_node_path55.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5348
5363
  );
5349
5364
  }
5350
5365
  }
@@ -5375,13 +5390,13 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5375
5390
  baseDir: this.getBaseDir(),
5376
5391
  frontmatter: rulesyncFrontmatter,
5377
5392
  body: this.body,
5378
- relativeDirPath: (0, import_node_path54.join)(".rulesync", "rules"),
5393
+ relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
5379
5394
  relativeFilePath,
5380
5395
  validate: true
5381
5396
  });
5382
5397
  }
5383
5398
  static fromRulesyncRule({
5384
- baseDir = ".",
5399
+ baseDir = process.cwd(),
5385
5400
  rulesyncRule,
5386
5401
  validate = true
5387
5402
  }) {
@@ -5417,16 +5432,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5417
5432
  });
5418
5433
  }
5419
5434
  static async fromFile({
5420
- baseDir = ".",
5435
+ baseDir = process.cwd(),
5421
5436
  relativeFilePath,
5422
5437
  validate = true
5423
5438
  }) {
5424
5439
  const isRoot = relativeFilePath === "copilot-instructions.md";
5425
- const relativePath = isRoot ? (0, import_node_path54.join)(
5440
+ const relativePath = isRoot ? (0, import_node_path55.join)(
5426
5441
  this.getSettablePaths().root.relativeDirPath,
5427
5442
  this.getSettablePaths().root.relativeFilePath
5428
- ) : (0, import_node_path54.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5429
- const fileContent = await readFileContent((0, import_node_path54.join)(baseDir, relativePath));
5443
+ ) : (0, import_node_path55.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5444
+ const fileContent = await readFileContent((0, import_node_path55.join)(baseDir, relativePath));
5430
5445
  if (isRoot) {
5431
5446
  return new _CopilotRule({
5432
5447
  baseDir,
@@ -5445,7 +5460,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5445
5460
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5446
5461
  if (!result.success) {
5447
5462
  throw new Error(
5448
- `Invalid frontmatter in ${(0, import_node_path54.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5463
+ `Invalid frontmatter in ${(0, import_node_path55.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5449
5464
  );
5450
5465
  }
5451
5466
  return new _CopilotRule({
@@ -5469,7 +5484,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5469
5484
  return {
5470
5485
  success: false,
5471
5486
  error: new Error(
5472
- `Invalid frontmatter in ${(0, import_node_path54.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5487
+ `Invalid frontmatter in ${(0, import_node_path55.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5473
5488
  )
5474
5489
  };
5475
5490
  }
@@ -5489,7 +5504,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5489
5504
  };
5490
5505
 
5491
5506
  // src/rules/cursor-rule.ts
5492
- var import_node_path55 = require("path");
5507
+ var import_node_path56 = require("path");
5493
5508
  var import_mini20 = require("zod/mini");
5494
5509
  var CursorRuleFrontmatterSchema = import_mini20.z.object({
5495
5510
  description: import_mini20.z.optional(import_mini20.z.string()),
@@ -5502,7 +5517,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5502
5517
  static getSettablePaths() {
5503
5518
  return {
5504
5519
  nonRoot: {
5505
- relativeDirPath: (0, import_node_path55.join)(".cursor", "rules")
5520
+ relativeDirPath: (0, import_node_path56.join)(".cursor", "rules")
5506
5521
  }
5507
5522
  };
5508
5523
  }
@@ -5511,7 +5526,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5511
5526
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5512
5527
  if (!result.success) {
5513
5528
  throw new Error(
5514
- `Invalid frontmatter in ${(0, import_node_path55.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5529
+ `Invalid frontmatter in ${(0, import_node_path56.join)(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5515
5530
  );
5516
5531
  }
5517
5532
  }
@@ -5583,7 +5598,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5583
5598
  return new RulesyncRule({
5584
5599
  frontmatter: rulesyncFrontmatter,
5585
5600
  body: this.body,
5586
- relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
5601
+ relativeDirPath: (0, import_node_path56.join)(".rulesync", "rules"),
5587
5602
  relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
5588
5603
  validate: true
5589
5604
  });
@@ -5599,7 +5614,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5599
5614
  return targetGlobs && targetGlobs.length > 0 ? targetGlobs.join(",") : void 0;
5600
5615
  }
5601
5616
  static fromRulesyncRule({
5602
- baseDir = ".",
5617
+ baseDir = process.cwd(),
5603
5618
  rulesyncRule,
5604
5619
  validate = true
5605
5620
  }) {
@@ -5623,24 +5638,24 @@ var CursorRule = class _CursorRule extends ToolRule {
5623
5638
  });
5624
5639
  }
5625
5640
  static async fromFile({
5626
- baseDir = ".",
5641
+ baseDir = process.cwd(),
5627
5642
  relativeFilePath,
5628
5643
  validate = true
5629
5644
  }) {
5630
5645
  const fileContent = await readFileContent(
5631
- (0, import_node_path55.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5646
+ (0, import_node_path56.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5632
5647
  );
5633
5648
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
5634
5649
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5635
5650
  if (!result.success) {
5636
5651
  throw new Error(
5637
- `Invalid frontmatter in ${(0, import_node_path55.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5652
+ `Invalid frontmatter in ${(0, import_node_path56.join)(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5638
5653
  );
5639
5654
  }
5640
5655
  return new _CursorRule({
5641
5656
  baseDir,
5642
5657
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
5643
- relativeFilePath: (0, import_node_path55.basename)(relativeFilePath),
5658
+ relativeFilePath: (0, import_node_path56.basename)(relativeFilePath),
5644
5659
  frontmatter: result.data,
5645
5660
  body: content.trim(),
5646
5661
  validate
@@ -5657,7 +5672,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5657
5672
  return {
5658
5673
  success: false,
5659
5674
  error: new Error(
5660
- `Invalid frontmatter in ${(0, import_node_path55.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5675
+ `Invalid frontmatter in ${(0, import_node_path56.join)(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5661
5676
  )
5662
5677
  };
5663
5678
  }
@@ -5677,7 +5692,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5677
5692
  };
5678
5693
 
5679
5694
  // src/rules/geminicli-rule.ts
5680
- var import_node_path56 = require("path");
5695
+ var import_node_path57 = require("path");
5681
5696
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5682
5697
  static getSettablePaths({
5683
5698
  global
@@ -5696,12 +5711,12 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5696
5711
  relativeFilePath: "GEMINI.md"
5697
5712
  },
5698
5713
  nonRoot: {
5699
- relativeDirPath: (0, import_node_path56.join)(".gemini", "memories")
5714
+ relativeDirPath: (0, import_node_path57.join)(".gemini", "memories")
5700
5715
  }
5701
5716
  };
5702
5717
  }
5703
5718
  static async fromFile({
5704
- baseDir = ".",
5719
+ baseDir = process.cwd(),
5705
5720
  relativeFilePath,
5706
5721
  validate = true,
5707
5722
  global = false
@@ -5711,7 +5726,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5711
5726
  if (isRoot) {
5712
5727
  const relativePath2 = paths.root.relativeFilePath;
5713
5728
  const fileContent2 = await readFileContent(
5714
- (0, import_node_path56.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5729
+ (0, import_node_path57.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5715
5730
  );
5716
5731
  return new _GeminiCliRule({
5717
5732
  baseDir,
@@ -5725,8 +5740,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5725
5740
  if (!paths.nonRoot) {
5726
5741
  throw new Error("nonRoot path is not set");
5727
5742
  }
5728
- const relativePath = (0, import_node_path56.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5729
- const fileContent = await readFileContent((0, import_node_path56.join)(baseDir, relativePath));
5743
+ const relativePath = (0, import_node_path57.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5744
+ const fileContent = await readFileContent((0, import_node_path57.join)(baseDir, relativePath));
5730
5745
  return new _GeminiCliRule({
5731
5746
  baseDir,
5732
5747
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5737,7 +5752,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5737
5752
  });
5738
5753
  }
5739
5754
  static fromRulesyncRule({
5740
- baseDir = ".",
5755
+ baseDir = process.cwd(),
5741
5756
  rulesyncRule,
5742
5757
  validate = true,
5743
5758
  global = false
@@ -5768,7 +5783,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5768
5783
  };
5769
5784
 
5770
5785
  // src/rules/junie-rule.ts
5771
- var import_node_path57 = require("path");
5786
+ var import_node_path58 = require("path");
5772
5787
  var JunieRule = class _JunieRule extends ToolRule {
5773
5788
  static getSettablePaths() {
5774
5789
  return {
@@ -5777,18 +5792,18 @@ var JunieRule = class _JunieRule extends ToolRule {
5777
5792
  relativeFilePath: "guidelines.md"
5778
5793
  },
5779
5794
  nonRoot: {
5780
- relativeDirPath: (0, import_node_path57.join)(".junie", "memories")
5795
+ relativeDirPath: (0, import_node_path58.join)(".junie", "memories")
5781
5796
  }
5782
5797
  };
5783
5798
  }
5784
5799
  static async fromFile({
5785
- baseDir = ".",
5800
+ baseDir = process.cwd(),
5786
5801
  relativeFilePath,
5787
5802
  validate = true
5788
5803
  }) {
5789
5804
  const isRoot = relativeFilePath === "guidelines.md";
5790
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path57.join)(".junie", "memories", relativeFilePath);
5791
- const fileContent = await readFileContent((0, import_node_path57.join)(baseDir, relativePath));
5805
+ const relativePath = isRoot ? "guidelines.md" : (0, import_node_path58.join)(".junie", "memories", relativeFilePath);
5806
+ const fileContent = await readFileContent((0, import_node_path58.join)(baseDir, relativePath));
5792
5807
  return new _JunieRule({
5793
5808
  baseDir,
5794
5809
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5799,7 +5814,7 @@ var JunieRule = class _JunieRule extends ToolRule {
5799
5814
  });
5800
5815
  }
5801
5816
  static fromRulesyncRule({
5802
- baseDir = ".",
5817
+ baseDir = process.cwd(),
5803
5818
  rulesyncRule,
5804
5819
  validate = true
5805
5820
  }) {
@@ -5828,22 +5843,22 @@ var JunieRule = class _JunieRule extends ToolRule {
5828
5843
  };
5829
5844
 
5830
5845
  // src/rules/kiro-rule.ts
5831
- var import_node_path58 = require("path");
5846
+ var import_node_path59 = require("path");
5832
5847
  var KiroRule = class _KiroRule extends ToolRule {
5833
5848
  static getSettablePaths() {
5834
5849
  return {
5835
5850
  nonRoot: {
5836
- relativeDirPath: (0, import_node_path58.join)(".kiro", "steering")
5851
+ relativeDirPath: (0, import_node_path59.join)(".kiro", "steering")
5837
5852
  }
5838
5853
  };
5839
5854
  }
5840
5855
  static async fromFile({
5841
- baseDir = ".",
5856
+ baseDir = process.cwd(),
5842
5857
  relativeFilePath,
5843
5858
  validate = true
5844
5859
  }) {
5845
5860
  const fileContent = await readFileContent(
5846
- (0, import_node_path58.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5861
+ (0, import_node_path59.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5847
5862
  );
5848
5863
  return new _KiroRule({
5849
5864
  baseDir,
@@ -5855,7 +5870,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5855
5870
  });
5856
5871
  }
5857
5872
  static fromRulesyncRule({
5858
- baseDir = ".",
5873
+ baseDir = process.cwd(),
5859
5874
  rulesyncRule,
5860
5875
  validate = true
5861
5876
  }) {
@@ -5883,7 +5898,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5883
5898
  };
5884
5899
 
5885
5900
  // src/rules/opencode-rule.ts
5886
- var import_node_path59 = require("path");
5901
+ var import_node_path60 = require("path");
5887
5902
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5888
5903
  static getSettablePaths() {
5889
5904
  return {
@@ -5892,18 +5907,18 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5892
5907
  relativeFilePath: "AGENTS.md"
5893
5908
  },
5894
5909
  nonRoot: {
5895
- relativeDirPath: (0, import_node_path59.join)(".opencode", "memories")
5910
+ relativeDirPath: (0, import_node_path60.join)(".opencode", "memories")
5896
5911
  }
5897
5912
  };
5898
5913
  }
5899
5914
  static async fromFile({
5900
- baseDir = ".",
5915
+ baseDir = process.cwd(),
5901
5916
  relativeFilePath,
5902
5917
  validate = true
5903
5918
  }) {
5904
5919
  const isRoot = relativeFilePath === "AGENTS.md";
5905
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path59.join)(".opencode", "memories", relativeFilePath);
5906
- const fileContent = await readFileContent((0, import_node_path59.join)(baseDir, relativePath));
5920
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path60.join)(".opencode", "memories", relativeFilePath);
5921
+ const fileContent = await readFileContent((0, import_node_path60.join)(baseDir, relativePath));
5907
5922
  return new _OpenCodeRule({
5908
5923
  baseDir,
5909
5924
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5914,7 +5929,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5914
5929
  });
5915
5930
  }
5916
5931
  static fromRulesyncRule({
5917
- baseDir = ".",
5932
+ baseDir = process.cwd(),
5918
5933
  rulesyncRule,
5919
5934
  validate = true
5920
5935
  }) {
@@ -5943,7 +5958,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5943
5958
  };
5944
5959
 
5945
5960
  // src/rules/qwencode-rule.ts
5946
- var import_node_path60 = require("path");
5961
+ var import_node_path61 = require("path");
5947
5962
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5948
5963
  static getSettablePaths() {
5949
5964
  return {
@@ -5952,18 +5967,18 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5952
5967
  relativeFilePath: "QWEN.md"
5953
5968
  },
5954
5969
  nonRoot: {
5955
- relativeDirPath: (0, import_node_path60.join)(".qwen", "memories")
5970
+ relativeDirPath: (0, import_node_path61.join)(".qwen", "memories")
5956
5971
  }
5957
5972
  };
5958
5973
  }
5959
5974
  static async fromFile({
5960
- baseDir = ".",
5975
+ baseDir = process.cwd(),
5961
5976
  relativeFilePath,
5962
5977
  validate = true
5963
5978
  }) {
5964
5979
  const isRoot = relativeFilePath === "QWEN.md";
5965
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path60.join)(".qwen", "memories", relativeFilePath);
5966
- const fileContent = await readFileContent((0, import_node_path60.join)(baseDir, relativePath));
5980
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path61.join)(".qwen", "memories", relativeFilePath);
5981
+ const fileContent = await readFileContent((0, import_node_path61.join)(baseDir, relativePath));
5967
5982
  return new _QwencodeRule({
5968
5983
  baseDir,
5969
5984
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5974,7 +5989,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5974
5989
  });
5975
5990
  }
5976
5991
  static fromRulesyncRule(params) {
5977
- const { baseDir = ".", rulesyncRule, validate = true } = params;
5992
+ const { baseDir = process.cwd(), rulesyncRule, validate = true } = params;
5978
5993
  return new _QwencodeRule(
5979
5994
  this.buildToolRuleParamsDefault({
5980
5995
  baseDir,
@@ -6000,22 +6015,22 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
6000
6015
  };
6001
6016
 
6002
6017
  // src/rules/roo-rule.ts
6003
- var import_node_path61 = require("path");
6018
+ var import_node_path62 = require("path");
6004
6019
  var RooRule = class _RooRule extends ToolRule {
6005
6020
  static getSettablePaths() {
6006
6021
  return {
6007
6022
  nonRoot: {
6008
- relativeDirPath: (0, import_node_path61.join)(".roo", "rules")
6023
+ relativeDirPath: (0, import_node_path62.join)(".roo", "rules")
6009
6024
  }
6010
6025
  };
6011
6026
  }
6012
6027
  static async fromFile({
6013
- baseDir = ".",
6028
+ baseDir = process.cwd(),
6014
6029
  relativeFilePath,
6015
6030
  validate = true
6016
6031
  }) {
6017
6032
  const fileContent = await readFileContent(
6018
- (0, import_node_path61.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6033
+ (0, import_node_path62.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6019
6034
  );
6020
6035
  return new _RooRule({
6021
6036
  baseDir,
@@ -6027,7 +6042,7 @@ var RooRule = class _RooRule extends ToolRule {
6027
6042
  });
6028
6043
  }
6029
6044
  static fromRulesyncRule({
6030
- baseDir = ".",
6045
+ baseDir = process.cwd(),
6031
6046
  rulesyncRule,
6032
6047
  validate = true
6033
6048
  }) {
@@ -6070,7 +6085,7 @@ var RooRule = class _RooRule extends ToolRule {
6070
6085
  };
6071
6086
 
6072
6087
  // src/rules/warp-rule.ts
6073
- var import_node_path62 = require("path");
6088
+ var import_node_path63 = require("path");
6074
6089
  var WarpRule = class _WarpRule extends ToolRule {
6075
6090
  constructor({ fileContent, root, ...rest }) {
6076
6091
  super({
@@ -6086,18 +6101,18 @@ var WarpRule = class _WarpRule extends ToolRule {
6086
6101
  relativeFilePath: "WARP.md"
6087
6102
  },
6088
6103
  nonRoot: {
6089
- relativeDirPath: (0, import_node_path62.join)(".warp", "memories")
6104
+ relativeDirPath: (0, import_node_path63.join)(".warp", "memories")
6090
6105
  }
6091
6106
  };
6092
6107
  }
6093
6108
  static async fromFile({
6094
- baseDir = ".",
6109
+ baseDir = process.cwd(),
6095
6110
  relativeFilePath,
6096
6111
  validate = true
6097
6112
  }) {
6098
6113
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
6099
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path62.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6100
- const fileContent = await readFileContent((0, import_node_path62.join)(baseDir, relativePath));
6114
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path63.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6115
+ const fileContent = await readFileContent((0, import_node_path63.join)(baseDir, relativePath));
6101
6116
  return new _WarpRule({
6102
6117
  baseDir,
6103
6118
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -6108,7 +6123,7 @@ var WarpRule = class _WarpRule extends ToolRule {
6108
6123
  });
6109
6124
  }
6110
6125
  static fromRulesyncRule({
6111
- baseDir = ".",
6126
+ baseDir = process.cwd(),
6112
6127
  rulesyncRule,
6113
6128
  validate = true
6114
6129
  }) {
@@ -6137,22 +6152,22 @@ var WarpRule = class _WarpRule extends ToolRule {
6137
6152
  };
6138
6153
 
6139
6154
  // src/rules/windsurf-rule.ts
6140
- var import_node_path63 = require("path");
6155
+ var import_node_path64 = require("path");
6141
6156
  var WindsurfRule = class _WindsurfRule extends ToolRule {
6142
6157
  static getSettablePaths() {
6143
6158
  return {
6144
6159
  nonRoot: {
6145
- relativeDirPath: (0, import_node_path63.join)(".windsurf", "rules")
6160
+ relativeDirPath: (0, import_node_path64.join)(".windsurf", "rules")
6146
6161
  }
6147
6162
  };
6148
6163
  }
6149
6164
  static async fromFile({
6150
- baseDir = ".",
6165
+ baseDir = process.cwd(),
6151
6166
  relativeFilePath,
6152
6167
  validate = true
6153
6168
  }) {
6154
6169
  const fileContent = await readFileContent(
6155
- (0, import_node_path63.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6170
+ (0, import_node_path64.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6156
6171
  );
6157
6172
  return new _WindsurfRule({
6158
6173
  baseDir,
@@ -6163,7 +6178,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
6163
6178
  });
6164
6179
  }
6165
6180
  static fromRulesyncRule({
6166
- baseDir = ".",
6181
+ baseDir = process.cwd(),
6167
6182
  rulesyncRule,
6168
6183
  validate = true
6169
6184
  }) {
@@ -6222,7 +6237,7 @@ var RulesProcessor = class extends FeatureProcessor {
6222
6237
  simulateSubagents;
6223
6238
  global;
6224
6239
  constructor({
6225
- baseDir = ".",
6240
+ baseDir = process.cwd(),
6226
6241
  toolTarget,
6227
6242
  simulateCommands = false,
6228
6243
  simulateSubagents = false,
@@ -6552,10 +6567,10 @@ var RulesProcessor = class extends FeatureProcessor {
6552
6567
  * Load and parse rulesync rule files from .rulesync/rules/ directory
6553
6568
  */
6554
6569
  async loadRulesyncFiles() {
6555
- const files = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "rules", "*.md"));
6570
+ const files = await findFilesByGlobs((0, import_node_path65.join)(".rulesync", "rules", "*.md"));
6556
6571
  logger.debug(`Found ${files.length} rulesync files`);
6557
6572
  const rulesyncRules = await Promise.all(
6558
- files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path64.basename)(file) }))
6573
+ files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path65.basename)(file) }))
6559
6574
  );
6560
6575
  const rootRules = rulesyncRules.filter((rule) => rule.getFrontmatter().root);
6561
6576
  if (rootRules.length > 1) {
@@ -6573,10 +6588,10 @@ var RulesProcessor = class extends FeatureProcessor {
6573
6588
  return rulesyncRules;
6574
6589
  }
6575
6590
  async loadRulesyncFilesLegacy() {
6576
- const legacyFiles = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "*.md"));
6591
+ const legacyFiles = await findFilesByGlobs((0, import_node_path65.join)(".rulesync", "*.md"));
6577
6592
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
6578
6593
  return Promise.all(
6579
- legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path64.basename)(file) }))
6594
+ legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path65.basename)(file) }))
6580
6595
  );
6581
6596
  }
6582
6597
  /**
@@ -6640,13 +6655,13 @@ var RulesProcessor = class extends FeatureProcessor {
6640
6655
  return [];
6641
6656
  }
6642
6657
  const rootFilePaths = await findFilesByGlobs(
6643
- (0, import_node_path64.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6658
+ (0, import_node_path65.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6644
6659
  );
6645
6660
  return await Promise.all(
6646
6661
  rootFilePaths.map(
6647
6662
  (filePath) => root.fromFile({
6648
6663
  baseDir: this.baseDir,
6649
- relativeFilePath: (0, import_node_path64.basename)(filePath),
6664
+ relativeFilePath: (0, import_node_path65.basename)(filePath),
6650
6665
  global: this.global
6651
6666
  })
6652
6667
  )
@@ -6658,13 +6673,13 @@ var RulesProcessor = class extends FeatureProcessor {
6658
6673
  return [];
6659
6674
  }
6660
6675
  const nonRootFilePaths = await findFilesByGlobs(
6661
- (0, import_node_path64.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6676
+ (0, import_node_path65.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6662
6677
  );
6663
6678
  return await Promise.all(
6664
6679
  nonRootFilePaths.map(
6665
6680
  (filePath) => nonRoot.fromFile({
6666
6681
  baseDir: this.baseDir,
6667
- relativeFilePath: (0, import_node_path64.basename)(filePath),
6682
+ relativeFilePath: (0, import_node_path65.basename)(filePath),
6668
6683
  global: this.global
6669
6684
  })
6670
6685
  )
@@ -7034,14 +7049,14 @@ s/<command> [arguments]
7034
7049
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
7035
7050
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
7036
7051
 
7037
- 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.` : "";
7052
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path65.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7038
7053
  const subagentsSection = subagents ? `## Simulated Subagents
7039
7054
 
7040
7055
  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.
7041
7056
 
7042
- 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.
7057
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path65.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7043
7058
 
7044
- 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.` : "";
7059
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path65.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7045
7060
  const result = [
7046
7061
  overview,
7047
7062
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -7255,9 +7270,9 @@ async function generateSubagents(config) {
7255
7270
  }
7256
7271
 
7257
7272
  // src/cli/commands/gitignore.ts
7258
- var import_node_path65 = require("path");
7273
+ var import_node_path66 = require("path");
7259
7274
  var gitignoreCommand = async () => {
7260
- const gitignorePath = (0, import_node_path65.join)(process.cwd(), ".gitignore");
7275
+ const gitignorePath = (0, import_node_path66.join)(process.cwd(), ".gitignore");
7261
7276
  const rulesFilesToIgnore = [
7262
7277
  "# Generated by rulesync - AI tool configuration files",
7263
7278
  // AGENTS.md
@@ -7498,7 +7513,7 @@ async function importSubagents(config, tool) {
7498
7513
  }
7499
7514
 
7500
7515
  // src/cli/commands/init.ts
7501
- var import_node_path66 = require("path");
7516
+ var import_node_path67 = require("path");
7502
7517
  async function initCommand() {
7503
7518
  logger.info("Initializing rulesync...");
7504
7519
  await ensureDir(".rulesync");
@@ -7659,14 +7674,14 @@ Attention, again, you are just the planner, so though you can read any files and
7659
7674
  await ensureDir(commandPaths.relativeDirPath);
7660
7675
  await ensureDir(subagentPaths.relativeDirPath);
7661
7676
  await ensureDir(ignorePaths.relativeDirPath);
7662
- const ruleFilepath = (0, import_node_path66.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7677
+ const ruleFilepath = (0, import_node_path67.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7663
7678
  if (!await fileExists(ruleFilepath)) {
7664
7679
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
7665
7680
  logger.success(`Created ${ruleFilepath}`);
7666
7681
  } else {
7667
7682
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
7668
7683
  }
7669
- const mcpFilepath = (0, import_node_path66.join)(
7684
+ const mcpFilepath = (0, import_node_path67.join)(
7670
7685
  mcpPaths.recommended.relativeDirPath,
7671
7686
  mcpPaths.recommended.relativeFilePath
7672
7687
  );
@@ -7676,21 +7691,21 @@ Attention, again, you are just the planner, so though you can read any files and
7676
7691
  } else {
7677
7692
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
7678
7693
  }
7679
- const commandFilepath = (0, import_node_path66.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7694
+ const commandFilepath = (0, import_node_path67.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7680
7695
  if (!await fileExists(commandFilepath)) {
7681
7696
  await writeFileContent(commandFilepath, sampleCommandFile.content);
7682
7697
  logger.success(`Created ${commandFilepath}`);
7683
7698
  } else {
7684
7699
  logger.info(`Skipped ${commandFilepath} (already exists)`);
7685
7700
  }
7686
- const subagentFilepath = (0, import_node_path66.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7701
+ const subagentFilepath = (0, import_node_path67.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7687
7702
  if (!await fileExists(subagentFilepath)) {
7688
7703
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
7689
7704
  logger.success(`Created ${subagentFilepath}`);
7690
7705
  } else {
7691
7706
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
7692
7707
  }
7693
- const ignoreFilepath = (0, import_node_path66.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7708
+ const ignoreFilepath = (0, import_node_path67.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7694
7709
  if (!await fileExists(ignoreFilepath)) {
7695
7710
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
7696
7711
  logger.success(`Created ${ignoreFilepath}`);
@@ -7700,7 +7715,7 @@ Attention, again, you are just the planner, so though you can read any files and
7700
7715
  }
7701
7716
 
7702
7717
  // src/cli/index.ts
7703
- var getVersion = () => "3.13.0";
7718
+ var getVersion = () => "3.14.0";
7704
7719
  var main = async () => {
7705
7720
  const program = new import_commander.Command();
7706
7721
  const version = getVersion();