snow-flow 1.1.65 → 1.1.67
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 +693 -0
- package/dist/cli.js +83 -3
- package/dist/cli.js.map +1 -1
- package/dist/mcp/servicenow-flow-composer-mcp.js +28 -28
- package/dist/mcp/servicenow-flow-composer-mcp.js.map +1 -1
- package/dist/version.d.ts +3 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +17 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/test-clean-install/CLAUDE.md +26 -0
- package/test-global-install/CLAUDE.md +26 -0
- package/test-global-install/test-global-install/CLAUDE.md +26 -0
- package/test-global-install/test-global-install/test-global-install/CLAUDE.md +26 -0
- package/test-init-debug/CLAUDE.md +693 -0
- package/test-init-real/CLAUDE.md +693 -0
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
# Snow-Flow Development with Claude Code
|
|
2
|
+
|
|
3
|
+
## 🚀 Core Development Principles
|
|
4
|
+
|
|
5
|
+
### Concurrent Execution Strategy
|
|
6
|
+
**Golden Rule**: "1 MESSAGE = ALL RELATED OPERATIONS"
|
|
7
|
+
- Always batch related MCP tool calls in a single response
|
|
8
|
+
- Use TodoWrite extensively for complex task coordination
|
|
9
|
+
- Launch multiple agents concurrently for maximum performance
|
|
10
|
+
- Leverage batch file operations whenever reading/writing multiple files
|
|
11
|
+
|
|
12
|
+
### ServiceNow Development Best Practices
|
|
13
|
+
1. **Never hardcode credentials** - Use OAuth and environment variables
|
|
14
|
+
2. **Always work in Update Sets** - MANDATORY SEQUENCE:
|
|
15
|
+
a. FIRST: Create update set with `snow_update_set_create`
|
|
16
|
+
b. THEN: Switch to it with `snow_update_set_switch`
|
|
17
|
+
c. TRACK: Every artifact with `snow_update_set_add_artifact`
|
|
18
|
+
d. CHECK: Current status with `snow_update_set_current`
|
|
19
|
+
e. COMPLETE: Mark complete with `snow_update_set_complete`
|
|
20
|
+
3. **Test before deploy** - Use mock testing tools for validation
|
|
21
|
+
4. **Validate permissions** - Check OAuth scopes before operations
|
|
22
|
+
5. **Use fuzzy search** - ServiceNow names can vary (iPhone vs iPhone 6S)
|
|
23
|
+
6. **Track all artifacts** - Use snow_update_set_add_artifact after EVERY deployment
|
|
24
|
+
7. **Test with mock first** - Use snow_test_flow_with_mock before comprehensive testing
|
|
25
|
+
8. **Verify before test** - Check artifact exists with snow_get_by_sysid before testing
|
|
26
|
+
|
|
27
|
+
### Update Set Best Practices
|
|
28
|
+
- NEVER deploy without active update set
|
|
29
|
+
- ALWAYS track artifacts immediately after deployment
|
|
30
|
+
- CHECK current update set before starting work
|
|
31
|
+
- COMPLETE update sets before moving between environments
|
|
32
|
+
|
|
33
|
+
## 📋 Essential MCP Tool Patterns
|
|
34
|
+
|
|
35
|
+
### Batch Operations for Maximum Efficiency
|
|
36
|
+
```javascript
|
|
37
|
+
// GOOD: Single message with multiple tool calls
|
|
38
|
+
TodoWrite([...tasks]);
|
|
39
|
+
Task("Architect", "Design system architecture");
|
|
40
|
+
Task("Developer", "Implement components");
|
|
41
|
+
Task("Tester", "Create test scenarios");
|
|
42
|
+
|
|
43
|
+
// BAD: Sequential single operations
|
|
44
|
+
TodoWrite([task1]);
|
|
45
|
+
// wait for response
|
|
46
|
+
TodoWrite([task2]);
|
|
47
|
+
// wait for response
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Memory-Driven Coordination
|
|
51
|
+
Use Memory to coordinate information across agents:
|
|
52
|
+
```javascript
|
|
53
|
+
// Store architecture decisions
|
|
54
|
+
snow_memory_store({
|
|
55
|
+
key: "widget_architecture",
|
|
56
|
+
value: "Service Portal widget with Chart.js for data visualization"
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// All agents can reference this
|
|
60
|
+
Task("Frontend Dev", "Implement widget based on widget_architecture in memory");
|
|
61
|
+
Task("Backend Dev", "Create REST endpoints for widget_architecture requirements");
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Team-Driven Development Coordination
|
|
65
|
+
Use specialized teams for complex ServiceNow development:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Team with shared memory and quality gates
|
|
69
|
+
snow-flow sparc team widget "dashboard" --shared-memory --validation --monitor
|
|
70
|
+
|
|
71
|
+
# Store team requirements and coordination data
|
|
72
|
+
snow-flow memory store "team_requirements" "Dashboard with real-time KPIs and mobile responsiveness"
|
|
73
|
+
|
|
74
|
+
# All team specialists can access shared context
|
|
75
|
+
snow-flow memory get "team_requirements"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## 🛠️ Complete ServiceNow MCP Tools Reference
|
|
79
|
+
|
|
80
|
+
### Discovery & Search Tools
|
|
81
|
+
```javascript
|
|
82
|
+
// Find any ServiceNow artifact using natural language
|
|
83
|
+
snow_find_artifact({
|
|
84
|
+
query: "the widget that shows incidents on homepage",
|
|
85
|
+
type: "widget" // or "flow", "script", "application", "any"
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Search catalog items with fuzzy matching
|
|
89
|
+
snow_catalog_item_search({
|
|
90
|
+
query: "laptop",
|
|
91
|
+
fuzzy_match: true, // Finds variations: notebook, MacBook, etc.
|
|
92
|
+
category_filter: "hardware",
|
|
93
|
+
include_variables: true // Get catalog variables too
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Direct sys_id lookup (faster than search)
|
|
97
|
+
snow_get_by_sysid({
|
|
98
|
+
sys_id: "abc123...",
|
|
99
|
+
table: "sp_widget"
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Flow Development Tools
|
|
104
|
+
```javascript
|
|
105
|
+
// Create flows from natural language
|
|
106
|
+
snow_create_flow({
|
|
107
|
+
instruction: "create a flow that sends email when incident priority is high",
|
|
108
|
+
deploy_immediately: true,
|
|
109
|
+
enable_intelligent_analysis: true
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// Test flows with mock data
|
|
113
|
+
snow_test_flow_with_mock({
|
|
114
|
+
flow_id: "incident_notification_flow",
|
|
115
|
+
create_test_user: true,
|
|
116
|
+
mock_catalog_items: true,
|
|
117
|
+
test_inputs: {
|
|
118
|
+
priority: "1",
|
|
119
|
+
category: "hardware"
|
|
120
|
+
},
|
|
121
|
+
simulate_approvals: true
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Link catalog items to flows
|
|
125
|
+
snow_link_catalog_to_flow({
|
|
126
|
+
catalog_item_id: "New Laptop Request",
|
|
127
|
+
flow_id: "laptop_provisioning_flow",
|
|
128
|
+
link_type: "flow_catalog_process",
|
|
129
|
+
variable_mapping: [
|
|
130
|
+
{
|
|
131
|
+
catalog_variable: "laptop_model",
|
|
132
|
+
flow_input: "equipment_type"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Widget Development Tools
|
|
139
|
+
```javascript
|
|
140
|
+
// Deploy widgets with automatic validation
|
|
141
|
+
snow_deploy_widget({
|
|
142
|
+
name: "incident_dashboard",
|
|
143
|
+
title: "Incident Dashboard",
|
|
144
|
+
template: htmlContent,
|
|
145
|
+
css: cssContent,
|
|
146
|
+
client_script: clientJS,
|
|
147
|
+
server_script: serverJS,
|
|
148
|
+
demo_data: { incidents: [...] }
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// Preview and test widgets
|
|
152
|
+
snow_preview_widget({
|
|
153
|
+
widget_id: "incident_dashboard",
|
|
154
|
+
check_dependencies: true
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
snow_widget_test({
|
|
158
|
+
widget_id: "incident_dashboard",
|
|
159
|
+
test_scenarios: [
|
|
160
|
+
{
|
|
161
|
+
name: "Load with no data",
|
|
162
|
+
server_data: { incidents: [] }
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Bulk Operations
|
|
169
|
+
```javascript
|
|
170
|
+
// Deploy multiple artifacts at once
|
|
171
|
+
snow_bulk_deploy({
|
|
172
|
+
artifacts: [
|
|
173
|
+
{ type: "widget", data: widgetData },
|
|
174
|
+
{ type: "flow", data: flowData },
|
|
175
|
+
{ type: "script", data: scriptData }
|
|
176
|
+
],
|
|
177
|
+
transaction_mode: true, // All or nothing
|
|
178
|
+
parallel: true, // Deploy simultaneously
|
|
179
|
+
dry_run: false
|
|
180
|
+
});
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Intelligent Analysis
|
|
184
|
+
```javascript
|
|
185
|
+
// Analyze incidents with AI
|
|
186
|
+
snow_analyze_incident({
|
|
187
|
+
incident_id: "INC0010001",
|
|
188
|
+
include_similar: true,
|
|
189
|
+
suggest_resolution: true
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// Pattern analysis
|
|
193
|
+
snow_pattern_analysis({
|
|
194
|
+
analysis_type: "incident_patterns",
|
|
195
|
+
timeframe: "month"
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Flow Testing Guidelines
|
|
200
|
+
|
|
201
|
+
### Test Flow Hierarchy (use in this order):
|
|
202
|
+
1. **snow_test_flow_with_mock** - Always works, use for basic validation
|
|
203
|
+
2. **snow_get_by_sysid** - Verify flow exists before advanced testing
|
|
204
|
+
3. **snow_comprehensive_flow_test** - Only if above work (often 404)
|
|
205
|
+
|
|
206
|
+
### Flow Creation Best Practices
|
|
207
|
+
❌ NEVER use snow_deploy_flow with manual JSON
|
|
208
|
+
✅ ALWAYS use snow_create_flow with natural language
|
|
209
|
+
✅ OR use snow_flow_wizard for step-by-step
|
|
210
|
+
|
|
211
|
+
Example:
|
|
212
|
+
```javascript
|
|
213
|
+
// GOOD - Natural language
|
|
214
|
+
snow_create_flow({
|
|
215
|
+
instruction: "create approval flow for user provisioning",
|
|
216
|
+
deploy_immediately: true
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
// BAD - Manual JSON (vaak leeg resultaat!)
|
|
220
|
+
snow_deploy_flow({
|
|
221
|
+
flow_definition: {...} // Dit werkt vaak niet!
|
|
222
|
+
})
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## ⚡ Performance Optimization
|
|
226
|
+
|
|
227
|
+
### Parallel Execution Patterns
|
|
228
|
+
```javascript
|
|
229
|
+
// Execute multiple searches concurrently
|
|
230
|
+
Promise.all([
|
|
231
|
+
snow_find_artifact({ query: "incident widget" }),
|
|
232
|
+
snow_catalog_item_search({ query: "laptop" }),
|
|
233
|
+
snow_query_incidents({ query: "priority=1" })
|
|
234
|
+
]);
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Batch File Operations
|
|
238
|
+
```javascript
|
|
239
|
+
// Read multiple files in one operation
|
|
240
|
+
MultiRead([
|
|
241
|
+
"/path/to/widget.html",
|
|
242
|
+
"/path/to/widget.css",
|
|
243
|
+
"/path/to/widget.js"
|
|
244
|
+
]);
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## 📝 Workflow Guidelines
|
|
248
|
+
|
|
249
|
+
### Standard Development Flow
|
|
250
|
+
1. **Discovery Phase**: Use search tools to find existing artifacts
|
|
251
|
+
2. **Planning Phase**: Use TodoWrite to plan all tasks
|
|
252
|
+
3. **Development Phase**: Launch agents concurrently
|
|
253
|
+
4. **Testing Phase**: Use mock testing tools
|
|
254
|
+
5. **Deployment Phase**: Use bulk deploy with validation
|
|
255
|
+
|
|
256
|
+
### Error Recovery Patterns
|
|
257
|
+
```javascript
|
|
258
|
+
// Always implement rollback strategies
|
|
259
|
+
if (deployment.failed) {
|
|
260
|
+
snow_deployment_rollback_manager({
|
|
261
|
+
update_set_id: deployment.update_set,
|
|
262
|
+
restore_point: deployment.backup_id
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## 🔧 Advanced Configuration
|
|
268
|
+
|
|
269
|
+
## Build Commands
|
|
270
|
+
- `npm run build`: Build the project
|
|
271
|
+
- `npm run test`: Run the full test suite
|
|
272
|
+
- `npm run lint`: Run ESLint and format checks
|
|
273
|
+
- `npm run typecheck`: Run TypeScript type checking
|
|
274
|
+
|
|
275
|
+
## Snow-Flow Commands
|
|
276
|
+
- `snow-flow init --sparc`: Initialize project with SPARC environment
|
|
277
|
+
- `snow-flow auth login`: Authenticate with ServiceNow OAuth
|
|
278
|
+
- `snow-flow swarm "<objective>"`: Start multi-agent swarm - één command voor alles!
|
|
279
|
+
- `snow-flow sparc <mode> "<task>"`: Run specific SPARC mode
|
|
280
|
+
|
|
281
|
+
## Enhanced Swarm Command (v1.1.41+)
|
|
282
|
+
The swarm command now includes intelligent features that are **enabled by default**:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
# Simple usage - all intelligent features enabled!
|
|
286
|
+
snow-flow swarm "create incident management dashboard"
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Default Settings (no flags needed):
|
|
290
|
+
- ✅ `--smart-discovery` - Automatically discovers and reuses existing artifacts
|
|
291
|
+
- ✅ `--live-testing` - Tests in real-time on your ServiceNow instance
|
|
292
|
+
- ✅ `--auto-deploy` - Deploys automatically (safe with update sets)
|
|
293
|
+
- ✅ `--auto-rollback` - Automatically rollbacks on failures
|
|
294
|
+
- ✅ `--shared-memory` - All agents share context and coordination
|
|
295
|
+
- ✅ `--progress-monitoring` - Real-time progress tracking
|
|
296
|
+
- ❌ `--auto-permissions` - Disabled by default (enable with flag for automatic role elevation)
|
|
297
|
+
|
|
298
|
+
### Advanced Usage:
|
|
299
|
+
```bash
|
|
300
|
+
# Enable automatic permission escalation
|
|
301
|
+
snow-flow swarm "create global workflow" --auto-permissions
|
|
302
|
+
|
|
303
|
+
# Disable specific features
|
|
304
|
+
snow-flow swarm "test widget" --no-auto-deploy --no-live-testing
|
|
305
|
+
|
|
306
|
+
# Full control
|
|
307
|
+
snow-flow swarm "complex integration" \
|
|
308
|
+
--max-agents 8 \
|
|
309
|
+
--strategy development \
|
|
310
|
+
--mode distributed \
|
|
311
|
+
--parallel \
|
|
312
|
+
--auto-permissions
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## New MCP Tools (v1.1.44+)
|
|
316
|
+
|
|
317
|
+
### Catalog Item Search
|
|
318
|
+
Find catalog items with intelligent fuzzy matching:
|
|
319
|
+
```javascript
|
|
320
|
+
snow_catalog_item_search({
|
|
321
|
+
query: "iPhone", // Will find iPhone 6S, iPhone 7, etc.
|
|
322
|
+
fuzzy_match: true, // Enable intelligent variations
|
|
323
|
+
include_variables: true // Include catalog variables
|
|
324
|
+
})
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Flow Testing with Mock Data
|
|
328
|
+
Test flows without real data:
|
|
329
|
+
```javascript
|
|
330
|
+
snow_test_flow_with_mock({
|
|
331
|
+
flow_id: "equipment_provisioning_flow",
|
|
332
|
+
create_test_user: true, // Creates test user
|
|
333
|
+
mock_catalog_items: true, // Creates test catalog items
|
|
334
|
+
simulate_approvals: true, // Auto-approves during test
|
|
335
|
+
cleanup_after_test: true // Removes test data after
|
|
336
|
+
})
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Direct Catalog-Flow Linking
|
|
340
|
+
Link catalog items directly to flows:
|
|
341
|
+
```javascript
|
|
342
|
+
snow_link_catalog_to_flow({
|
|
343
|
+
catalog_item_id: "iPhone 6S",
|
|
344
|
+
flow_id: "mobile_provisioning_flow",
|
|
345
|
+
link_type: "flow_catalog_process", // Modern approach
|
|
346
|
+
variable_mapping: [
|
|
347
|
+
{
|
|
348
|
+
catalog_variable: "phone_model",
|
|
349
|
+
flow_input: "device_type"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
test_link: true // Creates test request
|
|
353
|
+
})
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### OAuth Configuration
|
|
357
|
+
```env
|
|
358
|
+
# .env file
|
|
359
|
+
SNOW_INSTANCE=dev123456
|
|
360
|
+
SNOW_CLIENT_ID=your_oauth_client_id
|
|
361
|
+
SNOW_CLIENT_SECRET=your_oauth_client_secret
|
|
362
|
+
SNOW_USERNAME=admin
|
|
363
|
+
SNOW_PASSWORD=admin_password
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Update Set Management
|
|
367
|
+
```javascript
|
|
368
|
+
// Smart update set creation
|
|
369
|
+
snow_smart_update_set({
|
|
370
|
+
name: "Auto-generated for widget development",
|
|
371
|
+
detect_context: true, // Auto-detects what you're working on
|
|
372
|
+
auto_switch: true // Switches when context changes
|
|
373
|
+
});
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## 🚀 NEW: Team-Based Agent Architecture (v1.1.62+)
|
|
377
|
+
|
|
378
|
+
### Specialized Development Teams
|
|
379
|
+
|
|
380
|
+
Snow-Flow now uses specialized teams that mirror real software development teams, replacing monolithic agents with expert specialists:
|
|
381
|
+
|
|
382
|
+
#### **Widget Development Team**
|
|
383
|
+
```bash
|
|
384
|
+
# Complete widget development with specialized roles
|
|
385
|
+
snow-flow sparc team widget "create incident dashboard with charts and filters"
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Team Composition:**
|
|
389
|
+
- 🎨 **Frontend Developer**: HTML templates, CSS styling, responsive design
|
|
390
|
+
- ⚙️ **Backend Developer**: Server scripts, API calls, data processing
|
|
391
|
+
- 🖼️ **UI/UX Designer**: User experience, design patterns, accessibility
|
|
392
|
+
- 🔧 **ServiceNow Specialist**: Platform integration, best practices
|
|
393
|
+
- 🧪 **QA Tester**: Widget testing, validation, edge cases
|
|
394
|
+
|
|
395
|
+
#### **Flow Development Team**
|
|
396
|
+
```bash
|
|
397
|
+
# Complete flow development with process experts
|
|
398
|
+
snow-flow sparc team flow "build approval process for equipment requests"
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Team Composition:**
|
|
402
|
+
- 🔄 **Process Designer**: Business logic, workflow design
|
|
403
|
+
- 🎯 **Trigger Specialist**: Event handling, conditions, automation
|
|
404
|
+
- 📊 **Data Specialist**: Variables, transformations, integrations
|
|
405
|
+
- 🔗 **Integration Expert**: APIs, external systems, data sync
|
|
406
|
+
- 🛡️ **Security Reviewer**: Permissions, validation, compliance
|
|
407
|
+
|
|
408
|
+
#### **Application Development Team**
|
|
409
|
+
```bash
|
|
410
|
+
# Complete application development with enterprise specialists
|
|
411
|
+
snow-flow sparc team app "create complete ITSM solution with custom tables"
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
**Team Composition:**
|
|
415
|
+
- 🏗️ **Database Designer**: Tables, relationships, indexes, performance
|
|
416
|
+
- 🎯 **Business Logic Developer**: Rules, scripts, calculations
|
|
417
|
+
- 🎨 **Interface Designer**: Forms, lists, UI components
|
|
418
|
+
- 🔐 **Security Engineer**: ACLs, roles, access control
|
|
419
|
+
- 📈 **Performance Optimizer**: Queries, caching, efficiency
|
|
420
|
+
|
|
421
|
+
#### **Adaptive Team (Generic Scenario)**
|
|
422
|
+
```bash
|
|
423
|
+
# For unknown/custom tasks - dynamically assembled specialists
|
|
424
|
+
snow-flow sparc team adaptive "create integration between ServiceNow and external API"
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**Dynamic Assembly:**
|
|
428
|
+
- 🤖 **Task Analyzer**: Understands requirements and assembles optimal team
|
|
429
|
+
- 🔧 **Specialist Pool**: Data, Integration, Automation, Security, Reporting specialists
|
|
430
|
+
- 📋 **Coordination Patterns**: Sequential, parallel, or hybrid execution
|
|
431
|
+
- 🎯 **Quality Gates**: Validation checkpoints between specialist handoffs
|
|
432
|
+
|
|
433
|
+
### Team Coordination Features
|
|
434
|
+
|
|
435
|
+
#### **Shared Memory System**
|
|
436
|
+
Teams share context and communicate through intelligent memory:
|
|
437
|
+
```bash
|
|
438
|
+
# Enable shared memory (default: true)
|
|
439
|
+
snow-flow sparc team widget "dashboard" --shared-memory
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
- **Context Sharing**: All specialists access shared requirements and progress
|
|
443
|
+
- **Version Control**: Track changes and enable rollback if needed
|
|
444
|
+
- **Real-time Updates**: Specialists notified when dependencies complete
|
|
445
|
+
|
|
446
|
+
#### **Quality Gates**
|
|
447
|
+
Automated validation between specialist handoffs:
|
|
448
|
+
```bash
|
|
449
|
+
# Enable validation gates (recommended)
|
|
450
|
+
snow-flow sparc team flow "approval" --validation
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
**Quality Gate Types:**
|
|
454
|
+
- **Code Quality**: Syntax, standards, best practices
|
|
455
|
+
- **Security Review**: Vulnerability scanning, access controls
|
|
456
|
+
- **Performance Check**: Query optimization, response times
|
|
457
|
+
- **Accessibility**: WCAG compliance, usability testing
|
|
458
|
+
|
|
459
|
+
#### **Execution Patterns**
|
|
460
|
+
Teams automatically select optimal coordination:
|
|
461
|
+
|
|
462
|
+
**Sequential Pattern** (Dependencies):
|
|
463
|
+
```
|
|
464
|
+
Architecture → Database → Business Logic → Interface → Testing
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Parallel Pattern** (Independent work):
|
|
468
|
+
```
|
|
469
|
+
Frontend ⟷ Backend ⟷ Security ⟷ Testing (simultaneously)
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**Hybrid Pattern** (Optimized):
|
|
473
|
+
```
|
|
474
|
+
Phase 1: Architecture (sequential)
|
|
475
|
+
Phase 2: Frontend + Backend + Security (parallel)
|
|
476
|
+
Phase 3: Integration + Testing (sequential)
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### Individual Specialist Modes
|
|
480
|
+
|
|
481
|
+
Access specific specialists directly for focused tasks:
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
# Frontend specialist
|
|
485
|
+
snow-flow sparc frontend "optimize widget responsiveness for mobile"
|
|
486
|
+
|
|
487
|
+
# Backend specialist
|
|
488
|
+
snow-flow sparc backend "optimize database queries for performance"
|
|
489
|
+
|
|
490
|
+
# Security specialist
|
|
491
|
+
snow-flow sparc security "review application access controls"
|
|
492
|
+
|
|
493
|
+
# Data specialist
|
|
494
|
+
snow-flow sparc data "design table relationships for ITSM"
|
|
495
|
+
|
|
496
|
+
# Integration specialist
|
|
497
|
+
snow-flow sparc integration "create REST API for external system"
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Team Command Options
|
|
501
|
+
|
|
502
|
+
```bash
|
|
503
|
+
# Basic team execution
|
|
504
|
+
snow-flow sparc team widget "create dashboard"
|
|
505
|
+
|
|
506
|
+
# Advanced coordination options
|
|
507
|
+
snow-flow sparc team widget "dashboard" \
|
|
508
|
+
--parallel \ # Enable parallel execution
|
|
509
|
+
--monitor \ # Real-time progress monitoring
|
|
510
|
+
--shared-memory \ # Enable context sharing (default: true)
|
|
511
|
+
--validation \ # Enable quality gates (recommended)
|
|
512
|
+
--dry-run # Preview team assembly and plan
|
|
513
|
+
|
|
514
|
+
# Specialist-specific options
|
|
515
|
+
snow-flow sparc frontend "template" \
|
|
516
|
+
--responsive \ # Focus on mobile responsiveness
|
|
517
|
+
--accessibility # WCAG compliance focus
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Team vs Individual Agent Comparison
|
|
521
|
+
|
|
522
|
+
| Scenario | Old Approach | New Team Approach |
|
|
523
|
+
|----------|-------------|-------------------|
|
|
524
|
+
| **Widget Creation** | Single agent does everything | Frontend + Backend + UI/UX + Platform specialists |
|
|
525
|
+
| **Flow Development** | Flow agent handles all aspects | Process + Trigger + Data + Security specialists |
|
|
526
|
+
| **Complex Integration** | Generic coder attempts everything | Adaptive team assembles: Integration + Data + Security + Testing |
|
|
527
|
+
| **Quality Assurance** | No systematic validation | Quality gates between each specialist handoff |
|
|
528
|
+
| **Knowledge Sharing** | Isolated agent knowledge | Shared memory with version control |
|
|
529
|
+
|
|
530
|
+
### Best Practices for Team Usage
|
|
531
|
+
|
|
532
|
+
#### **When to Use Teams vs Individual Agents**
|
|
533
|
+
|
|
534
|
+
**✅ Use Teams For:**
|
|
535
|
+
- Complete widget/flow/application development
|
|
536
|
+
- Complex multi-component tasks
|
|
537
|
+
- Production-quality deliverables
|
|
538
|
+
- When you need multiple expertise areas
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
# Good: Complete solution
|
|
542
|
+
snow-flow sparc team widget "create executive dashboard with KPIs"
|
|
543
|
+
|
|
544
|
+
# Good: Complex process
|
|
545
|
+
snow-flow sparc team flow "multi-step approval with integrations"
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
**✅ Use Individual Specialists For:**
|
|
549
|
+
- Focused single-component tasks
|
|
550
|
+
- Quick fixes or optimizations
|
|
551
|
+
- Specific expertise needed
|
|
552
|
+
- Learning/exploration
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
# Good: Focused task
|
|
556
|
+
snow-flow sparc frontend "fix mobile responsiveness issue"
|
|
557
|
+
|
|
558
|
+
# Good: Specific expertise
|
|
559
|
+
snow-flow sparc security "review permissions for table X"
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
#### **Team Coordination Guidelines**
|
|
563
|
+
|
|
564
|
+
1. **Let the Architect Lead**: Team coordinators (architects) analyze requirements and manage specialists
|
|
565
|
+
2. **Enable Shared Memory**: Always use `--shared-memory` for complex tasks
|
|
566
|
+
3. **Use Quality Gates**: Enable `--validation` for production deployments
|
|
567
|
+
4. **Monitor Progress**: Use `--monitor` for long-running team tasks
|
|
568
|
+
5. **Dry Run First**: Use `--dry-run` to preview team assembly for complex tasks
|
|
569
|
+
|
|
570
|
+
#### **Error Handling and Recovery**
|
|
571
|
+
|
|
572
|
+
Teams include automatic error recovery:
|
|
573
|
+
- **Quality Gate Failures**: Automatic retry with specialist feedback
|
|
574
|
+
- **Specialist Errors**: Fallback to alternative approaches
|
|
575
|
+
- **Dependency Issues**: Intelligent rescheduling and re-coordination
|
|
576
|
+
- **Shared Memory Conflicts**: Version control and conflict resolution
|
|
577
|
+
|
|
578
|
+
### Migration from Old Agent System
|
|
579
|
+
|
|
580
|
+
**Old Command → New Team Command:**
|
|
581
|
+
```bash
|
|
582
|
+
# Old: Monolithic approach
|
|
583
|
+
snow-flow sparc coder "create widget"
|
|
584
|
+
# New: Specialized team
|
|
585
|
+
snow-flow sparc team widget "create widget"
|
|
586
|
+
|
|
587
|
+
# Old: Generic development
|
|
588
|
+
snow-flow sparc designer "create flow"
|
|
589
|
+
# New: Process-focused team
|
|
590
|
+
snow-flow sparc team flow "create flow"
|
|
591
|
+
|
|
592
|
+
# Old: Single agent application
|
|
593
|
+
snow-flow sparc architect "design app"
|
|
594
|
+
# New: Full development team
|
|
595
|
+
snow-flow sparc team app "design app"
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
**Backward Compatibility:**
|
|
599
|
+
- All existing individual SPARC modes still work
|
|
600
|
+
- Old commands automatically suggest team alternatives
|
|
601
|
+
- Gradual migration path available
|
|
602
|
+
|
|
603
|
+
## 🎯 Quick Start Workflows
|
|
604
|
+
|
|
605
|
+
### 🚀 Team-Based Development (v1.1.62+)
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
# Widget Development Team
|
|
609
|
+
snow-flow sparc team widget "create incident dashboard"
|
|
610
|
+
|
|
611
|
+
# Flow Development Team
|
|
612
|
+
snow-flow sparc team flow "build approval workflow"
|
|
613
|
+
|
|
614
|
+
# Application Development Team
|
|
615
|
+
snow-flow sparc team app "create ITSM solution"
|
|
616
|
+
|
|
617
|
+
# Adaptive Team (for custom/unknown tasks)
|
|
618
|
+
snow-flow sparc team adaptive "create complex integration"
|
|
619
|
+
|
|
620
|
+
# Individual Specialists
|
|
621
|
+
snow-flow sparc frontend "mobile responsiveness"
|
|
622
|
+
snow-flow sparc backend "API optimization"
|
|
623
|
+
snow-flow sparc security "access control review"
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### 🎯 Quick Start
|
|
627
|
+
1. `snow-flow init --sparc` - Initialize project with SPARC environment
|
|
628
|
+
2. Configure ServiceNow credentials in .env file
|
|
629
|
+
3. `snow-flow auth login` - Authenticate with ServiceNow OAuth
|
|
630
|
+
4. `snow-flow swarm "create a widget for incident management"` - Everything automatic!
|
|
631
|
+
5. `snow-flow sparc team widget "create dashboard"` - NEW: Use specialized teams!
|
|
632
|
+
|
|
633
|
+
## 💡 Important Notes
|
|
634
|
+
|
|
635
|
+
### Do's
|
|
636
|
+
- ✅ Use TodoWrite extensively for task tracking
|
|
637
|
+
- ✅ Batch MCP tool calls for performance
|
|
638
|
+
- ✅ Store important data in Memory for coordination
|
|
639
|
+
- ✅ Test with mock data before deploying
|
|
640
|
+
- ✅ Work within Update Sets for safety
|
|
641
|
+
- ✅ Use fuzzy search for finding artifacts
|
|
642
|
+
- ✅ Write out code thats important for the whole objective to work
|
|
643
|
+
|
|
644
|
+
### Don'ts
|
|
645
|
+
- ❌ Don't make sequential tool calls when batch is possible
|
|
646
|
+
- ❌ Don't hardcode credentials or sys_ids
|
|
647
|
+
- ❌ Don't deploy without testing
|
|
648
|
+
- ❌ Don't ignore OAuth permission errors
|
|
649
|
+
- ❌ Don't create artifacts without checking if they exist
|
|
650
|
+
- ❌ Don't use mock data or placeholder code
|
|
651
|
+
|
|
652
|
+
## 🚀 Performance Benchmarks
|
|
653
|
+
|
|
654
|
+
With concurrent execution and batch operations:
|
|
655
|
+
- **Widget Development**: 3x faster than sequential
|
|
656
|
+
- **Flow Creation**: 2.5x faster with parallel validation
|
|
657
|
+
- **Bulk Deployment**: Up to 5x faster with parallel mode
|
|
658
|
+
- **Search Operations**: 4x faster with concurrent queries
|
|
659
|
+
|
|
660
|
+
## 📚 Additional Resources
|
|
661
|
+
|
|
662
|
+
### MCP Server Documentation
|
|
663
|
+
- **servicenow-deployment**: Widget, flow, and application deployment
|
|
664
|
+
- **servicenow-intelligent**: Smart search and artifact discovery
|
|
665
|
+
- **servicenow-operations**: Incident management and catalog operations
|
|
666
|
+
- **servicenow-flow-composer**: Natural language flow creation
|
|
667
|
+
- **servicenow-platform-development**: Scripts, rules, and policies
|
|
668
|
+
|
|
669
|
+
### SPARC Modes
|
|
670
|
+
|
|
671
|
+
#### **Individual SPARC Modes**
|
|
672
|
+
- `orchestrator`: Coordinates complex multi-step tasks
|
|
673
|
+
- `coder`: Focused code implementation
|
|
674
|
+
- `researcher`: Deep analysis and discovery
|
|
675
|
+
- `tester`: Comprehensive testing strategies
|
|
676
|
+
- `architect`: System design and architecture
|
|
677
|
+
|
|
678
|
+
#### **Team SPARC Modes (v1.1.62+)**
|
|
679
|
+
- `team widget`: Widget development with Frontend + Backend + UI/UX + Platform + QA specialists
|
|
680
|
+
- `team flow`: Flow development with Process + Trigger + Data + Integration + Security specialists
|
|
681
|
+
- `team app`: Application development with Database + Business Logic + Interface + Security + Performance specialists
|
|
682
|
+
- `team adaptive`: Dynamic team assembly based on task requirements
|
|
683
|
+
|
|
684
|
+
#### **Individual Specialist Modes (v1.1.62+)**
|
|
685
|
+
- `frontend`: HTML templates, CSS styling, responsive design
|
|
686
|
+
- `backend`: Server scripts, API calls, data processing, performance optimization
|
|
687
|
+
- `security`: Access controls, permissions, vulnerability assessment, compliance review
|
|
688
|
+
- `data`: Database design, table relationships, data transformations
|
|
689
|
+
- `integration`: APIs, external systems, data synchronization
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
*This configuration ensures optimal use of Claude Code's batch tools for Snow-Flow ServiceNow development with maximum efficiency and safety.*
|