You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance AI Web API integration validation and documentation
- Updated `validate-ai-webapi.js` to enforce OData version headers and Content-Type for Search Summary calls.
- Added warnings for potential issues with disabled-state envelopes and plain-scalar prompt values.
- Improved YAML parsing for site settings to handle block-literal and folded-scalar formats.
- Documented caller-suppress mode in `create-webroles/SKILL.md` to streamline deployment prompts.
- Clarified decision framework for backend integration in `decision-framework.md`, addressing field-list drift.
- Revised `SKILL.md` for `/integrate-webapi` to defer git commits and suppress deploy prompts in AI-only read mode.
- Introduced new prompt templates for agent invocation and exploration in `add-ai-webapi` references.
- Added structured follow-up questions for scope confirmation and list-trigger choices in `scope-classification.md`.
@@ -62,9 +66,9 @@ Upstream Microsoft Learn sources (already captured in the reference above — on
62
66
-**Reuse `getCsrfToken`** — if an existing helper is present (from `/add-cloud-flow`, a prior
63
67
`/add-ai-webapi` run, or any custom code), import and reuse it. Only create it if nothing
64
68
suitable exists.
65
-
-**One service file for all three APIs** — group `fetchSearchSummary`, `fetchDataSummary`, and
66
-
`fetchCaseSummary` in a single service (e.g.`src/services/aiSummaryService.ts`). Do not create
67
-
one file per endpoint.
69
+
-**One service file for both APIs** — group `fetchSearchSummary`, `fetchDataSummary`,
70
+
`fetchListSummary`, and the optional `fetchCaseSummary`wrapper in a single service (e.g.
71
+
`src/services/aiSummaryService.ts`). Do not create one file per endpoint.
68
72
-**CSRF token is mandatory; X-Requested-With is recommended.** Every summarization POST must
69
73
include `__RequestVerificationToken` (fetched from `/_layout/tokenhtml`) — without it, the
70
74
Power Pages anti-forgery layer rejects the request before the summariser ever sees it.
@@ -659,26 +663,28 @@ below.
659
663
-**Data summarization on a support-case detail page (when the caller specified the
660
664
Microsoft-shipped support-case scenario)** → find the case/incident detail page (look for
661
665
components that read a case `id` from the URL, or match names like `Case*`, `Incident*`,
662
-
`Ticket*`). Add a collapsible summary section at the top that mirrors the Microsoft-shipped
663
-
Copilot summary card. Reproduce all the affordances from the MS Learn case-page template — not
664
-
just the chevron:
665
-
666
-
| Element | Purpose | Source |
667
-
|---------|---------|--------|
668
-
| Gradient border | Visual marker that this is AI output (blue → cyan → purple) |`border-image: linear-gradient(90deg, rgb(70,79,235) 35%, rgb(71,207,250) 70%, rgb(180,124,248) 92%) 1`|
669
-
| Sparkle icon + "Summary" label | Header of the section | MS Learn SVG (paths omitted here — copy verbatim from the case-page article) |
670
-
| Chevron (rotates on toggle) | Collapses/expands the summary |`.chevron` with `transform: rotate(45deg)` / `rotate(-135deg)`|
671
-
| Shimmer block | Loading state while the request is in flight |`.shimmer` keyframes from MS Learn |
672
-
| Summary text | Output of `response.Summary`| Service call result |
673
-
| Copy button (page icon) | One-click copy of the summary to clipboard (`navigator.clipboard.writeText`) | MS Learn SVG |
674
-
| Thumbs-up + thumbs-down | User feedback buttons (wire to telemetry or leave as placeholder) | MS Learn SVGs |
675
-
| "AI-generated content may be incorrect" | Disclaimer alongside the feedback buttons | MS Learn text |
676
-
677
-
Keep the gradient border exact — it's the Copilot brand cue. Copy the two feedback SVGs and the
678
-
copy-button SVG directly from the MS Learn article's `<svg>` definitions so the section renders
679
-
identical to first-party Power Pages pages. The feedback click handlers can be no-ops (or wire
680
-
to `console.log` / a project-local analytics hook) — the important thing is the UI presence, so
681
-
users see the same affordances they would on a Microsoft-shipped portal template.
666
+
`Ticket*`). Add a collapsible summary section at the top that uses the **Copilot card visual
667
+
language** so the surface reads as AI output. The card shape is what matters — concrete
668
+
styling can adapt to the site's design system. Required affordances:
669
+
670
+
| Element | Purpose | Notes |
671
+
|---------|---------|-------|
672
+
| Gradient/accent border or background | Visual marker that this is AI output | The MS Learn case-page article uses `border-image: linear-gradient(90deg, rgb(70,79,235) 35%, rgb(71,207,250) 70%, rgb(180,124,248) 92%) 1`. Use that verbatim if the site has no design system; otherwise pick an equivalent accent that reads as Copilot/AI in this site's palette. |
673
+
| Sparkle icon + "Summary" label | Header of the section | The MS Learn SVG is the safe default; the site's icon library can replace it with an equivalent AI/sparkle glyph. |
674
+
| Chevron (rotates on toggle) | Collapses/expands the summary | Any rotating-chevron pattern is fine. |
675
+
| Loading state | Shimmer block (or the site's standard loading affordance) | Don't leave the slot empty during the request. |
676
+
| Summary text | Output of `response.Summary`| Run through the safe-markdown renderer for tabular-insight prompts. |
677
+
| Copy button | One-click copy to clipboard via `navigator.clipboard.writeText`| Standard icon button. |
678
+
| Thumbs-up + thumbs-down | User feedback affordance (handlers may be no-ops or wire to a project-local analytics hook) | Presence matters more than wiring — leaves room for telemetry later without redesign. |
679
+
| "AI-generated content may be incorrect" disclaimer | Required text alongside the feedback buttons | Use this exact wording. |
680
+
681
+
**Defaults vs. customisation.** When the site has no design system in place, copy the
682
+
MS Learn case-page CSS and SVGs verbatim — they ship working Copilot-grade output and
683
+
match what the user expects from first-party Power Pages templates. When the site does
684
+
have a design system (custom theme, tokens, icon set), match its conventions and use a
685
+
Copilot-equivalent accent — what matters is that users recognise the card as AI output,
686
+
not that every pixel matches Microsoft's reference. Do NOT skip any of the affordances
687
+
above; the row of affordances is the contract.
682
688
-**Generic data summarization (single record)** → find the detail page for the target table and
683
689
add a summary section next to the main content.
684
690
-**List summary (collection)** → find the list / history / results page for the target table
@@ -915,9 +921,44 @@ the summarization service to import it.
915
921
916
922
---
917
923
924
+
## Return value (contract with the orchestrator)
925
+
926
+
When you complete (or fail and unwind), return a structured summary so the calling
927
+
orchestrator can stage commits, present a final summary, and detect partial work. The
928
+
orchestrator's Phase 5.5 explicitly relies on this list to do per-file `git add` instead of
0 commit comments