rulesync 1.0.1 → 1.2.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 (4) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +342 -228
  3. package/dist/index.js +326 -212
  4. package/package.json +12 -12
package/dist/index.cjs CHANGED
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
 
26
26
  // src/cli/index.ts
27
- var import_node_path57 = require("path");
27
+ var import_node_path58 = require("path");
28
28
  var import_node_url = require("url");
29
29
  var import_commander = require("commander");
30
30
 
@@ -186,7 +186,7 @@ async function initConfig() {
186
186
  }
187
187
 
188
188
  // src/cli/commands/generate.ts
189
- var import_es_toolkit = require("es-toolkit");
189
+ var import_es_toolkit2 = require("es-toolkit");
190
190
 
191
191
  // src/commands/commands-processor.ts
192
192
  var import_node_path11 = require("path");
@@ -818,20 +818,51 @@ var CopilotCommand = class _CopilotCommand extends SimulatedCommand {
818
818
 
819
819
  // src/commands/cursor-command.ts
820
820
  var import_node_path8 = require("path");
821
- var CursorCommand = class _CursorCommand extends SimulatedCommand {
821
+ var CursorCommand = class _CursorCommand extends ToolCommand {
822
822
  static getSettablePaths() {
823
823
  return {
824
824
  relativeDirPath: ".cursor/commands"
825
825
  };
826
826
  }
827
+ toRulesyncCommand() {
828
+ const rulesyncFrontmatter = {
829
+ targets: ["*"],
830
+ description: ""
831
+ };
832
+ return new RulesyncCommand({
833
+ baseDir: this.baseDir,
834
+ frontmatter: rulesyncFrontmatter,
835
+ body: this.getFileContent(),
836
+ relativeDirPath: RulesyncCommand.getSettablePaths().relativeDirPath,
837
+ relativeFilePath: this.relativeFilePath,
838
+ fileContent: this.getFileContent(),
839
+ validate: true
840
+ });
841
+ }
827
842
  static fromRulesyncCommand({
828
843
  baseDir = ".",
829
844
  rulesyncCommand,
830
845
  validate = true
831
846
  }) {
832
- return new _CursorCommand(
833
- this.fromRulesyncCommandDefault({ baseDir, rulesyncCommand, validate })
834
- );
847
+ return new _CursorCommand({
848
+ baseDir,
849
+ fileContent: rulesyncCommand.getBody(),
850
+ relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
851
+ relativeFilePath: rulesyncCommand.getRelativeFilePath(),
852
+ validate
853
+ });
854
+ }
855
+ validate() {
856
+ return { success: true, error: null };
857
+ }
858
+ getBody() {
859
+ return this.getFileContent();
860
+ }
861
+ static isTargetedByRulesyncCommand(rulesyncCommand) {
862
+ return this.isTargetedByRulesyncCommandDefault({
863
+ rulesyncCommand,
864
+ toolTarget: "cursor"
865
+ });
835
866
  }
836
867
  static async fromFile({
837
868
  baseDir = ".",
@@ -844,26 +875,15 @@ var CursorCommand = class _CursorCommand extends SimulatedCommand {
844
875
  relativeFilePath
845
876
  );
846
877
  const fileContent = await readFileContent(filePath);
847
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
848
- const result = SimulatedCommandFrontmatterSchema.safeParse(frontmatter);
849
- if (!result.success) {
850
- throw new Error(`Invalid frontmatter in ${filePath}: ${result.error.message}`);
851
- }
878
+ const { body: content } = parseFrontmatter(fileContent);
852
879
  return new _CursorCommand({
853
880
  baseDir,
854
881
  relativeDirPath: _CursorCommand.getSettablePaths().relativeDirPath,
855
882
  relativeFilePath: (0, import_node_path8.basename)(relativeFilePath),
856
- frontmatter: result.data,
857
- body: content.trim(),
883
+ fileContent: content.trim(),
858
884
  validate
859
885
  });
860
886
  }
861
- static isTargetedByRulesyncCommand(rulesyncCommand) {
862
- return this.isTargetedByRulesyncCommandDefault({
863
- rulesyncCommand,
864
- toolTarget: "cursor"
865
- });
866
- }
867
887
  };
868
888
 
869
889
  // src/commands/geminicli-command.ts
@@ -897,7 +917,7 @@ var GeminiCliCommand = class _GeminiCliCommand extends ToolCommand {
897
917
  prompt: validated.prompt
898
918
  };
899
919
  } catch (error) {
900
- throw new Error(`Failed to parse TOML command file: ${error}`);
920
+ throw new Error(`Failed to parse TOML command file: ${error}`, { cause: error });
901
921
  }
902
922
  }
903
923
  getBody() {
@@ -1105,7 +1125,7 @@ var commandsProcessorToolTargets = [
1105
1125
  "codexcli"
1106
1126
  ];
1107
1127
  var CommandsProcessorToolTargetSchema = import_mini8.z.enum(commandsProcessorToolTargets);
1108
- var commandsProcessorToolTargetsSimulated = ["copilot", "cursor", "codexcli"];
1128
+ var commandsProcessorToolTargetsSimulated = ["copilot", "codexcli"];
1109
1129
  var CommandsProcessor = class extends FeatureProcessor {
1110
1130
  toolTarget;
1111
1131
  constructor({
@@ -1450,15 +1470,9 @@ var ConfigResolver = class {
1450
1470
  }
1451
1471
  };
1452
1472
 
1453
- // src/ignore/ignore-processor.ts
1454
- var import_mini9 = require("zod/mini");
1455
-
1456
- // src/ignore/amazonqcli-ignore.ts
1473
+ // src/ignore/claudecode-ignore.ts
1457
1474
  var import_node_path12 = require("path");
1458
-
1459
- // src/types/tool-file.ts
1460
- var ToolFile = class extends AiFile {
1461
- };
1475
+ var import_es_toolkit = require("es-toolkit");
1462
1476
 
1463
1477
  // src/ignore/rulesync-ignore.ts
1464
1478
  var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
@@ -1482,17 +1496,20 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1482
1496
  }
1483
1497
  };
1484
1498
 
1499
+ // src/types/tool-file.ts
1500
+ var ToolFile = class extends AiFile {
1501
+ };
1502
+
1485
1503
  // src/ignore/tool-ignore.ts
1486
1504
  var ToolIgnore = class extends ToolFile {
1487
1505
  patterns;
1488
- constructor({ ...rest }) {
1506
+ constructor(params) {
1489
1507
  super({
1490
- ...rest,
1508
+ ...params,
1491
1509
  validate: true
1492
- // Skip validation during construction
1493
1510
  });
1494
1511
  this.patterns = this.fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
1495
- if (rest.validate) {
1512
+ if (params.validate) {
1496
1513
  const result = this.validate();
1497
1514
  if (!result.success) {
1498
1515
  throw result.error;
@@ -1524,7 +1541,90 @@ var ToolIgnore = class extends ToolFile {
1524
1541
  }
1525
1542
  };
1526
1543
 
1544
+ // src/ignore/claudecode-ignore.ts
1545
+ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
1546
+ constructor(params) {
1547
+ super(params);
1548
+ const jsonValue = JSON.parse(this.fileContent);
1549
+ this.patterns = jsonValue.permissions?.deny ?? [];
1550
+ }
1551
+ static getSettablePaths() {
1552
+ return {
1553
+ relativeDirPath: ".claude",
1554
+ relativeFilePath: "settings.local.json"
1555
+ };
1556
+ }
1557
+ toRulesyncIgnore() {
1558
+ const rulesyncPatterns = this.patterns.map((pattern) => {
1559
+ if (pattern.startsWith("Read(") && pattern.endsWith(")")) {
1560
+ return pattern.slice(5, -1);
1561
+ }
1562
+ return pattern;
1563
+ }).filter((pattern) => pattern.length > 0);
1564
+ const fileContent = rulesyncPatterns.join("\n");
1565
+ return new RulesyncIgnore({
1566
+ baseDir: this.baseDir,
1567
+ relativeDirPath: RulesyncIgnore.getSettablePaths().relativeDirPath,
1568
+ relativeFilePath: RulesyncIgnore.getSettablePaths().relativeFilePath,
1569
+ fileContent
1570
+ });
1571
+ }
1572
+ static async fromRulesyncIgnore({
1573
+ baseDir = ".",
1574
+ rulesyncIgnore
1575
+ }) {
1576
+ const fileContent = rulesyncIgnore.getFileContent();
1577
+ const patterns = fileContent.split(/\r?\n|\r/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
1578
+ const deniedValues = patterns.map((pattern) => `Read(${pattern})`);
1579
+ const filePath = (0, import_node_path12.join)(
1580
+ baseDir,
1581
+ this.getSettablePaths().relativeDirPath,
1582
+ this.getSettablePaths().relativeFilePath
1583
+ );
1584
+ const exists = await fileExists(filePath);
1585
+ const existingFileContent = exists ? await readFileContent(filePath) : "{}";
1586
+ const existingJsonValue = JSON.parse(existingFileContent);
1587
+ const jsonValue = {
1588
+ ...existingJsonValue,
1589
+ permissions: {
1590
+ ...existingJsonValue.permissions,
1591
+ deny: (0, import_es_toolkit.uniq)([...existingJsonValue.permissions?.deny ?? [], ...deniedValues].sort())
1592
+ }
1593
+ };
1594
+ return new _ClaudecodeIgnore({
1595
+ baseDir,
1596
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
1597
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
1598
+ fileContent: JSON.stringify(jsonValue, null, 2),
1599
+ validate: true
1600
+ });
1601
+ }
1602
+ static async fromFile({
1603
+ baseDir = ".",
1604
+ validate = true
1605
+ }) {
1606
+ const fileContent = await readFileContent(
1607
+ (0, import_node_path12.join)(
1608
+ baseDir,
1609
+ this.getSettablePaths().relativeDirPath,
1610
+ this.getSettablePaths().relativeFilePath
1611
+ )
1612
+ );
1613
+ return new _ClaudecodeIgnore({
1614
+ baseDir,
1615
+ relativeDirPath: this.getSettablePaths().relativeDirPath,
1616
+ relativeFilePath: this.getSettablePaths().relativeFilePath,
1617
+ fileContent,
1618
+ validate
1619
+ });
1620
+ }
1621
+ };
1622
+
1623
+ // src/ignore/ignore-processor.ts
1624
+ var import_mini9 = require("zod/mini");
1625
+
1527
1626
  // src/ignore/amazonqcli-ignore.ts
1627
+ var import_node_path13 = require("path");
1528
1628
  var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1529
1629
  static getSettablePaths() {
1530
1630
  return {
@@ -1563,7 +1663,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1563
1663
  validate = true
1564
1664
  }) {
1565
1665
  const fileContent = await readFileContent(
1566
- (0, import_node_path12.join)(
1666
+ (0, import_node_path13.join)(
1567
1667
  baseDir,
1568
1668
  this.getSettablePaths().relativeDirPath,
1569
1669
  this.getSettablePaths().relativeFilePath
@@ -1580,7 +1680,7 @@ var AmazonqcliIgnore = class _AmazonqcliIgnore extends ToolIgnore {
1580
1680
  };
1581
1681
 
1582
1682
  // src/ignore/augmentcode-ignore.ts
1583
- var import_node_path13 = require("path");
1683
+ var import_node_path14 = require("path");
1584
1684
  var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
1585
1685
  static getSettablePaths() {
1586
1686
  return {
@@ -1618,7 +1718,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
1618
1718
  validate = true
1619
1719
  }) {
1620
1720
  const fileContent = await readFileContent(
1621
- (0, import_node_path13.join)(
1721
+ (0, import_node_path14.join)(
1622
1722
  baseDir,
1623
1723
  this.getSettablePaths().relativeDirPath,
1624
1724
  this.getSettablePaths().relativeFilePath
@@ -1635,7 +1735,7 @@ var AugmentcodeIgnore = class _AugmentcodeIgnore extends ToolIgnore {
1635
1735
  };
1636
1736
 
1637
1737
  // src/ignore/cline-ignore.ts
1638
- var import_node_path14 = require("path");
1738
+ var import_node_path15 = require("path");
1639
1739
  var ClineIgnore = class _ClineIgnore extends ToolIgnore {
1640
1740
  static getSettablePaths() {
1641
1741
  return {
@@ -1672,7 +1772,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
1672
1772
  validate = true
1673
1773
  }) {
1674
1774
  const fileContent = await readFileContent(
1675
- (0, import_node_path14.join)(
1775
+ (0, import_node_path15.join)(
1676
1776
  baseDir,
1677
1777
  this.getSettablePaths().relativeDirPath,
1678
1778
  this.getSettablePaths().relativeFilePath
@@ -1689,7 +1789,7 @@ var ClineIgnore = class _ClineIgnore extends ToolIgnore {
1689
1789
  };
1690
1790
 
1691
1791
  // src/ignore/codexcli-ignore.ts
1692
- var import_node_path15 = require("path");
1792
+ var import_node_path16 = require("path");
1693
1793
  var CodexcliIgnore = class _CodexcliIgnore extends ToolIgnore {
1694
1794
  static getSettablePaths() {
1695
1795
  return {
@@ -1719,7 +1819,7 @@ var CodexcliIgnore = class _CodexcliIgnore extends ToolIgnore {
1719
1819
  validate = true
1720
1820
  }) {
1721
1821
  const fileContent = await readFileContent(
1722
- (0, import_node_path15.join)(
1822
+ (0, import_node_path16.join)(
1723
1823
  baseDir,
1724
1824
  this.getSettablePaths().relativeDirPath,
1725
1825
  this.getSettablePaths().relativeFilePath
@@ -1736,7 +1836,7 @@ var CodexcliIgnore = class _CodexcliIgnore extends ToolIgnore {
1736
1836
  };
1737
1837
 
1738
1838
  // src/ignore/cursor-ignore.ts
1739
- var import_node_path16 = require("path");
1839
+ var import_node_path17 = require("path");
1740
1840
  var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1741
1841
  static getSettablePaths() {
1742
1842
  return {
@@ -1769,7 +1869,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1769
1869
  validate = true
1770
1870
  }) {
1771
1871
  const fileContent = await readFileContent(
1772
- (0, import_node_path16.join)(
1872
+ (0, import_node_path17.join)(
1773
1873
  baseDir,
1774
1874
  this.getSettablePaths().relativeDirPath,
1775
1875
  this.getSettablePaths().relativeFilePath
@@ -1786,12 +1886,12 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
1786
1886
  };
1787
1887
 
1788
1888
  // src/ignore/geminicli-ignore.ts
1789
- var import_node_path17 = require("path");
1889
+ var import_node_path18 = require("path");
1790
1890
  var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1791
1891
  static getSettablePaths() {
1792
1892
  return {
1793
1893
  relativeDirPath: ".",
1794
- relativeFilePath: ".aiexclude"
1894
+ relativeFilePath: ".geminiignore"
1795
1895
  };
1796
1896
  }
1797
1897
  toRulesyncIgnore() {
@@ -1813,7 +1913,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1813
1913
  validate = true
1814
1914
  }) {
1815
1915
  const fileContent = await readFileContent(
1816
- (0, import_node_path17.join)(
1916
+ (0, import_node_path18.join)(
1817
1917
  baseDir,
1818
1918
  this.getSettablePaths().relativeDirPath,
1819
1919
  this.getSettablePaths().relativeFilePath
@@ -1830,7 +1930,7 @@ var GeminiCliIgnore = class _GeminiCliIgnore extends ToolIgnore {
1830
1930
  };
1831
1931
 
1832
1932
  // src/ignore/junie-ignore.ts
1833
- var import_node_path18 = require("path");
1933
+ var import_node_path19 = require("path");
1834
1934
  var JunieIgnore = class _JunieIgnore extends ToolIgnore {
1835
1935
  static getSettablePaths() {
1836
1936
  return {
@@ -1857,7 +1957,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
1857
1957
  validate = true
1858
1958
  }) {
1859
1959
  const fileContent = await readFileContent(
1860
- (0, import_node_path18.join)(
1960
+ (0, import_node_path19.join)(
1861
1961
  baseDir,
1862
1962
  this.getSettablePaths().relativeDirPath,
1863
1963
  this.getSettablePaths().relativeFilePath
@@ -1874,7 +1974,7 @@ var JunieIgnore = class _JunieIgnore extends ToolIgnore {
1874
1974
  };
1875
1975
 
1876
1976
  // src/ignore/kiro-ignore.ts
1877
- var import_node_path19 = require("path");
1977
+ var import_node_path20 = require("path");
1878
1978
  var KiroIgnore = class _KiroIgnore extends ToolIgnore {
1879
1979
  static getSettablePaths() {
1880
1980
  return {
@@ -1901,7 +2001,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
1901
2001
  validate = true
1902
2002
  }) {
1903
2003
  const fileContent = await readFileContent(
1904
- (0, import_node_path19.join)(
2004
+ (0, import_node_path20.join)(
1905
2005
  baseDir,
1906
2006
  this.getSettablePaths().relativeDirPath,
1907
2007
  this.getSettablePaths().relativeFilePath
@@ -1918,7 +2018,7 @@ var KiroIgnore = class _KiroIgnore extends ToolIgnore {
1918
2018
  };
1919
2019
 
1920
2020
  // src/ignore/qwencode-ignore.ts
1921
- var import_node_path20 = require("path");
2021
+ var import_node_path21 = require("path");
1922
2022
  var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
1923
2023
  static getSettablePaths() {
1924
2024
  return {
@@ -1945,7 +2045,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
1945
2045
  validate = true
1946
2046
  }) {
1947
2047
  const fileContent = await readFileContent(
1948
- (0, import_node_path20.join)(
2048
+ (0, import_node_path21.join)(
1949
2049
  baseDir,
1950
2050
  this.getSettablePaths().relativeDirPath,
1951
2051
  this.getSettablePaths().relativeFilePath
@@ -1962,7 +2062,7 @@ var QwencodeIgnore = class _QwencodeIgnore extends ToolIgnore {
1962
2062
  };
1963
2063
 
1964
2064
  // src/ignore/roo-ignore.ts
1965
- var import_node_path21 = require("path");
2065
+ var import_node_path22 = require("path");
1966
2066
  var RooIgnore = class _RooIgnore extends ToolIgnore {
1967
2067
  static getSettablePaths() {
1968
2068
  return {
@@ -1989,7 +2089,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
1989
2089
  validate = true
1990
2090
  }) {
1991
2091
  const fileContent = await readFileContent(
1992
- (0, import_node_path21.join)(
2092
+ (0, import_node_path22.join)(
1993
2093
  baseDir,
1994
2094
  this.getSettablePaths().relativeDirPath,
1995
2095
  this.getSettablePaths().relativeFilePath
@@ -2006,7 +2106,7 @@ var RooIgnore = class _RooIgnore extends ToolIgnore {
2006
2106
  };
2007
2107
 
2008
2108
  // src/ignore/windsurf-ignore.ts
2009
- var import_node_path22 = require("path");
2109
+ var import_node_path23 = require("path");
2010
2110
  var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2011
2111
  static getSettablePaths() {
2012
2112
  return {
@@ -2033,7 +2133,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2033
2133
  validate = true
2034
2134
  }) {
2035
2135
  const fileContent = await readFileContent(
2036
- (0, import_node_path22.join)(
2136
+ (0, import_node_path23.join)(
2037
2137
  baseDir,
2038
2138
  this.getSettablePaths().relativeDirPath,
2039
2139
  this.getSettablePaths().relativeFilePath
@@ -2053,6 +2153,7 @@ var WindsurfIgnore = class _WindsurfIgnore extends ToolIgnore {
2053
2153
  var ignoreProcessorToolTargets = [
2054
2154
  "amazonqcli",
2055
2155
  "augmentcode",
2156
+ "claudecode",
2056
2157
  "cline",
2057
2158
  "codexcli",
2058
2159
  "cursor",
@@ -2108,6 +2209,8 @@ var IgnoreProcessor = class extends FeatureProcessor {
2108
2209
  return [await AmazonqcliIgnore.fromFile({ baseDir: this.baseDir })];
2109
2210
  case "augmentcode":
2110
2211
  return [await AugmentcodeIgnore.fromFile({ baseDir: this.baseDir })];
2212
+ case "claudecode":
2213
+ return [await ClaudecodeIgnore.fromFile({ baseDir: this.baseDir })];
2111
2214
  case "cline":
2112
2215
  return [await ClineIgnore.fromFile({ baseDir: this.baseDir })];
2113
2216
  case "codexcli":
@@ -2141,67 +2244,74 @@ var IgnoreProcessor = class extends FeatureProcessor {
2141
2244
  if (!rulesyncIgnore) {
2142
2245
  throw new Error(`No .rulesyncignore found.`);
2143
2246
  }
2144
- const toolIgnores = [rulesyncIgnore].map((rulesyncIgnore2) => {
2145
- switch (this.toolTarget) {
2146
- case "amazonqcli":
2147
- return AmazonqcliIgnore.fromRulesyncIgnore({
2148
- baseDir: this.baseDir,
2149
- rulesyncIgnore: rulesyncIgnore2
2150
- });
2151
- case "augmentcode":
2152
- return AugmentcodeIgnore.fromRulesyncIgnore({
2153
- baseDir: this.baseDir,
2154
- rulesyncIgnore: rulesyncIgnore2
2155
- });
2156
- case "cline":
2157
- return ClineIgnore.fromRulesyncIgnore({
2158
- baseDir: this.baseDir,
2159
- rulesyncIgnore: rulesyncIgnore2
2160
- });
2161
- case "codexcli":
2162
- return CodexcliIgnore.fromRulesyncIgnore({
2163
- baseDir: this.baseDir,
2164
- rulesyncIgnore: rulesyncIgnore2
2165
- });
2166
- case "cursor":
2167
- return CursorIgnore.fromRulesyncIgnore({
2168
- baseDir: this.baseDir,
2169
- rulesyncIgnore: rulesyncIgnore2
2170
- });
2171
- case "geminicli":
2172
- return GeminiCliIgnore.fromRulesyncIgnore({
2173
- baseDir: this.baseDir,
2174
- rulesyncIgnore: rulesyncIgnore2
2175
- });
2176
- case "junie":
2177
- return JunieIgnore.fromRulesyncIgnore({
2178
- baseDir: this.baseDir,
2179
- rulesyncIgnore: rulesyncIgnore2
2180
- });
2181
- case "kiro":
2182
- return KiroIgnore.fromRulesyncIgnore({
2183
- baseDir: this.baseDir,
2184
- rulesyncIgnore: rulesyncIgnore2
2185
- });
2186
- case "qwencode":
2187
- return QwencodeIgnore.fromRulesyncIgnore({
2188
- baseDir: this.baseDir,
2189
- rulesyncIgnore: rulesyncIgnore2
2190
- });
2191
- case "roo":
2192
- return RooIgnore.fromRulesyncIgnore({
2193
- baseDir: this.baseDir,
2194
- rulesyncIgnore: rulesyncIgnore2
2195
- });
2196
- case "windsurf":
2197
- return WindsurfIgnore.fromRulesyncIgnore({
2198
- baseDir: this.baseDir,
2199
- rulesyncIgnore: rulesyncIgnore2
2200
- });
2201
- default:
2202
- throw new Error(`Unsupported tool target: ${this.toolTarget}`);
2203
- }
2204
- });
2247
+ const toolIgnores = await Promise.all(
2248
+ [rulesyncIgnore].map(async (rulesyncIgnore2) => {
2249
+ switch (this.toolTarget) {
2250
+ case "amazonqcli":
2251
+ return AmazonqcliIgnore.fromRulesyncIgnore({
2252
+ baseDir: this.baseDir,
2253
+ rulesyncIgnore: rulesyncIgnore2
2254
+ });
2255
+ case "augmentcode":
2256
+ return AugmentcodeIgnore.fromRulesyncIgnore({
2257
+ baseDir: this.baseDir,
2258
+ rulesyncIgnore: rulesyncIgnore2
2259
+ });
2260
+ case "claudecode":
2261
+ return await ClaudecodeIgnore.fromRulesyncIgnore({
2262
+ baseDir: this.baseDir,
2263
+ rulesyncIgnore: rulesyncIgnore2
2264
+ });
2265
+ case "cline":
2266
+ return ClineIgnore.fromRulesyncIgnore({
2267
+ baseDir: this.baseDir,
2268
+ rulesyncIgnore: rulesyncIgnore2
2269
+ });
2270
+ case "codexcli":
2271
+ return CodexcliIgnore.fromRulesyncIgnore({
2272
+ baseDir: this.baseDir,
2273
+ rulesyncIgnore: rulesyncIgnore2
2274
+ });
2275
+ case "cursor":
2276
+ return CursorIgnore.fromRulesyncIgnore({
2277
+ baseDir: this.baseDir,
2278
+ rulesyncIgnore: rulesyncIgnore2
2279
+ });
2280
+ case "geminicli":
2281
+ return GeminiCliIgnore.fromRulesyncIgnore({
2282
+ baseDir: this.baseDir,
2283
+ rulesyncIgnore: rulesyncIgnore2
2284
+ });
2285
+ case "junie":
2286
+ return JunieIgnore.fromRulesyncIgnore({
2287
+ baseDir: this.baseDir,
2288
+ rulesyncIgnore: rulesyncIgnore2
2289
+ });
2290
+ case "kiro":
2291
+ return KiroIgnore.fromRulesyncIgnore({
2292
+ baseDir: this.baseDir,
2293
+ rulesyncIgnore: rulesyncIgnore2
2294
+ });
2295
+ case "qwencode":
2296
+ return QwencodeIgnore.fromRulesyncIgnore({
2297
+ baseDir: this.baseDir,
2298
+ rulesyncIgnore: rulesyncIgnore2
2299
+ });
2300
+ case "roo":
2301
+ return RooIgnore.fromRulesyncIgnore({
2302
+ baseDir: this.baseDir,
2303
+ rulesyncIgnore: rulesyncIgnore2
2304
+ });
2305
+ case "windsurf":
2306
+ return WindsurfIgnore.fromRulesyncIgnore({
2307
+ baseDir: this.baseDir,
2308
+ rulesyncIgnore: rulesyncIgnore2
2309
+ });
2310
+ default:
2311
+ throw new Error(`Unsupported tool target: ${this.toolTarget}`);
2312
+ }
2313
+ })
2314
+ );
2205
2315
  return toolIgnores;
2206
2316
  }
2207
2317
  /**
@@ -2228,10 +2338,10 @@ var IgnoreProcessor = class extends FeatureProcessor {
2228
2338
  var import_mini11 = require("zod/mini");
2229
2339
 
2230
2340
  // src/mcp/amazonqcli-mcp.ts
2231
- var import_node_path24 = require("path");
2341
+ var import_node_path25 = require("path");
2232
2342
 
2233
2343
  // src/mcp/rulesync-mcp.ts
2234
- var import_node_path23 = require("path");
2344
+ var import_node_path24 = require("path");
2235
2345
  var import_mini10 = require("zod/mini");
2236
2346
  var McpTransportTypeSchema = import_mini10.z.enum(["stdio", "sse", "http"]);
2237
2347
  var McpServerBaseSchema = import_mini10.z.object({
@@ -2282,7 +2392,7 @@ var RulesyncMcp = class _RulesyncMcp extends RulesyncFile {
2282
2392
  }
2283
2393
  static async fromFile({ validate = true }) {
2284
2394
  const fileContent = await readFileContent(
2285
- (0, import_node_path23.join)(this.getSettablePaths().relativeDirPath, this.getSettablePaths().relativeFilePath)
2395
+ (0, import_node_path24.join)(this.getSettablePaths().relativeDirPath, this.getSettablePaths().relativeFilePath)
2286
2396
  );
2287
2397
  return new _RulesyncMcp({
2288
2398
  baseDir: ".",
@@ -2349,7 +2459,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2349
2459
  validate = true
2350
2460
  }) {
2351
2461
  const fileContent = await readFileContent(
2352
- (0, import_node_path24.join)(
2462
+ (0, import_node_path25.join)(
2353
2463
  baseDir,
2354
2464
  this.getSettablePaths().relativeDirPath,
2355
2465
  this.getSettablePaths().relativeFilePath
@@ -2385,7 +2495,7 @@ var AmazonqcliMcp = class _AmazonqcliMcp extends ToolMcp {
2385
2495
  };
2386
2496
 
2387
2497
  // src/mcp/claudecode-mcp.ts
2388
- var import_node_path25 = require("path");
2498
+ var import_node_path26 = require("path");
2389
2499
  var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2390
2500
  static getSettablePaths() {
2391
2501
  return {
@@ -2398,7 +2508,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2398
2508
  validate = true
2399
2509
  }) {
2400
2510
  const fileContent = await readFileContent(
2401
- (0, import_node_path25.join)(
2511
+ (0, import_node_path26.join)(
2402
2512
  baseDir,
2403
2513
  this.getSettablePaths().relativeDirPath,
2404
2514
  this.getSettablePaths().relativeFilePath
@@ -2434,7 +2544,7 @@ var ClaudecodeMcp = class _ClaudecodeMcp extends ToolMcp {
2434
2544
  };
2435
2545
 
2436
2546
  // src/mcp/cline-mcp.ts
2437
- var import_node_path26 = require("path");
2547
+ var import_node_path27 = require("path");
2438
2548
  var ClineMcp = class _ClineMcp extends ToolMcp {
2439
2549
  static getSettablePaths() {
2440
2550
  return {
@@ -2447,7 +2557,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
2447
2557
  validate = true
2448
2558
  }) {
2449
2559
  const fileContent = await readFileContent(
2450
- (0, import_node_path26.join)(
2560
+ (0, import_node_path27.join)(
2451
2561
  baseDir,
2452
2562
  this.getSettablePaths().relativeDirPath,
2453
2563
  this.getSettablePaths().relativeFilePath
@@ -2483,7 +2593,7 @@ var ClineMcp = class _ClineMcp extends ToolMcp {
2483
2593
  };
2484
2594
 
2485
2595
  // src/mcp/copilot-mcp.ts
2486
- var import_node_path27 = require("path");
2596
+ var import_node_path28 = require("path");
2487
2597
  var CopilotMcp = class _CopilotMcp extends ToolMcp {
2488
2598
  static getSettablePaths() {
2489
2599
  return {
@@ -2496,7 +2606,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
2496
2606
  validate = true
2497
2607
  }) {
2498
2608
  const fileContent = await readFileContent(
2499
- (0, import_node_path27.join)(
2609
+ (0, import_node_path28.join)(
2500
2610
  baseDir,
2501
2611
  this.getSettablePaths().relativeDirPath,
2502
2612
  this.getSettablePaths().relativeFilePath
@@ -2532,7 +2642,7 @@ var CopilotMcp = class _CopilotMcp extends ToolMcp {
2532
2642
  };
2533
2643
 
2534
2644
  // src/mcp/cursor-mcp.ts
2535
- var import_node_path28 = require("path");
2645
+ var import_node_path29 = require("path");
2536
2646
  var CursorMcp = class _CursorMcp extends ToolMcp {
2537
2647
  static getSettablePaths() {
2538
2648
  return {
@@ -2545,7 +2655,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
2545
2655
  validate = true
2546
2656
  }) {
2547
2657
  const fileContent = await readFileContent(
2548
- (0, import_node_path28.join)(
2658
+ (0, import_node_path29.join)(
2549
2659
  baseDir,
2550
2660
  this.getSettablePaths().relativeDirPath,
2551
2661
  this.getSettablePaths().relativeFilePath
@@ -2592,7 +2702,7 @@ var CursorMcp = class _CursorMcp extends ToolMcp {
2592
2702
  };
2593
2703
 
2594
2704
  // src/mcp/roo-mcp.ts
2595
- var import_node_path29 = require("path");
2705
+ var import_node_path30 = require("path");
2596
2706
  var RooMcp = class _RooMcp extends ToolMcp {
2597
2707
  static getSettablePaths() {
2598
2708
  return {
@@ -2605,7 +2715,7 @@ var RooMcp = class _RooMcp extends ToolMcp {
2605
2715
  validate = true
2606
2716
  }) {
2607
2717
  const fileContent = await readFileContent(
2608
- (0, import_node_path29.join)(
2718
+ (0, import_node_path30.join)(
2609
2719
  baseDir,
2610
2720
  this.getSettablePaths().relativeDirPath,
2611
2721
  this.getSettablePaths().relativeFilePath
@@ -2809,20 +2919,20 @@ var McpProcessor = class extends FeatureProcessor {
2809
2919
  };
2810
2920
 
2811
2921
  // src/rules/rules-processor.ts
2812
- var import_node_path54 = require("path");
2922
+ var import_node_path55 = require("path");
2813
2923
  var import_fast_xml_parser = require("fast-xml-parser");
2814
2924
  var import_mini20 = require("zod/mini");
2815
2925
 
2816
2926
  // src/constants/paths.ts
2817
- var import_node_path30 = require("path");
2927
+ var import_node_path31 = require("path");
2818
2928
  var RULESYNC_DIR = ".rulesync";
2819
- var RULESYNC_RULES_DIR = (0, import_node_path30.join)(".rulesync", "rules");
2929
+ var RULESYNC_RULES_DIR = (0, import_node_path31.join)(".rulesync", "rules");
2820
2930
  var RULESYNC_RULES_DIR_LEGACY = ".rulesync";
2821
- var RULESYNC_MCP_FILE = (0, import_node_path30.join)(".rulesync", ".mcp.json");
2822
- var RULESYNC_SUBAGENTS_DIR = (0, import_node_path30.join)(".rulesync", "subagents");
2931
+ var RULESYNC_MCP_FILE = (0, import_node_path31.join)(".rulesync", ".mcp.json");
2932
+ var RULESYNC_SUBAGENTS_DIR = (0, import_node_path31.join)(".rulesync", "subagents");
2823
2933
 
2824
2934
  // src/subagents/simulated-subagent.ts
2825
- var import_node_path31 = require("path");
2935
+ var import_node_path32 = require("path");
2826
2936
  var import_mini12 = require("zod/mini");
2827
2937
 
2828
2938
  // src/subagents/tool-subagent.ts
@@ -2924,7 +3034,7 @@ var SimulatedSubagent = class extends ToolSubagent {
2924
3034
  relativeFilePath,
2925
3035
  validate = true
2926
3036
  }) {
2927
- const filePath = (0, import_node_path31.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
3037
+ const filePath = (0, import_node_path32.join)(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
2928
3038
  const fileContent = await readFileContent(filePath);
2929
3039
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
2930
3040
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -2934,7 +3044,7 @@ var SimulatedSubagent = class extends ToolSubagent {
2934
3044
  return {
2935
3045
  baseDir,
2936
3046
  relativeDirPath: this.getSettablePaths().relativeDirPath,
2937
- relativeFilePath: (0, import_node_path31.basename)(relativeFilePath),
3047
+ relativeFilePath: (0, import_node_path32.basename)(relativeFilePath),
2938
3048
  frontmatter: result.data,
2939
3049
  body: content.trim(),
2940
3050
  validate
@@ -3058,15 +3168,15 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
3058
3168
  };
3059
3169
 
3060
3170
  // src/subagents/subagents-processor.ts
3061
- var import_node_path34 = require("path");
3171
+ var import_node_path35 = require("path");
3062
3172
  var import_mini15 = require("zod/mini");
3063
3173
 
3064
3174
  // src/subagents/claudecode-subagent.ts
3065
- var import_node_path33 = require("path");
3175
+ var import_node_path34 = require("path");
3066
3176
  var import_mini14 = require("zod/mini");
3067
3177
 
3068
3178
  // src/subagents/rulesync-subagent.ts
3069
- var import_node_path32 = require("path");
3179
+ var import_node_path33 = require("path");
3070
3180
  var import_mini13 = require("zod/mini");
3071
3181
  var RulesyncSubagentModelSchema = import_mini13.z.enum(["opus", "sonnet", "haiku", "inherit"]);
3072
3182
  var RulesyncSubagentFrontmatterSchema = import_mini13.z.object({
@@ -3120,13 +3230,13 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
3120
3230
  static async fromFile({
3121
3231
  relativeFilePath
3122
3232
  }) {
3123
- const fileContent = await readFileContent((0, import_node_path32.join)(RULESYNC_SUBAGENTS_DIR, relativeFilePath));
3233
+ const fileContent = await readFileContent((0, import_node_path33.join)(RULESYNC_SUBAGENTS_DIR, relativeFilePath));
3124
3234
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3125
3235
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
3126
3236
  if (!result.success) {
3127
3237
  throw new Error(`Invalid frontmatter in ${relativeFilePath}: ${result.error.message}`);
3128
3238
  }
3129
- const filename = (0, import_node_path32.basename)(relativeFilePath);
3239
+ const filename = (0, import_node_path33.basename)(relativeFilePath);
3130
3240
  return new _RulesyncSubagent({
3131
3241
  baseDir: ".",
3132
3242
  relativeDirPath: this.getSettablePaths().relativeDirPath,
@@ -3238,7 +3348,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
3238
3348
  relativeFilePath,
3239
3349
  validate = true
3240
3350
  }) {
3241
- const fileContent = await readFileContent((0, import_node_path33.join)(baseDir, ".claude/agents", relativeFilePath));
3351
+ const fileContent = await readFileContent((0, import_node_path34.join)(baseDir, ".claude/agents", relativeFilePath));
3242
3352
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3243
3353
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
3244
3354
  if (!result.success) {
@@ -3369,7 +3479,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
3369
3479
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
3370
3480
  */
3371
3481
  async loadRulesyncFiles() {
3372
- const subagentsDir = (0, import_node_path34.join)(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
3482
+ const subagentsDir = (0, import_node_path35.join)(this.baseDir, RulesyncSubagent.getSettablePaths().relativeDirPath);
3373
3483
  const dirExists = await directoryExists(subagentsDir);
3374
3484
  if (!dirExists) {
3375
3485
  logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -3384,7 +3494,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
3384
3494
  logger.info(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
3385
3495
  const rulesyncSubagents = [];
3386
3496
  for (const mdFile of mdFiles) {
3387
- const filepath = (0, import_node_path34.join)(subagentsDir, mdFile);
3497
+ const filepath = (0, import_node_path35.join)(subagentsDir, mdFile);
3388
3498
  try {
3389
3499
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
3390
3500
  relativeFilePath: mdFile,
@@ -3484,8 +3594,8 @@ var SubagentsProcessor = class extends FeatureProcessor {
3484
3594
  relativeDirPath,
3485
3595
  fromFile
3486
3596
  }) {
3487
- const paths = await findFilesByGlobs((0, import_node_path34.join)(this.baseDir, relativeDirPath, "*.md"));
3488
- const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path34.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
3597
+ const paths = await findFilesByGlobs((0, import_node_path35.join)(this.baseDir, relativeDirPath, "*.md"));
3598
+ const subagents = (await Promise.allSettled(paths.map((path2) => fromFile((0, import_node_path35.basename)(path2))))).filter((r) => r.status === "fulfilled").map((r) => r.value);
3489
3599
  logger.info(`Successfully loaded ${subagents.length} ${relativeDirPath} subagents`);
3490
3600
  return subagents;
3491
3601
  }
@@ -3509,13 +3619,13 @@ var SubagentsProcessor = class extends FeatureProcessor {
3509
3619
  };
3510
3620
 
3511
3621
  // src/rules/agentsmd-rule.ts
3512
- var import_node_path37 = require("path");
3622
+ var import_node_path38 = require("path");
3513
3623
 
3514
3624
  // src/rules/tool-rule.ts
3515
- var import_node_path36 = require("path");
3625
+ var import_node_path37 = require("path");
3516
3626
 
3517
3627
  // src/rules/rulesync-rule.ts
3518
- var import_node_path35 = require("path");
3628
+ var import_node_path36 = require("path");
3519
3629
  var import_mini16 = require("zod/mini");
3520
3630
  var RulesyncRuleFrontmatterSchema = import_mini16.z.object({
3521
3631
  root: import_mini16.z.optional(import_mini16.z.optional(import_mini16.z.boolean())),
@@ -3581,7 +3691,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3581
3691
  relativeFilePath,
3582
3692
  validate = true
3583
3693
  }) {
3584
- const filePath = (0, import_node_path35.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
3694
+ const filePath = (0, import_node_path36.join)(this.getSettablePaths().legacy.relativeDirPath, relativeFilePath);
3585
3695
  const fileContent = await readFileContent(filePath);
3586
3696
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3587
3697
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -3596,7 +3706,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3596
3706
  agentsmd: result.data.agentsmd,
3597
3707
  cursor: result.data.cursor
3598
3708
  };
3599
- const filename = (0, import_node_path35.basename)(filePath);
3709
+ const filename = (0, import_node_path36.basename)(filePath);
3600
3710
  return new _RulesyncRule({
3601
3711
  baseDir: ".",
3602
3712
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
@@ -3610,7 +3720,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3610
3720
  relativeFilePath,
3611
3721
  validate = true
3612
3722
  }) {
3613
- const filePath = (0, import_node_path35.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
3723
+ const filePath = (0, import_node_path36.join)(this.getSettablePaths().recommended.relativeDirPath, relativeFilePath);
3614
3724
  const fileContent = await readFileContent(filePath);
3615
3725
  const { frontmatter, body: content } = parseFrontmatter(fileContent);
3616
3726
  const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
@@ -3625,7 +3735,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
3625
3735
  agentsmd: result.data.agentsmd,
3626
3736
  cursor: result.data.cursor
3627
3737
  };
3628
- const filename = (0, import_node_path35.basename)(filePath);
3738
+ const filename = (0, import_node_path36.basename)(filePath);
3629
3739
  return new _RulesyncRule({
3630
3740
  baseDir: ".",
3631
3741
  relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
@@ -3692,7 +3802,7 @@ var ToolRule = class extends ToolFile {
3692
3802
  });
3693
3803
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
3694
3804
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
3695
- params.relativeDirPath = (0, import_node_path36.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
3805
+ params.relativeDirPath = (0, import_node_path37.join)(rulesyncFrontmatter.agentsmd.subprojectPath);
3696
3806
  params.relativeFilePath = "AGENTS.md";
3697
3807
  }
3698
3808
  return params;
@@ -3767,8 +3877,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
3767
3877
  validate = true
3768
3878
  }) {
3769
3879
  const isRoot = relativeFilePath === "AGENTS.md";
3770
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path37.join)(".agents/memories", relativeFilePath);
3771
- const fileContent = await readFileContent((0, import_node_path37.join)(baseDir, relativePath));
3880
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path38.join)(".agents/memories", relativeFilePath);
3881
+ const fileContent = await readFileContent((0, import_node_path38.join)(baseDir, relativePath));
3772
3882
  return new _AgentsMdRule({
3773
3883
  baseDir,
3774
3884
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -3808,7 +3918,7 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
3808
3918
  };
3809
3919
 
3810
3920
  // src/rules/amazonqcli-rule.ts
3811
- var import_node_path38 = require("path");
3921
+ var import_node_path39 = require("path");
3812
3922
  var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
3813
3923
  static getSettablePaths() {
3814
3924
  return {
@@ -3823,7 +3933,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
3823
3933
  validate = true
3824
3934
  }) {
3825
3935
  const fileContent = await readFileContent(
3826
- (0, import_node_path38.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
3936
+ (0, import_node_path39.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
3827
3937
  );
3828
3938
  return new _AmazonQCliRule({
3829
3939
  baseDir,
@@ -3863,7 +3973,7 @@ var AmazonQCliRule = class _AmazonQCliRule extends ToolRule {
3863
3973
  };
3864
3974
 
3865
3975
  // src/rules/augmentcode-legacy-rule.ts
3866
- var import_node_path39 = require("path");
3976
+ var import_node_path40 = require("path");
3867
3977
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
3868
3978
  toRulesyncRule() {
3869
3979
  const rulesyncFrontmatter = {
@@ -3923,8 +4033,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
3923
4033
  }) {
3924
4034
  const settablePaths = this.getSettablePaths();
3925
4035
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
3926
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path39.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
3927
- const fileContent = await readFileContent((0, import_node_path39.join)(baseDir, relativePath));
4036
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : (0, import_node_path40.join)(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
4037
+ const fileContent = await readFileContent((0, import_node_path40.join)(baseDir, relativePath));
3928
4038
  return new _AugmentcodeLegacyRule({
3929
4039
  baseDir,
3930
4040
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -3937,7 +4047,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
3937
4047
  };
3938
4048
 
3939
4049
  // src/rules/augmentcode-rule.ts
3940
- var import_node_path40 = require("path");
4050
+ var import_node_path41 = require("path");
3941
4051
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
3942
4052
  toRulesyncRule() {
3943
4053
  return this.toRulesyncRuleDefault();
@@ -3969,7 +4079,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
3969
4079
  validate = true
3970
4080
  }) {
3971
4081
  const fileContent = await readFileContent(
3972
- (0, import_node_path40.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4082
+ (0, import_node_path41.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
3973
4083
  );
3974
4084
  const { body: content } = parseFrontmatter(fileContent);
3975
4085
  return new _AugmentcodeRule({
@@ -3992,7 +4102,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
3992
4102
  };
3993
4103
 
3994
4104
  // src/rules/claudecode-rule.ts
3995
- var import_node_path41 = require("path");
4105
+ var import_node_path42 = require("path");
3996
4106
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
3997
4107
  static getSettablePaths() {
3998
4108
  return {
@@ -4011,8 +4121,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4011
4121
  validate = true
4012
4122
  }) {
4013
4123
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
4014
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path41.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4015
- const fileContent = await readFileContent((0, import_node_path41.join)(baseDir, relativePath));
4124
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path42.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4125
+ const fileContent = await readFileContent((0, import_node_path42.join)(baseDir, relativePath));
4016
4126
  return new _ClaudecodeRule({
4017
4127
  baseDir,
4018
4128
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4052,7 +4162,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
4052
4162
  };
4053
4163
 
4054
4164
  // src/rules/cline-rule.ts
4055
- var import_node_path42 = require("path");
4165
+ var import_node_path43 = require("path");
4056
4166
  var import_mini17 = require("zod/mini");
4057
4167
  var ClineRuleFrontmatterSchema = import_mini17.z.object({
4058
4168
  description: import_mini17.z.string()
@@ -4097,7 +4207,7 @@ var ClineRule = class _ClineRule extends ToolRule {
4097
4207
  validate = true
4098
4208
  }) {
4099
4209
  const fileContent = await readFileContent(
4100
- (0, import_node_path42.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4210
+ (0, import_node_path43.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4101
4211
  );
4102
4212
  return new _ClineRule({
4103
4213
  baseDir,
@@ -4110,7 +4220,7 @@ var ClineRule = class _ClineRule extends ToolRule {
4110
4220
  };
4111
4221
 
4112
4222
  // src/rules/codexcli-rule.ts
4113
- var import_node_path43 = require("path");
4223
+ var import_node_path44 = require("path");
4114
4224
  var CodexcliRule = class _CodexcliRule extends ToolRule {
4115
4225
  static getSettablePaths() {
4116
4226
  return {
@@ -4129,8 +4239,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4129
4239
  validate = true
4130
4240
  }) {
4131
4241
  const isRoot = relativeFilePath === "AGENTS.md";
4132
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path43.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4133
- const fileContent = await readFileContent((0, import_node_path43.join)(baseDir, relativePath));
4242
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path44.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4243
+ const fileContent = await readFileContent((0, import_node_path44.join)(baseDir, relativePath));
4134
4244
  return new _CodexcliRule({
4135
4245
  baseDir,
4136
4246
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4170,7 +4280,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
4170
4280
  };
4171
4281
 
4172
4282
  // src/rules/copilot-rule.ts
4173
- var import_node_path44 = require("path");
4283
+ var import_node_path45 = require("path");
4174
4284
  var import_mini18 = require("zod/mini");
4175
4285
  var CopilotRuleFrontmatterSchema = import_mini18.z.object({
4176
4286
  description: import_mini18.z.optional(import_mini18.z.string()),
@@ -4262,11 +4372,11 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4262
4372
  validate = true
4263
4373
  }) {
4264
4374
  const isRoot = relativeFilePath === "copilot-instructions.md";
4265
- const relativePath = isRoot ? (0, import_node_path44.join)(
4375
+ const relativePath = isRoot ? (0, import_node_path45.join)(
4266
4376
  this.getSettablePaths().root.relativeDirPath,
4267
4377
  this.getSettablePaths().root.relativeFilePath
4268
- ) : (0, import_node_path44.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4269
- const fileContent = await readFileContent((0, import_node_path44.join)(baseDir, relativePath));
4378
+ ) : (0, import_node_path45.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4379
+ const fileContent = await readFileContent((0, import_node_path45.join)(baseDir, relativePath));
4270
4380
  if (isRoot) {
4271
4381
  return new _CopilotRule({
4272
4382
  baseDir,
@@ -4285,7 +4395,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4285
4395
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
4286
4396
  if (!result.success) {
4287
4397
  throw new Error(
4288
- `Invalid frontmatter in ${(0, import_node_path44.join)(baseDir, relativeFilePath)}: ${result.error.message}`
4398
+ `Invalid frontmatter in ${(0, import_node_path45.join)(baseDir, relativeFilePath)}: ${result.error.message}`
4289
4399
  );
4290
4400
  }
4291
4401
  return new _CopilotRule({
@@ -4324,7 +4434,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
4324
4434
  };
4325
4435
 
4326
4436
  // src/rules/cursor-rule.ts
4327
- var import_node_path45 = require("path");
4437
+ var import_node_path46 = require("path");
4328
4438
  var import_mini19 = require("zod/mini");
4329
4439
  var CursorRuleFrontmatterSchema = import_mini19.z.object({
4330
4440
  description: import_mini19.z.optional(import_mini19.z.string()),
@@ -4451,19 +4561,19 @@ var CursorRule = class _CursorRule extends ToolRule {
4451
4561
  validate = true
4452
4562
  }) {
4453
4563
  const fileContent = await readFileContent(
4454
- (0, import_node_path45.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4564
+ (0, import_node_path46.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4455
4565
  );
4456
4566
  const { frontmatter, body: content } = _CursorRule.parseCursorFrontmatter(fileContent);
4457
4567
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
4458
4568
  if (!result.success) {
4459
4569
  throw new Error(
4460
- `Invalid frontmatter in ${(0, import_node_path45.join)(baseDir, relativeFilePath)}: ${result.error.message}`
4570
+ `Invalid frontmatter in ${(0, import_node_path46.join)(baseDir, relativeFilePath)}: ${result.error.message}`
4461
4571
  );
4462
4572
  }
4463
4573
  return new _CursorRule({
4464
4574
  baseDir,
4465
4575
  relativeDirPath: this.getSettablePaths().nonRoot.relativeDirPath,
4466
- relativeFilePath: (0, import_node_path45.basename)(relativeFilePath),
4576
+ relativeFilePath: (0, import_node_path46.basename)(relativeFilePath),
4467
4577
  frontmatter: result.data,
4468
4578
  body: content.trim(),
4469
4579
  validate
@@ -4495,7 +4605,7 @@ var CursorRule = class _CursorRule extends ToolRule {
4495
4605
  };
4496
4606
 
4497
4607
  // src/rules/geminicli-rule.ts
4498
- var import_node_path46 = require("path");
4608
+ var import_node_path47 = require("path");
4499
4609
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4500
4610
  static getSettablePaths() {
4501
4611
  return {
@@ -4514,8 +4624,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4514
4624
  validate = true
4515
4625
  }) {
4516
4626
  const isRoot = relativeFilePath === "GEMINI.md";
4517
- const relativePath = isRoot ? "GEMINI.md" : (0, import_node_path46.join)(".gemini/memories", relativeFilePath);
4518
- const fileContent = await readFileContent((0, import_node_path46.join)(baseDir, relativePath));
4627
+ const relativePath = isRoot ? "GEMINI.md" : (0, import_node_path47.join)(".gemini/memories", relativeFilePath);
4628
+ const fileContent = await readFileContent((0, import_node_path47.join)(baseDir, relativePath));
4519
4629
  return new _GeminiCliRule({
4520
4630
  baseDir,
4521
4631
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4555,7 +4665,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
4555
4665
  };
4556
4666
 
4557
4667
  // src/rules/junie-rule.ts
4558
- var import_node_path47 = require("path");
4668
+ var import_node_path48 = require("path");
4559
4669
  var JunieRule = class _JunieRule extends ToolRule {
4560
4670
  static getSettablePaths() {
4561
4671
  return {
@@ -4574,8 +4684,8 @@ var JunieRule = class _JunieRule extends ToolRule {
4574
4684
  validate = true
4575
4685
  }) {
4576
4686
  const isRoot = relativeFilePath === "guidelines.md";
4577
- const relativePath = isRoot ? "guidelines.md" : (0, import_node_path47.join)(".junie/memories", relativeFilePath);
4578
- const fileContent = await readFileContent((0, import_node_path47.join)(baseDir, relativePath));
4687
+ const relativePath = isRoot ? "guidelines.md" : (0, import_node_path48.join)(".junie/memories", relativeFilePath);
4688
+ const fileContent = await readFileContent((0, import_node_path48.join)(baseDir, relativePath));
4579
4689
  return new _JunieRule({
4580
4690
  baseDir,
4581
4691
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4615,7 +4725,7 @@ var JunieRule = class _JunieRule extends ToolRule {
4615
4725
  };
4616
4726
 
4617
4727
  // src/rules/kiro-rule.ts
4618
- var import_node_path48 = require("path");
4728
+ var import_node_path49 = require("path");
4619
4729
  var KiroRule = class _KiroRule extends ToolRule {
4620
4730
  static getSettablePaths() {
4621
4731
  return {
@@ -4630,7 +4740,7 @@ var KiroRule = class _KiroRule extends ToolRule {
4630
4740
  validate = true
4631
4741
  }) {
4632
4742
  const fileContent = await readFileContent(
4633
- (0, import_node_path48.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4743
+ (0, import_node_path49.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4634
4744
  );
4635
4745
  return new _KiroRule({
4636
4746
  baseDir,
@@ -4670,7 +4780,7 @@ var KiroRule = class _KiroRule extends ToolRule {
4670
4780
  };
4671
4781
 
4672
4782
  // src/rules/opencode-rule.ts
4673
- var import_node_path49 = require("path");
4783
+ var import_node_path50 = require("path");
4674
4784
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
4675
4785
  static getSettablePaths() {
4676
4786
  return {
@@ -4689,8 +4799,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
4689
4799
  validate = true
4690
4800
  }) {
4691
4801
  const isRoot = relativeFilePath === "AGENTS.md";
4692
- const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path49.join)(".opencode/memories", relativeFilePath);
4693
- const fileContent = await readFileContent((0, import_node_path49.join)(baseDir, relativePath));
4802
+ const relativePath = isRoot ? "AGENTS.md" : (0, import_node_path50.join)(".opencode/memories", relativeFilePath);
4803
+ const fileContent = await readFileContent((0, import_node_path50.join)(baseDir, relativePath));
4694
4804
  return new _OpenCodeRule({
4695
4805
  baseDir,
4696
4806
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4730,7 +4840,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
4730
4840
  };
4731
4841
 
4732
4842
  // src/rules/qwencode-rule.ts
4733
- var import_node_path50 = require("path");
4843
+ var import_node_path51 = require("path");
4734
4844
  var QwencodeRule = class _QwencodeRule extends ToolRule {
4735
4845
  static getSettablePaths() {
4736
4846
  return {
@@ -4749,8 +4859,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
4749
4859
  validate = true
4750
4860
  }) {
4751
4861
  const isRoot = relativeFilePath === "QWEN.md";
4752
- const relativePath = isRoot ? "QWEN.md" : (0, import_node_path50.join)(".qwen/memories", relativeFilePath);
4753
- const fileContent = await readFileContent((0, import_node_path50.join)(baseDir, relativePath));
4862
+ const relativePath = isRoot ? "QWEN.md" : (0, import_node_path51.join)(".qwen/memories", relativeFilePath);
4863
+ const fileContent = await readFileContent((0, import_node_path51.join)(baseDir, relativePath));
4754
4864
  return new _QwencodeRule({
4755
4865
  baseDir,
4756
4866
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -4787,7 +4897,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
4787
4897
  };
4788
4898
 
4789
4899
  // src/rules/roo-rule.ts
4790
- var import_node_path51 = require("path");
4900
+ var import_node_path52 = require("path");
4791
4901
  var RooRule = class _RooRule extends ToolRule {
4792
4902
  static getSettablePaths() {
4793
4903
  return {
@@ -4802,7 +4912,7 @@ var RooRule = class _RooRule extends ToolRule {
4802
4912
  validate = true
4803
4913
  }) {
4804
4914
  const fileContent = await readFileContent(
4805
- (0, import_node_path51.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4915
+ (0, import_node_path52.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4806
4916
  );
4807
4917
  return new _RooRule({
4808
4918
  baseDir,
@@ -4857,7 +4967,7 @@ var RooRule = class _RooRule extends ToolRule {
4857
4967
  };
4858
4968
 
4859
4969
  // src/rules/warp-rule.ts
4860
- var import_node_path52 = require("path");
4970
+ var import_node_path53 = require("path");
4861
4971
  var WarpRule = class _WarpRule extends ToolRule {
4862
4972
  constructor({ fileContent, root, ...rest }) {
4863
4973
  super({
@@ -4883,8 +4993,8 @@ var WarpRule = class _WarpRule extends ToolRule {
4883
4993
  validate = true
4884
4994
  }) {
4885
4995
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
4886
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path52.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4887
- const fileContent = await readFileContent((0, import_node_path52.join)(baseDir, relativePath));
4996
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : (0, import_node_path53.join)(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
4997
+ const fileContent = await readFileContent((0, import_node_path53.join)(baseDir, relativePath));
4888
4998
  return new _WarpRule({
4889
4999
  baseDir,
4890
5000
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -4924,7 +5034,7 @@ var WarpRule = class _WarpRule extends ToolRule {
4924
5034
  };
4925
5035
 
4926
5036
  // src/rules/windsurf-rule.ts
4927
- var import_node_path53 = require("path");
5037
+ var import_node_path54 = require("path");
4928
5038
  var WindsurfRule = class _WindsurfRule extends ToolRule {
4929
5039
  static getSettablePaths() {
4930
5040
  return {
@@ -4939,7 +5049,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
4939
5049
  validate = true
4940
5050
  }) {
4941
5051
  const fileContent = await readFileContent(
4942
- (0, import_node_path53.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
5052
+ (0, import_node_path54.join)(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
4943
5053
  );
4944
5054
  return new _WindsurfRule({
4945
5055
  baseDir,
@@ -5318,17 +5428,17 @@ var RulesProcessor = class extends FeatureProcessor {
5318
5428
  * Load and parse rulesync rule files from .rulesync/rules/ directory
5319
5429
  */
5320
5430
  async loadRulesyncFiles() {
5321
- const files = await findFilesByGlobs((0, import_node_path54.join)(RULESYNC_RULES_DIR, "*.md"));
5431
+ const files = await findFilesByGlobs((0, import_node_path55.join)(RULESYNC_RULES_DIR, "*.md"));
5322
5432
  logger.debug(`Found ${files.length} rulesync files`);
5323
5433
  return Promise.all(
5324
- files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path54.basename)(file) }))
5434
+ files.map((file) => RulesyncRule.fromFile({ relativeFilePath: (0, import_node_path55.basename)(file) }))
5325
5435
  );
5326
5436
  }
5327
5437
  async loadRulesyncFilesLegacy() {
5328
- const legacyFiles = await findFilesByGlobs((0, import_node_path54.join)(RULESYNC_RULES_DIR_LEGACY, "*.md"));
5438
+ const legacyFiles = await findFilesByGlobs((0, import_node_path55.join)(RULESYNC_RULES_DIR_LEGACY, "*.md"));
5329
5439
  logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
5330
5440
  return Promise.all(
5331
- legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path54.basename)(file) }))
5441
+ legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path55.basename)(file) }))
5332
5442
  );
5333
5443
  }
5334
5444
  /**
@@ -5389,13 +5499,13 @@ var RulesProcessor = class extends FeatureProcessor {
5389
5499
  return [];
5390
5500
  }
5391
5501
  const rootFilePaths = await findFilesByGlobs(
5392
- (0, import_node_path54.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
5502
+ (0, import_node_path55.join)(this.baseDir, root.relativeDirPath ?? ".", root.relativeFilePath)
5393
5503
  );
5394
5504
  return await Promise.all(
5395
5505
  rootFilePaths.map(
5396
5506
  (filePath) => root.fromFile({
5397
5507
  baseDir: this.baseDir,
5398
- relativeFilePath: (0, import_node_path54.basename)(filePath)
5508
+ relativeFilePath: (0, import_node_path55.basename)(filePath)
5399
5509
  })
5400
5510
  )
5401
5511
  );
@@ -5406,13 +5516,13 @@ var RulesProcessor = class extends FeatureProcessor {
5406
5516
  return [];
5407
5517
  }
5408
5518
  const nonRootFilePaths = await findFilesByGlobs(
5409
- (0, import_node_path54.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
5519
+ (0, import_node_path55.join)(this.baseDir, nonRoot.relativeDirPath, `*.${nonRoot.extension}`)
5410
5520
  );
5411
5521
  return await Promise.all(
5412
5522
  nonRootFilePaths.map(
5413
5523
  (filePath) => nonRoot.fromFile({
5414
5524
  baseDir: this.baseDir,
5415
- relativeFilePath: (0, import_node_path54.basename)(filePath)
5525
+ relativeFilePath: (0, import_node_path55.basename)(filePath)
5416
5526
  })
5417
5527
  )
5418
5528
  );
@@ -5772,14 +5882,14 @@ s/<command> [arguments]
5772
5882
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
5773
5883
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
5774
5884
 
5775
- When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path54.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.`;
5885
+ When users call a custom slash command, you have to look for the markdown file, \`${(0, import_node_path55.join)(commands.relativeDirPath, "{command}.md")}\`, then execute the contents of that file as the block of operations.`;
5776
5886
  const subagentsSection = `## Simulated Subagents
5777
5887
 
5778
5888
  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.
5779
5889
 
5780
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path54.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
5890
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${(0, import_node_path55.join)(subagents.relativeDirPath, "{subagent}.md")}\`, and execute its contents as the block of operations.
5781
5891
 
5782
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path54.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.`;
5892
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${(0, import_node_path55.join)(subagents.relativeDirPath, "planner.md")}\`, and execute its contents as the block of operations.`;
5783
5893
  const result = [
5784
5894
  overview,
5785
5895
  ...this.simulateCommands && CommandsProcessor.getToolTargetsSimulated().includes(this.toolTarget) ? [commandsSection] : [],
@@ -5803,7 +5913,7 @@ async function generateCommand(options) {
5803
5913
  if (config.getFeatures().includes("rules")) {
5804
5914
  logger.info("Generating rule files...");
5805
5915
  for (const baseDir of config.getBaseDirs()) {
5806
- for (const toolTarget of (0, import_es_toolkit.intersection)(config.getTargets(), RulesProcessor.getToolTargets())) {
5916
+ for (const toolTarget of (0, import_es_toolkit2.intersection)(config.getTargets(), RulesProcessor.getToolTargets())) {
5807
5917
  const processor = new RulesProcessor({
5808
5918
  baseDir,
5809
5919
  toolTarget,
@@ -5842,7 +5952,7 @@ async function generateCommand(options) {
5842
5952
  return supportedMcpTargets.some((supportedTarget) => supportedTarget === target);
5843
5953
  });
5844
5954
  for (const baseDir of config.getBaseDirs()) {
5845
- for (const toolTarget of (0, import_es_toolkit.intersection)(mcpSupportedTargets, McpProcessor.getToolTargets())) {
5955
+ for (const toolTarget of (0, import_es_toolkit2.intersection)(mcpSupportedTargets, McpProcessor.getToolTargets())) {
5846
5956
  const processor = new McpProcessor({
5847
5957
  baseDir,
5848
5958
  toolTarget
@@ -5867,7 +5977,7 @@ async function generateCommand(options) {
5867
5977
  if (config.getFeatures().includes("commands")) {
5868
5978
  logger.info("Generating command files...");
5869
5979
  for (const baseDir of config.getBaseDirs()) {
5870
- for (const toolTarget of (0, import_es_toolkit.intersection)(
5980
+ for (const toolTarget of (0, import_es_toolkit2.intersection)(
5871
5981
  config.getTargets(),
5872
5982
  CommandsProcessor.getToolTargets({
5873
5983
  includeSimulated: config.getExperimentalSimulateCommands()
@@ -5894,7 +6004,7 @@ async function generateCommand(options) {
5894
6004
  let totalIgnoreOutputs = 0;
5895
6005
  if (config.getFeatures().includes("ignore")) {
5896
6006
  logger.info("Generating ignore files...");
5897
- for (const toolTarget of (0, import_es_toolkit.intersection)(config.getTargets(), IgnoreProcessor.getToolTargets())) {
6007
+ for (const toolTarget of (0, import_es_toolkit2.intersection)(config.getTargets(), IgnoreProcessor.getToolTargets())) {
5898
6008
  for (const baseDir of config.getBaseDirs()) {
5899
6009
  try {
5900
6010
  const processor = new IgnoreProcessor({
@@ -5903,7 +6013,10 @@ async function generateCommand(options) {
5903
6013
  });
5904
6014
  if (config.getDelete()) {
5905
6015
  const oldToolFiles = await processor.loadToolFiles();
5906
- await processor.removeAiFiles(oldToolFiles);
6016
+ const oldToolFilesForDelete = oldToolFiles.filter(
6017
+ (toolFile) => !(toolFile.getRelativeDirPath() === ClaudecodeIgnore.getSettablePaths().relativeDirPath && toolFile.getRelativeFilePath() === ClaudecodeIgnore.getSettablePaths().relativeFilePath)
6018
+ );
6019
+ await processor.removeAiFiles(oldToolFilesForDelete);
5907
6020
  }
5908
6021
  const rulesyncFiles = await processor.loadRulesyncFiles();
5909
6022
  if (rulesyncFiles.length > 0) {
@@ -5926,7 +6039,7 @@ async function generateCommand(options) {
5926
6039
  if (config.getFeatures().includes("subagents")) {
5927
6040
  logger.info("Generating subagent files...");
5928
6041
  for (const baseDir of config.getBaseDirs()) {
5929
- for (const toolTarget of (0, import_es_toolkit.intersection)(
6042
+ for (const toolTarget of (0, import_es_toolkit2.intersection)(
5930
6043
  config.getTargets(),
5931
6044
  SubagentsProcessor.getToolTargets({
5932
6045
  includeSimulated: config.getExperimentalSimulateSubagents()
@@ -5966,9 +6079,9 @@ async function generateCommand(options) {
5966
6079
  }
5967
6080
 
5968
6081
  // src/cli/commands/gitignore.ts
5969
- var import_node_path55 = require("path");
6082
+ var import_node_path56 = require("path");
5970
6083
  var gitignoreCommand = async () => {
5971
- const gitignorePath = (0, import_node_path55.join)(process.cwd(), ".gitignore");
6084
+ const gitignorePath = (0, import_node_path56.join)(process.cwd(), ".gitignore");
5972
6085
  const rulesFilesToIgnore = [
5973
6086
  "# Generated by rulesync - AI tool configuration files",
5974
6087
  "**/.amazonq/",
@@ -5982,6 +6095,7 @@ var gitignoreCommand = async () => {
5982
6095
  "**/.claude/memories/",
5983
6096
  "**/.claude/commands/",
5984
6097
  "**/.claude/agents/",
6098
+ "**/.claude/settings.local.json",
5985
6099
  "**/AGENTS.md",
5986
6100
  "**/.agents/",
5987
6101
  "**/.roo/rules/",
@@ -6158,7 +6272,7 @@ async function importCommand(options) {
6158
6272
  }
6159
6273
 
6160
6274
  // src/cli/commands/init.ts
6161
- var import_node_path56 = require("path");
6275
+ var import_node_path57 = require("path");
6162
6276
  async function initCommand() {
6163
6277
  logger.info("Initializing rulesync...");
6164
6278
  await ensureDir(RULESYNC_DIR);
@@ -6204,7 +6318,7 @@ globs: ["**/*"]
6204
6318
  - Follow single responsibility principle
6205
6319
  `
6206
6320
  };
6207
- const filepath = (0, import_node_path56.join)(RULESYNC_RULES_DIR, sampleFile.filename);
6321
+ const filepath = (0, import_node_path57.join)(RULESYNC_RULES_DIR, sampleFile.filename);
6208
6322
  await ensureDir(RULESYNC_RULES_DIR);
6209
6323
  await ensureDir(RulesyncCommand.getSettablePaths().relativeDirPath);
6210
6324
  await ensureDir(RULESYNC_SUBAGENTS_DIR);
@@ -6223,15 +6337,15 @@ var getVersion = async () => {
6223
6337
  let packageJsonPath;
6224
6338
  if (typeof import_meta !== "undefined" && import_meta.url) {
6225
6339
  const __filename = (0, import_node_url.fileURLToPath)(import_meta.url);
6226
- const __dirname = (0, import_node_path57.join)(__filename, "..");
6227
- packageJsonPath = (0, import_node_path57.join)(__dirname, "../../package.json");
6340
+ const __dirname = (0, import_node_path58.join)(__filename, "..");
6341
+ packageJsonPath = (0, import_node_path58.join)(__dirname, "../../package.json");
6228
6342
  } else {
6229
- packageJsonPath = (0, import_node_path57.join)(process.cwd(), "package.json");
6343
+ packageJsonPath = (0, import_node_path58.join)(process.cwd(), "package.json");
6230
6344
  }
6231
6345
  const packageJson = await readJsonFile(packageJsonPath);
6232
6346
  return packageJson.version;
6233
6347
  } catch {
6234
- return "1.0.1";
6348
+ return "1.2.0";
6235
6349
  }
6236
6350
  };
6237
6351
  var main = async () => {