Workshop ALDC
Block 01 · Copilot for BC
🇪🇸 🇬🇧
Block 01

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.

INSTRUCTIONS

Project contract

File .github/copilot-instructions.md. Naming conventions, ID ranges, mandatory patterns, prohibitions. Applied to ALL prompts automatically.

PROMPTS

Reusable templates

Files .github/prompts/*.prompt.md with frontmatter. Invoked with /name. Encapsulate repetitive tasks (create table ext, generate test page).

SKILLS

Packaged capabilities

Context + files + scripts. Unlike a prompt, a skill composes multiple resources. In Copilot Chat they appear as invocable tools.

AGENTS

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:

Context Task Constraints Output Format

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.

1 · vague prompt
Create a table for customer support tiers
2 · structured prompt · Context/Task/Constraints/Output pattern
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.
3 · /extend-table · reusable prompt file invocation
/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 in parallel · 3 min

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.

  1. Open Copilot Chat sidebar in your VS Code window
  2. Paste the vague prompt from above. Observe what it generates (prefix, IDs, tooltips).
  3. Paste the structured prompt. Compare the result with the previous one.
  4. If time allows, invoke /extend-table on Customer and observe how it applies the contract without repeating it.
What to look for in the output With the vague prompt, Copilot will very likely improvise the prefix, ID out of range, fields without Caption or ToolTip. With the structured one, all 4 points are met. With /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.

LOADING README…