From 9f648d782ee0ad6ba431854cc855c4ff2e6068a6 Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:51:00 +0200 Subject: [PATCH] Make breaking-changes/performance review mandatory, not keyword-triggered INDEX.md keyword matching against the task's own wording misses the two domains where a miss is expensive: breaking changes (costly for both customer apps and CURABIS AppSource apps) and Microsoft's core AI-code anti-patterns (unbounded FindSet, missing SetLoadFields, explicit Commit() inside a transaction). Requests rarely say "breaking" or "performance" even when they trigger one. Added an explicit, object-type-triggered gate to the bcquality.agent.md template so it rolls out to every CURABIS project via the setup agent, plus applied it directly to Summatim's own copy. --- custom/setup/templates/bcquality.agent.md | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/custom/setup/templates/bcquality.agent.md b/custom/setup/templates/bcquality.agent.md index d6470de..143eea3 100644 --- a/custom/setup/templates/bcquality.agent.md +++ b/custom/setup/templates/bcquality.agent.md @@ -66,6 +66,33 @@ Relevance filtering: `custom/` rules are always active in CURABIS repos — read them all; use each file's frontmatter `domain`/`keywords` only to prioritize, never to skip. +## Mandatory checks — breaking changes & performance + +`community/` and `microsoft/` are normally consulted reactively, by matching +task keywords against `INDEX.md`. That is not enough for two domains where a +missed check is expensive: breaking changes (costly for both customer apps +and CURABIS AppSource apps) and the core performance anti-patterns Microsoft +warns AI tools specifically about (unbounded `FindSet`, missing +`SetLoadFields`, explicit `Commit()` inside a transaction). A task's own +wording rarely mentions "breaking" or "performance" even when it triggers +one — the trigger is the object type touched, not the request phrasing. + +Before considering an AL task complete, consult +`microsoft/knowledge/breaking-changes/**` and `microsoft/knowledge/performance/**` +(via `INDEX.md` or `al_symbolsearch`, filtered to those two domains) — **regardless +of task wording** — whenever the diff: + +- adds, renames, or removes a table or table extension field +- adds a procedure/event with public access, or changes the signature of one + that already has public access (obsoleting per BCQuality guidance beats + changing or deleting) +- adds or changes a permission set +- writes or modifies a loop that iterates a `Record` variable + (`FindSet`/`FindFirst`/`FindLast`), or calls `Commit()` explicitly + +If none of these apply, skip — this is a targeted gate, not a blanket +re-read of both layers on every task. + ## Action CURABIS-ARCH-001: Logic belongs in codeunits, not pages.