/al-agent-harness:al-build-validationfrom al-agent-harness
Builds, diagnoses, and fixes AL code until compilation is green. Use after changing any .al file or app.json, before reviews/PRs, or when asked "does it compile". Does not run tests.
Ships in al-agent-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Code is not finished until it compiles with zero errors. Not "it should compile", not "the syntax looks right": a build result you can show. And not just a compile: you read the diagnostics and fix them, then build again.
This skill does not run tests. A green build proves the code compiles and the analyzers are satisfied; it does not prove the code does what it should. Never report "tested" or "works" on the strength of a green build. Running the tests is a separate step that needs a sandbox.
app.json or a dependency./done, before a review or a PR.Use what the session exposes; list your tools, do not assume.
| Host | Build | Diagnostics |
|---|---|---|
Claude Code (.mcp.json server al, from al launchmcpserver) | al_build | al_getdiagnostics |
| GitHub Copilot in VS Code (AL extension tools) | al_build | al_getdiagnostics |
| No MCP tool (fallback) | al compile CLI, see below | the compiler output |
No tool and no al CLI? Hard stop, below. The plugin starts the AL MCP server without a
project: when a tool answers "no projects are loaded", call al_addproject for app/ and
test/ (each folder with an app.json) and try again.
app/ first, then test/ (the test app depends on the app): after a green app/ build, copy
the .app it produced in app/ into test/.alpackages/, or test/ compiles against an old
version of the app. Pass projectPath as the
absolute path of the folder that holds app.json, with code analysis on. Unresolved symbols
(Cannot find type, missing package): download symbols for that project first
(al_downloadsymbols, or al downloadsymbols --project <path> --globalsourcesonly), then
build again. Never assume a missing symbol is your code's fault, or that it is not.
CLI fallback, per project, from the repo root:
al compile /project:app /packagecachepath:app/.alpackages /out:app/output.app
al compile /project:test /packagecachepath:test/.alpackages /out:test/output.app
(copy the app's .app into test/.alpackages/ before building test/).
al_getdiagnostics with projectPath, severities error and warning.
Read the file around the reported line, fix the cause (not the symptom), rebuild, re-read the
diagnostics. Repeat until zero errors. A fix that adds a new object or field goes through
al-object-id-assignment first.
Same error three times: stop, report what you tried and why it fails. Do not delete code,
suppress analyzers or #pragma your way to green.
Errors that name this app twice (AL0275, AL0197: the same object in "Directions Demo" and
"Directions Demo") come from the build server, not from the code: the project is loaded twice
or a generated .app sits in the project folder. Remove that .app or add the project again
and rebuild. Never delete, move or recreate source files to make them go away.
Build status: GREEN | RED
app/ errors 0 warnings 1 (1 accepted: AA0xxx - <reason>)
test/ errors 0 warnings 0
Errors fixed this run: 3
Tool: al_build (MCP) | al compile (CLI)
Tests: not run (this skill does not run tests)
⛔ No build tool and no
alCLI: STOP and report that the build could not run. Never report "done", "should compile" or "compiles in theory". Unblock with:dotnet tool install --global microsoft.dynamics.businesscentral.development.tools --prerelease
#pragma warning disable, no ruleset edits)
unless the user asks for it.al-build-fixer agent - runs this loop as a subagent and returns only the report.al-object-id-assignment - before writing any new object or field.definition-of-done - "build green" is its first line (step 08).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/al-knowledgeFind sourced Business Central / AL guidance instead of answering from memory. Use when: asked "how should I ..." about AL or BC, choosing a pattern (events, error handling, labels, permissions, performance, upgrade, testing), checking what an object, field, event or procedure is or does in this BC version, finding the base-app event to subscribe to, asking what changed between BC versions, or reviewing AL against best practice. Routes to the BC Observatory plugin, BCQuality or the symbols, and cites the source./al-object-id-assignmentReserve object, field and enum-value IDs with AL Object ID Ninja BEFORE writing the AL artifact, and release IDs that end up unused. Use when: creating any new AL object (table, tableextension, page, pageextension, codeunit, report, enum, enumextension, query, xmlport, permissionset, ...), adding a field through a tableextension, adding an enum value through an enumextension, or deleting/reverting an object whose ID you reserved. Never pick an ID yourself./chat-exportExport an agent session and turn it into a short diagnose report for whoever maintains the harness: which skills, agents and MCP servers were available versus actually used, which tools failed, where the agent looped. Use when: "export this chat", "why did it not use the skill", "send this session to the devlead", the developer says the tooling (not the code) is failing them. Never runs unasked.npx claudepluginhub waldo1001/directionsemea.alagentharness --plugin al-agent-harnessOther plugins' skills for the same job