rulesync 5.9.0 → 6.0.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/dist/index.cjs CHANGED
@@ -938,9 +938,6 @@ var RulesyncFile = class extends AiFile {
938
938
  static async fromFile(_params) {
939
939
  throw new Error("Please implement this method in the subclass.");
940
940
  }
941
- static async fromFileLegacy(_params) {
942
- throw new Error("Please implement this method in the subclass.");
943
- }
944
941
  };
945
942
 
946
943
  // src/features/commands/rulesync-command.ts
@@ -9025,47 +9022,6 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
9025
9022
  };
9026
9023
  }
9027
9024
  }
9028
- static async fromFileLegacy({
9029
- relativeFilePath,
9030
- validate = true
9031
- }) {
9032
- const legacyPath = (0, import_node_path75.join)(
9033
- process.cwd(),
9034
- this.getSettablePaths().legacy.relativeDirPath,
9035
- relativeFilePath
9036
- );
9037
- const recommendedPath = (0, import_node_path75.join)(
9038
- this.getSettablePaths().recommended.relativeDirPath,
9039
- relativeFilePath
9040
- );
9041
- logger.warn(
9042
- `\u26A0\uFE0F Using deprecated path "${legacyPath}". Please migrate to "${recommendedPath}"`
9043
- );
9044
- const fileContent = await readFileContent(legacyPath);
9045
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
9046
- const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
9047
- if (!result.success) {
9048
- throw new Error(`Invalid frontmatter in ${legacyPath}: ${formatError(result.error)}`);
9049
- }
9050
- const validatedFrontmatter = {
9051
- root: result.data.root ?? false,
9052
- localRoot: result.data.localRoot ?? false,
9053
- targets: result.data.targets ?? ["*"],
9054
- description: result.data.description ?? "",
9055
- globs: result.data.globs ?? [],
9056
- agentsmd: result.data.agentsmd,
9057
- cursor: result.data.cursor
9058
- };
9059
- const filename = (0, import_node_path75.basename)(legacyPath);
9060
- return new _RulesyncRule({
9061
- baseDir: process.cwd(),
9062
- relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
9063
- relativeFilePath: filename,
9064
- frontmatter: validatedFrontmatter,
9065
- body: content.trim(),
9066
- validate
9067
- });
9068
- }
9069
9025
  static async fromFile({
9070
9026
  relativeFilePath,
9071
9027
  validate = true
@@ -9927,7 +9883,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
9927
9883
  }
9928
9884
  return {
9929
9885
  root: {
9930
- relativeDirPath: ".claude",
9886
+ relativeDirPath: ".",
9931
9887
  relativeFilePath: "CLAUDE.md"
9932
9888
  },
9933
9889
  nonRoot: {
@@ -11803,7 +11759,7 @@ var RulesProcessor = class extends FeatureProcessor {
11803
11759
  }
11804
11760
  /**
11805
11761
  * Handle localRoot rule generation based on tool target.
11806
- * - Claude Code: generates `.claude/CLAUDE.local.md`
11762
+ * - Claude Code: generates `./CLAUDE.local.md`
11807
11763
  * - Claude Code Legacy: generates `./CLAUDE.local.md`
11808
11764
  * - Other tools: appends content to the root file with one blank line separator
11809
11765
  */
@@ -11941,13 +11897,6 @@ var RulesProcessor = class extends FeatureProcessor {
11941
11897
  }
11942
11898
  return rulesyncRules;
11943
11899
  }
11944
- async loadRulesyncFilesLegacy() {
11945
- const legacyFiles = await findFilesByGlobs((0, import_node_path97.join)(RULESYNC_RELATIVE_DIR_PATH, "*.md"));
11946
- logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
11947
- return Promise.all(
11948
- legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: (0, import_node_path97.basename)(file) }))
11949
- );
11950
- }
11951
11900
  /**
11952
11901
  * Implementation of abstract method from FeatureProcessor
11953
11902
  * Load tool-specific rule configurations and parse them into ToolRule instances
@@ -12547,6 +12496,7 @@ var RULESYNC_IGNORE_ENTRIES = [
12547
12496
  "**/WARP.md",
12548
12497
  // Others
12549
12498
  "**/modular-mcp.json",
12499
+ ".rulesync/rules/*.local.md",
12550
12500
  "!.rulesync/.aiignore"
12551
12501
  ];
12552
12502
  var isRulesyncHeader = (line) => {
@@ -14243,7 +14193,7 @@ async function mcpCommand({ version }) {
14243
14193
  }
14244
14194
 
14245
14195
  // src/cli/index.ts
14246
- var getVersion = () => "5.9.0";
14196
+ var getVersion = () => "6.0.0";
14247
14197
  var main = async () => {
14248
14198
  const program = new import_commander.Command();
14249
14199
  const version = getVersion();
package/dist/index.js CHANGED
@@ -915,9 +915,6 @@ var RulesyncFile = class extends AiFile {
915
915
  static async fromFile(_params) {
916
916
  throw new Error("Please implement this method in the subclass.");
917
917
  }
918
- static async fromFileLegacy(_params) {
919
- throw new Error("Please implement this method in the subclass.");
920
- }
921
918
  };
922
919
 
923
920
  // src/features/commands/rulesync-command.ts
@@ -9002,47 +8999,6 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
9002
8999
  };
9003
9000
  }
9004
9001
  }
9005
- static async fromFileLegacy({
9006
- relativeFilePath,
9007
- validate = true
9008
- }) {
9009
- const legacyPath = join73(
9010
- process.cwd(),
9011
- this.getSettablePaths().legacy.relativeDirPath,
9012
- relativeFilePath
9013
- );
9014
- const recommendedPath = join73(
9015
- this.getSettablePaths().recommended.relativeDirPath,
9016
- relativeFilePath
9017
- );
9018
- logger.warn(
9019
- `\u26A0\uFE0F Using deprecated path "${legacyPath}". Please migrate to "${recommendedPath}"`
9020
- );
9021
- const fileContent = await readFileContent(legacyPath);
9022
- const { frontmatter, body: content } = parseFrontmatter(fileContent);
9023
- const result = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
9024
- if (!result.success) {
9025
- throw new Error(`Invalid frontmatter in ${legacyPath}: ${formatError(result.error)}`);
9026
- }
9027
- const validatedFrontmatter = {
9028
- root: result.data.root ?? false,
9029
- localRoot: result.data.localRoot ?? false,
9030
- targets: result.data.targets ?? ["*"],
9031
- description: result.data.description ?? "",
9032
- globs: result.data.globs ?? [],
9033
- agentsmd: result.data.agentsmd,
9034
- cursor: result.data.cursor
9035
- };
9036
- const filename = basename22(legacyPath);
9037
- return new _RulesyncRule({
9038
- baseDir: process.cwd(),
9039
- relativeDirPath: this.getSettablePaths().recommended.relativeDirPath,
9040
- relativeFilePath: filename,
9041
- frontmatter: validatedFrontmatter,
9042
- body: content.trim(),
9043
- validate
9044
- });
9045
- }
9046
9002
  static async fromFile({
9047
9003
  relativeFilePath,
9048
9004
  validate = true
@@ -9904,7 +9860,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
9904
9860
  }
9905
9861
  return {
9906
9862
  root: {
9907
- relativeDirPath: ".claude",
9863
+ relativeDirPath: ".",
9908
9864
  relativeFilePath: "CLAUDE.md"
9909
9865
  },
9910
9866
  nonRoot: {
@@ -11780,7 +11736,7 @@ var RulesProcessor = class extends FeatureProcessor {
11780
11736
  }
11781
11737
  /**
11782
11738
  * Handle localRoot rule generation based on tool target.
11783
- * - Claude Code: generates `.claude/CLAUDE.local.md`
11739
+ * - Claude Code: generates `./CLAUDE.local.md`
11784
11740
  * - Claude Code Legacy: generates `./CLAUDE.local.md`
11785
11741
  * - Other tools: appends content to the root file with one blank line separator
11786
11742
  */
@@ -11918,13 +11874,6 @@ var RulesProcessor = class extends FeatureProcessor {
11918
11874
  }
11919
11875
  return rulesyncRules;
11920
11876
  }
11921
- async loadRulesyncFilesLegacy() {
11922
- const legacyFiles = await findFilesByGlobs(join95(RULESYNC_RELATIVE_DIR_PATH, "*.md"));
11923
- logger.debug(`Found ${legacyFiles.length} legacy rulesync files`);
11924
- return Promise.all(
11925
- legacyFiles.map((file) => RulesyncRule.fromFileLegacy({ relativeFilePath: basename24(file) }))
11926
- );
11927
- }
11928
11877
  /**
11929
11878
  * Implementation of abstract method from FeatureProcessor
11930
11879
  * Load tool-specific rule configurations and parse them into ToolRule instances
@@ -12524,6 +12473,7 @@ var RULESYNC_IGNORE_ENTRIES = [
12524
12473
  "**/WARP.md",
12525
12474
  // Others
12526
12475
  "**/modular-mcp.json",
12476
+ ".rulesync/rules/*.local.md",
12527
12477
  "!.rulesync/.aiignore"
12528
12478
  ];
12529
12479
  var isRulesyncHeader = (line) => {
@@ -14220,7 +14170,7 @@ async function mcpCommand({ version }) {
14220
14170
  }
14221
14171
 
14222
14172
  // src/cli/index.ts
14223
- var getVersion = () => "5.9.0";
14173
+ var getVersion = () => "6.0.0";
14224
14174
  var main = async () => {
14225
14175
  const program = new Command();
14226
14176
  const version = getVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rulesync",
3
- "version": "5.9.0",
3
+ "version": "6.0.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",