Add interfaces knowledge domain and review leaf skill (#42)

Adds the interfaces knowledge domain covering AL interfaces and enum-with-implementation: three atomic articles with good/bad AL samples, a new al-interfaces-review leaf skill, and additive wiring into al-code-review and the README. Purely additive; no contract change.

Part of #34.

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-06-25 12:20:56 +02:00 committed by GitHub
parent 45c2b2f5ec
commit 23d5478ac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 458 additions and 2 deletions

View file

@ -0,0 +1,49 @@
interface INotifier
{
procedure Send(Recipient: Text; Body: Text): Boolean;
}
codeunit 50206 "Email Notifier" implements INotifier
{
procedure Send(Recipient: Text; Body: Text): Boolean
begin
// A real implementation would hand the message to an email service.
exit(Recipient <> '');
end;
}
codeunit 50207 "Default Notifier" implements INotifier
{
procedure Send(Recipient: Text; Body: Text): Boolean
begin
// Safe fallback so an unmapped or future channel still resolves to a
// usable object instead of failing where the interface is called.
exit(false);
end;
}
enum 50208 "Notification Channel" implements INotifier
{
Extensible = true;
DefaultImplementation = INotifier = "Default Notifier";
value(0; Email)
{
Implementation = INotifier = "Email Notifier";
}
value(1; None)
{
// No explicit Implementation: resolves to DefaultImplementation above.
}
}
codeunit 50209 "Notification Dispatch"
{
procedure Notify(Channel: Enum "Notification Channel"; Recipient: Text; Body: Text): Boolean
var
Notifier: Interface INotifier;
begin
Notifier := Channel;
exit(Notifier.Send(Recipient, Body));
end;
}