@salesforce/afv-skills 1.25.0 → 1.27.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 (32) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/skills/dx-devops-test-failures-analyze/SKILL.md +89 -0
  4. package/skills/dx-devops-test-failures-analyze/references/code-analyzer-violations.md +26 -0
  5. package/skills/dx-devops-test-failures-analyze/references/failure-categories.md +85 -0
  6. package/skills/{checking-devops-prerequisites/SKILL.md → dx-devops-test-failures-analyze/references/prerequisite-checks.md} +8 -37
  7. package/skills/{creating-fix-work-item/SKILL.md → dx-devops-test-failures-analyze/references/work-item-creation.md} +8 -12
  8. package/skills/dx-devops-test-pipeline-configure/SKILL.md +72 -0
  9. package/skills/dx-devops-test-pipeline-configure/references/configuring-quality-gate.md +133 -0
  10. package/skills/dx-devops-test-pipeline-configure/references/configuring-test-provider.md +80 -0
  11. package/skills/dx-devops-test-pipeline-configure/references/error-handling.md +39 -0
  12. package/skills/dx-devops-test-pipeline-configure/references/gotchas.md +37 -0
  13. package/skills/dx-devops-test-pipeline-configure/references/prerequisite-checks.md +112 -0
  14. package/skills/dx-devops-test-pipeline-configure/references/syncing-test-providers.md +69 -0
  15. package/skills/dx-devops-test-suite-assignments-configure/SKILL.md +74 -0
  16. package/skills/dx-devops-test-suite-assignments-configure/references/api-endpoint.md +30 -0
  17. package/skills/dx-devops-test-suite-assignments-configure/references/error-handling.md +14 -0
  18. package/skills/dx-devops-test-suite-assignments-configure/references/prerequisite-checks.md +112 -0
  19. package/skills/{recommending-devops-tests/SKILL.md → dx-devops-test-suite-assignments-configure/references/recommendation-logic.md} +10 -26
  20. package/skills/dx-devops-test-suite-assignments-configure/references/suite-assignment-modes.md +99 -0
  21. package/skills/dx-devops-test-suite-run/SKILL.md +111 -0
  22. package/skills/dx-devops-test-suite-run/references/error-handling.md +31 -0
  23. package/skills/dx-devops-test-suite-run/references/polling-configuration.md +78 -0
  24. package/skills/dx-devops-test-suite-run/references/prerequisite-checks.md +112 -0
  25. package/skills/dx-devops-test-suite-run/references/retrigger-mode.md +51 -0
  26. package/skills/analyzing-test-failures/SKILL.md +0 -159
  27. package/skills/configuring-quality-gate/SKILL.md +0 -120
  28. package/skills/configuring-test-provider/SKILL.md +0 -113
  29. package/skills/managing-suite-assignments/SKILL.md +0 -161
  30. package/skills/polling-test-results/SKILL.md +0 -72
  31. package/skills/running-devops-test-suite/SKILL.md +0 -144
  32. package/skills/syncing-test-providers/SKILL.md +0 -108
@@ -1,108 +0,0 @@
1
- ---
2
- name: syncing-test-providers
3
- description: "Re-syncs a configured DevOps Center test provider on a pipeline to pick up new test suites, via the Connect API sync endpoint, after explicit user confirmation. Takes a pipelineId and one or more testProviderIds and triggers an asynchronous re-sync so newly added suites become available for assignment. Use this skill when a test provider (e.g. Apex Unit Tests, Code Analyzer, Flow Tests, Provar) has had suites added since it was last configured and the user wants those suites to show up in DevOps Center. TRIGGER when: the user wants to re-sync a test provider, pull in new suites from a provider, refresh a provider's suite list, or says assigned suites are missing/out of date for a configured provider. DO NOT TRIGGER when: configuring a provider for the first time (that creates a new DevopsPipelineTestProvider configuration), or assigning/mapping existing suites to a stage (use managing-suite-assignments)."
4
- metadata:
5
- version: "1.0"
6
- minApiVersion: "67.0"
7
- ---
8
-
9
- # Syncing Test Providers
10
-
11
- Re-syncs a configured test provider on a DevOps Center pipeline so that suites added to the provider since it was last configured become available for assignment to stages.
12
-
13
- **Confirmation required:** Yes — explicit confirmation before the sync is triggered.
14
-
15
- ## Prerequisites
16
-
17
- Load `checking-devops-prerequisites` first — Prerequisites 1–4 (org login, Agentforce DX plugin, DevOps Center org auth, pipeline identified). Prerequisite 5 (stage) is **not** required: providers are synced at the pipeline level, not the stage level.
18
-
19
- | Variable | Source |
20
- |---|---|
21
- | `doce-org-alias` | Established in Prerequisite 1 |
22
- | `pipelineId` | Identified in Prerequisite 4 (pipeline selection) |
23
- | `testProviderId` | Resolved by fetching the pipeline's test providers (below) |
24
-
25
- ---
26
-
27
- ## Step 1 — Fetch test providers to resolve the provider ID
28
-
29
- Get all test providers configured on the pipeline so you can resolve the `testProviderId` and confirm the provider name with the user:
30
-
31
- ```bash
32
- sf api request rest \
33
- "/services/data/v67.0/connect/devopstesting/pipeline/<pipelineId>/testProviders?status=all" \
34
- --target-org <doce-org-alias>
35
- ```
36
-
37
- Each provider entry includes `testProviderId`, `testProviderName`, and a status (Configured vs. Available). Present a short summary grouped by status:
38
-
39
- ```text
40
- Test providers for <pipelineName>:
41
-
42
- ✓ Configured:
43
- - Code Analyzer (63 suites)
44
- - Apex Unit Tests (5 suites)
45
-
46
- Available (not yet configured):
47
- - Flow Tests
48
- ```
49
-
50
- - **Only a Configured provider can be synced.** If the user names an *Available* (not-yet-configured) provider, explain it must be configured first — this skill does not configure providers.
51
- - If the pipeline has no configured providers, report that and stop — do NOT fabricate a provider or ID.
52
-
53
- ## Step 2 — Confirmation gate
54
-
55
- **Required — do not call the API before the user confirms.**
56
-
57
- > "I'll re-sync `<testProviderName>` on the `<pipelineName>` pipeline to pick up any new suites. Confirm?"
58
-
59
- Do not proceed until the user gives an affirmative response.
60
-
61
- ## Step 3 — Trigger the sync
62
-
63
- On confirmation, call the sync endpoint with the provider ID(s) and pipeline ID:
64
-
65
- ```bash
66
- sf api request rest \
67
- "/services/data/v67.0/connect/devops/sync" \
68
- --method POST \
69
- --body '{
70
- "testProviderIds": ["<testProviderId>"],
71
- "pipelineId": "<pipelineId>"
72
- }' \
73
- --target-org <doce-org-alias>
74
- ```
75
-
76
- `testProviderIds` is a list — multiple configured providers can be synced in one call.
77
-
78
- ## On success
79
-
80
- > "Provider `<testProviderName>` sync started. The operation is running asynchronously — new suites will be available shortly."
81
-
82
- The sync runs asynchronously; newly synced suites can then be assigned to stages with `managing-suite-assignments`.
83
-
84
- ---
85
-
86
- ## Critical gotcha
87
-
88
- **Do NOT use** `POST /connect/devops/pipeline/<pipelineId>/testProvider` to sync — that endpoint **creates a new provider configuration** and will result in duplicate `DevopsPipelineTestProvider` records. Sync only via `POST /connect/devops/sync`.
89
-
90
- ## Error Handling
91
-
92
- Never expose raw API error messages, stack traces, or JSON payloads to the user. Map response status codes to plain-language messages:
93
-
94
- | Status | User-facing message |
95
- |---|---|
96
- | 400 | "The sync request was invalid. Check that the provider ID and pipeline ID are correct." |
97
- | 403 | "You don't have permission to sync test providers on this pipeline." |
98
- | 404 | "The pipeline or test provider was not found." |
99
- | 500 | "A server error occurred. Try again in a few minutes." |
100
-
101
- ---
102
-
103
- ## Related skills
104
-
105
- - **`checking-devops-prerequisites`** — loaded first to establish org and pipeline context.
106
- - **`configuring-test-provider`** — use to configure an available provider for the first time; this skill only re-syncs already-configured providers.
107
- - **`managing-suite-assignments`** — after a sync surfaces new suites, use this to assign or map them to a pipeline stage.
108
- - **`recommending-devops-tests`** — to recommend which of the newly synced suites to run.