Agentic Workflows - Layer 2: Agent Primitives¶
Complete execution processes implemented as .prompt.md files providing systematic workflows for specific AL development tasks in Business Central.
π What Are Agentic Workflows?¶
Agentic Workflows (formerly called "prompts") are: - Task-specific execution processes with step-by-step guidance - Complete workflows from planning through validation - Tool-integrated processes that can execute AL commands - Reusable templates for common development scenarios
π― How to Use Agentic Workflows¶
Activate workflows explicitly when needed:
@workspace use [workflow-name]
Examples:
@workspace use al-initialize
@workspace use al-diagnose
@workspace use al-build
π¦ Available Workflows (18 files)¶
Environment & Setup¶
| File | Purpose | When to Use |
|---|---|---|
| al-initialize | Complete environment and workspace initialization | First-time setup, new projects, onboarding |
Development & Diagnostics¶
| File | Purpose | When to Use |
|---|---|---|
| al-diagnose | Runtime debugging and configuration troubleshooting | Debugging issues, auth problems, symbol errors |
| al-spec.create | Create functional specifications | Planning new features |
| al-pages | Design and implement page objects | Creating UI components |
| al-events | Implement event publishers/subscribers | Extending BC without modifying base |
Build & Deployment¶
| File | Purpose | When to Use |
|---|---|---|
| al-build | Build, package, and deploy extensions | Building for release, deployment |
| al-permissions | Generate permission sets | Setting up security |
| al-migrate | Data migration strategies | Moving data between systems/versions |
Quality & Performance¶
| File | Purpose | When to Use |
|---|---|---|
| al-performance.triage | Quick performance diagnosis (static analysis) | Rapid performance assessment, code review |
| al-performance | Deep performance analysis (runtime profiling) | Slow queries, bottlenecks, optimization |
Code Review & Documentation¶
| File | Purpose | When to Use |
|---|---|---|
| al-pr-prepare | Prepare pull request documentation | Before code review/merge |
| al-context.create | Generate project context.md file | Setting up project for AI assistants |
| al-memory.create | Generate/update memory.md file | Maintaining session continuity |
AI/Copilot Features¶
| File | Purpose | When to Use |
|---|---|---|
| al-copilot-capability | Register Copilot capability | Adding AI features to BC |
| al-copilot-promptdialog | Create PromptDialog pages | Building Copilot UI |
| al-copilot-test | Test Copilot features | Validating AI functionality |
| al-copilot-generate | Generate Copilot code from natural language | Creating AI-powered features |
Translation & Localization¶
| File | Purpose | When to Use |
|---|---|---|
| al-translate | XLF translation file management | Localization workflows |
Note: Total of 18 workflow files matching the prompts/ directory contents.
ποΈ Workflow Structure¶
Each workflow follows this pattern:
1. Objective¶
Clear statement of what the workflow accomplishes
2. Prerequisites¶
- Required context (files, settings)
- Required tools
- Required knowledge
3. Step-by-Step Process¶
Detailed instructions with: - Context gathering - Analysis phase - Implementation steps - Validation gates
4. Validation Criteria¶
How to verify success
5. Common Issues & Solutions¶
Troubleshooting guide
π‘ Best Practices¶
Choosing the Right Workflow¶
graph TD
Start[Task to Complete] --> Setup{First Time?}
Setup -->|Yes| InitFlow[al-initialize]
Setup -->|No| Type{Task Type?}
Type -->|Issue/Bug| Diagnose[al-diagnose]
Type -->|Build/Deploy| Build[al-build]
Type -->|Performance| Perf{Quick or Deep?}
Type -->|New Feature| Spec[al-spec.create]
Perf -->|Quick Check| Triage[al-performance.triage]
Perf -->|Deep Analysis| PerfFull[al-performance] Workflow Combinations¶
Common workflow sequences:
-
New Feature Development
-
Performance Issue
-
Security Setup
-
Integration Work
-
First-Time Setup
Integration with Other Primitives¶
Workflows complement: - Instructions - Automatically loaded context during workflow execution - Agents - Strategic consultation before/after workflow execution - Use al-architect to design before implementing workflow (entry point for new features) - Use al-conductor for TDD orchestration on medium/high complexity tasks - Use al-debugger when workflow execution reveals issues
π Workflow Evolution¶
This collection has evolved to optimize clarity and completeness:
Current State (v2.8)¶
18 Agentic Workflows:
al-initialize- Environment & workspace setupal-diagnose- Debug & troubleshootal-build- Build/package/deployal-events- Event implementational-performance- Deep performance profilingal-performance.triage- Quick performance checkal-permissions- Permission set generational-migrate- Version migrational-pages- Page design & UIal-spec.create- Functional specificationsal-pr-prepare- Pull request preparational-context.create- Project context generational-memory.create- Session memory managemental-copilot-capability- Copilot capability registrational-copilot-promptdialog- PromptDialog creational-copilot-test- Copilot feature testingal-copilot-generate- AI code generational-translate- XLF translation management
Historical Changes¶
v2.3 Consolidations: - al-setup + al-workspace β al-initialize - al-debug + al-troubleshoot β al-diagnose
v2.7 Additions: - al-context.create - Project context for AI assistants - al-memory.create - Session continuity - al-copilot-generate - Natural language code generation
π Related Resources¶
- Collection Manifest:
collections/al-development.collection.yml - Framework Reference:
docs/framework/ai-native-instructions-architecture.md - User Guide:
al-development.md - Contributing:
CONTRIBUTING.md
π Validation¶
Run npm run validate to verify: - All workflow files exist - Frontmatter is properly formatted - File naming conventions are followed - Required fields are present
π― Quick Reference¶
| Need to... | Use Workflow |
|---|---|
| Set up new project/environment | al-initialize |
| Debug or troubleshoot issues | al-diagnose |
| Build & deploy | al-build |
| Fix performance issues | al-performance.triage β al-performance |
| Create new feature | al-spec.create β al-pages |
| Add events | al-events |
| Set up security | al-permissions |
| Migrate data | al-migrate |
| Prepare for review | al-pr-prepare |
Framework Compliance: These workflows implement AI-Native Instructions Architecture - Layer 2 (Agent Primitives) providing systematic execution processes that coordinate Instructions and Agents for complete task fulfillment.
Version: 2.8.0 Total Workflows: 18 Last Updated: 2025-11-25