Claude Code adapter — generated by
scripts/sync-plugin-support.js, do not edit. Canonical source:prompts/al-agent.test.prompt.md(sha2562237600f476405fbad9187a641ba129dff0a7bcbaba8be4ac142de917524ef69). 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: Test Agent SDK Integration
Generates tests for all Agent SDK layers. Interface signatures come from skill-agent-toolkit; task pattern verification rules come from skill-agent-task-patterns.
Load skills: skill-agent-toolkit (interface signatures), skill-agent-task-patterns (Pattern C/D/H rules for integration tests).
6 required test categories
1. Registration tests
al[Test] procedure CopilotCapabilityIsRegistered() var CopilotCapability: Codeunit "Copilot Capability"; begin Assert.IsTrue( CopilotCapability.IsCapabilityRegistered( Enum::"Copilot Capability"::"{Agent} Capability"), 'Copilot capability must be registered on install'); end; [Test] procedure AgentMetadataProviderEnumExists() var Provider: Enum "Agent Metadata Provider"; begin Provider := Enum::"Agent Metadata Provider"::"{Agent}"; Assert.AreEqual('{Agent}', Format(Provider), 'Enum must exist'); end;
2. Factory tests (IAgentFactory)
al[Test] procedure FactoryReturnsSetupPageId() var Factory: Codeunit {Agent}Factory; begin Assert.AreNotEqual(0, Factory.GetFirstTimeSetupPageId(), 'Must return setup page ID'); end; [Test] procedure FactoryReturnsDefaultInitials() var Factory: Codeunit {Agent}Factory; begin Assert.AreNotEqual('', Factory.GetDefaultInitials(), 'Must return initials'); end; [Test] procedure FactoryReturnsCopilotCapability() var Factory: Codeunit {Agent}Factory; begin Assert.AreEqual( Enum::"Copilot Capability"::"{Agent} Capability", Factory.GetCopilotCapability(), 'Must return correct capability'); end; [Test] procedure FactoryReturnsDefaultProfile() var Factory: Codeunit {Agent}Factory; TempProfile: Record "All Profile" temporary; begin Factory.GetDefaultProfile(TempProfile); Assert.RecordIsNotEmpty(TempProfile); end; [Test] procedure FactoryReturnsDefaultPermissions() var Factory: Codeunit {Agent}Factory; TempAccess: Record "Access Control Buffer" temporary; begin Factory.GetDefaultAccessControls(TempAccess); Assert.RecordIsNotEmpty(TempAccess); end;
3. Metadata tests (IAgentMetadata)
al[Test] procedure MetadataReturnsSetupPageId() var Metadata: Codeunit {Agent}Metadata; NullGuid: Guid; begin Assert.AreNotEqual(0, Metadata.GetSetupPageId(NullGuid), 'Must return setup page'); end; [Test] procedure MetadataReturnsSummaryPageId() var Metadata: Codeunit {Agent}Metadata; NullGuid: Guid; begin Assert.AreNotEqual(0, Metadata.GetSummaryPageId(NullGuid), 'Must return summary page'); end; [Test] procedure MetadataReturnsMessagePageId() var Metadata: Codeunit {Agent}Metadata; NullGuid: Guid; begin Assert.AreNotEqual(0, Metadata.GetAgentTaskMessagePageId(NullGuid, NullGuid), 'Must return message page'); end;
4. Task Execution tests (IAgentTaskExecution)
al[Test] procedure UserInterventionSuggestionsProvided() var TaskExec: Codeunit {Agent}TaskExecution; RequestDetails: Record "Agent User Int Request Details"; Suggestions: Record "Agent Task User Int Suggestion"; begin RequestDetails.Type := RequestDetails.Type::Assistance; TaskExec.GetAgentTaskUserInterventionSuggestions(RequestDetails, Suggestions); Assert.RecordIsNotEmpty(Suggestions); end;
5. Task Integration tests
Apply Pattern C rules from skill-agent-task-patterns:
- Task created with correct ExternalId format
- Task NOT created when business condition is false
- Message contains all required context fields
[TryFunction]does not block business events on failure- Telemetry logged via
Session.LogMessageon failure
6. Agent Session tests
al[Test] procedure AgentSessionNotDetectedInNormalContext() var AgentSession: Codeunit "Agent Session"; Provider: Enum "Agent Metadata Provider"; begin Assert.IsFalse(AgentSession.IsAgentSession(Provider), 'Should not be in agent session'); end;
Coverage matrix
| Category | Test | Status |
|---|---|---|
| Registration | CopilotCapability | |
| Registration | EnumExists | |
| Factory | SetupPageId | |
| Factory | DefaultInitials | |
| Factory | CopilotCapability | |
| Factory | DefaultProfile | |
| Factory | DefaultPermissions | |
| Factory | CreationRules | |
| Metadata | SetupPageId | |
| Metadata | SummaryPageId | |
| Metadata | MessagePageId | |
| Metadata | Annotations | |
| TaskExecution | InputValidation | |
| TaskExecution | OutputPostProcess | |
| TaskExecution | Suggestions | |
| TaskExecution | PageContext | |
| TaskIntegration | Creation | |
| TaskIntegration | ConditionFilter | |
| TaskIntegration | MessageContent | |
| TaskIntegration | ErrorHandling | |
| AgentSession | Detection |
Skills Evidencing
End with:
**Skills loaded**: skill-agent-toolkit, skill-agent-task-patterns **Patterns applied**: - Interface signatures verified against skill-agent-toolkit - Pattern C TryFunction + telemetry rules verified in integration tests


