Carlos is a technical PM triaging a legacy billing module in Copilot Chat. He needs a plain-language explanation of a complex function, then auto-generated unit tests for its edge cases, without changing files yet. Which slash commands should Carlos use to get an explanation and draft tests?
Select an answer to reveal the explanation.
Short Explanation
You need understanding first, then test coverage. /explain then /tests gives you a clear summary plus draft edge-case tests in order.
Full Explanation
The correct workflow pairs /explain with /tests because /explain produces a plain-language summary of the selected function without editing files, which fits triaging an unfamiliar legacy billing module, and /tests then uses that context to draft unit tests covering edge cases as chat output for review rather than writing to disk. The pairing of /explain with /doc is a sound documentation workflow but fails by concept because /doc generates structured documentation comments for the function instead of executable test cases, so the edge-case test requirement remains unmet despite satisfying explanation and no-change constraints. The pairing of /doc with /tests is also common for documented test development but fails by concept because formal documentation is not equivalent to a plain-language explanation for triage, so the initial comprehension need is missed even though draft tests are produced without file changes. The workflow that explains and then creates and saves test files directly fails by concept because immediate saving conflicts with the explicit without changing files yet constraint, moving from chat drafting to workspace application that Carlos wanted to defer. An exam caveat is that Copilot Chat slash commands are scoped to chat preview while agent or apply flows mutate files, so wording about draft versus save is decisive. A practical check is to run the sequence in Copilot Chat with the billing function selected, confirm both outputs appear as chat responses with no pending diffs, and only accept tests after reviewing the explanation.