al-agent-task
Skill115 starsChanged 11 days agoMITView on GitHub
Generate AL code for Business Central Agent SDK task integration. Applies the patterns from skill-agent-task-patterns to produce production-ready codeunits, page extensions, and event subscribers — verified against the runtime API availability matrix. ALDC workflow (Copilot prompt al-agent.task); 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-createSkill
- al-agent-instructionsSkill
- 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
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Before generating code, determine:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code adapter — generated by
scripts/sync-plugin-support.js, do not edit. Canonical source:prompts/al-agent.task.prompt.md(sha2562fd84ae74f374a979d6cc65fccd9aa51c8c60d7fba6ae9628d892446f3da6f1f). 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: Generate Agent Task Integration Code
Generates production-ready AL code for agent task integration. This prompt does not contain pattern knowledge — it applies the patterns from skill-agent-task-patterns.
Load skill first: skill-agent-task-patterns (8 patterns A–H, SDK codeunits, API availability matrix, OnPrem-only restrictions, workarounds).
Step 1 — Gather context
Before generating code, determine:
- Agent name and prefix — read from
app.jsonor ask the developer - Object ID range — check existing objects in
app/for the next available IDs - Which pattern(s) — ask or infer from the request:
- "I need a Public API" → Pattern A
- "Add a button to send work to the agent" → Pattern B (calls A)
- "Trigger agent on posting/releasing" → Pattern C (calls A)
- "Agent needs to process files" → Pattern D (combine with A/B/C)
- "Continue an existing task" → Pattern E (verify
AddToTaskavailability against the matrix) - "Run code only in agent context" → Pattern G/H
- "Force human review" → Warning annotation workaround (matrix:
SetRequiresReviewOnPrem-only)
- ExternalId format — convention
{PREFIX}-{No.}(e.g.LEAD-001,SO-1001) - Target page/table — which page extension or event subscriber is needed?
Step 2 — Verify availability
Before writing any code, check each method against the API Availability Matrix in skill-agent-task-patterns. Any method marked OnPrem-only or "Not in 17.0" requires the documented workaround.
Step 3 — Generate code
For each requested pattern:
- Search the codebase for existing agent objects (Setup table, Public API, enums) to reuse
- Generate AL objects following the pattern from the skill, substituting:
{Agent}→ actual agent name/prefix{id}→ actual object IDs- Record names, field names, enum values → actual project values
- Place files in the correct folder of the project structure:
- Public API + Impl →
app/Example/ - Page extensions →
app/Example/ - Session events →
app/Setup/TaskExecution/
- Public API + Impl →
- Verify generated code references correct enum values and codeunit names
Step 4 — Validate
- All generated codeunits compile (correct parameter types, return types)
- Public API has
Access = Public, Implementation hasAccess = Internal - Event-driven task creation uses
[TryFunction] - Business conditions checked BEFORE task creation (outside TryFunction)
- Failures logged via
Session.LogMessage - ExternalId follows the agreed format convention
- Page extensions use
AgentSetup.OpenAgentLookup()for agent selection - No OnPrem-only methods invoked from Extension scope
- If
AddToTaskwas needed, follow-up task workaround is in place
🛑 STOP — Review generated code with the developer.
Skills Evidencing
End with:
**Skills loaded**: skill-agent-task-patterns
**Patterns applied**:
- Pattern {X} — {file where applied}
- API matrix verified: {list any OnPrem/future methods that triggered workarounds}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.

