@salesforce/afv-skills 1.37.0 → 1.38.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 (247) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/README.md +20 -3
  3. package/skills/agentforce-generate/SKILL.md +253 -440
  4. package/skills/agentforce-generate/assets/agent-spec-template.md +6 -2
  5. package/skills/agentforce-generate/assets/agents/order-service.agent +16 -12
  6. package/skills/agentforce-generate/assets/agents/production-faq.agent +4 -4
  7. package/skills/agentforce-generate/assets/agents/router-first.agent +5 -5
  8. package/skills/agentforce-generate/assets/agents/template-single-subagent.agent +4 -4
  9. package/skills/agentforce-generate/assets/agents/verification-gate.agent +8 -6
  10. package/skills/agentforce-generate/assets/agents/voice-knowledge-grounded.agent +9 -9
  11. package/skills/agentforce-generate/assets/agents/voice-service-agent.agent +7 -7
  12. package/skills/agentforce-generate/assets/patterns/README.md +3 -3
  13. package/skills/agentforce-generate/assets/patterns/action-callbacks.agent +5 -5
  14. package/skills/agentforce-generate/assets/patterns/advanced-input-bindings.agent +6 -8
  15. package/skills/agentforce-generate/assets/patterns/bidirectional-routing.agent +11 -13
  16. package/skills/agentforce-generate/assets/patterns/critical-input-collection.agent +11 -16
  17. package/skills/agentforce-generate/assets/patterns/lifecycle-events.agent +2 -3
  18. package/skills/agentforce-generate/assets/patterns/llm-controlled-actions.agent +6 -7
  19. package/skills/agentforce-generate/assets/patterns/open-gate-routing.agent +3 -3
  20. package/skills/agentforce-generate/assets/patterns/prompt-template-action.agent +14 -19
  21. package/skills/agentforce-generate/assets/patterns/system-instruction-overrides.agent +11 -20
  22. package/skills/agentforce-generate/references/actions-reference.md +2 -2
  23. package/skills/agentforce-generate/references/agent-audit-and-repair.md +135 -0
  24. package/skills/agentforce-generate/references/agent-audit-candidate-verification.md +160 -0
  25. package/skills/agentforce-generate/references/agent-audit-diagnostic-catalog.md +156 -0
  26. package/skills/agentforce-generate/references/agent-audit-diagnostics-actions-state.md +176 -0
  27. package/skills/agentforce-generate/references/agent-audit-diagnostics-architecture-evaluation.md +68 -0
  28. package/skills/agentforce-generate/references/agent-audit-diagnostics-instructions-routing.md +283 -0
  29. package/skills/agentforce-generate/references/agent-audit-evaluation-loop.md +191 -0
  30. package/skills/agentforce-generate/references/agent-audit-repair-report.md +143 -0
  31. package/skills/agentforce-generate/references/agent-audit-scope-path-review.md +180 -0
  32. package/skills/agentforce-generate/references/agent-design-and-spec-creation.md +105 -59
  33. package/skills/agentforce-generate/references/agent-script-core-language.md +144 -61
  34. package/skills/agentforce-generate/references/agent-subagent-map-diagrams.md +33 -23
  35. package/skills/agentforce-generate/references/agent-validation-and-debugging.md +37 -11
  36. package/skills/agentforce-generate/references/agentscript-toolchain.md +112 -0
  37. package/skills/agentforce-generate/references/architecture-patterns.md +81 -18
  38. package/skills/agentforce-generate/references/common-control-flow-pitfalls.md +255 -0
  39. package/skills/agentforce-generate/references/control-flow-actions-sequencing.md +198 -0
  40. package/skills/agentforce-generate/references/control-flow-lifecycle-side-effects.md +87 -0
  41. package/skills/agentforce-generate/references/examples.md +22 -22
  42. package/skills/agentforce-generate/references/instruction-resolution.md +123 -83
  43. package/skills/agentforce-generate/references/known-issues.md +1 -2
  44. package/skills/agentforce-generate/references/optimization-pattern-1-data-flow.md +4 -0
  45. package/skills/agentforce-generate/references/optimization-pattern-2-deterministic-logic.md +33 -0
  46. package/skills/agentforce-generate/references/optimization-pattern-3-reference-syntax.md +32 -3
  47. package/skills/agentforce-generate/references/optimization-pattern-4-escalation.md +2 -2
  48. package/skills/agentforce-generate/references/patterns-by-requirement.md +3 -1
  49. package/skills/agentforce-generate/references/posture-and-determinism.md +103 -22
  50. package/skills/agentforce-generate/references/reference-map.md +19 -3
  51. package/skills/agentforce-generate/references/scoring-rubric.md +1 -1
  52. package/skills/agentforce-generate/references/voice-latency-heuristics.md +4 -0
  53. package/skills/agentforce-generate/references/voice-modality-reference.md +4 -4
  54. package/skills/agentforce-generate/references/zen-of-agentscript.md +139 -23
  55. package/skills/agentforce-generate/scripts/agentscript-sdk-loader.mjs +133 -0
  56. package/skills/agentforce-generate/scripts/index-agent.mjs +141 -0
  57. package/skills/agentforce-generate/scripts/setup-agentscript-sdk.mjs +337 -0
  58. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +1 -1
  59. package/skills/automation-sandbox-post-copy-configure/SKILL.md +433 -0
  60. package/skills/automation-sandbox-post-copy-configure/assets/api_request_templates.json +89 -0
  61. package/skills/automation-sandbox-post-copy-configure/examples/sample_config_input.json +40 -0
  62. package/skills/automation-sandbox-post-copy-configure/examples/sample_execution_summary.md +79 -0
  63. package/skills/automation-sandbox-post-copy-configure/references/api_endpoints.md +273 -0
  64. package/skills/automation-sandbox-post-copy-configure/references/authentication.md +94 -0
  65. package/skills/automation-sandbox-post-copy-configure/references/execution_phasing.md +93 -0
  66. package/skills/automation-sandbox-post-copy-configure/references/rules_gotchas.md +35 -0
  67. package/skills/automation-sandbox-post-copy-configure/scripts/classify-patch-result.mjs +88 -0
  68. package/skills/automation-sandbox-post-copy-configure/scripts/map-metadata-key.mjs +98 -0
  69. package/skills/automation-sandbox-post-copy-configure/scripts/plan-phases.mjs +98 -0
  70. package/skills/automation-sandbox-post-copy-configure/scripts/resolve-target-org.mjs +56 -0
  71. package/skills/design-systems-slds-validate/SKILL.md +14 -13
  72. package/skills/dx-code-analyzer-custom-rule-create/examples/xpath-examples.md +1 -1
  73. package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-security.md +1 -1
  74. package/skills/dx-org-devhub-configure/SKILL.md +268 -0
  75. package/skills/dx-org-devhub-configure/examples/status-output.md +39 -0
  76. package/skills/dx-org-devhub-configure/scripts/devhub.sh +650 -0
  77. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +116 -0
  78. package/skills/dx-org-manage/SKILL.md +135 -42
  79. package/skills/dx-org-manage/assets/derive-alias.sh +95 -0
  80. package/skills/dx-org-manage/assets/scratch-def.seed.json +6 -0
  81. package/skills/dx-org-manage/examples/README.md +1 -1
  82. package/skills/dx-org-manage/examples/scratch-orgs/delete_output.json +8 -0
  83. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +23 -0
  84. package/skills/dx-org-manage/examples/scratch-orgs/list_output.json +58 -0
  85. package/skills/dx-org-manage/examples/scratch-orgs/resume_output.json +38 -0
  86. package/skills/dx-org-manage/examples/scratch-orgs/success_definition_file.json +1 -1
  87. package/skills/dx-org-manage/examples/scratch-orgs/success_edition.json +1 -1
  88. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +41 -0
  89. package/skills/dx-org-manage/examples/scratch-orgs/success_snapshot.json +1 -1
  90. package/skills/dx-org-manage/examples/snapshots/error_output.json +3 -3
  91. package/skills/dx-org-manage/references/creating-scratch-org.md +2 -2
  92. package/skills/dx-org-manage/references/creating-snapshot.md +1 -2
  93. package/skills/dx-org-manage/references/definition_file_options.md +24 -0
  94. package/skills/dx-org-manage/references/edition_types.md +10 -8
  95. package/skills/dx-org-manage/references/opening-org.md +11 -12
  96. package/skills/dx-org-manage/references/scratch-org-create.md +303 -0
  97. package/skills/dx-org-manage/references/scratch-org-operations.md +135 -0
  98. package/skills/experience-aura-lwc-migrate/SKILL.md +120 -0
  99. package/skills/experience-aura-lwc-migrate/references/aura-api-expert.md +170 -0
  100. package/skills/experience-aura-lwc-migrate/references/aura-data-expert.md +172 -0
  101. package/skills/experience-aura-lwc-migrate/references/aura-migration-guidelines.md +299 -0
  102. package/skills/experience-aura-lwc-migrate/references/aura-prd-framework.md +79 -0
  103. package/skills/experience-aura-lwc-migrate/references/aura-redundant-code-expert.md +24 -0
  104. package/skills/experience-aura-lwc-migrate/references/aura-reference-expert.md +140 -0
  105. package/skills/experience-aura-lwc-migrate/references/aura-resolver-expert.md +115 -0
  106. package/skills/experience-aura-lwc-migrate/references/aura-slots-expert.md +67 -0
  107. package/skills/experience-aura-lwc-migrate/references/aura-style-expert.md +62 -0
  108. package/skills/experience-aura-lwc-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
  109. package/skills/experience-aura-lwc-migrate/references/aura-values-expert.md +67 -0
  110. package/skills/experience-content-media-search/SKILL.md +17 -12
  111. package/skills/experience-content-media-stock-image-search/SKILL.md +192 -0
  112. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +102 -0
  113. package/skills/experience-lds-best-practices-apply/SKILL.md +245 -0
  114. package/skills/experience-lds-best-practices-apply/references/adapter-apis.md +1640 -0
  115. package/skills/experience-lds-best-practices-apply/references/lds-data-consistency.md +126 -0
  116. package/skills/experience-lds-best-practices-apply/references/lds-expert.md +429 -0
  117. package/skills/experience-lds-best-practices-apply/references/lds-referential-integrity.md +322 -0
  118. package/skills/experience-lds-best-practices-apply/references/wire-adapter-types.md +1511 -0
  119. package/skills/experience-lds-graphql-generate/SKILL.md +222 -0
  120. package/skills/experience-lds-graphql-generate/references/generation-guide.md +236 -0
  121. package/skills/experience-lds-graphql-generate/references/generation-mutation.md +277 -0
  122. package/skills/experience-lds-graphql-generate/references/generation-query.md +237 -0
  123. package/skills/experience-lds-graphql-generate/scripts/fetch-lds-graphql-schema.sh +230 -0
  124. package/skills/experience-lds-graphql-generate/scripts/test-lds-graphql-query.sh +128 -0
  125. package/skills/experience-lwc-accessibility-validate/SKILL.md +112 -0
  126. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +88 -0
  127. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +52 -0
  128. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +106 -0
  129. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +78 -0
  130. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +26 -0
  131. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +66 -0
  132. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +70 -0
  133. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +115 -0
  134. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +47 -0
  135. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +39 -0
  136. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +50 -0
  137. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +54 -0
  138. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +49 -0
  139. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +77 -0
  140. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +45 -0
  141. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +55 -0
  142. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +51 -0
  143. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +84 -0
  144. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +50 -0
  145. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +64 -0
  146. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +105 -0
  147. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +99 -0
  148. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +97 -0
  149. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-1-1-non-text-content.md +83 -0
  150. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-1-use-of-color.md +62 -0
  151. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-10-resize-reflow.md +18 -0
  152. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-11-non-text-contrast.md +43 -0
  153. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-3-contrast.md +25 -0
  154. package/skills/experience-lwc-accessibility-validate/scripts/contrast-ratio.py +153 -0
  155. package/skills/experience-lwc-design-generate/SKILL.md +261 -0
  156. package/skills/experience-lwc-design-generate/references/figma-to-prd-blueprint.md +66 -0
  157. package/skills/experience-lwc-design-generate/references/prd-analysis-template.md +17 -0
  158. package/skills/experience-lwc-design-generate/scripts/check-component-name.sh +75 -0
  159. package/skills/experience-lwc-design-generate/scripts/detect-project-tools.sh +97 -0
  160. package/skills/experience-lwc-runtime-observe/SKILL.md +244 -0
  161. package/skills/experience-lwc-runtime-observe/examples/component-preview-and-dom.md +41 -0
  162. package/skills/experience-lwc-runtime-observe/scripts/extract-dom.sh +79 -0
  163. package/skills/experience-lwc-runtime-observe/scripts/open-frontdoor.sh +46 -0
  164. package/skills/experience-lwc-runtime-observe/scripts/verify-toolchain.sh +48 -0
  165. package/skills/experience-lwc-security-validate/SKILL.md +151 -0
  166. package/skills/experience-lwc-security-validate/examples/review-report.md +6 -0
  167. package/skills/experience-lwc-security-validate/examples/score-report.sarif.json +32 -0
  168. package/skills/experience-lwc-security-validate/references/lws-security-expert.md +986 -0
  169. package/skills/experience-lwc-security-validate/references/security-analysis.md +611 -0
  170. package/skills/experience-lwc-security-validate/scripts/check-lwc-import.sh +166 -0
  171. package/skills/experience-lwc-security-validate/scripts/validate-sarif.sh +131 -0
  172. package/skills/experience-ui-bundle-2gp-deploy/SKILL.md +454 -0
  173. package/skills/experience-ui-bundle-2gp-deploy/assets/CustomApplication.app-meta.xml +12 -0
  174. package/skills/experience-ui-bundle-2gp-deploy/assets/PermissionSet.permissionset-meta.xml +9 -0
  175. package/skills/experience-ui-bundle-2gp-deploy/scripts/find-bundle-package-dir.sh +53 -0
  176. package/skills/experience-ui-bundle-agentforce-client-generate/SKILL.md +104 -26
  177. package/skills/experience-ui-bundle-agentforce-client-generate/references/constraints.md +35 -24
  178. package/skills/experience-ui-bundle-agentforce-client-generate/references/examples.md +92 -1
  179. package/skills/experience-ui-bundle-agentforce-client-generate/references/style-tokens.md +2 -0
  180. package/skills/experience-ui-bundle-agentforce-client-generate/references/troubleshooting.md +14 -1
  181. package/skills/experience-ui-bundle-agentforce-client-generate/scripts/detect-framework.sh +67 -0
  182. package/skills/experience-ui-bundle-deploy/SKILL.md +83 -14
  183. package/skills/experience-ui-bundle-deploy/assets/Communities.settings-meta.xml +19 -0
  184. package/skills/experience-ui-bundle-deploy/assets/org-setup.config.template.json +5 -0
  185. package/skills/experience-ui-bundle-deploy/assets/social-login-auth-providers.apex +158 -0
  186. package/skills/experience-ui-bundle-deploy/references/config-scaffold.md +13 -1
  187. package/skills/experience-ui-bundle-deploy/references/social-login.md +179 -0
  188. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +14 -0
  189. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +6 -5
  190. package/skills/experience-ui-bundle-mfa-configure/references/social-login.md +15 -7
  191. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +41 -5
  192. package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +10 -22
  193. package/skills/experience-ui-bundle-salesforce-data-access/references/graphql-hand-authoring.md +4 -19
  194. package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +5 -0
  195. package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +33 -150
  196. package/skills/mobile-platform-native-capabilities-integrate/references/nfc.md +35 -0
  197. package/skills/platform-apex-generate/SKILL.md +8 -7
  198. package/skills/platform-apex-test-generate/SKILL.md +3 -1
  199. package/skills/platform-apex-test-run/SKILL.md +9 -8
  200. package/skills/platform-lightning-type-widget-coordinate/SKILL.md +1 -1
  201. package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +1 -1
  202. package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +1 -1
  203. package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +3 -3
  204. package/skills/platform-mcp-tool-widget-coordinate/SKILL.md +43 -67
  205. package/skills/platform-mcp-tool-widget-coordinate/examples/action-name-source-prompt.md +1 -2
  206. package/skills/platform-mcp-tool-widget-coordinate/examples/apex-invocable-source-prompt.md +2 -3
  207. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-list-source-prompt.md +163 -0
  208. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-single-source-prompt.md +198 -0
  209. package/skills/platform-mcp-tool-widget-coordinate/examples/pasted-tool-output-prompt.md +0 -1
  210. package/skills/platform-mcp-tool-widget-coordinate/references/build-plan-format.md +17 -11
  211. package/skills/platform-mcp-tool-widget-coordinate/references/mcp-tool-output-discovery.md +48 -15
  212. package/skills/platform-mcp-tool-widget-coordinate/references/two-clt-modeling.md +73 -10
  213. package/skills/platform-mcp-tool-widget-coordinate/references/validation-gates.md +48 -8
  214. package/skills/platform-policy-rule-generate/SKILL.md +22 -12
  215. package/skills/platform-policy-rule-generate/references/deploy-errors.md +1 -1
  216. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +8 -29
  217. package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
  218. package/skills/platform-sharing-owd-configure/SKILL.md +20 -8
  219. package/skills/platform-sharing-owd-configure/references/access_levels.md +14 -1
  220. package/skills/platform-sharing-rules-generate/SKILL.md +67 -35
  221. package/skills/platform-sharing-rules-generate/examples/create-cases.md +16 -17
  222. package/skills/platform-sharing-rules-generate/examples/delete-cases.md +34 -79
  223. package/skills/platform-sharing-rules-generate/examples/edit-cases.md +13 -26
  224. package/skills/platform-sharing-rules-generate/scripts/count-remaining-rules.sh +33 -0
  225. package/skills/platform-widget-generate/SKILL.md +3 -5
  226. package/skills/platform-widget-generate/examples/conditional.json +18 -13
  227. package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
  228. package/skills/platform-widget-generate/examples/single-object.json +2 -2
  229. package/skills/platform-widget-generate/references/schema-from-lightning-type.md +27 -6
  230. package/skills/platform-widget-generate/references/widget-bundle-layout.md +4 -3
  231. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +287 -0
  232. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +260 -0
  233. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +252 -0
  234. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/references/mcp-invocation.md +204 -0
  235. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +259 -0
  236. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +188 -0
  237. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +197 -0
  238. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +77 -0
  239. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +316 -0
  240. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/references/mcp-invocation.md +221 -0
  241. package/skills/service-itsm-incident-priority-configure/SKILL.md +168 -0
  242. package/skills/service-itsm-incident-priority-configure/examples/matrix-operations.md +200 -0
  243. package/skills/service-itsm-incident-priority-configure/examples/render-matrix.md +54 -0
  244. package/skills/service-itsm-incident-priority-configure/examples/seed-full-matrix.md +52 -0
  245. package/skills/service-itsm-incident-priority-configure/references/sf-cli-invocation.md +264 -0
  246. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-source-prompt.md +0 -191
  247. package/skills/platform-policy-rule-generate/references/fixtures-index.md +0 -29
@@ -20,9 +20,9 @@
20
20
  ]
21
21
  },
22
22
  {
23
- "definition": "tile/card",
24
- "meta": { "if": "{!$attrs.isVerified}" },
25
- "attributes": { "padding": "md", "variant": "outlined" },
23
+ "definition": "tile/column",
24
+ "attributes": { "padding": "md" },
25
+ "meta": { "if": "{!$attrs.isVerified}"},
26
26
  "children": [
27
27
  {
28
28
  "definition": "tile/row",
@@ -41,25 +41,30 @@
41
41
  ]
42
42
  },
43
43
  {
44
- "definition": "tile/card",
44
+ "definition": "tile/container",
45
45
  "meta": {
46
46
  "forEach": "{!$attrs.tasks}",
47
47
  "forItem": "$task",
48
48
  "if": "{!$task.isUrgent}"
49
49
  },
50
- "attributes": { "padding": "md", "variant": "outlined" },
51
50
  "children": [
52
51
  {
53
- "definition": "tile/row",
54
- "attributes": { "gap": "md", "justify": "between", "align": "center" },
52
+ "definition": "tile/column",
53
+ "attributes": { "padding": "md" },
55
54
  "children": [
56
55
  {
57
- "definition": "tile/text",
58
- "attributes": { "text": "{!$task.title}", "variant": "h4" }
59
- },
60
- {
61
- "definition": "tile/badge",
62
- "attributes": { "label": "{!$task.priority}", "variant": "secondary" }
56
+ "definition": "tile/row",
57
+ "attributes": { "gap": "md", "justify": "between", "align": "center" },
58
+ "children": [
59
+ {
60
+ "definition": "tile/text",
61
+ "attributes": { "text": "{!$task.title}", "variant": "h4" }
62
+ },
63
+ {
64
+ "definition": "tile/badge",
65
+ "attributes": { "label": "{!$task.priority}", "variant": "secondary" }
66
+ }
67
+ ]
63
68
  }
64
69
  ]
65
70
  }
@@ -13,9 +13,9 @@
13
13
  "attributes": { "text": "{!$attrs.title}", "variant": "h1" }
14
14
  },
15
15
  {
16
- "definition": "tile/card",
16
+ "definition": "tile/column",
17
+ "attributes": { "gap": "sm", "padding": "md" },
17
18
  "meta": { "forEach": "{!$attrs.products}", "forItem": "$product" },
18
- "attributes": { "padding": "md", "variant": "outlined" },
19
19
  "children": [
20
20
  {
21
21
  "definition": "tile/row",
@@ -9,8 +9,8 @@
9
9
  "attributes": { "gap": "md", "padding": "md" },
10
10
  "children": [
11
11
  {
12
- "definition": "tile/card",
13
- "attributes": { "padding": "lg", "variant": "elevated" },
12
+ "definition": "tile/column",
13
+ "attributes": { "gap": "md", "padding": "lg" },
14
14
  "children": [
15
15
  {
16
16
  "definition": "tile/text",
@@ -1,6 +1,6 @@
1
1
  # Deriving Widget schema.json From a Lightning Type
2
2
 
3
- When the orchestrator passes a `lightningTypeSchema` (with `path` and `apexClassFqn`), the widget bundle's `schema.json` is derived from the Apex class the Lightning Type references — not invented. The Lightning Type root points at the **outer Apex class** (`@apexClassType/<namespace>__<ClassName>`); that outer class's `@AuraEnabled` fields define the payload shape. Inner classes appear only as nested list-element types (e.g. `List<OpenOpportunity>` on the outer class) and are referenced by their `List<...>` fields, not by a separate FQN. This file documents the derivation rule.
3
+ When the orchestrator passes a `lightningTypeSchema` (with `path` and `apexClassFqn`), the widget bundle's `schema.json` is derived from the Apex class the Lightning Type references — not invented. The Lightning Type root points at the **outer Apex class** (`@apexClassType/<namespace>__<ClassName>`); that outer class's `@AuraEnabled` fields define the payload shape. Inner classes appear either as a **singular field** (e.g. `InnerClass field` on the outer class) or as a **list-element type** (e.g. `List<InnerClass>` on the outer class). In either case, the widget schema references the nested type by its own inner-class FQN (`@apexClassType/<namespace>__<OuterClass>$<InnerClass>`) — see step 4 below. This file documents the derivation rule.
4
4
 
5
5
  > **Scope:** This guide covers Apex-backed Lightning Types only. The orchestrator (`platform-lightning-type-widget-coordinate`) only routes Apex-backed types into this skill. Object/JSON-based Lightning Types (Lightning Type root `lightning:type: "lightning__objectType"` with primitive `properties`) are out of scope here.
6
6
 
@@ -29,7 +29,7 @@ The Lightning Type root is minimal and points at the **outer Apex class**:
29
29
  The widget cannot mirror this directly — the widget root is a plain `type: "object"` whose `properties.attributes` wrapper carries `lightning:type: "lightning__objectType"` and the actual field map. Derive the widget shape from the Apex class's `@AuraEnabled` fields:
30
30
 
31
31
  1. Read the Apex class file (path provided by the orchestrator's Phase 4 output, or located via `<pkgDir>/classes/<ClassName>.cls`). The `apexClassFqn` from the orchestrator names the outer class.
32
- 2. **Enumerate every `@AuraEnabled` field on the outer class AND every field on each inner class referenced by a `List<Inner>` field.** Default disposition is **include**. If you propose to drop any field, ASK the user first and record the rationale in the build plan's `Properties omitted:` section. Do not silently drop.
32
+ 2. **Enumerate every `@AuraEnabled` field on the outer class AND every field on each inner class referenced by a `List<Inner>` field or a singular inner-class field.** Default disposition is **include**. If you propose to drop any field, ASK the user first and record the rationale in the build plan's `Properties omitted:` section. Do not silently drop.
33
33
  3. For each retained field, map the Apex type to the matching `lightning:type`:
34
34
 
35
35
  | Apex type | `lightning:type` (in widget schema) |
@@ -38,10 +38,31 @@ The widget cannot mirror this directly — the widget root is a plain `type: "ob
38
38
  | `Decimal`, `Double`, `Integer`, `Long` | `lightning__numberType` |
39
39
  | `Boolean` | `lightning__booleanType` |
40
40
  | `Date`, `Datetime` | `lightning__dateTimeType` |
41
- | `List<Primitive>` (e.g. `List<String>`) | `lightning__listType` |
42
- | `List<InnerClass>` | `lightning__listType` — and the widget body MUST iterate this list with `forEach`/`forItem` and bind every `@AuraEnabled` field on `InnerClass` via `{!$item.<innerField>}`. See `references/widget-meta-directives.md`. |
41
+ | `List<Primitive>` (e.g. `List<String>`) | `lightning__listType`, with `items.lightning:type` set to the matching primitive `lightning:type` from this table (e.g. `items.lightning:type: "lightning__textType"` for `List<String>`). |
42
+ | `List<InnerClass>` | `lightning__listType`, with `items.lightning:type` set to the inner Apex class reference (see step 4). The widget body MUST also iterate this list with `forEach`/`forItem` and bind every `@AuraEnabled` field on `InnerClass` via `{!$item.<innerField>}`. See `references/widget-meta-directives.md`. |
43
+ | `InnerClass` (singular field) | `lightning:type` set directly to the inner Apex class reference (see step 4). Bind its fields via `{!$attrs.<outerField>.<innerField>}`. |
43
44
 
44
- 4. Build the widget `schema.json`. **Every `@AuraEnabled` field on the outer class** that survived step 2 MUST appear as an entry under `properties.attributes.properties`. Inner-class fields are NOT separate entries — they are accessed via the loop variable inside `forEach`, so they do not need their own entry in the widget schema.
45
+ 4. Build the widget `schema.json`. **Every `@AuraEnabled` field on the outer class** that survived step 2 MUST appear as an entry under `properties.attributes.properties`.
46
+
47
+ For any field whose type is an inner Apex class — whether a singular field or a `List<InnerClass>` — the property (or, for a list, its `items`) MUST reference the inner Apex class type directly, using the same `@apexClassType/<namespace>__<OuterClass>$<InnerClass>` form as the Lightning Type root, with `<InnerClass>` naming the nested class as declared inside the outer class. Do not redeclare the inner class's fields inline:
48
+
49
+ ```json
50
+ "<listFieldName>": {
51
+ "title": "<List Field Label>",
52
+ "description": "<short description>",
53
+ "lightning:type": "lightning__listType",
54
+ "items": {
55
+ "lightning:type": "@apexClassType/<namespace>__<OuterClass>$<InnerClass>"
56
+ }
57
+ },
58
+ "<singularInnerFieldName>": {
59
+ "title": "<Field Label>",
60
+ "description": "<short description>",
61
+ "lightning:type": "@apexClassType/<namespace>__<OuterClass>$<InnerClass>"
62
+ }
63
+ ```
64
+
65
+ This is the only case where a widget schema property carries an `@apexClassType/...` reference instead of a primitive `lightning:type` — it lets the runtime resolve the inner class's own `@AuraEnabled` fields without the widget schema duplicating them. For a list, inner-class fields are reached in the widget body via the `forEach`/`forItem` loop variable (`{!$item.<innerField>}`); for a singular field, via `{!$attrs.<outerField>.<innerField>}` — neither case gets a separate nested `properties` entry in the schema.
45
66
 
46
67
  ```json
47
68
  {
@@ -55,7 +76,7 @@ The widget cannot mirror this directly — the widget root is a plain `type: "ob
55
76
  "<textFieldName>": { "title": "<Text Field Label>", "lightning:type": "lightning__textType" },
56
77
  "<numberFieldName>": { "title": "<Number Field Label>", "lightning:type": "lightning__numberType" },
57
78
  "<dateTimeFieldName>": { "title": "<Date/Time Field Label>", "lightning:type": "lightning__dateTimeType" },
58
- "<listFieldName>": { "title": "<List Field Label>", "lightning:type": "lightning__listType" }
79
+ "<listFieldName>": { "title": "<List Field Label>", "lightning:type": "lightning__listType", "items": { "lightning:type": "<primitive lightning:type, or an inner-class @apexClassType/... reference>" } }
59
80
  }
60
81
  }
61
82
  }
@@ -64,14 +64,14 @@ JSON Schema describing what data the widget accepts at runtime. Fields are wrapp
64
64
 
65
65
  - `description` (string)
66
66
 
67
- **Each leaf under `properties.attributes.properties` MUST have `lightning:type`.** Optional per-leaf: `title`, `description`.
67
+ **Each leaf under `properties.attributes.properties` MUST have `lightning:type`.** Optional per-leaf: `title`, `description`. **A `lightning__listType` leaf MUST also carry `items.lightning:type`** — set to the matching primitive `lightning:type` for a list of primitives, or to an `@apexClassType/...` reference for a list of Apex objects (see `references/schema-from-lightning-type.md`).
68
68
 
69
69
  Example:
70
70
 
71
71
  ```json
72
72
  {
73
73
  "title": "Order Summary Widget",
74
- "description": "Displays an order's id, customer, and total.",
74
+ "description": "Displays an order's id, customer, total, and tags.",
75
75
  "type": "object",
76
76
  "properties": {
77
77
  "attributes": {
@@ -79,7 +79,8 @@ Example:
79
79
  "properties": {
80
80
  "orderId": { "title": "Order ID", "description": "Stable identifier shown in the header.", "lightning:type": "lightning__textType" },
81
81
  "customer": { "title": "Customer", "description": "Display name of the customer on the order.", "lightning:type": "lightning__textType" },
82
- "total": { "title": "Total", "description": "Order total in the order's currency.", "lightning:type": "lightning__numberType" }
82
+ "total": { "title": "Total", "description": "Order total in the order's currency.", "lightning:type": "lightning__numberType" },
83
+ "tags": { "title": "Tags", "description": "Labels attached to the order.", "lightning:type": "lightning__listType", "items": { "lightning:type": "lightning__textType" } }
83
84
  }
84
85
  }
85
86
  }
@@ -0,0 +1,287 @@
1
+ ---
2
+ name: service-itsm-agentic-setup-cmdb-access-assign
3
+ description: "Grant a specific user access to CMDB (Configuration Management Database) data in Service Cloud ITSM against a production or sandbox org by assigning the license-backed CMDB permission sets (Configuration Item Reader, Owner, Type Reader, Type Manager) and their permission-set licenses. Use when the user asks to give someone CMDB access, assign CMDB permission sets, grant a user the Configuration Item Reader/Owner role, or fix a CMDB 403 FUNCTIONALITY_NOT_ENABLED that a user still hits after the CMDB feature is already enabled. Triggers on: assign CMDB permission set, grant CMDB access, give user Configuration Item access, CMDB access for user, user still gets CMDB 403 after enable. DO NOT TRIGGER when: the user wants to turn on the CMDB feature or provision the ITOM tenant for the whole org (that is the CMDB feature-enable skill), only install a CMDB content bundle, work with CMDB records directly, or assign general (non-CMDB) permission sets to users (use dx-org-permission-set-assign)."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "67.0"
7
+ relatedSkills:
8
+ - "dx-org-permission-set-assign"
9
+ - "service-itsm-agentic-setup-cmdb-bundle-deploy"
10
+ - "service-itsm-agentic-setup-cmdb-configure"
11
+ mcpTools:
12
+ headless-360:
13
+ tools: ["describe", "discover", "dispatch", "dispatch_readonly"]
14
+ semver: ">=1.0.0"
15
+ allowed-tools: |
16
+ Read AskUserQuestion
17
+ mcp__headless-360__discover
18
+ mcp__headless-360__describe
19
+ mcp__headless-360__dispatch
20
+ mcp__headless-360__dispatch_readonly
21
+ ---
22
+
23
+ # Assign a User CMDB Access (Service Cloud ITSM)
24
+
25
+ Grants a **specific user** the ability to read and work with CMDB (Configuration Management Database)
26
+ data by assigning the license-backed CMDB permission sets and their permission-set licenses. Every
27
+ call runs through the **Salesforce-hosted Headless-360 MCP server** (server key `headless-360`) via its
28
+ four meta-tools (`discover`, `describe`, `dispatch_readonly`, `dispatch`). The org is derived from the
29
+ OAuth JWT bound to the current MCP session — the skill never handles an org id, alias, or credentials —
30
+ so this works identically against **production** and sandbox with no per-user MCP install.
31
+
32
+ This is **Layer 3** of CMDB setup. It assumes the org-level CMDB gate is already lifted (the feature
33
+ is ENABLED) — that is a separate skill (`service-itsm-agentic-setup-cmdb-configure`, Layers 0–2).
34
+ This skill grants a *user* access; it does not enable the feature for the org.
35
+
36
+ ## The gap this skill closes
37
+
38
+ Enabling the CMDB feature lifts the **org-level** gate, but some CMDB reads (e.g. `bundleListView`)
39
+ also enforce **user-level** access. A user with no CMDB permission sets still gets
40
+ `403 FUNCTIONALITY_NOT_ENABLED` ("not enabled for this user") even when the feature is correctly
41
+ ENABLED for the org. This skill assigns that user the CMDB permission sets so those reads succeed.
42
+
43
+ > **This skill is a no-op if the org feature is not enabled.** User-level access has no effect until
44
+ > the org-level CMDB feature is ENABLED. If you find the org gate is still closed, stop and tell the
45
+ > user the CMDB feature must be turned on for the org first — see the cross-skill note at the end.
46
+
47
+ ## The four CMDB permission sets
48
+
49
+ Each is a license-backed Standard permission set; assigning it also requires (and this skill assigns)
50
+ its permission-set license (PSL).
51
+
52
+ | Role | Permission set (`Name`) | Backing PSL (`DeveloperName`) | Grants |
53
+ |------|-------------------------|-------------------------------|--------|
54
+ | Reader | `ItSrvcCnfgItmReadPermissionSet` | `ItSrvcCnfgItmReadPsl` | Read CMDB configuration items |
55
+ | Owner | `ItSrvcCnfgItmOwnerPermissionSet` | `ItSrvcCnfgItmOwnerPsl` | Own / edit configuration items |
56
+ | Type Reader | `ItSrvcCnfgItmTypReadPermissionSet` | `ItSrvcCnfgItmTypReadPsl` | Read configuration-item types |
57
+ | Type Manager | `ItSrvcCnfgItmTypManagerPermissionSet` | `ItSrvcCnfgItmTypMgrPsl` | Manage configuration-item types |
58
+
59
+ For read-only CMDB access, **Reader** (+ **Type Reader**) is the minimal set. For users who edit CMDB
60
+ records, add **Owner**; for those who manage the type catalog, add **Type Manager**. If the user does
61
+ not specify a role, ask (see Clarifying questions) — default to **Reader + Type Reader** for a viewer.
62
+
63
+ > **Bundle management needs Type Manager.** If the user's goal is to **install or manage CMDB content
64
+ > bundles** (or they hit a `403` on a bundle-management read such as `GET /connect/cmdb/bundles/details`),
65
+ > the role that clears it is **Type Manager** — a user holding only Reader / Owner / Type Reader still
66
+ > gets `403 FUNCTIONALITY_NOT_ENABLED` on bundle operations. Assign **Type Manager** (with its own
67
+ > backing PSL, `ItSrvcCnfgItmTypMgrPsl`) for anyone who deploys or manages bundles.
68
+
69
+ ## Scope
70
+
71
+ - **In scope**: resolving the target user, resolving the requested CMDB permission set(s), checking
72
+ existing assignments, assigning the permission-set license(s) and permission set(s), and verifying.
73
+ - **Out of scope**: enabling the CMDB feature / provisioning the ITOM tenant (Layers 0–2 —
74
+ `service-itsm-agentic-setup-cmdb-configure`), installing content bundles, CMDB record CRUD,
75
+ creating custom permission sets, or org-permission/edition changes.
76
+
77
+ ## Mechanism
78
+
79
+ All operations dispatch through **headless-360** MCP tools. Reads go through
80
+ `mcp__headless-360__dispatch_readonly`, writes through `mcp__headless-360__dispatch` — both take raw
81
+ HTTP: `{"url": "<path>", "method": "GET|POST", "body"?: {...}, "queryParams"?: {...}}` — **not**
82
+ `{operation_id, arguments}`. See `references/mcp-invocation.md` for the exact `url` / `method` / `body`
83
+ of every call. The four tools:
84
+
85
+ - `mcp__headless-360__discover` — semantic search over the indexed operation catalog. The standard
86
+ `/query` and `/sobjects/...` REST routes this skill uses are not always indexed, so a miss does
87
+ **not** mean the route is absent — dispatch the exact path directly (see `references/mcp-invocation.md`).
88
+ - `mcp__headless-360__describe` — pull the full input schema and canonical route before any POST.
89
+ - `mcp__headless-360__dispatch_readonly` — the dispatcher for every read (GET).
90
+ - `mcp__headless-360__dispatch` — the dispatcher for every write (POST/PATCH).
91
+
92
+ The skill never handles credentials — the org is bound to the current OAuth session. If a `dispatch*`
93
+ call returns an auth error, tell the user to re-authenticate the headless-360 MCP connection (and
94
+ confirm the session points at the intended org), then stop.
95
+
96
+ ---
97
+
98
+ ## Clarifying questions
99
+
100
+ Ask only what you cannot infer from conversation:
101
+
102
+ - **Which user?** The username (or a name/email you can resolve to exactly one user). If the request
103
+ is "give me access" / "for the current user", resolve the running user.
104
+ - **Which role(s)?** Reader, Owner, Type Reader, Type Manager — or "read-only access" (→ Reader +
105
+ Type Reader). Default to **Reader + Type Reader** for a viewer if unspecified. If the user
106
+ installs or manages CMDB **content bundles** (or is fixing a bundle-management 403), include
107
+ **Type Manager** — bundle operations 403 without it.
108
+ - **Which org?** Confirm the target org and state plainly that **this org will be modified** (assigning
109
+ permission sets is a write). For production, get explicit confirmation.
110
+
111
+ Do not re-ask for anything the user already provided; pre-populate and note "(from conversation)".
112
+
113
+ ---
114
+
115
+ ## Workflow
116
+
117
+ Always read before you write: run the read-only checks before any assignment. All assignments are
118
+ per-user and idempotent — a duplicate assignment must be treated as already-done, not an error.
119
+
120
+ ### Step 1 — Confirm the org-level CMDB feature is enabled (read-only, prerequisite)
121
+
122
+ User access is meaningless until the org gate is lifted. Read the feature status:
123
+
124
+ ```text
125
+ dispatch_readonly({ "url": "/services/data/v67.0/connect/setup/discovery/feature/service-cloud-itsm-cmdb-integration/status", "method": "GET" })
126
+ ```
127
+
128
+ - `status == ENABLED` → proceed.
129
+ - `status != ENABLED` (or the call returns `403 FUNCTIONALITY_NOT_ENABLED`) → STOP. Tell the user, in
130
+ plain language, that CMDB has to be turned on for the org before a user can be given access, and
131
+ point them to the CMDB feature-enable skill (see the cross-skill note). Do not assign anything.
132
+
133
+ ### Step 2 — Resolve the target user (read)
134
+
135
+ **For "the current user" / "me" / "my own user"** (do NOT use `USER_ID()` — it is Apex-only and is
136
+ rejected by the REST query API; do NOT rely on `/chatter/users/me` or `/connect/user-profiles/me` —
137
+ they return `403 FUNCTIONALITY_NOT_ENABLED` when Chatter/Communities are off). Instead read the API
138
+ root and parse the identity URL:
139
+
140
+ ```text
141
+ dispatch_readonly({ "url": "/services/data/v67.0/", "method": "GET" })
142
+ ```
143
+
144
+ The response `identity` field is a URL ending in `/<orgId>/<userId>` (the user Id is the last path
145
+ segment and starts with `005`). Use that Id directly as the target user, or confirm it:
146
+
147
+ ```text
148
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id, Username, Name, IsActive FROM User WHERE Id = '<userId>'" } })
149
+ ```
150
+
151
+ **For a named user** (username / email supplied):
152
+
153
+ ```text
154
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id, Username, Name, IsActive FROM User WHERE Username = '<username>'" } })
155
+ ```
156
+
157
+ - Exactly one active user → capture the `Id`.
158
+ - Zero results → STOP; tell the user no matching user was found and ask them to confirm the username.
159
+ - More than one → STOP; list the candidates (Name + Username) and ask which one.
160
+ - User inactive → warn the user; assignment can still proceed but the access takes effect only when
161
+ the user is active.
162
+
163
+ ### Step 3 — Resolve the requested permission set(s) (read)
164
+
165
+ For each requested role, resolve the permission set and its backing license:
166
+
167
+ ```text
168
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id, Name, LicenseId FROM PermissionSet WHERE Name = '<psName>'" } })
169
+ ```
170
+
171
+ Use the `Name` values from the table above. Capture each `Id` (the permission set) and `LicenseId`
172
+ (the PSL to assign). If a permission set is not found, the org likely is not CMDB-licensed — stop and
173
+ report that CMDB does not appear to be set up on this org.
174
+
175
+ ### Step 4 — Check existing assignments (read — idempotency)
176
+
177
+ For each target user + permission set, check whether the assignment already exists:
178
+
179
+ ```text
180
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id FROM PermissionSetAssignment WHERE AssigneeId = '<userId>' AND PermissionSetId = '<psId>'" } })
181
+ dispatch_readonly({ "url": "/services/data/v67.0/query", "method": "GET", "queryParams": { "q": "SELECT Id FROM PermissionSetLicenseAssign WHERE AssigneeId = '<userId>' AND PermissionSetLicenseId = '<pslId>'" } })
182
+ ```
183
+
184
+ If both already exist for a role, that role is **already assigned** — skip its writes and record it as
185
+ already-done. Only assign what is missing.
186
+
187
+ ### Step 5 — Assign the permission-set license, then the permission set (write — confirm first)
188
+
189
+ Confirm the target user, org, and role(s) with the user, then for each missing role assign the PSL
190
+ first, then the permission set:
191
+
192
+ ```text
193
+ dispatch({ "url": "/services/data/v67.0/sobjects/PermissionSetLicenseAssign", "method": "POST", "body": { "AssigneeId": "<userId>", "PermissionSetLicenseId": "<pslId>" } })
194
+
195
+ dispatch({ "url": "/services/data/v67.0/sobjects/PermissionSetAssignment", "method": "POST", "body": { "AssigneeId": "<userId>", "PermissionSetId": "<psId>" } })
196
+ ```
197
+
198
+ - `201` → assigned.
199
+ - `400 DUPLICATE_VALUE` → the user already had it; treat as success (idempotent), not a failure.
200
+ - A license-limit error (e.g. `INSUFFICIENT_ACCESS` / no seats) → STOP for that role; tell the user
201
+ the CMDB license has no available seats and how many are in use (see `references/mcp-invocation.md`
202
+ for the seat query). Do not retry.
203
+
204
+ ### Step 6 — Verify (read — do NOT trust the POST response alone)
205
+
206
+ Re-run the Step 4 queries. Confirm each requested role now has **both** a `PermissionSetAssignment`
207
+ and a `PermissionSetLicenseAssign` for the user. Report per-role: assigned / already had it. Only
208
+ roles confirmed present in this read count as done.
209
+
210
+ ---
211
+
212
+ ## Rules / Constraints
213
+
214
+ | Constraint | Rationale |
215
+ |-----------|-----------|
216
+ | Confirm the org feature is ENABLED before assigning | User access has no effect until the org-level CMDB gate is lifted; assigning first would be a misleading no-op |
217
+ | Resolve the user to exactly one record before writing | Assigning to the wrong (or an ambiguous) user is hard to reverse and a security concern |
218
+ | Read existing assignments before every assign | Assignment is per-user; re-assigning throws `DUPLICATE_VALUE` — skip what already exists |
219
+ | Assign the PSL before the permission set | The permission set is license-backed; the license seat must be held for the assignment to stick |
220
+ | Treat `DUPLICATE_VALUE` as success | It means the user already has that access — idempotent, not an error |
221
+ | Never create or edit permission sets | This skill only *assigns* the standard CMDB permission sets; authoring perm sets is out of scope |
222
+ | Confirm the target org, user, and each write with the user | These are real changes granting a user data access on a live org |
223
+ | Never expose internal jargon to the user | Keep record IDs, HTTP status codes (403/400/…), API error codes (`FUNCTIONALITY_NOT_ENABLED`, `DUPLICATE_VALUE`), object names (`PermissionSetLicenseAssign`), developer names (`ItSrvcCnfgItmReadPsl`), and tooling internals (`dispatch`, `headless-360`) out of user-facing output. Use human-readable role names and plain language |
224
+
225
+ ---
226
+
227
+ ## Verification checklist
228
+
229
+ - [ ] Org CMDB feature confirmed `ENABLED` before any assignment?
230
+ - [ ] Target user resolved to exactly one record?
231
+ - [ ] Each requested role's permission set and backing license resolved?
232
+ - [ ] Existing assignments checked before writing (idempotency)?
233
+ - [ ] For each requested role, both the permission set and its license are assigned?
234
+ - [ ] Verified by a post-write read (not the POST response alone)?
235
+ - [ ] Confirmed the target org, user, and each write with the user first?
236
+
237
+ ---
238
+
239
+ ## Output expectations
240
+
241
+ ```text
242
+ CMDB Access Assignment — Complete (via service-itsm-agentic-setup-cmdb-access-assign)
243
+
244
+ Target org: <org>
245
+ User: <name> (<username>)
246
+
247
+ Configuration Item Reader ......... Assigned
248
+ Configuration Item Type Reader .... Already had access
249
+
250
+ This user can now read CMDB data in this org. If they still can't, confirm the org's
251
+ CMDB feature is turned on (that's a separate setup step).
252
+ ```
253
+
254
+ Keep internal jargon out of user-facing output (no record IDs, HTTP status codes, error codes, object
255
+ or developer names). If any step fails, stop and tell the user — in plain language — which part didn't
256
+ succeed and what it means for them. Translate any raw error (e.g. a 403 or `FUNCTIONALITY_NOT_ENABLED`)
257
+ into what it means ("CMDB isn't turned on for this org yet"), rather than echoing the code.
258
+
259
+ ---
260
+
261
+ ## Common failures (surface these in plain language)
262
+
263
+ | Symptom | Likely cause | What to tell the user |
264
+ |---------|--------------|-----------------------|
265
+ | Feature status not `ENABLED` (or `403` on the status read) | Org-level CMDB gate not lifted | CMDB must be turned on for the org first; this is a separate setup step — point to the feature-enable skill |
266
+ | Permission set not found | Org is not CMDB-licensed / not set up | CMDB does not appear to be available on this org; confirm it is licensed and enabled |
267
+ | `403 FUNCTIONALITY_NOT_ENABLED` on a **bundle-management** read (e.g. `bundles/details`, `bundleListView`) after assignment, feature ENABLED | The user holds Reader/Owner/Type Reader but not **Type Manager** — bundle operations require it | Assign **Type Manager** — this role is required for CMDB bundle management; the other CMDB roles do not cover bundle operations |
268
+ | `400 DUPLICATE_VALUE` on assign | User already has that access | Not an error — report the role as already assigned |
269
+ | License-limit / no-seats error on assign | CMDB permission-set license seats exhausted | Report seats in use vs available; a seat must free up (or more licenses added) before assigning |
270
+ | `dispatch*` auth error | headless-360 MCP session not authenticated / token expired | Re-authenticate the headless-360 MCP connection and confirm the session points at the intended org |
271
+
272
+ ---
273
+
274
+ ## Cross-skill integration
275
+
276
+ | When | Skill |
277
+ |------|-------|
278
+ | The org CMDB feature is not enabled yet (org gate still closed) | `service-itsm-agentic-setup-cmdb-configure` (Layers 0–2 — enable the feature first, then return here) |
279
+ | The user needs the CMDB base content bundle installed | `service-itsm-agentic-setup-cmdb-bundle-deploy` (Layer 4 — content, separate from user access). That skill's bundle-management reads require the user hold **Type Manager**, so assign it here first |
280
+
281
+ ---
282
+
283
+ ## Reference file index
284
+
285
+ | File | When to read |
286
+ |------|--------------|
287
+ | `references/mcp-invocation.md` | Exact `dispatch*` url/method/body for every read and write, response envelopes, the license-seat query, and the error table |