Make repo-root Copilot instructions context-aware#147
Conversation
amilandi
left a comment
There was a problem hiding this comment.
Reviewed. Big picture this is the right change — the previous "respond with ONLY the redirect to ANYTHING the user says" rule made the repo root unusable for normal monorepo work (PR reviews, README edits, code search), and the carve-outs here are sensible. One real issue and a couple of optional nits below.
Must-fix: slash-command list is missing three real commands
The kit ships 11 user-facing prompts in solutions/ess-maker-skills/.github/prompts/; the PR enumerates only 8. Missing from the trigger list:
/menu— "Type Enter to see what you can do"/push— "Type Enter to push local changes to your Copilot Studio agent"/troubleshoot— "Type Enter to diagnose connectivity or auth errors with your ESS agent"
All three have user-facing description frontmatter and explicit setup-gate guards at the top of their prompt files, confirming they're real entry points users will type. Without them in the list, a user who types /troubleshoot at the repo root won't trigger the redirect — a regression vs. the previous catch-all. One-line fix.
Nits (optional)
-
Move the "don't load
solutions/ess-maker-skills/.github/copilot-instructions.mdfrom here" warning out of the redirect block. It currently sits inside "When firing the redirect, do not also try to execute..." (the last paragraph), but that cross-loading misfire happens regardless of whether the redirect fires — Copilot can pick up the kit instructions during normal coding work at the repo root too. (It happened to me in the turn where I reviewed this PR: I was asked to review the diff, and the system loaded the kit's setup-gate instructions fromsolutions/ess-maker-skills/.github/copilot-instructions.mdinto my context with no slash-command in sight.) That hardening should be a top-level rule, not a sub-bullet of the redirect path. -
Line 5 narrowing:
solutions/→solutions/ess-maker-skills/bakes in the "only one solution ever" assumption. Accurate today; becomes incorrect the day a second solution folder lands. Suggest keeping the path generic (under solutions/) and mentioningess-maker-skills/as the current canonical one.
CI is green (Lint Python ✅, CodeQL ✅, CLA ✅) and the PR is mergeable. Happy to approve once the three missing slash-commands are in the list — the nits above are non-blocking.
Summary
Reworks
.github/copilot-instructions.mdso Copilot at the repo root acts as a normal coding assistant by default, and only shows the "wrong folder" redirect when the user is actually trying to invoke the ESS Maker Kit.Previously, Copilot was told to respond with the redirect to any input — including "hello", "what is this repo?", or unrelated questions — making the repo-root workspace unusable for normal monorepo work.
What changed
/setup,/create,/connect,/delete,/evaluate,/scan,/update,/flightcheck) or unambiguously asks to run the kit in natural language./flightcheckdo?" → answer from docs, don't redirect).solutions/ess-maker-skills/.github/copilot-instructions.mdfrom the repo root.Files
.github/copilot-instructions.md(+31 / −6)