rulesync 3.13.0 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +318 -303
  2. package/dist/index.js +308 -293
  3. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -296,7 +296,7 @@ var AiFile = class {
296
296
  */
297
297
  global;
298
298
  constructor({
299
- baseDir = ".",
299
+ baseDir = process.cwd(),
300
300
  relativeDirPath,
301
301
  relativeFilePath,
302
302
  fileContent,
@@ -453,7 +453,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
453
453
  throw new Error("Not implemented because it is a SIMULATED file.");
454
454
  }
455
455
  static fromRulesyncCommandDefault({
456
- baseDir = ".",
456
+ baseDir = process.cwd(),
457
457
  rulesyncCommand,
458
458
  validate = true
459
459
  }) {
@@ -488,7 +488,7 @@ var SimulatedCommand = class _SimulatedCommand extends ToolCommand {
488
488
  }
489
489
  }
490
490
  static async fromFileDefault({
491
- baseDir = ".",
491
+ baseDir = process.cwd(),
492
492
  relativeFilePath,
493
493
  validate = true
494
494
  }) {
@@ -522,7 +522,7 @@ var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
522
522
  };
523
523
  }
524
524
  static fromRulesyncCommand({
525
- baseDir = ".",
525
+ baseDir = process.cwd(),
526
526
  rulesyncCommand,
527
527
  validate = true
528
528
  }) {
@@ -531,7 +531,7 @@ var AgentsmdCommand = class _AgentsmdCommand extends SimulatedCommand {
531
531
  );
532
532
  }
533
533
  static async fromFile({
534
- baseDir = ".",
534
+ baseDir = process.cwd(),
535
535
  relativeFilePath,
536
536
  validate = true
537
537
  }) {
@@ -620,7 +620,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
620
620
  const result = RulesyncCommandFrontmatterSchema.safeParse(frontmatter);
621
621
  if (!result.success) {
622
622
  throw new Error(
623
- `Invalid frontmatter in ${join4(rest.baseDir ?? ".", rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
623
+ `Invalid frontmatter in ${join4(rest.baseDir ?? process.cwd(), rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
624
624
  );
625
625
  }
626
626
  }
@@ -671,7 +671,7 @@ var RulesyncCommand = class _RulesyncCommand extends RulesyncFile {
671
671
  }
672
672
  const filename = basename4(relativeFilePath);
673
673
  return new _RulesyncCommand({
674
- baseDir: ".",
674
+ baseDir: process.cwd(),
675
675
  relativeDirPath: _RulesyncCommand.getSettablePaths().relativeDirPath,
676
676
  relativeFilePath: filename,
677
677
  frontmatter: result.data,
@@ -733,7 +733,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
733
733
  });
734
734
  }
735
735
  static fromRulesyncCommand({
736
- baseDir = ".",
736
+ baseDir = process.cwd(),
737
737
  rulesyncCommand,
738
738
  validate = true,
739
739
  global = false
@@ -776,7 +776,7 @@ var ClaudecodeCommand = class _ClaudecodeCommand extends ToolCommand {
776
776
  });
777
777
  }
778
778
  static async fromFile({
779
- baseDir = ".",
779
+ baseDir = process.cwd(),
780
780
  relativeFilePath,
781
781
  validate = true,
782
782
  global = false
@@ -828,7 +828,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
828
828
  });
829
829
  }
830
830
  static fromRulesyncCommand({
831
- baseDir = ".",
831
+ baseDir = process.cwd(),
832
832
  rulesyncCommand,
833
833
  validate = true,
834
834
  global = false
@@ -855,7 +855,7 @@ var CodexcliCommand = class _CodexcliCommand extends ToolCommand {
855
855
  });
856
856
  }
857
857
  static async fromFile({
858
- baseDir = ".",
858
+ baseDir = process.cwd(),
859
859
  relativeFilePath,
860
860
  validate = true,
861
861
  global = false
@@ -919,7 +919,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
919
919
  const originalFilePath = this.relativeFilePath;
920
920
  const relativeFilePath = originalFilePath.replace(/\.prompt\.md$/, ".md");
921
921
  return new RulesyncCommand({
922
- baseDir: ".",
922
+ baseDir: this.baseDir,
923
923
  frontmatter: rulesyncFrontmatter,
924
924
  body: this.body,
925
925
  relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
@@ -945,7 +945,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
945
945
  }
946
946
  }
947
947
  static fromRulesyncCommand({
948
- baseDir = ".",
948
+ baseDir = process.cwd(),
949
949
  rulesyncCommand,
950
950
  validate = true
951
951
  }) {
@@ -968,7 +968,7 @@ var CopilotCommand = class _CopilotCommand extends ToolCommand {
968
968
  });
969
969
  }
970
970
  static async fromFile({
971
- baseDir = ".",
971
+ baseDir = process.cwd(),
972
972
  relativeFilePath,
973
973
  validate = true
974
974
  }) {
@@ -1011,7 +1011,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1011
1011
  description: ""
1012
1012
  };
1013
1013
  return new RulesyncCommand({
1014
- baseDir: ".",
1014
+ baseDir: process.cwd(),
1015
1015
  // RulesyncCommand baseDir is always the project root directory
1016
1016
  frontmatter: rulesyncFrontmatter,
1017
1017
  body: this.getFileContent(),
@@ -1022,7 +1022,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1022
1022
  });
1023
1023
  }
1024
1024
  static fromRulesyncCommand({
1025
- baseDir = ".",
1025
+ baseDir = process.cwd(),
1026
1026
  rulesyncCommand,
1027
1027
  validate = true,
1028
1028
  global = false
@@ -1049,7 +1049,7 @@ var CursorCommand = class _CursorCommand extends ToolCommand {
1049
1049
  });
1050
1050
  }
1051
1051
  static async fromFile({
1052
- baseDir = ".",
1052
+ baseDir = process.cwd(),
1053
1053
  relativeFilePath,
1054
1054
  validate = true,
1055
1055
  global = false
@@ -1123,7 +1123,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1123
1123
  };
1124
1124
  const fileContent = stringifyFrontmatter(this.body, rulesyncFrontmatter);
1125
1125
  return new RulesyncCommand({
1126
- baseDir: ".",
1126
+ baseDir: process.cwd(),
1127
1127
  // RulesyncCommand baseDir is always the project root directory
1128
1128
  frontmatter: rulesyncFrontmatter,
1129
1129
  body: this.body,
@@ -1134,7 +1134,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
1134
1134
  });
1135
1135
  }
1136
1136
  static fromRulesyncCommand({
1137
- baseDir = ".",
1137
+ baseDir = process.cwd(),
1138
1138
  rulesyncCommand,
1139
1139
  validate = true,
1140
1140
  global = false
@@ -1158,7 +1158,7 @@ ${geminiFrontmatter.prompt}
1158
1158
  });
1159
1159
  }
1160
1160
  static async fromFile({
1161
- baseDir = ".",
1161
+ baseDir = process.cwd(),
1162
1162
  relativeFilePath,
1163
1163
  validate = true,
1164
1164
  global = false
@@ -1245,7 +1245,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1245
1245
  });
1246
1246
  }
1247
1247
  static fromRulesyncCommand({
1248
- baseDir = ".",
1248
+ baseDir = process.cwd(),
1249
1249
  rulesyncCommand,
1250
1250
  validate = true
1251
1251
  }) {
@@ -1288,7 +1288,7 @@ var RooCommand = class _RooCommand extends ToolCommand {
1288
1288
  });
1289
1289
  }
1290
1290
  static async fromFile({
1291
- baseDir = ".",
1291
+ baseDir = process.cwd(),
1292
1292
  relativeFilePath,
1293
1293
  validate = true
1294
1294
  }) {
@@ -1722,7 +1722,7 @@ var defaults = {
1722
1722
  features: ["rules"],
1723
1723
  verbose: false,
1724
1724
  delete: false,
1725
- baseDirs: ["."],
1725
+ baseDirs: [process.cwd()],
1726
1726
  configPath: "rulesync.jsonc",
1727
1727
  global: false,
1728
1728
  simulatedCommands: false,
@@ -1859,13 +1859,14 @@ function getBaseDirsInLightOfGlobal({
1859
1859
  import { z as z10 } from "zod/mini";
1860
1860
 
1861
1861
  // src/ignore/amazonqcli-ignore.ts
1862
- import { join as join13 } from "path";
1862
+ import { join as join14 } from "path";
1863
1863
 
1864
1864
  // src/types/tool-file.ts
1865
1865
  var ToolFile = class extends AiFile {
1866
1866
  };
1867
1867
 
1868
1868
  // src/ignore/rulesync-ignore.ts
1869
+ import { join as join13 } from "path";
1869
1870
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1870
1871
  validate() {
1871
1872
  return { success: true, error: null };
@@ -1877,9 +1878,11 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1877
1878
  };
1878
1879
  }
1879
1880
  static async fromFile() {
1880
- const fileContent = await readFileContent(this.getSettablePaths().relativeFilePath);
1881
+ const baseDir = process.cwd();
1882
+ const filePath = join13(baseDir, this.getSettablePaths().relativeFilePath);
1883
+ const fileContent = await readFileContent(filePath);
1881
1884
  return new _RulesyncIgnore({
1882
- baseDir: ".",
1885
+ baseDir,
1883
1886
  relativeDirPath: this.getSettablePaths().relativeDirPath,
1884
1887
  relativeFilePath: this.getSettablePaths().relativeFilePath,
1885
1888
  fileContent
@@ -1947,7 +1950,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1947
1950
  * Supports conversion from unified rulesync format to Amazon Q CLI specific format
1948
1951
  */
1949
1952
  static fromRulesyncIgnore({
1950
- baseDir = ".",
1953
+ baseDir = process.cwd(),
1951
1954
  rulesyncIgnore
1952
1955
  }) {
1953
1956
  const body = rulesyncIgnore.getFileContent();
@@ -1963,11 +1966,11 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1963
1966
  * Supports both proposed .q-ignore and .amazonqignore formats
1964
1967
  */
1965
1968
  static async fromFile({
1966
- baseDir = ".",
1969
+ baseDir = process.cwd(),
1967
1970
  validate = true
1968
1971
  }) {
1969
1972
  const fileContent = await readFileContent(
1970
- join13(
1973
+ join14(
1971
1974
  baseDir,
1972
1975
  this.getSettablePaths().relativeDirPath,
1973
1976
  this.getSettablePaths().relativeFilePath
@@ -1984,7 +1987,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1984
1987
  };
1985
1988
 
1986
1989
  // src/ignore/augmentcode-ignore.ts
1987
- import { join as join14 } from "path";
1990
+ import { join as join15 } from "path";
1988
1991
  var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
1989
1992
  static getSettablePaths() {
1990
1993
  return {
@@ -2003,7 +2006,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2003
2006
  * Supports conversion from unified rulesync format to AugmentCode specific format
2004
2007
  */
2005
2008
  static fromRulesyncIgnore({
2006
- baseDir = ".",
2009
+ baseDir = process.cwd(),
2007
2010
  rulesyncIgnore
2008
2011
  }) {
2009
2012
  return new _AugmentcodeIgnore({
@@ -2018,11 +2021,11 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2018
2021
  * Reads and parses .augmentignore file
2019
2022
  */
2020
2023
  static async fromFile({
2021
- baseDir = ".",
2024
+ baseDir = process.cwd(),
2022
2025
  validate = true
2023
2026
  }) {
2024
2027
  const fileContent = await readFileContent(
2025
- join14(
2028
+ join15(
2026
2029
  baseDir,
2027
2030
  this.getSettablePaths().relativeDirPath,
2028
2031
  this.getSettablePaths().relativeFilePath
@@ -2039,7 +2042,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
2039
2042
  };
2040
2043
 
2041
2044
  // src/ignore/claudecode-ignore.ts
2042
- import { join as join15 } from "path";
2045
+ import { join as join16 } from "path";
2043
2046
  import { uniq } from "es-toolkit";
2044
2047
  var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2045
2048
  constructor(params) {
@@ -2069,13 +2072,13 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2069
2072
  });
2070
2073
  }
2071
2074
  static async fromRulesyncIgnore({
2072
- baseDir = ".",
2075
+ baseDir = process.cwd(),
2073
2076
  rulesyncIgnore
2074
2077
  }) {
2075
2078
  const fileContent = rulesyncIgnore.getFileContent();
2076
2079
  const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
2077
2080
  const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
2078
- const filePath = join15(
2081
+ const filePath = join16(
2079
2082
  baseDir,
2080
2083
  this.getSettablePaths().relativeDirPath,
2081
2084
  this.getSettablePaths().relativeFilePath
@@ -2099,11 +2102,11 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2099
2102
  });
2100
2103
  }
2101
2104
  static async fromFile({
2102
- baseDir = ".",
2105
+ baseDir = process.cwd(),
2103
2106
  validate = true
2104
2107
  }) {
2105
2108
  const fileContent = await readFileContent(
2106
- join15(
2109
+ join16(
2107
2110
  baseDir,
2108
2111
  this.getSettablePaths().relativeDirPath,
2109
2112
  this.getSettablePaths().relativeFilePath
@@ -2120,7 +2123,7 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2120
2123
  };
2121
2124
 
2122
2125
  // src/ignore/cline-ignore.ts
2123
- import { join as join16 } from "path";
2126
+ import { join as join17 } from "path";
2124
2127
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2125
2128
  static getSettablePaths() {
2126
2129
  return {
@@ -2138,7 +2141,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2138
2141
  * Create ClineIgnore from RulesyncIgnore
2139
2142
  */
2140
2143
  static fromRulesyncIgnore({
2141
- baseDir = ".",
2144
+ baseDir = process.cwd(),
2142
2145
  rulesyncIgnore
2143
2146
  }) {
2144
2147
  const body = rulesyncIgnore.getFileContent();
@@ -2153,11 +2156,11 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2153
2156
  * Load ClineIgnore from .clineignore file
2154
2157
  */
2155
2158
  static async fromFile({
2156
- baseDir = ".",
2159
+ baseDir = process.cwd(),
2157
2160
  validate = true
2158
2161
  }) {
2159
2162
  const fileContent = await readFileContent(
2160
- join16(
2163
+ join17(
2161
2164
  baseDir,
2162
2165
  this.getSettablePaths().relativeDirPath,
2163
2166
  this.getSettablePaths().relativeFilePath
@@ -2174,7 +2177,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
2174
2177
  };
2175
2178
 
2176
2179
  // src/ignore/cursor-ignore.ts
2177
- import { join as join17 } from "path";
2180
+ import { join as join18 } from "path";
2178
2181
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2179
2182
  static getSettablePaths() {
2180
2183
  return {
@@ -2191,7 +2194,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2191
2194
  });
2192
2195
  }
2193
2196
  static fromRulesyncIgnore({
2194
- baseDir = ".",
2197
+ baseDir = process.cwd(),
2195
2198
  rulesyncIgnore
2196
2199
  }) {
2197
2200
  const body = rulesyncIgnore.getFileContent();
@@ -2203,11 +2206,11 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2203
2206
  });
2204
2207
  }
2205
2208
  static async fromFile({
2206
- baseDir = ".",
2209
+ baseDir = process.cwd(),
2207
2210
  validate = true
2208
2211
  }) {
2209
2212
  const fileContent = await readFileContent(
2210
- join17(
2213
+ join18(
2211
2214
  baseDir,
2212
2215
  this.getSettablePaths().relativeDirPath,
2213
2216
  this.getSettablePaths().relativeFilePath
@@ -2224,7 +2227,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2224
2227
  };
2225
2228
 
2226
2229
  // src/ignore/geminicli-ignore.ts
2227
- import { join as join18 } from "path";
2230
+ import { join as join19 } from "path";
2228
2231
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2229
2232
  static getSettablePaths() {
2230
2233
  return {
@@ -2236,7 +2239,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2236
2239
  return this.toRulesyncIgnoreDefault();
2237
2240
  }
2238
2241
  static fromRulesyncIgnore({
2239
- baseDir = ".",
2242
+ baseDir = process.cwd(),
2240
2243
  rulesyncIgnore
2241
2244
  }) {
2242
2245
  return new _GeminiCliIgnore({
@@ -2247,11 +2250,11 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2247
2250
  });
2248
2251
  }
2249
2252
  static async fromFile({
2250
- baseDir = ".",
2253
+ baseDir = process.cwd(),
2251
2254
  validate = true
2252
2255
  }) {
2253
2256
  const fileContent = await readFileContent(
2254
- join18(
2257
+ join19(
2255
2258
  baseDir,
2256
2259
  this.getSettablePaths().relativeDirPath,
2257
2260
  this.getSettablePaths().relativeFilePath
@@ -2268,7 +2271,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
2268
2271
  };
2269
2272
 
2270
2273
  // src/ignore/junie-ignore.ts
2271
- import { join as join19 } from "path";
2274
+ import { join as join20 } from "path";
2272
2275
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2273
2276
  static getSettablePaths() {
2274
2277
  return {
@@ -2280,7 +2283,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2280
2283
  return this.toRulesyncIgnoreDefault();
2281
2284
  }
2282
2285
  static fromRulesyncIgnore({
2283
- baseDir = ".",
2286
+ baseDir = process.cwd(),
2284
2287
  rulesyncIgnore
2285
2288
  }) {
2286
2289
  return new _JunieIgnore({
@@ -2291,11 +2294,11 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2291
2294
  });
2292
2295
  }
2293
2296
  static async fromFile({
2294
- baseDir = ".",
2297
+ baseDir = process.cwd(),
2295
2298
  validate = true
2296
2299
  }) {
2297
2300
  const fileContent = await readFileContent(
2298
- join19(
2301
+ join20(
2299
2302
  baseDir,
2300
2303
  this.getSettablePaths().relativeDirPath,
2301
2304
  this.getSettablePaths().relativeFilePath
@@ -2312,7 +2315,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
2312
2315
  };
2313
2316
 
2314
2317
  // src/ignore/kiro-ignore.ts
2315
- import { join as join20 } from "path";
2318
+ import { join as join21 } from "path";
2316
2319
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2317
2320
  static getSettablePaths() {
2318
2321
  return {
@@ -2324,7 +2327,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2324
2327
  return this.toRulesyncIgnoreDefault();
2325
2328
  }
2326
2329
  static fromRulesyncIgnore({
2327
- baseDir = ".",
2330
+ baseDir = process.cwd(),
2328
2331
  rulesyncIgnore
2329
2332
  }) {
2330
2333
  return new _KiroIgnore({
@@ -2335,11 +2338,11 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2335
2338
  });
2336
2339
  }
2337
2340
  static async fromFile({
2338
- baseDir = ".",
2341
+ baseDir = process.cwd(),
2339
2342
  validate = true
2340
2343
  }) {
2341
2344
  const fileContent = await readFileContent(
2342
- join20(
2345
+ join21(
2343
2346
  baseDir,
2344
2347
  this.getSettablePaths().relativeDirPath,
2345
2348
  this.getSettablePaths().relativeFilePath
@@ -2356,7 +2359,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
2356
2359
  };
2357
2360
 
2358
2361
  // src/ignore/qwencode-ignore.ts
2359
- import { join as join21 } from "path";
2362
+ import { join as join22 } from "path";
2360
2363
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2361
2364
  static getSettablePaths() {
2362
2365
  return {
@@ -2368,7 +2371,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2368
2371
  return this.toRulesyncIgnoreDefault();
2369
2372
  }
2370
2373
  static fromRulesyncIgnore({
2371
- baseDir = ".",
2374
+ baseDir = process.cwd(),
2372
2375
  rulesyncIgnore
2373
2376
  }) {
2374
2377
  return new _QwencodeIgnore({
@@ -2379,11 +2382,11 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2379
2382
  });
2380
2383
  }
2381
2384
  static async fromFile({
2382
- baseDir = ".",
2385
+ baseDir = process.cwd(),
2383
2386
  validate = true
2384
2387
  }) {
2385
2388
  const fileContent = await readFileContent(
2386
- join21(
2389
+ join22(
2387
2390
  baseDir,
2388
2391
  this.getSettablePaths().relativeDirPath,
2389
2392
  this.getSettablePaths().relativeFilePath
@@ -2400,7 +2403,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
2400
2403
  };
2401
2404
 
2402
2405
  // src/ignore/roo-ignore.ts
2403
- import { join as join22 } from "path";
2406
+ import { join as join23 } from "path";
2404
2407
  var RooIgnore = class _RooIgnore extends ToolIgnore {
2405
2408
  static getSettablePaths() {
2406
2409
  return {
@@ -2412,7 +2415,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2412
2415
  return this.toRulesyncIgnoreDefault();
2413
2416
  }
2414
2417
  static fromRulesyncIgnore({
2415
- baseDir = ".",
2418
+ baseDir = process.cwd(),
2416
2419
  rulesyncIgnore
2417
2420
  }) {
2418
2421
  return new _RooIgnore({
@@ -2423,11 +2426,11 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2423
2426
  });
2424
2427
  }
2425
2428
  static async fromFile({
2426
- baseDir = ".",
2429
+ baseDir = process.cwd(),
2427
2430
  validate = true
2428
2431
  }) {
2429
2432
  const fileContent = await readFileContent(
2430
- join22(
2433
+ join23(
2431
2434
  baseDir,
2432
2435
  this.getSettablePaths().relativeDirPath,
2433
2436
  this.getSettablePaths().relativeFilePath
@@ -2444,7 +2447,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2444
2447
  };
2445
2448
 
2446
2449
  // src/ignore/windsurf-ignore.ts
2447
- import { join as join23 } from "path";
2450
+ import { join as join24 } from "path";
2448
2451
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2449
2452
  static getSettablePaths() {
2450
2453
  return {
@@ -2456,7 +2459,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2456
2459
  return this.toRulesyncIgnoreDefault();
2457
2460
  }
2458
2461
  static fromRulesyncIgnore({
2459
- baseDir = ".",
2462
+ baseDir = process.cwd(),
2460
2463
  rulesyncIgnore
2461
2464
  }) {
2462
2465
  return new _WindsurfIgnore({
@@ -2467,11 +2470,11 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2467
2470
  });
2468
2471
  }
2469
2472
  static async fromFile({
2470
- baseDir = ".",
2473
+ baseDir = process.cwd(),
2471
2474
  validate = true
2472
2475
  }) {
2473
2476
  const fileContent = await readFileContent(
2474
- join23(
2477
+ join24(
2475
2478
  baseDir,
2476
2479
  this.getSettablePaths().relativeDirPath,
2477
2480
  this.getSettablePaths().relativeFilePath
@@ -2679,10 +2682,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
2679
2682
  import { z as z12 } from "zod/mini";
2680
2683
 
2681
2684
  // src/mcp/amazonqcli-mcp.ts
2682
- import { join as join25 } from "path";
2685
+ import { join as join26 } from "path";
2683
2686
 
2684
2687
  // src/mcp/rulesync-mcp.ts
2685
- import { join as join24 } from "path";
2688
+ import { join as join25 } from "path";
2686
2689
  import { omit } from "es-toolkit/object";
2687
2690
  import { z as z11 } from "zod/mini";
2688
2691
  var McpTransportTypeSchema = z11.enum(["stdio", "sse", "http"]);
@@ -2760,16 +2763,18 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2760
2763
  validate = true,
2761
2764
  modularMcp = false
2762
2765
  }) {
2766
+ const baseDir = process.cwd();
2763
2767
  const paths = this.getSettablePaths();
2764
- const recommendedPath = join24(
2768
+ const recommendedPath = join25(
2769
+ baseDir,
2765
2770
  paths.recommended.relativeDirPath,
2766
2771
  paths.recommended.relativeFilePath
2767
2772
  );
2768
- const legacyPath = join24(paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
2773
+ const legacyPath = join25(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
2769
2774
  if (await fileExists(recommendedPath)) {
2770
2775
  const fileContent2 = await readFileContent(recommendedPath);
2771
2776
  return new _RulesyncMcp({
2772
- baseDir: ".",
2777
+ baseDir,
2773
2778
  relativeDirPath: paths.recommended.relativeDirPath,
2774
2779
  relativeFilePath: paths.recommended.relativeFilePath,
2775
2780
  fileContent: fileContent2,
@@ -2783,7 +2788,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2783
2788
  );
2784
2789
  const fileContent2 = await readFileContent(legacyPath);
2785
2790
  return new _RulesyncMcp({
2786
- baseDir: ".",
2791
+ baseDir,
2787
2792
  relativeDirPath: paths.legacy.relativeDirPath,
2788
2793
  relativeFilePath: paths.legacy.relativeFilePath,
2789
2794
  fileContent: fileContent2,
@@ -2793,7 +2798,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2793
2798
  }
2794
2799
  const fileContent = await readFileContent(recommendedPath);
2795
2800
  return new _RulesyncMcp({
2796
- baseDir: ".",
2801
+ baseDir,
2797
2802
  relativeDirPath: paths.recommended.relativeDirPath,
2798
2803
  relativeFilePath: paths.recommended.relativeFilePath,
2799
2804
  fileContent,
@@ -2880,11 +2885,11 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2880
2885
  };
2881
2886
  }
2882
2887
  static async fromFile({
2883
- baseDir = ".",
2888
+ baseDir = process.cwd(),
2884
2889
  validate = true
2885
2890
  }) {
2886
2891
  const fileContent = await readFileContent(
2887
- join25(
2892
+ join26(
2888
2893
  baseDir,
2889
2894
  this.getSettablePaths().relativeDirPath,
2890
2895
  this.getSettablePaths().relativeFilePath
@@ -2899,7 +2904,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2899
2904
  });
2900
2905
  }
2901
2906
  static fromRulesyncMcp({
2902
- baseDir = ".",
2907
+ baseDir = process.cwd(),
2903
2908
  rulesyncMcp,
2904
2909
  validate = true
2905
2910
  }) {
@@ -2920,10 +2925,10 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2920
2925
  };
2921
2926
 
2922
2927
  // src/mcp/claudecode-mcp.ts
2923
- import { join as join27 } from "path";
2928
+ import { join as join28 } from "path";
2924
2929
 
2925
2930
  // src/mcp/modular-mcp.ts
2926
- import { join as join26 } from "path";
2931
+ import { join as join27 } from "path";
2927
2932
  var ModularMcp = class _ModularMcp extends AiFile {
2928
2933
  json;
2929
2934
  constructor(params) {
@@ -2954,7 +2959,7 @@ var ModularMcp = class _ModularMcp extends AiFile {
2954
2959
  global,
2955
2960
  relativeDirPath
2956
2961
  } = {
2957
- baseDir: ".",
2962
+ baseDir: process.cwd(),
2958
2963
  global: false,
2959
2964
  relativeDirPath: void 0
2960
2965
  }) {
@@ -2978,14 +2983,14 @@ var ModularMcp = class _ModularMcp extends AiFile {
2978
2983
  args: [
2979
2984
  "-y",
2980
2985
  "@kimuson/modular-mcp",
2981
- join26(baseDir, paths.relativeDirPath, paths.relativeFilePath)
2986
+ join27(baseDir, paths.relativeDirPath, paths.relativeFilePath)
2982
2987
  ],
2983
2988
  env: {}
2984
2989
  }
2985
2990
  };
2986
2991
  }
2987
2992
  static fromRulesyncMcp({
2988
- baseDir = ".",
2993
+ baseDir = process.cwd(),
2989
2994
  rulesyncMcp,
2990
2995
  validate = true,
2991
2996
  global = false,
@@ -3033,13 +3038,13 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3033
3038
  };
3034
3039
  }
3035
3040
  static async fromFile({
3036
- baseDir = ".",
3041
+ baseDir = process.cwd(),
3037
3042
  validate = true,
3038
3043
  global = false
3039
3044
  }) {
3040
3045
  const paths = this.getSettablePaths({ global });
3041
3046
  const fileContent = await readOrInitializeFileContent(
3042
- join27(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3047
+ join28(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3043
3048
  JSON.stringify({ mcpServers: {} }, null, 2)
3044
3049
  );
3045
3050
  const json = JSON.parse(fileContent);
@@ -3053,7 +3058,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3053
3058
  });
3054
3059
  }
3055
3060
  static async fromRulesyncMcp({
3056
- baseDir = ".",
3061
+ baseDir = process.cwd(),
3057
3062
  rulesyncMcp,
3058
3063
  validate = true,
3059
3064
  global = false,
@@ -3061,7 +3066,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3061
3066
  }) {
3062
3067
  const paths = this.getSettablePaths({ global });
3063
3068
  const fileContent = await readOrInitializeFileContent(
3064
- join27(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3069
+ join28(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3065
3070
  JSON.stringify({ mcpServers: {} }, null, 2)
3066
3071
  );
3067
3072
  const json = JSON.parse(fileContent);
@@ -3092,7 +3097,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
3092
3097
  };
3093
3098
 
3094
3099
  // src/mcp/cline-mcp.ts
3095
- import { join as join28 } from "path";
3100
+ import { join as join29 } from "path";
3096
3101
  var ClineMcp = class _ClineMcp extends ToolMcp {
3097
3102
  json;
3098
3103
  constructor(params) {
@@ -3109,11 +3114,11 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3109
3114
  };
3110
3115
  }
3111
3116
  static async fromFile({
3112
- baseDir = ".",
3117
+ baseDir = process.cwd(),
3113
3118
  validate = true
3114
3119
  }) {
3115
3120
  const fileContent = await readFileContent(
3116
- join28(
3121
+ join29(
3117
3122
  baseDir,
3118
3123
  this.getSettablePaths().relativeDirPath,
3119
3124
  this.getSettablePaths().relativeFilePath
@@ -3128,7 +3133,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3128
3133
  });
3129
3134
  }
3130
3135
  static fromRulesyncMcp({
3131
- baseDir = ".",
3136
+ baseDir = process.cwd(),
3132
3137
  rulesyncMcp,
3133
3138
  validate = true
3134
3139
  }) {
@@ -3149,7 +3154,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
3149
3154
  };
3150
3155
 
3151
3156
  // src/mcp/codexcli-mcp.ts
3152
- import { join as join29 } from "path";
3157
+ import { join as join30 } from "path";
3153
3158
  import * as smolToml from "smol-toml";
3154
3159
  var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3155
3160
  toml;
@@ -3179,13 +3184,13 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3179
3184
  };
3180
3185
  }
3181
3186
  static async fromFile({
3182
- baseDir = ".",
3187
+ baseDir = process.cwd(),
3183
3188
  validate = true,
3184
3189
  global = false
3185
3190
  }) {
3186
3191
  const paths = this.getSettablePaths({ global });
3187
3192
  const fileContent = await readFileContent(
3188
- join29(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3193
+ join30(baseDir, paths.relativeDirPath, paths.relativeFilePath)
3189
3194
  );
3190
3195
  return new _CodexcliMcp({
3191
3196
  baseDir,
@@ -3196,13 +3201,13 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3196
3201
  });
3197
3202
  }
3198
3203
  static async fromRulesyncMcp({
3199
- baseDir = ".",
3204
+ baseDir = process.cwd(),
3200
3205
  rulesyncMcp,
3201
3206
  validate = true,
3202
3207
  global = false
3203
3208
  }) {
3204
3209
  const paths = this.getSettablePaths({ global });
3205
- const configTomlFilePath = join29(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3210
+ const configTomlFilePath = join30(baseDir, paths.relativeDirPath, paths.relativeFilePath);
3206
3211
  const configTomlFileContent = await readOrInitializeFileContent(
3207
3212
  configTomlFilePath,
3208
3213
  smolToml.stringify({})
@@ -3243,7 +3248,7 @@ var CodexcliMcp = class _CodexcliMcp extends ToolMcp {
3243
3248
  };
3244
3249
 
3245
3250
  // src/mcp/copilot-mcp.ts
3246
- import { join as join30 } from "path";
3251
+ import { join as join31 } from "path";
3247
3252
  var CopilotMcp = class _CopilotMcp extends ToolMcp {
3248
3253
  json;
3249
3254
  constructor(params) {
@@ -3260,11 +3265,11 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3260
3265
  };
3261
3266
  }
3262
3267
  static async fromFile({
3263
- baseDir = ".",
3268
+ baseDir = process.cwd(),
3264
3269
  validate = true
3265
3270
  }) {
3266
3271
  const fileContent = await readFileContent(
3267
- join30(
3272
+ join31(
3268
3273
  baseDir,
3269
3274
  this.getSettablePaths().relativeDirPath,
3270
3275
  this.getSettablePaths().relativeFilePath
@@ -3279,7 +3284,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3279
3284
  });
3280
3285
  }
3281
3286
  static fromRulesyncMcp({
3282
- baseDir = ".",
3287
+ baseDir = process.cwd(),
3283
3288
  rulesyncMcp,
3284
3289
  validate = true
3285
3290
  }) {
@@ -3300,7 +3305,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
3300
3305
  };
3301
3306
 
3302
3307
  // src/mcp/cursor-mcp.ts
3303
- import { join as join31 } from "path";
3308
+ import { join as join32 } from "path";
3304
3309
  var CursorMcp = class _CursorMcp extends ToolMcp {
3305
3310
  json;
3306
3311
  constructor(params) {
@@ -3317,11 +3322,11 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3317
3322
  };
3318
3323
  }
3319
3324
  static async fromFile({
3320
- baseDir = ".",
3325
+ baseDir = process.cwd(),
3321
3326
  validate = true
3322
3327
  }) {
3323
3328
  const fileContent = await readFileContent(
3324
- join31(
3329
+ join32(
3325
3330
  baseDir,
3326
3331
  this.getSettablePaths().relativeDirPath,
3327
3332
  this.getSettablePaths().relativeFilePath
@@ -3336,7 +3341,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3336
3341
  });
3337
3342
  }
3338
3343
  static fromRulesyncMcp({
3339
- baseDir = ".",
3344
+ baseDir = process.cwd(),
3340
3345
  rulesyncMcp,
3341
3346
  validate = true
3342
3347
  }) {
@@ -3368,7 +3373,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
3368
3373
  };
3369
3374
 
3370
3375
  // src/mcp/geminicli-mcp.ts
3371
- import { join as join32 } from "path";
3376
+ import { join as join33 } from "path";
3372
3377
  var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3373
3378
  json;
3374
3379
  constructor(params) {
@@ -3391,13 +3396,13 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3391
3396
  };
3392
3397
  }
3393
3398
  static async fromFile({
3394
- baseDir = ".",
3399
+ baseDir = process.cwd(),
3395
3400
  validate = true,
3396
3401
  global = false
3397
3402
  }) {
3398
3403
  const paths = this.getSettablePaths({ global });
3399
3404
  const fileContent = await readOrInitializeFileContent(
3400
- join32(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3405
+ join33(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3401
3406
  JSON.stringify({ mcpServers: {} }, null, 2)
3402
3407
  );
3403
3408
  const json = JSON.parse(fileContent);
@@ -3411,14 +3416,14 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3411
3416
  });
3412
3417
  }
3413
3418
  static async fromRulesyncMcp({
3414
- baseDir = ".",
3419
+ baseDir = process.cwd(),
3415
3420
  rulesyncMcp,
3416
3421
  validate = true,
3417
3422
  global = false
3418
3423
  }) {
3419
3424
  const paths = this.getSettablePaths({ global });
3420
3425
  const fileContent = await readOrInitializeFileContent(
3421
- join32(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3426
+ join33(baseDir, paths.relativeDirPath, paths.relativeFilePath),
3422
3427
  JSON.stringify({ mcpServers: {} }, null, 2)
3423
3428
  );
3424
3429
  const json = JSON.parse(fileContent);
@@ -3442,7 +3447,7 @@ var GeminiCliMcp = class _GeminiCliMcp extends ToolMcp {
3442
3447
  };
3443
3448
 
3444
3449
  // src/mcp/roo-mcp.ts
3445
- import { join as join33 } from "path";
3450
+ import { join as join34 } from "path";
3446
3451
  var RooMcp = class _RooMcp extends ToolMcp {
3447
3452
  json;
3448
3453
  constructor(params) {
@@ -3459,11 +3464,11 @@ var RooMcp = class _RooMcp extends ToolMcp {
3459
3464
  };
3460
3465
  }
3461
3466
  static async fromFile({
3462
- baseDir = ".",
3467
+ baseDir = process.cwd(),
3463
3468
  validate = true
3464
3469
  }) {
3465
3470
  const fileContent = await readFileContent(
3466
- join33(
3471
+ join34(
3467
3472
  baseDir,
3468
3473
  this.getSettablePaths().relativeDirPath,
3469
3474
  this.getSettablePaths().relativeFilePath
@@ -3478,7 +3483,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
3478
3483
  });
3479
3484
  }
3480
3485
  static fromRulesyncMcp({
3481
- baseDir = ".",
3486
+ baseDir = process.cwd(),
3482
3487
  rulesyncMcp,
3483
3488
  validate = true
3484
3489
  }) {
@@ -3520,7 +3525,7 @@ var McpProcessor = class extends FeatureProcessor {
3520
3525
  global;
3521
3526
  modularMcp;
3522
3527
  constructor({
3523
- baseDir = ".",
3528
+ baseDir = process.cwd(),
3524
3529
  toolTarget,
3525
3530
  global = false,
3526
3531
  modularMcp = false
@@ -3746,15 +3751,15 @@ var McpProcessor = class extends FeatureProcessor {
3746
3751
  };
3747
3752
 
3748
3753
  // src/rules/rules-processor.ts
3749
- import { basename as basename17, join as join63 } from "path";
3754
+ import { basename as basename17, join as join64 } from "path";
3750
3755
  import { XMLBuilder } from "fast-xml-parser";
3751
3756
  import { z as z21 } from "zod/mini";
3752
3757
 
3753
3758
  // src/subagents/agentsmd-subagent.ts
3754
- import { join as join35 } from "path";
3759
+ import { join as join36 } from "path";
3755
3760
 
3756
3761
  // src/subagents/simulated-subagent.ts
3757
- import { basename as basename12, join as join34 } from "path";
3762
+ import { basename as basename12, join as join35 } from "path";
3758
3763
  import { z as z13 } from "zod/mini";
3759
3764
 
3760
3765
  // src/subagents/tool-subagent.ts
@@ -3802,7 +3807,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3802
3807
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
3803
3808
  if (!result.success) {
3804
3809
  throw new Error(
3805
- `Invalid frontmatter in ${join34(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
3810
+ `Invalid frontmatter in ${join35(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
3806
3811
  );
3807
3812
  }
3808
3813
  }
@@ -3823,7 +3828,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3823
3828
  throw new Error("Not implemented because it is a SIMULATED file.");
3824
3829
  }
3825
3830
  static fromRulesyncSubagentDefault({
3826
- baseDir = ".",
3831
+ baseDir = process.cwd(),
3827
3832
  rulesyncSubagent,
3828
3833
  validate = true
3829
3834
  }) {
@@ -3853,17 +3858,17 @@ var SimulatedSubagent = class extends ToolSubagent {
3853
3858
  return {
3854
3859
  success: false,
3855
3860
  error: new Error(
3856
- `Invalid frontmatter in ${join34(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
3861
+ `Invalid frontmatter in ${join35(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
3857
3862
  )
3858
3863
  };
3859
3864
  }
3860
3865
  }
3861
3866
  static async fromFileDefault({
3862
- baseDir = ".",
3867
+ baseDir = process.cwd(),
3863
3868
  relativeFilePath,
3864
3869
  validate = true
3865
3870
  }) {
3866
- const filePath = join34(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3871
+ const filePath = join35(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3867
3872
  const fileContent = await readFileContent(filePath);
3868
3873
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3869
3874
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -3885,7 +3890,7 @@ var SimulatedSubagent = class extends ToolSubagent {
3885
3890
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3886
3891
  static getSettablePaths() {
3887
3892
  return {
3888
- relativeDirPath: join35(".agents", "subagents")
3893
+ relativeDirPath: join36(".agents", "subagents")
3889
3894
  };
3890
3895
  }
3891
3896
  static async fromFile(params) {
@@ -3905,11 +3910,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
3905
3910
  };
3906
3911
 
3907
3912
  // src/subagents/codexcli-subagent.ts
3908
- import { join as join36 } from "path";
3913
+ import { join as join37 } from "path";
3909
3914
  var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3910
3915
  static getSettablePaths() {
3911
3916
  return {
3912
- relativeDirPath: join36(".codex", "subagents")
3917
+ relativeDirPath: join37(".codex", "subagents")
3913
3918
  };
3914
3919
  }
3915
3920
  static async fromFile(params) {
@@ -3929,11 +3934,11 @@ var CodexCliSubagent = class _CodexCliSubagent extends SimulatedSubagent {
3929
3934
  };
3930
3935
 
3931
3936
  // src/subagents/copilot-subagent.ts
3932
- import { join as join37 } from "path";
3937
+ import { join as join38 } from "path";
3933
3938
  var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3934
3939
  static getSettablePaths() {
3935
3940
  return {
3936
- relativeDirPath: join37(".github", "subagents")
3941
+ relativeDirPath: join38(".github", "subagents")
3937
3942
  };
3938
3943
  }
3939
3944
  static async fromFile(params) {
@@ -3953,11 +3958,11 @@ var CopilotSubagent = class _CopilotSubagent extends SimulatedSubagent {
3953
3958
  };
3954
3959
 
3955
3960
  // src/subagents/cursor-subagent.ts
3956
- import { join as join38 } from "path";
3961
+ import { join as join39 } from "path";
3957
3962
  var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3958
3963
  static getSettablePaths() {
3959
3964
  return {
3960
- relativeDirPath: join38(".cursor", "subagents")
3965
+ relativeDirPath: join39(".cursor", "subagents")
3961
3966
  };
3962
3967
  }
3963
3968
  static async fromFile(params) {
@@ -3977,11 +3982,11 @@ var CursorSubagent = class _CursorSubagent extends SimulatedSubagent {
3977
3982
  };
3978
3983
 
3979
3984
  // src/subagents/geminicli-subagent.ts
3980
- import { join as join39 } from "path";
3985
+ import { join as join40 } from "path";
3981
3986
  var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
3982
3987
  static getSettablePaths() {
3983
3988
  return {
3984
- relativeDirPath: join39(".gemini", "subagents")
3989
+ relativeDirPath: join40(".gemini", "subagents")
3985
3990
  };
3986
3991
  }
3987
3992
  static async fromFile(params) {
@@ -4001,11 +4006,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends SimulatedSubagent {
4001
4006
  };
4002
4007
 
4003
4008
  // src/subagents/roo-subagent.ts
4004
- import { join as join40 } from "path";
4009
+ import { join as join41 } from "path";
4005
4010
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4006
4011
  static getSettablePaths() {
4007
4012
  return {
4008
- relativeDirPath: join40(".roo", "subagents")
4013
+ relativeDirPath: join41(".roo", "subagents")
4009
4014
  };
4010
4015
  }
4011
4016
  static async fromFile(params) {
@@ -4025,15 +4030,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
4025
4030
  };
4026
4031
 
4027
4032
  // src/subagents/subagents-processor.ts
4028
- import { basename as basename14, join as join43 } from "path";
4033
+ import { basename as basename14, join as join44 } from "path";
4029
4034
  import { z as z16 } from "zod/mini";
4030
4035
 
4031
4036
  // src/subagents/claudecode-subagent.ts
4032
- import { join as join42 } from "path";
4037
+ import { join as join43 } from "path";
4033
4038
  import { z as z15 } from "zod/mini";
4034
4039
 
4035
4040
  // src/subagents/rulesync-subagent.ts
4036
- import { basename as basename13, join as join41 } from "path";
4041
+ import { basename as basename13, join as join42 } from "path";
4037
4042
  import { z as z14 } from "zod/mini";
4038
4043
  var RulesyncSubagentModelSchema = z14.enum(["opus", "sonnet", "haiku", "inherit"]);
4039
4044
  var RulesyncSubagentFrontmatterSchema = z14.object({
@@ -4054,7 +4059,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4054
4059
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4055
4060
  if (!result.success) {
4056
4061
  throw new Error(
4057
- `Invalid frontmatter in ${join41(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4062
+ `Invalid frontmatter in ${join42(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4058
4063
  );
4059
4064
  }
4060
4065
  }
@@ -4066,7 +4071,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4066
4071
  }
4067
4072
  static getSettablePaths() {
4068
4073
  return {
4069
- relativeDirPath: join41(".rulesync", "subagents")
4074
+ relativeDirPath: join42(".rulesync", "subagents")
4070
4075
  };
4071
4076
  }
4072
4077
  getFrontmatter() {
@@ -4086,7 +4091,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4086
4091
  return {
4087
4092
  success: false,
4088
4093
  error: new Error(
4089
- `Invalid frontmatter in ${join41(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4094
+ `Invalid frontmatter in ${join42(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4090
4095
  )
4091
4096
  };
4092
4097
  }
@@ -4094,7 +4099,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4094
4099
  static async fromFile({
4095
4100
  relativeFilePath
4096
4101
  }) {
4097
- const fileContent = await readFileContent(join41(".rulesync", "subagents", relativeFilePath));
4102
+ const fileContent = await readFileContent(
4103
+ join42(process.cwd(), ".rulesync", "subagents", relativeFilePath)
4104
+ );
4098
4105
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4099
4106
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
4100
4107
  if (!result.success) {
@@ -4102,7 +4109,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
4102
4109
  }
4103
4110
  const filename = basename13(relativeFilePath);
4104
4111
  return new _RulesyncSubagent({
4105
- baseDir: ".",
4112
+ baseDir: process.cwd(),
4106
4113
  relativeDirPath: this.getSettablePaths().relativeDirPath,
4107
4114
  relativeFilePath: filename,
4108
4115
  frontmatter: result.data,
@@ -4126,7 +4133,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4126
4133
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
4127
4134
  if (!result.success) {
4128
4135
  throw new Error(
4129
- `Invalid frontmatter in ${join42(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4136
+ `Invalid frontmatter in ${join43(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4130
4137
  );
4131
4138
  }
4132
4139
  }
@@ -4138,7 +4145,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4138
4145
  }
4139
4146
  static getSettablePaths(_options = {}) {
4140
4147
  return {
4141
- relativeDirPath: join42(".claude", "agents")
4148
+ relativeDirPath: join43(".claude", "agents")
4142
4149
  };
4143
4150
  }
4144
4151
  getFrontmatter() {
@@ -4164,14 +4171,14 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4164
4171
  // RulesyncCommand baseDir is always the project root directory
4165
4172
  frontmatter: rulesyncFrontmatter,
4166
4173
  body: this.body,
4167
- relativeDirPath: join42(".rulesync", "subagents"),
4174
+ relativeDirPath: join43(".rulesync", "subagents"),
4168
4175
  relativeFilePath: this.getRelativeFilePath(),
4169
4176
  fileContent,
4170
4177
  validate: true
4171
4178
  });
4172
4179
  }
4173
4180
  static fromRulesyncSubagent({
4174
- baseDir = ".",
4181
+ baseDir = process.cwd(),
4175
4182
  rulesyncSubagent,
4176
4183
  validate = true,
4177
4184
  global = false
@@ -4206,7 +4213,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4206
4213
  return {
4207
4214
  success: false,
4208
4215
  error: new Error(
4209
- `Invalid frontmatter in ${join42(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4216
+ `Invalid frontmatter in ${join43(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4210
4217
  )
4211
4218
  };
4212
4219
  }
@@ -4218,13 +4225,13 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
4218
4225
  });
4219
4226
  }
4220
4227
  static async fromFile({
4221
- baseDir = ".",
4228
+ baseDir = process.cwd(),
4222
4229
  relativeFilePath,
4223
4230
  validate = true,
4224
4231
  global = false
4225
4232
  }) {
4226
4233
  const paths = this.getSettablePaths({ global });
4227
- const filePath = join42(baseDir, paths.relativeDirPath, relativeFilePath);
4234
+ const filePath = join43(baseDir, paths.relativeDirPath, relativeFilePath);
4228
4235
  const fileContent = await readFileContent(filePath);
4229
4236
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4230
4237
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -4267,7 +4274,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4267
4274
  toolTarget;
4268
4275
  global;
4269
4276
  constructor({
4270
- baseDir = ".",
4277
+ baseDir = process.cwd(),
4271
4278
  toolTarget,
4272
4279
  global = false
4273
4280
  }) {
@@ -4378,7 +4385,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4378
4385
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
4379
4386
  */
4380
4387
  async loadRulesyncFiles() {
4381
- const subagentsDir = join43(RulesyncSubagent.getSettablePaths().relativeDirPath);
4388
+ const subagentsDir = join44(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
4382
4389
  const dirExists = await directoryExists(subagentsDir);
4383
4390
  if (!dirExists) {
4384
4391
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -4393,7 +4400,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4393
4400
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
4394
4401
  const rulesyncSubagents = [];
4395
4402
  for (const mdFile of mdFiles) {
4396
- const filepath = join43(subagentsDir, mdFile);
4403
+ const filepath = join44(subagentsDir, mdFile);
4397
4404
  try {
4398
4405
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
4399
4406
  relativeFilePath: mdFile,
@@ -4512,7 +4519,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
4512
4519
  relativeDirPath,
4513
4520
  fromFile
4514
4521
  }) {
4515
- const paths = await findFilesByGlobs(join43(this.baseDir, relativeDirPath, "*.md"));
4522
+ const paths = await findFilesByGlobs(join44(this.baseDir, relativeDirPath, "*.md"));
4516
4523
  const subagents = (await Promise.allSettled(paths.map((path2) => fromFile(basename14(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
4517
4524
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
4518
4525
  return subagents;
@@ -4540,13 +4547,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
4540
4547
  };
4541
4548
 
4542
4549
  // src/rules/agentsmd-rule.ts
4543
- import { join as join46 } from "path";
4550
+ import { join as join47 } from "path";
4544
4551
 
4545
4552
  // src/rules/tool-rule.ts
4546
- import { join as join45 } from "path";
4553
+ import { join as join46 } from "path";
4547
4554
 
4548
4555
  // src/rules/rulesync-rule.ts
4549
- import { basename as basename15, join as join44 } from "path";
4556
+ import { basename as basename15, join as join45 } from "path";
4550
4557
  import { z as z17 } from "zod/mini";
4551
4558
  var RulesyncRuleFrontmatterSchema = z17.object({
4552
4559
  root: z17.optional(z17.optional(z17.boolean())),
@@ -4575,7 +4582,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4575
4582
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
4576
4583
  if (!result.success) {
4577
4584
  throw new Error(
4578
- `Invalid frontmatter in ${join44(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4585
+ `Invalid frontmatter in ${join45(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
4579
4586
  );
4580
4587
  }
4581
4588
  }
@@ -4589,7 +4596,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4589
4596
  static getSettablePaths() {
4590
4597
  return {
4591
4598
  recommended: {
4592
- relativeDirPath: join44(".rulesync", "rules")
4599
+ relativeDirPath: join45(".rulesync", "rules")
4593
4600
  },
4594
4601
  legacy: {
4595
4602
  relativeDirPath: ".rulesync"
@@ -4610,7 +4617,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4610
4617
  return {
4611
4618
  success: false,
4612
4619
  error: new Error(
4613
- `Invalid frontmatter in ${join44(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4620
+ `Invalid frontmatter in ${join45(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
4614
4621
  )
4615
4622
  };
4616
4623
  }
@@ -4619,8 +4626,12 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4619
4626
  relativeFilePath,
4620
4627
  validate = true
4621
4628
  }) {
4622
- const legacyPath = join44(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
4623
- const recommendedPath = join44(
4629
+ const legacyPath = join45(
4630
+ process.cwd(),
4631
+ this.getSettablePaths().legacy.relativeDirPath,
4632
+ relativeFilePath
4633
+ );
4634
+ const recommendedPath = join45(
4624
4635
  this.getSettablePaths().recommended.relativeDirPath,
4625
4636
  relativeFilePath
4626
4637
  );
@@ -4641,7 +4652,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4641
4652
  };
4642
4653
  const filename = basename15(legacyPath);
4643
4654
  return new _RulesyncRule({
4644
- baseDir: ".",
4655
+ baseDir: process.cwd(),
4645
4656
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
4646
4657
  relativeFilePath: filename,
4647
4658
  frontmatter: validatedFrontmatter,
@@ -4653,7 +4664,11 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4653
4664
  relativeFilePath,
4654
4665
  validate = true
4655
4666
  }) {
4656
- const filePath = join44(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
4667
+ const filePath = join45(
4668
+ process.cwd(),
4669
+ this.getSettablePaths().recommended.relativeDirPath,
4670
+ relativeFilePath
4671
+ );
4657
4672
  const fileContent = await readFileContent(filePath);
4658
4673
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
4659
4674
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -4670,7 +4685,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
4670
4685
  };
4671
4686
  const filename = basename15(filePath);
4672
4687
  return new _RulesyncRule({
4673
- baseDir: ".",
4688
+ baseDir: process.cwd(),
4674
4689
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
4675
4690
  relativeFilePath: filename,
4676
4691
  frontmatter: validatedFrontmatter,
@@ -4704,7 +4719,7 @@ var ToolRule = class extends ToolFile {
4704
4719
  throw new Error("Please implement this method in the subclass.");
4705
4720
  }
4706
4721
  static buildToolRuleParamsDefault({
4707
- baseDir = ".",
4722
+ baseDir = process.cwd(),
4708
4723
  rulesyncRule,
4709
4724
  validate = true,
4710
4725
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
@@ -4739,11 +4754,11 @@ var ToolRule = class extends ToolFile {
4739
4754
  };
4740
4755
  }
4741
4756
  static buildToolRuleParamsAgentsmd({
4742
- baseDir = ".",
4757
+ baseDir = process.cwd(),
4743
4758
  rulesyncRule,
4744
4759
  validate = true,
4745
4760
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
4746
- nonRootPath = { relativeDirPath: join45(".agents", "memories") }
4761
+ nonRootPath = { relativeDirPath: join46(".agents", "memories") }
4747
4762
  }) {
4748
4763
  const params = this.buildToolRuleParamsDefault({
4749
4764
  baseDir,
@@ -4754,7 +4769,7 @@ var ToolRule = class extends ToolFile {
4754
4769
  });
4755
4770
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
4756
4771
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
4757
- params.relativeDirPath = join45(rulesyncFrontmatter.agentsmd.subprojectPath);
4772
+ params.relativeDirPath = join46(rulesyncFrontmatter.agentsmd.subprojectPath);
4758
4773
  params.relativeFilePath = "AGENTS.md";
4759
4774
  }
4760
4775
  return params;
@@ -4763,7 +4778,7 @@ var ToolRule = class extends ToolFile {
4763
4778
  return new RulesyncRule({
4764
4779
  baseDir: ".",
4765
4780
  // RulesyncRule baseDir is always the project root directory
4766
- relativeDirPath: join45(".rulesync", "rules"),
4781
+ relativeDirPath: join46(".rulesync", "rules"),
4767
4782
  relativeFilePath: this.getRelativeFilePath(),
4768
4783
  frontmatter: {
4769
4784
  root: this.isRoot(),
@@ -4820,18 +4835,18 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4820
4835
  relativeFilePath: "AGENTS.md"
4821
4836
  },
4822
4837
  nonRoot: {
4823
- relativeDirPath: join46(".agents", "memories")
4838
+ relativeDirPath: join47(".agents", "memories")
4824
4839
  }
4825
4840
  };
4826
4841
  }
4827
4842
  static async fromFile({
4828
- baseDir = ".",
4843
+ baseDir = process.cwd(),
4829
4844
  relativeFilePath,
4830
4845
  validate = true
4831
4846
  }) {
4832
4847
  const isRoot = relativeFilePath === "AGENTS.md";
4833
- const relativePath = isRoot ? "AGENTS.md" : join46(".agents", "memories", relativeFilePath);
4834
- const fileContent = await readFileContent(join46(baseDir, relativePath));
4848
+ const relativePath = isRoot ? "AGENTS.md" : join47(".agents", "memories", relativeFilePath);
4849
+ const fileContent = await readFileContent(join47(baseDir, relativePath));
4835
4850
  return new _AgentsMdRule({
4836
4851
  baseDir,
4837
4852
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4842,7 +4857,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4842
4857
  });
4843
4858
  }
4844
4859
  static fromRulesyncRule({
4845
- baseDir = ".",
4860
+ baseDir = process.cwd(),
4846
4861
  rulesyncRule,
4847
4862
  validate = true
4848
4863
  }) {
@@ -4871,22 +4886,22 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
4871
4886
  };
4872
4887
 
4873
4888
  // src/rules/amazonqcli-rule.ts
4874
- import { join as join47 } from "path";
4889
+ import { join as join48 } from "path";
4875
4890
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4876
4891
  static getSettablePaths() {
4877
4892
  return {
4878
4893
  nonRoot: {
4879
- relativeDirPath: join47(".amazonq", "rules")
4894
+ relativeDirPath: join48(".amazonq", "rules")
4880
4895
  }
4881
4896
  };
4882
4897
  }
4883
4898
  static async fromFile({
4884
- baseDir = ".",
4899
+ baseDir = process.cwd(),
4885
4900
  relativeFilePath,
4886
4901
  validate = true
4887
4902
  }) {
4888
4903
  const fileContent = await readFileContent(
4889
- join47(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4904
+ join48(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4890
4905
  );
4891
4906
  return new _AmazonQCliRule({
4892
4907
  baseDir,
@@ -4898,7 +4913,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4898
4913
  });
4899
4914
  }
4900
4915
  static fromRulesyncRule({
4901
- baseDir = ".",
4916
+ baseDir = process.cwd(),
4902
4917
  rulesyncRule,
4903
4918
  validate = true
4904
4919
  }) {
@@ -4926,7 +4941,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
4926
4941
  };
4927
4942
 
4928
4943
  // src/rules/augmentcode-legacy-rule.ts
4929
- import { join as join48 } from "path";
4944
+ import { join as join49 } from "path";
4930
4945
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4931
4946
  toRulesyncRule() {
4932
4947
  const rulesyncFrontmatter = {
@@ -4940,7 +4955,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4940
4955
  // RulesyncRule baseDir is always the project root directory
4941
4956
  frontmatter: rulesyncFrontmatter,
4942
4957
  body: this.getFileContent(),
4943
- relativeDirPath: join48(".rulesync", "rules"),
4958
+ relativeDirPath: join49(".rulesync", "rules"),
4944
4959
  relativeFilePath: this.getRelativeFilePath(),
4945
4960
  validate: true
4946
4961
  });
@@ -4952,12 +4967,12 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4952
4967
  relativeFilePath: ".augment-guidelines"
4953
4968
  },
4954
4969
  nonRoot: {
4955
- relativeDirPath: join48(".augment", "rules")
4970
+ relativeDirPath: join49(".augment", "rules")
4956
4971
  }
4957
4972
  };
4958
4973
  }
4959
4974
  static fromRulesyncRule({
4960
- baseDir = ".",
4975
+ baseDir = process.cwd(),
4961
4976
  rulesyncRule,
4962
4977
  validate = true
4963
4978
  }) {
@@ -4981,14 +4996,14 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
4981
4996
  });
4982
4997
  }
4983
4998
  static async fromFile({
4984
- baseDir = ".",
4999
+ baseDir = process.cwd(),
4985
5000
  relativeFilePath,
4986
5001
  validate = true
4987
5002
  }) {
4988
5003
  const settablePaths = this.getSettablePaths();
4989
5004
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
4990
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join48(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4991
- const fileContent = await readFileContent(join48(baseDir, relativePath));
5005
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join49(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
5006
+ const fileContent = await readFileContent(join49(baseDir, relativePath));
4992
5007
  return new _AugmentcodeLegacyRule({
4993
5008
  baseDir,
4994
5009
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -5001,7 +5016,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
5001
5016
  };
5002
5017
 
5003
5018
  // src/rules/augmentcode-rule.ts
5004
- import { join as join49 } from "path";
5019
+ import { join as join50 } from "path";
5005
5020
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5006
5021
  toRulesyncRule() {
5007
5022
  return this.toRulesyncRuleDefault();
@@ -5009,12 +5024,12 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5009
5024
  static getSettablePaths() {
5010
5025
  return {
5011
5026
  nonRoot: {
5012
- relativeDirPath: join49(".augment", "rules")
5027
+ relativeDirPath: join50(".augment", "rules")
5013
5028
  }
5014
5029
  };
5015
5030
  }
5016
5031
  static fromRulesyncRule({
5017
- baseDir = ".",
5032
+ baseDir = process.cwd(),
5018
5033
  rulesyncRule,
5019
5034
  validate = true
5020
5035
  }) {
@@ -5028,12 +5043,12 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5028
5043
  );
5029
5044
  }
5030
5045
  static async fromFile({
5031
- baseDir = ".",
5046
+ baseDir = process.cwd(),
5032
5047
  relativeFilePath,
5033
5048
  validate = true
5034
5049
  }) {
5035
5050
  const fileContent = await readFileContent(
5036
- join49(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5051
+ join50(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5037
5052
  );
5038
5053
  const { body: content } = parseFrontmatter(fileContent);
5039
5054
  return new _AugmentcodeRule({
@@ -5056,7 +5071,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
5056
5071
  };
5057
5072
 
5058
5073
  // src/rules/claudecode-rule.ts
5059
- import { join as join50 } from "path";
5074
+ import { join as join51 } from "path";
5060
5075
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5061
5076
  static getSettablePaths({
5062
5077
  global
@@ -5075,12 +5090,12 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5075
5090
  relativeFilePath: "CLAUDE.md"
5076
5091
  },
5077
5092
  nonRoot: {
5078
- relativeDirPath: join50(".claude", "memories")
5093
+ relativeDirPath: join51(".claude", "memories")
5079
5094
  }
5080
5095
  };
5081
5096
  }
5082
5097
  static async fromFile({
5083
- baseDir = ".",
5098
+ baseDir = process.cwd(),
5084
5099
  relativeFilePath,
5085
5100
  validate = true,
5086
5101
  global = false
@@ -5090,7 +5105,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5090
5105
  if (isRoot) {
5091
5106
  const relativePath2 = paths.root.relativeFilePath;
5092
5107
  const fileContent2 = await readFileContent(
5093
- join50(baseDir, paths.root.relativeDirPath, relativePath2)
5108
+ join51(baseDir, paths.root.relativeDirPath, relativePath2)
5094
5109
  );
5095
5110
  return new _ClaudecodeRule({
5096
5111
  baseDir,
@@ -5104,8 +5119,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5104
5119
  if (!paths.nonRoot) {
5105
5120
  throw new Error("nonRoot path is not set");
5106
5121
  }
5107
- const relativePath = join50(paths.nonRoot.relativeDirPath, relativeFilePath);
5108
- const fileContent = await readFileContent(join50(baseDir, relativePath));
5122
+ const relativePath = join51(paths.nonRoot.relativeDirPath, relativeFilePath);
5123
+ const fileContent = await readFileContent(join51(baseDir, relativePath));
5109
5124
  return new _ClaudecodeRule({
5110
5125
  baseDir,
5111
5126
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5116,7 +5131,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5116
5131
  });
5117
5132
  }
5118
5133
  static fromRulesyncRule({
5119
- baseDir = ".",
5134
+ baseDir = process.cwd(),
5120
5135
  rulesyncRule,
5121
5136
  validate = true,
5122
5137
  global = false
@@ -5147,7 +5162,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
5147
5162
  };
5148
5163
 
5149
5164
  // src/rules/cline-rule.ts
5150
- import { join as join51 } from "path";
5165
+ import { join as join52 } from "path";
5151
5166
  import { z as z18 } from "zod/mini";
5152
5167
  var ClineRuleFrontmatterSchema = z18.object({
5153
5168
  description: z18.string()
@@ -5164,7 +5179,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5164
5179
  return this.toRulesyncRuleDefault();
5165
5180
  }
5166
5181
  static fromRulesyncRule({
5167
- baseDir = ".",
5182
+ baseDir = process.cwd(),
5168
5183
  rulesyncRule,
5169
5184
  validate = true
5170
5185
  }) {
@@ -5187,12 +5202,12 @@ var ClineRule = class _ClineRule extends ToolRule {
5187
5202
  });
5188
5203
  }
5189
5204
  static async fromFile({
5190
- baseDir = ".",
5205
+ baseDir = process.cwd(),
5191
5206
  relativeFilePath,
5192
5207
  validate = true
5193
5208
  }) {
5194
5209
  const fileContent = await readFileContent(
5195
- join51(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5210
+ join52(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5196
5211
  );
5197
5212
  return new _ClineRule({
5198
5213
  baseDir,
@@ -5205,7 +5220,7 @@ var ClineRule = class _ClineRule extends ToolRule {
5205
5220
  };
5206
5221
 
5207
5222
  // src/rules/codexcli-rule.ts
5208
- import { join as join52 } from "path";
5223
+ import { join as join53 } from "path";
5209
5224
  var CodexcliRule = class _CodexcliRule extends ToolRule {
5210
5225
  static getSettablePaths({
5211
5226
  global
@@ -5224,12 +5239,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5224
5239
  relativeFilePath: "AGENTS.md"
5225
5240
  },
5226
5241
  nonRoot: {
5227
- relativeDirPath: join52(".codex", "memories")
5242
+ relativeDirPath: join53(".codex", "memories")
5228
5243
  }
5229
5244
  };
5230
5245
  }
5231
5246
  static async fromFile({
5232
- baseDir = ".",
5247
+ baseDir = process.cwd(),
5233
5248
  relativeFilePath,
5234
5249
  validate = true,
5235
5250
  global = false
@@ -5239,7 +5254,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5239
5254
  if (isRoot) {
5240
5255
  const relativePath2 = paths.root.relativeFilePath;
5241
5256
  const fileContent2 = await readFileContent(
5242
- join52(baseDir, paths.root.relativeDirPath, relativePath2)
5257
+ join53(baseDir, paths.root.relativeDirPath, relativePath2)
5243
5258
  );
5244
5259
  return new _CodexcliRule({
5245
5260
  baseDir,
@@ -5253,8 +5268,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5253
5268
  if (!paths.nonRoot) {
5254
5269
  throw new Error("nonRoot path is not set");
5255
5270
  }
5256
- const relativePath = join52(paths.nonRoot.relativeDirPath, relativeFilePath);
5257
- const fileContent = await readFileContent(join52(baseDir, relativePath));
5271
+ const relativePath = join53(paths.nonRoot.relativeDirPath, relativeFilePath);
5272
+ const fileContent = await readFileContent(join53(baseDir, relativePath));
5258
5273
  return new _CodexcliRule({
5259
5274
  baseDir,
5260
5275
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5265,7 +5280,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5265
5280
  });
5266
5281
  }
5267
5282
  static fromRulesyncRule({
5268
- baseDir = ".",
5283
+ baseDir = process.cwd(),
5269
5284
  rulesyncRule,
5270
5285
  validate = true,
5271
5286
  global = false
@@ -5296,7 +5311,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
5296
5311
  };
5297
5312
 
5298
5313
  // src/rules/copilot-rule.ts
5299
- import { join as join53 } from "path";
5314
+ import { join as join54 } from "path";
5300
5315
  import { z as z19 } from "zod/mini";
5301
5316
  var CopilotRuleFrontmatterSchema = z19.object({
5302
5317
  description: z19.optional(z19.string()),
@@ -5312,7 +5327,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5312
5327
  relativeFilePath: "copilot-instructions.md"
5313
5328
  },
5314
5329
  nonRoot: {
5315
- relativeDirPath: join53(".github", "instructions")
5330
+ relativeDirPath: join54(".github", "instructions")
5316
5331
  }
5317
5332
  };
5318
5333
  }
@@ -5321,7 +5336,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5321
5336
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5322
5337
  if (!result.success) {
5323
5338
  throw new Error(
5324
- `Invalid frontmatter in ${join53(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5339
+ `Invalid frontmatter in ${join54(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5325
5340
  );
5326
5341
  }
5327
5342
  }
@@ -5352,13 +5367,13 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5352
5367
  baseDir: this.getBaseDir(),
5353
5368
  frontmatter: rulesyncFrontmatter,
5354
5369
  body: this.body,
5355
- relativeDirPath: join53(".rulesync", "rules"),
5370
+ relativeDirPath: join54(".rulesync", "rules"),
5356
5371
  relativeFilePath,
5357
5372
  validate: true
5358
5373
  });
5359
5374
  }
5360
5375
  static fromRulesyncRule({
5361
- baseDir = ".",
5376
+ baseDir = process.cwd(),
5362
5377
  rulesyncRule,
5363
5378
  validate = true
5364
5379
  }) {
@@ -5394,16 +5409,16 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5394
5409
  });
5395
5410
  }
5396
5411
  static async fromFile({
5397
- baseDir = ".",
5412
+ baseDir = process.cwd(),
5398
5413
  relativeFilePath,
5399
5414
  validate = true
5400
5415
  }) {
5401
5416
  const isRoot = relativeFilePath === "copilot-instructions.md";
5402
- const relativePath = isRoot ? join53(
5417
+ const relativePath = isRoot ? join54(
5403
5418
  this.getSettablePaths().root.relativeDirPath,
5404
5419
  this.getSettablePaths().root.relativeFilePath
5405
- ) : join53(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5406
- const fileContent = await readFileContent(join53(baseDir, relativePath));
5420
+ ) : join54(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
5421
+ const fileContent = await readFileContent(join54(baseDir, relativePath));
5407
5422
  if (isRoot) {
5408
5423
  return new _CopilotRule({
5409
5424
  baseDir,
@@ -5422,7 +5437,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5422
5437
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
5423
5438
  if (!result.success) {
5424
5439
  throw new Error(
5425
- `Invalid frontmatter in ${join53(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5440
+ `Invalid frontmatter in ${join54(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5426
5441
  );
5427
5442
  }
5428
5443
  return new _CopilotRule({
@@ -5446,7 +5461,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5446
5461
  return {
5447
5462
  success: false,
5448
5463
  error: new Error(
5449
- `Invalid frontmatter in ${join53(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5464
+ `Invalid frontmatter in ${join54(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5450
5465
  )
5451
5466
  };
5452
5467
  }
@@ -5466,7 +5481,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
5466
5481
  };
5467
5482
 
5468
5483
  // src/rules/cursor-rule.ts
5469
- import { basename as basename16, join as join54 } from "path";
5484
+ import { basename as basename16, join as join55 } from "path";
5470
5485
  import { z as z20 } from "zod/mini";
5471
5486
  var CursorRuleFrontmatterSchema = z20.object({
5472
5487
  description: z20.optional(z20.string()),
@@ -5479,7 +5494,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5479
5494
  static getSettablePaths() {
5480
5495
  return {
5481
5496
  nonRoot: {
5482
- relativeDirPath: join54(".cursor", "rules")
5497
+ relativeDirPath: join55(".cursor", "rules")
5483
5498
  }
5484
5499
  };
5485
5500
  }
@@ -5488,7 +5503,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5488
5503
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5489
5504
  if (!result.success) {
5490
5505
  throw new Error(
5491
- `Invalid frontmatter in ${join54(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5506
+ `Invalid frontmatter in ${join55(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
5492
5507
  );
5493
5508
  }
5494
5509
  }
@@ -5560,7 +5575,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5560
5575
  return new RulesyncRule({
5561
5576
  frontmatter: rulesyncFrontmatter,
5562
5577
  body: this.body,
5563
- relativeDirPath: join54(".rulesync", "rules"),
5578
+ relativeDirPath: join55(".rulesync", "rules"),
5564
5579
  relativeFilePath: this.relativeFilePath.replace(/\.mdc$/, ".md"),
5565
5580
  validate: true
5566
5581
  });
@@ -5576,7 +5591,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5576
5591
  return targetGlobs && targetGlobs.length > 0 ? targetGlobs.join(",") : void 0;
5577
5592
  }
5578
5593
  static fromRulesyncRule({
5579
- baseDir = ".",
5594
+ baseDir = process.cwd(),
5580
5595
  rulesyncRule,
5581
5596
  validate = true
5582
5597
  }) {
@@ -5600,18 +5615,18 @@ var CursorRule = class _CursorRule extends ToolRule {
5600
5615
  });
5601
5616
  }
5602
5617
  static async fromFile({
5603
- baseDir = ".",
5618
+ baseDir = process.cwd(),
5604
5619
  relativeFilePath,
5605
5620
  validate = true
5606
5621
  }) {
5607
5622
  const fileContent = await readFileContent(
5608
- join54(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5623
+ join55(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5609
5624
  );
5610
5625
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
5611
5626
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
5612
5627
  if (!result.success) {
5613
5628
  throw new Error(
5614
- `Invalid frontmatter in ${join54(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5629
+ `Invalid frontmatter in ${join55(baseDir, relativeFilePath)}: ${formatError(result.error)}`
5615
5630
  );
5616
5631
  }
5617
5632
  return new _CursorRule({
@@ -5634,7 +5649,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5634
5649
  return {
5635
5650
  success: false,
5636
5651
  error: new Error(
5637
- `Invalid frontmatter in ${join54(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5652
+ `Invalid frontmatter in ${join55(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
5638
5653
  )
5639
5654
  };
5640
5655
  }
@@ -5654,7 +5669,7 @@ var CursorRule = class _CursorRule extends ToolRule {
5654
5669
  };
5655
5670
 
5656
5671
  // src/rules/geminicli-rule.ts
5657
- import { join as join55 } from "path";
5672
+ import { join as join56 } from "path";
5658
5673
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5659
5674
  static getSettablePaths({
5660
5675
  global
@@ -5673,12 +5688,12 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5673
5688
  relativeFilePath: "GEMINI.md"
5674
5689
  },
5675
5690
  nonRoot: {
5676
- relativeDirPath: join55(".gemini", "memories")
5691
+ relativeDirPath: join56(".gemini", "memories")
5677
5692
  }
5678
5693
  };
5679
5694
  }
5680
5695
  static async fromFile({
5681
- baseDir = ".",
5696
+ baseDir = process.cwd(),
5682
5697
  relativeFilePath,
5683
5698
  validate = true,
5684
5699
  global = false
@@ -5688,7 +5703,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5688
5703
  if (isRoot) {
5689
5704
  const relativePath2 = paths.root.relativeFilePath;
5690
5705
  const fileContent2 = await readFileContent(
5691
- join55(baseDir, paths.root.relativeDirPath, relativePath2)
5706
+ join56(baseDir, paths.root.relativeDirPath, relativePath2)
5692
5707
  );
5693
5708
  return new _GeminiCliRule({
5694
5709
  baseDir,
@@ -5702,8 +5717,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5702
5717
  if (!paths.nonRoot) {
5703
5718
  throw new Error("nonRoot path is not set");
5704
5719
  }
5705
- const relativePath = join55(paths.nonRoot.relativeDirPath, relativeFilePath);
5706
- const fileContent = await readFileContent(join55(baseDir, relativePath));
5720
+ const relativePath = join56(paths.nonRoot.relativeDirPath, relativeFilePath);
5721
+ const fileContent = await readFileContent(join56(baseDir, relativePath));
5707
5722
  return new _GeminiCliRule({
5708
5723
  baseDir,
5709
5724
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -5714,7 +5729,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5714
5729
  });
5715
5730
  }
5716
5731
  static fromRulesyncRule({
5717
- baseDir = ".",
5732
+ baseDir = process.cwd(),
5718
5733
  rulesyncRule,
5719
5734
  validate = true,
5720
5735
  global = false
@@ -5745,7 +5760,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
5745
5760
  };
5746
5761
 
5747
5762
  // src/rules/junie-rule.ts
5748
- import { join as join56 } from "path";
5763
+ import { join as join57 } from "path";
5749
5764
  var JunieRule = class _JunieRule extends ToolRule {
5750
5765
  static getSettablePaths() {
5751
5766
  return {
@@ -5754,18 +5769,18 @@ var JunieRule = class _JunieRule extends ToolRule {
5754
5769
  relativeFilePath: "guidelines.md"
5755
5770
  },
5756
5771
  nonRoot: {
5757
- relativeDirPath: join56(".junie", "memories")
5772
+ relativeDirPath: join57(".junie", "memories")
5758
5773
  }
5759
5774
  };
5760
5775
  }
5761
5776
  static async fromFile({
5762
- baseDir = ".",
5777
+ baseDir = process.cwd(),
5763
5778
  relativeFilePath,
5764
5779
  validate = true
5765
5780
  }) {
5766
5781
  const isRoot = relativeFilePath === "guidelines.md";
5767
- const relativePath = isRoot ? "guidelines.md" : join56(".junie", "memories", relativeFilePath);
5768
- const fileContent = await readFileContent(join56(baseDir, relativePath));
5782
+ const relativePath = isRoot ? "guidelines.md" : join57(".junie", "memories", relativeFilePath);
5783
+ const fileContent = await readFileContent(join57(baseDir, relativePath));
5769
5784
  return new _JunieRule({
5770
5785
  baseDir,
5771
5786
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5776,7 +5791,7 @@ var JunieRule = class _JunieRule extends ToolRule {
5776
5791
  });
5777
5792
  }
5778
5793
  static fromRulesyncRule({
5779
- baseDir = ".",
5794
+ baseDir = process.cwd(),
5780
5795
  rulesyncRule,
5781
5796
  validate = true
5782
5797
  }) {
@@ -5805,22 +5820,22 @@ var JunieRule = class _JunieRule extends ToolRule {
5805
5820
  };
5806
5821
 
5807
5822
  // src/rules/kiro-rule.ts
5808
- import { join as join57 } from "path";
5823
+ import { join as join58 } from "path";
5809
5824
  var KiroRule = class _KiroRule extends ToolRule {
5810
5825
  static getSettablePaths() {
5811
5826
  return {
5812
5827
  nonRoot: {
5813
- relativeDirPath: join57(".kiro", "steering")
5828
+ relativeDirPath: join58(".kiro", "steering")
5814
5829
  }
5815
5830
  };
5816
5831
  }
5817
5832
  static async fromFile({
5818
- baseDir = ".",
5833
+ baseDir = process.cwd(),
5819
5834
  relativeFilePath,
5820
5835
  validate = true
5821
5836
  }) {
5822
5837
  const fileContent = await readFileContent(
5823
- join57(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5838
+ join58(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5824
5839
  );
5825
5840
  return new _KiroRule({
5826
5841
  baseDir,
@@ -5832,7 +5847,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5832
5847
  });
5833
5848
  }
5834
5849
  static fromRulesyncRule({
5835
- baseDir = ".",
5850
+ baseDir = process.cwd(),
5836
5851
  rulesyncRule,
5837
5852
  validate = true
5838
5853
  }) {
@@ -5860,7 +5875,7 @@ var KiroRule = class _KiroRule extends ToolRule {
5860
5875
  };
5861
5876
 
5862
5877
  // src/rules/opencode-rule.ts
5863
- import { join as join58 } from "path";
5878
+ import { join as join59 } from "path";
5864
5879
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5865
5880
  static getSettablePaths() {
5866
5881
  return {
@@ -5869,18 +5884,18 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5869
5884
  relativeFilePath: "AGENTS.md"
5870
5885
  },
5871
5886
  nonRoot: {
5872
- relativeDirPath: join58(".opencode", "memories")
5887
+ relativeDirPath: join59(".opencode", "memories")
5873
5888
  }
5874
5889
  };
5875
5890
  }
5876
5891
  static async fromFile({
5877
- baseDir = ".",
5892
+ baseDir = process.cwd(),
5878
5893
  relativeFilePath,
5879
5894
  validate = true
5880
5895
  }) {
5881
5896
  const isRoot = relativeFilePath === "AGENTS.md";
5882
- const relativePath = isRoot ? "AGENTS.md" : join58(".opencode", "memories", relativeFilePath);
5883
- const fileContent = await readFileContent(join58(baseDir, relativePath));
5897
+ const relativePath = isRoot ? "AGENTS.md" : join59(".opencode", "memories", relativeFilePath);
5898
+ const fileContent = await readFileContent(join59(baseDir, relativePath));
5884
5899
  return new _OpenCodeRule({
5885
5900
  baseDir,
5886
5901
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5891,7 +5906,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5891
5906
  });
5892
5907
  }
5893
5908
  static fromRulesyncRule({
5894
- baseDir = ".",
5909
+ baseDir = process.cwd(),
5895
5910
  rulesyncRule,
5896
5911
  validate = true
5897
5912
  }) {
@@ -5920,7 +5935,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
5920
5935
  };
5921
5936
 
5922
5937
  // src/rules/qwencode-rule.ts
5923
- import { join as join59 } from "path";
5938
+ import { join as join60 } from "path";
5924
5939
  var QwencodeRule = class _QwencodeRule extends ToolRule {
5925
5940
  static getSettablePaths() {
5926
5941
  return {
@@ -5929,18 +5944,18 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5929
5944
  relativeFilePath: "QWEN.md"
5930
5945
  },
5931
5946
  nonRoot: {
5932
- relativeDirPath: join59(".qwen", "memories")
5947
+ relativeDirPath: join60(".qwen", "memories")
5933
5948
  }
5934
5949
  };
5935
5950
  }
5936
5951
  static async fromFile({
5937
- baseDir = ".",
5952
+ baseDir = process.cwd(),
5938
5953
  relativeFilePath,
5939
5954
  validate = true
5940
5955
  }) {
5941
5956
  const isRoot = relativeFilePath === "QWEN.md";
5942
- const relativePath = isRoot ? "QWEN.md" : join59(".qwen", "memories", relativeFilePath);
5943
- const fileContent = await readFileContent(join59(baseDir, relativePath));
5957
+ const relativePath = isRoot ? "QWEN.md" : join60(".qwen", "memories", relativeFilePath);
5958
+ const fileContent = await readFileContent(join60(baseDir, relativePath));
5944
5959
  return new _QwencodeRule({
5945
5960
  baseDir,
5946
5961
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -5951,7 +5966,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5951
5966
  });
5952
5967
  }
5953
5968
  static fromRulesyncRule(params) {
5954
- const { baseDir = ".", rulesyncRule, validate = true } = params;
5969
+ const { baseDir = process.cwd(), rulesyncRule, validate = true } = params;
5955
5970
  return new _QwencodeRule(
5956
5971
  this.buildToolRuleParamsDefault({
5957
5972
  baseDir,
@@ -5977,22 +5992,22 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
5977
5992
  };
5978
5993
 
5979
5994
  // src/rules/roo-rule.ts
5980
- import { join as join60 } from "path";
5995
+ import { join as join61 } from "path";
5981
5996
  var RooRule = class _RooRule extends ToolRule {
5982
5997
  static getSettablePaths() {
5983
5998
  return {
5984
5999
  nonRoot: {
5985
- relativeDirPath: join60(".roo", "rules")
6000
+ relativeDirPath: join61(".roo", "rules")
5986
6001
  }
5987
6002
  };
5988
6003
  }
5989
6004
  static async fromFile({
5990
- baseDir = ".",
6005
+ baseDir = process.cwd(),
5991
6006
  relativeFilePath,
5992
6007
  validate = true
5993
6008
  }) {
5994
6009
  const fileContent = await readFileContent(
5995
- join60(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6010
+ join61(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5996
6011
  );
5997
6012
  return new _RooRule({
5998
6013
  baseDir,
@@ -6004,7 +6019,7 @@ var RooRule = class _RooRule extends ToolRule {
6004
6019
  });
6005
6020
  }
6006
6021
  static fromRulesyncRule({
6007
- baseDir = ".",
6022
+ baseDir = process.cwd(),
6008
6023
  rulesyncRule,
6009
6024
  validate = true
6010
6025
  }) {
@@ -6047,7 +6062,7 @@ var RooRule = class _RooRule extends ToolRule {
6047
6062
  };
6048
6063
 
6049
6064
  // src/rules/warp-rule.ts
6050
- import { join as join61 } from "path";
6065
+ import { join as join62 } from "path";
6051
6066
  var WarpRule = class _WarpRule extends ToolRule {
6052
6067
  constructor({ fileContent, root, ...rest }) {
6053
6068
  super({
@@ -6063,18 +6078,18 @@ var WarpRule = class _WarpRule extends ToolRule {
6063
6078
  relativeFilePath: "WARP.md"
6064
6079
  },
6065
6080
  nonRoot: {
6066
- relativeDirPath: join61(".warp", "memories")
6081
+ relativeDirPath: join62(".warp", "memories")
6067
6082
  }
6068
6083
  };
6069
6084
  }
6070
6085
  static async fromFile({
6071
- baseDir = ".",
6086
+ baseDir = process.cwd(),
6072
6087
  relativeFilePath,
6073
6088
  validate = true
6074
6089
  }) {
6075
6090
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
6076
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join61(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6077
- const fileContent = await readFileContent(join61(baseDir, relativePath));
6091
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join62(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
6092
+ const fileContent = await readFileContent(join62(baseDir, relativePath));
6078
6093
  return new _WarpRule({
6079
6094
  baseDir,
6080
6095
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -6085,7 +6100,7 @@ var WarpRule = class _WarpRule extends ToolRule {
6085
6100
  });
6086
6101
  }
6087
6102
  static fromRulesyncRule({
6088
- baseDir = ".",
6103
+ baseDir = process.cwd(),
6089
6104
  rulesyncRule,
6090
6105
  validate = true
6091
6106
  }) {
@@ -6114,22 +6129,22 @@ var WarpRule = class _WarpRule extends ToolRule {
6114
6129
  };
6115
6130
 
6116
6131
  // src/rules/windsurf-rule.ts
6117
- import { join as join62 } from "path";
6132
+ import { join as join63 } from "path";
6118
6133
  var WindsurfRule = class _WindsurfRule extends ToolRule {
6119
6134
  static getSettablePaths() {
6120
6135
  return {
6121
6136
  nonRoot: {
6122
- relativeDirPath: join62(".windsurf", "rules")
6137
+ relativeDirPath: join63(".windsurf", "rules")
6123
6138
  }
6124
6139
  };
6125
6140
  }
6126
6141
  static async fromFile({
6127
- baseDir = ".",
6142
+ baseDir = process.cwd(),
6128
6143
  relativeFilePath,
6129
6144
  validate = true
6130
6145
  }) {
6131
6146
  const fileContent = await readFileContent(
6132
- join62(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6147
+ join63(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
6133
6148
  );
6134
6149
  return new _WindsurfRule({
6135
6150
  baseDir,
@@ -6140,7 +6155,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
6140
6155
  });
6141
6156
  }
6142
6157
  static fromRulesyncRule({
6143
- baseDir = ".",
6158
+ baseDir = process.cwd(),
6144
6159
  rulesyncRule,
6145
6160
  validate = true
6146
6161
  }) {
@@ -6199,7 +6214,7 @@ var RulesProcessor = class extends FeatureProcessor {
6199
6214
  simulateSubagents;
6200
6215
  global;
6201
6216
  constructor({
6202
- baseDir = ".",
6217
+ baseDir = process.cwd(),
6203
6218
  toolTarget,
6204
6219
  simulateCommands = false,
6205
6220
  simulateSubagents = false,
@@ -6529,7 +6544,7 @@ var RulesProcessor = class extends FeatureProcessor {
6529
6544
  * Load and parse rulesync rule files from .rulesync/rules/ directory
6530
6545
  */
6531
6546
  async loadRulesyncFiles() {
6532
- const files = await findFilesByGlobs(join63(".rulesync", "rules", "*.md"));
6547
+ const files = await findFilesByGlobs(join64(".rulesync", "rules", "*.md"));
6533
6548
  logger.debug(`Found ${files.length} rulesync files`);
6534
6549
  const rulesyncRules = await Promise.all(
6535
6550
  files.map((file) => RulesyncRule.fromFile({ relativeFilePath: basename17(file) }))
@@ -6550,7 +6565,7 @@ var RulesProcessor = class extends FeatureProcessor {
6550
6565
  return rulesyncRules;
6551
6566
  }
6552
6567
  async loadRulesyncFilesLegacy() {
6553
- const legacyFiles = await findFilesByGlobs(join63(".rulesync", "*.md"));
6568
+ const legacyFiles = await findFilesByGlobs(join64(".rulesync", "*.md"));
6554
6569
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
6555
6570
  return Promise.all(
6556
6571
  legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: basename17(file) }))
@@ -6617,7 +6632,7 @@ var RulesProcessor = class extends FeatureProcessor {
6617
6632
  return [];
6618
6633
  }
6619
6634
  const rootFilePaths = await findFilesByGlobs(
6620
- join63(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6635
+ join64(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
6621
6636
  );
6622
6637
  return await Promise.all(
6623
6638
  rootFilePaths.map(
@@ -6635,7 +6650,7 @@ var RulesProcessor = class extends FeatureProcessor {
6635
6650
  return [];
6636
6651
  }
6637
6652
  const nonRootFilePaths = await findFilesByGlobs(
6638
- join63(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6653
+ join64(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
6639
6654
  );
6640
6655
  return await Promise.all(
6641
6656
  nonRootFilePaths.map(
@@ -7011,14 +7026,14 @@ s/<command> [arguments]
7011
7026
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
7012
7027
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
7013
7028
 
7014
- When users call a custom slash command, you have to look for the markdown file, \`${join63(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7029
+ When users call a custom slash command, you have to look for the markdown file, \`${join64(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
7015
7030
  const subagentsSection = subagents ? `## Simulated Subagents
7016
7031
 
7017
7032
  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.
7018
7033
 
7019
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join63(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7034
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join64(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
7020
7035
 
7021
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join63(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7036
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join64(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.` : "";
7022
7037
  const result = [
7023
7038
  overview,
7024
7039
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -7232,9 +7247,9 @@ async function generateSubagents(config) {
7232
7247
  }
7233
7248
 
7234
7249
  // src/cli/commands/gitignore.ts
7235
- import { join as join64 } from "path";
7250
+ import { join as join65 } from "path";
7236
7251
  var gitignoreCommand = async () => {
7237
- const gitignorePath = join64(process.cwd(), ".gitignore");
7252
+ const gitignorePath = join65(process.cwd(), ".gitignore");
7238
7253
  const rulesFilesToIgnore = [
7239
7254
  "# Generated by rulesync - AI tool configuration files",
7240
7255
  // AGENTS.md
@@ -7475,7 +7490,7 @@ async function importSubagents(config, tool) {
7475
7490
  }
7476
7491
 
7477
7492
  // src/cli/commands/init.ts
7478
- import { join as join65 } from "path";
7493
+ import { join as join66 } from "path";
7479
7494
  async function initCommand() {
7480
7495
  logger.info("Initializing rulesync...");
7481
7496
  await ensureDir(".rulesync");
@@ -7636,14 +7651,14 @@ Attention, again, you are just the planner, so though you can read any files and
7636
7651
  await ensureDir(commandPaths.relativeDirPath);
7637
7652
  await ensureDir(subagentPaths.relativeDirPath);
7638
7653
  await ensureDir(ignorePaths.relativeDirPath);
7639
- const ruleFilepath = join65(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7654
+ const ruleFilepath = join66(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
7640
7655
  if (!await fileExists(ruleFilepath)) {
7641
7656
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
7642
7657
  logger.success(`Created ${ruleFilepath}`);
7643
7658
  } else {
7644
7659
  logger.info(`Skipped ${ruleFilepath} (already exists)`);
7645
7660
  }
7646
- const mcpFilepath = join65(
7661
+ const mcpFilepath = join66(
7647
7662
  mcpPaths.recommended.relativeDirPath,
7648
7663
  mcpPaths.recommended.relativeFilePath
7649
7664
  );
@@ -7653,21 +7668,21 @@ Attention, again, you are just the planner, so though you can read any files and
7653
7668
  } else {
7654
7669
  logger.info(`Skipped ${mcpFilepath} (already exists)`);
7655
7670
  }
7656
- const commandFilepath = join65(commandPaths.relativeDirPath, sampleCommandFile.filename);
7671
+ const commandFilepath = join66(commandPaths.relativeDirPath, sampleCommandFile.filename);
7657
7672
  if (!await fileExists(commandFilepath)) {
7658
7673
  await writeFileContent(commandFilepath, sampleCommandFile.content);
7659
7674
  logger.success(`Created ${commandFilepath}`);
7660
7675
  } else {
7661
7676
  logger.info(`Skipped ${commandFilepath} (already exists)`);
7662
7677
  }
7663
- const subagentFilepath = join65(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7678
+ const subagentFilepath = join66(subagentPaths.relativeDirPath, sampleSubagentFile.filename);
7664
7679
  if (!await fileExists(subagentFilepath)) {
7665
7680
  await writeFileContent(subagentFilepath, sampleSubagentFile.content);
7666
7681
  logger.success(`Created ${subagentFilepath}`);
7667
7682
  } else {
7668
7683
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
7669
7684
  }
7670
- const ignoreFilepath = join65(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7685
+ const ignoreFilepath = join66(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
7671
7686
  if (!await fileExists(ignoreFilepath)) {
7672
7687
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
7673
7688
  logger.success(`Created ${ignoreFilepath}`);
@@ -7677,7 +7692,7 @@ Attention, again, you are just the planner, so though you can read any files and
7677
7692
  }
7678
7693
 
7679
7694
  // src/cli/index.ts
7680
- var getVersion = () => "3.13.0";
7695
+ var getVersion = () => "3.14.0";
7681
7696
  var main = async () => {
7682
7697
  const program = new Command();
7683
7698
  const version = getVersion();