Skip to content

Knowledge: Community Copilot domain (System.AI features) and review skill - #229

Open
Stefano Demiliani (demiliani) wants to merge 2 commits into
microsoft:mainfrom
demiliani:knowledge/copilot-development
Open

Stefano Demiliani (demiliani) wants to merge 2 commits into
microsoft:mainfrom
demiliani:knowledge/copilot-development

Conversation

@demiliani

@demiliani Stefano Demiliani (demiliani) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

BCQuality covers the Agent SDK (Community agents), but nothing covers the much more common case of extensions that build Copilot features directly on the System.AI module: Copilot Capability, Azure OpenAI, AOAI Chat Messages, and PromptDialog pages. Today the corpus only mentions these incidentally (4 hits, none normative). An agent asked to "add Copilot" to an app regularly produces a raw OpenAI HTTP call, registers the capability only on install, uses the output without checking whether the call succeeded, writes proposals during Generate, or concatenates the user's prompt into the metaprompt. None of these are caught by the compiler or analyzers.

What

A new Community domain copilot, structured like Agents: knowledge plus a community leaf review skill that runs as a top-level peer and is not composed by the Microsoft al-code-review.

Article Mistake prevented
register-copilot-capability-on-install-and-upgrade Registration that exists only in OnInstallAppPerDatabase never runs for tenants upgrading to the version that adds the capability, and an unregistered capability raises an error.
call-azure-openai-through-the-ai-module A raw HttpClient call to an LLM endpoint bypasses capability registration, admin deactivation, data-movement controls, billing, and telemetry. Calls through the module without SetCopilotCapability are also flagged.
check-aoai-operation-response-before-using-output A failed GenerateChatCompletion does not stop AL code, so GetLastMessage() without IsSuccess() stores or shows text that is not a completion.
save-promptdialog-proposals-only-when-the-user-keeps-them Writing real records in Generate/Regenerate leaves data behind after Discard; saving in OnQueryClosePage must test CloseAction.
keep-user-input-out-of-the-system-message User or record text concatenated into SetPrimarySystemMessage/AddSystemMessage gains system authority (prompt injection).

Each article has good/bad samples, false-positive carve-outs, and Microsoft Learn references. Where a statement is an inference rather than documented platform behavior, the article says so. Two cases: raw HTTP bypassing the module's controls, and the risk of mixing message roles.

Wiring

  • community/skills/review/al-copilot-review.md: new leaf (inputs pr-diff/file-path/folder-path, display domain Copilot), with a token list and one targeted cue per article. Agent SDK code stays with the Agents review.
  • evaluation/review-fixtures.json: a copilot override listing all five paired articles.
  • docs/using-bcquality.md (example prompt, coverage paragraph, domain table) and docs/troubleshooting.md (the domain is absent from a broad review).

I chose the Community layer for the same reason as Agents: a new domain with its own community-owned skill. It can be promoted together with its skill later if maintainers want that.

Validation

  • tools/Test-ReviewFixtures.ps1 (including -ChangedPathsFile and -PrepareDirectory): PASSED, 21 leaf domains, deterministic ranking selects each new article.
  • tools/Test-ReviewContract.ps1, .github/scripts/Test-SkillIndex.ps1, .github/scripts/Test-KnowledgeIndex.ps1 (419 articles): PASSED
  • validate_frontmatter.py was not run locally (no Python on this machine); CI will confirm.
  • AL samples are demonstrations, not compiled.

Independent of #228.

Add a Community-layer `copilot` domain for Copilot features built on the
System.AI module (non-agent), with five articles and good/bad samples:

- register the Copilot capability on install and on upgrade
- call Azure OpenAI through the AI module, not a raw HttpClient request
- check AOAI Operation Response before using generated output
- save PromptDialog proposals only when the user keeps them
- keep user input and record text out of the system message

Add the community leaf `al-copilot-review` (top-level peer, like
al-agents-review), register all five paired articles in the review-fixtures
overrides, and document the domain in using-bcquality and troubleshooting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@demiliani

Copy link
Copy Markdown
Contributor Author

Hi Jesper Schulz-Wedde (@JesperSchulz), could you take a look at this one, or route it to whoever should review it?

It only touches community/, docs/, and evaluation/. None of those paths has an owner in CODEOWNERS, so GitHub didn't request any reviewers automatically.

Quick summary: it adds a Community copilot domain for Copilot features built on the System.AI module (non-agent): capability registration, AI module vs raw HTTP, AOAI Operation Response checks, PromptDialog Keep it/Discard, and prompt injection via the system message. It also adds a leaf skill al-copilot-review, which runs as a top-level peer like al-agents-review.

Two questions where your input would help:

  1. Layer: I used Community for the same reason as Agents (a new domain with its own skill). Would you rather have it in the Microsoft layer from the start?
  2. CODEOWNERS: should /community/ get a default owner, so community PRs don't sit without a reviewer?

Thanks!

Align the Relevance section with the Microsoft leaves: when the orchestrator
supplies no target version, use the major version of the app.json
application field, so the [23..] Copilot articles filter instead of
staying conditionally applicable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JesperSchulz

Copy link
Copy Markdown
Contributor

I am on a short fall break, but let me try to find someone to take a look :-) Next week I'm back with full focus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants