rulesync 3.26.0 → 3.27.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.
package/README.md CHANGED
@@ -142,7 +142,7 @@ Rulesync supports both **generation** and **import** for All of the major AI cod
142
142
  | Gemini CLI | ✅ 🌏 | ✅ | ✅ 🌏 | ✅ 🌏 | 🎮 | 🎮 |
143
143
  | GitHub Copilot | ✅ | | ✅ | ✅ | 🎮 | 🎮 |
144
144
  | Cursor | ✅ | ✅ | ✅ | ✅ 🌏 | 🎮 | 🎮 |
145
- | OpenCode | ✅ | | | | | |
145
+ | OpenCode | ✅ | || | | |
146
146
  | Cline | ✅ | ✅ | ✅ | | | |
147
147
  | Roo Code | ✅ | ✅ | ✅ | ✅ | 🎮 | |
148
148
  | Qwen Code | ✅ | ✅ | | | | |
@@ -390,7 +390,21 @@ Example:
390
390
  }
391
391
  ```
392
392
 
393
- ### `.rulesyncignore`
393
+ ### `.rulesync/.aiignore` or `.rulesyncignore`
394
+
395
+ Rulesync supports a single ignore list that can live in either location below:
396
+
397
+ - `.rulesync/.aiignore` (recommended)
398
+ - `.rulesyncignore` (project root)
399
+
400
+ Rules and behavior:
401
+
402
+ - You may use either location.
403
+ - When both exist, Rulesync prefers `.rulesync/.aiignore` (recommended) over `.rulesyncignore` (legacy) when reading.
404
+ - If neither file exists yet, Rulesync defaults to creating `.rulesync/.aiignore`.
405
+
406
+ Notes:
407
+ - Running `rulesync init` will create `.rulesync/.aiignore` if no ignore file is present.
394
408
 
395
409
  Example:
396
410
 
package/dist/index.cjs CHANGED
@@ -499,6 +499,8 @@ var RULESYNC_RULES_RELATIVE_DIR_PATH = (0, import_node_path3.join)(RULESYNC_RELA
499
499
  var RULESYNC_COMMANDS_RELATIVE_DIR_PATH = (0, import_node_path3.join)(RULESYNC_RELATIVE_DIR_PATH, "commands");
500
500
  var RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = (0, import_node_path3.join)(RULESYNC_RELATIVE_DIR_PATH, "subagents");
501
501
  var RULESYNC_MCP_RELATIVE_FILE_PATH = (0, import_node_path3.join)(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
502
+ var RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
503
+ var RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = (0, import_node_path3.join)(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
502
504
  var RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
503
505
  var RULESYNC_OVERVIEW_FILE_NAME = "overview.md";
504
506
  var RULESYNC_SKILLS_RELATIVE_DIR_PATH = (0, import_node_path3.join)(RULESYNC_RELATIVE_DIR_PATH, "skills");
@@ -1938,18 +1940,48 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1938
1940
  }
1939
1941
  static getSettablePaths() {
1940
1942
  return {
1941
- relativeDirPath: ".",
1942
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH
1943
+ recommended: {
1944
+ relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
1945
+ relativeFilePath: RULESYNC_AIIGNORE_FILE_NAME
1946
+ },
1947
+ legacy: {
1948
+ relativeDirPath: ".",
1949
+ relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH
1950
+ }
1943
1951
  };
1944
1952
  }
1945
1953
  static async fromFile() {
1946
1954
  const baseDir = process.cwd();
1947
- const filePath = (0, import_node_path15.join)(baseDir, this.getSettablePaths().relativeFilePath);
1948
- const fileContent = await readFileContent(filePath);
1955
+ const paths = this.getSettablePaths();
1956
+ const recommendedPath = (0, import_node_path15.join)(
1957
+ baseDir,
1958
+ paths.recommended.relativeDirPath,
1959
+ paths.recommended.relativeFilePath
1960
+ );
1961
+ const legacyPath = (0, import_node_path15.join)(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
1962
+ if (await fileExists(recommendedPath)) {
1963
+ const fileContent2 = await readFileContent(recommendedPath);
1964
+ return new _RulesyncIgnore({
1965
+ baseDir,
1966
+ relativeDirPath: paths.recommended.relativeDirPath,
1967
+ relativeFilePath: paths.recommended.relativeFilePath,
1968
+ fileContent: fileContent2
1969
+ });
1970
+ }
1971
+ if (await fileExists(legacyPath)) {
1972
+ const fileContent2 = await readFileContent(legacyPath);
1973
+ return new _RulesyncIgnore({
1974
+ baseDir,
1975
+ relativeDirPath: paths.legacy.relativeDirPath,
1976
+ relativeFilePath: paths.legacy.relativeFilePath,
1977
+ fileContent: fileContent2
1978
+ });
1979
+ }
1980
+ const fileContent = await readFileContent(recommendedPath);
1949
1981
  return new _RulesyncIgnore({
1950
1982
  baseDir,
1951
- relativeDirPath: this.getSettablePaths().relativeDirPath,
1952
- relativeFilePath: this.getSettablePaths().relativeFilePath,
1983
+ relativeDirPath: paths.recommended.relativeDirPath,
1984
+ relativeFilePath: paths.recommended.relativeFilePath,
1953
1985
  fileContent
1954
1986
  });
1955
1987
  }
@@ -1986,8 +2018,8 @@ var ToolIgnore = class extends ToolFile {
1986
2018
  toRulesyncIgnoreDefault() {
1987
2019
  return new RulesyncIgnore({
1988
2020
  baseDir: ".",
1989
- relativeDirPath: ".",
1990
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
2021
+ relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
2022
+ relativeFilePath: RULESYNC_AIIGNORE_FILE_NAME,
1991
2023
  fileContent: this.fileContent
1992
2024
  });
1993
2025
  }
@@ -2131,8 +2163,8 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2131
2163
  const fileContent = rulesyncPatterns.join("\n");
2132
2164
  return new RulesyncIgnore({
2133
2165
  baseDir: this.baseDir,
2134
- relativeDirPath: RulesyncIgnore.getSettablePaths().relativeDirPath,
2135
- relativeFilePath: RulesyncIgnore.getSettablePaths().relativeFilePath,
2166
+ relativeDirPath: RulesyncIgnore.getSettablePaths().recommended.relativeDirPath,
2167
+ relativeFilePath: RulesyncIgnore.getSettablePaths().recommended.relativeFilePath,
2136
2168
  fileContent
2137
2169
  });
2138
2170
  }
@@ -2254,7 +2286,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2254
2286
  return new RulesyncIgnore({
2255
2287
  baseDir: ".",
2256
2288
  relativeDirPath: ".",
2257
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
2289
+ relativeFilePath: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
2258
2290
  fileContent: this.fileContent
2259
2291
  });
2260
2292
  }
@@ -2661,7 +2693,7 @@ var IgnoreProcessor = class extends FeatureProcessor {
2661
2693
  (file) => file instanceof RulesyncIgnore
2662
2694
  );
2663
2695
  if (!rulesyncIgnore) {
2664
- throw new Error(`No ${RULESYNC_IGNORE_RELATIVE_FILE_PATH} found.`);
2696
+ throw new Error(`No ${RULESYNC_AIIGNORE_RELATIVE_FILE_PATH} found.`);
2665
2697
  }
2666
2698
  const toolIgnores = await Promise.all(
2667
2699
  [rulesyncIgnore].map(async (rulesyncIgnore2) => {
@@ -8977,7 +9009,7 @@ async function initCommand() {
8977
9009
  logger.success("rulesync initialized successfully!");
8978
9010
  logger.info("Next steps:");
8979
9011
  logger.info(
8980
- `1. Edit ${RULESYNC_RELATIVE_DIR_PATH}/**/*.md, ${RULESYNC_MCP_RELATIVE_FILE_PATH} and ${RULESYNC_IGNORE_RELATIVE_FILE_PATH}`
9012
+ `1. Edit ${RULESYNC_RELATIVE_DIR_PATH}/**/*.md, ${RULESYNC_MCP_RELATIVE_FILE_PATH} and ${RULESYNC_AIIGNORE_RELATIVE_FILE_PATH}`
8981
9013
  );
8982
9014
  logger.info("2. Run 'rulesync generate' to create configuration files");
8983
9015
  }
@@ -9130,7 +9162,7 @@ Attention, again, you are just the planner, so though you can read any files and
9130
9162
  await ensureDir(mcpPaths.recommended.relativeDirPath);
9131
9163
  await ensureDir(commandPaths.relativeDirPath);
9132
9164
  await ensureDir(subagentPaths.relativeDirPath);
9133
- await ensureDir(ignorePaths.relativeDirPath);
9165
+ await ensureDir(ignorePaths.recommended.relativeDirPath);
9134
9166
  const ruleFilepath = (0, import_node_path81.join)(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
9135
9167
  if (!await fileExists(ruleFilepath)) {
9136
9168
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
@@ -9162,7 +9194,10 @@ Attention, again, you are just the planner, so though you can read any files and
9162
9194
  } else {
9163
9195
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
9164
9196
  }
9165
- const ignoreFilepath = (0, import_node_path81.join)(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
9197
+ const ignoreFilepath = (0, import_node_path81.join)(
9198
+ ignorePaths.recommended.relativeDirPath,
9199
+ ignorePaths.recommended.relativeFilePath
9200
+ );
9166
9201
  if (!await fileExists(ignoreFilepath)) {
9167
9202
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
9168
9203
  logger.success(`Created ${ignoreFilepath}`);
@@ -9357,21 +9392,21 @@ var import_node_path83 = require("path");
9357
9392
  var import_mini31 = require("zod/mini");
9358
9393
  var maxIgnoreFileSizeBytes = 100 * 1024;
9359
9394
  async function getIgnoreFile() {
9360
- const ignoreFilePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9395
+ const ignoreFilePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9361
9396
  try {
9362
9397
  const content = await readFileContent(ignoreFilePath);
9363
9398
  return {
9364
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
9399
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
9365
9400
  content
9366
9401
  };
9367
9402
  } catch (error) {
9368
- throw new Error(`Failed to read .rulesyncignore file: ${formatError(error)}`, {
9403
+ throw new Error(`Failed to read .rulesync/.aiignore file: ${formatError(error)}`, {
9369
9404
  cause: error
9370
9405
  });
9371
9406
  }
9372
9407
  }
9373
9408
  async function putIgnoreFile({ content }) {
9374
- const ignoreFilePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9409
+ const ignoreFilePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9375
9410
  const contentSizeBytes = Buffer.byteLength(content, "utf8");
9376
9411
  if (contentSizeBytes > maxIgnoreFileSizeBytes) {
9377
9412
  throw new Error(
@@ -9382,26 +9417,32 @@ async function putIgnoreFile({ content }) {
9382
9417
  await ensureDir(process.cwd());
9383
9418
  await writeFileContent(ignoreFilePath, content);
9384
9419
  return {
9385
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
9420
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
9386
9421
  content
9387
9422
  };
9388
9423
  } catch (error) {
9389
- throw new Error(`Failed to write .rulesyncignore file: ${formatError(error)}`, {
9424
+ throw new Error(`Failed to write .rulesync/.aiignore file: ${formatError(error)}`, {
9390
9425
  cause: error
9391
9426
  });
9392
9427
  }
9393
9428
  }
9394
9429
  async function deleteIgnoreFile() {
9395
- const ignoreFilePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9430
+ const aiignorePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9431
+ const legacyIgnorePath = (0, import_node_path83.join)(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9396
9432
  try {
9397
- await removeFile(ignoreFilePath);
9433
+ await Promise.all([removeFile(aiignorePath), removeFile(legacyIgnorePath)]);
9398
9434
  return {
9399
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH
9435
+ // Keep the historical return shape — point to the recommended file path
9436
+ // for backward compatibility.
9437
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH
9400
9438
  };
9401
9439
  } catch (error) {
9402
- throw new Error(`Failed to delete .rulesyncignore file: ${formatError(error)}`, {
9403
- cause: error
9404
- });
9440
+ throw new Error(
9441
+ `Failed to delete .rulesyncignore and .rulesync/.aiignore files: ${formatError(error)}`,
9442
+ {
9443
+ cause: error
9444
+ }
9445
+ );
9405
9446
  }
9406
9447
  }
9407
9448
  var ignoreToolSchemas = {
@@ -9423,7 +9464,7 @@ var ignoreTools = {
9423
9464
  },
9424
9465
  putIgnoreFile: {
9425
9466
  name: "putIgnoreFile",
9426
- description: "Create or update the .rulesyncignore file (upsert operation). content parameter is required.",
9467
+ description: "Create or update the .rulesync/.aiignore file (upsert operation). content parameter is required.",
9427
9468
  parameters: ignoreToolSchemas.putIgnoreFile,
9428
9469
  execute: async (args) => {
9429
9470
  const result = await putIgnoreFile({ content: args.content });
@@ -9432,7 +9473,7 @@ var ignoreTools = {
9432
9473
  },
9433
9474
  deleteIgnoreFile: {
9434
9475
  name: "deleteIgnoreFile",
9435
- description: "Delete the .rulesyncignore file from the project root.",
9476
+ description: "Delete the .rulesyncignore and .rulesync/.aiignore files.",
9436
9477
  parameters: ignoreToolSchemas.deleteIgnoreFile,
9437
9478
  execute: async () => {
9438
9479
  const result = await deleteIgnoreFile();
@@ -9963,7 +10004,7 @@ async function mcpCommand({ version }) {
9963
10004
  }
9964
10005
 
9965
10006
  // src/cli/index.ts
9966
- var getVersion = () => "3.26.0";
10007
+ var getVersion = () => "3.27.0";
9967
10008
  var main = async () => {
9968
10009
  const program = new import_commander.Command();
9969
10010
  const version = getVersion();
package/dist/index.js CHANGED
@@ -476,6 +476,8 @@ var RULESYNC_RULES_RELATIVE_DIR_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, "rules"
476
476
  var RULESYNC_COMMANDS_RELATIVE_DIR_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, "commands");
477
477
  var RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, "subagents");
478
478
  var RULESYNC_MCP_RELATIVE_FILE_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, "mcp.json");
479
+ var RULESYNC_AIIGNORE_FILE_NAME = ".aiignore";
480
+ var RULESYNC_AIIGNORE_RELATIVE_FILE_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, ".aiignore");
479
481
  var RULESYNC_IGNORE_RELATIVE_FILE_PATH = ".rulesyncignore";
480
482
  var RULESYNC_OVERVIEW_FILE_NAME = "overview.md";
481
483
  var RULESYNC_SKILLS_RELATIVE_DIR_PATH = join2(RULESYNC_RELATIVE_DIR_PATH, "skills");
@@ -1915,18 +1917,48 @@ var RulesyncIgnore = class _RulesyncIgnore extends RulesyncFile {
1915
1917
  }
1916
1918
  static getSettablePaths() {
1917
1919
  return {
1918
- relativeDirPath: ".",
1919
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH
1920
+ recommended: {
1921
+ relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
1922
+ relativeFilePath: RULESYNC_AIIGNORE_FILE_NAME
1923
+ },
1924
+ legacy: {
1925
+ relativeDirPath: ".",
1926
+ relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH
1927
+ }
1920
1928
  };
1921
1929
  }
1922
1930
  static async fromFile() {
1923
1931
  const baseDir = process.cwd();
1924
- const filePath = join13(baseDir, this.getSettablePaths().relativeFilePath);
1925
- const fileContent = await readFileContent(filePath);
1932
+ const paths = this.getSettablePaths();
1933
+ const recommendedPath = join13(
1934
+ baseDir,
1935
+ paths.recommended.relativeDirPath,
1936
+ paths.recommended.relativeFilePath
1937
+ );
1938
+ const legacyPath = join13(baseDir, paths.legacy.relativeDirPath, paths.legacy.relativeFilePath);
1939
+ if (await fileExists(recommendedPath)) {
1940
+ const fileContent2 = await readFileContent(recommendedPath);
1941
+ return new _RulesyncIgnore({
1942
+ baseDir,
1943
+ relativeDirPath: paths.recommended.relativeDirPath,
1944
+ relativeFilePath: paths.recommended.relativeFilePath,
1945
+ fileContent: fileContent2
1946
+ });
1947
+ }
1948
+ if (await fileExists(legacyPath)) {
1949
+ const fileContent2 = await readFileContent(legacyPath);
1950
+ return new _RulesyncIgnore({
1951
+ baseDir,
1952
+ relativeDirPath: paths.legacy.relativeDirPath,
1953
+ relativeFilePath: paths.legacy.relativeFilePath,
1954
+ fileContent: fileContent2
1955
+ });
1956
+ }
1957
+ const fileContent = await readFileContent(recommendedPath);
1926
1958
  return new _RulesyncIgnore({
1927
1959
  baseDir,
1928
- relativeDirPath: this.getSettablePaths().relativeDirPath,
1929
- relativeFilePath: this.getSettablePaths().relativeFilePath,
1960
+ relativeDirPath: paths.recommended.relativeDirPath,
1961
+ relativeFilePath: paths.recommended.relativeFilePath,
1930
1962
  fileContent
1931
1963
  });
1932
1964
  }
@@ -1963,8 +1995,8 @@ var ToolIgnore = class extends ToolFile {
1963
1995
  toRulesyncIgnoreDefault() {
1964
1996
  return new RulesyncIgnore({
1965
1997
  baseDir: ".",
1966
- relativeDirPath: ".",
1967
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
1998
+ relativeDirPath: RULESYNC_RELATIVE_DIR_PATH,
1999
+ relativeFilePath: RULESYNC_AIIGNORE_FILE_NAME,
1968
2000
  fileContent: this.fileContent
1969
2001
  });
1970
2002
  }
@@ -2108,8 +2140,8 @@ var ClaudecodeIgnore = class _ClaudecodeIgnore extends ToolIgnore {
2108
2140
  const fileContent = rulesyncPatterns.join("\n");
2109
2141
  return new RulesyncIgnore({
2110
2142
  baseDir: this.baseDir,
2111
- relativeDirPath: RulesyncIgnore.getSettablePaths().relativeDirPath,
2112
- relativeFilePath: RulesyncIgnore.getSettablePaths().relativeFilePath,
2143
+ relativeDirPath: RulesyncIgnore.getSettablePaths().recommended.relativeDirPath,
2144
+ relativeFilePath: RulesyncIgnore.getSettablePaths().recommended.relativeFilePath,
2113
2145
  fileContent
2114
2146
  });
2115
2147
  }
@@ -2231,7 +2263,7 @@ var CursorIgnore = class _CursorIgnore extends ToolIgnore {
2231
2263
  return new RulesyncIgnore({
2232
2264
  baseDir: ".",
2233
2265
  relativeDirPath: ".",
2234
- relativeFilePath: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
2266
+ relativeFilePath: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
2235
2267
  fileContent: this.fileContent
2236
2268
  });
2237
2269
  }
@@ -2638,7 +2670,7 @@ var IgnoreProcessor = class extends FeatureProcessor {
2638
2670
  (file) => file instanceof RulesyncIgnore
2639
2671
  );
2640
2672
  if (!rulesyncIgnore) {
2641
- throw new Error(`No ${RULESYNC_IGNORE_RELATIVE_FILE_PATH} found.`);
2673
+ throw new Error(`No ${RULESYNC_AIIGNORE_RELATIVE_FILE_PATH} found.`);
2642
2674
  }
2643
2675
  const toolIgnores = await Promise.all(
2644
2676
  [rulesyncIgnore].map(async (rulesyncIgnore2) => {
@@ -8954,7 +8986,7 @@ async function initCommand() {
8954
8986
  logger.success("rulesync initialized successfully!");
8955
8987
  logger.info("Next steps:");
8956
8988
  logger.info(
8957
- `1. Edit ${RULESYNC_RELATIVE_DIR_PATH}/**/*.md, ${RULESYNC_MCP_RELATIVE_FILE_PATH} and ${RULESYNC_IGNORE_RELATIVE_FILE_PATH}`
8989
+ `1. Edit ${RULESYNC_RELATIVE_DIR_PATH}/**/*.md, ${RULESYNC_MCP_RELATIVE_FILE_PATH} and ${RULESYNC_AIIGNORE_RELATIVE_FILE_PATH}`
8958
8990
  );
8959
8991
  logger.info("2. Run 'rulesync generate' to create configuration files");
8960
8992
  }
@@ -9107,7 +9139,7 @@ Attention, again, you are just the planner, so though you can read any files and
9107
9139
  await ensureDir(mcpPaths.recommended.relativeDirPath);
9108
9140
  await ensureDir(commandPaths.relativeDirPath);
9109
9141
  await ensureDir(subagentPaths.relativeDirPath);
9110
- await ensureDir(ignorePaths.relativeDirPath);
9142
+ await ensureDir(ignorePaths.recommended.relativeDirPath);
9111
9143
  const ruleFilepath = join79(rulePaths.recommended.relativeDirPath, sampleRuleFile.filename);
9112
9144
  if (!await fileExists(ruleFilepath)) {
9113
9145
  await writeFileContent(ruleFilepath, sampleRuleFile.content);
@@ -9139,7 +9171,10 @@ Attention, again, you are just the planner, so though you can read any files and
9139
9171
  } else {
9140
9172
  logger.info(`Skipped ${subagentFilepath} (already exists)`);
9141
9173
  }
9142
- const ignoreFilepath = join79(ignorePaths.relativeDirPath, ignorePaths.relativeFilePath);
9174
+ const ignoreFilepath = join79(
9175
+ ignorePaths.recommended.relativeDirPath,
9176
+ ignorePaths.recommended.relativeFilePath
9177
+ );
9143
9178
  if (!await fileExists(ignoreFilepath)) {
9144
9179
  await writeFileContent(ignoreFilepath, sampleIgnoreFile.content);
9145
9180
  logger.success(`Created ${ignoreFilepath}`);
@@ -9334,21 +9369,21 @@ import { join as join81 } from "path";
9334
9369
  import { z as z31 } from "zod/mini";
9335
9370
  var maxIgnoreFileSizeBytes = 100 * 1024;
9336
9371
  async function getIgnoreFile() {
9337
- const ignoreFilePath = join81(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9372
+ const ignoreFilePath = join81(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9338
9373
  try {
9339
9374
  const content = await readFileContent(ignoreFilePath);
9340
9375
  return {
9341
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
9376
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
9342
9377
  content
9343
9378
  };
9344
9379
  } catch (error) {
9345
- throw new Error(`Failed to read .rulesyncignore file: ${formatError(error)}`, {
9380
+ throw new Error(`Failed to read .rulesync/.aiignore file: ${formatError(error)}`, {
9346
9381
  cause: error
9347
9382
  });
9348
9383
  }
9349
9384
  }
9350
9385
  async function putIgnoreFile({ content }) {
9351
- const ignoreFilePath = join81(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9386
+ const ignoreFilePath = join81(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9352
9387
  const contentSizeBytes = Buffer.byteLength(content, "utf8");
9353
9388
  if (contentSizeBytes > maxIgnoreFileSizeBytes) {
9354
9389
  throw new Error(
@@ -9359,26 +9394,32 @@ async function putIgnoreFile({ content }) {
9359
9394
  await ensureDir(process.cwd());
9360
9395
  await writeFileContent(ignoreFilePath, content);
9361
9396
  return {
9362
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH,
9397
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH,
9363
9398
  content
9364
9399
  };
9365
9400
  } catch (error) {
9366
- throw new Error(`Failed to write .rulesyncignore file: ${formatError(error)}`, {
9401
+ throw new Error(`Failed to write .rulesync/.aiignore file: ${formatError(error)}`, {
9367
9402
  cause: error
9368
9403
  });
9369
9404
  }
9370
9405
  }
9371
9406
  async function deleteIgnoreFile() {
9372
- const ignoreFilePath = join81(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9407
+ const aiignorePath = join81(process.cwd(), RULESYNC_AIIGNORE_RELATIVE_FILE_PATH);
9408
+ const legacyIgnorePath = join81(process.cwd(), RULESYNC_IGNORE_RELATIVE_FILE_PATH);
9373
9409
  try {
9374
- await removeFile(ignoreFilePath);
9410
+ await Promise.all([removeFile(aiignorePath), removeFile(legacyIgnorePath)]);
9375
9411
  return {
9376
- relativePathFromCwd: RULESYNC_IGNORE_RELATIVE_FILE_PATH
9412
+ // Keep the historical return shape — point to the recommended file path
9413
+ // for backward compatibility.
9414
+ relativePathFromCwd: RULESYNC_AIIGNORE_RELATIVE_FILE_PATH
9377
9415
  };
9378
9416
  } catch (error) {
9379
- throw new Error(`Failed to delete .rulesyncignore file: ${formatError(error)}`, {
9380
- cause: error
9381
- });
9417
+ throw new Error(
9418
+ `Failed to delete .rulesyncignore and .rulesync/.aiignore files: ${formatError(error)}`,
9419
+ {
9420
+ cause: error
9421
+ }
9422
+ );
9382
9423
  }
9383
9424
  }
9384
9425
  var ignoreToolSchemas = {
@@ -9400,7 +9441,7 @@ var ignoreTools = {
9400
9441
  },
9401
9442
  putIgnoreFile: {
9402
9443
  name: "putIgnoreFile",
9403
- description: "Create or update the .rulesyncignore file (upsert operation). content parameter is required.",
9444
+ description: "Create or update the .rulesync/.aiignore file (upsert operation). content parameter is required.",
9404
9445
  parameters: ignoreToolSchemas.putIgnoreFile,
9405
9446
  execute: async (args) => {
9406
9447
  const result = await putIgnoreFile({ content: args.content });
@@ -9409,7 +9450,7 @@ var ignoreTools = {
9409
9450
  },
9410
9451
  deleteIgnoreFile: {
9411
9452
  name: "deleteIgnoreFile",
9412
- description: "Delete the .rulesyncignore file from the project root.",
9453
+ description: "Delete the .rulesyncignore and .rulesync/.aiignore files.",
9413
9454
  parameters: ignoreToolSchemas.deleteIgnoreFile,
9414
9455
  execute: async () => {
9415
9456
  const result = await deleteIgnoreFile();
@@ -9940,7 +9981,7 @@ async function mcpCommand({ version }) {
9940
9981
  }
9941
9982
 
9942
9983
  // src/cli/index.ts
9943
- var getVersion = () => "3.26.0";
9984
+ var getVersion = () => "3.27.0";
9944
9985
  var main = async () => {
9945
9986
  const program = new Command();
9946
9987
  const version = getVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "3.26.0",
3
+ "version": "3.27.0",
4
4
  "description": "Unified AI rules management CLI tool that generates configuration files for various AI development tools",
5
5
  "keywords": [
6
6
  "ai",