Paths/Copilot Engineer/Customising the Assistant / Instruction Files
Write the Instruction File
The instruction file is read before every suggestion, so it should hold the few things that are always true. Write yours.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- File ~/copilot/custom/instructions.md exists○
- The document states the conventions to encode○
- The document states the commands to encode○
- The document states the rules the assistant must never break○
02Walkthrough
4 steps- 01
Create the custom directory
The instruction material lives in one folder.
mkdir -p ~/copilot/custom - 02
Write the conventions and the commands
The conventions the repository already follows, and the three commands that build, test and lint it.
echo '# Instruction file\n\n## Conventions\n\n- TypeScript strict mode, no any\n- named exports only\n- one component per file, one behaviour per test\n\n## Commands\n\n- build: pnpm build\n- test: pnpm test\n- lint: pnpm lint' > ~/copilot/custom/instructions.md - 03
Write the prohibitions and the length rule
Say what is never allowed, and keep the file short. A long instruction file is read less carefully than a short one.
echo '\n## Never\n\n- never add a dependency that is not already in the manifest\n- never edit generated code\n- never widen the scope of a task\n\n## Length\n\nKeep it short - under a page. A file that is too long gets skimmed, and a rule that gets skimmed is not a rule.' >> ~/copilot/custom/instructions.md - 04
Verify and submit
cat the document, then submit for validation.
cat ~/copilot/custom/instructions.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