@salesforce/afv-skills 1.58.0 → 1.60.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 (242) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-architecture-analyze/SKILL.md +66 -17
  3. package/skills/agentforce-architecture-analyze/assets/cli/show_access_token.yaml +4 -7
  4. package/skills/agentforce-architecture-analyze/references/contract.json +1 -1
  5. package/skills/agentforce-architecture-analyze/scripts/emit_env.py +2 -2
  6. package/skills/agentforce-architecture-analyze/scripts/main.py +40 -44
  7. package/skills/agentforce-architecture-analyze/scripts/rest_client.py +11 -3
  8. package/skills/agentforce-architecture-analyze/scripts/sf_cli.py +77 -10
  9. package/skills/agentforce-architecture-analyze/scripts/tests/test_end_to_end_fixture.py +1 -0
  10. package/skills/agentforce-architecture-analyze/scripts/tests/test_flow_children_inflation.py +1 -0
  11. package/skills/agentforce-architecture-analyze/scripts/tests/test_main_pipeline.py +53 -2
  12. package/skills/agentforce-architecture-analyze/scripts/tests/test_resolve_creds.py +184 -36
  13. package/skills/agentforce-architecture-analyze/scripts/tests/test_rest_client.py +17 -0
  14. package/skills/agentforce-architecture-analyze/scripts/tests/test_sf_cli.py +165 -11
  15. package/skills/agentforce-architecture-analyze/scripts/tests/test_skill_md_pipeline_block.py +319 -0
  16. package/skills/agentforce-bot-upgrade/SKILL.md +3 -1
  17. package/skills/agentforce-d360-analyze/SKILL.md +28 -10
  18. package/skills/agentforce-d360-analyze/scripts/dc.py +200 -50
  19. package/skills/agentforce-d360-analyze/scripts/discover_sessions.py +10 -6
  20. package/skills/agentforce-d360-analyze/scripts/fetch_dc.py +22 -6
  21. package/skills/agentforce-d360-analyze/scripts/resolve_session.py +21 -13
  22. package/skills/agentforce-d360-analyze/scripts/tests/test_dc_and_resolve_session.py +298 -76
  23. package/skills/agentforce-d360-analyze/scripts/tests/test_default_target_org.py +432 -0
  24. package/skills/agentforce-d360-analyze/scripts/tests/test_discover_sessions.py +1 -1
  25. package/skills/agentforce-d360-analyze/scripts/tests/test_resolve_session_main.py +9 -3
  26. package/skills/agentforce-d360-analyze/scripts/tests/test_skill_md_prefix_block.py +176 -0
  27. package/skills/agentforce-generate/SKILL.md +21 -1
  28. package/skills/agentforce-generate/references/known-issues.md +51 -1
  29. package/skills/agentforce-generate/references/legacy-nga-regression-eval.md +547 -0
  30. package/skills/agentforce-generate/references/upgrade-legacy-agent-to-agentscript.md +577 -0
  31. package/skills/agentforce-generate/scripts/upgrade-legacy-nga-analyze.py +404 -0
  32. package/skills/agentforce-generate/scripts/upgrade-legacy-nga-run-trials.sh +58 -0
  33. package/skills/agentforce-persona-generate/SKILL.md +505 -0
  34. package/skills/agentforce-persona-generate/assets/checklist-template.md +100 -0
  35. package/skills/agentforce-persona-generate/assets/persona-encoding-template.md +252 -0
  36. package/skills/agentforce-persona-generate/assets/persona-template.md +229 -0
  37. package/skills/agentforce-persona-generate/assets/sample-dialog-template.md +50 -0
  38. package/skills/agentforce-persona-generate/assets/workshop-outline-template.md +97 -0
  39. package/skills/agentforce-persona-generate/examples/concierge-persona.md +189 -0
  40. package/skills/agentforce-persona-generate/examples/concierge-sample-dialog.md +70 -0
  41. package/skills/agentforce-persona-generate/examples/drover-persona.md +194 -0
  42. package/skills/agentforce-persona-generate/examples/drover-sample-dialog.md +62 -0
  43. package/skills/agentforce-persona-generate/examples/steady-hand-persona.md +188 -0
  44. package/skills/agentforce-persona-generate/examples/steady-hand-sample-dialog.md +68 -0
  45. package/skills/agentforce-persona-generate/examples/yt-persona.md +195 -0
  46. package/skills/agentforce-persona-generate/examples/yt-sample-dialog.md +66 -0
  47. package/skills/agentforce-persona-generate/references/attributions.md +36 -0
  48. package/skills/agentforce-persona-generate/references/interaction-design-notes.md +30 -0
  49. package/skills/agentforce-persona-generate/references/persona-encoding-guide.md +566 -0
  50. package/skills/agentforce-persona-generate/references/persona-framework.md +796 -0
  51. package/skills/agentforce-persona-generate/references/refinement-mappings.md +31 -0
  52. package/skills/agentforce-persona-generate/references/scoring-rubric.md +58 -0
  53. package/skills/agentforce-persona-generate/references/voice-catalog.json +2327 -0
  54. package/skills/agentforce-persona-generate/references/workshop-question-policy.md +90 -0
  55. package/skills/agentforce-persona-generate/references/workshop-scenario-seeds.md +119 -0
  56. package/skills/agentforce-persona-generate/scripts/parse_agent_yaml.py +223 -0
  57. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +17 -27
  58. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +7 -17
  59. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +47 -63
  60. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +10 -13
  61. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -46
  62. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +4 -21
  63. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +58 -82
  64. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +16 -315
  65. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +9 -24
  66. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -44
  67. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +11 -63
  68. package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +2 -1
  69. package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +2 -1
  70. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +2 -1
  71. package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +2 -1
  72. package/skills/data360-schema-get/SKILL.md +3 -3
  73. package/skills/design-systems-slds-validate/references/report-format.md +1 -1
  74. package/skills/dx-app-analytics-query/SKILL.md +8 -8
  75. package/skills/dx-org-manage/SKILL.md +1 -0
  76. package/skills/dx-org-shape-manage/SKILL.md +1 -0
  77. package/skills/dx-org-snapshot-manage/SKILL.md +172 -0
  78. package/skills/dx-org-snapshot-manage/examples/create_error_output.json +16 -0
  79. package/skills/dx-org-snapshot-manage/examples/create_success_output.json +19 -0
  80. package/skills/dx-org-snapshot-manage/examples/delete_output.json +9 -0
  81. package/skills/dx-org-snapshot-manage/examples/get_output.json +19 -0
  82. package/skills/dx-org-snapshot-manage/examples/list_output.json +36 -0
  83. package/skills/dx-org-snapshot-manage/references/cli_flags.md +179 -0
  84. package/skills/dx-org-snapshot-manage/references/snapshot_usage.md +55 -0
  85. package/skills/dx-org-trial-expiration-check/SKILL.md +1 -1
  86. package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +2 -2
  87. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +7 -5
  88. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +11 -11
  89. package/skills/experience-content-media-image-generate/SKILL.md +83 -0
  90. package/skills/experience-content-media-image-generate/scripts/download-image.sh +84 -0
  91. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +12 -12
  92. package/skills/experience-ui-bundle-app-coordinate/references/phase-completion-validation.md +3 -3
  93. package/skills/experience-ui-bundle-app-coordinate/references/phase-execution-pattern.md +9 -7
  94. package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.mjs +132 -0
  95. package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.mjs +62 -0
  96. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.mjs +71 -0
  97. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.mjs +95 -0
  98. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.mjs +78 -0
  99. package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.mjs +21 -0
  100. package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.mjs +28 -0
  101. package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +3 -1
  102. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +40 -0
  103. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +7 -5
  104. package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.mjs +70 -0
  105. package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.mjs +76 -0
  106. package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.mjs +115 -0
  107. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +7 -3
  108. package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +1 -1
  109. package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +1 -1
  110. package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.mjs +43 -0
  111. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.mjs +131 -0
  112. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.mjs +152 -0
  113. package/skills/experience-ui-bundle-mfa-configure/references/branding.md +10 -6
  114. package/skills/external-diagram-mermaid-generate/SKILL.md +12 -12
  115. package/skills/field-service-data-capture-migrate/references/component-mapping.md +1 -1
  116. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +1 -2
  117. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +1 -0
  118. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +1 -1
  119. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +12 -1
  120. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +4 -1
  121. package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -1
  122. package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +233 -0
  123. package/skills/insurance-brokerage-agency-billing-configure/references/accounting-setup.md +117 -0
  124. package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md +237 -0
  125. package/skills/insurance-brokerage-agency-billing-configure/references/billing-settings.md +271 -0
  126. package/skills/insurance-brokerage-agency-billing-configure/references/demo-policy-config.md +138 -0
  127. package/skills/insurance-brokerage-agency-billing-configure/references/org-defaults.md +64 -0
  128. package/skills/insurance-brokerage-agency-billing-configure/references/permissions-config.md +226 -0
  129. package/skills/insurance-brokerage-agency-billing-configure/references/prerequisites.md +142 -0
  130. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +3 -2
  131. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +3 -3
  132. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +68 -45
  133. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +17 -18
  134. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +16 -3
  135. package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +16 -13
  136. package/skills/marketing-message-test/SKILL.md +194 -0
  137. package/skills/marketing-message-test/references/api-contract.md +333 -0
  138. package/skills/omnistudio-callable-apex-generate/SKILL.md +3 -3
  139. package/skills/omnistudio-datamapper-generate/SKILL.md +6 -6
  140. package/skills/omnistudio-datapacks-deploy/SKILL.md +11 -11
  141. package/skills/omnistudio-dependencies-analyze/SKILL.md +5 -5
  142. package/skills/omnistudio-epc-catalog-generate/SKILL.md +6 -6
  143. package/skills/omnistudio-flexcard-generate/SKILL.md +6 -6
  144. package/skills/omnistudio-integration-procedure-generate/SKILL.md +6 -6
  145. package/skills/omnistudio-omniscript-generate/SKILL.md +6 -5
  146. package/skills/platform-apex-logs-debug/SKILL.md +1 -0
  147. package/skills/platform-metadata-deploy/SKILL.md +1 -0
  148. package/skills/platform-models-api-configure/SKILL.md +5 -5
  149. package/skills/platform-soql-query/SKILL.md +1 -0
  150. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +17 -6
  151. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +107 -192
  152. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +6 -6
  153. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +49 -20
  154. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +4 -4
  155. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +224 -290
  156. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +295 -0
  157. package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -1
  158. package/skills/service-itsm-slack-itservice-configure/SKILL.md +2 -1
  159. package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +2 -2
  160. package/skills/service-omni-channel-setup-coordinate/SKILL.md +20 -13
  161. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +5 -55
  162. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +0 -38
  163. package/skills/service-omni-command-center-analyze/SKILL.md +2 -3
  164. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  165. package/skills/tableau-next-asset-create/README.md +65 -0
  166. package/skills/tableau-next-asset-create/SKILL.md +409 -0
  167. package/skills/tableau-next-asset-create/references/admin-users.md +149 -0
  168. package/skills/tableau-next-asset-create/references/ai-readiness.md +355 -0
  169. package/skills/tableau-next-asset-create/references/alerts.md +111 -0
  170. package/skills/tableau-next-asset-create/references/build-workflow.md +819 -0
  171. package/skills/tableau-next-asset-create/references/dashboard-authoring.md +302 -0
  172. package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +352 -0
  173. package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +210 -0
  174. package/skills/tableau-next-asset-create/references/data-understanding.md +387 -0
  175. package/skills/tableau-next-asset-create/references/deep-reference-index.md +74 -0
  176. package/skills/tableau-next-asset-create/references/destructive-operations.md +62 -0
  177. package/skills/tableau-next-asset-create/references/edit-dashboard.md +273 -0
  178. package/skills/tableau-next-asset-create/references/edit-visualization.md +529 -0
  179. package/skills/tableau-next-asset-create/references/empty-source-handling.md +104 -0
  180. package/skills/tableau-next-asset-create/references/ingest-and-metric-gotchas.md +638 -0
  181. package/skills/tableau-next-asset-create/references/insight-bundle.md +69 -0
  182. package/skills/tableau-next-asset-create/references/large-flat-file-handling.md +331 -0
  183. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_envelope.json +54 -0
  184. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_shared-widget-fields.json +122 -0
  185. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/add_page.json +29 -0
  186. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/delete_page.json +27 -0
  187. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/discard_dashboard.json +11 -0
  188. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget.json +30 -0
  189. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget_to_page.json +30 -0
  190. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/place_widget_on_page.json +30 -0
  191. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_dashboard.json +16 -0
  192. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_page.json +26 -0
  193. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/rename_page.json +28 -0
  194. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/save_dashboard.json +18 -0
  195. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/undo.json +11 -0
  196. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_button_widget.json +69 -0
  197. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_container_widget.json +88 -0
  198. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_filter_widget.json +146 -0
  199. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_metric_widget.json +78 -0
  200. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_navigation_widget.json +80 -0
  201. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_parameter_widget.json +160 -0
  202. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_text_widget.json +103 -0
  203. package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_visualization_widget.json +68 -0
  204. package/skills/tableau-next-asset-create/references/sdm-tool-reference.md +721 -0
  205. package/skills/tableau-next-asset-create/references/semantic-query-and-enrichment.md +355 -0
  206. package/skills/tableau-next-asset-create/references/shared-gates.md +322 -0
  207. package/skills/tableau-next-asset-create/references/sharing-and-promotion.md +306 -0
  208. package/skills/tableau-next-asset-create/references/tasks/ai-readiness-audit.md +51 -0
  209. package/skills/tableau-next-asset-create/references/tasks/analyze-data.md +48 -0
  210. package/skills/tableau-next-asset-create/references/tasks/build-dashboard.md +66 -0
  211. package/skills/tableau-next-asset-create/references/tasks/build-end-to-end.md +73 -0
  212. package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +51 -0
  213. package/skills/tableau-next-asset-create/references/tasks/create-viz.md +58 -0
  214. package/skills/tableau-next-asset-create/references/tasks/edit-dashboard.md +80 -0
  215. package/skills/tableau-next-asset-create/references/tasks/edit-sdm.md +106 -0
  216. package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +40 -0
  217. package/skills/tableau-next-asset-create/references/tasks/enrich-model.md +68 -0
  218. package/skills/tableau-next-asset-create/references/tasks/ingest-flat-file.md +68 -0
  219. package/skills/tableau-next-asset-create/references/tasks/manage-alert.md +35 -0
  220. package/skills/tableau-next-asset-create/references/tasks/profile-dataset.md +47 -0
  221. package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +46 -0
  222. package/skills/tableau-next-asset-create/references/tasks/provision-user.md +39 -0
  223. package/skills/tableau-next-asset-create/references/tasks/query-model.md +92 -0
  224. package/skills/tableau-next-asset-create/references/tasks/review-verified-questions.md +42 -0
  225. package/skills/tableau-next-asset-create/references/tasks/share-asset.md +37 -0
  226. package/skills/tableau-next-asset-create/references/verified-questions.md +125 -0
  227. package/skills/tableau-next-asset-create/references/viz-authoring.md +992 -0
  228. package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.sh +0 -42
  229. package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +0 -26
  230. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.sh +0 -35
  231. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.sh +0 -47
  232. package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.sh +0 -33
  233. package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.sh +0 -20
  234. package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +0 -15
  235. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +0 -30
  236. package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.sh +0 -37
  237. package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.sh +0 -66
  238. package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.sh +0 -58
  239. package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +0 -30
  240. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +0 -73
  241. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +0 -118
  242. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
@@ -0,0 +1,74 @@
1
+ # Deep reference index
2
+
3
+ What each deep reference covers and which task guide cites it. Cited by the
4
+ router (`SKILL.md`); the first-hop rules there still apply.
5
+
6
+ - **`references/build-workflow.md`** — full numbered-step procedural spine (Step
7
+ 0→11) with verified per-tool payloads and inline gotchas. Cited by
8
+ `tasks/build-end-to-end.md`; **not a first hop.**
9
+ - **`references/large-flat-file-handling.md`** — infer-don't-read protocol,
10
+ naming-grammar decode, elicitation gate, verify-one-number gate (G6).
11
+ - **`references/data-understanding.md`** — the five things to profile (grain,
12
+ field roles, cardinality, additivity, date roles) and the SDM handoff (G6).
13
+ - **`references/sdm-tool-reference.md`** — `add_semantic_model_*` input shapes,
14
+ suffix rules, nested create-time field bind (G3), sparse-vs-PUT updates,
15
+ parameter PUT, logical-view shapes, dependency pre-flight.
16
+ - **`references/empty-source-handling.md`** — empty-of-rows vs. unmaterialized
17
+ detection and what to tell the user (G2).
18
+ - **`references/semantic-query-and-enrichment.md`** — proto-shaped
19
+ `run_semantic_query` body, field-shape matrix, worked calc/metric payloads
20
+ (G5, G7).
21
+ - **`references/ingest-and-metric-gotchas.md`** — the ingestion chain
22
+ (CSV/Excel §A and existing-connection §C → DLO → DMO → mapping: wait-until-ready, SCHEMA REALITY CHECK,
23
+ Primary Key read-back, mapping `ACTIVE` ≠ table exists — poll `run_query`) and metric-creation
24
+ gotchas (§B);
25
+ cited by `ingest-flat-file.md` and `enrich-model.md`. **Not a first hop** for
26
+ an ingest-how-to (that first-hops to `tasks/ingest-flat-file.md`).
27
+ - **`references/data-transform-gotchas.md`** — DCSQL transform create/update
28
+ payload, confirmation gates, immutable fields, timeout recovery, BATCH↔DCSQL
29
+ pairing, DMO `KQ_<pk>`. Cited by
30
+ `tasks/create-data-transform.md`; **not a first hop.**
31
+ - **`references/sharing-and-promotion.md`** — principal lookup, access-type
32
+ matrix, Personal Org shadow IDs, safe share mutation, Reuse/Promotion
33
+ lifecycle and PR recovery. Cited by `tasks/share-asset.md` and
34
+ `tasks/promote-or-reuse.md`; **not a first hop.**
35
+ - **`references/viz-authoring.md`** — chart-type decision matrix, field selection,
36
+ verified `create_visualization` payloads (G8, create-viz). Cited by
37
+ `tasks/create-viz.md`; **not a first hop.**
38
+ - **`references/edit-visualization.md`** — `edit_visualization` operation-batch
39
+ reference: op-type table, filter-operator rules, the `field.function` vs
40
+ `line.function` reference-line disambiguation, `update_visualization`
41
+ persistence handoff (edit-viz). Cited by `tasks/edit-viz.md`; **not a first hop.**
42
+ - **`references/dashboard-authoring.md`** — dashboard creation, the 48-col grid,
43
+ `&`-encoding gotcha, `delete_dashboard`, global filters
44
+ (`add_global_filter_to_dashboard`), `list_asset_dependencies` preflight
45
+ before a viz/dashboard delete, and `render_dashboard` vs `get_dashboard` (§8)
46
+ (G8, build-dashboard). Cited by `tasks/build-dashboard.md` (not a first hop
47
+ for authoring); first hop from Destructive for the delete preflight and
48
+ from dispatch for "show my dashboard".
49
+ - **`references/edit-dashboard.md`** — `edit_dashboard` operation-batch
50
+ reference: the `upsert_*_widget`/page-op table, the widget-identity rule
51
+ (`widget.name`/`widget.id` vs. `placement.name`), draft-vs-persist
52
+ (`save_dashboard`/`undo`/`discard_dashboard`, each with standalone- and
53
+ mixed-batch behavior), and full widget deletion via
54
+ `remove_widget_from_dashboard` (edit-dashboard §6).
55
+ Cited by `tasks/edit-dashboard.md`; **not a first hop.**
56
+ - **`references/dashboard-design-principles.md`** — MANDATORY narrative/visual
57
+ design (KPIs → trends → breakdowns → correlations), the G8 source. Direct-dispatch
58
+ for a before-charting narrative/layout question.
59
+ - **`references/ai-readiness.md`** — complete AI-readiness checklist, description/
60
+ label quality, ambiguity management, `businessPreferences` examples (G5).
61
+ - **`references/admin-users.md`** — `upsert_user` preview formats, ADD
62
+ CONFLICT, Personal Org `forceDeactivate`, `get_users` pagination,
63
+ `get_license_availability`. Cited by `tasks/provision-user.md`; **not a
64
+ first hop.**
65
+ - **`references/alerts.md`** — `conversationContext` transcript, do-not-pin
66
+ SDM, preview/`userConfirmed`, timeout-poll `get_alerts`, update full
67
+ replacement. Cited by `tasks/manage-alert.md`; **not a first hop.**
68
+ - **`references/insight-bundle.md`** — app-only `generate_insight_bundle` /
69
+ `render_metric` call shape (server-minted JWT; live `/v2/internal/bundle`
70
+ 404 is backend). Cited by `tasks/build-dashboard.md`; **not a first hop
71
+ and not a user dispatch.**
72
+ - **`references/verified-questions.md`** — AVQ list/classify/utterance
73
+ family and `run_regression_evaluator`. Cited by
74
+ `tasks/review-verified-questions.md`; **not a first hop.**
@@ -0,0 +1,62 @@
1
+ # Destructive and lifecycle operations
2
+
3
+ Cited by the router (`SKILL.md`). Confirm before every mutation listed here;
4
+ the whole-asset deletes have no undo.
5
+
6
+ - Component deletes (calc dimension/measure, metric, data object, logical view,
7
+ relationship)
8
+ → `references/sdm-tool-reference.md` (Deleting — preflight + leaf-first).
9
+ Confirm first.
10
+ - Deleting a chart/dashboard/**whole** model/workspace is DESTRUCTIVE with no undo —
11
+ always get explicit user confirmation before calling `delete_visualization` /
12
+ `delete_dashboard` / `delete_semantic_model` / `delete_workspace`.
13
+ Preflight viz/dashboard deletes with `list_asset_dependencies` (counts, not
14
+ ids) — details in `references/dashboard-authoring.md` §7.
15
+ - `delete_visualization` can leave a broken dashboard widget behind if that viz is
16
+ placed on a dashboard (`source` is silently nulled) — clean it up with a single
17
+ `edit_dashboard` op: `remove_widget_from_dashboard` with the widget's
18
+ `widgetName` (read back via `render_dashboard`/`get_dashboard`, or reused from
19
+ an earlier upsert in the same draft). That one op deletes the definition
20
+ **and** every page placement (`edit-dashboard.md` §6) — don't unplace first via
21
+ `remove_widget_from_page`, that only unplaces and leaves the definition
22
+ orphaned.
23
+ - Associating/disassociating an asset with a workspace uses `add_workspace_asset` /
24
+ `remove_workspace_asset`. Both take **flat top-level args** (not a body wrapper).
25
+ `assetUsageType` is `"Created"` or `"Referenced"` — this matters because
26
+ `delete_workspace` cascade-deletes only `"Created"` assets. `remove_workspace_asset`
27
+ takes the underlying asset's Salesforce `assetId` — the same id passed to
28
+ `add_workspace_asset` and shown as `assetId` on `list_workspace_assets`.
29
+ - Sharing with a user or group (add / list / update / remove) →
30
+ `references/tasks/share-asset.md`. Confirm before mutate; shapes in
31
+ `sharing-and-promotion.md`.
32
+ - Reuse (prod → Personal Org copy) or Promotion (Personal Org package → git PR)
33
+ → `references/tasks/promote-or-reuse.md`. `create_promotion_pull_request` is
34
+ the package-URL step after `packageExportStatus` is Ready — not the create-
35
+ request tool.
36
+ - Provisioning a Tableau Next **role** (`upsert_user`) is DESTRUCTIVE — never
37
+ call it on the request turn. Preview + confirm in
38
+ `references/tasks/provision-user.md`. ADMIN-ONLY; unauthorized → STOP (do
39
+ not fall back to share/analyst tools).
40
+ - `delete_alert` is irreversible. Preview `alertSummary`, then
41
+ `userConfirmed=true` (`references/tasks/manage-alert.md`).
42
+ - `delete_analytics_utterances` has no undo — confirm first
43
+ (`references/tasks/review-verified-questions.md`).
44
+ - Response shape: several of these tools double-wrap responses as
45
+ `{"defaultExc": "<stringified JSON>", "responseCode": <number>}` — parse
46
+ `JSON.parse(response.defaultExc)`. On a 204 No Content success (e.g.
47
+ `delete_dashboard`), `defaultExc` is an **empty string** (verified live), not
48
+ JSON-parseable either way — branch on `responseCode === 204` for the success
49
+ path rather than trying to parse `defaultExc`. The wrapping is per-tool, not
50
+ family-wide: `edit_dashboard` is double-wrapped the same way; `create_dashboard`
51
+ (as observed through this tool) returns a flat object with no wrapper.
52
+ `remove_asset_share` is different: empty body on 204, failure a JSON array
53
+ (`sharing-and-promotion.md`).
54
+ - `edit_dashboard` batches a widget/page edit atomically and stages an **unsaved
55
+ draft by default** (top-level `autosave` unset/false) — the draft accumulates
56
+ across successive `edit_dashboard` calls on the same dashboard until a
57
+ `save_dashboard` op persists it (standalone, or after other mutations in the
58
+ same batch), or `undo`/`discard_dashboard` reverts it. Never call
59
+ `save_dashboard` automatically — only on the user's explicit confirmation
60
+ given after they've seen the draft, even if the original request already
61
+ said "save it" in the same message. Full mechanics:
62
+ `references/edit-dashboard.md`.
@@ -0,0 +1,273 @@
1
+ # Editing an Existing Dashboard — `edit_dashboard`
2
+
3
+ Load this when the request mutates a dashboard that **already exists** (add,
4
+ replace, move, or remove a widget; add, rename, or delete a page) — not for
5
+ building a brand-new dashboard (`dashboard-authoring.md` §1 /
6
+ `tasks/build-dashboard.md` instead).
7
+
8
+ `edit_dashboard` is the **only supported tool** for dashboard widget/page
9
+ editing — never hand-build a dashboard-JSON PATCH.
10
+
11
+ > **Schema note (2026-09-07):** the tool's operations were renamed from
12
+ > `build_*_widget` to `upsert_*_widget` and the separate `edit_widget`
13
+ > operation was removed — a single `upsert_*_widget` op now both creates and
14
+ > fully replaces a widget, selected by whether you pass `widget.id`. `autosave`
15
+ > also moved from a per-operation field to a single top-level/batch-wide field.
16
+ > Facts below that carry an explicit "verified live" date predate this change
17
+ > and describe *behavior*, not the old field names — re-verify live if
18
+ > something here looks inconsistent with what the server actually returns.
19
+
20
+ > **Schema note (2026-09-09):** `remove_widget_from_dashboard` is now a native
21
+ > `edit_dashboard` operation — a true widget delete (definition + every page
22
+ > placement in one step), closing the gap this file previously documented as
23
+ > unsupported. See §6. Every widget also gained optional `actions`
24
+ > (click/select → navigate/run-a-flow/set-a-parameter/set-a-filter/record
25
+ > action) and `dynamicTokens` fields (identical shape across every
26
+ > `upsert_*_widget` op — see `schemas/edit-dashboard/_shared-widget-fields.json`),
27
+ > and `upsert_filter_widget`/`upsert_parameter_widget`'s `parameters` is now an
28
+ > explicit `oneOf` keyed by `viewType`. `save_dashboard` gained an optional
29
+ > `dashboardIdOrApiName` (defaults to the batch's own dashboard).
30
+
31
+ ## Contents
32
+
33
+ - 1. Contract
34
+ - 2. Operation-type reference
35
+ - 3. Widget identity — `widget.name` and `widget.id`
36
+ - 4. Grid placement
37
+ - 5. Draft vs. persist
38
+ - 6. Deleting a widget — `remove_widget_from_dashboard`
39
+ - 7. Gotchas summary
40
+
41
+ ---
42
+
43
+ ## 1. Contract
44
+
45
+ `edit_dashboard` applies an ordered, **non-empty list of operations** to one
46
+ dashboard, atomically (all-or-nothing — one failing operation means none are
47
+ applied):
48
+
49
+ ```jsonc
50
+ {
51
+ "dashboardIdOrApiName": "Edit_Compare_Dashboard_175417",
52
+ "minorVersion": -1, // ALWAYS send this explicitly — see gotcha below
53
+ "autosave": false, // top-level, batch-wide — see §5. Ignored if a
54
+ // save_dashboard/undo/discard_dashboard op is present.
55
+ "operations": [ /* ordered, discriminated by "operation" */ ]
56
+ }
57
+ ```
58
+
59
+ **Always send `minorVersion: -1` explicitly.** The schema documents it as
60
+ `default: -1`, but that default is not auto-applied by every client — omitting
61
+ it can surface a live, verbatim error: `ILLEGAL_QUERY_PARAMETER_VALUE: Illegal
62
+ value for query parameter 'minorVersion': ''`. This bites `create_dashboard`
63
+ too (same parameter, same fix).
64
+
65
+ **Exact field shapes live in `schemas/edit-dashboard/`, split per operation.**
66
+ The tables below cover behavior and gotchas, not every field — for the
67
+ authoritative required/optional fields, enum values, and a worked example for
68
+ whichever operation(s) you're about to call, Read the matching
69
+ `schemas/edit-dashboard/<operation>.json` (e.g. `upsert_metric_widget.json`,
70
+ `place_widget_on_page.json`). The envelope itself (`dashboardIdOrApiName` /
71
+ `autosave` / `operations` / `minorVersion`) is
72
+ `schemas/edit-dashboard/_envelope.json`. Only read the file(s) for the
73
+ operation(s) in your batch — don't load the whole directory.
74
+
75
+ **Response shape.** Double-wrapped like several other dashboard tools:
76
+ `{"defaultExc": "<stringified JSON>", "responseCode": <number>}` — parse
77
+ `JSON.parse(response.defaultExc)` to get the dashboard body. A successful batch
78
+ returns `responseCode: 201` with the current (possibly still-draft) dashboard
79
+ state echoed back, including every widget/page the batch touched.
80
+
81
+ **Read-back quirk on text content.** Each Quill-delta content op you send is
82
+ echoed back with an extra `"rules": []` field appended, even though you never
83
+ sent one — harmless, but don't be surprised reading it back.
84
+
85
+ ## 2. Operation-type reference
86
+
87
+ Every operation is one item in `operations`, selected by its `operation` field.
88
+ The **Schema** column is the file under `schemas/edit-dashboard/` with that
89
+ operation's exact required/optional fields and a worked example.
90
+
91
+ | Operation | Purpose | Sharpest constraint | Schema |
92
+ |---|---|---|---|
93
+ | `upsert_text_widget` | Create or fully replace a rich-text widget, Quill-delta `parameters.content` | No `source` — text has no data reference. | `upsert_text_widget.json` |
94
+ | `upsert_button_widget` | Create or fully replace a button widget | `parameters.text` is the caption; no `source`. | `upsert_button_widget.json` |
95
+ | `upsert_container_widget` | Create or fully replace a layout-grouping widget | Styling under `parameters.widgetStyle` (fill/border **and** an optional `backgroundSource` image asset + `widgetStyle.background` scale/alignment/opacity). | `upsert_container_widget.json` |
96
+ | `upsert_filter_widget` | Create or fully replace a per-widget filter | `parameters.filterOption.dataType` is a **capitalized enum**: `Text`/`Boolean`/`Geo`/`Date`/`DateTime`/`Number`/`Currency`/`Percentage`. Any other value (e.g. lowercase, or a raw JSON type) is rejected at render with `"Unsupported data type for filter"`. `parameters.isLabelHidden` is required at execution for `viewType: list`/`listcard` (not used by `toggle`). | `upsert_filter_widget.json` |
97
+ | `upsert_parameter_widget` | Create or fully replace a dashboard parameter | `parameters.parameterOption.dataType` is **lowercase**: `text`/`number`/`date`/`boolean`/`percentage` — a different casing convention than the filter widget's `dataType` above; don't copy one into the other. `parameters.isLabelHidden` is required at execution for `viewType: list`/`listcard`; optional for `input`/`inputcard`. | `upsert_parameter_widget.json` |
98
+ | `upsert_visualization_widget` | Create or fully replace a saved-viz tile | `source: {id, name}` + `parameters: {legendPosition, shareState}` — the full field set this operation exposes. | `upsert_visualization_widget.json` |
99
+ | `upsert_metric_widget` | Create or fully replace an SDM metric card | `parameters.metricOption: {sdmId, sdmApiName, showForecast?}`; `source` optionally references the metric. | `upsert_metric_widget.json` |
100
+ | `upsert_navigation_widget` | Create or fully replace an in-dashboard page nav | **Gated pilot type** — persisting (via `save_dashboard` or batch `autosave: true`) a dashboard holding one fails with `ACCESS_DENIED` unless the org has the navigation-widget pilot enabled. `parameters.navigationItems` is the ordered destination list; an empty/omitted list is just an empty nav bar. | `upsert_navigation_widget.json` |
101
+ | `place_widget_on_page` | Place an already-defined widget on a page | `placement.name` references the widget **by its `widget.name` key** — see §3. | `place_widget_on_page.json` |
102
+ | `remove_widget_from_page` | Unplace a widget from one page | Removes the placement only, leaves the definition behind (orphaned). Use this only for unplace-and-keep; for a full delete use `remove_widget_from_dashboard` below alone — it removes the definition and every placement in one step, no unplace needed first. See §6. | `remove_widget_from_page.json` |
103
+ | `remove_widget_from_dashboard` | Fully delete a widget — its definition **and** every placement across every page, in one step | Takes a bare `widgetName` string (not a `placement` object); source it from `render_dashboard` or an earlier upsert in this same draft/batch — never invent it. See §6. | `remove_widget_from_dashboard.json` |
104
+ | `move_widget_to_page` | Move a widget to a different page | Give the full target `placement` (name + coordinates) on the destination page. | `move_widget_to_page.json` |
105
+ | `move_widget` | Reposition a widget on its current page | New coordinates on the same page. | `move_widget.json` |
106
+ | `add_page` | Add a page to a layout | Keep the `page_N` sequence contiguous; `layoutName` optional (defaults to the first layout). | `add_page.json` |
107
+ | `rename_page` | Relabel an existing page | Identify by `page.name`, set the new `page.label`. | `rename_page.json` |
108
+ | `delete_page` | Delete a page | Identify by `page.name`. | `delete_page.json` |
109
+ | `save_dashboard` | Persist | Standalone: commits whatever's already staged. In a mixed batch: persists after the other operations in that batch succeed. `dashboardIdOrApiName` optional here — defaults to the batch's own dashboard. See §5. | `save_dashboard.json` |
110
+ | `undo` | Revert | Standalone: reverts the last staged change. In a mixed batch: cancels every operation in that batch. See §5. | `undo.json` |
111
+ | `discard_dashboard` | Drop the staged draft | Standalone: discards the whole staged draft. In a mixed batch: ignores every other operation in that batch — only the discard runs. See §5. | `discard_dashboard.json` |
112
+
113
+ All paths above are relative to `schemas/edit-dashboard/`.
114
+
115
+ **Every widget also accepts optional `actions` and `dynamicTokens`** (sibling
116
+ fields to `parameters`, identical shape across all 8 `upsert_*_widget` ops).
117
+ `actions` are click/select interactions — navigate (to a page, dashboard, URL,
118
+ or a metric's details), run a flow, set a parameter, set a filter, or fire a
119
+ record action. `dynamicTokens` are named dynamic value bindings referenced
120
+ elsewhere on the widget (e.g. from text content or a metric's `tokenSpec`).
121
+ Both are fully optional; exact shape (all 5 action types, `DynamicToken`) is in
122
+ `schemas/edit-dashboard/_shared-widget-fields.json`, alongside the style
123
+ blocks (`WidgetStyle`, `ButtonStyle`, …) and `receiveFilterSource`/
124
+ `receiveParameterSource` shapes that several `parameters` blocks below
125
+ reference.
126
+
127
+ ## 3. Widget identity — `widget.name` and `widget.id`
128
+
129
+ There is no more a separate "create" vs. "edit" operation family. Every
130
+ `upsert_*_widget` call is a **complete definition** of the widget (omitted
131
+ fields are dropped, even on a replace) and is disambiguated by two nested
132
+ fields inside `widget`, not a sibling field:
133
+
134
+ - `widget.name` — the widget's stable key. Always required. On a replace it
135
+ must match the name of the widget you're replacing.
136
+ - `widget.id` — **omit to create** a new widget. **Include to fully replace**
137
+ an existing *persisted* widget (`widget.name`/`widget.type` must also match
138
+ it). **Never invent this value** — only pass an `id` you actually read back
139
+ from the dashboard. An **unsaved draft** widget has no `id` yet; replace it
140
+ by matching `widget.name` alone, without an `id`.
141
+
142
+ **Call `render_dashboard` before replacing a persisted widget** — the tool's
143
+ current description names this explicitly as the pre-replace (and
144
+ pre-delete, see §6) read step, to fetch the widget's real `id`/`widgetName`
145
+ rather than guessing one. Verified live (2026-09-13): `render_dashboard` and
146
+ `get_dashboard` are two distinct, both-live tools, not aliases of one another —
147
+ `render_dashboard` bundles referenced viz/SDM assets and honors `showDraft`;
148
+ `get_dashboard` returns flat metadata only, with no such flags. Either can
149
+ source the id/`widgetName` for a replace/delete; prefer `render_dashboard` if
150
+ you also need to see the current staged draft (`get_dashboard` will not show
151
+ it).
152
+
153
+ Page/placement ops (`place_widget_on_page`, `remove_widget_from_page`,
154
+ `move_widget`, `move_widget_to_page`) still identify the widget by
155
+ `placement.name` — a third, separate location from `widget.name`/`widget.id`.
156
+ Keep widget names unique within the dashboard across all operations in a
157
+ batch, and don't confuse `placement.name` with `widget.id`.
158
+
159
+ ## 4. Grid placement
160
+
161
+ Same conventions as dashboard creation (`dashboard-authoring.md` §2): **48
162
+ columns**, `rowHeight 20`, `maxWidth 1200`, **1-based** row/column (row 1,
163
+ column 1 is the top-left cell — NOT 0-based like the bulk-create `layouts`
164
+ shape on `create_dashboard`). `placement` = `{name, row, column, rowspan,
165
+ colspan}`.
166
+
167
+ **The target dashboard must already have a layout.** `add_page` /
168
+ `place_widget_on_page` operate *within* an existing layout — they do not create
169
+ the first one. Verified live (2026-08-31): a `create_dashboard` done with the
170
+ minimal-create pattern `layouts: []` yields a dashboard with **no layout at
171
+ all**, and the next `edit_dashboard` `add_page` fails with `INVALID_INPUT:
172
+ "Dashboard has no layout to add the page to"`. Seed the first page in the
173
+ `create_dashboard` `layouts` block up front — one layout carrying an (empty)
174
+ `page_1` (with its required `style` + `columnCount`) — then `edit_dashboard`
175
+ builds/places into it. Only pass `layouts: []` when you will not immediately
176
+ edit the dashboard.
177
+
178
+ ## 5. Draft vs. persist
179
+
180
+ `autosave` is now a **single top-level, batch-wide** field (previously it was
181
+ set per-operation — if you see per-operation `autosave` anywhere, it's stale).
182
+ The following draft/staging mechanics were verified live on 2026-08-30 against
183
+ the *previous* (`build_*`/`edit_widget`) shape of this tool and describe
184
+ behavior that should still hold, but haven't been re-verified against the
185
+ current `upsert_*` shape:
186
+
187
+ - Leaving `autosave` unset (or `false`) on a batch stages the change as a
188
+ **draft** — the response echoes the would-be dashboard state (that's the
189
+ preview to show the user), but the dashboard read tool immediately after
190
+ shows the dashboard **unchanged** (`widgets`/`layouts`/`lastModifiedDate` all
191
+ the same as before the batch).
192
+ - The staged draft **accumulates** across multiple `edit_dashboard` calls on
193
+ the same dashboard — a second draft-only batch's response included a widget
194
+ defined in an earlier, still-unsaved batch, even though the read tool showed
195
+ neither in between. Treat the draft as one running staging area per
196
+ dashboard, not scoped to a single call.
197
+ - A successful `save_dashboard` persists the full accumulated draft:
198
+ `lastModifiedDate` advances, and every staged widget gets server-assigned
199
+ `id`s it didn't have as a draft.
200
+ - `undo` reverts the **last staged, unsaved** change — it has nothing to act on
201
+ after a save: `RESOURCE_NOT_FOUND: "No staged draft to undo for dashboard
202
+ <name>"`. `discard_dashboard` drops the whole staged draft the same way.
203
+
204
+ **Behavioral change from the tool's current description** (not yet
205
+ independently re-verified live): `save_dashboard`, `undo`, and
206
+ `discard_dashboard` are **no longer required to be the sole operation in a
207
+ batch**. Per the tool description:
208
+
209
+ - `save_dashboard` in a batch with other operations persists once, after those
210
+ other operations succeed; standalone, it commits whatever draft was already
211
+ staged.
212
+ - `undo` in a mixed batch **cancels all of that batch's incoming operations**
213
+ (nothing else in the batch takes effect); standalone, it reverts the last
214
+ staged change as before.
215
+ - `discard_dashboard` in a mixed batch **ignores all other operations in that
216
+ batch** (only the discard runs); standalone, it discards the whole staged
217
+ draft as before.
218
+ - The top-level `autosave` flag is ignored whenever one of these three control
219
+ operations is present — they determine the outcome instead.
220
+
221
+ If you actually observe different behavior live, trust the live server over
222
+ this doc and flag it for a doc update.
223
+
224
+ **Never call `save_dashboard` automatically.** Show the draft, ask, and only
225
+ save on the user's explicit confirmation given *after* seeing it — even if the
226
+ original request already said "save it" in the same message as the edit (same
227
+ discipline as `edit_visualization` → `update_visualization`,
228
+ `edit-visualization.md` §8).
229
+
230
+ ## 6. Deleting a widget — `remove_widget_from_dashboard`
231
+
232
+ Two distinct operations, easy to conflate:
233
+
234
+ - **`remove_widget_from_page`** only removes the widget's placement from one
235
+ page's `widgets` array — the widget's definition stays behind, live, in the
236
+ dashboard's top-level `widgets` map, now orphaned (unplaced on any page).
237
+ Verified: after `remove_widget_from_page` + a save, the dashboard read tool
238
+ showed the page's widget list empty but the widget still present, fully
239
+ defined, under `widgets`.
240
+ - **`remove_widget_from_dashboard`** is the true delete: definition *and*
241
+ every placement across every page, in one operation. Its only field is a
242
+ bare `widgetName` string (not a `placement` object) — source it the same way
243
+ as `widget.name` elsewhere: read it back via `render_dashboard`, or reuse
244
+ the `widget.name` you supplied to an earlier `upsert_*_widget` in this same
245
+ draft/batch. Never invent it. Schema: `remove_widget_from_dashboard.json`.
246
+
247
+ Like every other operation, `remove_widget_from_dashboard` stages into the
248
+ draft by default — it isn't persisted until a `save_dashboard` (or top-level
249
+ `autosave: true`) commits it (§5). This also closes the global-filter-removal
250
+ gap noted in `dashboard-authoring.md` §5: a global filter is a widget under
251
+ the hood, so `remove_widget_from_dashboard` fully removes one.
252
+
253
+ ## 7. Gotchas summary
254
+
255
+ | Gotcha | Rule |
256
+ |---|---|
257
+ | Omitting `minorVersion` | Client-visible `ILLEGAL_QUERY_PARAMETER_VALUE` on an empty value — always send `minorVersion: -1` explicitly |
258
+ | Widget identity | `widget.name` always identifies the widget; add `widget.id` only to replace a *persisted* widget (never invent it); page ops use a third, separate `placement.name` — see §3 |
259
+ | `autosave` location | Batch-wide, top-level field now — NOT per-operation. Ignored when `save_dashboard`/`undo`/`discard_dashboard` is present in the batch |
260
+ | Upsert without place | An `upsert_*_widget` only defines a widget; it renders nowhere until `place_widget_on_page` in the same (or a later, pre-save) batch |
261
+ | `add_page`/place on a layout-less dashboard | Fails `INVALID_INPUT: "Dashboard has no layout to add the page to"` — a `create_dashboard` with `layouts: []` has no layout; seed `page_1` in the create `layouts` block before editing (see §4) |
262
+ | `save_dashboard`/`undo`/`discard_dashboard` in a mixed batch | No longer rejected — each has defined mixed-batch behavior now (§5); this supersedes an older "must be the only operation" rule |
263
+ | Draft state | Stages and **accumulates** across calls; the dashboard read tool does not reflect it; only the `edit_dashboard` response itself previews it |
264
+ | `undo` after a save | `RESOURCE_NOT_FOUND: "No staged draft to undo for dashboard <name>"` — nothing to revert once persisted |
265
+ | Deleting a widget | `remove_widget_from_page` only unplaces (orphans the definition); `remove_widget_from_dashboard` (bare `widgetName`) deletes the definition + every placement in one step — see §6 |
266
+ | `upsert_navigation_widget` | Gated pilot — persisting a dashboard holding one fails `ACCESS_DENIED` without the pilot enabled |
267
+ | `upsert_filter_widget` vs. `upsert_parameter_widget` `dataType` casing | Filter: capitalized enum (`Text`, `Date`, …); Parameter: lowercase (`text`, `date`, …) — do not cross-copy |
268
+ | `isLabelHidden` | Required at execution for filter/parameter widgets with `viewType: list`/`listcard`; not used by filter `toggle`; optional for parameter `input`/`inputcard` |
269
+ | `upsert_filter_widget`/`upsert_parameter_widget` `parameters` shape | `oneOf` keyed by `viewType` — send only the fields for your chosen `viewType` (`list`/`listcard`/`toggle` for filter; also `input`/`inputcard` for parameter); mixing another `viewType`'s fields in is rejected |
270
+ | Response wrapping | `edit_dashboard` double-wraps like `delete_dashboard` (`{defaultExc, responseCode}`) — `create_dashboard`, observed live, does not |
271
+ | Text-content read-back | Server appends `"rules": []` to each Quill-delta op you sent, even if you didn't include one |
272
+ | `render_dashboard` vs. `get_dashboard` | Both are live, distinct tools (verified 2026-09-13) — not aliases. `render_dashboard` is the pre-replace/pre-delete read step (fetch the real `id`/`widgetName`) and honors `showDraft`; `get_dashboard` returns flat metadata only and never shows a staged draft |
273
+ | `save_dashboard`'s `dashboardIdOrApiName` | Optional on this one operation — defaults to the dashboard the batch already targets; only pass it to target a different dashboard |