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.
JavaScript claude-code-pluginclaude-code-skillscode-appsgithub-copilot-pluginpower-appspower-pagespower-platform
add evals for genpage skill (#51)
Akshay Maloof6351387359a
diff --git a/.gitignore b/.gitignoreindex a548ac875..70b5e619b 100644--- a/.gitignore+++ b/.gitignore@@ -5,6 +5,7 @@ evals/temp/# Eval reports (aggregated results)evals/reports/evals/**/*-workspace/+*-workspace/# Python__pycache__/diff --git a/evals/model-apps/genpage/evals.json b/evals/model-apps/genpage/evals.jsonnew file mode 100644index 000000000..eb19d1c42--- /dev/null+++ b/evals/model-apps/genpage/evals.json@@ -0,0 +1,170 @@+{+ "skill_name": "genpage",+ "eval_instructions": "When running these evals, the agent MUST save a workflow-log.md file alongside the generated code. The log must document every step attempted (Step 1 through Step 10), including: commands run (or attempted), questions asked, files read, decisions made, and infrastructure barriers encountered. This is required for grading workflow-level assertions.",+ "evals": [+ {+ "id": 1,+ "prompt": "Build a page showing Account records as a gallery of cards. Include name, website, email, phone number. Make the gallery scrollable and each card clickable to open the Account record.",+ "expected_output": "The skill validates prerequisites (node, pac), authenticates with PAC CLI, runs pac model list-languages, gathers requirements (acknowledges the description, confirms Dataverse entity usage with Account table), presents a plan, generates RuntimeTypes.ts via pac model genpage generate-types, reads genpage-rules-reference.md and a relevant sample (8-responsive-cards.tsx), generates a complete .tsx file using only verified column names from RuntimeTypes.ts, saves it, asks about deployment, runs pac model list, asks the user which app to publish to, deploys with pac model genpage upload, offers browser verification, and provides a final summary.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 1: node --version is run to verify Node.js is installed",+ "Step 1: pac help is run and PAC CLI version >= 2.3.1 is verified",+ "Step 1: Commands are run separately — not chained with &&",+ "Step 2: pac auth list is run to check authentication",+ "Step 2: The active environment is identified and reported to the user",+ "Step 2: pac model list-languages is run after confirming the active environment",+ "Step 3: Question 1 (new or edit) is asked via AskUserQuestion",+ "Step 3: Question 2 (describe the page) is skipped because the user provided a description with the command",+ "Step 3: Question 3 (Dataverse or mock data) is skipped because the description specifies Account table",+ "Step 3: Question 4 (specific requirements) is asked via AskUserQuestion",+ "Step 4: A plan is presented listing data source (Account entity), features, Fluent UI components, and layout approach",+ "Step 4: User confirmation is requested before proceeding",+ "Step 5: pac model genpage generate-types --data-sources 'account' is run to generate RuntimeTypes.ts",+ "Step 5: RuntimeTypes.ts is read to identify actual column names on the account entity",+ "Step 5: Only column names found in RuntimeTypes.ts are used in the generated code — no guessed names",+ "Step 6: genpage-rules-reference.md is read before generating code",+ "Step 6: A relevant sample file is read (e.g., 8-responsive-cards.tsx for a card layout)",+ "Step 7: Generated code uses React 17 + TypeScript with Fluent UI V9 components",+ "Step 7: Generated code is a single .tsx file with export default GeneratedComponent",+ "Step 7: Generated code uses makeStyles with tokens — not inline styles for static values",+ "Step 7: Generated code wraps dataApi calls in try-catch",+ "Step 7: Generated code uses @OData.Community.Display.V1.FormattedValue for lookup display names",+ "Step 7: No placeholders, TODOs, or ellipses in the generated code",+ "Step 7: Code is saved to a .tsx file",+ "Step 8: User is asked 'Would you like to publish this page to Power Apps?'",+ "Step 8: pac model list is run to show available apps",+ "Step 8: User is asked which app to publish to — no default is assumed",+ "Step 8: pac model genpage upload is run with --app-id, --code-file, --data-sources, --prompt, --model, --name, --agent-message, --add-to-sitemap flags",+ "Step 9: User is asked about browser verification via AskUserQuestion",+ "Step 10: Final summary includes confirmation, how to find the page, and offer to make updates"+ ]+ },+ {+ "id": 2,+ "prompt": "Create a dashboard page with mock data showing sales metrics — monthly revenue chart, top 5 customers table, and a KPI summary bar. Use a modern dark theme look.",+ "expected_output": "The skill validates prerequisites, authenticates, detects languages, gathers requirements (confirms mock data usage, notes dark theme preference), presents a plan, skips schema generation (mock data), reads genpage-rules-reference.md and a relevant sample, generates a complete .tsx with D3.js for the chart, realistic mock data, Fluent UI V9 DataGrid for the table, and styled KPI cards using makeStyles with tokens. Deploys without --data-sources flag.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 1: node --version and pac help are run separately",+ "Step 2: pac auth list is run and environment is confirmed",+ "Step 2: pac model list-languages is run after confirming the environment",+ "Step 3: Question 1 (new or edit) is asked",+ "Step 3: Question 2 is skipped because user provided a description",+ "Step 3: Question 3 (Dataverse or mock data) is skipped because user said 'mock data'",+ "Step 3: Question 4 (specific requirements) is asked — dark theme is acknowledged",+ "Step 4: Plan mentions mock data, D3.js for chart, DataGrid for customers, KPI cards",+ "Step 5: Schema generation is SKIPPED because mock data was chosen",+ "Step 6: genpage-rules-reference.md is read",+ "Step 6: A relevant sample is read for reference",+ "Step 7: Generated code includes realistic mock data (not empty arrays or placeholder values)",+ "Step 7: Chart uses D3.js — no other charting libraries",+ "Step 7: D3 code uses group() not nest()",+ "Step 7: DataGrid uses createTableColumn from Fluent UI V9",+ "Step 7: Code does NOT use 100vh or 100vw",+ "Step 7: Code does NOT import from React Router or external libraries beyond React, Fluent UI V9, Fluent icons, D3",+ "Step 7: Code does NOT use createTheme, mergeThemes, or useTheme",+ "Step 7: Code does NOT wrap content in FluentProvider",+ "Step 7: DatePicker (if used) is imported from @fluentui/react-datepicker-compat, not @fluentui/react-components",+ "Step 7: Icons use unsized variants (e.g., AddRegular not Add24Regular)",+ "Step 8: Deployment command omits --data-sources flag (mock data page)",+ "Step 8: User is asked which app to publish to — no default assumed"+ ]+ },+ {+ "id": 3,+ "prompt": "I need to edit an existing generative page in my Sales Hub app. The page shows contacts but I want to add a search bar and sorting by company name.",+ "expected_output": "The skill validates prerequisites, authenticates, detects languages, identifies this as an edit request, asks for the app-id and page-id, downloads the existing page with pac model genpage download, shows the current code, asks what changes to make (user confirms search + sorting), generates the updated code preserving existing functionality while adding search and sort, re-deploys with --page-id (no --add-to-sitemap), and offers verification.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 1: Prerequisites are validated",+ "Step 2: Authentication is confirmed and environment reported",+ "Step 2: pac model list-languages is run",+ "Step 3: Question 1 identifies this as an edit (not new)",+ "Step 3: User is asked for the app and page to edit",+ "Step 3: pac model genpage download --app-id <id> --page-id <id> --output-directory is run to download existing code",+ "Step 3: The downloaded code is read to understand the current implementation",+ "Step 3: User is asked what changes to make (search + sort confirmed)",+ "Step 5: If Dataverse entities are used, RuntimeTypes.ts is generated and read to verify column names",+ "Step 6: genpage-rules-reference.md is read before modifying code",+ "Step 7: Updated code preserves existing functionality while adding search and sort",+ "Step 7: Search implementation uses Fluent UI V9 SearchBox or Input component",+ "Step 7: Sort implementation uses column header click handlers or Fluent UI sorting",+ "Step 8: pac model genpage upload uses --page-id flag for updating",+ "Step 8: Upload command omits --add-to-sitemap (existing page update)",+ "Step 9: Browser verification is offered"+ ]+ },+ {+ "id": 4,+ "prompt": "Build a multi-step wizard form for creating new Case records. Step 1: customer info. Step 2: case details (title, priority, category). Step 3: review and submit. Use the incident and contact tables.",+ "expected_output": "The skill validates prerequisites, authenticates, detects languages, gathers remaining requirements, presents a plan for a 3-step wizard, generates RuntimeTypes.ts for incident and contact entities, reads genpage-rules-reference.md and the wizard sample (2-wizard-multi-step.tsx), generates a complete .tsx with step navigation (Next/Back), form validation, Fluent UI V9 form components, and dataApi.createRow for submission. Deploys with --data-sources 'incident,contact'.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 1: Prerequisites validated with separate commands",+ "Step 2: Authentication confirmed, pac model list-languages run",+ "Step 3: Question 2 is skipped (user provided description)",+ "Step 3: Question 3 is skipped (user specified incident and contact tables)",+ "Step 4: Plan includes 3-step wizard structure, form fields per step, Fluent UI form components",+ "Step 5: pac model genpage generate-types --data-sources 'incident,contact' is run",+ "Step 5: RuntimeTypes.ts is read and column names are verified for both incident and contact entities",+ "Step 6: genpage-rules-reference.md is read",+ "Step 6: Wizard sample (2-wizard-multi-step.tsx or 3-poa-revocation-wizard.tsx) is read",+ "Step 7: Generated code includes step state management (current step tracking)",+ "Step 7: Next and Back buttons navigate between steps",+ "Step 7: Step 3 (review) shows a summary of entered data before submission",+ "Step 7: Submit uses dataApi.createRow with verified column names from RuntimeTypes.ts",+ "Step 7: Form uses Fluent UI V9 components (Input, Dropdown, etc.) — not HTML form elements",+ "Step 7: All form fields have aria-labels or aria-labelledby for accessibility",+ "Step 7: Semantic HTML is used (button, section, etc.)",+ "Step 7: async dataApi calls are wrapped in try-catch with error handling",+ "Step 8: Upload includes --data-sources 'incident,contact'"+ ]+ },+ {+ "id": 5,+ "prompt": "/genpage Build a task management board with columns for To Do, In Progress, and Done. Use the task entity. Allow dragging tasks between columns.",+ "expected_output": "The skill validates prerequisites, authenticates, detects languages, gathers remaining requirements, presents a plan for a kanban-style board, generates RuntimeTypes.ts for the task entity, reads genpage-rules-reference.md and a relevant sample, generates a complete .tsx with column-based layout, task cards, drag-and-drop using native HTML5 drag events (no external DnD libraries), and dataApi.updateRow to persist status changes.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 1: Prerequisites validated",+ "Step 2: Authentication confirmed, pac model list-languages run",+ "Step 3: Description is acknowledged from the command — question 2 is skipped",+ "Step 3: Question 3 is skipped (user specified task entity)",+ "Step 4: Plan describes kanban board with 3 columns mapped to task status values",+ "Step 5: pac model genpage generate-types --data-sources 'task' is run",+ "Step 5: RuntimeTypes.ts is read — status field enum values are identified for column mapping",+ "Step 7: Drag-and-drop uses native HTML5 events (onDragStart, onDragOver, onDrop) — no external DnD library",+ "Step 7: Task cards show relevant fields verified from RuntimeTypes.ts",+ "Step 7: Status update on drop uses dataApi.updateRow with the correct status enum value",+ "Step 7: Code uses entity logical name 'task' (singular lowercase) not 'tasks'",+ "Step 7: Responsive layout uses flexbox with relative units",+ "Step 7: No 100vh or 100vw used",+ "Step 7: All components and utilities are separate top-level functions (no nested functions)"+ ]+ },+ {+ "id": 6,+ "prompt": "Create a simple analytics dashboard with mock data. I just want some charts showing website traffic trends and visitor demographics. Keep it clean and minimal.",+ "expected_output": "The skill validates prerequisites, authenticates, detects languages, confirms mock data usage, presents a minimal plan, skips schema generation, reads rules and samples, generates a clean .tsx with D3.js charts for traffic trends (line/area chart) and demographics (pie/bar chart), realistic mock data, and minimal Fluent UI styling. Deploys without --data-sources.",+ "files": [],+ "expectations": [+ "A workflow-log.md file is saved documenting all steps attempted",+ "Step 2: pac model list-languages is run",+ "Step 3: Mock data usage is confirmed (no Dataverse entities)",+ "Step 4: Plan reflects minimal/clean design preference",+ "Step 5: Schema generation is skipped (mock data)",+ "Step 7: Charts use D3.js exclusively — no Chart.js, Recharts, or other chart libraries",+ "Step 7: Mock data is realistic (not empty arrays or identical values)",+ "Step 7: Generated code has no unnecessary complexity matching the 'clean and minimal' request",+ "Step 7: Code uses makeStyles with Fluent UI tokens for styling",+ "Step 8: Upload omits --data-sources flag"+ ]+ }+ ]+}