$npx -y skills add forcedotcom/sf-skills --skill dx-devops-test-suite-assignments-configureRecommends and manages DevOps Center test suite assignments for pipeline stages. Mode A analyzes a commit diff against assigned suite metadata to recommend relevant existing suites and flag coverage gaps (pure reasoning). Modes B-D assign a single suite, bulk-map multiple suites
| 1 | # Configure DevOps Center Suite Assignments |
| 2 | |
| 3 | Recommends which existing test suites to run for a change, and manages how suites are assigned and mapped to pipeline stages. These operations share the same suite-stage metadata: a recommendation surfaces relevant suites and flags gaps, and those gaps lead directly into assignment. |
| 4 | |
| 5 | > **API version:** All DevOps testing system calls target Salesforce API **v67.0** (minimum required). |
| 6 | |
| 7 | **Important:** All DevOps Center data lives in the Salesforce org — NOT the local repo. Never search the filesystem for suite configuration. Always query the org with `sf data query` or `sf api request rest`. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Step 1 — Run prerequisites first (always) |
| 12 | |
| 13 | Run the prerequisite checks in `references/prerequisite-checks.md` before any query or system call. On any failure, surface the plain-language message and stop. |
| 14 | |
| 15 | - **Mode A (recommend):** Prerequisites 1–4 (org login, plugin, DevOps Center org auth, pipeline identified). No stage required — recommendation reads the pipeline-level Review trigger. |
| 16 | - **Modes B–D (assign/map/classes):** Prerequisites 1–4 **and** Prerequisite 5 (stage). You need `doce-org-alias`, `pipelineId`, and `stageId`. |
| 17 | |
| 18 | --- |
| 19 | |
| 20 | ## Step 2 — Select the mode |
| 21 | |
| 22 | | If the user wants to… | Mode | Follow | |
| 23 | |---|---|---| |
| 24 | | Know **which suites to run** for a commit/diff, or what covers their changes | **A — Recommend suites** | `references/recommendation-logic.md` | |
| 25 | | Assign **one** suite to a stage as a one-off | **B — Assign a single suite** | `references/suite-assignment-modes.md` | |
| 26 | | **Bulk-map** multiple suites to a stage as a testing strategy | **C — Map multiple suites** | `references/suite-assignment-modes.md` | |
| 27 | | **Add/remove** individual test classes within a suite assignment | **D — Add/remove classes** | `references/suite-assignment-modes.md` | |
| 28 | |
| 29 | Mode A is pure reasoning (no writes). Modes B–D mutate org state via the same `testSuiteStages` endpoint (`references/api-endpoint.md`). |
| 30 | |
| 31 | **How A feeds B–D:** When recommendation flags a relevant suite that is *not assigned* to the stage, that gap is the input to Mode B/C. When it flags a *new method with no suite coverage*, direct the developer to author tests manually (v1 constraint — never suggest generating tests here). |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Step 3 — Governance & confirmation (Modes B–D) |
| 36 | |
| 37 | Modes B–D **must** confirm before any write: |
| 38 | |
| 39 | - **Mode B** — single confirmation prompt naming the suite, stage, and event. |
| 40 | - **Mode C** — a **mandatory impact-preview table** (Suite / Stage / Event / Action) before the confirmation gate. |
| 41 | - **Mode D** — re-present the final test list before confirming. **Rejected tests must be EXCLUDED from the payload.** If tests were modified during review, re-present the final list before requesting confirmation. Never call without explicit approval. |
| 42 | |
| 43 | Do not call the API until the user gives an affirmative response. If the user declines, stop without writing. Full wording for each gate is in `references/suite-assignment-modes.md`. |
| 44 | |
| 45 | Mode A (recommendation) makes no writes and needs no confirmation gate. |
| 46 | |
| 47 | --- |
| 48 | |
| 49 | ## Step 4 — Execute and report |
| 50 | |
| 51 | Follow the chosen reference file: |
| 52 | |
| 53 | - `references/recommendation-logic.md` — Mode A: diff classification, provider matching, ranking, gap flagging, output format. |
| 54 | - `references/suite-assignment-modes.md` — Modes B–D: inputs, confirmation wording, success messages. |
| 55 | - `references/api-endpoint.md` — the shared `testSuiteStages` POST payload schema (Modes B–D). |
| 56 | - `references/error-handling.md` — status-code → plain-language tables. |
| 57 | |
| 58 | Never expose raw API errors, stack traces, or JSON to the user. |
| 59 | |
| 60 | --- |
| 61 | |
| 62 | ## Related skills |
| 63 | |
| 64 | - **`dx-devops-test-pipeline-configure`** — if the suite you want to assign doesn't appear yet, configure or re-sync the provider; also configures quality gates on a stage after mapping. |
| 65 | - **`dx-devops-test-suite-run`** — execute a recomme |