Verified against GitHub Copilot Chat · 2026-07-12
Ask @workspace where something is actually handled before you change it
An @workspace chat prompt that maps every file touching a piece of behavior across the whole repo before you edit it, instead of trusting whatever file happens to be open.
The prompt
Ready to copy — highlighted parts are example details you can swap.
@workspace I am about to change how a user's subscription tier is determined for feature gating. Before I touch anything, answer these using the actual codebase, not general knowledge of how this kind of feature is usually built: 1. Every file that reads, writes, or depends on how a user's subscription tier is determined for feature gating, with the specific function or export in each. 2. Which of those is the source of truth versus a consumer that would break if the source of truth's shape changed. 3. Any place this logic is duplicated instead of shared, even partially. 4. Given that I intend to add a new "trial" tier between free and paid that expires after 14 days, which files from question 1 would need a matching change, and which would not. Do not propose the change yet. Answer only what is asked, and say 'not found in this workspace' rather than inferring a file that plausibly should exist but that you have not actually located.
Customize the highlighted detailsoptional — the prompt above already works
Why this works
@workspace is the Copilot Chat participant scoped specifically to search and reason across the current workspace rather than only the open file or the current selection — it is the mechanism that makes a genuinely cross-file question answerable at all inside Copilot Chat's normal editor-context window. A bare where is X handled without structure tends to return the file the model finds most semantically central rather than an exhaustive list, because nothing tells it exhaustiveness is the goal over a single good-enough answer; asking for every file plus the specific export forces coverage instead of a representative example. Separating source of truth from downstream consumer matters because the real risk in a cross-cutting change is rarely the file you are editing — it is the file depending on the old shape that nobody remembers to update, which is the exact question a change-impact review exists to answer. The instruction to say not found rather than infer a plausible file directly targets @workspace's failure mode under thin retrieval: producing a confident-sounding file reference that matches the pattern of what should exist in a codebase like this one, rather than what this codebase actually has.
What you get back
1. lib/billing/tier.ts exports getUserTier() (source of truth); components/paywall/FeatureGate.tsx and lib/api/middleware/require-tier.ts both call it. 2. getUserTier() is the source of truth; FeatureGate.tsx and require-tier.ts are consumers. 3. A near-duplicate tier check exists inline in app/api/reports/export/route.ts instead of calling getUserTier() — flagging as duplication. 4. Adding a trial tier requires changes to lib/billing/tier.ts (new enum value) and require-tier.ts (expiry check); FeatureGate.tsx needs no change since it only checks tier !== 'free', not a specific value.
Verified against
GitHub Copilot Chat Copilot Chat 1.260 (VS Code, @workspace) · 2026-07-12
Changelog
- 2026-07-12 — Initial publish, verified against Copilot Chat 1.260 (VS Code) with @workspace.
Need this built into your business?
If a prompt isn't enough — custom software, built and maintained for you — that's Scult's day job.
EXPLORE CUSTOM SOFTWARE

