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/skills/edit-canvas-app/SKILL.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,25 @@ Read this file before planning any edits.
24
24
25
25
Before editing any YAML files, call the `sync_canvas` MCP tool to ensure a local copy of the canvas app YAML is present and up to date. This pulls the current app state from the coauthoring session into local `.pa.yaml` files.
26
26
27
-
Only proceed to edit the YAML files after `sync_canvas` completes successfully.
27
+
Only proceed after `sync_canvas` completes successfully.
28
+
29
+
## CRITICAL: Check for Meaningful App Content After Sync
30
+
31
+
After `sync_canvas` completes, read the synced `.pa.yaml` files and check whether the app has meaningful content. An app is considered **empty** if:
32
+
33
+
- No `.pa.yaml` files were written, or
34
+
- The only files present contain no screens, or
35
+
- Every screen present has no controls (i.e., only bare screen-level YAML with no children), or
36
+
- Every screen's controls consist solely of containers (e.g., `GroupContainer`) with no leaf controls inside them
37
+
38
+
If the app is empty, **do not proceed with the edit workflow**. Instead, inform the user:
39
+
40
+
> **The synced app appears to be empty — no existing screens or controls were found.**
41
+
> Switching to app generation mode to build the app from scratch.
42
+
43
+
Then follow the full **generate-canvas-app** workflow (Discover → Plan → Design → Implement → Validate → Iterate → Complete), using the user's original request as the generation requirements.
44
+
45
+
If the app has meaningful content, proceed with the editing workflow below.
0 commit comments