Skip to content

Commit e33f5e5

Browse files
fix: skip skills subtrees in rule discovery
Co-authored-by: intellectronica <46264+intellectronica@users.noreply.github.com>
1 parent 46ac88f commit e33f5e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/FileSystemUtils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export async function readMarkdownFiles(
7373
const fullPath = path.join(dir, entry.name);
7474
if (entry.isDirectory()) {
7575
// Skip .ruler/skills; skills are propagated separately and should not be concatenated
76-
const isSkillsDir = dir === rulerDir && entry.name === SKILLS_DIR;
76+
const relativeFromRoot = path.relative(rulerDir, fullPath);
77+
const isSkillsDir =
78+
relativeFromRoot === SKILLS_DIR ||
79+
relativeFromRoot.startsWith(`${SKILLS_DIR}${path.sep}`);
7780
if (isSkillsDir) {
7881
continue;
7982
}

0 commit comments

Comments
 (0)