Commit c5ce267
[Pages] SDM-to-EDM: augmented prompts for plugin + DME remediation
The skill should not modify customer-owned code directly. Plugins live in the
customer's plugin source repo, and Dataverse schema changes should go through
a reviewable solution package — not direct API calls. For both, the script
now generates paste-ready augmented prompts that the user takes to a fresh
Claude Code session, which then does the work and surfaces a diff or artifact
for review before applying.
Plugin remediation prompt:
- Static template at scripts/prompts/plugin-remediation.template.txt with a
{{PLUGIN_FINDINGS_BLOCK}} placeholder
- Filled at runtime with the customer's actual plugin findings (name, target
entity, step name) — categorized as Microsoft (no action) / Adxstudio
(verify V2) / custom (refactor)
- Instructs the receiving session to locate plugin source, refactor entity
references to powerpagecomponent + inject powerpagecomponenttype filter on
queries, preserve adx_* attribute references (still valid logical names on
EDM), update step registration metadata, and show a diff before saving
- Explicit constraints: no production push, no guessing file locations, no
rewriting GetAttributeValue<T>('adx_name') calls
DME remediation prompt (solution-package approach):
- Static template at scripts/prompts/dme-remediation.template.txt with a
{{DME_TABLE_GROUPS_BLOCK}} placeholder
- Filled with per-table groupings already produced by
buildDataModelExtensionChecklists()
- Instructs the receiving session to ask for a publisher prefix, build a
Dataverse solution package with new custom tables and lookups to
powerpagecomponent, and produce a .zip ready for pac solution import
- Documents the data-migration step (Power Automate flow OR C# console app
with batched ExecuteMultipleRequest) — outside solution scope, user runs
separately
- Explicit constraints: no direct Dataverse API calls, all schema decisions
reviewed before pack, default to Unmanaged solutions, ask before using
existing publishers
Surfacing to user (three places):
- Standalone .txt files in <OUTPUT_DIR>/ (plugin-remediation-prompt.txt and
dme-remediation-prompt.txt) so offline users can access
- Embedded in skill-execution-report.html under collapsible <details> blocks
with copy-to-clipboard buttons (self-contained navigator.clipboard.writeText
— no external JS)
- Terminal banner at end of script run with file paths and copy-paste
instructions
Bug fix in categorizePlugin():
- Old regex (Step name\s*:\s*([^\n]*?)(?:\s\s+Entity Name|$)) mis-handled
the empty-step case (e.g., Microsoft.Crm.* plugins with no step name),
greedily capturing 'Entity Name : <entity>' as the step
- Replaced with split-by-2+-whitespace parser + per-field label matching,
which correctly returns null for empty fields
SKILL.md step 2.2 section 7:
- Replaced the generic 'user must, in the Data workspace...' manual
remediation with paste-ready augmented-prompt callouts pointing to the
.txt files and explaining how to use each
DESIGN.md additions:
- New 'Augmented Prompts for Customer-Owned Code' section documenting the
design rationale (why prompts beat direct execution), template storage
(scripts/prompts/), runtime substitution, three surfacing locations, and
coverage table (plugin/DME yes; custom workflows still doc-text-only
until per-workflow Dataverse queries are added)
Sample reports regenerated against comprehensive-sample.csv (51 findings)
to demonstrate the new augmented-prompt sections end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4877781 commit c5ce267
7 files changed
Lines changed: 994 additions & 69 deletions
File tree
- plugins/power-pages/skills/migrate-sdm-to-edm
- scripts
- prompts
- sample-reports
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
255 | 307 | | |
256 | 308 | | |
257 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
608 | 608 | | |
609 | | - | |
| 609 | + | |
610 | 610 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
616 | 615 | | |
617 | | - | |
| 616 | + | |
618 | 617 | | |
619 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
620 | 630 | | |
621 | 631 | | |
622 | 632 | | |
| |||
0 commit comments