@salesforce/afv-skills 1.55.0 → 1.56.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 (220) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/SKILL.md +8 -0
  3. package/skills/agentforce-generate/references/actions-reference.md +2 -2
  4. package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
  5. package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
  6. package/skills/agentforce-observe/SKILL.md +13 -9
  7. package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
  8. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
  9. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -0
  10. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
  11. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +32 -1
  12. package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
  13. package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
  14. package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
  15. package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
  16. package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
  17. package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
  18. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
  19. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
  20. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
  21. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
  22. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
  23. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
  24. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
  25. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
  26. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
  27. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
  28. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
  29. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
  30. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
  31. package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
  32. package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
  33. package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
  34. package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
  35. package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
  36. package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
  37. package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
  38. package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
  39. package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
  40. package/skills/dx-org-analyze/SKILL.md +0 -1
  41. package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
  42. package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
  43. package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
  44. package/skills/dx-org-manage/SKILL.md +6 -50
  45. package/skills/dx-org-manage/examples/README.md +10 -16
  46. package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
  47. package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
  48. package/skills/dx-org-shape-manage/SKILL.md +4 -3
  49. package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
  50. package/skills/experience-accessibility-validate/SKILL.md +8 -5
  51. package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
  52. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
  53. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
  54. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
  55. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
  56. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
  57. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
  58. package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
  59. package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
  60. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
  61. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
  62. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
  63. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
  64. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
  65. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
  66. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
  67. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
  68. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
  69. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
  70. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
  71. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
  72. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
  73. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
  74. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
  75. package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
  76. package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
  77. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
  78. package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
  79. package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
  80. package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
  81. package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
  82. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
  83. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
  84. package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
  85. package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
  86. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
  87. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
  88. package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
  89. package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
  90. package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
  91. package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
  92. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
  93. package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
  94. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
  95. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
  96. package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
  97. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
  98. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
  99. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
  100. package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
  101. package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
  102. package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
  103. package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
  104. package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
  105. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
  106. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
  107. package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
  108. package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
  109. package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
  110. package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
  111. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
  112. package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
  113. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
  114. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
  115. package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
  116. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
  117. package/skills/mobile-apps-create/SKILL.md +1 -1
  118. package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
  119. package/skills/platform-sandbox-configure/SKILL.md +108 -133
  120. package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
  121. package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
  122. package/skills/platform-widget-generate/SKILL.md +26 -18
  123. package/skills/platform-widget-generate/examples/formulas.json +191 -0
  124. package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
  125. package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
  126. package/skills/sales-call-scoring-configure/SKILL.md +318 -0
  127. package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
  128. package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
  129. package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
  130. package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
  131. package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
  132. package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
  133. package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
  134. package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
  135. package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
  136. package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
  137. package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
  138. package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
  139. package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
  140. package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
  141. package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
  142. package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
  143. package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
  144. package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
  145. package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
  146. package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
  147. package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
  148. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
  149. package/skills/service-de-channel-activate/SKILL.md +6 -5
  150. package/skills/service-de-channel-create/SKILL.md +3 -3
  151. package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
  152. package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
  153. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
  154. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
  155. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
  156. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
  157. package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
  158. package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
  159. package/skills/service-helpagent-coordinate/SKILL.md +3 -2
  160. package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
  161. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
  162. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
  163. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
  164. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
  165. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
  166. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
  167. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
  168. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
  169. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
  170. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
  171. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
  172. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
  173. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
  174. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
  175. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
  176. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
  177. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
  178. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
  179. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
  180. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
  181. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
  182. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
  183. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
  184. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
  185. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
  186. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
  187. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
  188. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
  189. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
  190. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
  191. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
  192. package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
  193. package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
  194. package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
  195. package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
  196. package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
  197. package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
  198. package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
  199. package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
  200. package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
  201. package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
  202. package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
  203. package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
  204. package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
  205. package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
  206. package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
  207. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
  208. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
  209. package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
  210. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  211. package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
  212. package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
  213. package/skills/dx-org-manage/references/cli_flags.md +0 -67
  214. package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
  215. package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
  216. package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
  217. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
  218. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
  219. /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
  220. /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **When to read this file.** Load it only when the user has selected **Voice** at Checkpoint 3 of `assets/help-agent-spec.md`. If they selected Web Chat, read `channel-web-chat.md` instead. If they selected Help Portal, delegate to the sibling skill `service-concierge-portal-generate` — do not inline portal steps here.
4
4
 
5
- Voice wires the Help Agent to an existing `PstnVoice` MessagingChannel via an inbound RoutingFlow. It does **not** provision a new phone number — number acquisition puts the org in a state that isn't cleanly retrievable, so it's out of scope for this skill. If the user has no `PstnVoice` channel yet, tell them to provision the number in Setup → Feature Settings → Service → **Communication Channels** first, then come back.
5
+ Voice wires the Help Agent to a `PstnVoice` MessagingChannel via an inbound RoutingFlow. This skill never calls the Number Management API itself — if no `PstnVoice` channel exists yet, it delegates number procurement to `service-agentforce-contact-center-coordinate`, which owns that end-to-end (fetch → procure → verify live → create the channel).
6
6
 
7
7
  ---
8
8
 
@@ -15,10 +15,20 @@ sf data query --target-org $ORG --json \
15
15
  --query "SELECT Id, DeveloperName, MasterLabel, MessagingPlatformKey, IsActive FROM MessagingChannel WHERE MessageType='PstnVoice' ORDER BY MasterLabel"
16
16
  ```
17
17
 
18
- If none are returned, stop and tell the user to provision a phone number and `PstnVoice` MessagingChannel in Setup first — this skill does not create one.
19
-
20
18
  If any are returned, present them and let the user choose. Capture the channel's `DeveloperName` as `CHANNEL_DEV_NAME`, then continue to **Step 8 — Wire the channel to the agent**. Fallback queue resolution (including the `SobjectType='VoiceCall'` requirement) is owned by `service-agentforce-channel-configure` — do not resolve or create the queue here.
21
19
 
20
+ If none are returned, continue to **No existing number** below.
21
+
22
+ ---
23
+
24
+ ## No existing number — delegate provisioning
25
+
26
+ Ask the user (`AskUserQuestion`): **provision a new number now** (delegate to `service-agentforce-contact-center-coordinate`), or **provision manually in Setup → Feature Settings → Service → Communication Channels** and come back once a `PstnVoice` channel exists.
27
+
28
+ If they choose to provision now, delegate to `service-agentforce-contact-center-coordinate`, passing `$ORG`. Instruct it to run its full number-procurement flow through channel creation, but steer the routing-model choice (its Step 7) to **Omni Queue**, not Omni Flow — the Help Agent already exists and owns its own agent authoring; Omni Flow's agent/flow-authoring steps would create a second, redundant agent. `service-agentforce-channel-configure` Branch B (this skill's Step 8, below) rewires the created channel's `SessionHandlerId`/`FallbackQueueId` to the Help Agent regardless of which routing model created it, so Omni Queue is the correct, minimal choice here.
29
+
30
+ Once `service-agentforce-contact-center-coordinate` reports the created `PstnVoice` MessagingChannel, capture its `DeveloperName` as `CHANNEL_DEV_NAME` and continue to **Step 8 — Wire the channel to the agent**.
31
+
22
32
  ---
23
33
 
24
34
  ## Step 8 — Wire the channel to the agent
@@ -42,5 +52,6 @@ Return to the Checkpoint 3 loop — offer the user the option to add another cha
42
52
 
43
53
  | Rule | Rationale |
44
54
  |---|---|
45
- | This skill never acquires a phone number | Provisioning puts the org in a state that isn't cleanly retrievable — must be done in Setup before this skill runs |
55
+ | This skill never calls the Number Management API itself | Delegate provisioning to `service-agentforce-contact-center-coordinate` — do not hand-roll fetch/procure/verify-live here |
56
+ | When delegating provisioning, steer its routing-model choice to Omni Queue | Omni Flow would author a second, redundant Agentforce agent; Branch B rewires the channel's routing to the Help Agent regardless of which model created it |
46
57
  | Never resolve or create the fallback queue here | `service-agentforce-channel-configure` owns queue resolution end to end — resolving it twice can double-prompt the user |
@@ -2,10 +2,11 @@
2
2
  name: service-itsm-agentic-setup-agentforce-coordinate
3
3
  description: "Orchestrator for setting up Agentforce in Salesforce Service Cloud ITSM — Agentforce Studio enablement, the IT Service Fulfiller agent, the IT Service Employee agent, specialized employee agents, and human escalation. Use when the user asks to set up Agentforce for ITSM, enable Studio and the Fulfiller/Employee agents together, configure employee-agent escalation, wants a guided Agentforce ITSM walkthrough, or asks what Agentforce features are available for IT Service. Presents available Agentforce capabilities and delegates each selection to a specialized child skill while tracking progress. Triggers on: set up agentforce for itsm, configure agentforce studio and fulfiller, agentforce itsm walkthrough, what agentforce features for it service. DO NOT TRIGGER when: the user asks to enable Agentforce Studio alone, asks to create or activate the Fulfiller or Employee agent alone, asks to configure escalation alone, or asks about CMDB, Incident Management, Teams, or general ITSM setup without Agentforce intent."
4
4
  metadata:
5
- version: "1.8"
5
+ version: "2.0"
6
6
  domains: ["Service", "Agentforce"]
7
7
  relatedSkills:
8
8
  - "service-agentforce-human-escalation-configure"
9
+ - "service-itsm-agentic-setup-agent-runtime-access-assign"
9
10
  - "service-itsm-agentic-setup-agentforce-studio-configure"
10
11
  - "service-itsm-agentic-setup-agentforce-studio-validate"
11
12
  - "service-itsm-agentic-setup-employee-agent-configure"
@@ -65,6 +66,8 @@ undifferentiated list. Only features with a working child skill appear in the me
65
66
 
66
67
  **Escalation-after-Employee rule (#5 depends on #3).** Employee Agent escalation (#5) configures the Employee agent's hand-off to a human, so it **requires the Employee Agent (#3) to exist and be Active** first. If #5 is selected, ensure #3 has completed successfully in this run (or was already done) before delegating to it; otherwise queue #3 ahead of #5. #5 never runs before Studio (#1) either.
67
68
 
69
+ **Runtime-access-after-creation rule (unconditional).** Whenever any Stage 2 agent (#2, #3, #4) returns a live verdict this session (`CREATED`/`ALREADY-CREATED`/`ACTIVATED`), append an automatic **Stage 3 runtime-access** step at the **back** of the queue — the post-requisite mirror of the Studio-first pre-requisite: appended always, never a menu pick — and delegate it **once** after the last Stage 2 agent to `service-itsm-agentic-setup-agent-runtime-access-assign`, covering every newly-live agent (its own target-user + confirm-to-write gates govern the grants; Stage 3 guarantees the *offer*, never a silent grant). It is non-negotiable: a live agent's actions fail on missing user permissions until this sets them up. Do **NOT** append it when only Studio ran or no agent went live (`FAILED`/`PARTIAL`/`PENDING CONFIRMATION`/`DECLINED`, or a Stage 2 verify that stopped the queue). Narration + status mapping: **Runtime access hand-off** in `examples/output-templates.md`.
70
+
68
71
  | # | Feature | Stage | Child Skill |
69
72
  |---|---------|-------|-------------|
70
73
  | 1 | Agentforce Studio enablement (Foundation for all agents) | 1 | `service-itsm-agentic-setup-agentforce-studio-configure` |
@@ -72,21 +75,22 @@ undifferentiated list. Only features with a working child skill appear in the me
72
75
  | 3 | IT Service Employee Agent | 2 | `service-itsm-agentic-setup-employee-agent-configure` |
73
76
  | 4 | Specialized Agents for Employee | 2 | `service-itsm-agentic-setup-employee-agent-configure` |
74
77
  | 5 | Employee Agent escalation | Post | `service-agentforce-human-escalation-configure` (pass the IT scenario inputs: agent `IT_Service_Employee_Agent`, queue `General_IT_Queue`, `CONTEXT_OBJECT=MessagingSession`) |
75
-
76
- **How #3 and #4 relate.** Both #3 and #4 delegate to the same child skill,
77
- `service-itsm-agentic-setup-employee-agent-configure` — the difference is which template it installs.
78
- #3 (IT Service Employee Agent) installs the **broad, ready-to-go** employee agent, which is the child
79
- skill's default whenever no specialization is named. #4 (Specialized Agents for Employee) installs a
80
- **specialized** employee agent instead — but the child skill only takes the specialized path when it
81
- is handed the name of a specialized template; handed nothing, it silently falls back to the broad
82
- agent, which would just re-create #3. So when the user selects #4, **ask which specialized employee
83
- agent they want before delegating** — offer common examples (Password Manager, Certificate Management,
84
- Onboarding, Hardware Request) and note that more are available; the child skill holds the full catalog
85
- and will disambiguate a partial or ambiguous name. Then delegate to the child skill **with that named
86
- specialization**, and it will pin the matching template (the chosen template names the agent it
87
- creates). **Never delegate #4 without a named specialization** — that is the one case that produces a
88
- duplicate broad agent. The specialized templates themselves are turned on in Stage 1 (Agentforce
89
- Studio enablement); #4 is where an agent is built and activated from one of them.
78
+ | — | Runtime access (auto after any Stage 2 create/activate; never a user pick) | 3 | `service-itsm-agentic-setup-agent-runtime-access-assign` |
79
+
80
+ **IT Service Employee Agent vs Specialized Agents for Employee.** Both delegate to the same child
81
+ skill, `service-itsm-agentic-setup-employee-agent-configure` — the difference is which template it
82
+ installs. The IT Service Employee Agent installs the **broad, ready-to-go** employee agent (the child
83
+ skill's default when no specialization is named). Specialized Agents for Employee installs a
84
+ **specialized** one instead — but the child skill only takes the specialized path when handed a
85
+ specialized template name; handed nothing it silently falls back to the broad agent, re-creating the
86
+ IT Service Employee Agent. So **before delegating Specialized Agents for Employee, ask which
87
+ specialized employee agent the user wants** — offer common examples (Password Manager, Certificate
88
+ Management, Onboarding, Hardware Request), note more are available, and let the child skill
89
+ disambiguate a partial or ambiguous name; then delegate **with that named specialization** (the chosen
90
+ template names the agent). **Never delegate Specialized Agents for Employee without a named
91
+ specialization** — that is the one case that produces a duplicate broad agent. The specialized
92
+ templates themselves are turned on in Stage 1; this item is where an agent is built and activated from
93
+ one of them.
90
94
 
91
95
  `service-itsm-agentic-setup-agentforce-studio-configure` performs its own read-and-classify
92
96
  preflight (reading live toggle state before writing) rather than delegating to
@@ -99,11 +103,11 @@ to call it as part of the delegation flow above.
99
103
  Once a child skill finishes:
100
104
 
101
105
  1. **Verify** the child skill's own deterministic verdict by running
102
- `node "<skill_dir>/scripts/verify-child-verdict.mjs" <studio|fulfiller|employee|escalation> <verdict>` — never
106
+ `node "<skill_dir>/scripts/verify-child-verdict.mjs" <studio|fulfiller|employee|escalation|runtime> <verdict>` — never
103
107
  re-derive the success/failure comparison in prose. Pass Studio's `overall` field from
104
- `classify-final-report.mjs`, Fulfiller/Employee Agent's Phase 8 aggregate verdict, or the escalation
105
- leaf's `status` (`CONFIGURED`/`ALREADY-CONFIGURED`), as
106
- `<verdict>`. Exit code `0` means advance; exit code `1` means **stop and surface the failure in
108
+ `classify-final-report.mjs`, Fulfiller/Employee Agent's Phase 8 aggregate verdict, the escalation
109
+ leaf's `status` (`CONFIGURED`/`ALREADY-CONFIGURED`), or the runtime-access skill's Phase-7 aggregate,
110
+ as `<verdict>`. Exit code `0` means advance; exit code `1` means **stop and surface the failure in
107
111
  plain language — do not advance to the next feature in the queue.** A partially-enabled Studio
108
112
  (e.g. Einstein GenAI on but the parent umbrella still blocked, `overall: PARTIAL`) will make
109
113
  Fulfiller/Employee Agent creation fail too, so the script treats `PARTIAL` the same as `FAILED`
@@ -111,6 +115,10 @@ Once a child skill finishes:
111
115
  2. **Update the status** — mark the completed feature as "Done"
112
116
  3. **Suggest the next logical step** — if another feature is available, recommend it based on the dependency order
113
117
  4. **Re-present the menu** with updated status — use the **Post-feature progress** template in `examples/output-templates.md`
118
+ 5. **Stage 3 after the Stage 2 queue drains.** Once no Stage 2 agent remains queued and at least one
119
+ went live this session, delegate the appended **Stage 3** once (per the rule above) and verify with
120
+ `verify-child-verdict.mjs runtime <verdict>` — exit `0` ⇒ Stage 3 Done → completion summary; exit
121
+ `1` ⇒ stop and surface in plain language.
114
122
 
115
123
  ### 6. Completion summary
116
124
 
@@ -133,20 +141,21 @@ Stage 2 — Agent templates: install & activate (only after Stage 1)
133
141
  3. IT Service Employee Agent (install the broad employee agent from its template and activate it)
134
142
  4. Specialized Agents for Employee (install a specialized employee agent — user picks the template — and activate it)
135
143
 
144
+ Stage 3 — Runtime access (AUTO — after any Stage 2 agent goes live, not a menu pick)
145
+ • Grant the live agent(s)' runtime feature permissions + an Agent Access permission set
146
+
136
147
  Post-setup — Human escalation (only after item 3 is active)
137
148
  5. Employee Agent escalation (configure canEscalate, outbound routing, a staffed General IT queue, and failure-threshold directives)
138
149
  ```
139
150
 
140
- Stage 1 (Agentforce Studio enablement) is the **foundation**: it turns on the org-level Agentforce
141
- and Einstein GenAI feature toggles that all the agents are **built on top of** (including the
142
- specialized employee templates). Enable it first — attempting to install or activate any agent
143
- before this foundation is enabled will fail. The three Stage 2 items (Fulfiller, Employee, and
144
- Specialized Agents for Employee) are independent siblings (none depends on the others) — they can be
145
- selected together and installed in any order once Stage 1 is done. Specialized Agents for Employee
146
- is listed right after the IT Service Employee Agent because both build employee agents from the same
147
- child skill: #3 the broad default, #4 a specialized template the user chooses. Employee Agent
148
- escalation (#5) is a post-setup action that builds on a live Employee agent, so it runs only after
149
- item 3 has succeeded.
151
+ Stage 1 (Agentforce Studio enablement) is the **foundation** — it turns on the org-level Agentforce
152
+ and Einstein GenAI toggles every agent (and the specialized employee templates) is built on, so
153
+ enable it first; any agent install/activate attempted before it will fail. The three Stage 2 items
154
+ are independent siblings, orderable freely once Stage 1 is done, and Specialized Agents for Employee
155
+ sits right after the IT Service Employee Agent because both build employee agents from the same child
156
+ skill (the broad default vs. a specialized template the user picks). Employee Agent escalation (a
157
+ post-setup action on a live Employee agent) and **Stage 3 (Runtime access)** (automatic after any
158
+ Stage 2 agent goes live — not a menu pick) are governed by their rules above.
150
159
 
151
160
  ---
152
161
 
@@ -159,7 +168,7 @@ item 3 has succeeded.
159
168
  - NEVER show features that do not have a working child skill
160
169
  - If the user says "set up everything" or "all", walk through each available feature sequentially in the recommended order, confirming between each step
161
170
  - Track progress across the conversation — do not re-present completed features as "Not done"
162
- - Specialized Agents for Employee (#4) is **re-selectable** — each run builds a *different* specialized employee agent from a template the user picks. Mark the agent just built as `Done`, but keep #4 available to run again for additional specialized agents; do not treat a completed #4 as permanently finished the way #1–#3 are. If the user picks #4 again, ask which specialized template to use next
171
+ - Specialized Agents for Employee (#4) is **re-selectable** — each run builds a *different* specialized employee agent from a template the user picks. Mark the agent just built as `Done`, but keep #4 available to run again for additional specialized agents; do not treat a completed #4 as permanently finished the way the one-and-done items are. If the user picks #4 again, ask which specialized template to use next
163
172
  - Employee Agent escalation (#5) is a **post-setup** action that requires the IT Service Employee Agent (#3) to be Active first — never delegate #5 before #3 has succeeded in this run (or was already done)
164
173
  - NEVER advance to the next feature in the queue if the current one failed or only partially
165
174
  succeeded — stop and surface the failure in plain language instead
@@ -172,6 +181,13 @@ item 3 has succeeded.
172
181
  `DUPLICATE_VALUE`, …), internal endpoint/API names, developer names (feature apiNames like
173
182
  `sales-cloud-agent-studio`), and CLI/tooling internals. Translate everything to plain, human-readable
174
183
  language. Child-skill names shown as next-step pointers are fine.
184
+ - NEVER name a feature by a bare item number in user-facing prose. The `#1`–`#5` labels (and the
185
+ menu's `#` column) are **internal shorthand** for this skill's ordering/delegation rules and a menu
186
+ selection handle only (where the user replies `1, 2`) — not feature names. In every message the user
187
+ reads — opt-out/skip, prerequisite/blocked, progress, next-step, and the completion summary — name
188
+ each feature in full, never a bare number or range like `#4` or `#1–#3`. This matters most when a
189
+ Stage 1 toggle is skipped: name the blocked and still-available features, don't say "#4 is blocked,
190
+ #1–#3 can proceed". See **Naming features in prose** in `examples/output-templates.md`.
175
191
  - If the user asks about Agentforce features that are not yet available (e.g., Requester agent, custom topic packs, agent metrics dashboards), tell them those features are not yet available in this orchestrator and will be added as their child skills merge
176
192
 
177
193
  ---
@@ -192,8 +208,10 @@ Before emitting any menu or summary in this skill, mentally confirm each of the
192
208
  - [ ] For a completion summary, the header line and closing line are chosen by the rubric in `examples/output-templates.md` (all `Done` → *Complete*; any `Not done`/`In progress` → *Finished*)
193
209
  - [ ] A feature is being configured only because the user explicitly selected it (or is being walked through sequentially with confirmation under an "all" / "everything" request)
194
210
  - [ ] Studio enablement is verified done before delegating to any Stage 2 agent (Fulfiller, Employee, or Specialized Agents for Employee)
211
+ - [ ] If any Stage 2 agent went live, Stage 3 runtime access was appended once and delegated to `service-itsm-agentic-setup-agent-runtime-access-assign` (skipped otherwise)
195
212
  - [ ] The next action delegates to a child skill, never configures a feature inline
196
213
  - [ ] No Salesforce record IDs appear in the output — human-readable names only
214
+ - [ ] No feature is named by a bare item number or range (`#4`, `#1–#3`) in user-facing prose — every feature is named in full; digits appear only as menu selection handles
197
215
 
198
216
  ---
199
217
 
@@ -6,6 +6,31 @@ Emit one of these text blocks at the corresponding step in the workflow. Setup i
6
6
  only after the Employee agent is active. Only items with a working child skill appear — hide
7
7
  placeholder rows.
8
8
 
9
+ ## Naming features in prose (never use bare item numbers)
10
+
11
+ The `#1`–`#5` labels and the menu's `#` column are internal shorthand for the ordering/delegation
12
+ rules and a **selection handle** in the menu (the user replies `1, 2`). They are **not** feature
13
+ names. In every message the user reads — opt-out/skip, prerequisite/blocked, progress, next-step, and
14
+ the completion summary — refer to each feature by its full menu name, never by a bare number or range.
15
+
16
+ This matters most when a user skips a Stage 1 platform toggle and you explain the downstream impact:
17
+
18
+ ```text
19
+ Wrong (internal positional labels leak to the user):
20
+ You skipped the Specialized Agent Templates toggle — that's the prerequisite for feature #4
21
+ (Specialized Agents for Employee). Features #1–#3 (Studio, Fulfiller agent, Employee agent) can
22
+ all proceed, but #4 will be blocked.
23
+
24
+ Right (features named in full):
25
+ You skipped the Specialized Agent Templates toggle. That toggle is the prerequisite for building
26
+ Specialized Agents for Employee, so Agentforce Studio, the IT Service Fulfiller agent, and the IT
27
+ Service Employee agent can all still be set up — but Specialized Agents for Employee can't be built
28
+ until that toggle is enabled.
29
+ ```
30
+
31
+ A digit is fine only as a menu selection handle (`reply 1, 2`); it must never stand in for a feature
32
+ name in prose, progress, or the completion summary.
33
+
9
34
  ## Feature menu (Behavior step 3)
10
35
 
11
36
  ```text
@@ -41,6 +66,8 @@ Stage 2 (install & activate). Employee Agent escalation is available after the E
41
66
 
42
67
  Reply with the numbers of the features you want to set up (one or more, e.g. `1` or `1, 2`).
43
68
  If you pick a Stage 2 template without Stage 1, I'll enable the Stage 1 foundation first.
69
+ After any Stage 2 agent is created and activated, I'll automatically set up its runtime access
70
+ (Stage 3) so it works when opened — that's not a numbered choice.
44
71
  ```
45
72
 
46
73
  Stage 1 (Agentforce Studio enablement) is the **foundation** — it enables the org-level platform
@@ -83,6 +110,8 @@ Agentforce Studio — enabled successfully
83
110
  │ 3 │ Stage 2 │ IT Service Employee Agent │ Not done │
84
111
  │ 4 │ Stage 2 │ Specialized Agents │ Not done │
85
112
  │ │ │ for Employee │ │
113
+ │ R │ Stage 3 │ Runtime access for the │ Not started │
114
+ │ │ (auto) │ agent(s) │ │
86
115
  │ 5 │ Post │ Employee Agent escalation │ Not done │
87
116
  │ │ setup │ │ │
88
117
  └───┴─────────┴───────────────────────────────┴─────────────┘
@@ -93,21 +122,50 @@ employee agent from their templates. The Fulfiller agent gives IT technicians an
93
122
  assistant for triage, case summaries, and record automations; the Employee agent
94
123
  gives requesters self-service help with their own requests; and Specialized
95
124
  Agents for Employee builds a focused employee agent (such as Password Manager or
96
- Onboarding) from a specialized template you pick.
125
+ Onboarding) from a specialized template you pick. Once an agent is live, I'll set
126
+ up its runtime access (Stage 3) automatically — no need to pick it.
97
127
  ```
98
128
 
129
+ ## Runtime access hand-off (Behavior step 5 — automatic Stage 3)
130
+
131
+ The `R` (Stage 3) row is not a menu choice. As soon as the Stage 2 queue is drained and at least one
132
+ agent went live this session (`Done`), delegate **once** to
133
+ `service-itsm-agentic-setup-agent-runtime-access-assign`, covering every newly-live agent. That skill
134
+ runs its own target-user selection and confirm-to-write gate — this orchestrator only guarantees the
135
+ hand-off happens, never a silent grant. Narrate it like this before delegating:
136
+
137
+ ```text
138
+ Your agent(s) are live. One required follow-up before anyone can use them: an activated agent's
139
+ actions call platform features the user can't run yet, so it fails the moment it's opened. I'll set
140
+ up runtime access now (Stage 3) — granting the runtime feature permissions the agent's actions use,
141
+ plus an Agent Access permission set, to the user(s) you choose.
142
+
143
+ Handing off to service-itsm-agentic-setup-agent-runtime-access-assign …
144
+ ```
145
+
146
+ Then mark the `R` row from its Phase-7 verdict: `ASSIGNED`/`ALREADY-ASSIGNED` → `Done`; `NONE-PROVISIONED`
147
+ → `No-op — nothing to assign`; the user declined the runtime skill's own gate → `Skipped by user`;
148
+ `PARTIAL`/`FAILED` → stop and surface the failure in plain language (do not mark `Done`).
149
+
99
150
  ## Completion summary (Behavior step 6)
100
151
 
101
152
  The completion summary fires either (a) after every item completes, or (b) when the user says they
102
153
  are finished — even if some items are still `Not done`. When rendering:
103
154
 
104
155
  - Substitute each row's actual tracked status: `Done`, `In progress`, or `Not done`. Do NOT
105
- hard-code `Done`.
106
- - Choose the header line based on whether every item is `Done`:
107
- - All items `Done` → `Agentforce for ITSM Setup — Complete`
108
- - Any item still `Not done` or `In progress` → `Agentforce for ITSM Setup — Finished`
156
+ hard-code `Done`. The Stage 3 (Runtime access) row is special — its status is one of `Done`
157
+ (runtime access set up), `No-op — nothing to assign` (the runtime skill found nothing provisioned
158
+ to grant), `Skipped by user` (the user declined the runtime skill's own gate), or `Not started`
159
+ (no Stage 2 agent went live, so Stage 3 never triggered).
160
+ - A row is **settled** when it is `Done`, or — for Stage 3 only — `No-op — nothing to assign`, or a
161
+ `Not started` that is correct because no agent went live. `Skipped by user` on Stage 3 (an agent
162
+ went live but runtime access was declined) is **not** settled.
163
+ - Choose the header line based on whether every item is settled:
164
+ - All items settled → `Agentforce for ITSM Setup — Complete`
165
+ - Any selected item still `Not done`/`In progress`, or Stage 3 left `Skipped by user` after an
166
+ agent went live → `Agentforce for ITSM Setup — Finished`
109
167
  - Choose the closing line based on state:
110
- - All `Done` → `Your Agentforce for ITSM setup is complete.`
168
+ - Complete → `Your Agentforce for ITSM setup is complete.`
111
169
  - Otherwise → `You have finished the items you selected. The remaining items can be resumed later by re-invoking this orchestrator.`
112
170
 
113
171
  Example — user finished after only enabling Agentforce Studio (the Stage 2 agents stayed `Not done`):
@@ -125,6 +183,8 @@ Agentforce for ITSM Setup — Finished
125
183
  │ 3 │ Stage 2 │ IT Service Employee Agent │ Not done │
126
184
  │ 4 │ Stage 2 │ Specialized Agents │ Not done │
127
185
  │ │ │ for Employee │ │
186
+ │ R │ Stage 3 │ Runtime access for the │ Not started │
187
+ │ │ (auto) │ agent(s) │ │
128
188
  │ 5 │ Post │ Employee Agent escalation │ Not done │
129
189
  │ │ setup │ │ │
130
190
  └───┴─────────┴───────────────────────────────┴─────────────┘
@@ -132,3 +192,8 @@ Agentforce for ITSM Setup — Finished
132
192
  You have finished the items you selected. The remaining items can be
133
193
  resumed later by re-invoking this orchestrator.
134
194
  ```
195
+
196
+ Here Stage 3 is `Not started` because only Studio was enabled — no agent went live, so the
197
+ runtime-access step correctly never triggered, and its unfinished status does not by itself force
198
+ `Finished` (the unselected Stage 2 items already do). Had a Stage 2 agent gone live, Stage 3 would
199
+ show `Done`, `No-op — nothing to assign`, or `Skipped by user` instead.
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  // Deterministic queue-advancement gate (authoring standard A9). Each child
3
3
  // skill already emits its own machine-readable verdict — Studio's `overall`
4
- // from classify-final-report.mjs, Fulfiller/Employee's Phase 8 aggregate — so
4
+ // from classify-final-report.mjs, Fulfiller/Employee's Phase 8 aggregate, the
5
+ // escalation leaf's `status`, the runtime-access skill's Phase-7 aggregate — so
5
6
  // this script only maps those fixed value sets to an advance/stop decision.
6
7
  // It must not be re-derived in prose; the coordinator runs this and reads the
7
8
  // exit code.
8
9
  //
9
10
  // Usage:
10
- // node verify-child-verdict.mjs <studio|fulfiller|employee|escalation> <verdict>
11
+ // node verify-child-verdict.mjs <studio|fulfiller|employee|escalation|runtime> <verdict>
11
12
  //
12
- // Exit 0 -> child succeeded, safe to advance the queue.
13
+ // Exit 0 -> child succeeded (or benign no-op), safe to advance the queue.
13
14
  // Exit 1 -> child failed or only partially succeeded, stop the queue.
14
15
  // Exit 2 -> usage error (bad args).
15
16
 
@@ -21,12 +22,28 @@ const SUCCESS_VALUES = {
21
22
  // emits CONFIGURED when every deterministic surface is satisfied; a re-run is an
22
23
  // idempotent CONFIGURED. INCOMPLETE/BLOCKED stop the queue.
23
24
  escalation: new Set(['CONFIGURED', 'ALREADY-CONFIGURED']),
25
+ // Runtime-access-assign (service-itsm-agentic-setup-agent-runtime-access-assign),
26
+ // the automatic Stage 3 after any Stage 2 agent goes live, emits its Phase-7
27
+ // aggregate: ASSIGNED (a write landed + read back) or ALREADY-ASSIGNED (all
28
+ // intended state already present). Both advance. PARTIAL / FAILED stop the queue.
29
+ runtime: new Set(['ASSIGNED', 'ALREADY-ASSIGNED']),
30
+ };
31
+
32
+ // Benign no-op verdicts: not a success (nothing was assigned) but not a failure
33
+ // either — a legitimate terminal "there is nothing to assign" state that must
34
+ // still ADVANCE (the queue is complete, not broken). Runtime-access emits
35
+ // NONE-PROVISIONED when no feature permset is provisioned AND no agent is
36
+ // activated: correct, expected, and nothing to remediate — so Stage 3 closes
37
+ // cleanly rather than reading as a stop. PARTIAL / FAILED are deliberately NOT
38
+ // here; those fall through to STOP below.
39
+ const NOOP_VALUES = {
40
+ runtime: new Set(['NONE-PROVISIONED']),
24
41
  };
25
42
 
26
43
  const [child, verdict] = process.argv.slice(2);
27
44
 
28
45
  if (!child || !verdict || !SUCCESS_VALUES[child]) {
29
- process.stderr.write('usage: node verify-child-verdict.mjs <studio|fulfiller|employee|escalation> <verdict>\n');
46
+ process.stderr.write('usage: node verify-child-verdict.mjs <studio|fulfiller|employee|escalation|runtime> <verdict>\n');
30
47
  process.exit(2);
31
48
  }
32
49
 
@@ -35,5 +52,10 @@ if (SUCCESS_VALUES[child].has(verdict)) {
35
52
  process.exit(0);
36
53
  }
37
54
 
55
+ if (NOOP_VALUES[child]?.has(verdict)) {
56
+ process.stdout.write(`ADVANCE: ${child} verdict "${verdict}" is a benign no-op — nothing to assign, queue is complete.\n`);
57
+ process.exit(0);
58
+ }
59
+
38
60
  process.stdout.write(`STOP: ${child} verdict "${verdict}" is not a success value — do not advance the queue.\n`);
39
61
  process.exit(1);
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: service-itsm-agentic-setup-cmdb-access-assign
3
- description: "Grant a specific user access to CMDB (Configuration Management Database) data in Service Cloud ITSM against a production or sandbox org by assigning the license-backed CMDB permission sets (Configuration Item Reader, Owner, Type Reader, Type Manager) and their permission-set licenses. Use when the user asks to give someone CMDB access, assign CMDB permission sets, grant a user the Configuration Item Reader/Owner role, or fix a CMDB 403 FUNCTIONALITY_NOT_ENABLED that a user still hits after the CMDB feature is already enabled. Triggers on: assign CMDB permission set, grant CMDB access, give user Configuration Item access, CMDB access for user, user still gets CMDB 403 after enable. DO NOT TRIGGER when: the user wants to turn on the CMDB feature or provision the ITOM tenant for the whole org (that is the CMDB feature-enable skill), only install a CMDB content bundle, work with CMDB records directly, or assign general (non-CMDB) permission sets to users (use dx-org-permission-set-assign)."
3
+ description: "Grant a specific user access to CMDB (Configuration Management Database) data in Service Cloud ITSM against a production or sandbox org by assigning the license-backed CMDB permission sets (Configuration Item Reader, Owner, Type Reader, Type Manager) and their permission-set licenses. Use when the user asks to give someone CMDB access, assign CMDB permission sets, grant a user the Configuration Item Reader/Owner role, or fix a CMDB 403 FUNCTIONALITY_NOT_ENABLED that a user still hits after the CMDB feature is already enabled. Triggers on: assign CMDB permission set, grant CMDB access, give user Configuration Item access, CMDB access for user, user still gets CMDB 403 after enable. DO NOT TRIGGER when: the user wants to turn on the CMDB feature or provision the CMDB tenant for the whole org (that is the CMDB feature-enable skill), only install a CMDB content bundle, work with CMDB records directly, or assign general (non-CMDB) permission sets to users (use dx-org-permission-set-assign)."
4
4
  metadata:
5
- version: "1.0"
5
+ version: "1.1"
6
6
  domains: ["Service"]
7
7
  minApiVersion: "67.0"
8
8
  relatedSkills:
@@ -13,6 +13,9 @@ metadata:
13
13
  headless-360:
14
14
  tools: ["describe", "discover", "dispatch", "dispatch_readonly"]
15
15
  semver: ">=1.0.0"
16
+ accessCheck:
17
+ - type: "orgPerm"
18
+ value: "ITSrvcsCnfgMgmnt"
16
19
  allowed-tools: |
17
20
  Read AskUserQuestion
18
21
  mcp__headless-360__discover
@@ -71,7 +74,7 @@ not specify a role, ask (see Clarifying questions) — default to **Reader + Typ
71
74
 
72
75
  - **In scope**: resolving the target user, resolving the requested CMDB permission set(s), checking
73
76
  existing assignments, assigning the permission-set license(s) and permission set(s), and verifying.
74
- - **Out of scope**: enabling the CMDB feature / provisioning the ITOM tenant (Layers 0–2 —
77
+ - **Out of scope**: enabling the CMDB feature / provisioning the CMDB tenant (Layers 0–2 —
75
78
  `service-itsm-agentic-setup-cmdb-configure`), installing content bundles, CMDB record CRUD,
76
79
  creating custom permission sets, or org-permission/edition changes.
77
80
 
@@ -173,17 +176,37 @@ Use the `Name` values from the table above. Capture each `Id` (the permission se
173
176
  (the PSL to assign). If a permission set is not found, the org likely is not CMDB-licensed — stop and
174
177
  report that CMDB does not appear to be set up on this org.
175
178
 
176
- ### Step 4 — Check existing assignments (read — idempotency)
179
+ ### Step 4 — Check existing assignments (read — idempotency, permission-set-group–aware)
177
180
 
178
- For each target user + permission set, check whether the assignment already exists:
181
+ A role can be granted **two ways**, and this check must accept **both** — or it falsely reports an
182
+ already-granted role as missing and wrongly asks to assign it:
183
+
184
+ 1. **Directly** — a `PermissionSetAssignment` whose `PermissionSetId` is the role's own permission set.
185
+ 2. **Via a permission set group (PSG)** — when the role's permission set is a *member* of a PSG the
186
+ user is assigned. There the user's `PermissionSetAssignment` row carries a `PermissionSetGroupId` and
187
+ its `PermissionSetId` is the group's internal *aggregate* set — **not** the member permission set —
188
+ so a query filtering on `PermissionSetId = '<psId>'` returns **zero** even though the user
189
+ effectively holds the role.
190
+
191
+ Run **both** permission-set reads per role; the permission set is present if **either** returns
192
+ `totalSize >= 1` (the second is a top-level semi-join — nesting it inside an `OR` throws `MALFORMED_QUERY`):
179
193
 
180
194
  ```text
181
195
  dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id FROM PermissionSetAssignment WHERE AssigneeId = '<userId>' AND PermissionSetId = '<psId>'" } })
196
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id FROM PermissionSetAssignment WHERE AssigneeId = '<userId>' AND PermissionSetGroupId IN (SELECT PermissionSetGroupId FROM PermissionSetGroupComponent WHERE PermissionSetId = '<psId>')" } })
197
+ ```
198
+
199
+ Then check the backing license (a PSG that includes the role also assigns its backing PSL directly, so
200
+ this single read already covers the PSG case):
201
+
202
+ ```text
182
203
  dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id FROM PermissionSetLicenseAssign WHERE AssigneeId = '<userId>' AND PermissionSetLicenseId = '<pslId>'" } })
183
204
  ```
184
205
 
185
- If both already exist for a role, that role is **already assigned** — skip its writes and record it as
186
- already-done. Only assign what is missing.
206
+ If the permission set is present by **either** path **and** the license read returns `totalSize >= 1`,
207
+ that role is **already assigned** — skip its writes and record it as already-done. Only assign what is
208
+ genuinely missing, and do **not** re-assign the member permission set directly when the user already
209
+ holds it through a PSG.
187
210
 
188
211
  ### Step 5 — Assign the permission-set license, then the permission set (write — confirm first)
189
212
 
@@ -204,9 +227,10 @@ dispatch({ "url": "/services/data/v67.0/sobjects/PermissionSetAssignment", "meth
204
227
 
205
228
  ### Step 6 — Verify (read — do NOT trust the POST response alone)
206
229
 
207
- Re-run the Step 4 queries. Confirm each requested role now has **both** a `PermissionSetAssignment`
208
- and a `PermissionSetLicenseAssign` for the user. Report per-role: assigned / already had it. Only
209
- roles confirmed present in this read count as done.
230
+ Re-run the Step 4 reads — **both** the direct and the via-PSG permission-set checks, plus the license
231
+ check. A role counts as done only when its permission set is present by **either** path **and** its
232
+ backing license reads back. Report per-role: assigned / already had it. Only roles confirmed present in
233
+ this read count as done.
210
234
 
211
235
  ---
212
236
 
@@ -266,6 +290,7 @@ into what it means ("CMDB isn't turned on for this org yet"), rather than echoin
266
290
  | Feature status not `ENABLED` (or `403` on the status read) | Org-level CMDB gate not lifted | CMDB must be turned on for the org first; this is a separate setup step — point to the feature-enable skill |
267
291
  | Permission set not found | Org is not CMDB-licensed / not set up | CMDB does not appear to be available on this org; confirm it is licensed and enabled |
268
292
  | `403 FUNCTIONALITY_NOT_ENABLED` on a **bundle-management** read (e.g. `bundles/details`, `bundleListView`) after assignment, feature ENABLED | The user holds Reader/Owner/Type Reader but not **Type Manager** — bundle operations require it | Assign **Type Manager** — this role is required for CMDB bundle management; the other CMDB roles do not cover bundle operations |
293
+ | Skill says a CMDB role is missing and asks to assign it, but the user already has it (e.g. through a permission set group) | Idempotency check saw only *directly* assigned permission sets and was blind to group-delivered grants — fixed in Step 4, which now also checks group membership | The user already has that access through a permission set group; treat the role as already granted — no new assignment is needed |
269
294
  | `400 DUPLICATE_VALUE` on assign | User already has that access | Not an error — report the role as already assigned |
270
295
  | License-limit / no-seats error on assign | CMDB permission-set license seats exhausted | Report seats in use vs available; a seat must free up (or more licenses added) before assigning |
271
296
  | `dispatch*` auth error | headless-360 MCP session not authenticated / token expired | Re-authenticate the headless-360 MCP connection and confirm the session points at the intended org |
@@ -148,8 +148,15 @@ the org is not CMDB-licensed — stop and report.
148
148
 
149
149
  ---
150
150
 
151
- ## Step 4 — Check existing assignments (read — idempotency)
151
+ ## Step 4 — Check existing assignments (read — idempotency, permission-set-group–aware)
152
152
 
153
+ A role's permission set can be held **directly** or as a **member of a permission set group (PSG)** the
154
+ user is assigned. A PSG-delivered grant produces a `PermissionSetAssignment` whose `PermissionSetGroupId`
155
+ is populated and whose `PermissionSetId` is the group's internal *aggregate* set — **not** the member
156
+ permission set — so filtering on `PermissionSetId = '<psId>'` alone returns `0` for it. Run **both**
157
+ permission-set reads; the permission set is present if **either** returns `totalSize >= 1`.
158
+
159
+ ### Directly assigned
153
160
  ```json
154
161
  mcp__headless-360__dispatch_readonly({
155
162
  "url": "/services/data/v67.0/query",
@@ -158,6 +165,16 @@ mcp__headless-360__dispatch_readonly({
158
165
  })
159
166
  ```
160
167
 
168
+ ### Via a permission set group (top-level semi-join — nesting this inside an `OR` throws `MALFORMED_QUERY`)
169
+ ```json
170
+ mcp__headless-360__dispatch_readonly({
171
+ "url": "/services/data/v67.0/query",
172
+ "method": "GET",
173
+ "queryParams": { "q": "SELECT Id FROM PermissionSetAssignment WHERE AssigneeId = '<userId>' AND PermissionSetGroupId IN (SELECT PermissionSetGroupId FROM PermissionSetGroupComponent WHERE PermissionSetId = '<psId>')" }
174
+ })
175
+ ```
176
+
177
+ ### Backing license (a PSG that includes the role assigns its PSL directly, so this one read covers the PSG case)
161
178
  ```json
162
179
  mcp__headless-360__dispatch_readonly({
163
180
  "url": "/services/data/v67.0/query",
@@ -166,8 +183,9 @@ mcp__headless-360__dispatch_readonly({
166
183
  })
167
184
  ```
168
185
 
169
- `totalSize == 1` on both → that role is already assigned; skip its writes. Otherwise assign what is
170
- missing (PSL and/or permission set).
186
+ Permission set present by **either** path **and** the license read `totalSize >= 1` → that role is
187
+ already assigned; skip its writes. Otherwise assign what is missing (PSL and/or permission set). Do
188
+ **not** re-assign the member permission set directly when the user already holds it through a PSG.
171
189
 
172
190
  ---
173
191
 
@@ -204,8 +222,9 @@ Response on success: `{ "id": "0Pa...", "success": true }` (`201`). On `400`, re
204
222
 
205
223
  ## Step 6 — Verify (read)
206
224
 
207
- Re-run the Step 4 queries. A role counts as assigned only when **both** the `PermissionSetAssignment`
208
- and the `PermissionSetLicenseAssign` return `totalSize == 1` for the user. Report per role.
225
+ Re-run the Step 4 reads — **both** the direct and the via-PSG permission-set checks, plus the license
226
+ check. A role counts as assigned only when its permission set is present by **either** path **and** the
227
+ `PermissionSetLicenseAssign` returns `totalSize >= 1` for the user. Report per role.
209
228
 
210
229
  ---
211
230
 
@@ -257,4 +276,5 @@ before the assignment can succeed.
257
276
  | `PermissionSet` query `totalSize == 0` | Org not CMDB-licensed / not set up | CMDB is not available on this org; confirm it is licensed and enabled |
258
277
  | `User` query `totalSize == 0` / `> 1` | User not found / ambiguous | Ask the user to confirm the username, or pick from the listed candidates |
259
278
  | `403 FUNCTIONALITY_NOT_ENABLED` on a bundle-management read (`bundles/details`, `bundleListView`) after assign | User lacks **Type Manager** — bundle operations require it, Reader/Owner/Type Reader do not clear it | Assign the **Type Manager** role (PS `ItSrvcCnfgItmTypManagerPermissionSet` + its own PSL `ItSrvcCnfgItmTypMgrPsl`), then re-verify via Step 6 |
279
+ | Step 4 reports a role missing (skill asks to assign it) but the user already has it via a **permission set group** | Direct-only `PermissionSetId` filter is blind to PSG-delivered grants — the PSA row carries `PermissionSetGroupId` and the group's aggregate `PermissionSetId`, not the member set | Use the via-PSG semi-join in Step 4; a role present by **either** path is already assigned — do not re-assign it |
260
280
  | `dispatch*` auth error | headless-360 MCP session not authenticated / token expired | Re-authenticate the headless-360 MCP connection; confirm the session points at the intended org |
@@ -39,7 +39,7 @@ identically against **production** and sandbox with no per-user MCP install.
39
39
 
40
40
  - **In scope**: confirming CMDB is enabled, reading the live bundle catalog, resolving the exact
41
41
  version of the base bundle, installing the **base** (`CMDB Foundation`) bundle, and verifying.
42
- - **Out of scope**: enabling the CMDB feature / provisioning the ITOM tenant (Layers 0–2 —
42
+ - **Out of scope**: enabling the CMDB feature / provisioning the CMDB tenant (Layers 0–2 —
43
43
  `service-itsm-agentic-setup-cmdb-configure`), assigning permission sets (Layer 3 —
44
44
  `service-itsm-agentic-setup-cmdb-access-assign`), installing **optional add-on** bundles (e.g.
45
45
  Component Identification Rules), CMDB record CRUD, or Discovery.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: service-itsm-agentic-setup-cmdb-configure
3
- description: "Enable the CMDB (Configuration Management Database) feature in Service Cloud ITSM against a production or sandbox org: verify the CMDB org SKU, provision the ITOM tenant, and enable the service-cloud-itsm-cmdb-integration feature that lifts the CMDB access gate. Use when the user asks to enable CMDB, turn on the Configuration Management Database, provision the ITOM tenant, enable the CMDB feature, or fix a CMDB 403 FUNCTIONALITY_NOT_ENABLED error. Triggers on: enable CMDB feature, provision ITOM tenant, turn on CMDB, CMDB not enabled, CMDB 403 error, service-cloud-itsm-cmdb-integration. DO NOT TRIGGER when: the user only wants to assign CMDB permission sets to users, only install a CMDB content bundle, or work with CMDB records directly."
3
+ description: "Enable the CMDB (Configuration Management Database) feature in Service Cloud ITSM against a production or sandbox org: verify the CMDB org SKU, provision the CMDB tenant, and enable the service-cloud-itsm-cmdb-integration feature that lifts the CMDB access gate. Use when the user asks to enable CMDB, turn on the Configuration Management Database, provision the CMDB tenant, enable the CMDB feature, or fix a CMDB 403 FUNCTIONALITY_NOT_ENABLED error. Triggers on: enable CMDB feature, provision CMDB tenant, turn on CMDB, CMDB not enabled, CMDB 403 error, service-cloud-itsm-cmdb-integration. DO NOT TRIGGER when: the user only wants to assign CMDB permission sets to users, only install a CMDB content bundle, or work with CMDB records directly."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  domains: ["Service"]
@@ -57,7 +57,7 @@ Layer 2. This skill's job is to make that gate return true.
57
57
 
58
58
  ## Scope
59
59
 
60
- - **In scope**: verifying the CMDB org permission (Layer 0), triggering + polling ITOM tenant
60
+ - **In scope**: verifying the CMDB org permission (Layer 0), triggering + polling CMDB tenant
61
61
  provisioning (Layer 1), pre-checking + enabling + verifying the CMDB feature (Layer 2).
62
62
  - **Out of scope**: permission-set assignment (Layer 3 — `service-itsm-agentic-setup-cmdb-access-assign`),
63
63
  bundle installation (Layer 4 — `service-itsm-agentic-setup-cmdb-bundle-deploy`), CMDB record CRUD,
@@ -126,9 +126,9 @@ The core Connect API `GET /services/data/v63.0/setup/org/permissions/ITSrvcsCnfg
126
126
  `references/mcp-invocation.md` for the details. If no probe resolves, report that the org perm could
127
127
  not be verified and ask the user to confirm the org has CMDB licensed before continuing.
128
128
 
129
- ### Layer 1 — Provision the ITOM tenant
129
+ ### Layer 1 — Provision the CMDB tenant
130
130
 
131
- CMDB runs on an ITOM tenant that must reach status `PROVISIONED` (asynchronous).
131
+ CMDB runs on a dedicated tenant (the CMDB tenant) that must reach status `PROVISIONED` (asynchronous).
132
132
 
133
133
  1. **Check current status** (read):
134
134
  ```text
@@ -261,7 +261,7 @@ CMDB Feature Enable — Complete (via service-itsm-agentic-setup-cmdb-configure)
261
261
  Target org: <org>
262
262
 
263
263
  CMDB license .................. Present
264
- ITOM tenant ................... Provisioned
264
+ CMDB tenant ................... Provisioned
265
265
  CMDB feature .................. Enabled
266
266
 
267
267
  CMDB is now enabled on this org. Next steps:
@@ -75,7 +75,7 @@ user to confirm CMDB is licensed before proceeding.
75
75
 
76
76
  ---
77
77
 
78
- ## Layer 1 — Provision the ITOM tenant
78
+ ## Layer 1 — Provision the CMDB tenant
79
79
 
80
80
  ### Check current provisioning status (read)
81
81