AL Development using Claude Code - The Business Central Coding Stream
This coding stream shows a personal agent-based AL development workflow in Claude Code (captions say "Cloud Code"). It uses plan, develop, code review and diagnostics agents, approval gates, and markdown files that keep the context clean. It also shows an open source AL compile wrapper and a real one-hour session that refactored a customer extension for testability using interface wrappers. The presenter says the config is provided as is and is still a work in progress.
- Introduction and setup
- Cloud Code basics and limitations with one-off prompts
- Personal configuration and marketplace plugins
- Agent-based workflow commands
- Planning phase with approval gates
- Document-driven approach and context management
- Folder structure, agent architecture and requirements engineer guidance
- AL compile wrapper tool and code review diagnostics agents
- Real-world project session and interface pattern discussion
- Iterative planning with prompt generation and solution plan
- Multi-phase developer agent execution with code review and diagnostics
- Code changes diagnostics analysis and compilation verification
- AI development workflow testing approach and benefits of agent architecture
- AI agents versus manual coding and stream wrap-up
Overview
Stefan Maron explains why one-off prompts break down for more complex AL development and presents his own agent-based workflow. A planning phase runs a requirements engineer and a solution planner with approval gates. A developer agent then writes the code, followed by code review and diagnostics agents. Results are saved as markdown files, so a session can be stopped and resumed, and each agent starts with a clean context. He also shows an open source AL compile wrapper and the AL compiler’s JSON diagnostics output.
In a real customer project session, he had the agents analyze existing code for testability and plan a refactoring that uses interface wrappers instead of single instance codeunits. The developer agent ran six phases for over an hour, touched 42 files and wrote about 8,000 lines. The main context rose from 20% to 69%. He says the configuration is provided as-is, that parts of it are untested, and that the project had no tests written yet.
Key points
- Agents write detailed findings to files and return only a short summary to the main session. This kept context at 69% (started at 20%) during a run of over one hour.
- The planning phase runs a requirements engineer and then a solution planner, with manual approval between them. The solution plan was about 700 lines and still contained some AL code despite instructions to avoid it.
- The requirements engineer run took about 3 minutes and used more than 50,000 tokens to produce a large requirements document.
- The developer agent ran six phases in sequence, followed by code review and diagnostics. It took 1 hour 1 minute, touched 42 files, wrote about 8,000 lines and deleted 14,000 lines. Access modifiers had to change from local to internal so the test app could call them.
- The AL compile wrapper detects the VS Code extension folder, reuses the compiler and finds the package caches and analyzers. It must be run from a project directory.
- The AL compiler can write diagnostics to JSON in a folder, which Claude Code can process more easily. It requires compiler settings and currently produces many info-level items.
- For testability, he used an interface wrapper (for example around posting) so it can be mocked, instead of single instance codeunits. The agents cannot easily execute tests.
Features
| Feature | Status | At |
|---|---|---|
| Cloud Code | status not stated, demoed | 1:19 |
| Cloud Code plugins marketplace | status not stated, demoed | 5:20 |
| Agent-based development workflow | status not stated, demoed | 3:40 |
| Planning agent with requirements and solution planning | status not stated, demoed | 7:47 |
| Develop agent with code review and diagnostics | status not stated, demoed | 8:04 |
| Document-driven development approach | status not stated, demoed | 11:34 |
| Agent-based orchestration for Cloud Code | status not stated, demoed | 13:05 |
| AL Compile Wrapper Tool | status not stated, demoed | 16:05 |
| Requirements Engineer Agent | status not stated, demoed | 14:35 |
| Code Review Agent | status not stated, demoed | 17:42 |
| Diagnostics Fixer Agent | status not stated, demoed | 18:36 |
| Interface wrapper pattern for testability | status not stated, demoed | 22:24 |
| Iterative refactoring with context preservation | status not stated, demoed | 24:48 |
| Solution planning agent | status not stated, demoed | 27:34 |
| Multi-phase developer agent | status not stated, demoed | 29:47 |
| AL compiler JSON output | generally available (roadmap Track AL compiler diagnostics in automated builds), demoed | 35:15 |
| Interface parameters with dependency injection | status not stated, demoed | 36:37 |
| Unpolluted context with agent architecture | status not stated, demoed | 40:16 |
| Cloud Profiles for AI Agent Configuration | status not stated | 39:01 |
| Agent Context Isolation | status not stated, demoed | 40:27 |
| Agent File-Based Output Strategy | status not stated, demoed | 41:24 |
| Extended Agent Session Runtime | status not stated, demoed | 41:05 |
| Agent-Driven Development Orchestration | status not stated, demoed | 42:37 |
A status with a roadmap link comes from the Microsoft 365 roadmap feature this part of the video covers (matched by Haiku; links Opus dropped are not used); other statuses need a status word in the video itself.
AL objects mentioned
As heard in the captions. A name that matches one object page by exact type and name links to it; the others stay as named.
- other “Business Sentinel” at 2:56
- codeunit “helper code units” at 21:54
- codeunit “resolver code units” at 22:06
- other “requirements engineer” at 26:17
- other “solution plan” at 27:34
- other “developer agent” at 29:47
- other “code review agent” at 32:31
- other “diagnostic fixer” at 33:57
- other “MCP servers” at 40:37
Not found in BC28-30: codeunit “helper code units”, codeunit “resolver code units”.
Quotes
- 1:30 “It’s a uh an AI development agent, I believe is the term for it. And it behaves in a way similar to Copilot or”
- 3:18 “those one-off prompts do not really work well if you get into development that is a little bit more complex, right?”
- 4:00 “I’ve worked on my take on implementing this kind of development workflow using agents based on what he’s he’s shown there.”
- 4:37 “But um in general this is just the config I use. So just in at the very beginning a disclaimer of this is like”
- 10:20 “Here what it does it runs the two planning agents with approval gates. So first it runs the requirements engineer and then it runs”
Disclaimers in the video
- 4:37 other: this is like provided as is
- 7:32 other: not all of this is really working or even used by me or tested
- 18:11 subject-to-change: I still I’m still working on that. It’s it’s not really following those. And it also assumes that warnings and …
- 29:12 subject-to-change: There’s still AL code in there. So my instructions still need refinement.
- 39:14 subject-to-change: I’ve not yet investigated um how how to make it uh control itself more
- 39:32 not-in-this-release: this is not yet live this app this is for a customer as I said and um this is still …
- 39:32 other: this is absolutely work in progress. I did not create tests while writing the code
- 40:03 other: this is not yet live this app this is still on the drawing board so not done tests will be done soon
Presenters (as heard): Max.
