@salesforce/afv-skills 1.24.0 → 1.26.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 (84) hide show
  1. package/package.json +1 -1
  2. package/skills/commerce-b2b-open-code-components-replace/SKILL.md +244 -0
  3. package/skills/commerce-b2b-open-code-components-replace/assets/ootb-to-open-code-mapping.json +66 -0
  4. package/skills/dx-devops-test-failures-analyze/SKILL.md +89 -0
  5. package/skills/dx-devops-test-failures-analyze/references/code-analyzer-violations.md +26 -0
  6. package/skills/dx-devops-test-failures-analyze/references/failure-categories.md +85 -0
  7. package/skills/{checking-devops-prerequisites/SKILL.md → dx-devops-test-failures-analyze/references/prerequisite-checks.md} +8 -37
  8. package/skills/{creating-fix-work-item/SKILL.md → dx-devops-test-failures-analyze/references/work-item-creation.md} +8 -12
  9. package/skills/dx-devops-test-pipeline-configure/SKILL.md +72 -0
  10. package/skills/dx-devops-test-pipeline-configure/references/configuring-quality-gate.md +133 -0
  11. package/skills/dx-devops-test-pipeline-configure/references/configuring-test-provider.md +80 -0
  12. package/skills/dx-devops-test-pipeline-configure/references/error-handling.md +39 -0
  13. package/skills/dx-devops-test-pipeline-configure/references/gotchas.md +37 -0
  14. package/skills/dx-devops-test-pipeline-configure/references/prerequisite-checks.md +112 -0
  15. package/skills/dx-devops-test-pipeline-configure/references/syncing-test-providers.md +69 -0
  16. package/skills/dx-devops-test-suite-assignments-configure/SKILL.md +74 -0
  17. package/skills/dx-devops-test-suite-assignments-configure/references/api-endpoint.md +30 -0
  18. package/skills/dx-devops-test-suite-assignments-configure/references/error-handling.md +14 -0
  19. package/skills/dx-devops-test-suite-assignments-configure/references/prerequisite-checks.md +112 -0
  20. package/skills/{recommending-devops-tests/SKILL.md → dx-devops-test-suite-assignments-configure/references/recommendation-logic.md} +10 -26
  21. package/skills/dx-devops-test-suite-assignments-configure/references/suite-assignment-modes.md +99 -0
  22. package/skills/dx-devops-test-suite-run/SKILL.md +111 -0
  23. package/skills/dx-devops-test-suite-run/references/error-handling.md +31 -0
  24. package/skills/dx-devops-test-suite-run/references/polling-configuration.md +78 -0
  25. package/skills/dx-devops-test-suite-run/references/prerequisite-checks.md +112 -0
  26. package/skills/dx-devops-test-suite-run/references/retrigger-mode.md +51 -0
  27. package/skills/dx-org-manage/SKILL.md +192 -0
  28. package/skills/dx-org-manage/examples/README.md +45 -0
  29. package/skills/dx-org-manage/examples/scratch-orgs/error_no_devhub.json +9 -0
  30. package/skills/dx-org-manage/examples/scratch-orgs/error_timeout.json +13 -0
  31. package/skills/dx-org-manage/examples/scratch-orgs/success_definition_file.json +28 -0
  32. package/skills/dx-org-manage/examples/scratch-orgs/success_edition.json +26 -0
  33. package/skills/dx-org-manage/examples/scratch-orgs/success_snapshot.json +27 -0
  34. package/skills/dx-org-manage/examples/snapshots/error_output.json +9 -0
  35. package/skills/dx-org-manage/examples/snapshots/success_output.json +15 -0
  36. package/skills/dx-org-manage/references/cli_flags.md +67 -0
  37. package/skills/dx-org-manage/references/creating-scratch-org.md +164 -0
  38. package/skills/dx-org-manage/references/creating-snapshot.md +103 -0
  39. package/skills/dx-org-manage/references/definition_file_options.md +224 -0
  40. package/skills/dx-org-manage/references/edition_types.md +78 -0
  41. package/skills/dx-org-manage/references/opening-org.md +160 -0
  42. package/skills/dx-org-manage/references/snapshot_usage.md +74 -0
  43. package/skills/dx-org-permission-set-assign/SKILL.md +98 -0
  44. package/skills/dx-org-permission-set-assign/examples/error_output.json +19 -0
  45. package/skills/dx-org-permission-set-assign/examples/success_output.json +16 -0
  46. package/skills/dx-org-permission-set-assign/references/cli_flags.md +68 -0
  47. package/skills/experience-cms-brand-apply/SKILL.md +1 -1
  48. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +31 -19
  49. package/skills/experience-ui-bundle-file-upload-generate/SKILL.md +1 -1
  50. package/skills/experience-ui-bundle-frontend-generate/implementation/header-footer.md +1 -1
  51. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +336 -581
  52. package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +172 -0
  53. package/skills/experience-ui-bundle-salesforce-data-access/references/graphiti-cli.md +373 -0
  54. package/skills/experience-ui-bundle-salesforce-data-access/references/graphql-hand-authoring.md +376 -0
  55. package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +119 -0
  56. package/skills/experience-ui-bundle-salesforce-data-access/references/rest-and-integration.md +152 -0
  57. package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +217 -0
  58. package/skills/experience-ui-bundle-salesforce-data-access/scripts/graphql-search.sh +36 -9
  59. package/skills/platform-agentsetup-categories-fetch/SKILL.md +109 -0
  60. package/skills/platform-agentsetup-categories-fetch/references/api-response-schema.md +121 -0
  61. package/skills/platform-custom-object-generate/SKILL.md +62 -7
  62. package/skills/platform-custom-object-generate/references/description-enrichment.md +125 -0
  63. package/skills/platform-metadata-retrieve/SKILL.md +121 -0
  64. package/skills/platform-metadata-retrieve/examples/error_output.json +10 -0
  65. package/skills/platform-metadata-retrieve/examples/success_output.json +27 -0
  66. package/skills/platform-metadata-retrieve/references/cli_flags.md +138 -0
  67. package/skills/platform-metadata-retrieve/references/retrieval_modes.md +181 -0
  68. package/skills/platform-sharing-rules-generate/SKILL.md +165 -0
  69. package/skills/platform-sharing-rules-generate/references/rule-types.md +199 -0
  70. package/skills/platform-tracing-agentforce-configure/SKILL.md +118 -0
  71. package/skills/platform-tracing-agentforce-configure/assets/AgentforcePlatformTracing-template.xml +4 -0
  72. package/skills/platform-tracing-configure/SKILL.md +118 -0
  73. package/skills/platform-tracing-configure/assets/EventSettings-template.xml +4 -0
  74. package/skills/platform-trust-archive-manage/SKILL.md +25 -11
  75. package/skills/platform-trust-archive-manage/examples/monitor-failed-jobs.md +2 -2
  76. package/skills/platform-trust-archive-manage/references/archive-activity-entity.md +1 -1
  77. package/skills/platform-trust-archive-manage/references/connect-api-operations.md +51 -12
  78. package/skills/analyzing-test-failures/SKILL.md +0 -159
  79. package/skills/configuring-quality-gate/SKILL.md +0 -120
  80. package/skills/configuring-test-provider/SKILL.md +0 -113
  81. package/skills/managing-suite-assignments/SKILL.md +0 -161
  82. package/skills/polling-test-results/SKILL.md +0 -72
  83. package/skills/running-devops-test-suite/SKILL.md +0 -144
  84. package/skills/syncing-test-providers/SKILL.md +0 -108
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/afv-skills",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "description": "Salesforce skills for Agentforce Vibes",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "files": [
@@ -0,0 +1,244 @@
1
+ ---
2
+ name: commerce-b2b-open-code-components-replace
3
+ description: "Replace OOTB (out-of-the-box) B2B Commerce components with open source equivalents in site metadata content.json files, or look up the equivalent open code `site:` component for OOTB definitions. Use when users mention \"replace OOTB components\", \"replace commerce components with open code\", \"swap OOTB for open source\", \"replace commerce_builder:\", \"replace OOTB in site\", \"replace component in site metadata\", \"replace component definition\", \"find open code equivalent\", \"equivalent open code component\", \"OOTB to open code mapping\", \"what is the site component for\", components \"in this view\" or \"for a given view\", or a specific list of component names — and want to update or only discover mappings in their store metadata."
4
+ allowed-tools: Bash(grep:*) Bash(ls:*) Read Write
5
+ metadata:
6
+ version: "1.0"
7
+ ---
8
+
9
+ # Replacing OOTB B2B Commerce Components with Open Code
10
+
11
+ This skill replaces OOTB (out-of-the-box) B2B Commerce component definitions in site metadata `content.json` files with their open source `site:` equivalents, or looks up the equivalent open code component for given OOTB definitions without making changes. It uses an authoritative mapping loaded from `assets/ootb-to-open-code-mapping.json`.
12
+
13
+ ## Scope
14
+
15
+ **Modes:** **Full replace** runs the scan (Step 1), user selection if needed, then `content.json` updates (Step 2–3). **Lookup only** (user asks for equivalents but not to change files): apply the mapping-authority rule and report OOTB → `site:` for the named components or for definitions found in the scoped `content.json` — **do not** call Write unless the user confirms replacement. **View-scoped** work: limit file discovery and reads to `sfdc_cms__view/<ViewName>/` (or the path the user gives) instead of all views.
16
+
17
+ ---
18
+
19
+ ## Prerequisites
20
+
21
+ ### Resolve `<package-dir>`
22
+
23
+ Read `sfdx-project.json` and pick the active package directory. Extract `packageDirectories[]` and use the entry with `"default": true`; if no entry is flagged default, use the first entry. Use this value as `<package-dir>` everywhere below. If `sfdx-project.json` is missing or has no `packageDirectories`, tell the user and abort.
24
+
25
+ ### Delegate setup
26
+
27
+ Before replacing components, delegate to the **commerce-b2b-open-code-components-integrate** skill to ensure:
28
+
29
+ 1. Open source repository is cloned at `.tmp/b2b-commerce-open-source-components`
30
+ 2. Store is selected and site metadata is retrieved locally
31
+ 3. Open code components are copied to the store's site metadata
32
+
33
+ The integrating skill owns the `.tmp/` clone lifecycle (it prompts the user to reuse or re-clone an existing checkout); this skill assumes the clone is already present.
34
+
35
+ Send a plain-text chat reply to the user (per Rule 1): "Before replacing components, I need to verify that the open code components are set up in your store. Let me check..."
36
+
37
+ If any prerequisite is not met, the integrating skill will handle it. Once all checks pass, proceed to the replacement workflow.
38
+
39
+ **Required state** after prerequisites:
40
+ - **Package dir** — the value resolved above (e.g., `force-app`)
41
+ - **Store name** — e.g., `My_B2B_Store1`
42
+ - **Site metadata path** — `<package-dir>/main/default/digitalExperiences/site/<store-name>/`
43
+
44
+ ---
45
+
46
+ ## Replacement Workflow
47
+
48
+ ### Step 1: Scan Site and Cross-Reference Mapping
49
+
50
+ **This step is MANDATORY.** Always scan the site first before attempting any replacements.
51
+
52
+ Send a plain-text chat reply to the user (per Rule 1): "I'm scanning your store's site metadata to find all OOTB commerce components currently in use and checking which have open code equivalents."
53
+
54
+ **Step 1a — Find affected files** (one command, simple literal match):
55
+
56
+ ```bash
57
+ grep -rl '"commerce' \
58
+ <package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__view/ \
59
+ <package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__themeLayout/ \
60
+ --include="content.json"
61
+ ```
62
+
63
+ **Step 1b — Read the mapping and parse the matched files.** Read `assets/ootb-to-open-code-mapping.json` once into memory. Then, using the **Read** tool, parse each matched file and extract all `"definition"` values that start with `commerce` (e.g., `commerce_builder:cartBadge`). Collect a deduplicated list of OOTB components across all files.
64
+
65
+ **Step 1c — List repo components** (one command):
66
+
67
+ ```bash
68
+ ls .tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/
69
+ ```
70
+
71
+ Using the parsed definitions, the `ls` output, and the mapping table, categorize every discovered OOTB component into three groups:
72
+
73
+ **Show the user a breakdown and a selectable list:**
74
+
75
+ First, inform the user about skipped and unmapped components:
76
+ ```text
77
+ Found X OOTB components in your site:
78
+
79
+ In mapping table but NOT in repo (skipping):
80
+ - commerce_builder:quoteSummary → site:quoteSummary (not found in repo)
81
+
82
+ No mapping available (not in mapping table):
83
+ - commerce_builder:actionButtons
84
+ - commerce_builder:layoutHeaderOne
85
+ - commerce_builder:searchInputContainer
86
+ - commerce_builder:myAccountMegaMenu
87
+ ```
88
+
89
+ Then present the replaceable components as a **multi-select list** so the user can pick from checkboxes instead of typing. Include an "All of the above" option:
90
+
91
+ ```text
92
+ Which components would you like to replace?
93
+
94
+ ☐ commerce_builder:heading → site:productHeading
95
+ ☐ commerce_builder:cartBadge → site:cartBadge
96
+ ☐ commerce_builder:searchInput → site:searchInput
97
+ ☐ All of the above
98
+ ```
99
+
100
+ If user provided specific component name(s) in the original request, pre-filter to those and skip the selection prompt.
101
+
102
+ ### Step 2: Replace in content.json
103
+
104
+ Send a plain-text chat reply to the user (per Rule 1): "I'm now replacing the selected OOTB component definitions with their open code equivalents in your site's content.json files."
105
+
106
+ The affected files are already known from Step 1. For each file that contains selected components:
107
+ 1. Use the **Read** tool to read the file
108
+ 2. For each selected OOTB component, confirm again that the mapped **`site:`** target exists in the open code repo. Only proceed with replacements that pass this check.
109
+ 3. Replace all matching `"definition"` values with their mapped open code equivalents — **always** use the exact `site:<name>` string from the mapping table
110
+ - Example: `"definition": "commerce_builder:heading"` → `"definition": "site:productHeading"`
111
+ 4. Use the **Write** tool to save the updated file
112
+ 5. Preserve all other JSON properties — only `"definition"` values change
113
+
114
+ **Batch efficiently:** if a file contains multiple OOTB components, apply ALL replacements in a single Read → modify → Write pass. Do NOT read and write the same file multiple times.
115
+
116
+ ### Step 3: Report
117
+
118
+ ```text
119
+ ✅ Replacement Complete!
120
+
121
+ Replaced X components across Y files:
122
+ - commerce_builder:heading → site:productHeading (3 files)
123
+ - commerce_builder:cartBadge → site:cartBadge (2 files)
124
+ - commerce_builder:searchInput → site:searchInput (4 files)
125
+
126
+ Skipped (not in repo):
127
+ - commerce_builder:quoteSummary
128
+
129
+ No mapping available (left unchanged):
130
+ - commerce_builder:actionButtons
131
+ - commerce_builder:layoutHeaderOne
132
+ - commerce_builder:searchInputContainer
133
+
134
+ Modified files:
135
+ - sfdc_cms__view/Home/content.json
136
+ - sfdc_cms__view/Product_Detail/content.json
137
+ - sfdc_cms__themeLayout/DefaultTheme/content.json
138
+
139
+ Next Steps:
140
+ 1. Deploy: sf project deploy start -d <package-dir>/main/default/digitalExperiences/site/<store-name>
141
+ 2. Test the store thoroughly in Experience Builder
142
+ 3. Publish your site when ready
143
+ ```
144
+
145
+ ---
146
+
147
+ ## Example Interaction
148
+
149
+ **User:** "Replace OOTB components with open code versions"
150
+
151
+ **Agent:** "Before replacing components, I need to verify that the open code components are set up in your store. Let me check..."
152
+ - ✓ Open source repo cloned
153
+ - ✓ Store metadata available for My_B2B_Store1
154
+ - ✓ Open code components are integrated
155
+
156
+ **Agent:** "I'm scanning your store's site metadata to find all OOTB commerce components and checking which have open code equivalents."
157
+
158
+ _(Runs grep -rl to find files with commerce definitions, Reads those files to extract component names, runs ls to list repo components, then cross-references with mapping table)_
159
+
160
+ ```text
161
+ Found 8 OOTB components in your site:
162
+
163
+ No mapping available (not in mapping table):
164
+ - commerce_builder:searchInputContainer
165
+ - commerce_builder:layoutHeaderOne
166
+ - commerce_builder:myAccountMegaMenu
167
+ - commerce_builder:actionButtons
168
+ ```
169
+
170
+ **Agent** _(asks the user via a multi-select prompt):_
171
+ ```text
172
+ Which components would you like to replace?
173
+
174
+ ☐ commerce_builder:heading → site:productHeading
175
+ ☐ commerce_builder:cartBadge → site:cartBadge
176
+ ☐ commerce_builder:searchInput → site:searchInput
177
+ ☐ commerce_builder:cartSummary → site:cartSummary
178
+ ☐ All of the above
179
+ ```
180
+
181
+ **User:** _(selects heading and cartBadge)_
182
+
183
+ **Agent:** "I'm now replacing the selected OOTB component definitions with their open code equivalents in your site's content.json files."
184
+
185
+ _(Files already known from scan — one Read/Write pass per affected file, all replacements batched)_
186
+
187
+ ```text
188
+ ✅ Replacement Complete!
189
+
190
+ Replaced 2 components across 5 files:
191
+ - commerce_builder:heading → site:productHeading (3 files)
192
+ - commerce_builder:cartBadge → site:cartBadge (2 files)
193
+
194
+ No mapping available (left unchanged):
195
+ - commerce_builder:searchInputContainer
196
+ - commerce_builder:layoutHeaderOne
197
+ - commerce_builder:myAccountMegaMenu
198
+ - commerce_builder:actionButtons
199
+
200
+ Modified files:
201
+ - sfdc_cms__view/Home/content.json
202
+ - sfdc_cms__view/Product_Detail/content.json
203
+ - sfdc_cms__themeLayout/DefaultTheme/content.json
204
+
205
+ Next Steps:
206
+ 1. Deploy: sf project deploy start -d force-app/main/default/digitalExperiences/site/My_B2B_Store1
207
+ 2. Test the store thoroughly in Experience Builder
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Rules
213
+
214
+ 1. **Always explain in chat before executing.** Before every Bash or Write tool call, send a plain-text reply in the conversation that says what the command will do and why. The explanation MUST appear as a normal chat message preceding the tool call. Do NOT embed it inside the command itself (no `echo` lines, no `#` comments), do NOT prefix it to the command, and do NOT rely solely on the tool's `description` parameter — that field is not guaranteed to be visible to the user. After the explanation, issue the tool call and wait for the user to approve it before continuing.
215
+ 2. **`assets/ootb-to-open-code-mapping.json` is the only source of truth.** Every OOTB → open-code mapping comes from that file; never guess, infer, or hallucinate component names. Each replacement's new `"definition"` MUST be the exact mapped value from the file, which always uses the `site:` namespace (e.g. `site:productHeading`). Before writing, verify the mapped target exists in the cloned open code components repo (under `.tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/`); if it is not present, skip the replacement and report it under "not in repo".
216
+ 3. **Use Read and Write tools for JSON files.** Use the Read tool to parse `content.json` files and the Write tool to update them. Do NOT use bash to parse or edit JSON — no sed, awk, perl, or regex on JSON content. Bash is only for **simple file discovery** (`grep -rl`, `find`, `ls`) — never for extracting or modifying JSON values.
217
+ 4. **Minimize commands.** Batch work into as few commands as possible. Use a single grep to scan all files, a single ls to verify the repo, and one Read/Write pass per file. Do NOT run a separate command for every component or every directory.
218
+
219
+ ---
220
+
221
+ ## Error Handling
222
+
223
+ | Error | Message | Action |
224
+ |-------|---------|--------|
225
+ | Prerequisites not met | "Open code components are not integrated yet." | Run integrating skill first |
226
+ | No mapping found | "No mapping found for '{component}'." | Show available mappings, report as unmapped |
227
+ | Component not in repo | "Open code component '{name}' not found in cloned repo." | Skip and inform user |
228
+ | No OOTB components in site | "No OOTB commerce components found in site metadata." | Inform user, nothing to replace |
229
+ | No replaceable components | "All OOTB components found are unmapped — none can be replaced." | Show the unmapped list, suggest checking for updated mappings |
230
+ | content.json parse error | "Failed to parse content.json: {file}" | Show error, skip file, continue with remaining files |
231
+
232
+ ---
233
+
234
+ ## Verification Checklist
235
+
236
+ - [ ] Prerequisites verified via integrating skill (repo, store, components)
237
+ - [ ] Site scanned + repo verified + mapping cross-referenced in minimal commands (Step 1)
238
+ - [ ] Each replacement uses the exact mapped `site:` definition and was verified present in the open code repo before write
239
+ - [ ] Breakdown shown to user with three categories before proceeding
240
+ - [ ] User selected components to replace (or provided names)
241
+ - [ ] Each `content.json` file updated in a single Read → modify → Write pass
242
+ - [ ] JSON structure preserved, no syntax errors introduced
243
+ - [ ] User informed of skipped and unmapped components
244
+ - [ ] Deployment command provided
@@ -0,0 +1,66 @@
1
+ {
2
+ "commerce_builder:actionButton": "site:commonButton",
3
+ "commerce_builder:b2bCartContents": "site:cartB2bCartContents",
4
+ "commerce_builder:cartAppliedPromotion": "site:cartPromotionApplied",
5
+ "commerce_builder:cartApplyCoupon": "site:cartApplyCoupon",
6
+ "commerce_builder:cartBadge": "site:cartBadge",
7
+ "commerce_builder:cartPromotions": "site:cartPromotions",
8
+ "commerce_builder:cartSummary": "site:cartSummary",
9
+ "commerce_builder:checkoutButton": "site:checkoutButton",
10
+ "commerce_builder:checkoutDeliveryAddress": "site:checkoutDeliveryAddress",
11
+ "commerce_builder:checkoutDeliveryMethod": "site:checkoutDeliverymethod",
12
+ "commerce_builder:checkoutGiftOptions": "site:checkoutGiftOptions",
13
+ "commerce_builder:checkoutNotification": "site:checkoutNotification",
14
+ "commerce_builder:checkoutPurchaseOrder": "site:checkoutPurchaseOrder",
15
+ "commerce_builder:checkoutShippingInstructions": "site:checkoutShippingInstructions",
16
+ "commerce_builder:checkoutSubscriptionPolicyDisclaimer": "site:checkoutSubscriptionPolicyDisclaimer",
17
+ "commerce_builder:consentBlanket": "site:legalConsentBlanket",
18
+ "commerce_builder:countryPickerV2": "site:commonCountryPicker",
19
+ "commerce_builder:drilldownNavigation": "site:commonDrilldownNavigation",
20
+ "commerce_builder:formattedCurrency": "site:commonFormattedCurrency",
21
+ "commerce_builder:heading": "site:productHeading",
22
+ "commerce_builder:layoutFooter": "site:layoutFooter",
23
+ "commerce_builder:layoutHeaderSimple": "site:layoutHeaderSimple",
24
+ "commerce_builder:linkList": "site:commonLinksList",
25
+ "commerce_builder:myAccountAddressContainer": "site:myaccountAddress",
26
+ "commerce_builder:navigationMenuItemList": "site:myaccountNavigationMenuItems",
27
+ "commerce_builder:orderConfirmationBillingDetails": "site:orderConfirmationDetailsBilling",
28
+ "commerce_builder:orderConfirmationDeliveryGroup": "site:orderConfirmationDeliverygroup",
29
+ "commerce_builder:orderConfirmationErrorMessage": "site:orderConfirmationMessageError",
30
+ "commerce_builder:orderConfirmationSuccessMessage": "site:orderConfirmationMessageSuccess",
31
+ "commerce_builder:orderDetails": "site:orderDetails",
32
+ "commerce_builder:orderList": "site:orderList",
33
+ "commerce_builder:orderListDateFilter": "site:orderListDateFilter",
34
+ "commerce_builder:orderProductsInfo": "site:orderProducts",
35
+ "commerce_builder:orderPromotionsSummary": "site:orderPromotions",
36
+ "commerce_builder:orderShipmentTracker": "site:orderShipmentTracker",
37
+ "commerce_builder:paymentByExpress": "site:paymentByExpress",
38
+ "commerce_builder:productAttachments": "site:productAttachments",
39
+ "commerce_builder:productBundle": "site:productBundle",
40
+ "commerce_builder:productBundleItem": "site:productBundleItem",
41
+ "commerce_builder:productFieldsTable": "site:productFieldsTable",
42
+ "commerce_builder:productFrequentlyBoughtTogether": "site:productFrequentlyBoughtTogether",
43
+ "commerce_builder:productMediaGallery": "site:productMediaGallery",
44
+ "commerce_builder:productPricingDetails": "site:productPricingDetails",
45
+ "commerce_builder:productSellingModelSelector": "site:productSellingmodelSelector",
46
+ "commerce_builder:productSet": "site:productSet",
47
+ "commerce_builder:promotionDiscountsApproaching": "site:promotionDiscountsApproaching",
48
+ "commerce_builder:purchaseOptions": "site:productPurchaseOptions",
49
+ "commerce_builder:purchasedProducts": "site:productListPurchased",
50
+ "commerce_builder:quickOrder": "site:orderQuickOrder",
51
+ "commerce_builder:quoteSummary": "site:quoteSummary",
52
+ "commerce_builder:searchFilters": "site:searchFilters",
53
+ "commerce_builder:searchInput": "site:searchInput",
54
+ "commerce_builder:searchNoResultsLayout": "site:searchResultsLayoutEmpty",
55
+ "commerce_builder:searchResults": "site:searchResults",
56
+ "commerce_builder:searchResultsLayout": "site:searchResultsLayout",
57
+ "commerce_builder:searchSortMenu": "site:searchSortMenu",
58
+ "commerce_builder:socialLinks": "site:commonLinksSocial",
59
+ "commerce_builder:splitShipmentHeader": "site:cartSplitshipmentHeader",
60
+ "commerce_builder:stickyContainer": "site:commonContainerSticky",
61
+ "commerce_builder:subscriptions": "site:productSubscriptions",
62
+ "commerce_builder:userProfileMenu": "site:myAccountUserProfileMenu",
63
+ "commerce_builder:variantSelector": "site:productVariantSelector",
64
+ "commerce_builder:wishlist": "site:productWishlist",
65
+ "commerce_builder:wishlistShortcut": "site:productWishlistShortcut"
66
+ }
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: dx-devops-test-failures-analyze
3
+ description: "Analyzes DevOps Center test failures and Code Analyzer violations in plain language — failure category, offending file/class/method/line, rule violated, fix direction, and prioritized improvement suggestions (test-code vs production-code) — then optionally creates a tracked fix WorkItem on explicit request. Analysis is pure reasoning; work-item creation is a confirmation-gated write. Use this skill to explain failures or improvement suggestions, translate Code Analyzer violations, or track a fix as a work item. TRIGGER when: a run failed and the user wants root cause; a quality gate failure needs explaining; violations need translating; the user shares a failure payload and asks how to address it; wants to strengthen tests; or wants to create a fix work item, log a remediation, or assign a failure. DO NOT TRIGGER when: the user wants fix code written (use generating-apex) or new test classes authored (use generating-apex-test)."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "67.0"
7
+ ---
8
+
9
+ # Analyze DevOps Center Test Failures
10
+
11
+ Parses a test failure or Code Analyzer violation payload, explains it in plain language, produces prioritized improvement suggestions, and — only on explicit user request — creates a tracked fix work item. Parts 1–2 are pure reasoning (no writes); Part 3 is an optional, confirmation-gated write.
12
+
13
+ **Never expose raw JSON, stack traces, or internal Salesforce error codes to the user.** Always translate to file name, method, line, and plain description.
14
+
15
+ ---
16
+
17
+ ## Prerequisites
18
+
19
+ - **Parts 1–2 (analysis):** If the failure payload is already in context, no prerequisites are needed — this is pure reasoning. If you must fetch the payload yourself, run prerequisites (`references/prerequisite-checks.md`, Prereqs 1–4) and obtain the execution result via `dx-devops-test-suite-run` (its polling step).
20
+ - **Part 3 (work item):** Run Prerequisites 1–4. You also need a `DevopsProjectId` to file under and an `OwnerId` (assignee). See `references/work-item-creation.md`.
21
+
22
+ ---
23
+
24
+ ## Part 1 — Classify and explain each failure
25
+
26
+ Determine the failure category, then for each failure extract and translate to plain language: offending file/class, method, line number, the rule or assertion violated, and a fix direction (without writing code). Group failures by category if more than one.
27
+
28
+ | Category | Description |
29
+ |---|---|
30
+ | Assertion failure | A test assertion failed (expected vs actual mismatch) |
31
+ | Exception | An unhandled exception was thrown |
32
+ | Code Analyzer violation | A static-analysis rule was violated (e.g. `ApexCRUDViolation`) |
33
+ | Timeout | Test exceeded execution time limit |
34
+ | Compile error | Class failed to compile |
35
+
36
+ **Output format:**
37
+
38
+ ```text
39
+ Test failure summary:
40
+
41
+ <N> failure(s) found:
42
+
43
+ 1. [<Category>] `<ClassName>.cls` — `<methodName>()` at line <N>
44
+ What happened: <plain-language description>
45
+ Rule violated: <ruleName or assertion description>
46
+ Fix direction: <plain-language suggestion>
47
+ ```
48
+
49
+ Full category/pattern tables and Code Analyzer rule translations: `references/failure-categories.md` and `references/code-analyzer-violations.md`.
50
+
51
+ **Empty / no-data case:** If the payload contains no failures or violations, report that clearly (e.g. "No failures found in the provided execution results.") and stop. Do NOT fabricate failures or suggestions.
52
+
53
+ ---
54
+
55
+ ## Part 2 — Improvement suggestions
56
+
57
+ Run this **after execution completes with failures**, not on static source. For each failed test, reason over the failure message (the primary signal) to identify what the test is not handling, then produce a specific, actionable suggestion and a **fix location** (Test vs Production code). The full failure-pattern → suggestion mapping is in `references/failure-categories.md`.
58
+
59
+ ```text
60
+ Test improvement suggestions based on execution results:
61
+
62
+ `<testMethodName>()` — [Assertion Failure / Exception / etc.]
63
+ Failure: "<failure message>"
64
+ What this reveals: <plain-language explanation>
65
+ Suggestion: <specific, actionable recommendation>
66
+ Fix location: Test | Production code
67
+
68
+ Overall: <N> improvement(s) across <M> failed test(s).
69
+ ```
70
+
71
+ Do not rewrite the test — only describe what needs to change and why. **Fix location: Production code** indicates a code defect exposed by a sound test (track separately, not a test-quality blocker). **Fix location: Test** indicates the test needs hardening (setup, assertions, edge cases).
72
+
73
+ ---
74
+
75
+ ## Part 3 — Create a fix work item (optional, on request only)
76
+
77
+ Trigger only when the user wants to create a fix work item, log a remediation, or assign a failure to a developer. This is a **write** operation with a mandatory confirmation gate. Follow `references/work-item-creation.md` for inputs, the subject/assignee/project confirmation gate, the `sf data create record --sobject WorkItem` call, and error handling.
78
+
79
+ > Use `WorkItem` (no namespace) — `DevopsWorkItem` is not a supported sObject in this org version.
80
+
81
+ If no `DevopsProject` exists in the org, report that the work item cannot be created until a project is set up — do NOT fabricate a project or proceed.
82
+
83
+ ---
84
+
85
+ ## Related skills
86
+
87
+ - **`dx-devops-test-suite-run`** — produces the failure payload (via its polling step) that feeds this skill.
88
+ - **`dx-devops-test-suite-assignments-configure`** — assign/strengthen the suites whose tests are failing.
89
+ - **`generating-apex` / `generating-apex-test`** — to actually write fix code or new test classes (out of scope here).
@@ -0,0 +1,26 @@
1
+ # Code Analyzer Violations
2
+
3
+ For each Code Analyzer violation, always include:
4
+
5
+ - The rule name translated to plain English
6
+ - The exact line number
7
+ - The fix direction (without writing code)
8
+
9
+ ## Rule-name translations (examples)
10
+
11
+ | Rule name | Plain-language meaning | Fix direction |
12
+ |---|---|---|
13
+ | `ApexCRUDViolation` | A SOQL query or DML was made without checking object-level permissions first | Add a `Schema.sObjectType.<Object>.isAccessible()` (or `isCreateable`/`isUpdateable`) check before the operation |
14
+ | `ApexSharingViolations` | A class that performs data access does not declare sharing enforcement | Add `with sharing` (or an explicit `without sharing` with justification) to the class declaration |
15
+ | `ApexDangerousMethods` | A dangerous or disallowed method was used | Replace with the safe, supported alternative |
16
+ | `EmptyCatchBlock` | An exception is being swallowed silently | Log or handle the exception rather than leaving the catch block empty |
17
+
18
+ When a rule isn't in this table, translate it from its name and message into a plain-language description of what was violated, then give the fix direction.
19
+
20
+ ## Plain-language rule
21
+
22
+ Never paste raw stack traces, JSON payloads, or internal Salesforce error codes into the output. Always translate to file name, method, line, and plain description.
23
+
24
+ ## Fix location for violations
25
+
26
+ Code Analyzer violations almost always indicate a **production-code** fix — the static-analysis rule is flagging the code under test, not the test itself. Flag these as **Fix location: Production code** and track them separately from test-quality issues.
@@ -0,0 +1,85 @@
1
+ # Failure Categories & Improvement Mapping
2
+
3
+ ## Inputs required per failed test
4
+
5
+ - Test method name
6
+ - Failure message (the assertion error or exception text)
7
+ - Failure category (assertion failure, unhandled exception, timeout, compile error)
8
+
9
+ ## Category table
10
+
11
+ | Category | Description |
12
+ |---|---|
13
+ | **Assertion failure** | A test assertion failed (expected vs actual mismatch) |
14
+ | **Exception** | An unhandled exception was thrown |
15
+ | **Code Analyzer violation** | A static analysis rule was violated (e.g. `ApexCRUDViolation`, `ApexSharingViolations`) |
16
+ | **Timeout** | Test exceeded execution time limit |
17
+ | **Compile error** | Class failed to compile |
18
+
19
+ ## Per-failure extraction (Part 1)
20
+
21
+ For each failure, extract and translate to plain language:
22
+ - Offending file and class name
23
+ - Method name
24
+ - Line number
25
+ - What rule or assertion was violated, in plain language
26
+ - Suggested fix direction (without writing code)
27
+
28
+ Group failures by category if more than one.
29
+
30
+ ## Failure-pattern → improvement suggestion (Part 2)
31
+
32
+ Reason over the failure message to identify the root-cause pattern:
33
+
34
+ | Failure pattern | Improvement suggestion |
35
+ |---|---|
36
+ | `NullPointerException` | The test is not handling null input — add a null check or a test setup that ensures the data exists |
37
+ | `Assertion failed: expected X but was Y` | The expected value in the assertion is wrong or the test data setup does not produce the right state |
38
+ | `List has no rows for assignment` | The test is querying for data that doesn't exist — test setup is incomplete |
39
+ | `System.LimitException: Too many SOQL queries` | The test is hitting governor limits — the code under test or test setup is making too many queries |
40
+ | `Insufficient access rights on cross-reference id` | The test user lacks permissions — run as a user with the appropriate profile/permission set |
41
+ | `DML currently not allowed` | The test is performing DML inside a method called from a context that doesn't allow it |
42
+ | Code Analyzer violation message | The production code violates a specific rule — the test exposed it, but the fix is in production code, not the test |
43
+
44
+ ## Producing actionable suggestions
45
+
46
+ For each failure describe, in plain language:
47
+ - What the failure reveals about what the test is not handling
48
+ - What specifically should be added or changed to make the test robust
49
+ - Whether the fix is in the **test** (assertion, setup, permissions) or in **production code** (test is correct, code under test is broken)
50
+
51
+ Do not rewrite the test — only describe what needs to change and why.
52
+
53
+ ## Test fix vs. production-code fix
54
+
55
+ - **Fix location: Production code** — a code defect exposed by a sound test. Should NOT block suite promotion on test-quality grounds; track separately as a production defect.
56
+ - **Fix location: Test** — the test needs hardening: missing setup, wrong assertions, inadequate coverage of edge cases (null inputs, bulk record volumes, mixed permission contexts, governor-limit boundaries).
57
+
58
+ ## Output formats
59
+
60
+ **Part 1 — failure summary:**
61
+
62
+ ```text
63
+ Test failure summary:
64
+
65
+ <N> failure(s) found:
66
+
67
+ 1. [<Category>] `<ClassName>.cls` — `<methodName>()` at line <N>
68
+ What happened: <plain-language description>
69
+ Rule violated: <ruleName or assertion description>
70
+ Fix direction: <plain-language suggestion>
71
+ ```
72
+
73
+ **Part 2 — improvement suggestions:**
74
+
75
+ ```text
76
+ Test improvement suggestions based on execution results:
77
+
78
+ `<testMethodName>()` — [Assertion Failure / Exception / etc.]
79
+ Failure: "<failure message>"
80
+ What this reveals: <plain-language explanation>
81
+ Suggestion: <specific, actionable recommendation>
82
+ Fix location: Test | Production code
83
+
84
+ Overall: <N> improvement(s) across <M> failed test(s).
85
+ ```
@@ -1,22 +1,16 @@
1
- ---
2
- name: checking-devops-prerequisites
3
- description: "Validate the environment before any DevOps Center pipeline testing action: confirms an authenticated Salesforce org, the Agentforce DX plugin, an authenticated DevOps Center org, and an identified pipeline (and optionally a pipeline stage). Use this FIRST, internally, from any DevOps testing skill (running a test suite, polling results, syncing tests, configuring or retriggering a quality gate, assigning/mapping suites, creating fix work items, recommending tests, explaining coverage, analyzing failures). TRIGGER when another DevOps testing skill needs to confirm org/pipeline context before a query or system call. DO NOT TRIGGER for non-DevOps-Center work."
4
- metadata:
5
- version: "1.0"
6
- minApiVersion: "67.0"
7
- ---
8
-
9
- # Checking DevOps Prerequisites
1
+ # Prerequisite Checks — Shared DevOps Center Gate
10
2
 
11
- Shared gate for every DevOps Center testing skill. Run these checks **before** any query or system call. On any failure, surface the plain-language message and stop until the user resolves it — never proceed to a write with an unverified environment.
3
+ Shared environment gate for every DevOps Center testing skill. Run these checks **before** any query or system call. On any failure, surface the plain-language message and stop until the user resolves it — never proceed to a write with an unverified environment.
12
4
 
13
5
  > **API version:** All DevOps testing system calls target Salesforce API **v67.0** (minimum required).
14
6
 
15
7
  **Important:** All DevOps Center data (pipelines, stages, test suites, executions) lives in the Salesforce org — NOT in the local repository. Never search the filesystem for pipeline configuration. Always query the org using `sf data query` or `sf api request rest`.
16
8
 
17
- ## How other skills use this
9
+ **Object model use the STANDARD objects, never the `sf_devops__` managed package:** DevOps Center testing data lives in standard platform objects — `DevopsPipeline`, `DevopsPipelineStage`, `DevopsPipelineStageTrigger`, `DevopsTestSuite`, `DevopsTestSuiteStage`, `DevopsTestSuiteExecution`, `DevopsProject`, `WorkItem`. Do **NOT** query the legacy managed-package objects (`sf_devops__Pipeline__c`, `sf_devops__Pipeline_Stage__c`, etc.) and do **NOT** gate on a `PackageLicense` / namespace check for `sf_devops`. "DevOps Center installed" is determined **solely** by whether `DevopsPipeline` is queryable and returns records (Prerequisite 4) — never by the presence of the `sf_devops__` namespace. If a `sf_devops__*` object is missing, that is expected and is NOT evidence that DevOps Center is uninstalled.
18
10
 
19
- Every DevOps testing skill loads this skill first and runs Prerequisites 1–4 in order. Prerequisite 5 (stage) is run **only** when the calling skill operates on a specific pipeline stage (running/retriggering a suite, syncing, configuring a gate, mapping a suite). The calling skill passes back the resolved `doce-org-alias`, `pipelineId`, and (when applicable) `stageId` to use in its own commands.
11
+ ## How skills use this
12
+
13
+ Run Prerequisites 1–4 in order. Prerequisite 5 (stage) is run **only** when the operation targets a specific pipeline stage (configuring a gate, running/retriggering a suite, mapping a suite). Carry forward the resolved `doce-org-alias`, `pipelineId`, and (when applicable) `stageId`.
20
14
 
21
15
  Resolve the **DevOps Center org alias** without asking the user unless genuinely ambiguous:
22
16
  1. If the user named an org alias in their message, use it.
@@ -94,7 +88,7 @@ sf data query \
94
88
 
95
89
  ## Prerequisite 5 — Pipeline stage identified (conditional)
96
90
 
97
- Run **only** when the calling skill operates on a specific stage.
91
+ Run **only** when the operation targets a specific stage (e.g. configuring a quality gate).
98
92
 
99
93
  If the user's message already names a stage (e.g. "Integration", "Staging", "Production"), use that name directly — do NOT ask again. Look up its Id:
100
94
 
@@ -115,27 +109,4 @@ sf data query \
115
109
  Then ask: "Which pipeline stage are we working with?" — do NOT ask for an org alias; stages are resolved by name from the pipeline.
116
110
 
117
111
  - **Pass:** stage Id and Name confirmed
118
- - **Deferred:** not required until a calling skill needs it
119
-
120
- ---
121
-
122
- ## Error Handling
123
-
124
- | Error condition | Response |
125
- |---|---|
126
- | `sf org list` fails entirely | "Could not reach the Salesforce CLI. Make sure `sf` is installed and on your PATH." |
127
- | `sf org display` returns auth error | Surface plain-language re-auth instructions. Do not expose the raw error. |
128
- | `DevopsPipeline` query fails with 5xx | "The DevOps Center org is returning a server error. Try again in a few minutes." |
129
- | Any check throws unexpectedly | "Something went wrong checking prerequisites. Error: [plain summary]. Let's try again — or resolve it manually and let me know when ready." |
130
-
131
- Never expose raw API errors, stack traces, or JSON error payloads to the user.
132
-
133
- ## Gotchas
134
-
135
- | Issue | Resolution |
136
- |---|---|
137
- | `DevopsPipeline` query returns empty | DevOps Center not installed on the target org, or wrong org alias — ask the user to verify |
138
- | `DevopsWorkItem` sObject not supported | Use `WorkItem` (no namespace) — the correct API name for this org version |
139
- | Review trigger is pipeline-level, not stage-level | Query `DevopsPipelineStageTrigger` where `TriggerType = 'Review'` and `RelatedRecordId = <pipelineId>` |
140
- | Connect API `testSuites` returns empty with `?stageId=` | Use `?triggerId=<reviewTriggerId>` — `stageId` only works for stage-level triggers |
141
- | `sf plugins` doesn't match `agentforce` | The installed plugin is `@salesforce/plugin-agent` — match on `plugin-agent` too |
112
+ - **Deferred:** not required until the operation needs it
@@ -1,14 +1,10 @@
1
- ---
2
- name: creating-fix-work-item
3
- description: "Creates a DevOps Center WorkItem to track a fix for a test failure or Code Analyzer violation. Before creating anything, it shows a subject/assignee/project preview and requires explicit confirmation. Use this skill when you want to create a fix work item, track a remediation task, or assign a test or analysis failure to a developer. TRIGGER when: the user wants to create a fix work item, log a remediation, or assign a failure to a developer for resolution. DO NOT TRIGGER when: writing the fix code itself (use platform-apex-generate)."
4
- metadata:
5
- version: "1.0"
6
- minApiVersion: "67.0"
7
- ---
1
+ # Part 3 — Create a Fix Work Item
2
+
3
+ Creates a DevOps Center `WorkItem` to track a fix for a test failure or Code Analyzer violation. This is an **optional write**, triggered only when the user asks to create a fix work item, log a remediation, or assign a failure to a developer.
8
4
 
9
5
  ## Prerequisites
10
6
 
11
- Load `checking-devops-prerequisites` first — Prerequisites 1–4. You need `doce-org-alias`, the `DevopsProjectId` to file under, and an `OwnerId` (assignee). If no DevopsProject exists, surface that the work item cannot be created until a project exists.
7
+ Run Prerequisites 1–4 (`references/prerequisite-checks.md`). You need `doce-org-alias`, a `DevopsProjectId` to file under, and an `OwnerId` (assignee). If no `DevopsProject` exists, surface that the work item cannot be created until a project exists — do NOT fabricate a project or work item.
12
8
 
13
9
  ## Inputs required before creating
14
10
 
@@ -16,7 +12,7 @@ Load `checking-devops-prerequisites` first — Prerequisites 1–4. You need `do
16
12
  |---|---|
17
13
  | `DevopsProjectId` | From the pipeline's associated project — query `DevopsProject WHERE Name = '<projectName>'` on the doce org if not already known |
18
14
  | `Subject` | Derived from failure analysis — e.g. "Fix: Missing code-analyzer-v5.yml workflow in blitz-10-06 repository" |
19
- | `OwnerId` | User ID of the developer to assign to — query `SELECT Id, Name FROM User WHERE Username = '<username>'` on the doce org if not known. Ask the user if the username is unknown. |
15
+ | `OwnerId` | User ID of the developer to assign to — query `SELECT Id, Name FROM User WHERE Username = '<username>'` on the doce org if not known. Default to the requesting user when no assignee is specified; ask only if the username is unknown and no default applies. |
20
16
  | `doce-org-alias` | Established in Prerequisites |
21
17
 
22
18
  ## Confirmation gate
@@ -46,7 +42,7 @@ sf data create record \
46
42
 
47
43
  ## On success
48
44
 
49
- Parse the returned `id` from the result and confirm:
45
+ Parse the returned `id` and confirm:
50
46
 
51
47
  > "Fix work item created (`<id>`): `<subject>`. Assigned to `<assigneeName>` in the `<projectName>` project."
52
48
 
@@ -61,6 +57,6 @@ Never expose raw API error messages. Map errors to plain-language responses:
61
57
  | `INSUFFICIENT_ACCESS` | "Your user doesn't have permission to create work items in this project." |
62
58
  | Any other error | "The work item could not be created. Error: `<plain summary>`. Try again or create it manually in DevOps Center." |
63
59
 
64
- ## Related skills
60
+ ## No-project case
65
61
 
66
- - `analyzing-test-failures` provides the failure analysis and improvement suggestions that motivate creating a fix work item
62
+ If the `DevopsProject` query returns 0 records, report clearly that no DevOps Center project exists and the work item cannot be created until one is set up. Do NOT fabricate a project name/ID, do NOT proceed to the confirmation gate or the create command.