You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/canvas-apps/agents/canvas-app-planner.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ each screen in parallel without needing to call MCP tools themselves.
34
34
You will be invoked by the `generate-canvas-app` skill with a prompt that includes:
35
35
36
36
- The user's app requirements (`$ARGUMENTS`)
37
+
- User preferences collected by the skill's wizard (target users, aesthetic direction, features, reference image observations)
37
38
- The working directory where `.pa.yaml` files should be written
38
39
- The plugin root directory (`${CLAUDE_PLUGIN_ROOT}`), from which you must read `references/TechnicalGuide.md` and `references/DesignGuide.md`
39
40
@@ -76,12 +77,13 @@ Call `TaskCreate` once per task:
76
77
77
78
## Step 4 — Design and Present Plan for Approval
78
79
79
-
Based on discovery and the user's requirements, reason through:
80
+
Based on discovery, the user preferences passed in the prompt, and the user's requirements, reason through:
80
81
81
82
- How many screens are needed and what each does
82
83
- Which controls will drive each screen's layout
83
84
- What aesthetic direction fits the app's purpose
84
85
- How data will flow (data sources, collections, or mock data)
86
+
-**Layout strategy** — default to **AutoLayout** (responsive) using `GroupContainer` with `Variant: Horizontal` or `Variant: Vertical`. 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.
85
87
86
88
Enter plan mode (`EnterPlanMode`) and present the following to the user:
-**Do NOT ask questions.** The one user interaction is the plan mode approval in Step 4.
239
+
-**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.
238
240
-**Do NOT write any screen `.pa.yaml` files.** Screen builders own all screen-level files.
239
241
-**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.
240
242
-**Embed full `describe_control` output** in the plan document — never summarize property names.
Copy file name to clipboardExpand all lines: plugins/canvas-apps/skills/generate-canvas-app/SKILL.md
+52-7Lines changed: 52 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ version: 2.0.0
4
4
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.
@@ -40,13 +40,52 @@ Pass this absolute path as the working directory in every agent prompt below.
40
40
41
41
---
42
42
43
-
## Phase 1 — Plan
43
+
## Phase 1 — Gather Preferences (Wizard)
44
+
45
+
Before invoking the planner, use `AskUserQuestion` to collect design preferences that cannot
46
+
be reliably inferred from `$ARGUMENTS`. **Parse `$ARGUMENTS` first** to determine which
47
+
questions to skip — but a short request like "visitor check-in app" or "expense tracker"
48
+
leaves most preferences unspecified and you MUST ask.
49
+
50
+
Call `AskUserQuestion` with the applicable questions from the table below (include only the
51
+
ones that need answers):
52
+
53
+
| Question | Header | When to Ask | Options |
54
+
|----------|--------|-------------|---------|
55
+
| 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)*|
56
+
| 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 |
57
+
| 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 |
58
+
| 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)*|
59
+
60
+
**Rules:**
61
+
62
+
1. If the user provides a screenshot (either attached with their original request or via the
63
+
wizard), examine it to extract structural cues (layout, navigation pattern) and visual cues
64
+
(color palette, density, typography). Use these to inform the aesthetic direction — do not
65
+
ask the aesthetic question separately.
66
+
2.**If all questions are already answered by `$ARGUMENTS` and any attached images, skip the
67
+
wizard entirely** and proceed directly to Phase 2.
68
+
3. Ask all applicable questions in a single `AskUserQuestion` call — do not ask them one at a time.
69
+
4. Store all answers for use in the planner prompt below.
**Layout strategy rule of thumb:** Default to **AutoLayout** (responsive) unless the user explicitly chose desktop-only or requested pixel-perfect positioning. AutoLayout uses `GroupContainer` with `Variant: Horizontal` or `Variant: Vertical` and `LayoutDirection`, which adapts to different screen sizes. ManualLayout uses fixed `X`/`Y`/`Width`/`Height` values that do not reflow.
78
+
79
+
---
80
+
81
+
## Phase 2 — Plan
44
82
45
83
Invoke the `canvas-app-planner` agent using the `Task` tool.
46
84
47
85
Pass a prompt that includes:
48
86
49
87
- The user's requirements: `$ARGUMENTS`
88
+
- The wizard answers collected in Phase 1 (target users & device, aesthetic direction, features, and any screenshot observations)
50
89
- The working directory (the absolute path resolved in Phase 0)
51
90
- The plugin root path: `${CLAUDE_PLUGIN_ROOT}`
52
91
@@ -56,19 +95,25 @@ Example prompt:
56
95
>
57
96
> [paste $ARGUMENTS here]
58
97
>
98
+
> User preferences (from wizard):
99
+
> - Target users & device: [answer or "not specified" — e.g., "Front desk staff on desktop/tablet"]
100
+
> - Aesthetic direction: [answer or "not specified"]
101
+
> - Features: [answer or "not specified"]
102
+
> - Reference image: [observations from screenshot, or "none provided"]
103
+
>
59
104
> Working directory: [absolute path from Phase 0]
60
105
> Plugin root: ${CLAUDE_PLUGIN_ROOT}
61
106
>
62
107
> Follow the instructions in your agent file. Write canvas-app-plan.md and App.pa.yaml to
63
108
> the working directory. Return the screen list and plan document path when complete.
64
109
65
110
**Wait for the planner to finish.** The planner will present the screen plan to the user via
66
-
plan mode and wait for approval before returning. Do not proceed to Phase 2 until the planner
111
+
plan mode and wait for approval before returning. Do not proceed to Phase 3 until the planner
67
112
task completes successfully.
68
113
69
114
---
70
115
71
-
## Phase 2 — Build
116
+
## Phase 3 — Build
72
117
73
118
After the planner completes, read `canvas-app-plan.md` from the working directory.
74
119
@@ -100,12 +145,12 @@ Wait for all screen-builder tasks to complete before proceeding.
100
145
101
146
---
102
147
103
-
## Phase 3 — Validate and Fix
148
+
## Phase 4 — Validate and Fix
104
149
105
150
After all screen-builders have finished writing their files, call `compile_canvas` on the
106
151
working directory.
107
152
108
-
**On success:** Proceed to Phase 4.
153
+
**On success:** Proceed to Phase 5.
109
154
110
155
**On failure:** Read every error in the output. Errors will reference specific files and
111
156
line numbers. For each error:
@@ -121,7 +166,7 @@ Track how many `compile_canvas` passes were needed.
121
166
122
167
---
123
168
124
-
## Phase 4 — Summary
169
+
## Phase 5 — Summary
125
170
126
171
Delete `canvas-app-plan.md` from the working directory using `Bash`:
0 commit comments