rulesync 3.12.9 → 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 +325 -304
  2. package/dist/index.js +315 -294
  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
  }
@@ -5357,11 +5372,17 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5357
5372
  this.body = body;
5358
5373
  }
5359
5374
  toRulesyncRule() {
5375
+ let globs;
5376
+ if (this.isRoot()) {
5377
+ globs = ["**/*"];
5378
+ } else if (this.frontmatter.applyTo) {
5379
+ globs = this.frontmatter.applyTo.split(",").map((g) => g.trim());
5380
+ }
5360
5381
  const rulesyncFrontmatter = {
5361
5382
  targets: ["*"],
5362
5383
  root: this.isRoot(),
5363
5384
  description: this.frontmatter.description,
5364
- globs: this.isRoot() ? ["**/*"] : []
5385
+ globs
5365
5386
  };
5366
5387
  const originalFilePath = this.getRelativeFilePath();
5367
5388
  const relativeFilePath = originalFilePath.replace(/\.instructions\.md$/, ".md");
@@ -5369,13 +5390,13 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5369
5390
  baseDir: this.getBaseDir(),
5370
5391
  frontmatter: rulesyncFrontmatter,
5371
5392
  body: this.body,
5372
- relativeDirPath: (0, import_node_path54.join)(".rulesync", "rules"),
5393
+ relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
5373
5394
  relativeFilePath,
5374
5395
  validate: true
5375
5396
  });
5376
5397
  }
5377
5398
  static fromRulesyncRule({
5378
- baseDir = ".",
5399
+ baseDir = process.cwd(),
5379
5400
  rulesyncRule,
5380
5401
  validate = true
5381
5402
  }) {
@@ -5411,16 +5432,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5411
5432
  });
5412
5433
  }
5413
5434
  static async fromFile({
5414
- baseDir = ".",
5435
+ baseDir = process.cwd(),
5415
5436
  relativeFilePath,
5416
5437
  validate = true
5417
5438
  }) {
5418
5439
  const isRoot = relativeFilePath === "copilot-instructions.md";
5419
- const relativePath = isRoot ? (0, import_node_path54.join)(
5440
+ const relativePath = isRoot ? (0, import_node_path55.join)(
5420
5441
  this.getSettablePaths().root.relativeDirPath,
5421
5442
  this.getSettablePaths().root.relativeFilePath
5422
- ) : (0, import_node_path54.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5423
- 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));
5424
5445
  if (isRoot) {
5425
5446
  return new _CopilotRule({
5426
5447
  baseDir,
@@ -5439,7 +5460,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5439
5460
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5440
5461
  if (!result.success) {
5441
5462
  throw new Error(
5442
- `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)}`
5443
5464
  );
5444
5465
  }
5445
5466
  return new _CopilotRule({
@@ -5463,7 +5484,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5463
5484
  return {
5464
5485
  success: false,
5465
5486
  error: new Error(
5466
- `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)}`
5467
5488
  )
5468
5489
  };
5469
5490
  }
@@ -5483,7 +5504,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5483
5504
  };
5484
5505
 
5485
5506
  // src/rules/cursor-rule.ts
5486
- var import_node_path55 = require("path");
5507
+ var import_node_path56 = require("path");
5487
5508
  var import_mini20 = require("zod/mini");
5488
5509
  var CursorRuleFrontmatterSchema = import_mini20.z.object({
5489
5510
  description: import_mini20.z.optional(import_mini20.z.string()),
@@ -5496,7 +5517,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5496
5517
  static getSettablePaths() {
5497
5518
  return {
5498
5519
  nonRoot: {
5499
- relativeDirPath: (0, import_node_path55.join)(".cursor", "rules")
5520
+ relativeDirPath: (0, import_node_path56.join)(".cursor", "rules")
5500
5521
  }
5501
5522
  };
5502
5523
  }
@@ -5505,7 +5526,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5505
5526
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5506
5527
  if (!result.success) {
5507
5528
  throw new Error(
5508
- `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)}`
5509
5530
  );
5510
5531
  }
5511
5532
  }
@@ -5577,7 +5598,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5577
5598
  return new RulesyncRule({
5578
5599
  frontmatter: rulesyncFrontmatter,
5579
5600
  body: this.body,
5580
- relativeDirPath: (0, import_node_path55.join)(".rulesync", "rules"),
5601
+ relativeDirPath: (0, import_node_path56.join)(".rulesync", "rules"),
5581
5602
  relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
5582
5603
  validate: true
5583
5604
  });
@@ -5593,7 +5614,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5593
5614
  return targetGlobs && targetGlobs.length > 0 ? targetGlobs.join(",") : void 0;
5594
5615
  }
5595
5616
  static fromRulesyncRule({
5596
- baseDir = ".",
5617
+ baseDir = process.cwd(),
5597
5618
  rulesyncRule,
5598
5619
  validate = true
5599
5620
  }) {
@@ -5617,24 +5638,24 @@ var CursorRule = class _CursorRule extends ToolRule {
5617
5638
  });
5618
5639
  }
5619
5640
  static async fromFile({
5620
- baseDir = ".",
5641
+ baseDir = process.cwd(),
5621
5642
  relativeFilePath,
5622
5643
  validate = true
5623
5644
  }) {
5624
5645
  const fileContent = await readFileContent(
5625
- (0, import_node_path55.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5646
+ (0, import_node_path56.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5626
5647
  );
5627
5648
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
5628
5649
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5629
5650
  if (!result.success) {
5630
5651
  throw new Error(
5631
- `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)}`
5632
5653
  );
5633
5654
  }
5634
5655
  return new _CursorRule({
5635
5656
  baseDir,
5636
5657
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
5637
- relativeFilePath: (0, import_node_path55.basename)(relativeFilePath),
5658
+ relativeFilePath: (0, import_node_path56.basename)(relativeFilePath),
5638
5659
  frontmatter: result.data,
5639
5660
  body: content.trim(),
5640
5661
  validate
@@ -5651,7 +5672,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5651
5672
  return {
5652
5673
  success: false,
5653
5674
  error: new Error(
5654
- `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)}`
5655
5676
  )
5656
5677
  };
5657
5678
  }
@@ -5671,7 +5692,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5671
5692
  };
5672
5693
 
5673
5694
  // src/rules/geminicli-rule.ts
5674
- var import_node_path56 = require("path");
5695
+ var import_node_path57 = require("path");
5675
5696
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5676
5697
  static getSettablePaths({
5677
5698
  global
@@ -5690,12 +5711,12 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5690
5711
  relativeFilePath: "GEMINI.md"
5691
5712
  },
5692
5713
  nonRoot: {
5693
- relativeDirPath: (0, import_node_path56.join)(".gemini", "memories")
5714
+ relativeDirPath: (0, import_node_path57.join)(".gemini", "memories")
5694
5715
  }
5695
5716
  };
5696
5717
  }
5697
5718
  static async fromFile({
5698
- baseDir = ".",
5719
+ baseDir = process.cwd(),
5699
5720
  relativeFilePath,
5700
5721
  validate = true,
5701
5722
  global = false
@@ -5705,7 +5726,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5705
5726
  if (isRoot) {
5706
5727
  const relativePath2 = paths.root.relativeFilePath;
5707
5728
  const fileContent2 = await readFileContent(
5708
- (0, import_node_path56.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5729
+ (0, import_node_path57.join)(baseDir, paths.root.relativeDirPath, relativePath2)
5709
5730
  );
5710
5731
  return new _GeminiCliRule({
5711
5732
  baseDir,
@@ -5719,8 +5740,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5719
5740
  if (!paths.nonRoot) {
5720
5741
  throw new Error("nonRoot path is not set");
5721
5742
  }
5722
- const relativePath = (0, import_node_path56.join)(paths.nonRoot.relativeDirPath, relativeFilePath);
5723
- 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));
5724
5745
  return new _GeminiCliRule({
5725
5746
  baseDir,
5726
5747
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5731,7 +5752,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5731
5752
  });
5732
5753
  }
5733
5754
  static fromRulesyncRule({
5734
- baseDir = ".",
5755
+ baseDir = process.cwd(),
5735
5756
  rulesyncRule,
5736
5757
  validate = true,
5737
5758
  global = false
@@ -5762,7 +5783,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5762
5783
  };
5763
5784
 
5764
5785
  // src/rules/junie-rule.ts
5765
- var import_node_path57 = require("path");
5786
+ var import_node_path58 = require("path");
5766
5787
  var JunieRule = class _JunieRule extends ToolRule {
5767
5788
  static getSettablePaths() {
5768
5789
  return {
@@ -5771,18 +5792,18 @@ var JunieRule = class _JunieRule extends ToolRule {
5771
5792
  relativeFilePath: "guidelines.md"
5772
5793
  },
5773
5794
  nonRoot: {
5774
- relativeDirPath: (0, import_node_path57.join)(".junie", "memories")
5795
+ relativeDirPath: (0, import_node_path58.join)(".junie", "memories")
5775
5796
  }
5776
5797
  };
5777
5798
  }
5778
5799
  static async fromFile({
5779
- baseDir = ".",
5800
+ baseDir = process.cwd(),
5780
5801
  relativeFilePath,
5781
5802
  validate = true
5782
5803
  }) {
5783
5804
  const isRoot = relativeFilePath === "guidelines.md";
5784
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path57.join)(".junie", "memories", relativeFilePath);
5785
- const fileContent = await readFileContent((0, import_node_path57.join)(baseDir, relativePath));
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));
5786
5807
  return new _JunieRule({
5787
5808
  baseDir,
5788
5809
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5793,7 +5814,7 @@ var JunieRule = class _JunieRule extends ToolRule {
5793
5814
  });
5794
5815
  }
5795
5816
  static fromRulesyncRule({
5796
- baseDir = ".",
5817
+ baseDir = process.cwd(),
5797
5818
  rulesyncRule,
5798
5819
  validate = true
5799
5820
  }) {
@@ -5822,22 +5843,22 @@ var JunieRule = class _JunieRule extends ToolRule {
5822
5843
  };
5823
5844
 
5824
5845
  // src/rules/kiro-rule.ts
5825
- var import_node_path58 = require("path");
5846
+ var import_node_path59 = require("path");
5826
5847
  var KiroRule = class _KiroRule extends ToolRule {
5827
5848
  static getSettablePaths() {
5828
5849
  return {
5829
5850
  nonRoot: {
5830
- relativeDirPath: (0, import_node_path58.join)(".kiro", "steering")
5851
+ relativeDirPath: (0, import_node_path59.join)(".kiro", "steering")
5831
5852
  }
5832
5853
  };
5833
5854
  }
5834
5855
  static async fromFile({
5835
- baseDir = ".",
5856
+ baseDir = process.cwd(),
5836
5857
  relativeFilePath,
5837
5858
  validate = true
5838
5859
  }) {
5839
5860
  const fileContent = await readFileContent(
5840
- (0, import_node_path58.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5861
+ (0, import_node_path59.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5841
5862
  );
5842
5863
  return new _KiroRule({
5843
5864
  baseDir,
@@ -5849,7 +5870,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5849
5870
  });
5850
5871
  }
5851
5872
  static fromRulesyncRule({
5852
- baseDir = ".",
5873
+ baseDir = process.cwd(),
5853
5874
  rulesyncRule,
5854
5875
  validate = true
5855
5876
  }) {
@@ -5877,7 +5898,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5877
5898
  };
5878
5899
 
5879
5900
  // src/rules/opencode-rule.ts
5880
- var import_node_path59 = require("path");
5901
+ var import_node_path60 = require("path");
5881
5902
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5882
5903
  static getSettablePaths() {
5883
5904
  return {
@@ -5886,18 +5907,18 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5886
5907
  relativeFilePath: "AGENTS.md"
5887
5908
  },
5888
5909
  nonRoot: {
5889
- relativeDirPath: (0, import_node_path59.join)(".opencode", "memories")
5910
+ relativeDirPath: (0, import_node_path60.join)(".opencode", "memories")
5890
5911
  }
5891
5912
  };
5892
5913
  }
5893
5914
  static async fromFile({
5894
- baseDir = ".",
5915
+ baseDir = process.cwd(),
5895
5916
  relativeFilePath,
5896
5917
  validate = true
5897
5918
  }) {
5898
5919
  const isRoot = relativeFilePath === "AGENTS.md";
5899
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path59.join)(".opencode", "memories", relativeFilePath);
5900
- const fileContent = await readFileContent((0, import_node_path59.join)(baseDir, relativePath));
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));
5901
5922
  return new _OpenCodeRule({
5902
5923
  baseDir,
5903
5924
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5908,7 +5929,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5908
5929
  });
5909
5930
  }
5910
5931
  static fromRulesyncRule({
5911
- baseDir = ".",
5932
+ baseDir = process.cwd(),
5912
5933
  rulesyncRule,
5913
5934
  validate = true
5914
5935
  }) {
@@ -5937,7 +5958,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5937
5958
  };
5938
5959
 
5939
5960
  // src/rules/qwencode-rule.ts
5940
- var import_node_path60 = require("path");
5961
+ var import_node_path61 = require("path");
5941
5962
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5942
5963
  static getSettablePaths() {
5943
5964
  return {
@@ -5946,18 +5967,18 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5946
5967
  relativeFilePath: "QWEN.md"
5947
5968
  },
5948
5969
  nonRoot: {
5949
- relativeDirPath: (0, import_node_path60.join)(".qwen", "memories")
5970
+ relativeDirPath: (0, import_node_path61.join)(".qwen", "memories")
5950
5971
  }
5951
5972
  };
5952
5973
  }
5953
5974
  static async fromFile({
5954
- baseDir = ".",
5975
+ baseDir = process.cwd(),
5955
5976
  relativeFilePath,
5956
5977
  validate = true
5957
5978
  }) {
5958
5979
  const isRoot = relativeFilePath === "QWEN.md";
5959
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path60.join)(".qwen", "memories", relativeFilePath);
5960
- const fileContent = await readFileContent((0, import_node_path60.join)(baseDir, relativePath));
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));
5961
5982
  return new _QwencodeRule({
5962
5983
  baseDir,
5963
5984
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5968,7 +5989,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5968
5989
  });
5969
5990
  }
5970
5991
  static fromRulesyncRule(params) {
5971
- const { baseDir = ".", rulesyncRule, validate = true } = params;
5992
+ const { baseDir = process.cwd(), rulesyncRule, validate = true } = params;
5972
5993
  return new _QwencodeRule(
5973
5994
  this.buildToolRuleParamsDefault({
5974
5995
  baseDir,
@@ -5994,22 +6015,22 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5994
6015
  };
5995
6016
 
5996
6017
  // src/rules/roo-rule.ts
5997
- var import_node_path61 = require("path");
6018
+ var import_node_path62 = require("path");
5998
6019
  var RooRule = class _RooRule extends ToolRule {
5999
6020
  static getSettablePaths() {
6000
6021
  return {
6001
6022
  nonRoot: {
6002
- relativeDirPath: (0, import_node_path61.join)(".roo", "rules")
6023
+ relativeDirPath: (0, import_node_path62.join)(".roo", "rules")
6003
6024
  }
6004
6025
  };
6005
6026
  }
6006
6027
  static async fromFile({
6007
- baseDir = ".",
6028
+ baseDir = process.cwd(),
6008
6029
  relativeFilePath,
6009
6030
  validate = true
6010
6031
  }) {
6011
6032
  const fileContent = await readFileContent(
6012
- (0, import_node_path61.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6033
+ (0, import_node_path62.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6013
6034
  );
6014
6035
  return new _RooRule({
6015
6036
  baseDir,
@@ -6021,7 +6042,7 @@ var RooRule = class _RooRule extends ToolRule {
6021
6042
  });
6022
6043
  }
6023
6044
  static fromRulesyncRule({
6024
- baseDir = ".",
6045
+ baseDir = process.cwd(),
6025
6046
  rulesyncRule,
6026
6047
  validate = true
6027
6048
  }) {
@@ -6064,7 +6085,7 @@ var RooRule = class _RooRule extends ToolRule {
6064
6085
  };
6065
6086
 
6066
6087
  // src/rules/warp-rule.ts
6067
- var import_node_path62 = require("path");
6088
+ var import_node_path63 = require("path");
6068
6089
  var WarpRule = class _WarpRule extends ToolRule {
6069
6090
  constructor({ fileContent, root, ...rest }) {
6070
6091
  super({
@@ -6080,18 +6101,18 @@ var WarpRule = class _WarpRule extends ToolRule {
6080
6101
  relativeFilePath: "WARP.md"
6081
6102
  },
6082
6103
  nonRoot: {
6083
- relativeDirPath: (0, import_node_path62.join)(".warp", "memories")
6104
+ relativeDirPath: (0, import_node_path63.join)(".warp", "memories")
6084
6105
  }
6085
6106
  };
6086
6107
  }
6087
6108
  static async fromFile({
6088
- baseDir = ".",
6109
+ baseDir = process.cwd(),
6089
6110
  relativeFilePath,
6090
6111
  validate = true
6091
6112
  }) {
6092
6113
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
6093
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path62.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6094
- const fileContent = await readFileContent((0, import_node_path62.join)(baseDir, relativePath));
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));
6095
6116
  return new _WarpRule({
6096
6117
  baseDir,
6097
6118
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -6102,7 +6123,7 @@ var WarpRule = class _WarpRule extends ToolRule {
6102
6123
  });
6103
6124
  }
6104
6125
  static fromRulesyncRule({
6105
- baseDir = ".",
6126
+ baseDir = process.cwd(),
6106
6127
  rulesyncRule,
6107
6128
  validate = true
6108
6129
  }) {
@@ -6131,22 +6152,22 @@ var WarpRule = class _WarpRule extends ToolRule {
6131
6152
  };
6132
6153
 
6133
6154
  // src/rules/windsurf-rule.ts
6134
- var import_node_path63 = require("path");
6155
+ var import_node_path64 = require("path");
6135
6156
  var WindsurfRule = class _WindsurfRule extends ToolRule {
6136
6157
  static getSettablePaths() {
6137
6158
  return {
6138
6159
  nonRoot: {
6139
- relativeDirPath: (0, import_node_path63.join)(".windsurf", "rules")
6160
+ relativeDirPath: (0, import_node_path64.join)(".windsurf", "rules")
6140
6161
  }
6141
6162
  };
6142
6163
  }
6143
6164
  static async fromFile({
6144
- baseDir = ".",
6165
+ baseDir = process.cwd(),
6145
6166
  relativeFilePath,
6146
6167
  validate = true
6147
6168
  }) {
6148
6169
  const fileContent = await readFileContent(
6149
- (0, import_node_path63.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6170
+ (0, import_node_path64.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6150
6171
  );
6151
6172
  return new _WindsurfRule({
6152
6173
  baseDir,
@@ -6157,7 +6178,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
6157
6178
  });
6158
6179
  }
6159
6180
  static fromRulesyncRule({
6160
- baseDir = ".",
6181
+ baseDir = process.cwd(),
6161
6182
  rulesyncRule,
6162
6183
  validate = true
6163
6184
  }) {
@@ -6216,7 +6237,7 @@ var RulesProcessor = class extends FeatureProcessor {
6216
6237
  simulateSubagents;
6217
6238
  global;
6218
6239
  constructor({
6219
- baseDir = ".",
6240
+ baseDir = process.cwd(),
6220
6241
  toolTarget,
6221
6242
  simulateCommands = false,
6222
6243
  simulateSubagents = false,
@@ -6546,10 +6567,10 @@ var RulesProcessor = class extends FeatureProcessor {
6546
6567
  * Load and parse rulesync rule files from .rulesync/rules/ directory
6547
6568
  */
6548
6569
  async loadRulesyncFiles() {
6549
- 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"));
6550
6571
  logger.debug(`Found ${files.length} rulesync files`);
6551
6572
  const rulesyncRules = await Promise.all(
6552
- 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) }))
6553
6574
  );
6554
6575
  const rootRules = rulesyncRules.filter((rule) => rule.getFrontmatter().root);
6555
6576
  if (rootRules.length > 1) {
@@ -6567,10 +6588,10 @@ var RulesProcessor = class extends FeatureProcessor {
6567
6588
  return rulesyncRules;
6568
6589
  }
6569
6590
  async loadRulesyncFilesLegacy() {
6570
- const legacyFiles = await findFilesByGlobs((0, import_node_path64.join)(".rulesync", "*.md"));
6591
+ const legacyFiles = await findFilesByGlobs((0, import_node_path65.join)(".rulesync", "*.md"));
6571
6592
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
6572
6593
  return Promise.all(
6573
- 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) }))
6574
6595
  );
6575
6596
  }
6576
6597
  /**
@@ -6634,13 +6655,13 @@ var RulesProcessor = class extends FeatureProcessor {
6634
6655
  return [];
6635
6656
  }
6636
6657
  const rootFilePaths = await findFilesByGlobs(
6637
- (0, import_node_path64.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6658
+ (0, import_node_path65.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6638
6659
  );
6639
6660
  return await Promise.all(
6640
6661
  rootFilePaths.map(
6641
6662
  (filePath) => root.fromFile({
6642
6663
  baseDir: this.baseDir,
6643
- relativeFilePath: (0, import_node_path64.basename)(filePath),
6664
+ relativeFilePath: (0, import_node_path65.basename)(filePath),
6644
6665
  global: this.global
6645
6666
  })
6646
6667
  )
@@ -6652,13 +6673,13 @@ var RulesProcessor = class extends FeatureProcessor {
6652
6673
  return [];
6653
6674
  }
6654
6675
  const nonRootFilePaths = await findFilesByGlobs(
6655
- (0, import_node_path64.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6676
+ (0, import_node_path65.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6656
6677
  );
6657
6678
  return await Promise.all(
6658
6679
  nonRootFilePaths.map(
6659
6680
  (filePath) => nonRoot.fromFile({
6660
6681
  baseDir: this.baseDir,
6661
- relativeFilePath: (0, import_node_path64.basename)(filePath),
6682
+ relativeFilePath: (0, import_node_path65.basename)(filePath),
6662
6683
  global: this.global
6663
6684
  })
6664
6685
  )
@@ -7028,14 +7049,14 @@ s/<command> [arguments]
7028
7049
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
7029
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.
7030
7051
 
7031
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path64.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
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.` : "";
7032
7053
  const subagentsSection = subagents ? `## Simulated Subagents
7033
7054
 
7034
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.
7035
7056
 
7036
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
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.
7037
7058
 
7038
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path64.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
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.` : "";
7039
7060
  const result = [
7040
7061
  overview,
7041
7062
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -7249,9 +7270,9 @@ async function generateSubagents(config) {
7249
7270
  }
7250
7271
 
7251
7272
  // src/cli/commands/gitignore.ts
7252
- var import_node_path65 = require("path");
7273
+ var import_node_path66 = require("path");
7253
7274
  var gitignoreCommand = async () => {
7254
- const gitignorePath = (0, import_node_path65.join)(process.cwd(), ".gitignore");
7275
+ const gitignorePath = (0, import_node_path66.join)(process.cwd(), ".gitignore");
7255
7276
  const rulesFilesToIgnore = [
7256
7277
  "# Generated by rulesync - AI tool configuration files",
7257
7278
  // AGENTS.md
@@ -7492,7 +7513,7 @@ async function importSubagents(config, tool) {
7492
7513
  }
7493
7514
 
7494
7515
  // src/cli/commands/init.ts
7495
- var import_node_path66 = require("path");
7516
+ var import_node_path67 = require("path");
7496
7517
  async function initCommand() {
7497
7518
  logger.info("Initializing rulesync...");
7498
7519
  await ensureDir(".rulesync");
@@ -7653,14 +7674,14 @@ Attention, again, you are just the planner, so though you can read any files and
7653
7674
  await ensureDir(commandPaths.relativeDirPath);
7654
7675
  await ensureDir(subagentPaths.relativeDirPath);
7655
7676
  await ensureDir(ignorePaths.relativeDirPath);
7656
- 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);
7657
7678
  if (!await fileExists(ruleFilepath)) {
7658
7679
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
7659
7680
  logger.success(`Created ${ruleFilepath}`);
7660
7681
  } else {
7661
7682
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
7662
7683
  }
7663
- const mcpFilepath = (0, import_node_path66.join)(
7684
+ const mcpFilepath = (0, import_node_path67.join)(
7664
7685
  mcpPaths.recommended.relativeDirPath,
7665
7686
  mcpPaths.recommended.relativeFilePath
7666
7687
  );
@@ -7670,21 +7691,21 @@ Attention, again, you are just the planner, so though you can read any files and
7670
7691
  } else {
7671
7692
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
7672
7693
  }
7673
- const commandFilepath = (0, import_node_path66.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7694
+ const commandFilepath = (0, import_node_path67.join)(commandPaths.relativeDirPath, sampleCommandFile.filename);
7674
7695
  if (!await fileExists(commandFilepath)) {
7675
7696
  await writeFileContent(commandFilepath, sampleCommandFile.content);
7676
7697
  logger.success(`Created ${commandFilepath}`);
7677
7698
  } else {
7678
7699
  logger.info(`Skipped ${commandFilepath} (already exists)`);
7679
7700
  }
7680
- const subagentFilepath = (0, import_node_path66.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7701
+ const subagentFilepath = (0, import_node_path67.join)(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7681
7702
  if (!await fileExists(subagentFilepath)) {
7682
7703
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
7683
7704
  logger.success(`Created ${subagentFilepath}`);
7684
7705
  } else {
7685
7706
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
7686
7707
  }
7687
- const ignoreFilepath = (0, import_node_path66.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7708
+ const ignoreFilepath = (0, import_node_path67.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7688
7709
  if (!await fileExists(ignoreFilepath)) {
7689
7710
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
7690
7711
  logger.success(`Created ${ignoreFilepath}`);
@@ -7694,7 +7715,7 @@ Attention, again, you are just the planner, so though you can read any files and
7694
7715
  }
7695
7716
 
7696
7717
  // src/cli/index.ts
7697
- var getVersion = () => "3.12.9";
7718
+ var getVersion = () => "3.14.0";
7698
7719
  var main = async () => {
7699
7720
  const program = new import_commander.Command();
7700
7721
  const version = getVersion();