@salesforce/afv-skills 1.67.0 → 1.69.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 (258) hide show
  1. package/README.md +55 -5
  2. package/package.json +1 -1
  3. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  7. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  8. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  9. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  10. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  11. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  12. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  27. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  28. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  29. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  30. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  31. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  32. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  33. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  34. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  35. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  36. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  37. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  40. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  45. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  55. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  56. package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
  57. package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
  58. package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
  59. package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
  60. package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
  61. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
  62. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
  63. package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
  64. package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
  65. package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
  66. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +140 -0
  67. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +93 -0
  68. package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
  69. package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
  70. package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
  71. package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
  72. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +354 -0
  73. package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
  74. package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
  75. package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
  76. package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
  77. package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
  78. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +367 -379
  79. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +23 -6
  80. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +483 -796
  81. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  82. package/skills/dx-lifecycle-center/SKILL.md +22 -13
  83. package/skills/dx-lifecycle-center/examples/workflows.md +54 -17
  84. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  85. package/skills/dx-lifecycle-center/references/connect-org.md +62 -12
  86. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  87. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  88. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  89. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  90. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  91. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  92. package/skills/dx-org-devhub-configure/SKILL.md +85 -84
  93. package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
  94. package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
  95. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
  96. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  97. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  98. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +88 -0
  99. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +167 -0
  100. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  101. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  102. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  103. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  104. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  105. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  106. package/skills/dx-scratch-def-configure/SKILL.md +163 -0
  107. package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
  108. package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
  109. package/skills/dx-scratch-def-configure/references/features.json +3270 -0
  110. package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
  111. package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
  112. package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
  113. package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
  114. package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
  115. package/skills/education-cloud-domain-configure/SKILL.md +1 -1
  116. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
  117. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
  118. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  119. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  120. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  121. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  122. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  123. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  124. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  125. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  126. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  127. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  128. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  129. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  130. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  131. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  132. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  133. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  134. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  135. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  136. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  137. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  138. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  139. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  140. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  141. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  142. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  143. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  144. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  145. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  146. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  147. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  148. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  149. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  150. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  151. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  152. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  153. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  154. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  155. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  156. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  157. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  158. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  159. package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
  160. package/skills/experience-design-validate/SKILL.md +1 -1
  161. package/skills/experience-search-coordinate/SKILL.md +18 -12
  162. package/skills/experience-search-coordinate/references/content-route.md +79 -1
  163. package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
  164. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  165. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  166. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  167. package/skills/platform-apex-generate/SKILL.md +14 -11
  168. package/skills/platform-apex-test-generate/SKILL.md +2 -1
  169. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  170. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  171. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  172. package/skills/platform-datamask-run/SKILL.md +52 -71
  173. package/skills/platform-datamask-run/references/api-surface.md +10 -4
  174. package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
  175. package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
  176. package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
  177. package/skills/platform-dataspace-access-configure/SKILL.md +43 -10
  178. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  179. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  180. package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
  181. package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
  182. package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
  183. package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
  184. package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
  185. package/skills/platform-policy-rule-generate/SKILL.md +85 -231
  186. package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
  187. package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
  188. package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
  189. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +30 -0
  190. package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
  191. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +99 -0
  192. package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
  193. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
  194. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +5 -0
  195. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
  196. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
  197. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +5 -0
  198. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
  199. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
  200. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +5 -0
  201. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
  202. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
  203. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +5 -0
  204. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
  205. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
  206. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +5 -0
  207. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
  208. package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
  209. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +18 -11
  210. package/skills/platform-policy-rule-generate/references/policy-shapes.md +107 -0
  211. package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
  212. package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
  213. package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
  214. package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
  215. package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
  216. package/skills/platform-policy-rule-generate/references/templates-advanced.md +5 -3
  217. package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
  218. package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
  219. package/skills/platform-policy-rule-generate/references/templates.md +2 -2
  220. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +36 -18
  221. package/skills/platform-report-generate/SKILL.md +29 -5
  222. package/skills/platform-report-generate/references/chart-types.md +26 -2
  223. package/skills/platform-report-generate/references/column-names.md +43 -0
  224. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  225. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  226. package/skills/platform-report-generate/references/verification-checklist.md +22 -2
  227. package/skills/service-digital-engagement-channel-configure/SKILL.md +49 -110
  228. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +35 -0
  229. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  230. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  231. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  232. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  233. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +128 -28
  234. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
  235. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  236. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  237. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  238. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  239. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  240. package/skills/service-e911-configure/SKILL.md +242 -0
  241. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  242. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  243. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  244. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  245. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  246. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  247. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  248. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  249. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  250. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  251. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  252. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  253. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  254. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  255. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  256. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  257. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  258. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
@@ -99,15 +99,25 @@ Prefer reusing an existing policy (fastest, no deploy):
99
99
  sf data query --use-tooling-api --target-org <alias> \
100
100
  --query "SELECT Id, DeveloperName, MasterLabel FROM DataMaskPolicy"
101
101
  ```
102
- If none targets the Contact PII you need, author one with the **two-step** recipe (the
102
+ If none targets the object and fields you need, choose the fields first (below), then author one.
103
+
104
+ **Choose the fields from Core's classification, not from field names alone.** Before inserting any
105
+ `DataMaskPolicyField` row, call the field-classification operation once per target object and map each
106
+ `recommendedPiiType` to a treatment. The steps are in `references/policy-authoring.md` ("Choosing the
107
+ fields from Core's classification"). Any recommendation with no verified `MaskValue` token is reported
108
+ as unmapped; never guess a `MaskValue`. Use the static table only if the call fails, and say so in the
109
+ report.
110
+
111
+ Then author one with the **two-step** recipe (the
103
112
  `DataMaskPolicy` Metadata shape is a thin shell; membership is Tooling-inserted):
104
113
  1. **Metadata-deploy the thin shell** in **mdapi format** (`--metadata-dir` + `package.xml`; a
105
114
  source-format `--source-dir` deploy fails "Could not infer a metadata type"). The shell carries
106
115
  only `<label>`, `<description>`, `<runOnRefresh>`. This creates the policy *with an active
107
- revision*, which A2 requires.
116
+ revision*, which the Tooling inserts in the next step require.
108
117
  2. **Tooling-insert** the `DataMaskPolicyObject` (one per object) then its `DataMaskPolicyField`
109
- rows. Each field row's treatment is `MaskingCategory` (`library`) + `MaskValue` (a snake_case
110
- token like `first_name`, `email`, `phone`). There is **no `MaskingRuleType` column**.
118
+ rows. Each field row's treatment is `MaskingCategory` + `MaskValue`. For `library`, `MaskValue` is a
119
+ snake_case token like `first_name`, `email`, `phone`. For `characters` and `replaceRandom`, `MaskValue`
120
+ is the field's Salesforce type (`Text`, `Date`). There is **no `MaskingRuleType` column**.
111
121
 
112
122
  > Insert order matters: a Tooling-created parent (no active revision) makes the child insert fail
113
123
  > `INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY`. Metadata-deploy the shell first.
@@ -150,36 +160,36 @@ mid-run status as final.
150
160
 
151
161
  **Jobs are slow — expect several minutes, and poll with the bundled script.** Data Mask runs on a
152
162
  backend pool/scheduler with a **~5–10 minute floor**: even a tiny (20-row) job usually does **not**
153
- reach a terminal state or emit detail rows for several minutes after the run starts. This is fixed
154
- overhead, **not** proportional to row count. Plan the run around it — the single biggest failure mode
155
- is treating the job as instant, polling on a tight interval, and either timing out or writing a
156
- "still pending" report.
163
+ reach a terminal state or emit detail rows for several minutes. This is fixed overhead, **not**
164
+ proportional to row count. The biggest failure mode is treating the job as instant, polling tightly,
165
+ and either timing out or writing a "still pending" report.
157
166
 
158
167
  Run `scripts/poll-job.sh` as a **single command** — do **not** hand-roll a SOQL poll loop:
159
168
  ```bash
160
169
  bash scripts/poll-job.sh <alias> <jobRunId> # defaults: cap 600s (10 min), 20s interval
161
170
  ```
162
- It sleeps on a low-frequency interval, short-circuits the instant a ground-truth detail row appears,
163
- prints the terminal signal (`completed`/`failed`/`canceled`) on stdout, and exits `0` (or `1` on
164
- timeout). **Call it once and read its result — do not wrap it in your own retry loop**, and do not
165
- poll on a sub-10s interval (it just burns tool calls against a job that cannot finish sooner).
166
-
167
- **Ground truth is the detail rows, not the parent status.** The parent `DataMaskPolicyJobRun.Status`
168
- can **lag** — it may read `pending`/`running` for a while after masking actually finished. Once a
169
- `total_records_masked` (or `completed`) `DataMaskPolicyJobRunDtl` row exists, the masking is done.
170
- `poll-job.sh` already encodes all of this — the bounded interval and timeout, the short-circuit on
171
- the ground-truth detail row, and the terminal-signal exit code — so you do **not** re-implement any
172
- of it inline. Run the poller once, read its exit signal, then update `report.md` (the stub you wrote
173
- before polling) with the terminal status and the masked count from A5.
171
+ It sleeps on a low-frequency interval, prints the terminal status (`completed` /
172
+ `completed_with_errors` / `failed` / `canceled`) on stdout, and exits `0` (or `1` on timeout).
173
+ **Call it once and read its result — do not wrap it in your own retry loop**, and do not poll on a
174
+ sub-10s interval (it just burns tool calls against a job that cannot finish sooner).
175
+
176
+ **The job is done only when the parent `DataMaskPolicyJobRun.Status` is terminal.** A
177
+ `DataMaskPolicyJobRunDtl` row is not a completion signal: a `total_records_masked` row can already
178
+ exist, reading `0`, while the parent is still `running`, so a count read mid-run is wrong. Wait for
179
+ the poller to exit `0`, then read the detail rows (A5) and update the `report.md` stub with the
180
+ terminal status and the masked count.
174
181
 
175
182
  ### A5. Report results from the job DETAIL object
176
183
  The parent job carries an overall status; **per-object masked counts live on the child**
177
- `DataMaskPolicyJobRunDtl` (linked by `DataMaskPolicyJobRunId`). Report a concrete count, not a
178
- fabricated one:
184
+ `DataMaskPolicyJobRunDtl` (linked by `DataMaskPolicyJobRunId`). `DataMaskPolicyJobRunDtl` has **no
185
+ `Status` column** — the status lives in `Type`/`Subtype`, with the count itself in `Value` (a
186
+ string). Report a concrete count, not a fabricated one:
179
187
  ```bash
180
188
  sf data query --target-org <alias> \
181
- --query "SELECT Id, DataMaskPolicyJobRunId, Status FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>'"
189
+ --query "SELECT ObjectReference, Type, Subtype, Value FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>' ORDER BY Timestamp"
182
190
  ```
191
+ Expect one `status_update` row per `Subtype` (`loaded`, `completed`, `total_records_masked`) for
192
+ each target object; `total_records_masked`'s `Value` is the masked count.
183
193
 
184
194
  **Report only what the rows literally show — do not overstate granularity.** The detail rows are
185
195
  **object-level** status_update entries (`loaded`, `completed`, `total_records_masked` for the object,
@@ -199,45 +209,28 @@ just to cancel it. Steps B1–B4 are all required.
199
209
 
200
210
  ### B1. Confirm sandbox + identify the run to cancel
201
211
  Confirm the org is a sandbox (`sf org display`) and get the `jobRunId` of the run to abort — the one
202
- the user is asking to cancel. **Capture its `DataMaskPolicyId` too** — you need it to start a
203
- replacement run if the abort window is missed (B2 exit 3 / exit 1). If they just started it, use that
204
- id; otherwise query for the active run:
212
+ the user is asking to cancel. **Capture its policy Id too** — you need it to start a replacement run
213
+ if the abort window is missed (B2 exit 3 / exit 1). If they just started it, use that policy id
214
+ directly; otherwise query for the active run:
205
215
  ```bash
206
216
  sf data query --target-org <alias> \
207
- --query "SELECT Id, Status, DataMaskPolicyId FROM DataMaskPolicyJobRun ORDER BY CreatedDate DESC LIMIT 5"
217
+ --query "SELECT Id, Status, PolicyName FROM DataMaskPolicyJobRun ORDER BY CreatedDate DESC LIMIT 5"
208
218
  ```
209
- Note the `DataMaskPolicyId` (`8dm` prefix) of the run you pick — that is the `<policyId>` A3 needs.
210
-
211
- ### B2. Wait for the job to be `running` (the only abortable state)
212
- You can only abort while `DataMaskPolicyJobRun.Status` is `running`. A `pending`/`scheduled` job
213
- `409`s; a terminal one is already done. Poll for the `running` window with the bundled poller in its
214
- **`running` mode** — it exits the instant the status reads `running` (unlike the default mode, which
215
- waits for a terminal state), so it will not block past the abortable window:
219
+ `DataMaskPolicyJobRun` has **no `DataMaskPolicyId` lookup field** — the only link back to the policy
220
+ is the human-readable `PolicyName` (`MasterLabel`). Resolve the Id from it via the Tooling API:
216
221
  ```bash
217
- POLL_MODE=running bash scripts/poll-job.sh <alias> <jobRunId> 900 15
222
+ sf data query --use-tooling-api --target-org <alias> \
223
+ --query "SELECT Id, DeveloperName FROM DataMaskPolicy WHERE MasterLabel = '<PolicyName>'"
218
224
  ```
219
- The cap is **900s (15 min)**, above the ~5–10 min scheduling floor so a slow-to-start job still gets
220
- caught. Handle every exit:
221
- - **Exit `0`** (prints `running`) → go straight to B3.
222
- - **Exit `3`** → the job raced to a terminal state before `running` was caught; the abort window is
223
- gone. Start a fresh run against the policy you captured in B1 (A3 with that `<policyId>`), then
224
- return here and poll the **new** `jobRunId`.
225
- - **Exit `1`** (timeout — the cap expired) → re-query the job's status:
226
- ```bash
227
- sf data query --target-org <alias> \
228
- --query "SELECT Id, Status FROM DataMaskPolicyJobRun WHERE Id = '<jobRunId>'"
229
- ```
230
- If it is still non-terminal (`pending`/`scheduled`/`running`), re-run the poller **once** more (same
231
- command) to continue waiting. If it is `running`, go to B3. If it is terminal, treat it like exit 3
232
- — start a fresh run (A3 with the B1 `<policyId>`) and poll the new job.
233
-
234
- Because of the ~5–10 min pool floor the `running` window is usually minutes wide, so there is time to
235
- catch it; do not poll with no delay.
236
-
237
- > **If no run is currently in progress** (the job already completed, or you must reproduce a
238
- > run→cancel flow end to end), start one first with A3, then return here — poll it to `running` and
239
- > abort **that** live job. Never substitute an older, already-terminal job to "show" a cancel; the
240
- > abort must target the run that is actually live.
225
+ That `Id` (`8dm` prefix) is the `<policyId>` A3 needs.
226
+
227
+ ### B2. Wait for the job to be `running` (the only abortable state)
228
+ Poll with `POLL_MODE=running` (cap 900s, 15s interval). Full command, exit-code handling (0 / 3 / 1),
229
+ and the re-query-on-timeout steps are in `references/run-and-abort.md` section 5. A `pending` or
230
+ `scheduled` job `409`s on abort, so do not abort until the poller exits `0`.
231
+
232
+ If no run is in progress, start one with A3 and abort **that** live job. Never substitute an older,
233
+ already-terminal job to "show" a cancel.
241
234
 
242
235
  ### B3. Abort via the run API
243
236
  Abort via the run API — **not** by DML/delete on the job record:
@@ -263,14 +256,8 @@ Cancellation is asynchronous. **Re-query** `DataMaskPolicyJobRun` and confirm `S
263
256
  | Rule | Rationale |
264
257
  |------|-----------|
265
258
  | Run each `sf` command **bare** — never add a pipe or redirect of any kind (`\|`, `\| python3`, `\| grep`, `2>&1`, `2>/dev/null`, `> file`) | `sf ... --json` already prints clean JSON on stdout; read it directly. A redirect/pipe trips an unbypassable shell-safety guard that silently stalls the whole run to timeout. Never post-process with `python3`/`grep`/`jq`, and never suppress stderr — even if a command prints a warning, the `--json` payload on stdout is still valid; just parse it as-is |
266
- | Never use standard SOQL / `sobject describe` on `DataMaskPolicy*` config objects | They return `INVALID_TYPE` / `NOT_FOUND` — use Tooling API or MDAPI |
267
- | Read masked counts from `DataMaskPolicyJobRunDtl`, never invent them | The child detail is the source of truth for per-object results |
268
- | Only `completed` / `completed_with_errors` / `failed` are terminal | Reporting `running`/`scheduled` as final is wrong |
269
259
  | Abort only via the run-API abort endpoint | DML/delete on the job record is not a real abort and corrupts state |
270
- | Always re-query status after abort and confirm `canceled` | An abort call returning 200 is not proof the job stopped |
271
- | Data Mask runs on sandboxes only | Run/abort endpoints `403` on production |
272
260
  | Use API version `v67.0` or later, and no `/connect/` segment | The run/abort endpoints are `/services/data/v67.0/platform/data-resilience/data-mask/...` — a `connect` segment or a pre-v67 version returns `NOT_FOUND` |
273
- | Poll via `scripts/poll-job.sh` (one call), never a hand-rolled SOQL loop | The script caps attempts and short-circuits on the ground-truth detail row; a manual loop against the lagging parent status is the #1 cause of a run timing out with no report |
274
261
 
275
262
  ---
276
263
 
@@ -278,15 +265,9 @@ Cancellation is asynchronous. **Re-query** `DataMaskPolicyJobRun` and confirm `S
278
265
 
279
266
  | Issue | Resolution |
280
267
  |-------|------------|
281
- | `sf sobject describe DataMaskPolicy` → `NOT_FOUND` | It's a Tooling/MDAPI entity — query with `--use-tooling-api`, don't retry standard API |
282
- | `SELECT ... FROM DataMaskPolicy` → `INVALID_TYPE` | Same cause — use Tooling API for the policy; standard API only for `DataMaskPolicyJobRun`/`Dtl` |
283
- | Run start returns `409` | A run is already in progress for that policy — poll the existing one or wait for it to finish |
284
- | Abort returns `409` "status=PENDING" | The job is still `pending`/`scheduled`, not yet `running` — keep polling and abort only once it reads `running`; don't give up on the abort |
285
268
  | Small job finishes before you can abort it | The `running` window is seconds on a small sandbox — start a fresh run and poll tightly; never substitute a previously-aborted job to fake the flow |
286
- | Abort returns `200` but SOQL status still `running` | Cancellation is async — keep polling the SOQL status until `canceled`; don't report success early |
287
- | Run API says `CANCELED` but SOQL says `running` | Case + surface differ: the run API is UPPERCASE, SOQL picklist is lowercase. Trust the SOQL value for terminal state |
288
- | Job "finished" instantly | Re-check: `scheduled` is not terminal. Poll until a terminal value actually appears |
289
- | Run/abort endpoint `NOT_FOUND` | The path must be `/services/data/v67.0/platform/data-resilience/data-mask/...` — no `/connect/` segment, and version `v67.0`+ (Core 262). See `references/api-surface.md` |
269
+ | Run API says `CANCELED` but SOQL says `running` | Case + surface differ (run API UPPERCASE, SOQL lowercase). Trust the SOQL value for terminal state |
270
+ | Run start returns `409` or abort `409` | Run start: a run is already active for that policy. Abort: the job is not `running` yet. Details in `references/run-and-abort.md` failure table |
290
271
 
291
272
  ---
292
273
 
@@ -30,8 +30,9 @@ authoritative map.
30
30
  > then (2) Tooling-insert the object + field rows against it. The Metadata deploy must come first:
31
31
  > it creates the policy with an active revision, without which the Tooling child insert fails
32
32
  > `INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY`. See `policy-authoring.md` for the full recipe.
33
- > `DataMaskPolicyField` treatment columns are `MaskingCategory` (`library` / `replaceRandom`) +
34
- > `MaskValue` (a snake_case library token) — there is **no `MaskingRuleType` column**.
33
+ > `DataMaskPolicyField` treatment columns are `MaskingCategory` (`library` / `characters` /
34
+ > `replaceRandom`) + `MaskValue` (a snake_case library token for `library`, or the field's Salesforce
35
+ > type such as `Text` / `Date` for `characters` / `replaceRandom`) — there is **no `MaskingRuleType` column**.
35
36
 
36
37
  > **Schedule fields live ON the policy** — there is no separate schedule entity. `RunFrequency`
37
38
  > (`once` / `daily` / `weekly` / `monthly`), `ScheduledStart`, and `RunOnRefresh` are fields on
@@ -64,11 +65,16 @@ sf data query --use-tooling-api --target-org <alias> \
64
65
 
65
66
  # RIGHT — job + job-detail via standard API:
66
67
  sf data query --target-org <alias> \
67
- --query "SELECT Id, Status, Type, TotalRecords FROM DataMaskPolicyJobRun ORDER BY CreatedDate DESC LIMIT 5"
68
+ --query "SELECT Id, Status, Type, PolicyName FROM DataMaskPolicyJobRun ORDER BY CreatedDate DESC LIMIT 5"
68
69
  sf data query --target-org <alias> \
69
- --query "SELECT Id, DataMaskPolicyJobRunId, Status FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>'"
70
+ --query "SELECT ObjectReference, Type, Subtype, Value FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>' ORDER BY Timestamp"
70
71
  ```
71
72
 
73
+ `DataMaskPolicyJobRun` has **no `TotalRecords`** and **no `DataMaskPolicyId`** lookup field —
74
+ resolve the policy from `PolicyName` (`MasterLabel`) via the Tooling API instead.
75
+ `DataMaskPolicyJobRunDtl` has **no `Status`** column — status lives in `Type`/`Subtype`, and the
76
+ masked count is `Value` on the row where `Subtype = 'total_records_masked'`.
77
+
72
78
  ## Status picklist values (`DataMaskPolicyJobRun.Status`)
73
79
 
74
80
  ```text
@@ -91,13 +91,62 @@ Each `DataMaskPolicyField` carries a `MaskingCategory` plus a `MaskValue` — th
91
91
  `MaskingRuleType` column** (older docs claiming values like `RandomEmail` / `RandomPhoneNumber`
92
92
  were wrong; that column does not exist).
93
93
 
94
- - `MaskingCategory` — `library` (pick a value from the built-in library, the common case) or
95
- `replaceRandom` (random replacement).
96
- - `MaskValue` — a snake_case library token identifying the value set. Verified tokens include:
97
- `first_name`, `last_name`, `email`, `phone`, `street`, `city`, `state`, `postal_code`,
98
- `country`, `account_name`, `URL`.
99
-
100
- ## Choosing treatments
94
+ - `MaskingCategory` — `library` (pick a value from the built-in library, the common case),
95
+ `characters` (random characters), or `replaceRandom` (random replacement).
96
+ - `MaskValue` depends on the category:
97
+ - `library` — a snake_case library token identifying the value set. Verified tokens include:
98
+ `first_name`, `last_name`, `email`, `phone`, `street`, `city`, `state`, `postal_code`,
99
+ `country`, `account_name`, `URL`.
100
+ - `characters` and `replaceRandom` — the field's Salesforce type (for example `Text`, `Date`).
101
+ Left empty, the run fails with `UNKNOWN_EXCEPTION` ("Mask Value is required for Replace Random
102
+ field").
103
+
104
+ ## Choosing the fields from Core's classification
105
+
106
+ The Data Mask UI's "Automatic PII rules" are driven by a per-field `recommendedPiiType` that Core's
107
+ classifier computes. Use the same source here so the skill and the UI recommend the same fields. Do
108
+ this once per target object, before inserting any `DataMaskPolicyField` row.
109
+
110
+ 1. **Call the classification operation** through the `project-codey` server's `dispatch_readonly`
111
+ tool. It takes a `path`, not an operationId: `path`
112
+ `/headless/invoke/platform/datamask/data-mask-policy/get-object-fields-with-masking-info`, `method`
113
+ `GET`, and `query_params` `{objectApiName: <object>, includePicklistValues: false,
114
+ includeFilterOnlyFields: false}` (for example `objectApiName: "Contact"`). Omit `policyObjectId` (a
115
+ new object has no `DataMaskPolicyObject` row yet). If this path 404s, re-resolve it with `find_route`
116
+ rather than guessing. The `.../data-mask-policy-builder/...` route serves the same operation but does
117
+ not take the two picklist/filter params.
118
+ 2. **Read the response.** The result is `{status_code, body}`, where `body` is an array with one entry
119
+ per field. Each entry carries `apiName`, `label`, `type`, and `recommendedPiiType` (`null` when Core
120
+ has no recommendation). Any other shape counts as a failed call (step 4).
121
+ 3. **Map each recommendation to a treatment.** Core returns tokens such as `last_name`, `street`,
122
+ `phone`, `characters`, and `replaceRandom`. Compare `recommendedPiiType` case-insensitively with the
123
+ verified `MaskValue` tokens in "Field treatment columns" above. `characters` and `text` are the same
124
+ category.
125
+ - A verified token → `MaskingCategory=library`, `MaskValue=<that token>`.
126
+ - `characters`/`text` → `MaskingCategory=characters`. `replaceRandom` → `MaskingCategory=replaceRandom`.
127
+ Both also require `MaskValue` = the field's Salesforce type as Core reports it in `type` (for example
128
+ `Text`, `Date`). The UI's "Mask With" menu offers `Random Characters` for `characters`.
129
+ - Any other recommendation (for example `title`, `full_name`, `full_address`, `credit_card`, `ssn`,
130
+ `password`, `date`, `numberRange`) has no `MaskingCategory` or verified token here. **Report it as
131
+ unmapped. Do not guess a `MaskValue`.**
132
+ - A field with no `recommendedPiiType` is not masked. List it in the report.
133
+ 4. **Fall back only when the call fails** (refused, errored, the `project-codey` server is unavailable,
134
+ or the response shape is unrecognized). Then use the static table below and state in the report that
135
+ the field list came from the static table, not from Core. When the call succeeds, Core's answer is
136
+ authoritative. Do not add fields from the static table.
137
+
138
+ ## Fallback treatments (static table)
139
+
140
+ Use this table **only** when the classification call in "Choosing the fields from Core's classification"
141
+ fails. When the call succeeds, use Core's `recommendedPiiType` and skip this table. The table is narrower than Core:
142
+
143
+ - It covers only the standard fields listed below. It does not apply Core's label, type, or encryption
144
+ rules, so it misses fields Core does recommend (for Contact: the Other* address fields, `Fax`,
145
+ `HomePhone`, `OtherPhone`, `AssistantPhone`).
146
+ - Core's type-based fallback classifies some text fields as `characters` (for Contact, `AssistantName`)
147
+ and some date fields as `replaceRandom` (for Contact, `Birthdate`). Both map to their `MaskingCategory`
148
+ value with `MaskValue` set to the field's Salesforce type (`Text` for AssistantName, `Date` for
149
+ Birthdate), so they are masked, not reported as unmapped.
101
150
 
102
151
  Match the `MaskValue` to the field's semantics — do **not** apply one blanket replacement:
103
152
 
@@ -48,28 +48,35 @@ Capture `jobRunId`. A `409`/`CONFLICT` means a run is already active for this po
48
48
  ## 3. Poll to terminal
49
49
  ```bash
50
50
  sf data query --target-org <alias> \
51
- --query "SELECT Id, Status, Type, TotalRecords FROM DataMaskPolicyJobRun WHERE Id = '<jobRunId>'"
51
+ --query "SELECT Id, Status, Type FROM DataMaskPolicyJobRun WHERE Id = '<jobRunId>'"
52
52
  ```
53
- Repeat on a bounded interval until `Status` is one of `completed`, `completed_with_errors`,
54
- `failed`. `scheduled`/`running` are NOT terminal. `scripts/poll-job.sh` automates this with a
55
- timeout.
53
+ `DataMaskPolicyJobRun` has **no `TotalRecords` field** — there is no record-count column on the
54
+ parent; the masked count lives on the child detail rows (step 4). Repeat the status query on a
55
+ bounded interval until `Status` is one of `completed`, `completed_with_errors`, `failed`.
56
+ `scheduled`/`running` are NOT terminal. `scripts/poll-job.sh` automates this with a timeout.
56
57
 
57
58
  ## 4. Report from the detail object
58
- Per-object masked results live on the child, not the parent:
59
+ Per-object masked results live on the child, not the parent. `DataMaskPolicyJobRunDtl` has **no
60
+ `Status` column** — the status lives in `Type`/`Subtype`, with the count itself in `Value` (a
61
+ string):
59
62
  ```bash
60
63
  sf data query --target-org <alias> \
61
- --query "SELECT Id, DataMaskPolicyJobRunId, Status FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>'"
64
+ --query "SELECT ObjectReference, Type, Subtype, Value FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '<jobRunId>' ORDER BY Timestamp"
62
65
  ```
63
- Report the concrete masked-record count and per-object success/failure from these rows. Do not
64
- report a number you did not read from here.
66
+ Expect one `status_update` row per `Subtype` (`loaded`, `completed`, `total_records_masked`) for
67
+ each target object; `total_records_masked`'s `Value` is the masked count. Report the concrete
68
+ masked-record count and per-object success/failure from these rows. Do not report a number you did
69
+ not read from here.
65
70
 
66
71
  ## 5. Abort the currently-running job — ONLY when the user asked to cancel
67
72
  Steps 5–7 are the **abort** flow. Run them **only when the prompt explicitly asks to cancel/abort**
68
73
  a run — a "create and run" or "edit and run" task is complete after step 4.
69
74
 
70
75
  Aborting is an **on-demand action against a job that is already in progress**: take that job's
71
- `jobRunId` (and note its `DataMaskPolicyId` — you need it to start a replacement run if the window is
72
- missed), wait for `DataMaskPolicyJobRun.Status = running`, and go straight to the abort (step 6).
76
+ `jobRunId` (and note its policy Id — you need it to start a replacement run if the window is
77
+ missed; `DataMaskPolicyJobRun` has no direct policy lookup field, so resolve it from the job's
78
+ `PolicyName` via `SELECT Id FROM DataMaskPolicy WHERE MasterLabel = '<PolicyName>'` against the
79
+ Tooling API), wait for `DataMaskPolicyJobRun.Status = running`, and go straight to the abort (step 6).
73
80
  You can only abort a running job. Do **not** use the terminal poll from step 3 here — it waits until
74
81
  the job is *done*. Use the poller's `running` mode, which returns the instant the job is abortable:
75
82
  ```bash
@@ -17,10 +17,10 @@
17
17
  # so the default cap is 600s (10 min) with a 20s interval to keep the query volume low. Do NOT poll
18
18
  # on a tight (sub-10s) interval — it just burns tool calls against a job that cannot finish sooner.
19
19
  #
20
- # TERMINAL MODE: The parent DataMaskPolicyJobRun.Status can LAG the real job state (it may read
21
- # `pending`/`running` for a while after masking finished). So this poller ALSO checks
22
- # DataMaskPolicyJobRunDtl: once a `total_records_masked` detail row exists, the job is effectively
23
- # done and we stop, even if the parent status hasn't caught up. Ground truth is the detail rows.
20
+ # TERMINAL MODE: exits only on a terminal PARENT status. A `total_records_masked` detail row is NOT a
21
+ # completion signal: it can already exist, reading `0`, while the parent is still `running`, so
22
+ # stopping on the first row reports a count for a job that has not finished. Read the detail rows
23
+ # only AFTER this script exits.
24
24
  #
25
25
  # RUNNING MODE (for abort): exits the instant the parent status reads `running` — the only state in
26
26
  # which the abort endpoint accepts the request (a `pending`/`scheduled` job 409s). Because the pool
@@ -30,7 +30,7 @@
30
30
  # start a fresh run rather than abort a job that already finished.
31
31
  #
32
32
  # Exit codes:
33
- # terminal mode: 0 = terminal status OR masked-count detail row observed (signal on stdout);
33
+ # terminal mode: 0 = terminal parent status observed (printed on stdout);
34
34
  # 1 = timed out; 2 = bad args.
35
35
  # running mode: 0 = `running` observed (prints `running`); 1 = timed out; 2 = bad args;
36
36
  # 3 = job reached a terminal state before `running` was seen (prints that status).
@@ -63,12 +63,15 @@ is_terminal() {
63
63
 
64
64
  elapsed=0
65
65
  while (( elapsed < MAX_SECONDS )); do
66
- status="$(
67
- sf data query --target-org "$ORG" \
68
- --query "SELECT Status FROM DataMaskPolicyJobRun WHERE Id = '${JOB_ID}'" \
69
- --json 2>/dev/null \
70
- | python3 -c "import json,sys; r=json.load(sys.stdin).get('result',{}).get('records',[]); print(r[0]['Status'] if r else 'UNKNOWN')"
71
- )"
66
+ # CSV is a header line then one value per row, so bash can read it with no pipe and no
67
+ # post-processor. stderr is left attached so an auth or alias failure is visible; a failed
68
+ # query only skips this tick, it does not end the poll.
69
+ csv="$(sf data query --target-org "$ORG" \
70
+ --query "SELECT Status FROM DataMaskPolicyJobRun WHERE Id = '${JOB_ID}'" \
71
+ --result-format csv)" || csv=""
72
+ status=""
73
+ { IFS= read -r _; IFS= read -r status; } <<< "$csv" || true
74
+ status="${status:-UNKNOWN}"
72
75
  echo "[poll-job] ${JOB_ID} status=${status} (${elapsed}s/${MAX_SECONDS}s) mode=${POLL_MODE}"
73
76
 
74
77
  if [[ "$POLL_MODE" == "running" ]]; then
@@ -88,19 +91,6 @@ while (( elapsed < MAX_SECONDS )); do
88
91
  echo "$status"
89
92
  exit 0
90
93
  fi
91
-
92
- # Ground-truth check: a masked-count detail row means the job finished even if the parent lags.
93
- masked="$(
94
- sf data query --target-org "$ORG" \
95
- --query "SELECT Value FROM DataMaskPolicyJobRunDtl WHERE DataMaskPolicyJobRunId = '${JOB_ID}' AND Subtype = 'total_records_masked'" \
96
- --json 2>/dev/null \
97
- | python3 -c "import json,sys; r=json.load(sys.stdin).get('result',{}).get('records',[]); print(r[0]['Value'] if r else '')"
98
- )"
99
- if [[ -n "$masked" ]]; then
100
- echo "[poll-job] detail row total_records_masked=${masked} — job effectively complete (parent status=${status})"
101
- echo "completed"
102
- exit 0
103
- fi
104
94
  fi
105
95
 
106
96
  sleep "$INTERVAL"
@@ -110,6 +100,6 @@ done
110
100
  if [[ "$POLL_MODE" == "running" ]]; then
111
101
  echo "[poll-job] TIMEOUT after ${MAX_SECONDS}s — job never reached 'running'" >&2
112
102
  else
113
- echo "[poll-job] TIMEOUT after ${MAX_SECONDS}s — neither terminal status nor masked-count detail row observed" >&2
103
+ echo "[poll-job] TIMEOUT after ${MAX_SECONDS}s — job never reached a terminal status" >&2
114
104
  fi
115
105
  exit 1
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: platform-dataspace-access-configure
3
- description: "Use this skill to configure or inspect Salesforce Data Cloud DataSpace access for permission sets. Grants dataspace-level access via MDAPI PermissionSet XML with dataspaceScopes elements, optionally grants object-level access to DMO, DLO, or CIO objects via the Object Access Grants Connect API, and inspects existing scopes via read-only PermissionSet metadata retrieval. TRIGGER when: user needs to create or update a permission set with DataSpace access, grant access to a specific dataspace, list permission sets with access to a DataSpace, configure dataAccessLevel/objectAccessLevel, add RBAC object access grants, or list/remove object access grants for a permission set + DataSpace pair. DO NOT TRIGGER when: the task is a generic permission set without dataspace access (use platform-permission-set-generate), the request is about data ingestion/streams, or the work involves creating dataspaces themselves rather than granting access to them."
3
+ description: "Grant a permission set Data Cloud access two ways: (1) data-space (dataspace) access via dataspaceScopes in PermissionSet XML (MDAPI) — create, change, or remove it; (2) object-level access to a DMO/DLO/CIO object (e.g. Account__dlm) via the Object Access Grants Connect API (ssot/data-governance/object-access-grants) — grant, list, revoke; plus read-only scope inspection. TRIGGER on: dataspace scope / data space access for a permission set, dataAccessLevel / objectAccessLevel, 'use the Connect API to grant a permission set access to an <object>__dlm', RBAC object grants. DO NOT TRIGGER for creating the dataspace itself (the Data 360 data-space skill), a generic permission set with no dataspace access (platform-permission-set-generate), or an access policy / policy rule / tag-based access (platform-policy-rule-generate). For a vague object-access ask, ask permission-set way vs policy way."
4
4
  metadata:
5
5
  relatedSkills:
6
6
  - "platform-permission-set-generate"
7
+ - "platform-policy-rule-generate"
7
8
  version: "1.0"
8
9
  domains: ["Platform", "Data 360"]
9
10
  minApiVersion: "67.0"
@@ -27,31 +28,63 @@ The MDAPI layer is required to establish the PermissionSet → DataSpace linkage
27
28
 
28
29
  ---
29
30
 
31
+ ## When to use this skill (routing)
32
+
33
+ This is the **permission-set / RBAC** path to Data Cloud access:
34
+
35
+ - **"Grant access to a data space" / dataspace access** → this skill (Layer 1, `dataspaceScopes` on a permission set).
36
+ - **Grant object access via a permission set / RBAC object grant** → this skill (Layer 2, Object Access Grants Connect API).
37
+
38
+ Object access has a second, separate path — a **data-governance access policy** (a tag/OLS `PolicyRuleDefinition`), owned by **`platform-policy-rule-generate`**. Infer the mechanism from context; ask only when the request is vague:
39
+
40
+ - The user is **driving from a permission set** (mentions a permission set, RBAC, or an object grant on a permset) → object access grant → **this skill**, no need to ask.
41
+ - The user **frames it as a policy** (create a policy / access policy / policy rule, OLS/FLS/RLS, tag/classification-based) → route to **`platform-policy-rule-generate`**.
42
+ - The request is **genuinely vague** — "grant object access to X" with no mechanism and no clue → **ASK**: the **permission-set way** (this skill) or the **policy way** (`platform-policy-rule-generate`)? If it is also unclear whether the object is a Data Cloud object, ask which object first.
43
+
44
+ "Access to a **data space**" is always this skill (the permission-set / `dataspaceScopes` path) — no disambiguation needed.
45
+
46
+ ---
47
+
30
48
  ## Decide the Case First
31
49
 
50
+ > **Case B — preserve existing content.** Do not delete content you did not intend to change without the user's confirmation. Fix deploy or validation errors that trace to your own `<dataspaceScopes>` block (wrong element or enum names). For errors that originate in pre-existing content you were told to preserve (e.g. a `<tabSettings>` or `<fieldPermissions>` entry), make no further edits to that content and report the error message and the offending element in your reply. A request to fix validation errors does not authorize removing content the user told you to preserve; deleting it needs the user's explicit confirmation.
51
+
32
52
  Pick exactly one case from the table below before writing any files. Each case has a different output shape.
33
53
 
34
54
  | Case | User intent | Permission set state | Files to emit |
35
55
  |---|---|---|---|
36
- | **A. Create new permset with DS access** | "create a permission set called X with dataspace scope Y" | does NOT exist yet | `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` |
37
- | **B. Add DS access to existing permset** | "grant existing permission set X access to dataspace Y" | already deployed (may contain other permissions) | patched `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` — see Case B workflow below |
56
+ | **A. Create new permset with DS access** | "create a permission set called X with dataspace scope Y" | does NOT exist yet | `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` (create `package.xml` only if absent) |
57
+ | **B. Add DS access to existing permset** | "grant existing permission set X access to dataspace Y" | already deployed (may contain other permissions) | patched `permissionsets/<Name>.permissionset-meta.xml` **and** `package.xml` (keep the existing one if present; create only if absent) — see Case B workflow below |
38
58
  | **C. Object-level grant only** | "grant permset X access to object Z (in dataspace Y)" — permset + scope already configured | already deployed with `dataspaceScopes` | `api-request.json` (Connect API body). NO permission set XML, NO `package.xml` |
39
59
  | **D. Inspect existing DS access** | "which permission sets have access to dataspace Y?" | any | chat/report only. NO deployable files, NO runtime API mutation |
40
60
 
41
61
  Only emit the files listed for the case you picked. Emitting Case A/B files for a Case C prompt (or vice versa) is a correctness failure — extra files change the deployment shape.
42
62
 
43
- > **Case B — critical:** PermissionSet MDAPI deploy is a **full metadata replace**. Every `<objectPermissions>`, `<fieldPermissions>`, `<userPermissions>`, `<tabSettings>`, `<applicationVisibilities>`, `<recordTypeVisibilities>`, `<customPermissions>`, `<pageAccesses>`, `<classAccesses>`, `<customMetadataTypeAccesses>`, `<customSettingAccesses>`, `<externalDataSourceAccesses>` element you omit from the redeploy is **deleted from the org**. Before adding `<dataspaceScopes>` to an existing permset, retrieve the current XML and patch it — do not hand-author from scratch.
63
+ > **Case B — critical:** PermissionSet MDAPI deploy is a **full metadata replace**. Every `<objectPermissions>`, `<fieldPermissions>`, `<userPermissions>`, `<tabSettings>`, `<applicationVisibilities>`, `<recordTypeVisibilities>`, `<customPermissions>`, `<pageAccesses>`, `<classAccesses>`, `<customMetadataTypeAccesses>`, `<customSettingAccesses>`, `<externalDataSourceAccesses>` element you omit from the redeploy is **deleted from the org**. Before adding, changing, or removing `<dataspaceScopes>` on an existing permset, start from its current XML and patch it — never author a permission set from scratch or write placeholder comments such as "replace with actual permissions", and never invent permissions that are not in the file.
44
64
 
45
65
  ### Case B workflow
46
66
 
47
- 1. Retrieve the existing permission set:
67
+ 0. **Local project first.** If the workspace already contains `permissionsets/<Name>.permissionset-meta.xml` (e.g. under `force-app/main/default/`), READ that file first and edit it in place — it is the current XML; no org or retrieve is needed. Also reuse an existing `package.xml` as-is (add the permset to `<members>` only if missing). If no org is connected, do not stop to ask; use the workspace files.
68
+ 1. Only when the file is not in the workspace and an org is available, retrieve the existing permission set:
48
69
  ```bash
49
70
  sf project retrieve start --metadata PermissionSet:<Name> --target-org <alias>
50
71
  ```
51
- 2. Open the retrieved `permissionsets/<Name>.permissionset-meta.xml`. Keep every element already there.
52
- 3. Insert the `<dataspaceScopes>` block for the target DataSpace (element order in the file does not matter for MDAPI). If the file already has a `<dataspaceScopes>` block **for this same DataSpace**, replace only that block. Leave every `<dataspaceScopes>` block for other DataSpaces untouched — one block per DataSpace. For a requested scope removal, remove only the matching block and deploy; omitting the block revokes that DataSpace grant. Verify by retrieving the PermissionSet and confirming the matching `<dataspaceScopes>` block is absent.
53
- 4. Write `package.xml` listing the permset in `<members>`.
72
+ 2. Open `permissionsets/<Name>.permissionset-meta.xml` (workspace copy or retrieved). Keep every element already there, byte-for-byte except the intended `<dataspaceScopes>` change.
73
+ 3. Insert the `<dataspaceScopes>` block for the target DataSpace (element order in the file does not matter for MDAPI). If the file already has a `<dataspaceScopes>` block **for this same DataSpace**, replace only that block. Leave every `<dataspaceScopes>` block for other DataSpaces untouched — one block per DataSpace. For a requested scope removal (revoke), delete ONLY that block; the `<fieldPermissions>`, `<objectPermissions>` and `<tabSettings>` counts must match the original. Omitting the block revokes that DataSpace grant. Verify by retrieving the PermissionSet and confirming the matching `<dataspaceScopes>` block is absent.
74
+ 4. Ensure `package.xml` lists the permset in `<members>` (create it only if absent).
54
75
  5. Redeploy with `sf project deploy start`.
76
+ 6. If deploy validation reports errors on elements you did not touch (e.g. `no CustomTab named Opportunity found` on a preserved `<tabSettings>`), leave them in place and report the message and offending element. **Stop-and-ask rule:** if the user then says "fix it", "fix the validation error" or "make it deploy", that is NOT confirmation to delete — do not remove, comment out or edit that element in any way. Reply that the entry was explicitly preserved, name the element, and ask whether they want it removed; delete it only after they answer yes to that specific question.
77
+
78
+ ### Choosing the access levels from the request wording
79
+
80
+ | User wording | `dataAccessLevel` | `objectAccessLevel` |
81
+ |---|---|---|
82
+ | "governed by data governance policies" / "controlled by policy" | as stated; if the request does not state a `dataAccessLevel`, ask which one (do not silently default to `ALL`) | `BY_POLICY` |
83
+ | "remove" / "revoke" the dataspace access | no level — remove the matching `<dataspaceScopes>` block (see Case B step 3); `NONE` keeps the scope but grants no data | n/a |
84
+ | "controlled by the dataspace scope itself / by the parent" **and** "access to everything / all objects in the dataspace" | `CONTROLLED_BY_PARENT` | `ALL_IN_DATASPACE` |
85
+ | An explicit level named in the request | use it verbatim | use it verbatim |
86
+
87
+ `ALL_IN_DATASPACE` is only valid with `CONTROLLED_BY_PARENT`; do not pair it with `ALL`.
55
88
 
56
89
  ---
57
90
 
@@ -106,7 +139,7 @@ Embed a `<dataspaceScopes>` element inside the `PermissionSet` XML. Deploy with
106
139
 
107
140
  ### Package Layout (Case A and Case B)
108
141
 
109
- A deployable bundle for Layer 1 always contains **both** files:
142
+ A deployable bundle for Layer 1 contains **both** files (reuse an existing `package.xml`; create it only if absent):
110
143
 
111
144
  ```text
112
145
  <output-root>/
@@ -114,7 +147,7 @@ A deployable bundle for Layer 1 always contains **both** files:
114
147
  permissionsets/<Name>.permissionset-meta.xml
115
148
  ```
116
149
 
117
- `package.xml` (required — list every permission set being deployed in `<members>`):
150
+ `package.xml` (list every permission set being deployed in `<members>`):
118
151
 
119
152
  ```xml
120
153
  <?xml version="1.0" encoding="UTF-8"?>
@@ -3,18 +3,14 @@ name: platform-flexipage-generate
3
3
  description: "Use when users create, generate, modify, or validate Salesforce Lightning pages (FlexiPages). Trigger on RecordPage, AppPage, HomePage, Lightning pages, adding components to a page, page customization (e.g. 'customize the record page'), or .flexipage-meta.xml files (regions, components, deployment errors). DO NOT TRIGGER for Visualforce pages, page layout assignments in the UI, UI Bundle/Experience Cloud site pages, or Aura/Lightning Web Component development without FlexiPage context."
4
4
  allowed-tools: Bash Read Write
5
5
  metadata:
6
- version: "1.1"
6
+ version: "1.2"
7
7
  domains: ["Platform"]
8
- minApiVersion: "60.0"
8
+ minApiVersion: "68.0"
9
9
  cliTools:
10
10
  - tool: ["python3"]
11
11
  semver: ">=3.10.0"
12
12
  - tool: ["sf"]
13
13
  semver: ">=2.126.4"
14
- mcpTools:
15
- metadata-experts:
16
- tools: ["execute_metadata_action"]
17
- semver: ">=1.0.0"
18
14
  ---
19
15
 
20
16
  ## When to Use This Skill
@@ -227,7 +223,7 @@ Complete each tier for ALL components before moving to the next tier — do NOT
227
223
  | Tier | Source | When | Calls |
228
224
  |------|--------|------|-------|
229
225
  | **1** | Local workspace scan | Always first — run for ALL components | 0 (local only) |
230
- | **2** | `discoverUiComponents` MCP action | Single call for all components unresolved after Tier 1 | 1 |
226
+ | **2** | `discoverUiComponents` invocable action | Single call for all components unresolved after Tier 1 | 1 |
231
227
  | **3** | Generate new LWC bundle | Only for components still unresolved after Tier 2 + user confirms | 0 |
232
228
 
233
229
  After Tier 1 completes for all components, collect only the unresolved ones and pass them to Tier 2 in a single MCP call. Only components still unresolved after Tier 2 proceed to Tier 3.
@@ -279,14 +275,15 @@ sf project deploy start --dry-run -d "<packageDirectory>/main/default" --test-le
279
275
 
280
276
  **Read `references/mcp_action_examples.md`** for full input/output examples and parameter tables.
281
277
 
282
- Two MCP actions via `execute_metadata_action`:
278
+ Two invocable actions, called with the `dispatch` MCP tool against `POST /services/data/<ver>/headless/invocableaction`. The body is `{ "action": "<action>", "inputs": { ... } }`; results come back under `outputs`:
283
279
 
284
280
  | Action | Purpose | When |
285
281
  |--------|---------|------|
286
- | `DISCOVER_UI_COMPONENTS` | Find components for a page type | Tier 2 discovery — single call for all unresolved components |
287
- | `GET_UI_COMPONENT_SCHEMAS` | Get property schemas | Property inference Step 1 (Tier 2 org components only) |
282
+ | `discoverUiComponents-discoverUiComponents` | Find components for a page type | Tier 2 discovery — single call for all unresolved components |
283
+ | `getUiComponentSchemas-getUiComponentSchemas` | Get property schemas | Property inference Step 1 (Tier 2 org components only) |
288
284
 
289
285
  **Key conventions:**
286
+ - `<ver>` is the API version: use `v68.0` or later. On earlier versions both calls fail with "apiVersion not supported in current API version"
290
287
  - Component definition format: `namespace/blockName` (forward-slash) in MCP calls, `namespace:blockName` (colon) in XML
291
288
  - `pageContext` with `entityName` is required for RECORD_PAGE
292
289
  - `getUiComponentSchemas` supports partial failures — check each component's `success` boolean