Paths/Copilot Engineer/Prompting the Assistant Well / Context & Instructions
Give the Right Context
The assistant can see the files that are open, not the ones you are thinking about. Write the context rules that close the gap.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- Directory ~/copilot/prompts exists○
- File ~/copilot/prompts/context.md exists○
- The document states what the assistant can already see○
- The document states what you have to name○
02Walkthrough
4 steps- 01
Create the prompts directory
The rules are shared, so they are written once.
mkdir -p ~/copilot/prompts - 02
Write what the assistant can see
The open files, the instructions file, the recent edits. Everything else it has to be told about.
echo '# Giving context\n\n## What the assistant can already see\n\n- the files you have open in the editor\n- the repository instructions file\n- the recent edits and the selection you highlighted' > ~/copilot/prompts/context.md - 03
Write what you have to name
Name the file, the function and the error. And paste the error rather than describing it.
echo '\n## What you have to name\n\n- name the file and the function you mean, by path\n- the behaviour you saw and what you expected instead\n- paste the error output, do not describe it from memory' >> ~/copilot/prompts/context.md - 04
Verify and submit
cat the rules, then submit for validation.
cat ~/copilot/prompts/context.md
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list