Plugin check: Run
node "${PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Replace every deprecated Webapi/<table>/fields = * value with the smallest
explicit column set proven by the site's actual Web API behavior.
The LLM owns source discovery, call-chain reasoning, field decisions, report writing, and edits. Use the bundled script only to retrieve authoritative Dataverse table schema; it must not decide which columns the code needs.
Support both:
Initial request: $ARGUMENTS
EntitySetName values to setting logical names using table
schema. Never singularize, pluralize, or guess.* as unsupported for reads, writes, aggregates, FetchXML, files,
and images.Read references/column-analysis.md before analyzing calls. Read references/configuration-and-reporting.md before inventorying settings or writing the report. Read references/site-transfer.md before any download or upload.
Goal: Resolve the project, confirm the site, and protect existing work.
PROJECT_ROOT from $ARGUMENTS or the current directory.powerpages.config.json indicates an SPA site;website.yml, root sitesetting.yml, or .powerpages-site/
indicates downloaded declarative artifacts;.solution-manifest.json when present. This migration changes existing
settings; do not create or select another solution.node --version.assets/migration-report-template.html and
scripts/render-migration-report.js are readable, and stop if either is
missing.WebSiteId, site type, data
model, deployment profile, and target path with the user. Check each
against pac auth who, pac env who, and pac pages list, and stop on
any mismatch. Never infer one from a folder name or an active default.Analyzing the wrong site produces confident, wrong fixes, so settle identity
before reading any setting. Download only when the user wants a fresh copy or
PROJECT_ROOT holds no site content; downloading replaces local files and
cannot be reverted.
🚦 Gate (consent · migrate-webapi-selectall:1.download-site): Approve the download only after displaying the confirmed environment, website name and ID, site type, data model, target path, and the exact command. Canceling leaves local content untouched and continues against the existing copy.
Use AskUserQuestion: Download the confirmed site or Use the local copy.
Repeat step 3 after any download.
Output: Project root, site layouts, solution context, git state, confirmed site identity, and a downloaded copy when approved.
Goal: Find every configuration and candidate source Web API call before reasoning about columns.
Use Glob, Grep, and Read to inspect:
sitesetting.yml;*.sitesetting.yml;.powerpages-site/site-settings/;Record every Webapi/<table>/fields and Webapi/<table>/enabled entry with
its relative file, line, scope, key style, and current value. Classify fields
settings as:
wildcard;explicit;missing for an enabled table;duplicate only within the same configuration scope.Do not treat identical settings in different deployment profiles as
duplicates. Record every profile name and which settings it overrides. Never
assume the default profile is the intended deployment profile.
Query Dataverse once per unique table, never once per configuration.
Analyze only authoritative, editable source files. Never inspect compiled or generated code.
For SPA sites:
powerpages.config.json, package.json, and present framework or
bundler configuration before searching calls.compiledPath and every configured build-output directory as a hard
exclusion..powerpages-site/web-files/, node_modules/, coverage and cache
directories, source maps, minified bundles, framework output directories,
and content-hashed assets matching
<entry-name>-<content-hash>.<extension>..powerpages-site/site-settings/ only for configuration inventory,
never for source analysis.For traditional sites, search editable JavaScript, Liquid, web templates, web files, and other authored source. Do not exclude an authored traditional web file merely because it is deployed as a web file.
Search source extensions including .js, .jsx, .ts, .tsx, .vue,
.html, .htm, .liquid, .aspx, .ascx, .cshtml, and XML web
templates. If a call exists only in compiled, minified, generated, or
content-hashed output, record a missing-source blocker and stop the
migration. Do not infer columns from that output.
Search for:
/_api/, encoded variants, split URL fragments, and API base constants;fetch, Axios, XMLHttpRequest, jQuery AJAX, webapi.safeAjax,
shell.ajaxSafePost, and custom request wrappers;For each source candidate, record relative path, line, method, endpoint expression, and wrapper chain. A comment, example, or non-table endpoint still needs an explicit disposition. Excluded build outputs are never recorded.
Write the settings inventory to
docs/webapi-selectall-migration/migration-report.json and render the draft
report as described in
references/configuration-and-reporting.md.
Do not propose fields yet.
Stop if any in-scope source or configuration file cannot be read.
🚦 Gate (plan · migrate-webapi-selectall:2.confirm-scope): Confirm the project, configuration scopes and profiles, wildcard count, explicit-setting count, and source inventory before schema retrieval. Canceling leaves only the read-only draft report.
Use AskUserQuestion to confirm or cancel. Expand the inventory and repeat this
phase if the user identifies another source or deployment scope.
Goal: Use authoritative names while letting the LLM determine actual usage.
Build the initial unique list containing:
Do not treat a navigation-property name as a table identifier. Its target logical name is authoritative only after relationship metadata resolves it.
Resolve the environment URL from confirmed project context or pac env who.
If unavailable, ask for the URL as data gathering; never ask for or accept an
access token.
Write every deduplicated identifier, one per line, to
docs/webapi-selectall-migration/table-identifiers.txt. Run:
node "${PLUGIN_ROOT}/skills/migrate-webapi-selectall/scripts/query-table-schema.js" --project-root "<PROJECT_ROOT>" --environment-url "<ENVIRONMENT_URL>" --tables-file "<PROJECT_ROOT>/docs/webapi-selectall-migration/table-identifiers.txt" --output "<PROJECT_ROOT>/docs/webapi-selectall-migration/table-schema.json"
If an identifier does not resolve, trace the code or obtain the correct contract; do not guess.
After the initial snapshot:
$expand navigation property against its source table's
returned relationship metadata.table-identifiers-pass-<N>.txt and query them to
table-schema.pass-<N>.json.Treat table-schema.json and all numbered snapshots as one schema package.
Never requery a logical table already present in that package, and never
launch concurrent schema queries.
Identifier lists and schema snapshots are working files. Keep them until verification finishes, then delete them in Phase 7.
For every source inventory row:
mapped, non-table, or not-a-call.One logical table is normally reached from several places. Collect every call site for a table before proposing its fields: duplicated or competing wrappers, per-page scripts, different query shapes, and repeated calls in the same file. A later call site for an already-analyzed table can still add columns, so never stop at the first one.
For normal record GETs without $select, derive output fields from every
consumer and propose a source edit adding the smallest explicit projection.
Filters, ordering, and other query fields still belong in the fields setting,
even when they should not be added to the output projection.
Keep the response projection and fields-setting allowlist as separate sets.
Never add a filter-only, order-only, grouping-only, or write-only column to an
existing $select unless a response consumer also reads it.
For each wildcard setting:
Union the proven requirements from every call site that reaches that logical table within the applicable site behavior.
Validate each proposed name against the schema package.
Link every proposed column to source path and line or a user-confirmed external contract.
Produce the exact replacement:
Webapi/<table>/fields = <column-name-1>,<column-name-2>,<column-name-3>
Keep the proposal unresolved if it is empty or any evidence is incomplete.
For each already-explicit setting:
Update the report. Resolve all wildcard and call-site rows before continuing.
Output: Evidence-complete report with exact wildcard replacements and all already-explicit configurations.
Goal: Present the full exposure reduction before edits.
Show:
$select;🚦 Gate (consent · migrate-webapi-selectall:4.apply-plan): Approve all wildcard replacements, required source projections, optional explicit-setting hardening, and local edits. Canceling preserves only the report.
Use AskUserQuestion with:
Apply all wildcard fixes and approved explicit fixes;Apply all wildcard fixes only;Cancel.Never offer a subset of wildcard fixes.
Goal: Update source projections and every wildcard setting.
Edit to add approved $select projections. Preserve methods, filters,
ordering, expansion, pagination, encoding, Liquid expressions, and error
handling.Edit to replace every wildcard value in every scope and profile.
Preserve identifiers, key names, quoting, indentation, comments, and
unrelated values.If any edit fails or a file changed since review, stop. Do not continue with a partial configuration set and do not perform a broad rollback over user work.
Output: All approved local edits and updated report.
Goal: Prove the migration without trusting prior notes.
Webapi/<table>/fields wildcard values.$select;migration-report.html and re-render it from the updated data file.Do not claim full hardening while explicit configuration gaps remain. Use the partial status defined in the reporting contract when applicable.
Output: Final report and verified local migration.
Goal: Publish only verified changes.
Re-confirm every identity detail in
references/site-transfer.md with the user
immediately before uploading, and display the exact command. Select the
deployment profile the user reviewed, and use default only when they name
it. Any change of environment, website, data model, or profile requires a
separate deployment approval.
🚦 Gate (final · migrate-webapi-selectall:7.deploy): Approve the verified migration for the displayed environment, website, site type, data model, and deployment profile. Canceling preserves local edits and the final report without changing the live site.
Use AskUserQuestion: Deploy now or Keep local only.
pac auth who and pac env who, and stop on any mismatch.
pac pages upload-code-site accepts no --environment and targets whatever
the active authentication profile reports..powerpages-site contains the approved
configuration edits, run the existing production build, then run
pac pages upload-code-site --rootPath "<PROJECT_ROOT>" --siteName "<SITE_NAME>".pac pages upload --path "<PROJECT_ROOT>" --environment "<ENVIRONMENT>" --modelVersion "<Standard|Enhanced>" --deploymentProfile "<PROFILE>".Never substitute one upload command for the other. Each corrupts the other site type, and the damage cannot be reverted.
After deployment, list the read paths a smoke test would exercise: GET calls,
$select projections, $expand, FetchXML, and aggregates. Never run one
unprompted.
🚦 Gate (progress · migrate-webapi-selectall:7.smoke-test): Approve the listed read-path smoke test against the deployed site. Canceling skips it and reports the deployed migration as unverified.
Use AskUserQuestion: Run the read-path smoke test or Skip verification.
Never issue write, file, or image requests. Ask the user to exercise those paths themselves against disposable records.
Treat HTTP 403 responses as evidence to investigate and never restore *. Do
not add a column under the prior approval. Return to Phase 3, update the exact
plan and report, repeat the Phase 4 approval, independently verify in Phase 6,
and obtain a new Phase 7 deployment approval.
Delete every working file created during the migration, keeping only
docs/webapi-selectall-migration/migration-report.html and the
power-pages-icon.png the renderer places beside it:
table-identifiers.txt and table-identifiers-pass-<N>.txt;table-schema.json and table-schema.pass-<N>.json;migration-report.json.Delete only files this migration created, and confirm the directory holds the report and its icon alone. Skip cleanup while returning to an earlier phase, and delete the regenerated files once that pass finishes.
Record usage by following
${PLUGIN_ROOT}/references/skill-tracking-reference.md with
--skillName "MigrateWebapiSelectall".
Summarize wildcard counts, explicit reviews, source edits, report path, verification, deployment, and every path left unverified.
Create these tasks before Phase 1:
| Task subject | activeForm | Description |
|---|---|---|
| Prepare migration project | Preparing migration project | Confirm the site, then resolve layouts and git state |
| Inventory Web API usage | Inventorying Web API usage | Find every configuration and source call |
| Resolve actual columns | Resolving actual columns | Retrieve schema and trace every consumer |
| Review migration plan | Reviewing migration plan | Present exact fixes and evidence |
| Apply approved migration | Applying approved migration | Edit projections and configurations |
| Verify migration results | Verifying migration results | Repeat discovery, build, and finalize report |
| Deploy and summarize | Deploying and summarizing | Publish after approval and report outcome |
Mark each task in_progress when starting and completed when finished.
Begin with Phase 1: Prepare.