@salesforce/afv-skills 1.7.3 → 1.7.5

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 (90) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/skills/developing-agentforce/README.md +4 -4
  4. package/skills/developing-agentforce/SKILL.md +37 -37
  5. package/skills/developing-agentforce/assets/README-legacy.md +8 -8
  6. package/skills/developing-agentforce/assets/agent-spec-template.md +9 -9
  7. package/skills/developing-agentforce/assets/agents/README.md +4 -4
  8. package/skills/developing-agentforce/assets/agents/hello-world.agent +3 -3
  9. package/skills/developing-agentforce/assets/agents/{multi-topic.agent → multi-subagent.agent} +30 -30
  10. package/skills/developing-agentforce/assets/agents/order-service.agent +25 -25
  11. package/skills/developing-agentforce/assets/agents/production-faq.agent +12 -12
  12. package/skills/developing-agentforce/assets/agents/simple-qa.agent +8 -8
  13. package/skills/developing-agentforce/assets/agents/verification-gate.agent +19 -19
  14. package/skills/developing-agentforce/assets/components/apex-action.agent +3 -3
  15. package/skills/developing-agentforce/assets/components/error-handling.agent +7 -7
  16. package/skills/developing-agentforce/assets/components/escalation-setup.agent +11 -11
  17. package/skills/developing-agentforce/assets/components/flow-action.agent +5 -5
  18. package/skills/developing-agentforce/assets/components/n-ary-conditions.agent +11 -11
  19. package/skills/developing-agentforce/assets/components/{topic-with-actions.agent → subagent-with-actions.agent} +9 -9
  20. package/skills/developing-agentforce/assets/deterministic-routing.agent +19 -19
  21. package/skills/developing-agentforce/assets/escalation-pattern.agent +13 -13
  22. package/skills/developing-agentforce/assets/flow-action-lookup.agent +3 -3
  23. package/skills/developing-agentforce/assets/hub-and-spoke.agent +18 -18
  24. package/skills/developing-agentforce/assets/local-info-agent-annotated.agent +37 -37
  25. package/skills/developing-agentforce/assets/metadata/genai-function-apex.xml +3 -3
  26. package/skills/developing-agentforce/assets/metadata/genai-function-flow.xml +1 -1
  27. package/skills/developing-agentforce/assets/metadata/genai-plugin.xml +10 -10
  28. package/skills/developing-agentforce/assets/minimal-starter.agent +4 -4
  29. package/skills/developing-agentforce/assets/patterns/README.md +21 -21
  30. package/skills/developing-agentforce/assets/patterns/action-callbacks.agent +4 -4
  31. package/skills/developing-agentforce/assets/patterns/advanced-input-bindings.agent +1 -1
  32. package/skills/developing-agentforce/assets/patterns/bidirectional-routing.agent +25 -25
  33. package/skills/developing-agentforce/assets/patterns/critical-input-collection.agent +8 -8
  34. package/skills/developing-agentforce/assets/patterns/delegation-routing.agent +21 -21
  35. package/skills/developing-agentforce/assets/patterns/lifecycle-events.agent +8 -8
  36. package/skills/developing-agentforce/assets/patterns/llm-controlled-actions.agent +5 -5
  37. package/skills/developing-agentforce/assets/patterns/multi-step-workflow.agent +3 -3
  38. package/skills/developing-agentforce/assets/patterns/open-gate-routing.agent +59 -58
  39. package/skills/developing-agentforce/assets/patterns/procedural-instructions.agent +15 -15
  40. package/skills/developing-agentforce/assets/patterns/prompt-template-action.agent +8 -8
  41. package/skills/developing-agentforce/assets/patterns/system-instruction-overrides.agent +40 -40
  42. package/skills/developing-agentforce/assets/prompt-rag-search.agent +9 -9
  43. package/skills/developing-agentforce/assets/{template-multi-topic.agent → template-multi-subagent.agent} +25 -25
  44. package/skills/developing-agentforce/assets/{template-single-topic.agent → template-single-subagent.agent} +14 -14
  45. package/skills/developing-agentforce/assets/verification-gate.agent +16 -16
  46. package/skills/developing-agentforce/references/action-prompt-templates.md +1 -1
  47. package/skills/developing-agentforce/references/actions-reference.md +4 -4
  48. package/skills/developing-agentforce/references/agent-design-and-spec-creation.md +107 -107
  49. package/skills/developing-agentforce/references/agent-metadata-and-lifecycle.md +5 -5
  50. package/skills/developing-agentforce/references/agent-script-core-language.md +79 -79
  51. package/skills/developing-agentforce/references/{agent-topic-map-diagrams.md → agent-subagent-map-diagrams.md} +65 -65
  52. package/skills/developing-agentforce/references/agent-user-setup.md +2 -2
  53. package/skills/developing-agentforce/references/agent-validation-and-debugging.md +55 -55
  54. package/skills/developing-agentforce/references/architecture-patterns.md +33 -33
  55. package/skills/developing-agentforce/references/deploy-reference.md +1 -1
  56. package/skills/developing-agentforce/references/discover-reference.md +1 -1
  57. package/skills/developing-agentforce/references/examples.md +32 -32
  58. package/skills/developing-agentforce/references/feature-validity.md +3 -3
  59. package/skills/developing-agentforce/references/instruction-resolution.md +29 -29
  60. package/skills/developing-agentforce/references/known-issues.md +10 -10
  61. package/skills/developing-agentforce/references/minimal-examples.md +6 -6
  62. package/skills/developing-agentforce/references/production-gotchas.md +22 -22
  63. package/skills/developing-agentforce/references/safety-review-reference.md +2 -2
  64. package/skills/developing-agentforce/references/scoring-rubric.md +3 -3
  65. package/skills/developing-datacloud-code-extension/SKILL.md +321 -0
  66. package/skills/developing-datacloud-code-extension/references/README.md +193 -0
  67. package/skills/developing-datacloud-code-extension/references/quick-reference.md +269 -0
  68. package/skills/generating-permission-set/SKILL.md +1 -1
  69. package/skills/getting-datacloud-schema/SKILL.md +380 -0
  70. package/skills/getting-datacloud-schema/references/README.md +191 -0
  71. package/skills/getting-datacloud-schema/scripts/get_dlo_schema.py +244 -0
  72. package/skills/getting-datacloud-schema/scripts/get_dmo_schema.py +233 -0
  73. package/skills/observing-agentforce/SKILL.md +8 -8
  74. package/skills/observing-agentforce/apex/AgentforceOptimizeService.cls +2 -2
  75. package/skills/observing-agentforce/references/improve-reference.md +40 -40
  76. package/skills/observing-agentforce/references/issue-classification.md +47 -47
  77. package/skills/observing-agentforce/references/reproduce-reference.md +7 -7
  78. package/skills/observing-agentforce/references/stdm-queries.md +7 -7
  79. package/skills/observing-agentforce/references/stdm-schema.md +2 -2
  80. package/skills/testing-agentforce/SKILL.md +9 -9
  81. package/skills/testing-agentforce/assets/basic-test-spec.yaml +4 -0
  82. package/skills/testing-agentforce/assets/guardrail-test-spec.yaml +4 -0
  83. package/skills/testing-agentforce/assets/standard-test-spec.yaml +8 -4
  84. package/skills/testing-agentforce/references/batch-testing.md +17 -17
  85. package/skills/testing-agentforce/references/preview-testing.md +25 -25
  86. package/skills/testing-agentforce/references/test-report-format.md +6 -6
  87. package/skills/trigger-refactor-pipeline/SKILL.md +0 -191
  88. package/skills/trigger-refactor-pipeline/assets/test_template.apex +0 -321
  89. package/skills/trigger-refactor-pipeline/references/handler_patterns.md +0 -442
  90. package/skills/trigger-refactor-pipeline/scripts/analyze_trigger.py +0 -258
@@ -15,9 +15,9 @@ What do you need?
15
15
  │ └─► Use: lifecycle-events.agent
16
16
  │ (before_reasoning / after_reasoning blocks)
17
17
 
18
- ├─► Navigate to specialist and return with results?
18
+ ├─► Navigate to specialist subagent and return with results?
19
19
  │ └─► Use: bidirectional-routing.agent
20
- │ (store return address, specialist transitions back)
20
+ │ (store return address, specialist subagent transitions back)
21
21
 
22
22
  ├─► Complex parameter passing to actions?
23
23
  │ └─► Use: advanced-input-bindings.agent
@@ -71,7 +71,7 @@ process_order: @actions.create_order
71
71
 
72
72
  **Key syntax**:
73
73
  ```agentscript
74
- topic conversation:
74
+ subagent conversation:
75
75
  before_reasoning:
76
76
  set @variables.turn_count = @variables.turn_count + 1
77
77
  run @actions.refresh_context
@@ -88,26 +88,26 @@ topic conversation:
88
88
 
89
89
  ### 3. [bidirectional-routing.agent](bidirectional-routing.agent)
90
90
 
91
- **Purpose**: Navigate to specialist topic and return with results.
91
+ **Purpose**: Navigate to specialist subagent and return with results.
92
92
 
93
93
  **Use when**:
94
- - Complex workflows spanning multiple topics
94
+ - Complex workflows spanning multiple subagents
95
95
  - "Consult an expert" pattern
96
96
  - Need to bring results back to coordinator
97
97
  - Want separation of concerns
98
98
 
99
99
  **Key syntax**:
100
100
  ```agentscript
101
- # In main topic
102
- consult_pricing: @utils.transition to @topic.pricing_specialist
101
+ # In main subagent
102
+ consult_pricing: @utils.transition to @subagent.pricing_specialist
103
103
 
104
- # In specialist topic
104
+ # In specialist subagent
105
105
  before_reasoning:
106
- set @variables.return_topic = "main_hub"
106
+ set @variables.return_subagent = "main_hub"
107
107
 
108
108
  # ... do specialist work ...
109
109
 
110
- return_with_results: @utils.transition to @topic.main_hub
110
+ return_with_results: @utils.transition to @subagent.main_hub
111
111
  ```
112
112
 
113
113
  ---
@@ -168,7 +168,7 @@ reasoning:
168
168
  system:
169
169
  instructions: "You are a professional agent. Be helpful and courteous."
170
170
 
171
- # Topic reasoning: Dynamic overrides
171
+ # Subagent reasoning: Dynamic overrides
172
172
  reasoning:
173
173
  instructions: ->
174
174
  if @variables.customer_tier == "vip":
@@ -192,22 +192,22 @@ reasoning:
192
192
 
193
193
  ### 6. [open-gate-routing.agent](open-gate-routing.agent)
194
194
 
195
- **Purpose**: Auth-gated topic routing with LLM bypass using a 3-variable state machine.
195
+ **Purpose**: Auth-gated subagent routing with LLM bypass using a 3-variable state machine.
196
196
 
197
197
  **Use when**:
198
- - Multiple protected topics require authentication before access
199
- - You want zero-credit LLM bypass while a gate topic holds focus
200
- - Users should be redirected to auth, then automatically returned to their intended topic
198
+ - Multiple protected subagents require authentication before access
199
+ - You want zero-credit LLM bypass while a gate subagent holds focus
200
+ - Users should be redirected to auth, then automatically returned to their intended subagent
201
201
  - You need an EXIT_PROTOCOL to release gate state when users change intent
202
202
 
203
203
  **Key syntax**:
204
204
  ```agentscript
205
- # topic_selector bypasses LLM when open_gate is set
205
+ # agent_router bypasses LLM when open_gate is set
206
206
  before_reasoning:
207
207
  if @variables.open_gate == "protected_workflow":
208
- transition to @topic.protected_workflow
208
+ transition to @subagent.protected_workflow
209
209
  if @variables.open_gate == "authentication_gate":
210
- transition to @topic.authentication_gate
210
+ transition to @subagent.authentication_gate
211
211
  ```
212
212
 
213
213
  **Credit**: Hua Xu (Salesforce APAC FDE team) — production pattern from Kogan agent deployment.
@@ -239,7 +239,7 @@ open-gate-routing + lifecycle-events
239
239
  | Lifecycle Events | +5 pts | Proper block placement |
240
240
  | Bidirectional | +5 pts | Return transitions |
241
241
  | Input Bindings | +5 pts | Proper binding patterns |
242
- | System Overrides | +5 pts | Static system, dynamic topics |
242
+ | System Overrides | +5 pts | Static system, dynamic subagents |
243
243
  | Open Gate | +5 pts | 3-variable coordination |
244
244
 
245
245
  ## Anti-Patterns to Avoid
@@ -250,5 +250,5 @@ open-gate-routing + lifecycle-events
250
250
  | Lifecycle in wrong order | before_reasoning, reasoning, after_reasoning |
251
251
  | Forget return transition | Always include return action in specialists |
252
252
  | Use lifecycle for one-time setup | Use if @variables.turn_count == 1 |
253
- | Missing EXIT_PROTOCOL in gate pattern | Always include gate reset topic |
254
- | Hardcoding gate topic name in open_gate | Use variable-driven routing |
253
+ | Missing EXIT_PROTOCOL in gate pattern | Always include gate reset subagent |
254
+ | Hardcoding gate subagent name in open_gate | Use variable-driven routing |
@@ -17,7 +17,7 @@
17
17
  #
18
18
  # This is a PARTIAL template - integrate into a complete agent file
19
19
 
20
- topic order_processing:
20
+ subagent order_processing:
21
21
  label: "Order Processing"
22
22
  description: "Processes orders with guaranteed confirmation and logging"
23
23
 
@@ -84,7 +84,7 @@ topic order_processing:
84
84
  with event_type="ORDER_CREATED"
85
85
  with details=@variables.order_id
86
86
 
87
- back_to_menu: @utils.transition to @topic.topic_selector
87
+ back_to_menu: @utils.transition to @subagent.agent_router
88
88
 
89
89
  # ★ Anti-Pattern: Nested run (DO NOT DO THIS)
90
90
  #
@@ -111,7 +111,7 @@ topic order_processing:
111
111
  #
112
112
  # Example: Create case and track count (works in BOTH bundle types)
113
113
 
114
- topic case_management:
114
+ subagent case_management:
115
115
  label: "Case Management"
116
116
  description: "Creates cases and tracks statistics"
117
117
 
@@ -143,7 +143,7 @@ topic case_management:
143
143
  set @variables.case_id = @outputs.out_CaseId
144
144
  set @variables.cases_created = @variables.cases_created + 1 # Direct increment!
145
145
 
146
- back_to_menu: @utils.transition to @topic.topic_selector
146
+ back_to_menu: @utils.transition to @subagent.agent_router
147
147
 
148
148
  # ═══════════════════════════════════════════════════════════════════════════════
149
149
  # ⛔ INVALID KEYWORDS - NEVER USE THESE
@@ -32,7 +32,7 @@ variables:
32
32
  status: mutable string = ""
33
33
  description: "Current operation status"
34
34
 
35
- topic order_processing:
35
+ subagent order_processing:
36
36
  label: "Order Processing"
37
37
  description: "Demonstrates advanced input binding patterns"
38
38
 
@@ -1,34 +1,34 @@
1
1
  # Bidirectional Routing Pattern
2
- # Navigate to a specialist topic and return with results
2
+ # Navigate to a specialist subagent and return with results
3
3
  #
4
4
  # ★ When To Use This Pattern:
5
- # - Main topic needs specialized processing then returns
5
+ # - Main subagent needs specialized processing then returns
6
6
  # - "Consult a specialist" pattern (like asking an expert)
7
7
  # - Complex workflows where you leave, do work, then come back
8
- # - Alternative to cramming everything into one topic
8
+ # - Alternative to cramming everything into one subagent
9
9
  #
10
10
  # ★ Key Insight:
11
11
  # Standard transitions (@utils.transition) are one-way.
12
12
  # For round-trip routing, store the "return address" in a variable.
13
- # The specialist topic transitions back when done.
13
+ # The specialist subagent transitions back when done.
14
14
  #
15
15
  # ★ Architecture Decision:
16
16
  # Use this when you want separation of concerns:
17
- # - Main topic: Orchestration and user interaction
18
- # - Specialist topic: Focused, complex processing
17
+ # - Main subagent: Orchestration and user interaction
18
+ # - Specialist subagent: Focused, complex processing
19
19
  #
20
20
  # This is a PARTIAL template - integrate into a complete agent file
21
21
 
22
22
  variables:
23
23
  # ... standard linked variables ...
24
- return_topic: mutable string = ""
25
- description: "Topic to return to after specialist consultation"
24
+ return_subagent: mutable string = ""
25
+ description: "Subagent to return to after specialist consultation"
26
26
  specialist_result: mutable string = ""
27
- description: "Result from specialist topic"
27
+ description: "Result from specialist subagent"
28
28
  consultation_status: mutable string = ""
29
29
  description: "Status of specialist consultation"
30
30
 
31
- # Main orchestration topic
31
+ # Main orchestration subagent
32
32
  start_agent main_hub:
33
33
  label: "Main Hub"
34
34
  description: "Central hub that routes to specialists and handles results"
@@ -46,17 +46,17 @@ start_agent main_hub:
46
46
  | Consultation status: {!@variables.consultation_status}
47
47
  actions:
48
48
  # Route to pricing specialist (store return address first)
49
- consult_pricing: @utils.transition to @topic.pricing_specialist
49
+ consult_pricing: @utils.transition to @subagent.pricing_specialist
50
50
  available when @variables.consultation_status != "in_progress"
51
51
 
52
52
  # Route to technical specialist
53
- consult_technical: @utils.transition to @topic.technical_specialist
53
+ consult_technical: @utils.transition to @subagent.technical_specialist
54
54
  available when @variables.consultation_status != "in_progress"
55
55
 
56
- end_conversation: @utils.transition to @topic.farewell
56
+ end_conversation: @utils.transition to @subagent.farewell
57
57
 
58
- # Pricing specialist topic
59
- topic pricing_specialist:
58
+ # Pricing specialist subagent
59
+ subagent pricing_specialist:
60
60
  label: "Pricing Specialist"
61
61
  description: "Handles complex pricing calculations and returns results"
62
62
 
@@ -78,7 +78,7 @@ topic pricing_specialist:
78
78
  # Mark consultation as in progress when entering
79
79
  before_reasoning:
80
80
  set @variables.consultation_status = "in_progress"
81
- set @variables.return_topic = "main_hub"
81
+ set @variables.return_subagent = "main_hub"
82
82
 
83
83
  reasoning:
84
84
  instructions: ->
@@ -93,14 +93,14 @@ topic pricing_specialist:
93
93
  set @variables.specialist_result = @outputs.final_price
94
94
 
95
95
  # Return to main hub with results
96
- return_with_results: @utils.transition to @topic.main_hub
96
+ return_with_results: @utils.transition to @subagent.main_hub
97
97
 
98
98
  # Mark consultation complete when leaving
99
99
  after_reasoning:
100
100
  set @variables.consultation_status = "completed"
101
101
 
102
- # Technical specialist topic
103
- topic technical_specialist:
102
+ # Technical specialist subagent
103
+ subagent technical_specialist:
104
104
  label: "Technical Specialist"
105
105
  description: "Handles technical troubleshooting and returns results"
106
106
 
@@ -119,7 +119,7 @@ topic technical_specialist:
119
119
 
120
120
  before_reasoning:
121
121
  set @variables.consultation_status = "in_progress"
122
- set @variables.return_topic = "main_hub"
122
+ set @variables.return_subagent = "main_hub"
123
123
 
124
124
  reasoning:
125
125
  instructions: ->
@@ -132,12 +132,12 @@ topic technical_specialist:
132
132
  with symptoms=...
133
133
  set @variables.specialist_result = @outputs.diagnosis
134
134
 
135
- return_with_results: @utils.transition to @topic.main_hub
135
+ return_with_results: @utils.transition to @subagent.main_hub
136
136
 
137
137
  after_reasoning:
138
138
  set @variables.consultation_status = "completed"
139
139
 
140
- topic farewell:
140
+ subagent farewell:
141
141
  label: "Farewell"
142
142
  description: "Ends the conversation"
143
143
 
@@ -148,9 +148,9 @@ topic farewell:
148
148
  # ★ Alternative: Simple one-way transitions (when you don't need to return)
149
149
  #
150
150
  # If the specialist doesn't need to return results to a coordinator,
151
- # use simple transitions without the return_topic pattern:
151
+ # use simple transitions without the return_subagent pattern:
152
152
  #
153
- # go_orders: @utils.transition to @topic.orders
154
- # go_billing: @utils.transition to @topic.billing
153
+ # go_orders: @utils.transition to @subagent.orders
154
+ # go_billing: @utils.transition to @subagent.billing
155
155
  #
156
156
  # The bidirectional pattern adds complexity - only use when needed.
@@ -23,7 +23,7 @@
23
23
  # - Workflows that REQUIRE a specific ID (account, order, case, etc.)
24
24
  # - When slot filling has been unreliable
25
25
  # - When invalid input causes downstream failures
26
- # - Multi-topic agents where input must persist across transitions
26
+ # - Multi-subagent agents where input must persist across transitions
27
27
  #
28
28
  # This is a COMPLETE template - customize for your use case
29
29
 
@@ -74,8 +74,8 @@ language:
74
74
  additional_locales: ""
75
75
  all_additional_locales: False
76
76
 
77
- # ★ ENTRY POINT: Input Collection Topic
78
- # This topic's ONLY job is to collect and validate the critical input
77
+ # ★ ENTRY POINT: Input Collection Subagent
78
+ # This subagent's ONLY job is to collect and validate the critical input
79
79
  start_agent input_collector:
80
80
  label: "Input Collector"
81
81
  description: "Collects and validates the account ID before allowing research"
@@ -127,7 +127,7 @@ start_agent input_collector:
127
127
  | ✅ Account ID validated: {!@variables.account_id}
128
128
  | Account Name: {!@variables.account_name}
129
129
  |
130
- | Transition to research topic to begin analysis.
130
+ | Transition to research subagent to begin analysis.
131
131
 
132
132
  if @variables.collection_attempts > 2 and @variables.account_id_validated == False:
133
133
  | ❌ Multiple validation failures.
@@ -148,11 +148,11 @@ start_agent input_collector:
148
148
 
149
149
  # ★ PATTERN 4: Null Guard Pattern
150
150
  # Transition ONLY available when input is validated
151
- go_research: @utils.transition to @topic.research
151
+ go_research: @utils.transition to @subagent.research
152
152
  available when @variables.account_id_validated == True
153
153
 
154
- # ★ RESEARCH TOPIC: Only accessible after input is validated
155
- topic research:
154
+ # ★ RESEARCH SUBAGENT: Only accessible after input is validated
155
+ subagent research:
156
156
  label: "Account Research"
157
157
  description: "Performs research on the validated account"
158
158
 
@@ -194,7 +194,7 @@ topic research:
194
194
  available when @variables.research_summary == ""
195
195
 
196
196
  # Return to collector for new account
197
- new_account: @utils.transition to @topic.input_collector
197
+ new_account: @utils.transition to @subagent.input_collector
198
198
  available when @variables.research_summary != ""
199
199
 
200
200
  # ═══════════════════════════════════════════════════════════════════════════
@@ -1,21 +1,21 @@
1
- # Topic Delegation vs Transition Pattern
1
+ # Subagent Delegation vs Transition Pattern
2
2
  # Understanding the difference between delegation and permanent handoffs
3
3
  #
4
4
  # ★ KEY CONCEPTS:
5
5
  #
6
- # DELEGATION (@topic.* syntax):
7
- # - Syntax: action_name: @topic.topic_name
8
- # - Control CAN return to the calling topic
6
+ # DELEGATION (@subagent.* syntax):
7
+ # - Syntax: action_name: @subagent.subagent_name
8
+ # - Control CAN return to the calling subagent
9
9
  # - Use for: consulting specialists, sub-tasks, getting help
10
10
  #
11
11
  # TRANSITION (@utils.transition syntax):
12
- # - Syntax: action_name: @utils.transition to @topic.topic_name
12
+ # - Syntax: action_name: @utils.transition to @subagent.subagent_name
13
13
  # - PERMANENT handoff - control does NOT return
14
14
  # - Use for: menu navigation, workflow stages, permanent routing
15
15
  #
16
16
  # ★ When To Use Each:
17
17
  # DELEGATION: "Consult an expert then continue here"
18
- # TRANSITION: "Go to this topic and stay there"
18
+ # TRANSITION: "Go to this subagent and stay there"
19
19
  #
20
20
  # ★ Implementation Note:
21
21
  # If delegation syntax doesn't work in your deployment method,
@@ -25,20 +25,20 @@
25
25
  # This is a PARTIAL template - integrate into a complete agent file
26
26
 
27
27
  # ═══════════════════════════════════════════════════════════════
28
- # PATTERN 1: Topic Delegation (can return)
28
+ # PATTERN 1: Subagent Delegation (can return)
29
29
  # ═══════════════════════════════════════════════════════════════
30
30
 
31
31
  # Delegation syntax in reasoning.actions:
32
32
  #
33
33
  # reasoning:
34
34
  # actions:
35
- # # Delegation - specialist CAN return control to this topic
36
- # consult_expert: @topic.specialist_topic
35
+ # # Delegation - specialist CAN return control to this subagent
36
+ # consult_expert: @subagent.specialist_subagent
37
37
  # description: "Consult specialist for complex questions"
38
38
  # available when @variables.needs_expert_help == True
39
39
  #
40
- # The specialist topic processes the request and control returns
41
- # to the original topic when done.
40
+ # The specialist subagent processes the request and control returns
41
+ # to the original subagent when done.
42
42
 
43
43
  # ═══════════════════════════════════════════════════════════════
44
44
  # PATTERN 2: Transition (permanent handoff)
@@ -48,11 +48,11 @@
48
48
  #
49
49
  # reasoning:
50
50
  # actions:
51
- # # Transition - permanent move to orders topic
52
- # go_orders: @utils.transition to @topic.orders
51
+ # # Transition - permanent move to orders subagent
52
+ # go_orders: @utils.transition to @subagent.orders
53
53
  #
54
- # Control moves to orders topic and STAYS there.
55
- # User continues in that topic until another transition occurs.
54
+ # Control moves to orders subagent and STAYS there.
55
+ # User continues in that subagent until another transition occurs.
56
56
 
57
57
  # ═══════════════════════════════════════════════════════════════
58
58
  # PATTERN 3: Manual Bidirectional (fallback pattern)
@@ -62,17 +62,17 @@
62
62
  # See: bidirectional-routing.agent for full implementation
63
63
 
64
64
  variables:
65
- return_topic: mutable string = ""
66
- description: "Topic to return to after specialist"
65
+ return_subagent: mutable string = ""
66
+ description: "Subagent to return to after specialist"
67
67
  specialist_result: mutable string = ""
68
68
  description: "Result from specialist consultation"
69
69
 
70
70
  # Before going to specialist, store return address:
71
- # set @variables.return_topic = "main_hub"
72
- # go_specialist: @utils.transition to @topic.specialist
71
+ # set @variables.return_subagent = "main_hub"
72
+ # go_specialist: @utils.transition to @subagent.specialist
73
73
 
74
74
  # In specialist, transition back when done:
75
- # return_home: @utils.transition to @topic.main_hub
75
+ # return_home: @utils.transition to @subagent.main_hub
76
76
 
77
77
  # ═══════════════════════════════════════════════════════════════
78
78
  # COMPARISON TABLE
@@ -80,7 +80,7 @@ variables:
80
80
  #
81
81
  # | Feature | Delegation | Transition |
82
82
  # |----------------------|-------------------|-------------------------|
83
- # | Syntax | @topic.name | @utils.transition to |
83
+ # | Syntax | @subagent.name | @utils.transition to |
84
84
  # | Returns to caller? | YES | NO |
85
85
  # | Use in actions: | YES | YES |
86
86
  # | Use in lifecycle: | NO | YES (bare syntax) |
@@ -15,7 +15,7 @@
15
15
  # ★ CRITICAL SYNTAX RULES for Lifecycle Blocks:
16
16
  # 1. Use "transition to" NOT "@utils.transition to" for transitions
17
17
  # 2. The pipe (|) command is NOT supported in lifecycle blocks
18
- # 3. after_reasoning may NOT run if a transition occurs mid-topic
18
+ # 3. after_reasoning may NOT run if a transition occurs mid-subagent
19
19
  # 4. `run` has inconsistent runtime behavior in lifecycle blocks —
20
20
  # reliable primitives are `set`, `if`/`else`, `transition to`
21
21
  #
@@ -40,9 +40,9 @@ variables:
40
40
  current_context: mutable string = ""
41
41
  description: "Refreshed context for current turn"
42
42
 
43
- topic conversation:
43
+ subagent conversation:
44
44
  label: "Conversation"
45
- description: "Main conversation topic with lifecycle tracking"
45
+ description: "Main conversation subagent with lifecycle tracking"
46
46
 
47
47
  actions:
48
48
  get_timestamp:
@@ -67,8 +67,8 @@ topic conversation:
67
67
  inputs:
68
68
  turn_number: number
69
69
  description: "Which turn this is"
70
- topic_name: string
71
- description: "Current topic"
70
+ subagent_name: string
71
+ description: "Current subagent"
72
72
  outputs:
73
73
  logged: boolean
74
74
  description: "Whether log succeeded"
@@ -87,7 +87,7 @@ topic conversation:
87
87
  # ★ CORRECT: Use "transition to" (not @utils.transition to) in lifecycle blocks
88
88
  # Example: Route away if session expired
89
89
  # if @variables.session_expired == True:
90
- # transition to @topic.session_expired
90
+ # transition to @subagent.session_expired
91
91
 
92
92
  # Refresh context before every turn
93
93
  run @actions.refresh_context
@@ -105,14 +105,14 @@ topic conversation:
105
105
  |
106
106
  | Respond helpfully using the refreshed context above.
107
107
  actions:
108
- end_conversation: @utils.transition to @topic.farewell
108
+ end_conversation: @utils.transition to @subagent.farewell
109
109
 
110
110
  # ★ after_reasoning: Runs AFTER each reasoning step
111
111
  after_reasoning:
112
112
  # Log analytics for each turn
113
113
  run @actions.log_turn
114
114
  with turn_number=@variables.turn_count
115
- with topic_name="conversation"
115
+ with subagent_name="conversation"
116
116
 
117
117
  # Update last activity timestamp
118
118
  run @actions.get_timestamp
@@ -27,7 +27,7 @@ variables:
27
27
  action_taken: mutable string
28
28
  description: "Last action taken by agent"
29
29
 
30
- topic order_assistance:
30
+ subagent order_assistance:
31
31
  label: "Order Assistance"
32
32
  description: "Helps customers with order-related questions"
33
33
 
@@ -122,9 +122,9 @@ topic order_assistance:
122
122
  available when @variables.has_order_id == True
123
123
  available when @variables.order_status != "shipped"
124
124
 
125
- # Topic transitions
126
- go_help: @utils.transition to @topic.general_help
127
- go_escalation: @utils.transition to @topic.escalation
125
+ # Subagent transitions
126
+ go_help: @utils.transition to @subagent.general_help
127
+ go_escalation: @utils.transition to @subagent.escalation
128
128
  available when @variables.needs_human == True
129
129
 
130
130
  # ★ Insight: When to Use Each Method
@@ -150,7 +150,7 @@ topic order_assistance:
150
150
  # ★ Example: Action Callback Pattern (Deterministic Chaining)
151
151
  # Use "run" for guaranteed follow-up actions after a primary action
152
152
 
153
- topic checkout:
153
+ subagent checkout:
154
154
  label: "Checkout"
155
155
  description: "Handles order checkout"
156
156
 
@@ -22,10 +22,10 @@
22
22
  # This is a COMPLETE template - customize for your use case
23
23
  #
24
24
  # ★ Step Guard Pattern (Feb 2026 Community Best Practice):
25
- # - The topic selector re-evaluates on EVERY user utterance
25
+ # - The subagent router re-evaluates on EVERY user utterance
26
26
  # - Without a step guard, follow-up messages ("my email is X") get re-routed
27
27
  # - The `if @variables.current_step > 1:` guard in start_agent forces
28
- # re-entry to the current workflow, bypassing LLM topic selection
28
+ # re-entry to the current workflow, bypassing LLM subagent selection
29
29
  # - Reset current_step to 1 when the workflow completes
30
30
 
31
31
  system:
@@ -168,7 +168,7 @@ start_agent onboarding:
168
168
  reasoning:
169
169
  instructions: ->
170
170
  # ★ STEP GUARD — Force re-entry if workflow in progress
171
- # This prevents the topic selector from re-routing the user
171
+ # This prevents the subagent router from re-routing the user
172
172
  # mid-workflow when they provide follow-up information
173
173
  if @variables.current_step > 1:
174
174
  | Continuing your account setup...