snow-flow 11.0.5 → 11.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "11.0.5",
3
+ "version": "11.0.7",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -12,7 +12,7 @@ tools:
12
12
  - snow_blast_radius_table_configs
13
13
  - snow_blast_radius_artifact_dependencies
14
14
  - snow_blast_radius_field_references
15
- - snow_blast_radius_reverse_dependencies
15
+ - snow_blast_radius_dependents
16
16
  - snow_code_search
17
17
  ---
18
18
 
@@ -28,7 +28,7 @@ Blast Radius provides configuration dependency analysis across a ServiceNow inst
28
28
  | `snow_blast_radius_table_configs` | All configs on a table | "What runs on the incident table?" |
29
29
  | `snow_blast_radius_field_references` | Reverse field lookup | "What touches incident.assignment_group?" |
30
30
  | `snow_blast_radius_artifact_dependencies` | Forward dependency analysis | "What does this business rule read/write?" |
31
- | `snow_blast_radius_reverse_dependencies` | Reverse artifact lookup | "What calls the IncidentUtils script include?" |
31
+ | `snow_blast_radius_dependents` | Find what uses / calls an artifact (deep 3-phase scan, 100+ tables) | "What calls IncidentUtils?" / "Can I safely delete this business rule?" |
32
32
  | `snow_code_search` | Substring search across every script-bearing table (business rules, script includes, client scripts, widgets, scripted REST ops, UI actions, ACLs, notifications, UX scripts, …) | "Where is `IncidentUtils.resolve` referenced anywhere?" — use when reverse-dependency tools don't index what you need |
33
33
 
34
34
  ## Coverage
@@ -138,7 +138,7 @@ Returns fields read/written, tables queried, script includes called, and a compl
138
138
  Find what depends on a specific artifact (e.g., a script include):
139
139
 
140
140
  ```
141
- snow_blast_radius_reverse_dependencies(artifact_type: "script_include", artifact_identifier: "IncidentUtils")
141
+ snow_blast_radius_dependents(artifact_type: "script_include", artifact_identifier: "IncidentUtils")
142
142
  ```
143
143
 
144
144
  ## Common Questions and Which Tool to Use
@@ -149,10 +149,10 @@ Find what depends on a specific artifact (e.g., a script include):
149
149
  | "What business rules run on incident?" | `snow_blast_radius_table_configs` |
150
150
  | "What touches the state field on change_request?" | `snow_blast_radius_field_references` |
151
151
  | "What does this business rule do?" | `snow_blast_radius_artifact_dependencies` |
152
- | "What uses the TaskUtils script include?" | `snow_blast_radius_reverse_dependencies` |
152
+ | "What uses the TaskUtils script include?" | `snow_blast_radius_dependents` |
153
153
  | "Is it safe to remove this field?" | `snow_blast_radius_field_references` |
154
154
  | "How complex is this business rule?" | `snow_blast_radius_artifact_dependencies` |
155
- | "What's the blast radius of changing this script include?" | `snow_blast_radius_reverse_dependencies` |
155
+ | "What's the blast radius of changing this script include?" | `snow_blast_radius_dependents` |
156
156
 
157
157
  ## Script Analysis Patterns
158
158
 
@@ -53,10 +53,10 @@ tool_search({ query: "...", enable: true })
53
53
 
54
54
  You do **NOT** call `activity_start`, `activity_update`, `activity_add_artifact`, or `activity_complete` manually. The harness watches tool calls and reports them for you:
55
55
 
56
- - Pick up a Jira/Azure DevOps issue (`jira_get_next_todo`, `jira_get_issue`, `azure_get_work_item`, …) → story is buffered.
57
- - Create or switch an Update Set via `snow_update_set_manage` → activity starts automatically, linked to that story if one was buffered.
58
- - Any `snow_create_*`, `snow_deploy_*`, `snow_update_*`, or `snow_edit_*` that returns a `sys_id` → artifact is attached automatically.
59
- - `snow_update_set_manage action=complete` → activity is completed automatically.
56
+ - Pick up an issue from Jira / Azure DevOps via the relevant integration tool → story is buffered.
57
+ - Create or switch an Update Set → activity starts automatically, linked to the buffered story if any.
58
+ - Any successful create / deploy / update / edit of a ServiceNow artifact that returns a `sys_id` → artifact is attached automatically.
59
+ - Complete an Update Set → activity is completed automatically.
60
60
 
61
61
  If the user wants an ad-hoc activity without a ticket, just create the Update Set and start working — the activity starts with `source: "manual"`.
62
62
 
@@ -135,7 +135,7 @@ ServiceNow server-side JavaScript runs on Mozilla Rhino, which only supports ES5
135
135
  ### Standard development (widgets, business rules, scoped apps, etc.)
136
136
 
137
137
  1. Decide application scope (scoped app `x_vendor_appname` or global) — see `Skill({ skill: "scoped-apps" })`
138
- 2. Create Update Set via `snow_update_set_manage` (activity tracking starts automatically)
138
+ 2. Create an Update Set (activity tracking starts automatically)
139
139
  3. Develop the artifact(s) — load the relevant skill (`widget-coherence`, `business-rule-patterns`, `flow-designer`, etc.)
140
140
  4. Test and verify
141
141
  5. Complete the Update Set (activity is closed automatically)
@@ -180,6 +180,10 @@ Users want production-ready code. Real ServiceNow queries, real error handling,
180
180
 
181
181
  Never assume a table doesn't exist because it isn't "standard". Never declare a configuration broken without testing. Never claim an API isn't available without checking. Verify, then act.
182
182
 
183
+ ### 5. Deleting / refactoring without an impact scan
184
+
185
+ Before you delete, rename, or change the signature of an artifact (script include, business rule, client script, UI action, UI policy, widget, table, etc.), run a dependency / blast-radius scan on it. The instance has dozens of places where references can hide — workflows, email notifications, catalog scripts, scheduled jobs, custom scripted tables — and reading five tables by hand will silently miss most of them. Discover the right tool via `tool_search`; never tell the user "it's safe to remove X" without seeing the full impact list.
186
+
183
187
  ---
184
188
 
185
189
  ## 🎓 FINAL CHECKLIST
@@ -15,6 +15,6 @@ export {
15
15
  execute as snow_blast_radius_field_references_exec,
16
16
  } from "./snow_blast_radius_field_references.js"
17
17
  export {
18
- toolDefinition as snow_blast_radius_reverse_dependencies_def,
19
- execute as snow_blast_radius_reverse_dependencies_exec,
20
- } from "./snow_blast_radius_reverse_dependencies.js"
18
+ toolDefinition as snow_blast_radius_dependents_def,
19
+ execute as snow_blast_radius_dependents_exec,
20
+ } from "./snow_blast_radius_dependents.js"
@@ -1,17 +1,18 @@
1
1
  /**
2
- * snow_blast_radius_reverse_dependencies - Find what depends on an artifact
2
+ * snow_blast_radius_dependents - Find every artifact that uses a given one
3
3
  *
4
- * Reverse dependency analysis using a 3-phase deep search:
4
+ * The go-to "what will break if I touch this?" tool. Uses a 3-phase deep
5
+ * search so it never silently misses a caller:
5
6
  * 1. Curated catalog (25+ artifact types from ARTIFACT_SPECS)
6
7
  * 2. sys_dictionary discovery (every table with script-type fields)
7
8
  * 3. Long-tail batch search (concurrency-limited)
8
9
  *
9
- * Covers the common-case tool-use: "I'm about to refactor / remove this
10
- * script_include what else will break?" Looks in business rules, client
11
- * scripts, UI actions + policies, script includes, workflows, flow actions,
12
- * email notifications, catalog client scripts, scheduled jobs, transform
13
- * scripts, processors, ACLs, assessment metrics, and any custom script-
14
- * bearing table the customer added (discovered dynamically).
10
+ * Looks in business rules, client scripts, UI actions + policies, script
11
+ * includes, workflows, flow actions, email notifications, inbound email
12
+ * actions, catalog client scripts / UI policies, scheduled jobs, fix
13
+ * scripts, transform scripts, processors, ACLs, metric definitions, ATF
14
+ * steps, and any custom script-bearing table the customer has added
15
+ * (discovered dynamically via sys_dictionary).
15
16
  */
16
17
 
17
18
  import { MCPToolDefinition, ServiceNowContext, ToolResult } from "../../shared/types.js"
@@ -21,35 +22,58 @@ import { ARTIFACT_TABLE_MAP } from "./shared/metadata-tables.js"
21
22
  import { searchDependents, type SearchPattern } from "./shared/deep-search.js"
22
23
 
23
24
  export const toolDefinition: MCPToolDefinition = {
24
- name: "snow_blast_radius_reverse_dependencies",
25
- description: `Find what depends on a given artifact (reverse dependency analysis).
25
+ name: "snow_blast_radius_dependents",
26
+ description: `Find every artifact on the instance that USES / CALLS / DEPENDS ON a given artifact. Answers: "what breaks if I change or delete this?"
26
27
 
27
- 📋 USE THIS TO:
28
- - Find all artifacts that call a script include
29
- - See what references a specific business rule, UI action, or widget
30
- - Assess the blast radius of changing or removing an artifact
31
- - Identify cross-scope dependencies
28
+ 🛑 CALL THIS BEFORE:
29
+ - Deleting a script include, business rule, client script, UI action, UI policy, or widget
30
+ - Refactoring the name / api_name / signature of any script include
31
+ - Removing a table
32
+ - Promoting a breaking change to another instance
33
+ - Telling the user "it's safe to remove X"
32
34
 
33
- 🔍 EXAMPLE: "What calls the IncidentUtils script include?"
35
+ The output is the impact list — every caller, every referrer, in every
36
+ scope. Do not rely on reading 5 tables by hand; this tool scans 100+
37
+ tables including workflows, notifications, email actions, catalog
38
+ scripts, scheduled jobs, and custom scripted tables.
39
+
40
+ 🔍 TRIGGER PHRASES (agent should invoke this):
41
+ - "what uses X" / "what calls X" / "what references X"
42
+ - "wat gebruikt X" / "wat roept X aan" / "wat heeft X nodig"
43
+ - "can I delete X" / "is it safe to remove X" / "kan ik X verwijderen"
44
+ - "impact analysis" / "blast radius" / "dependency audit"
45
+ - User asks to refactor, rename, or remove a named artifact
46
+
47
+ 🔍 EXAMPLES:
48
+ - "What calls the IncidentUtils script include?"
49
+ - "Is it safe to delete this business rule?"
50
+ - "Show me everything referencing the incident table"
34
51
 
35
52
  📊 RETURNS:
36
- - List of dependents with type, name, scope, and — importantly — the
37
- source table + field where the reference was found (so you can
38
- distinguish a business-rule hit from a workflow hit or a custom
39
- scripted table hit).
40
- - Search stats showing how many tables were scanned across three phases.
53
+ - dependents[]: each with type, name, scope, source_table, source_field,
54
+ cross_scope flag. source_table/source_field let you distinguish a
55
+ workflow-condition hit from a business-rule hit critical for triage.
56
+ - summary: by_type + by_table counts + cross_scope count + truncation flag.
57
+ - search_stats: per-phase timing + tables scanned + cache hit, so you
58
+ know the scan was thorough (expect 100+ tables on a typical instance).
41
59
 
42
- 🔎 HOW IT SEARCHES:
43
- - Phase 1: 25+ curated artifact types (business rules, workflows,
44
- email notifications, catalog scripts, transform scripts, processors,
45
- ACLs, metric definitions, inbound email actions, …)
46
- - Phase 2: sys_dictionary discovery → every table with script-type fields
60
+ 🔎 HOW IT SEARCHES (why you can trust the "none found"):
61
+ - Phase 1: 25+ curated artifact types (human-attributed labels)
62
+ - Phase 2: sys_dictionary discovery every table with script-type fields
47
63
  - Phase 3: concurrency-limited batch query over the long tail
48
-
49
- This is deep-only by design. A typical run covers 100+ tables.`,
64
+ Deep-only by design. Takes 2-10s depending on instance size.`,
50
65
  category: "blast-radius",
51
66
  subcategory: "dependency-analysis",
52
- use_cases: ["impact-analysis", "dependency-audit", "refactoring"],
67
+ use_cases: [
68
+ "impact-analysis",
69
+ "dependency-audit",
70
+ "refactoring",
71
+ "safe-delete-check",
72
+ "find-callers",
73
+ "find-references",
74
+ "breaking-change-review",
75
+ "blast-radius",
76
+ ],
53
77
  complexity: "advanced",
54
78
  frequency: "medium",
55
79
  permission: "read",