claude-flow-novice 2.10.9 → 2.12.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 (180) hide show
  1. package/.claude/commands/README.md +157 -0
  2. package/.claude/hooks/cfn-invoke-post-edit.sh +1 -1
  3. package/.claude/skills/cfn-backlog-management/SKILL.md +199 -0
  4. package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  5. package/.claude/skills/cfn-changelog-management/SKILL.md +349 -0
  6. package/.claude/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
  7. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -21
  8. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +312 -0
  9. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +480 -115
  10. package/claude-assets/hooks/cfn-invoke-post-edit.sh +1 -1
  11. package/claude-assets/skills/cfn-backlog-management/SKILL.md +199 -0
  12. package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  13. package/claude-assets/skills/cfn-changelog-management/SKILL.md +349 -0
  14. package/claude-assets/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
  15. package/dist/cli/config-manager.js.map +1 -1
  16. package/package.json +4 -2
  17. package/scripts/init-project.js +38 -3
  18. package/claude-assets/commands/agents/README.md +0 -10
  19. package/claude-assets/commands/agents/agent-capabilities.md +0 -21
  20. package/claude-assets/commands/agents/agent-coordination.md +0 -28
  21. package/claude-assets/commands/agents/agent-spawning.md +0 -28
  22. package/claude-assets/commands/agents/agent-types.md +0 -26
  23. package/claude-assets/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  24. package/claude-assets/commands/analysis/README.md +0 -9
  25. package/claude-assets/commands/analysis/bottleneck-detect.md +0 -162
  26. package/claude-assets/commands/analysis/performance-bottlenecks.md +0 -59
  27. package/claude-assets/commands/analysis/performance-report.md +0 -25
  28. package/claude-assets/commands/analysis/token-efficiency.md +0 -45
  29. package/claude-assets/commands/analysis/token-usage.md +0 -25
  30. package/claude-assets/commands/automation/README.md +0 -9
  31. package/claude-assets/commands/automation/auto-agent.md +0 -122
  32. package/claude-assets/commands/automation/self-healing.md +0 -106
  33. package/claude-assets/commands/automation/session-memory.md +0 -90
  34. package/claude-assets/commands/automation/smart-agents.md +0 -73
  35. package/claude-assets/commands/automation/smart-spawn.md +0 -25
  36. package/claude-assets/commands/automation/workflow-select.md +0 -25
  37. package/claude-assets/commands/claude-md.js +0 -237
  38. package/claude-assets/commands/claude-soul.js +0 -28
  39. package/claude-assets/commands/cli-integration.js +0 -216
  40. package/claude-assets/commands/coordination/README.md +0 -9
  41. package/claude-assets/commands/coordination/agent-spawn.md +0 -25
  42. package/claude-assets/commands/coordination/coordination-system.md +0 -88
  43. package/claude-assets/commands/coordination/init.md +0 -44
  44. package/claude-assets/commands/coordination/orchestrate.md +0 -43
  45. package/claude-assets/commands/coordination/spawn.md +0 -45
  46. package/claude-assets/commands/coordination/swarm-init.md +0 -85
  47. package/claude-assets/commands/coordination/task-orchestrate.md +0 -25
  48. package/claude-assets/commands/github/README.md +0 -11
  49. package/claude-assets/commands/github/code-review-swarm.md +0 -514
  50. package/claude-assets/commands/github/code-review.md +0 -25
  51. package/claude-assets/commands/github/github-modes.md +0 -147
  52. package/claude-assets/commands/github/github-swarm.md +0 -121
  53. package/claude-assets/commands/github/issue-tracker.md +0 -292
  54. package/claude-assets/commands/github/issue-triage.md +0 -25
  55. package/claude-assets/commands/github/multi-repo-swarm.md +0 -519
  56. package/claude-assets/commands/github/pr-enhance.md +0 -26
  57. package/claude-assets/commands/github/pr-manager.md +0 -170
  58. package/claude-assets/commands/github/project-board-sync.md +0 -471
  59. package/claude-assets/commands/github/release-manager.md +0 -338
  60. package/claude-assets/commands/github/release-swarm.md +0 -544
  61. package/claude-assets/commands/github/repo-analyze.md +0 -25
  62. package/claude-assets/commands/github/repo-architect.md +0 -367
  63. package/claude-assets/commands/github/swarm-issue.md +0 -482
  64. package/claude-assets/commands/github/swarm-pr.md +0 -285
  65. package/claude-assets/commands/github/sync-coordinator.md +0 -301
  66. package/claude-assets/commands/github/workflow-automation.md +0 -442
  67. package/claude-assets/commands/github.js +0 -638
  68. package/claude-assets/commands/hive-mind/README.md +0 -17
  69. package/claude-assets/commands/hive-mind/hive-mind-consensus.md +0 -8
  70. package/claude-assets/commands/hive-mind/hive-mind-init.md +0 -18
  71. package/claude-assets/commands/hive-mind/hive-mind-memory.md +0 -8
  72. package/claude-assets/commands/hive-mind/hive-mind-metrics.md +0 -8
  73. package/claude-assets/commands/hive-mind/hive-mind-resume.md +0 -8
  74. package/claude-assets/commands/hive-mind/hive-mind-sessions.md +0 -8
  75. package/claude-assets/commands/hive-mind/hive-mind-spawn.md +0 -21
  76. package/claude-assets/commands/hive-mind/hive-mind-status.md +0 -8
  77. package/claude-assets/commands/hive-mind/hive-mind-stop.md +0 -8
  78. package/claude-assets/commands/hive-mind/hive-mind-wizard.md +0 -8
  79. package/claude-assets/commands/hive-mind/hive-mind.md +0 -27
  80. package/claude-assets/commands/hooks/README.md +0 -11
  81. package/claude-assets/commands/hooks/overview.md +0 -58
  82. package/claude-assets/commands/hooks/post-edit.md +0 -117
  83. package/claude-assets/commands/hooks/post-task.md +0 -112
  84. package/claude-assets/commands/hooks/pre-edit.md +0 -113
  85. package/claude-assets/commands/hooks/pre-task.md +0 -111
  86. package/claude-assets/commands/hooks/session-end.md +0 -118
  87. package/claude-assets/commands/hooks/session-start.md +0 -9
  88. package/claude-assets/commands/hooks/setup.md +0 -103
  89. package/claude-assets/commands/hooks.js +0 -651
  90. package/claude-assets/commands/index.js +0 -119
  91. package/claude-assets/commands/memory/README.md +0 -9
  92. package/claude-assets/commands/memory/memory-bank.md +0 -58
  93. package/claude-assets/commands/memory/memory-persist.md +0 -25
  94. package/claude-assets/commands/memory/memory-search.md +0 -25
  95. package/claude-assets/commands/memory/memory-usage.md +0 -25
  96. package/claude-assets/commands/memory/neural.md +0 -47
  97. package/claude-assets/commands/memory/usage.md +0 -46
  98. package/claude-assets/commands/monitoring/README.md +0 -9
  99. package/claude-assets/commands/monitoring/agent-metrics.md +0 -25
  100. package/claude-assets/commands/monitoring/agents.md +0 -44
  101. package/claude-assets/commands/monitoring/real-time-view.md +0 -25
  102. package/claude-assets/commands/monitoring/status.md +0 -46
  103. package/claude-assets/commands/monitoring/swarm-monitor.md +0 -25
  104. package/claude-assets/commands/neural.js +0 -572
  105. package/claude-assets/commands/optimization/README.md +0 -9
  106. package/claude-assets/commands/optimization/auto-topology.md +0 -62
  107. package/claude-assets/commands/optimization/cache-manage.md +0 -25
  108. package/claude-assets/commands/optimization/parallel-execute.md +0 -25
  109. package/claude-assets/commands/optimization/parallel-execution.md +0 -50
  110. package/claude-assets/commands/optimization/topology-optimize.md +0 -25
  111. package/claude-assets/commands/pair/README.md +0 -261
  112. package/claude-assets/commands/pair/commands.md +0 -546
  113. package/claude-assets/commands/pair/config.md +0 -510
  114. package/claude-assets/commands/pair/examples.md +0 -512
  115. package/claude-assets/commands/pair/modes.md +0 -348
  116. package/claude-assets/commands/pair/session.md +0 -407
  117. package/claude-assets/commands/pair/start.md +0 -209
  118. package/claude-assets/commands/parse-epic.js +0 -180
  119. package/claude-assets/commands/performance.js +0 -582
  120. package/claude-assets/commands/register-all-commands.js +0 -320
  121. package/claude-assets/commands/register-claude-md.js +0 -82
  122. package/claude-assets/commands/register-claude-soul.js +0 -80
  123. package/claude-assets/commands/sparc/analyzer.md +0 -52
  124. package/claude-assets/commands/sparc/architect.md +0 -53
  125. package/claude-assets/commands/sparc/batch-executor.md +0 -54
  126. package/claude-assets/commands/sparc/coder.md +0 -54
  127. package/claude-assets/commands/sparc/debugger.md +0 -54
  128. package/claude-assets/commands/sparc/designer.md +0 -53
  129. package/claude-assets/commands/sparc/documenter.md +0 -54
  130. package/claude-assets/commands/sparc/innovator.md +0 -54
  131. package/claude-assets/commands/sparc/memory-manager.md +0 -54
  132. package/claude-assets/commands/sparc/optimizer.md +0 -54
  133. package/claude-assets/commands/sparc/orchestrator.md +0 -132
  134. package/claude-assets/commands/sparc/researcher.md +0 -54
  135. package/claude-assets/commands/sparc/reviewer.md +0 -54
  136. package/claude-assets/commands/sparc/sparc-modes.md +0 -174
  137. package/claude-assets/commands/sparc/swarm-coordinator.md +0 -54
  138. package/claude-assets/commands/sparc/tdd.md +0 -54
  139. package/claude-assets/commands/sparc/tester.md +0 -54
  140. package/claude-assets/commands/sparc/workflow-manager.md +0 -54
  141. package/claude-assets/commands/sparc.js +0 -110
  142. package/claude-assets/commands/stream-chain/pipeline.md +0 -121
  143. package/claude-assets/commands/stream-chain/run.md +0 -70
  144. package/claude-assets/commands/swarm/README.md +0 -15
  145. package/claude-assets/commands/swarm/analysis.md +0 -95
  146. package/claude-assets/commands/swarm/development.md +0 -96
  147. package/claude-assets/commands/swarm/examples.md +0 -168
  148. package/claude-assets/commands/swarm/maintenance.md +0 -102
  149. package/claude-assets/commands/swarm/optimization.md +0 -117
  150. package/claude-assets/commands/swarm/research.md +0 -136
  151. package/claude-assets/commands/swarm/swarm-analysis.md +0 -8
  152. package/claude-assets/commands/swarm/swarm-background.md +0 -8
  153. package/claude-assets/commands/swarm/swarm-init.md +0 -19
  154. package/claude-assets/commands/swarm/swarm-modes.md +0 -8
  155. package/claude-assets/commands/swarm/swarm-monitor.md +0 -8
  156. package/claude-assets/commands/swarm/swarm-spawn.md +0 -19
  157. package/claude-assets/commands/swarm/swarm-status.md +0 -8
  158. package/claude-assets/commands/swarm/swarm-strategies.md +0 -8
  159. package/claude-assets/commands/swarm/swarm.md +0 -27
  160. package/claude-assets/commands/swarm/testing.md +0 -131
  161. package/claude-assets/commands/swarm.js +0 -423
  162. package/claude-assets/commands/testing/playwright-e2e.md +0 -288
  163. package/claude-assets/commands/training/README.md +0 -9
  164. package/claude-assets/commands/training/model-update.md +0 -25
  165. package/claude-assets/commands/training/neural-patterns.md +0 -74
  166. package/claude-assets/commands/training/neural-train.md +0 -25
  167. package/claude-assets/commands/training/pattern-learn.md +0 -25
  168. package/claude-assets/commands/training/specialization.md +0 -63
  169. package/claude-assets/commands/truth/start.md +0 -143
  170. package/claude-assets/commands/validate-commands.js +0 -223
  171. package/claude-assets/commands/verify/check.md +0 -50
  172. package/claude-assets/commands/verify/start.md +0 -128
  173. package/claude-assets/commands/workflow.js +0 -606
  174. package/claude-assets/commands/workflows/README.md +0 -9
  175. package/claude-assets/commands/workflows/development.md +0 -78
  176. package/claude-assets/commands/workflows/research.md +0 -63
  177. package/claude-assets/commands/workflows/workflow-create.md +0 -25
  178. package/claude-assets/commands/workflows/workflow-execute.md +0 -25
  179. package/claude-assets/commands/workflows/workflow-export.md +0 -25
  180. package/claude-assets/hooks/post-edit.config.json +0 -23
@@ -1,651 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Hooks Automation Slash Command
5
- * Usage: /hooks <action> [options]
6
- */
7
-
8
- import { SlashCommand } from '../core/slash-command.js';
9
-
10
- export class HooksCommand extends SlashCommand {
11
- constructor() {
12
- super('hooks', 'Manage automation hooks for agents and coordination');
13
- }
14
-
15
- getUsage() {
16
- return '/hooks <action> [options]';
17
- }
18
-
19
- getExamples() {
20
- return [
21
- '/hooks enable - Enable all automation hooks',
22
- '/hooks pre-task "Implement API" - Execute pre-task hook',
23
- '/hooks post-edit "src/api.js" - Execute post-edit hook',
24
- '/hooks session-start - Start coordination session',
25
- '/hooks session-restore swarm-123 - Restore session state',
26
- '/hooks notify "Task completed" - Send coordination notification',
27
- '/hooks status - Check hook status',
28
- '/hooks configure - Configure hook settings'
29
- ];
30
- }
31
-
32
- async execute(args, context) {
33
- const [action, ...params] = args;
34
-
35
- if (!action) {
36
- return this.formatResponse({
37
- success: false,
38
- error: 'Action required',
39
- usage: this.getUsage(),
40
- availableActions: [
41
- 'enable', 'disable', 'status', 'configure',
42
- 'pre-task', 'post-task', 'post-edit',
43
- 'session-start', 'session-restore', 'session-end',
44
- 'notify', 'validate', 'format'
45
- ]
46
- });
47
- }
48
-
49
- try {
50
- let result;
51
-
52
- switch (action.toLowerCase()) {
53
- case 'enable':
54
- result = await this.enableHooks(params);
55
- break;
56
-
57
- case 'disable':
58
- result = await this.disableHooks(params);
59
- break;
60
-
61
- case 'status':
62
- result = await this.getHookStatus(params);
63
- break;
64
-
65
- case 'configure':
66
- result = await this.configureHooks(params);
67
- break;
68
-
69
- case 'pre-task':
70
- result = await this.preTaskHook(params);
71
- break;
72
-
73
- case 'post-task':
74
- result = await this.postTaskHook(params);
75
- break;
76
-
77
- case 'post-edit':
78
- result = await this.postEditHook(params);
79
- break;
80
-
81
- case 'session-start':
82
- result = await this.sessionStart(params);
83
- break;
84
-
85
- case 'session-restore':
86
- result = await this.sessionRestore(params);
87
- break;
88
-
89
- case 'session-end':
90
- result = await this.sessionEnd(params);
91
- break;
92
-
93
- case 'notify':
94
- result = await this.sendNotification(params);
95
- break;
96
-
97
- case 'validate':
98
- result = await this.validateCommand(params);
99
- break;
100
-
101
- case 'format':
102
- result = await this.formatCode(params);
103
- break;
104
-
105
- default:
106
- result = {
107
- success: false,
108
- error: `Unknown action: ${action}`,
109
- availableActions: [
110
- 'enable', 'disable', 'status', 'configure',
111
- 'pre-task', 'post-task', 'post-edit',
112
- 'session-start', 'session-restore', 'session-end',
113
- 'notify', 'validate', 'format'
114
- ]
115
- };
116
- }
117
-
118
- return this.formatResponse(result);
119
- } catch (error) {
120
- return this.formatResponse({
121
- success: false,
122
- error: error.message,
123
- action: action
124
- });
125
- }
126
- }
127
-
128
- async enableHooks(params) {
129
- const [scope = 'all'] = params;
130
-
131
- console.log(`⚙️ Enabling hooks for scope: ${scope}`);
132
-
133
- const prompt = `
134
- ⚙️ **ENABLE AUTOMATION HOOKS**
135
-
136
- **Scope:** ${scope}
137
-
138
- **Execute the following bash commands to enable hooks:**
139
-
140
- \`\`\`bash
141
- # Enable hooks automation
142
- npx claude-flow@alpha hooks enable --scope ${scope}
143
-
144
- # Configure auto-assignment
145
- npx claude-flow@alpha hooks configure --auto-assign true
146
-
147
- # Enable code formatting
148
- npx claude-flow@alpha hooks configure --auto-format true
149
-
150
- # Enable neural training
151
- npx claude-flow@alpha hooks configure --neural-training true
152
- \`\`\`
153
-
154
- **Hook Types Enabled:**
155
- - ✅ Pre-task validation and preparation
156
- - ✅ Post-edit formatting and analysis
157
- - ✅ Session management and state persistence
158
- - ✅ Automatic agent assignment
159
- - ✅ Neural pattern training
160
- - ✅ Performance monitoring
161
-
162
- **Execute these hook enablement commands now**:
163
- `;
164
-
165
- return {
166
- success: true,
167
- prompt: prompt,
168
- scope: scope,
169
- hooksEnabled: true
170
- };
171
- }
172
-
173
- async disableHooks(params) {
174
- const [scope = 'all'] = params;
175
-
176
- console.log(`❌ Disabling hooks for scope: ${scope}`);
177
-
178
- const prompt = `
179
- ❌ **DISABLE AUTOMATION HOOKS**
180
-
181
- **Scope:** ${scope}
182
-
183
- **Execute the following bash commands to disable hooks:**
184
-
185
- \`\`\`bash
186
- # Disable hooks automation
187
- npx claude-flow@alpha hooks disable --scope ${scope}
188
-
189
- # Save current state before disabling
190
- npx claude-flow@alpha hooks session-end --export-metrics true
191
- \`\`\`
192
-
193
- **Execute these hook disabling commands now**:
194
- `;
195
-
196
- return {
197
- success: true,
198
- prompt: prompt,
199
- scope: scope,
200
- hooksEnabled: false
201
- };
202
- }
203
-
204
- async getHookStatus(params) {
205
- console.log('📊 Checking hook status...');
206
-
207
- const prompt = `
208
- 📊 **HOOK STATUS CHECK**
209
-
210
- **Check current hook configuration and status:**
211
-
212
- \`\`\`bash
213
- # Get hook status
214
- npx claude-flow@alpha hooks status
215
-
216
- # Check active sessions
217
- npx claude-flow@alpha hooks sessions --list
218
-
219
- # Get performance metrics
220
- npx claude-flow@alpha hooks metrics --summary
221
- \`\`\`
222
-
223
- **Execute these status checks now**:
224
- `;
225
-
226
- return {
227
- success: true,
228
- prompt: prompt
229
- };
230
- }
231
-
232
- async configureHooks(params) {
233
- console.log('⚙️ Configuring hooks...');
234
-
235
- const prompt = `
236
- ⚙️ **CONFIGURE AUTOMATION HOOKS**
237
-
238
- **Set up hook configuration:**
239
-
240
- \`\`\`bash
241
- # Configure hooks interactively
242
- npx claude-flow@alpha hooks configure
243
-
244
- # Or set specific options:
245
- npx claude-flow@alpha hooks configure --auto-assign true
246
- npx claude-flow@alpha hooks configure --auto-format true
247
- npx claude-flow@alpha hooks configure --neural-training true
248
- npx claude-flow@alpha hooks configure --session-persistence true
249
- \`\`\`
250
-
251
- **Configuration Options:**
252
- - Auto-assignment by file type
253
- - Code formatting and validation
254
- - Neural pattern training
255
- - Session state persistence
256
- - Performance monitoring
257
- - Error handling and recovery
258
-
259
- **Execute hook configuration now**:
260
- `;
261
-
262
- return {
263
- success: true,
264
- prompt: prompt
265
- };
266
- }
267
-
268
- async preTaskHook(params) {
269
- const task = params.join(' ');
270
-
271
- if (!task) {
272
- return {
273
- success: false,
274
- error: 'Task description required for pre-task hook'
275
- };
276
- }
277
-
278
- console.log(`🚀 Executing pre-task hook for: ${task}`);
279
-
280
- const prompt = `
281
- 🚀 **PRE-TASK HOOK**
282
-
283
- **Task:** ${task}
284
-
285
- **Execute pre-task preparation:**
286
-
287
- \`\`\`bash
288
- # Execute pre-task hook
289
- npx claude-flow@alpha hooks pre-task --description "${task}"
290
-
291
- # Auto-assign agents based on task type
292
- npx claude-flow@alpha hooks auto-assign --task "${task}"
293
-
294
- # Prepare resources and validate environment
295
- npx claude-flow@alpha hooks validate --command "${task}"
296
- \`\`\`
297
-
298
- **Pre-Task Actions:**
299
- - ✅ Agent assignment optimization
300
- - ✅ Resource preparation
301
- - ✅ Environment validation
302
- - ✅ Dependency checking
303
- - ✅ Context setup
304
-
305
- **Execute these pre-task hooks now**:
306
- `;
307
-
308
- return {
309
- success: true,
310
- prompt: prompt,
311
- task: task,
312
- hookType: 'pre-task'
313
- };
314
- }
315
-
316
- async postTaskHook(params) {
317
- const [taskId] = params;
318
-
319
- if (!taskId) {
320
- return {
321
- success: false,
322
- error: 'Task ID required for post-task hook'
323
- };
324
- }
325
-
326
- console.log(`✅ Executing post-task hook for: ${taskId}`);
327
-
328
- const prompt = `
329
- ✅ **POST-TASK HOOK**
330
-
331
- **Task ID:** ${taskId}
332
-
333
- **Execute post-task cleanup and analysis:**
334
-
335
- \`\`\`bash
336
- # Execute post-task hook
337
- npx claude-flow@alpha hooks post-task --task-id "${taskId}"
338
-
339
- # Train neural patterns from task completion
340
- npx claude-flow@alpha hooks neural-train --task "${taskId}"
341
-
342
- # Update performance metrics
343
- npx claude-flow@alpha hooks metrics --update "${taskId}"
344
- \`\`\`
345
-
346
- **Post-Task Actions:**
347
- - ✅ Performance analysis
348
- - ✅ Neural pattern training
349
- - ✅ Metrics collection
350
- - ✅ Resource cleanup
351
- - ✅ State persistence
352
-
353
- **Execute these post-task hooks now**:
354
- `;
355
-
356
- return {
357
- success: true,
358
- prompt: prompt,
359
- taskId: taskId,
360
- hookType: 'post-task'
361
- };
362
- }
363
-
364
- async postEditHook(params) {
365
- const [file, memoryKey] = params;
366
-
367
- if (!file) {
368
- return {
369
- success: false,
370
- error: 'File path required for post-edit hook'
371
- };
372
- }
373
-
374
- console.log(`📝 Executing post-edit hook for: ${file}`);
375
-
376
- const prompt = `
377
- 📝 **POST-EDIT HOOK**
378
-
379
- **File:** ${file}
380
- **Memory Key:** ${memoryKey || 'auto-generated'}
381
-
382
- **Execute unified post-edit pipeline:**
383
-
384
- \`\`\`bash
385
- # Unified pipeline with TDD mode
386
- node config/hooks/post-edit-pipeline.js "${file}" --tdd-mode${memoryKey ? ` --memory-key "${memoryKey}"` : ''}
387
-
388
- # Or use enhanced-hooks wrapper (same result)
389
- npx enhanced-hooks post-edit "${file}"${memoryKey ? ` --memory-key "${memoryKey}"` : ''}
390
-
391
- # Enable Rust strict mode for .rs files
392
- node config/hooks/post-edit-pipeline.js "${file}" --rust-strict --tdd-mode
393
- \`\`\`
394
-
395
- **Pipeline Features:**
396
- - ✅ Formatting, linting, type checking
397
- - ✅ Single-file testing (1-5s)
398
- - ✅ Real-time coverage analysis
399
- - ✅ TDD compliance checking
400
- - ✅ Rust quality enforcement (unwrap/expect/panic)
401
- - ✅ Security scanning
402
- - ✅ Memory coordination
403
- - ✅ Logs to post-edit-pipeline.log
404
-
405
- **Execute post-edit pipeline now**:
406
- `;
407
-
408
- return {
409
- success: true,
410
- prompt: prompt,
411
- file: file,
412
- memoryKey: memoryKey,
413
- hookType: 'post-edit'
414
- };
415
- }
416
-
417
- async sessionStart(params) {
418
- const [sessionType = 'coordination'] = params;
419
-
420
- console.log(`🚀 Starting ${sessionType} session...`);
421
-
422
- const prompt = `
423
- 🚀 **START COORDINATION SESSION**
424
-
425
- **Session Type:** ${sessionType}
426
-
427
- **Initialize session:**
428
-
429
- \`\`\`bash
430
- # Start coordination session
431
- npx claude-flow@alpha hooks session-start --type "${sessionType}"
432
-
433
- # Initialize memory context
434
- npx claude-flow@alpha hooks memory-init --session "${sessionType}-${Date.now()}"
435
-
436
- # Set up monitoring
437
- npx claude-flow@alpha hooks monitor-start
438
- \`\`\`
439
-
440
- **Session Features:**
441
- - ✅ Cross-agent memory sharing
442
- - ✅ State persistence
443
- - ✅ Performance tracking
444
- - ✅ Coordination protocols
445
- - ✅ Error recovery
446
-
447
- **Execute session initialization now**:
448
- `;
449
-
450
- return {
451
- success: true,
452
- prompt: prompt,
453
- sessionType: sessionType,
454
- sessionId: `${sessionType}-${Date.now()}`
455
- };
456
- }
457
-
458
- async sessionRestore(params) {
459
- const [sessionId] = params;
460
-
461
- if (!sessionId) {
462
- return {
463
- success: false,
464
- error: 'Session ID required for restoration'
465
- };
466
- }
467
-
468
- console.log(`🔄 Restoring session: ${sessionId}`);
469
-
470
- const prompt = `
471
- 🔄 **RESTORE COORDINATION SESSION**
472
-
473
- **Session ID:** ${sessionId}
474
-
475
- **Restore session state:**
476
-
477
- \`\`\`bash
478
- # Restore session
479
- npx claude-flow@alpha hooks session-restore --session-id "${sessionId}"
480
-
481
- # Load memory context
482
- npx claude-flow@alpha hooks memory-restore --session "${sessionId}"
483
-
484
- # Resume monitoring
485
- npx claude-flow@alpha hooks monitor-resume --session "${sessionId}"
486
- \`\`\`
487
-
488
- **Restoration Process:**
489
- - ✅ Load previous state
490
- - ✅ Restore memory context
491
- - ✅ Resume agent coordination
492
- - ✅ Continue task tracking
493
- - ✅ Maintain continuity
494
-
495
- **Execute session restoration now**:
496
- `;
497
-
498
- return {
499
- success: true,
500
- prompt: prompt,
501
- sessionId: sessionId
502
- };
503
- }
504
-
505
- async sessionEnd(params) {
506
- const [exportMetrics = 'true'] = params;
507
-
508
- console.log('💾 Ending coordination session...');
509
-
510
- const prompt = `
511
- 💾 **END COORDINATION SESSION**
512
-
513
- **Export Metrics:** ${exportMetrics}
514
-
515
- **Gracefully end session:**
516
-
517
- \`\`\`bash
518
- # End session with metrics export
519
- npx claude-flow@alpha hooks session-end --export-metrics ${exportMetrics}
520
-
521
- # Generate session summary
522
- npx claude-flow@alpha hooks session-summary
523
-
524
- # Clean up resources
525
- npx claude-flow@alpha hooks cleanup
526
- \`\`\`
527
-
528
- **Session Cleanup:**
529
- - ✅ Export performance metrics
530
- - ✅ Generate session summary
531
- - ✅ Persist important state
532
- - ✅ Clean up temporary resources
533
- - ✅ Archive session data
534
-
535
- **Execute session termination now**:
536
- `;
537
-
538
- return {
539
- success: true,
540
- prompt: prompt,
541
- exportMetrics: exportMetrics === 'true'
542
- };
543
- }
544
-
545
- async sendNotification(params) {
546
- const message = params.join(' ');
547
-
548
- if (!message) {
549
- return {
550
- success: false,
551
- error: 'Message required for notification'
552
- };
553
- }
554
-
555
- console.log(`📢 Sending notification: ${message}`);
556
-
557
- const prompt = `
558
- 📢 **SEND COORDINATION NOTIFICATION**
559
-
560
- **Message:** ${message}
561
-
562
- **Send notification to swarm:**
563
-
564
- \`\`\`bash
565
- # Send notification
566
- npx claude-flow@alpha hooks notify --message "${message}"
567
-
568
- # Update coordination status
569
- npx claude-flow@alpha hooks status-update --message "${message}"
570
- \`\`\`
571
-
572
- **Execute notification now**:
573
- `;
574
-
575
- return {
576
- success: true,
577
- prompt: prompt,
578
- message: message
579
- };
580
- }
581
-
582
- async validateCommand(params) {
583
- const command = params.join(' ');
584
-
585
- if (!command) {
586
- return {
587
- success: false,
588
- error: 'Command required for validation'
589
- };
590
- }
591
-
592
- console.log(`✅ Validating command: ${command}`);
593
-
594
- const prompt = `
595
- ✅ **VALIDATE COMMAND**
596
-
597
- **Command:** ${command}
598
-
599
- **Validate command safety and requirements:**
600
-
601
- \`\`\`bash
602
- # Validate command
603
- npx claude-flow@alpha hooks validate --command "${command}"
604
- \`\`\`
605
-
606
- **Execute validation now**:
607
- `;
608
-
609
- return {
610
- success: true,
611
- prompt: prompt,
612
- command: command
613
- };
614
- }
615
-
616
- async formatCode(params) {
617
- const [file] = params;
618
-
619
- if (!file) {
620
- return {
621
- success: false,
622
- error: 'File path required for formatting'
623
- };
624
- }
625
-
626
- console.log(`🎨 Formatting code: ${file}`);
627
-
628
- const prompt = `
629
- 🎨 **FORMAT CODE**
630
-
631
- **File:** ${file}
632
-
633
- **Auto-format and validate code:**
634
-
635
- \`\`\`bash
636
- # Format code
637
- npx claude-flow@alpha hooks format --file "${file}"
638
- \`\`\`
639
-
640
- **Execute code formatting now**:
641
- `;
642
-
643
- return {
644
- success: true,
645
- prompt: prompt,
646
- file: file
647
- };
648
- }
649
- }
650
-
651
- export default HooksCommand;