@intellectronica/ruler 0.3.31 → 0.3.32

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.
@@ -101,7 +101,20 @@ async function readMarkdownFiles(rulerDir) {
101
101
  const entries = await fs_1.promises.readdir(dir, { withFileTypes: true });
102
102
  for (const entry of entries) {
103
103
  const fullPath = path.join(dir, entry.name);
104
- if (entry.isDirectory()) {
104
+ // Resolve symlinks to determine actual type
105
+ let isDir = entry.isDirectory();
106
+ let isFile = entry.isFile();
107
+ if (entry.isSymbolicLink()) {
108
+ try {
109
+ const stat = await fs_1.promises.stat(fullPath);
110
+ isDir = stat.isDirectory();
111
+ isFile = stat.isFile();
112
+ }
113
+ catch {
114
+ continue; // skip broken symlinks
115
+ }
116
+ }
117
+ if (isDir) {
105
118
  // Skip .ruler/skills; skills are propagated separately and should not be concatenated
106
119
  const relativeFromRoot = path.relative(rulerDir, fullPath);
107
120
  const isSkillsDir = relativeFromRoot === constants_1.SKILLS_DIR ||
@@ -111,7 +124,7 @@ async function readMarkdownFiles(rulerDir) {
111
124
  }
112
125
  await walk(fullPath);
113
126
  }
114
- else if (entry.isFile() && entry.name.endsWith('.md')) {
127
+ else if (isFile && entry.name.endsWith('.md')) {
115
128
  const content = await fs_1.promises.readFile(fullPath, 'utf8');
116
129
  mdFiles.push({ path: fullPath, content });
117
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellectronica/ruler",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "description": "Ruler — apply the same rules to all coding agents",
5
5
  "main": "dist/lib.js",
6
6
  "scripts": {