How do I give Copilot project instructions so it stops guessing my stack
I maintain a handful of client sites. Plain PHP 8.3 with PDO, no framework, MariaDB, and vanilla JavaScript on the front end. Copilot Chat in VS Code keeps answering as if every project were Laravel or React. Today it gave me an Eloquent model when I asked for a query, and yesterday a JSX component for a simple form.
Cite
CoursesWeb Forum, "How do I give Copilot project instructions so it stops guessing my stack", https://coursesweb.net/forum/t/how-do-i-give-copilot-project-instructions-so-it-stops-guessing/, accessed 2026-11-27.I end up typing the same paragraph into every chat: "No framework, use PDO with prepared statements, escape output with htmlspecialchars, no jQuery". That is tiring and I forget half of it.
Is there a file I can put in the repository so Copilot reads the rules every time? I saw people mention a markdown file in a .github folder, but I am not sure of the name, whether it works in VS Code or only on github.com, and whether the client can see it if I share the repo with them.
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.