snow-flow 1.3.30 → 1.4.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 (44) hide show
  1. package/CLAUDE.md +12 -0
  2. package/README.md +153 -456
  3. package/dist/agents/base-agent.js +6 -7
  4. package/dist/agents/index.js +3 -4
  5. package/dist/agents/queen-agent.js +21 -7
  6. package/dist/api/natural-language-mapper.js +24 -21
  7. package/dist/cli/snow-flow-cli-integration.js +2 -1
  8. package/dist/cli.js +28 -1017
  9. package/dist/compliance/advanced-compliance-system.js +1 -1
  10. package/dist/documentation/self-documenting-system.js +10 -41
  11. package/dist/intelligence/auto-resolution-engine.js +1 -1
  12. package/dist/mcp/base-mcp-server.js +2 -2
  13. package/dist/mcp/http-transport-wrapper.js +2 -2
  14. package/dist/mcp/servicenow-deployment-mcp-refactored.js +1 -1
  15. package/dist/mcp/servicenow-deployment-mcp.js +16 -3
  16. package/dist/mcp/servicenow-flow-composer-mcp.js +20 -0
  17. package/dist/mcp/servicenow-intelligent-mcp-refactored.js +5 -5
  18. package/dist/mcp/servicenow-intelligent-mcp.js +11 -3
  19. package/dist/mcp/servicenow-operations-mcp-refactored.js +2 -2
  20. package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.js +3 -1
  21. package/dist/mcp/servicenow-xml-flow-mcp.js +16 -9
  22. package/dist/mcp/shared/base-mcp-server.js +2 -2
  23. package/dist/memory/hierarchical-memory-system.js +0 -2
  24. package/dist/memory/memory-system.js +18 -81
  25. package/dist/memory/snow-flow-memory-patterns.js +41 -41
  26. package/dist/monitoring/enhanced-monitoring-system.js +6 -6
  27. package/dist/optimization/index.js +5 -3
  28. package/dist/orchestrator/flow-composer.js +101 -8
  29. package/dist/queen/agent-factory.js +8 -1
  30. package/dist/queen/mcp-execution-bridge.js +7 -0
  31. package/dist/queen/queen-memory-system.js +27 -1
  32. package/dist/queen/servicenow-queen.js +25 -17
  33. package/dist/snow-flow-system.js +36 -37
  34. package/dist/testing/integration-test-suite.js +31 -30
  35. package/dist/utils/complete-flow-xml-generator.js +52 -52
  36. package/dist/utils/servicenow-client.js +15 -8
  37. package/dist/utils/snow-oauth.js +17 -2
  38. package/dist/version.js +19 -1
  39. package/package.json +1 -1
  40. package/flow-update-sets/flow_build_automated_approval_flow_with_notifications_flow.xml +0 -203
  41. package/flow-update-sets/flow_create_approval_flow_for_equipment_requests_flow.xml +0 -206
  42. package/flow-update-sets/flow_create_equipment_approval_flow_with_manager_approv_flow.xml +0 -254
  43. package/flow-update-sets/iphone_15_pro_approval_flow.xml +0 -203
  44. package/flow-update-sets/test_iphone_approval_flow_flow.xml +0 -303
package/README.md CHANGED
@@ -1,542 +1,239 @@
1
1
  # Snow-Flow: ServiceNow Hive-Mind Intelligence 🧠
2
2
 
3
- > **🔥 HOT FIX v1.3.30 Released**: Critical production blocker fixed! Update immediately with `npm update -g snow-flow`
3
+ ⚠️ **WARNING: FLOW CREATION REMOVED (v1.4.0+)** ⚠️
4
4
 
5
- **Snow-Flow** revolutionizes ServiceNow development through **claude-flow inspired hive-mind architecture**. One elegant command spawns intelligent AI agents that collaborate to build, test, and deploy professional ServiceNow solutions automatically.
5
+ Flow Designer functionality has been removed due to critical issues.
6
+ Please use ServiceNow's native Flow Designer interface directly.
7
+
8
+ **Snow-Flow** provides intelligent AI agents that collaborate to build, test, and deploy ServiceNow solutions through **claude-flow inspired hive-mind architecture**.
6
9
 
7
10
  ## 🧠 The Hive-Mind Revolution
8
11
 
9
12
  **Inspired by claude-flow philosophy: "One Queen, many simple agents, simple memory, learn and adapt"**
10
13
 
11
14
  - 👑 **Queen Agent**: Master coordinator that analyzes objectives and spawns specialist agents
12
- - 🤖 **Worker Agents**: ServiceNow specialists (Widget Creator, Flow Builder, Script Writer, Security, Test)
15
+ - 🤖 **Worker Agents**: ServiceNow specialists (Widget Creator, Script Writer, Security, Test)
13
16
  - 💾 **Shared Memory**: SQLite-based persistent coordination system
14
17
  - 🎯 **Claude Code Integration**: All coordination happens through Claude Code interface
15
18
  - 🚀 **One Command**: `snow-flow swarm "objective"` - everything else is automatic
16
19
 
17
- ## 🚨 CRITICAL HOT FIX: v1.3.30 - BUG-001 Production Blocker RESOLVED! 🔥
20
+ ## ⚠️ BREAKING CHANGES v1.4.0
18
21
 
19
- ### 🔥 Emergency Fix Released
22
+ ### Flow Creation Removed
20
23
 
21
- **BUG-001: "flowDef is not defined" Error - FIXED ✅**
22
- - **Critical Issue**: Flow deployments were completely blocked with runtime error
23
- - **Impact**: 100% deployment failure rate - no flows could be created
24
- - **Root Cause**: Missing `this.` prefix in CompleteFlowXMLGenerator class
25
- - **Fix**: All references to `flowDef` now properly use `this.flowDef`
26
- - **Result**: Flow deployments now work correctly!
24
+ **Why This Change:**
25
+ - 38 critical bugs found in flow creation functionality
26
+ - 0% success rate in beta testing
27
+ - Maintains stability of other features
27
28
 
28
- ```bash
29
- # Update immediately to fix deployment issues
30
- npm update -g snow-flow
29
+ **What Still Works:**
30
+ - Widget development and deployment
31
+ - Update Set management and tracking
32
+ - ✅ ServiceNow authentication and session management
33
+ - ✅ Table/field discovery and analysis
34
+ - ✅ Multi-agent coordination via memory
35
+ - ✅ General ServiceNow operations
31
36
 
32
- # Verify you have v1.3.30
33
- snow-flow --version
34
- ```
37
+ **Alternative Approach:**
38
+ 1. Use snow-flow for discovery and planning:
39
+ ```bash
40
+ snow-flow memory store flow_requirements "Need approval workflow with SLA tracking"
41
+ ```
42
+ 2. Create flows in ServiceNow Flow Designer interface directly
43
+ 3. Use snow-flow for other ServiceNow automation tasks
35
44
 
36
- ## 🚨 CRITICAL FIXES: v1.3.28 - All Beta Testing Issues RESOLVED! ✅
37
-
38
- ### 🎉 Complete Solution for ALL Three Critical Issues
39
-
40
- **Issue #1: Flow Deployment Creates Empty Flows - COMPLETELY FIXED ✅**
41
- - **Problem**: Flows were deploying "successfully" but were completely empty or missing 90% of features
42
- - **Root Cause**: Incomplete XML generation, wrong table versions (v1 instead of v2), missing encoding
43
- - **Solution**: New `CompleteFlowXMLGenerator` with:
44
- - ✅ Correct v2 tables (sys_hub_action_instance_v2, sys_hub_trigger_instance_v2)
45
- - ✅ Proper Base64+gzip encoding for action values
46
- - ✅ Comprehensive label_cache structure
47
- - ✅ ALL flow components fully supported
48
- - **Result**: Flows now deploy with 100% of requested features working!
49
-
50
- **Issue #2: Tool Registry Mapping Failures - COMPLETELY FIXED ✅**
51
- - **Problem**: Tool names between MCP providers were inconsistent causing failures
52
- - **Example**: `mcp__servicenow-operations__snow_table_schema_discovery` doesn't exist
53
- - **Solution**: New `MCPToolRegistry` with:
54
- - ✅ Robust tool name resolution with aliases
55
- - ✅ Fuzzy matching for partial names
56
- - ✅ Provider-specific tool discovery
57
- - ✅ Automatic mapping between naming conventions
58
- - **Result**: Tools always resolve correctly regardless of how they're referenced!
59
-
60
- **Issue #3: Metadata Response Failures - COMPLETELY FIXED ✅**
61
- - **Problem**: Deployment responses had sys_id always null, no API endpoints
62
- - **Root Cause**: ServiceNow responses vary widely, metadata extraction was incomplete
63
- - **Solution**: New `DeploymentMetadataHandler` with:
64
- - ✅ Multiple fallback methods to find sys_id
65
- - ✅ Searches by name, update set, and direct API
66
- - ✅ Always returns complete metadata
67
- - ✅ Comprehensive verification after deployment
68
- - **Result**: All deployments return complete, verified metadata!
69
-
70
- ### 🚀 How It Works Now
45
+ ## 🚀 What Snow-Flow Does Best
71
46
 
47
+ ### Widget Development
72
48
  ```bash
73
- # One command creates COMPLETE flows with ALL features
74
- snow-flow swarm "create incident management flow with SLA tracking, automated assignment, knowledge base, and escalation"
75
-
76
- # Result:
77
- # ✅ Flow created with ALL 10+ requested features working
78
- # ✅ Proper sys_id returned: abc123-def456-...
79
- # ✅ API endpoint: https://instance.service-now.com/api/now/table/sys_hub_flow/abc123
80
- # ✅ UI URL: https://instance.service-now.com/flow-designer/abc123
81
- # ✅ Performance recommendations included
82
- # ✅ Complete verification of deployment
49
+ # Create professional ServiceNow widgets
50
+ snow-flow swarm "create incident dashboard widget with real-time updates"
83
51
  ```
84
52
 
85
- ## What's New in v1.3.1 - Flow Designer XML Auto-Deployment COMPLETE!
86
-
87
- ### 🚀 BREAKTHROUGH: Complete XML Update Set Auto-Import!
88
- - **✅ ZERO MANUAL STEPS**: One command imports, previews, and commits XML update sets automatically
89
- - **✅ FLOW DESIGNER INTEGRATION**: Automatic detection of Flow Designer artifacts in swarm commands
90
- - **✅ FULLY AUTOMATED FLOW DEPLOYMENT**: Complete workflow from natural language to live ServiceNow flow in one command
91
- - **✅ ZERO MANUAL STEPS**: XML generation, import, preview, and commit all happen automatically
92
- - **✅ INTELLIGENT SAFETY**: Auto-preview with problem detection, only commits if clean
93
- - **✅ GRACEFUL FALLBACKS**: Provides manual instructions if auto-deployment fails
94
-
95
- ### 🔄 Fully Automated Flow Workflow (NEW v1.3.17!)
53
+ ### Update Set Management
96
54
  ```bash
97
- # Single command creates AND deploys flow automatically!
98
- snow-flow swarm "create approval workflow for equipment requests"
99
-
100
- # Complete output shows:
101
- # 🔧 Flow Designer Detected - Using XML-First Approach!
102
- # ✅ XML Generated & Auto-Deployed to ServiceNow!
103
- # 🎉 Flow ready in Flow Designer!
104
-
105
- # ✅ Zero manual steps: Generate → Import → Preview → Commit (only if clean)
55
+ # Track and manage update sets
56
+ snow-flow auth login
57
+ snow-flow update-set create "Widget Development" "Dashboard widgets and improvements"
106
58
  ```
107
59
 
108
- ### 🚀 Previous Release: v1.1.93 - Revolutionary Parallel Agent Spawning WORKING!
109
-
110
- #### 🚀 BREAKTHROUGH: 6+ Parallel Agents Working Simultaneously!
111
- - **✅ PROVEN RESULTS**: 6+ specialized agents spawn automatically for widget development
112
- - **✅ 2.8x SPEEDUP**: Demonstrated 2.8x faster development vs single-agent approach
113
- - **✅ SPECIALIZED TEAMS**: widget-creator, css-specialist, backend-specialist, frontend-specialist, integration-specialist, performance-specialist, ui-ux-specialist, tester
114
- - **✅ 100% DETECTION**: Enhanced detection logic - no more missed parallelization opportunities
115
- - **✅ INTELLIGENT 403 HANDLING**: Gap Analysis Engine integration for automatic permission issue resolution
116
- - **✅ MEMORY TOOLS FIXED**: ServiceNow Memory MCP server added to template system
117
-
118
- ### 🚀 Previous Release: v1.1.90 - Parallel Agent Engine Foundation
119
- - **Parallel Engine Architecture**: Core foundation for intelligent agent spawning
120
- - **Task Analysis System**: Detects opportunities for specialized breakdown
121
- - **Agent Coordination**: Shared memory system for multi-agent collaboration
122
- - **Shared Memory Coordination**: All parallel agents coordinate seamlessly through shared memory system
123
-
124
- ### ⚡ Execution Strategies
125
- - **Wave-based**: Sequential waves of parallel agents for structured work
126
- - **Concurrent**: All agents work simultaneously for maximum speed
127
- - **Pipeline**: Agent handoffs with overlap for continuous workflow
128
- - **Hybrid**: Intelligent mix of strategies based on task analysis
129
-
130
- ### 🧠 Learning & Optimization
131
- - **Performance Tracking**: Stores execution results to improve future parallelization decisions
132
- - **Workload Balancing**: Intelligent distribution across agent teams with utilization monitoring
133
- - **Graceful Fallback**: Automatically falls back to sequential execution when beneficial
134
-
135
- ## 🧠 Previous Major Release: v1.1.88 - Intelligent Gap Analysis Revolution
136
-
137
- ### 🧠 REVOLUTIONARY: Intelligent Gap Analysis Engine
138
- - **Beyond MCP Tools**: Automatically detects ALL ServiceNow configurations needed beyond standard MCP tools
139
- - **60+ Configuration Types**: System properties, LDAP/SAML auth, database indexes, navigation, forms, ACLs, and more
140
- - **Auto-Resolution Engine**: Attempts automatic configuration via ServiceNow APIs for safe operations
141
- - **Manual Instructions Generator**: Creates detailed step-by-step guides with role requirements and risk assessment
142
- - **Queen Agent Integration**: Built into every Queen Agent execution - no additional commands needed
143
-
144
- ### 🎯 Complete ServiceNow Configuration Coverage
145
- - **🔐 Authentication**: LDAP, SAML, OAuth providers, SSO, MFA configurations
146
- - **🗄️ Database**: Indexes, views, partitioning, performance analytics, system properties
147
- - **🧭 Navigation**: Application menus, modules, form layouts, UI actions, policies
148
- - **📧 Integration**: Email templates, web services, import sets, transform maps
149
- - **🔄 Workflow**: Activities, transitions, SLA definitions, escalation rules
150
-
151
- ### 🤖 Intelligent Automation
152
- - **Requirements Analysis**: AI-powered parsing of objectives to identify all needed configurations
153
- - **MCP Coverage Analysis**: Maps what current tools can handle vs manual setup requirements
154
- - **Risk Assessment**: Evaluates complexity and safety of each configuration
155
- - **Environment Awareness**: Provides dev/test/prod specific guidance and warnings
156
-
157
- ### 🔧 Agent-Based MCP Integration
158
- - **Memory-Aware MCPs**: All 11 MCP servers now integrate with agent coordination
159
- - **Progress Reporting**: Real-time progress updates to Queen Agent
160
- - **No Mock Data**: All operations use real ServiceNow (removed all placeholders)
161
- - **Error Recovery**: Comprehensive fallback strategies with Queen intervention
162
-
163
- ### 🚀 Enhanced CLI Orchestration
164
- - **Queen Agent Prompts**: Swarm command generates comprehensive orchestration instructions
165
- - **Session Management**: Unique session IDs with progress tracking
166
- - **Status Monitoring**: `snow-flow swarm-status <sessionId>` for real-time monitoring
167
- - **Memory Coordination**: All agents communicate through shared SQLite memory
168
-
169
- ## 🤖 Agent Ecosystem
170
-
171
- ### 👑 Queen Agent (Master Coordinator)
172
- - **Objective Analysis**: Analyzes natural language objectives and determines complexity
173
- - **Agent Spawning**: Dynamically spawns required specialist agents based on requirements
174
- - **Progress Monitoring**: Real-time tracking of task completion and agent coordination
175
- - **Memory Management**: Stores patterns and learns from successful executions
176
- - **Error Recovery**: Makes strategic decisions when agents encounter problems
177
-
178
- ### 🎨 Widget Creator Agent
179
- - **HTML Templates**: Creates responsive ServiceNow Service Portal widgets
180
- - **Server Scripts**: Develops optimized server-side data processing logic
181
- - **CSS Styling**: Implements professional styling with Chart.js integration
182
- - **Deployment**: Uses `snow_deploy` MCP tools for direct ServiceNow deployment
183
-
184
- ### 🔄 Flow Builder Agent
185
- - **Flow Design**: Creates Flow Designer workflows with intelligent structure
186
- - **Trigger Configuration**: Sets up optimal triggers (record events, scheduled, manual)
187
- - **Approval Processes**: Implements complex approval hierarchies with escalation
188
- - **Integration**: Uses `snow_xml_flow_from_instruction` with auto-deployment for maximum reliability
189
-
190
- ### 📝 Script Writer Agent
191
- - **Business Rules**: Creates optimized business logic with performance considerations
192
- - **Script Includes**: Develops reusable server-side utilities with proper class structure
193
- - **Client Scripts**: Implements UI behavior and validation logic
194
- - **Performance**: Automatic optimization recommendations and best practices
195
-
196
- ### 🛡️ Security Agent
197
- - **Vulnerability Scanning**: Scans for XSS, SQL injection, hardcoded credentials
198
- - **Access Control**: Validates permissions and role-based security
199
- - **Compliance**: Checks SOX, GDPR, HIPAA compliance requirements
200
- - **Remediation**: Generates actionable security improvement plans
201
-
202
- ### 🧪 Test Agent
203
- - **Test Scenarios**: Creates comprehensive test cases (positive, negative, edge cases)
204
- - **Mock Data**: Generates realistic test data for validation
205
- - **Performance Testing**: Validates response times and resource usage
206
- - **Integration Testing**: Tests cross-component interactions and workflows
207
-
208
- ## 💾 Memory System Architecture
209
-
210
- ### SQLite-Based Coordination
211
- ```sql
212
- -- Agent coordination and communication
213
- agent_coordination: Track agent status, progress, and assignments
214
- servicenow_artifacts: Store created widgets, flows, scripts with full metadata
215
- agent_messages: Inter-agent communication and handoff coordination
216
- shared_context: Session-wide shared data and configuration
217
- deployment_history: Complete audit trail of all ServiceNow operations
218
- agent_dependencies: Manage complex task dependencies and ordering
219
- performance_metrics: Real-time performance tracking and optimization
60
+ ### Table Discovery
61
+ ```bash
62
+ # Analyze ServiceNow table structures
63
+ snow-flow swarm "analyze incident table fields and relationships"
220
64
  ```
221
65
 
222
- ### Memory Usage Patterns
223
- ```javascript
224
- // Agents store context for coordination
225
- Memory.store("widget_requirements", {
226
- type: "incident_dashboard",
227
- charts: ["pie", "bar", "timeline"],
228
- responsive: true
229
- });
230
-
231
- // Other agents read and build upon context
232
- const requirements = Memory.get("widget_requirements");
233
- // Agent creates widget based on shared requirements
66
+ ### Multi-Agent Coordination
67
+ ```bash
68
+ # Coordinate multiple development tasks
69
+ snow-flow swarm "analyze requirements and create widget prototypes"
234
70
  ```
235
71
 
236
- ## 🚀 Quick Start
237
-
238
- ### Prerequisites
239
- - Node.js 18+ and npm
240
- - ServiceNow instance with admin access
241
- - OAuth application configured in ServiceNow
242
-
243
- ### Installation & Setup
72
+ ## 🛠️ Installation
244
73
 
245
74
  ```bash
246
- # Install Snow-Flow globally
75
+ # Install globally
247
76
  npm install -g snow-flow
248
77
 
249
- # Initialize with complete hive-mind environment
250
- snow-flow init --sparc
251
-
252
- # Configure ServiceNow credentials (.env file)
253
- SNOW_INSTANCE=dev123456
254
- SNOW_CLIENT_ID=your_oauth_client_id
255
- SNOW_CLIENT_SECRET=your_oauth_client_secret
256
- SNOW_USERNAME=admin
257
- SNOW_PASSWORD=admin_password
78
+ # Verify installation
79
+ snow-flow --version
258
80
 
259
81
  # Authenticate with ServiceNow
260
82
  snow-flow auth login
261
-
262
- # 🎉 Experience the hive-mind intelligence with Gap Analysis!
263
- snow-flow swarm "Create incident management dashboard with real-time charts"
264
-
265
- # 🧠 NEW: Advanced example showing Gap Analysis Engine
266
- snow-flow queen "create ITSM solution with LDAP authentication and custom approval workflows"
267
-
268
- # 🚀 NEW: Fully automated Flow Designer deployment (v1.3.17!)
269
- snow-flow swarm "create approval workflow for equipment requests"
270
- # ✅ Above command automatically deploys flow to ServiceNow! Zero manual steps.
271
83
  ```
272
84
 
273
- ### 🧠 What You'll See with Gap Analysis Engine
85
+ ## 📖 Core Commands
274
86
 
87
+ ### Authentication
275
88
  ```bash
276
- snow-flow queen "create incident management with LDAP authentication"
277
-
278
- 🧠 Step 4: Running Intelligent Gap Analysis...
279
- 📊 Gap Analysis Complete:
280
- • Total Requirements: 12
281
- • MCP Coverage: 67%
282
- • Automated: 6 configurations
283
- • Manual Work: 4 items
284
-
285
- ✅ Automatically Configured:
286
- • System property: glide.ui.incident_management created
287
- • Navigation module: Incident Management added to Service Desk
288
- • Email template: incident_notification configured
289
- • Database index: incident.priority_state for performance
290
- • Form layout: incident form sections optimized
291
- • UI action: "Escalate Priority" button added
292
-
293
- 📋 Manual Configuration Required:
294
- • LDAP authentication setup (high-risk operation)
295
- • SSO configuration with Active Directory
296
- • Custom ACL rules for incident priority restrictions
297
- • Email server configuration for notifications
298
-
299
- 📚 Detailed Manual Guides Available:
300
- 📖 Configure LDAP Authentication - 25 minutes
301
- Risk: high | Roles: security_admin, admin
302
- 📖 Setup SSO with Active Directory - 45 minutes
303
- Risk: high | Roles: security_admin
304
- 📖 Create Custom ACL Rules - 15 minutes
305
- Risk: medium | Roles: admin
306
- 📖 Configure Email Server - 20 minutes
307
- Risk: low | Roles: email_admin
308
-
309
- 💡 Recommendations:
310
- • Test LDAP configuration in development environment first
311
- • Coordinate with security team for SSO setup
312
- • Review ACL rules with business stakeholders
89
+ snow-flow auth login # Login to ServiceNow
90
+ snow-flow auth status # Check authentication status
313
91
  ```
314
92
 
315
- ## 🎯 Core Commands
316
-
317
- ### 🧠 Hive-Mind Orchestration
93
+ ### Widget Development
318
94
  ```bash
319
- # Primary command - spawns Queen Agent with specialist workers
320
- snow-flow swarm "objective"
321
-
322
- # Monitor swarm progress
323
- snow-flow swarm-status <sessionId>
324
-
325
- # System status and health
326
- snow-flow status
95
+ snow-flow swarm "create widget..." # Create ServiceNow widgets
96
+ ```
327
97
 
328
- # Memory management
329
- snow-flow memory stats
330
- snow-flow memory export <file>
98
+ ### Update Sets
99
+ ```bash
100
+ snow-flow update-set create <name> # Create new update set
101
+ snow-flow update-set list # List update sets
102
+ snow-flow update-set switch <id> # Switch to update set
331
103
  ```
332
104
 
333
- ### 🚀 NEW: Fully Automated Flow Deployment (v1.3.17!)
105
+ ### Discovery & Analysis
334
106
  ```bash
335
- # Single command creates AND deploys flows automatically!
336
- snow-flow swarm "create approval workflow for equipment requests"
337
-
338
- # What happens automatically:
339
- # 1. ✅ Detects Flow Designer task
340
- # 2. ✅ Generates production-ready XML
341
- # 3. ✅ Imports to ServiceNow as remote update set
342
- # 4. ✅ Previews for conflicts
343
- # 5. ✅ Auto-commits if clean
344
- # 6. ✅ Reports deployment status
345
-
346
- # Manual deployment (fallback only): snow-flow deploy-xml filename.xml
107
+ snow-flow swarm "analyze table..." # Analyze ServiceNow tables
108
+ snow-flow swarm "discover fields..." # Field discovery
347
109
  ```
348
110
 
349
- ### 🚀 Intelligent Features (Enabled by Default)
350
- - **🧠 Gap Analysis Engine**: Automatically detects ALL ServiceNow configurations beyond MCP tools
351
- - **🤖 Auto-Resolution**: Attempts automatic configuration of system properties, navigation, auth
352
- - **📚 Manual Guides**: Generates detailed step-by-step instructions for complex setups
353
- - **🚀 XML Auto-Deployment**: Complete XML update set import workflow with safety controls
354
- - **Smart Discovery**: Automatically discovers and reuses existing artifacts
355
- - **Live Testing**: Real-time testing during development on your ServiceNow instance
356
- - **Auto Deploy**: Automatic deployment when ready (safe with update sets)
357
- - **Auto Rollback**: Automatic rollback on failures with backup restoration
358
- - **Shared Memory**: All agents share context and coordination state
359
- - **Progress Monitoring**: Real-time progress tracking and status updates
360
-
361
- ### 🎛️ Advanced Options
111
+ ### Memory Management
362
112
  ```bash
363
- # Enable automatic permission escalation for enterprise features
364
- snow-flow swarm "create global workflow" --auto-permissions
365
-
366
- # Disable specific features when needed
367
- snow-flow swarm "test widget locally" --no-auto-deploy --no-live-testing
368
-
369
- # Maximum control
370
- snow-flow swarm "complex integration" \
371
- --max-agents 8 \
372
- --strategy development \
373
- --mode distributed \
374
- --parallel \
375
- --auto-permissions
113
+ snow-flow memory store <key> <data> # Store persistent data
114
+ snow-flow memory get <key> # Retrieve data
115
+ snow-flow memory list # List all keys
376
116
  ```
377
117
 
378
- ## 🔧 Configuration
118
+ ## 🏗️ Architecture
379
119
 
380
- ### ServiceNow Connection
381
- Create `.env` file in your project:
382
- ```env
383
- SNOW_INSTANCE=dev123456
384
- SNOW_CLIENT_ID=your_oauth_client_id
385
- SNOW_CLIENT_SECRET=your_oauth_client_secret
386
- SNOW_USERNAME=admin
387
- SNOW_PASSWORD=admin_password
388
- ```
120
+ ### Agent Types
121
+ - **Queen Agent**: Master coordinator and decision maker
122
+ - **Widget Creator**: ServiceNow widget specialist
123
+ - **Script Writer**: Business rules and client scripts
124
+ - **Security Agent**: Access controls and security policies
125
+ - **Test Agent**: Automated testing and validation
389
126
 
390
- ### OAuth Setup in ServiceNow
391
- 1. Navigate to System OAuth > Application Registry
392
- 2. Create new OAuth application
393
- 3. Set redirect URI to `http://localhost:3000/oauth/callback`
394
- 4. Note the Client ID and Client Secret
395
- 5. Grant necessary scopes for your development needs
127
+ ### Memory System
128
+ - **SQLite Backend**: Persistent cross-session memory
129
+ - **Hierarchical Storage**: Organized by domain and context
130
+ - **Agent Coordination**: Shared knowledge between agents
396
131
 
397
- ## 🎯 Usage Examples
132
+ ### ServiceNow Integration
133
+ - **OAuth 2.0**: Secure authentication
134
+ - **REST APIs**: Direct ServiceNow integration
135
+ - **Update Sets**: Change tracking and deployment
136
+ - **Table API**: Schema discovery and analysis
398
137
 
399
- ### Widget Development
400
- ```bash
401
- # Complete widget with intelligent agent coordination
402
- snow-flow swarm "Create incident dashboard widget with pie charts and filter options"
403
-
404
- # The Queen Agent will:
405
- # 1. Analyze objective and spawn Widget Creator + Test Agent
406
- # 2. Widget Creator builds responsive HTML/CSS/JS with Chart.js
407
- # 3. Test Agent creates comprehensive test scenarios
408
- # 4. Automatic deployment to ServiceNow with Update Set tracking
409
- ```
138
+ ## 🔧 Configuration
410
139
 
411
- ### Flow Creation & XML Deployment
140
+ ### Environment Setup
412
141
  ```bash
413
- # Complex approval workflow with automatic XML generation
414
- snow-flow swarm "Build approval flow for equipment requests with manager and finance approval"
415
-
416
- # The Queen Agent will:
417
- # 1. Spawn Flow Builder + Security Agent
418
- # 2. Flow Builder designs multi-step approval process
419
- # 3. Security Agent validates permissions and compliance
420
- # 4. Automatic XML generation AND deployment to ServiceNow
421
- # 5. Flow ready in Flow Designer - zero manual steps!
422
-
423
- # 🚀 NEW: Fully automated - no separate deployment command needed!
424
-
425
- # ✅ Automatic process:
426
- # • Import XML to ServiceNow
427
- # • Load remote update set
428
- # • Preview changes & check for conflicts
429
- # • Commit automatically if clean (or prompt if issues found)
142
+ # Create configuration
143
+ snow-flow config init
144
+
145
+ # Set ServiceNow instance
146
+ snow-flow config set instance your-instance.service-now.com
147
+
148
+ # Configure OAuth
149
+ snow-flow config set oauth true
430
150
  ```
431
151
 
432
- ### Complete Solutions
152
+ ### MCP Integration
153
+ Snow-Flow includes Model Context Protocol (MCP) servers for extended functionality:
154
+
433
155
  ```bash
434
- # End-to-end solution development
435
- snow-flow swarm "Create complete ITSM incident management solution with dashboards, automation, and reporting"
436
-
437
- # The Queen Agent will:
438
- # 1. Analyze complexity and spawn all required agents
439
- # 2. Coordinate parallel development of multiple components
440
- # 3. Ensure integration between widgets, flows, and scripts
441
- # 4. Comprehensive testing and phased deployment
156
+ # Start MCP services
157
+ snow-flow mcp start
158
+
159
+ # Check MCP status
160
+ snow-flow mcp status
442
161
  ```
443
162
 
444
- ## 🏗️ Architecture
163
+ ## 🧪 Development Workflows
445
164
 
446
- ### Hive-Mind Coordination Flow
447
- 1. **CLI Analysis**: User runs `snow-flow swarm "objective"`
448
- 2. **Queen Activation**: Queen Agent analyzes objective and determines requirements
449
- 3. **Agent Spawning**: Queen spawns specialist agents based on complexity assessment
450
- 4. **Memory Initialization**: SQLite memory system activated for coordination
451
- 5. **Parallel Execution**: Agents work independently while sharing context through memory
452
- 6. **Progress Monitoring**: Real-time status updates via shared memory state
453
- 7. **ServiceNow Integration**: Agents use 11 specialized MCP servers for operations
454
- 8. **Completion**: Final artifacts delivered with comprehensive audit trail
455
-
456
- ### Memory-Driven Coordination
457
- ```
458
- ┌─────────────────────────────────────────────────────────────────┐
459
- │ Snow-Flow Hive-Mind System │
460
- ├─────────────────────────────────────────────────────────────────┤
461
- │ │
462
- │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
463
- │ │ Claude Code │◄──►│ Snow-Flow CLI │◄──►│ ServiceNow │ │
464
- │ │ Interface │ │ Orchestrator │ │ Instance │ │
465
- │ └─────────────────┘ └─────────────────┘ └─────────────┘ │
466
- │ │ │ │ │
467
- │ ▼ ▼ ▼ │
468
- │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────┐ │
469
- │ │ Swarm Memory │◄──►│ Queen Agent │◄──►│ MCP Tools │ │
470
- │ │ (SQLite) │ │ Coordinator │ │ (11 MCPs) │ │
471
- │ └─────────────────┘ └─────────────────┘ └─────────────┘ │
472
- │ │ │ │
473
- │ ▼ ▼ │
474
- │ ┌─────────────────────────────────────────────────────────────┤
475
- │ │ ServiceNow Specialist Agents │
476
- │ │ │
477
- │ │ Widget Creator │ Flow Builder │ Script Writer │ │
478
- │ │ Security Agent │ Test Agent │ [Future Agents] │ │
479
- │ └─────────────────────────────────────────────────────────────┘
480
- │ │
481
- └─────────────────────────────────────────────────────────────────┘
482
- ```
165
+ ### Widget Development Workflow
166
+ ```bash
167
+ # 1. Plan widget requirements
168
+ snow-flow memory store widget_plan "Dashboard requirements and specs"
483
169
 
484
- ## 🔧 Development
170
+ # 2. Create widget with swarm
171
+ snow-flow swarm "create incident dashboard widget with charts and filtering"
485
172
 
486
- ### Project Structure
487
- ```
488
- snow-flow/
489
- ├── src/
490
- │ ├── agents/ # Queen Agent and specialist agents
491
- │ ├── memory/ # SQLite-based coordination system
492
- │ ├── mcp/ # 11 ServiceNow MCP servers
493
- │ ├── cli/ # Enhanced CLI with Queen orchestration
494
- │ ├── config/ # Configuration management
495
- │ ├── health/ # System health monitoring
496
- │ └── monitoring/ # Performance tracking
497
- ├── SNOW_FLOW_ARCHITECTURE.md # Complete system architecture
498
- ├── MCP_ARCHITECTURE.md # Agent-specific MCP design
499
- └── CLAUDE.md # Development configuration
173
+ # 3. Test and refine
174
+ snow-flow swarm "test widget functionality and improve performance"
500
175
  ```
501
176
 
502
- ### Build and Test
177
+ ### Analysis Workflow
503
178
  ```bash
504
- # Build the project
505
- npm run build
179
+ # 1. Discover table structure
180
+ snow-flow swarm "analyze incident table fields and relationships"
506
181
 
507
- # Run tests
508
- npm run test
182
+ # 2. Plan improvements
183
+ snow-flow memory store analysis_results "Field analysis and recommendations"
509
184
 
510
- # Type checking
511
- npm run typecheck
185
+ # 3. Document findings
186
+ snow-flow swarm "create documentation for table analysis"
187
+ ```
512
188
 
513
- # Memory system test
514
- npm run test:memory
189
+ ## 📚 Documentation
515
190
 
516
- # MCP integration test
517
- npm run test:mcp-integration
518
- ```
191
+ - **Authentication**: Setup OAuth and basic auth
192
+ - **Widget Development**: Create and deploy ServiceNow widgets
193
+ - **Update Sets**: Manage change tracking
194
+ - **Memory System**: Cross-agent coordination
195
+ - **MCP Integration**: Extended functionality
519
196
 
520
197
  ## 🤝 Contributing
521
198
 
522
- We welcome contributions to the Snow-Flow hive-mind ecosystem! Please read our contributing guidelines and submit PRs for new agents, MCP enhancements, or architecture improvements.
199
+ Snow-Flow is open source. Contributions welcome!
523
200
 
524
- ### Priority Areas
525
- - Additional specialist agents (Integration, Reporting, etc.)
526
- - Enhanced memory patterns and learning algorithms
527
- - Advanced Queen Agent decision-making capabilities
528
- - ServiceNow-specific optimizations and best practices
201
+ ```bash
202
+ # Clone repository
203
+ git clone https://github.com/groeimetai/snow-flow.git
204
+
205
+ # Install dependencies
206
+ npm install
529
207
 
530
- ## 📝 License
208
+ # Build project
209
+ npm run build
210
+
211
+ # Run tests
212
+ npm test
213
+ ```
214
+
215
+ ## 📄 License
531
216
 
532
217
  MIT License - see LICENSE file for details.
533
218
 
534
- ## 🚀 Future Vision
219
+ ## 🆘 Support
220
+
221
+ - **GitHub Issues**: https://github.com/groeimetai/snow-flow/issues
222
+ - **Documentation**: See /docs directory in repository
223
+ - **Examples**: See /examples directory
224
+
225
+ ## 🔮 Roadmap
535
226
 
536
- Snow-Flow will become the **definitive AI-driven ServiceNow development platform**, where developers describe any ServiceNow objective in natural language and watch intelligent agents collaborate to build, test, and deploy professional solutions automatically.
227
+ ### Planned Enhancements
228
+ - Enhanced widget templates and patterns
229
+ - Advanced ServiceNow API integrations
230
+ - Extended table analysis capabilities
231
+ - Improved multi-agent coordination
232
+ - Enterprise security features
537
233
 
538
- **Core Promise**: "Describe what you want in ServiceNow, and our AI swarm will build it for you."
234
+ ### Flow Designer Notice
235
+ Flow creation functionality has been permanently removed. Users should use ServiceNow's native Flow Designer interface directly for flow development.
539
236
 
540
237
  ---
541
238
 
542
- *Experience the future of ServiceNow development with Snow-Flow's hive-mind intelligence.* 🧠✨
239
+ **Snow-Flow v1.4.0** - Focused, stable, reliable ServiceNow development automation.