microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
.github/instructions/README.md
149lines · modecode
| 1 | --- |
| 2 | title: GitHub Copilot Instructions |
| 3 | description: Repository-specific coding guidelines and conventions for GitHub Copilot |
| 4 | author: HVE Core Team |
| 5 | ms.date: 2026-01-17 |
| 6 | ms.topic: reference |
| 7 | keywords: |
| 8 | - copilot |
| 9 | - instructions |
| 10 | - coding standards |
| 11 | - guidelines |
| 12 | estimated_reading_time: 5 |
| 13 | --- |
| 14 | |
| 15 | ## GitHub Copilot Instructions |
| 16 | |
| 17 | Repository-specific guidelines that GitHub Copilot automatically applies when |
| 18 | editing files. Instructions ensure consistent code style and conventions across |
| 19 | the codebase. |
| 20 | |
| 21 | ## How Instructions Work |
| 22 | |
| 23 | 1. Instruction files declare which file patterns they apply to using `applyTo` |
| 24 | in frontmatter |
| 25 | 2. GitHub Copilot reads instructions when editing matching files |
| 26 | 3. Suggestions follow the documented standards automatically |
| 27 | |
| 28 | Custom agents and the `prompt-builder` agent respect these instructions and can create new ones. |
| 29 | See [Contributing Instructions](../../docs/contributing/instructions.md) for authoring guidance. |
| 30 | |
| 31 | ## Available Instructions |
| 32 | |
| 33 | ### Language and Technology |
| 34 | |
| 35 | | File | Applies To | Purpose | |
| 36 | |--------------------------------------------------------------------------------------------|----------------------------------------------|------------------------------------------| |
| 37 | | [coding-standards/bash/bash.instructions.md](coding-standards/bash/bash.instructions.md) | `**/*.sh` | Bash script implementation standards | |
| 38 | | [coding-standards/bicep/bicep.instructions.md](coding-standards/bicep/bicep.instructions.md) | `**/bicep/**` | Bicep infrastructure as code patterns | |
| 39 | | [coding-standards/csharp/csharp.instructions.md](coding-standards/csharp/csharp.instructions.md) | `**/*.cs` | C# implementation and coding conventions | |
| 40 | | [coding-standards/csharp/csharp-tests.instructions.md](coding-standards/csharp/csharp-tests.instructions.md) | `**/*.cs` | C# test code standards | |
| 41 | | [coding-standards/python-script.instructions.md](coding-standards/python-script.instructions.md) | `**/*.py` | Python scripting implementation | |
| 42 | | [coding-standards/terraform/terraform.instructions.md](coding-standards/terraform/terraform.instructions.md) | `**/*.tf, **/*.tfvars, **/terraform/**` | Terraform infrastructure as code | |
| 43 | | [coding-standards/uv-projects.instructions.md](coding-standards/uv-projects.instructions.md) | `**/*.py, **/*.ipynb` | Python virtual environments using uv | |
| 44 | |
| 45 | ### Documentation and Content |
| 46 | |
| 47 | | File | Applies To | Purpose | |
| 48 | |-------------------------------------------------------------------------------|---------------------------------------------------------------|----------------------------------------| |
| 49 | | [hve-core/markdown.instructions.md](hve-core/markdown.instructions.md) | `**/*.md` | Markdown formatting standards | |
| 50 | | [hve-core/writing-style.instructions.md](hve-core/writing-style.instructions.md) | `**/*.md` | Voice, tone, and language conventions | |
| 51 | | [hve-core/prompt-builder.instructions.md](hve-core/prompt-builder.instructions.md) | `**/*.prompt.md, **/*.agent.md, **/*.instructions.md` | Prompt engineering artifact authoring | |
| 52 | |
| 53 | ### Git and Workflow |
| 54 | |
| 55 | | File | Applies To | Purpose | |
| 56 | |---------------------------------------------------------------------------|----------------------------------|---------------------------------------| |
| 57 | | [hve-core/commit-message.instructions.md](hve-core/commit-message.instructions.md) | Commit actions | Conventional commit message format | |
| 58 | | [hve-core/git-merge.instructions.md](hve-core/git-merge.instructions.md) | Git operations | Merge, rebase, and conflict handling | |
| 59 | | [hve-core/pull-request.instructions.md](hve-core/pull-request.instructions.md) | `**/.copilot-tracking/pr/**` | PR generation workflow with subagents | |
| 60 | | [pull-request.instructions.md](pull-request.instructions.md) | `**/.copilot-tracking/pr/**` | Repo-specific PR conventions | |
| 61 | |
| 62 | ### Azure DevOps Integration |
| 63 | |
| 64 | | File | Applies To | Purpose | |
| 65 | |-------------------------------------------------------------------------------------------|---------------------------------------------------------|------------------------------------| |
| 66 | | [ado/ado-create-pull-request.instructions.md](ado/ado-create-pull-request.instructions.md) | `**/.copilot-tracking/pr/new/**` | Pull request creation protocol | |
| 67 | | [ado/ado-get-build-info.instructions.md](ado/ado-get-build-info.instructions.md) | `**/.copilot-tracking/pr/*-build-*.md` | Build status and log retrieval | |
| 68 | | [ado/ado-update-wit-items.instructions.md](ado/ado-update-wit-items.instructions.md) | `**/.copilot-tracking/workitems/**/handoff-logs.md` | Work item creation and updates | |
| 69 | | [ado/ado-wit-discovery.instructions.md](ado/ado-wit-discovery.instructions.md) | `**/.copilot-tracking/workitems/discovery/**` | Work item discovery protocol | |
| 70 | | [ado/ado-wit-planning.instructions.md](ado/ado-wit-planning.instructions.md) | `**/.copilot-tracking/workitems/**` | Work item planning specifications | |
| 71 | |
| 72 | ## XML-Style Blocks |
| 73 | |
| 74 | Instructions use XML-style comment blocks for structured content: |
| 75 | |
| 76 | * **Purpose**: Enables automated extraction, better navigation, and consistency |
| 77 | * **Format**: Kebab-case tags in HTML comments on their own lines |
| 78 | * **Examples**: `<!-- <example-bash> -->`, `<!-- <schema-config> -->` |
| 79 | * **Nesting**: Allowed with distinct tag names |
| 80 | * **Closing**: Always required with matching tag names |
| 81 | |
| 82 | ````markdown |
| 83 | <!-- <example-terraform> --> |
| 84 | ```terraform |
| 85 | resource "azurerm_resource_group" "example" { |
| 86 | name = "example-rg" |
| 87 | location = "eastus" |
| 88 | } |
| 89 | ``` |
| 90 | <!-- </example-terraform> --> |
| 91 | ```` |
| 92 | |
| 93 | ## Creating New Instructions |
| 94 | |
| 95 | Use the **prompt-builder** agent to create new instruction files: |
| 96 | |
| 97 | 1. Open Copilot Chat and select **prompt-builder** from the agent picker |
| 98 | 2. Provide context (files, folders, or requirements) |
| 99 | 3. Prompt Builder researches and drafts instructions |
| 100 | 4. Auto-validates with Prompt Tester (up to 3 iterations) |
| 101 | 5. Delivered to `.github/instructions/` |
| 102 | |
| 103 | For manual creation, see [Contributing Instructions](../../docs/contributing/instructions.md). |
| 104 | |
| 105 | ## Directory Structure |
| 106 | |
| 107 | ```text |
| 108 | .github/instructions/ |
| 109 | ├── ado/ # Azure DevOps workflows |
| 110 | │ ├── ado-create-pull-request.instructions.md |
| 111 | │ ├── ado-get-build-info.instructions.md |
| 112 | │ ├── ado-update-wit-items.instructions.md |
| 113 | │ ├── ado-wit-discovery.instructions.md |
| 114 | │ └── ado-wit-planning.instructions.md |
| 115 | ├── coding-standards/ # Language and technology conventions |
| 116 | │ ├── bash/ |
| 117 | │ │ └── bash.instructions.md |
| 118 | │ ├── bicep/ |
| 119 | │ │ └── bicep.instructions.md |
| 120 | │ ├── csharp/ |
| 121 | │ │ ├── csharp.instructions.md |
| 122 | │ │ └── csharp-tests.instructions.md |
| 123 | │ ├── terraform/ |
| 124 | │ │ └── terraform.instructions.md |
| 125 | │ ├── python-script.instructions.md |
| 126 | │ └── uv-projects.instructions.md |
| 127 | ├── github/ # GitHub integration |
| 128 | │ ├── community-interaction.instructions.md |
| 129 | │ ├── github-backlog-discovery.instructions.md |
| 130 | │ ├── github-backlog-planning.instructions.md |
| 131 | │ ├── github-backlog-triage.instructions.md |
| 132 | │ └── github-backlog-update.instructions.md |
| 133 | ├── hve-core/ # HVE Core workflow |
| 134 | │ ├── commit-message.instructions.md |
| 135 | │ ├── git-merge.instructions.md |
| 136 | │ ├── markdown.instructions.md |
| 137 | │ ├── prompt-builder.instructions.md |
| 138 | │ └── writing-style.instructions.md |
| 139 | ├── shared/ # Cross-collection |
| 140 | │ └── hve-core-location.instructions.md |
| 141 | └── README.md |
| 142 | ``` |
| 143 | |
| 144 | --- |
| 145 | |
| 146 | <!-- markdownlint-disable MD036 --> |
| 147 | *🤖 Crafted with precision by ✨Copilot following brilliant human instruction, |
| 148 | then carefully refined by our team of discerning human reviewers.* |
| 149 | <!-- markdownlint-enable MD036 --> |