claude-flow-novice 1.1.8 → 1.2.0
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/.claude/SLASH-COMMANDS-READY.md +53 -0
- package/.claude/WORKING-SETUP.md +67 -0
- package/.claude/commands/README.md +157 -0
- package/.claude/commands/claude-md.js +237 -0
- package/.claude/commands/claude-md.md +64 -0
- package/.claude/commands/claude-soul.js +562 -0
- package/.claude/commands/claude-soul.md +22 -0
- package/.claude/commands/cli-integration.js +216 -0
- package/.claude/commands/dependency-recommendations.md +171 -0
- package/.claude/commands/github.js +638 -0
- package/.claude/commands/github.md +221 -0
- package/.claude/commands/hooks.js +648 -0
- package/.claude/commands/hooks.md +38 -0
- package/.claude/commands/index.js +115 -0
- package/.claude/commands/neural.js +572 -0
- package/.claude/commands/neural.md +39 -0
- package/.claude/commands/performance.js +582 -0
- package/.claude/commands/performance.md +41 -0
- package/.claude/commands/register-all-commands.js +314 -0
- package/.claude/commands/register-claude-md.js +82 -0
- package/.claude/commands/register-claude-soul.js +80 -0
- package/.claude/commands/sparc.js +110 -0
- package/.claude/commands/sparc.md +46 -0
- package/.claude/commands/suggest-improvements.md +95 -0
- package/.claude/commands/suggest-templates.md +147 -0
- package/.claude/commands/swarm.js +423 -0
- package/.claude/commands/swarm.md +24 -0
- package/.claude/commands/validate-commands.js +223 -0
- package/.claude/commands/workflow.js +606 -0
- package/.claude/commands/workflow.md +295 -0
- package/.claude/core/agent-manager.js +80 -0
- package/.claude/core/agent-manager.js.map +1 -0
- package/.claude/core/config.js +1221 -0
- package/.claude/core/config.js.map +1 -0
- package/.claude/core/event-bus.js +136 -0
- package/.claude/core/event-bus.js.map +1 -0
- package/.claude/core/index.js +6 -0
- package/.claude/core/index.js.map +1 -0
- package/.claude/core/json-persistence.js +112 -0
- package/.claude/core/json-persistence.js.map +1 -0
- package/.claude/core/logger.js +245 -0
- package/.claude/core/logger.js.map +1 -0
- package/.claude/core/orchestrator-fixed.js +236 -0
- package/.claude/core/orchestrator-fixed.js.map +1 -0
- package/.claude/core/orchestrator.js +1136 -0
- package/.claude/core/orchestrator.js.map +1 -0
- package/.claude/core/persistence.js +185 -0
- package/.claude/core/persistence.js.map +1 -0
- package/.claude/core/project-manager.js +80 -0
- package/.claude/core/project-manager.js.map +1 -0
- package/.claude/core/slash-command.js +24 -0
- package/.claude/core/version.js +35 -0
- package/.claude/core/version.js.map +1 -0
- package/.claude/slash-commands.json +92 -0
- package/dist/mcp/mcp-server-novice.js +24 -4
- package/dist/mcp/mcp-server-sdk.js +649 -0
- package/dist/mcp/mcp-server-with-slash-commands.js +776 -0
- package/dist/src/cli/simple-commands/hooks/session-start-soul.js +271 -0
- package/dist/src/slash-commands/README.md +157 -0
- package/dist/src/slash-commands/claude-md.js +237 -0
- package/dist/src/slash-commands/claude-soul.js +562 -0
- package/dist/src/slash-commands/cli-integration.js +216 -0
- package/dist/src/slash-commands/github.js +638 -0
- package/dist/src/slash-commands/hooks.js +648 -0
- package/dist/src/slash-commands/index.js +115 -0
- package/dist/src/slash-commands/mcp-slash-integration.js +146 -0
- package/dist/src/slash-commands/neural.js +572 -0
- package/dist/src/slash-commands/performance.js +582 -0
- package/dist/src/slash-commands/register-all-commands.js +314 -0
- package/dist/src/slash-commands/register-claude-md.js +82 -0
- package/dist/src/slash-commands/register-claude-soul.js +80 -0
- package/dist/src/slash-commands/sparc.js +110 -0
- package/dist/src/slash-commands/swarm.js +423 -0
- package/dist/src/slash-commands/validate-commands.js +223 -0
- package/dist/src/slash-commands/workflow.js +606 -0
- package/package.json +23 -10
- package/src/slash-commands/cli-integration.js +216 -0
- package/src/slash-commands/github.js +638 -0
- package/src/slash-commands/hooks.js +648 -0
- package/src/slash-commands/index.js +115 -0
- package/src/slash-commands/mcp-slash-integration.js +146 -0
- package/src/slash-commands/neural.js +572 -0
- package/src/slash-commands/performance.js +582 -0
- package/src/slash-commands/register-all-commands.js +314 -0
- package/src/slash-commands/sparc.js +110 -0
- package/src/slash-commands/swarm.js +423 -0
- package/src/slash-commands/validate-commands.js +223 -0
- package/src/slash-commands/workflow.js +606 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Slash Commands Index
|
|
5
|
+
*
|
|
6
|
+
* Exports all slash commands and utilities
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Base command class
|
|
10
|
+
export { SlashCommand } from '../core/slash-command.js';
|
|
11
|
+
|
|
12
|
+
// Individual command classes
|
|
13
|
+
export { SparcCommand } from './sparc.js';
|
|
14
|
+
export { SwarmCommand } from './swarm.js';
|
|
15
|
+
export { HooksCommand } from './hooks.js';
|
|
16
|
+
export { NeuralCommand } from './neural.js';
|
|
17
|
+
export { PerformanceCommand } from './performance.js';
|
|
18
|
+
export { GitHubCommand } from './github.js';
|
|
19
|
+
export { WorkflowCommand } from './workflow.js';
|
|
20
|
+
export { ClaudeMdSlashCommand } from './claude-md.js';
|
|
21
|
+
|
|
22
|
+
// Command executors
|
|
23
|
+
export { executeClaudeSoulCommand } from './claude-soul.js';
|
|
24
|
+
export { executeClaudeMdCommand } from './claude-md.js';
|
|
25
|
+
|
|
26
|
+
// Registry and utilities
|
|
27
|
+
export {
|
|
28
|
+
SlashCommandRegistry,
|
|
29
|
+
globalRegistry,
|
|
30
|
+
executeSlashCommand,
|
|
31
|
+
getAllCommands,
|
|
32
|
+
getCommandHelp,
|
|
33
|
+
registerCommand
|
|
34
|
+
} from './register-all-commands.js';
|
|
35
|
+
|
|
36
|
+
// Registration functions
|
|
37
|
+
export { registerClaudeSoulCommand } from './register-claude-soul.js';
|
|
38
|
+
export { default as registerClaudeMd } from './register-claude-md.js';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Quick access to commonly used commands
|
|
42
|
+
*/
|
|
43
|
+
export const Commands = {
|
|
44
|
+
SPARC: 'sparc',
|
|
45
|
+
SWARM: 'swarm',
|
|
46
|
+
HOOKS: 'hooks',
|
|
47
|
+
NEURAL: 'neural',
|
|
48
|
+
PERFORMANCE: 'performance',
|
|
49
|
+
GITHUB: 'github',
|
|
50
|
+
WORKFLOW: 'workflow',
|
|
51
|
+
CLAUDE_MD: 'claude-md',
|
|
52
|
+
CLAUDE_SOUL: 'claude-soul'
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Command aliases for quick access
|
|
57
|
+
*/
|
|
58
|
+
export const Aliases = {
|
|
59
|
+
s: 'swarm',
|
|
60
|
+
h: 'hooks',
|
|
61
|
+
n: 'neural',
|
|
62
|
+
p: 'performance',
|
|
63
|
+
perf: 'performance',
|
|
64
|
+
gh: 'github',
|
|
65
|
+
git: 'github',
|
|
66
|
+
w: 'workflow',
|
|
67
|
+
wf: 'workflow'
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Initialize all slash commands
|
|
72
|
+
* @returns {SlashCommandRegistry} - Initialized registry
|
|
73
|
+
*/
|
|
74
|
+
export function initializeSlashCommands() {
|
|
75
|
+
console.log('🚀 Initializing Claude-Flow slash commands...');
|
|
76
|
+
|
|
77
|
+
// Registry is automatically initialized when imported
|
|
78
|
+
const commandCount = globalRegistry.listCommands().length;
|
|
79
|
+
|
|
80
|
+
console.log(`✅ Initialized ${commandCount} slash commands`);
|
|
81
|
+
console.log('Available commands:', Object.values(Commands).join(', '));
|
|
82
|
+
|
|
83
|
+
return globalRegistry;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get quick help text
|
|
88
|
+
*/
|
|
89
|
+
export function getQuickHelp() {
|
|
90
|
+
return `
|
|
91
|
+
🚀 **CLAUDE-FLOW SLASH COMMANDS**
|
|
92
|
+
|
|
93
|
+
**Essential Commands:**
|
|
94
|
+
- \`/swarm init mesh 8\` - Initialize agent swarm
|
|
95
|
+
- \`/hooks enable\` - Enable automation hooks
|
|
96
|
+
- \`/sparc spec "task"\` - Run SPARC methodology
|
|
97
|
+
- \`/neural train coordination\` - Train neural patterns
|
|
98
|
+
- \`/performance report\` - Generate performance report
|
|
99
|
+
- \`/github analyze repo\` - Analyze GitHub repository
|
|
100
|
+
- \`/workflow create "name"\` - Create automated workflow
|
|
101
|
+
|
|
102
|
+
**For full help:** Use \`/help\` or see individual command documentation
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default {
|
|
107
|
+
Commands,
|
|
108
|
+
Aliases,
|
|
109
|
+
globalRegistry,
|
|
110
|
+
executeSlashCommand,
|
|
111
|
+
getAllCommands,
|
|
112
|
+
getCommandHelp,
|
|
113
|
+
initializeSlashCommands,
|
|
114
|
+
getQuickHelp
|
|
115
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MCP Slash Command Integration for Claude Code
|
|
5
|
+
* This integrates slash commands with the MCP server so they appear in Claude Code
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { ClaudeFlowNoviceMCPServer } from '../../dist/mcp/mcp-server-novice.js';
|
|
9
|
+
|
|
10
|
+
export class MCPSlashCommandIntegration {
|
|
11
|
+
constructor(mcpServer) {
|
|
12
|
+
this.mcpServer = mcpServer;
|
|
13
|
+
this.slashCommands = this.initializeSlashCommands();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
initializeSlashCommands() {
|
|
17
|
+
return {
|
|
18
|
+
'claude-soul': {
|
|
19
|
+
name: 'claude-soul',
|
|
20
|
+
description: 'Engage Claude\'s consciousness and self-awareness capabilities',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
prompt: { type: 'string', description: 'Consciousness prompt or question' }
|
|
25
|
+
},
|
|
26
|
+
required: ['prompt']
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
'swarm': {
|
|
30
|
+
name: 'swarm',
|
|
31
|
+
description: 'AI swarm management and coordination',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
action: { type: 'string', enum: ['init', 'status', 'spawn', 'orchestrate', 'monitor', 'scale', 'destroy'] },
|
|
36
|
+
params: { type: 'array', description: 'Additional parameters' }
|
|
37
|
+
},
|
|
38
|
+
required: ['action']
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
'sparc': {
|
|
42
|
+
name: 'sparc',
|
|
43
|
+
description: 'Execute SPARC methodology phases',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
phase: { type: 'string', enum: ['spec', 'pseudo', 'arch', 'refine', 'complete'] },
|
|
48
|
+
task: { type: 'string', description: 'Task description' }
|
|
49
|
+
},
|
|
50
|
+
required: ['phase', 'task']
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
'hooks': {
|
|
54
|
+
name: 'hooks',
|
|
55
|
+
description: 'Automation hooks management',
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
action: { type: 'string', enum: ['enable', 'disable', 'pre-task', 'post-task', 'session-start', 'notify'] },
|
|
60
|
+
params: { type: 'array', description: 'Additional parameters' }
|
|
61
|
+
},
|
|
62
|
+
required: ['action']
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
'neural': {
|
|
66
|
+
name: 'neural',
|
|
67
|
+
description: 'Neural network training and management',
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
action: { type: 'string', enum: ['status', 'train', 'patterns', 'predict', 'compress', 'explain'] },
|
|
72
|
+
params: { type: 'array', description: 'Additional parameters' }
|
|
73
|
+
},
|
|
74
|
+
required: ['action']
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
'performance': {
|
|
78
|
+
name: 'performance',
|
|
79
|
+
description: 'Performance monitoring and optimization',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
action: { type: 'string', enum: ['report', 'benchmark', 'bottleneck', 'tokens', 'trends', 'optimize'] },
|
|
84
|
+
params: { type: 'array', description: 'Additional parameters' }
|
|
85
|
+
},
|
|
86
|
+
required: ['action']
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Add slash commands to the MCP server's tools
|
|
93
|
+
addSlashCommandsToMCPTools(tools) {
|
|
94
|
+
const slashTools = {};
|
|
95
|
+
|
|
96
|
+
for (const [commandName, commandDef] of Object.entries(this.slashCommands)) {
|
|
97
|
+
slashTools[`slash_${commandName.replace('-', '_')}`] = {
|
|
98
|
+
name: `slash_${commandName.replace('-', '_')}`,
|
|
99
|
+
description: `Slash command: /${commandName} - ${commandDef.description}`,
|
|
100
|
+
inputSchema: commandDef.inputSchema
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return { ...tools, ...slashTools };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Execute slash command
|
|
108
|
+
async executeSlashCommand(commandName, args) {
|
|
109
|
+
const commandPath = `.claude/commands/${commandName}.js`;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
// Import and execute the command
|
|
113
|
+
const { default: command } = await import(`../../../${commandPath}`);
|
|
114
|
+
|
|
115
|
+
if (typeof command === 'function') {
|
|
116
|
+
return await command(args);
|
|
117
|
+
} else if (command && typeof command.execute === 'function') {
|
|
118
|
+
return await command.execute(args);
|
|
119
|
+
} else {
|
|
120
|
+
// Fallback to direct node execution
|
|
121
|
+
const { exec } = await import('child_process');
|
|
122
|
+
const { promisify } = await import('util');
|
|
123
|
+
const execAsync = promisify(exec);
|
|
124
|
+
|
|
125
|
+
const argsList = Array.isArray(args) ? args : [args];
|
|
126
|
+
const cmdArgs = argsList.join(' ');
|
|
127
|
+
const result = await execAsync(`node ${commandPath} ${cmdArgs}`);
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
success: true,
|
|
131
|
+
command: commandName,
|
|
132
|
+
output: result.stdout,
|
|
133
|
+
error: result.stderr || null
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
} catch (error) {
|
|
137
|
+
return {
|
|
138
|
+
success: false,
|
|
139
|
+
command: commandName,
|
|
140
|
+
error: error.message
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export default MCPSlashCommandIntegration;
|