GitHub Copilot for Business Central
Master the Copilot ecosystem — Instructions, Prompts, Skills, Agents — applied to AL. Prompt engineering with a clear pattern. From the vague prompt to the structured prompt.
Copilot Ecosystem · 4 pieces working together
Before diving into writing prompts, it helps to have a map. Copilot today is an ecosystem of 4 pieces that coexist in the workspace and combine. You don't have to choose one — they all work together.
Project contract
File .github/copilot-instructions.md. Naming conventions, ID ranges, mandatory patterns, prohibitions. Applied to ALL prompts automatically.
Reusable templates
Files .github/prompts/*.prompt.md with frontmatter. Invoked with /name. Encapsulate repetitive tasks (create table ext, generate test page).
Packaged capabilities
Context + files + scripts. Unlike a prompt, a skill composes multiple resources. In Copilot Chat they appear as invocable tools.
Autonomous orchestration
Layer that invokes skills, prompts and tools autonomously or semi-autonomously. This is the gateway to ALDC. Covered in depth in Block 3.
Prompt engineering · the pattern
There are many prompt engineering frameworks. The one we use in the workshop is direct and battle-tested in AL:
Four sections, in that order. No need to invent. And when applied correctly, the difference between a vague prompt and a structured one is dramatic.
Vague vs structured · side by side
Vague prompt
Create a table for customer support tiers
No prefix. No ID range. No DataClassification. No Caption or ToolTip. Copilot improvises as it sees fit.
Structured prompt
Context: BC SaaS. Follow copilot-instructions.md. Task: Generate AL table "CEB Support Tier" in range 50100-50149. Constraints: - PK: Code (Code[20]) - Fields: Description, SLA Hours, Priority, Active - Caption + ToolTip on every field - DataClassification per field - Include LookupPageId Output: Single .al file, ready to compile.
Correct prefix. ID in range. DataClassification. Caption and ToolTip. Code ready to compile.
The difference between the two outputs is not Copilot being "better" or "worse". It's the author being explicit or vague. The project contract loads the context; the structured prompt adds the task. The more you delegate to the contract, the shorter each individual prompt can be.
Live demo · 3 prompts to copy
The 3 prompts that will be launched during the demo, ready to copy. The first shows what happens without context. The second applies the full pattern. The third invokes a reusable prompt file from the workspace.
Create a table for customer support tiers
Context: BC SaaS extension for customer support management. Follow copilot-instructions.md. Task: Generate an AL table named "CEB Support Tier" in the range 50100-50149. Constraints: - Primary key: "Code" (Code[20]) - Fields: "Description" (Text[100]), "SLA Response Hours" (Integer), "Priority Level" (Option: Low,Medium,High,Critical), "Active" (Boolean, default true) - All fields must include Caption and ToolTip - DataClassification: CustomerContent for all fields except "Code" which is SystemMetadata - Include a LookupPageId property Output: Single .al file, ready to compile. No commentary, code only.
/extend-table Source table: Customer Fields: - Support Tier Code (Code[20]) — link to CEB Support Tier - Support Active (Boolean) — whether support is enabled - Support Start Date (Date) — start of the support contract Business reason: Enable tier-based customer support workflows.
Replicate the vague vs structured comparison on your machine
During the demo, anyone with VS Code open with the workshop workspace can replicate in parallel. No need to submit anything — the goal is for everyone to see the quality jump with their own eyes.
- Open Copilot Chat sidebar in your VS Code window
- Paste the vague prompt from above. Observe what it generates (prefix, IDs, tooltips).
- Paste the structured prompt. Compare the result with the previous one.
- If time allows, invoke
/extend-tableon Customer and observe how it applies the contract without repeating it.
/extend-table, the notable thing is that context didn't need to be repeated — the prompt file reads it from copilot-instructions.md.
Key takeaways from this block
The contract rules. copilot-instructions.md applies to ALL prompts automatically. Investing in writing it once, properly, saves repeating context in every interaction. Prefixes, ranges, permission set policy, prohibitions — all in there.
Reusable prompt file > clever prompt. If you or your team do the same task twice, it's a candidate for a prompt file. /extend-table is one example. It's shared, versioned, audited.
The Context/Task/Constraints/Output pattern is your safety net. When in doubt about what's missing from a prompt, review the 4 sections. Usually one is failing.
What this block covers
Copilot Ecosystem
The 4 pieces (Instructions, Prompts, Skills, Agents) and how they coexist in the workspace.
Prompt engineering
The Context/Task/Constraints/Output pattern applied to AL.
Vague vs structured
Side-by-side comparison of an improvised prompt vs one with the pattern applied.
Live demo
Three executions in Copilot Chat with copyable prompts.