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
Unify confusing Canvas Edit vs Generate skills (#137)
McCall Saltzman97907616546a
diff --git a/plugins/canvas-apps/AGENTS.md b/plugins/canvas-apps/AGENTS.mdindex 377b04884..9249ba8b2 100644--- a/plugins/canvas-apps/AGENTS.md+++ b/plugins/canvas-apps/AGENTS.md@@ -25,29 +25,28 @@ CLAUDE.md ← Symlink → AGENTS.mdreferences/TechnicalGuide.md ← YAML syntax, control selection, layout strategies, Power Fx patternsDesignGuide.md ← Aesthetic guidelines, anti-patterns, design process+ QAChecks.md ← Runtime anti-pattern checks for self-QA+ PlanTemplates.md ← CREATE and EDIT plan document structures for canvas-app-planneragents/- canvas-app-planner.md ← Plans app design; invoked by generate-canvas-app (sequential)- canvas-screen-builder.md ← Builds one screen; invoked by generate-canvas-app (parallel)- canvas-edit-planner.md ← Plans complex edits; invoked by edit-canvas-app (sequential)- canvas-screen-editor.md ← Applies edits to one screen; invoked by edit-canvas-app (parallel)+ canvas-app-planner.md ← Discovers resources and writes plan document; invoked by canvas-app+ canvas-screen-builder.md ← Builds or modifies one screen; invoked by canvas-app (parallel)skills/+ canvas-app/+ SKILL.md ← Unified skill: create or edit a Canvas App (auto-detects mode)configure-canvas-mcp/SKILL.md ← Registers the Canvas Authoring MCP server with Claude Code- generate-canvas-app/- SKILL.md ← Orchestrates canvas-app-planner + canvas-screen-builder agents- edit-canvas-app/- SKILL.md ← Edits pa.yaml source files for an existing Canvas Appadd-data-source/SKILL.md ← Guides user to add a data source or connector in Studio, then verifies+ generate-canvas-app/+ SKILL.md ← [DEPRECATED] Redirects to canvas-app```## Skills| Skill | Description ||-------|-------------|+| `/canvas-app` | Create or edit a Canvas App — auto-detects whether to generate from scratch or edit existing || `/configure-canvas-mcp` | Register the Canvas Authoring MCP server with Claude Code |-| `/generate-canvas-app` | Generate a complete Canvas App from a natural language description |-| `/edit-canvas-app` | Edit an existing Canvas App from a natural language description of changes || `/add-data-source` | Guide the user to add a data source, connection, or API connector in Studio, then verify it is available |## Agents@@ -56,10 +55,8 @@ Agents are invoked by skills via the `Task` tool — they are not user-invocable| Agent | Invoked By | Description ||-------|-----------|-------------|-| `canvas-app-planner` | `generate-canvas-app` | Discovers resources, designs the app, presents plan for approval, writes plan document |-| `canvas-screen-builder` | `generate-canvas-app` | Writes YAML for one screen based on the plan; runs in parallel with other builders; app validation/compilation is performed later by `generate-canvas-app` using `compile_canvas` |-| `canvas-edit-planner` | `edit-canvas-app` | Reads existing .pa.yaml files, plans complex edits, presents edit plan for approval, writes canvas-edit-plan.md |-| `canvas-screen-editor` | `edit-canvas-app` | Applies targeted edits to one screen's .pa.yaml; runs in parallel with other editors |+| `canvas-app-planner` | `canvas-app` | Receives the approved plan from the skill. Discovers available controls, APIs, and data sources; gathers control property definitions (`describe_control`); writes `App.pa.yaml` (CREATE mode) and `canvas-app-plan.md` for downstream screen builders. |+| `canvas-screen-builder` | `canvas-app` | For Create actions: writes YAML for one new screen based on the plan. For Modify actions: applies targeted edits to one existing screen. Runs in parallel with other builders; validation is performed later by `canvas-app` using `compile_canvas`. |## MCP Toolsdiff --git a/plugins/canvas-apps/README.md b/plugins/canvas-apps/README.mdindex 2ebb1073c..a5b791f5d 100644--- a/plugins/canvas-apps/README.md+++ b/plugins/canvas-apps/README.md@@ -25,33 +25,27 @@ claude --plugin-dir /path/to/power-platform-skills/plugins/canvas-apps## Skills-### `/configure-canvas-mcp`--Register the Canvas Authoring MCP server with Claude Code or GitHub Copilot.--**Usage:** Invoke directly with `/configure-canvas-mcp`, or use any of the keywords below to trigger the skill automatically:--- `Configure MCP for Canvas Apps`-- `Set up the Canvas Authoring MCP server`-- `Connect Canvas Apps MCP`--### `/generate-canvas-app`+### `/canvas-app`-Generate a complete Canvas App from a natural language description.+Create or edit a Canvas App. Automatically detects whether to generate a new app from scratch+or edit an existing one based on the current app state.-**Usage:** Invoke directly with `/generate-canvas-app`, or use any of the keywords below to trigger the skill automatically:+**Usage:** Invoke directly with `/canvas-app`, or use natural language to trigger it:- `Create a Canvas App for managing inventory`- `I need a Canvas App for tracking employee time off`+- `Modify the form in my existing Canvas App to include validation`+- `Edit my Canvas App to add a new screen for reports`-### `/edit-canvas-app`+### `/configure-canvas-mcp`-Edit an existing Canvas App from a natural language description of changes.+Register the Canvas Authoring MCP server with Claude Code or GitHub Copilot.-**Usage:** Invoke directly with `/edit-canvas-app`, or use any of the keywords below to trigger the skill automatically:+**Usage:** Invoke directly with `/configure-canvas-mcp`, or use any of the keywords below to trigger the skill automatically:-- `Modify the form in my existing Canvas App to include validation`-- `Edit my Canvas App to add a new screen for reports`+- `Configure MCP for Canvas Apps`+- `Set up the Canvas Authoring MCP server`+- `Connect Canvas Apps MCP`## MCP Toolsdiff --git a/plugins/canvas-apps/agents/canvas-app-planner.md b/plugins/canvas-apps/agents/canvas-app-planner.mdindex 215066888..f61b0152c 100644--- a/plugins/canvas-apps/agents/canvas-app-planner.md+++ b/plugins/canvas-apps/agents/canvas-app-planner.md@@ -1,12 +1,12 @@---name: canvas-app-plannerdescription: >-- Plans and designs a Canvas App. Discovers available controls, APIs, and data sources;- calls describe_api for relevant connectors and get_data_source_schema for connected data sources;- designs the aesthetic direction and screen plan; presents plan for user approval via plan mode;- calls describe_control for all controls in the design; writes- App.pa.yaml and canvas-app-plan.md for canvas-screen-builder agents to consume.- Called by generate-canvas-app — not invoked directly by users.+ Writes the plan document and App.pa.yaml for Canvas Apps. Receives an approved+ plan from the canvas-app skill. Discovers available controls, APIs, and+ data sources; gathers control property definitions via describe_control; then+ writes App.pa.yaml (CREATE mode) and canvas-app-plan.md for downstream+ canvas-screen-builder agents.+ Called by canvas-app — not invoked directly by users.color: cyantools:- Read@@ -14,8 +14,6 @@ tools:- TaskCreate- TaskUpdate- TaskList- - EnterPlanMode- - ExitPlanMode- mcp__canvas-authoring__list_controls- mcp__canvas-authoring__list_apis- mcp__canvas-authoring__list_data_sources@@ -24,203 +22,128 @@ tools:- mcp__canvas-authoring__get_data_source_schema----# Canvas App Planner+# Canvas App Plan Writer-You are the planning and design agent for Canvas App generation. Your job is to discover-available resources, design the app, get user approval, gather all technical details, and-write a comprehensive plan document so that `canvas-screen-builder` agents can implement-each screen in parallel without needing to call MCP tools themselves.+You receive an **approved plan** from the orchestrating `canvas-app` skill. Your job+is to discover available resources, gather control property definitions, write output files,+and return a summary. You do NOT design the plan or interact with the user — the plan has+already been approved.-You will be invoked by the `generate-canvas-app` skill with a prompt that includes:+Your prompt includes:-- The user's app requirements (`$ARGUMENTS`)-- User preferences collected by the skill's wizard (target users, aesthetic direction, features, reference image observations)-- The working directory where `.pa.yaml` files should be written-- The plugin root directory (`${CLAUDE_PLUGIN_ROOT}`), from which you must read `references/TechnicalGuide.md` and `references/DesignGuide.md`+- **`mode`** — either `CREATE` or `EDIT`+- The user's requirements+- The **approved plan** (screens, aesthetic direction / approach, data strategy)+- The working directory where files should be written+- The plugin root directory (`${CLAUDE_PLUGIN_ROOT}`)+- **CREATE-specific context:** user preferences (target users, aesthetic, features)+- **EDIT-specific context:** current app state (palette, variables, layout), synced file list++---## Step 1 — Read Reference Documents-Read both reference documents before doing anything else:+Read both reference documents before writing anything:- `${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md`- `${CLAUDE_PLUGIN_ROOT}/references/DesignGuide.md`Internalize both. These govern every YAML syntax and design decision.-## Step 2 — Discover Available Resources--Call all three discovery tools in a single message (they are independent):+## Step 2 — Discover Resources-- `list_controls` — all Power Apps controls available in this authoring session-- `list_apis` — all connectors available-- `list_data_sources` — all data sources connected+### CREATE mode-After all three complete, summarize findings:-- How many controls, connectors, and data sources are available-- Which controls are most relevant to the user's app requirements+Call `list_controls`, `list_apis`, and `list_data_sources`. Summarize:+- Which controls are most relevant to the approved plan's screens- Which data sources (if any) should drive the app's data layer-Then, based on the user's requirements, call the detail tools for resources that will be used:+Then call the detail tools for resources the app will use. Collect the full output of each+for embedding in the plan document:+- `describe_api` — for each connector, to get operations and parameters+- `get_data_source_schema` — for each data source, to get columns and Power Fx types-- `describe_api` — call for each connector that the app will use, to get its operations and parameters-- `get_data_source_schema` — call for each data source that the app will use, to get its columns and Power Fx types+### EDIT mode-These calls can be made in parallel. Collect the full output of each for embedding in the plan document.+Read all `.pa.yaml` files in the working directory. Extract:+- All screens, controls, layout strategies, and formulas+- Exact RGBA color values in use+- All variable names and data bindings-## Step 3 — Create Task Tracking+Then, if the edit adds **new controls or data sources** not already in the app, call the+relevant list discovery tools (`list_controls`, `list_apis`, `list_data_sources`). Skip list+calls for edits that only modify existing controls or formulas.-Call `TaskCreate` once per task:+Call the detail tools (`describe_api`, `get_data_source_schema`) for any APIs or data sources+involved in the edit. Collect the full output of each for embedding in the plan document.-1. "Design screen plan and aesthetic direction"-2. "Gather control property definitions (describe_control)"-3. "Write plan document (canvas-app-plan.md)"--## Step 4 — Design and Present Plan for Approval--Based on discovery, the user preferences passed in the prompt, and the user's requirements, reason through:+## Step 3 — Create Task Tracking-- How many screens are needed and what each does-- Which controls will drive each screen's layout-- What aesthetic direction fits the app's purpose-- How data will flow (data sources, collections, or mock data)-- **Layout strategy** — default to **AutoLayout** (responsive) using `GroupContainer` with `Variant: AutoLayout` and `LayoutDirection: =LayoutDirection.Horizontal` or `=LayoutDirection.Vertical`, or if a grid-based layout is appropriate, `Variant: GridLayout`. Only use `Variant: ManualLayout` if the user explicitly requests pixel-perfect positioning or the app is a fixed-size desktop dashboard. Mobile and cross-device apps MUST use AutoLayout.+Call `TaskCreate` once per task.-Enter plan mode (`EnterPlanMode`) and present the following to the user:+### CREATE mode-```-## Canvas App Plan+1. "Discover available controls, APIs, and data sources"+2. "Gather control property definitions (describe_control)"+3. "Write App.pa.yaml"+4. "Write plan document (canvas-app-plan.md)"-### Screens ([N] total)+### EDIT mode-| Screen | File | Purpose | Key Controls |-|--------|------|---------|--------------|-| [Name] | [Name].pa.yaml | [one-line description] | [2-3 controls] |+1. "Discover resources for new controls/data sources" — only if the edit requires new resources+2. "Gather control property definitions (describe_control)" — only if new controls are needed+3. "Write plan document (canvas-app-plan.md)"-### Data Strategy-[How data will be loaded — data sources used, or "collections/mock data"]+## Step 4 — Gather Control Property Definitions-### Aesthetic Direction-[e.g., "Bold & editorial — high-contrast dark background, accent RGBA(255,90,60,1), card-based layout, strong typographic hierarchy"]-```+### CREATE mode-Then call `ExitPlanMode` to request user approval.+Call `describe_control` for **every control type** in the approved plan.+Do not skip seemingly obvious ones — property names differ significantly between Classic+and FluentV9 control families. Never assume.-- If approved: proceed to Step 5.-- If changes requested: revise the plan and re-enter plan mode with the updated version.+### EDIT mode-Mark the "Design screen plan and aesthetic direction" task complete after approval.+Call `describe_control` only for **new control types** being added that are not already in+the existing `.pa.yaml` files. Do not call `describe_control` for controls already present+in the existing app — their property names can be read directly from the existing YAML files.-## Step 5 — Gather Control Property Definitions--After approval, call `describe_control` for **every control type** in the approved design.-Do not skip seemingly obvious ones — property names differ significantly between Classic-and FluentV9 control families. Never assume.+### Both modesCollect the full output of each `describe_control` call for embedding in the plan document.-Mark the "Gather control property definitions" task complete when done.+Mark the "Gather control property definitions" task complete when done (or skip if EDIT mode+and no new controls are needed).++## Step 5 — Write App.pa.yaml (CREATE Mode Only)-## Step 6 — Write App.pa.yaml+> **EDIT mode:** Skip this step entirely. The existing `App.pa.yaml` is already in the+> working directory and will be modified by screen editors only if needed.Write the app-level YAML file (`App.pa.yaml`) to the working directory. This file is sharedacross all screens — do not write screen-level content here. Follow TechnicalGuide.mdconventions for app-level properties.-## Step 7 — Write canvas-app-plan.md+Mark the "Write App.pa.yaml" task complete when done.++## Step 6 — Write canvas-app-plan.mdWrite `canvas-app-plan.md` to the working directory. This document is the **single source of-truth** for all `canvas-screen-builder` agents — each builder will only `Read` this file and-will not call MCP tools. The document must be fully self-contained.--Use this structure:--```markdown-# Canvas App Plan--## App Requirements-[The original user requirements passed to this agent]--## Working Directory-[The absolute path where .pa.yaml files should be written]--## Discovery Summary-- Controls available: [N] — notable: [list of most relevant]-- Data sources: [names or "none connected"]-- Connectors: [names or "none connected"]--## Data Source Schemas-[For each data source used in the app, embed the FULL output of get_data_source_schema]-[Screen builders will reference column names and Power Fx types from here]-[Omit entirely if no data sources are used]--### [DataSourceName]-[Full get_data_source_schema output]--## API Details-[For each connector used in the app, embed the FULL output of describe_api]-[Screen builders will reference operation names and parameters from here]-[Omit entirely if no connectors are used]--### [ApiName]-[Full describe_api output]--## Screens-| Screen | File | Purpose | Key Controls |-|--------|------|---------|--------------|-| [Name] | [Name].pa.yaml | [description] | [controls] |--## Aesthetic Direction-- Palette: [description]-- Primary background: RGBA([...])-- Accent color: RGBA([...])-- Text primary: RGBA([...])-- Text secondary: RGBA([...])-- Layout strategy: [VerticalAutoLayout / ManualLayout + rationale]-- Typography scale: [header size/weight, body size/weight, caption size]--## Named Variables and Shared State-[App-level variables, named formulas, collection names — so each builder uses consistent names]-[Example: selectedItem (Record), isLoading (Boolean), appTheme (Record with color fields)]--## Control Definitions-[For each control type used in the design, embed the FULL output of describe_control]-[Builders will reference property names from here — do not summarize or abbreviate]--### [ControlTypeName]-[Full describe_control output]--### [ControlTypeName]-[Full describe_control output]--## Per-Screen Specifications--### [Screen Name]-- **File:** [Name].pa.yaml-- **Purpose:** [description]-- **Layout:** [VerticalAutoLayout / ManualLayout, root container details]-- **Key Controls:** [list with purpose of each]-- **Data Binding:** [variable names, data source references, collection names]-- **Navigation:** [which screen(s) this navigates to, trigger conditions]-- **State:** [any local variables set in OnVisible]--### [Screen Name]-[repeat for each screen]--## TechnicalGuide Key Conventions-[Embed the most critical YAML syntax rules from TechnicalGuide.md that screen-builders must follow:-- Formula prefix (= required)-- Multi-line formula syntax (|- block scalar)-- String quoting rules-- Record literal syntax-- Enum escaping patterns-- Any patterns specific to this app's control choices]-```+truth** for all `canvas-screen-builder` agents — each agent will only `Read`+this file and will not call MCP tools. The document must be fully self-contained.++Read `${CLAUDE_PLUGIN_ROOT}/references/PlanTemplates.md` for the mode-appropriate document+structure (CREATE or EDIT). Follow the template exactly — fill in every section with real+content from the approved plan, discovery results, and control definitions. Do not omit+sections unless the template says to.Mark the "Write plan document" task complete when done.-## Step 8 — Return Summary+## Step 7 — Return Summary++After writing output files, return a concise summary to the orchestrating skill.-After writing both files, return a concise summary to the orchestrating skill:+### CREATE mode```Planning complete.@@ -234,12 +157,37 @@ Plan document: [working directory]/canvas-app-plan.mdApp file written: [working directory]/App.pa.yaml```+### EDIT mode++```+Planning complete.++Screens to modify: [N]+Screens to add: [N]+| Action | Screen | File |+|--------|--------|------|+| Modify | [Name] | [Name].pa.yaml |+| Add | [Name] | [Name].pa.yaml |++Plan document: [working directory]/canvas-app-plan.md+```++---+## Critical Constraints-- **Do NOT ask questions.** The one user interaction is the plan mode approval in Step 4. User preferences are passed to you in the prompt — do not re-ask them.-- **Do NOT write any screen `.pa.yaml` files.** Screen builders own all screen-level files.-- **Do NOT call `compile_canvas` or instruct any other agent to call it.** Compilation/validation is performed exclusively by the orchestrating `generate-canvas-app` skill after all screens have been generated.-- **Embed full `describe_control` output** in the plan document — never summarize property names.- Screen builders must be able to write correct YAML from the plan document alone.-- **Embed exact RGBA values** in the aesthetic direction — not prose color descriptions.- Consistent visual design across parallel builders depends on exact values.+- **Do NOT ask questions.** All context is provided in your prompt — do not interact with+ the user.+- **Do NOT redesign the plan.** The plan was already approved by the user. Use the approved+ plan exactly as provided — same screens, same aesthetic direction, same data strategy.+- **Do NOT write any screen `.pa.yaml` files.** `canvas-screen-builder` agents own all+ screen-level files.+- **Do NOT edit existing `.pa.yaml` files in EDIT mode.** `canvas-screen-builder` agents own+ all file modifications.+- **Do NOT call `compile_canvas` or instruct any other agent to call it.**+ Compilation/validation is performed exclusively by the orchestrating skill after all+ screens have been generated or edited.+- **Embed full `describe_control` output** in the plan document — never summarize property+ names. Downstream agents must be able to write correct YAML from the plan document alone.+- **Embed exact RGBA values** from the approved plan — not prose color descriptions.+ Consistent visual design across parallel agents depends on exact values.diff --git a/plugins/canvas-apps/agents/canvas-edit-planner.md b/plugins/canvas-apps/agents/canvas-edit-planner.mddeleted file mode 100644index dc10b55b8..000000000--- a/plugins/canvas-apps/agents/canvas-edit-planner.md+++ /dev/null@@ -1,258 +0,0 @@-----name: canvas-edit-planner-description: >-- Plans edits to an existing Canvas App. Reads current .pa.yaml files to understand- the existing app; discovers new controls or APIs only if needed; calls describe_api- for any connectors involved and get_data_source_schema for any data sources involved;- presents an edit plan for user approval via plan mode; gathers describe_control output- for any new controls; writes canvas-edit-plan.md for canvas-screen-editor agents.- Called by edit-canvas-app for complex edits — not invoked directly by users.-color: orange-tools:- - Read- - Write- - TaskCreate- - TaskUpdate- - TaskList- - EnterPlanMode- - ExitPlanMode- - mcp__canvas-authoring__list_controls- - mcp__canvas-authoring__list_apis- - mcp__canvas-authoring__list_data_sources- - mcp__canvas-authoring__describe_control- - mcp__canvas-authoring__describe_api- - mcp__canvas-authoring__get_data_source_schema------# Canvas Edit Planner--You are the planning agent for complex Canvas App edits. Your job is to understand the-existing app, design the required changes, get user approval, gather all technical details,-and write a comprehensive plan document so that `canvas-screen-editor` agents can apply-edits in parallel without needing to call MCP tools themselves.--You will be invoked by the `edit-canvas-app` skill with a prompt that includes:--- The user's edit requirements (`$ARGUMENTS`)-- The working directory containing the synced `.pa.yaml` files-- The plugin root path: `${CLAUDE_PLUGIN_ROOT}`-- The list of synced `.pa.yaml` files--## Step 1 — Read Reference Documents--Read both reference documents before doing anything else:--- `${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md`-- `${CLAUDE_PLUGIN_ROOT}/references/DesignGuide.md`--Internalize both. These govern every YAML syntax and design decision.--## Step 2 — Read Current App State--Read all `.pa.yaml` files in the working directory to understand the existing app:--- Identify all screens, their controls, layout strategies, and formulas-- Extract the current color palette (RGBA values used)-- Note the layout strategy (ManualLayout vs AutoLayout)-- Identify all variable names and data bindings in use--This is essential context for planning changes that are consistent with the existing app.--## Step 3 — Discover Resources (Only If Needed)--If the edit requirements involve **adding new controls or data sources** not currently in the-app, call the relevant discovery tools:--- `list_controls` — if new control types will be added or for existing to-be-changed controls-- `list_apis` — if new connectors are needed-- `list_data_sources` — if new data sources are needed--Skip list discovery calls for edits that only modify existing controls, properties, or formulas.--Regardless of whether list discovery is needed, call the detail tools for any APIs or data-sources that are involved in the edit (whether existing or new):--- `describe_api` — call for each connector referenced by the edit, to get its operations and parameters-- `get_data_source_schema` — call for each data source referenced by the edit, to get its columns and Power Fx types--These calls can be made in parallel with any list discovery calls.--## Step 4 — Create Task Tracking--Call `TaskCreate` once per task:--1. "Analyze current app state and design edit plan"-2. "Gather control property definitions (describe_control)" — only if new controls are needed or existing controls should change-3. "Write plan document (canvas-edit-plan.md)"--## Step 5 — Design and Present Plan for Approval--Based on the current app state and the user's edit requirements, reason through:--- Which screens need to be modified and what specific changes are needed-- Whether any new screens need to be created-- How changes can be made while preserving the existing app's aesthetic and layout consistency-- Any new controls, data sources, or variables required--Enter plan mode (`EnterPlanMode`) and present the following to the user:--```-## Canvas Edit Plan--### Screens to Modify ([N] total)--| Screen | File | Summary of Changes |-|--------|------|--------------------|-| [Name] | [Name].pa.yaml | [one-line description of changes] |--### Screens to Add ([N] total, if any)--| Screen | File | Purpose |-|--------|------|---------|-| [Name] | [Name].pa.yaml | [one-line description] |--### Approach-[e.g., "Preserving existing dark theme — updating button palette on Home screen and adding a-new Settings screen with consistent RGBA values extracted from existing files"]-```--Then call `ExitPlanMode` to request user approval.--- If approved: proceed to Step 6.-- If changes requested: revise the plan and re-enter plan mode with the updated version.--Mark the "Analyze current app state and design edit plan" task complete after approval.--## Step 6 — Gather Control Property Definitions (If Needed)--After approval, if any new control types are being added that are not already in the existing-`.pa.yaml` files, call `describe_control` for each new control type.--Do not call `describe_control` for controls already present in the existing app — their-property names can be read directly from the existing YAML files.--Collect the full output of each `describe_control` call for embedding in the plan document.--Mark the "Gather control property definitions" task complete when done (or skip if not needed).--## Step 7 — Write canvas-edit-plan.md--Write `canvas-edit-plan.md` to the working directory. This document is the **single source of-truth** for all `canvas-screen-editor` agents — each editor will only `Read` this file and-will not call MCP tools. The document must be fully self-contained.--Use this structure:--```markdown-# Canvas Edit Plan--## Edit Requirements-[The original user edit requirements passed to this agent]--## Working Directory-[The absolute path where .pa.yaml files are located]--## Current App Summary-- Screens: [list each screen with brief description]-- Layout strategy: [ManualLayout / AutoLayout / mixed]-- Current palette:- - Background: RGBA([...])- - Accent: RGBA([...])- - Text primary: RGBA([...])- - Text secondary: RGBA([...])-- Variables in use: [list variable names and types]-- Data sources: [names or "none connected"]--## Screens to Modify-| Screen | File | Summary of Changes |-|--------|------|--------------------|-| [Name] | [Name].pa.yaml | [description] |--## Screens to Add-| Screen | File | Purpose |-|--------|------|---------|-| [Name] | [Name].pa.yaml | [description] |-(omit this section if no new screens)--## Data Source Schemas-[For each data source involved in the edit, embed the FULL output of get_data_source_schema]-[Editors will reference column names and Power Fx types from here]-[Omit entirely if no data sources are involved]--### [DataSourceName]-[Full get_data_source_schema output]--## API Details-[For each connector involved in the edit, embed the FULL output of describe_api]-[Editors will reference operation names and parameters from here]-[Omit entirely if no connectors are involved]--### [ApiName]-[Full describe_api output]--## Control Definitions-[For each NEW control type not already in the existing app, embed the FULL output of describe_control]-[Editors will reference property names from here — do not summarize or abbreviate]-[Omit entirely if no new control types are being added]--### [ControlTypeName]-[Full describe_control output]--## Per-Screen Edit Specifications--### [Screen Name] (Existing)-- **File:** [Name].pa.yaml-- **Current State:** [brief summary of what the screen currently contains]-- **Changes Required:** [specific numbered list of changes to apply]-- **Controls to Add:** [control name, type, properties — or "none"]-- **Controls to Remove:** [control name — or "none"]-- **Properties to Update:** [control name → property name → new value]--### [Screen Name] (New)-- **File:** [Name].pa.yaml-- **Purpose:** [description]-- **Layout:** [VerticalAutoLayout / ManualLayout, root container details]-- **Key Controls:** [list with purpose of each]-- **Data Binding:** [variable names, data source references, collection names]-- **Navigation:** [which screen(s) this navigates to, trigger conditions]-- **State:** [any local variables set in OnVisible]--## TechnicalGuide Key Conventions-[Embed the most critical YAML syntax rules from TechnicalGuide.md that screen-editors must follow:-- Formula prefix (= required)-- Multi-line formula syntax (|- block scalar)-- String quoting rules-- Record literal syntax-- Enum escaping patterns-- Any patterns specific to controls used in this edit]-```--Mark the "Write plan document" task complete when done.--## Step 8 — Return Summary--After writing the plan document, return a concise summary to the orchestrating skill:--```-Planning complete.--Screens to modify: [N]-Screens to add: [N]-| Action | Screen | File |-|--------|--------|------|-| Modify | [Name] | [Name].pa.yaml |-| Add | [Name] | [Name].pa.yaml |--Plan document: [working directory]/canvas-edit-plan.md-```--## Critical Constraints--- **Do NOT ask questions.** The one user interaction is the plan mode approval in Step 5.-- **Do NOT edit any `.pa.yaml` files.** Screen editors own all file modifications.-- **Do NOT call `compile_canvas`.** That is the orchestrating skill's responsibility.-- **Embed full `describe_control` output** in the plan document for NEW controls only —- never summarize property names. Editors must be able to write correct YAML from the- plan document alone.-- **Embed exact RGBA values** from the existing app — consistency with the current palette- is critical. Extract precise values from the existing `.pa.yaml` files, not from memory.diff --git a/plugins/canvas-apps/agents/canvas-screen-builder.md b/plugins/canvas-apps/agents/canvas-screen-builder.mdindex d77b91cee..61d0676bd 100644--- a/plugins/canvas-apps/agents/canvas-screen-builder.md+++ b/plugins/canvas-apps/agents/canvas-screen-builder.md@@ -1,10 +1,12 @@---name: canvas-screen-builderdescription: >-- Implements a single Canvas App screen from a plan document. Reads canvas-app-plan.md- for all context and writes the screen's .pa.yaml file. Does not validate — compilation- is handled by generate-canvas-app after all screens are written.- Called by generate-canvas-app in parallel — not invoked directly by users.+ Implements or modifies a single Canvas App screen from a plan document. Reads+ canvas-app-plan.md for all context. For Create actions, writes a new screen+ .pa.yaml from scratch. For Modify actions, reads the existing .pa.yaml and+ applies targeted changes. Does not validate — compilation is handled by the+ canvas-app skill after all builders finish.+ Called by canvas-app in parallel — not invoked directly by users.color: greentools:- Read@@ -18,20 +20,21 @@ tools:You are the implementation agent for a single Canvas App screen. You will be invoked inparallel with other `canvas-screen-builder` agents — one per screen. All planning, design,-and MCP discovery has already been done by the `canvas-app-planner` agent.+and MCP discovery has already been done by the planner agent.You will be invoked with a prompt that includes:- **Screen name** — e.g., "Home"- **Target file** — e.g., "Home.pa.yaml"+- **Action** — `Create` (new screen) or `Modify` (existing screen)- **Plan document path** — absolute path to `canvas-app-plan.md`-- **Working directory** — where to write the `.pa.yaml` file+- **Working directory** — where the `.pa.yaml` files are located## Step 1 — Read the Plan DocumentRead `canvas-app-plan.md` at the path provided in your invocation prompt.-Locate and extract:+**If your action is `Create`**, locate and extract:- The **Per-Screen Specification** for your assigned screen (purpose, layout, controls, data bindings, images, navigation, state)- The **Aesthetic Direction** section (exact RGBA values, layout strategy, typography scale)@@ -39,13 +42,24 @@ Locate and extract:- The **Control Definitions** for every control type your screen uses (full `describe_control` output embedded in the plan)- The **TechnicalGuide Key Conventions** section (YAML syntax rules)+**If your action is `Modify`**, locate and extract:++- The **Per-Screen Edit Specification** for your assigned screen+- The **Current App Summary** section (palette, layout strategy, variables, data sources)+- The **Control Definitions** for any new control types your screen uses (full `describe_control` output embedded in the plan)+- The **TechnicalGuide Key Conventions** section (YAML syntax rules)+Do not call `describe_control`, `list_controls`, `list_apis`, or `list_data_sources`. All of that information is embedded in the plan document.## Step 2 — Create a Task-Call `TaskCreate` for: "Implement [Screen Name] screen"+**Create action:** Call `TaskCreate` for: "Implement [Screen Name] screen"++**Modify action:** Call `TaskCreate` for: "Edit [Screen Name] screen"-## Step 3 — Write the Screen YAML+## Step 3 — Write or Edit the Screen++### Create action — Write the screen from scratchWrite `[ScreenName].pa.yaml` to the working directory.@@ -59,39 +73,83 @@ Follow the conventions from the plan document's TechnicalGuide Key Conventions s- Use exact property names from the Control Definitions in the plan — never guess property names- Use exact RGBA values from the Aesthetic Direction — never substitute similar colors- Use exact variable names from the Named Variables section — consistency across screens is required++Write the simplest working version of each formula. The compiler will catch syntax errors —+reserve your reasoning for logic correctness that the compiler cannot catch.++### Modify action — Apply targeted changes to the existing screen++Read the current `[ScreenName].pa.yaml` from the working directory. Then apply each change+listed in the Per-Screen Edit Specification:++- For each **property to update**: use `Edit` to change the specific value+- For each **control to add**: use `Edit` to insert the new control YAML in the correct location+- For each **control to remove**: use `Edit` to delete the control's YAML block++Follow the conventions from the plan document's TechnicalGuide Key Conventions section:++- All formulas must start with `=`+- Multi-line formulas use `|-` block scalar syntax+- String values that are not formulas must be quoted+- Use exact property names from the Control Definitions — never guess property names+- Use exact RGBA values from the Current App Summary palette — never substitute similar colors+- Use exact variable names from the Current App Summary — consistency across screens is required+Write the simplest working version of each formula. The compiler will catch syntax errors —reserve your reasoning for logic correctness that the compiler cannot catch.## Step 3.5 — Self-QA-After writing the file, run the runtime-anti-pattern checks that `compile_canvas` does not-catch.+After writing or editing the file, run the runtime-anti-pattern checks that `compile_canvas`+does not catch.1. Read `${CLAUDE_PLUGIN_ROOT}/references/QAChecks.md`-2. Re-read the `.pa.yaml` file you just wrote+2. Re-read the `.pa.yaml` file you just wrote or edited3. Apply each check in order; for every issue found, fix it inline using `Edit`4. Track the count and a one-line description of every fix applied+**Scope for Create actions:** apply all checks to the full new screen.++**Scope for Modify actions:** focus QA checks on controls and containers you changed or added.+Do not rewrite pre-existing issues that are unrelated to this edit — the user did not ask for+them. If a check matches a control you did not touch, skip it.+Do NOT call `compile_canvas` here — the orchestrating skill owns compilation.## Step 4 — Return ResultMark the task complete. Return a concise result to the orchestrating skill:+**Create action:**++```+Screen: [Screen Name]+Action: Create+File: [working directory]/[ScreenName].pa.yaml+QA fixes applied: [N]+ - [one-line description per fix, or "clean" if N=0]+Status: Done+```++**Modify action:**+```Screen: [Screen Name]+Action: ModifyFile: [working directory]/[ScreenName].pa.yamlQA fixes applied: [N]- [one-line description per fix, or "clean" if N=0]-Status: Written+Status: Done+Changes applied: [brief list of what was changed/added]```## Critical Constraints- **Do NOT call** `describe_control`, `list_controls`, `list_apis`, `list_data_sources`,or `compile_canvas`. All context is in the plan document; compilation- is handled by the orchestrating skill after all screens are written.+ is handled by the orchestrating skill after all builders finish.- **Do NOT modify other screens' YAML files.** You own exactly one file.- **Use exact values from the plan document** — RGBA values, variable names, control- property names. Consistency across parallel builders produces a visually cohesive app.-- **Do NOT ask questions.** Resolve all ambiguities from the plan document.+ property names. Consistency across parallel builders produces a cohesive result.+- **Do NOT ask questions.** Resolve all ambiguities from the plan document and,+ for Modify actions, the existing YAML file.diff --git a/plugins/canvas-apps/agents/canvas-screen-editor.md b/plugins/canvas-apps/agents/canvas-screen-editor.mddeleted file mode 100644index 1984743f8..000000000--- a/plugins/canvas-apps/agents/canvas-screen-editor.md+++ /dev/null@@ -1,121 +0,0 @@-----name: canvas-screen-editor-description: >-- Applies edits to a single Canvas App screen from a plan document. Reads canvas-edit-plan.md- for all context, reads the current screen .pa.yaml, then applies targeted changes.- For new screens, writes from scratch. Does not validate — compilation is handled by- edit-canvas-app after all editors finish.- Called by edit-canvas-app in parallel — not invoked directly by users.-color: yellow-tools:- - Read- - Write- - Edit- - TaskCreate- - TaskUpdate------# Canvas Screen Editor--You are the implementation agent for edits to a single Canvas App screen. You will be invoked-in parallel with other `canvas-screen-editor` agents — one per affected screen. All planning,-design, and MCP discovery has already been done by the `canvas-edit-planner` agent.--You will be invoked with a prompt that includes:--- **Screen name** — e.g., "Home"-- **Target file** — e.g., "Home.pa.yaml"-- **Action** — "Modify" (existing screen) or "Add" (new screen)-- **Plan document path** — absolute path to `canvas-edit-plan.md`-- **Working directory** — where the `.pa.yaml` files are located--## Step 1 — Read the Plan Document--Read `canvas-edit-plan.md` at the path provided in your invocation prompt.--Locate and extract:--- The **Per-Screen Edit Specification** for your assigned screen-- The **Current App Summary** section (palette, layout strategy, variables, data sources)-- The **Control Definitions** for any new control types your screen uses (full `describe_control` output embedded in the plan)-- The **TechnicalGuide Key Conventions** section (YAML syntax rules)--Do not call `describe_control`, `list_controls`, `list_apis`, or `list_data_sources`. All of that information is embedded in the plan document.--## Step 2 — Create a Task--Call `TaskCreate` for: "Edit [Screen Name] screen"--## Step 3 — Apply Changes--**If your action is "Modify" (existing screen):**--Read the current `[ScreenName].pa.yaml` from the working directory. Then apply each change-listed in the Per-Screen Edit Specification:--- For each **property to update**: use `Edit` to change the specific value-- For each **control to add**: use `Edit` to insert the new control YAML in the correct location-- For each **control to remove**: use `Edit` to delete the control's YAML block--Follow the conventions from the plan document's TechnicalGuide Key Conventions section:-- All formulas must start with `=`-- Multi-line formulas use `|-` block scalar syntax-- String values that are not formulas must be quoted-- Use exact property names from the Control Definitions — never guess property names-- Use exact RGBA values from the Current App Summary palette — never substitute similar colors-- Use exact variable names from the Current App Summary — consistency across screens is required--**If your action is "Add" (new screen):**--Write `[ScreenName].pa.yaml` to the working directory from scratch. Follow the Per-Screen-specification exactly:-- Apply the aesthetic direction from the Current App Summary (same palette, same layout strategy)-- Use exact property names from the Control Definitions in the plan-- Use exact RGBA values — match the existing app's palette precisely-- Use exact variable names from the Current App Summary for shared state consistency--Write the simplest working version of each formula. The compiler will catch syntax errors —-reserve your reasoning for logic correctness that the compiler cannot catch.--## Step 3.5 — Self-QA--After applying your changes (Modify) or writing the new screen (Add), run the runtime-anti-pattern-checks that `compile_canvas` does not catch.--1. Read `${CLAUDE_PLUGIN_ROOT}/references/QAChecks.md`-2. Re-read the `.pa.yaml` file you just edited or wrote-3. Apply each check in order; for every issue found, fix it inline using `Edit`-4. Track the count and a one-line description of every fix applied--**Scope for Modify actions:** focus QA checks on controls and containers you changed or added.-Do not rewrite pre-existing issues that are unrelated to this edit — the user did not ask for-them. If a check matches a control you did not touch, skip it.--**Scope for Add actions:** apply all checks to the full new screen, same as the builder.--Do NOT call `compile_canvas` here — the orchestrating skill owns compilation.--## Step 4 — Return Result--Mark the task complete. Return a concise result to the orchestrating skill:--```-Screen: [Screen Name]-Action: [Modify / Add]-File: [working directory]/[ScreenName].pa.yaml-QA fixes applied: [N]- - [one-line description per fix, or "clean" if N=0]-Status: Done-Changes applied: [brief list of what was changed/added]-```--## Critical Constraints--- **Do NOT call** `describe_control`, `list_controls`, `list_apis`, `list_data_sources`,- or `compile_canvas`. All context is in the plan document; compilation- is handled by the orchestrating skill after all editors finish.-- **Do NOT modify other screens' YAML files.** You own exactly one file.-- **Use exact values from the plan document** — RGBA values, variable names, control- property names. Consistency across parallel editors produces a cohesive result.-- **Do NOT ask questions.** Resolve all ambiguities from the plan document and the- existing YAML file.diff --git a/plugins/canvas-apps/references/PlanTemplates.md b/plugins/canvas-apps/references/PlanTemplates.mdnew file mode 100644index 000000000..755103b99--- /dev/null+++ b/plugins/canvas-apps/references/PlanTemplates.md@@ -0,0 +1,184 @@+# Canvas App Plan — Document Templates++These templates define the structure for `canvas-app-plan.md`, the single source of truth+consumed by `canvas-screen-builder` agents. Use the mode-appropriate template below.++---++## CREATE Mode Plan Structure++```markdown+# Canvas App Plan++## Mode+CREATE++## App Requirements+[The original user requirements passed to this agent]++## Working Directory+[The absolute path where .pa.yaml files should be written]++## Discovery Summary+- Controls available: [N] — notable: [list of most relevant]+- Data sources: [names or "none connected"]+- Connectors: [names or "none connected"]++## Data Source Schemas+[For each data source used in the app, embed the FULL output of get_data_source_schema]+[Screen builders will reference column names and Power Fx types from here]+[Omit entirely if no data sources are used]++### [DataSourceName]+[Full get_data_source_schema output]++## API Details+[For each connector used in the app, embed the FULL output of describe_api]+[Screen builders will reference operation names and parameters from here]+[Omit entirely if no connectors are used]++### [ApiName]+[Full describe_api output]++## Screens+| Screen | File | Purpose | Key Controls |+|--------|------|---------|--------------|+| [Name] | [Name].pa.yaml | [description] | [controls] |++## Aesthetic Direction+- Palette: [description]+- Primary background: RGBA([...])+- Accent color: RGBA([...])+- Text primary: RGBA([...])+- Text secondary: RGBA([...])+- Layout strategy: [AutoLayout (Vertical/Horizontal) / ManualLayout + rationale]+- Typography scale: [header size/weight, body size/weight, caption size]++## Named Variables and Shared State+[App-level variables, named formulas, collection names — so each builder uses consistent names]+[Example: selectedItem (Record), isLoading (Boolean), appTheme (Record with color fields)]++## Control Definitions+[For each control type used in the design, embed the FULL output of describe_control]+[Builders will reference property names from here — do not summarize or abbreviate]++### [ControlTypeName]+[Full describe_control output]++### [ControlTypeName]+[Full describe_control output]++## Per-Screen Specifications++### [Screen Name]+- **File:** [Name].pa.yaml+- **Purpose:** [description]+- **Layout:** [VerticalAutoLayout / ManualLayout, root container details]+- **Key Controls:** [list with purpose of each]+- **Data Binding:** [variable names, data source references, collection names]+- **Navigation:** [which screen(s) this navigates to, trigger conditions]+- **State:** [any local variables set in OnVisible]++### [Screen Name]+[repeat for each screen]++## TechnicalGuide Key Conventions+[Embed the most critical YAML syntax rules from TechnicalGuide.md that screen-builders must follow:+- Formula prefix (= required)+- Multi-line formula syntax (|- block scalar)+- String quoting rules+- Record literal syntax+- Enum escaping patterns+- Any patterns specific to this app's control choices]+```++---++## EDIT Mode Plan Structure++```markdown+# Canvas App Plan++## Mode+EDIT++## Edit Requirements+[The original user edit requirements passed to this agent]++## Working Directory+[The absolute path where .pa.yaml files are located]++## Current App Summary+- Screens: [list each screen with brief description]+- Layout strategy: [ManualLayout / AutoLayout / mixed]+- Current palette:+ - Background: RGBA([...])+ - Accent: RGBA([...])+ - Text primary: RGBA([...])+ - Text secondary: RGBA([...])+- Variables in use: [list variable names and types]+- Data sources: [names or "none connected"]++## Screens to Modify+| Screen | File | Summary of Changes |+|--------|------|--------------------|+| [Name] | [Name].pa.yaml | [description] |++## Screens to Add+| Screen | File | Purpose |+|--------|------|---------|+| [Name] | [Name].pa.yaml | [description] |+(omit this section if no new screens)++## Data Source Schemas+[For each data source involved in the edit, embed the FULL output of get_data_source_schema]+[Editors will reference column names and Power Fx types from here]+[Omit entirely if no data sources are involved]++### [DataSourceName]+[Full get_data_source_schema output]++## API Details+[For each connector involved in the edit, embed the FULL output of describe_api]+[Editors will reference operation names and parameters from here]+[Omit entirely if no connectors are involved]++### [ApiName]+[Full describe_api output]++## Control Definitions+[For each NEW control type not already in the existing app, embed the FULL output of describe_control]+[Editors will reference property names from here — do not summarize or abbreviate]+[Omit entirely if no new control types are being added]++### [ControlTypeName]+[Full describe_control output]++## Per-Screen Edit Specifications++### [Screen Name] (Existing)+- **File:** [Name].pa.yaml+- **Current State:** [brief summary of what the screen currently contains]+- **Changes Required:** [specific numbered list of changes to apply]+- **Controls to Add:** [control name, type, properties — or "none"]+- **Controls to Remove:** [control name — or "none"]+- **Properties to Update:** [control name → property name → new value]++### [Screen Name] (New)+- **File:** [Name].pa.yaml+- **Purpose:** [description]+- **Layout:** [VerticalAutoLayout / ManualLayout, root container details]+- **Key Controls:** [list with purpose of each]+- **Data Binding:** [variable names, data source references, collection names]+- **Navigation:** [which screen(s) this navigates to, trigger conditions]+- **State:** [any local variables set in OnVisible]++## TechnicalGuide Key Conventions+[Embed the most critical YAML syntax rules from TechnicalGuide.md that screen-editors must follow:+- Formula prefix (= required)+- Multi-line formula syntax (|- block scalar)+- String quoting rules+- Record literal syntax+- Enum escaping patterns+- Any patterns specific to controls used in this edit]+```diff --git a/plugins/canvas-apps/references/QAChecks.md b/plugins/canvas-apps/references/QAChecks.mdindex 61be0ac81..f35118dae 100644--- a/plugins/canvas-apps/references/QAChecks.md+++ b/plugins/canvas-apps/references/QAChecks.md@@ -68,7 +68,36 @@ natural size and is centered.----## Check 3 — SCROLL-TRAP (`FillPortions: =1` inside scroll container)+## Check 3 — FILLPORTIONS-DEFAULT (missing `FillPortions` on AutoLayout child)++**Problem:** Children of an AutoLayout container inherit a PA-chosen default for+`FillPortions` that varies by control type, so the intent isn't clear.++**Detect:** For every control whose parent has a `LayoutDirection` property+(i.e., it is an AutoLayout child), check whether `FillPortions` is explicitly+set in `Properties:`. Flag any that are missing.++**Fix:** Add `FillPortions` explicitly:++- `FillPortions: =0` — the child keeps a constant size (its `Height` or `Width`+ is set explicitly).+- `FillPortions: =1` — the child proportionally fills the remaining available+ space in the container.++```yaml+# Fixed size child:+FillPortions: =0++# Proportional fill child:+FillPortions: =1+```++**Exception:** None. Always set `FillPortions` on every AutoLayout child so the+layout intent is explicit.++---++## Check 4 — SCROLL-TRAP (`FillPortions: =1` inside scroll container)**Problem:** When a container has `LayoutOverflowY: =LayoutOverflow.Scroll` andits direct child has `FillPortions: =1`, the child is pinned to the viewport@@ -89,7 +118,7 @@ FillPortions: =0----## Check 4 — WRAP-MISSING (single-line label without `Wrap: =false`)+## Check 5 — WRAP-MISSING (single-line label without `Wrap: =false`)**Problem:** Power Apps defaults `Wrap` to `true` on `Label` controls. A narrownav item, breadcrumb, badge, or KPI value will wrap its text onto two lines and@@ -119,7 +148,7 @@ comment text. These should keep the default wrapping behavior.----## Check 5 — NO-HEIGHT-TRAP (`FillPortions: =0` without explicit `Height`)+## Check 6 — NO-HEIGHT-TRAP (`FillPortions: =0` without explicit `Height`)**Problem:** When an AutoLayout child has `FillPortions: =0` (or `FillPortions`is absent, which defaults to 0) and no explicit `Height`, Power Apps defaults@@ -151,7 +180,7 @@ proportionally and `Height` should be absent.----## Check 6 — TEXT-PADDING (ModernText, Label padding defaults to 5)+## Check 7 — TEXT-PADDING (ModernText, Label padding defaults to 5)**Problem:** `ModernText` and `Label` controls default `PaddingTop`, `PaddingBottom`,`PaddingLeft`, and `PaddingRight` to `5`. In most UI contexts (labels in a@@ -182,7 +211,7 @@ PA default of 5 cannot creep in.----## Check 7 — FILLPORTIONS-HEIGHT-CONFLICT (both set on the same control)+## Check 8 — FILLPORTIONS-HEIGHT-CONFLICT (both set on the same control)**Problem:** Setting both `FillPortions: =N` (where `N > 0`) and an explicit`Height: =value` on the same control within a vertical AutoLayout container confuses the layout engine.@@ -198,7 +227,7 @@ against the parent's available space.----## Check 8 — FILLPORTIONS-WIDTH-CONFLICT (both set on the same control)+## Check 9 — FILLPORTIONS-WIDTH-CONFLICT (both set on the same control)**Problem:** Setting both `FillPortions: =N` (where `N > 0`) and an explicit`Width: =value` on the same control within a horizontal AutoLayout container@@ -215,7 +244,7 @@ against the parent's available space.----## Check 9 — CONTROL-VERSION-SUFFIX (`Control:` value contains `@version`)+## Check 10 — CONTROL-VERSION-SUFFIX (`Control:` value contains `@version`)**Detect:** For every `Control:` property, flag any value that contains an `@` character (e.g. `Control: [email protected]`).diff --git a/plugins/canvas-apps/references/TechnicalGuide.md b/plugins/canvas-apps/references/TechnicalGuide.mdindex 4eae9ef16..89139e44d 100644--- a/plugins/canvas-apps/references/TechnicalGuide.md+++ b/plugins/canvas-apps/references/TechnicalGuide.md@@ -98,6 +98,8 @@ This applies anywhere a record literal appears inline: `Default`, `Selected`, `I| Horizontal Responsive layout | `GroupContainer` | `AutoLayout` with `LayoutDirection: =LayoutDirection.Horizontal` || Vertical Responsive layout | `GroupContainer` | `AutoLayout` with `LayoutDirection: =LayoutDirection.Vertical` |+**Choosing a layout strategy:** Default to AutoLayout (responsive). Only use ManualLayout if the user explicitly requests pixel-perfect positioning or the app is a fixed-size desktop dashboard. Mobile and cross-device apps MUST use AutoLayout.+⚠️ **`GroupContainer` has no `OnSelect` — it cannot be clicked.** This is a common dead end when building card UI: the container lays out perfectly but tapping it does nothing.- **Clickable cards:** Use `ModernCard` instead — it has `OnSelect` and is designed for this.@@ -440,14 +442,4 @@ If the app you're building requires any references to external data sources, tem- **Button text is too small:** Buttons don't support `Size` property - make button larger- **Variables reset unexpectedly:** Variables are screen-scoped - use `OnVisible` to initialize- **Layout doesn't look right:** Check if you're mixing ManualLayout and AutoLayout-- **Validation fails with "Unknown property":** Use describe_control tool to see valid properties--## Implementation Workflow--1. **list_controls** — required before planning layout; know what exists before writing any YAML-2. **describe_control** — verify property names and variants for each control you plan to use-3. **Draft screen structure** — sketch the container/control hierarchy before filling in properties-4. **Write properties and formulas** — positioning, colors, state, event handlers-5. **Validate with compile_canvas** — catch errors early; don't wait until the end-6. **Fix errors** — use describe_control to confirm valid property names before guessing-7. **Iterate** — validate after each meaningful change until the screen compiles clean\ No newline at end of file+- **Validation fails with "Unknown property":** Use describe_control tool to see valid properties\ No newline at end of filediff --git a/plugins/canvas-apps/skills/canvas-app/SKILL.md b/plugins/canvas-apps/skills/canvas-app/SKILL.mdnew file mode 100644index 000000000..8f8108842--- /dev/null+++ b/plugins/canvas-apps/skills/canvas-app/SKILL.md@@ -0,0 +1,407 @@+---+name: canvas-app+version: 2.0.0+description: Creates or edits a Power Apps Canvas App through the Canvas Authoring MCP coauthoring session. Handles new app generation from requirements, simple inline edits, and complex multi-screen changes with parallel screen builders. Triggers on requests to create, build, generate, modify, update, change, or edit a Canvas App or .pa.yaml files.+author: Microsoft Corporation+user-invocable: true+allowed-tools: Read, Write, Edit, Bash, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, EnterPlanMode, ExitPlanMode, mcp__canvas-authoring__sync_canvas, mcp__canvas-authoring__compile_canvas+---++# Create or Edit a Canvas App++Create or edit a Power Apps canvas app for the following requirements:++$ARGUMENTS++## Overview++This skill handles both **creating** and **editing** canvas apps through a unified workflow.+It syncs the current app state to detect whether the app has existing content, then routes+accordingly:++- **CREATE mode** — the app is empty or has no meaningful content; a new app is generated+ from scratch using a preferences wizard and parallel screen builders.+- **EDIT mode (simple)** — the app has existing content and the requested changes are small;+ edits are applied inline without planning agents.+- **EDIT mode (complex)** — the app has existing content and the requested changes are+ substantial; a planner designs the changes and parallel screen builders execute them.++Two specialist agents are used for planned work:++1. **`canvas-app-planner`** — discovers available controls, APIs, and data sources; gathers+ control property definitions; and writes the shared plan document (`canvas-app-plan.md`)+ and `App.pa.yaml`. Receives the approved plan from the skill.+2. **`canvas-screen-builder`** — writes or modifies exactly one screen's YAML; multiple+ builders run in parallel after the plan is approved++You (the skill) coordinate the agents, detect mode, design and present the plan for user+approval, and own the compilation + error-fixing loop after all screens are written.++---++## Phase 0 — Create App Folder++Before syncing or editing, create a subfolder to contain the app's YAML files:++1. Extract the app name or a 2–4 word summary from `$ARGUMENTS`+2. Convert to kebab-case (e.g., "Expense Tracker" → `expense-tracker`, "my travel planner" →+ `my-travel-planner`)+3. Create the folder using `Bash`: `mkdir -p <folder-name>`+4. Resolve its absolute path — this is the **working directory** for all subsequent phases++Pass this absolute path as the working directory in every agent prompt below.++---++## Phase 1 — Sync++Call the `sync_canvas` MCP tool targeting the working directory. This pulls the current app+state from the coauthoring session into local `.pa.yaml` files. Only proceed after+`sync_canvas` completes successfully.++---++## Phase 2 — Detect Mode++After `sync_canvas` completes, read the synced `.pa.yaml` files and check whether the app+has meaningful content. An app is considered **empty** if:++- No `.pa.yaml` files were written, or+- The only files present contain no screens, or+- Every screen present has no controls (only bare screen-level YAML with no children), or+- Every screen's controls consist solely of containers (e.g., `GroupContainer`) with no+ leaf controls inside them++**If the app is empty → CREATE mode.** Proceed to Phase 3.++**If the app has meaningful content → EDIT mode.** Skip Phase 3 and proceed to Phase 4.++---++## Phase 3 — Gather Preferences (CREATE mode only)++Use `AskUserQuestion` to collect design preferences that cannot be reliably inferred from+`$ARGUMENTS`. **Parse `$ARGUMENTS` first** to determine which questions to skip — but a+short request like "visitor check-in app" or "expense tracker" leaves most preferences+unspecified and you MUST ask.++Call `AskUserQuestion` with the applicable questions from the table below (include only the+ones that need answers):++| Question | Header | When to Ask | Options |+|----------|--------|-------------|---------|+| Who will primarily use this app, and on what device? | Target Users & Device | Only if not clear from `$ARGUMENTS` | *(3–4 dynamically inferred options that combine the user role with their likely device, e.g., for "visitor check-in": Front desk staff on desktop/tablet, Security team on tablet, Self-service kiosk on tablet, Visitors on their phone)* |+| Do you have a screenshot or mockup for reference? (paste an image or provide a file path) | Reference | Only if user has NOT already attached/pasted an image with their request | Yes I'll share one now, No just pick a direction for me |+| What aesthetic direction? | Aesthetic | Only if not clear from `$ARGUMENTS` (skip if user already described a visual direction like "dark themed", "minimal", "corporate style", or provided a reference image) | Clean & Professional (Recommended), Bold & High-Contrast, Soft & Approachable, Dense & Utilitarian |+| Which features do you need? (multi-select) | Features | Only if `$ARGUMENTS` is vague on features | *(3–4 dynamically inferred options based on app purpose + target users)* |++**Rules:**++1. If the user provides a screenshot (either attached with their original request or via the+ wizard), examine it to extract structural cues (layout, navigation pattern) and visual cues+ (color palette, density, typography). Use these to inform the aesthetic direction — do not+ ask the aesthetic question separately.+2. **If all questions are already answered by `$ARGUMENTS` and any attached images, skip the+ wizard entirely** and proceed directly to Phase 5.+3. Ask all applicable questions in a single `AskUserQuestion` call — do not ask them one at a time.+4. Store all answers for use in the planner prompt below.++**Target users & device influence design decisions:**+- **Desktop users** → data-dense layouts, tables, keyboard-friendly, multi-column. ManualLayout acceptable for pixel-perfect dashboards.+- **Tablet users** → touch-friendly targets, medium density, AutoLayout (responsive) so the app adapts to landscape/portrait.+- **Phone users** → large touch targets, single-column, simplified navigation, AutoLayout (responsive), minimal typing.+- **Multi-device / unknown** → AutoLayout (responsive) required.++After collecting preferences, proceed to Phase 5 (Plan).++---++## Phase 4 — Assess Complexity (EDIT mode only)++Read all synced `.pa.yaml` files. Based on `$ARGUMENTS` and the current app state, determine+whether this is a **simple** or **complex** edit:++**Simple** — all of the following are true:+- Changes affect ≤ 2 controls or properties+- Changes are confined to ≤ 1 screen+- No new screens are being added+- No new data sources or connectors are needed+- No structural layout changes (e.g., not changing ManualLayout to AutoLayout)++Examples: change a button color, update label text, fix a formula, adjust a control size.++**Complex** — any of the following are true:+- Changes span multiple screens+- One or more new screens need to be created+- New data sources or connectors are required+- Structural layout changes are involved+- Significant visual redesign of a screen++Examples: add a settings screen, redesign the home screen layout, integrate a new connector,+change the navigation flow across the app.++- If **simple**: proceed to Phase 4a.+- If **complex**: proceed to Phase 5 (Plan).++### Phase 4a — Simple: Direct Edit++Read `${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md` before making changes.++Apply the changes directly:++1. **Edit** the relevant `.pa.yaml` files with the required changes, following conventions+ from TechnicalGuide.md.++2. **Validate** by calling `compile_canvas` on the working directory after making changes.+ On failure, read the errors, fix with `Edit`, and re-compile. Iterate until clean.++3. Present a brief summary:+ > **Edit complete.** [1-2 sentence description of what was changed.] Compiled clean after [N] pass(es).++**Stop here.** The simple edit path is complete — do not continue to Phase 5 or beyond.++---++## Phase 5 — Plan++You (the skill) own plan design and user approval. After approval, invoke the+`canvas-app-planner` agent to discover resources, gather control definitions, and write the+plan document.++### Step 5.1 — Read Reference Documents++Read both reference documents before designing the plan:++- `${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md`+- `${CLAUDE_PLUGIN_ROOT}/references/DesignGuide.md`++Internalize both. These govern every design decision you will make.++### Step 5.2 — Design the Plan++#### CREATE mode++Based on the user preferences from Phase 3 and the user's requirements, reason through:++- How many screens are needed and what each does+- Which controls will drive each screen's layout+- What aesthetic direction fits the app's purpose+- How data will flow (data sources, collections, or mock data)+- **Layout strategy** — follow the layout decision rules in TechnicalGuide.md++#### EDIT mode++Read all `.pa.yaml` files in the working directory (you may have already read them in+Phase 4). Based on the current app state and the user's edit requirements, reason through:++- Which screens need to be modified and what specific changes are needed+- Whether any new screens need to be created+- How changes can be made while preserving the existing app's aesthetic and layout consistency+- Any new controls, data sources, or variables required++### Step 5.3 — Present Plan for Approval++Enter plan mode (`EnterPlanMode`) and present the plan.++#### CREATE mode++```+## Canvas App Plan++### Screens ([N] total)++| Screen | File | Purpose | Key Controls |+|--------|------|---------|--------------|+| [Name] | [Name].pa.yaml | [one-line description] | [2-3 controls] |++### Data Strategy+[How data will be loaded — data sources used, or "collections/mock data"]++### Aesthetic Direction+[e.g., "Bold & editorial — high-contrast dark background, accent RGBA(255,90,60,1), card-based layout, strong typographic hierarchy"]+```++#### EDIT mode++```+## Canvas Edit Plan++### Screens to Modify ([N] total)++| Screen | File | Summary of Changes |+|--------|------|--------------------|+| [Name] | [Name].pa.yaml | [one-line description of changes] |++### Screens to Add ([N] total, if any)++| Screen | File | Purpose |+|--------|------|---------|+| [Name] | [Name].pa.yaml | [one-line description] |++### Approach+[e.g., "Preserving existing dark theme — updating button palette on Home screen and adding a+new Settings screen with consistent RGBA values extracted from existing files"]+```++#### Both modes++Then call `ExitPlanMode` to request user approval.++- If approved: proceed to Step 5.4.+- If changes requested: revise the plan and re-enter plan mode with the updated version.++### Step 5.4 — Invoke Planner Agent++After approval, invoke the `canvas-app-planner` agent using the `Task` tool. The agent+will discover available resources, gather control property definitions, write `App.pa.yaml`+(CREATE only), and write `canvas-app-plan.md`.++Pass a prompt that includes the **approved plan**. The agent does NOT redesign the plan or+interact with the user — it discovers resources, enriches the plan with control definitions,+and writes the output files.++#### CREATE mode++Example prompt:++> You are the canvas-app-planner agent. Write the plan document for a Canvas App.+>+> Mode: CREATE+>+> Requirements: [paste $ARGUMENTS here]+>+> Approved plan:+> [paste the full plan you presented in Step 5.3 — screens, data strategy, aesthetic+> direction, all RGBA values]+>+> User preferences (from wizard):+> - Target users & device: [answer]+> - Aesthetic direction: [answer]+> - Features: [answer]+> - Reference image: [observations, or "none provided"]+>+> Working directory: [absolute path from Phase 0]+> Plugin root: ${CLAUDE_PLUGIN_ROOT}+>+> Follow the instructions in your agent file. Discover resources, gather control+> definitions, write App.pa.yaml and canvas-app-plan.md to the working directory. Return+> the screen list and plan document path when complete.++#### EDIT mode (complex)++Example prompt:++> You are the canvas-app-planner agent. Write the plan document for edits to a Canvas App.+>+> Mode: EDIT+>+> Edit requirements: [paste $ARGUMENTS here]+>+> Approved plan:+> [paste the full plan you presented in Step 5.3 — screens to modify/add, approach,+> all RGBA values]+>+> Current app state:+> - Palette: [exact RGBA values extracted from existing files]+> - Variables: [variable names found in existing files]+> - Layout strategy: [AutoLayout / ManualLayout as found in existing files]+> - Screens: [list of existing screens and their key controls]+>+> Working directory: [absolute working directory path]+> Plugin root: ${CLAUDE_PLUGIN_ROOT}+> Synced files: [list of .pa.yaml filenames]+>+> Follow the instructions in your agent file. Discover resources for new controls, gather+> control definitions, write canvas-app-plan.md to the working directory. Return the list+> of screens and the plan document path when complete.++**Wait for the planner to finish.** Do not proceed to Phase 6 until the planner task+completes successfully.++---++## Phase 6 — Build / Edit++After the planner completes, read `canvas-app-plan.md` from the working directory.++Extract the screen list from the `## Screens` table — collect each screen name, its target+file name, and its action (Create or Modify).++Invoke one `canvas-screen-builder` agent per screen. **Fire all invocations in a single+message** (parallel execution) — do not wait for one screen to finish before starting the+next.++For each screen, pass a prompt that includes:++- Screen name (e.g., "Home")+- Target file name (e.g., "Home.pa.yaml")+- Action: "Create" (new screen) or "Modify" (existing screen being edited)+- Absolute path to `canvas-app-plan.md`+- Working directory++Example prompt per screen:++> You are the canvas-screen-builder agent. [Create / Modify] the **[Screen Name]** screen.+>+> - Action: [Create / Modify]+> - Target file: [ScreenName].pa.yaml+> - Plan document: [absolute path to canvas-app-plan.md]+> - Working directory: [absolute path from Phase 0]+>+> Follow the instructions in your agent file. [Write / Edit] [ScreenName].pa.yaml and return+> your result when done. Do not call compile_canvas — validation is handled by the skill.++Wait for all screen-builder tasks to complete before proceeding.++---++## Phase 7 — Validate and Fix++After all screen-builders have finished writing their files, call `compile_canvas` on the+working directory.++**On success:** Proceed to Phase 8.++**On failure:** Read every error in the output. Errors will reference specific files and+line numbers. For each error:++1. `Read` the referenced `.pa.yaml` file+2. Fix the error using `Edit`+3. After fixing all errors from this pass, call `compile_canvas` again++Repeat until `compile_canvas` reports no errors. Do not give up after a single fix attempt —+iterate until the entire directory compiles clean.++Track how many `compile_canvas` passes were needed.++---++## Phase 8 — Summary++Delete `canvas-app-plan.md` from the working directory using `Bash`:+`rm <working-directory>/canvas-app-plan.md`++Present a final summary based on the mode:++**CREATE mode:**++> **App generation complete.**+>+> | Screen | File | Status |+> |--------|------|--------|+> | [Screen Name] | [filename].pa.yaml | Created |+>+> **Compiled clean** after [N] pass(es). | **Screens:** [N] | **Data:** [source or collections]++**EDIT mode (complex):**++> **Edit complete.**+>+> | Action | Screen | File | Status |+> |--------|--------|------|--------|+> | [Create / Modify] | [Screen Name] | [filename].pa.yaml | Done |+>+> **Compiled clean** after [N] pass(es).++If any errors remain after exhausting fixes, report them explicitly so the user knows what+needs manual attention.diff --git a/plugins/canvas-apps/skills/edit-canvas-app/SKILL.md b/plugins/canvas-apps/skills/edit-canvas-app/SKILL.mddeleted file mode 100644index aaedd8b50..000000000--- a/plugins/canvas-apps/skills/edit-canvas-app/SKILL.md+++ /dev/null@@ -1,217 +0,0 @@-----name: edit-canvas-app-version: 2.0.0-description: Edit an existing Power Apps canvas app. USE WHEN the user wants to modify, update, change, or edit an existing Canvas App or pa.yaml files.-author: Microsoft Corporation-user-invocable: true-allowed-tools: Read, Write, Edit, Bash, Task, TaskCreate, TaskUpdate, TaskList, mcp__canvas-authoring__sync_canvas, mcp__canvas-authoring__compile_canvas------# Edit a Canvas App--Make the following changes to the existing Canvas App:--$ARGUMENTS--## Overview--This skill uses two paths depending on edit complexity:--- **Simple edits** (single control/property changes, formula tweaks) — handled inline-- **Complex edits** (multiple screens, new screens, structural changes, new data sources) —- orchestrated via specialist agents: `canvas-edit-planner` + parallel `canvas-screen-editor`-------## Phase 0 — Create App Folder--Before syncing or editing, create a subfolder to contain the app's YAML files:--1. Derive a short folder name from `$ARGUMENTS` — extract the app name if present, otherwise- use a 2–3 word summary of what is being edited-2. Convert to kebab-case (e.g., "Expense Tracker" → `expense-tracker`)-3. Create the folder using `Bash`: `mkdir -p <folder-name>`-4. Resolve its absolute path — this is the **working directory** for all subsequent phases--All file reads, writes, and syncs operate in this folder.-------## Phase 1 — Sync and Check--**Sync the canvas app:**--Call the `sync_canvas` MCP tool targeting the working directory. This pulls the current app-state from the coauthoring session into local `.pa.yaml` files. Only proceed after-`sync_canvas` completes successfully.--**Check for meaningful content:**--After `sync_canvas` completes, read the synced `.pa.yaml` files and check whether the app-has meaningful content. An app is considered **empty** if:--- No `.pa.yaml` files were written, or-- The only files present contain no screens, or-- Every screen present has no controls (only bare screen-level YAML with no children), or-- Every screen's controls consist solely of containers (e.g., `GroupContainer`) with no- leaf controls inside them--If the app is empty, **do not proceed with the edit workflow**. Instead, inform the user:--> **The synced app appears to be empty — no existing screens or controls were found.**-> Switching to app generation mode to build the app from scratch.--Then follow the full **generate-canvas-app** workflow, using the user's original request as-the generation requirements.--If the app has meaningful content, proceed to Phase 2.-------## Phase 2 — Assess Complexity--Read all synced `.pa.yaml` files. Based on `$ARGUMENTS` and the current app state, determine-whether this is a **simple** or **complex** edit:--**Simple** — all of the following are true:-- Changes affect ≤ 2 controls or properties-- Changes are confined to ≤ 1 screen-- No new screens are being added-- No new data sources or connectors are needed-- No structural layout changes (e.g., not changing ManualLayout to AutoLayout)--Examples: change a button color, update label text, fix a formula, adjust a control size.--**Complex** — any of the following are true:-- Changes span multiple screens-- One or more new screens need to be created-- New data sources or connectors are required-- Structural layout changes are involved-- Significant visual redesign of a screen--Examples: add a settings screen, redesign the home screen layout, integrate a new connector,-change the navigation flow across the app.--- If **simple**: proceed to Phase 3a.-- If **complex**: proceed to Phase 3b.-------## Phase 3a — Simple: Direct Edit--Read `${CLAUDE_PLUGIN_ROOT}/references/TechnicalGuide.md` before making changes.--Apply the changes directly:--1. **Edit** the relevant `.pa.yaml` files with the required changes, following conventions- from TechnicalGuide.md.--2. **Validate** by calling `compile_canvas` on the working directory after making changes.- On failure, read the errors, fix with `Edit`, and re-compile. Iterate until clean.--3. Present a brief summary:- > **Edit complete.** [1-2 sentence description of what was changed.] Compiled clean after [N] pass(es).-------## Phase 3b — Complex: Plan--Invoke the `canvas-edit-planner` agent using the `Task` tool.--Pass a prompt that includes:--- The user's edit requirements: `$ARGUMENTS`-- The working directory (absolute path where `.pa.yaml` files were synced)-- The plugin root path: `${CLAUDE_PLUGIN_ROOT}`-- The list of synced `.pa.yaml` files found in the working directory--Example prompt:--> You are the canvas-edit-planner agent. Plan the following edits to an existing Canvas App:->-> [paste $ARGUMENTS here]->-> Working directory: [absolute working directory path]-> Plugin root: ${CLAUDE_PLUGIN_ROOT}-> Synced files: [list of .pa.yaml filenames]->-> Follow the instructions in your agent file. Write canvas-edit-plan.md to the working-> directory. Return the list of screens to modify/add and the plan document path when complete.--**Wait for the planner to finish.** The planner will present the edit plan to the user via-plan mode and wait for approval before returning. Do not proceed to Phase 4 until the planner-task completes successfully.-------## Phase 4 — Edit (Complex path only)--After the planner completes, read `canvas-edit-plan.md` from the working directory.--Extract the list of screens to modify and screens to add from the plan's tables.--Invoke one `canvas-screen-editor` agent per affected screen. **Fire all invocations in a-single message** (parallel execution) — do not wait for one editor to finish before starting-the next.--For each screen, pass a prompt that includes:--- Screen name (e.g., "Home")-- Target file name (e.g., "Home.pa.yaml")-- Action: "Modify" (existing screen) or "Add" (new screen)-- Absolute path to `canvas-edit-plan.md`-- Working directory--Example prompt per screen:--> You are the canvas-screen-editor agent. [Modify / Add] the **[Screen Name]** screen.->-> - Action: [Modify / Add]-> - Target file: [ScreenName].pa.yaml-> - Plan document: [absolute path to canvas-edit-plan.md]-> - Working directory: [absolute working directory path]->-> Follow the instructions in your agent file. [Edit / Write] [ScreenName].pa.yaml and return-> your result when done. Do not call compile_canvas — validation is handled by the skill.--Wait for all screen-editor tasks to complete before proceeding.-------## Phase 5 — Validate and Fix (Complex path only)--After all screen-editors have finished, call `compile_canvas` on the working directory.--**On success:** Proceed to Phase 6.--**On failure:** Read every error in the output. Errors will reference specific files and-line numbers. For each error:--1. `Read` the referenced `.pa.yaml` file-2. Fix the error using `Edit`-3. After fixing all errors from this pass, call `compile_canvas` again--Repeat until `compile_canvas` reports no errors. Do not give up after a single fix attempt —-iterate until the entire directory compiles clean.--Track how many `compile_canvas` passes were needed.-------## Phase 6 — Summary--Delete `canvas-edit-plan.md` from the working directory using `Bash`:-`rm <working-directory>/canvas-edit-plan.md`--Present a final summary:--> **Edit complete.**->-> | Action | Screen | File | Status |-> |--------|--------|------|--------|-> | [Modify / Add] | [Screen Name] | [filename].pa.yaml | Done |->-> **Compiled clean** after [N] pass(es).--If any errors remain after exhausting fixes, report them explicitly so the user knows what-needs manual attention.diff --git a/plugins/canvas-apps/skills/generate-canvas-app/SKILL.md b/plugins/canvas-apps/skills/generate-canvas-app/SKILL.mdindex fad548467..62ccaeaca 100644--- a/plugins/canvas-apps/skills/generate-canvas-app/SKILL.md+++ b/plugins/canvas-apps/skills/generate-canvas-app/SKILL.md@@ -1,183 +1,16 @@---name: generate-canvas-appversion: 2.0.0-description: Generate a complete, visually distinctive Power Apps canvas app with YAML. USE WHEN the user wants to create, build, or generate a Canvas App or pa.yaml files.+description: "[DEPRECATED — use canvas-app instead] Generate a complete Power Apps canvas app."author: Microsoft Corporationuser-invocable: true-allowed-tools: Read, Write, Edit, Bash, AskUserQuestion, Task, TaskCreate, TaskUpdate, TaskList, mcp__canvas-authoring__compile_canvas+allowed-tools: Read----# Generate a Canvas App+# ⚠️ Deprecated — Use `canvas-app`-Generate a complete Power Apps canvas app for the following requirements:+This skill has been replaced by the unified **`canvas-app`** skill, which handles both+creating and editing canvas apps.-$ARGUMENTS--## Overview--This skill orchestrates two specialist agents:--1. **`canvas-app-planner`** — discovers available controls and data sources, designs the app,- presents a screen plan for your approval, then writes a shared plan document-2. **`canvas-screen-builder`** — writes exactly one screen's YAML; multiple builders run in- parallel after the plan is approved--You (the skill) coordinate the agents and own the compilation + error-fixing loop after all-screens are written.-------## Phase 0 — Create App Folder--Before planning, derive a short folder name from the user's requirements:--1. Extract the app name or a 2–4 word summary from `$ARGUMENTS`-2. Convert to kebab-case (e.g., "Expense Tracker" → `expense-tracker`, "my travel planner" → `my-travel-planner`)-3. Create the folder using `Bash`: `mkdir -p <folder-name>`-4. Resolve its absolute path — this is the **working directory** for all subsequent phases--Pass this absolute path as the working directory in every agent prompt below.-------## Phase 1 — Gather Preferences (Wizard)--Before invoking the planner, use `AskUserQuestion` to collect design preferences that cannot-be reliably inferred from `$ARGUMENTS`. **Parse `$ARGUMENTS` first** to determine which-questions to skip — but a short request like "visitor check-in app" or "expense tracker"-leaves most preferences unspecified and you MUST ask.--Call `AskUserQuestion` with the applicable questions from the table below (include only the-ones that need answers):--| Question | Header | When to Ask | Options |-|----------|--------|-------------|---------|-| Who will primarily use this app, and on what device? | Target Users & Device | Only if not clear from `$ARGUMENTS` | *(3–4 dynamically inferred options that combine the user role with their likely device, e.g., for "visitor check-in": Front desk staff on desktop/tablet, Security team on tablet, Self-service kiosk on tablet, Visitors on their phone)* |-| Do you have a screenshot or mockup for reference? (paste an image or provide a file path) | Reference | Only if user has NOT already attached/pasted an image with their request | Yes I'll share one now, No just pick a direction for me |-| What aesthetic direction? | Aesthetic | Only if not clear from `$ARGUMENTS` (skip if user already described a visual direction like "dark themed", "minimal", "corporate style", or provided a reference image) | Clean & Professional (Recommended), Bold & High-Contrast, Soft & Approachable, Dense & Utilitarian |-| Which features do you need? (multi-select) | Features | Only if `$ARGUMENTS` is vague on features | *(3–4 dynamically inferred options based on app purpose + target users)* |--**Rules:**--1. If the user provides a screenshot (either attached with their original request or via the- wizard), examine it to extract structural cues (layout, navigation pattern) and visual cues- (color palette, density, typography). Use these to inform the aesthetic direction — do not- ask the aesthetic question separately.-2. **If all questions are already answered by `$ARGUMENTS` and any attached images, skip the- wizard entirely** and proceed directly to Phase 2.-3. Ask all applicable questions in a single `AskUserQuestion` call — do not ask them one at a time.-4. Store all answers for use in the planner prompt below.--**Target users & device influence design decisions:**-- **Desktop users** → data-dense layouts, tables, keyboard-friendly, multi-column. ManualLayout acceptable for pixel-perfect dashboards.-- **Tablet users** → touch-friendly targets, medium density, AutoLayout (responsive) so the app adapts to landscape/portrait.-- **Phone users** → large touch targets, single-column, simplified navigation, AutoLayout (responsive), minimal typing.-- **Multi-device / unknown** → AutoLayout (responsive) required.-------## Phase 2 — Plan--Invoke the `canvas-app-planner` agent using the `Task` tool.--Pass a prompt that includes:--- The user's requirements: `$ARGUMENTS`-- The wizard answers collected in Phase 1 (target users & device, aesthetic direction, features, and any screenshot observations)-- The working directory (the absolute path resolved in Phase 0)-- The plugin root path: `${CLAUDE_PLUGIN_ROOT}`--Example prompt:--> You are the canvas-app-planner agent. Plan a Canvas App for the following requirements:->-> [paste $ARGUMENTS here]->-> User preferences (from wizard):-> - Target users & device: [answer or "not specified" — e.g., "Front desk staff on desktop/tablet"]-> - Aesthetic direction: [answer or "not specified"]-> - Features: [answer or "not specified"]-> - Reference image: [observations from screenshot, or "none provided"]->-> Working directory: [absolute path from Phase 0]-> Plugin root: ${CLAUDE_PLUGIN_ROOT}->-> Follow the instructions in your agent file. Write canvas-app-plan.md and App.pa.yaml to-> the working directory. Return the screen list and plan document path when complete.--**Wait for the planner to finish.** The planner will present the screen plan to the user via-plan mode and wait for approval before returning. Do not proceed to Phase 3 until the planner-task completes successfully.-------## Phase 3 — Build--After the planner completes, read `canvas-app-plan.md` from the working directory.--Extract the screen list from the `## Screens` table — collect each screen name and its-target file name.--Invoke one `canvas-screen-builder` agent per screen. **Fire all invocations in a single-message** (parallel execution) — do not wait for one screen to finish before starting the next.--For each screen, pass a prompt that includes:--- Screen name (e.g., "Home")-- Target file name (e.g., "Home.pa.yaml")-- Absolute path to `canvas-app-plan.md`-- Working directory--Example prompt per screen:--> You are the canvas-screen-builder agent. Implement the **[Screen Name]** screen.->-> - Target file: [ScreenName].pa.yaml-> - Plan document: [absolute path to canvas-app-plan.md]-> - Working directory: [absolute path from Phase 0]->-> Follow the instructions in your agent file. Write [ScreenName].pa.yaml and return your-> result when done. Do not call compile_canvas — validation is handled by the skill.--Wait for all screen-builder tasks to complete before proceeding.-------## Phase 4 — Validate and Fix--After all screen-builders have finished writing their files, call `compile_canvas` on the-working directory.--**On success:** Proceed to Phase 5.--**On failure:** Read every error in the output. Errors will reference specific files and-line numbers. For each error:--1. `Read` the referenced `.pa.yaml` file-2. Fix the error using `Edit`-3. After fixing all errors from this pass, call `compile_canvas` again--Repeat until `compile_canvas` reports no errors. Do not give up after a single fix attempt —-iterate until the entire directory compiles clean.--Track how many `compile_canvas` passes were needed.-------## Phase 5 — Summary--Delete `canvas-app-plan.md` from the working directory using `Bash`:-`rm <working-directory>/canvas-app-plan.md`--Present a final summary:--> **App generation complete.**->-> | Screen | File | Status |-> |--------|------|--------|-> | [Screen Name] | [filename].pa.yaml | Written |->-> **Compiled clean** after [N] pass(es). | **Screens:** [N] | **Data:** [source or collections]--If any errors remain after exhausting fixes, report them explicitly so the user knows what-needs manual attention.+Please use `/canvas-app` instead. It will automatically detect that the app is empty and+run the full generation workflow.