ai-nexus 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ko.md CHANGED
@@ -136,6 +136,8 @@ alwaysApply: false
136
136
 
137
137
  개별 룰 파일들이 단일 `AGENTS.md` 파일로 자동 병합되며, 세션 시작 시 로드됩니다. 동적 로딩 없음.
138
138
 
139
+ > **Codex 사용자: 필요한 룰만 선택하세요.** 모든 룰이 매 세션마다 로딩되므로, 너무 많이 설치하면 토큰이 낭비됩니다. 대화형 설치 마법사(`npx ai-nexus install`)에서 필요한 카테고리와 파일만 선택하세요. 권장 시작 세트: `rules/essential.md`, `rules/commit.md`, `rules/security.md`.
140
+
139
141
  ---
140
142
 
141
143
  ## 명령어
package/README.md CHANGED
@@ -136,6 +136,8 @@ After conversion, **Cursor's built-in semantic search** handles rule filtering
136
136
 
137
137
  Individual rule files are aggregated into a single `AGENTS.md` file, which is loaded at session start. No dynamic loading.
138
138
 
139
+ > **Codex users: select only the rules you need.** Since all rules are loaded every session, installing too many wastes tokens. Use the interactive wizard (`npx ai-nexus install`) to pick only relevant categories and files. Recommended starting set: `rules/essential.md`, `rules/commit.md`, `rules/security.md`.
140
+
139
141
  ---
140
142
 
141
143
  ## Commands
@@ -87,6 +87,25 @@ const CATEGORY_LABELS = {
87
87
  function stripFrontmatter(content) {
88
88
  return content.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n*/, '').trim();
89
89
  }
90
+ /**
91
+ * Collect all .md files from a category directory, including SKILL.md in subdirectories.
92
+ */
93
+ function collectMdFiles(catDir) {
94
+ const files = [];
95
+ const entries = fs.readdirSync(catDir, { withFileTypes: true });
96
+ for (const entry of entries) {
97
+ if (entry.isFile() && entry.name.endsWith('.md')) {
98
+ files.push(entry.name);
99
+ }
100
+ else if (entry.isDirectory()) {
101
+ const skillMd = path.join(catDir, entry.name, 'SKILL.md');
102
+ if (fs.existsSync(skillMd)) {
103
+ files.push(path.join(entry.name, 'SKILL.md'));
104
+ }
105
+ }
106
+ }
107
+ return files;
108
+ }
90
109
  /**
91
110
  * Aggregate rule files into a single AGENTS.md content string.
92
111
  * If selectedFiles is provided, only those files are included.
@@ -105,8 +124,7 @@ export function aggregateToAgentsMd(configDir, selectedFiles) {
105
124
  files = selectedFiles[category];
106
125
  }
107
126
  else {
108
- // Scan all .md files in the category directory
109
- files = fs.readdirSync(catDir).filter(f => f.endsWith('.md'));
127
+ files = collectMdFiles(catDir);
110
128
  }
111
129
  if (files.length === 0)
112
130
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-nexus",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Unified rule manager for Claude Code, Cursor, and Codex - write once, use everywhere, save tokens",
5
5
  "main": "dist/index.js",
6
6
  "bin": {