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
Copy file name to clipboardExpand all lines: plugins/power-pages/skills/migrate-edm-to-spa/SKILL.md
+49-11Lines changed: 49 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ Migrate a classic Enhanced Data Model (EDM) Power Pages website to a modern stat
24
24
-**Explain every inference**: Each migrated route, component, data dependency, permission, and unsupported feature must trace back to static evidence, runtime evidence, or both.
25
25
-**Preserve user control**: Ask before downloading a site, logging in through the browser, testing destructive form actions, writing SPA files, or invoking follow-up skills.
26
26
-**Use existing Power Pages skills**: Reuse `/create-site`, `/integrate-webapi`, `/setup-auth`, `/create-webroles`, `/test-site`, and `/deploy-site` instead of duplicating their implementation logic.
27
+
-**Deploy to hydrate metadata**: Deploy the scaffolded SPA before metadata-dependent migration work is finalized. `/deploy-site` creates the `.powerpages-site` metadata folder that follow-up skills and migration steps need for table permissions, web roles, site settings, server logic, and related YAML.
27
28
-**Static SPA only**: Supported target frameworks are React, Vue, Angular, and Astro. Do not generate Next.js, Nuxt, Remix, SvelteKit, Liquid, or server-rendered output.
28
29
29
30
**Initial request:** $ARGUMENTS
@@ -45,7 +46,7 @@ Migrate a classic Enhanced Data Model (EDM) Power Pages website to a modern stat
45
46
4.**Runtime Discovery** — Use Playwright to crawl routes, observe auth transitions, capture network calls, and identify hidden behavior.
46
47
5.**Build Migration Model** — Combine static and runtime evidence into a confidence-scored canonical site model.
47
48
6.**Review Migration Plan** — Present the SPA route/component/data/security plan and get user approval before writing files.
48
-
7.**Scaffoldand Migrate SPA** — Create or reuse the target SPA project and re-author pages, components, services, and configuration.
49
+
7.**Scaffold, Deploy, and Migrate SPA** — Create or reuse the target SPA project, deploy once to hydrate `.powerpages-site`, then re-author pages, components, services, and metadata.
49
50
8.**Verify Migration** — Build and browse-test the SPA, compare against EDM evidence, and produce a drift report.
50
51
9.**Summarize and Hand Off** — Record skill usage, summarize output, and recommend focused next skills.
51
52
@@ -490,9 +491,9 @@ If the user requests revisions, update the model and plan artifacts, then ask ag
490
491
491
492
---
492
493
493
-
## Phase 7: Scaffold and Migrate SPA
494
+
## Phase 7: Scaffold, Deploy, and Migrate SPA
494
495
495
-
**Goal:** Create or update the target SPA code siteaccording to the approved migration plan.
496
+
**Goal:** Create or update the target SPA code site, deploy it once to create `.powerpages-site`, and then complete metadata-aware migration work according to the approved plan.
496
497
497
498
### Actions
498
499
@@ -509,7 +510,30 @@ If the target project already exists, verify:
509
510
510
511
If the target exists and is not empty, ask before overwriting or replacing files.
511
512
512
-
#### 7.2 Establish Migration Traceability
513
+
#### 7.2 Build and Deploy Once to Hydrate Metadata
514
+
515
+
After the target SPA scaffold exists and before finalizing table permissions, web roles, site settings, server logic, or Web API settings:
516
+
517
+
1. Run the target project's build command, usually:
518
+
519
+
```bash
520
+
npm run build
521
+
```
522
+
523
+
2. Fix build failures before deployment.
524
+
3. Ask the user to approve the required first deployment:
525
+
526
+
| Question | Options |
527
+
|----------|---------|
528
+
| The migrated SPA needs an initial deployment so Power Pages creates `.powerpages-site` metadata. Deploy now? | Deploy now (Required for metadata migration), Stop and deploy later |
529
+
530
+
4. If approved, invoke `/deploy-site` for `TARGET_PROJECT_ROOT`.
531
+
5. After deployment completes, verify `.powerpages-site/` exists in the target project.
532
+
6. If `.powerpages-site/` is still missing, stop metadata-dependent work and report that table permissions, web roles, site settings, server logic, and tracking cannot be finalized until deployment creates it.
533
+
534
+
This deployment is not optional for migrations that include metadata-dependent functionality. It hydrates the target code site metadata so the migration can create or update YAML through existing Power Pages skill patterns.
535
+
536
+
#### 7.3 Establish Migration Traceability
513
537
514
538
For each generated route/component/service, record its source in `migration-artifacts/migration-traceability.json`:
515
539
@@ -518,7 +542,7 @@ For each generated route/component/service, record its source in `migration-arti
518
542
519
543
Use concise comments only when they help future maintainers understand non-obvious EDM mappings.
520
544
521
-
#### 7.3 Implement Routes and Layout
545
+
#### 7.4 Implement Routes and Layout
522
546
523
547
Create the SPA route structure from the approved model:
524
548
@@ -528,7 +552,7 @@ Create the SPA route structure from the approved model:
528
552
- Shared header/footer/navigation based on web templates, web link sets, and snippets.
529
553
- Framework-appropriate routing conventions.
530
554
531
-
#### 7.4 Implement Components and Content
555
+
#### 7.5 Implement Components and Content
532
556
533
557
Map:
534
558
@@ -540,7 +564,7 @@ Map:
540
564
541
565
Do not leave placeholder-only pages for routes marked in scope. For manual gaps, create explicit TODO sections that explain the missing EDM behavior and link to `migration-gap-log.md`.
542
566
543
-
#### 7.5 Implement Data, Forms, and Auth Boundaries
567
+
#### 7.6 Implement Data, Forms, Auth, and Metadata Boundaries
544
568
545
569
For tables that require Web API integration, either:
546
570
@@ -554,7 +578,16 @@ For auth and role-based UI, either:
554
578
555
579
Never bypass table permissions or imply that client-side role checks enforce data security.
556
580
557
-
#### 7.6 Build and Commit Milestones
581
+
When `.powerpages-site/` exists, use the approved model to migrate or create metadata through existing deterministic scripts and skills:
582
+
583
+
- Table permissions and Web API site settings via `/integrate-webapi` or approved permission/settings scripts.
584
+
- Web roles via `/create-webroles` when missing.
585
+
- Auth-related site settings via `/setup-auth` when login/role UX is in scope.
586
+
- Server logic only through `/add-server-logic` when an EDM behavior cannot be safely represented client-side.
587
+
588
+
If a metadata item from the EDM source cannot be confidently mapped to the new SPA site, put it in `migration-gap-log.md` instead of copying it silently.
589
+
590
+
#### 7.7 Build and Commit Milestones
558
591
559
592
Run the project build after meaningful implementation chunks:
560
593
@@ -567,6 +600,8 @@ Fix build errors before proceeding. Commit after significant milestones when wor
567
600
### Output
568
601
569
602
- Migrated SPA files created or updated.
603
+
- Initial deployment completed and `.powerpages-site/` verified for metadata-dependent migrations.
604
+
- Metadata-dependent artifacts created or explicitly logged as gaps.
570
605
- Traceability artifacts saved.
571
606
- Build passes before verification.
572
607
@@ -582,6 +617,8 @@ Fix build errors before proceeding. Commit after significant milestones when wor
582
617
583
618
Confirm the expected routes, components, services, assets, and migration artifacts exist. Compare against the approved plan.
584
619
620
+
Confirm `.powerpages-site/` exists when the approved migration includes table permissions, web roles, site settings, server logic, or Web API settings. If it is missing, mark metadata verification as failed and direct the user to run `/deploy-site`.
@@ -668,7 +706,7 @@ Recommend only what fits the migration result:
668
706
| Dataverse tables still need frontend API work |`/integrate-webapi`|
669
707
| Auth or role behavior is incomplete |`/setup-auth` or `/create-webroles`|
670
708
| Permissions need review |`/audit-permissions`|
671
-
|The SPA should be deployed|`/deploy-site`|
709
+
|`.powerpages-site` is missing or metadata hydration failed|`/deploy-site`|
672
710
| Deployed runtime parity should be checked |`/test-site`|
673
711
674
712
### Output
@@ -684,7 +722,7 @@ Recommend only what fits the migration result:
684
722
2.**Phase 2**: Continue, narrow, or stop if high-risk EDM patterns are found.
685
723
3.**Phase 4**: Confirm before authenticated browsing or interactions that may create/modify data.
686
724
4.**Phase 6**: Approve the migration plan before writing SPA files.
687
-
5.**Phase 7**: Confirm before invoking follow-up skills, overwriting an existing target project, or deferring Web API/auth work.
725
+
5.**Phase 7**: Confirm before invoking follow-up skills, overwriting an existing target project, or stopping before the required first deployment that creates `.powerpages-site`.
688
726
6.**Phase 8**: Confirm whether unexpected drift should be fixed, accepted, or moved to manual gaps.
689
727
690
728
---
@@ -699,7 +737,7 @@ Recommend only what fits the migration result:
699
737
| Discover runtime behavior | Discovering runtime | Crawl the live site with Playwright, capture routes, auth transitions, network calls, and hidden behavior |
700
738
| Build migration model | Building model | Combine static and runtime evidence into a confidence-scored canonical site model |
701
739
| Review migration plan | Reviewing plan | Present SPA route/component/data/security mapping and get user approval |
702
-
| Migrate SPA implementation | Migrating SPA | Scaffold or update the SPAand create routes, components, services, assets, and traceability artifacts |
740
+
| Migrate SPA implementation | Migrating SPA | Scaffold or update the SPA, deploy once to hydrate `.powerpages-site`, and create routes, components, services, metadata, assets, and traceability artifacts |
703
741
| Verify migrated SPA | Verifying migration | Build and browser-test the SPA, compare against EDM evidence, and document drift |
704
742
| Summarize migration | Summarizing migration | Record usage, summarize outputs and gaps, and recommend focused next skills |
Copy file name to clipboardExpand all lines: plugins/power-pages/skills/migrate-edm-to-spa/references/edm-to-spa-patterns.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,6 +156,8 @@ Do not copy jQuery code directly into a framework component unless it is explici
156
156
157
157
Power Pages security is server-side. The SPA can improve UX by hiding or showing UI, but table permissions and web roles enforce access.
158
158
159
+
For a new SPA code site, deploy the scaffold once before finalizing security metadata. `/deploy-site` creates `.powerpages-site/`, which is required before the migration can reliably create or update table permissions, web roles, site settings, server logic metadata, and skill tracking YAML.
160
+
159
161
Map:
160
162
161
163
-`webrole.yml` to role names and UX gates.
@@ -187,6 +189,8 @@ Classify site settings:
187
189
188
190
Do not assume every EDM site setting has a direct SPA equivalent.
189
191
192
+
Do not copy or create target site-setting YAML until `.powerpages-site/site-settings/` exists. If deployment has not hydrated the metadata folder, keep site-setting work in the migration plan or gap log and require `/deploy-site` before finalization.
193
+
190
194
## Unsupported or Manual-Gap Candidates
191
195
192
196
These often require manual design or a separate skill:
0 commit comments