al-agent-create
Skill115 starsChanged 11 days agoMITView on GitHub
End-to-end workflow to create a coded Business Central agent using the Agent SDK. Orchestrates the 7 phases following the official Agent Template structure. Generates all required objects by applying patterns from skill-agent-toolkit, skill-agent-task-patterns and skill-agent-instructions. ALDC workflow (Copilot prompt al-agent.create); invoke explicitly.
In this repository55 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- claude-plugin/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- instructions/copilot-instructions.mdCopilot instructions
- agent-builderSkill
- al-agent-build-instructionsSkill
- al-agent-instructionsSkill
- al-agent-taskSkill
- al-agent-testSkill
- al-buildSkill
- al-context-createSkill
- al-initializeSkill
- al-memory-createSkill
- al-pr-prepareSkill
- al-spec-createSkill
- architectSkill
- auditSkill
- conductSkill
- developSkill
- presalesSkill
- reviewSkill
- skill-agent-instructionsSkill
- skill-agent-task-patternsSkill
- skill-agent-toolkitSkill
- skill-al-review-pipelineSkill
- skill-apiSkill
- skill-contribution-assistantSkill
- skill-copilotSkill
- skill-debugSkill
- skill-estimationSkill
- skill-eventsSkill
- skill-migrateSkill
- skill-pagesSkill
- skill-performanceSkill
- skill-permissionsSkill
- skill-testingSkill
- skill-translateSkill
- specSkill
- triageSkill
- skill-agent-instructionsSkill
- skill-agent-task-patternsSkill
- skill-agent-toolkitSkill
- skill-al-review-pipelineSkill
- skill-apiSkill
- skill-contribution-assistantSkill
- skill-copilotSkill
- skill-debugSkill
- skill-estimationSkill
- skill-eventsSkill
- skill-migrateSkill
- skill-pagesSkill
- skill-performanceSkill
- skill-permissionsSkill
- skill-testingSkill
- skill-translateSkill
The file
Files
Claude Code adapter — generated by
scripts/sync-plugin-support.js, do not edit. Canonical source:prompts/al-agent.create.prompt.md(sha256c5220663504e12fbfc07c2b24fa71f0b5922acdf7a7eef0ef0c794c1aa3f93c3). This workflow was written for@workspace use …in GitHub Copilot Chat. Apply these harness mappings and treat everything else as binding:
Copilot surface in the contract Claude Code equivalent #runSubagent/runSubagent/agents:The Tasktool withsubagent_type: "aldc:<agent>"; one invocation carries everything inline (subagents are stateless)#askQuestions/vscode/askQuestionsAskUserQuestion(main session only; a subagent returns its questions in its structured output)handoffs:entries, andsend: falseon oneNo equivalent — the gate is yours to keep. In Copilot a handoff is a button the human clicks, and send: falseadditionally hands them the prompt to review before it is sent; the host supplies the approval. Claude Code delegates through theTasktool, with no click and no review step. So never auto-delegate: present your output, get explicit approval, and only then delegate or route to another role. The handoff's routing is carried by the plugin's role entry skills; its human gate is carried by this rule@al-architect,@al-spec-agent,@al-conductor,@al-developer,@al-developer-reviewer,@al-triage,@al-presales,@al-agent-builder,@dredd/aldc:architect,/aldc:spec,/aldc:conduct,/aldc:develop,/aldc:review,/aldc:triage,/aldc:presales,/aldc:agent-builder,/aldc:audit(orclaude --agent aldc:<agent>)@workspace use <workflow>/aldc:<workflow>with dots replaced by dashes (al-spec.create->/aldc:al-spec-create); already rewritten below${input:Name}prompt variablesTake the value from $ARGUMENTS; ask throughAskUserQuestionwhen missing. Already rewritten below as<Name from $ARGUMENTS>execute/runInTerminal, AL compilation or symbol restoreDeveloper/Implementer: discovered official AL MCP mcp__al__al_compile/mcp__al__al_build/mcp__al__al_downloadsymbols, or an installed ALTool/AL-Go runner throughBash. Use the correct App/Test project; unavailable capabilities are never simulated. Publishing retains its separate human/CI gate and is not granted by this adapteredit,read/readFile,search,#codebaseEdit/Write,Read,Grep/Glob#changes,changes,search/changesRead-only git status/git diffthroughBashonly where granted; otherwise read the caller-supplied diff artifact or return the missing evidence requestread/problems,al_get_diagnostics,#testFailureDiscovered mcp__al__al_getdiagnosticsfor the explicit project, or actual compiler/test output. Diagnostics are not evidence of a fresh compile or executed tests. No result: recordnot-run/unavailableal-symbols-mcp/*,upstash/context7/*,microsoft-learn/*,microsoft-docs/*Tools named mcp__al-symbols-mcp__*,mcp__context7__*,mcp__microsoft-docs__*(or themcp__plugin_aldc_…form). A server that is not loaded isunavailable; do not simulate itsshadowsdk.al-lsp-for-agents/*,#usages, semantic definition/reference queriesClaude LSPwith the existing AL LSP for Agents companion; discover the actual operations and project context first. VS Code tool identifiers are not Claude tool namesms-dynamics-smb.al/*,vscode.mermaid-chat-features/*VS Code tool identifiers do not exist here. Use only a separately discovered Claude capability; never rename community tools as Microsoft tools vscode/memory,vscode/*Not available; keep state in the canonical .claude/plans/artifacts of the projecttodoTodoWritefor in-session tracking; durable state stays in.claude/plans/"load skill-x"The Skilltool (aldc:<skill-name>) or read${CLAUDE_PROJECT_DIR}/.claude/skills/<skill-name>/SKILL.md.github/instructions/*.instructions.md(applyTo)${CLAUDE_PROJECT_DIR}/.claude/rules/*.md(paths:);/aldc:al-initializecopies them to the project's.claude/rules/for auto-apply in the main session; inject inline for subagents exactly as the contract says.github/skills/,.github/plans/…,docs/templates/${CLAUDE_PROJECT_DIR}/.claude/skills/,.claude/plans/…(project-owned,aldc.yaml -> plans.root),${CLAUDE_PROJECT_DIR}/claude-plugin/docs/templates/; already rewritten belowpython …runtime helpers,--aldc-rootPaths already point at ${CLAUDE_PLUGIN_ROOT}; usepythonorpython3, whichever exists (stdlib only)aldc.yaml${CLAUDE_PROJECT_DIR}/aldc.yamlwhen the project has one, otherwise${CLAUDE_PROJECT_DIR}/claude-plugin/aldc.yamlRead
${CLAUDE_PROJECT_DIR}/claude-plugin/docs/claude-al-tooling.mdfor this surface’s LSP/MCP bindings, then${CLAUDE_PROJECT_DIR}/.claude/skills/skill-migrate/references/cli-al-tools.mdfor the shared role/evidence contract. The Claude guide supersedes older capability-availability examples, never role responsibilities or human gates.
Workflow: Create Coded Agent (Agent SDK)
End-to-end orchestration to produce a production-ready agent. This prompt does not contain SDK knowledge — it applies patterns from the loaded skills:
skill-agent-toolkit→ registration, 3 interfaces, Setup Codeunit, ConfigurationDialog, project structureskill-agent-task-patterns→ Patterns A–H for task integration (Phase 6)skill-agent-instructions→ Responsibilities-Guidelines-Instructions framework (Phase 7)
Human validation gates
🛑 markers require human approval before proceeding to the next phase.
Phase 1 — Agent specification
1.1 Gather requirements
Ask the developer:
- Agent purpose — business process being automated
- Creation rules — single instance? multi? always?
- Trigger type — manual (page action) / EventSubscriber / email / mixed?
- Data scope — tables and pages the agent needs access to
- Setup properties — any agent-specific configuration beyond standard?
- Message processing — input validation? output post-processing?
- User intervention suggestions — what help options when stuck?
- Summary KPIs — what metrics on hover card?
- Annotations — what preconditions to validate (licensing, config completeness)?
1.2 Generate Agent Spec
# Agent Specification: {Agent Name}
## Identity
- Name: {Name}
- Initials: {3-4 chars}
- Object ID Range: {e.g. 52100-52199}
## Project Structure
See skill-agent-toolkit project structure section.
## Creation Rules
- Instance Model: {Single / Multi / Always}
## Interfaces
### IAgentFactory
- Setup Page: Page {ID} "{Agent} Setup" (ConfigurationDialog)
- Default Profile: {Profile ID}
- Default Permissions: {PermissionSet ID}
### IAgentMetadata
- Annotations: {precondition checks}
- Summary KPIs: {metrics for hover card}
- Custom Message Page: {Yes/No}
### IAgentTaskExecution
- Input Validation: {what to check}
- Output Post-Processing: {signatures, formatting}
- User Intervention Suggestions: {list}
- Page Context: {page-specific context}
## Task Integration
- Triggers: {events or page actions}
- ExternalId Pattern: {format}
- Patterns Applied: {A / B / C / D / E / F / G / H}🛑 STOP — Review spec before proceeding.
Phase 2 — Registration + Integration
Apply: skill-agent-toolkit → "Registration — 4 required objects".
Generate:
- Copilot Capability EnumExt — unique value ID
- Metadata Provider EnumExt — links the 3 interface implementations
- Install Codeunit —
OnInstallAppPerDatabase, Unregister+Register, re-install instructions for existing setup records - Upgrade Codeunit —
OnUpgradePerDatabase, instruction updates withUpgradeTag
🛑 STOP — Verify enum IDs are unique.
Phase 3 — Setup Infrastructure
Apply: skill-agent-toolkit → "Setup Codeunit" and "ConfigurationDialog page".
Generate:
- Setup Table — PK =
"User Security ID": Guid,DataPerCompany = false, custom fields - Setup Codeunit —
GetInitials,GetSetupPageId,GetSummaryPageId,GetInstructions (SecretText),GetDefaultProfile,GetDefaultAccessControls,InitializeSetupRecord,SaveSetupRecord,SaveCustomProperties - ConfigurationDialog Page — invariants from the skill (SourceTableTemporary, AgentSetupPart first, AzureOpenAI check, system actions)
🛑 STOP — Review setup infrastructure.
Phase 4 — Interface implementations
Apply: skill-agent-toolkit → "The 3 core interfaces".
Generate the 3 codeunits delegating to Setup Codeunit. IAgentTaskExecution.AnalyzeAgentTaskMessage uses AgentMessage.GetText() / UpdateText() — never raw record fields.
🛑 STOP — Review interface implementations.
Phase 5 — Profile + Permissions + KPI
Generate:
- Profile with RoleCenter reference
- RoleCenter Page (
PageType = RoleCenter) with navigation actions - PageCustomizations to tailor pages for the agent's view
- PermissionSet including D365 BASIC + domain permissions
- KPI Table (PK = User Security ID, custom KPI fields)
- KPI Page (
PageType = CardPart, cuegroup with metrics)
🛑 STOP — Review profile and permissions.
Phase 6 — Task Integration + Public API
Apply: skill-agent-task-patterns → relevant patterns (A always, plus B/C/D/E/H depending on spec). Verify each method against the API Availability Matrix before generating code.
Generate:
- Public API codeunit (
Access = Public) — Pattern A, with the standard overloads - Public API Impl codeunit (
Access = Internal) — uses Agent Task Builder - Page Extension — example integration (Pattern B)
- EventSubscriber codeunit — if Pattern C applies (TryFunction + telemetry)
- Agent Session Events — if Pattern H applies (SingleInstance + BindSubscription)
🛑 STOP — Review task integration.
Phase 7 — Instructions + Tests
Apply: skill-agent-instructions → RGI framework + keywords.
Apply: al-agent.test prompt for the test codeunit.
Generate:
- InstructionsV1.txt — Responsibilities → Guidelines → Instructions, English, environment-agnostic
- Test Codeunit — 6 categories (run
al-agent.test)
🛑 STOP — Review instructions and tests.
Deliverables checklist
{Agent}CopilotCapability.EnumExt.al{Agent}MetadataProvider.EnumExt.al{Agent}Install.Codeunit.al{Agent}Upgrade.Codeunit.al{Agent}Setup.Table.al{Agent}Setup.Codeunit.al{Agent}Setup.Page.al{Agent}Factory.Codeunit.al(implements IAgentFactory){Agent}Metadata.Codeunit.al(implements IAgentMetadata){Agent}TaskExecution.Codeunit.al(implements IAgentTaskExecution){Agent}KPI.Table.al+{Agent}KPI.Page.al{Agent}Profile.Profile.al+{Agent}RoleCenter.Page.al{Agent}.permissionset.al{Agent}PublicAPI.Codeunit.al+ Impl{Agent}*Ext.PageExt.al(example integration).resources/Instructions/InstructionsV1.txt- Test codeunit (6 categories)
- Agent specification document
Skills Evidencing
End the workflow declaring:
**Skills loaded**: skill-agent-toolkit, skill-agent-task-patterns, skill-agent-instructions
**Patterns applied**: {list each pattern with the file where it was applied}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

