Skip to content

copilot instructions

Jesper Nielsen edited this page May 19, 2026 · 1 revision

Copilot Instructions - Hello World wiki

These instructions guide GitHub Copilot when working with wiki pages in this project. The guidelines are designed to be generic and reusable across project wikis.

File standards

All files in this wiki must follow these standards:

  • Encoding: UTF-8 for all files
  • Line endings: LF (\n) - never CRLF (configured in .vscode/settings.json and .editorconfig)
  • Final newline: Always insert a final newline at end of file
  • Trailing whitespace: Trim trailing whitespace (except in Markdown files where trailing spaces may be intentional)

Project structure

The wiki repository follows this structure:

 📂 hello-world.wiki/
  └─ 📁 .assets/                      # Images and media used in wiki pages
     📂 .github/
      ├─ 📁 instructions/             # GitHub Copilot custom instructions
      └─ 📄 copilot-instructions.md   # GitHub Copilot custom instructions
     📂 .vscode/
      └─ 📄 settings.json             # Workspace settings
     📄 .editorconfig                 # Editor configuration
     📄 .gitattributes                # Git attributes (line endings)
     📄 .gitignore                    # Git ignore rules
     📄 Home.md                       # Wiki home page - overview and navigation
     📄 *.md                          # Wiki pages (Markdown)

Wiki page conventions

Wiki pages follow these conventions:

  • All wiki pages are Markdown files (.md) in the repository root
  • The Home.md file serves as the wiki landing page and main navigation
  • Page filenames use PascalCase (e.g., GettingStarted.md, ProjectNotes.md)
  • GitHub Wiki uses the filename as the page title (rendered as the H1 heading) - do not add a # heading in the page content
  • GitHub Wiki converts filenames to page titles, replacing hyphens with spaces
  • Start each page with a brief introductory sentence or paragraph, then use ## for sections and ### for subsections
  • Each page should end with a revision date: *Page revised: Month Day, Year*
  • Cross-link between wiki pages using relative links: [Page Title](./PageName)
  • Link to repository files using full GitHub URLs

Adding new wiki pages

When creating a new wiki page, follow these steps:

  1. Create the Markdown file in the repository root with a PascalCase filename
  2. Start the page with a brief introductory sentence or paragraph (the filename provides the page title)
  3. Add content using ## for sections, following the writing style guidelines below
  4. End the page with a horizontal rule and revision date
  5. Update the wiki pages table in Home.md to include the new page

Writing style

Consistency is more important than strict rules - follow these guidelines to keep pages clear and professional.

Tone and voice

  • Professional but approachable tone
  • Use "I" for personal perspective
  • Prefer active voice over passive voice
  • Avoid jargon unless necessary; explain technical terms when used

Headings

  • Use ## for sections and ### for subsections (the filename provides the page title as the H1 heading)
  • Keep headings short and descriptive
  • Use sentence case (capitalize only the first word and proper nouns), not title case
  • The first sentence after a heading must restate or incorporate the heading's topic so the paragraph makes sense on its own. Readers often skip headings, so never open with a pronoun or phrase that only has meaning if the heading was read. For example, instead of writing "This is something I keep coming back to" after a heading like "Blog first or LinkedIn first?", write "Blog first or LinkedIn first is a question I keep coming back to."

Bullet points

  • When a heading is followed directly by a bullet list, always include a short introductory sentence before the list. The sentence should restate the topic and set context so the list makes sense on its own.
  • The same applies to code blocks, tables, and other structured content - never place them immediately after a heading without an introductory sentence.
  • Use no punctuation if the bullet is a short phrase or fragment
    • Example:
      • Fast performance
      • Easy setup
  • Use a period if the bullet is a full sentence
    • Example:
      • The system automatically updates every 24 hours.
      • Readers can subscribe to receive notifications.
  • Never mix styles within the same list

Formatting

General formatting rules for wiki content:

  • Use " - " (space-hyphen-space) for dashes, not em-dashes or other variants
  • Use bold for emphasis, not italics (except for hook questions in post openings)
  • Use tables for structured comparisons
  • Limit blockquotes; prefer concise summaries
  • Add practical step-by-step instructions with numbered lists
  • Reference Microsoft Learn documentation with full URLs and titles, ensure to remove /en-us/ from links when possible for localization friendliness
  • Update older docs.microsoft.com URLs to the current learn.microsoft.com domain when encountered

Code and commands

Inline code and code blocks follow these conventions:

  • Wrap inline code in backticks: command
  • Use fenced code blocks for multi-line examples with the appropriate language identifier for syntax highlighting
  • Add a brief descriptive line before code blocks to provide context

Example - get processes with CPU usage greater than 100:

Get-Process | Where-Object { $_.CPU -gt 100 }

PowerShell code examples

PowerShell examples must include header comments with a description and elevation requirement:

# Description: Brief explanation of what the script does
# Elevation is required / is not required - Reason why this level is required

Example:

# Description: Retrieves the device serial number from WMI
# Elevation is not required - WMI query does not require elevated privileges

Get-CimInstance -ClassName Win32_BIOS | Select-Object -ExpandProperty SerialNumber

Folder structures

Folder structures use a text code block with tree-style formatting and emoji icons:

 📂 .github/
  └─ 📄 copilot-instructions.md   # GitHub Copilot custom instructions
 📂 .vscode/
  ├─ 📄 extensions.json           # Recommended Visual Studio Code extensions
  ├─ 📄 settings.json             # Workspace settings
  └─ 📄 tasks.json                # Task definitions
 📂 src/
  └─ 📁 Scripts/                  # PowerShell scripts
 📁 tests/                        # Test files
 📄 readme.md                     # Project README file

Terminology

Consistent terminology must be used across all wiki pages:

  • Use "PowerShell" (not "PS", "PoSH", or "Powershell")
  • Use "Microsoft 365" (not "M365")
  • Use "Microsoft Edge" (not "Edge" alone)
  • Use "Microsoft Intune" (not "Intune" alone)
  • Use "Microsoft Teams" (not "Teams" alone)
  • Use "Windows Autopatch" (not "Autopatch" alone)
  • Use "Windows Autopilot" (not "Autopilot" alone)
  • Use "Windows Autopilot device preparation" (not "Autopilot device preparation" or "device preparation" alone)
  • Use "Windows Sandbox" (not "Sandbox" alone)
  • Use "Visual Studio Code" (not "VS Code")
  • Use "Windows 365" (not "W365")
  • Use "Vibe Coding" (not "vibe coding" or "Vibe coding")
  • Use Microsoft Copilot product names in full on first reference (e.g., "GitHub Copilot", "Microsoft Copilot for Word")

Home

Part 1 Getting Started

This first part of the guide focuses on getting started with GitHub, Git, and Visual Studio Code. It covers the reasons for using these tools, what you need before you start, how to install and set up Visual Studio Code and Git, configuring Git, and useful references for further learning.

Introduction

Why GitHub, Git and Visual Studio Code

What you need before you start

Installing Visual Studio Code and Git

Setting up Visual Studio Code

Configuring Git

Useful references

Part 2 Creating a Repository

Part 2 focuses on creating a repository, including how to create a GitHub repository, initializing Git in a standalone folder, and useful references for further learning.

Creating a GitHub repository

Initializing Git in a standalone folder

Useful references

Part 3 Repository Essentials

Part 3 covers the essentials of working with repositories, including learning Markdown, common repository files, community health files, writing good commit messages, common scenarios for IT professionals, and useful references for further learning.

Learning Markdown

Common repository files

Community health files

Writing good commit messages

Common scenarios for IT professionals

Useful references

Part 4 Branching and Workflows

Part 4 delves into branching and workflows in Git. It covers the basics of Git branches, how to clone a repository, using multi-root workspaces in Visual Studio Code, working with branches, and the daily Git workflow. It also includes useful references for further learning.

Cloning a repository

Using multi-root workspaces

Working with branches

The daily Git workflow

Useful references

Part 5 Working With Repositories

Part 5 focuses on working with repositories, including understanding GitHub URLs, downloading files from GitHub using PowerShell, referencing files in a repository, and the differences between public and private repositories. It also includes sample scripts, an alternative using GitHub Gist, and useful references for further learning.

Understanding GitHub URLs

Downloading files from GitHub using PowerShell

Referencing files in a repository

Public vs. private repositories

Sample scripts

GitHub Gist as an alternative

Useful references

Part 6 AI as a Learning Companion

Part 6 explores how to use AI, specifically GitHub Copilot, as a learning companion to enhance your coding experience. It covers the basics of Vibe Coding, how to get started with GitHub Copilot, and practical tips for writing effective prompts and validating AI-generated code. It also includes guidelines for using AI-assisted coding and references for further learning.

What is Vibe Coding?

Getting started with GitHub Copilot

Your first Copilot conversation

Writing effective prompts

Generating and understanding a script

Learning a new concept through AI

Validating AI-generated code

Using logs and AI to troubleshoot and optimize

Guidelines for AI-assisted coding

Useful references

Part 7 Copilot Configuration

Part 7 focuses on configuring GitHub Copilot to enhance your coding experience. It covers how to create and use copilot-instructions.md files to provide context and guidance to Copilot, as well as best practices for sharing instructions across repositories.

Adding copilot-instructions.md to your repository

Sharing instructions across repositories

Useful references

Part 8 Field Notes

Part 8 is a collection of field notes, which are practical insights and tips that I've gathered through my experience working with GitHub, Git, Visual Studio Code, and GitHub Copilot. These notes are meant to provide additional context and guidance on specific topics that may not have been covered in depth in the previous parts.

Extension recommendations in multi-root workspaces

Copilot instructions and the GitHub Wiki sidebar

GitHub Wiki does not support branch switching

Launching Windows Sandbox from Visual Studio Code

Mirroring wiki pages into the main repository

Useful references

Part 9 Exercises

This is the exercises section! This is where you can apply what you've learned in the previous parts through practical exercises. Each exercise is designed to reinforce key concepts and skills related to GitHub, Git, and Visual Studio Code.

Prerequisites

Part 1 - Getting started

Part 2 - Creating a repository

Part 3 - Repository essentials

Part 4 - Branching and workflows

Part 5 - Working with repositories

Part 6 - AI as a learning companion

Part 7 - Copilot configuration

What to do next

Useful references

Revision

Clone this wiki locally