Skip to content
72 changes: 72 additions & 0 deletions evals/power-pages/migrate-bootstrap/evals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"skill_name": "migrate-bootstrap",
"evals": [
{
"id": 1,
"prompt": "Migrate my classic Power Pages site from Bootstrap 3 to Bootstrap 5. I'm already authenticated and the environment is correct. The downloaded site is in the ./v3site folder.",
"expected_output": "The skill verifies PAC CLI and that both pac pages bootstrap-migrate and pac pages upload are available, confirms the folder is a classic site (not a code site), snapshots the source with git, assesses Bootstrap-3 usage, runs pac pages bootstrap-migrate to produce v3siteV5, reviews logs.txt and groups auto-applied vs hierarchy/manual changes, applies the residual fixes with per-category consent, pre-flights the manifest, uploads with pac pages upload, verifies the Bootstrap 5 runtime flag actually flipped, and validates the site via /test-site.",
"files": [],
"expectations": [
"TaskCreate is used upfront to create a task list covering all 8 phases before starting work",
"PAC CLI is verified by running pac help",
"pac pages help is run to confirm both bootstrap-migrate and upload verbs are available before proceeding",
"The target is confirmed to be a classic site (presence of website.yml/sitesetting.yml) and not a code site (powerpages.config.json)",
"The source folder is snapshotted with git as a pre-migration restore point before any migration",
"Bootstrap-3 usage is inventoried and the user is told this is an assisted migration, not push-button",
"Explicit consent is requested before running the migration engine",
"pac pages bootstrap-migrate --path is run on the site folder and produces a sibling <folder>V5 directory",
"logs.txt is parsed/read and changes are grouped into no-change, auto-applied, and hierarchy (manual) categories",
"Residual hierarchy/CSS fixes are applied with per-category consent using the bootstrap-v5-manual-fixes reference",
"Before upload, the manifest is pre-flighted: website.yml has a valid adx_websiteid and sitesetting.yml contains Site/BootstrapV5Enabled true",
"A final consent gate is presented before the outward-facing upload",
"pac pages upload (not upload-code-site) is run against the <folder>V5 directory",
"The Bootstrap 5 runtime flag flip is explicitly verified after upload rather than trusting the upload exit code",
"The site is validated via /test-site and skill usage is recorded with --skillName MigrateBootstrap"
]
},
{
"id": 2,
"prompt": "I want to upgrade an old Power Pages portal to Bootstrap 5 but I haven't downloaded it yet and I'm not signed in to PAC CLI.",
"expected_output": "The skill verifies PAC CLI is installed, detects the user is not authenticated, asks for the environment URL and runs pac auth create, confirms the target environment, lists websites and downloads the chosen one with pac pages download, snapshots it, then proceeds through assessment, the bootstrap-migrate engine, change review, residual fixes, upload, runtime-flag verification, and validation.",
"files": [],
"expectations": [
"PAC CLI is verified by running pac help",
"pac auth who is run and the unauthenticated state is detected",
"AskUserQuestion is used to request the environment URL and pac auth create --environment is run",
"pac pages help confirms bootstrap-migrate and upload are available",
"pac pages list is run and AskUserQuestion is used to choose which website to migrate",
"pac pages download --path --webSiteId is run to fetch the classic site locally",
"The downloaded folder is snapshotted with git before migration",
"pac pages bootstrap-migrate is run and the <folder>V5 output is confirmed",
"The change report is reviewed and residual fixes are applied with per-category consent",
"pac pages upload is run on the V5 folder and the runtime flag flip is verified afterward",
"No automated rollback is attempted on failure; the source snapshot is the rollback path"
]
},
{
"id": 3,
"prompt": "Run the Bootstrap 5 migration on my React Power Pages code site in the current directory.",
"expected_output": "The skill detects that the target is a code site (React/Vue/Angular/Astro) rather than a classic site and stops, explaining that Bootstrap 3 to 5 migration does not apply to code sites because they are never Bootstrap-3-based, without running the migration engine.",
"files": [],
"expectations": [
"The skill recognizes a code site by the presence of powerpages.config.json and a framework package.json",
"The skill stops and explains the migration does not apply to code sites because they are never Bootstrap-3-based",
"pac pages bootstrap-migrate is NOT run against the code site",
"No upload or flag-flip is attempted"
]
},
{
"id": 4,
"prompt": "I ran the migration earlier and uploaded my v3siteV5 folder, but the live site still looks like Bootstrap 3. Help.",
"expected_output": "The skill recognizes this as a runtime-flag-flip failure that pac pages upload swallows silently. It pre-flights the manifest (sitesetting.yml must contain Site/BootstrapV5Enabled true and website.yml must have a valid adx_websiteid), re-uploads if needed, and verifies the Bootstrap 5 runtime flag is actually enabled, since the upload exit code does not prove the flag flipped.",
"files": [],
"expectations": [
"The skill explains that pac pages upload flips the Bootstrap 5 runtime flag automatically but swallows flip failures, so a successful upload does not prove the flag flipped",
"sitesetting.yml in the V5 folder is checked for Site/BootstrapV5Enabled set to true",
"website.yml in the V5 folder is checked for a valid adx_websiteid",
"The Bootstrap 5 runtime flag state is explicitly verified rather than assumed from the upload result",
"If the gating files were missing, the skill fixes them and re-uploads with pac pages upload"
]
}
]
}
14 changes: 13 additions & 1 deletion plugins/power-pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This keeps hook behavior in one place and avoids relying on skill-frontmatter ho

## Skills

The plugin provides 31 skills that cover the full lifecycle of a Power Pages code site — scaffolding, deployment, data modeling, backend integration, authentication, ALM and CI/CD, security review, testing, and auditing. Each skill is invoked conversationally — just describe what you want to do.
The plugin provides 33 skills that cover the full lifecycle of a Power Pages site — scaffolding, deployment, data modeling, backend integration, authentication, ALM and CI/CD, security review, testing, auditing, and Bootstrap 3→5 migration. Each skill is invoked conversationally — just describe what you want to do.

### Site scaffolding and deployment

Expand Down Expand Up @@ -388,6 +388,18 @@ Adds search engine optimization artifacts: `robots.txt`, `sitemap.xml`, and meta
- Generates sitemap with production URLs
- Adds viewport, charset, description, and social sharing meta tags

### Migration

#### `/migrate-bootstrap`

> "Upgrade my Power Pages site from Bootstrap 3 to Bootstrap 5"

Migrates a traditional Power Pages site (Liquid web templates, not code sites) from Bootstrap 3 to Bootstrap 5. Runs the `pac pages bootstrap-migrate` engine for the bulk class renames, then assists with the residual hierarchy/CSS fixes the engine can only flag.

- Non-destructive: the engine writes a new `<folder>V5` copy and never edits the source
- AI-assisted per-category fixes for grid, navbar, panel/card, and page-header changes
- Uploads (auto-enabling the Bootstrap 5 runtime flag) and verifies the flip via `pac-log.txt`

### Support

#### `/report-issue`
Expand Down
13 changes: 13 additions & 0 deletions plugins/power-pages/references/approval-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,19 @@ New skill (Power Pages source & dependency security scan). Runs local static ana

---

### 6.31 `migrate-bootstrap` (6 calls / 5 gates + 1 sub-prompt)

New skill (migrates a traditional Power Pages site from Bootstrap 3 to Bootstrap 5). The engine does the bulk class renames; the skill assists with residual hierarchy/CSS fixes, then uploads (which auto-flips the runtime flag).

| ID | Kind | Category | Phase | Trigger / question | Cancel leaves |
|---|---|---|---|---|---|
| `migrate-bootstrap:1.confirm-env` | gate | consent | 1 | Echoes current env — *"Use this environment / choose another"*. Migrating against the wrong environment is destructive, so confirmation is mandatory. Covers the free-text env-URL sub-prompt in the same step. | nothing |
| `migrate-bootstrap:2.1.select-site` | gate | plan | 2.1 | Multiple websites found — *"Which website to download?"* | nothing |
| `migrate-bootstrap:4.run-engine` | gate | consent | 4 | *"Run the Bootstrap 5 migration on `<SITE_FOLDER>`?"* — engine writes a new `<SITE_FOLDER>V5` copy and never edits the source. | nothing |
| `migrate-bootstrap:6.residual-fixes` | gate | progress | 6 | Per-category consent — *"Apply the `<category>` fixes to `<N>` file(s)?"* — repeated per residual category; changes are local to the V5 copy. | nothing |
| `migrate-bootstrap:7.2.upload` | gate | final | 7.2 | First outward-facing change — *"Upload `<MIGRATED_FOLDER>` to `<ENV_NAME>`?"* — publishes the Bootstrap 5 site and auto-enables the runtime flag. | nothing |

---
### Cross-plugin shared skills — out of catalog scope

`report-issue` — Its prompts are cross-plugin, not power-pages-specific, so they are not catalogued here. If the shared workflow is ever governed by per-plugin approval-gate linting, add a `report-issue:*` section to this catalog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ If the tracking script creates or updates site setting YAML files, include those
| deploy-pipeline | DeployPipeline | Site/AI/Skills/DeployPipeline |
| ensure-pipelines-host | EnsurePipelinesHost | Site/AI/Skills/EnsurePipelinesHost |
| force-link-environment | ForceLinkEnvironment | Site/AI/Skills/ForceLinkEnvironment |
| migrate-bootstrap | MigrateBootstrap | Site/AI/Skills/MigrateBootstrap |

## YAML Format

Expand Down
Loading
Loading