@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
@@ -0,0 +1,52 @@
1
+ # Seeding a Full Matrix
2
+
3
+ Seed all cells at once with the conventional Impact × Urgency mapping. With the sf-CLI Tooling API path, each cell is its own POST — there is no server-side "replace whole matrix" endpoint. Compose the plan first, confirm with the user, then dispatch one POST per cell.
4
+
5
+ ## Pre-requisites
6
+
7
+ 1. Fetch the entity's active picklist values — see `../references/sf-cli-invocation.md` § Picklist extraction.
8
+ 2. Read the current matrix rows via Tooling SOQL. If the matrix is non-empty and the user asked to *seed*, ask whether they want to **replace** (delete existing rows first) or **augment** (add only missing cells) — do not seed blindly on top of existing rows.
9
+ 3. Confirm the conventional mapping below uses only values in the fetched picklists. If the org has customized picklists, adjust the plan before dispatch — do not silently coerce.
10
+
11
+ ## Conventional mapping (defaults only)
12
+
13
+ ```text
14
+ Impact ↓ / Urgency → High Medium Low
15
+ High Critical High Moderate
16
+ Medium High Moderate Low
17
+ Low Moderate Low Low
18
+ ```
19
+
20
+ Treat as a starting point; customers often grow to 4–5 levels per axis and add `Trivial` / `Emergency`. Confirm the resulting priorities with the user before dispatch.
21
+
22
+ ## Dispatch — one POST per row
23
+
24
+ Replace `<alias>` with the user's target-org alias. Pick starting `<unique>` as `max(current DeveloperName suffix) + 1`, incrementing for each row.
25
+
26
+ ```bash
27
+ # One row per POST — repeat for each of the nine cells.
28
+ # Pass each body inline with --body '{...}'; sf api request rest also accepts
29
+ # --body @file, but inline keeps the payload in the skill's control.
30
+ sf api request rest \
31
+ "/services/data/v67.0/tooling/sobjects/ServiceOpPriorityConfig" \
32
+ --method POST \
33
+ --header "Content-Type:application/json" \
34
+ --body '{"ReferenceObject": "Incident", "Impact": "High", "Urgency": "High", "Priority": "Critical", "DeveloperName": "ServiceOpPriorityConfigIncidentSeed0", "MasterLabel": "ServiceOpPriorityConfigIncidentSeed0"}' \
35
+ --target-org <alias>
36
+
37
+ # Repeat for rows 1–8 with the mapping above (increment the Seed<N> suffix).
38
+ ```
39
+
40
+ Each POST returns `201 {"id": "<Id>", "success": true}`. If any POST returns a non-2xx, halt and surface the raw response — do not continue seeding partially.
41
+
42
+ For a scripted seed, iterate the mapping array in the caller's language of choice (bash + `jq`, node, etc.). Every row must be validated against the Phase-1 picklists before dispatch — the Tooling REST endpoint accepts garbage values silently.
43
+
44
+ ## Replace vs. augment
45
+
46
+ The Tooling API path is not atomic across rows. Two choices:
47
+
48
+ **Augment (recommended):** For each conventional row, check the Phase-2 snapshot. Only POST rows whose `(Impact, Urgency)` coordinate is not already present. Existing rows keep their current Priority. The server does NOT enforce uniqueness on `(ReferenceObject, Urgency, Impact)`, so a POST on an already-present coordinate silently persists as a duplicate row — dedup is client-side only.
49
+
50
+ **Replace:** First `sf data delete record --sobject ServiceOpPriorityConfig --use-tooling-api --record-id <Id>` for every existing row, then POST the conventional set. Between the delete and the last POST the matrix is *partially populated* — the runtime priority derivation will use whatever rows are present at each moment. Warn the user before choosing replace.
51
+
52
+ Do not seed blindly on an entity with existing rows — surface the current state and confirm the intended semantics (replace vs. augment) with the user before Phase 4.
@@ -0,0 +1,264 @@
1
+ # sf CLI invocation reference — service-itsm-incident-priority-configure
2
+
3
+ This skill invokes every read and write through the **`sf` CLI**. Two transports are used:
4
+
5
+ - `sf api request rest` — direct authenticated REST call against the org.
6
+ - `sf data query --use-tooling-api` / `sf data delete record --use-tooling-api` — Tooling API convenience wrappers with better parsing than raw REST.
7
+ - `sf project retrieve start` + `sf project deploy start` — for the `StandardValueSet` metadata that carries the default fallback priority.
8
+
9
+ Every invocation below was verified 200 (or `Succeeded` for the metadata deploy) against `orgfarm-afdcaf38b6` on 2026-08-04. Path prefixes are load-bearing; do not strip `/services/data/v67.0/` or `/services/data/v67.0/tooling/`.
10
+
11
+ ## Authentication
12
+
13
+ `sf` mints the bearer token from the CLI's authenticated org — the skill never handles tokens. Confirm the target org first:
14
+
15
+ ```bash
16
+ sf org list
17
+ sf org display --target-org <alias>
18
+ ```
19
+
20
+ If the org is not `Connected`, run `sf org login web --alias <alias>` (or the JWT equivalent) and re-verify. Every command below takes `--target-org <alias>`.
21
+
22
+ ## Response envelope
23
+
24
+ `sf api request rest` outputs the raw HTTP body (append `--include` to see the status line + headers). Tooling REST GETs return standard `{records: [...], size: N, totalSize: N, done: true, ...}`. PATCH on the two Setup Connect API prefs returns `{"isPreferenceEnabled": <bool>}` — the new state is echoed, so no re-read is needed.
25
+
26
+ `sf data query` normalizes Tooling SOQL results into a table by default; add `--json` for a machine-parseable envelope.
27
+
28
+ ---
29
+
30
+ ## Routes
31
+
32
+ ### 1. Preflight — Incident describe (`sf api request rest`)
33
+
34
+ ```bash
35
+ sf api request rest \
36
+ "/services/data/v67.0/sobjects/Incident/describe" \
37
+ --method GET \
38
+ --target-org <alias>
39
+ ```
40
+
41
+ **Expected:** HTTP 200. Body carries the entity schema. Extract active picklist values for `Impact`, `Urgency`, `Priority` from the `fields[]` array — each field has `picklistValues[]` and each entry has `value` (API name), `label`, and `active` (only `true` counts). Use `value`, not `label` — customers rename labels but the server stores API values.
42
+
43
+ If the describe response is very large (>1MB), dispatch a subagent (haiku tier) to pull just the three picklists.
44
+
45
+ If the response is a `404 NOT_FOUND`, Incident Management is not enabled on the org. Direct the user to enable it first (use the `service-itsm-incident-mgmt-configure` skill).
46
+
47
+ ### 2. Matrix enable flag — `IncPriorityMatrixEnabled`
48
+
49
+ **Read:**
50
+
51
+ ```bash
52
+ sf api request rest \
53
+ "/services/data/v67.0/setup/org/preferences/IncPriorityMatrixEnabled" \
54
+ --method GET \
55
+ --target-org <alias>
56
+ ```
57
+
58
+ Response: `{"isPreferenceEnabled": <bool>}` — 200.
59
+
60
+ **Write:**
61
+
62
+ ```bash
63
+ sf api request rest \
64
+ "/services/data/v67.0/setup/org/preferences/IncPriorityMatrixEnabled" \
65
+ --method PATCH \
66
+ --header "Content-Type:application/json" \
67
+ --body '{"desiredState": true}' \
68
+ --target-org <alias>
69
+ # use '{"desiredState": false}' to disable
70
+ ```
71
+
72
+ Response: `{"isPreferenceEnabled": <bool>}` — 200. **The response echoes the new state**, so no re-read is required.
73
+
74
+ Disabling stops the server from deriving Priority on future Incident writes. Matrix rows and the default priority are **not** cleared; re-enabling restores derivation instantly. Existing Incidents keep their stamped priority.
75
+
76
+ ### 3. Manual override — `IncPriorityOverrideEnabled`
77
+
78
+ Same shape as `IncPriorityMatrixEnabled` — same URL path except the pref name changes. Read/write via `sf api request rest`, same body shape, same response.
79
+
80
+ The override flag controls whether users can override the derived priority on an individual Incident record. Flipping it does **not** touch matrix rows or the default priority.
81
+
82
+ ### 4. Matrix rows — read
83
+
84
+ ```bash
85
+ sf data query \
86
+ --use-tooling-api \
87
+ --target-org <alias> \
88
+ --query "SELECT Id, DeveloperName, ReferenceObject, Urgency, Impact, Priority FROM ServiceOpPriorityConfig WHERE ReferenceObject = 'Incident'"
89
+ ```
90
+
91
+ Zero to `|Impact| × |Urgency|` rows returned. Row keys are PascalCase (`Id`, `DeveloperName`, `ReferenceObject`, `Urgency`, `Impact`, `Priority`) — these are Tooling SObject field names, not the lowercase JSON keys the Aura controller used. `DeveloperName` is included so the add step can derive a fresh unique suffix from existing rows.
92
+
93
+ For programmatic scripts, add `--json` and parse `result.records[]`.
94
+
95
+ ### 5. Matrix rows — add
96
+
97
+ ```bash
98
+ sf api request rest \
99
+ "/services/data/v67.0/tooling/sobjects/ServiceOpPriorityConfig" \
100
+ --method POST \
101
+ --header "Content-Type:application/json" \
102
+ --body '{"ReferenceObject": "Incident", "Urgency": "<one of the fetched Urgency values>", "Impact": "<one of the fetched Impact values>", "Priority": "<one of the fetched Priority values>", "DeveloperName": "ServiceOpPriorityConfigIncident<unique-suffix>", "MasterLabel": "ServiceOpPriorityConfigIncident<same-suffix>"}' \
103
+ --target-org <alias>
104
+ ```
105
+
106
+ Pass the body inline with `--body '{...}'`. `sf api request rest` accepts either inline JSON or `--body @file`; inline keeps the payload in the skill's control and avoids writing to a path outside the project.
107
+
108
+ Response: `{"id": "<Id>", "success": true, "errors": [], "warnings": [], "infos": []}` — 201.
109
+
110
+ Suffix pattern: pattern-match the existing rows' `DeveloperName` values from the Phase-2 read and pick a fresh integer that isn't already used. `DeveloperName` uniqueness is enforced by the Tooling API.
111
+
112
+ **Important:** The Tooling REST endpoint does NOT enforce picklist validation on `Urgency`, `Impact`, `Priority`. Garbage values are accepted at the wire level but the runtime matrix evaluator refuses to use them. Validate every value against the Phase-1 picklist values before dispatch.
113
+
114
+ **Duplicates:** the server does NOT enforce `(ReferenceObject, Urgency, Impact)` uniqueness — a second POST on the same coordinate is accepted as a separate row (verified 2026-08-04 on `itsm-eval-org`: two rows with identical `(Incident, Medium, High)` both persisted with distinct `Id`s). Client-side dedup against the Phase-2 snapshot is the ONLY guard against duplicate matrix cells; if you skip it, the runtime picks one of the duplicates non-deterministically.
115
+
116
+ **ReferenceObject:** the server accepts any string for `ReferenceObject` (verified: a `Problem` row inserted successfully). `ServiceOpPriorityConfig` is the shared SObject for Incident / Problem / ChangeRequest matrices. Scope to `Incident` is skill-enforced only — refuse any other value client-side.
117
+
118
+ ### 6. Matrix rows — change
119
+
120
+ ```bash
121
+ sf api request rest \
122
+ "/services/data/v67.0/tooling/sobjects/ServiceOpPriorityConfig/<Id>" \
123
+ --method PATCH \
124
+ --header "Content-Type:application/json" \
125
+ --body '{"Priority": "<new value>"}' \
126
+ --target-org <alias>
127
+ ```
128
+
129
+ Response: 204 No Content. Look up `<Id>` from the Phase-2 SOQL results by matching `(ReferenceObject=Incident, Urgency, Impact)`.
130
+
131
+ **Duplicate coordinates:** if more than one Phase-2 row matches the coordinate (the server does not enforce uniqueness), do NOT dispatch the PATCH — the choice of `<Id>` would be non-deterministic. Report all matching rows (`Id`, `DeveloperName`, current `Priority`) and require the user to name the exact `Id` to change or approve a consolidation plan (delete the extras, then change the survivor).
132
+
133
+ Validate the new Priority against the Phase-1 picklist values.
134
+
135
+ ### 7. Matrix rows — remove
136
+
137
+ ```bash
138
+ sf data delete record \
139
+ --sobject ServiceOpPriorityConfig \
140
+ --record-id <Id> \
141
+ --use-tooling-api \
142
+ --target-org <alias>
143
+ ```
144
+
145
+ Response: `Successfully deleted record: <Id>`. Look up `<Id>` from the Phase-2 SOQL results by matching `(ReferenceObject=Incident, Urgency, Impact)`.
146
+
147
+ **Duplicate coordinates:** if more than one Phase-2 row matches the coordinate, do NOT dispatch — deleting an arbitrary duplicate leaves the matrix non-deterministic. Report all matching rows (`Id`, `DeveloperName`, current `Priority`) and require the user to name the exact `Id`(s) to delete or explicitly confirm "delete all rows at this coordinate".
148
+
149
+ **Note:** `sf api request rest ... --method DELETE` on a Tooling SObject currently fails with `SfError: No 'mode' found in 'body' entry` in `sf` CLI 2.143. Use `sf data delete record` instead.
150
+
151
+ ### 8. Default fallback priority — read
152
+
153
+ ```bash
154
+ sf api request rest \
155
+ "/services/data/v67.0/tooling/query/?q=SELECT+Id,MasterLabel,Metadata+FROM+StandardValueSet+WHERE+MasterLabel='IncidentPriority'" \
156
+ --method GET \
157
+ --target-org <alias>
158
+ ```
159
+
160
+ Response: 200 with `records[0].Metadata.standardValue[]`. Find the entry with `"default": true` — its `valueName` is the current fallback priority. Every other entry has `"default": false`.
161
+
162
+ ### 9. Default fallback priority — write
163
+
164
+ Editing `default: true` on a `StandardValueSet` is a metadata operation — the Tooling REST PATCH on `StandardValueSet/<Id>` returns `FIELD_INTEGRITY_EXCEPTION: Unable to load specified entity`. The canonical `sf` CLI path is metadata deploy.
165
+
166
+ ```bash
167
+ # Prepare a scratch project (only needed once per session).
168
+ # The force-app/main/default/ path is dictated by packageDirectories[0].path in
169
+ # sfdx-project.json below — sf project retrieve start writes the metadata there
170
+ # by convention, not by user choice.
171
+ WORKDIR=$(mktemp -d)
172
+ mkdir -p "$WORKDIR/force-app/main/default/standardValueSets"
173
+ cat > "$WORKDIR/sfdx-project.json" <<'EOF'
174
+ {
175
+ "packageDirectories": [{"path":"force-app","default":true}],
176
+ "namespace": "",
177
+ "sfdcLoginUrl": "https://test.salesforce.com",
178
+ "sourceApiVersion": "67.0"
179
+ }
180
+ EOF
181
+
182
+ # Step 1: retrieve current StandardValueSet
183
+ cd "$WORKDIR" && sf project retrieve start \
184
+ --metadata "StandardValueSet:IncidentPriority" \
185
+ --target-org <alias>
186
+
187
+ # Step 2: edit the XML to set <default>true</default> on the new default
188
+ # and <default>false</default> on every other value.
189
+
190
+ # Step 3: deploy the modified file
191
+ sf project deploy start \
192
+ --metadata "StandardValueSet:IncidentPriority" \
193
+ --target-org <alias> \
194
+ --wait 10
195
+ ```
196
+
197
+ **Expected:** `Status: Succeeded` in the deploy output. On failure, report the raw deploy output verbatim.
198
+
199
+ The XML shape is:
200
+
201
+ ```xml
202
+ <?xml version="1.0" encoding="UTF-8"?>
203
+ <StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
204
+ <sorted>false</sorted>
205
+ <standardValue>
206
+ <fullName>Critical</fullName>
207
+ <default>false</default>
208
+ <label>Critical</label>
209
+ </standardValue>
210
+ <standardValue>
211
+ <fullName>High</fullName>
212
+ <default>true</default>
213
+ <label>High</label>
214
+ </standardValue>
215
+ <!-- ... one <standardValue> block per active picklist value ... -->
216
+ </StandardValueSet>
217
+ ```
218
+
219
+ Exactly one `<default>true</default>` should be present at deploy time.
220
+
221
+ ---
222
+
223
+ ## Idempotency contract
224
+
225
+ | Concern | Match rule (skip the write when …) |
226
+ |---------|-------------------------------------|
227
+ | `IncPriorityMatrixEnabled` | Phase-2 `isPreferenceEnabled` already equals the requested boolean |
228
+ | `IncPriorityOverrideEnabled` | Phase-2 `isPreferenceEnabled` already equals the requested boolean |
229
+ | Add a cell | A Phase-2 row already matches `(ReferenceObject, Urgency, Impact)` — even if its Priority differs (surface the mismatch and ask; add is not a change) |
230
+ | Change a cell | The Phase-2 row's `Priority` already equals the requested value |
231
+ | Remove a cell | No Phase-2 row matches `(ReferenceObject, Urgency, Impact)` |
232
+ | Default fallback priority | The Phase-2 `default: true` entry's `valueName` already equals the requested value |
233
+
234
+ When idempotent, report `ALREADY-<state>` and skip Phase 4 entirely.
235
+
236
+ ---
237
+
238
+ ## Picklist extraction
239
+
240
+ From the Phase-1 Incident describe response, iterate `fields[]`:
241
+
242
+ - Look up each field by exact `name` (`Impact`, `Urgency`, `Priority`).
243
+ - Keep only `picklistValues[]` entries with `active == true`.
244
+ - Use `value` (API name), not `label` — the server stores API values on `ServiceOpPriorityConfig`.
245
+
246
+ If the describe response is very large, dispatch a subagent (haiku tier) to extract just the three picklists.
247
+
248
+ Every `Impact`, `Urgency`, `Priority` in an add or change payload — including the default value in the `StandardValueSet` deploy — must be in the fetched active set. Never hardcode `High/Medium/Low` or `Critical/High/Moderate/Low`; customers rename, add, or remove values.
249
+
250
+ For an uncustomized org the defaults are `High/Medium/Low` on `Impact` and `Urgency`, and `Critical/High/Moderate/Low` on `Priority` — treat as examples, not guarantees.
251
+
252
+ ---
253
+
254
+ ## Gotchas
255
+
256
+ | Issue | Detail |
257
+ |-------|--------|
258
+ | Tooling REST accepts garbage picklist values | The wire-level POST/PATCH does NOT validate `Urgency` / `Impact` / `Priority` against the picklist. Runtime matrix evaluation ignores garbage rows. Always validate client-side before dispatch. |
259
+ | Duplicate `(ReferenceObject, Urgency, Impact)` rows | Accepted silently at the wire level — the server does NOT enforce uniqueness. Both rows persist and the runtime picks one non-deterministically. Deduplicate against the Phase-2 snapshot before POST; this check is the only guard. |
260
+ | `ReferenceObject` accepts any string | The `ServiceOpPriorityConfig` SObject is shared with `Problem` and `ChangeRequest` matrices; the server accepts any value in `ReferenceObject`. Scope to `Incident` is skill-enforced only — refuse other values client-side. |
261
+ | `sf api request rest ... --method DELETE` on Tooling | Fails with `SfError: No 'mode' found in 'body' entry` (sf CLI 2.143). Use `sf data delete record --use-tooling-api` instead. |
262
+ | `/headless/invoke/service/service-itsm/...` returns 404 through `sf api request rest` | Those routes are Aura-dispatcher only; not addressable via the REST API host. Use the Tooling SObject and Setup Connect API prefs instead — that's what this skill does. |
263
+ | Direct PATCH on `StandardValueSet/<Id>` via Tooling REST | Returns `FIELD_INTEGRITY_EXCEPTION: Unable to load specified entity`. Metadata deploy is the canonical path for picklist defaults. |
264
+ | Existing Incidents' Priority | Not re-derived on matrix change. New writes use the new matrix; the stamped Priority on existing Incident records stays put. |
@@ -1,191 +0,0 @@
1
- # Example: Nested-object payload field (Apex-class-typed response field)
2
-
3
- A complete walkthrough of the flow when one `@InvocableVariable` field on the response class is
4
- itself **another Apex class**, not a primitive (`source = apex`, nested-object branch). This is the
5
- second, additive payload shape alongside the flat-primitive shape in `apex-invocable-source-prompt.md`
6
- — read `references/mcp-tool-output-discovery.md` ("Nested-object payload fields") and
7
- `references/two-clt-modeling.md` ("Nested-object payload fields (a second, additive case)") first.
8
-
9
- ## The prompt
10
-
11
- > I have an MCP server tool backed by the `GetFlightDetailsAction` Apex invocable action. Build a
12
- > widget that renders its output as a flight details card.
13
-
14
- ## Phase 1 — Input selection
15
-
16
- - Source: `apex` (the prompt names an Apex Invocable class; no org describe needed for this walkthrough).
17
- - Tool API name: `getFlightDetails` (from the class name `GetFlightDetailsAction`, stripping the
18
- trailing `Action` suffix and lower-camelCasing — see the naming convention in
19
- `references/two-clt-modeling.md`).
20
-
21
- ## Phase 2 — Payload discovery
22
-
23
- Read `references/mcp-tool-output-discovery.md`, then locate `.../classes/GetFlightDetailsAction.cls`.
24
-
25
- The invocable method:
26
-
27
- ```apex
28
- @InvocableMethod(label='Get Flight Details' description='Returns flight details based on input ID, Origin, and Destination')
29
- public static List<FlightDetailsResponse> getFlightDetails(List<FlightDetailsRequest> requests) { ... }
30
-
31
- public class FlightDetailsResponse {
32
- @InvocableVariable(label='Flight Details')
33
- public SearchFlightsAction.Flight flightInfo;
34
- }
35
- ```
36
-
37
- - Response class = `FlightDetailsResponse` (the `List<...>` element type) → **payload source**.
38
- - Request class = `FlightDetailsRequest` → excluded (tool input).
39
- - The single `@InvocableVariable` field, `flightInfo`, is declared `SearchFlightsAction.Flight` —
40
- **another Apex class**, not `String`/`Integer`/etc. This is the nested-object branch: it does not
41
- go in the primitive Apex→CLT mapping table.
42
-
43
- Enumerate the referenced class (`SearchFlightsAction.Flight`) for its own `@InvocableVariable`
44
- leaf fields — these become the widget's flat properties:
45
-
46
- ```apex
47
- public class Flight {
48
- @InvocableVariable public String flightId;
49
- @InvocableVariable public String origin;
50
- @InvocableVariable public String destination;
51
- @InvocableVariable public String departureTime;
52
- @InvocableVariable public String arrivalTime;
53
- @InvocableVariable public Long price;
54
- }
55
- ```
56
-
57
- | Leaf field | Apex type | CLT / widget `lightning:type` |
58
- |---|---|---|
59
- | flightId | String | `lightning__textType` |
60
- | origin | String | `lightning__textType` |
61
- | destination | String | `lightning__textType` |
62
- | departureTime | String | `lightning__textType` |
63
- | arrivalTime | String | `lightning__textType` |
64
- | price | Long | `lightning__numberType` (widget uses `lightning__numberType` for all numerics; the response CLT would use `lightning__integerType` if this leaf were typed directly on the response CLT — but it isn't, since it's flattened through `@apexClassType`, see below) |
65
-
66
- `payloadFields` (top-level) = 1 field: `flightInfo`, typed as an Apex class → nested-object branch.
67
- `payloadFields` (flattened, for the widget) = the 6 leaf rows above.
68
-
69
- ## Phase 3 — Build plan (abridged)
70
-
71
- ```text
72
- MCP Tool Widget Build Plan: getFlightDetailsWidget
73
-
74
- PLAN: Render the GetFlightDetails MCP tool output as a flight-details card.
75
-
76
- TOOL / SOURCE:
77
- Tool API name: getFlightDetails
78
- Payload source: Apex Invocable class GetFlightDetailsAction
79
- Response class FQN: GetFlightDetailsAction.FlightDetailsResponse
80
-
81
- LIGHTNING TYPES:
82
- Response CLT: getFlightDetailsResponse
83
- Properties: flightInfo → "@apexClassType/c__SearchFlightsAction$Flight" # nested-object field, NOT {"type":"object"}
84
- Envelope CLT: getFlightDetails
85
- Renderer (default, bundle root): .../lightningTypes/getFlightDetails/renderer.json
86
- Envelope: actionName (text), isSuccess (boolean), outputValues (c__getFlightDetailsResponse)
87
-
88
- WIDGET: getFlightDetailsWidget
89
- Schema: flattened to flightInfo's 6 leaf fields (flightId, origin, destination, departureTime, arrivalTime, price)
90
- Renderer binding: each attribute → {!$attrs.outputValues.flightInfo.<leaf>} # two levels deep, not one
91
- Properties omitted: none
92
-
93
- GENERATION ORDER: response CLT → widget → envelope CLT
94
- ```
95
-
96
- Proceed unless the next reply pushes back.
97
-
98
- ## Phase 4 — Generation order
99
-
100
- 1. **Response CLT** `getFlightDetailsResponse`:
101
-
102
- ```json
103
- {
104
- "title": "Get Flight Details Response",
105
- "description": "Response fields from the GetFlightDetailsAction invocable-action (FlightDetailsResponse)",
106
- "type": "object",
107
- "lightning:type": "lightning__objectType",
108
- "lightning:tags": ["mcp"],
109
- "unevaluatedProperties": false,
110
- "properties": {
111
- "flightInfo": {
112
- "title": "Flight Info",
113
- "lightning:type": "@apexClassType/c__SearchFlightsAction$Flight"
114
- }
115
- }
116
- }
117
- ```
118
-
119
- 2. **Widget** `getFlightDetailsWidget` — flat schema over the 6 leaf fields (not the single
120
- `flightInfo` field); body binds `{!$attrs.flightId}`, `{!$attrs.origin}`, etc.
121
-
122
- 3. **Envelope CLT** `getFlightDetails`:
123
-
124
- ```json
125
- {
126
- "title": "Get Flight Details",
127
- "description": "Invocable-action result envelope for the GetFlightDetailsAction MCP tool",
128
- "type": "object",
129
- "lightning:type": "lightning__objectType",
130
- "lightning:tags": ["mcp"],
131
- "unevaluatedProperties": false,
132
- "properties": {
133
- "actionName": { "title": "Action Name", "lightning:type": "lightning__textType" },
134
- "isSuccess": { "title": "Is Success", "lightning:type": "lightning__booleanType" },
135
- "outputValues": { "title": "Output Values", "lightning:type": "c__getFlightDetailsResponse" }
136
- }
137
- }
138
- ```
139
-
140
- 4. **Default renderer** at `lightningTypes/getFlightDetails/renderer.json` —
141
- `definition: @widget/c/getFlightDetailsWidget`, each attribute bound two levels deep through the
142
- nested object:
143
-
144
- ```json
145
- {
146
- "renderer": {
147
- "componentOverrides": {
148
- "$": {
149
- "definition": "@widget/c/getFlightDetailsWidget",
150
- "attributes": {
151
- "flightId": "{!$attrs.outputValues.flightInfo.flightId}",
152
- "origin": "{!$attrs.outputValues.flightInfo.origin}",
153
- "destination": "{!$attrs.outputValues.flightInfo.destination}",
154
- "departureTime": "{!$attrs.outputValues.flightInfo.departureTime}",
155
- "arrivalTime": "{!$attrs.outputValues.flightInfo.arrivalTime}",
156
- "price": "{!$attrs.outputValues.flightInfo.price}"
157
- }
158
- }
159
- }
160
- }
161
- }
162
- ```
163
-
164
- ## Phase 5 — Validation
165
-
166
- - `clt-reference-integrity`: envelope `outputValues` → `c__getFlightDetailsResponse`,
167
- response CLT exists, `flightInfo` uses `@apexClassType/c__SearchFlightsAction$Flight` (not a
168
- bare `{"type":"object"}` and not an inlined `lightning__objectType`), no `$schema`/`items` →
169
- **pass**.
170
- - `renderer-wires-widget`: bundle-root renderer present, definition `@widget/c/getFlightDetailsWidget`,
171
- every widget property bound two levels deep as `{!$attrs.outputValues.flightInfo.<property>}` (not
172
- one level, which would bind to an unresolvable object) → **pass**.
173
- - `field-trace`: INVOCABLE_FIELDS (top-level, per the gate's literal definition) = `flightInfo` —
174
- a single nested-object field, not a primitive. Because it resolves to `@apexClassType/...` (see
175
- `clt-reference-integrity` above), it expands to its referenced class's own leaf fields before
176
- comparing against the widget: `flightId, origin, destination, departureTime, arrivalTime, price`.
177
- Widget properties match this expanded leaf set exactly; INVENTED empty; OMITTED empty → **pass**.
178
-
179
- ## Notes
180
-
181
- - **Why not a single-level CLT.** Typing `flightInfo` as `{"type":"object"}` on the response CLT
182
- produces an opaque blob with no leaf fields — not renderable, and rejected by intent even where the
183
- CLT metaschema would technically accept a generic object. The `@apexClassType/<ns>__<OuterClass>$<InnerClass>`
184
- reference is what actually deploys (verified against a hand-fixed, successfully deployed bundle).
185
- - **This is additive, not a replacement.** A response class with only primitive `@InvocableVariable`
186
- fields (the `AccountSummary`/`GetOrderStatus` examples) still uses the flat mapping tables
187
- unchanged. Check each field independently — a response class can mix primitive and Apex-class-typed
188
- fields.
189
- - **`List<ApexClass>` fields** (e.g. `SearchFlightsAction.FlightSearchResponse.availableFlights`, a
190
- `List<Flight>`) are out of scope for this beta single-response flow — surface them in the build
191
- plan the same way a `maxOccurs > 1` scalar is surfaced, rather than emitting a schema for them.
@@ -1,29 +0,0 @@
1
- # Fixtures Index
2
-
3
- > **For human maintainers only.** This index requires a checkout of `enforce-o-matic-impl`. The agent should rely on [`templates.md`](templates.md), which reproduces the relevant XML shapes inline.
4
-
5
- Quick lookup from "what I need" to "fixture that already does it".
6
-
7
- All fixtures are under `enforce-o-matic-impl/test/func/filemetadata/<name>/`.
8
-
9
- | If you need… | Fixture |
10
- |---|---|
11
- | Bare permit rule, no conditions | `baseSteelthread`, `steelthreadPayload` |
12
- | Custom conjunction `(AND 1 2)` over UNLESS | `conjunctionExpressionSteelthread` |
13
- | Tag check | `conditionTagValidSteelthread`, `conditionCustomTagValidDataMaskingSteelthread` |
14
- | Classification check | `conditionClassificationValidClauseSteelthread`, `conditionClassificationValidDataMaskingSteelthread` |
15
- | Dataspace / session dataspace | `conditionDataspaceValidSteelthread`, `conditionSessionDataspaceValidSteelthread` |
16
- | Custom permission gate | `conditionAssignedPermPathValidSteelthread` |
17
- | Plain RLS (record field = user ID) | `conditionRLSValidSteelthread` (1st condition), `conditionStandardIdRLSValidSteelthread` |
18
- | RLS via PROJECTION join | `conditionRLSValidSteelthread` (2nd condition) |
19
- | Scalar / plural SOQL principal (out-of-contract) | `conditionScalarAttributeValidSteelThread`, `conditionPluralAttributeValidSteelthread` |
20
- | Hierarchy traversal | `conditionWithHierarchy` |
21
- | Field masking transform | `conditionClassificationValidDataMaskingSteelthread`, `conditionInvalidDataMaskingSteelthread` (negative) |
22
- | Field-scoped resource domain | `resourceDomainWithField` |
23
- | Core standard object policy (Case) | `coreObjectCaseWithPolicy` (persistence-layer only; not a working IDENTIFIED_RECORD shape — see §8.4 of policy.md) |
24
- | Extended steelthread (set referenced from sibling package) | `extendedSteelthread` |
25
- | Negative: missing operator | `conditionMissingOperatorSteelthread` |
26
- | Negative: missing path | `conditionMissingPathSteelthread` |
27
- | Negative: invalid context path | `conditionInvalidContextPathSteelthread` |
28
- | Negative: invalid data masking shape | `conditionInvalidDataMaskingSteelthread` |
29
- | Negative: invalid payload | `invalidPayload` |