Goal — the goal we'll build together today
We start by seeing where we're going. A real Business Central extension, working, with MCP API and interactive agent. All built with ALDC.
What I'm going to show you in these 7 minutes
A demo of IncidenciasFrontier, my real production extension for Business Central. This is not a toy case. It's code that works, that solves an operational problem, and that shares 80% of the DNA with what you're going to build in the next 45 minutes.
The goal is for you to leave Step 1 with a clear mental image of the destination. Then we'll talk about how to get there.
Working AL extension
Role Center with real cues, setup wizard, lifecycle with validations, own technician master. Compiled and deployed in sandbox.
MCP Server with REST API
The same project exposes an MCP server that AI agents can consume. Integration ready for external chatbots and copilotos.
Interactive agent in Claude.ai
A conversational app inside Claude that queries and creates incidents. The complete "BC ↔ API ↔ Agent" cycle in action.
This case exists because ALDC worked
The first version took an afternoon. This isn't marketing: it's the real architect → spec → conductor flow applied to a concrete business case. In the next steps you're going to replicate this flow with your own hands.
Green field — ALDC pipeline from start to finish
You start from scratch with the mini PRD v0.1. You run architect, spec, conductor and Phase 1 on your machine. At the end it compiles and you have 11-12 AL objects generated by you.
The scope of Sprint 0
In a real project, ALDC can run the full PRD in ~3 hours. Today we don't have 3 hours. What we are going to do is the pattern a partner uses in production: a minimum Sprint 0 to validate that ALDC has understood the domain before releasing the full scope.
| Dimension | v0.1-live (what we do today) | v1.0 complete (reference) |
|---|---|---|
| Tables | 4 | 5 (+Cue) |
| TableExtensions | 0 | 1 |
| Enums | 3 | 4 |
| Codeunits | 1 | 2 |
| Pages | 3 | 8 |
| Profile + RoleCenter | — | ✓ |
| Wizard | — | 3 steps |
| Demo Data | — | idempotent |
| Permission Sets | 2 | 3 |
| TOTAL OBJECTS | ~11 | ~25 |
| ALDC TIME | ~15 min | ~3 h |
Steps to follow
Follow the steps in order. Each step has its prompt to copy and paste into Copilot Chat or the agent you use. If something gets stuck, check the "Plan B" for each step.
Prepare the workspace
Clone the exercises repo (aldc-workshop-starters) and open the 04-greenfield-starter/ folder in VS Code. This folder has the empty AL project with app.json already pre-configured with BRI prefix, range 50900-50929 and base dependencies.
In the prd/ subfolder you'll find PRD-v0.1-live-mini.md. That is the only document you'll use today for the green field.
Open Copilot Chat sidebar (or the agent client you use) and verify it can read the workspace files.
04-greenfield-starter/ workspace. Copilot Chat active. File prd/PRD-v0.1-live-mini.md visible.
Launch architect with the mini PRD
Paste this prompt into Copilot Chat. ALDC will read the mini PRD, generate architecture.md and then spec.md. When done, it will make an explicit HITL gate: it will ask for your confirmation.
@al-architect Soy el consultor técnico del partner implantador de Barista Incidents para CRONUS USA, Inc. Te paso el documento PRD v0.1-live que encontrarás en `prd/PRD-v0.1-live-mini.md`. Es una versión reducida del PRD completo — un Sprint 0 para validar que ALDC ha entendido el dominio antes de soltarle el alcance completo. Por favor: 1. Lee el PRD completo. 2. Genera `architecture.md` siguiendo tu guía habitual, respetando estrictamente: - Prefijo BRI en TODOS los objetos - Rango IDs 50900-50929 - Publisher Circe Innovation - 4 tablas principales + 3 enums + 1 codeunit + 3 pages + 2 permission sets = ~11 objetos - El campo Assigned To de Incident DEBE tener TableRelation a Support Technician (NO a la tabla User estándar de BC — la PK de User es User Security ID, no User Name) - Los 2 permission sets DEBEN incluir entradas X sobre las 3 pages y el codeunit, no solo tabledata 3. Aplica Skills Evidencing al top del documento: declara las skills que usas (skill-architecture, skill-data-model, skill-permissions). 4. Si detectas ambigüedades en el PRD, documéntalas en una sección "Open Questions" al final. NO rellenes por tu cuenta. 5. Tras generar architecture.md, PARA y pregúntame "¿Apruebas avanzar a al-spec.create?" antes de continuar. 6. Cuando apruebe, genera spec.md con el detalle de implementación completo. Empieza cuando estés listo.
architecture.md and spec.md generated in .github/plans/barista-mini/. The architect will have asked for confirmation before spec.
04-greenfield-starter/reference/ you have reference-architecture.md and reference-spec.md already generated. If ALDC diverges a lot or takes more than 7 minutes, switch to these reference files and continue with step 3.
Execute Phase 1 Foundation with the conductor
The conductor is the agent that executes the spec phase by phase. We tell it to only do Phase 1 (Foundation): the 4 tables + 3 enums + 2 base permission sets. Not yet the logic or the pages.
@al-conductor Tienes architecture.md y spec.md aprobados del proyecto Barista Incidents Sprint 0. Procede con Phase 1 Foundation exclusivamente. No avances a ninguna otra fase hasta que yo apruebe. Objetivos de Phase 1: - Crear las 4 tablas: Incident, Incident Category, Incident Comment, Support Technician - Crear los 3 enums: Status (5 valores), Priority (4 valores), CommentType (3 valores) - Crear los 2 permission sets base con entradas tabledata RIMD/R según el rol Reglas operativas: - Prefijo BRI obligatorio en todos los objetos - IDs en rango 50900-50929 - NoImplicitWith activo, usar Rec. prefix y Enum::"..."::"..." cualificados - Incident Comment debe ser append-only: OnModify y OnDelete con Error - Support Technician con campos Code, Name, Email, Active + keys PK y SK(Active) - Campo Assigned To de Incident con TableRelation a Support Technician WHERE Active=CONST(true). NUNCA usar tabla User. Al finalizar: - Compilar y verificar 0 errores - Generar phase-1-complete.md con el resumen - PARAR y preguntarme "¿Apruebas Phase 2 Core Logic + UI?" antes de continuar Empieza cuando estés listo.
.Table.al files + 3 .Enum.al + 2 .PermissionSet.al generated in src/. Clean compilation. The conductor asks you whether to continue.
reference-architecture.md explicitly with "Use exactly these IDs and names".
Execute Phase 2 Core Logic + UI
You approve the previous HITL gate. The conductor now generates the Incident Management codeunit + the 3 pages + updates the permission sets with X entries.
Phase 1 aprobada. Procede con Phase 2 Core Logic + UI. Objetivos de Phase 2: - Codeunit BRI Incident Management con los 5 procedures públicos: * CreateIncident (asigna No. vía NoSeriesManagement, Status=New) * UpdateStatus (valida transición, genera comentario StatusChange) * AssignIncident (valida técnico activo, genera comentario Assignment) * AddComment (inserta comentario tipo User) * ValidateStatusTransition (procedure público para consultar validez) - 3 pages: * BRI Incident List (UsageCategory=Lists, StyleExpr en Status y Priority, CardPageId) * BRI Incident Card (3 FastTabs, FactBox Comments, 3 acciones cableadas al codeunit) * BRI Incident Comments Part (ListPart, editable=false, SubPageLink) - Actualizar los 2 permission sets añadiendo entradas X sobre las 3 pages y el codeunit Reglas críticas: - TODA mutación de tabla Incident va vía procedure del codeunit (cero Rec.Modify en actions) - Las acciones de la Card (ChangeStatus, AssignTechnician, AddComment) deben llamar al codeunit REALMENTE. No stubs con Message(). - Para AddComment usa RunModal de una page StandardDialog pequeña si necesitas capturar input del usuario - Matriz de transiciones según spec (no permitir Closed directo desde New) - Compilar limpio Al finalizar: - phase-2-complete.md - Pregúntame si procedo con el commit final Empieza.
AddComment wired to the codeunit. Compiles. Extension ready to publish.
Cherry on top — only if time allows
If you finished Sprint 0 with margin, you can ask ALDC to add ONE of these 3 pieces (choose the one you most want to see):
Option G-A · Simple Wizard — NavigatePage with 3 steps for number series setup.
Option G-B · Demo Data Generator — Idempotent codeunit that creates 5 categories + 5 technicians + 15 demo incidents.
Option G-C · An API Page — OData v4 API page for incidents with GET/POST.
One only, not all three. Whoever reaches this step raise your hand and we'll vote in the room.
Brown field — audit, diagnose, correct
Imagine you receive an already-built project with 2 issues reported by the client. Today you learn to use ALDC + audit to detect causes and apply corrections.
The client CRONUS ran a weekend smoke test and wrote to you this morning reporting two blocking problems. The go-live was planned for Friday.
Issue #1 · Role Center · "My Open Incidents" cue shows incorrect counter Medium
Reported by Alice Martinez (support agent): the "My Open Incidents" cue in the Role Center shows 8 incidents, but clicking it only shows 5 actually open ones. The other 3 have been in Resolved status since last week.
Expected: the cue counts only incidents NOT Resolved, Closed or Cancelled. Observed: counts all those assigned to the user, without filtering by status.
Issue #2 · Card · "Add Comment" action does not add comments High
Reported by Bob Chen and David Patel (support agents): when clicking "Add Comment" in an incident card, an informational message appears but no comment is added to the table. Automatic comments (Status Change, Assignment) do work. The problem is that the UI action is not wired to the codeunit procedure.
Impact: blocking. Agents cannot leave free notes about the progress of each incident.
TICKET DE SOPORTE · CRONUS-2026-042 De: soporte@cronus-usa.com Para: partner-implantacion@example.com Fecha: lunes 27 de abril de 2026, 09:15 AM Asunto: Incidencias detectadas en smoke test funcional de Barista Incidents v1.0 Prioridad: Alta Estado: Abierto --- Buenos días equipo, Os escribo con dos incidencias detectadas durante el smoke test funcional que hemos realizado este fin de semana sobre la extensión Barista Incidents v1.0 que nos entregasteis el viernes. El equipo de soporte al completo (6 personas) ha estado trabajando con la aplicación durante el sábado y domingo con datos reales. Hemos encontrado dos problemas que necesitan resolución antes de dar luz verde al despliegue en producción. El resto de funcionalidades se comporta correctamente y el equipo está contento con el Role Center y el flujo general. Os agradecemos una resolución esta misma semana si es posible, el go-live estaba previsto para el viernes 1 de mayo. Saludos, JP — Jefe de Proyecto · CRONUS USA, Inc. --- ISSUE #1 — Role Center · cue "My Open Incidents" muestra contador incorrecto Severidad: Media Reportado por: Alice Martinez (agente de soporte) Descripción: Alice reporta que al iniciar sesión con su perfil "Barista Support Agent", el cue "My Open Incidents" del Role Center le muestra 8 incidencias, pero al hacer clic y abrirse la lista filtrada solo ve 5 realmente abiertas. Alice ha investigado y ha identificado que entre las 8 contadas están 3 incidencias que ella resolvió la semana pasada y que ya están en estado Resolved. No deberían contar para este cue. Comportamiento esperado: El cue "My Open Incidents" debe contar únicamente las incidencias asignadas al usuario actual que NO estén en estado Resolved ni Closed ni Cancelled. Solo las que aún requieren trabajo activo. Comportamiento observado: El cue está contando todas las incidencias asignadas al usuario actual, sin filtrar por estado. Incluye las Resolved que ya están cerradas desde el punto de vista operativo. Información técnica: El cue vive en la tabla BRI Incident Cue como FlowField My Open Incidents. --- ISSUE #2 — Card Incident · acción "Add Comment" no añade comentarios Severidad: Alta Reportado por: Bob Chen y David Patel (agentes de soporte) Descripción: Bob y David reportan que al pulsar la acción "Add Comment" en la ficha de una incidencia, no se añade ningún comentario. El sistema muestra un mensaje informativo tipo "Add Comment feature will be available soon" pero al cerrarlo y revisar el FactBox de comentarios, no aparece nada nuevo. Bob ha verificado que los comentarios automáticos SÍ funcionan: cuando cambia el estado aparece un comentario de tipo "Status Change". Cuando asigna a otro técnico aparece un comentario "Assignment". Lo que no funciona es añadir un comentario libre. Esto bloquea el caso de uso principal del agente: registrar el progreso de la resolución en sus propias palabras (ej: "llamado al cliente, confirma lote 2025-B-142", "pendiente de que finanzas apruebe el abono"). Comportamiento esperado: Al pulsar "Add Comment" debería aparecer un diálogo que permita al agente escribir texto libre. Al confirmar, el sistema debería guardar ese comentario en la tabla BRI Incident Comment con Comment Type = User, Created By = UserId, Created At = ahora, Incident No. = incidencia actual. Tras guardar, el comentario debería aparecer inmediatamente en el FactBox sin refrescar. Comportamiento observado: La acción está presente y clicable. Al pulsarla se muestra un Message informativo pero no se llama al procedure de añadir comentario. El comentario no se guarda. El FactBox no se actualiza. Información técnica: El codeunit BRI Incident Management tiene un procedure público AddComment(var Incident: Record Incident; CommentText: Text[2048]) que está implementado correctamente — si se llama directamente desde AL, inserta el comentario sin problema. El problema está en la UI: la acción de la Card no está cableada a ese procedure. Impacto: bloqueante para el despliegue. --- Qué os pedimos: 1. Analizar el repositorio con la metodología ALDC + auditor de pipeline. 2. Resolver los dos issues aplicando las correcciones necesarias. 3. Devolvernos el repositorio corregido con: - Documentación de las correcciones aplicadas - Test manual de verificación por issue - Changelog describiendo qué cambió Quedamos a vuestra disposición. JP — CRONUS USA, Inc.
Steps to follow
Clone the v3 repo (brown field)
Close the green field workspace and open 04-brownfield-starter/ from the exercises repo.
Open it in a new VS Code window.
04-brownfield-starter/. Copilot Chat active on this workspace.
Launch the auditor on the repo
Paste this prompt into Copilot Chat with @workspace. The auditor will go through the ALDC pipeline artifacts and generate a structured sheet with 19 sections. It does not modify code, only observes.
@workspace IMPORTANTE: No eres un agente de ALDC. No propongas mejoras al código ni al pipeline. No sugieras refactors. Tu única función es observar, extraer y reportar hechos. Si detectas algo cuestionable, lo reportas en la sección 19 como observación factual, sin proponer solución. Actúa como auditor del pipeline ALDC. Tienes acceso al workspace del proyecto Barista Incidents v1.0. Tu trabajo es recorrer los artefactos generados por ALDC y producir una FICHA ESTRUCTURADA que permita diagnosticar la salud del proyecto. ARTEFACTOS QUE DEBES REVISAR: - app.json (metadata de la extensión) - .github/plans/*.md (architecture, spec, plan, phase-complete summaries, memory.md) - src/ completo (todos los objetos AL generados) - Permission sets - Cualquier fichero memory.md, decisions.md o REFINEMENTS-LOG.md INSTRUCCIONES CRÍTICAS: 1. NO generes código ni modifiques nada. Solo lee y extrae. 2. NO especules. Si un dato no está, escribe "no encontrado". 3. Céntrate en hechos verificables, no en opiniones. 4. La ficha debe caber en aproximadamente 120 líneas. 5. NO incluyas sección de git history. Los partners trabajan sobre un clone reciente sin historial propio. Produce la ficha con estas 19 secciones: 0. Identificación (workspace, ruta local) 1. app.json (id, name, publisher, version, idRanges, runtime) 2. Inventario de objetos AL (conteo por tipo) 3. Catálogo completo de objetos (ID, Tipo, Nombre, Fichero) 4. Modelo de datos (campos, PK, keys, FlowFields por tabla) 5. Enums (nombre, valores, Extensible) 6. Lógica de negocio (codeunits, procedures públicos, IntegrationEvents) 7. Capa UI (pages, StyleExpr, FactBoxes, acciones) 8. Wizard (pasos, registro en Assisted Setup) 9. Capa API / integración 10. Permission Sets (entradas tabledata + X sobre pages/codeunits) 11. Demo data (categorías, técnicos, incidencias, idempotencia) 12. Cumplimiento criterios de aceptación del PRD 13. Skills Evidencing declaradas en phase-complete docs 14. HITL gates documentados 15. Desviaciones respecto a spec/architecture 16. Open Questions heredadas 17. Tiempos (si están documentados) 18. Calidad de compilación 19. NOTAS DEL AUDITOR — observaciones factuales sobre red flags detectadas Presta especial atención a: - El comportamiento real del cue "My Open Incidents" (tabla BRI Incident Cue, FlowField CalcFormula) - El cableado real de la acción AddComment en la page BRI Incident Card Cuando termines, presenta la ficha completa. No añadas comentarios antes ni después.
Cross the sheet with the reported issues
With the auditor's sheet and ticket CRONUS-2026-042 at hand, take 3 minutes to locate exactly where the defects are:
- Locate in the sheet the section that talks about CueGroups and FlowField filters (around section 8-10). Does the auditor flag the "My Open Incidents" filter?
- Locate the section that audits UI actions and their wiring to codeunits. Does it mention AddComment?
- If yes on both: perfect, the auditor detected them. If no: note the gaps for the lessons in Step 4.
Optional: if you want a more elaborate analysis, you can copy the audit sheet + ticket to Claude.ai or Gemini or ChatGPT with access to the repo and ask for a reasoned correction plan. This is exactly the flow you would follow in a real project.
src/DataModel/BRIIncidentCue.Table.al (FlowField filter) and src/Pages/BRIIncidentCard.Page.al (AddComment action).
Cross-analysis, report and resolution
Here we apply a more mature ALDC methodology: plan before executing, document when closing. Instead of launching direct corrections, we ask ALDC to first cross the audit with the ticket and produce an analysis report. We review the report (HITL gate). Then it executes the corrections. When done, it attaches final documentation.
4.a · Cross-analysis + report
After having the auditor's sheet and the ticket, we ask ALDC to produce an analysis report per issue. This allows reviewing the diagnosis before touching code.
Contexto: - Tienes la ficha de auditoría generada en el paso anterior - Tienes el ticket CRONUS-2026-042 con 2 issues reportados por el cliente - El workspace es el proyecto Barista Incidents v1.0 que el cliente recibió Tarea: Cruza la información de la ficha de auditoría con los 2 issues del ticket y genera un documento `analysis-report.md` en `.github/plans/barista-incidents/` con esta estructura: 1. Resumen ejecutivo (2-3 frases) 2. Issue #1 · My Open Incidents cue filter - Observación del auditor (cita de la sección relevante) - Fichero y field afectados exactamente identificados - Hipótesis causal (por qué pasa) - Plan de corrección (qué hay que cambiar, cómo de invasivo) - Test manual propuesto para verificar resolución 3. Issue #2 · AddComment UI - Observación del auditor - Fichero y action afectados - Hipótesis causal - Plan de corrección (con opciones si hay varias vías) - Test manual propuesto 4. Riesgos colaterales (¿algún cambio puede romper algo no relacionado?) 5. Orden de ejecución recomendado (qué corregir primero y por qué) Pistas técnicas útiles para tu análisis: - Para el Issue #1, investiga si el enum "BRI Incident Status" incluye Resolved como valor a excluir del CalcFormula del FlowField. La plataforma BC aplica automáticamente el FlowFilter "User ID Filter" con UserId() en CueParts dentro de RoleCenter, así que el filtro por usuario funciona por convención — el problema suele estar solo en el filtro de Status. - Para el Issue #2, evalúa estas alternativas para capturar input del usuario en AL: A) ConfirmationDialog con RunModal (tiene timing issues conocidos con FactBox refresh) B) List con AutoSplitKey + DelayedInsert + MultipleNewLines (patrón Sales Comment Sheet, estándar BC, más robusto) Recomendación: evaluar ambas y proponer la B salvo que haya razón de peso, porque evita los problemas de timing entre RunModal y OnInsert que has podido ver en proyectos previos. Reglas: - NO apliques correcciones aún. Solo analiza y propone. - Si tienes dudas sobre el plan de corrección del Issue #2, enuncia las alternativas con pros/contras. - Al terminar, muéstrame el reporte y pregúntame "¿Apruebas el plan de corrección propuesto?" como HITL gate. - NO avances a ejecutar correcciones hasta que yo apruebe explícitamente.
analysis-report.md generated with reasoned diagnosis of the 2 issues. ALDC stopped waiting for your approval.
4.b · Correction execution + documentation
Approved the analysis, ALDC applies the corrections following its own plan and when closing attaches the final solutions for changelog.
Plan de corrección aprobado. Procede con la ejecución siguiendo el orden recomendado del analysis-report.md. Reglas operativas: 1. Aplica los cambios en orden (primero el issue marcado como "corregir primero") 2. Tras cada cambio: - Compila y verifica 0 errores ni warnings nuevos - Muestra el diff del fichero modificado - Resume en 2-3 líneas qué hiciste 3. Si durante la ejecución encuentras una dificultad no prevista en el plan (por ejemplo, la sintaxis AL del FILTER, o la falta de InputDialog nativo en BC 28), para y pregunta antes de improvisar. 4. NO hagas commits intermedios. Todo va en un único commit al final. Cuando ambos issues estén corregidos y compilando limpio: 5. Genera un documento final `solution-notes.md` en `.github/plans/barista-incidents/` con esta estructura: - Resumen de correcciones aplicadas - Issue #1: fichero modificado, diff exacto aplicado, test manual de verificación con pasos concretos - Issue #2: fichero modificado, diff exacto aplicado, test manual de verificación con pasos concretos - Cambios colaterales aplicados (si hubo alguno: cambios de permisos, nuevos objetos creados, etc.) - Changelog listo para incluir en release notes 6. Pregúntame si procedo con el commit final con mensaje `fix(brownfield): resolve CRONUS-2026-042 issues #1 and #2`.
solution-notes.md generated with diff + manual test per issue + changelog. Ready to commit.
al_build and fix the errors. If it loses the thread: remind it "Only fix issue #1 and #2 from the ticket. No other changes." If it takes more than 10 minutes: switch to the reference solution in 04-brownfield-starter/reference-solution/ and continue with Step 4.
We've closed the complete cycle
Project received → ALDC audit → cross-diagnosis with ticket → targeted correction. This is exactly what you'll do in any brown field project with technical inheritance. And you did it in 15 minutes.
Lessons — what we take away
4 practical conclusions after three real ALDC iterations on the same case. With empirical evidence, not marketing.
The deterministic and the creative in ALDC
I ran the same PRD three times on three consecutive weekends. Publisher, nuclear data model, lifecycle: identical. Prefixes, integration layer, interpretation of "assign to user": diverged. ALDC is deterministic in the fundamentals and creative in details. That's why HITL gates are not optional.
The User Name bug that caught me twice
The first two iterations failed on the same thing: User Name is not the PK of the BC User table. ALDC interprets "assign to user" and falls into the trap. v3 solved it with its own Support Technician table because the PRD explicitly anticipated it. Writing PRDs is anticipating known BC patterns.
Audit as code
Three audit sheets generated on three Mondays. Each revealed what the human eye doesn't see reading code: decorative HITL gates, contaminated memory.md, discrepancies between documentation and filesystem. The audit is not optional. It's part of the pipeline.
The PRD as prompt engineering
v1 met 6 of 8 acceptance criteria. v2 met 4 of 8. v3 met 9 of 9. Same ALDC, same sandbox, same methodology — only the PRD changed. In today's brown field: 2 issues resolved in 7.5 min (vs 35 estimated) when ALDC received the correct BC pattern as a hint. Writing PRDs and knowing how to guide the agent towards canonical patterns is the new skill a BC partner needs to work with ALDC in production.
Thanks for hitting keys
In the public repo you have: the full PRD v1.0-workshop, the 3 iterations with their audits, the pipeline prompts, the reusable auditor prompt, the fallbacks, and the 4 lessons learned at length. And everything that didn't fit today: APIs, CIRCE, MCP, tests.
github.com/javiarmesto/aldc-workshop-startersJavier Armesto · VS Sistemas · MVP Business Central & Azure AI