AL Guidelines for Microsoft Dynamics 365 Business Central

repository·main·Indexed 41 days ago

https://github.com/microsoft/alguidelines

A community-driven knowledge base providing best practices, design patterns, and agentic coding rules for Microsoft Dynamics 365 Business Central AL development. Includes guidelines on code style, performance, error handling, and AI-optimized 'Vibe Coding' rules for AI assistants.

Tokens
142.4K
Snippets
263
Records
511
Agent score
52%

What's inside AL Guidelines

  1. Overview of AL Dependency MCP Server

    main

    The AL Dependency MCP Server is a Model Context Protocol (MCP) server designed to expose compiled AL package symbols (.app files) to AI assistants. It enables intelligent code navigation, dependency analysis, and accurate code suggestions by allowing the AI to understand symbols from the Microsoft base app and other extensions within an AL workspace.

    Key Capabilities:

    • Symbol Database: Provides O(1) lookup performance with sub-100ms query responses. It uses a streaming JSON parser to handle large symbol files (e.g., 50MB+ Microsoft base app files) while maintaining low memory usage (<500MB).
    • Auto-Discovery: Automatically detects .alpackages directories in your workspace and monitors for package changes in real-time.

    Requirements:

    • Node.js 18+
    • .NET SDK 8.0+ (required if developing the server)
  2. Overview of Serena MCP

    main

    Serena is an AI-first code editor that provides Model Context Protocol (MCP) integration with Language Server Protocol (LSP) support for over 20 programming languages. It is designed to enable AI assistants to perform high-fidelity code navigation, symbol lookup, and refactoring by leveraging native language servers.

    Notably, it includes support for Business Central AL by automatically setting up using the VS Code AL extension (ms-dynamics-smb.al) and providing native AL LSP integration with custom AL commands.

  3. Overview of BC Code Intelligence MCP

    main
    The BC Code Intelligence MCP Server is a Model Context Protocol (MCP) server designed to provide specialized Business Central (BC) development knowledge. Instead of using a single generic AI model, it utilizes a system of 14 domain-expert personas to provide focused guidance across specific BC development areas. It features smart routing to automatically direct queries to the appropriate specialist and supports multi-specialist collaboration for complex tasks.
  4. Overview of Agentic Coding for AL Development

    main

    Agentic coding is a collaborative development approach where AI-powered assistants (agents) act as intelligent partners in the Microsoft Dynamics 365 Business Central development process. These agents can understand context, generate code, review implementations, and help maintain codebases.

    Key benefits for AL developers include:

    • Accelerated Development: Rapidly scaffolding features and generating boilerplate code.
    • Improved Code Quality: Real-time suggestions for AL best practices and automated code reviews.
    • Knowledge Augmentation: Contextual help for AL syntax and Business Central APIs.
    • Documentation & Testing: Automated documentation generation and assistance with testing strategies.
  5. Overview of the AL Development Collection

    main

    The AL Development Collection is an AI-native development toolkit designed for systematic Microsoft Dynamics 365 Business Central engineering. It moves away from ad-hoc AI usage by providing 37 Agent Primitives organized into three framework layers following the AI Native-Instructions Architecture.

    The toolkit is structured into several functional groups:

    • Role-Based Specialist Agents: Specific agents for architecture (al-architect), implementation (al-developer), troubleshooting (al-debugger), testing (al-tester), API development (al-api), and AI features (al-copilot).
    • Orchestra System Agents: Agents that manage multi-agent Test-Driven Development (TDD), including orchestration (al-conductor), research (al-planning-subagent), implementation (al-implement-subagent), and validation (al-review-subagent).
    • Auto-Applied Instructions: Systematic rules for code style, naming, performance, error handling, and testing standards.
    • Agentic Workflows: Pre-defined workflows for environment setup, development, analysis, and Copilot feature creation.
  6. Overview of BC Telemetry Buddy (waldo)

    main
    BC Telemetry Buddy (by waldo) is a community-driven utility designed to simplify the collection and forwarding of Business Central telemetry. It is primarily used for collecting telemetry from Business Central extensions and forwarding those events to specific analysis endpoints. It is particularly useful for lightweight telemetry during development or for performing targeted diagnostics in production-like environments.
  7. Overview of AL Object ID Ninja MCP features

    main

    The AL Object ID Ninja MCP Server is a Model Context Protocol (MCP) server designed to prevent AL object ID collisions in Business Central development.

    Core Capabilities

    • Collision Prevention: Detects ID conflicts and provides smart allocation via preview, reserve, and reclaim workflows.
    • Workspace Analysis: Performs real-time analysis of your workspace and integrates with Git to automatically identify apps.
    • Team Collaboration (STANDARD Mode only): Enables shared ID pools across team members, backend synchronization with the AL Object ID Ninja service, consumption tracking, and an audit trail via activity logs.
  8. Understand the categories of AL Code Best Practices

    main

    The AL Code Best Practices are categorized into three main areas to ensure development is high-performance, follows good design principles, and maintains high maintainability:

    1. Readability: Focuses on Microsoft style choices to ensure code consistency across projects.
    2. Performance: Focuses on guidelines that optimize execution speed and resource usage.
    3. Discussion: Contextual reasoning and debates regarding these practices are hosted externally.
  9. Vibe Coding rules directory structure

    main

    The rules are organized within the vibe-coding/ directory as follows:

    • _index.md: Main landing page.
    • README.md: Contribution guide.
    • al-guidelines-rules.md: Complete rules file containing references to all categories.
    • al-code-style.md: Code style, formatting, and documentation rules.
    • al-naming-conventions.md: File, object, and variable naming rules.
    • al-performance.md: Performance optimization and query guidelines.
    • al-error-handling.md: Error handling patterns and troubleshooting.
    • al-events.md: Event-driven development and extensibility.
    • al-testing.md: AL-Go workspace structure and testing guidelines.