Skip to content

Commit 2923950

Browse files
priyanshu92GitHub Copilot
andauthored
docs: update Power Pages skill list (#174)
- Document the latest Power Pages skills in README.md - Add ALM/CI-CD and security skill descriptions - Require future user-invocable skills to be documented Co-authored-by: GitHub Copilot <copilot@github.com>
1 parent e55e1d3 commit 2923950

2 files changed

Lines changed: 173 additions & 15 deletions

File tree

plugins/power-pages/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Read `PLUGIN_DEVELOPMENT_GUIDE.md` for UX and reliability standards when creatin
2222
- **OAuth credential-style site settings** (ConsumerKey / ClientId / ClientSecret / etc.) are NOT excluded from solutions. `setup-solution` Phase 5 prompts per credential to choose between (a) Secret-typed env var (Key Vault per stage), (b) String-typed env var (plain text per stage), or (c) skip. The site-setting record is added to the solution and routed to an env var so secret values never ship in the solution zip. Plans generated before 2026-05-08 use the older `excluded` bucket — setup-solution's preloadedSettings handler treats those as `credentialNeedsDecision` for backward compatibility.
2323
- **MCP Learn grounding for ALM skills** — solution and pipeline skills (`setup-solution`, `export-solution`, `import-solution`, `diagnose-deployment`, `setup-pipeline`, `deploy-pipeline`, `ensure-pipelines-host`, `force-link-environment`) include a Phase 1.5 step that grounds the agent in current Microsoft Learn ALM docs before proceeding. The shared discovery pattern lives in `references/alm-docs-grounding.md`. Add the same Phase 1.5 + the two `mcp__plugin_power-pages_microsoft-learn__microsoft_docs_search/fetch` tools to `allowed-tools` when introducing a new ALM skill.
2424
- **ALM artifacts live under `docs/alm/`** — every ALM-only state file (5 plan/decision JSONs and 9 `last-*.json` skill-run markers, including `last-export.json` written by `export-solution` Phase 7.1) writes to `<projectRoot>/docs/alm/`, not the project root. Always resolve paths through `scripts/lib/alm-paths.js` (`almPath(root, 'lastDeploy')`, `almPath(root, 'planContext')`, etc.) and call `ensureAlmDir(root)` once before the first write. Never inline a raw path string. Files that intentionally stay at the project root: `.solution-manifest.json` (referenced by non-ALM skills too), `.datamodel-manifest.json` (owned by `setup-datamodel`, not ALM), `.alm-config.json` (user-authored override), `.alm-deferred` (opt-out marker), `deployment-settings.json` (Microsoft-standard schema). When you add a new ALM artifact, add the key + filename to `FILE_NAMES` in `alm-paths.js`, then write through the helper.
25+
- **New skills must be added to `README.md`** — Whenever you add a new user-invocable skill under `skills/`, you must also document it in [`README.md`](README.md) under the appropriate section (Site scaffolding and deployment / Data modeling / Backend integration / Security and access / ALM and CI/CD / Polish / Support), update the skill count in the `## Skills` intro, and — if the skill is part of the recommended end-to-end flow — update the **Typical Workflow** code block. The README is the user-facing source of truth for what the plugin can do; an undocumented skill is effectively invisible to users browsing the marketplace.
2526

2627
## Skill Development Conventions
2728

plugins/power-pages/README.md

Lines changed: 172 additions & 15 deletions
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 15 skills that cover the full lifecycle of a Power Pages code site — scaffolding, deployment, data modeling, backend integration, authentication, testing, and auditing. Each skill is invoked conversationally — just describe what you want to do.
41+
The plugin provides 29 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.
4242

4343
### Site scaffolding and deployment
4444

@@ -75,7 +75,7 @@ Provisions a website record in your Power Platform environment so your site is a
7575

7676
#### `/test-site`
7777

78-
> "Test my deployed site at https://contoso.powerappsportals.com"
78+
> "Test my deployed site at <https://contoso.powerappsportals.com>"
7979
8080
Runtime-tests a deployed, activated site using a real browser (via the bundled Playwright MCP). Crawls discoverable links, verifies pages render, captures network traffic for API calls, and produces a test report.
8181

@@ -195,6 +195,160 @@ Audits existing table permissions on a deployed or in-progress site by analyzing
195195
- Cross-references code usage, web roles, and Dataverse schema
196196
- Suggests concrete fixes for each issue
197197

198+
#### `/scan-site`
199+
200+
> "Scan my production site for vulnerabilities"
201+
202+
Runs a security scan on a deployed Power Pages site, fetches the latest scan report, and produces a plain-language summary of vulnerabilities by severity.
203+
204+
- Scans the live site's public surface for vulnerabilities
205+
- Fetches and explains the latest scan report
206+
- Surfaces issues grouped by severity
207+
208+
#### `/manage-firewall`
209+
210+
> "Block traffic from a specific country and add a rate limit to /login"
211+
212+
Inspects and configures the web application firewall (WAF) in front of a Power Pages production site. Walks you through enabling protection and managing custom rules.
213+
214+
- Lists current WAF state and recommends enabling protection when off
215+
- Adds, updates, or removes custom rules — IP blocks, country blocks, path blocks, rate limits
216+
- Protects pages from brute-force attempts and bot traffic
217+
218+
#### `/manage-headers`
219+
220+
> "Fix my CSP errors and harden cookie settings"
221+
222+
Inspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related site settings.
223+
224+
- Identifies gaps in browser security headers
225+
- Walks through fixes for CSP, CORS, cookies, and embedding policy
226+
- Updates the corresponding site settings
227+
228+
#### `/security-review`
229+
230+
> "Do a full security review before we ship"
231+
232+
Runs a guided, end-to-end security review of a Power Pages site and consolidates every finding into one HTML report covering the live site, browser headers, firewall, authentication, and role-based permissions.
233+
234+
- Orchestrates `/scan-site`, `/manage-headers`, `/manage-firewall`, `/audit-permissions`, and auth checks
235+
- Consolidates findings into a single HTML report
236+
- Suitable for release-readiness or live-site monitoring
237+
238+
### ALM and CI/CD
239+
240+
#### `/plan-alm`
241+
242+
> "Plan how to promote this site to staging and production"
243+
244+
Orchestrator skill that creates an ALM (Application Lifecycle Management) plan for deploying a Power Pages site across environments. Gathers your promotion strategy, target environments, and approval requirements, generates a visual HTML plan, and after your approval executes the plan by calling the right ALM skills in sequence.
245+
246+
- Detects project state (config, manifests, current environment)
247+
- Branched flow for Power Platform Pipelines or manual export/import
248+
- Generates `docs/alm-plan.html` for review and approval
249+
- Dispatches to `setup-solution`, `setup-pipeline`, `export-solution`, `deploy-pipeline`, or `import-solution`
250+
251+
> [!TIP]
252+
> `/plan-alm` is the front door for any ALM intent. Use it instead of jumping straight to individual ALM skills when you want to deploy to staging, ship to production, or set up CI/CD.
253+
254+
#### `/setup-solution`
255+
256+
> "Package my site into a solution for ALM"
257+
258+
Creates a Dataverse publisher and solution, then adds Power Pages site components to the solution for ALM and deployment management.
259+
260+
- Creates publisher and solution via OData API (with duplicate detection)
261+
- Adds website and web role components via `AddSolutionComponent`
262+
- Writes `.solution-manifest.json` for downstream skills
263+
- Publisher prefix is irreversible — requires explicit confirmation
264+
265+
#### `/export-solution`
266+
267+
> "Export the solution as a zip for deployment"
268+
269+
Exports a Dataverse solution containing Power Pages site components as a zip file, ready for deployment to another environment.
270+
271+
- Choose managed (locked for downstream environments) or unmanaged (editable)
272+
- Triggers `ExportSolutionAsync` and polls until complete
273+
- Bumps the solution version on every export so each zip is strictly increasing
274+
- Verifies the zip contains a valid `Solution.xml`
275+
276+
#### `/import-solution`
277+
278+
> "Import this solution zip into the staging environment"
279+
280+
Imports a Dataverse solution zip into a target environment, with optional staged import for dependency checking before committing.
281+
282+
- Optional `StageSolution` pre-flight to detect missing dependencies
283+
- `ImportSolutionAsync` with polling until complete
284+
- Writes `docs/alm/last-import.json` marker
285+
- Surfaces per-component import results
286+
287+
#### `/setup-pipeline`
288+
289+
> "Set up a Power Platform Pipeline for automated deployments"
290+
291+
Sets up a Power Platform Pipeline for automated Power Pages deployments. Power Platform Pipelines is Microsoft's native CI/CD tool built into the platform — no external infrastructure required.
292+
293+
- Auto-discovers host environment via `RetrieveSetting('DefaultCustomPipelinesHostEnvForTenant')`
294+
- Creates `deploymentenvironments`, `deploymentpipelines`, and `deploymentstages` records
295+
- GitHub Actions and Azure DevOps platforms show coming-soon guidance
296+
- Writes `docs/alm/last-pipeline.json` and `docs/pipeline-setup.md`
297+
298+
#### `/deploy-pipeline`
299+
300+
> "Deploy the site to staging via my pipeline"
301+
302+
Triggers a Power Platform Pipeline deployment run for a Power Pages solution. Validates the package, optionally configures deployment settings, then deploys and polls for completion.
303+
304+
- Pre-flight check on `blockedattachments` to proactively unblock `.js`/`.css` (saves a wasted ~60-min import)
305+
- `ValidatePackageAsync` before deploying surfaces validation issues early
306+
- Optional environment variable / connection reference overrides per stage
307+
- Final consent gate before the deploy actually fires
308+
309+
#### `/ensure-pipelines-host`
310+
311+
> "Make sure my tenant has a Power Platform Pipelines host"
312+
313+
Ensures the tenant has a usable Power Platform Pipelines host environment before any pipeline operation runs. Detects host state via the same resolution order as the Power Apps UI; if no host is bound, provisions a new **Platform Host** (recommended, idempotent) or guides through a **Custom Host** install.
314+
315+
- Detects host state from org-db setting, BAP env metadata, or default-custom-host setting
316+
- Idempotent Platform Host fast-path (~3–5 min)
317+
- Custom Host fast-path or manual PPAC install fallback
318+
- Writes a host-check artifact other ALM skills consume
319+
320+
#### `/force-link-environment`
321+
322+
> "This environment is already linked to another pipelines host — force-link it"
323+
324+
Force-links a development or target environment to a Power Platform Pipelines host, overriding any existing association with a previous host. Calls the documented `ManageEnvironmentStamp` Dataverse action (the API behind the "Force Link" button in the Deployment Pipeline Configuration app).
325+
326+
- Use when you hit "environment is already associated with another pipelines host"
327+
- Required explicit consent gate — destructive to the previous host (makers lose pipeline access)
328+
- Reversible by re-running from the previous host
329+
- Writes `docs/alm/last-force-link.json`
330+
331+
#### `/configure-env-variables`
332+
333+
> "Make these site settings environment-specific so they differ between dev and prod"
334+
335+
Configures environment variables for Power Pages site settings to support ALM across environments. Creates environment variable definitions in Dataverse, guides you through linking site settings via the Power Pages Management app, adds the variables to the solution, and generates a `deployment-settings.json` file with per-stage override values.
336+
337+
- Creates `environmentvariabledefinition` records (String or Secret type)
338+
- Generates `deployment-settings.json` ready for `deploy-pipeline` to consume
339+
- Routes credentials (ClientSecret, ConsumerKey, etc.) to Key Vault-backed secret env vars
340+
341+
#### `/diagnose-deployment`
342+
343+
> "My last deploy failed — figure out why"
344+
345+
Surfaces PAC CLI upload errors and Dataverse async operation errors, pattern-matches against a known failure catalog, and optionally auto-fixes identified issues.
346+
347+
- Re-runs `pac pages upload-code-site` in capture mode to surface upload errors
348+
- Queries recent Dataverse async operation failures
349+
- Pattern matches against `references/deployment-error-catalog.md`
350+
- Offers auto-fixes with explicit per-fix user confirmation
351+
198352
### Polish
199353

200354
#### `/add-seo`
@@ -246,21 +400,24 @@ The plugin ships with two MCP servers configured in `.mcp.json` — they start a
246400
A common end-to-end workflow looks like this:
247401

248402
```
249-
1. /create-site → Scaffold + design + build pages
250-
2. /deploy-site → Upload to Power Pages environment
251-
3. /activate-site → Provision a public URL
252-
4. /setup-datamodel → Create Dataverse tables
253-
5. /add-sample-data → Populate tables with test records
254-
6. /integrate-backend → Pick the right backend approach (Web API / Server Logic / Cloud Flow)
255-
7. /create-webroles → Define access roles
256-
8. /setup-auth → Add login/logout + role-based UI
257-
9. /audit-permissions → Verify table permissions are safe
258-
10. /add-seo → Search engine optimization
259-
11. /deploy-site → Push final changes live
260-
12. /test-site → Runtime smoke test on the live URL
403+
1. /create-site → Scaffold + design + build pages
404+
2. /deploy-site → Upload to Power Pages environment
405+
3. /activate-site → Provision a public URL
406+
4. /setup-datamodel → Create Dataverse tables
407+
5. /add-sample-data → Populate tables with test records
408+
6. /integrate-backend → Pick the right backend approach (Web API / Server Logic / Cloud Flow)
409+
7. /create-webroles → Define access roles
410+
8. /setup-auth → Add login/logout + role-based UI
411+
9. /audit-permissions → Verify table permissions are safe
412+
10. /add-seo → Search engine optimization
413+
11. /deploy-site → Push final changes live
414+
12. /test-site → Runtime smoke test on the live URL
415+
13. /security-review → Full security review (headers, firewall, scan, permissions)
416+
14. /plan-alm → Plan multi-environment promotion
417+
15. /deploy-pipeline → Promote through staging → production
261418
```
262419

263-
Steps can be run independently — you don't need to follow this exact order. Each skill checks its own prerequisites and will tell you if something is missing. If something goes wrong, `/report-issue` opens a pre-filled GitHub issue.
420+
Steps can be run independently — you don't need to follow this exact order. Each skill checks its own prerequisites and will tell you if something is missing. If something goes wrong, `/diagnose-deployment` pattern-matches deployment errors and `/report-issue` opens a pre-filled GitHub issue.
264421

265422
## Running Without Interruption
266423

0 commit comments

Comments
 (0)