/aldc:al-initializefrom ALDC for Claude Code
Initializes AL development environment and workspace for Business Central, including VS Code setup, project structure, symbols, and dependencies. Supports MCP workspace preparation for existing apps.
Ships in ALDC for Claude Code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude Code runtime: read
${CLAUDE_PLUGIN_ROOT}/docs/claude-runtime.mdbefore running this workflow (gates, tools, paths,<Name from $ARGUMENTS>inputs). It runs in the main session.
Your goal is to initialize the AL development environment and workspace for <ProjectName from $ARGUMENTS>.
This workflow covers both initial environment setup (VS Code, GitHub Copilot) and AL workspace configuration (project structure, symbols, dependencies).
When the request is to prepare/register an existing App or Test for AL MCP, use MCP workspace preparation only below and return its result. Do not run Phase 0 (plugin bootstrap), Phases 1–5, troubleshooting actions or the full-setup success checklist. This narrow mode does not install ALDC or change files. An explicit request to prepare the named existing project authorizes its bounded registration; reuse that authorization instead of requesting it again.
For full environment initialization, retain the existing phases and material approvals. Run MCP workspace preparation after the authorized project exists and before handing it to Architect/Spec/implementation. Do not treat an ordinary architecture request, plugin installation or a Doctor run as setup authorization. Doctor remains diagnostic; it never registers projects as a hidden side effect.
This protocol concerns the official AL MCP, not AL LSP, the native editor symbol index, community symbol providers or a Business Central business-data MCP. Operation names below describe capabilities; inspect actual schemas and aliases in this host. Never transpose another host's wire prefix or native AL schema.
aldc.yaml and
solution.roots, then confirm the requested existing folder contains
app.json. Resolve relative roots against that configuration file, not the
first workspace folder. Record absolute path, app identity and target version.
Prepare App by default when App is the requested scope. Prepare Test only when
requested/needed within the authorized scope, separately by its own path.
Never register the solution parent or the BCQuality corpus as an AL project.
Missing/ambiguous roots require the smallest clarification, not scaffolding.al_getpackagedependencies
and al_addproject. If the provider or an operation is unavailable, report
that precise capability as unavailable. Do not install a server, change an
alias, edit host configuration, broaden tool filters, or use a shell/delegation
workaround to bypass the executing context's permissions.al_addproject on that existing
absolute folder. The current request must authorize preparation of this project.
Never use new-project/scaffold operations. Retain the exact call and result.Registration changes the server's workspace state only under the observed provider contract. It does not authorize compilation/build, symbol restore, publishing, authentication changes, index generation or edits to sources, manifests, MCP/LSP settings and credentials. Do not execute those as fallbacks. Existing full-setup restore permissions do not apply to this narrow mode.
al; verify real tool-picker bindings. A different alias needs an explicit
reviewed consumer binding, not a duplicate server or wildcard.Return a compact table, with one row per requested project:
| Project / absolute path | Provider / executing context | Initial probe | Registration | Verification | Status / next action |
|---|
Retain actual tool identifiers, parameters and responses or transcript references. Use already-ready, registered-and-verified, partial, blocked or unavailable, with reasons. Report only observed dependencies/versions; no compiler, LSP, analyzer, BCQuality or runtime PASS follows from this check. In preparation-only mode, stop here even if optional capabilities are unavailable.
Path-scoped AL rules ship inside the plugin and must be copied into the project's
.claude/rules/ before anything else. Run the installed plugin's initializer with
Node 20+:
node "${CLAUDE_PLUGIN_ROOT}/scripts/init.js" --project "/path/to/project"
node "${CLAUDE_PLUGIN_ROOT}/scripts/init.js" --project "/path/to/project" --apply
The first command previews the complete plan without writing. Review collisions
before applying. Existing customized rules stay intact; --force replaces reviewed
collisions with a recoverable backup. The initializer copies the AL rules, seeds
.claude/plans/memory.md only when missing, and updates only the ALDC managed block
in CLAUDE.md, preserving surrounding project instructions. --verify reports
receipt drift; --rollback restores the preceding initialization and refuses to
overwrite later changes. It installs no software and configures no MCP server.
Human Review: confirm the rules are loaded before environment setup.
Verify the following are available:
Required Tools:
Recommended Tools:
Step 1: Install VS Code Extensions
Ctrl+Shift+X or Cmd+Shift+X)Step 2: Authentication
Create or update .vscode/settings.json in the workspace root:
{
// AL Language settings
"al.enableCodeAnalysis": true,
"al.codeAnalyzers": ["${CodeCop}", "${PerTenantExtensionCop}", "${UICop}"],
// GitHub Copilot settings
"github.copilot.enable": {
"*": true,
"al": true
},
// Editor settings for better AI integration
"editor.inlineSuggest.enabled": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}
Configuration Benefits:
For New Projects [human]:
VS Code: AL: Go!
For Existing Folders: keep the existing app.json; nothing to scaffold.
Implement feature-based organization:
<ProjectName from $ARGUMENTS>/
├── .vscode/
│ ├── settings.json # Workspace settings
│ └── launch.json # Debug configurations
├── src/
│ ├── Tables/ # Table objects
│ ├── Pages/ # Page objects
│ ├── Codeunits/ # Codeunit objects
│ ├── Reports/ # Report objects
│ ├── Queries/ # Query objects
│ ├── XMLports/ # XMLport objects
│ ├── PageExtensions/ # Page extensions
│ ├── TableExtensions/ # Table extensions
│ └── Enums/ # Enum objects
├── test/
│ ├── TestCodeunits/ # Test codeunits
│ └── TestData/ # Test data and helpers
├── app.json # Application manifest
├── .gitignore # Git ignore rules
└── README.md # Project documentation
Download required symbols:
mcp__al__al_downloadsymbols # or [human] VS Code: AL: Download Symbols
Verify all base application dependencies are available.
Create or review the manifest (app.json) [human]:
VS Code: edit app.json (id, name, publisher, version, idRanges, dependencies)
Human Review: Validate manifest contents before proceeding.
SECURITY CHECKPOINT - Configuration contains sensitive information
Before creating launch.json:
Create .vscode/launch.json based on your environment:
For Cloud Sandbox:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "Your own server",
"server": "https://businesscentral.dynamics.com",
"serverInstance": "BC",
"authentication": "AAD",
"startupObjectType": "Page",
"startupObjectId": 22,
"schemaUpdateMode": "Synchronize",
"tenant": "default"
}
]
}
For On-Premises:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "Local server",
"server": "http://localhost",
"serverInstance": "BC210",
"authentication": "Windows",
"startupObjectType": "Page",
"startupObjectId": 22,
"schemaUpdateMode": "Synchronize"
}
]
}
For Agent Debugging (Copilot features):
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "attach",
"name": "Attach to agent (Sandbox)",
"clientType": "Agent",
"environmentType": "Sandbox",
"environmentName": "<EnvironmentName from $ARGUMENTS>",
"breakOnNext": "WebClient"
}
]
}
Generate appropriate .gitignore:
# AL Compiler outputs
.alpackages/
.alcache/
.snapshots/
rad.json
*.app
# VS Code settings (optional)
.vscode/launch.json
.vscode/*.log
# Build artifacts
.netFramework/
bin/
obj/
# Test results
TestResults/
*.trx
# Temporary files
*.tmp
*.bak
*~
Create comprehensive README.md:
# <ProjectName from $ARGUMENTS>
## Overview
[Project purpose and business value]
## Key Features
- Feature 1: [Description]
- Feature 2: [Description]
## Architecture
[High-level architecture description]
## Naming Conventions
- Tables: `[BusinessEntity]` (e.g., `CustomerExtended`)
- Pages: `[BusinessEntity][PageType]` (e.g., `CustomerListPage`)
- Codeunits: `[Purpose]` (e.g., `SalesOrderProcessor`)
- ID Range: 50000-50099
## Development Guidelines
- Follow AL coding standards
- Use XML documentation for procedures
- Implement error handling with try-functions
- Write unit tests for business logic
## Dependencies
[List of extension dependencies]
## Setup Instructions
[How to set up the development environment]
Demonstrate documentation for procedures:
/// <summary>
/// Calculates the total amount for a sales order including tax
/// </summary>
/// <param name="SalesHeader">The sales header record</param>
/// <returns>The total amount including tax</returns>
procedure CalculateTotalWithTax(var SalesHeader: Record "Sales Header"): Decimal
begin
// Implementation
end;
Open an AL File
.al file in the projectTest Code Completion
Test Copilot Chat
Ctrl+Shift+I)Verify Code Analysis
Test Build
If authentication fails:
If symbols are missing:
mcp__al__al_downloadsymbols (or [human] VS Code: AL: Download Symbols)Check:
editor.inlineSuggest.enabled is trueImprovements:
Verify the setup is complete:
Once your environment is initialized:
For Development:
@AL Implementation Specialist # Implement features (loads page/event skills on demand)
/aldc:al-build # Build and deploy
For Architecture:
@AL Architecture & Design Specialist # Design solutions
For TDD Orchestration:
@AL Development Conductor # Plan → Implement → Review → Commit
What Gets Sent to AI Services:
What You Should NOT Include:
Best Practices:
.gitignore for sensitive filesEnvironment Initialization Complete! 🎉
Your AL development environment is ready for Business Central development with optimized AI assistance.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
business-central, al-language, dynamics-365, workspace-setup
npx claudepluginhub javiarmesto/aldc-al-development-collection --plugin aldc25 skills in this plugin
/al-buildBuild, package, and deploy AL extensions to Business Central environments. ALDC workflow (Copilot prompt al-build); invoke explicitly./al-context-createGenerate or update context.md file documenting project structure, architecture, and key patterns for AI assistants and developers. ALDC workflow (Copilot prompt al-context.create); invoke explicitly./al-memory-createGenerate or update memory.md file tracking decisions, changes, and learnings throughout project development for continuity across sessions. ALDC workflow (Copilot prompt al-memory.create); invoke explicitly./al-pr-preparePrepare a clean, documented pull request draft for AL features or fixes with summary, testing notes, and checklist. ALDC workflow (Copilot prompt al-pr-prepare); invoke explicitly./architectAL Architecture and Design assistant for Business Central extensions. Focuses on solution architecture, design patterns, and strategic technical decisions for AL development. Use when requirements need architectural analysis, data model design, integration strategy, or pattern evaluation before implementation./auditIndependent, on-demand AL codebase auditor for Business Central. Judges the code against BCQuality (citable knowledge) plus native checks for what BCQuality does not reach. Read-only; advisory verdict. Default scope: objects changed vs main; full codebase on request.Other plugins' skills for the same job