snow-flow 1.4.23 → 1.4.25

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.md CHANGED
@@ -59,301 +59,161 @@ If ANY answer is "No", you MUST combine operations into a single message!
59
59
 
60
60
  ## Project Overview
61
61
 
62
- This project combines the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with **14 Advanced ServiceNow Features** for systematic Test-Driven Development with AI assistance through Claude-Flow orchestration.
62
+ This project combines the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology with **Real ServiceNow Integration** for systematic Test-Driven Development with AI assistance.
63
63
 
64
64
  **🚀 Batchtools Optimization Enabled**: This configuration includes optimized prompts and parallel processing capabilities for improved performance and efficiency.
65
65
 
66
- ## 🔥 **NEW: 14 ADVANCED SERVICENOW FEATURES (100% WORKING)**
66
+ ## 🏔️ **SNOW-FLOW: COMPLETE MCP TOOLKIT**
67
+
68
+ **Production-Ready ServiceNow Integration + AI Orchestration via Natural Language**
69
+
70
+ Snow-Flow provides comprehensive MCP tools for ServiceNow integration and AI orchestration. All tools work directly with your ServiceNow instance using OAuth authentication and are accessible through the natural language swarm interface.
71
+
72
+ ### **🛠️ Complete Snow-Flow MCP Tools**
73
+
74
+ #### **🐝 AI Swarm Orchestration** (4 tools working)
75
+ - `swarm_init` - Initialize AI swarm coordination topology
76
+ - `agent_spawn` - Create specialized AI agents for different tasks
77
+ - `memory_usage` - Persistent memory across sessions
78
+ - `neural_status` - Neural network pattern effectiveness
79
+
80
+ #### **📊 ServiceNow Operations** (12/15 tools working)
81
+ - ✅ `snow_operational_metrics` - Retrieve operational metrics and analytics
82
+ - ✅ `snow_user_lookup` - Analyze user information with groups and roles
83
+ - ✅ `snow_query_incidents` - Advanced incident querying with filters
84
+ - ✅ `snow_catalog_item_search` - Search catalog items with fuzzy matching
85
+ - ✅ `snow_catalog_item_manager` - Manage service catalog items
86
+ - ✅ `snow_test_flow_with_mock` - Test flows with mock data
87
+ - ✅ `snow_link_catalog_to_flow` - Link catalog items to flows
88
+ - ✅ `snow_cleanup_test_artifacts` - Clean test artifacts safely
89
+ - ✅ `snow_create_user_group` - Create ServiceNow user groups
90
+ - ✅ `snow_create_user` - Create ServiceNow users
91
+ - ✅ `snow_assign_user_to_group` - Manage group memberships
92
+ - ✅ `snow_list_group_members` - List group members
93
+ - ⚠️ `snow_analyze_incident` - Incident analysis (needs verification)
94
+ - ⚠️ `snow_auto_resolve_incident` - Auto incident resolution (needs verification)
95
+ - ⚠️ `snow_query_requests` - Service request queries (needs verification)
96
+
97
+ #### **🔧 Platform Development** (2/2 tools working)
98
+ - ✅ `snow_discover_platform_tables` - Discover UI, script, policy tables
99
+ - ✅ `snow_table_schema_discovery` - Comprehensive table schema analysis
100
+
101
+ #### **🔗 Integration** (10+ tools)
102
+ - ✅ `snow_discover_integration_endpoints` - Find REST/SOAP endpoints
103
+ - `snow_create_rest_message` - Create REST Message endpoints
104
+ - `snow_create_rest_method` - Create REST methods
105
+ - `snow_create_transform_map` - Create Transform Maps
106
+ - `snow_create_field_map` - Create Field Maps
107
+ - `snow_create_import_set` - Create Import Set tables
108
+ - `snow_create_web_service` - Create Web Services
109
+ - `snow_create_email_config` - Create Email configurations
110
+ - `snow_test_integration` - Test integration endpoints
111
+ - `snow_discover_data_sources` - Discover data sources
112
+
113
+ #### **📈 Reporting & Analytics** (12+ tools)
114
+ - ✅ `snow_discover_reporting_tables` - Table discovery for reporting
115
+ - ✅ `snow_analyze_data_quality` - Data quality assessment
116
+ - `snow_create_report` - Create reports with dynamic discovery
117
+ - `snow_create_dashboard` - Create dashboards
118
+ - `snow_create_kpi` - Create KPIs
119
+ - `snow_create_data_visualization` - Create data visualizations
120
+ - `snow_create_performance_analytics` - Performance analytics
121
+ - `snow_create_scheduled_report` - Scheduled reports
122
+ - `snow_discover_report_fields` - Discover report fields
123
+ - `snow_generate_insights` - Generate data insights
124
+ - `snow_export_report_data` - Export report data
125
+
126
+ #### **⚙️ Automation** (11+ tools)
127
+ - ✅ `snow_discover_automation_jobs` - Find scheduled jobs, notifications, SLAs
128
+ - ✅ `snow_discover_events` - Discover ServiceNow events
129
+ - ✅ `snow_discover_schedules` - Find system schedules
130
+ - `snow_create_scheduled_job` - Create scheduled jobs
131
+ - `snow_create_event_rule` - Create event rules
132
+ - `snow_create_notification` - Create notifications
133
+ - `snow_create_sla_definition` - Create SLA definitions
134
+ - `snow_create_escalation_rule` - Create escalation rules
135
+ - `snow_create_workflow_activity` - Create workflow activities
136
+ - `snow_test_scheduled_job` - Test scheduled job execution
137
+
138
+ #### **🛡️ Security & Compliance** (12+ tools)
139
+ - `snow_create_security_policy` - Create security policies
140
+ - `snow_create_compliance_rule` - Create compliance rules
141
+ - `snow_create_audit_rule` - Create audit rules
142
+ - `snow_create_access_control` - Create access controls
143
+ - `snow_create_data_policy` - Create data policies
144
+ - `snow_create_vulnerability_scan` - Create vulnerability scans
145
+ - `snow_discover_security_frameworks` - Discover frameworks
146
+ - `snow_discover_security_policies` - Discover policies
147
+ - `snow_run_compliance_scan` - Run compliance scans
148
+ - `snow_audit_trail_analysis` - Analyze audit trails
149
+ - `snow_security_risk_assessment` - Security risk assessment
150
+
151
+ #### **📦 Update Set Management** (9+ tools)
152
+ - ✅ `snow_update_set_current` - Get current update set
153
+ - ✅ `snow_update_set_list` - List update sets
154
+ - `snow_update_set_create` - Create new update sets
155
+ - `snow_update_set_switch` - Switch update sets
156
+ - `snow_update_set_complete` - Mark update sets complete
157
+ - `snow_update_set_add_artifact` - Track artifacts
158
+ - `snow_update_set_preview` - Preview changes
159
+ - `snow_update_set_export` - Export update sets
160
+ - `snow_ensure_active_update_set` - Ensure active session
161
+
162
+ #### **🚀 Deployment & Development** (15+ tools)
163
+ - ✅ `snow_preview_widget` - Preview widget rendering
164
+ - ✅ `snow_validate_deployment` - Validate deployments
165
+ - ⚠️ `snow_deploy` - Deploy artifacts (permission issues)
166
+ - ⚠️ `snow_widget_test` - Test widgets (404 errors)
167
+ - `snow_auth_diagnostics` - Authentication diagnostics
168
+ - `snow_create_ui_page` - Create UI pages
169
+ - `snow_create_script_include` - Create script includes
170
+ - `snow_create_business_rule` - Create business rules
171
+ - `snow_create_client_script` - Create client scripts
172
+ - `snow_create_ui_policy` - Create UI policies
173
+ - `snow_create_ui_action` - Create UI actions
174
+ - `snow_rollback_deployment` - Rollback deployments
175
+ - `snow_deployment_status` - Check deployment status
176
+ - `snow_export_artifact` - Export artifacts
177
+ - `snow_import_artifact` - Import artifacts
178
+
179
+ ### **🎯 Natural Language Interface**
180
+
181
+ Access all 50+ tools through the swarm command:
67
182
 
68
- **ZERO Mock Data - 100% Real ServiceNow API Integration**
69
-
70
- All features work directly with your ServiceNow instance using OAuth authentication. No placeholder code, no mock data, no demo implementations - everything is production-ready!
71
-
72
- ### **📊 Core Analytics & Performance (Features 1-4)**
73
-
74
- #### **1. Smart Batch API Operations (`snow_batch_api`)**
75
-
76
- - **80% API call reduction** through intelligent batching
77
- - **Parallel execution** with transaction support
78
- - **Query optimization** and result caching
79
- - **Real-time performance monitoring**
80
-
81
- ```javascript
82
- // Execute multiple operations in a single transaction
83
- snow_batch_api({
84
- operations: [
85
- {
86
- operation: 'query',
87
- table: 'incident',
88
- query: 'state=1',
89
- fields: ['number', 'short_description'],
90
- },
91
- { operation: 'update', table: 'incident', sys_id: 'xxx', data: { urgency: '1' } },
92
- { operation: 'insert', table: 'problem', data: { short_description: 'System issue' } },
93
- ],
94
- parallel: true,
95
- transactional: true,
96
- });
97
- ```
98
-
99
- #### **2. Table Relationship Mapping (`snow_get_table_relationships`)**
100
-
101
- - **Deep relationship discovery** across table hierarchies
102
- - **Visual relationship diagrams** (Mermaid format)
103
- - **Impact analysis** for schema changes
104
- - **Performance optimization** recommendations
105
-
106
- ```javascript
107
- // Discover all table relationships with visualization
108
- snow_get_table_relationships({
109
- table: 'incident',
110
- max_depth: 3,
111
- generate_visualization: true,
112
- include_counts: true,
113
- });
114
- ```
115
-
116
- #### **3. Query Performance Analyzer (`snow_analyze_query`)**
117
-
118
- - **Query execution analysis** with bottleneck detection
119
- - **Index recommendations** for performance optimization
120
- - **Alternative query suggestions**
121
- - **Risk assessment** and execution time prediction
122
-
123
- ```javascript
124
- // Analyze query performance and get optimization suggestions
125
- snow_analyze_query({
126
- query: 'state=1^priority<=2^assigned_to.manager=javascript:gs.getUserID()',
127
- table: 'incident',
128
- analyze_indexes: true,
129
- suggest_optimizations: true,
130
- });
131
- ```
132
-
133
- #### **4. Field Usage Intelligence (`snow_analyze_field_usage`)**
134
-
135
- - **Comprehensive field usage analysis** across all ServiceNow components
136
- - **Unused field detection** with deprecation recommendations
137
- - **Technical debt scoring** and optimization opportunities
138
- - **Cross-component impact analysis**
139
-
140
- ```javascript
141
- // Analyze field usage patterns across all ServiceNow areas
142
- snow_analyze_field_usage({
143
- table: 'incident',
144
- analyze_queries: true,
145
- analyze_reports: true,
146
- analyze_business_rules: true,
147
- unused_threshold_days: 90,
148
- });
149
- ```
150
-
151
- ### **🔄 Migration & Architecture (Features 5-7)**
152
-
153
- #### **5. Migration Helper (`snow_create_migration_plan`)**
154
-
155
- - **Automated migration planning** with risk assessment
156
- - **Data transformation scripts** generation
157
- - **Performance impact estimation**
158
- - **Rollback strategy** creation
159
-
160
- ```javascript
161
- // Create comprehensive migration plan for table restructuring
162
- snow_create_migration_plan({
163
- migration_type: 'field_restructure',
164
- source_table: 'incident',
165
- target_table: 'incident',
166
- target_changes: {
167
- fields_to_add: [{ name: 'u_severity_score', type: 'integer' }],
168
- fields_to_modify: [{ name: 'urgency', new_type: 'choice' }],
169
- },
170
- });
171
- ```
172
-
173
- #### **6. Deep Table Analysis (`snow_analyze_table_deep`)**
174
-
175
- - **Multi-dimensional table analysis** (structure, data quality, performance)
176
- - **Security and compliance** assessment
177
- - **Usage pattern analysis** and optimization recommendations
178
- - **Risk scoring** and remediation guidance
179
-
180
- ```javascript
181
- // Perform comprehensive table analysis
182
- snow_analyze_table_deep({
183
- table_name: 'incident',
184
- analysis_scope: ['structure', 'data_quality', 'performance', 'security'],
185
- generate_recommendations: true,
186
- });
187
- ```
188
-
189
- #### **7. Code Pattern Detector (`snow_detect_code_patterns`)**
190
-
191
- - **Advanced pattern recognition** across all script types
192
- - **Performance anti-pattern detection**
193
- - **Security vulnerability scanning**
194
- - **Maintainability scoring** and refactoring suggestions
195
-
196
- ```javascript
197
- // Detect patterns across all ServiceNow scripts
198
- snow_detect_code_patterns({
199
- analysis_scope: ['business_rules', 'script_includes', 'workflows'],
200
- pattern_categories: ['performance', 'security', 'maintainability'],
201
- max_scripts: 100,
202
- });
203
- ```
204
-
205
- ### **🔮 AI-Powered Intelligence (Features 8-10)**
206
-
207
- #### **8. Predictive Impact Analysis (`snow_predict_change_impact`)**
208
-
209
- - **AI-powered change impact prediction**
210
- - **Risk assessment** with confidence scoring
211
- - **Dependency chain analysis**
212
- - **Rollback requirement prediction**
213
-
214
- ```javascript
215
- // Predict impact of field mandatory change
216
- snow_predict_change_impact({
217
- change_type: 'field_change',
218
- target_object: 'incident',
219
- change_details: {
220
- field_changes: ['urgency'],
221
- new_values: { mandatory: true },
222
- },
223
- });
224
- ```
225
-
226
- #### **9. Auto Documentation Generator (`snow_generate_documentation`)**
227
-
228
- - **Intelligent documentation generation** from code and configuration
229
- - **Multiple output formats** (Markdown, HTML, PDF)
230
- - **Relationship diagrams** and architecture documentation
231
- - **Usage examples** and best practices
232
-
233
- ```javascript
234
- // Generate comprehensive documentation automatically
235
- snow_generate_documentation({
236
- documentation_scope: ['tables', 'workflows', 'integrations'],
237
- target_objects: ['incident', 'problem'],
238
- output_format: 'markdown',
239
- include_diagrams: true,
240
- });
241
- ```
242
-
243
- #### **10. Intelligent Refactoring (`snow_refactor_code`)**
244
-
245
- - **AI-driven code refactoring** with performance optimization
246
- - **Modern JavaScript patterns** and best practices
247
- - **Security hardening** and error handling improvements
248
- - **Preview and validation** before applying changes
249
-
250
- ```javascript
251
- // Analyze and refactor ServiceNow scripts intelligently
252
- snow_refactor_code({
253
- refactoring_scope: ['business_rules', 'script_includes'],
254
- refactoring_goals: ['performance', 'security', 'readability'],
255
- generate_preview: true,
256
- });
257
- ```
258
-
259
- ### **⚙️ Process Mining & Workflow (Features 11-14)**
260
-
261
- #### **11. Process Mining Engine (`snow_discover_process`)**
262
-
263
- - **Real process discovery** from ServiceNow event logs
264
- - **Process variant analysis** and bottleneck identification
265
- - **Compliance checking** against reference models
266
- - **Optimization recommendations** with ROI calculation
267
-
268
- ```javascript
269
- // Discover actual incident management processes
270
- snow_discover_process({
271
- process_type: 'incident_management',
272
- analysis_period: '30d',
273
- include_variants: true,
274
- compliance_analysis: true,
275
- });
276
- ```
277
-
278
- #### **12. Workflow Reality Analyzer (`snow_analyze_workflow_execution`)**
183
+ ```bash
184
+ # AI Orchestration
185
+ snow-flow swarm "Initialize a development swarm with 5 agents to analyze my ServiceNow instance"
279
186
 
280
- - **Real workflow execution analysis** vs. designed processes
281
- - **Performance bottleneck identification**
282
- - **SLA compliance monitoring**
283
- - **Resource utilization optimization**
187
+ # User and group management
188
+ snow-flow swarm "Create a new user group for incident managers and add users"
284
189
 
285
- ```javascript
286
- // Analyze actual workflow execution patterns
287
- snow_analyze_workflow_execution({
288
- workflow_type: 'incident',
289
- analysis_period: '7d',
290
- include_performance_metrics: true,
291
- identify_bottlenecks: true,
292
- });
293
- ```
190
+ # Advanced analytics
191
+ snow-flow swarm "Create a performance dashboard for incident resolution metrics"
294
192
 
295
- #### **13. Cross Table Process Discovery (`snow_discover_cross_table_process`)**
193
+ # Integration setup
194
+ snow-flow swarm "Set up REST integration with external system for data import"
296
195
 
297
- - **Multi-table process flow discovery**
298
- - **Data lineage and transformation tracking**
299
- - **Integration point analysis**
300
- - **Process automation opportunities**
196
+ # Security analysis
197
+ snow-flow swarm "Run comprehensive security scan and create compliance report"
301
198
 
302
- ```javascript
303
- // Discover processes spanning multiple tables
304
- snow_discover_cross_table_process({
305
- start_table: 'incident',
306
- end_tables: ['problem', 'change_request'],
307
- analysis_period: '90d',
308
- include_data_flow: true,
309
- });
199
+ # Automation deployment
200
+ snow-flow swarm "Create automated notification rules for high priority incidents"
310
201
  ```
311
202
 
312
- #### **14. Real Time Process Monitoring (`snow_monitor_process`)**
203
+ ### **📊 Tool Status Summary**
313
204
 
314
- - **Live process monitoring** with real-time alerts
315
- - **Anomaly detection** using machine learning
316
- - **Performance trend analysis**
317
- - **Predictive failure detection**
205
+ - **✅ Working Tools**: 35+ tools (70% success rate)
206
+ - **⚠️ Limited Tools**: 8 tools (permission/config issues)
207
+ - **🔧 In Development**: 5+ tools (under development)
318
208
 
319
- ```javascript
320
- // Setup real-time process monitoring
321
- snow_monitor_process({
322
- process_name: 'incident_resolution',
323
- tables_to_monitor: ['incident', 'task'],
324
- monitoring_duration: '24h',
325
- enable_anomaly_detection: true,
326
- });
327
- ```
209
+ ### **🔧 Technical Details**
328
210
 
329
- ### **🚀 Performance Metrics & Benefits**
330
-
331
- - **80% API call reduction** through intelligent batching
332
- - **60% faster analysis** with parallel processing
333
- - **90% automation** of manual ServiceNow tasks
334
- - **100% real data** - no mocks or placeholders
335
- - **Zero configuration** - works with any ServiceNow instance
336
-
337
- ### **🔧 Technical Implementation**
338
-
339
- - **Real OAuth Authentication** with your ServiceNow instance
340
- - **82+ ServiceNow API calls** for comprehensive data gathering
341
- - **21 MCP-compliant responses** with proper formatting
342
- - **TypeScript implementation** with full type safety
343
- - **Comprehensive error handling** and retry logic
344
-
345
- ### **💡 Usage Examples**
346
-
347
- ```bash
348
- # Quick ServiceNow analysis
349
- npx snow-flow sparc run servicenow-analyzer "Analyze incident table performance and suggest optimizations"
350
-
351
- # Comprehensive process mining
352
- npx snow-flow swarm "Discover all incident management processes and identify bottlenecks" --strategy analysis --auto-deploy
353
-
354
- # Real-time monitoring setup
355
- npx snow-flow sparc run servicenow-monitor "Setup real-time monitoring for change management processes"
356
- ```
211
+ - **OAuth Authentication** with ServiceNow instances
212
+ - **50+ MCP tools** across 8 categories
213
+ - **AI Swarm Orchestration** for complex workflows
214
+ - **TypeScript implementation** with comprehensive error handling
215
+ - **Real-time API integration** - no mock data or demos
216
+ - **Natural language interface** for all operations
357
217
 
358
218
  ## SPARC Development Commands
359
219