snow-flow 4.5.14 → 4.5.16
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 +63 -7
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -27,16 +27,72 @@ This document provides comprehensive instructions for Snow-Flow, an advanced Ser
|
|
|
27
27
|
|
|
28
28
|
## Core Philosophy
|
|
29
29
|
|
|
30
|
-
### The Prime Directive:
|
|
30
|
+
### The Prime Directive: Use Dedicated Tools First, Then Verify
|
|
31
31
|
|
|
32
|
-
Snow-Flow operates on
|
|
32
|
+
Snow-Flow operates on "**Tools-First, Evidence-Based**" development. Always use the highest-level, most specific tool available before falling back to generic approaches.
|
|
33
33
|
|
|
34
34
|
**Cardinal Rules:**
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
38
|
-
4.
|
|
39
|
-
5. Respect existing configurations
|
|
35
|
+
1. **🔍 Tool Discovery First** - Always search for dedicated MCP tools before using scripts
|
|
36
|
+
2. **🎯 Use Highest-Level Tool** - Prefer domain-specific tools over generic database operations
|
|
37
|
+
3. **📊 Problem Categorization** - High-level business operations → dedicated tools, low-level data → scripts
|
|
38
|
+
4. **✅ Verify, Don't Assume** - Test before declaring something broken
|
|
39
|
+
5. **🔧 Fix Only Confirmed Issues** - Respect existing configurations
|
|
40
|
+
|
|
41
|
+
### The Tools-First Approach
|
|
42
|
+
|
|
43
|
+
**✅ CORRECT Decision Process:**
|
|
44
|
+
```javascript
|
|
45
|
+
// Step 1: User Request Analysis
|
|
46
|
+
User: "Create agent workspace for IT support"
|
|
47
|
+
|
|
48
|
+
// Step 2: Tool Discovery FIRST
|
|
49
|
+
Search Snow-Flow MCP tools for:
|
|
50
|
+
- "create_workspace" → FOUND: snow_create_workspace
|
|
51
|
+
- "workspace_create" → FOUND: snow_create_workspace
|
|
52
|
+
- "agent_workspace" → FOUND: snow_create_workspace
|
|
53
|
+
|
|
54
|
+
// Step 3: Use Dedicated Tool
|
|
55
|
+
const result = await snow_create_workspace({
|
|
56
|
+
name: "IT Support Workspace",
|
|
57
|
+
tables: ["incident", "task", "sys_user"],
|
|
58
|
+
description: "Agent workspace for IT support team"
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Step 4: Only if dedicated tool fails → verify with scripts
|
|
62
|
+
if (!result.success && result.plugin_required) {
|
|
63
|
+
// Now use verification script to check plugin availability
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**❌ WRONG Approach (Anti-Pattern):**
|
|
68
|
+
```javascript
|
|
69
|
+
// DON'T DO THIS: Jumping straight to scripts for business operations
|
|
70
|
+
User: "Create agent workspace"
|
|
71
|
+
→ snow_execute_script_with_output({ script: "var gr = new GlideRecord('sys_aw_master_config')..." })
|
|
72
|
+
|
|
73
|
+
// This bypasses all our error handling, plugin detection, and business logic!
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Problem Categorization Guide
|
|
77
|
+
|
|
78
|
+
**🎯 High-Level Business Operations → Dedicated Tools:**
|
|
79
|
+
- "Create workspace" → `snow_create_workspace`
|
|
80
|
+
- "Create UI Builder page" → `snow_create_uib_page`
|
|
81
|
+
- "Deploy widget" → `snow_deploy`
|
|
82
|
+
- "Create flow" → Flow Designer tools
|
|
83
|
+
- "Add component to page" → `snow_add_uib_page_element`
|
|
84
|
+
|
|
85
|
+
**🔧 Low-Level Data Operations → Scripts OK:**
|
|
86
|
+
- "Check if field exists in table"
|
|
87
|
+
- "Verify property value"
|
|
88
|
+
- "Test custom query"
|
|
89
|
+
- "Debug specific record"
|
|
90
|
+
|
|
91
|
+
**🚨 Decision Tree:**
|
|
92
|
+
1. **User says "Create X"** → Search for `snow_create_X` or `snow_X_create` tools FIRST
|
|
93
|
+
2. **User says "Configure Y"** → Search for `snow_configure_Y` tools FIRST
|
|
94
|
+
3. **User says "Custom script for Z"** → Scripts are appropriate
|
|
95
|
+
4. **User says "Check/verify/test"** → Scripts for verification are good
|
|
40
96
|
|
|
41
97
|
### The Verification-First Approach
|
|
42
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.16",
|
|
4
4
|
"description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|