canvas-app
Creates or edits a Power Apps Canvas App through the Canvas Authoring MCP coauthoring session. Handles new app generation, direct targeted edits, complex multi-screen changes, responsive layout, per-screen self-QA, and compile-error convergence. Trigger on requests to create, build, generate, modify, update, change, fix, or edit a Canvas App or .pa.yaml files.
Microsoft Corporation · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add microsoft/power-platform-skills --skill canvas-app技能说明
name: canvas-app version: 3.0.1 description: Creates or edits a Power Apps Canvas App through the Canvas Authoring MCP coauthoring session. Handles new app generation, direct targeted edits, complex multi-screen changes, responsive layout, per-screen self-QA, and compile-error convergence. Trigger on requests to create, build, generate, modify, update, change, fix, 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, mcp__canvas-authoring__describe_control
Create or Edit a Canvas App
Create or edit a Power Apps canvas app for:
$ARGUMENTS
Establish the Workspace
Canvas Authoring tools operate on a local directory containing the app YAML.
- Reuse the current directory when it already contains
App.pa.yaml. - Otherwise, reuse the single immediate child directory containing
App.pa.yaml, when exactly one exists. - Otherwise, derive a short kebab-case folder name from the app name or requirements,
create it with
Bash, and resolve its absolute path. - Call
sync_canvaswith that absolute working directory before reading or editing app files. Do not proceed if sync fails.
Always use absolute paths for app files. Never edit _EditorState.pa.yaml; Studio owns it.
Route the Request
Inspect the synced .pa.yaml files before choosing a workflow. A blank app normally contains
App.pa.yaml, Screen1.pa.yaml, and _EditorState.pa.yaml.
Treat the app as empty when it has no screens with meaningful leaf controls. Containers without leaf controls do not make the app non-empty.
- Empty app: read
${PLUGIN_ROOT}/references/CreateWorkflow.mdand follow it. - Existing app: read
${PLUGIN_ROOT}/references/EditWorkflow.mdand follow it.
Do not load both workflow documents.
Planned Build Handoff
CREATE and complex EDIT workflows return here after the planner finishes.
- Read
[working directory]/canvas-app-plan.mdreturned by the planner. - Verify its
## Requirement Coveragetable maps every concrete requested noun and interaction to a visible affordance. Any approximation must be explicit and must not use UI copy that claims the unavailable interaction is exact. - Verify its
## Action Contractstable:- Every requested or approved action has its own row and reachable entry point.
- Create, edit, delete, search, filter, approve, reject, period, and export behaviors are not collapsed into vague combined rows.
- When review distinguishes approved and rejected outcomes, Approve and Reject/Decline have separate contracts owned by the same eligible record surface.
- Every mutation names an observable bound result, not only a confirmation message.
- Every mutation declares a write set and receipt proof set. For create/edit, reject the plan when any user-entered or user-selected write-set field is absent from the proof set.
- Supporting setup actions exist when required to exercise an explicitly requested lifecycle, relationship, comparison, or ranking.
- Role-scoped management of all primary records includes separate visible select/edit/save and remove/cancel paths, not only review or status controls.
- Create/edit contracts define required inputs, directly selectable finite choices, stable identity, edit prepopulation, cancel/reset behavior, and post-save evidence.
- Every row names a precondition, source and stable identity, exact transition and postcondition, observer reading that source, and visible evidence.
- Verify its
## Functional Test Matrix:- Every Action Contract has at least one deterministic Given/When/Then success row.
- Every required invalid, blocked, empty, clear/reset, or boundary path has a row.
- Every
Thennames a source postcondition and an evidence surface that reads it. - Local/mock scenarios use concrete seeded IDs and values. Filter scenarios include at least two matching records and one non-matching record.
- EDIT scenarios cover existing behavior touched by changed sources, fields, controls, or observer formulas.
- Verify its
## Dispatchtable:- Every row has
Action,Screen,Target File,YAML Key,Name Prefix, andScreen Brief. - CREATE rows use
Create; EDIT rows useModifyorCreate. - Target files and screen briefs are absolute paths under
[working directory]. - No two rows target the same file.
- No two rows share a
Name Prefix. - In CREATE mode the first row targets
[working directory]/Screen1.pa.yamlwith YAML keyScreen1. ## Editor State Changesexists and contains exact final order lists orNone.
- Every row has
- Confirm
[working directory]/canvas-app-shared.mdand every dispatch row'sScreen Briefexists. Verify each brief's assignment matches its dispatch row and includes every Action Contract owned by that screen under## Required Actionsand every scenario it exercises under## Functional Test Scenarios. - In EDIT mode, apply the
### Before buildersgroup of## App Changesto[working directory]/App.pa.yamlnow. Screens bind to those collections, formulas and variables, and compiling them against a staleApp.pa.yamlproduces a flood of false name errors. - Confirm the planner reported a clean
compile_canvasfor[working directory]/App.pa.yaml. If it did not, compile now and resolve everyApp-level diagnostic before dispatching. For EDIT mode, compile after applying the before-builder app changes and resolve App-level diagnostics before dispatching. - Invoke
canvas-screen-builderonce per dispatch row, in waves of at most three. Fire the wave's invocations together in one message, wait for that wave to return, then dispatch the next.
Never dispatch more than three bu
阅读完整来源 ↗