Verified against GitHub Copilot Chat · 2026-07-27
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, separating the source of truth from its consumers, 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, and I want a map of everywhere it actually lives in this codebase before I touch anything — answer using what you can actually find in this workspace, not general knowledge of how a feature like this is usually structured. QUESTION 1 — WHERE IS IT Every file that reads, writes, or otherwise depends on how a user's subscription tier is determined for feature gating, and for each one the specific function, component, or export involved — not just the filename. QUESTION 2 — WHICH ONE IS THE SOURCE OF TRUTH Of the files from question 1, which one actually owns this behavior versus which ones are consumers that would break if the source of truth's shape changed underneath them. QUESTION 3 — IS IT DUPLICATED Any place this same logic exists a second time instead of being called from the source of truth, even a partial duplicate that only handles a subset of the real cases. QUESTION 4 — GIVEN WHAT I ACTUALLY PLAN TO DO I intend to add a new 'trial' tier between free and paid that expires after 14 days. Of the files from question 1, which specifically need a matching change for that intent to hold, and which do not — and for each file you say does not need a change, state briefly why it is safe as-is, not just that it was not obviously affected. RULES FOR THIS ANSWER - Do not propose the change itself yet. Answer only the four questions above. - If a file plausibly should exist given how a feature like this is usually built, but you have not actually located it in this workspace, say 'not found in this workspace' rather than describing it as if you had found it — an inferred file that sounds right is worse than an honest gap, because it sends me looking in the wrong place with false confidence. - Limit the search to lib/billing/ and lib/api/middleware/ — this has never lived in components/. - If two files from question 1 appear to handle the same case differently, name the discrepancy explicitly under question 3 rather than only under whichever question you answer first — a reader working through this answer top to bottom should not have to notice the same fact was quietly relevant to two different questions. This is a pre-refactor audit — err toward over-inclusion rather than a quick best-guess list. IF THIS BEHAVIOR HAS COME UP BEFORE IN THIS CONVERSATION If an earlier turn in this same chat already touched on where how a user's subscription tier is determined for feature gating lives, re-verify against the current state of the workspace rather than repeating what was said earlier without checking — a file can have moved or been refactored since that earlier turn, and an answer here that is just a restatement of an earlier answer defeats the reason to ask again before making a change.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
@workspace is the Copilot Chat participant specifically scoped to search and reason across the whole current workspace rather than only the open file or the current selection — it is the actual mechanism that makes a genuinely cross-file question answerable inside Copilot Chat's normal context window at all, since without it the model is limited to whatever files happen to be open or explicitly attached. A bare where is X handled question, asked without structure, tends to return whichever file @workspace's retrieval finds most semantically central to the topic rather than an exhaustive list, because nothing in a loose question tells it that exhaustiveness, not a single good answer, is actually the goal — asking explicitly for every file plus the specific export forces coverage over a representative example. Separating the source of truth from a downstream consumer matters because the real risk in a cross-cutting change is almost never the file being edited directly — it is the consumer depending on the old shape that nobody remembers still exists, which is precisely the question a change-impact review exists to surface before the edit happens rather than after a consumer silently breaks. The instruction to answer not found in this workspace rather than infer a plausible file targets @workspace's specific failure mode under thin or ambiguous retrieval: producing a confident-sounding file reference that matches the pattern of what a codebase like this one would typically have, rather than what this codebase actually contains, which is a much harder error to catch than an honest gap because it reads exactly like a real answer until someone goes looking for the file and cannot find it. Re-verifying against the current workspace state rather than an earlier turn in the same conversation matters for a reason specific to longer chat sessions — @workspace's retrieval runs fresh each time it is invoked, but the model's own sense of already answered this can lead it to lean on a prior answer's phrasing instead of re-running the search, and a refactor that happened between that earlier turn and this one is exactly the kind of change a stale restatement would miss silently.
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; the other two are consumers. 3. app/api/reports/export/route.ts has a near-duplicate tier check inline instead of calling getUserTier() — flagged as duplication. 4. Adding a trial tier requires changes to lib/billing/tier.ts and require-tier.ts; FeatureGate.tsx needs no change since it only checks tier !== 'free'.
Verified against
GitHub Copilot Chat Copilot Chat 1.270 (VS Code, @workspace) · 2026-07-27
Changelog
- 2026-07-27 — Initial publish, verified against Copilot Chat 1.270 (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
