Skip to content

A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.

Add six Power Pages eval suites and keep grader evidence (#888)

Priyanshu Agrawal6100cd5808d4
diff --git a/.github/workflows/power-pages-evals.yml b/.github/workflows/power-pages-evals.yml
index 6716ce532..960422317 100644
--- a/.github/workflows/power-pages-evals.yml
+++ b/.github/workflows/power-pages-evals.yml
@@ -123,8 +123,32 @@ jobs:
REASONING_EFFORT: ${{ matrix.reasoningEffort }}
JUDGE_REASONING_EFFORT: ${{ matrix.judgeReasoningEffort }}
run: node evals/runtime/run.mjs run --skill "$SKILL" --runs "$RUNS" --model "$MODEL" --judge-model "$JUDGE_MODEL" --reasoning-effort "$REASONING_EFFORT" --judge-reasoning-effort "$JUDGE_REASONING_EFFORT" --out evals/reports/action
- # Raw trajectories, generated artifacts and screenshots are local-only.
- # A public repository's Actions artifacts must contain scalar summaries.
+ # Trials see only public fixtures and the public plugin, and their tools
+ # cannot read the environment. Still refuse to upload if the run token
+ # or any GitHub token shape appears anywhere in the evidence.
+ - name: check evidence for credentials
+ id: credential-check
+ if: ${{ always() }}
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: node evals/runtime/evidence.mjs check evals/reports/action
+ # Only publish judge explanations after checking the entire evidence
+ # tree, including error text, for credentials.
+ - name: explain failed checks
+ if: ${{ always() && steps.credential-check.outcome == 'success' }}
+ run: node evals/runtime/evidence.mjs report evals/reports/action >> "$GITHUB_STEP_SUMMARY"
+ # Trajectories, grader reasons, generated files and screenshots. The
+ # dashboard never reads this artifact; it fetches only power-pages-evals-*.
+ - name: upload grading evidence
+ if: ${{ always() && steps.credential-check.outcome == 'success' }}
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
+ with:
+ name: power-pages-eval-evidence-${{ matrix.skill }}--${{ matrix.model }}
+ path: evals/reports/action
+ include-hidden-files: true
+ if-no-files-found: warn
+ retention-days: 30
+ # The public dashboard consumes only this scalar summary.
- name: upload sanitized evidence
if: ${{ always() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
diff --git a/evals/README.md b/evals/README.md
index 35db1e069..4894dd1fb 100644
--- a/evals/README.md
+++ b/evals/README.md
@@ -1,10 +1,25 @@
# Skill evaluations
-Power Pages has offline [Vally](https://www.npmjs.com/package/@microsoft/vally) suites for `setup-auth` and `create-site`.
+Power Pages has offline [Vally](https://www.npmjs.com/package/@microsoft/vally) suites for `setup-auth`, `create-site`, `add-seo`, `add-localization`, `create-webroles`, `setup-datamodel`, `migrate-bootstrap`, and `integrate-webapi`.
Add suites as individual skills are improved rather than requiring coverage for every skill at once.
Other skills and plugins appear in the [evaluation dashboard](https://microsoft.github.io/power-platform-skills/evaluations/) as untested until they have their own measured evidence.
Existing `evals.json` files for other skills are preserved but are not run or counted as measured evidence by this runtime.
+The six additional suites each contain three capability cases and one unrelated dormancy case.
+Their coverage is deliberately bounded:
+
+| Skill | Offline coverage |
+|---|---|
+| `add-seo` | React and Astro SEO file edits, route exclusions, localized metadata, and minimal scope |
+| `add-localization` | React, Vue, and Arabic/RTL implementation plans, not completed localization |
+| `create-webroles` | SPA role files with supplied synthetic UUIDs, existing-role preservation, and a non-SPA writer handoff plan |
+| `setup-datamodel` | Blog, feedback, and existing-model extension proposals, not Dataverse schema creation |
+| `migrate-bootstrap` | Bootstrap 3 markup, custom CSS/Liquid risks, and residual migration assessment |
+| `integrate-webapi` | Read-only and registration integration plans, permission boundaries, and existing-client reuse |
+
+These are authored cases, not calibrated evidence or published measurements.
+Package manifests in fixtures identify the framework; the runtime does not install their dependencies.
+
The design follows [Agent Skills evaluation guidance](https://agentskills.io/skill-creation/evaluating-skills): realistic tasks, isolated trials, a no-skill baseline, checks against actual output, and human review before trusting automated grades.
[dotnet/skills](https://github.com/dotnet/skills) provides another public example of Vally-based evaluation.
@@ -102,6 +117,10 @@ Vally's text-only rubric grader receives actual artifact evidence for domain cor
It does not see screenshots or provide a visual-design judgment.
Every required grader must pass; a high prose score cannot compensate for a missing artifact or incorrect ER relationship.
Errors remain distinct from measured failures.
+The `scale_1_5` rubric maps raw scores 1 through 5 to 0, 0.25, 0.5, 0.75, and 1.
+The current 0.8 threshold therefore requires a raw 5/5 from each quality grader; raw 4/5 is a failure.
+Dashboard fractions such as 2/5 count passed capability trials, not stars or an average quality rating.
+Different judge pairings can apply different standards, so compare those fractions only with the judge and repeat count visible.
## Calibrate before publishing claims
@@ -118,10 +137,15 @@ The dashboard reports observed outcomes and explicit evidence categories.
## Publish evidence
-Each matrix job uploads only its sanitized `summary.json`.
+Each matrix job uploads two artifacts.
+`power-pages-evals-<skill>--<model>` holds only the sanitized `summary.json`, the sole input to the dashboard.
It contains case identifiers, verdicts, token counts, model IDs, reasoning efforts, source hashes and workflow provenance.
-Raw trajectories, generated artifacts, grader explanations, screenshots and errors remain local and are not uploaded from this public repository.
-For human calibration, run in a controlled environment and inspect local evidence; the public workflow artifact is deliberately insufficient for that review.
+`power-pages-eval-evidence-<skill>--<model>` holds the whole run folder: trajectories, generated files, screenshots, errors and every grader's explanation.
+It is kept for 30 days so any score can be traced to its reasons.
+The job also writes the judge's reasons for every failed check to the run's summary page.
+Trials only see public fixtures and the public plugin, and their tools cannot read the environment.
+Even so, the job skips the evidence upload if the run's token or any GitHub token shape appears in it (`node evals/runtime/evidence.mjs check <dir>`).
+Run `node evals/runtime/evidence.mjs report <dir>` on a downloaded or local run folder to list the failed checks and their reasons.
Agent usage records input, output and cache counters reported by the Copilot SDK.
Missing counters remain unknown.
@@ -134,7 +158,7 @@ After an evaluation completes, the existing showcase workflow fetches retained s
It validates the schema and matches the commit, workflow URL, skill and model to each matrix artifact before building the site's `/evaluations/` page.
Only summaries are copied into the build; artifact content is never executed.
The existing repo-stats report remains in the same Pages deployment.
-Evaluation artifacts are retained for up to 90 days.
+Summary artifacts are retained for up to 90 days.
The model workflow is manually dispatched; PR validation does not call models, and no nightly evaluation is scheduled.
The dashboard selects the latest whole suite per skill, agent model, judge model and both reasoning efforts.
diff --git a/evals/power-pages/add-localization/checks/arabic-rtl-localization-plan.json b/evals/power-pages/add-localization/checks/arabic-rtl-localization-plan.json
new file mode 100644
index 000000000..0b45479f3
--- /dev/null
+++ b/evals/power-pages/add-localization/checks/arabic-rtl-localization-plan.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/add-localization-plan.md",
+ "type": "text",
+ "requiredText": ["Arabic", "RTL", "keyboard", "widget"],
+ "requiredPatterns": ["mixed.direction|number", "narrow.screen|mobile"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/add-localization/checks/react-add-languages-plan.json b/evals/power-pages/add-localization/checks/react-add-languages-plan.json
new file mode 100644
index 000000000..3a7d50a5b
--- /dev/null
+++ b/evals/power-pages/add-localization/checks/react-add-languages-plan.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/add-localization-plan.md",
+ "type": "text",
+ "requiredText": ["React", "react-i18next", "en-US", "fr-FR", "de-DE", "selector"],
+ "requiredPatterns": ["build|runtime", "translation|translated"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/add-localization/checks/stationery-purchase-dormancy.json b/evals/power-pages/add-localization/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..342cc01e0
--- /dev/null
+++ b/evals/power-pages/add-localization/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["docs/add-localization-plan.md"]
+}
diff --git a/evals/power-pages/add-localization/checks/vue-translator-handoff.json b/evals/power-pages/add-localization/checks/vue-translator-handoff.json
new file mode 100644
index 000000000..4c4a66ed7
--- /dev/null
+++ b/evals/power-pages/add-localization/checks/vue-translator-handoff.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/add-localization-plan.md",
+ "type": "text",
+ "requiredText": ["Vue", "vue-i18n", "en-US", "es-MX", "blank"],
+ "requiredPatterns": ["key parity|matching keys", "missing|untranslated"],
+ "minTextLength": 300
+ }
+ ]
+}
diff --git a/evals/power-pages/add-localization/eval.yaml b/evals/power-pages/add-localization/eval.yaml
new file mode 100644
index 000000000..b1688edb0
--- /dev/null
+++ b/evals/power-pages/add-localization/eval.yaml
@@ -0,0 +1,113 @@
+name: power-pages/add-localization
+type: capability
+description: "Evaluate bounded localization plans for Power Pages SPAs without installing packages or testing live deployment."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: react-add-languages-plan
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/add-localization-plan.md for adding fr-FR and de-DE to an
+ existing React Power Pages site. Its current runtime localization uses
+ react-i18next with en-US as the default. Preserve all existing English
+ strings and runtime mode. The report must specify locale resources,
+ selector behavior, translation coverage, and build/runtime checks.
+ Do not install packages or edit application files. Treat this as a local
+ proposal, not proof that any locale was implemented or deployed.
+ graders:
+ - type: power-pages-artifacts
+ name: react-add-languages-plan-artifact
+ config:
+ contract: checks/react-add-languages-plan.json
+ - type: prompt
+ name: react-add-languages-plan-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan preserves the existing package, runtime mode and en-US default."
+ - "It covers resource extraction, locale switching, translated content and validation."
+ - "The report distinguishes proposed work from completed implementation."
+ - name: vue-translator-handoff
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/add-localization-plan.md for a Vue Power Pages SPA that needs
+ en-US and es-MX using vue-i18n. The owner wants blank Spanish values for
+ translators and no package upgrade. Specify locale resource structure,
+ key parity, the selector and validation of untranslated keys. Do not
+ install packages or edit application files; this is a proposal only.
+ graders:
+ - type: power-pages-artifacts
+ name: vue-translator-handoff-artifact
+ config:
+ contract: checks/vue-translator-handoff.json
+ - type: prompt
+ name: vue-translator-handoff-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan preserves vue-i18n and en-US, while leaving es-MX values blank for translators."
+ - "It describes matching keys and a meaningful check for missing or blank translations."
+ - "The report distinguishes proposed work from completed implementation."
+ - name: arabic-rtl-localization-plan
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/add-localization-plan.md for adding Arabic to an existing
+ React Power Pages site. Preserve the existing English locale and brand.
+ The plan must address RTL direction, Arabic-capable typography, mixed
+ direction numbers, forms, navigation, third-party widgets, keyboard use,
+ and narrow-screen verification. Do not claim to have tested the site,
+ installed packages, or completed implementation.
+ graders:
+ - type: power-pages-artifacts
+ name: arabic-rtl-localization-plan-artifact
+ config:
+ contract: checks/arabic-rtl-localization-plan.json
+ - type: prompt
+ name: arabic-rtl-localization-plan-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan addresses RTL as layout, typography, interaction and mixed-direction content, not text alignment alone."
+ - "It preserves brand and includes specific form, widget, keyboard and narrow-screen checks."
+ - "The report distinguishes proposed work from completed verification."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [add-localization]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated localization workflow."
diff --git a/evals/power-pages/add-localization/fixtures/purchase.json b/evals/power-pages/add-localization/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/add-localization/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/power-pages/add-seo/checks/astro-localized-seo.json b/evals/power-pages/add-seo/checks/astro-localized-seo.json
new file mode 100644
index 000000000..ffd0cabde
--- /dev/null
+++ b/evals/power-pages/add-seo/checks/astro-localized-seo.json
@@ -0,0 +1,25 @@
+{
+ "files": [
+ {
+ "path": "site/src/layouts/BaseLayout.astro",
+ "type": "text",
+ "minTextLength": 1
+ },
+ {
+ "path": "site/public/robots.txt",
+ "type": "text",
+ "requiredText": ["User-agent: *", "https://northwind.example/sitemap.xml"]
+ },
+ {
+ "path": "site/public/sitemap.xml",
+ "type": "text",
+ "requiredText": ["https://northwind.example/", "https://northwind.example/fr/", "https://northwind.example/services"],
+ "forbiddenText": ["hreflang=\"de-DE\""]
+ }
+ ],
+ "unchanged": [
+ {"path": "site/powerpages.config.json", "source": "fixtures/astro/powerpages.config.json"},
+ {"path": "site/package.json", "source": "fixtures/astro/package.json"}
+ ],
+ "absent": ["index.html", "site/index.html"]
+}
diff --git a/evals/power-pages/add-seo/checks/minimal-seo.json b/evals/power-pages/add-seo/checks/minimal-seo.json
new file mode 100644
index 000000000..0e4481914
--- /dev/null
+++ b/evals/power-pages/add-seo/checks/minimal-seo.json
@@ -0,0 +1,25 @@
+{
+ "files": [
+ {
+ "path": "site/public/robots.txt",
+ "type": "text",
+ "requiredText": ["User-agent: *", "Allow: /", "https://litware.example/sitemap.xml"]
+ },
+ {
+ "path": "site/public/sitemap.xml",
+ "type": "text",
+ "requiredText": ["https://litware.example/", "https://litware.example/about"]
+ },
+ {
+ "path": "site/index.html",
+ "type": "text",
+ "requiredPatterns": ["name\\s*=\\s*[\"']description[\"']"],
+ "forbiddenText": ["og:title", "twitter:card", "rel=\"icon\""]
+ }
+ ],
+ "unchanged": [
+ {"path": "site/powerpages.config.json", "source": "fixtures/react/powerpages.config.json"},
+ {"path": "site/package.json", "source": "fixtures/react/package.json"}
+ ],
+ "absent": ["site/public/favicon.svg", "site/public/favicon.ico"]
+}
diff --git a/evals/power-pages/add-seo/checks/react-catalog-seo.json b/evals/power-pages/add-seo/checks/react-catalog-seo.json
new file mode 100644
index 000000000..983189386
--- /dev/null
+++ b/evals/power-pages/add-seo/checks/react-catalog-seo.json
@@ -0,0 +1,29 @@
+{
+ "files": [
+ {
+ "path": "site/public/robots.txt",
+ "type": "text",
+ "requiredText": ["User-agent: *", "Disallow: /admin", "Disallow: /account", "https://fabrikam.example/sitemap.xml"]
+ },
+ {
+ "path": "site/public/sitemap.xml",
+ "type": "text",
+ "requiredText": ["https://fabrikam.example/", "https://fabrikam.example/about", "https://fabrikam.example/catalog"],
+ "forbiddenText": ["/admin", "/account", "/catalog/:id"]
+ },
+ {
+ "path": "site/index.html",
+ "type": "text",
+ "requiredPatterns": [
+ "name\\s*=\\s*[\"']description[\"']",
+ "rel\\s*=\\s*[\"']canonical[\"']",
+ "property\\s*=\\s*[\"']og:title[\"']",
+ "name\\s*=\\s*[\"']twitter:card[\"']"
+ ]
+ }
+ ],
+ "unchanged": [
+ {"path": "site/powerpages.config.json", "source": "fixtures/react/powerpages.config.json"},
+ {"path": "site/package.json", "source": "fixtures/react/package.json"}
+ ]
+}
diff --git a/evals/power-pages/add-seo/checks/stationery-purchase-dormancy.json b/evals/power-pages/add-seo/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..85c49ff85
--- /dev/null
+++ b/evals/power-pages/add-seo/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["site/public/robots.txt"]
+}
diff --git a/evals/power-pages/add-seo/eval.yaml b/evals/power-pages/add-seo/eval.yaml
new file mode 100644
index 000000000..7c0e657fd
--- /dev/null
+++ b/evals/power-pages/add-seo/eval.yaml
@@ -0,0 +1,143 @@
+name: power-pages/add-seo
+type: capability
+description: "Evaluate SEO assets for Power Pages code sites using local files only."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: react-catalog-seo
+ tags:
+ kind: capability
+ scope: offline-source
+ expect_activation: 'true'
+ prompt: |
+ Add SEO assets for a React Power Pages site at https://fabrikam.example.
+ Routes are /, /about, /catalog, /catalog/:id, /admin, and /account.
+ Exclude /admin and /account from crawling and the sitemap. Do not put the
+ dynamic /catalog/:id route in the sitemap. Create or update
+ site/public/robots.txt, site/public/sitemap.xml, and site/index.html with
+ accurate description, canonical, Open Graph, and Twitter Card metadata.
+ The existing site is a public product catalog titled Fabrikam Catalog;
+ describe its product browsing rather than inventing services or offers.
+ Use only local files. The owner has approved these local edits. Do not
+ browse, deploy, install packages, or commit.
+ agent_environment:
+ files:
+ - src: fixtures/react/powerpages.config.json
+ dest: site/powerpages.config.json
+ - src: fixtures/react/package.json
+ dest: site/package.json
+ - src: fixtures/react/index.html
+ dest: site/index.html
+ graders:
+ - type: power-pages-artifacts
+ name: react-catalog-seo-artifacts
+ config:
+ contract: checks/react-catalog-seo.json
+ - type: prompt
+ name: react-catalog-seo-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "Robots rules and sitemap use the supplied production URL and exclude private routes."
+ - "The sitemap contains stable routes only; metadata truthfully describes the site."
+ - "Inspect actual files and do not claim browser verification or deployment."
+ - name: astro-localized-seo
+ tags:
+ kind: capability
+ scope: offline-source
+ expect_activation: 'true'
+ prompt: |
+ Prepare SEO metadata for an Astro Power Pages site at https://northwind.example.
+ Its routes are /, /services, and /blog. Existing locales are en-US and fr-FR;
+ the French home route is /fr/. Add or update the Astro base layout at
+ site/src/layouts/BaseLayout.astro and create site/public/robots.txt and
+ site/public/sitemap.xml. Include accurate canonical and hreflang metadata
+ for the existing locales only. Do not create a root index.html or advertise
+ locales that are not listed. The owner approved local file edits only.
+ Do not browse, deploy, install packages, or commit.
+ agent_environment:
+ files:
+ - src: fixtures/astro/powerpages.config.json
+ dest: site/powerpages.config.json
+ - src: fixtures/astro/package.json
+ dest: site/package.json
+ - src: fixtures/astro/BaseLayout.astro
+ dest: site/src/layouts/BaseLayout.astro
+ graders:
+ - type: power-pages-artifacts
+ name: astro-localized-seo-artifacts
+ config:
+ contract: checks/astro-localized-seo.json
+ - type: prompt
+ name: astro-localized-seo-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "Astro metadata belongs in the layout and respects the supplied locale routes."
+ - "Canonical, hreflang, robots and sitemap entries are internally consistent."
+ - "Inspect actual files and do not claim browser verification or deployment."
+ - name: minimal-seo
+ tags:
+ kind: capability
+ scope: offline-source
+ expect_activation: 'true'
+ prompt: |
+ Add only basic SEO to a small React Power Pages site at
+ https://litware.example with routes / and /about. Create or update
+ site/public/robots.txt, site/public/sitemap.xml, and site/index.html.
+ Do not add social cards or create a favicon. The owner approved these
+ local edits only. Do not browse, deploy, install packages, or commit.
+ The site is a public catalog titled Litware Catalog.
+ agent_environment:
+ files:
+ - src: fixtures/react/powerpages.config.json
+ dest: site/powerpages.config.json
+ - src: fixtures/react/package.json
+ dest: site/package.json
+ - src: fixtures/react/index.html
+ dest: site/index.html
+ graders:
+ - type: power-pages-artifacts
+ name: minimal-seo-artifacts
+ config:
+ contract: checks/minimal-seo.json
+ - type: prompt
+ name: minimal-seo-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The two public routes appear in the sitemap and the sitemap URL is correct."
+ - "The result stays within the requested minimal scope."
+ - "Inspect actual files and do not claim browser verification or deployment."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [add-seo]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated SEO workflow."
diff --git a/evals/power-pages/add-seo/fixtures/astro/BaseLayout.astro b/evals/power-pages/add-seo/fixtures/astro/BaseLayout.astro
new file mode 100644
index 000000000..0eedc1db0
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/astro/BaseLayout.astro
@@ -0,0 +1,14 @@
+---
+const { title = 'Northwind Services', lang = 'en-US' } = Astro.props;
+---
+<!doctype html>
+<html lang={lang}>
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>{title}</title>
+ </head>
+ <body>
+ <slot />
+ </body>
+</html>
diff --git a/evals/power-pages/add-seo/fixtures/astro/package.json b/evals/power-pages/add-seo/fixtures/astro/package.json
new file mode 100644
index 000000000..0468a8d82
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/astro/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "services-fixture",
+ "private": true,
+ "dependencies": {
+ "astro": "5.0.0"
+ }
+}
diff --git a/evals/power-pages/add-seo/fixtures/astro/powerpages.config.json b/evals/power-pages/add-seo/fixtures/astro/powerpages.config.json
new file mode 100644
index 000000000..cfe87aca8
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/astro/powerpages.config.json
@@ -0,0 +1,4 @@
+{
+ "siteName": "Northwind Services",
+ "websiteRecordId": "00000000-0000-4000-8000-000000000004"
+}
diff --git a/evals/power-pages/add-seo/fixtures/purchase.json b/evals/power-pages/add-seo/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/power-pages/add-seo/fixtures/react/index.html b/evals/power-pages/add-seo/fixtures/react/index.html
new file mode 100644
index 000000000..4f1a7df35
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/react/index.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Catalog</title>
+ </head>
+ <body>
+ <div id="root"></div>
+ </body>
+</html>
diff --git a/evals/power-pages/add-seo/fixtures/react/package.json b/evals/power-pages/add-seo/fixtures/react/package.json
new file mode 100644
index 000000000..165681452
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/react/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "catalog-fixture",
+ "private": true,
+ "dependencies": {
+ "react": "19.3.1",
+ "react-dom": "19.3.1"
+ }
+}
diff --git a/evals/power-pages/add-seo/fixtures/react/powerpages.config.json b/evals/power-pages/add-seo/fixtures/react/powerpages.config.json
new file mode 100644
index 000000000..c3d221233
--- /dev/null
+++ b/evals/power-pages/add-seo/fixtures/react/powerpages.config.json
@@ -0,0 +1,4 @@
+{
+ "siteName": "Catalog",
+ "websiteRecordId": "00000000-0000-4000-8000-000000000003"
+}
diff --git a/evals/power-pages/create-webroles/checks/add-community-roles.json b/evals/power-pages/create-webroles/checks/add-community-roles.json
new file mode 100644
index 000000000..2b66520f4
--- /dev/null
+++ b/evals/power-pages/create-webroles/checks/add-community-roles.json
@@ -0,0 +1,19 @@
+{
+ "files": [
+ {
+ "path": "site/.powerpages-site/web-roles/content-editors.yml",
+ "type": "yaml",
+ "requiredText": ["anonymoususersrole: false", "authenticatedusersrole: false", "7ab524fd-6f2c-4bd0-9c70-12aecb2bf00b", "name: Content Editors"]
+ },
+ {
+ "path": "site/.powerpages-site/web-roles/moderators.yml",
+ "type": "yaml",
+ "requiredText": ["anonymoususersrole: false", "authenticatedusersrole: false", "4a8f3d9b-6859-4c48-bcd2-ff0b975e0510", "name: Moderators"]
+ }
+ ],
+ "unchanged": [
+ {"path": "site/.powerpages-site/web-roles/administrators.yml", "source": "fixtures/existing-roles/administrators.yml"},
+ {"path": "site/.powerpages-site/web-roles/authenticated-users.yml", "source": "fixtures/existing-roles/authenticated-users.yml"},
+ {"path": "site/.powerpages-site/web-roles/anonymous-users.yml", "source": "fixtures/existing-roles/anonymous-users.yml"}
+ ]
+}
diff --git a/evals/power-pages/create-webroles/checks/create-non-spa-content-role.json b/evals/power-pages/create-webroles/checks/create-non-spa-content-role.json
new file mode 100644
index 000000000..db3dcb494
--- /dev/null
+++ b/evals/power-pages/create-webroles/checks/create-non-spa-content-role.json
@@ -0,0 +1,16 @@
+{
+ "files": [
+ {
+ "path": "docs/non-spa-role-plan.md",
+ "type": "text",
+ "requiredText": ["site/web-roles/content-editors.webrole.yml", "anonymoususersrole: false", "authenticatedusersrole: false", "Content Editors", "create-web-role.js"],
+ "forbiddenPatterns": ["\\b[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}\\b"],
+ "minTextLength": 200
+ }
+ ],
+ "unchanged": [
+ {"path": "site/website.yml", "source": "fixtures/direct-export/website.yml"},
+ {"path": "site/.portalconfig/website.yml", "source": "fixtures/direct-export/portalconfig.yml"}
+ ],
+ "absent": ["site/powerpages.config.json", "site/web-roles"]
+}
diff --git a/evals/power-pages/create-webroles/checks/create-standard-roles.json b/evals/power-pages/create-webroles/checks/create-standard-roles.json
new file mode 100644
index 000000000..3887b329c
--- /dev/null
+++ b/evals/power-pages/create-webroles/checks/create-standard-roles.json
@@ -0,0 +1,19 @@
+{
+ "files": [
+ {
+ "path": "site/.powerpages-site/web-roles/administrators.yml",
+ "type": "yaml",
+ "requiredText": ["anonymoususersrole: false", "authenticatedusersrole: false", "9b1d6fc0-f913-4a75-96bf-56d1bb3f4c10", "name: Administrators"]
+ },
+ {
+ "path": "site/.powerpages-site/web-roles/authenticated-users.yml",
+ "type": "yaml",
+ "requiredText": ["anonymoususersrole: false", "authenticatedusersrole: true", "1a764d8e-276f-42ec-a0b9-7dd93ef26710"]
+ },
+ {
+ "path": "site/.powerpages-site/web-roles/anonymous-users.yml",
+ "type": "yaml",
+ "requiredText": ["anonymoususersrole: true", "authenticatedusersrole: false", "4d92e2b1-6a85-4fc7-8b10-d4c1280a6e31"]
+ }
+ ]
+}
diff --git a/evals/power-pages/create-webroles/checks/stationery-purchase-dormancy.json b/evals/power-pages/create-webroles/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..ed169a907
--- /dev/null
+++ b/evals/power-pages/create-webroles/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["site/.powerpages-site/web-roles/administrators.yml"]
+}
diff --git a/evals/power-pages/create-webroles/eval.yaml b/evals/power-pages/create-webroles/eval.yaml
new file mode 100644
index 000000000..864531bf8
--- /dev/null
+++ b/evals/power-pages/create-webroles/eval.yaml
@@ -0,0 +1,153 @@
+name: power-pages/create-webroles
+type: capability
+description: "Evaluate local web-role metadata creation without deploying a site."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: create-standard-roles
+ tags:
+ kind: capability
+ scope: offline-source
+ expect_activation: 'true'
+ prompt: |
+ The first deployment is complete and no roles exist yet. Create the
+ standard roles in site/.powerpages-site/web-roles/: Administrators,
+ Authenticated Users, and Anonymous Users. The following distinct UUIDv4
+ IDs were generated for this offline task; use them exactly once:
+ Administrators 9b1d6fc0-f913-4a75-96bf-56d1bb3f4c10;
+ Authenticated Users 1a764d8e-276f-42ec-a0b9-7dd93ef26710;
+ Anonymous Users 4d92e2b1-6a85-4fc7-8b10-d4c1280a6e31.
+ Keep the two special-role flags unique. The owner approved local file
+ creation only; do not deploy, authenticate, or commit.
+ The supplied IDs are synthetic UUID-helper outputs: no generator execution
+ is required or available in this offline task.
+ agent_environment:
+ files:
+ - src: fixtures/spa/powerpages.config.json
+ dest: site/powerpages.config.json
+ - src: fixtures/spa/website.yml
+ dest: site/.powerpages-site/website.yml
+ graders:
+ - type: power-pages-artifacts
+ name: create-standard-roles-artifacts
+ config:
+ contract: checks/create-standard-roles.json
+ - type: prompt
+ name: create-standard-roles-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "All three role files use the supplied IDs and valid role flags."
+ - "Only Authenticated Users and Anonymous Users receive their respective special flags."
+ - "Do not claim deployment or live verification."
+ - name: add-community-roles
+ tags:
+ kind: capability
+ scope: offline-source
+ expect_activation: 'true'
+ prompt: |
+ Add Content Editors and Moderators to
+ site/.powerpages-site/web-roles/. Administrators,
+ Authenticated Users, and Anonymous Users already exist with IDs
+ 09f1f0be-e4db-42f3-987d-202a0e9fb017,
+ 09f1f0be-e4db-42f3-987d-202a0e9fb018, and
+ 09f1f0be-e4db-42f3-987d-202a0e9fb019 respectively. Their flags are
+ already assigned correctly. Preserve them and create only the two new
+ roles using these generated IDs: Content Editors
+ 7ab524fd-6f2c-4bd0-9c70-12aecb2bf00b; Moderators
+ 4a8f3d9b-6859-4c48-bcd2-ff0b975e0510. Do not duplicate special-role
+ flags. The owner approved local files only; do not deploy.
+ The supplied IDs are synthetic UUID-helper outputs: no generator execution
+ is required or available in this offline task.
+ agent_environment:
+ files:
+ - src: fixtures/spa/powerpages.config.json
+ dest: site/powerpages.config.json
+ - src: fixtures/spa/website.yml
+ dest: site/.powerpages-site/website.yml
+ - src: fixtures/existing-roles/administrators.yml
+ dest: site/.powerpages-site/web-roles/administrators.yml
+ - src: fixtures/existing-roles/authenticated-users.yml
+ dest: site/.powerpages-site/web-roles/authenticated-users.yml
+ - src: fixtures/existing-roles/anonymous-users.yml
+ dest: site/.powerpages-site/web-roles/anonymous-users.yml
+ graders:
+ - type: power-pages-artifacts
+ name: add-community-roles-artifacts
+ config:
+ contract: checks/add-community-roles.json
+ - type: prompt
+ name: add-community-roles-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "Only the requested new roles are created and neither receives a special-role flag."
+ - "Existing role files remain unchanged and IDs are not reused."
+ - "Do not claim deployment or live verification."
+ - name: create-non-spa-content-role
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ This is a downloaded non-SPA site opened directly at site/, with
+ .portalconfig/ and website.yml and no powerpages.config.json. Add one
+ Content Editors role under site/web-roles/. It is an ordinary role, so
+ both anonymoususersrole and authenticatedusersrole must be false. The
+ deterministic writer generates the role ID after approval; do not invent
+ or hardcode one in the plan.
+ Write docs/non-spa-role-plan.md proposing the exact metadata path and
+ four role fields, and the script invocation that would create it after
+ approval. The deterministic writer is unavailable offline; do not write
+ role metadata manually, modify the export, or deploy.
+ agent_environment:
+ files:
+ - src: fixtures/direct-export/website.yml
+ dest: site/website.yml
+ - src: fixtures/direct-export/portalconfig.yml
+ dest: site/.portalconfig/website.yml
+ graders:
+ - type: power-pages-artifacts
+ name: create-non-spa-content-role-artifact
+ config:
+ contract: checks/create-non-spa-content-role.json
+ - type: prompt
+ name: create-non-spa-content-role-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The proposed role uses the directly opened non-SPA metadata root and PAC per-record naming."
+ - "Both special-role flags are false, ID generation is deferred to the deterministic writer, and metadata creation requires approval."
+ - "Do not claim deployment or live verification."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [create-webroles]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated role workflow."
diff --git a/evals/power-pages/create-webroles/fixtures/direct-export/portalconfig.yml b/evals/power-pages/create-webroles/fixtures/direct-export/portalconfig.yml
new file mode 100644
index 000000000..50e0a4350
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/direct-export/portalconfig.yml
@@ -0,0 +1 @@
+siteName: Fabrikam Community
diff --git a/evals/power-pages/create-webroles/fixtures/direct-export/website.yml b/evals/power-pages/create-webroles/fixtures/direct-export/website.yml
new file mode 100644
index 000000000..f75cea420
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/direct-export/website.yml
@@ -0,0 +1,2 @@
+id: 00000000-0000-4000-8000-000000000002
+name: Fabrikam Community
diff --git a/evals/power-pages/create-webroles/fixtures/existing-roles/administrators.yml b/evals/power-pages/create-webroles/fixtures/existing-roles/administrators.yml
new file mode 100644
index 000000000..03bdc0dcb
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/existing-roles/administrators.yml
@@ -0,0 +1,4 @@
+anonymoususersrole: false
+authenticatedusersrole: false
+id: 09f1f0be-e4db-42f3-987d-202a0e9fb017
+name: Administrators
diff --git a/evals/power-pages/create-webroles/fixtures/existing-roles/anonymous-users.yml b/evals/power-pages/create-webroles/fixtures/existing-roles/anonymous-users.yml
new file mode 100644
index 000000000..7b898ca6a
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/existing-roles/anonymous-users.yml
@@ -0,0 +1,4 @@
+anonymoususersrole: true
+authenticatedusersrole: false
+id: 09f1f0be-e4db-42f3-987d-202a0e9fb019
+name: Anonymous Users
diff --git a/evals/power-pages/create-webroles/fixtures/existing-roles/authenticated-users.yml b/evals/power-pages/create-webroles/fixtures/existing-roles/authenticated-users.yml
new file mode 100644
index 000000000..3ccdb1625
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/existing-roles/authenticated-users.yml
@@ -0,0 +1,4 @@
+anonymoususersrole: false
+authenticatedusersrole: true
+id: 09f1f0be-e4db-42f3-987d-202a0e9fb018
+name: Authenticated Users
diff --git a/evals/power-pages/create-webroles/fixtures/purchase.json b/evals/power-pages/create-webroles/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/power-pages/create-webroles/fixtures/spa/powerpages.config.json b/evals/power-pages/create-webroles/fixtures/spa/powerpages.config.json
new file mode 100644
index 000000000..c8d05ccd8
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/spa/powerpages.config.json
@@ -0,0 +1,5 @@
+{
+ "siteName": "Contoso Portal",
+ "websiteRecordId": "00000000-0000-4000-8000-000000000001",
+ "environmentUrl": "https://contoso.example"
+}
diff --git a/evals/power-pages/create-webroles/fixtures/spa/website.yml b/evals/power-pages/create-webroles/fixtures/spa/website.yml
new file mode 100644
index 000000000..7d2b384b7
--- /dev/null
+++ b/evals/power-pages/create-webroles/fixtures/spa/website.yml
@@ -0,0 +1,2 @@
+id: 00000000-0000-4000-8000-000000000001
+name: Contoso Portal
diff --git a/evals/power-pages/integrate-webapi/checks/events-registration-webapi-plan.json b/evals/power-pages/integrate-webapi/checks/events-registration-webapi-plan.json
new file mode 100644
index 000000000..4944fff08
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/checks/events-registration-webapi-plan.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/webapi-integration-plan.md",
+ "type": "text",
+ "requiredText": ["Events", "Registrations", "read", "create", "lookup", "server"],
+ "requiredPatterns": ["permission|authorization", "not.{0,40}ui|ui.{0,40}not"],
+ "minTextLength": 300
+ }
+ ]
+}
diff --git a/evals/power-pages/integrate-webapi/checks/existing-contact-client-plan.json b/evals/power-pages/integrate-webapi/checks/existing-contact-client-plan.json
new file mode 100644
index 000000000..70f70b7cd
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/checks/existing-contact-client-plan.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "docs/webapi-integration-plan.md",
+ "type": "text",
+ "requiredText": ["src/shared/powerPagesApi.ts", "Contacts", "anti-forgery", "contactid", "firstname", "lastname", "permission", "architect"],
+ "requiredPatterns": ["reuse|existing client"],
+ "minTextLength": 250
+ }
+ ],
+ "unchanged": [{"path": "src/shared/powerPagesApi.ts", "source": "fixtures/powerPagesApi.ts"}]
+}
diff --git a/evals/power-pages/integrate-webapi/checks/reviews-webapi-plan.json b/evals/power-pages/integrate-webapi/checks/reviews-webapi-plan.json
new file mode 100644
index 000000000..afb5147e0
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/checks/reviews-webapi-plan.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/webapi-integration-plan.md",
+ "type": "text",
+ "requiredText": ["cr8f1_products", "cr8f1_categories", "cr8f1_reviews", "_cr8f1_product_value", "_cr8f1_category_value", "read-only"],
+ "requiredPatterns": ["permissions|table permission", "field|allowlist", "deploy"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/integrate-webapi/checks/stationery-purchase-dormancy.json b/evals/power-pages/integrate-webapi/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..ee49a37c1
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["docs/webapi-integration-plan.md"]
+}
diff --git a/evals/power-pages/integrate-webapi/eval.yaml b/evals/power-pages/integrate-webapi/eval.yaml
new file mode 100644
index 000000000..ea3d67aeb
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/eval.yaml
@@ -0,0 +1,127 @@
+name: power-pages/integrate-webapi
+type: capability
+description: "Evaluate Web API integration plans using supplied metadata and permission evidence only."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: reviews-webapi-plan
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/webapi-integration-plan.md for a React site with Products,
+ Categories, and Reviews. Entity sets are cr8f1_products,
+ cr8f1_categories, and cr8f1_reviews. Reviews has lookup columns
+ _cr8f1_product_value and _cr8f1_category_value. The approved access is
+ read-only for all three tables. Approved fields are cr8f1_productid and
+ cr8f1_name for Products; cr8f1_categoryid and cr8f1_name for Categories;
+ and cr8f1_reviewid, cr8f1_rating, _cr8f1_product_value, and
+ _cr8f1_category_value for Reviews. Specify proposed source integration points,
+ selected fields, relationship reads, Web API settings/permissions to
+ verify, and deployment prerequisites. Do not broaden permissions,
+ connect to Dataverse, or claim the API was tested.
+ graders:
+ - type: power-pages-artifacts
+ name: reviews-webapi-plan-artifact
+ config:
+ contract: checks/reviews-webapi-plan.json
+ - type: prompt
+ name: reviews-webapi-plan-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan uses supplied entity sets, lookup read names and read-only access."
+ - "It covers least-privilege permissions, exact field settings, and deployment before live use."
+ - "It distinguishes a proposal from a successful API call."
+ - name: events-registration-webapi-plan
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/webapi-integration-plan.md for a Vue site with Events and
+ Registrations. Supplied permission evidence grants authenticated users
+ read on Events and read/create on Registrations; the Registration table
+ has a lookup to Event. Identify the allowed operations, required
+ lookup/relationship handling, metadata needed before selecting exact
+ fields and navigation property names for an allowlist, and the
+ distinction between client UI and server-enforced table permissions.
+ Do not add permissions, use the network, or claim deployment.
+ graders:
+ - type: power-pages-artifacts
+ name: events-registration-webapi-plan-artifact
+ config:
+ contract: checks/events-registration-webapi-plan.json
+ - type: prompt
+ name: events-registration-webapi-plan-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan preserves the distinct Events read and Registrations read/create grants."
+ - "It describes lookup handling and recognizes that UI checks do not enforce server authorization."
+ - "It does not claim permissions were deployed or calls tested."
+ - name: existing-contact-client-plan
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Write docs/webapi-integration-plan.md for integrating read-only access
+ to the Contacts table in an existing React app. src/shared/powerPagesApi.ts
+ already exists and permission design is handled by the site architects.
+ Approved fields are contactid, firstname, and lastname on entity set
+ contacts; no other Contact fields or write operations are approved.
+ Explain how to inspect and reuse the existing client rather than create
+ a duplicate, keep the query to the approved Contact fields, and verify
+ anti-forgery token handling. Do not invent permission grants, contact
+ Dataverse, or claim the integration was tested.
+ agent_environment:
+ files:
+ - src: fixtures/powerPagesApi.ts
+ dest: src/shared/powerPagesApi.ts
+ graders:
+ - type: power-pages-artifacts
+ name: existing-contact-client-plan-artifact
+ config:
+ contract: checks/existing-contact-client-plan.json
+ - type: prompt
+ name: existing-contact-client-plan-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan reuses the existing client and leaves permission design to the architects."
+ - "It limits data to approved Contact fields and treats anti-forgery handling as required."
+ - "It distinguishes a plan from a tested integration."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [integrate-webapi]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated Web API workflow."
diff --git a/evals/power-pages/integrate-webapi/fixtures/powerPagesApi.ts b/evals/power-pages/integrate-webapi/fixtures/powerPagesApi.ts
new file mode 100644
index 000000000..f8486f4e5
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/fixtures/powerPagesApi.ts
@@ -0,0 +1,13 @@
+export async function powerPagesFetch<T>(path: string): Promise<T> {
+ const token = await new Promise<string>((resolve, reject) => {
+ window.shell.getTokenDeferred().done(resolve).fail(reject);
+ });
+ const response = await fetch(`/_api/${path}`, {
+ headers: {
+ Accept: 'application/json',
+ '__RequestVerificationToken': token,
+ },
+ });
+ if (!response.ok) throw new Error(`Power Pages API request failed: ${response.status}`);
+ return response.json() as Promise<T>;
+}
diff --git a/evals/power-pages/integrate-webapi/fixtures/purchase.json b/evals/power-pages/integrate-webapi/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/integrate-webapi/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/power-pages/migrate-bootstrap/checks/bootstrap3-class-assessment.json b/evals/power-pages/migrate-bootstrap/checks/bootstrap3-class-assessment.json
new file mode 100644
index 000000000..3b167e1eb
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/checks/bootstrap3-class-assessment.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/bootstrap5-assessment.md",
+ "type": "text",
+ "requiredText": ["Bootstrap 3", "Bootstrap 5", "data-toggle", "data-bs-toggle", "panel", "card", "glyphicon"],
+ "requiredPatterns": ["review|verify|test", "not.{0,30}(migrat|run)|has not been migrated"],
+ "minTextLength": 300
+ }
+ ]
+}
diff --git a/evals/power-pages/migrate-bootstrap/checks/custom-site-migration-risks.json b/evals/power-pages/migrate-bootstrap/checks/custom-site-migration-risks.json
new file mode 100644
index 000000000..57c5d16d1
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/checks/custom-site-migration-risks.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/bootstrap5-assessment.md",
+ "type": "text",
+ "requiredText": ["custom.css", ".navbar", ".panel-heading", ".btn-default", "Liquid", "restore point"],
+ "requiredPatterns": ["manual|review", "upload"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/migrate-bootstrap/checks/residual-v3-pattern-review.json b/evals/power-pages/migrate-bootstrap/checks/residual-v3-pattern-review.json
new file mode 100644
index 000000000..918cd5ad8
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/checks/residual-v3-pattern-review.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/bootstrap5-assessment.md",
+ "type": "text",
+ "requiredText": ["data-toggle=\"tab\"", ".input-group-addon", "glyphicon", "bootstrap.min.css", "Bootstrap 5"],
+ "requiredPatterns": ["runtime flag|pac-log.txt", "upload"],
+ "minTextLength": 300
+ }
+ ]
+}
diff --git a/evals/power-pages/migrate-bootstrap/checks/stationery-purchase-dormancy.json b/evals/power-pages/migrate-bootstrap/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..e87eeb009
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["docs/bootstrap5-assessment.md"]
+}
diff --git a/evals/power-pages/migrate-bootstrap/eval.yaml b/evals/power-pages/migrate-bootstrap/eval.yaml
new file mode 100644
index 000000000..e400f2305
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/eval.yaml
@@ -0,0 +1,112 @@
+name: power-pages/migrate-bootstrap
+type: capability
+description: "Evaluate bounded Bootstrap migration assessment using supplied local site evidence only."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: bootstrap3-class-assessment
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Review this local Bootstrap 3 evidence from a classic Power Pages site:
+ templates use data-toggle="dropdown", .panel, .badge-info, and
+ .glyphicon.glyphicon-search. Write docs/bootstrap5-assessment.md with
+ the likely Bootstrap 5 equivalents and verification steps. Do not run
+ the PAC migration engine, change site files, authenticate, upload, or
+ claim the site has migrated.
+ graders:
+ - type: power-pages-artifacts
+ name: bootstrap3-class-assessment-artifact
+ config:
+ contract: checks/bootstrap3-class-assessment.json
+ - type: prompt
+ name: bootstrap3-class-assessment-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The assessment identifies Bootstrap 3 patterns and plausible Bootstrap 5 replacements without assuming automatic conversion."
+ - "It includes local verification and explicitly leaves engine execution and upload unperformed."
+ - name: custom-site-migration-risks
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Assess a classic site containing custom.css overrides for .navbar,
+ .panel-heading, and .btn-default, plus Liquid templates with embedded
+ markup. Write docs/bootstrap5-assessment.md describing why custom CSS
+ and Liquid require review after the automated Bootstrap 3-to-5 engine,
+ how to preserve the source copy, and a safe local review sequence.
+ No engine, network, upload, or deployment is authorized.
+ graders:
+ - type: power-pages-artifacts
+ name: custom-site-migration-risks-artifact
+ config:
+ contract: checks/custom-site-migration-risks.json
+ - type: prompt
+ name: custom-site-migration-risks-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The plan distinguishes automated transformations from flagged custom CSS and Liquid work."
+ - "It preserves a restore point and separates local review from any upload."
+ - "It does not represent a proposed sequence as completed migration."
+ - name: residual-v3-pattern-review
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ A supplied V5-copy review found data-toggle="tab", .input-group-addon,
+ and a glyphicon in local HTML, while bootstrap.min.css is Bootstrap 5.
+ Write docs/bootstrap5-assessment.md listing these as residual findings,
+ prioritize manual fixes, and state what evidence is still required before
+ any upload or runtime-flag claim. Do not alter source files or claim that
+ the migration completed successfully.
+ graders:
+ - type: power-pages-artifacts
+ name: residual-v3-pattern-review-artifact
+ config:
+ contract: checks/residual-v3-pattern-review.json
+ - type: prompt
+ name: residual-v3-pattern-review-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The V5 stylesheet does not erase the significance of residual Bootstrap 3 markup."
+ - "The report prioritizes the supplied residuals and preserves the upload and runtime verification boundary."
+ - "It does not claim the site is migrated or live."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [migrate-bootstrap]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated migration workflow."
diff --git a/evals/power-pages/migrate-bootstrap/fixtures/purchase.json b/evals/power-pages/migrate-bootstrap/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/migrate-bootstrap/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/power-pages/setup-datamodel/checks/blog-data-model-proposal.json b/evals/power-pages/setup-datamodel/checks/blog-data-model-proposal.json
new file mode 100644
index 000000000..f669f2dd1
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/checks/blog-data-model-proposal.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/data-model-proposal.md",
+ "type": "text",
+ "requiredText": ["cr8f1_author", "cr8f1_post", "cr8f1_name", "cr8f1_email", "cr8f1_bio", "cr8f1_title", "cr8f1_body"],
+ "requiredPatterns": ["one.to.many|1\\s*:\\s*n", "erDiagram"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/setup-datamodel/checks/extend-review-data-model.json b/evals/power-pages/setup-datamodel/checks/extend-review-data-model.json
new file mode 100644
index 000000000..898f8ccbc
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/checks/extend-review-data-model.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/data-model-proposal.md",
+ "type": "text",
+ "requiredText": ["cr8f1_customer", "cr8f1_product", "cr8f1_review", "cr8f1_rating", "cr8f1_comment", "cr8f1_loyaltypoints"],
+ "requiredPatterns": ["customer.{0,80}review|review.{0,80}customer", "product.{0,80}review|review.{0,80}product", "erDiagram"],
+ "minTextLength": 350
+ }
+ ]
+}
diff --git a/evals/power-pages/setup-datamodel/checks/feedback-table-proposal.json b/evals/power-pages/setup-datamodel/checks/feedback-table-proposal.json
new file mode 100644
index 000000000..1886f2011
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/checks/feedback-table-proposal.json
@@ -0,0 +1,11 @@
+{
+ "files": [
+ {
+ "path": "docs/data-model-proposal.md",
+ "type": "text",
+ "requiredText": ["cr8f1_feedback", "cr8f1_subject", "cr8f1_description", "cr8f1_rating", "cr8f1_submittedon", "1", "5"],
+ "requiredPatterns": ["required|business required", "multiline|multiple lines", "whole number|integer"],
+ "minTextLength": 250
+ }
+ ]
+}
diff --git a/evals/power-pages/setup-datamodel/checks/stationery-purchase-dormancy.json b/evals/power-pages/setup-datamodel/checks/stationery-purchase-dormancy.json
new file mode 100644
index 000000000..bb9ed62ef
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/checks/stationery-purchase-dormancy.json
@@ -0,0 +1,12 @@
+{
+ "files": [
+ {
+ "path": "results/purchase.json",
+ "type": "json",
+ "requiredKeys": ["currency", "subtotal", "tax", "total"],
+ "requiredValues": {"currency": "GBP", "subtotal": 15, "tax": 3, "total": 18}
+ }
+ ],
+ "unchanged": [{"path": "inputs/purchase.json", "source": "fixtures/purchase.json"}],
+ "absent": ["docs/data-model-proposal.md"]
+}
diff --git a/evals/power-pages/setup-datamodel/eval.yaml b/evals/power-pages/setup-datamodel/eval.yaml
new file mode 100644
index 000000000..083d85f09
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/eval.yaml
@@ -0,0 +1,114 @@
+name: power-pages/setup-datamodel
+type: capability
+description: "Evaluate evidence-backed Dataverse model proposals without connecting to an environment."
+defaults:
+ executor: power-pages-offline
+ timeout: 10m
+ runs: 1
+stimuli:
+ - name: blog-data-model-proposal
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Propose a Dataverse data model for a small blog with Authors and Posts.
+ Authors need name, email, and bio. Posts need title, body, published-on
+ date, and featured flag. Use the publisher prefix cr8f1 and include
+ logical names, types, requiredness, a Mermaid ER diagram, and the
+ one-to-many relationship. Write docs/data-model-proposal.md. This is a
+ proposal only; do not authenticate, contact Dataverse, or claim schema
+ objects were created.
+ graders:
+ - type: power-pages-artifacts
+ name: blog-data-model-proposal-artifact
+ config:
+ contract: checks/blog-data-model-proposal.json
+ - type: prompt
+ name: blog-data-model-proposal-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The model includes author and post fields with plausible Dataverse types and requiredness."
+ - "The ER diagram expresses one author to many posts and agrees with the table definitions."
+ - "The document is a proposal and does not claim remote creation."
+ - name: feedback-table-proposal
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Propose one Dataverse table for site feedback. Use publisher prefix
+ cr8f1. Include a required text subject, multiline description, whole
+ number rating constrained to 1 through 5, and submitted-on date.
+ Write docs/data-model-proposal.md with logical names, types, requiredness,
+ and any validation constraints. Do not add unrelated tables or claim
+ that anything was created in Dataverse.
+ graders:
+ - type: power-pages-artifacts
+ name: feedback-table-proposal-artifact
+ config:
+ contract: checks/feedback-table-proposal.json
+ - type: prompt
+ name: feedback-table-proposal-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The proposal contains only the requested feedback table and fields."
+ - "Subject requiredness, multiline text, whole-number rating bounds and date semantics are explicit."
+ - "The document is a proposal and does not claim remote creation."
+ - name: extend-review-data-model
+ tags:
+ kind: capability
+ scope: offline-plan
+ expect_activation: 'true'
+ prompt: |
+ Extend an existing model with cr8f1_customer and cr8f1_product. Add
+ cr8f1_review with rating and comment, linked to both Customer and Product,
+ and add cr8f1_loyaltypoints to Customer. Write docs/data-model-proposal.md
+ showing existing versus new columns, types, requiredness, relationships,
+ and a Mermaid ER diagram. Do not alter unrelated columns or claim
+ Dataverse changes were made.
+ graders:
+ - type: power-pages-artifacts
+ name: extend-review-data-model-artifact
+ config:
+ contract: checks/extend-review-data-model.json
+ - type: prompt
+ name: extend-review-data-model-quality
+ config:
+ scoring: scale_1_5
+ threshold: 0.8
+ evidence: ['trajectory', 'repo']
+ rubric:
+ - "The review links to both existing tables and the customer extension is correctly scoped."
+ - "The proposal distinguishes new schema from existing schema and uses suitable types."
+ - "The diagram matches the relationships and the proposal does not claim remote creation."
+ - name: stationery-purchase-dormancy
+ tags:
+ kind: dormancy
+ scope: offline-artifact
+ expect_activation: 'false'
+ prompt: |
+ Reconcile inputs/purchase.json. Write results/purchase.json with currency,
+ subtotal, tax, and total as numeric amounts. Tax applies to the whole
+ subtotal. This is a local bookkeeping task; only create the result file.
+ agent_environment:
+ files:
+ - src: fixtures/purchase.json
+ dest: inputs/purchase.json
+ graders:
+ - type: skill-invocation
+ name: stationery-purchase-dormancy-no-activation
+ config:
+ disallowed: [setup-datamodel]
+ - type: power-pages-artifacts
+ name: stationery-purchase-dormancy-artifact-correctness
+ config:
+ contract: checks/stationery-purchase-dormancy.json
+ rubric:
+ - "Calculate the requested purchase correctly without invoking an unrelated Dataverse workflow."
diff --git a/evals/power-pages/setup-datamodel/fixtures/purchase.json b/evals/power-pages/setup-datamodel/fixtures/purchase.json
new file mode 100644
index 000000000..c8d8933ec
--- /dev/null
+++ b/evals/power-pages/setup-datamodel/fixtures/purchase.json
@@ -0,0 +1,8 @@
+{
+ "currency": "GBP",
+ "items": [
+ {"sku": "NOTEBOOK", "quantity": 3, "unitPrice": 4},
+ {"sku": "PEN", "quantity": 2, "unitPrice": 1.5}
+ ],
+ "taxRate": 0.2
+}
diff --git a/evals/runtime/evidence.mjs b/evals/runtime/evidence.mjs
new file mode 100644
index 000000000..24db2929f
--- /dev/null
+++ b/evals/runtime/evidence.mjs
@@ -0,0 +1,123 @@
+import { readdir, readFile } from 'node:fs/promises';
+import path from 'node:path';
+import { pathToFileURL } from 'node:url';
+
+// GitHub token shapes: https://github.blog/engineering/platform-security/behind-githubs-new-authentication-token-formats/
+// Model output often quotes placeholders such as `Bearer ${token}`, so only
+// real token shapes and the run's own token value count as leaks.
+const tokenPattern = /\b(?:gh[pousr]_[A-Za-z0-9]{36,}|github_pat_[A-Za-z0-9_]{60,})\b/;
+const maxReason = 800;
+
+function oneLine(text) {
+ const value = String(text ?? '').replace(/\s+/g, ' ').trim();
+ return value.length > maxReason ? `${value.slice(0, maxReason)}...` : value;
+}
+
+function formatScore(score) {
+ return typeof score === 'number' ? ` (score ${Number(score.toFixed(2))})` : '';
+}
+
+async function readJson(file) {
+ try { return JSON.parse(await readFile(file, 'utf8')); }
+ catch (error) { if (error.code === 'ENOENT') return null; throw error; }
+}
+
+async function readText(file) {
+ try { return await readFile(file, 'utf8'); }
+ catch (error) { if (error.code === 'ENOENT') return null; throw error; }
+}
+
+// A Vally grading.json nests results as
+// trajectory-grade -> grader (code | llm) -> check or rubric criterion
+// and each level carries `passed`, `score` and an `evidence` string. For a
+// prompt grader, `evidence` is the judge's explanation for that score.
+function graderLines(grader) {
+ const lines = [`- \`${grader.name}\`${formatScore(grader.score)}: ${oneLine(grader.evidence)}`];
+ for (const detail of grader.details ?? []) {
+ if (detail.passed === false) lines.push(` - ${detail.name}${formatScore(detail.score)}: ${oneLine(detail.evidence)}`);
+ }
+ return lines;
+}
+
+// Explains every non-passing trial in a run directory written by run.mjs, so
+// a reviewer can see why a check failed without rerunning the evaluation.
+export async function failureReport(outDir) {
+ const summary = await readJson(path.join(outDir, 'summary.json'));
+ if (!summary) return '## Grader reasons\n\nNo summary was written; the run stopped before any trial.\n';
+ const lines = [`## Grader reasons: ${summary.model} judged by ${summary.judgeModel}`, ''];
+ let failures = 0;
+ let incomplete = 0;
+ for (const suite of summary.suites ?? []) {
+ const results = suite.results ?? [];
+ const expected = (suite.expectedCases?.length ?? 0) * (suite.runs ?? 0) * 2;
+ if (expected === 0 || results.length !== expected) {
+ incomplete++;
+ lines.push(`### ${suite.skill}: incomplete`, '', `- Recorded ${results.length} of ${expected} expected trial arms.`, '');
+ }
+ for (const result of results) {
+ if (result.status === 'passed') continue;
+ failures++;
+ const evidenceDir = path.join(outDir, 'private', suite.skill, result.name, `${result.variant}-${result.trial}`);
+ lines.push(`### ${suite.skill} / ${result.name} (${result.variant}, trial ${result.trial}): ${result.status}`, '');
+ const grading = await readJson(path.join(evidenceDir, 'grading.json'));
+ if (grading) {
+ for (const grader of grading.details ?? []) {
+ if (grader.passed === false) lines.push(...graderLines(grader));
+ }
+ } else {
+ const error = await readText(path.join(evidenceDir, 'error.txt'));
+ lines.push(`- Error: ${oneLine(error?.split('\n')[0] ?? 'no grading or error evidence was saved')}`);
+ }
+ lines.push('');
+ }
+ }
+ if (!failures && !incomplete) lines.push('Every trial passed.', '');
+ return `${lines.join('\n')}\n`;
+}
+
+async function listFiles(dir, root = dir) {
+ let entries;
+ try { entries = await readdir(dir, { withFileTypes: true }); }
+ catch (error) { if (error.code === 'ENOENT') return []; throw error; }
+ const files = [];
+ for (const entry of entries) {
+ const full = path.join(dir, entry.name);
+ if (entry.isDirectory()) files.push(...await listFiles(full, root));
+ else if (entry.isFile()) files.push(path.relative(root, full));
+ }
+ return files;
+}
+
+// Returns the relative paths of files that contain a credential, never the
+// matched value, so the caller can fail without echoing the secret to logs.
+export async function findCredentials(dir, knownSecrets = []) {
+ const secrets = knownSecrets.filter(value => typeof value === 'string' && value.length >= 8);
+ const leaks = [];
+ for (const file of await listFiles(dir)) {
+ const text = (await readFile(path.join(dir, file))).toString('latin1');
+ if (tokenPattern.test(text) || secrets.some(secret => text.includes(secret))) leaks.push(file);
+ }
+ return leaks;
+}
+
+async function main([command, dir]) {
+ if (!['report', 'check'].includes(command) || !dir) throw new Error('Usage: node evidence.mjs report|check DIR');
+ if (command === 'report') {
+ process.stdout.write(await failureReport(path.resolve(dir)));
+ return;
+ }
+ const leaks = await findCredentials(path.resolve(dir), [process.env.GITHUB_TOKEN]);
+ if (leaks.length) {
+ console.error(`Credential-like content found; evidence will not be uploaded:\n${leaks.join('\n')}`);
+ process.exitCode = 1;
+ } else {
+ console.log('No credentials found in evaluation evidence.');
+ }
+}
+
+if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
+ main(process.argv.slice(2)).catch(error => {
+ console.error(error.message);
+ process.exitCode = 1;
+ });
+}
diff --git a/evals/runtime/test/artifacts.test.mjs b/evals/runtime/test/artifacts.test.mjs
index 182444e97..bf6290174 100644
--- a/evals/runtime/test/artifacts.test.mjs
+++ b/evals/runtime/test/artifacts.test.mjs
@@ -220,7 +220,10 @@ test('purchase contracts require correct top-level numeric amounts', async t =>
const root = await workspace(t);
await mkdir(path.join(root, 'inputs'));
await mkdir(path.join(root, 'results'));
- for (const skill of ['create-site', 'setup-auth']) {
+ for (const skill of [
+ 'add-localization', 'add-seo', 'create-site', 'create-webroles',
+ 'integrate-webapi', 'migrate-bootstrap', 'setup-auth', 'setup-datamodel',
+ ]) {
const suiteDir = path.resolve(import.meta.dirname, `../../power-pages/${skill}`);
const contract = JSON.parse(await readFile(path.join(suiteDir, 'checks/stationery-purchase-dormancy.json'), 'utf8'));
await writeFile(path.join(root, 'inputs/purchase.json'), await readFile(path.join(suiteDir, 'fixtures/purchase.json')));
@@ -237,6 +240,35 @@ test('purchase contracts require correct top-level numeric amounts', async t =>
}
});
+test('community-role contract rejects changed existing roles and invalid new role flags', async t => {
+ const root = await workspace(t);
+ const suiteDir = path.resolve(import.meta.dirname, '../../power-pages/create-webroles');
+ const contract = JSON.parse(await readFile(path.join(suiteDir, 'checks/add-community-roles.json'), 'utf8'));
+ for (const input of contract.unchanged) {
+ const target = path.join(root, input.path);
+ await mkdir(path.dirname(target), { recursive: true });
+ await writeFile(target, await readFile(path.join(suiteDir, input.source)));
+ }
+ const roleDir = path.join(root, 'site/.powerpages-site/web-roles');
+ const contentEditors = [
+ 'anonymoususersrole: false', 'authenticatedusersrole: false',
+ 'id: 7ab524fd-6f2c-4bd0-9c70-12aecb2bf00b', 'name: Content Editors',
+ ].join('\n');
+ await writeFile(path.join(roleDir, 'content-editors.yml'), contentEditors);
+ await writeFile(path.join(roleDir, 'moderators.yml'), [
+ 'anonymoususersrole: false', 'authenticatedusersrole: false',
+ 'id: 4a8f3d9b-6859-4c48-bcd2-ff0b975e0510', 'name: Moderators',
+ ].join('\n'));
+ const grade = () => gradeArtifacts({ contract, workDir: root, suiteDir });
+ assert.equal((await grade()).passed, true);
+ await writeFile(path.join(roleDir, 'content-editors.yml'),
+ contentEditors.replace('authenticatedusersrole: false', 'authenticatedusersrole: true'));
+ assert.equal((await grade()).passed, false);
+ await writeFile(path.join(roleDir, 'content-editors.yml'), contentEditors);
+ await writeFile(path.join(roleDir, 'administrators.yml'), 'name: Changed\n');
+ assert.equal((await grade()).passed, false);
+});
+
test('contracts reject unknown fields, vacuous checks, invalid regexes, and traversal', () => {
for (const contract of [
{}, { output: {} }, { file: [] },
@@ -249,6 +281,65 @@ test('contracts reject unknown fields, vacuous checks, invalid regexes, and trav
]) assert.throws(() => validateContract(contract));
});
+test('SEO and planning contracts accept equivalent valid source forms', async t => {
+ const root = await workspace(t);
+ const cases = [
+ {
+ contractFile: 'evals/power-pages/add-seo/checks/astro-localized-seo.json',
+ outputPath: 'site/src/layouts/BaseLayout.astro',
+ content: 'Astro metadata is implemented using a supported locale helper.',
+ label: 'Astro source remains the quality rubric concern',
+ },
+ {
+ contractFile: 'evals/power-pages/add-seo/checks/react-catalog-seo.json',
+ outputPath: 'site/index.html',
+ content: `<meta name='description' content='Catalog'>
+<link rel='canonical' href='https://fabrikam.example/'>
+<meta property='og:title' content='Catalog'><meta name='twitter:card' content='summary'>`,
+ label: 'single-quoted HTML metadata',
+ },
+ {
+ contractFile: 'evals/power-pages/add-seo/checks/minimal-seo.json',
+ outputPath: 'site/index.html',
+ content: `<meta name='description' content='Catalog'>`,
+ label: 'single-quoted basic SEO metadata',
+ },
+ {
+ contractFile: 'evals/power-pages/integrate-webapi/checks/existing-contact-client-plan.json',
+ outputPath: 'docs/webapi-integration-plan.md',
+ content: `The existing client at src/shared/powerPagesApi.ts is reused for Contacts.
+Include anti-forgery handling and the contactid, firstname, and lastname fields.
+Site architects own permission design. Confirm the exact table and field access,
+the authenticated role, and the least-privilege permission scope with the site
+architects before changing configuration. No permission files are created until
+the reviewed plan is approved.`,
+ label: 'permission wording in either order',
+ },
+ {
+ contractFile: 'evals/power-pages/create-webroles/checks/create-non-spa-content-role.json',
+ outputPath: 'docs/non-spa-role-plan.md',
+ content: `Create Content Editors at site/web-roles/content-editors.webrole.yml.
+Set anonymoususersrole: false and authenticatedusersrole: false.
+After approval, invoke create-web-role.js with the project root and role name.
+The deterministic writer generates the role ID and writes its metadata in the
+PAC per-record format. Do not manually create files or modify the export.`,
+ label: 'non-SPA writer-generated UUID',
+ },
+ ];
+
+ const repoRoot = path.resolve(import.meta.dirname, '../../..');
+ for (const { contractFile, outputPath, content, label } of cases) {
+ const source = JSON.parse(await readFile(path.join(repoRoot, contractFile), 'utf8'));
+ const spec = source.files.find(file => file.path === outputPath);
+ assert.ok(spec, `missing ${outputPath} in ${contractFile}`);
+ const output = path.join(root, outputPath);
+ await mkdir(path.dirname(output), { recursive: true });
+ await writeFile(output, content);
+ const result = await gradeArtifacts({ contract: { files: [spec] }, workDir: root, suiteDir: root });
+ assert.equal(result.passed, true, `${label}: ${result.evidence}`);
+ }
+});
+
test('embedded renderer data is parsed without executing code or splitting escaped semicolons', () => {
const html = inspectHtml(document('<h1>Plan</h1><script>const ER_DIAGRAM = "erDiagram\\n A ||--o{ B : \\"a;b\\""; const ignored = globalThis.sideEffect();</script>'));
assert.equal(html.diagrams[0], 'erDiagram\n A ||--o{ B : "a;b"');
diff --git a/evals/runtime/test/evidence.test.mjs b/evals/runtime/test/evidence.test.mjs
new file mode 100644
index 000000000..58d8b23c7
--- /dev/null
+++ b/evals/runtime/test/evidence.test.mjs
@@ -0,0 +1,81 @@
+import assert from 'node:assert/strict';
+import { test } from 'node:test';
+import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
+import { tmpdir } from 'node:os';
+import path from 'node:path';
+import { failureReport, findCredentials } from '../evidence.mjs';
+
+async function runDir(t) {
+ const out = await mkdtemp(path.join(tmpdir(), 'pp-evidence-test-'));
+ t.after(() => rm(out, { recursive: true, force: true }));
+ const result = (name, variant, status) => ({ name, kind: 'capability', variant, trial: 0, status });
+ await writeFile(path.join(out, 'summary.json'), JSON.stringify({
+ model: 'agent-model', judgeModel: 'judge-model',
+ suites: [{ skill: 'create-site', runs: 1, expectedCases: [{ name: 'plan' }, { name: 'build' }], results: [
+ result('plan', 'baseline', 'passed'),
+ result('plan', 'skilled', 'failed'),
+ result('build', 'skilled', 'error'),
+ ] }],
+ }));
+ const failed = path.join(out, 'private/create-site/plan/skilled-0');
+ await mkdir(failed, { recursive: true });
+ await writeFile(path.join(failed, 'grading.json'), JSON.stringify({ details: [
+ { name: 'plan-correctness', passed: true, score: 1, evidence: 'All artifact checks passed' },
+ { name: 'plan-quality', passed: false, score: 0.75, evidence: 'Strong plan\nwith one gap.', details: [
+ { name: 'prompt/Journey', passed: false, score: 0.75, evidence: 'Collection asks only for a postcode.' },
+ { name: 'prompt/Design', passed: true, score: 1, evidence: 'Clear design rationale.' },
+ ] },
+ ] }));
+ const errored = path.join(out, 'private/create-site/build/skilled-0');
+ await mkdir(errored, { recursive: true });
+ await writeFile(path.join(errored, 'error.txt'), 'Error: judge timed out\n at stack');
+ return out;
+}
+
+test('failure report explains failed criteria and errors only', async t => {
+ const report = await failureReport(await runDir(t));
+ assert.match(report, /agent-model judged by judge-model/);
+ assert.match(report, /plan \(skilled, trial 0\): failed/);
+ assert.match(report, /Recorded 3 of 4 expected trial arms/);
+ assert.match(report, /`plan-quality` \(score 0\.75\): Strong plan with one gap\./);
+ assert.match(report, /prompt\/Journey \(score 0\.75\): Collection asks only for a postcode\./);
+ assert.match(report, /build \(skilled, trial 0\): error\n\n- Error: Error: judge timed out\n/);
+ assert.doesNotMatch(report, /baseline|plan-correctness|prompt\/Design/);
+});
+
+test('failure report tolerates a run that wrote no summary', async t => {
+ const out = await mkdtemp(path.join(tmpdir(), 'pp-evidence-empty-'));
+ t.after(() => rm(out, { recursive: true, force: true }));
+ assert.match(await failureReport(out), /run stopped before any trial/);
+});
+
+test('failure report identifies startup failures and interrupted runs as incomplete', async t => {
+ const out = await mkdtemp(path.join(tmpdir(), 'pp-evidence-incomplete-'));
+ t.after(() => rm(out, { recursive: true, force: true }));
+ const summary = {
+ model: 'agent-model', judgeModel: 'judge-model',
+ suites: [
+ { skill: 'startup-failure', runs: 1, expectedCases: [{ name: 'plan' }], results: [] },
+ { skill: 'interrupted', runs: 1, expectedCases: [{ name: 'plan' }], results: [
+ { name: 'plan', variant: 'baseline', trial: 0, status: 'passed' },
+ ] },
+ ],
+ };
+ await writeFile(path.join(out, 'summary.json'), JSON.stringify(summary));
+ const report = await failureReport(out);
+ assert.match(report, /startup-failure: incomplete[\s\S]*Recorded 0 of 2 expected trial arms/);
+ assert.match(report, /interrupted: incomplete[\s\S]*Recorded 1 of 2 expected trial arms/);
+ assert.doesNotMatch(report, /Every trial passed/);
+});
+
+test('credential scan flags real token shapes and the run token, not placeholders', async t => {
+ const out = await runDir(t);
+ const workspace = path.join(out, 'private/create-site/plan/skilled-0/workspace');
+ await mkdir(workspace, { recursive: true });
+ await writeFile(path.join(workspace, 'api.ts'), 'headers: { Authorization: `Bearer ${token}` } // ghs_<token>');
+ assert.deepEqual(await findCredentials(out, ['run-token-value']), []);
+ await writeFile(path.join(workspace, 'leak.txt'), `token=ghs_${'A'.repeat(36)}`);
+ await writeFile(path.join(out, 'echo.txt'), 'prefix run-token-value suffix');
+ assert.deepEqual((await findCredentials(out, ['run-token-value'])).sort(),
+ ['echo.txt', path.join('private/create-site/plan/skilled-0/workspace/leak.txt')].sort());
+});
diff --git a/evals/runtime/test/runner.test.mjs b/evals/runtime/test/runner.test.mjs
index 379ee2671..f3e3b04da 100644
--- a/evals/runtime/test/runner.test.mjs
+++ b/evals/runtime/test/runner.test.mjs
@@ -11,13 +11,16 @@ import { evaluate, outcomeRecord, parseArgs } from '../run.mjs';
import { loadSuites, repoRoot, trialGraders } from '../suites.mjs';
import { DEFAULT_MODELS } from '../models.mjs';
-test('only the skills being improved have Vally suites; legacy-only skills remain unselected', async () => {
+test('only covered skills have Vally suites; legacy-only skills remain unselected', async () => {
const suites = await loadSuites();
- assert.deepEqual(suites.map(suite => suite.name), ['create-site', 'setup-auth']);
+ assert.deepEqual(suites.map(suite => suite.name), [
+ 'add-localization', 'add-seo', 'create-site', 'create-webroles',
+ 'integrate-webapi', 'migrate-bootstrap', 'setup-auth', 'setup-datamodel',
+ ]);
assert.ok(suites.every(suite => suite.stimuli.length >= 4));
assert.ok(suites.every(suite => !suite.stimuli.some(stimulus =>
stimulus.environment?.files?.some(file => file.src.startsWith('checks/')))));
- await assert.rejects(() => loadSuites({ skill: 'setup-datamodel' }), /No evaluation suite/);
+ await assert.rejects(() => loadSuites({ skill: 'deploy-site' }), /No evaluation suite/);
});
test('browser jobs use a Linux image supported by the pinned Playwright version', async t => {
@@ -51,6 +54,17 @@ test('Linux browser jobs configure the sandbox after installing Chromium', async
}
});
+test('grader summaries and evidence archives are gated by credential checks', async () => {
+ const workflow = parseYaml(await readFile(path.join(repoRoot, '.github/workflows/power-pages-evals.yml'), 'utf8'));
+ const steps = workflow.jobs.evaluate.steps;
+ const credentialCheck = steps.findIndex(step => step.id === 'credential-check');
+ const report = steps.findIndex(step => step.name === 'explain failed checks');
+ const evidence = steps.find(step => step.name === 'upload grading evidence');
+ assert.ok(credentialCheck >= 0 && report > credentialCheck);
+ assert.equal(steps[report].if, "${{ always() && steps.credential-check.outcome == 'success' }}");
+ assert.equal(evidence.with['include-hidden-files'], true);
+});
+
test('manual workflow selects available suites and rejects skills without one', async t => {
const root = await mkdtemp(path.join(tmpdir(), 'pp-selection-test-'));
t.after(() => rm(root, { recursive: true, force: true }));
@@ -58,7 +72,11 @@ test('manual workflow selects available suites and rejects skills without one',
const command = workflow.jobs.select.steps.find(step => step.id === 'select').run;
const script = /node --input-type=module <<'JS'\n([\s\S]+)\nJS\s*$/.exec(command)?.[1];
assert.ok(script, 'the matrix selector must be executable without model dependencies');
- for (const [selected, expected] of [['all', ['create-site', 'setup-auth']], ['create-site', ['create-site']]]) {
+ const allSkills = [
+ 'add-localization', 'add-seo', 'create-site', 'create-webroles',
+ 'integrate-webapi', 'migrate-bootstrap', 'setup-auth', 'setup-datamodel',
+ ];
+ for (const [selected, expected] of [['all', allSkills], ['create-site', ['create-site']]]) {
const output = path.join(root, selected);
execFileSync(process.execPath, ['--input-type=module', '-'], {
input: script, cwd: repoRoot,
@@ -71,7 +89,7 @@ test('manual workflow selects available suites and rejects skills without one',
}
assert.throws(() => execFileSync(process.execPath, ['--input-type=module', '-'], {
input: script, cwd: repoRoot, stdio: 'pipe',
- env: { ...process.env, SELECTED_SKILL: 'setup-datamodel', GITHUB_OUTPUT: path.join(root, 'missing') },
+ env: { ...process.env, SELECTED_SKILL: 'deploy-site', GITHUB_OUTPUT: path.join(root, 'missing') },
}), /Unknown Power Pages evaluation suite/);
});