@monoes/monomindcli 1.10.24 → 1.10.26

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.
@@ -143,11 +143,46 @@ function matchSkills(task, topN = 5) {
143
143
  .slice(0, topN);
144
144
  }
145
145
 
146
+ // Categories that are almost never relevant in a software project context.
147
+ // We exclude these from extras suggestions UNLESS the prompt has explicit
148
+ // keywords that opt them back in. Default-conservative: in a code repo,
149
+ // an "Anthropologist" for "community docs" or "Unity Architect" for a
150
+ // "community module" is noise, not signal.
151
+ const _NON_DEV_EXTRA_CATEGORIES = new Set([
152
+ 'academic', // Anthropologist, Geographer, Historian, Narratologist, Psychologist
153
+ 'game-development', // Unity/Unreal/Godot/Blender — irrelevant for non-game codebases
154
+ 'marketing',
155
+ 'sales',
156
+ 'paid-media',
157
+ 'design', // brand/UI/UX specialists — irrelevant for code reviews
158
+ ]);
159
+
160
+ // Per-category opt-in keywords. If the prompt mentions one of these, that
161
+ // category is allowed back into extras.
162
+ const _CATEGORY_OPTIN_KEYWORDS = {
163
+ 'academic': /\b(anthropolog|sociolog|cultural|ritual|kinship|ethnograph|histor(?:y|ical|ian)|geograph|narratolog|psycholog|belief\s*system)\b/i,
164
+ 'game-development': /\b(unity|unreal|godot|blender|game\s*(?:design|dev|engine)|gameplay|shader\s*graph|level\s*design|ugc|roblox)\b/i,
165
+ 'marketing': /\b(marketing|advertis|seo|tiktok|instagram|linkedin\s*content|brand|campaign|growth\s*hack|copywrit|blog\s*post|press\s*release|launch\s*strategy|pitch|investor)\b/i,
166
+ 'sales': /\b(sales|prospect|outbound|pipeline|crm|cold\s*email|deal|account\s*strategy|quota|forecast|qbr)\b/i,
167
+ 'paid-media': /\b(paid\s*media|ads?|google\s*ads|meta\s*ads|programmatic|ppc|cpa|conversion\s*tracking)\b/i,
168
+ 'design': /\b(figma|brand\s*identity|design\s*system|ux\s*research|persona|usability|wireframe|prototype|color\s*palette|typography|moodboard)\b/i,
169
+ };
170
+
171
+ function _allowedExtraCategories(taskLower) {
172
+ const allowed = new Set();
173
+ for (const [cat, re] of Object.entries(_CATEGORY_OPTIN_KEYWORDS)) {
174
+ if (re.test(taskLower)) allowed.add(cat);
175
+ }
176
+ return allowed;
177
+ }
178
+
146
179
  function matchExtras(task, topN = 8) {
147
180
  if (typeof task !== 'string') return [];
148
181
  const registry = loadExtrasRegistry();
149
182
  const taskLower = task.toLowerCase();
183
+ const optedIn = _allowedExtraCategories(taskLower);
150
184
  return registry.extras
185
+ .filter(e => !_NON_DEV_EXTRA_CATEGORIES.has(e.category) || optedIn.has(e.category))
151
186
  .map(e => ({ slug: e.slug, name: e.name, description: e.description, category: e.category, filePath: e.filePath, score: scoreEntry(e.keywords, taskLower) }))
152
187
  .filter(e => e.score > 0)
153
188
  .sort((a, b) => b.score - a.score)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoes/monomindcli",
3
- "version": "1.10.24",
3
+ "version": "1.10.26",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -22,8 +22,9 @@
22
22
  * --no-llm Heuristic-only mode (layers + tags from paths, no API calls)
23
23
  * --layers-only Skip per-file analysis, only (re-)detect layers
24
24
  *
25
- * Env:
26
- * ANTHROPIC_API_KEY Required unless --no-llm is set
25
+ * Designed to be invoked by the /monomind:understand slash command. The
26
+ * slash command runs the script in --no-llm mode and orchestrates the
27
+ * per-file summarization through the active Claude Code session.
27
28
  */
28
29
 
29
30
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
@@ -181,7 +182,7 @@ async function callClaude(systemPrompt, userPrompt, maxTokens = 1024) {
181
182
  if (ANTHROPIC_API_KEY) {
182
183
  return callClaudeViaApi(systemPrompt, userPrompt, maxTokens);
183
184
  }
184
- throw new Error('No LLM path available: set ANTHROPIC_API_KEY (or use the /monomind:understand slash command, which orchestrates LLM work via the active Claude Code session)');
185
+ throw new Error('No LLM path available. Use /monomind:understand from inside Claude Code the slash command orchestrates LLM work through the active session.');
185
186
  }
186
187
 
187
188
  function parseJson(text) {
@@ -678,19 +679,13 @@ async function main() {
678
679
  const batch = toAnalyze.slice(0, limit);
679
680
  console.log(`[understand] Analyzing ${batch.length} files (${toAnalyze.length - batch.length} skipped/already enriched)`);
680
681
 
681
- // LLM path: direct Anthropic API only. The script does NOT try to spawn
682
- // `claude -p` from within Claude Code subprocesses — that hangs because
683
- // nested CLI sessions aren't supported. For LLM enrichment without an API
684
- // key, use the /monomind:understand slash command which orchestrates LLM
685
- // work via the active Claude Code session inline.
682
+ // LLM path determined automatically. The script does NOT advise on
683
+ // credentials orchestration is the slash command's job.
686
684
  const llmPath = ANTHROPIC_API_KEY ? 'api' : 'none';
687
685
  if (llmPath === 'none' && !noLlm) {
688
- console.log('[understand] No ANTHROPIC_API_KEY — running in heuristic mode for layer detection.');
689
- console.log('[understand] For per-file summaries: either set ANTHROPIC_API_KEY for direct API,');
690
- console.log('[understand] or use the /monomind:understand slash command from inside Claude Code');
691
- console.log('[understand] (the slash command does inline analysis via the active session, no key needed).');
692
- } else if (llmPath === 'api' && !noLlm) {
693
- console.log('[understand] LLM path: direct Anthropic API');
686
+ console.log('[understand] Running in heuristic mode. For per-file summaries,');
687
+ console.log('[understand] use /monomind:understand from inside Claude Code the slash');
688
+ console.log('[understand] command orchestrates summarization through the active session.');
694
689
  }
695
690
  const useLlm = !noLlm && llmPath !== 'none';
696
691