claude-flow-novice 1.1.9 → 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.
Files changed (60) hide show
  1. package/.claude/SLASH-COMMANDS-READY.md +53 -0
  2. package/.claude/WORKING-SETUP.md +67 -0
  3. package/.claude/commands/README.md +157 -0
  4. package/.claude/commands/claude-md.js +237 -0
  5. package/.claude/commands/claude-md.md +64 -0
  6. package/.claude/commands/claude-soul.js +562 -0
  7. package/.claude/commands/claude-soul.md +22 -0
  8. package/.claude/commands/cli-integration.js +216 -0
  9. package/.claude/commands/dependency-recommendations.md +171 -0
  10. package/.claude/commands/github.js +638 -0
  11. package/.claude/commands/github.md +221 -0
  12. package/.claude/commands/hooks.js +648 -0
  13. package/.claude/commands/hooks.md +38 -0
  14. package/.claude/commands/index.js +115 -0
  15. package/.claude/commands/neural.js +572 -0
  16. package/.claude/commands/neural.md +39 -0
  17. package/.claude/commands/performance.js +582 -0
  18. package/.claude/commands/performance.md +41 -0
  19. package/.claude/commands/register-all-commands.js +314 -0
  20. package/.claude/commands/register-claude-md.js +82 -0
  21. package/.claude/commands/register-claude-soul.js +80 -0
  22. package/.claude/commands/sparc.js +110 -0
  23. package/.claude/commands/sparc.md +46 -0
  24. package/.claude/commands/suggest-improvements.md +95 -0
  25. package/.claude/commands/suggest-templates.md +147 -0
  26. package/.claude/commands/swarm.js +423 -0
  27. package/.claude/commands/swarm.md +24 -0
  28. package/.claude/commands/validate-commands.js +223 -0
  29. package/.claude/commands/workflow.js +606 -0
  30. package/.claude/commands/workflow.md +295 -0
  31. package/.claude/core/agent-manager.js +80 -0
  32. package/.claude/core/agent-manager.js.map +1 -0
  33. package/.claude/core/config.js +1221 -0
  34. package/.claude/core/config.js.map +1 -0
  35. package/.claude/core/event-bus.js +136 -0
  36. package/.claude/core/event-bus.js.map +1 -0
  37. package/.claude/core/index.js +6 -0
  38. package/.claude/core/index.js.map +1 -0
  39. package/.claude/core/json-persistence.js +112 -0
  40. package/.claude/core/json-persistence.js.map +1 -0
  41. package/.claude/core/logger.js +245 -0
  42. package/.claude/core/logger.js.map +1 -0
  43. package/.claude/core/orchestrator-fixed.js +236 -0
  44. package/.claude/core/orchestrator-fixed.js.map +1 -0
  45. package/.claude/core/orchestrator.js +1136 -0
  46. package/.claude/core/orchestrator.js.map +1 -0
  47. package/.claude/core/persistence.js +185 -0
  48. package/.claude/core/persistence.js.map +1 -0
  49. package/.claude/core/project-manager.js +80 -0
  50. package/.claude/core/project-manager.js.map +1 -0
  51. package/.claude/core/slash-command.js +24 -0
  52. package/.claude/core/version.js +35 -0
  53. package/.claude/core/version.js.map +1 -0
  54. package/.claude/slash-commands.json +92 -0
  55. package/dist/mcp/mcp-server-novice.js +14 -2
  56. package/dist/mcp/mcp-server-sdk.js +649 -0
  57. package/dist/mcp/mcp-server-with-slash-commands.js +776 -0
  58. package/dist/src/slash-commands/mcp-slash-integration.js +146 -0
  59. package/package.json +17 -5
  60. package/src/slash-commands/mcp-slash-integration.js +146 -0
@@ -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;
package/package.json CHANGED
@@ -1,14 +1,25 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "Simplified Claude Flow for beginners - AI agent orchestration made easy. Enhanced init command creates complete agent system (8 core agents), MCP configuration with 36 essential tools, and automated hooks. All memory leaks eliminated, zero deprecated dependencies, full project setup in one command.",
5
5
  "mcpName": "io.github.ruvnet/claude-flow",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "claude-flow-novice": "dist/src/cli/main.js",
9
- "claude-soul": "dist/src/slash-commands/claude-soul.js"
9
+ "claude-soul": ".claude/commands/claude-soul.js",
10
+ "swarm": ".claude/commands/swarm.js",
11
+ "sparc": ".claude/commands/sparc.js",
12
+ "hooks": ".claude/commands/hooks.js"
10
13
  },
11
14
  "scripts": {
15
+ "claude-soul": "node src/slash-commands/claude-soul.js",
16
+ "swarm": "node .claude/commands/swarm.js",
17
+ "sparc": "node .claude/commands/sparc.js",
18
+ "hooks": "node .claude/commands/hooks.js",
19
+ "neural": "node .claude/commands/neural.js",
20
+ "performance": "node .claude/commands/performance.js",
21
+ "github": "node .claude/commands/github.js",
22
+ "workflow": "node .claude/commands/workflow.js",
12
23
  "dev": "tsx src/cli/main.ts",
13
24
  "fullstack:demo": "tsx examples/fullstack-demo.ts",
14
25
  "fullstack:develop": "tsx src/swarm-fullstack/cli/fullstack-cli.ts develop",
@@ -122,7 +133,7 @@
122
133
  "debug:hooks": "DEBUG=hooks* npm run dev",
123
134
  "debug:sparc": "DEBUG=sparc* npm run dev",
124
135
  "debug:swarm": "DEBUG=swarm* npm run dev",
125
- "mcp:start": "node dist/mcp/mcp-server-novice.js",
136
+ "mcp:start": "node dist/mcp/mcp-server-sdk.js",
126
137
  "mcp:status": "node -e \"console.log('MCP Server Status: Ready')\"",
127
138
  "mcp:verify": "node scripts/verify-mcp-server.js",
128
139
  "security:audit": "node scripts/security/ruv-swarm-safe.js --audit",
@@ -134,7 +145,6 @@
134
145
  "dev:monitor": "python scripts/dev/claude-monitor.py",
135
146
  "utils:fix-imports": "node scripts/utils/fix-import-paths.js",
136
147
  "utils:cleanup": "bash scripts/utils/clean-build-artifacts.sh",
137
- "claude-soul": "node src/slash-commands/claude-soul.js",
138
148
  "hooks:session-start": "node src/cli/simple-commands/hooks.js session-start"
139
149
  },
140
150
  "keywords": [
@@ -195,13 +205,15 @@
195
205
  "exports": {
196
206
  ".": "./dist/index.js",
197
207
  "./cli": "./dist/cli/index.js",
198
- "./mcp": "./dist/mcp/mcp-server.js",
208
+ "./mcp": "./dist/mcp/mcp-server-sdk.js",
209
+ "./mcp-novice": "./dist/mcp/mcp-server-novice.js",
199
210
  "./core": "./dist/core/index.js",
200
211
  "./slash-commands/claude-soul": "./dist/src/slash-commands/claude-soul.js",
201
212
  "./slash-commands/register-claude-soul": "./dist/src/slash-commands/register-claude-soul.js",
202
213
  "./hooks/session-start-soul": "./dist/src/cli/simple-commands/hooks/session-start-soul.js"
203
214
  },
204
215
  "dependencies": {
216
+ "@modelcontextprotocol/sdk": "^1.18.2",
205
217
  "boxen": "^8.0.1",
206
218
  "chalk": "^4.1.2",
207
219
  "commander": "^13.1.0",
@@ -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;