rulesync 8.3.0 → 8.5.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.
@@ -30,8 +30,13 @@ var ALL_FEATURES = [
30
30
  var ALL_FEATURES_WITH_WILDCARD = [...ALL_FEATURES, "*"];
31
31
  var FeatureSchema = z.enum(ALL_FEATURES);
32
32
  var FeaturesSchema = z.array(FeatureSchema);
33
+ var GitignoreDestinationSchema = z.enum(["gitignore", "gitattributes"]);
33
34
  var FeatureOptionsSchema = z.record(z.string(), z.unknown());
34
- var FeatureValueSchema = z.union([z.boolean(), FeatureOptionsSchema]);
35
+ var FeatureValueSchema = z.union([
36
+ z.boolean(),
37
+ FeatureOptionsSchema,
38
+ GitignoreDestinationSchema
39
+ ]);
35
40
  var PerFeatureConfigSchema = z.record(z.string(), FeatureValueSchema);
36
41
  var PerTargetFeaturesValueSchema = z.union([
37
42
  z.array(z.enum(ALL_FEATURES_WITH_WILDCARD)),
@@ -327,6 +332,7 @@ function hasControlCharacters(value) {
327
332
  }
328
333
 
329
334
  // src/config/config.ts
335
+ var GITIGNORE_DESTINATION_KEY = "gitignoreDestination";
330
336
  var SourceEntrySchema = z3.object({
331
337
  source: z3.string().check(minLength(1, "source must be a non-empty string")),
332
338
  skills: optional(z3.array(z3.string())),
@@ -358,6 +364,7 @@ var ConfigParamsSchema = z3.object({
358
364
  simulateSubagents: optional(z3.boolean()),
359
365
  simulateSkills: optional(z3.boolean()),
360
366
  gitignoreTargetsOnly: optional(z3.boolean()),
367
+ gitignoreDestination: optional(GitignoreDestinationSchema),
361
368
  dryRun: optional(z3.boolean()),
362
369
  check: optional(z3.boolean()),
363
370
  // Declarative skill sources
@@ -418,6 +425,7 @@ var Config = class _Config {
418
425
  simulateSubagents;
419
426
  simulateSkills;
420
427
  gitignoreTargetsOnly;
428
+ gitignoreDestination;
421
429
  dryRun;
422
430
  check;
423
431
  sources;
@@ -433,6 +441,7 @@ var Config = class _Config {
433
441
  simulateSubagents,
434
442
  simulateSkills,
435
443
  gitignoreTargetsOnly,
444
+ gitignoreDestination,
436
445
  dryRun,
437
446
  check,
438
447
  sources
@@ -458,6 +467,7 @@ var Config = class _Config {
458
467
  this.simulateSubagents = simulateSubagents ?? false;
459
468
  this.simulateSkills = simulateSkills ?? false;
460
469
  this.gitignoreTargetsOnly = gitignoreTargetsOnly ?? true;
470
+ this.gitignoreDestination = gitignoreDestination ?? "gitignore";
461
471
  this.dryRun = dryRun ?? false;
462
472
  this.check = check ?? false;
463
473
  this.sources = sources ?? [];
@@ -615,6 +625,36 @@ var Config = class _Config {
615
625
  }
616
626
  return void 0;
617
627
  }
628
+ getGitignoreDestination(target, feature) {
629
+ const rootLevel = this.gitignoreDestination;
630
+ if (!isRulesyncConfigTargetsObject(this.targets)) {
631
+ return rootLevel;
632
+ }
633
+ const targetValue = this.targets[target];
634
+ if (!targetValue || Array.isArray(targetValue)) {
635
+ return rootLevel;
636
+ }
637
+ const perFeature = targetValue;
638
+ const toolLevel = _Config.parseGitignoreDestination(perFeature[GITIGNORE_DESTINATION_KEY]);
639
+ if (feature) {
640
+ const featureValue = perFeature[feature];
641
+ if (featureValue && typeof featureValue === "object" && !Array.isArray(featureValue)) {
642
+ const featureLevel = _Config.parseGitignoreDestination(
643
+ featureValue[GITIGNORE_DESTINATION_KEY]
644
+ );
645
+ if (featureLevel) {
646
+ return featureLevel;
647
+ }
648
+ }
649
+ }
650
+ return toolLevel ?? rootLevel;
651
+ }
652
+ static parseGitignoreDestination(value) {
653
+ if (value === "gitignore" || value === "gitattributes") {
654
+ return value;
655
+ }
656
+ return void 0;
657
+ }
618
658
  /**
619
659
  * Check if per-target features configuration is being used.
620
660
  */
@@ -695,6 +735,7 @@ var getDefaults = () => ({
695
735
  simulateSubagents: false,
696
736
  simulateSkills: false,
697
737
  gitignoreTargetsOnly: true,
738
+ gitignoreDestination: "gitignore",
698
739
  dryRun: false,
699
740
  check: false,
700
741
  sources: []
@@ -726,6 +767,7 @@ var mergeConfigs = (baseConfig, localConfig) => {
726
767
  simulateSubagents: localConfig.simulateSubagents ?? baseConfig.simulateSubagents,
727
768
  simulateSkills: localConfig.simulateSkills ?? baseConfig.simulateSkills,
728
769
  gitignoreTargetsOnly: localConfig.gitignoreTargetsOnly ?? baseConfig.gitignoreTargetsOnly,
770
+ gitignoreDestination: localConfig.gitignoreDestination ?? baseConfig.gitignoreDestination,
729
771
  dryRun: localConfig.dryRun ?? baseConfig.dryRun,
730
772
  check: localConfig.check ?? baseConfig.check,
731
773
  sources: localConfig.sources ?? baseConfig.sources
@@ -746,7 +788,8 @@ var ConfigResolver = class {
746
788
  simulateSkills,
747
789
  gitignoreTargetsOnly,
748
790
  dryRun,
749
- check
791
+ check,
792
+ gitignoreDestination
750
793
  }) {
751
794
  const validatedConfigPath = resolvePath(configPath, process.cwd());
752
795
  const baseConfig = await loadConfigFromFile(validatedConfigPath);
@@ -795,6 +838,7 @@ var ConfigResolver = class {
795
838
  simulateSubagents: resolvedSimulateSubagents,
796
839
  simulateSkills: resolvedSimulateSkills,
797
840
  gitignoreTargetsOnly: resolvedGitignoreTargetsOnly,
841
+ gitignoreDestination: gitignoreDestination ?? configByFile.gitignoreDestination ?? getDefaults().gitignoreDestination,
798
842
  dryRun: dryRun ?? configByFile.dryRun ?? getDefaults().dryRun,
799
843
  check: check ?? configByFile.check ?? getDefaults().check,
800
844
  sources: configByFile.sources ?? getDefaults().sources
@@ -817,7 +861,7 @@ function getBaseDirsInLightOfGlobal({
817
861
  }
818
862
 
819
863
  // src/lib/generate.ts
820
- import { join as join137 } from "path";
864
+ import { join as join138 } from "path";
821
865
  import { intersection } from "es-toolkit";
822
866
 
823
867
  // src/features/commands/commands-processor.ts
@@ -10368,9 +10412,9 @@ var PermissionsProcessor = class extends FeatureProcessor {
10368
10412
  };
10369
10413
 
10370
10414
  // src/features/rules/rules-processor.ts
10371
- import { basename as basename10, dirname as dirname3, join as join136, relative as relative5 } from "path";
10415
+ import { basename as basename10, dirname as dirname3, join as join137, relative as relative5 } from "path";
10372
10416
  import { encode } from "@toon-format/toon";
10373
- import { z as z71 } from "zod/mini";
10417
+ import { z as z72 } from "zod/mini";
10374
10418
 
10375
10419
  // src/constants/general.ts
10376
10420
  var SKILL_FILE_NAME = "SKILL.md";
@@ -11158,8 +11202,8 @@ var RovodevSkill = class _RovodevSkill extends ToolSkill {
11158
11202
  };
11159
11203
 
11160
11204
  // src/features/skills/skills-processor.ts
11161
- import { basename as basename5, join as join91 } from "path";
11162
- import { z as z51 } from "zod/mini";
11205
+ import { basename as basename5, join as join92 } from "path";
11206
+ import { z as z52 } from "zod/mini";
11163
11207
 
11164
11208
  // src/types/dir-feature-processor.ts
11165
11209
  import { join as join74 } from "path";
@@ -13799,6 +13843,166 @@ async function getLocalSkillDirNames(baseDir) {
13799
13843
  return names;
13800
13844
  }
13801
13845
 
13846
+ // src/features/skills/windsurf-skill.ts
13847
+ import { join as join91 } from "path";
13848
+ import { z as z51 } from "zod/mini";
13849
+ var WindsurfSkillFrontmatterSchema = z51.looseObject({
13850
+ name: z51.string(),
13851
+ description: z51.string()
13852
+ });
13853
+ var WindsurfSkill = class _WindsurfSkill extends ToolSkill {
13854
+ constructor({
13855
+ baseDir = process.cwd(),
13856
+ relativeDirPath = _WindsurfSkill.getSettablePaths().relativeDirPath,
13857
+ dirName,
13858
+ frontmatter,
13859
+ body,
13860
+ otherFiles = [],
13861
+ validate = true,
13862
+ global = false
13863
+ }) {
13864
+ super({
13865
+ baseDir,
13866
+ relativeDirPath,
13867
+ dirName,
13868
+ mainFile: {
13869
+ name: SKILL_FILE_NAME,
13870
+ body,
13871
+ frontmatter: { ...frontmatter }
13872
+ },
13873
+ otherFiles,
13874
+ global
13875
+ });
13876
+ if (validate) {
13877
+ const result = this.validate();
13878
+ if (!result.success) {
13879
+ throw result.error;
13880
+ }
13881
+ }
13882
+ }
13883
+ static getSettablePaths({ global = false } = {}) {
13884
+ if (global) {
13885
+ return {
13886
+ relativeDirPath: join91(".codeium", "windsurf", "skills")
13887
+ };
13888
+ }
13889
+ return {
13890
+ relativeDirPath: join91(".windsurf", "skills")
13891
+ };
13892
+ }
13893
+ getFrontmatter() {
13894
+ const result = WindsurfSkillFrontmatterSchema.parse(this.requireMainFileFrontmatter());
13895
+ return result;
13896
+ }
13897
+ getBody() {
13898
+ return this.mainFile?.body ?? "";
13899
+ }
13900
+ validate() {
13901
+ if (!this.mainFile) {
13902
+ return {
13903
+ success: false,
13904
+ error: new Error(`${this.getDirPath()}: ${SKILL_FILE_NAME} file does not exist`)
13905
+ };
13906
+ }
13907
+ const result = WindsurfSkillFrontmatterSchema.safeParse(this.mainFile.frontmatter);
13908
+ if (!result.success) {
13909
+ return {
13910
+ success: false,
13911
+ error: new Error(
13912
+ `Invalid frontmatter in ${this.getDirPath()}: ${formatError(result.error)}`
13913
+ )
13914
+ };
13915
+ }
13916
+ return { success: true, error: null };
13917
+ }
13918
+ toRulesyncSkill() {
13919
+ const frontmatter = this.getFrontmatter();
13920
+ const rulesyncFrontmatter = {
13921
+ name: frontmatter.name,
13922
+ description: frontmatter.description,
13923
+ targets: ["*"]
13924
+ };
13925
+ return new RulesyncSkill({
13926
+ baseDir: this.baseDir,
13927
+ relativeDirPath: RULESYNC_SKILLS_RELATIVE_DIR_PATH,
13928
+ dirName: this.getDirName(),
13929
+ frontmatter: rulesyncFrontmatter,
13930
+ body: this.getBody(),
13931
+ otherFiles: this.getOtherFiles(),
13932
+ validate: true,
13933
+ global: this.global
13934
+ });
13935
+ }
13936
+ static fromRulesyncSkill({
13937
+ baseDir = process.cwd(),
13938
+ rulesyncSkill,
13939
+ validate = true,
13940
+ global = false
13941
+ }) {
13942
+ const settablePaths = _WindsurfSkill.getSettablePaths({ global });
13943
+ const rulesyncFrontmatter = rulesyncSkill.getFrontmatter();
13944
+ const windsurfFrontmatter = {
13945
+ name: rulesyncFrontmatter.name,
13946
+ description: rulesyncFrontmatter.description
13947
+ };
13948
+ return new _WindsurfSkill({
13949
+ baseDir,
13950
+ relativeDirPath: settablePaths.relativeDirPath,
13951
+ dirName: rulesyncSkill.getDirName(),
13952
+ frontmatter: windsurfFrontmatter,
13953
+ body: rulesyncSkill.getBody(),
13954
+ otherFiles: rulesyncSkill.getOtherFiles(),
13955
+ validate,
13956
+ global
13957
+ });
13958
+ }
13959
+ static isTargetedByRulesyncSkill(rulesyncSkill) {
13960
+ const targets = rulesyncSkill.getFrontmatter().targets;
13961
+ return targets.includes("*") || targets.includes("windsurf");
13962
+ }
13963
+ static async fromDir(params) {
13964
+ const loaded = await this.loadSkillDirContent({
13965
+ ...params,
13966
+ getSettablePaths: _WindsurfSkill.getSettablePaths
13967
+ });
13968
+ const result = WindsurfSkillFrontmatterSchema.safeParse(loaded.frontmatter);
13969
+ if (!result.success) {
13970
+ const skillDirPath = join91(loaded.baseDir, loaded.relativeDirPath, loaded.dirName);
13971
+ throw new Error(
13972
+ `Invalid frontmatter in ${join91(skillDirPath, SKILL_FILE_NAME)}: ${formatError(result.error)}`
13973
+ );
13974
+ }
13975
+ return new _WindsurfSkill({
13976
+ baseDir: loaded.baseDir,
13977
+ relativeDirPath: loaded.relativeDirPath,
13978
+ dirName: loaded.dirName,
13979
+ frontmatter: result.data,
13980
+ body: loaded.body,
13981
+ otherFiles: loaded.otherFiles,
13982
+ validate: true,
13983
+ global: loaded.global
13984
+ });
13985
+ }
13986
+ static forDeletion({
13987
+ baseDir = process.cwd(),
13988
+ relativeDirPath,
13989
+ dirName,
13990
+ global = false
13991
+ }) {
13992
+ const settablePaths = _WindsurfSkill.getSettablePaths({ global });
13993
+ return new _WindsurfSkill({
13994
+ baseDir,
13995
+ relativeDirPath: relativeDirPath ?? settablePaths.relativeDirPath,
13996
+ dirName,
13997
+ frontmatter: { name: "", description: "" },
13998
+ body: "",
13999
+ otherFiles: [],
14000
+ validate: false,
14001
+ global
14002
+ });
14003
+ }
14004
+ };
14005
+
13802
14006
  // src/features/skills/skills-processor.ts
13803
14007
  var skillsProcessorToolTargetTuple = [
13804
14008
  "agentsmd",
@@ -13819,9 +14023,10 @@ var skillsProcessorToolTargetTuple = [
13819
14023
  "opencode",
13820
14024
  "replit",
13821
14025
  "roo",
13822
- "rovodev"
14026
+ "rovodev",
14027
+ "windsurf"
13823
14028
  ];
13824
- var SkillsProcessorToolTargetSchema = z51.enum(skillsProcessorToolTargetTuple);
14029
+ var SkillsProcessorToolTargetSchema = z52.enum(skillsProcessorToolTargetTuple);
13825
14030
  var toolSkillFactories = /* @__PURE__ */ new Map([
13826
14031
  [
13827
14032
  "agentsmd",
@@ -13955,6 +14160,13 @@ var toolSkillFactories = /* @__PURE__ */ new Map([
13955
14160
  class: RovodevSkill,
13956
14161
  meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
13957
14162
  }
14163
+ ],
14164
+ [
14165
+ "windsurf",
14166
+ {
14167
+ class: WindsurfSkill,
14168
+ meta: { supportsProject: true, supportsSimulated: false, supportsGlobal: true }
14169
+ }
13958
14170
  ]
13959
14171
  ]);
13960
14172
  var defaultGetFactory4 = (target) => {
@@ -14045,10 +14257,10 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14045
14257
  )
14046
14258
  );
14047
14259
  const localSkillNames = new Set(localDirNames);
14048
- const curatedDirPath = join91(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14260
+ const curatedDirPath = join92(process.cwd(), RULESYNC_CURATED_SKILLS_RELATIVE_DIR_PATH);
14049
14261
  let curatedSkills = [];
14050
14262
  if (await directoryExists(curatedDirPath)) {
14051
- const curatedDirPaths = await findFilesByGlobs(join91(curatedDirPath, "*"), { type: "dir" });
14263
+ const curatedDirPaths = await findFilesByGlobs(join92(curatedDirPath, "*"), { type: "dir" });
14052
14264
  const curatedDirNames = curatedDirPaths.map((path3) => basename5(path3));
14053
14265
  const nonConflicting = curatedDirNames.filter((name) => {
14054
14266
  if (localSkillNames.has(name)) {
@@ -14086,11 +14298,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14086
14298
  const seenDirNames = /* @__PURE__ */ new Set();
14087
14299
  const loadEntries = [];
14088
14300
  for (const root of roots) {
14089
- const skillsDirPath = join91(this.baseDir, root);
14301
+ const skillsDirPath = join92(this.baseDir, root);
14090
14302
  if (!await directoryExists(skillsDirPath)) {
14091
14303
  continue;
14092
14304
  }
14093
- const dirPaths = await findFilesByGlobs(join91(skillsDirPath, "*"), { type: "dir" });
14305
+ const dirPaths = await findFilesByGlobs(join92(skillsDirPath, "*"), { type: "dir" });
14094
14306
  for (const dirPath of dirPaths) {
14095
14307
  const dirName = basename5(dirPath);
14096
14308
  if (seenDirNames.has(dirName)) {
@@ -14121,11 +14333,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14121
14333
  const roots = toolSkillSearchRoots(paths);
14122
14334
  const toolSkills = [];
14123
14335
  for (const root of roots) {
14124
- const skillsDirPath = join91(this.baseDir, root);
14336
+ const skillsDirPath = join92(this.baseDir, root);
14125
14337
  if (!await directoryExists(skillsDirPath)) {
14126
14338
  continue;
14127
14339
  }
14128
- const dirPaths = await findFilesByGlobs(join91(skillsDirPath, "*"), { type: "dir" });
14340
+ const dirPaths = await findFilesByGlobs(join92(skillsDirPath, "*"), { type: "dir" });
14129
14341
  for (const dirPath of dirPaths) {
14130
14342
  const dirName = basename5(dirPath);
14131
14343
  const toolSkill = factory.class.forDeletion({
@@ -14189,11 +14401,11 @@ var SkillsProcessor = class extends DirFeatureProcessor {
14189
14401
  };
14190
14402
 
14191
14403
  // src/features/subagents/agentsmd-subagent.ts
14192
- import { join as join93 } from "path";
14404
+ import { join as join94 } from "path";
14193
14405
 
14194
14406
  // src/features/subagents/simulated-subagent.ts
14195
- import { basename as basename6, join as join92 } from "path";
14196
- import { z as z52 } from "zod/mini";
14407
+ import { basename as basename6, join as join93 } from "path";
14408
+ import { z as z53 } from "zod/mini";
14197
14409
 
14198
14410
  // src/features/subagents/tool-subagent.ts
14199
14411
  var ToolSubagent = class extends ToolFile {
@@ -14245,9 +14457,9 @@ var ToolSubagent = class extends ToolFile {
14245
14457
  };
14246
14458
 
14247
14459
  // src/features/subagents/simulated-subagent.ts
14248
- var SimulatedSubagentFrontmatterSchema = z52.object({
14249
- name: z52.string(),
14250
- description: z52.optional(z52.string())
14460
+ var SimulatedSubagentFrontmatterSchema = z53.object({
14461
+ name: z53.string(),
14462
+ description: z53.optional(z53.string())
14251
14463
  });
14252
14464
  var SimulatedSubagent = class extends ToolSubagent {
14253
14465
  frontmatter;
@@ -14257,7 +14469,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14257
14469
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
14258
14470
  if (!result.success) {
14259
14471
  throw new Error(
14260
- `Invalid frontmatter in ${join92(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14472
+ `Invalid frontmatter in ${join93(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14261
14473
  );
14262
14474
  }
14263
14475
  }
@@ -14308,7 +14520,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14308
14520
  return {
14309
14521
  success: false,
14310
14522
  error: new Error(
14311
- `Invalid frontmatter in ${join92(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14523
+ `Invalid frontmatter in ${join93(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14312
14524
  )
14313
14525
  };
14314
14526
  }
@@ -14318,7 +14530,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14318
14530
  relativeFilePath,
14319
14531
  validate = true
14320
14532
  }) {
14321
- const filePath = join92(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14533
+ const filePath = join93(baseDir, this.getSettablePaths().relativeDirPath, relativeFilePath);
14322
14534
  const fileContent = await readFileContent(filePath);
14323
14535
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14324
14536
  const result = SimulatedSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14354,7 +14566,7 @@ var SimulatedSubagent = class extends ToolSubagent {
14354
14566
  var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14355
14567
  static getSettablePaths() {
14356
14568
  return {
14357
- relativeDirPath: join93(".agents", "subagents")
14569
+ relativeDirPath: join94(".agents", "subagents")
14358
14570
  };
14359
14571
  }
14360
14572
  static async fromFile(params) {
@@ -14377,11 +14589,11 @@ var AgentsmdSubagent = class _AgentsmdSubagent extends SimulatedSubagent {
14377
14589
  };
14378
14590
 
14379
14591
  // src/features/subagents/factorydroid-subagent.ts
14380
- import { join as join94 } from "path";
14592
+ import { join as join95 } from "path";
14381
14593
  var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent {
14382
14594
  static getSettablePaths(_options) {
14383
14595
  return {
14384
- relativeDirPath: join94(".factory", "droids")
14596
+ relativeDirPath: join95(".factory", "droids")
14385
14597
  };
14386
14598
  }
14387
14599
  static async fromFile(params) {
@@ -14404,16 +14616,16 @@ var FactorydroidSubagent = class _FactorydroidSubagent extends SimulatedSubagent
14404
14616
  };
14405
14617
 
14406
14618
  // src/features/subagents/geminicli-subagent.ts
14407
- import { join as join96 } from "path";
14408
- import { z as z54 } from "zod/mini";
14619
+ import { join as join97 } from "path";
14620
+ import { z as z55 } from "zod/mini";
14409
14621
 
14410
14622
  // src/features/subagents/rulesync-subagent.ts
14411
- import { basename as basename7, join as join95 } from "path";
14412
- import { z as z53 } from "zod/mini";
14413
- var RulesyncSubagentFrontmatterSchema = z53.looseObject({
14414
- targets: z53._default(RulesyncTargetsSchema, ["*"]),
14415
- name: z53.string(),
14416
- description: z53.optional(z53.string())
14623
+ import { basename as basename7, join as join96 } from "path";
14624
+ import { z as z54 } from "zod/mini";
14625
+ var RulesyncSubagentFrontmatterSchema = z54.looseObject({
14626
+ targets: z54._default(RulesyncTargetsSchema, ["*"]),
14627
+ name: z54.string(),
14628
+ description: z54.optional(z54.string())
14417
14629
  });
14418
14630
  var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14419
14631
  frontmatter;
@@ -14422,7 +14634,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14422
14634
  const parseResult = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
14423
14635
  if (!parseResult.success && rest.validate !== false) {
14424
14636
  throw new Error(
14425
- `Invalid frontmatter in ${join95(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14637
+ `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
14426
14638
  );
14427
14639
  }
14428
14640
  const parsedFrontmatter = parseResult.success ? { ...frontmatter, ...parseResult.data } : { ...frontmatter, targets: frontmatter?.targets ?? ["*"] };
@@ -14455,7 +14667,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14455
14667
  return {
14456
14668
  success: false,
14457
14669
  error: new Error(
14458
- `Invalid frontmatter in ${join95(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14670
+ `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14459
14671
  )
14460
14672
  };
14461
14673
  }
@@ -14463,7 +14675,7 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14463
14675
  static async fromFile({
14464
14676
  relativeFilePath
14465
14677
  }) {
14466
- const filePath = join95(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14678
+ const filePath = join96(process.cwd(), RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, relativeFilePath);
14467
14679
  const fileContent = await readFileContent(filePath);
14468
14680
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14469
14681
  const result = RulesyncSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14482,9 +14694,9 @@ var RulesyncSubagent = class _RulesyncSubagent extends RulesyncFile {
14482
14694
  };
14483
14695
 
14484
14696
  // src/features/subagents/geminicli-subagent.ts
14485
- var GeminiCliSubagentFrontmatterSchema = z54.looseObject({
14486
- name: z54.string(),
14487
- description: z54.optional(z54.string())
14697
+ var GeminiCliSubagentFrontmatterSchema = z55.looseObject({
14698
+ name: z55.string(),
14699
+ description: z55.optional(z55.string())
14488
14700
  });
14489
14701
  var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14490
14702
  frontmatter;
@@ -14494,7 +14706,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14494
14706
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
14495
14707
  if (!result.success) {
14496
14708
  throw new Error(
14497
- `Invalid frontmatter in ${join96(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14709
+ `Invalid frontmatter in ${join97(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14498
14710
  );
14499
14711
  }
14500
14712
  }
@@ -14507,7 +14719,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14507
14719
  }
14508
14720
  static getSettablePaths(_options = {}) {
14509
14721
  return {
14510
- relativeDirPath: join96(".gemini", "agents")
14722
+ relativeDirPath: join97(".gemini", "agents")
14511
14723
  };
14512
14724
  }
14513
14725
  getFrontmatter() {
@@ -14575,7 +14787,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14575
14787
  return {
14576
14788
  success: false,
14577
14789
  error: new Error(
14578
- `Invalid frontmatter in ${join96(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14790
+ `Invalid frontmatter in ${join97(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14579
14791
  )
14580
14792
  };
14581
14793
  }
@@ -14593,7 +14805,7 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14593
14805
  global = false
14594
14806
  }) {
14595
14807
  const paths = this.getSettablePaths({ global });
14596
- const filePath = join96(baseDir, paths.relativeDirPath, relativeFilePath);
14808
+ const filePath = join97(baseDir, paths.relativeDirPath, relativeFilePath);
14597
14809
  const fileContent = await readFileContent(filePath);
14598
14810
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14599
14811
  const result = GeminiCliSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14629,11 +14841,11 @@ var GeminiCliSubagent = class _GeminiCliSubagent extends ToolSubagent {
14629
14841
  };
14630
14842
 
14631
14843
  // src/features/subagents/roo-subagent.ts
14632
- import { join as join97 } from "path";
14844
+ import { join as join98 } from "path";
14633
14845
  var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14634
14846
  static getSettablePaths() {
14635
14847
  return {
14636
- relativeDirPath: join97(".roo", "subagents")
14848
+ relativeDirPath: join98(".roo", "subagents")
14637
14849
  };
14638
14850
  }
14639
14851
  static async fromFile(params) {
@@ -14656,11 +14868,11 @@ var RooSubagent = class _RooSubagent extends SimulatedSubagent {
14656
14868
  };
14657
14869
 
14658
14870
  // src/features/subagents/rovodev-subagent.ts
14659
- import { join as join98 } from "path";
14660
- import { z as z55 } from "zod/mini";
14661
- var RovodevSubagentFrontmatterSchema = z55.looseObject({
14662
- name: z55.string(),
14663
- description: z55.optional(z55.string())
14871
+ import { join as join99 } from "path";
14872
+ import { z as z56 } from "zod/mini";
14873
+ var RovodevSubagentFrontmatterSchema = z56.looseObject({
14874
+ name: z56.string(),
14875
+ description: z56.optional(z56.string())
14664
14876
  });
14665
14877
  var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14666
14878
  frontmatter;
@@ -14670,7 +14882,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14670
14882
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
14671
14883
  if (!result.success) {
14672
14884
  throw new Error(
14673
- `Invalid frontmatter in ${join98(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14885
+ `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14674
14886
  );
14675
14887
  }
14676
14888
  }
@@ -14682,7 +14894,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14682
14894
  }
14683
14895
  static getSettablePaths(_options = {}) {
14684
14896
  return {
14685
- relativeDirPath: join98(".rovodev", "subagents")
14897
+ relativeDirPath: join99(".rovodev", "subagents")
14686
14898
  };
14687
14899
  }
14688
14900
  getFrontmatter() {
@@ -14745,7 +14957,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14745
14957
  return {
14746
14958
  success: false,
14747
14959
  error: new Error(
14748
- `Invalid frontmatter in ${join98(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14960
+ `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14749
14961
  )
14750
14962
  };
14751
14963
  }
@@ -14762,7 +14974,7 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14762
14974
  global = false
14763
14975
  }) {
14764
14976
  const paths = this.getSettablePaths({ global });
14765
- const filePath = join98(baseDir, paths.relativeDirPath, relativeFilePath);
14977
+ const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
14766
14978
  const fileContent = await readFileContent(filePath);
14767
14979
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14768
14980
  const result = RovodevSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14801,19 +15013,19 @@ var RovodevSubagent = class _RovodevSubagent extends ToolSubagent {
14801
15013
  };
14802
15014
 
14803
15015
  // src/features/subagents/subagents-processor.ts
14804
- import { basename as basename9, join as join109 } from "path";
14805
- import { z as z64 } from "zod/mini";
15016
+ import { basename as basename9, join as join110 } from "path";
15017
+ import { z as z65 } from "zod/mini";
14806
15018
 
14807
15019
  // src/features/subagents/claudecode-subagent.ts
14808
- import { join as join99 } from "path";
14809
- import { z as z56 } from "zod/mini";
14810
- var ClaudecodeSubagentFrontmatterSchema = z56.looseObject({
14811
- name: z56.string(),
14812
- description: z56.optional(z56.string()),
14813
- model: z56.optional(z56.string()),
14814
- tools: z56.optional(z56.union([z56.string(), z56.array(z56.string())])),
14815
- permissionMode: z56.optional(z56.string()),
14816
- skills: z56.optional(z56.union([z56.string(), z56.array(z56.string())]))
15020
+ import { join as join100 } from "path";
15021
+ import { z as z57 } from "zod/mini";
15022
+ var ClaudecodeSubagentFrontmatterSchema = z57.looseObject({
15023
+ name: z57.string(),
15024
+ description: z57.optional(z57.string()),
15025
+ model: z57.optional(z57.string()),
15026
+ tools: z57.optional(z57.union([z57.string(), z57.array(z57.string())])),
15027
+ permissionMode: z57.optional(z57.string()),
15028
+ skills: z57.optional(z57.union([z57.string(), z57.array(z57.string())]))
14817
15029
  });
14818
15030
  var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14819
15031
  frontmatter;
@@ -14823,7 +15035,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14823
15035
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
14824
15036
  if (!result.success) {
14825
15037
  throw new Error(
14826
- `Invalid frontmatter in ${join99(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15038
+ `Invalid frontmatter in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
14827
15039
  );
14828
15040
  }
14829
15041
  }
@@ -14835,7 +15047,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14835
15047
  }
14836
15048
  static getSettablePaths(_options = {}) {
14837
15049
  return {
14838
- relativeDirPath: join99(".claude", "agents")
15050
+ relativeDirPath: join100(".claude", "agents")
14839
15051
  };
14840
15052
  }
14841
15053
  getFrontmatter() {
@@ -14914,7 +15126,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14914
15126
  return {
14915
15127
  success: false,
14916
15128
  error: new Error(
14917
- `Invalid frontmatter in ${join99(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15129
+ `Invalid frontmatter in ${join100(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
14918
15130
  )
14919
15131
  };
14920
15132
  }
@@ -14932,7 +15144,7 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14932
15144
  global = false
14933
15145
  }) {
14934
15146
  const paths = this.getSettablePaths({ global });
14935
- const filePath = join99(baseDir, paths.relativeDirPath, relativeFilePath);
15147
+ const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
14936
15148
  const fileContent = await readFileContent(filePath);
14937
15149
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
14938
15150
  const result = ClaudecodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -14967,17 +15179,28 @@ var ClaudecodeSubagent = class _ClaudecodeSubagent extends ToolSubagent {
14967
15179
  };
14968
15180
 
14969
15181
  // src/features/subagents/codexcli-subagent.ts
14970
- import { join as join100 } from "path";
15182
+ import { join as join101 } from "path";
14971
15183
  import * as smolToml5 from "smol-toml";
14972
- import { z as z57 } from "zod/mini";
14973
- var CodexCliSubagentTomlSchema = z57.looseObject({
14974
- name: z57.string(),
14975
- description: z57.optional(z57.string()),
14976
- developer_instructions: z57.optional(z57.string()),
14977
- model: z57.optional(z57.string()),
14978
- model_reasoning_effort: z57.optional(z57.string()),
14979
- sandbox_mode: z57.optional(z57.string())
15184
+ import { z as z58 } from "zod/mini";
15185
+ var CodexCliSubagentTomlSchema = z58.looseObject({
15186
+ name: z58.string(),
15187
+ description: z58.optional(z58.string()),
15188
+ developer_instructions: z58.optional(z58.string()),
15189
+ model: z58.optional(z58.string()),
15190
+ model_reasoning_effort: z58.optional(z58.string()),
15191
+ sandbox_mode: z58.optional(z58.string())
14980
15192
  });
15193
+ function stringifyCodexCliSubagentToml(tomlObj) {
15194
+ const { developer_instructions, ...restFields } = tomlObj;
15195
+ const restToml = smolToml5.stringify(restFields).trimEnd();
15196
+ if (developer_instructions === void 0) {
15197
+ return restToml;
15198
+ }
15199
+ const developerInstructionsToml = developer_instructions.includes("\n") ? developer_instructions.includes("'''") ? smolToml5.stringify({ developer_instructions }).trimEnd() : `developer_instructions = '''
15200
+ ${developer_instructions}
15201
+ '''` : smolToml5.stringify({ developer_instructions }).trimEnd();
15202
+ return [restToml, developerInstructionsToml].filter((value) => value.length > 0).join("\n");
15203
+ }
14981
15204
  var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14982
15205
  body;
14983
15206
  constructor({ body, ...rest }) {
@@ -14987,7 +15210,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14987
15210
  CodexCliSubagentTomlSchema.parse(parsed);
14988
15211
  } catch (error) {
14989
15212
  throw new Error(
14990
- `Invalid TOML in ${join100(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15213
+ `Invalid TOML in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
14991
15214
  { cause: error }
14992
15215
  );
14993
15216
  }
@@ -14999,7 +15222,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
14999
15222
  }
15000
15223
  static getSettablePaths(_options = {}) {
15001
15224
  return {
15002
- relativeDirPath: join100(".codex", "agents")
15225
+ relativeDirPath: join101(".codex", "agents")
15003
15226
  };
15004
15227
  }
15005
15228
  getBody() {
@@ -15011,7 +15234,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15011
15234
  parsed = CodexCliSubagentTomlSchema.parse(smolToml5.parse(this.body));
15012
15235
  } catch (error) {
15013
15236
  throw new Error(
15014
- `Failed to parse TOML in ${join100(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15237
+ `Failed to parse TOML in ${join101(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15015
15238
  { cause: error }
15016
15239
  );
15017
15240
  }
@@ -15054,7 +15277,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15054
15277
  ...rulesyncSubagent.getBody() ? { developer_instructions: rulesyncSubagent.getBody() } : {},
15055
15278
  ...codexcliSection
15056
15279
  };
15057
- const body = smolToml5.stringify(tomlObj);
15280
+ const body = stringifyCodexCliSubagentToml(tomlObj);
15058
15281
  const paths = this.getSettablePaths({ global });
15059
15282
  const relativeFilePath = rulesyncSubagent.getRelativeFilePath().replace(/\.md$/, ".toml");
15060
15283
  return new _CodexCliSubagent({
@@ -15092,7 +15315,7 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15092
15315
  global = false
15093
15316
  }) {
15094
15317
  const paths = this.getSettablePaths({ global });
15095
- const filePath = join100(baseDir, paths.relativeDirPath, relativeFilePath);
15318
+ const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15096
15319
  const fileContent = await readFileContent(filePath);
15097
15320
  const subagent = new _CodexCliSubagent({
15098
15321
  baseDir,
@@ -15130,13 +15353,13 @@ var CodexCliSubagent = class _CodexCliSubagent extends ToolSubagent {
15130
15353
  };
15131
15354
 
15132
15355
  // src/features/subagents/copilot-subagent.ts
15133
- import { join as join101 } from "path";
15134
- import { z as z58 } from "zod/mini";
15356
+ import { join as join102 } from "path";
15357
+ import { z as z59 } from "zod/mini";
15135
15358
  var REQUIRED_TOOL = "agent/runSubagent";
15136
- var CopilotSubagentFrontmatterSchema = z58.looseObject({
15137
- name: z58.string(),
15138
- description: z58.optional(z58.string()),
15139
- tools: z58.optional(z58.union([z58.string(), z58.array(z58.string())]))
15359
+ var CopilotSubagentFrontmatterSchema = z59.looseObject({
15360
+ name: z59.string(),
15361
+ description: z59.optional(z59.string()),
15362
+ tools: z59.optional(z59.union([z59.string(), z59.array(z59.string())]))
15140
15363
  });
15141
15364
  var normalizeTools = (tools) => {
15142
15365
  if (!tools) {
@@ -15156,7 +15379,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15156
15379
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
15157
15380
  if (!result.success) {
15158
15381
  throw new Error(
15159
- `Invalid frontmatter in ${join101(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15382
+ `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15160
15383
  );
15161
15384
  }
15162
15385
  }
@@ -15168,7 +15391,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15168
15391
  }
15169
15392
  static getSettablePaths(_options = {}) {
15170
15393
  return {
15171
- relativeDirPath: join101(".github", "agents")
15394
+ relativeDirPath: join102(".github", "agents")
15172
15395
  };
15173
15396
  }
15174
15397
  getFrontmatter() {
@@ -15246,7 +15469,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15246
15469
  return {
15247
15470
  success: false,
15248
15471
  error: new Error(
15249
- `Invalid frontmatter in ${join101(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15472
+ `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15250
15473
  )
15251
15474
  };
15252
15475
  }
@@ -15264,7 +15487,7 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15264
15487
  global = false
15265
15488
  }) {
15266
15489
  const paths = this.getSettablePaths({ global });
15267
- const filePath = join101(baseDir, paths.relativeDirPath, relativeFilePath);
15490
+ const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15268
15491
  const fileContent = await readFileContent(filePath);
15269
15492
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15270
15493
  const result = CopilotSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15300,11 +15523,11 @@ var CopilotSubagent = class _CopilotSubagent extends ToolSubagent {
15300
15523
  };
15301
15524
 
15302
15525
  // src/features/subagents/cursor-subagent.ts
15303
- import { join as join102 } from "path";
15304
- import { z as z59 } from "zod/mini";
15305
- var CursorSubagentFrontmatterSchema = z59.looseObject({
15306
- name: z59.string(),
15307
- description: z59.optional(z59.string())
15526
+ import { join as join103 } from "path";
15527
+ import { z as z60 } from "zod/mini";
15528
+ var CursorSubagentFrontmatterSchema = z60.looseObject({
15529
+ name: z60.string(),
15530
+ description: z60.optional(z60.string())
15308
15531
  });
15309
15532
  var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15310
15533
  frontmatter;
@@ -15314,7 +15537,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15314
15537
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
15315
15538
  if (!result.success) {
15316
15539
  throw new Error(
15317
- `Invalid frontmatter in ${join102(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15540
+ `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15318
15541
  );
15319
15542
  }
15320
15543
  }
@@ -15326,7 +15549,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15326
15549
  }
15327
15550
  static getSettablePaths(_options = {}) {
15328
15551
  return {
15329
- relativeDirPath: join102(".cursor", "agents")
15552
+ relativeDirPath: join103(".cursor", "agents")
15330
15553
  };
15331
15554
  }
15332
15555
  getFrontmatter() {
@@ -15393,7 +15616,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15393
15616
  return {
15394
15617
  success: false,
15395
15618
  error: new Error(
15396
- `Invalid frontmatter in ${join102(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15619
+ `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15397
15620
  )
15398
15621
  };
15399
15622
  }
@@ -15411,7 +15634,7 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15411
15634
  global = false
15412
15635
  }) {
15413
15636
  const paths = this.getSettablePaths({ global });
15414
- const filePath = join102(baseDir, paths.relativeDirPath, relativeFilePath);
15637
+ const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15415
15638
  const fileContent = await readFileContent(filePath);
15416
15639
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15417
15640
  const result = CursorSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15447,12 +15670,12 @@ var CursorSubagent = class _CursorSubagent extends ToolSubagent {
15447
15670
  };
15448
15671
 
15449
15672
  // src/features/subagents/deepagents-subagent.ts
15450
- import { join as join103 } from "path";
15451
- import { z as z60 } from "zod/mini";
15452
- var DeepagentsSubagentFrontmatterSchema = z60.looseObject({
15453
- name: z60.string(),
15454
- description: z60.optional(z60.string()),
15455
- model: z60.optional(z60.string())
15673
+ import { join as join104 } from "path";
15674
+ import { z as z61 } from "zod/mini";
15675
+ var DeepagentsSubagentFrontmatterSchema = z61.looseObject({
15676
+ name: z61.string(),
15677
+ description: z61.optional(z61.string()),
15678
+ model: z61.optional(z61.string())
15456
15679
  });
15457
15680
  var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15458
15681
  frontmatter;
@@ -15462,7 +15685,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15462
15685
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
15463
15686
  if (!result.success) {
15464
15687
  throw new Error(
15465
- `Invalid frontmatter in ${join103(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15688
+ `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15466
15689
  );
15467
15690
  }
15468
15691
  }
@@ -15472,7 +15695,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15472
15695
  }
15473
15696
  static getSettablePaths(_options = {}) {
15474
15697
  return {
15475
- relativeDirPath: join103(".deepagents", "agents")
15698
+ relativeDirPath: join104(".deepagents", "agents")
15476
15699
  };
15477
15700
  }
15478
15701
  getFrontmatter() {
@@ -15547,7 +15770,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15547
15770
  return {
15548
15771
  success: false,
15549
15772
  error: new Error(
15550
- `Invalid frontmatter in ${join103(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15773
+ `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15551
15774
  )
15552
15775
  };
15553
15776
  }
@@ -15565,7 +15788,7 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15565
15788
  global = false
15566
15789
  }) {
15567
15790
  const paths = this.getSettablePaths({ global });
15568
- const filePath = join103(baseDir, paths.relativeDirPath, relativeFilePath);
15791
+ const filePath = join104(baseDir, paths.relativeDirPath, relativeFilePath);
15569
15792
  const fileContent = await readFileContent(filePath);
15570
15793
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15571
15794
  const result = DeepagentsSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15600,11 +15823,11 @@ var DeepagentsSubagent = class _DeepagentsSubagent extends ToolSubagent {
15600
15823
  };
15601
15824
 
15602
15825
  // src/features/subagents/junie-subagent.ts
15603
- import { join as join104 } from "path";
15604
- import { z as z61 } from "zod/mini";
15605
- var JunieSubagentFrontmatterSchema = z61.looseObject({
15606
- name: z61.optional(z61.string()),
15607
- description: z61.string()
15826
+ import { join as join105 } from "path";
15827
+ import { z as z62 } from "zod/mini";
15828
+ var JunieSubagentFrontmatterSchema = z62.looseObject({
15829
+ name: z62.optional(z62.string()),
15830
+ description: z62.string()
15608
15831
  });
15609
15832
  var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15610
15833
  frontmatter;
@@ -15614,7 +15837,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15614
15837
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
15615
15838
  if (!result.success) {
15616
15839
  throw new Error(
15617
- `Invalid frontmatter in ${join104(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15840
+ `Invalid frontmatter in ${join105(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15618
15841
  );
15619
15842
  }
15620
15843
  }
@@ -15629,7 +15852,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15629
15852
  throw new Error("JunieSubagent does not support global mode.");
15630
15853
  }
15631
15854
  return {
15632
- relativeDirPath: join104(".junie", "agents")
15855
+ relativeDirPath: join105(".junie", "agents")
15633
15856
  };
15634
15857
  }
15635
15858
  getFrontmatter() {
@@ -15705,7 +15928,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15705
15928
  return {
15706
15929
  success: false,
15707
15930
  error: new Error(
15708
- `Invalid frontmatter in ${join104(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15931
+ `Invalid frontmatter in ${join105(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15709
15932
  )
15710
15933
  };
15711
15934
  }
@@ -15723,7 +15946,7 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15723
15946
  global = false
15724
15947
  }) {
15725
15948
  const paths = this.getSettablePaths({ global });
15726
- const filePath = join104(baseDir, paths.relativeDirPath, relativeFilePath);
15949
+ const filePath = join105(baseDir, paths.relativeDirPath, relativeFilePath);
15727
15950
  const fileContent = await readFileContent(filePath);
15728
15951
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15729
15952
  const result = JunieSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15758,15 +15981,15 @@ var JunieSubagent = class _JunieSubagent extends ToolSubagent {
15758
15981
  };
15759
15982
 
15760
15983
  // src/features/subagents/kilo-subagent.ts
15761
- import { join as join106 } from "path";
15984
+ import { join as join107 } from "path";
15762
15985
 
15763
15986
  // src/features/subagents/opencode-style-subagent.ts
15764
- import { basename as basename8, join as join105 } from "path";
15765
- import { z as z62 } from "zod/mini";
15766
- var OpenCodeStyleSubagentFrontmatterSchema = z62.looseObject({
15767
- description: z62.optional(z62.string()),
15768
- mode: z62._default(z62.string(), "subagent"),
15769
- name: z62.optional(z62.string())
15987
+ import { basename as basename8, join as join106 } from "path";
15988
+ import { z as z63 } from "zod/mini";
15989
+ var OpenCodeStyleSubagentFrontmatterSchema = z63.looseObject({
15990
+ description: z63.optional(z63.string()),
15991
+ mode: z63._default(z63.string(), "subagent"),
15992
+ name: z63.optional(z63.string())
15770
15993
  });
15771
15994
  var OpenCodeStyleSubagent = class extends ToolSubagent {
15772
15995
  frontmatter;
@@ -15776,7 +15999,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15776
15999
  const result = OpenCodeStyleSubagentFrontmatterSchema.safeParse(frontmatter);
15777
16000
  if (!result.success) {
15778
16001
  throw new Error(
15779
- `Invalid frontmatter in ${join105(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16002
+ `Invalid frontmatter in ${join106(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
15780
16003
  );
15781
16004
  }
15782
16005
  }
@@ -15818,7 +16041,7 @@ var OpenCodeStyleSubagent = class extends ToolSubagent {
15818
16041
  return {
15819
16042
  success: false,
15820
16043
  error: new Error(
15821
- `Invalid frontmatter in ${join105(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16044
+ `Invalid frontmatter in ${join106(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
15822
16045
  )
15823
16046
  };
15824
16047
  }
@@ -15834,7 +16057,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15834
16057
  global = false
15835
16058
  } = {}) {
15836
16059
  return {
15837
- relativeDirPath: global ? join106(".config", "kilo", "agent") : join106(".kilo", "agent")
16060
+ relativeDirPath: global ? join107(".config", "kilo", "agent") : join107(".kilo", "agent")
15838
16061
  };
15839
16062
  }
15840
16063
  static fromRulesyncSubagent({
@@ -15878,7 +16101,7 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15878
16101
  global = false
15879
16102
  }) {
15880
16103
  const paths = this.getSettablePaths({ global });
15881
- const filePath = join106(baseDir, paths.relativeDirPath, relativeFilePath);
16104
+ const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
15882
16105
  const fileContent = await readFileContent(filePath);
15883
16106
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
15884
16107
  const result = KiloSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -15914,23 +16137,23 @@ var KiloSubagent = class _KiloSubagent extends OpenCodeStyleSubagent {
15914
16137
  };
15915
16138
 
15916
16139
  // src/features/subagents/kiro-subagent.ts
15917
- import { join as join107 } from "path";
15918
- import { z as z63 } from "zod/mini";
15919
- var KiroCliSubagentJsonSchema = z63.looseObject({
15920
- name: z63.string(),
15921
- description: z63.optional(z63.nullable(z63.string())),
15922
- prompt: z63.optional(z63.nullable(z63.string())),
15923
- tools: z63.optional(z63.nullable(z63.array(z63.string()))),
15924
- toolAliases: z63.optional(z63.nullable(z63.record(z63.string(), z63.string()))),
15925
- toolSettings: z63.optional(z63.nullable(z63.unknown())),
15926
- toolSchema: z63.optional(z63.nullable(z63.unknown())),
15927
- hooks: z63.optional(z63.nullable(z63.record(z63.string(), z63.array(z63.unknown())))),
15928
- model: z63.optional(z63.nullable(z63.string())),
15929
- mcpServers: z63.optional(z63.nullable(z63.record(z63.string(), z63.unknown()))),
15930
- useLegacyMcpJson: z63.optional(z63.nullable(z63.boolean())),
15931
- resources: z63.optional(z63.nullable(z63.array(z63.string()))),
15932
- allowedTools: z63.optional(z63.nullable(z63.array(z63.string()))),
15933
- includeMcpJson: z63.optional(z63.nullable(z63.boolean()))
16140
+ import { join as join108 } from "path";
16141
+ import { z as z64 } from "zod/mini";
16142
+ var KiroCliSubagentJsonSchema = z64.looseObject({
16143
+ name: z64.string(),
16144
+ description: z64.optional(z64.nullable(z64.string())),
16145
+ prompt: z64.optional(z64.nullable(z64.string())),
16146
+ tools: z64.optional(z64.nullable(z64.array(z64.string()))),
16147
+ toolAliases: z64.optional(z64.nullable(z64.record(z64.string(), z64.string()))),
16148
+ toolSettings: z64.optional(z64.nullable(z64.unknown())),
16149
+ toolSchema: z64.optional(z64.nullable(z64.unknown())),
16150
+ hooks: z64.optional(z64.nullable(z64.record(z64.string(), z64.array(z64.unknown())))),
16151
+ model: z64.optional(z64.nullable(z64.string())),
16152
+ mcpServers: z64.optional(z64.nullable(z64.record(z64.string(), z64.unknown()))),
16153
+ useLegacyMcpJson: z64.optional(z64.nullable(z64.boolean())),
16154
+ resources: z64.optional(z64.nullable(z64.array(z64.string()))),
16155
+ allowedTools: z64.optional(z64.nullable(z64.array(z64.string()))),
16156
+ includeMcpJson: z64.optional(z64.nullable(z64.boolean()))
15934
16157
  });
15935
16158
  var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15936
16159
  body;
@@ -15941,7 +16164,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15941
16164
  KiroCliSubagentJsonSchema.parse(parsed);
15942
16165
  } catch (error) {
15943
16166
  throw new Error(
15944
- `Invalid JSON in ${join107(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
16167
+ `Invalid JSON in ${join108(rest.relativeDirPath, rest.relativeFilePath)}: ${error instanceof Error ? error.message : String(error)}`,
15945
16168
  { cause: error }
15946
16169
  );
15947
16170
  }
@@ -15953,7 +16176,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15953
16176
  }
15954
16177
  static getSettablePaths(_options = {}) {
15955
16178
  return {
15956
- relativeDirPath: join107(".kiro", "agents")
16179
+ relativeDirPath: join108(".kiro", "agents")
15957
16180
  };
15958
16181
  }
15959
16182
  getBody() {
@@ -15965,7 +16188,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
15965
16188
  parsed = JSON.parse(this.body);
15966
16189
  } catch (error) {
15967
16190
  throw new Error(
15968
- `Failed to parse JSON in ${join107(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
16191
+ `Failed to parse JSON in ${join108(this.getRelativeDirPath(), this.getRelativeFilePath())}: ${error instanceof Error ? error.message : String(error)}`,
15969
16192
  { cause: error }
15970
16193
  );
15971
16194
  }
@@ -16046,7 +16269,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16046
16269
  global = false
16047
16270
  }) {
16048
16271
  const paths = this.getSettablePaths({ global });
16049
- const filePath = join107(baseDir, paths.relativeDirPath, relativeFilePath);
16272
+ const filePath = join108(baseDir, paths.relativeDirPath, relativeFilePath);
16050
16273
  const fileContent = await readFileContent(filePath);
16051
16274
  const subagent = new _KiroSubagent({
16052
16275
  baseDir,
@@ -16084,7 +16307,7 @@ var KiroSubagent = class _KiroSubagent extends ToolSubagent {
16084
16307
  };
16085
16308
 
16086
16309
  // src/features/subagents/opencode-subagent.ts
16087
- import { join as join108 } from "path";
16310
+ import { join as join109 } from "path";
16088
16311
  var OpenCodeSubagentFrontmatterSchema = OpenCodeStyleSubagentFrontmatterSchema;
16089
16312
  var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16090
16313
  getToolTarget() {
@@ -16094,7 +16317,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16094
16317
  global = false
16095
16318
  } = {}) {
16096
16319
  return {
16097
- relativeDirPath: global ? join108(".config", "opencode", "agent") : join108(".opencode", "agent")
16320
+ relativeDirPath: global ? join109(".config", "opencode", "agent") : join109(".opencode", "agent")
16098
16321
  };
16099
16322
  }
16100
16323
  static fromRulesyncSubagent({
@@ -16138,7 +16361,7 @@ var OpenCodeSubagent = class _OpenCodeSubagent extends OpenCodeStyleSubagent {
16138
16361
  global = false
16139
16362
  }) {
16140
16363
  const paths = this.getSettablePaths({ global });
16141
- const filePath = join108(baseDir, paths.relativeDirPath, relativeFilePath);
16364
+ const filePath = join109(baseDir, paths.relativeDirPath, relativeFilePath);
16142
16365
  const fileContent = await readFileContent(filePath);
16143
16366
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
16144
16367
  const result = OpenCodeSubagentFrontmatterSchema.safeParse(frontmatter);
@@ -16191,7 +16414,7 @@ var subagentsProcessorToolTargetTuple = [
16191
16414
  "roo",
16192
16415
  "rovodev"
16193
16416
  ];
16194
- var SubagentsProcessorToolTargetSchema = z64.enum(subagentsProcessorToolTargetTuple);
16417
+ var SubagentsProcessorToolTargetSchema = z65.enum(subagentsProcessorToolTargetTuple);
16195
16418
  var toolSubagentFactories = /* @__PURE__ */ new Map([
16196
16419
  [
16197
16420
  "agentsmd",
@@ -16382,7 +16605,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16382
16605
  * Load and parse rulesync subagent files from .rulesync/subagents/ directory
16383
16606
  */
16384
16607
  async loadRulesyncFiles() {
16385
- const subagentsDir = join109(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16608
+ const subagentsDir = join110(process.cwd(), RulesyncSubagent.getSettablePaths().relativeDirPath);
16386
16609
  const dirExists = await directoryExists(subagentsDir);
16387
16610
  if (!dirExists) {
16388
16611
  this.logger.debug(`Rulesync subagents directory not found: ${subagentsDir}`);
@@ -16397,7 +16620,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16397
16620
  this.logger.debug(`Found ${mdFiles.length} subagent files in ${subagentsDir}`);
16398
16621
  const rulesyncSubagents = [];
16399
16622
  for (const mdFile of mdFiles) {
16400
- const filepath = join109(subagentsDir, mdFile);
16623
+ const filepath = join110(subagentsDir, mdFile);
16401
16624
  try {
16402
16625
  const rulesyncSubagent = await RulesyncSubagent.fromFile({
16403
16626
  relativeFilePath: mdFile,
@@ -16427,7 +16650,7 @@ var SubagentsProcessor = class extends FeatureProcessor {
16427
16650
  const factory = this.getFactory(this.toolTarget);
16428
16651
  const paths = factory.class.getSettablePaths({ global: this.global });
16429
16652
  const subagentFilePaths = await findFilesByGlobs(
16430
- join109(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16653
+ join110(this.baseDir, paths.relativeDirPath, factory.meta.filePattern)
16431
16654
  );
16432
16655
  if (forDeletion) {
16433
16656
  const toolSubagents2 = subagentFilePaths.map(
@@ -16494,49 +16717,49 @@ var SubagentsProcessor = class extends FeatureProcessor {
16494
16717
  };
16495
16718
 
16496
16719
  // src/features/rules/agentsmd-rule.ts
16497
- import { join as join112 } from "path";
16720
+ import { join as join113 } from "path";
16498
16721
 
16499
16722
  // src/features/rules/tool-rule.ts
16500
- import { join as join111 } from "path";
16723
+ import { join as join112 } from "path";
16501
16724
 
16502
16725
  // src/features/rules/rulesync-rule.ts
16503
- import { join as join110 } from "path";
16504
- import { z as z65 } from "zod/mini";
16505
- var RulesyncRuleFrontmatterSchema = z65.object({
16506
- root: z65.optional(z65.boolean()),
16507
- localRoot: z65.optional(z65.boolean()),
16508
- targets: z65._default(RulesyncTargetsSchema, ["*"]),
16509
- description: z65.optional(z65.string()),
16510
- globs: z65.optional(z65.array(z65.string())),
16511
- agentsmd: z65.optional(
16512
- z65.looseObject({
16726
+ import { join as join111 } from "path";
16727
+ import { z as z66 } from "zod/mini";
16728
+ var RulesyncRuleFrontmatterSchema = z66.object({
16729
+ root: z66.optional(z66.boolean()),
16730
+ localRoot: z66.optional(z66.boolean()),
16731
+ targets: z66._default(RulesyncTargetsSchema, ["*"]),
16732
+ description: z66.optional(z66.string()),
16733
+ globs: z66.optional(z66.array(z66.string())),
16734
+ agentsmd: z66.optional(
16735
+ z66.looseObject({
16513
16736
  // @example "path/to/subproject"
16514
- subprojectPath: z65.optional(z65.string())
16737
+ subprojectPath: z66.optional(z66.string())
16515
16738
  })
16516
16739
  ),
16517
- claudecode: z65.optional(
16518
- z65.looseObject({
16740
+ claudecode: z66.optional(
16741
+ z66.looseObject({
16519
16742
  // Glob patterns for conditional rules (takes precedence over globs)
16520
16743
  // @example ["src/**/*.ts", "tests/**/*.test.ts"]
16521
- paths: z65.optional(z65.array(z65.string()))
16744
+ paths: z66.optional(z66.array(z66.string()))
16522
16745
  })
16523
16746
  ),
16524
- cursor: z65.optional(
16525
- z65.looseObject({
16526
- alwaysApply: z65.optional(z65.boolean()),
16527
- description: z65.optional(z65.string()),
16528
- globs: z65.optional(z65.array(z65.string()))
16747
+ cursor: z66.optional(
16748
+ z66.looseObject({
16749
+ alwaysApply: z66.optional(z66.boolean()),
16750
+ description: z66.optional(z66.string()),
16751
+ globs: z66.optional(z66.array(z66.string()))
16529
16752
  })
16530
16753
  ),
16531
- copilot: z65.optional(
16532
- z65.looseObject({
16533
- excludeAgent: z65.optional(z65.union([z65.literal("code-review"), z65.literal("coding-agent")]))
16754
+ copilot: z66.optional(
16755
+ z66.looseObject({
16756
+ excludeAgent: z66.optional(z66.union([z66.literal("code-review"), z66.literal("coding-agent")]))
16534
16757
  })
16535
16758
  ),
16536
- antigravity: z65.optional(
16537
- z65.looseObject({
16538
- trigger: z65.optional(z65.string()),
16539
- globs: z65.optional(z65.array(z65.string()))
16759
+ antigravity: z66.optional(
16760
+ z66.looseObject({
16761
+ trigger: z66.optional(z66.string()),
16762
+ globs: z66.optional(z66.array(z66.string()))
16540
16763
  })
16541
16764
  )
16542
16765
  });
@@ -16547,7 +16770,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16547
16770
  const parseResult = RulesyncRuleFrontmatterSchema.safeParse(frontmatter);
16548
16771
  if (!parseResult.success && rest.validate !== false) {
16549
16772
  throw new Error(
16550
- `Invalid frontmatter in ${join110(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16773
+ `Invalid frontmatter in ${join111(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(parseResult.error)}`
16551
16774
  );
16552
16775
  }
16553
16776
  const parsedFrontmatter = parseResult.success ? parseResult.data : { ...frontmatter, targets: frontmatter.targets ?? ["*"] };
@@ -16582,7 +16805,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16582
16805
  return {
16583
16806
  success: false,
16584
16807
  error: new Error(
16585
- `Invalid frontmatter in ${join110(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16808
+ `Invalid frontmatter in ${join111(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
16586
16809
  )
16587
16810
  };
16588
16811
  }
@@ -16591,7 +16814,7 @@ var RulesyncRule = class _RulesyncRule extends RulesyncFile {
16591
16814
  relativeFilePath,
16592
16815
  validate = true
16593
16816
  }) {
16594
- const filePath = join110(
16817
+ const filePath = join111(
16595
16818
  process.cwd(),
16596
16819
  this.getSettablePaths().recommended.relativeDirPath,
16597
16820
  relativeFilePath
@@ -16690,7 +16913,7 @@ var ToolRule = class extends ToolFile {
16690
16913
  rulesyncRule,
16691
16914
  validate = true,
16692
16915
  rootPath = { relativeDirPath: ".", relativeFilePath: "AGENTS.md" },
16693
- nonRootPath = { relativeDirPath: join111(".agents", "memories") }
16916
+ nonRootPath = { relativeDirPath: join112(".agents", "memories") }
16694
16917
  }) {
16695
16918
  const params = this.buildToolRuleParamsDefault({
16696
16919
  baseDir,
@@ -16701,7 +16924,7 @@ var ToolRule = class extends ToolFile {
16701
16924
  });
16702
16925
  const rulesyncFrontmatter = rulesyncRule.getFrontmatter();
16703
16926
  if (!rulesyncFrontmatter.root && rulesyncFrontmatter.agentsmd?.subprojectPath) {
16704
- params.relativeDirPath = join111(rulesyncFrontmatter.agentsmd.subprojectPath);
16927
+ params.relativeDirPath = join112(rulesyncFrontmatter.agentsmd.subprojectPath);
16705
16928
  params.relativeFilePath = "AGENTS.md";
16706
16929
  }
16707
16930
  return params;
@@ -16750,7 +16973,7 @@ var ToolRule = class extends ToolFile {
16750
16973
  }
16751
16974
  };
16752
16975
  function buildToolPath(toolDir, subDir, excludeToolDir) {
16753
- return excludeToolDir ? subDir : join111(toolDir, subDir);
16976
+ return excludeToolDir ? subDir : join112(toolDir, subDir);
16754
16977
  }
16755
16978
 
16756
16979
  // src/features/rules/agentsmd-rule.ts
@@ -16779,8 +17002,8 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16779
17002
  validate = true
16780
17003
  }) {
16781
17004
  const isRoot = relativeFilePath === "AGENTS.md";
16782
- const relativePath = isRoot ? "AGENTS.md" : join112(".agents", "memories", relativeFilePath);
16783
- const fileContent = await readFileContent(join112(baseDir, relativePath));
17005
+ const relativePath = isRoot ? "AGENTS.md" : join113(".agents", "memories", relativeFilePath);
17006
+ const fileContent = await readFileContent(join113(baseDir, relativePath));
16784
17007
  return new _AgentsMdRule({
16785
17008
  baseDir,
16786
17009
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -16835,21 +17058,21 @@ var AgentsMdRule = class _AgentsMdRule extends ToolRule {
16835
17058
  };
16836
17059
 
16837
17060
  // src/features/rules/antigravity-rule.ts
16838
- import { join as join113 } from "path";
16839
- import { z as z66 } from "zod/mini";
16840
- var AntigravityRuleFrontmatterSchema = z66.looseObject({
16841
- trigger: z66.optional(
16842
- z66.union([
16843
- z66.literal("always_on"),
16844
- z66.literal("glob"),
16845
- z66.literal("manual"),
16846
- z66.literal("model_decision"),
16847
- z66.string()
17061
+ import { join as join114 } from "path";
17062
+ import { z as z67 } from "zod/mini";
17063
+ var AntigravityRuleFrontmatterSchema = z67.looseObject({
17064
+ trigger: z67.optional(
17065
+ z67.union([
17066
+ z67.literal("always_on"),
17067
+ z67.literal("glob"),
17068
+ z67.literal("manual"),
17069
+ z67.literal("model_decision"),
17070
+ z67.string()
16848
17071
  // accepts any string for forward compatibility
16849
17072
  ])
16850
17073
  ),
16851
- globs: z66.optional(z66.string()),
16852
- description: z66.optional(z66.string())
17074
+ globs: z67.optional(z67.string()),
17075
+ description: z67.optional(z67.string())
16853
17076
  });
16854
17077
  function parseGlobsString(globs) {
16855
17078
  if (!globs) {
@@ -16994,7 +17217,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
16994
17217
  const result = AntigravityRuleFrontmatterSchema.safeParse(frontmatter);
16995
17218
  if (!result.success) {
16996
17219
  throw new Error(
16997
- `Invalid frontmatter in ${join113(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17220
+ `Invalid frontmatter in ${join114(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
16998
17221
  );
16999
17222
  }
17000
17223
  }
@@ -17018,7 +17241,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17018
17241
  relativeFilePath,
17019
17242
  validate = true
17020
17243
  }) {
17021
- const filePath = join113(
17244
+ const filePath = join114(
17022
17245
  baseDir,
17023
17246
  this.getSettablePaths().nonRoot.relativeDirPath,
17024
17247
  relativeFilePath
@@ -17158,7 +17381,7 @@ var AntigravityRule = class _AntigravityRule extends ToolRule {
17158
17381
  };
17159
17382
 
17160
17383
  // src/features/rules/augmentcode-legacy-rule.ts
17161
- import { join as join114 } from "path";
17384
+ import { join as join115 } from "path";
17162
17385
  var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17163
17386
  toRulesyncRule() {
17164
17387
  const rulesyncFrontmatter = {
@@ -17218,8 +17441,8 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17218
17441
  }) {
17219
17442
  const settablePaths = this.getSettablePaths();
17220
17443
  const isRoot = relativeFilePath === settablePaths.root.relativeFilePath;
17221
- const relativePath = isRoot ? settablePaths.root.relativeFilePath : join114(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17222
- const fileContent = await readFileContent(join114(baseDir, relativePath));
17444
+ const relativePath = isRoot ? settablePaths.root.relativeFilePath : join115(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
17445
+ const fileContent = await readFileContent(join115(baseDir, relativePath));
17223
17446
  return new _AugmentcodeLegacyRule({
17224
17447
  baseDir,
17225
17448
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -17248,7 +17471,7 @@ var AugmentcodeLegacyRule = class _AugmentcodeLegacyRule extends ToolRule {
17248
17471
  };
17249
17472
 
17250
17473
  // src/features/rules/augmentcode-rule.ts
17251
- import { join as join115 } from "path";
17474
+ import { join as join116 } from "path";
17252
17475
  var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17253
17476
  toRulesyncRule() {
17254
17477
  return this.toRulesyncRuleDefault();
@@ -17279,7 +17502,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17279
17502
  relativeFilePath,
17280
17503
  validate = true
17281
17504
  }) {
17282
- const filePath = join115(
17505
+ const filePath = join116(
17283
17506
  baseDir,
17284
17507
  this.getSettablePaths().nonRoot.relativeDirPath,
17285
17508
  relativeFilePath
@@ -17319,7 +17542,7 @@ var AugmentcodeRule = class _AugmentcodeRule extends ToolRule {
17319
17542
  };
17320
17543
 
17321
17544
  // src/features/rules/claudecode-legacy-rule.ts
17322
- import { join as join116 } from "path";
17545
+ import { join as join117 } from "path";
17323
17546
  var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17324
17547
  static getSettablePaths({
17325
17548
  global,
@@ -17361,7 +17584,7 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17361
17584
  if (isRoot) {
17362
17585
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17363
17586
  const fileContent2 = await readFileContent(
17364
- join116(baseDir, rootDirPath, paths.root.relativeFilePath)
17587
+ join117(baseDir, rootDirPath, paths.root.relativeFilePath)
17365
17588
  );
17366
17589
  return new _ClaudecodeLegacyRule({
17367
17590
  baseDir,
@@ -17375,8 +17598,8 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17375
17598
  if (!paths.nonRoot) {
17376
17599
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17377
17600
  }
17378
- const relativePath = join116(paths.nonRoot.relativeDirPath, relativeFilePath);
17379
- const fileContent = await readFileContent(join116(baseDir, relativePath));
17601
+ const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
17602
+ const fileContent = await readFileContent(join117(baseDir, relativePath));
17380
17603
  return new _ClaudecodeLegacyRule({
17381
17604
  baseDir,
17382
17605
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17435,10 +17658,10 @@ var ClaudecodeLegacyRule = class _ClaudecodeLegacyRule extends ToolRule {
17435
17658
  };
17436
17659
 
17437
17660
  // src/features/rules/claudecode-rule.ts
17438
- import { join as join117 } from "path";
17439
- import { z as z67 } from "zod/mini";
17440
- var ClaudecodeRuleFrontmatterSchema = z67.object({
17441
- paths: z67.optional(z67.array(z67.string()))
17661
+ import { join as join118 } from "path";
17662
+ import { z as z68 } from "zod/mini";
17663
+ var ClaudecodeRuleFrontmatterSchema = z68.object({
17664
+ paths: z68.optional(z68.array(z68.string()))
17442
17665
  });
17443
17666
  var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17444
17667
  frontmatter;
@@ -17476,7 +17699,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17476
17699
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
17477
17700
  if (!result.success) {
17478
17701
  throw new Error(
17479
- `Invalid frontmatter in ${join117(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17702
+ `Invalid frontmatter in ${join118(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17480
17703
  );
17481
17704
  }
17482
17705
  }
@@ -17506,7 +17729,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17506
17729
  if (isRoot) {
17507
17730
  const rootDirPath = overrideDirPath ?? paths.root.relativeDirPath;
17508
17731
  const fileContent2 = await readFileContent(
17509
- join117(baseDir, rootDirPath, paths.root.relativeFilePath)
17732
+ join118(baseDir, rootDirPath, paths.root.relativeFilePath)
17510
17733
  );
17511
17734
  return new _ClaudecodeRule({
17512
17735
  baseDir,
@@ -17521,8 +17744,8 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17521
17744
  if (!paths.nonRoot) {
17522
17745
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17523
17746
  }
17524
- const relativePath = join117(paths.nonRoot.relativeDirPath, relativeFilePath);
17525
- const filePath = join117(baseDir, relativePath);
17747
+ const relativePath = join118(paths.nonRoot.relativeDirPath, relativeFilePath);
17748
+ const filePath = join118(baseDir, relativePath);
17526
17749
  const fileContent = await readFileContent(filePath);
17527
17750
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17528
17751
  const result = ClaudecodeRuleFrontmatterSchema.safeParse(frontmatter);
@@ -17633,7 +17856,7 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17633
17856
  return {
17634
17857
  success: false,
17635
17858
  error: new Error(
17636
- `Invalid frontmatter in ${join117(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17859
+ `Invalid frontmatter in ${join118(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
17637
17860
  )
17638
17861
  };
17639
17862
  }
@@ -17653,10 +17876,10 @@ var ClaudecodeRule = class _ClaudecodeRule extends ToolRule {
17653
17876
  };
17654
17877
 
17655
17878
  // src/features/rules/cline-rule.ts
17656
- import { join as join118 } from "path";
17657
- import { z as z68 } from "zod/mini";
17658
- var ClineRuleFrontmatterSchema = z68.object({
17659
- description: z68.string()
17879
+ import { join as join119 } from "path";
17880
+ import { z as z69 } from "zod/mini";
17881
+ var ClineRuleFrontmatterSchema = z69.object({
17882
+ description: z69.string()
17660
17883
  });
17661
17884
  var ClineRule = class _ClineRule extends ToolRule {
17662
17885
  static getSettablePaths(_options = {}) {
@@ -17699,7 +17922,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17699
17922
  validate = true
17700
17923
  }) {
17701
17924
  const fileContent = await readFileContent(
17702
- join118(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17925
+ join119(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
17703
17926
  );
17704
17927
  return new _ClineRule({
17705
17928
  baseDir,
@@ -17725,7 +17948,7 @@ var ClineRule = class _ClineRule extends ToolRule {
17725
17948
  };
17726
17949
 
17727
17950
  // src/features/rules/codexcli-rule.ts
17728
- import { join as join119 } from "path";
17951
+ import { join as join120 } from "path";
17729
17952
  var CodexcliRule = class _CodexcliRule extends ToolRule {
17730
17953
  static getSettablePaths({
17731
17954
  global,
@@ -17760,7 +17983,7 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17760
17983
  if (isRoot) {
17761
17984
  const relativePath2 = paths.root.relativeFilePath;
17762
17985
  const fileContent2 = await readFileContent(
17763
- join119(baseDir, paths.root.relativeDirPath, relativePath2)
17986
+ join120(baseDir, paths.root.relativeDirPath, relativePath2)
17764
17987
  );
17765
17988
  return new _CodexcliRule({
17766
17989
  baseDir,
@@ -17774,8 +17997,8 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17774
17997
  if (!paths.nonRoot) {
17775
17998
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17776
17999
  }
17777
- const relativePath = join119(paths.nonRoot.relativeDirPath, relativeFilePath);
17778
- const fileContent = await readFileContent(join119(baseDir, relativePath));
18000
+ const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
18001
+ const fileContent = await readFileContent(join120(baseDir, relativePath));
17779
18002
  return new _CodexcliRule({
17780
18003
  baseDir,
17781
18004
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -17834,12 +18057,12 @@ var CodexcliRule = class _CodexcliRule extends ToolRule {
17834
18057
  };
17835
18058
 
17836
18059
  // src/features/rules/copilot-rule.ts
17837
- import { join as join120 } from "path";
17838
- import { z as z69 } from "zod/mini";
17839
- var CopilotRuleFrontmatterSchema = z69.object({
17840
- description: z69.optional(z69.string()),
17841
- applyTo: z69.optional(z69.string()),
17842
- excludeAgent: z69.optional(z69.union([z69.literal("code-review"), z69.literal("coding-agent")]))
18060
+ import { join as join121 } from "path";
18061
+ import { z as z70 } from "zod/mini";
18062
+ var CopilotRuleFrontmatterSchema = z70.object({
18063
+ description: z70.optional(z70.string()),
18064
+ applyTo: z70.optional(z70.string()),
18065
+ excludeAgent: z70.optional(z70.union([z70.literal("code-review"), z70.literal("coding-agent")]))
17843
18066
  });
17844
18067
  var CopilotRule = class _CopilotRule extends ToolRule {
17845
18068
  frontmatter;
@@ -17871,7 +18094,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17871
18094
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
17872
18095
  if (!result.success) {
17873
18096
  throw new Error(
17874
- `Invalid frontmatter in ${join120(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18097
+ `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
17875
18098
  );
17876
18099
  }
17877
18100
  }
@@ -17961,8 +18184,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17961
18184
  const paths = this.getSettablePaths({ global });
17962
18185
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
17963
18186
  if (isRoot) {
17964
- const relativePath2 = join120(paths.root.relativeDirPath, paths.root.relativeFilePath);
17965
- const filePath2 = join120(baseDir, relativePath2);
18187
+ const relativePath2 = join121(paths.root.relativeDirPath, paths.root.relativeFilePath);
18188
+ const filePath2 = join121(baseDir, relativePath2);
17966
18189
  const fileContent2 = await readFileContent(filePath2);
17967
18190
  return new _CopilotRule({
17968
18191
  baseDir,
@@ -17977,8 +18200,8 @@ var CopilotRule = class _CopilotRule extends ToolRule {
17977
18200
  if (!paths.nonRoot) {
17978
18201
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
17979
18202
  }
17980
- const relativePath = join120(paths.nonRoot.relativeDirPath, relativeFilePath);
17981
- const filePath = join120(baseDir, relativePath);
18203
+ const relativePath = join121(paths.nonRoot.relativeDirPath, relativeFilePath);
18204
+ const filePath = join121(baseDir, relativePath);
17982
18205
  const fileContent = await readFileContent(filePath);
17983
18206
  const { frontmatter, body: content } = parseFrontmatter(fileContent, filePath);
17984
18207
  const result = CopilotRuleFrontmatterSchema.safeParse(frontmatter);
@@ -18024,7 +18247,7 @@ var CopilotRule = class _CopilotRule extends ToolRule {
18024
18247
  return {
18025
18248
  success: false,
18026
18249
  error: new Error(
18027
- `Invalid frontmatter in ${join120(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18250
+ `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18028
18251
  )
18029
18252
  };
18030
18253
  }
@@ -18080,12 +18303,12 @@ var CopilotcliRule = class _CopilotcliRule extends CopilotRule {
18080
18303
  };
18081
18304
 
18082
18305
  // src/features/rules/cursor-rule.ts
18083
- import { join as join121 } from "path";
18084
- import { z as z70 } from "zod/mini";
18085
- var CursorRuleFrontmatterSchema = z70.object({
18086
- description: z70.optional(z70.string()),
18087
- globs: z70.optional(z70.string()),
18088
- alwaysApply: z70.optional(z70.boolean())
18306
+ import { join as join122 } from "path";
18307
+ import { z as z71 } from "zod/mini";
18308
+ var CursorRuleFrontmatterSchema = z71.object({
18309
+ description: z71.optional(z71.string()),
18310
+ globs: z71.optional(z71.string()),
18311
+ alwaysApply: z71.optional(z71.boolean())
18089
18312
  });
18090
18313
  var CursorRule = class _CursorRule extends ToolRule {
18091
18314
  frontmatter;
@@ -18102,7 +18325,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18102
18325
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18103
18326
  if (!result.success) {
18104
18327
  throw new Error(
18105
- `Invalid frontmatter in ${join121(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18328
+ `Invalid frontmatter in ${join122(rest.relativeDirPath, rest.relativeFilePath)}: ${formatError(result.error)}`
18106
18329
  );
18107
18330
  }
18108
18331
  }
@@ -18218,7 +18441,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18218
18441
  relativeFilePath,
18219
18442
  validate = true
18220
18443
  }) {
18221
- const filePath = join121(
18444
+ const filePath = join122(
18222
18445
  baseDir,
18223
18446
  this.getSettablePaths().nonRoot.relativeDirPath,
18224
18447
  relativeFilePath
@@ -18228,7 +18451,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18228
18451
  const result = CursorRuleFrontmatterSchema.safeParse(frontmatter);
18229
18452
  if (!result.success) {
18230
18453
  throw new Error(
18231
- `Invalid frontmatter in ${join121(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18454
+ `Invalid frontmatter in ${join122(baseDir, relativeFilePath)}: ${formatError(result.error)}`
18232
18455
  );
18233
18456
  }
18234
18457
  return new _CursorRule({
@@ -18265,7 +18488,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18265
18488
  return {
18266
18489
  success: false,
18267
18490
  error: new Error(
18268
- `Invalid frontmatter in ${join121(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18491
+ `Invalid frontmatter in ${join122(this.relativeDirPath, this.relativeFilePath)}: ${formatError(result.error)}`
18269
18492
  )
18270
18493
  };
18271
18494
  }
@@ -18285,7 +18508,7 @@ var CursorRule = class _CursorRule extends ToolRule {
18285
18508
  };
18286
18509
 
18287
18510
  // src/features/rules/deepagents-rule.ts
18288
- import { join as join122 } from "path";
18511
+ import { join as join123 } from "path";
18289
18512
  var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18290
18513
  constructor({ fileContent, root, ...rest }) {
18291
18514
  super({
@@ -18312,8 +18535,8 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18312
18535
  }) {
18313
18536
  const settablePaths = this.getSettablePaths();
18314
18537
  const isRoot = relativeFilePath === "AGENTS.md";
18315
- const relativePath = isRoot ? join122(".deepagents", "AGENTS.md") : join122(".deepagents", "memories", relativeFilePath);
18316
- const fileContent = await readFileContent(join122(baseDir, relativePath));
18538
+ const relativePath = isRoot ? join123(".deepagents", "AGENTS.md") : join123(".deepagents", "memories", relativeFilePath);
18539
+ const fileContent = await readFileContent(join123(baseDir, relativePath));
18317
18540
  return new _DeepagentsRule({
18318
18541
  baseDir,
18319
18542
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18368,7 +18591,7 @@ var DeepagentsRule = class _DeepagentsRule extends ToolRule {
18368
18591
  };
18369
18592
 
18370
18593
  // src/features/rules/factorydroid-rule.ts
18371
- import { join as join123 } from "path";
18594
+ import { join as join124 } from "path";
18372
18595
  var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18373
18596
  constructor({ fileContent, root, ...rest }) {
18374
18597
  super({
@@ -18408,8 +18631,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18408
18631
  const paths = this.getSettablePaths({ global });
18409
18632
  const isRoot = relativeFilePath === paths.root.relativeFilePath;
18410
18633
  if (isRoot) {
18411
- const relativePath2 = join123(paths.root.relativeDirPath, paths.root.relativeFilePath);
18412
- const fileContent2 = await readFileContent(join123(baseDir, relativePath2));
18634
+ const relativePath2 = join124(paths.root.relativeDirPath, paths.root.relativeFilePath);
18635
+ const fileContent2 = await readFileContent(join124(baseDir, relativePath2));
18413
18636
  return new _FactorydroidRule({
18414
18637
  baseDir,
18415
18638
  relativeDirPath: paths.root.relativeDirPath,
@@ -18422,8 +18645,8 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18422
18645
  if (!paths.nonRoot) {
18423
18646
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18424
18647
  }
18425
- const relativePath = join123(paths.nonRoot.relativeDirPath, relativeFilePath);
18426
- const fileContent = await readFileContent(join123(baseDir, relativePath));
18648
+ const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18649
+ const fileContent = await readFileContent(join124(baseDir, relativePath));
18427
18650
  return new _FactorydroidRule({
18428
18651
  baseDir,
18429
18652
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18482,7 +18705,7 @@ var FactorydroidRule = class _FactorydroidRule extends ToolRule {
18482
18705
  };
18483
18706
 
18484
18707
  // src/features/rules/geminicli-rule.ts
18485
- import { join as join124 } from "path";
18708
+ import { join as join125 } from "path";
18486
18709
  var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18487
18710
  static getSettablePaths({
18488
18711
  global,
@@ -18517,7 +18740,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18517
18740
  if (isRoot) {
18518
18741
  const relativePath2 = paths.root.relativeFilePath;
18519
18742
  const fileContent2 = await readFileContent(
18520
- join124(baseDir, paths.root.relativeDirPath, relativePath2)
18743
+ join125(baseDir, paths.root.relativeDirPath, relativePath2)
18521
18744
  );
18522
18745
  return new _GeminiCliRule({
18523
18746
  baseDir,
@@ -18531,8 +18754,8 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18531
18754
  if (!paths.nonRoot) {
18532
18755
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18533
18756
  }
18534
- const relativePath = join124(paths.nonRoot.relativeDirPath, relativeFilePath);
18535
- const fileContent = await readFileContent(join124(baseDir, relativePath));
18757
+ const relativePath = join125(paths.nonRoot.relativeDirPath, relativeFilePath);
18758
+ const fileContent = await readFileContent(join125(baseDir, relativePath));
18536
18759
  return new _GeminiCliRule({
18537
18760
  baseDir,
18538
18761
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18591,7 +18814,7 @@ var GeminiCliRule = class _GeminiCliRule extends ToolRule {
18591
18814
  };
18592
18815
 
18593
18816
  // src/features/rules/goose-rule.ts
18594
- import { join as join125 } from "path";
18817
+ import { join as join126 } from "path";
18595
18818
  var GooseRule = class _GooseRule extends ToolRule {
18596
18819
  static getSettablePaths({
18597
18820
  global,
@@ -18626,7 +18849,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18626
18849
  if (isRoot) {
18627
18850
  const relativePath2 = paths.root.relativeFilePath;
18628
18851
  const fileContent2 = await readFileContent(
18629
- join125(baseDir, paths.root.relativeDirPath, relativePath2)
18852
+ join126(baseDir, paths.root.relativeDirPath, relativePath2)
18630
18853
  );
18631
18854
  return new _GooseRule({
18632
18855
  baseDir,
@@ -18640,8 +18863,8 @@ var GooseRule = class _GooseRule extends ToolRule {
18640
18863
  if (!paths.nonRoot) {
18641
18864
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18642
18865
  }
18643
- const relativePath = join125(paths.nonRoot.relativeDirPath, relativeFilePath);
18644
- const fileContent = await readFileContent(join125(baseDir, relativePath));
18866
+ const relativePath = join126(paths.nonRoot.relativeDirPath, relativeFilePath);
18867
+ const fileContent = await readFileContent(join126(baseDir, relativePath));
18645
18868
  return new _GooseRule({
18646
18869
  baseDir,
18647
18870
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18700,7 +18923,7 @@ var GooseRule = class _GooseRule extends ToolRule {
18700
18923
  };
18701
18924
 
18702
18925
  // src/features/rules/junie-rule.ts
18703
- import { join as join126 } from "path";
18926
+ import { join as join127 } from "path";
18704
18927
  var JunieRule = class _JunieRule extends ToolRule {
18705
18928
  static getSettablePaths(_options = {}) {
18706
18929
  return {
@@ -18729,8 +18952,8 @@ var JunieRule = class _JunieRule extends ToolRule {
18729
18952
  }) {
18730
18953
  const isRoot = _JunieRule.isRootRelativeFilePath(relativeFilePath);
18731
18954
  const settablePaths = this.getSettablePaths();
18732
- const relativePath = isRoot ? join126(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join126(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18733
- const fileContent = await readFileContent(join126(baseDir, relativePath));
18955
+ const relativePath = isRoot ? join127(settablePaths.root.relativeDirPath, settablePaths.root.relativeFilePath) : join127(settablePaths.nonRoot.relativeDirPath, relativeFilePath);
18956
+ const fileContent = await readFileContent(join127(baseDir, relativePath));
18734
18957
  return new _JunieRule({
18735
18958
  baseDir,
18736
18959
  relativeDirPath: isRoot ? settablePaths.root.relativeDirPath : settablePaths.nonRoot.relativeDirPath,
@@ -18785,7 +19008,7 @@ var JunieRule = class _JunieRule extends ToolRule {
18785
19008
  };
18786
19009
 
18787
19010
  // src/features/rules/kilo-rule.ts
18788
- import { join as join127 } from "path";
19011
+ import { join as join128 } from "path";
18789
19012
  var KiloRule = class _KiloRule extends ToolRule {
18790
19013
  static getSettablePaths({
18791
19014
  global,
@@ -18820,7 +19043,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18820
19043
  if (isRoot) {
18821
19044
  const relativePath2 = paths.root.relativeFilePath;
18822
19045
  const fileContent2 = await readFileContent(
18823
- join127(baseDir, paths.root.relativeDirPath, relativePath2)
19046
+ join128(baseDir, paths.root.relativeDirPath, relativePath2)
18824
19047
  );
18825
19048
  return new _KiloRule({
18826
19049
  baseDir,
@@ -18834,8 +19057,8 @@ var KiloRule = class _KiloRule extends ToolRule {
18834
19057
  if (!paths.nonRoot) {
18835
19058
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
18836
19059
  }
18837
- const relativePath = join127(paths.nonRoot.relativeDirPath, relativeFilePath);
18838
- const fileContent = await readFileContent(join127(baseDir, relativePath));
19060
+ const relativePath = join128(paths.nonRoot.relativeDirPath, relativeFilePath);
19061
+ const fileContent = await readFileContent(join128(baseDir, relativePath));
18839
19062
  return new _KiloRule({
18840
19063
  baseDir,
18841
19064
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -18894,7 +19117,7 @@ var KiloRule = class _KiloRule extends ToolRule {
18894
19117
  };
18895
19118
 
18896
19119
  // src/features/rules/kiro-rule.ts
18897
- import { join as join128 } from "path";
19120
+ import { join as join129 } from "path";
18898
19121
  var KiroRule = class _KiroRule extends ToolRule {
18899
19122
  static getSettablePaths(_options = {}) {
18900
19123
  return {
@@ -18909,7 +19132,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18909
19132
  validate = true
18910
19133
  }) {
18911
19134
  const fileContent = await readFileContent(
18912
- join128(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19135
+ join129(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
18913
19136
  );
18914
19137
  return new _KiroRule({
18915
19138
  baseDir,
@@ -18963,7 +19186,7 @@ var KiroRule = class _KiroRule extends ToolRule {
18963
19186
  };
18964
19187
 
18965
19188
  // src/features/rules/opencode-rule.ts
18966
- import { join as join129 } from "path";
19189
+ import { join as join130 } from "path";
18967
19190
  var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18968
19191
  static getSettablePaths({
18969
19192
  global,
@@ -18998,7 +19221,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
18998
19221
  if (isRoot) {
18999
19222
  const relativePath2 = paths.root.relativeFilePath;
19000
19223
  const fileContent2 = await readFileContent(
19001
- join129(baseDir, paths.root.relativeDirPath, relativePath2)
19224
+ join130(baseDir, paths.root.relativeDirPath, relativePath2)
19002
19225
  );
19003
19226
  return new _OpenCodeRule({
19004
19227
  baseDir,
@@ -19012,8 +19235,8 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19012
19235
  if (!paths.nonRoot) {
19013
19236
  throw new Error(`nonRoot path is not set for ${relativeFilePath}`);
19014
19237
  }
19015
- const relativePath = join129(paths.nonRoot.relativeDirPath, relativeFilePath);
19016
- const fileContent = await readFileContent(join129(baseDir, relativePath));
19238
+ const relativePath = join130(paths.nonRoot.relativeDirPath, relativeFilePath);
19239
+ const fileContent = await readFileContent(join130(baseDir, relativePath));
19017
19240
  return new _OpenCodeRule({
19018
19241
  baseDir,
19019
19242
  relativeDirPath: paths.nonRoot.relativeDirPath,
@@ -19072,7 +19295,7 @@ var OpenCodeRule = class _OpenCodeRule extends ToolRule {
19072
19295
  };
19073
19296
 
19074
19297
  // src/features/rules/qwencode-rule.ts
19075
- import { join as join130 } from "path";
19298
+ import { join as join131 } from "path";
19076
19299
  var QwencodeRule = class _QwencodeRule extends ToolRule {
19077
19300
  static getSettablePaths(_options = {}) {
19078
19301
  return {
@@ -19091,8 +19314,8 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19091
19314
  validate = true
19092
19315
  }) {
19093
19316
  const isRoot = relativeFilePath === "QWEN.md";
19094
- const relativePath = isRoot ? "QWEN.md" : join130(".qwen", "memories", relativeFilePath);
19095
- const fileContent = await readFileContent(join130(baseDir, relativePath));
19317
+ const relativePath = isRoot ? "QWEN.md" : join131(".qwen", "memories", relativeFilePath);
19318
+ const fileContent = await readFileContent(join131(baseDir, relativePath));
19096
19319
  return new _QwencodeRule({
19097
19320
  baseDir,
19098
19321
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : this.getSettablePaths().nonRoot.relativeDirPath,
@@ -19144,7 +19367,7 @@ var QwencodeRule = class _QwencodeRule extends ToolRule {
19144
19367
  };
19145
19368
 
19146
19369
  // src/features/rules/replit-rule.ts
19147
- import { join as join131 } from "path";
19370
+ import { join as join132 } from "path";
19148
19371
  var ReplitRule = class _ReplitRule extends ToolRule {
19149
19372
  static getSettablePaths(_options = {}) {
19150
19373
  return {
@@ -19166,7 +19389,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19166
19389
  }
19167
19390
  const relativePath = paths.root.relativeFilePath;
19168
19391
  const fileContent = await readFileContent(
19169
- join131(baseDir, paths.root.relativeDirPath, relativePath)
19392
+ join132(baseDir, paths.root.relativeDirPath, relativePath)
19170
19393
  );
19171
19394
  return new _ReplitRule({
19172
19395
  baseDir,
@@ -19232,7 +19455,7 @@ var ReplitRule = class _ReplitRule extends ToolRule {
19232
19455
  };
19233
19456
 
19234
19457
  // src/features/rules/roo-rule.ts
19235
- import { join as join132 } from "path";
19458
+ import { join as join133 } from "path";
19236
19459
  var RooRule = class _RooRule extends ToolRule {
19237
19460
  static getSettablePaths(_options = {}) {
19238
19461
  return {
@@ -19247,7 +19470,7 @@ var RooRule = class _RooRule extends ToolRule {
19247
19470
  validate = true
19248
19471
  }) {
19249
19472
  const fileContent = await readFileContent(
19250
- join132(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19473
+ join133(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19251
19474
  );
19252
19475
  return new _RooRule({
19253
19476
  baseDir,
@@ -19316,7 +19539,7 @@ var RooRule = class _RooRule extends ToolRule {
19316
19539
  };
19317
19540
 
19318
19541
  // src/features/rules/rovodev-rule.ts
19319
- import { join as join133 } from "path";
19542
+ import { join as join134 } from "path";
19320
19543
  var DISALLOWED_ROVODEV_MODULAR_RULE_BASENAMES = /* @__PURE__ */ new Set(["agents.md", "agents.local.md"]);
19321
19544
  var RovodevRule = class _RovodevRule extends ToolRule {
19322
19545
  /**
@@ -19360,7 +19583,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19360
19583
  root: rovodevAgents,
19361
19584
  alternativeRoots: [{ relativeDirPath: ".", relativeFilePath: "AGENTS.md" }],
19362
19585
  nonRoot: {
19363
- relativeDirPath: join133(".rovodev", ".rulesync", "modular-rules")
19586
+ relativeDirPath: join134(".rovodev", ".rulesync", "modular-rules")
19364
19587
  }
19365
19588
  };
19366
19589
  }
@@ -19399,10 +19622,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19399
19622
  }) {
19400
19623
  if (!this.isAllowedModularRulesRelativePath(relativeFilePath)) {
19401
19624
  throw new Error(
19402
- `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join133(relativeDirPath, relativeFilePath)}`
19625
+ `Reserved Rovodev memory basename under modular-rules (not a modular rule): ${join134(relativeDirPath, relativeFilePath)}`
19403
19626
  );
19404
19627
  }
19405
- const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19628
+ const fileContent = await readFileContent(join134(baseDir, relativeDirPath, relativeFilePath));
19406
19629
  return new _RovodevRule({
19407
19630
  baseDir,
19408
19631
  relativeDirPath,
@@ -19422,10 +19645,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19422
19645
  paths
19423
19646
  }) {
19424
19647
  const relativeDirPath = overrideDirPath ?? paths.root.relativeDirPath;
19425
- const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join133(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join133(paths.root.relativeDirPath, paths.root.relativeFilePath);
19648
+ const agentsMdExpectedLocationsDescription = "alternativeRoots" in paths && paths.alternativeRoots && paths.alternativeRoots.length > 0 ? `${join134(paths.root.relativeDirPath, paths.root.relativeFilePath)} or project root` : join134(paths.root.relativeDirPath, paths.root.relativeFilePath);
19426
19649
  if (relativeFilePath !== "AGENTS.md") {
19427
19650
  throw new Error(
19428
- `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19651
+ `Rovodev rules support only AGENTS.md at ${agentsMdExpectedLocationsDescription}, got: ${join134(relativeDirPath, relativeFilePath)}`
19429
19652
  );
19430
19653
  }
19431
19654
  const allowed = relativeDirPath === paths.root.relativeDirPath || "alternativeRoots" in paths && paths.alternativeRoots?.some(
@@ -19433,10 +19656,10 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19433
19656
  );
19434
19657
  if (!allowed) {
19435
19658
  throw new Error(
19436
- `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join133(relativeDirPath, relativeFilePath)}`
19659
+ `Rovodev AGENTS.md must be at ${agentsMdExpectedLocationsDescription}, got: ${join134(relativeDirPath, relativeFilePath)}`
19437
19660
  );
19438
19661
  }
19439
- const fileContent = await readFileContent(join133(baseDir, relativeDirPath, relativeFilePath));
19662
+ const fileContent = await readFileContent(join134(baseDir, relativeDirPath, relativeFilePath));
19440
19663
  return new _RovodevRule({
19441
19664
  baseDir,
19442
19665
  relativeDirPath,
@@ -19550,7 +19773,7 @@ var RovodevRule = class _RovodevRule extends ToolRule {
19550
19773
  };
19551
19774
 
19552
19775
  // src/features/rules/warp-rule.ts
19553
- import { join as join134 } from "path";
19776
+ import { join as join135 } from "path";
19554
19777
  var WarpRule = class _WarpRule extends ToolRule {
19555
19778
  constructor({ fileContent, root, ...rest }) {
19556
19779
  super({
@@ -19576,8 +19799,8 @@ var WarpRule = class _WarpRule extends ToolRule {
19576
19799
  validate = true
19577
19800
  }) {
19578
19801
  const isRoot = relativeFilePath === this.getSettablePaths().root.relativeFilePath;
19579
- const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join134(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19580
- const fileContent = await readFileContent(join134(baseDir, relativePath));
19802
+ const relativePath = isRoot ? this.getSettablePaths().root.relativeFilePath : join135(this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath);
19803
+ const fileContent = await readFileContent(join135(baseDir, relativePath));
19581
19804
  return new _WarpRule({
19582
19805
  baseDir,
19583
19806
  relativeDirPath: isRoot ? this.getSettablePaths().root.relativeDirPath : ".warp",
@@ -19632,7 +19855,7 @@ var WarpRule = class _WarpRule extends ToolRule {
19632
19855
  };
19633
19856
 
19634
19857
  // src/features/rules/windsurf-rule.ts
19635
- import { join as join135 } from "path";
19858
+ import { join as join136 } from "path";
19636
19859
  var WindsurfRule = class _WindsurfRule extends ToolRule {
19637
19860
  static getSettablePaths(_options = {}) {
19638
19861
  return {
@@ -19647,7 +19870,7 @@ var WindsurfRule = class _WindsurfRule extends ToolRule {
19647
19870
  validate = true
19648
19871
  }) {
19649
19872
  const fileContent = await readFileContent(
19650
- join135(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19873
+ join136(baseDir, this.getSettablePaths().nonRoot.relativeDirPath, relativeFilePath)
19651
19874
  );
19652
19875
  return new _WindsurfRule({
19653
19876
  baseDir,
@@ -19745,11 +19968,11 @@ var rulesProcessorToolTargets = [
19745
19968
  "warp",
19746
19969
  "windsurf"
19747
19970
  ];
19748
- var RulesProcessorToolTargetSchema = z71.enum(rulesProcessorToolTargets);
19749
- var formatRulePaths = (rules) => rules.map((r) => join136(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19750
- var RulesFeatureOptionsSchema = z71.looseObject({
19751
- ruleDiscoveryMode: z71.optional(z71.enum(["none", "explicit"])),
19752
- includeLocalRoot: z71.optional(z71.boolean())
19971
+ var RulesProcessorToolTargetSchema = z72.enum(rulesProcessorToolTargets);
19972
+ var formatRulePaths = (rules) => rules.map((r) => join137(r.getRelativeDirPath(), r.getRelativeFilePath())).join(", ");
19973
+ var RulesFeatureOptionsSchema = z72.looseObject({
19974
+ ruleDiscoveryMode: z72.optional(z72.enum(["none", "explicit"])),
19975
+ includeLocalRoot: z72.optional(z72.boolean())
19753
19976
  });
19754
19977
  var resolveRuleDiscoveryMode = ({
19755
19978
  defaultMode,
@@ -19770,8 +19993,8 @@ var resolveRuleDiscoveryMode = ({
19770
19993
  }
19771
19994
  return parsed.data.ruleDiscoveryMode === "none" ? "auto" : "toon";
19772
19995
  };
19773
- var IncludeLocalRootSchema = z71.looseObject({
19774
- includeLocalRoot: z71.optional(z71.boolean())
19996
+ var IncludeLocalRootSchema = z72.looseObject({
19997
+ includeLocalRoot: z72.optional(z72.boolean())
19775
19998
  });
19776
19999
  var resolveIncludeLocalRoot = (options) => {
19777
20000
  if (!options) return true;
@@ -20077,6 +20300,8 @@ var toolRuleFactories = /* @__PURE__ */ new Map([
20077
20300
  extension: "md",
20078
20301
  supportsGlobal: false,
20079
20302
  ruleDiscoveryMode: "auto"
20303
+ // No additionalConventions.skills needed: Windsurf Cascade auto-discovers
20304
+ // skills from .windsurf/skills/ and ~/.codeium/windsurf/skills/ directories.
20080
20305
  }
20081
20306
  }
20082
20307
  ]
@@ -20214,7 +20439,7 @@ var RulesProcessor = class extends FeatureProcessor {
20214
20439
  }).relativeDirPath;
20215
20440
  return this.skills.filter((skill) => skillClass.isTargetedByRulesyncSkill(skill)).map((skill) => {
20216
20441
  const frontmatter = skill.getFrontmatter();
20217
- const relativePath = join136(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20442
+ const relativePath = join137(toolRelativeDirPath, skill.getDirName(), SKILL_FILE_NAME);
20218
20443
  return {
20219
20444
  name: frontmatter.name,
20220
20445
  description: frontmatter.description,
@@ -20343,8 +20568,8 @@ var RulesProcessor = class extends FeatureProcessor {
20343
20568
  * Load and parse rulesync rule files from .rulesync/rules/ directory
20344
20569
  */
20345
20570
  async loadRulesyncFiles() {
20346
- const rulesyncBaseDir = join136(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20347
- const files = await findFilesByGlobs(join136(rulesyncBaseDir, "**", "*.md"));
20571
+ const rulesyncBaseDir = join137(process.cwd(), RULESYNC_RULES_RELATIVE_DIR_PATH);
20572
+ const files = await findFilesByGlobs(join137(rulesyncBaseDir, "**", "*.md"));
20348
20573
  this.logger.debug(`Found ${files.length} rulesync files`);
20349
20574
  const rulesyncRules = await Promise.all(
20350
20575
  files.map((file) => {
@@ -20459,13 +20684,13 @@ var RulesProcessor = class extends FeatureProcessor {
20459
20684
  return [];
20460
20685
  }
20461
20686
  const uniqueRootFilePaths = await findFilesWithFallback(
20462
- join136(
20687
+ join137(
20463
20688
  this.baseDir,
20464
20689
  settablePaths.root.relativeDirPath ?? ".",
20465
20690
  settablePaths.root.relativeFilePath
20466
20691
  ),
20467
20692
  settablePaths.alternativeRoots,
20468
- (alt) => join136(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20693
+ (alt) => join137(this.baseDir, alt.relativeDirPath, alt.relativeFilePath)
20469
20694
  );
20470
20695
  if (forDeletion) {
20471
20696
  return buildDeletionRulesFromPaths(uniqueRootFilePaths);
@@ -20496,7 +20721,7 @@ var RulesProcessor = class extends FeatureProcessor {
20496
20721
  return [];
20497
20722
  }
20498
20723
  const uniqueLocalRootFilePaths2 = await findFilesByGlobs(
20499
- join136(this.baseDir, "AGENTS.local.md")
20724
+ join137(this.baseDir, "AGENTS.local.md")
20500
20725
  );
20501
20726
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths2);
20502
20727
  }
@@ -20507,9 +20732,9 @@ var RulesProcessor = class extends FeatureProcessor {
20507
20732
  return [];
20508
20733
  }
20509
20734
  const uniqueLocalRootFilePaths = await findFilesWithFallback(
20510
- join136(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20735
+ join137(this.baseDir, settablePaths.root.relativeDirPath ?? ".", "CLAUDE.local.md"),
20511
20736
  settablePaths.alternativeRoots,
20512
- (alt) => join136(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20737
+ (alt) => join137(this.baseDir, alt.relativeDirPath, "CLAUDE.local.md")
20513
20738
  );
20514
20739
  return buildDeletionRulesFromPaths(uniqueLocalRootFilePaths);
20515
20740
  })();
@@ -20520,20 +20745,20 @@ var RulesProcessor = class extends FeatureProcessor {
20520
20745
  if (!forDeletion || this.toolTarget !== "rovodev" || this.global) {
20521
20746
  return [];
20522
20747
  }
20523
- const primaryPaths = await findFilesByGlobs(join136(this.baseDir, ".rovodev", "AGENTS.md"));
20748
+ const primaryPaths = await findFilesByGlobs(join137(this.baseDir, ".rovodev", "AGENTS.md"));
20524
20749
  if (primaryPaths.length === 0) {
20525
20750
  return [];
20526
20751
  }
20527
- const mirrorPaths = await findFilesByGlobs(join136(this.baseDir, "AGENTS.md"));
20752
+ const mirrorPaths = await findFilesByGlobs(join137(this.baseDir, "AGENTS.md"));
20528
20753
  return buildDeletionRulesFromPaths(mirrorPaths);
20529
20754
  })();
20530
20755
  const nonRootToolRules = await (async () => {
20531
20756
  if (!settablePaths.nonRoot) {
20532
20757
  return [];
20533
20758
  }
20534
- const nonRootBaseDir = join136(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20759
+ const nonRootBaseDir = join137(this.baseDir, settablePaths.nonRoot.relativeDirPath);
20535
20760
  const nonRootFilePaths = await findFilesByGlobs(
20536
- join136(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20761
+ join137(nonRootBaseDir, "**", `*.${factory.meta.extension}`)
20537
20762
  );
20538
20763
  if (forDeletion) {
20539
20764
  return buildDeletionRulesFromPaths(nonRootFilePaths, {
@@ -20547,7 +20772,7 @@ var RulesProcessor = class extends FeatureProcessor {
20547
20772
  const ok = RovodevRule.isAllowedModularRulesRelativePath(relativeFilePath);
20548
20773
  if (!ok) {
20549
20774
  this.logger.warn(
20550
- `Skipping reserved Rovodev path under modular-rules (import): ${join136(modularRootRelative, relativeFilePath)}`
20775
+ `Skipping reserved Rovodev path under modular-rules (import): ${join137(modularRootRelative, relativeFilePath)}`
20551
20776
  );
20552
20777
  }
20553
20778
  return ok;
@@ -20673,14 +20898,14 @@ s/<command> [arguments]
20673
20898
  This syntax employs a double slash (\`s/\`) to prevent conflicts with built-in slash commands.
20674
20899
  The \`s\` in \`s/\` stands for *simulate*. Because custom slash commands are not built-in, this syntax provides a pseudo way to invoke them.
20675
20900
 
20676
- When users call a custom slash command, you have to look for the markdown file, \`${join136(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20901
+ When users call a custom slash command, you have to look for the markdown file, \`${join137(RULESYNC_COMMANDS_RELATIVE_DIR_PATH, "{command}.md")}\`, then execute the contents of that file as the block of operations.` : "";
20677
20902
  const subagentsSection = subagents ? `## Simulated Subagents
20678
20903
 
20679
20904
  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.
20680
20905
 
20681
- When users call a simulated subagent, it will look for the corresponding markdown file, \`${join136(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20906
+ When users call a simulated subagent, it will look for the corresponding markdown file, \`${join137(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "{subagent}.md")}\`, and execute its contents as the block of operations.
20682
20907
 
20683
- For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join136(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20908
+ For example, if the user instructs \`Call planner subagent to plan the refactoring\`, you have to look for the markdown file, \`${join137(RULESYNC_SUBAGENTS_RELATIVE_DIR_PATH, "planner.md")}\`, and execute its contents as the block of operations.` : "";
20684
20909
  const skillsSection = skills ? this.generateSkillsSection(skills) : "";
20685
20910
  const result = [
20686
20911
  overview,
@@ -20780,7 +21005,7 @@ function warnUnsupportedTargets(params) {
20780
21005
  }
20781
21006
  }
20782
21007
  async function checkRulesyncDirExists(params) {
20783
- return fileExists(join137(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
21008
+ return fileExists(join138(params.baseDir, RULESYNC_RELATIVE_DIR_PATH));
20784
21009
  }
20785
21010
  async function generate(params) {
20786
21011
  const { config, logger } = params;
@@ -21606,6 +21831,7 @@ export {
21606
21831
  ALL_TOOL_TARGETS,
21607
21832
  ALL_TOOL_TARGETS_WITH_WILDCARD,
21608
21833
  findControlCharacter,
21834
+ GITIGNORE_DESTINATION_KEY,
21609
21835
  ConfigResolver,
21610
21836
  stringifyFrontmatter,
21611
21837
  RulesyncCommandFrontmatterSchema,