claude-flow 3.7.0-alpha.21 → 3.7.0-alpha.23

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.
Files changed (35) hide show
  1. package/.claude/scheduled_tasks.lock +1 -1
  2. package/README.md +2 -0
  3. package/package.json +1 -1
  4. package/v3/@claude-flow/cli/README.md +2 -0
  5. package/v3/@claude-flow/cli/dist/src/commands/task.js +8 -4
  6. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js +7 -7
  7. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js +101 -24
  8. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.js +6 -6
  9. package/v3/@claude-flow/cli/dist/src/mcp-tools/autopilot-tools.js +10 -10
  10. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-session-tools.js +5 -5
  11. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.js +23 -23
  12. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.js +12 -12
  13. package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.js +6 -6
  14. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js +7 -7
  15. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.js +8 -8
  16. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.js +10 -10
  17. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.js +5 -5
  18. package/v3/@claude-flow/cli/dist/src/mcp-tools/guidance-tools.js +21 -21
  19. package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.js +9 -9
  20. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +36 -36
  21. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +5 -5
  22. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.js +6 -6
  23. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js +6 -6
  24. package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.js +4 -4
  25. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.js +10 -10
  26. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.js +6 -6
  27. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.js +5 -5
  28. package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.js +4 -4
  29. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.js +7 -7
  30. package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.js +7 -7
  31. package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.js +5 -5
  32. package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.js +11 -11
  33. package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.js +10 -10
  34. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.js +10 -10
  35. package/v3/@claude-flow/cli/package.json +1 -1
@@ -582,7 +582,7 @@ export const memoryTools = [
582
582
  },
583
583
  {
584
584
  name: 'memory_stats',
585
- description: 'Get memory storage statistics including HNSW index status',
585
+ description: 'Get memory storage statistics including HNSW index status Use when native Read/Write is wrong because you need (a) cross-session retrieval by semantic similarity (vector embeddings) not by file path, (b) namespacing across projects without managing directory layout, or (c) the .swarm/memory.db audit trail. For one-shot file I/O, native Read/Write is fine.',
586
586
  category: 'memory',
587
587
  inputSchema: {
588
588
  type: 'object',
@@ -629,7 +629,7 @@ export const memoryTools = [
629
629
  },
630
630
  {
631
631
  name: 'memory_migrate',
632
- description: 'Manually trigger migration from legacy JSON store to sql.js',
632
+ description: 'Manually trigger migration from legacy JSON store to sql.js Use when native Read/Write is wrong because you need (a) cross-session retrieval by semantic similarity (vector embeddings) not by file path, (b) namespacing across projects without managing directory layout, or (c) the .swarm/memory.db audit trail. For one-shot file I/O, native Read/Write is fine.',
633
633
  category: 'memory',
634
634
  inputSchema: {
635
635
  type: 'object',
@@ -668,7 +668,7 @@ export const memoryTools = [
668
668
  // ===== Claude Code Memory Bridge Tools =====
669
669
  {
670
670
  name: 'memory_import_claude',
671
- description: 'Import Claude Code auto-memory files into AgentDB with ONNX vector embeddings. Reads ~/.claude/projects/*/memory/*.md files, parses YAML frontmatter, splits into sections, and stores with 384-dim embeddings for semantic search. Use allProjects=true to import from ALL Claude projects. Pass projectPath to override cwd-based detection (#1883 — required when Ruflo runs in WSL but Claude Code is on Windows).',
671
+ description: 'Import Claude Code auto-memory files into AgentDB with ONNX vector embeddings. Reads ~/.claude/projects/*/memory/*.md files, parses YAML frontmatter, splits into sections, and stores with 384-dim embeddings for semantic search. Use allProjects=true to import from ALL Claude projects. Pass projectPath to override cwd-based detection (#1883 — required when Ruflo runs in WSL but Claude Code is on Windows). Use when native Read/Write is wrong because you need (a) cross-session retrieval by semantic similarity (vector embeddings) not by file path, (b) namespacing across projects without managing directory layout, or (c) the .swarm/memory.db audit trail. For one-shot file I/O, native Read/Write is fine.',
672
672
  category: 'memory',
673
673
  inputSchema: {
674
674
  type: 'object',
@@ -802,7 +802,7 @@ export const memoryTools = [
802
802
  },
803
803
  {
804
804
  name: 'memory_bridge_status',
805
- description: 'Show Claude Code memory bridge status — AgentDB vectors, SONA learning, intelligence patterns, and connection health.',
805
+ description: 'Show Claude Code memory bridge status — AgentDB vectors, SONA learning, intelligence patterns, and connection health. Use when native Read/Write is wrong because you need (a) cross-session retrieval by semantic similarity (vector embeddings) not by file path, (b) namespacing across projects without managing directory layout, or (c) the .swarm/memory.db audit trail. For one-shot file I/O, native Read/Write is fine.',
806
806
  category: 'memory',
807
807
  inputSchema: { type: 'object', properties: {} },
808
808
  handler: async () => {
@@ -858,7 +858,7 @@ export const memoryTools = [
858
858
  },
859
859
  {
860
860
  name: 'memory_search_unified',
861
- description: 'Search across both Claude Code memories and AgentDB entries using semantic vector similarity. Returns merged, deduplicated results from all namespaces.',
861
+ description: 'Search across both Claude Code memories and AgentDB entries using semantic vector similarity. Returns merged, deduplicated results from all namespaces. Use when native Read/Write is wrong because you need (a) cross-session retrieval by semantic similarity (vector embeddings) not by file path, (b) namespacing across projects without managing directory layout, or (c) the .swarm/memory.db audit trail. For one-shot file I/O, native Read/Write is fine.',
862
862
  category: 'memory',
863
863
  inputSchema: {
864
864
  type: 'object',
@@ -155,7 +155,7 @@ function cosineSimilarity(a, b) {
155
155
  export const neuralTools = [
156
156
  {
157
157
  name: 'neural_train',
158
- description: 'Train a neural model',
158
+ description: 'Train a neural model Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
159
159
  category: 'neural',
160
160
  inputSchema: {
161
161
  type: 'object',
@@ -273,7 +273,7 @@ export const neuralTools = [
273
273
  },
274
274
  {
275
275
  name: 'neural_predict',
276
- description: 'Make predictions using a neural model',
276
+ description: 'Make predictions using a neural model Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
277
277
  category: 'neural',
278
278
  inputSchema: {
279
279
  type: 'object',
@@ -374,7 +374,7 @@ export const neuralTools = [
374
374
  },
375
375
  {
376
376
  name: 'neural_patterns',
377
- description: 'Get or manage neural patterns',
377
+ description: 'Get or manage neural patterns Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
378
378
  category: 'neural',
379
379
  inputSchema: {
380
380
  type: 'object',
@@ -501,7 +501,7 @@ export const neuralTools = [
501
501
  },
502
502
  {
503
503
  name: 'neural_compress',
504
- description: 'Compress neural model or embeddings',
504
+ description: 'Compress neural model or embeddings Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
505
505
  category: 'neural',
506
506
  inputSchema: {
507
507
  type: 'object',
@@ -615,7 +615,7 @@ export const neuralTools = [
615
615
  },
616
616
  {
617
617
  name: 'neural_status',
618
- description: 'Get neural system status',
618
+ description: 'Get neural system status Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
619
619
  category: 'neural',
620
620
  inputSchema: {
621
621
  type: 'object',
@@ -683,7 +683,7 @@ export const neuralTools = [
683
683
  },
684
684
  {
685
685
  name: 'neural_optimize',
686
- description: 'Optimize neural model performance',
686
+ description: 'Optimize neural model performance Use when nothing native trains on your workflow — Claude Code has no learning loop. Use to train SONA/MoE/EWC patterns from successful task outcomes; query via neural_predict before spawning agents. Off-path for one-shot work.',
687
687
  category: 'neural',
688
688
  inputSchema: {
689
689
  type: 'object',
@@ -52,7 +52,7 @@ function savePerfStore(store) {
52
52
  export const performanceTools = [
53
53
  {
54
54
  name: 'performance_report',
55
- description: 'Generate performance report',
55
+ description: 'Generate performance report Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
56
56
  category: 'performance',
57
57
  inputSchema: {
58
58
  type: 'object',
@@ -171,7 +171,7 @@ export const performanceTools = [
171
171
  },
172
172
  {
173
173
  name: 'performance_bottleneck',
174
- description: 'Detect performance bottlenecks',
174
+ description: 'Detect performance bottlenecks Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
175
175
  category: 'performance',
176
176
  inputSchema: {
177
177
  type: 'object',
@@ -240,7 +240,7 @@ export const performanceTools = [
240
240
  },
241
241
  {
242
242
  name: 'performance_benchmark',
243
- description: 'Run performance benchmarks',
243
+ description: 'Run performance benchmarks Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
244
244
  category: 'performance',
245
245
  inputSchema: {
246
246
  type: 'object',
@@ -365,7 +365,7 @@ export const performanceTools = [
365
365
  },
366
366
  {
367
367
  name: 'performance_profile',
368
- description: 'Profile specific component or operation',
368
+ description: 'Profile specific component or operation Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
369
369
  category: 'performance',
370
370
  inputSchema: {
371
371
  type: 'object',
@@ -466,7 +466,7 @@ export const performanceTools = [
466
466
  },
467
467
  {
468
468
  name: 'performance_optimize',
469
- description: 'Apply performance optimizations',
469
+ description: 'Apply performance optimizations Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
470
470
  category: 'performance',
471
471
  inputSchema: {
472
472
  type: 'object',
@@ -567,7 +567,7 @@ export const performanceTools = [
567
567
  },
568
568
  {
569
569
  name: 'performance_metrics',
570
- description: 'Get detailed performance metrics',
570
+ description: 'Get detailed performance metrics Use when native shell timing (`time`, `hyperfine`) is wrong because you want Ruflo-aware benchmarks — HNSW search latency, breaker decisions/sec, MCP response p50/p95, embeddings throughput. For OS-level process profiling, native shell + perf are fine.',
571
571
  category: 'performance',
572
572
  inputSchema: {
573
573
  type: 'object',
@@ -231,7 +231,7 @@ function getSummary(metrics) {
231
231
  */
232
232
  const progressCheck = {
233
233
  name: 'progress_check',
234
- description: 'Get current V3 implementation progress percentage and metrics',
234
+ description: 'Get current V3 implementation progress percentage and metrics Use when native TodoWrite is wrong because you need cross-session goal-completion tracking with witness/audit trail. For in-session checklists, native TodoWrite is simpler.',
235
235
  inputSchema: {
236
236
  type: 'object',
237
237
  properties: {
@@ -275,7 +275,7 @@ const progressCheck = {
275
275
  */
276
276
  const progressSync = {
277
277
  name: 'progress_sync',
278
- description: 'Calculate and persist V3 progress metrics to file',
278
+ description: 'Calculate and persist V3 progress metrics to file Use when native TodoWrite is wrong because you need cross-session goal-completion tracking with witness/audit trail. For in-session checklists, native TodoWrite is simpler.',
279
279
  inputSchema: {
280
280
  type: 'object',
281
281
  properties: {},
@@ -296,7 +296,7 @@ const progressSync = {
296
296
  */
297
297
  const progressSummary = {
298
298
  name: 'progress_summary',
299
- description: 'Get human-readable V3 implementation progress summary',
299
+ description: 'Get human-readable V3 implementation progress summary Use when native TodoWrite is wrong because you need cross-session goal-completion tracking with witness/audit trail. For in-session checklists, native TodoWrite is simpler.',
300
300
  inputSchema: {
301
301
  type: 'object',
302
302
  properties: {},
@@ -314,7 +314,7 @@ const progressSummary = {
314
314
  */
315
315
  const progressWatch = {
316
316
  name: 'progress_watch',
317
- description: 'Get current watch status for progress monitoring',
317
+ description: 'Get current watch status for progress monitoring Use when native TodoWrite is wrong because you need cross-session goal-completion tracking with witness/audit trail. For in-session checklists, native TodoWrite is simpler.',
318
318
  inputSchema: {
319
319
  type: 'object',
320
320
  properties: {
@@ -11,7 +11,7 @@ async function loadRuvllmWasm() {
11
11
  export const ruvllmWasmTools = [
12
12
  {
13
13
  name: 'ruvllm_status',
14
- description: 'Get ruvllm-wasm availability and initialization status.',
14
+ description: 'Get ruvllm-wasm availability and initialization status. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
15
15
  inputSchema: { type: 'object', properties: {} },
16
16
  handler: async () => {
17
17
  try {
@@ -50,7 +50,7 @@ export const ruvllmWasmTools = [
50
50
  },
51
51
  {
52
52
  name: 'ruvllm_hnsw_create',
53
- description: 'Create a WASM HNSW router for semantic pattern routing. Max ~11 patterns (v2.0.1 limit).',
53
+ description: 'Create a WASM HNSW router for semantic pattern routing. Max ~11 patterns (v2.0.1 limit). Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
54
54
  inputSchema: {
55
55
  type: 'object',
56
56
  properties: {
@@ -80,7 +80,7 @@ export const ruvllmWasmTools = [
80
80
  },
81
81
  {
82
82
  name: 'ruvllm_hnsw_add',
83
- description: 'Add a pattern to an HNSW router. Embedding must match router dimensions.',
83
+ description: 'Add a pattern to an HNSW router. Embedding must match router dimensions. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
84
84
  inputSchema: {
85
85
  type: 'object',
86
86
  properties: {
@@ -121,7 +121,7 @@ export const ruvllmWasmTools = [
121
121
  },
122
122
  {
123
123
  name: 'ruvllm_hnsw_route',
124
- description: 'Route a query embedding to nearest patterns in HNSW index.',
124
+ description: 'Route a query embedding to nearest patterns in HNSW index. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
125
125
  inputSchema: {
126
126
  type: 'object',
127
127
  properties: {
@@ -152,7 +152,7 @@ export const ruvllmWasmTools = [
152
152
  },
153
153
  {
154
154
  name: 'ruvllm_sona_create',
155
- description: 'Create a SONA instant adaptation loop (<1ms adaptation cycles).',
155
+ description: 'Create a SONA instant adaptation loop (<1ms adaptation cycles). Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
156
156
  inputSchema: {
157
157
  type: 'object',
158
158
  properties: {
@@ -180,7 +180,7 @@ export const ruvllmWasmTools = [
180
180
  },
181
181
  {
182
182
  name: 'ruvllm_sona_adapt',
183
- description: 'Run SONA instant adaptation with a quality signal.',
183
+ description: 'Run SONA instant adaptation with a quality signal. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
184
184
  inputSchema: {
185
185
  type: 'object',
186
186
  properties: {
@@ -209,7 +209,7 @@ export const ruvllmWasmTools = [
209
209
  },
210
210
  {
211
211
  name: 'ruvllm_microlora_create',
212
- description: 'Create a MicroLoRA adapter (ultra-lightweight LoRA, ranks 1-4).',
212
+ description: 'Create a MicroLoRA adapter (ultra-lightweight LoRA, ranks 1-4). Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
213
213
  inputSchema: {
214
214
  type: 'object',
215
215
  properties: {
@@ -240,7 +240,7 @@ export const ruvllmWasmTools = [
240
240
  },
241
241
  {
242
242
  name: 'ruvllm_microlora_adapt',
243
- description: 'Adapt MicroLoRA weights with quality feedback.',
243
+ description: 'Adapt MicroLoRA weights with quality feedback. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
244
244
  inputSchema: {
245
245
  type: 'object',
246
246
  properties: {
@@ -271,7 +271,7 @@ export const ruvllmWasmTools = [
271
271
  },
272
272
  {
273
273
  name: 'ruvllm_chat_format',
274
- description: 'Format chat messages using a template (llama3, mistral, chatml, phi, gemma, or auto-detect).',
274
+ description: 'Format chat messages using a template (llama3, mistral, chatml, phi, gemma, or auto-detect). Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
275
275
  inputSchema: {
276
276
  type: 'object',
277
277
  properties: {
@@ -308,7 +308,7 @@ export const ruvllmWasmTools = [
308
308
  },
309
309
  {
310
310
  name: 'ruvllm_generate_config',
311
- description: 'Create a generation config (maxTokens, temperature, topP, etc.) as JSON.',
311
+ description: 'Create a generation config (maxTokens, temperature, topP, etc.) as JSON. Use when sending every prompt to the Anthropic API is wrong because you need local inference — air-gapped environments, MicroLoRA-fine-tuned per-task adapters, or sub-cent per-call cost. For general Claude work native Task is the right call.',
312
312
  inputSchema: {
313
313
  type: 'object',
314
314
  properties: {
@@ -116,7 +116,7 @@ async function getAIDefence() {
116
116
  */
117
117
  const aidefenceScanTool = {
118
118
  name: 'aidefence_scan',
119
- description: 'Scan input text for AI manipulation threats (prompt injection, jailbreaks, PII). Returns threat assessment with <10ms latency.',
119
+ description: 'Scan input text for AI manipulation threats (prompt injection, jailbreaks, PII). Returns threat assessment with <10ms latency. Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
120
120
  inputSchema: {
121
121
  type: 'object',
122
122
  properties: {
@@ -204,7 +204,7 @@ const aidefenceScanTool = {
204
204
  */
205
205
  const aidefenceAnalyzeTool = {
206
206
  name: 'aidefence_analyze',
207
- description: 'Deep analysis of input for specific threat types with similar pattern search and mitigation recommendations.',
207
+ description: 'Deep analysis of input for specific threat types with similar pattern search and mitigation recommendations. Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
208
208
  inputSchema: {
209
209
  type: 'object',
210
210
  properties: {
@@ -289,7 +289,7 @@ const aidefenceAnalyzeTool = {
289
289
  */
290
290
  const aidefenceStatsTool = {
291
291
  name: 'aidefence_stats',
292
- description: 'Get AIDefence detection and learning statistics.',
292
+ description: 'Get AIDefence detection and learning statistics. Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
293
293
  inputSchema: {
294
294
  type: 'object',
295
295
  properties: {},
@@ -340,7 +340,7 @@ const aidefenceStatsTool = {
340
340
  */
341
341
  const aidefenceLearnTool = {
342
342
  name: 'aidefence_learn',
343
- description: 'Record detection feedback for pattern learning. Improves future detection accuracy.',
343
+ description: 'Record detection feedback for pattern learning. Improves future detection accuracy. Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
344
344
  inputSchema: {
345
345
  type: 'object',
346
346
  properties: {
@@ -438,7 +438,7 @@ const aidefenceLearnTool = {
438
438
  */
439
439
  const aidefenceIsSafeTool = {
440
440
  name: 'aidefence_is_safe',
441
- description: 'Quick boolean check if input is safe. Fastest option for simple validation.',
441
+ description: 'Quick boolean check if input is safe. Fastest option for simple validation. Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
442
442
  inputSchema: {
443
443
  type: 'object',
444
444
  properties: {
@@ -499,7 +499,7 @@ const aidefenceIsSafeTool = {
499
499
  */
500
500
  const aidefenceHasPIITool = {
501
501
  name: 'aidefence_has_pii',
502
- description: 'Check if input contains PII (emails, SSNs, API keys, passwords, etc.).',
502
+ description: 'Check if input contains PII (emails, SSNs, API keys, passwords, etc.). Use when nothing native exists — Claude Code does not have a PII / prompt-injection / adversarial-text scanner. Pair with any tool that ingests untrusted input (browser scrape, federation envelope, memory_import_claude).',
503
503
  inputSchema: {
504
504
  type: 'object',
505
505
  properties: {
@@ -103,7 +103,7 @@ function loadRelatedStores(options) {
103
103
  export const sessionTools = [
104
104
  {
105
105
  name: 'session_save',
106
- description: 'Save current session state',
106
+ description: 'Save current session state Use when native conversation memory is wrong because you need durable cross-session state — restoring agent definitions, swarm topology, memory store, breaker history. For in-session continuation only, no tool needed. Pair with session_save before exiting and session_restore on resume.',
107
107
  category: 'session',
108
108
  inputSchema: {
109
109
  type: 'object',
@@ -163,7 +163,7 @@ export const sessionTools = [
163
163
  },
164
164
  {
165
165
  name: 'session_restore',
166
- description: 'Restore a saved session',
166
+ description: 'Restore a saved session Use when native conversation memory is wrong because you need durable cross-session state — restoring agent definitions, swarm topology, memory store, breaker history. For in-session continuation only, no tool needed. Pair with session_save before exiting and session_restore on resume.',
167
167
  category: 'session',
168
168
  inputSchema: {
169
169
  type: 'object',
@@ -262,7 +262,7 @@ export const sessionTools = [
262
262
  },
263
263
  {
264
264
  name: 'session_list',
265
- description: 'List saved sessions',
265
+ description: 'List saved sessions Use when native conversation memory is wrong because you need durable cross-session state — restoring agent definitions, swarm topology, memory store, breaker history. For in-session continuation only, no tool needed. Pair with session_save before exiting and session_restore on resume.',
266
266
  category: 'session',
267
267
  inputSchema: {
268
268
  type: 'object',
@@ -316,7 +316,7 @@ export const sessionTools = [
316
316
  },
317
317
  {
318
318
  name: 'session_delete',
319
- description: 'Delete a saved session',
319
+ description: 'Delete a saved session Use when native conversation memory is wrong because you need durable cross-session state — restoring agent definitions, swarm topology, memory store, breaker history. For in-session continuation only, no tool needed. Pair with session_save before exiting and session_restore on resume.',
320
320
  category: 'session',
321
321
  inputSchema: {
322
322
  type: 'object',
@@ -349,7 +349,7 @@ export const sessionTools = [
349
349
  },
350
350
  {
351
351
  name: 'session_info',
352
- description: 'Get detailed session information',
352
+ description: 'Get detailed session information Use when native conversation memory is wrong because you need durable cross-session state — restoring agent definitions, swarm topology, memory store, breaker history. For in-session continuation only, no tool needed. Pair with session_save before exiting and session_restore on resume.',
353
353
  category: 'session',
354
354
  inputSchema: {
355
355
  type: 'object',
@@ -110,7 +110,7 @@ const VALID_TOPOLOGIES = new Set([
110
110
  export const swarmTools = [
111
111
  {
112
112
  name: 'swarm_init',
113
- description: 'Initialize a swarm with persistent state tracking',
113
+ description: 'Initialize a swarm with persistent state tracking Use when native Task tool is wrong because you need multi-agent coordination — topology (hierarchical/mesh/star), consensus (raft/byzantine/gossip/crdt/quorum), shared memory namespace, or anti-drift gates. For independent one-shot subagents, native Task is fine; spawn each separately.',
114
114
  category: 'swarm',
115
115
  inputSchema: {
116
116
  type: 'object',
@@ -183,7 +183,7 @@ export const swarmTools = [
183
183
  },
184
184
  {
185
185
  name: 'swarm_status',
186
- description: 'Get swarm status from persistent state',
186
+ description: 'Get swarm status from persistent state Use when native Task tool is wrong because you need multi-agent coordination — topology (hierarchical/mesh/star), consensus (raft/byzantine/gossip/crdt/quorum), shared memory namespace, or anti-drift gates. For independent one-shot subagents, native Task is fine; spawn each separately.',
187
187
  category: 'swarm',
188
188
  inputSchema: {
189
189
  type: 'object',
@@ -242,7 +242,7 @@ export const swarmTools = [
242
242
  },
243
243
  {
244
244
  name: 'swarm_shutdown',
245
- description: 'Shutdown a swarm and update persistent state',
245
+ description: 'Shutdown a swarm and update persistent state Use when native Task tool is wrong because you need multi-agent coordination — topology (hierarchical/mesh/star), consensus (raft/byzantine/gossip/crdt/quorum), shared memory namespace, or anti-drift gates. For independent one-shot subagents, native Task is fine; spawn each separately.',
246
246
  category: 'swarm',
247
247
  inputSchema: {
248
248
  type: 'object',
@@ -300,7 +300,7 @@ export const swarmTools = [
300
300
  },
301
301
  {
302
302
  name: 'swarm_health',
303
- description: 'Check swarm health status with real state inspection',
303
+ description: 'Check swarm health status with real state inspection Use when native Task tool is wrong because you need multi-agent coordination — topology (hierarchical/mesh/star), consensus (raft/byzantine/gossip/crdt/quorum), shared memory namespace, or anti-drift gates. For independent one-shot subagents, native Task is fine; spawn each separately.',
304
304
  category: 'swarm',
305
305
  inputSchema: {
306
306
  type: 'object',
@@ -82,7 +82,7 @@ function saveMetrics(metrics) {
82
82
  export const systemTools = [
83
83
  {
84
84
  name: 'system_status',
85
- description: 'Get overall system status',
85
+ description: 'Get overall system status Use when native Bash is wrong because you need Ruflo runtime metrics (HNSW index size, ReasoningBank state, swarm health, breaker status) — those are not in /proc, only in the running daemon. For OS-level info (uptime, disk, mem), native Bash + standard tools are fine.',
86
86
  category: 'system',
87
87
  inputSchema: {
88
88
  type: 'object',
@@ -123,7 +123,7 @@ export const systemTools = [
123
123
  },
124
124
  {
125
125
  name: 'system_metrics',
126
- description: 'Get system metrics and performance data',
126
+ description: 'Get system metrics and performance data Use when native Bash is wrong because you need Ruflo runtime metrics (HNSW index size, ReasoningBank state, swarm health, breaker status) — those are not in /proc, only in the running daemon. For OS-level info (uptime, disk, mem), native Bash + standard tools are fine.',
127
127
  category: 'system',
128
128
  inputSchema: {
129
129
  type: 'object',
@@ -277,7 +277,7 @@ export const systemTools = [
277
277
  },
278
278
  {
279
279
  name: 'system_health',
280
- description: 'Perform system health check',
280
+ description: 'Perform system health check Use when native Bash is wrong because you need Ruflo runtime metrics (HNSW index size, ReasoningBank state, swarm health, breaker status) — those are not in /proc, only in the running daemon. For OS-level info (uptime, disk, mem), native Bash + standard tools are fine.',
281
281
  category: 'system',
282
282
  inputSchema: {
283
283
  type: 'object',
@@ -458,7 +458,7 @@ export const systemTools = [
458
458
  },
459
459
  {
460
460
  name: 'system_info',
461
- description: 'Get system information',
461
+ description: 'Get system information Use when native Bash is wrong because you need Ruflo runtime metrics (HNSW index size, ReasoningBank state, swarm health, breaker status) — those are not in /proc, only in the running daemon. For OS-level info (uptime, disk, mem), native Bash + standard tools are fine.',
462
462
  category: 'system',
463
463
  inputSchema: {
464
464
  type: 'object',
@@ -493,7 +493,7 @@ export const systemTools = [
493
493
  },
494
494
  {
495
495
  name: 'system_reset',
496
- description: 'Reset system state',
496
+ description: 'Reset system state Use when native Bash is wrong because you need Ruflo runtime metrics (HNSW index size, ReasoningBank state, swarm health, breaker status) — those are not in /proc, only in the running daemon. For OS-level info (uptime, disk, mem), native Bash + standard tools are fine.',
497
497
  category: 'system',
498
498
  inputSchema: {
499
499
  type: 'object',
@@ -536,7 +536,7 @@ export const systemTools = [
536
536
  },
537
537
  {
538
538
  name: 'mcp_status',
539
- description: 'Get MCP server status, including stdio mode detection',
539
+ description: 'Get MCP server status, including stdio mode detection Use when native Claude Code MCP status is wrong because you need Ruflo-side server detail — tool counts per namespace, transport stats, MCP handshake errors. For just "is MCP up?", `claude mcp list` is fine.',
540
540
  category: 'system',
541
541
  inputSchema: {
542
542
  type: 'object',
@@ -593,7 +593,7 @@ export const systemTools = [
593
593
  },
594
594
  {
595
595
  name: 'task_summary',
596
- description: 'Get a summary of all tasks by status',
596
+ description: 'Get a summary of all tasks by status Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
597
597
  category: 'task',
598
598
  inputSchema: {
599
599
  type: 'object',
@@ -43,7 +43,7 @@ function saveTaskStore(store) {
43
43
  export const taskTools = [
44
44
  {
45
45
  name: 'task_create',
46
- description: 'Create a new task',
46
+ description: 'Create a new task Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
47
47
  category: 'task',
48
48
  inputSchema: {
49
49
  type: 'object',
@@ -95,7 +95,7 @@ export const taskTools = [
95
95
  },
96
96
  {
97
97
  name: 'task_status',
98
- description: 'Get task status',
98
+ description: 'Get task status Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
99
99
  category: 'task',
100
100
  inputSchema: {
101
101
  type: 'object',
@@ -137,7 +137,7 @@ export const taskTools = [
137
137
  },
138
138
  {
139
139
  name: 'task_list',
140
- description: 'List all tasks',
140
+ description: 'List all tasks Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
141
141
  category: 'task',
142
142
  inputSchema: {
143
143
  type: 'object',
@@ -195,7 +195,7 @@ export const taskTools = [
195
195
  },
196
196
  {
197
197
  name: 'task_complete',
198
- description: 'Mark task as complete',
198
+ description: 'Mark task as complete Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
199
199
  category: 'task',
200
200
  inputSchema: {
201
201
  type: 'object',
@@ -257,7 +257,7 @@ export const taskTools = [
257
257
  },
258
258
  {
259
259
  name: 'task_update',
260
- description: 'Update task status or progress',
260
+ description: 'Update task status or progress Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
261
261
  category: 'task',
262
262
  inputSchema: {
263
263
  type: 'object',
@@ -309,7 +309,7 @@ export const taskTools = [
309
309
  },
310
310
  {
311
311
  name: 'task_assign',
312
- description: 'Assign a task to one or more agents',
312
+ description: 'Assign a task to one or more agents Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
313
313
  category: 'task',
314
314
  inputSchema: {
315
315
  type: 'object',
@@ -393,7 +393,7 @@ export const taskTools = [
393
393
  },
394
394
  {
395
395
  name: 'task_cancel',
396
- description: 'Cancel a task',
396
+ description: 'Cancel a task Use when native TodoWrite is wrong because you need cross-session task persistence, agent assignment, dependency tracking, or completion analytics in the .swarm/memory.db. For in-session checklists native TodoWrite is simpler and faster.',
397
397
  category: 'task',
398
398
  inputSchema: {
399
399
  type: 'object',
@@ -52,7 +52,7 @@ function saveTerminalStore(store) {
52
52
  export const terminalTools = [
53
53
  {
54
54
  name: 'terminal_create',
55
- description: 'Create a new terminal session',
55
+ description: 'Create a new terminal session Use when native Bash is wrong because you need a persistent terminal session across turns/agents with output capture and replay. For one-shot shell commands, native Bash is fine.',
56
56
  category: 'terminal',
57
57
  inputSchema: {
58
58
  type: 'object',
@@ -106,7 +106,7 @@ export const terminalTools = [
106
106
  },
107
107
  {
108
108
  name: 'terminal_execute',
109
- description: 'Execute a command in a terminal session',
109
+ description: 'Execute a command in a terminal session Use when native Bash is wrong because you need a persistent terminal session across turns/agents with output capture and replay. For one-shot shell commands, native Bash is fine.',
110
110
  category: 'terminal',
111
111
  inputSchema: {
112
112
  type: 'object',
@@ -193,7 +193,7 @@ export const terminalTools = [
193
193
  },
194
194
  {
195
195
  name: 'terminal_list',
196
- description: 'List all terminal sessions',
196
+ description: 'List all terminal sessions Use when native Bash is wrong because you need a persistent terminal session across turns/agents with output capture and replay. For one-shot shell commands, native Bash is fine.',
197
197
  category: 'terminal',
198
198
  inputSchema: {
199
199
  type: 'object',
@@ -226,7 +226,7 @@ export const terminalTools = [
226
226
  },
227
227
  {
228
228
  name: 'terminal_close',
229
- description: 'Close a terminal session',
229
+ description: 'Close a terminal session Use when native Bash is wrong because you need a persistent terminal session across turns/agents with output capture and replay. For one-shot shell commands, native Bash is fine.',
230
230
  category: 'terminal',
231
231
  inputSchema: {
232
232
  type: 'object',
@@ -258,7 +258,7 @@ export const terminalTools = [
258
258
  },
259
259
  {
260
260
  name: 'terminal_history',
261
- description: 'Get command history for a terminal session',
261
+ description: 'Get command history for a terminal session Use when native Bash is wrong because you need a persistent terminal session across turns/agents with output capture and replay. For one-shot shell commands, native Bash is fine.',
262
262
  category: 'terminal',
263
263
  inputSchema: {
264
264
  type: 'object',