vtk-aldev-kit
Test-first AL development toolkit for Business Central.
Every task gets torn apart before code is written. Every bug needs a test before it gets fixed.
Prerequisites
- Node.js (v18+) -- MCP servers install automatically via npx
- AL project with symbols downloaded (.alpackages/)
- Test app set up in your project (
test/app.json) -- or acknowledge you're working without tests
- One of: Claude CLI, VS Code Claude Extension, VS Code Copilot, Claude Desktop
Install
Claude CLI / VS Code Claude Extension
Both use the same plugin marketplace. Add to ~/.claude/settings.json:
"extraKnownMarketplaces": {
"vtk-aldev-kit": {
"source": { "source": "github", "url": "https://github.com/YOUR-ORG/vtk-aldev-kit" }
}
}
Add to your workspace .claude/settings.json:
"enabledPlugins": {
"aldev@vtk-aldev-kit": true
}
Restart Claude Code.
VS Code Copilot
Add to VS Code user settings.json:
"chat.plugins.marketplaces": [
{ "url": "https://github.com/YOUR-ORG/vtk-aldev-kit" }
]
Then: Extensions view > filter @agentPlugins > install aldev.
Claude Desktop
Run ./scripts/install.sh claude-desktop and follow the printed instructions, or manually:
- Paste contents of
platforms/claude-desktop/project-instructions.md into Project Instructions
- Add MCP servers from
plugins/aldev/.mcp.json to your claude_desktop_config.json
Usage
Quick Start
Open your AL project. In the chat (Copilot or Claude):
/task-review Bug: Sales Order posting fails when customer has no payment terms
This runs the adversarial review -- tears apart the request, validates against your codebase, asks hard questions, proposes architecture.
After you approve, run the fix:
/fix
This writes a test that reproduces the bug, then fixes it, then reviews.
Available Skills
| Skill | What it does | When to use |
|---|
/task-review | Adversarial requirements teardown | Start of EVERY task |
/fix | Bug fix workflow: task-review > red test > green fix > review | Bug reports |
/develop | Feature workflow: task-review > plan > red tests > implement > review | New features |
/plan | Architecture only: task-review > solution plan > stop | When you need to think before building |
/test | Add tests to existing code | Backfilling test coverage |
/review | Code review against rules | Before committing |
/init-context | Create .dev/project-context.md | First time on a project |
/status | Show current workflow state | Check progress |
Available Agents (Claude CLI / VS Code Claude Extension)
| Agent | Role |
|---|
task-reviewer | Adversarial architect -- challenges every ask |
test-engineer | Writes tests FIRST (red state), handles the compilation paradox |
al-developer | Implements code to make tests pass (green state) |
code-reviewer | Reviews against rules.md, flags violations by rule ID |
solution-planner | Architecture + implementation planning, uses all 3 MCP servers |
diagnostics-fixer | Compiler error triage + auto-fix |
bc-expert | On-demand BC platform consultation |
The Workflow
Every task follows this sequence:
1. Pre-flight check
- app.json exists?
- .alpackages/ has symbols?
- test/app.json exists? (if not: warns, asks to proceed without tests)
- al-mcp-server responds?
2. /task-review (adversarial teardown)
- Interrogates every field, table, codeunit ask
- Greps your codebase for existing solutions
- Produces specific questions you must answer
- Proposes architecture
3. You approve (or refine, or reject)
4. Red test
- Bug: test reproduces the defect
- Feature: test asserts expected behavior against stubs
5. Green implementation
- Write the minimum code to pass the test
6. Code review
- Checks against rules.md (35 rules across 5 categories)
- Zero MUST violations allowed
Skipping Tests
If your project has no test infrastructure, the toolkit asks once:
"This project has no test infrastructure. Do you want to proceed without tests?"
If yes, tests are skipped for the session. A deviation is logged. The workflow becomes: task-review > implement > review.
You can also skip tests on a per-task basis with a written justification. The skip is logged. "I'll add tests later" is not a valid justification.
Bug Fix Example
/task-review Bug: Dimension Set ID validation crashes on empty value
> Pre-flight: OK
> Phase 1: Challenges the report -- is this in our code or base BC?
> Phase 2: Finds the event subscriber in VTKSalesPostingEvents.Codeunit.al
> Phase 3: "Is the fix to guard against 0, or should we ensure DimSetID is always populated?"
> Phase 4: Proposes a nil check in the subscriber
You: "Guard against 0. Proceed."
/fix