A repository contains billing, mobile, and infrastructure code. The team wants general build guidance available across the repository, but payment-card guidance should apply only when Copilot works on PCI-related billing files. Evaluate the following statements. 1. The applyTo field scopes the PCI guidance to matching files. 2. Moving PCI guidance into copilot-instructions.md would make it narrower. 3. Content exclusion is a separate control for files Copilot should not use as context.
# .github/copilot-instructions.md
- Use pnpm for package management.
- Run pnpm test before proposing a pull request.
- Keep pull requests focused and small.
---
applyTo: "packages/billing/pci/**"
---
# .github/instructions/pci-billing.instructions.md
- Use packages/billing/pci/test-fixtures for card-token tests.
- Validate changes against packages/billing/pci/docs/tokenization.md.
- Do not apply these rules to mobile analytics code.Choose an answer
Tap an option to check your answer.
Correct answer: 1=Yes 2=No 3=Yes.
Why this is the answer
Statement 1 is correct. The applyTo field in the .github/copilot-instructions.md file explicitly scopes the subsequent instructions to files within the packages/billing/pci/ directory and its subdirectories. This ensures the PCI-related guidance is only applied when Copilot is working on those specific files. Statement 2 is incorrect. Moving the PCI guidance into the top-level copilot-instructions.md without an applyTo field would make it broader, not narrower. It would then apply to all files in the repository, which is contrary to the requirement of applying it only to PCI-related billing files. Statement 3 is correct. Content exclusion, typically configured via .copilotignore or similar mechanisms, is a distinct control that prevents Copilot from using specified files or directories as context at all. This is separate from applyTo, which scopes instructions to specific files Copilot is working on.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed