Skip to content

Make repo-root Copilot instructions context-aware#147

Merged
apurvabanka merged 4 commits into
mainfrom
fix/root-repo-instruction
Jun 16, 2026
Merged

Make repo-root Copilot instructions context-aware#147
apurvabanka merged 4 commits into
mainfrom
fix/root-repo-instruction

Conversation

@apurvabanka

Copy link
Copy Markdown
Contributor

Summary

Reworks .github/copilot-instructions.md so 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

  • Default is now "act normally" for general questions, README lookups, and code edits at the repo root.
  • Redirect only fires when the user types a kit slash-command (/setup, /create, /connect, /delete, /evaluate, /scan, /update, /flightcheck) or unambiguously asks to run the kit in natural language.
  • Doc questions are carved out ("what does /flightcheck do?" → answer from docs, don't redirect).
  • Hardened against cross-workspace loading of solutions/ess-maker-skills/.github/copilot-instructions.md from the repo root.

Files

  • .github/copilot-instructions.md (+31 / −6)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@amilandi amilandi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

  1. Move the "don't load solutions/ess-maker-skills/.github/copilot-instructions.md from 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 from solutions/ess-maker-skills/.github/copilot-instructions.md into my context with no slash-command in sight.) That hardening should be a top-level rule, not a sub-bullet of the redirect path.

  2. 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 mentioning ess-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.

@apurvabanka apurvabanka requested a review from amilandi June 12, 2026 18:26
@apurvabanka apurvabanka merged commit 2f8d3f4 into main Jun 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants