Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion evals/model-apps/genpage/EVAL_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Layers 1 and 2 are automated. Layer 3 is human judgment by design — visual qua
- Solution-selection question runs when (and only when) metadata work is needed
- `check-auth.js` runs before `entity-builder` when entities need creating
- `pac model genpage upload` invocations include `--prompt` with correct scoping
- Every upload uses an escaped, structured `--agent-message` with OOB-style
Step-by-Step Agent Thoughts (bold numbered headings separated by blank lines),
a bulleted Summary, and Final Code sections
- Prefix discipline holds across plan, entity-creation log, and resolved names

**Runner:** `evals/model-apps/genpage/run-layer-1.js`
Expand Down Expand Up @@ -126,7 +129,7 @@ Plus per-eval `expectations` whose text starts with `Phase 5` (page-builder-spec

All eval definitions live in `evals.json` alongside this file. The file contains:

- `common_workflow_assertions`: 15 workflow checks every run must pass (prereqs, auth, solution selection gating, check-auth pre-flight, plan creation, workflow log, `--prompt` scoping, prefix discipline at plan-format / resolved-names / solution-alignment).
- `common_workflow_assertions`: 16 workflow checks every run must pass (prereqs, auth, solution selection gating, check-auth pre-flight, plan creation, workflow log, `--prompt` scoping, structured `--agent-message` content, prefix discipline at plan-format / resolved-names / solution-alignment).
- `common_code_assertions`: 18 code-quality checks the generated `.tsx` must pass (Fluent UI V9 only, no forbidden patterns, etc.).
- `evals`: 16 test cases — each with `id`, `tier`, `prompt`, `data`, and per-eval `expectations`.

Expand Down
1 change: 1 addition & 0 deletions evals/model-apps/genpage/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"Phase 1 (Planner): genpage-plan.md is written to the working directory, conforming to references/plan-schema.md",
"Phase 2a: When entities need creating, scripts/check-auth.js runs and returns ok:true before entity-builder is invoked; on ok:false the orchestrator surfaces the message to the user and halts",
"Phase 6 / 6.5 / 7.5 / Edit Phase 6 (--prompt scoping): The FIRST pac model genpage upload for each new page passes --prompt with the FULL page description (from plan's ## User Requirements). EVERY SUBSEQUENT upload of an existing page (--page-id, no --add-to-sitemap) passes --prompt scoped to ONLY the delta of changes in that upload — never the full original description",
"Every pac model genpage upload records --agent-message with escaped # Agent Thoughts, OOB-style Step-by-Step Processing with bold numbered headings on new lines, a bulleted # Summary, and # Final Code sections",
"Prefix discipline — plan format: Every name in `## Entity Creation Required` (table headings, column Suffix values, choice column suffixes, relationship Lookup Suffix values) is a bare suffix matching `^[a-z][a-z0-9]+$`. No value contains an underscore or a prefix. The prefix lives only in `## Environment` → `Publisher Prefix:`.",
"Prefix discipline — resolved names: For every operation in `entity-creation-log.md`, the Resolved Full Name starts with the `Publisher Prefix:` value from the plan's `## Environment` followed by `_` and the bare suffix from the plan (e.g., Publisher Prefix `crb2b` + suffix `playername` → `crb2b_playername`).",
"Prefix discipline — solution alignment: If the env has a dominant non-system custom prefix (>=50% of custom tables AND >=3 such tables), the planner surfaces this in the solution question and ordered the option whose publisher prefix matches the dominant prefix FIRST as the recommended choice. If the user picks a different-prefix solution, the planner logged a one-line warning before proceeding."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
- Post-write icon verification: grep `from "@fluentui/react-icons"` in page.tsx; verified `BuildingRegular`, `MailRegular`, `PhoneRegular`, `GlobeRegular` against verified-icons.txt — all present

## Phase 6 — Deployment
- `pac model genpage upload --app-id 12345678-1234-1234-1234-123456789abc --code-file account-card-gallery/page.tsx --data-sources 'account' --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." --model claude-sonnet --name "Accounts Gallery" --agent-message "Account card gallery with click-to-open" --add-to-sitemap`
- `pac model genpage upload --app-id 12345678-1234-1234-1234-123456789abc --code-file account-card-gallery/page.tsx --data-sources 'account' --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." --model claude-sonnet --name "Accounts Gallery" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Designed a responsive card gallery using verified Account columns and click-to-open navigation.\n# Summary\n- Created an Account card gallery with website, email, phone, and record navigation.\n# Final Code\n" --add-to-sitemap`
- Upload succeeded; page-id = abc12345-...

## Phase 8 — Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
- Cross-page navigation: candidate-list.tsx links to interview-schedule.tsx via PAGEREF_interview-schedule placeholder; interview-schedule.tsx links to hiring-metrics.tsx via PAGEREF_hiring-metrics

## Phase 6 — Deployment
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/candidate-list.tsx --data-sources 'contact,appointment' --prompt "Candidate list page (eval 11)" --model claude-sonnet --name "Candidates" --agent-message "Candidate list" --add-to-sitemap
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/interview-schedule.tsx --data-sources 'contact,appointment' --prompt "Interview schedule page (eval 11)" --model claude-sonnet --name "Schedule" --agent-message "Interview schedule" --add-to-sitemap
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/hiring-metrics.tsx --data-sources 'contact,appointment' --prompt "Hiring metrics dashboard (eval 11)" --model claude-sonnet --name "Metrics" --agent-message "Hiring metrics" --add-to-sitemap
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/candidate-list.tsx --data-sources 'contact,appointment' --prompt "Candidate list page (eval 11)" --model claude-sonnet --name "Candidates" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Candidate list\n# Final Code\n" --add-to-sitemap
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/interview-schedule.tsx --data-sources 'contact,appointment' --prompt "Interview schedule page (eval 11)" --model claude-sonnet --name "Schedule" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Interview schedule\n# Final Code\n" --add-to-sitemap
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/hiring-metrics.tsx --data-sources 'contact,appointment' --prompt "Hiring metrics dashboard (eval 11)" --model claude-sonnet --name "Metrics" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Hiring metrics\n# Final Code\n" --add-to-sitemap

## Phase 6.5 — Cross-page reference resolution
- Detected PAGEREF_interview-schedule and PAGEREF_hiring-metrics tokens in candidate-list.tsx and interview-schedule.tsx
- Built filename→page-id map from Phase 6 returned IDs (sorted by length descending)
- Replaced quoted `"PAGEREF_<name>"` tokens with the matching GUIDs (word-boundary safe)
- Re-uploaded affected files with --page-id and a delta --prompt: "Resolve cross-page navigation placeholders to real page GUIDs"
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/candidate-list.tsx --page-id <resolved-id> --data-sources 'contact,appointment' --prompt "Resolve cross-page navigation placeholders to real page GUIDs" --model claude-sonnet --agent-message "PAGEREF resolution"
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/interview-schedule.tsx --page-id <resolved-id> --data-sources 'contact,appointment' --prompt "Resolve cross-page navigation placeholders to real page GUIDs" --model claude-sonnet --agent-message "PAGEREF resolution"
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/candidate-list.tsx --page-id <resolved-id> --data-sources 'contact,appointment' --prompt "Resolve cross-page navigation placeholders to real page GUIDs" --model claude-sonnet --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- PAGEREF resolution\n# Final Code\n"
- pac model genpage upload --app-id 44444444-3333-4444-5555-666666666666 --code-file recruitment-pages/interview-schedule.tsx --page-id <resolved-id> --data-sources 'contact,appointment' --prompt "Resolve cross-page navigation placeholders to real page GUIDs" --model claude-sonnet --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- PAGEREF resolution\n# Final Code\n"
- No unresolved PAGEREF tokens remained

## Phase 8 — Summary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ User response: approved
- Icons verified (all 6 files' imports confirmed in verified-icons.txt)

## Phase 6 — Deploy
- Command 1: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/candidate-list.tsx --name "Candidate List" --data-sources "contact" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "Searchable filterable Contact list with caching, status badges, row-click navigation, pagination" --add-to-sitemap`
- Command 2: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/interview-schedule.tsx --name "Interview Schedule" --data-sources "appointment,contact" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "Appointment DataGrid grouped by day, DatePicker filter, status filter, candidate name via OData annotation" --add-to-sitemap`
- Command 3: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/hiring-metrics-dashboard.tsx --name "Hiring Metrics Dashboard" --data-sources "contact,appointment" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "KPI dashboard: 4 stat cards, D3 role bar chart, recent interviews list. PAGEREF_ placeholders resolved in Phase 6.5." --add-to-sitemap`
- Command 1: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/candidate-list.tsx --name "Candidate List" --data-sources "contact" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Searchable filterable Contact list with caching, status badges, row-click navigation, pagination\n# Final Code\n" --add-to-sitemap`
- Command 2: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/interview-schedule.tsx --name "Interview Schedule" --data-sources "appointment,contact" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Appointment DataGrid grouped by day, DatePicker filter, status filter, candidate name via OData annotation\n# Final Code\n" --add-to-sitemap`
- Command 3: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --code-file D:/temp/recruitment-app/hiring-metrics-dashboard.tsx --name "Hiring Metrics Dashboard" --data-sources "contact,appointment" --prompt "Build me three pages for a recruitment app: a candidate list page, an interview schedule page, and a hiring metrics dashboard. Use the contact and appointment entities." --model "claude-sonnet-4-6" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- KPI dashboard: 4 stat cards, D3 role bar chart, recent interviews list. PAGEREF_ placeholders resolved in Phase 6.5.\n# Final Code\n" --add-to-sitemap`

## Phase 6 — Deploy (results)
- Command 1 result: page-id = 492d8c42-b5fc-4ec5-ad44-6809c6673e9a, status = success
Expand All @@ -115,7 +115,7 @@ User response: approved
## Phase 6.5 — Navigation fix-up
- PAGEREF_ map: candidate-list → 492d8c42-b5fc-4ec5-ad44-6809c6673e9a, interview-schedule → 07ad1d40-5ca8-494a-aeac-ff0548acb6c0
- Replaced 2 tokens in hiring-metrics-dashboard.tsx (longer key first: interview-schedule, then candidate-list)
- Re-upload command: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --page-id e2022b27-548b-43be-95bd-4dafa02e060c --code-file D:/temp/recruitment-app/hiring-metrics-dashboard.tsx --data-sources "contact,appointment" --prompt "Resolve cross-page navigation placeholders to real page GUIDs (post-deploy fix-up)" --model "claude-sonnet-4-6" --agent-message "Replaced PAGEREF_candidate-list with 492d8c42... and PAGEREF_interview-schedule with 07ad1d40..."`
- Re-upload command: `pac model genpage upload --app-id e2666772-3c55-f111-a821-000d3a380330 --page-id e2022b27-548b-43be-95bd-4dafa02e060c --code-file D:/temp/recruitment-app/hiring-metrics-dashboard.tsx --data-sources "contact,appointment" --prompt "Resolve cross-page navigation placeholders to real page GUIDs (post-deploy fix-up)" --model "claude-sonnet-4-6" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Replaced PAGEREF_candidate-list with 492d8c42... and PAGEREF_interview-schedule with 07ad1d40...\n# Final Code\n"`
- Result: page-id = e2022b27-548b-43be-95bd-4dafa02e060c, status = success

## Phase 7 — Browser verification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
- Post-write icon verification: PeopleRegular verified against verified-icons.txt

## Phase 6 — Deployment
- pac model genpage upload --app-id 55555555-4444-5555-6666-777777777777 --code-file contact-localized/page.tsx --data-sources 'contact' --prompt "Build a page showing Contact records with name, email, and phone." --model claude-sonnet --name "Contacts (Localized)" --agent-message "Contact list with en-US/ar-SA/fr-FR translations and RTL support" --add-to-sitemap
- pac model genpage upload --app-id 55555555-4444-5555-6666-777777777777 --code-file contact-localized/page.tsx --data-sources 'contact' --prompt "Build a page showing Contact records with name, email, and phone." --model claude-sonnet --name "Contacts (Localized)" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Contact list with en-US/ar-SA/fr-FR translations and RTL support\n# Final Code\n" --add-to-sitemap

## Phase 8 — Summary
- 1 page deployed: page.tsx → "Contacts (Localized)" in Sales Hub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ genpage-plan.md written to D:/temp/support-tickets/genpage-plan.md
- ArrowClockwiseRegular ✓

## Phase 6 — Deploy
- Command: `pac model genpage upload --app-id 3fc905b9-7854-f111-a821-70a8a59ce7bc --code-file D:/temp/support-tickets/support-tickets.tsx --name "Support Tickets" --data-sources "cr_ticket" --prompt "Build a page tracking support tickets. I need a new cr_ticket entity with a priority choice column (Low, Medium, High, Critical), a status choice column (Open, In Progress, Resolved, Closed), and a due date column." --model "claude-sonnet-4-6" --agent-message "Filterable DataGrid of cr_ticket records: search by name, dropdown filters for status and priority, controlled column sort defaulting to due date asc, color-coded priority badges (Low=green, Medium=warning, High=severe, Critical=danger), status pills, overdue indicator on past-due active tickets, row click opens Dataverse record form, window cache, refresh button." --add-to-sitemap`
- Command: `pac model genpage upload --app-id 3fc905b9-7854-f111-a821-70a8a59ce7bc --code-file D:/temp/support-tickets/support-tickets.tsx --name "Support Tickets" --data-sources "cr_ticket" --prompt "Build a page tracking support tickets. I need a new cr_ticket entity with a priority choice column (Low, Medium, High, Critical), a status choice column (Open, In Progress, Resolved, Closed), and a due date column." --model "claude-sonnet-4-6" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Filterable DataGrid of cr_ticket records: search by name, dropdown filters for status and priority, controlled column sort defaulting to due date asc, color-coded priority badges (Low=green, Medium=warning, High=severe, Critical=danger), status pills, overdue indicator on past-due active tickets, row click opens Dataverse record form, window cache, refresh button.\n# Final Code\n" --add-to-sitemap`
- Result: page-id = e460d8cf-7ca7-4745-a895-28f1425fa377, status = success

## Phase 6.5 — Navigation fix-up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
- Post-write icon verification: grep `from "@fluentui/react-icons"` in weather-dashboard.tsx; verified `TemperatureRegular`, `WeatherSunnyRegular`, `WaterRegular` against verified-icons.txt — all present

## Phase 6 — Deployment
- `pac model genpage upload --app-id aa112233-1122-1122-1122-aabbccdd1234 --code-file seattle-weather-dashboard/weather-dashboard.tsx --prompt "Build a dashboard showing the current weather for Seattle with temperature, conditions, and humidity." --model claude-sonnet --name "Seattle Weather" --agent-message "Weather dashboard with temperature, conditions, and humidity" --add-to-sitemap`
- `pac model genpage upload --app-id aa112233-1122-1122-1122-aabbccdd1234 --code-file seattle-weather-dashboard/weather-dashboard.tsx --prompt "Build a dashboard showing the current weather for Seattle with temperature, conditions, and humidity." --model claude-sonnet --name "Seattle Weather" --agent-message "# Agent Thoughts\nStep-by-Step Processing\n\n**1. Requirements Analysis**\n- Applied the requested page changes using verified requirements.\n# Summary\n- Weather dashboard with temperature, conditions, and humidity\n# Final Code\n" --add-to-sitemap`
- (--data-sources omitted — mock-data page)
- Upload succeeded

Expand Down
Loading
Loading