Skip to content

Commit 371ca11

Browse files
T-Dahiya-003Tanvi DahiyaclaudeCopilotgithub-actions[bot]
authored
Add bootstrap-migrate-v3-to-v5 skill for Power Pages (Bootstrap 3 -> 5) (#181)
* Add migrate-to-v5 skill for Power Pages (Bootstrap 3 -> 5) Adds the /power-pages:migrate-to-v5 skill that orchestrates `pac pages bootstrap-migrate`, applies AI-assisted residual fixes (page-header, glyphicons, mangled custom CSS), uploads, verifies the Bootstrap 5 runtime flag flip via pac-log.txt, and validates. Includes SKILL.md, reference recipes, and the eval. Drops the internal PLAN.md design doc (authoring artifact, not used at runtime). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * power-pages: rename migrate-to-v5 skill to bootstrap-migrate-v3-to-v5 - Rename skill + eval folders (git mv, preserves history) - Use 'traditional' instead of 'classic' throughout SKILL.md - Renumber Phase 2 sections (activation check 2.2, snapshot 2.3) and fix cross-reference - Align tracking name to BootstrapMigrateV3ToV5; add mapping-table entry - Activation probe: curl -sL to treat 3xx as active; fetch body on 4xx/5xx to check unactivated signature Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254d90e7-220c-4886-a833-53db72c18394 * Auto-add plugin version check to SKILL.md files * power-pages: make bootstrap-migrate-v3-to-v5 skill lint-compliant - Add gate/not-a-gate markers with prose blocks for AskUserQuestion prompts - Catalogue gates in approval-gates.md (section 6.31) - Use PLUGIN_ROOT instead of CLAUDE_PLUGIN_ROOT - Add Skill to allowed-tools; switch grep -i to grep -iE - List skill under Migration in README Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254d90e7-220c-4886-a833-53db72c18394 * power-pages: fix git -C commit scope and clarify skill-tracking projectRoot in bootstrap-migrate-v3-to-v5 - Use git -C on both add and commit so per-category commits target the V5 copy - Pass --projectRoot and document the traditional-download no-op for skill tracking Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254d90e7-220c-4886-a833-53db72c18394 * power-pages: correct README skill count to 33 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 254d90e7-220c-4886-a833-53db72c18394 --------- Co-authored-by: Tanvi Dahiya <tanvidahiya@microsoft.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Copilot-Session: 254d90e7-220c-4886-a833-53db72c18394
1 parent 860f3bd commit 371ca11

7 files changed

Lines changed: 944 additions & 1 deletion

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"skill_name": "migrate-bootstrap",
3+
"evals": [
4+
{
5+
"id": 1,
6+
"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.",
7+
"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.",
8+
"files": [],
9+
"expectations": [
10+
"TaskCreate is used upfront to create a task list covering all 8 phases before starting work",
11+
"PAC CLI is verified by running pac help",
12+
"pac pages help is run to confirm both bootstrap-migrate and upload verbs are available before proceeding",
13+
"The target is confirmed to be a classic site (presence of website.yml/sitesetting.yml) and not a code site (powerpages.config.json)",
14+
"The source folder is snapshotted with git as a pre-migration restore point before any migration",
15+
"Bootstrap-3 usage is inventoried and the user is told this is an assisted migration, not push-button",
16+
"Explicit consent is requested before running the migration engine",
17+
"pac pages bootstrap-migrate --path is run on the site folder and produces a sibling <folder>V5 directory",
18+
"logs.txt is parsed/read and changes are grouped into no-change, auto-applied, and hierarchy (manual) categories",
19+
"Residual hierarchy/CSS fixes are applied with per-category consent using the bootstrap-v5-manual-fixes reference",
20+
"Before upload, the manifest is pre-flighted: website.yml has a valid adx_websiteid and sitesetting.yml contains Site/BootstrapV5Enabled true",
21+
"A final consent gate is presented before the outward-facing upload",
22+
"pac pages upload (not upload-code-site) is run against the <folder>V5 directory",
23+
"The Bootstrap 5 runtime flag flip is explicitly verified after upload rather than trusting the upload exit code",
24+
"The site is validated via /test-site and skill usage is recorded with --skillName MigrateBootstrap"
25+
]
26+
},
27+
{
28+
"id": 2,
29+
"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.",
30+
"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.",
31+
"files": [],
32+
"expectations": [
33+
"PAC CLI is verified by running pac help",
34+
"pac auth who is run and the unauthenticated state is detected",
35+
"AskUserQuestion is used to request the environment URL and pac auth create --environment is run",
36+
"pac pages help confirms bootstrap-migrate and upload are available",
37+
"pac pages list is run and AskUserQuestion is used to choose which website to migrate",
38+
"pac pages download --path --webSiteId is run to fetch the classic site locally",
39+
"The downloaded folder is snapshotted with git before migration",
40+
"pac pages bootstrap-migrate is run and the <folder>V5 output is confirmed",
41+
"The change report is reviewed and residual fixes are applied with per-category consent",
42+
"pac pages upload is run on the V5 folder and the runtime flag flip is verified afterward",
43+
"No automated rollback is attempted on failure; the source snapshot is the rollback path"
44+
]
45+
},
46+
{
47+
"id": 3,
48+
"prompt": "Run the Bootstrap 5 migration on my React Power Pages code site in the current directory.",
49+
"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.",
50+
"files": [],
51+
"expectations": [
52+
"The skill recognizes a code site by the presence of powerpages.config.json and a framework package.json",
53+
"The skill stops and explains the migration does not apply to code sites because they are never Bootstrap-3-based",
54+
"pac pages bootstrap-migrate is NOT run against the code site",
55+
"No upload or flag-flip is attempted"
56+
]
57+
},
58+
{
59+
"id": 4,
60+
"prompt": "I ran the migration earlier and uploaded my v3siteV5 folder, but the live site still looks like Bootstrap 3. Help.",
61+
"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.",
62+
"files": [],
63+
"expectations": [
64+
"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",
65+
"sitesetting.yml in the V5 folder is checked for Site/BootstrapV5Enabled set to true",
66+
"website.yml in the V5 folder is checked for a valid adx_websiteid",
67+
"The Bootstrap 5 runtime flag state is explicitly verified rather than assumed from the upload result",
68+
"If the gating files were missing, the skill fixes them and re-uploads with pac pages upload"
69+
]
70+
}
71+
]
72+
}

plugins/power-pages/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This keeps hook behavior in one place and avoids relying on skill-frontmatter ho
3838

3939
## Skills
4040

41-
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.
41+
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.
4242

4343
### Site scaffolding and deployment
4444

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

391+
### Migration
392+
393+
#### `/migrate-bootstrap`
394+
395+
> "Upgrade my Power Pages site from Bootstrap 3 to Bootstrap 5"
396+
397+
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.
398+
399+
- Non-destructive: the engine writes a new `<folder>V5` copy and never edits the source
400+
- AI-assisted per-category fixes for grid, navbar, panel/card, and page-header changes
401+
- Uploads (auto-enabling the Bootstrap 5 runtime flag) and verifies the flip via `pac-log.txt`
402+
391403
### Support
392404

393405
#### `/report-issue`

plugins/power-pages/references/approval-gates.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,19 @@ New skill (Power Pages source & dependency security scan). Runs local static ana
685685

686686
---
687687

688+
### 6.31 `migrate-bootstrap` (6 calls / 5 gates + 1 sub-prompt)
689+
690+
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).
691+
692+
| ID | Kind | Category | Phase | Trigger / question | Cancel leaves |
693+
|---|---|---|---|---|---|
694+
| `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 |
695+
| `migrate-bootstrap:2.1.select-site` | gate | plan | 2.1 | Multiple websites found — *"Which website to download?"* | nothing |
696+
| `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 |
697+
| `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 |
698+
| `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 |
699+
700+
---
688701
### Cross-plugin shared skills — out of catalog scope
689702

690703
`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.

plugins/power-pages/references/skill-tracking-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ If the tracking script creates or updates site setting YAML files, include those
5656
| deploy-pipeline | DeployPipeline | Site/AI/Skills/DeployPipeline |
5757
| ensure-pipelines-host | EnsurePipelinesHost | Site/AI/Skills/EnsurePipelinesHost |
5858
| force-link-environment | ForceLinkEnvironment | Site/AI/Skills/ForceLinkEnvironment |
59+
| migrate-bootstrap | MigrateBootstrap | Site/AI/Skills/MigrateBootstrap |
5960

6061
## YAML Format
6162

0 commit comments

Comments
 (0)