Add Copilot instructions and code-review agent guidance#2156
Open
Add Copilot instructions and code-review agent guidance#2156
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds repository-level guidance for Copilot and a dedicated AL-Go code review agent document to help enforce AL-Go conventions—especially around settings/schema documentation and review focus areas.
Changes:
- Introduces
.github/copilot-instructions.mddescribing AL-Go conventions for PowerShell, workflows, testing, security, and documentation. - Adds
.github/.agents/code-review.agent.mddefining review focus areas and repository knowledge for a code-review agent.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/copilot-instructions.md |
New Copilot guidance covering conventions, security patterns, testing, and documentation requirements. |
.github/.agents/code-review.agent.md |
New code-review agent guidance defining critical/important review checks and key repo references. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aholstrup1
previously approved these changes
Mar 6, 2026
Collaborator
aholstrup1
left a comment
There was a problem hiding this comment.
Probably something we should've added a while ago. Thanks for adding it! 👍
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
4 tasks
…ithub/agents/ (#2160) Addresses feedback from #2156 to split the monolithic code-review agent file and relocate it from `.github/.agents/` to `.github/agents/`. ### Changes - **Moved** `.github/.agents/code-review.agent.md` → `.github/agents/code-review.agent.md` - **Split** rules into three focused files: - `Security.md` — Critical rules: error handling header, secret leakage, path traversal, `ConvertTo-HashTable -recurse`, deprecated settings - `Style.md` — Style/quality rules: tests, cross-platform, encoding, YAML permissions, naming conventions - `Documentation.md` — Documentation rules: RELEASENOTES, settings docs, function docs, workflow/scenario docs - Main `code-review.agent.md` now serves as the entry point, referencing the three rule files while retaining the expertise, how-to-review, and repository knowledge sections ### ✅ Checklist - [ ] Add tests (E2E, unit tests) - [ ] Update RELEASENOTES.md - [ ] Update documentation (e.g. for new settings or scenarios) - [ ] Add telemetry <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/microsoft/AL-Go/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
mazhelez
commented
Mar 11, 2026
Contributor
4 tasks
…down files (#2166) All ordered lists in the agent markdown files were using explicit sequential numbers (`1.`, `2.`, `3.`, …) instead of the idiomatic `1.` / `1.` / `1.` pattern that lets the renderer auto-increment. ### Changes - `.github/agents/code-review.agent.md` — 8-item review steps list - `.github/agents/Documentation.md` — 4-item important rules list - `.github/agents/Security.md` — 5-item critical rules list - `.github/agents/Style.md` — two lists (4 + 2 items) ### ✅ Checklist - [ ] Add tests (E2E, unit tests) - [ ] Update RELEASENOTES.md - [ ] Update documentation (e.g. for new settings or scenarios) - [ ] Add telemetry <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Collaborator
Author
|
@copilot can you please analyze the pre-commit failures in https://github.com/microsoft/AL-Go/actions/runs/22965470468/job/66667666863?pr=2156 and fix them? |
4 tasks
Contributor
…#2167) The pre-commit CI was failing because `mdformat` (v0.7.21) requires blank lines after list-introducing paragraphs and section headers — a requirement not met by the markdown files added in this PR. ### Changes - Applied `mdformat --end-of-line=keep` to `.github/copilot-instructions.md` and `.github/agents/code-review.agent.md` to add required blank lines after list-introducing text (e.g., after "You are an expert in:", "When reviewing changes:", etc.) ### ✅ Checklist - [ ] Add tests (E2E, unit tests) - [ ] Update RELEASENOTES.md - [ ] Update documentation (e.g. for new settings or scenarios) - [ ] Add telemetry <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add repository-level Copilot instructions and tighten the AL-Go code-review agent to enforce documentation for settings, schema, and public functions.