@salesforce/afv-skills 1.55.0 → 1.57.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 (274) 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/commerce-b2b-open-code-components-integrate/SKILL.md +1 -1
  19. package/skills/commerce-b2b-open-code-components-replace/SKILL.md +16 -16
  20. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
  21. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
  22. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
  23. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
  24. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
  25. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
  26. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
  27. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
  28. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
  29. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
  30. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
  31. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
  32. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
  33. package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
  34. package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
  35. package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
  36. package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
  37. package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
  38. package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
  39. package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
  40. package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
  41. package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
  42. package/skills/dx-devops-project-manage/SKILL.md +1 -1
  43. package/skills/dx-org-analyze/SKILL.md +0 -1
  44. package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
  45. package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
  46. package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
  47. package/skills/dx-org-manage/SKILL.md +6 -50
  48. package/skills/dx-org-manage/examples/README.md +10 -16
  49. package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
  50. package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
  51. package/skills/dx-org-shape-manage/SKILL.md +4 -3
  52. package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
  53. package/skills/experience-accessibility-validate/SKILL.md +8 -5
  54. package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
  55. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
  56. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
  57. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
  58. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
  59. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
  60. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
  61. package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
  62. package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
  63. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
  64. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
  65. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
  66. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
  67. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
  68. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
  69. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
  70. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
  71. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
  72. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
  73. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
  74. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
  75. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
  76. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
  77. package/skills/experience-cms-content-generate/SKILL.md +1 -1
  78. package/skills/experience-cms-content-render/SKILL.md +3 -3
  79. package/skills/experience-cms-content-render/assets/angular/MediaRenderer.component.ts +35 -7
  80. package/skills/experience-cms-content-render/assets/angular/cms-item.service.ts +13 -4
  81. package/skills/experience-cms-content-render/assets/react/MediaRenderer.tsx +30 -8
  82. package/skills/experience-cms-content-render/assets/react/useCmsItem.ts +14 -4
  83. package/skills/experience-cms-content-render/assets/shared/cmsCore.types.ts +11 -1
  84. package/skills/experience-cms-content-render/assets/shared/externalRefs.ts +1 -1
  85. package/skills/experience-cms-content-render/assets/shared/mediaLabels.ts +62 -0
  86. package/skills/experience-cms-content-render/references/init-scaffold.md +13 -6
  87. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -1
  88. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
  89. package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
  90. package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
  91. package/skills/experience-lwc-design-generate/SKILL.md +1 -1
  92. package/skills/experience-lwc-legacy-migrate/SKILL.md +212 -0
  93. package/skills/experience-lwc-legacy-migrate/assets/lo20-host-page-template.html +192 -0
  94. package/skills/experience-lwc-legacy-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
  95. package/skills/experience-lwc-legacy-migrate/references/lightning-out-2-system-reference.md +495 -0
  96. package/skills/experience-lwc-legacy-migrate/references/lightning-out-beta-to-2-migration.md +824 -0
  97. package/skills/experience-lwc-legacy-migrate/scripts/convert-lo-names.py +94 -0
  98. package/skills/experience-lwc-legacy-migrate/scripts/validate-lo20-page.py +133 -0
  99. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
  100. package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
  101. package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
  102. package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
  103. package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
  104. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
  105. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
  106. package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
  107. package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
  108. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
  109. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
  110. package/skills/experience-ui-bundle-project-generate/SKILL.md +1 -1
  111. package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
  112. package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
  113. package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
  114. package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
  115. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
  116. package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
  117. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
  118. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
  119. package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
  120. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
  121. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
  122. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
  123. package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
  124. package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
  125. package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
  126. package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
  127. package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
  128. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
  129. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
  130. package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
  131. package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
  132. package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
  133. package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
  134. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
  135. package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
  136. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
  137. package/skills/integration-connectivity-connected-app-configure/SKILL.md +5 -5
  138. package/skills/integration-connectivity-generate/SKILL.md +10 -10
  139. package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +2 -2
  140. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
  141. package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
  142. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
  143. package/skills/mobile-apps-create/SKILL.md +1 -1
  144. package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
  145. package/skills/platform-apex-test-generate/SKILL.md +1 -1
  146. package/skills/platform-apex-test-run/SKILL.md +1 -1
  147. package/skills/platform-custom-field-generate/SKILL.md +1 -1
  148. package/skills/platform-custom-lightning-type-generate/SKILL.md +1 -1
  149. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -1
  150. package/skills/platform-custom-object-generate/SKILL.md +1 -1
  151. package/skills/platform-custom-report-type-generate/SKILL.md +1 -1
  152. package/skills/platform-custom-setting-generate/SKILL.md +1 -1
  153. package/skills/platform-data-and-tooling-api-context-get/SKILL.md +1 -1
  154. package/skills/platform-data-manage/SKILL.md +10 -10
  155. package/skills/platform-flexipage-generate/SKILL.md +1 -1
  156. package/skills/platform-lightning-app-coordinate/SKILL.md +1 -1
  157. package/skills/platform-metadata-api-context-get/SKILL.md +1 -1
  158. package/skills/platform-metadata-retrieve/SKILL.md +1 -1
  159. package/skills/platform-permission-set-generate/SKILL.md +1 -1
  160. package/skills/platform-report-generate/SKILL.md +1 -1
  161. package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +4 -4
  162. package/skills/platform-sandbox-configure/SKILL.md +108 -133
  163. package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
  164. package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
  165. package/skills/platform-sharing-owd-configure/SKILL.md +1 -1
  166. package/skills/platform-sharing-rules-generate/SKILL.md +1 -1
  167. package/skills/platform-soql-query/SKILL.md +1 -1
  168. package/skills/platform-value-set-generate/SKILL.md +1 -1
  169. package/skills/platform-widget-generate/SKILL.md +26 -18
  170. package/skills/platform-widget-generate/examples/formulas.json +191 -0
  171. package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
  172. package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
  173. package/skills/sales-call-scoring-configure/SKILL.md +318 -0
  174. package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
  175. package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
  176. package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
  177. package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
  178. package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
  179. package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
  180. package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
  181. package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
  182. package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
  183. package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
  184. package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
  185. package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
  186. package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
  187. package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
  188. package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
  189. package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
  190. package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
  191. package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
  192. package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
  193. package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
  194. package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
  195. package/skills/service-agentforce-human-escalation-configure/SKILL.md +4 -0
  196. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +26 -6
  197. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +5 -4
  198. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
  199. package/skills/service-de-channel-activate/SKILL.md +6 -5
  200. package/skills/service-de-channel-create/SKILL.md +3 -3
  201. package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
  202. package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
  203. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
  204. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
  205. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
  206. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
  207. package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
  208. package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
  209. package/skills/service-de-waba-integrate/SKILL.md +2 -1
  210. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -0
  211. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +29 -0
  212. package/skills/service-email-to-case-configure/SKILL.md +1 -1
  213. package/skills/service-helpagent-coordinate/SKILL.md +3 -2
  214. package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
  215. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
  216. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
  217. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
  218. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
  219. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
  220. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
  221. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
  222. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
  223. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
  224. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
  225. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
  226. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
  227. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
  228. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
  229. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
  230. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
  231. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
  232. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
  233. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
  234. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
  235. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
  236. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
  237. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
  238. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
  239. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
  240. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
  241. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
  242. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
  243. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
  244. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
  245. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
  246. package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
  247. package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
  248. package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
  249. package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
  250. package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
  251. package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
  252. package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
  253. package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
  254. package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
  255. package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
  256. package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
  257. package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
  258. package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
  259. package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
  260. package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
  261. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
  262. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
  263. package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
  264. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  265. package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
  266. package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
  267. package/skills/dx-org-manage/references/cli_flags.md +0 -67
  268. package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
  269. package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
  270. package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
  271. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
  272. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
  273. /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
  274. /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
@@ -0,0 +1,148 @@
1
+ # Feature: Incident Management Preferences (inline execution)
2
+
3
+ How the orchestrator executes the **Preferences** feature — reading and setting the **six per-feature
4
+ Incident Management preferences** (the feature toggles on the Incident Management setup page). This runs
5
+ **inline** through the Salesforce-hosted **`headless-360`** MCP server (server key `headless-360`) via its
6
+ four meta-tools (`discover`, `describe`, `dispatch_readonly`, `dispatch`). The org comes from the OAuth JWT
7
+ on the MCP session — never handle an org id, alias, or credentials. Minimum API version **67.0**.
8
+
9
+ This is **not** the master Incident Management on/off switch (`service-itsm-incident-mgmt-configure`) nor
10
+ the Incident Priority Matrix (`service-itsm-incident-priority-configure`).
11
+
12
+ ## Delegate to the system of record
13
+
14
+ Every operation is delegated to a system of record (SOR) and its exact shape is fetched at runtime:
15
+ `discover` the operation by intent, `describe` the SOR for its **current** steps, routes, argument schema,
16
+ the preference list, the on-screen labels, and its `agent_guidance`, then `dispatch_readonly` (reads) /
17
+ `dispatch` (writes). **Hardcode no routes, preference names, labels, or request bodies — use what
18
+ `describe` returns, and if it disagrees with anything here, `describe` wins.** Discover by intent, not by
19
+ id; a `discover` miss is not proof an operation is unavailable.
20
+
21
+ | SOR | Owns | Status |
22
+ |-----|------|--------|
23
+ | **`IncidentMgmt`** (owning team ITSM-Aditya; controller `IPCManagementSetupController`) | Read a preference; toggle a preference; verify a preference read-back | Served |
24
+
25
+ Discover by intent — e.g. `discover("configure ITSM incident management preferences: automatically triage
26
+ incidents, assign incidents with Einstein, enable rich text for incident descriptions")`.
27
+
28
+ > **Resolve the right node — load-bearing.** Two setup nodes share the "Incident" name. Target the
29
+ > **ITSM Incident Management org-preferences** node (controller `IPCManagementSetupController`) whose
30
+ > toggles are the six below — **not** the Service-Foundation "Incident Management" node
31
+ > (`IncidentMgmtSetupController`), whose toggles are broadcast/notification channels (Email/Sites/Alerts/
32
+ > Slack) and a master switch. If a `discover` result is about broadcast channels or a master on/off, it is
33
+ > the wrong node.
34
+
35
+ ## Operations (shapes come from `describe`)
36
+
37
+ 1. **Read a preference (read).** Given a preference name, return its Boolean state. Unknown names are **not
38
+ validated on read** — they return `false` rather than raising — so only ever read a preference the SOR
39
+ lists; a `false` read is not proof a name is valid.
40
+ 2. **Toggle a preference (write — confirm first).** Set a named preference enabled/disabled. An unknown
41
+ name raises. The two one-way preferences cannot be set to disabled.
42
+ 3. **Verify (read).** Read the changed preference back and expect it to equal the value just set.
43
+
44
+ ## The six preferences (name → label; `describe`/`agent_guidance` is authoritative)
45
+
46
+ | Preference name | Setup label | One-way |
47
+ |-----------------|-------------|---------|
48
+ | `IncidentValidationsEnabled` | Default Field Validations for Incidents | No |
49
+ | `AutoClosureChildIncidents` | Automatically Close Child Incidents | No |
50
+ | `IncidentTriageAgentEnabled` | Automatically Triage Incidents | No |
51
+ | `IncAssignWithAgentEnabled` | Assign Incidents with Einstein | No |
52
+ | `AssignedGroupValidationEnabled` | Restrict Assigned Group to Regular Groups | **Yes** |
53
+ | `RtaIncidentDescEnabled` | Enable Rich Text for Incident Descriptions | **Yes** |
54
+
55
+ Read the live list and labels from `describe` at runtime — this table is the authoring snapshot for trigger
56
+ phrasing and the known-name enumeration.
57
+
58
+ ## Invariants — the contract
59
+
60
+ - **Two preferences are one-way / enable-only:** `RtaIncidentDescEnabled` and
61
+ `AssignedGroupValidationEnabled`. Once enabled they cannot be disabled. Never offer to disable them;
62
+ require an explicit "I understand this can't be undone" confirmation before enabling; never enable one
63
+ merely to test.
64
+ - **`AssignedGroupValidationEnabled` also freezes once the org has any Incident record** — it is settable
65
+ only while the org has no incidents. An enable can therefore **fail outright** when incidents already
66
+ exist; surface pre-existing incidents as the likely cause and do **not** retry.
67
+ - **Read does not validate the preference name** (unknown → `false`, no error); only the write is
68
+ allowlisted (unknown → raises). Enumerate only the six the SOR lists.
69
+ - **Access gate:** the caller needs `IncidentMgmt.userHasITSMSetupAccess` (sysadmin OR Customize
70
+ Application + Modify All Data + View Setup). Without it every read and write is blocked by the controller.
71
+ - **Idempotent** — read before every write; skip a write when the preference is already in the requested
72
+ state.
73
+ - **Verify by read-back** — the write response alone is not proof the change persisted.
74
+
75
+ ## Preconditions
76
+
77
+ - **Setup access**: the caller needs ITSM setup access. Without it every read and write is blocked —
78
+ surface the raw access error and stop.
79
+ - **Incident Management provisioned**: these preferences are writable only when Incident Management is
80
+ enabled at the feature/license level. If reads or writes fail with an availability error, say the feature
81
+ must be enabled first (`service-itsm-incident-mgmt-configure`) and stop.
82
+
83
+ ## Workflow
84
+
85
+ The SOR's `agent_guidance` (returned by `describe`) carries the detailed flow and current labels; follow
86
+ it. In outline — **read before you write, confirm before every write, verify every write by read-back**,
87
+ and act only on the preferences the user chose:
88
+
89
+ 1. **Read current state** — read each of the six preferences and report which are on and which are off,
90
+ flagging the two one-way ones.
91
+ 2. **Ask which to change** — never infer; for a one-way enable, take the explicit can't-be-undone
92
+ confirmation here. On any non-yes, stop without writing.
93
+ 3. **Apply only the chosen preferences** — skip any already in the requested state (idempotent no-op).
94
+ 4. **Verify** — read each changed preference back; report success only when it read back as set.
95
+
96
+ ## Clarifying questions
97
+
98
+ - **Which preference(s)?** If unstated, present the six (by label, flagging the two one-way) and let the
99
+ user pick.
100
+ - **Enable or disable?** Required for a change; never infer direction from current state. Disable is not
101
+ offered for the two one-way preferences.
102
+ - **Which org?** Confirm it and state plainly the org will be **modified**. For production, get explicit
103
+ confirmation. Enabling a one-way preference is permanent.
104
+
105
+ ## Output expectations
106
+
107
+ ```text
108
+ Default Field Validations for Incidents ...... On | Off
109
+ Automatically Close Child Incidents .......... On | Off
110
+ Automatically Triage Incidents ............... On | Off
111
+ Assign Incidents with Einstein ............... On | Off
112
+ Restrict Assigned Group to Regular Groups .... On | Off (one-way)
113
+ Enable Rich Text for Incident Descriptions ... On | Off (one-way)
114
+
115
+ Changed: <label> Off → On (SUCCEEDED | ALREADY-ON | FAILED)
116
+ ```
117
+
118
+ Report only what read-back confirmed. On a failure, stop and say — in plain language — what did not succeed
119
+ and what it means (e.g. "that setting can't be turned on once incidents exist").
120
+
121
+ ## Common failures (surface in plain language)
122
+
123
+ | Symptom | Likely cause | What to tell the user |
124
+ |---------|--------------|-----------------------|
125
+ | Enable of "Restrict Assigned Group…" fails | The org already has Incident records (server freezes it) | That setting can only be turned on before any incidents exist; it can't be enabled now |
126
+ | Read/write blocked with an access error | Caller lacks ITSM setup access | An admin with setup access must make this change |
127
+ | Read/write unavailable on the org | Incident Management not enabled | Enable Incident Management first (`service-itsm-incident-mgmt-configure`) |
128
+ | Change didn't persist on read-back | Write did not take | Report it as failed and show the current state; do not claim success |
129
+ | `dispatch*` auth error | headless-360 session not authenticated / expired | Re-authenticate the connection and confirm it points at the intended org |
130
+
131
+ ## Reading `dispatch` results
132
+
133
+ Responses come back wrapped as `{ status_code, body }`; read what you need from `body`. A preference read
134
+ returns a Boolean in `body`. A write success persists (no meaningful body). A service error on a write =
135
+ either a preference name outside the six, **or** a one-way freeze (e.g. `AssignedGroupValidationEnabled`
136
+ with incidents already present) — surface the specific cause, do not retry blindly. A `401` / `403` =
137
+ missing setup access or an unauthenticated session. A `404` = the operation is not available on this org
138
+ (feature not enabled).
139
+
140
+ ## Dead ends — do NOT do these
141
+
142
+ - Write an HTTP route or a request body here — delegate to the SOR and let `describe` carry the shape.
143
+ - Offer to disable a one-way preference, or enable one just to "test" it.
144
+ - Read or write against the Service-Foundation `IncidentManagement` node (broadcast channels) — wrong node.
145
+ - Read or write any preference name the SOR does not list — an unknown name reads as `false` and is
146
+ rejected on write.
147
+ - Toggle the **master** Incident Management switch here (`service-itsm-incident-mgmt-configure`) or the
148
+ **Incident Priority Matrix** (`service-itsm-incident-priority-configure`).
@@ -0,0 +1,162 @@
1
+ # Feature: Major Incident Management (inline execution)
2
+
3
+ How the orchestrator executes the **Major Incident Management (MIM)** feature. MIM setup is **two surfaces**
4
+ layered on top of base Incident Management: (1) the **major-incident approval group**, and (2) **two MIM org
5
+ preferences**. This runs **inline** through the Salesforce-hosted
6
+ **`headless-360`** MCP server (server key `headless-360`) via its four meta-tools (`discover`, `describe`,
7
+ `dispatch_readonly`, `dispatch`). The org comes from the OAuth JWT on the MCP session — never handle an org
8
+ id, alias, or credentials. Minimum API version **67.0**.
9
+
10
+ ## Delegate every operation to the MIM system of record
11
+
12
+ The **Major Incident Management SOR** is the single source of truth for **how** each step is done — the
13
+ route, method, request/response shape, field names, per-step `status`, and `depends_on` ordering. It is
14
+ **actively evolving**, so **never hardcode a route or request body**. Carry only the **goal, scope,
15
+ ordering, and invariants**, and at runtime:
16
+
17
+ 1. `discover` the operation by intent (e.g. `"set major incident approval group"`, `"validate major
18
+ incident approval group users"`, `"toggle major incident org preference"`).
19
+ 2. `describe` the returned SOR / operation for its **current** route, method, argument schema, and `status`.
20
+ 3. `dispatch_readonly` (reads) / `dispatch` (writes) the route the SOR names.
21
+
22
+ **Use what `describe` returns — not any shape written here. If `describe` and this file disagree, `describe`
23
+ wins.** A `discover` miss does not prove a route is absent — generic `/query` and `/sobjects/...` REST
24
+ routes are not always ranked first; only a `404` from the dispatch itself means a route is unavailable.
25
+ Read each step's `status` from `describe`: `implemented` = live; `proposed` = not served on every org yet.
26
+
27
+ > **MIM is configured by the two surfaces below.** The only feature that must be *on* first is **base**
28
+ > Incident Management (`service-itsm-incident-mgmt-configure`) — see Preconditions.
29
+
30
+ ### Transports MIM uses (all via the same `dispatch*` tools)
31
+
32
+ | Transport | Shape of the `url` | Used by |
33
+ |-----------|--------------------|---------|
34
+ | **Aura controller** | `/headless/invoke/platform/mim/<method>` | approval-group + org-preference + group-user-validation routes |
35
+ | **sObject REST** | `/services/data/v67.0/sobjects/...` and `/services/data/v67.0/query` | license / public-group / member records used as **preconditions** |
36
+
37
+ `dispatch` takes **raw HTTP** — a full `url`, `method`, and optional `body`/`queryParams`, not
38
+ `{operation_id, arguments}`.
39
+
40
+ ## Scope
41
+
42
+ - **In scope**: designating / clearing / reassigning the **major-incident approval group** (a User or a
43
+ public Group); **group-user validation**; reading and toggling the **two** MIM org preferences; and, as a
44
+ precondition, licensing approvers with the **Major Incident Manager permission-set license** and standing
45
+ up the approvers **public group**. Verify every write by read-back.
46
+ - **Out of scope**: base Incident Management enablement
47
+ (`service-itsm-incident-mgmt-configure` — a prerequisite); the Incident Fulfiller / Incident Manager
48
+ **persona** PSG (the orchestrator's **Persona** feature — see `references/incident-persona-psg.md`);
49
+ Problem / Change / Case Management; the Priority Matrix; SLA / entitlement setup; any MIM org preference
50
+ **other than** the two allowlisted.
51
+
52
+ ## Preconditions
53
+
54
+ The acting user needs **ITSM setup access** (the SOR gates every MIM route on it), and:
55
+
56
+ 1. **Base Incident Management must be enabled** — MIM layers on it. If it is off, **stop and hand off** to
57
+ `service-itsm-incident-mgmt-configure`; do not configure MIM without base Incident Management.
58
+ 2. **Approvers must hold the Major Incident Manager permission-set license.** This is a **LICENSE** —
59
+ granted via `PermissionSetLicenseAssign` (`{AssigneeId, PermissionSetLicenseId}`), **never** a
60
+ `PermissionSetAssignment`. Group-user validation requires every direct and transitive user of a group
61
+ approver to hold it. If a designated user lacks it (or the approvers group does not exist yet), prepare
62
+ that first — this is **precondition prep, not MIM activation**. A **Regular** public group; add each
63
+ **licensed** user; **license before membership**.
64
+
65
+ If a `dispatch*` returns `401` / `403` / `404`, do **not** fabricate state — surface the raw error and
66
+ stop. `403` usually means the acting user lacks ITSM setup access.
67
+
68
+ ## The two surfaces — SOR step map (targets for `describe`)
69
+
70
+ Describe each before calling; the ids are stable handles, the shapes come from `describe`.
71
+
72
+ ### Surface 1 — approval group
73
+
74
+ | Step id | Transport | Purpose |
75
+ |---------|-----------|---------|
76
+ | `validate-group-users` | Aura `PATCH .../validate-group-users` | Returns **true** only if every direct + transitive `005…` member of the group holds the Major Incident Manager license — **call before designating a Group** |
77
+ | `create-major-incident-approval-group` | Aura `PATCH .../create-major-incident-approval-group` | Designate the approver — a **User (005…)** or **public Group (00G…)** — stored as `SrvcMgmntApprovalAssignment` with `OperationType=MAJOR_INCIDENT_APPROVAL`. **Idempotent** (silent no-op if one exists) |
78
+ | `verify-approval-group` | Aura `GET .../get-major-incident-approval-group` | Read the designated approver back; expect it to equal the Id you set (null when none) |
79
+ | `remove-major-incident-approval-group` | Aura `DELETE .../remove-major-incident-approval-group` | Clear the designation — **run first to reassign** |
80
+
81
+ For a **Group** approver, run **group-user validation first**: it must return **true**. If false, fix
82
+ licensing / membership and re-validate; do not designate a group that fails. Designation is **idempotent** —
83
+ a create when one already exists is a **silent no-op**, so a "success" does not prove your approver is the
84
+ one set — **verify by read-back**, and **remove-first to reassign**.
85
+
86
+ ### Surface 2 — org preferences
87
+
88
+ | Step id | Transport | Purpose |
89
+ |---------|-----------|---------|
90
+ | `get-mim-setup-page-org-preference` | Aura `GET .../get-mimsetup-page-org-preference` | Read one MIM preference's current boolean value |
91
+ | `toggle-mim-setup-page-org-preference` | Aura `PATCH .../toggle-mimsetup-page-org-preference` | Set one MIM preference on / off |
92
+
93
+ **Preference allowlist — exactly two names:** **`AutoCreationOfProblem`** and **`AutoClosureChildIncidents`**.
94
+ **Any other `prefName` raises a `ServiceException` without writing** — never pass a name outside this set.
95
+ Require an explicit on/off direction from the user (do not infer it).
96
+
97
+ ## Ordering (follow the SOR's `depends_on`)
98
+
99
+ 1. **License before membership** — a user holds the Major Incident Manager license before being added to
100
+ the approvers group.
101
+ 2. **Validate before designating a group** — `validate-group-users` must return **true** before
102
+ `create-major-incident-approval-group` with a Group.
103
+ 3. **Remove before reassign** — `remove-major-incident-approval-group` before a second create.
104
+
105
+ ## Workflow
106
+
107
+ Always **read before you write**, **confirm before every write**, and **verify every write by read-back**.
108
+
109
+ 1. **Preflight** — for each in-scope surface, `discover` and `describe` for the current route, schema, and
110
+ `status`. On `401` / `403` / `404`, surface and stop.
111
+ 2. **Prerequisites** — confirm base Incident Management is on (else hand off), and that the approver(s) hold
112
+ the Major Incident Manager license (prepare it, and the public group, if needed).
113
+ 3. **Read current state** — the current approval-group designation and each preference value.
114
+ 4. **Confirm** — present the exact plan (org, approver, preference + direction) via `AskUserQuestion`;
115
+ require an explicit yes. On no, stop with no writes.
116
+ 5. **Apply** — validate-before-designate (for a group), remove-before-reassign; toggle only allowlisted
117
+ preferences. Treat a duplicate / already-set as success.
118
+ 6. **Verify** — re-read the designation and each preference; report only what read-back confirms.
119
+
120
+ ## Clarifying questions
121
+
122
+ Ask only what you cannot infer: **which surface** (approval group, preferences, or both); **who** the
123
+ approver is (resolve to exactly one active User `005…` or a public Group `00G…`); **which preference and
124
+ on/off**; and **which org** — state plainly this org will be **modified** (designation, license assignment
125
+ which consumes a seat, group changes, preference writes). For production, get explicit confirmation.
126
+
127
+ ## Output expectations
128
+
129
+ ```text
130
+ Major Incident Management
131
+
132
+ Approvers licensed (N) ............ Licensed N | M already held
133
+ Approval group designated ......... <user/group> | Already designated | Reassigned
134
+ Preferences ....................... Auto-create problem: on/off · Auto-close child incidents: on/off
135
+ ```
136
+
137
+ Report only what read-back confirmed; omit lines for surfaces out of the requested scope. If base Incident
138
+ Management is off, say so and name `service-itsm-incident-mgmt-configure`.
139
+
140
+ ## Common failures (surface in plain language)
141
+
142
+ | Symptom | Likely cause | What to tell the user |
143
+ |---------|--------------|-----------------------|
144
+ | Group validation returns false | A direct / nested member lacks the Major Incident Manager license | License every member first, then re-validate before designating the group |
145
+ | Approval group "designated" but unchanged | A designation already existed — it is idempotent | To change the approver, the old designation is removed first, then the new one set |
146
+ | Preference change rejected (`ServiceException`) | A preference name outside the allowlist was sent | Only auto-create problem and auto-close child incidents are configurable here |
147
+ | Seat / limit error on the license | No free Major Incident Manager seats | A seat must free up (or more licenses added) before that user can be an approver |
148
+ | `400 DUPLICATE_VALUE` on a license / group / member write | The record already exists | Idempotent success — report as already-done |
149
+ | `403` on a MIM route | Acting user lacks ITSM setup access | An admin with ITSM setup access must perform this |
150
+ | `dispatch*` auth error | headless-360 session not authenticated / expired | Re-authenticate the connection and confirm it points at the intended org |
151
+
152
+ ## Dead ends — do NOT do these
153
+
154
+ - Hardcode any route / body — `describe` at runtime; the SOR is evolving.
155
+ - Grant the Major Incident Manager license with a `PermissionSetAssignment` — it is a **license**
156
+ (`PermissionSetLicenseAssign`).
157
+ - Add a user to the approvers group before licensing them.
158
+ - Designate a **group** approver without `validate-group-users` returning **true** first.
159
+ - Reassign without removing the existing designation first (create is a silent no-op).
160
+ - Send any preference name other than `AutoCreationOfProblem` / `AutoClosureChildIncidents`.
161
+ - Attempt MIM setup when base Incident Management is off — hand off to `service-itsm-incident-mgmt-configure`.
162
+ - Pass `dispatch` the `{operation_id, arguments}` shape — it takes raw HTTP.
@@ -0,0 +1,149 @@
1
+ # Feature: Service Management Privilege (inline execution)
2
+
3
+ How the orchestrator executes the **Service Management Privilege** feature — ITSM **privilege escalation**
4
+ setup: the org-wide **escalation level**, the **Service Management Privilege** definitions (each with a
5
+ name, description, tag, access level, and function type), and **bulk employee ↔ privilege assignments**, all
6
+ behind the **Enable Privilege Assignment** master toggle. This runs **inline** through the Salesforce-hosted
7
+ **`headless-360`** MCP server (server key `headless-360`) via its four meta-tools (`discover`, `describe`,
8
+ `dispatch_readonly`, `dispatch`). The org comes from the OAuth JWT on the MCP session — never handle an org
9
+ id, alias, or credentials. Minimum API version **67.0**.
10
+
11
+ ## Delegate every operation to the system of record
12
+
13
+ The **Service Management Privilege setup SOR** is the single source of truth for **how** each step is done —
14
+ the route, method, request/response shape, field names, per-step `status`, and `depends_on`. It is **draft
15
+ and actively evolving**, so **never hardcode a route or request body**. Carry only the **goal, scope,
16
+ ordering, and invariants**, and at runtime:
17
+
18
+ 1. `discover` the operation by intent (e.g. `"enable privilege assignment toggle"`, `"set ITSM escalation
19
+ level"`, `"create a service management privilege"`, `"assign employees to a service privilege"`).
20
+ 2. `describe` the returned SOR / operation for its **current** route, method, argument schema, and `status`.
21
+ 3. `dispatch_readonly` (reads) / `dispatch` (writes) the route the SOR names.
22
+
23
+ **Use what `describe` returns — not any shape written here. If `describe` and this file disagree, `describe`
24
+ wins.** Read each step's `status` from `describe`: `implemented` = live; `proposed` = not served on every org
25
+ yet. **There is no public Connect / Tooling / Metadata / sObject substitute for this feature** — the setup
26
+ controller is the only surface. So if `discover`/`describe` does not surface a step or a `dispatch` returns
27
+ `404`, the surface is **not available on this org yet** — surface that plainly and stop; **never fabricate a
28
+ fallback route.**
29
+
30
+ ## The four surfaces — SOR step map (targets for `describe`)
31
+
32
+ Describe each before calling; the step ids are stable handles, the shapes come from `describe`.
33
+
34
+ ### Surface 1 — the Enable Privilege Assignment master toggle (`implemented`)
35
+
36
+ Backed by the generic **SetupMetadata** org-preference batch operations (not the privilege controller),
37
+ keyed on the org preference **`PrivilegeAssignmentEnabled`**.
38
+
39
+ | Step id | Purpose |
40
+ |---------|---------|
41
+ | `check-privilege-assignment-enabled` | Read whether `PrivilegeAssignmentEnabled` is on |
42
+ | `set-privilege-assignment-enabled` | Turn the feature on / off — **reversible** |
43
+ | `verify-set-privilege-assignment-enabled` | Read `PrivilegeAssignmentEnabled` back to confirm the write |
44
+
45
+ ### Surface 2 — escalation level
46
+
47
+ | Step id | Purpose |
48
+ |---------|---------|
49
+ | `fetch-escalation-level` | Read the org-wide ITSM escalation level |
50
+ | `save-escalation-level` | Set the escalation level (`escalationLevel`) |
51
+ | `verify-save-escalation-level` | Read the level back to confirm |
52
+
53
+ ### Surface 3 — Service Management Privilege definitions
54
+
55
+ | Step id | Purpose |
56
+ |---------|---------|
57
+ | `get-service-privileges` | List every privilege (id, name, description, tag, access level, function type) — **drives verify** |
58
+ | `create-service-privilege` | Add a privilege from a field map |
59
+ | `update-service-privilege` | Edit a privilege (field map keyed by its id) |
60
+ | `delete-service-privilege` | Remove a privilege by id — **destructive, no rollback** |
61
+
62
+ ### Surface 4 — employee assignments
63
+
64
+ | Step id | Purpose |
65
+ |---------|---------|
66
+ | `save-privilege-assignments` | Bulk add / remove employees for one privilege (add-list + remove-list, both in one call) — **no read-back** |
67
+
68
+ ## Scope
69
+
70
+ - **In scope**: read / set the **Enable Privilege Assignment** master toggle; read / set the org-wide
71
+ **escalation level**; list / create / update / delete **Service Management Privilege** definitions; bulk
72
+ **add / remove employee assignments** for a privilege; verify by read-back where one exists.
73
+ - **Out of scope**: base Incident Management enablement (`service-itsm-incident-mgmt-configure`); the
74
+ Incident Fulfiller / Incident Manager **persona** PSG (the orchestrator's **Persona** feature); the Major
75
+ Incident Manager approver licensing (the **Major Incident Management** feature); Problem / Change / Case
76
+ Management; the Priority Matrix; SLA setup.
77
+
78
+ ## Preconditions
79
+
80
+ - **ITSM setup access** — the SOR gates every route on it (`IncidentMgmt.userHasITSMSetupAccess`). A `403`
81
+ means the acting user lacks it; an admin with ITSM setup access must perform this.
82
+ - **The Enable Privilege Assignment master toggle is the UI entry gate**, not a server precondition. The
83
+ privilege controller does **not** re-check it, so turning it on is **workflow ordering** — enable it first
84
+ so the escalation and privilege-management surfaces are coherent, but it does not hard-block the other
85
+ writes. It is **reversible** (it can be turned back off — unlike the one-way incident preferences).
86
+
87
+ ## Ordering (follow the SOR's `depends_on`)
88
+
89
+ 1. **Toggle first** — if `PrivilegeAssignmentEnabled` is off and the user wants to configure the feature,
90
+ enable it before touching escalation level or privileges (workflow ordering, not a hard gate).
91
+ 2. **Read before every write** — the current toggle state, escalation level, or privilege list.
92
+ 3. **Verify definition writes** — re-read via `get-service-privileges` after each create / update / delete.
93
+ 4. **Assignments have no read-back** — you cannot confirm them by re-read; report them as **applied**, never
94
+ as verified.
95
+
96
+ ## Workflow
97
+
98
+ Always **read before you write**, **confirm before every write**, and **verify every write by read-back**
99
+ where a read-back exists.
100
+
101
+ 1. **Preflight** — for each in-scope surface, `discover` and `describe` for the current route, schema, and
102
+ `status`. On `401` / `403` / `404`, surface and stop.
103
+ 2. **Read current state** — the toggle, the escalation level, and/or the current privileges.
104
+ 3. **Confirm** — present the exact plan (org, toggle direction, escalation value, privilege change, or the
105
+ employees to add/remove) via `AskUserQuestion`; require an explicit yes. On no, stop with no writes.
106
+ 4. **Apply** — toggle first if needed; then the requested write. Treat a duplicate / already-set as success.
107
+ 5. **Verify** — re-read the toggle, the escalation level, and the privilege list; for assignments, state
108
+ plainly they were applied but cannot be read back.
109
+
110
+ ## Clarifying questions
111
+
112
+ Ask only what you cannot infer: **which surface** (master toggle, escalation level, privilege definitions,
113
+ or employee assignments); for a **privilege**, its fields (name, description, tag, access level, function
114
+ type); for **assignments**, the target privilege and exactly which employees to add / remove; and **which
115
+ org** — state plainly this org will be **modified**. For production, get explicit confirmation.
116
+
117
+ ## Output expectations
118
+
119
+ ```text
120
+ Service Management Privilege
121
+ Enable Privilege Assignment ....... On | Off | Enabled now
122
+ Escalation level .................. <value> | Unchanged
123
+ Privileges ........................ Created/Updated/Deleted <name> | N configured
124
+ Employee assignments .............. Applied: +N / -M (not read-back verifiable)
125
+ ```
126
+
127
+ Report only what read-back confirmed; for assignments, report them as applied and say they cannot be
128
+ verified by re-read. Omit lines for surfaces out of the requested scope.
129
+
130
+ ## Common failures (surface in plain language)
131
+
132
+ | Symptom | Likely cause | What to tell the user |
133
+ |---------|--------------|-----------------------|
134
+ | `403` on any route | Acting user lacks ITSM setup access | An admin with ITSM setup access must perform this |
135
+ | `404` / step not discoverable | The surface is `proposed`, not served on this org yet | This feature isn't available on this org yet — there is no alternative API path |
136
+ | Delete rejected or unexpected | Wrong privilege id, or it no longer exists | Re-list privileges and confirm the exact one to remove |
137
+ | Assignment "done" but can't confirm | Assignments have no read-back | The change was applied; it cannot be confirmed by re-reading — check in Setup if needed |
138
+ | `dispatch*` auth error | headless-360 session not authenticated / expired | Re-authenticate the connection and confirm it points at the intended org |
139
+
140
+ ## Dead ends — do NOT do these
141
+
142
+ - Hardcode any route / body — `discover` + `describe` at runtime; the SOR is draft and evolving.
143
+ - Fabricate a Connect / Tooling / Metadata / sObject fallback — **none exists**; a `404` means the surface
144
+ isn't served on this org yet, so surface and stop.
145
+ - Delete a Service Management Privilege to test, or without an explicit confirmation — it is **irreversible**.
146
+ - Claim an employee assignment is **verified** — `save-privilege-assignments` has **no read-back**.
147
+ - Treat the Enable Privilege Assignment toggle as a hard server gate — it is the UI entry gate (reversible)
148
+ and the controller does not re-check it; enabling it is workflow ordering.
149
+ - Pass `dispatch` the `{operation_id, arguments}` shape — it takes raw HTTP.