@agent-native/core 0.39.1 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/action.js +12 -0
- package/dist/action.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +5 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +6 -6
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +936 -1167
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +2 -5
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +1 -1
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/blocks/AiEditableField.d.ts +8 -0
- package/dist/client/blocks/AiEditableField.d.ts.map +1 -0
- package/dist/client/blocks/AiEditableField.js +10 -0
- package/dist/client/blocks/AiEditableField.js.map +1 -0
- package/dist/client/blocks/BlockView.d.ts +3 -3
- package/dist/client/blocks/BlockView.d.ts.map +1 -1
- package/dist/client/blocks/BlockView.js +15 -3
- package/dist/client/blocks/BlockView.js.map +1 -1
- package/dist/client/blocks/SchemaBlockEditor.js +2 -2
- package/dist/client/blocks/SchemaBlockEditor.js.map +1 -1
- package/dist/client/blocks/index.d.ts +5 -2
- package/dist/client/blocks/index.d.ts.map +1 -1
- package/dist/client/blocks/index.js +6 -3
- package/dist/client/blocks/index.js.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/ApiEndpointBlock.js +20 -6
- package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
- package/dist/client/blocks/library/DiffBlock.d.ts +29 -0
- package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/DiffBlock.js +190 -30
- package/dist/client/blocks/library/DiffBlock.js.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/FileTreeBlock.js +46 -7
- package/dist/client/blocks/library/FileTreeBlock.js.map +1 -1
- package/dist/client/blocks/library/HighlightedCode.d.ts +10 -0
- package/dist/client/blocks/library/HighlightedCode.d.ts.map +1 -0
- package/dist/client/blocks/library/HighlightedCode.js +92 -0
- package/dist/client/blocks/library/HighlightedCode.js.map +1 -0
- package/dist/client/blocks/library/JsonExplorerBlock.d.ts +9 -4
- package/dist/client/blocks/library/JsonExplorerBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/JsonExplorerBlock.js +66 -30
- package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/MermaidBlock.js +73 -44
- package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
- package/dist/client/blocks/library/OpenApiSpecBlock.d.ts.map +1 -1
- package/dist/client/blocks/library/OpenApiSpecBlock.js +3 -2
- package/dist/client/blocks/library/OpenApiSpecBlock.js.map +1 -1
- package/dist/client/blocks/library/checklist.d.ts.map +1 -1
- package/dist/client/blocks/library/checklist.js +1 -0
- package/dist/client/blocks/library/checklist.js.map +1 -1
- package/dist/client/blocks/library/code-tabs.d.ts.map +1 -1
- package/dist/client/blocks/library/code-tabs.js +183 -102
- package/dist/client/blocks/library/code-tabs.js.map +1 -1
- package/dist/client/blocks/library/columns.config.d.ts +60 -0
- package/dist/client/blocks/library/columns.config.d.ts.map +1 -0
- package/dist/client/blocks/library/columns.config.js +37 -0
- package/dist/client/blocks/library/columns.config.js.map +1 -0
- package/dist/client/blocks/library/columns.d.ts +25 -0
- package/dist/client/blocks/library/columns.d.ts.map +1 -0
- package/dist/client/blocks/library/columns.js +199 -0
- package/dist/client/blocks/library/columns.js.map +1 -0
- package/dist/client/blocks/library/dev-doc-ui.d.ts +2 -1
- package/dist/client/blocks/library/dev-doc-ui.d.ts.map +1 -1
- package/dist/client/blocks/library/dev-doc-ui.js +2 -1
- package/dist/client/blocks/library/dev-doc-ui.js.map +1 -1
- package/dist/client/blocks/library/html.d.ts +1 -1
- package/dist/client/blocks/library/html.d.ts.map +1 -1
- package/dist/client/blocks/library/html.js +34 -4
- package/dist/client/blocks/library/html.js.map +1 -1
- package/dist/client/blocks/library/json-explorer.config.d.ts +3 -1
- package/dist/client/blocks/library/json-explorer.config.d.ts.map +1 -1
- package/dist/client/blocks/library/json-explorer.config.js +30 -1
- package/dist/client/blocks/library/json-explorer.config.js.map +1 -1
- package/dist/client/blocks/library/server-specs.d.ts.map +1 -1
- package/dist/client/blocks/library/server-specs.js +13 -3
- package/dist/client/blocks/library/server-specs.js.map +1 -1
- package/dist/client/blocks/library/specs.d.ts +4 -4
- package/dist/client/blocks/library/specs.d.ts.map +1 -1
- package/dist/client/blocks/library/specs.js +21 -16
- package/dist/client/blocks/library/specs.js.map +1 -1
- package/dist/client/blocks/library/table.config.d.ts +3 -0
- package/dist/client/blocks/library/table.config.d.ts.map +1 -1
- package/dist/client/blocks/library/table.config.js +13 -1
- package/dist/client/blocks/library/table.config.js.map +1 -1
- package/dist/client/blocks/library/table.d.ts.map +1 -1
- package/dist/client/blocks/library/table.js +90 -9
- package/dist/client/blocks/library/table.js.map +1 -1
- package/dist/client/blocks/library/tabs.config.d.ts +16 -8
- package/dist/client/blocks/library/tabs.config.d.ts.map +1 -1
- package/dist/client/blocks/library/tabs.config.js +10 -4
- package/dist/client/blocks/library/tabs.config.js.map +1 -1
- package/dist/client/blocks/library/tabs.d.ts.map +1 -1
- package/dist/client/blocks/library/tabs.js +146 -21
- package/dist/client/blocks/library/tabs.js.map +1 -1
- package/dist/client/blocks/server.d.ts +2 -1
- package/dist/client/blocks/server.d.ts.map +1 -1
- package/dist/client/blocks/server.js +1 -0
- package/dist/client/blocks/server.js.map +1 -1
- package/dist/client/blocks/types.d.ts +99 -9
- package/dist/client/blocks/types.d.ts.map +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/BubbleToolbar.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/BubbleToolbar.js +13 -3
- package/dist/client/rich-markdown-editor/BubbleToolbar.js.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.d.ts +49 -4
- package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/DragHandle.js +656 -88
- package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +10 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js +180 -15
- package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +2 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js +3 -1
- package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts +5 -0
- package/dist/client/rich-markdown-editor/SlashCommandMenu.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js +33 -5
- package/dist/client/rich-markdown-editor/SlashCommandMenu.js.map +1 -1
- package/dist/client/rich-markdown-editor/index.d.ts +3 -3
- package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/index.js +2 -2
- package/dist/client/rich-markdown-editor/index.js.map +1 -1
- package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts +14 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/registrySlashCommands.js +38 -0
- package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts +1 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/useCollabReconcile.js +4 -0
- package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +11 -19
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +2 -5
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +17 -1
- package/dist/db/client.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +2 -1
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts +29 -0
- package/dist/deploy/route-discovery.d.ts.map +1 -1
- package/dist/deploy/route-discovery.js +158 -11
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/server/auth.d.ts +2 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +9 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/sharing/access.d.ts +4 -2
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +8 -3
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
- package/dist/sharing/actions/set-resource-visibility.js +2 -3
- package/dist/sharing/actions/set-resource-visibility.js.map +1 -1
- package/dist/sharing/registry.d.ts +13 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/rich-markdown-editor.css +15 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +96 -11
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +126 -26
- package/dist/templates/default/.agents/skills/capture-learnings/SKILL.md +56 -30
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +28 -0
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +75 -5
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +17 -0
- package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +99 -124
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +43 -10
- package/dist/templates/default/.agents/skills/security/SKILL.md +162 -144
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +5 -3
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +15 -0
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +116 -83
- package/dist/templates/default/DEVELOPING.md +10 -13
- package/dist/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +9 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +27 -0
- package/docs/content/template-plan.md +5 -3
- package/docs/content/visual-plans.md +5 -2
- package/package.json +16 -1
- package/src/templates/default/.agents/skills/actions/SKILL.md +96 -11
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +126 -26
- package/src/templates/default/.agents/skills/capture-learnings/SKILL.md +56 -30
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +28 -0
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +75 -5
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +17 -0
- package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +99 -124
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +43 -10
- package/src/templates/default/.agents/skills/security/SKILL.md +162 -144
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +5 -3
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +15 -0
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +116 -83
- package/src/templates/default/DEVELOPING.md +10 -13
- package/src/templates/workspace-core/.agents/skills/client-methods/references/legacy-client-fetch-audit-2026-06-03.md +9 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +27 -0
package/dist/cli/skills.js
CHANGED
|
@@ -15,7 +15,7 @@ const HELP = `agent-native skills
|
|
|
15
15
|
|
|
16
16
|
Usage:
|
|
17
17
|
agent-native skills list
|
|
18
|
-
agent-native skills add assets|design-exploration|visual-plan|visual-questions|ui-plan|prototype-plan|plan-design|
|
|
18
|
+
agent-native skills add assets|design-exploration|visual-plan|visual-recap|visual-questions|ui-plan|prototype-plan|plan-design|context-xray [--client codex|claude-code|claude-code-cli|cowork|all] [--scope user|project] [--mcp-url <url>] [--no-connect] [--yes] [--dry-run] [--json]
|
|
19
19
|
agent-native skills add <manifest-or-app-dir> [--client ...] [--yes]
|
|
20
20
|
|
|
21
21
|
Examples:
|
|
@@ -195,8 +195,9 @@ iteration, or a human-in-the-loop choice among design directions.
|
|
|
195
195
|
and token values. Never paste bearer tokens into chat or logs.
|
|
196
196
|
`;
|
|
197
197
|
/**
|
|
198
|
-
* Shared setup/auth block for every Plans skill (`/visual-plan`,
|
|
199
|
-
* `/
|
|
198
|
+
* Shared setup/auth block for every Plans skill (`/visual-plan`,
|
|
199
|
+
* `/visual-recap`, `/ui-plan`, `/prototype-plan`, `/plan-design`,
|
|
200
|
+
* `/visual-questions`). Interpolated into each skill markdown
|
|
200
201
|
* so the install + one-step authenticate instructions never drift between them.
|
|
201
202
|
* Keep this in sync with the copies under `templates/plan/.agents/skills/*` and
|
|
202
203
|
* top-level `skills/*` (this skill's SKILL.md is triplicated with no sync test).
|
|
@@ -214,8 +215,9 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
214
215
|
agent-native skills add visual-plan
|
|
215
216
|
\`\`\`
|
|
216
217
|
|
|
217
|
-
After that, \`/visual-plan\` (and \`/
|
|
218
|
-
\`/
|
|
218
|
+
After that, \`/visual-plan\` (and \`/visual-recap\`, \`/ui-plan\`,
|
|
219
|
+
\`/prototype-plan\`, \`/plan-design\`, \`/visual-questions\`) generate a plan and open
|
|
220
|
+
the editor. Pass \`--no-connect\` to
|
|
219
221
|
register the connector without authenticating, then run
|
|
220
222
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
221
223
|
|
|
@@ -238,128 +240,21 @@ is available.
|
|
|
238
240
|
|
|
239
241
|
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
240
242
|
not put shared secrets in skill files.`;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
live prototype, or both in tabs) and a Notion-like technical document below. The
|
|
257
|
-
user reacts to visuals first and reads prose only where it helps.
|
|
258
|
-
|
|
259
|
-
\`/visual-plan\` is the canonical command and the main entry point. Use \`/ui-plan\`
|
|
260
|
-
when the work is primarily product UI and review should start with the screens.
|
|
261
|
-
Use \`/prototype-plan\` when review should start with a functional live prototype.
|
|
262
|
-
Use \`/plan-design\` when review should start with full-fidelity branded design.
|
|
263
|
-
Use \`/visual-questions\` only when the user explicitly wants a visual intake form
|
|
264
|
-
before planning. Use \`/visualize-plan\` to turn an existing Codex, Claude Code,
|
|
265
|
-
Markdown, or pasted plan into a visual companion.
|
|
266
|
-
|
|
267
|
-
## When To Use
|
|
268
|
-
|
|
269
|
-
Create a visual plan when work is multi-file, ambiguous, long-running, risky, or
|
|
270
|
-
UI-heavy, when architecture / data flow / UI direction / options / open
|
|
271
|
-
questions would be clearer visually, or when the user needs to react to a
|
|
272
|
-
direction before you implement.
|
|
273
|
-
|
|
274
|
-
## Plan Discipline
|
|
275
|
-
|
|
276
|
-
- **Gate hard.** A polished visual plan is the most expensive plan form; only
|
|
277
|
-
invest when a wrong direction is costly. Skip it for trivial, unambiguous work
|
|
278
|
-
— typos, one-line fixes, a single well-specified function, anything whose diff
|
|
279
|
-
you could describe in one sentence — and just make the change. Never pad a plan
|
|
280
|
-
with filler and never ship a single-step plan.
|
|
281
|
-
- **Research before you draft.** Read the real files, actions, schema, and
|
|
282
|
-
patterns first; name actual files, symbols, and data shapes instead of
|
|
283
|
-
inventing them. Check existing \`actions/\` before proposing endpoints and prefer
|
|
284
|
-
named client helpers over raw fetch. Delegate wide exploration to a sub-agent.
|
|
285
|
-
- **Planning is read-only.** Make no source edits while building or reviewing the
|
|
286
|
-
plan. Start editing only after the user approves the direction.
|
|
287
|
-
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
|
|
288
|
-
approach and options in the plan. Ask a clarifying question only when an
|
|
289
|
-
ambiguity would change the design and you cannot resolve it from the code; use
|
|
290
|
-
the host agent's normal ask-user-question flow and batch 2-4 high-leverage
|
|
291
|
-
questions before finalizing. Do not call \`create-visual-questions\` from
|
|
292
|
-
\`/visual-plan\`; keep any answerable follow-up inside the plan itself as a
|
|
293
|
-
bottom \`question-form\` Open Questions block. Otherwise state the assumption
|
|
294
|
-
explicitly and proceed, and put anything unresolved in an open-questions block.
|
|
295
|
-
- **The plan is the approval gate.** After surfacing it, ask the user to review
|
|
296
|
-
and approve before you write code, and name which files/areas the work touches.
|
|
297
|
-
Presenting the plan and requesting sign-off is the approval step — do not ask a
|
|
298
|
-
separate "does this look good?" question.
|
|
299
|
-
- **The document is the source of truth, not the chat.** When scope shifts,
|
|
300
|
-
update the plan with \`update-visual-plan\` rather than only changing course in
|
|
301
|
-
chat, and re-read the approved plan before major steps.
|
|
302
|
-
|
|
303
|
-
## Core Workflow
|
|
304
|
-
|
|
305
|
-
1. Follow the host agent's normal planning flow: inspect the codebase, delegate
|
|
306
|
-
wide exploration when useful, gather the info needed, and ask native
|
|
307
|
-
clarifying questions as needed before generating the plan.
|
|
308
|
-
2. Decide the top visual surface with the rules below, then call
|
|
309
|
-
\`create-visual-plan\` with the title, brief, source, repo path, and structured \`content\` blocks.
|
|
310
|
-
3. Compose any top visual surface from the kit and write the document with
|
|
311
|
-
native blocks (see the cores below). Keep the document close to the Markdown
|
|
312
|
-
plan the agent would normally output; add diagrams, wireframes, prototypes,
|
|
313
|
-
and visual callouts only where they clarify the plan. Skip the top visual
|
|
314
|
-
surface for non-visual work.
|
|
315
|
-
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|
|
316
|
-
Always include the actual URL in chat so the next step is a click in CLI or
|
|
317
|
-
other text-only hosts. When the host exposes an embedded browser/preview panel
|
|
318
|
-
and a tool can open arbitrary URLs there, open the returned plan URL
|
|
319
|
-
automatically for convenient review; do not rely on this as the only handoff.
|
|
320
|
-
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
321
|
-
and before the final response. Treat \`anchorDetails\`, resolver intent, recent
|
|
322
|
-
review events, and any focused screenshots from browser handoff as the source
|
|
323
|
-
of truth for exactly what changed and exactly what each comment points at.
|
|
324
|
-
6. Apply changes with \`update-visual-plan\`, preferring targeted \`contentPatches\`.
|
|
325
|
-
When the user wants source-control friendly edits, use
|
|
326
|
-
\`patch-visual-plan-source\` against the MDX files instead of regenerating the
|
|
327
|
-
plan.
|
|
328
|
-
7. Export with \`export-visual-plan\` only when the user wants a shareable receipt
|
|
329
|
-
or repo-check-in artifacts.
|
|
330
|
-
|
|
331
|
-
## Visual Surface Choice
|
|
332
|
-
|
|
333
|
-
Choose the surface before creating the plan. Do not add visual chrome by
|
|
334
|
-
default:
|
|
335
|
-
|
|
336
|
-
- **No visual surface** for architecture-only, backend-only, data migration,
|
|
337
|
-
copy-only, or otherwise non-visual plans. Use a strong document with diagrams
|
|
338
|
-
only when relationships need a visual explanation.
|
|
339
|
-
- **Canvas only** for one static screen, a before/after comparison, a component
|
|
340
|
-
state, a small popover, or a visual direction that does not require clicking.
|
|
341
|
-
Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
|
|
342
|
-
- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,
|
|
343
|
-
review/approval flows, navigation changes, or anything where the reviewer
|
|
344
|
-
needs to operate the behavior. Keep the static wireframes in
|
|
345
|
-
\`content.canvas\`, add the aligned functional prototype in
|
|
346
|
-
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
347
|
-
- **Prototype-first** when the user explicitly asks for \`/prototype-plan\`, asks
|
|
348
|
-
to operate the UI, or when interaction is the main question. Use
|
|
349
|
-
\`create-prototype-plan\`, which still preserves static mocks where useful.
|
|
350
|
-
|
|
351
|
-
For mixed canvas + prototype plans, reuse the same real labels, app statuses,
|
|
352
|
-
and screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
353
|
-
the prototype is the interactive version of that same flow, not a separate
|
|
354
|
-
design direction.
|
|
355
|
-
|
|
356
|
-
<!-- SHARED-CORE:wireframe-canvas START -->
|
|
357
|
-
|
|
358
|
-
## Wireframe & Canvas Core
|
|
359
|
-
|
|
360
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
361
|
-
\`/visualize-plan\`. It is the single source of truth for how wireframes and the
|
|
362
|
-
canvas work. Do not paraphrase it per command.
|
|
243
|
+
// Single-source shared cores. Each partial is a heading-less BODY string that
|
|
244
|
+
// begins and ends with its own SHARED-CORE marker comment, so the marker-region
|
|
245
|
+
// sync guard can extract and compare it across the skills that consume it. The
|
|
246
|
+
// skill constants below interpolate these partials at module-eval time; the
|
|
247
|
+
// distributed artifact stays a flat string, so distribution is unchanged.
|
|
248
|
+
//
|
|
249
|
+
// Consumers:
|
|
250
|
+
// WIREFRAME_QUALITY_CORE — visual-plan, ui-plan, visual-recap (surface-agnostic)
|
|
251
|
+
// CANVAS_SURFACE_CORE — visual-plan, ui-plan (canvas/artboard mechanics)
|
|
252
|
+
// DOCUMENT_QUALITY_CORE — visual-plan, ui-plan
|
|
253
|
+
// EXEMPLAR_CORE — visual-plan, ui-plan
|
|
254
|
+
// Surface-agnostic HTML wireframe quality rules. Applies equally to a standalone
|
|
255
|
+
// WireframeBlock/<Screen> (visual-recap) and to a canvas artboard (visual-plan /
|
|
256
|
+
// ui-plan). Do not put canvas/artboard placement mechanics here.
|
|
257
|
+
const WIREFRAME_QUALITY_CORE = `<!-- SHARED-CORE:wireframe-quality START -->
|
|
363
258
|
|
|
364
259
|
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
365
260
|
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
@@ -414,18 +309,36 @@ Pick the \`surface\` that matches what the user will actually see:
|
|
|
414
309
|
- \`popover\`: a small floating menu, dropdown, or inline popover.
|
|
415
310
|
- \`panel\`: a side panel, inspector, or sidebar widget.
|
|
416
311
|
|
|
417
|
-
The surface locks the footprint and aspect; never set width/height/coordinates.
|
|
418
312
|
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
419
313
|
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
420
314
|
actually changes the layout. For a component or widget, show one broader
|
|
421
315
|
app-context frame only when placement affects understanding, then the focused
|
|
422
316
|
component states.
|
|
423
317
|
|
|
318
|
+
**Model the actual component shell for small surfaces.** A rendered UI change
|
|
319
|
+
belongs in a wireframe; reserve \`diagram\` for architecture, dependency, state,
|
|
320
|
+
or data-flow relationships. Popovers, dropdown menus, command palettes, and
|
|
321
|
+
context menus use \`surface: "popover"\` unless the surrounding page placement is
|
|
322
|
+
the point of the change. Dialogs, sheets, inspectors, sidebars, and long
|
|
323
|
+
property panels use the matching \`panel\` / \`desktop\` surface as appropriate.
|
|
324
|
+
Show the real chrome: trigger or anchor when it matters, title/header row,
|
|
325
|
+
top-right actions, separators, fields, options, selected states, body content,
|
|
326
|
+
and footer actions that are visible in the workflow.
|
|
327
|
+
|
|
424
328
|
**Modify, don't redesign.** When the task changes an existing screen, reproduce
|
|
425
329
|
the current screen's real layout and footprint FIRST, then change only the delta
|
|
426
330
|
and call it out with a single annotation. Do not restack the page into a new
|
|
427
331
|
layout. For net-new surfaces, compose from the real app shell.
|
|
428
332
|
|
|
333
|
+
**Classify mockup scope before implementation.** Before turning a plan mockup
|
|
334
|
+
into source code, decide whether each artboard represents the whole page/app
|
|
335
|
+
shell, a route body inside an existing shell, or a component/sub-surface. If an
|
|
336
|
+
artboard includes navigation, sidebars, auth banners, or a signup/login form,
|
|
337
|
+
map those pieces to the real shared shell/auth components instead of nesting the
|
|
338
|
+
entire mockup inside the current page. When a mockup references the product's
|
|
339
|
+
standard signup/login page, find and reuse that existing implementation; do not
|
|
340
|
+
approximate it from the wireframe.
|
|
341
|
+
|
|
429
342
|
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
430
343
|
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
431
344
|
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
@@ -438,8 +351,7 @@ fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
|
|
|
438
351
|
built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
|
|
439
352
|
no labels or copy. The renderer drops borders, sketch, and color into the
|
|
440
353
|
skeleton register automatically. Never escape to a \`custom-html\` document block
|
|
441
|
-
to fake a loader
|
|
442
|
-
live in canvas artboards.
|
|
354
|
+
to fake a loader.
|
|
443
355
|
|
|
444
356
|
**Editing an existing mockup.** To change one element, text, or color in an
|
|
445
357
|
existing html mockup, do NOT regenerate the frame — call \`update-visual-plan\`
|
|
@@ -448,47 +360,53 @@ replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
|
|
|
448
360
|
first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
|
|
449
361
|
occurrence. The result is re-sanitized.
|
|
450
362
|
|
|
451
|
-
**
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
472
|
-
edits. If an agent is working from exported source files, use
|
|
473
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
474
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
475
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
476
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
477
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
478
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
479
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
480
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
481
|
-
|
|
482
|
-
**Never emit a titled artboard with no interior wireframe content.** Every artboard you place on the canvas must carry an \`html\` wireframe (or reference a wireframe block via \`blockId\`) — a label-only frame renders as an empty dashed box and is rejected at parse time. If you only have a title, write it as a section header or annotation, not an empty artboard.
|
|
363
|
+
**Treat the wireframe border as part of the visible design.** Always wrap HTML
|
|
364
|
+
wireframe content in a root container with real inner padding before drawing
|
|
365
|
+
cards, fields, pills, labels, or controls. Use at least 14-16px of padding,
|
|
366
|
+
\`box-sizing: border-box\`, \`height: 100%\`, and \`gap\` between child rows so the
|
|
367
|
+
first row never sits flush against the screen border. Keep text away from
|
|
368
|
+
borders: every container, field, button, menu item, and annotation needs enough
|
|
369
|
+
padding and line-height to read cleanly in the rendered Plan view.
|
|
370
|
+
|
|
371
|
+
**Lay out children safely so they never collide.** Use HTML flex/grid with
|
|
372
|
+
\`gap\`, \`min-width: 0\`, and sensible overflow. Avoid negative margins, absolute
|
|
373
|
+
positioning, or fixed child widths that can collide when the renderer switches
|
|
374
|
+
between light/dark, sketch/clean, or different zoom levels.
|
|
375
|
+
|
|
376
|
+
**Do not wrap intentionally single-line labels.** For tab rails, breadcrumbs,
|
|
377
|
+
file chips, code filenames, and other deliberately single-line labels, do not
|
|
378
|
+
let long text wrap. It is acceptable and usually preferable to use
|
|
379
|
+
\`white-space: nowrap\`, \`overflow: hidden\`, and \`text-overflow: ellipsis\` (or
|
|
380
|
+
abstract bars) so the wireframe demonstrates the actual layout behavior instead
|
|
381
|
+
of producing ugly vertical text. Use horizontally scrollable or clipped rails
|
|
382
|
+
for overflow.
|
|
483
383
|
|
|
484
384
|
**Fill the frame; keep labels short.** Each artboard is a fixed-size surface — compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (\`flex:1\`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column — shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).
|
|
485
385
|
|
|
386
|
+
**Before / after must be comparable.** When showing a state change, preserve the
|
|
387
|
+
unchanged controls in both states so the reviewer can see exactly what moved or
|
|
388
|
+
appeared; do not show an added control as a generic box floating elsewhere in
|
|
389
|
+
the surface. Place the new/changed affordance where the implementation puts it —
|
|
390
|
+
for example, a new \`Edit with AI\` action in a popover header belongs in the
|
|
391
|
+
top-right header slot, aligned with the title, not in the body or footer. Use
|
|
392
|
+
the same frame size, scale, outer padding, border radius, and visual density on
|
|
393
|
+
both sides unless the change itself alters those properties, and let the frame
|
|
394
|
+
height fit the content rather than leaving a tall empty lower half. Choose the
|
|
395
|
+
before/after layout by geometry: use a \`columns\` block labeled \`Before\`/\`After\`
|
|
396
|
+
when each state stays legible side by side; stack \`Before\` then \`After\`
|
|
397
|
+
vertically in normal document flow when the surface is very wide, when
|
|
398
|
+
full-width scanning matters, or when columns would shrink or crop the detail.
|
|
399
|
+
Label each state visibly (for example, a header pill) so cropped screenshots
|
|
400
|
+
stay unambiguous.
|
|
401
|
+
|
|
486
402
|
**Good example — a contacts list, surface \`browser\`.** A small, real screen
|
|
487
403
|
composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
488
404
|
hex colors:
|
|
489
405
|
|
|
490
406
|
\`\`\`html
|
|
491
|
-
<div
|
|
407
|
+
<div
|
|
408
|
+
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
409
|
+
>
|
|
492
410
|
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
493
411
|
<h1>Contacts</h1>
|
|
494
412
|
<button class="primary">New contact</button>
|
|
@@ -498,53 +416,127 @@ hex colors:
|
|
|
498
416
|
<span class="wf-pill">Favorites</span>
|
|
499
417
|
<span class="wf-pill">Archived</span>
|
|
500
418
|
</div>
|
|
501
|
-
<div
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
419
|
+
<div
|
|
420
|
+
class="wf-card"
|
|
421
|
+
style="display:flex;flex-direction:column;gap:0;padding:0"
|
|
422
|
+
>
|
|
423
|
+
<div
|
|
424
|
+
style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)"
|
|
425
|
+
>
|
|
426
|
+
<div
|
|
427
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
428
|
+
></div>
|
|
429
|
+
<div style="flex:1">
|
|
430
|
+
<strong>Jane Cooper</strong><br /><small>jane@acme.co</small>
|
|
431
|
+
</div>
|
|
505
432
|
<span class="wf-pill">Lead</span>
|
|
506
433
|
</div>
|
|
507
434
|
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
508
|
-
<div
|
|
509
|
-
|
|
435
|
+
<div
|
|
436
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
437
|
+
></div>
|
|
438
|
+
<div style="flex:1">
|
|
439
|
+
<strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>
|
|
440
|
+
</div>
|
|
510
441
|
<span class="wf-pill">Customer</span>
|
|
511
442
|
</div>
|
|
512
443
|
</div>
|
|
513
444
|
</div>
|
|
514
445
|
\`\`\`
|
|
515
446
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
447
|
+
<!-- SHARED-CORE:wireframe-quality END -->`;
|
|
448
|
+
// Canvas/artboard placement mechanics. Used only by visual-plan and ui-plan
|
|
449
|
+
// (visual-recap renders standalone wireframes, not a canvas).
|
|
450
|
+
const CANVAS_SURFACE_CORE = `<!-- SHARED-CORE:canvas-surface START -->
|
|
451
|
+
|
|
452
|
+
**Artboard placement is locked by the \`surface\`, not by coordinates.** The
|
|
453
|
+
surface locks the footprint and aspect; never set artboard width/height and
|
|
454
|
+
never use coordinates inside the wireframe HTML. Let canvas auto-placement
|
|
455
|
+
handle simple one-row boards. For mixed-footprint canvases, board-level artboard
|
|
456
|
+
\`x\`/\`y\` is allowed and expected when it creates clear lanes.
|
|
457
|
+
|
|
458
|
+
**Lay out mixed canvases in lanes.** When a canvas contains broad browser /
|
|
459
|
+
desktop frames plus compact \`mobile\`, \`popover\`, or \`panel\` surfaces, do not put
|
|
460
|
+
everything in one horizontal strip. Use board-level artboard \`x\`/\`y\` to reserve
|
|
461
|
+
lanes with generous empty space: main flow on one row, compact surfaces in their
|
|
462
|
+
own column or row, and loading/error states in a lower row. Keep at least 96px
|
|
463
|
+
between rendered artboard rectangles plus room for annotation gutters. Connect
|
|
464
|
+
only neighboring steps; never draw a long connector that skips across unrelated
|
|
465
|
+
frames. Before handoff, inspect the top canvas at default zoom and move any
|
|
466
|
+
frame whose label, connector, or annotation crosses another frame.
|
|
528
467
|
|
|
529
|
-
**
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
plan.
|
|
468
|
+
**Canvas annotations are designer notes on the artboard.** When a top canvas is
|
|
469
|
+
present, sprinkle Figma-style notes near the frames they explain: a short
|
|
470
|
+
heading, supporting text, and bullets — plain text layers, never bordered or
|
|
471
|
+
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
472
|
+
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
473
|
+
point at one specific control or transition; for a broad frame-level note, write
|
|
474
|
+
text beside the frame with no connector. Connectors are for real sequences only —
|
|
475
|
+
never fake "Step 1 → Step 2" lines between independent states.
|
|
538
476
|
|
|
539
|
-
|
|
477
|
+
**Do not create overlapping annotations.** Anchor each ordinary note to the
|
|
478
|
+
frame it explains with \`targetId\` + \`placement\` (top/right/bottom/left), and
|
|
479
|
+
omit \`type\` or use \`type: "note"\`. The renderer parks notes in a gutter beside
|
|
480
|
+
the frame and lays them out automatically. Do not use \`type: "callout"\`,
|
|
481
|
+
\`type: "text"\`, \`type: "arrow"\`, x/y, or points for ordinary notes; those are
|
|
482
|
+
freeform review-markup layers and must be reserved for intentional markup in
|
|
483
|
+
open canvas space. Reserve arrows for a note that must point at one specific
|
|
484
|
+
control inside a frame; a note that simply sits beside its frame needs no arrow.
|
|
485
|
+
|
|
486
|
+
**Patching.** Edit one wireframe, canvas annotation, diagram, or block with targeted \`contentPatches\`
|
|
487
|
+
(for example \`patch-wireframe-html\`, \`patch-diagram-html\`, \`update-block\`,
|
|
488
|
+
\`replace-blocks\`, \`update-canvas-annotation\`) rather
|
|
489
|
+
than regenerating the whole plan. \`contentPatches\` are part of the public MCP
|
|
490
|
+
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
491
|
+
edits. If an agent is working from exported source files, use
|
|
492
|
+
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
493
|
+
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
494
|
+
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
495
|
+
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
496
|
+
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
497
|
+
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
498
|
+
\`update-rich-text\` content patches or source patches for prose, and use
|
|
499
|
+
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
540
500
|
|
|
541
|
-
|
|
501
|
+
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
502
|
+
you place on the canvas must carry an \`html\` wireframe or reference a wireframe
|
|
503
|
+
block via \`blockId\`; when using \`blockId\`, the referenced \`wireframe\` /
|
|
504
|
+
\`legacy-wireframe\` block must remain in the plan. If you remove a duplicate
|
|
505
|
+
wireframe from the document body, first move its \`data\` inline onto the
|
|
506
|
+
corresponding \`content.canvas.frames[*].wireframe\` / \`legacyWireframe\`. A
|
|
507
|
+
label-only frame or a frame pointing at a deleted block renders empty and is
|
|
508
|
+
rejected at parse time. If you only have a title, write it as a section header or
|
|
509
|
+
annotation, not an empty artboard.
|
|
510
|
+
|
|
511
|
+
**UI mockups belong in the top visual review area.** Static UI/product visuals
|
|
512
|
+
live on the canvas; multi-step UI flows get both canvas wireframes and a
|
|
513
|
+
prototype. When the user asks for a mockup, UI state, loading state, layout,
|
|
514
|
+
screen, or visual comparison, make the canvas the primary home for that static
|
|
515
|
+
visual. When the user asks for a prototype or the plan contains a sequence the
|
|
516
|
+
reviewer must feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
517
|
+
top surface shows Wireframes / Prototype tabs. Architecture/code diagrams are
|
|
518
|
+
different: keep them inline in the document, close to the recommendation they
|
|
519
|
+
support, unless the user explicitly asks for a spatial board. Document blocks
|
|
520
|
+
can explain, compare, or map implementation, but they should not host the
|
|
521
|
+
primary UI mockup or prototype just because \`custom-html\`, screenshots, or prose
|
|
522
|
+
are easier to produce. If the canvas/prototype surface cannot represent the
|
|
523
|
+
requested UI fidelity, still keep the closest top-surface representation and
|
|
524
|
+
call out or extend the needed renderer capability. A skeleton/loading mockup
|
|
525
|
+
also lives in a canvas artboard — never move a mockup out of the canvas.
|
|
542
526
|
|
|
543
|
-
|
|
527
|
+
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
528
|
+
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
529
|
+
plans emit \`html\`. Do not author fresh kit-tree screens - write the HTML mockup
|
|
530
|
+
instead. Likewise, old or imported plans may carry coordinate-based regions or
|
|
531
|
+
free-float x/y on notes; those are legacy escape hatches the renderer still
|
|
532
|
+
shows but you must never produce. The \`surface\` drives each artboard's aspect
|
|
533
|
+
and footprint, and the gutter parks notes by \`targetId\` + \`placement\`. The only
|
|
534
|
+
new-plan coordinate exception is deliberate board-level artboard \`x\`/\`y\` for
|
|
535
|
+
multi-lane mixed-surface canvases; never supply artboard width/height, note
|
|
536
|
+
coordinates, or wireframe-internal coordinates.
|
|
544
537
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
canvas. Do not paraphrase it per command.
|
|
538
|
+
<!-- SHARED-CORE:canvas-surface END -->`;
|
|
539
|
+
const DOCUMENT_QUALITY_CORE = `<!-- SHARED-CORE:document-quality START -->
|
|
548
540
|
|
|
549
541
|
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
550
542
|
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
@@ -556,14 +548,31 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
|
556
548
|
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
557
549
|
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
558
550
|
|
|
559
|
-
**
|
|
560
|
-
the top visual surface: canvas artboards for
|
|
561
|
-
tabs when the flow should be functional. The
|
|
562
|
-
the visuals cannot show — concrete
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
551
|
+
**When top visuals exist, they and the document never duplicate each other.**
|
|
552
|
+
For UI work, the UI story lives in the top visual surface: canvas artboards for
|
|
553
|
+
static inspection, plus prototype tabs when the flow should be functional. The
|
|
554
|
+
document carries the technical depth the visuals cannot show — concrete
|
|
555
|
+
file/symbol maps, API and data contracts, code snippets, migration or
|
|
556
|
+
implementation phases, risks, and validation. For architecture/code reviews,
|
|
557
|
+
invert that: the document is the visual surface, and each recommendation should
|
|
558
|
+
carry its own nearby inline \`diagram\` / \`data-model\` block plus file evidence
|
|
559
|
+
and terse Problem/Solution/Why text. For architecture/code diagrams, prefer
|
|
560
|
+
standard two-dimensional layouts: paired before/after panels, layered diagrams,
|
|
561
|
+
swimlanes, dependency maps, matrices, or grouped regions. Do not default to
|
|
562
|
+
left-to-right chains; use a line only when the relationship is truly a sequence.
|
|
563
|
+
Use native \`diagram\` blocks with \`data.html\` / \`data.css\` for these richer
|
|
564
|
+
layouts; the fragment may use semantic HTML and inline SVG, and the renderer
|
|
565
|
+
applies the viewer's sketch/clean style. Leave room for the sketch font: keep
|
|
566
|
+
labels short, give nodes generous width, and place boundary/annotation labels in
|
|
567
|
+
unused space instead of over nodes. For small text/SVG changes to an existing
|
|
568
|
+
HTML diagram, use \`patch-diagram-html\` with a unique \`find\`/\`replace\` snippet
|
|
569
|
+
instead of resending the whole \`data.html\` string. Legacy \`nodes\` / \`edges\` are
|
|
570
|
+
only for tiny previews or genuinely linear step flows. Repeat a wireframe in the document only
|
|
571
|
+
for a genuinely new detail view or comparison. Skip the visual surface entirely
|
|
572
|
+
for non-visual work and write a clean rich document. For a simple binary UI
|
|
573
|
+
visual choice, show the two directions in the canvas only; do not repeat the
|
|
574
|
+
same options as body wireframes, a \`decision\` block, or prose. Put the actual
|
|
575
|
+
choice in the bottom "Open Questions" form.
|
|
567
576
|
|
|
568
577
|
**Use the right block, and make it carry substance.** For the authoritative,
|
|
569
578
|
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
@@ -573,14 +582,33 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
573
582
|
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
574
583
|
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
575
584
|
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
576
|
-
concise syntax-highlighted snippet of the code shape
|
|
577
|
-
never a prose-only file list.
|
|
585
|
+
concise syntax-highlighted snippet of the code shape in every file tab —
|
|
586
|
+
never the whole file, never a prose-only file list. If the exact code is not
|
|
587
|
+
known yet, include the smallest plausible planned shape or a short comment
|
|
588
|
+
stub that names what needs to be filled in.
|
|
578
589
|
- \`decision\` for two or three option cards with consequences. These are static
|
|
579
590
|
records; do not style them like clickable tabs or chips unless the renderer
|
|
580
591
|
truly supports changing the selection.
|
|
581
|
-
- \`
|
|
582
|
-
|
|
583
|
-
|
|
592
|
+
- \`columns\` for side-by-side before/after or current/target comparisons where
|
|
593
|
+
each side needs real nested blocks; label the columns clearly and avoid
|
|
594
|
+
stacking comparison blocks vertically when parallel reading is the point.
|
|
595
|
+
- \`diagram\` for two-dimensional architecture, dependency, data-flow, or state
|
|
596
|
+
relationships, only when it clarifies something real. For architecture/code
|
|
597
|
+
diagrams, prefer \`data.html\` / \`data.css\` with semantic HTML and inline SVG so
|
|
598
|
+
the diagram can use panels, layers, matrices, arrows, annotations, and
|
|
599
|
+
responsive layout directly. Author diagram HTML with renderer-owned primitives
|
|
600
|
+
like \`.diagram-panel\`, \`.diagram-card\`, \`.diagram-node\`, \`.diagram-box\`,
|
|
601
|
+
\`.diagram-pill\`, \`.diagram-muted\`, and \`[data-rough]\`; they map to the plan's
|
|
602
|
+
Tailwind theme variables through \`--wf-ink\`, \`--wf-muted\`, \`--wf-line\`,
|
|
603
|
+
\`--wf-paper\`, \`--wf-card\`, \`--wf-accent\`, \`--wf-accent-soft\`, \`--wf-warn\`, and
|
|
604
|
+
\`--wf-ok\`, and switch to Virgil plus rough.js outlines in sketchy mode. Do not
|
|
605
|
+
set \`font-family\` and do not hard-code hex, rgb, or hsl colors in diagram HTML
|
|
606
|
+
or CSS. Use legacy \`nodes\` / \`edges\` only for small previews or truly
|
|
607
|
+
sequential flows. In architecture/code plans, prefer a repeated section rhythm:
|
|
608
|
+
recommendation title, confidence and category badges, code-path evidence, a
|
|
609
|
+
local before/after or current/target spatial diagram, then concise
|
|
610
|
+
Problem/Solution/Why text. Labels must not overlap nodes, connectors, or each
|
|
611
|
+
other.
|
|
584
612
|
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
585
613
|
only prose usually means the plan is under-specified — include a relevant
|
|
586
614
|
visual unless the tab is intentionally document-only.
|
|
@@ -588,31 +616,31 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
588
616
|
|
|
589
617
|
**Open questions live at the bottom as a form when answers would change the
|
|
590
618
|
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
591
|
-
block titled "Open Questions"
|
|
592
|
-
\`
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
619
|
+
block titled "Open Questions" so the renderer presents it as a distinct section.
|
|
620
|
+
Use \`single\` or \`multi\` for clear choices, \`freeform\` for constraints,
|
|
621
|
+
\`recommended: true\` for the default you would pick, and option \`wireframe\` /
|
|
622
|
+
\`diagram\` previews only when the options are not already visible in the top
|
|
623
|
+
canvas. Keep non-answerable assumptions or risks as concise \`callout\` blocks in
|
|
624
|
+
the relevant section. Never bury a questions/decisions wall inside the plan
|
|
625
|
+
narrative, and never ask the same question in both a \`decision\` block and a
|
|
626
|
+
\`question-form\`.
|
|
597
627
|
|
|
598
628
|
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
599
629
|
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
600
630
|
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
601
|
-
blocks for normal plans.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
the
|
|
631
|
+
blocks for normal plans. For architecture/code reviews, use \`diagram\`
|
|
632
|
+
\`data.html\` / \`data.css\` for rich local HTML/SVG diagrams instead of
|
|
633
|
+
\`custom-html\`. For UI/product work, \`custom-html\` is never the primary home for a
|
|
634
|
+
requested mockup, UI state, or visual comparison. If UI fidelity requires
|
|
635
|
+
HTML/CSS, image capture, or real React/CSS, the product fix is canvas support
|
|
636
|
+
for that artifact type, not moving the mockup into the document.
|
|
606
637
|
|
|
607
638
|
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
608
639
|
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
609
640
|
unreadable diagrams before asking for approval.
|
|
610
641
|
|
|
611
|
-
<!-- SHARED-CORE:document-quality END
|
|
612
|
-
|
|
613
|
-
<!-- SHARED-CORE:exemplar START -->
|
|
614
|
-
|
|
615
|
-
## Good vs. Bad Exemplar
|
|
642
|
+
<!-- SHARED-CORE:document-quality END -->`;
|
|
643
|
+
const EXEMPLAR_CORE = `<!-- SHARED-CORE:exemplar START -->
|
|
616
644
|
|
|
617
645
|
**GOOD.** A \`/ui-plan\` for a todo app: a canvas with a \`desktop\` artboard whose
|
|
618
646
|
\`data.html\` is a real flex layout — a sidebar of links (\`Inbox 12\`, \`Today 4\`,
|
|
@@ -630,6 +658,16 @@ changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
|
630
658
|
whose screens use the same labels and states as the canvas artboards, with
|
|
631
659
|
\`data-goto\` controls for the sequence. This is the bar.
|
|
632
660
|
|
|
661
|
+
**GOOD.** A \`/visual-plan\` for a backend architecture review: no top canvas.
|
|
662
|
+
The document opens with context and a legend, then repeats recommendation cards:
|
|
663
|
+
title, confidence/category badges, a monospace grid of real file paths, one
|
|
664
|
+
inline two-dimensional before/after or layered architecture diagram, and terse
|
|
665
|
+
Problem/Solution/Why bullets using the codebase's vocabulary. The diagram uses
|
|
666
|
+
space to show boundaries, layers, and ownership; it is not a default
|
|
667
|
+
left-to-right chain. The plan ends with a top recommendation and a bottom
|
|
668
|
+
question-form only if the next architecture direction is genuinely open. This is
|
|
669
|
+
better than a top canvas because each diagram is local to the claim it supports.
|
|
670
|
+
|
|
633
671
|
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
634
672
|
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
635
673
|
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
@@ -637,14 +675,184 @@ annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
|
637
675
|
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
638
676
|
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
639
677
|
document with a hero heading and value props that just restates what the canvas
|
|
640
|
-
already shows.
|
|
678
|
+
already shows. Also bad: an architecture-only plan forced into a top canvas of
|
|
679
|
+
labeled boxes with overlapping text, where the actual code evidence and
|
|
680
|
+
recommendations live elsewhere. Never produce this.
|
|
681
|
+
|
|
682
|
+
<!-- SHARED-CORE:exemplar END -->`;
|
|
683
|
+
export const VISUAL_PLANS_SKILL_MD = `---
|
|
684
|
+
name: visual-plan
|
|
685
|
+
description: >-
|
|
686
|
+
Use Agent-Native Plans when coding-agent work needs an interactive structured
|
|
687
|
+
plan document with inline diagrams, implementation maps, optional UI/product
|
|
688
|
+
wireframes or prototypes, annotations, and comments.
|
|
689
|
+
metadata:
|
|
690
|
+
visibility: exported
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
# Agent-Native Plans
|
|
694
|
+
|
|
695
|
+
Agent-Native Plans is structured visual planning mode for coding agents. Build
|
|
696
|
+
the plan you would normally write in Markdown, but as a scannable document with
|
|
697
|
+
editable blocks mixed in: inline diagrams, implementation maps, code previews,
|
|
698
|
+
open questions, and an optional top visual review area (wireframe canvas, live
|
|
699
|
+
prototype, or both in tabs). Architecture, backend, data, and refactor plans
|
|
700
|
+
usually start in the document with local diagrams near each claim. UI and product
|
|
701
|
+
plans should still start with the top canvas/prototype when screens or behavior
|
|
702
|
+
are what the user needs to review.
|
|
703
|
+
|
|
704
|
+
\`/visual-plan\` is the canonical command and the main entry point. Use \`/ui-plan\`
|
|
705
|
+
when the work is primarily product UI and review should start with the screens.
|
|
706
|
+
Use \`/prototype-plan\` when review should start with a functional live prototype.
|
|
707
|
+
Use \`/plan-design\` when review should start with full-fidelity branded design.
|
|
708
|
+
Use \`/visual-questions\` only when the user explicitly wants a visual intake form
|
|
709
|
+
before planning. When a Codex, Claude Code, Markdown, or pasted plan already
|
|
710
|
+
exists, \`/visual-plan\` uses that source plan as the starting point and builds
|
|
711
|
+
the review surface from it instead of starting over.
|
|
712
|
+
|
|
713
|
+
## When To Use
|
|
714
|
+
|
|
715
|
+
Create or adapt a visual plan when work is multi-file, ambiguous, long-running,
|
|
716
|
+
risky, or UI-heavy, when architecture / data flow / UI direction / options /
|
|
717
|
+
open questions would benefit from inline diagrams or structured blocks, when the
|
|
718
|
+
user needs to react to a direction before you implement, or when an existing text
|
|
719
|
+
plan needs a richer review surface.
|
|
720
|
+
|
|
721
|
+
## Plan Discipline
|
|
722
|
+
|
|
723
|
+
- **Gate hard.** A polished visual plan is the most expensive plan form; only
|
|
724
|
+
invest when a wrong direction is costly. Skip it for trivial, unambiguous work
|
|
725
|
+
— typos, one-line fixes, a single well-specified function, anything whose diff
|
|
726
|
+
you could describe in one sentence — and just make the change. Never pad a plan
|
|
727
|
+
with filler and never ship a single-step plan.
|
|
728
|
+
- **Research before you draft.** Read the real files, actions, schema, and
|
|
729
|
+
patterns first; name actual files, symbols, and data shapes instead of
|
|
730
|
+
inventing them. Check existing \`actions/\` before proposing endpoints and prefer
|
|
731
|
+
named client helpers over raw fetch. Delegate wide exploration to a sub-agent.
|
|
732
|
+
- **Preserve existing plans.** If the user pasted, referenced, or already has a
|
|
733
|
+
Codex / Claude Code / Markdown plan, treat it as source material. Preserve its
|
|
734
|
+
intent, do not invent codebase facts, label inferred visuals as inferred, and
|
|
735
|
+
build the visual review structure around the plan the user already has.
|
|
736
|
+
- **Planning is read-only.** Make no source edits while building or reviewing the
|
|
737
|
+
plan. Start editing only after the user approves the direction.
|
|
738
|
+
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
|
|
739
|
+
approach and options in the plan. Ask a clarifying question only when an
|
|
740
|
+
ambiguity would change the design and you cannot resolve it from the code; use
|
|
741
|
+
the host agent's normal ask-user-question flow and batch 2-4 high-leverage
|
|
742
|
+
questions before finalizing. Do not call \`create-visual-questions\` from
|
|
743
|
+
\`/visual-plan\`; keep any answerable follow-up inside the plan itself as a
|
|
744
|
+
bottom \`question-form\` Open Questions block. Otherwise state the assumption
|
|
745
|
+
explicitly and proceed, and put anything unresolved in an open-questions block.
|
|
746
|
+
- **The plan is the approval gate.** After surfacing it, ask the user to review
|
|
747
|
+
and approve before you write code, and name which files/areas the work touches.
|
|
748
|
+
Presenting the plan and requesting sign-off is the approval step — do not ask a
|
|
749
|
+
separate "does this look good?" question.
|
|
750
|
+
- **The document is the source of truth, not the chat.** When scope shifts,
|
|
751
|
+
update the plan with \`update-visual-plan\` rather than only changing course in
|
|
752
|
+
chat, and re-read the approved plan before major steps.
|
|
753
|
+
|
|
754
|
+
## Core Workflow
|
|
641
755
|
|
|
642
|
-
|
|
756
|
+
1. Follow the host agent's normal planning flow: inspect the codebase, delegate
|
|
757
|
+
wide exploration when useful, gather the info needed, and ask native
|
|
758
|
+
clarifying questions as needed before generating the plan. If a source plan
|
|
759
|
+
already exists, gather its exact text from the user's paste, a referenced
|
|
760
|
+
file, or recent visible agent context; do not invent source text.
|
|
761
|
+
2. Decide whether the plan needs a top visual surface with the rules below, then call
|
|
762
|
+
\`create-visual-plan\` with the title, brief, source, repo path, and structured
|
|
763
|
+
\`content\` blocks. When a source plan already exists, pass it as \`planText\`
|
|
764
|
+
and preserve the original plan's intent while adding structured review
|
|
765
|
+
content.
|
|
766
|
+
3. Compose or enrich any top UI/product visual surface from the kit and write the
|
|
767
|
+
document with native blocks (see the cores below). Keep the document close to
|
|
768
|
+
the Markdown plan the agent would normally output, or to the existing plan
|
|
769
|
+
when one was provided. For architecture, backend, refactor, API, data-model,
|
|
770
|
+
migration, or code plans, usually omit \`content.canvas\` and
|
|
771
|
+
\`content.prototype\`; put \`diagram\`, \`mermaid\`, \`api-endpoint\`,
|
|
772
|
+
\`openapi-spec\`, \`data-model\`, \`diff\`, \`file-tree\`, \`json-explorer\`,
|
|
773
|
+
\`annotated-code\`,
|
|
774
|
+
\`implementation-map\` and \`code-tabs\` blocks directly next
|
|
775
|
+
to the relevant prose. Skip the top visual surface for non-visual work.
|
|
776
|
+
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|
|
777
|
+
Always include the actual URL in chat so the next step is a click in CLI or
|
|
778
|
+
other text-only hosts. When the host exposes an embedded browser/preview panel
|
|
779
|
+
and a tool can open arbitrary URLs there, open the returned plan URL
|
|
780
|
+
automatically for convenient review; do not rely on this as the only handoff.
|
|
781
|
+
Treat that browser open as a convenience and smoke test, not as the access
|
|
782
|
+
model. Plans should load out of the box for the local agent and local browser
|
|
783
|
+
session; if a signed-in embedded browser cannot read a local plan that an
|
|
784
|
+
anonymous/tool check can read, fix the app/action ownership or access path
|
|
785
|
+
rather than patching one plan by hand.
|
|
786
|
+
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
787
|
+
and before the final response. Treat \`anchorDetails\`, resolver intent, recent
|
|
788
|
+
review events, and any focused screenshots from browser handoff as the source
|
|
789
|
+
of truth for exactly what changed and exactly what each comment points at.
|
|
790
|
+
6. Apply changes with \`update-visual-plan\`, preferring targeted \`contentPatches\`.
|
|
791
|
+
When the user wants source-control friendly edits, use
|
|
792
|
+
\`patch-visual-plan-source\` against the MDX files instead of regenerating the
|
|
793
|
+
plan.
|
|
794
|
+
7. Export with \`export-visual-plan\` only when the user wants a shareable receipt
|
|
795
|
+
or repo-check-in artifacts.
|
|
796
|
+
|
|
797
|
+
## Visual Surface Choice
|
|
798
|
+
|
|
799
|
+
Choose the surface before creating the plan or after reading the source plan. Do
|
|
800
|
+
not add visual chrome by default:
|
|
801
|
+
|
|
802
|
+
- **No visual surface** for architecture-only, backend-only, data migration,
|
|
803
|
+
copy-only, or otherwise non-visual plans. Do not use the top canvas for
|
|
804
|
+
architecture diagrams, dependency maps, file plans, API contracts, or
|
|
805
|
+
data-flow-only reviews. Use a strong document with local inline diagrams
|
|
806
|
+
only when relationships need a visual explanation, usually one spatial diagram
|
|
807
|
+
per recommendation or decision. Prefer grouped regions, layers, quadrants,
|
|
808
|
+
matrices, or before/after panels over a single-axis chain unless the
|
|
809
|
+
relationship is truly sequential.
|
|
810
|
+
- **Canvas only** for one static screen, a before/after comparison, a component
|
|
811
|
+
state, a small popover, or a visual direction that does not require clicking.
|
|
812
|
+
Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
|
|
813
|
+
- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,
|
|
814
|
+
review/approval flows, navigation changes, or anything where the reviewer
|
|
815
|
+
needs to operate the behavior. Keep the static wireframes in
|
|
816
|
+
\`content.canvas\`, add the aligned functional prototype in
|
|
817
|
+
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
818
|
+
- **Prototype-first** when the user explicitly asks for \`/prototype-plan\`, asks
|
|
819
|
+
to operate the UI, or when interaction is the main question. Use
|
|
820
|
+
\`create-prototype-plan\`, which still preserves static mocks where useful.
|
|
821
|
+
|
|
822
|
+
For mixed canvas + prototype plans, reuse the same real labels, app statuses,
|
|
823
|
+
and screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
824
|
+
the prototype is the interactive version of that same flow, not a separate
|
|
825
|
+
design direction.
|
|
826
|
+
|
|
827
|
+
## Wireframe & Canvas Core
|
|
828
|
+
|
|
829
|
+
This section is shared by \`/visual-plan\` and \`/ui-plan\`, and is the single
|
|
830
|
+
source of truth for how wireframes and the canvas work. The wireframe-quality
|
|
831
|
+
rules below are additionally shared, word for word, with \`/visual-recap\`; the
|
|
832
|
+
canvas/artboard mechanics apply only to \`/visual-plan\` and \`/ui-plan\`. Do not
|
|
833
|
+
paraphrase any of it per command.
|
|
834
|
+
|
|
835
|
+
${WIREFRAME_QUALITY_CORE}
|
|
836
|
+
|
|
837
|
+
${CANVAS_SURFACE_CORE}
|
|
838
|
+
|
|
839
|
+
## Document Quality Core
|
|
840
|
+
|
|
841
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
842
|
+
the single source of truth for the document below the canvas. Do not paraphrase
|
|
843
|
+
it per command.
|
|
844
|
+
|
|
845
|
+
${DOCUMENT_QUALITY_CORE}
|
|
846
|
+
|
|
847
|
+
## Good vs. Bad Exemplar
|
|
848
|
+
|
|
849
|
+
${EXEMPLAR_CORE}
|
|
643
850
|
|
|
644
851
|
## Tool Guidance
|
|
645
852
|
|
|
646
|
-
- \`create-visual-plan\`: start one structured visual plan per agent task/run
|
|
647
|
-
|
|
853
|
+
- \`create-visual-plan\`: start one structured visual plan per agent task/run, or
|
|
854
|
+
import an existing text plan by passing \`planText\`; \`content\` may include no
|
|
855
|
+
visual surface, canvas only, or canvas + prototype.
|
|
648
856
|
- \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
|
|
649
857
|
- \`create-prototype-plan\`: start a prototype-first plan with a functional top
|
|
650
858
|
review surface.
|
|
@@ -654,7 +862,6 @@ already shows. Never produce this.
|
|
|
654
862
|
into a prototype plan.
|
|
655
863
|
- \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
|
|
656
864
|
command, not as \`/visual-plan\` preflight.
|
|
657
|
-
- \`visualize-plan\`: build a visual companion from an existing text plan.
|
|
658
865
|
- \`update-visual-plan\`: revise content, status, or comments; prefer
|
|
659
866
|
\`contentPatches\` over regenerating the whole plan.
|
|
660
867
|
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
@@ -686,8 +893,9 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
686
893
|
agent-native skills add visual-plan
|
|
687
894
|
\`\`\`
|
|
688
895
|
|
|
689
|
-
After that, \`/visual-plan\` (and \`/
|
|
690
|
-
\`/
|
|
896
|
+
After that, \`/visual-plan\` (and \`/visual-recap\`, \`/ui-plan\`,
|
|
897
|
+
\`/prototype-plan\`, \`/plan-design\`, \`/visual-questions\`) generate a plan and open
|
|
898
|
+
the editor. Pass \`--no-connect\` to
|
|
691
899
|
register the connector without authenticating, then run
|
|
692
900
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
693
901
|
|
|
@@ -732,8 +940,8 @@ react to.
|
|
|
732
940
|
and mixed work. Use \`/prototype-plan\` when the UI review needs a functional live
|
|
733
941
|
prototype instead of static screens. Use \`/plan-design\` when polish, brand, or
|
|
734
942
|
visual fidelity are material to the decision. Use \`/visual-questions\` only when
|
|
735
|
-
the user explicitly wants visual intake before planning
|
|
736
|
-
|
|
943
|
+
the user explicitly wants visual intake before planning. Use \`/visual-plan\` when
|
|
944
|
+
a text plan already exists and should become the source material for the review.
|
|
737
945
|
|
|
738
946
|
## Plan Discipline
|
|
739
947
|
|
|
@@ -773,305 +981,41 @@ when a text plan already exists.
|
|
|
773
981
|
pause, and before the final response. Treat \`anchorDetails\`, resolver intent,
|
|
774
982
|
recent review events, and any focused screenshots from browser handoff as the
|
|
775
983
|
source of truth for exactly what changed and exactly what each UI comment
|
|
776
|
-
points at. Apply changes with \`update-visual-plan\`, preferring
|
|
777
|
-
\`contentPatches\` for one frame, annotation, node, tab, or block. When the
|
|
778
|
-
user wants source-control friendly edits, use \`patch-visual-plan-source\`
|
|
779
|
-
against the MDX files instead of regenerating the plan.
|
|
780
|
-
|
|
781
|
-
## Agent Handoff
|
|
782
|
-
|
|
783
|
-
After the canvas and document, add a short handoff that names the chosen UI
|
|
784
|
-
direction, unresolved visual questions, and feedback that must be read before
|
|
785
|
-
code changes. Never claim feedback has been applied until \`get-plan-feedback\` or
|
|
786
|
-
the user has supplied it.
|
|
787
|
-
|
|
788
|
-
<!-- SHARED-CORE:wireframe-canvas START -->
|
|
789
|
-
|
|
790
|
-
## Wireframe & Canvas Core
|
|
791
|
-
|
|
792
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
793
|
-
\`/visualize-plan\`. It is the single source of truth for how wireframes and the
|
|
794
|
-
canvas work. Do not paraphrase it per command.
|
|
795
|
-
|
|
796
|
-
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
797
|
-
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
798
|
-
screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
|
|
799
|
-
the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
|
|
800
|
-
never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags, font-family, hex colors,
|
|
801
|
-
or any width/height/coordinates. You write real HTML layout and real product
|
|
802
|
-
content; the renderer styles and roughens it.
|
|
803
|
-
|
|
804
|
-
**A wireframe block's data is an HTML screen plus a surface:**
|
|
805
|
-
|
|
806
|
-
\`\`\`json
|
|
807
|
-
{
|
|
808
|
-
"surface": "browser",
|
|
809
|
-
"html": "<div style=\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\"><h1>Sign in</h1><p class=\\"wf-muted\\">Use your work email to continue.</p><div class=\\"wf-card\\" style=\\"display:flex;flex-direction:column;gap:10px\\"><label>Email<input value=\\"jane@acme.co\\" /></label><label>Password<input value=\\"••••••••\\" /></label><label style=\\"display:flex;align-items:center;gap:8px\\"><input type=\\"checkbox\\" checked /> Remember me</label><button class=\\"primary\\">Sign in</button></div><a href=\\"#\\">Forgot password?</a></div>"
|
|
810
|
-
}
|
|
811
|
-
\`\`\`
|
|
812
|
-
|
|
813
|
-
**Write PLAIN semantic HTML and let the renderer style it.** Bare elements
|
|
814
|
-
(\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
|
|
815
|
-
are auto-themed — no classes needed. Helper classes carry the rest:
|
|
816
|
-
|
|
817
|
-
- \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
|
|
818
|
-
- \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
|
|
819
|
-
(\`<span class="wf-pill accent">\`) for the accent-filled variant.
|
|
820
|
-
- \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
|
|
821
|
-
- \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
|
|
822
|
-
primary button.
|
|
823
|
-
|
|
824
|
-
**Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
|
|
825
|
-
these on light/dark, so reading them is what keeps a mockup correct in both
|
|
826
|
-
themes. For any inline border, background, or text color, reference a token:
|
|
827
|
-
\`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
|
|
828
|
-
\`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
|
|
829
|
-
(page background), \`--wf-card\` (raised surface), \`--wf-accent\` /
|
|
830
|
-
\`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
|
|
831
|
-
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
832
|
-
renderer owns the sketch/clean font.
|
|
833
|
-
|
|
834
|
-
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
835
|
-
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
836
|
-
renderer never repositions anything. Compose the actual product: reproduce the
|
|
837
|
-
current screen, then show the modification. Real labels, real counts, real dates,
|
|
838
|
-
real button text grounded in the screen you read; not lorem or gray bars.
|
|
839
|
-
|
|
840
|
-
**Surface presets — match the real footprint, never default to desktop+mobile.**
|
|
841
|
-
Pick the \`surface\` that matches what the user will actually see:
|
|
842
|
-
|
|
843
|
-
- \`browser\`: a web page that needs a browser chrome frame around it.
|
|
844
|
-
- \`desktop\`: a full desktop app page or app shell.
|
|
845
|
-
- \`mobile\`: a phone screen, only when the work is genuinely mobile.
|
|
846
|
-
- \`popover\`: a small floating menu, dropdown, or inline popover.
|
|
847
|
-
- \`panel\`: a side panel, inspector, or sidebar widget.
|
|
848
|
-
|
|
849
|
-
The surface locks the footprint and aspect; never set width/height/coordinates.
|
|
850
|
-
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
851
|
-
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
852
|
-
actually changes the layout. For a component or widget, show one broader
|
|
853
|
-
app-context frame only when placement affects understanding, then the focused
|
|
854
|
-
component states.
|
|
855
|
-
|
|
856
|
-
**Modify, don't redesign.** When the task changes an existing screen, reproduce
|
|
857
|
-
the current screen's real layout and footprint FIRST, then change only the delta
|
|
858
|
-
and call it out with a single annotation. Do not restack the page into a new
|
|
859
|
-
layout. For net-new surfaces, compose from the real app shell.
|
|
860
|
-
|
|
861
|
-
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
862
|
-
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
863
|
-
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
864
|
-
the whole page around it, and do not scale a duplicate up. Pick the matching
|
|
865
|
-
\`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
|
|
866
|
-
page width.
|
|
867
|
-
|
|
868
|
-
**Loading / skeleton states.** Set \`data.skeleton: true\` on the wireframe and
|
|
869
|
-
fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
|
|
870
|
-
built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
|
|
871
|
-
no labels or copy. The renderer drops borders, sketch, and color into the
|
|
872
|
-
skeleton register automatically. Never escape to a \`custom-html\` document block
|
|
873
|
-
to fake a loader, and never move a mockup out of the canvas — mockups always
|
|
874
|
-
live in canvas artboards.
|
|
875
|
-
|
|
876
|
-
**Editing an existing mockup.** To change one element, text, or color in an
|
|
877
|
-
existing html mockup, do NOT regenerate the frame — call \`update-visual-plan\`
|
|
878
|
-
with \`contentPatches: [{ op: "patch-wireframe-html", blockId, edits: [{ find,
|
|
879
|
-
replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
|
|
880
|
-
first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
|
|
881
|
-
occurrence. The result is re-sanitized.
|
|
882
|
-
|
|
883
|
-
**Canvas annotations are designer notes on the artboard.** When a top canvas is
|
|
884
|
-
present, sprinkle Figma-style notes near the frames they explain: a short
|
|
885
|
-
heading, supporting text, and bullets — plain text layers, never bordered or
|
|
886
|
-
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
887
|
-
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
888
|
-
point at one specific control or transition; for a broad frame-level note, write
|
|
889
|
-
text beside the frame with no connector. Connectors are for real sequences only —
|
|
890
|
-
never fake "Step 1 → Step 2" lines between independent states.
|
|
891
|
-
|
|
892
|
-
**Do not create overlapping annotations.** Anchor each note to the frame it
|
|
893
|
-
explains with \`targetId\` + \`placement\` (top/right/bottom/left). The renderer
|
|
894
|
-
parks notes in a gutter beside the frame and lays them out automatically — never
|
|
895
|
-
supply x/y or points for anchored notes; hand-placed coordinates fight the
|
|
896
|
-
auto-layout and cause the overlap you're trying to avoid. Reserve arrows for a
|
|
897
|
-
note that must point at a specific control inside a frame; a note that simply
|
|
898
|
-
sits beside its frame needs no arrow.
|
|
899
|
-
|
|
900
|
-
**Patching.** Edit one wireframe, canvas annotation, or block with targeted \`contentPatches\`
|
|
901
|
-
(for example \`update-block\`, \`replace-blocks\`, \`update-canvas-annotation\`) rather
|
|
902
|
-
than regenerating the whole plan. \`contentPatches\` are part of the public MCP
|
|
903
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
904
|
-
edits. If an agent is working from exported source files, use
|
|
905
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
906
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
907
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
908
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
909
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
910
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
911
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
912
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
913
|
-
|
|
914
|
-
**Never emit a titled artboard with no interior wireframe content.** Every artboard you place on the canvas must carry an \`html\` wireframe (or reference a wireframe block via \`blockId\`) — a label-only frame renders as an empty dashed box and is rejected at parse time. If you only have a title, write it as a section header or annotation, not an empty artboard.
|
|
915
|
-
|
|
916
|
-
**Fill the frame; keep labels short.** Each artboard is a fixed-size surface — compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (\`flex:1\`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column — shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).
|
|
917
|
-
|
|
918
|
-
**Good example — a contacts list, surface \`browser\`.** A small, real screen
|
|
919
|
-
composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
920
|
-
hex colors:
|
|
921
|
-
|
|
922
|
-
\`\`\`html
|
|
923
|
-
<div style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%">
|
|
924
|
-
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
925
|
-
<h1>Contacts</h1>
|
|
926
|
-
<button class="primary">New contact</button>
|
|
927
|
-
</div>
|
|
928
|
-
<div style="display:flex;gap:6px">
|
|
929
|
-
<span class="wf-pill accent">All 128</span>
|
|
930
|
-
<span class="wf-pill">Favorites</span>
|
|
931
|
-
<span class="wf-pill">Archived</span>
|
|
932
|
-
</div>
|
|
933
|
-
<div class="wf-card" style="display:flex;flex-direction:column;gap:0;padding:0">
|
|
934
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)">
|
|
935
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
936
|
-
<div style="flex:1"><strong>Jane Cooper</strong><br /><small>jane@acme.co</small></div>
|
|
937
|
-
<span class="wf-pill">Lead</span>
|
|
938
|
-
</div>
|
|
939
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
940
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
941
|
-
<div style="flex:1"><strong>Marcus Lee</strong><br /><small>marcus@globex.io</small></div>
|
|
942
|
-
<span class="wf-pill">Customer</span>
|
|
943
|
-
</div>
|
|
944
|
-
</div>
|
|
945
|
-
</div>
|
|
946
|
-
\`\`\`
|
|
947
|
-
|
|
948
|
-
**Mockups belong in the top visual review area.** Static visuals live on the
|
|
949
|
-
canvas; multi-step flows get both canvas wireframes and a prototype. When the
|
|
950
|
-
user asks for a mockup, UI state, loading state, layout, screen, or visual
|
|
951
|
-
comparison, make the canvas the primary home for that static visual. When the
|
|
952
|
-
user asks for a prototype or the plan contains a sequence the reviewer must
|
|
953
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the top surface
|
|
954
|
-
shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
|
|
955
|
-
implementation, but they should not host the primary mockup or prototype just
|
|
956
|
-
because \`custom-html\`, screenshots, or prose are easier to produce. If the
|
|
957
|
-
canvas/prototype surface cannot represent the requested fidelity, still keep the
|
|
958
|
-
closest top-surface representation and call out or extend the needed renderer
|
|
959
|
-
capability.
|
|
960
|
-
|
|
961
|
-
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
962
|
-
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
963
|
-
plans emit \`html\`. Do not author fresh kit-tree screens — write the HTML mockup
|
|
964
|
-
instead. Likewise, old or imported plans may carry coordinate-based regions or
|
|
965
|
-
free-float x/y on notes or artboards; those are legacy escape hatches the
|
|
966
|
-
renderer still shows but you must never produce. The \`surface\` drives the aspect
|
|
967
|
-
and footprint, the canvas auto-places artboards, and the gutter parks notes by
|
|
968
|
-
\`targetId\` + \`placement\`; never supply width, height, or coordinates for a new
|
|
969
|
-
plan.
|
|
970
|
-
|
|
971
|
-
<!-- SHARED-CORE:wireframe-canvas END -->
|
|
972
|
-
|
|
973
|
-
<!-- SHARED-CORE:document-quality START -->
|
|
974
|
-
|
|
975
|
-
## Document Quality Core
|
|
976
|
-
|
|
977
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
978
|
-
\`/visualize-plan\`. It is the single source of truth for the document below the
|
|
979
|
-
canvas. Do not paraphrase it per command.
|
|
984
|
+
points at. Apply changes with \`update-visual-plan\`, preferring
|
|
985
|
+
\`contentPatches\` for one frame, annotation, node, tab, or block. When the
|
|
986
|
+
user wants source-control friendly edits, use \`patch-visual-plan-source\`
|
|
987
|
+
against the MDX files instead of regenerating the plan.
|
|
980
988
|
|
|
981
|
-
|
|
982
|
-
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
983
|
-
self-contained, and specific. State the objective and what "done" means, the
|
|
984
|
-
scope and non-goals, the proposed approach with the key decisions and their
|
|
985
|
-
rationale, ordered steps that name real files, symbols, actions, and data
|
|
986
|
-
shapes, the risks, and a closing verification step (tests, build, or a checkable
|
|
987
|
-
behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
988
|
-
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
989
|
-
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
989
|
+
## Agent Handoff
|
|
990
990
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
the
|
|
995
|
-
code snippets, migration or implementation phases, risks, and validation. Repeat
|
|
996
|
-
a wireframe in the document only for a genuinely new detail view or comparison.
|
|
997
|
-
Skip the visual surface entirely for non-visual work and write a clean rich
|
|
998
|
-
document.
|
|
991
|
+
After the canvas and document, add a short handoff that names the chosen UI
|
|
992
|
+
direction, unresolved visual questions, and feedback that must be read before
|
|
993
|
+
code changes. Never claim feedback has been applied until \`get-plan-feedback\` or
|
|
994
|
+
the user has supplied it.
|
|
999
995
|
|
|
1000
|
-
|
|
1001
|
-
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
1002
|
-
— it returns the live registry vocabulary (type, MDX tag, placement, key fields)
|
|
1003
|
-
so you never emit a block the editor cannot render or round-trip:
|
|
996
|
+
## Wireframe & Canvas Core
|
|
1004
997
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
- \`decision\` for two or three option cards with consequences. These are static
|
|
1011
|
-
records; do not style them like clickable tabs or chips unless the renderer
|
|
1012
|
-
truly supports changing the selection.
|
|
1013
|
-
- \`diagram\` for architecture, sequence, data-flow, dependency, or state
|
|
1014
|
-
relationships, only when it clarifies something real. Labels must not overlap
|
|
1015
|
-
nodes, connectors, or each other.
|
|
1016
|
-
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1017
|
-
only prose usually means the plan is under-specified — include a relevant
|
|
1018
|
-
visual unless the tab is intentionally document-only.
|
|
1019
|
-
- \`table\`, \`checklist\`, \`callout\` for scannable structure.
|
|
998
|
+
This section is shared by \`/visual-plan\` and \`/ui-plan\`, and is the single
|
|
999
|
+
source of truth for how wireframes and the canvas work. The wireframe-quality
|
|
1000
|
+
rules below are additionally shared, word for word, with \`/visual-recap\`; the
|
|
1001
|
+
canvas/artboard mechanics apply only to \`/visual-plan\` and \`/ui-plan\`. Do not
|
|
1002
|
+
paraphrase any of it per command.
|
|
1020
1003
|
|
|
1021
|
-
|
|
1022
|
-
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1023
|
-
block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
|
|
1024
|
-
\`freeform\` for constraints, \`recommended: true\` for the default you would pick,
|
|
1025
|
-
and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
|
|
1026
|
-
Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
|
|
1027
|
-
relevant section. Never bury a questions/decisions wall inside the plan
|
|
1028
|
-
narrative.
|
|
1004
|
+
${WIREFRAME_QUALITY_CORE}
|
|
1029
1005
|
|
|
1030
|
-
|
|
1031
|
-
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1032
|
-
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1033
|
-
blocks for normal plans. It may support supplemental demos or references, but it
|
|
1034
|
-
is never the primary home for a requested mockup, UI state, or visual
|
|
1035
|
-
comparison. If fidelity requires HTML/CSS, image capture, or real React/CSS, the
|
|
1036
|
-
product fix is canvas support for that artifact type, not moving the mockup into
|
|
1037
|
-
the document.
|
|
1006
|
+
${CANVAS_SURFACE_CORE}
|
|
1038
1007
|
|
|
1039
|
-
|
|
1040
|
-
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
1041
|
-
unreadable diagrams before asking for approval.
|
|
1008
|
+
## Document Quality Core
|
|
1042
1009
|
|
|
1043
|
-
|
|
1010
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
1011
|
+
the single source of truth for the document below the canvas. Do not paraphrase
|
|
1012
|
+
it per command.
|
|
1044
1013
|
|
|
1045
|
-
|
|
1014
|
+
${DOCUMENT_QUALITY_CORE}
|
|
1046
1015
|
|
|
1047
1016
|
## Good vs. Bad Exemplar
|
|
1048
1017
|
|
|
1049
|
-
|
|
1050
|
-
\`data.html\` is a real flex layout — a sidebar of links (\`Inbox 12\`, \`Today 4\`,
|
|
1051
|
-
\`Done\`), a main column with an \`<h1>Today</h1>\`, accent \`.wf-pill\`s for the
|
|
1052
|
-
filters, a muted section label \`OVERDUE\`, and \`.wf-card\` task rows carrying real
|
|
1053
|
-
titles, due dates, and a primary \`button.primary\` — styled only through bare
|
|
1054
|
-
elements, helper classes, and \`--wf-*\` tokens, so the renderer applies the
|
|
1055
|
-
correct desktop footprint, theme, and one subtle whole-frame wobble. Plain-text
|
|
1056
|
-
designer notes sit spaced off the frame, pointing only at the controls that need
|
|
1057
|
-
explanation. Below it, a Claude/Codex-grade document: objective and
|
|
1058
|
-
done-criteria, an \`implementation-map\` naming the real components and actions
|
|
1059
|
-
with short highlighted snippets, a \`decision\` card weighing two real approaches,
|
|
1060
|
-
and a validation step — none of it repeating the canvas. If the task also
|
|
1061
|
-
changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
1062
|
-
whose screens use the same labels and states as the canvas artboards, with
|
|
1063
|
-
\`data-goto\` controls for the sequence. This is the bar.
|
|
1064
|
-
|
|
1065
|
-
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1066
|
-
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1067
|
-
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
1068
|
-
annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
1069
|
-
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1070
|
-
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1071
|
-
document with a hero heading and value props that just restates what the canvas
|
|
1072
|
-
already shows. Never produce this.
|
|
1073
|
-
|
|
1074
|
-
<!-- SHARED-CORE:exemplar END -->
|
|
1018
|
+
${EXEMPLAR_CORE}
|
|
1075
1019
|
|
|
1076
1020
|
## Tool Guidance
|
|
1077
1021
|
|
|
@@ -1115,8 +1059,9 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
1115
1059
|
agent-native skills add visual-plan
|
|
1116
1060
|
\`\`\`
|
|
1117
1061
|
|
|
1118
|
-
After that, \`/visual-plan\` (and \`/
|
|
1119
|
-
\`/
|
|
1062
|
+
After that, \`/visual-plan\` (and \`/visual-recap\`, \`/ui-plan\`,
|
|
1063
|
+
\`/prototype-plan\`, \`/plan-design\`, \`/visual-questions\`) generate a plan and open
|
|
1064
|
+
the editor. Pass \`--no-connect\` to
|
|
1120
1065
|
register the connector without authenticating, then run
|
|
1121
1066
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1122
1067
|
|
|
@@ -1170,9 +1115,9 @@ and operate UI states, needs design review before code, wants comments pinned to
|
|
|
1170
1115
|
live screens, or asks to move a visual plan into a prototype.
|
|
1171
1116
|
|
|
1172
1117
|
Prefer \`/visual-plan\` for architecture, data flow, or non-interactive planning.
|
|
1173
|
-
Prefer \`/ui-plan\` when static screen review is enough. Use \`/
|
|
1174
|
-
|
|
1175
|
-
|
|
1118
|
+
Prefer \`/ui-plan\` when static screen review is enough. Use \`/visual-plan\` first
|
|
1119
|
+
when the user hands you an existing Markdown/Codex/Claude plan that needs a
|
|
1120
|
+
visual companion before becoming interactive.
|
|
1176
1121
|
|
|
1177
1122
|
## Core Workflow
|
|
1178
1123
|
|
|
@@ -1288,665 +1233,483 @@ Runtime JSON is canonical. Source export uses:
|
|
|
1288
1233
|
- \`canvas.mdx\` for static mocks when a canvas is present
|
|
1289
1234
|
- \`.plan-state.json\` for persisted viewport state
|
|
1290
1235
|
|
|
1291
|
-
Patch source with \`patch-visual-plan-source\` only when the user wants
|
|
1292
|
-
source-control friendly edits. Patch runtime content when the user is simply
|
|
1293
|
-
reviewing and iterating.
|
|
1294
|
-
|
|
1295
|
-
## Related Skills
|
|
1296
|
-
|
|
1297
|
-
- \`visual-plan\`
|
|
1298
|
-
- \`ui-plan\`
|
|
1299
|
-
- \`visualize-plan\`
|
|
1300
|
-
- \`visual-questions\`
|
|
1301
|
-
`;
|
|
1302
|
-
export const PLAN_DESIGN_SKILL_MD = [
|
|
1303
|
-
"---",
|
|
1304
|
-
"name: plan-design",
|
|
1305
|
-
"description: >-",
|
|
1306
|
-
" Use Agent-Native Plans for full-fidelity UI design planning with a Design",
|
|
1307
|
-
" canvas tab and optional interactive Prototype tab before implementation.",
|
|
1308
|
-
"metadata:",
|
|
1309
|
-
" visibility: exported",
|
|
1310
|
-
"---",
|
|
1311
|
-
"",
|
|
1312
|
-
"# Plan Design",
|
|
1313
|
-
"",
|
|
1314
|
-
"Use `/plan-design` when the user needs a high-fidelity product design before",
|
|
1315
|
-
"implementation: polished branded screens, realistic content, visual direction,",
|
|
1316
|
-
"and interaction review. It is the full-fidelity companion to `/visual-plan` and",
|
|
1317
|
-
"`/prototype-plan`: the top review surface should show `Design` and, when the",
|
|
1318
|
-
"flow needs interaction, `Prototype`.",
|
|
1319
|
-
"",
|
|
1320
|
-
"## When To Use",
|
|
1321
|
-
"",
|
|
1322
|
-
"Use this for UI-heavy work where brand, visual hierarchy, polished layout, or",
|
|
1323
|
-
"interaction feel are material to the decision. Skip it for small copy, spacing,",
|
|
1324
|
-
"or obvious component changes.",
|
|
1325
|
-
"",
|
|
1326
|
-
"## Research First",
|
|
1327
|
-
"",
|
|
1328
|
-
"Before creating the plan:",
|
|
1329
|
-
"",
|
|
1330
|
-
"1. Inspect the real app shell, routes, components, CSS variables, Tailwind",
|
|
1331
|
-
" tokens, theme files, and any relevant screenshots.",
|
|
1332
|
-
"2. If `design.md` exists, treat it as the primary design brief and pass its",
|
|
1333
|
-
" important content into `create-plan-design.designMd`.",
|
|
1334
|
-
"3. If a `.fig` local-copy file or parsed brand kit is available, use the",
|
|
1335
|
-
" Design/brand-kit parsing actions from the app or shared tooling first, then",
|
|
1336
|
-
" pass the extracted token summary into `brandKit`.",
|
|
1337
|
-
"4. Parse existing codebase style info when possible: CSS custom properties,",
|
|
1338
|
-
" Tailwind config, global CSS, font declarations, spacing/radius tokens, and",
|
|
1339
|
-
" component conventions. Pass the compact evidence into `codebaseStyles`.",
|
|
1340
|
-
"5. Ground every screen in actual product content. Avoid lorem ipsum, generic",
|
|
1341
|
-
" marketing filler, and placeholder gray boxes unless designing an explicit",
|
|
1342
|
-
" loading state.",
|
|
1343
|
-
"",
|
|
1344
|
-
"## Create The Plan",
|
|
1345
|
-
"",
|
|
1346
|
-
"Call `create-plan-design` with:",
|
|
1347
|
-
"",
|
|
1348
|
-
"- `title`, `brief`, `repoPath`, and any `implementationNotes`.",
|
|
1349
|
-
"- `designMd`, `brandKit`, `codebaseStyles`, or `designNotes` when available.",
|
|
1350
|
-
"- `screens`: one to six full-fidelity HTML/CSS screen fragments. Each screen",
|
|
1351
|
-
" must include a bounded `html` fragment, optional scoped `css`, a `surface`,",
|
|
1352
|
-
" and stable `data-design-id` attributes on elements a reviewer might edit.",
|
|
1353
|
-
"- `transitions` only when the Prototype tab should support true screen/step",
|
|
1354
|
-
' navigation. Use `data-goto="screen-id"` in the screen HTML for those controls.',
|
|
1355
|
-
"",
|
|
1356
|
-
"The Design tab is the visual source of truth. The Prototype tab is for behavior",
|
|
1357
|
-
"and should reuse the same visual styling where practical. Do not create a",
|
|
1358
|
-
"separate design direction in the prototype.",
|
|
1359
|
-
"",
|
|
1360
|
-
"## Full-Fidelity HTML Rules",
|
|
1361
|
-
"",
|
|
1362
|
-
"- Write bounded fragments only: no `<html>`, `<head>`, `<body>`, `<script>`,",
|
|
1363
|
-
" `<style>`, external imports, iframes, SVG, or executable URLs.",
|
|
1364
|
-
"- Put CSS in the screen `css` field. The renderer scopes it to the artboard.",
|
|
1365
|
-
"- Use real CSS and CSS variables. Tailwind-like class names are fine only when",
|
|
1366
|
-
" the provided `css` defines them or the classes are harmless semantic hooks.",
|
|
1367
|
-
'- Use `renderMode: "design"` on design screen data when authoring full',
|
|
1368
|
-
" structured content directly.",
|
|
1369
|
-
'- Add `data-design-id="meaningful-name"` to editable elements such as hero',
|
|
1370
|
-
" panels, key buttons, cards, nav items, pricing rows, chart panels, and state",
|
|
1371
|
-
" chips. Keep ids stable and descriptive.",
|
|
1372
|
-
"- Keep the design responsive within the selected surface. Text must not clip,",
|
|
1373
|
-
" overlap, or rely on viewport-sized type.",
|
|
1374
|
-
"",
|
|
1375
|
-
"## Targeted Style Edits",
|
|
1376
|
-
"",
|
|
1377
|
-
"When a reviewer selects an element in the Design tab or asks for a specific",
|
|
1378
|
-
"style change, avoid regenerating the whole plan. Use:",
|
|
1379
|
-
"",
|
|
1380
|
-
"```json",
|
|
1381
|
-
"{",
|
|
1382
|
-
' "op": "update-design-element-style",',
|
|
1383
|
-
' "frameId": "frame-overview",',
|
|
1384
|
-
' "elementId": "primary-cta",',
|
|
1385
|
-
' "styles": {',
|
|
1386
|
-
' "background-color": "#0f766e",',
|
|
1387
|
-
' "border-radius": "10px"',
|
|
1388
|
-
" }",
|
|
1389
|
-
"}",
|
|
1390
|
-
"```",
|
|
1391
|
-
"",
|
|
1392
|
-
"Use `frameId` for inline canvas designs or `blockId` for a referenced wireframe",
|
|
1393
|
-
"block. Set a style value to `null` to remove it. Use `patch-wireframe-html` or",
|
|
1394
|
-
"`patch-prototype-html` for text/content changes inside a fragment.",
|
|
1395
|
-
"",
|
|
1396
|
-
"## Document Handoff",
|
|
1397
|
-
"",
|
|
1398
|
-
"Below the visual surface, keep the document concise and implementation-oriented:",
|
|
1399
|
-
"actual files and symbols, state/actions/contracts, open questions, risks, and",
|
|
1400
|
-
"verification. The document should not repeat the same screens in prose.",
|
|
1401
|
-
"",
|
|
1402
|
-
"Before implementation, call `get-plan-feedback` and treat comments, selected",
|
|
1403
|
-
"element details, and recent review events as the source of truth.",
|
|
1404
|
-
"",
|
|
1405
|
-
"## Related Skills",
|
|
1406
|
-
"",
|
|
1407
|
-
"- `visual-plan`",
|
|
1408
|
-
"- `ui-plan`",
|
|
1409
|
-
"- `prototype-plan`",
|
|
1410
|
-
"- `frontend-design`",
|
|
1411
|
-
].join("\n") + "\n";
|
|
1412
|
-
export const VISUAL_QUESTIONS_SKILL_MD = `---
|
|
1413
|
-
name: visual-questions
|
|
1414
|
-
description: >-
|
|
1415
|
-
Use Agent-Native Plans to ask rich visual intake questions when
|
|
1416
|
-
/visual-questions is explicitly requested before creating a UI plan or visual
|
|
1417
|
-
plan.
|
|
1418
|
-
metadata:
|
|
1419
|
-
visibility: both
|
|
1420
|
-
---
|
|
1421
|
-
|
|
1422
|
-
# Visual Questions
|
|
1423
|
-
|
|
1424
|
-
Use \`/visual-questions\` when the next best step is not a plan yet, but a
|
|
1425
|
-
reviewable visual intake: single-choice chips, multi-select chips, freeform
|
|
1426
|
-
notes, mockup choices, sketch diagrams, and a generated answer summary that feeds
|
|
1427
|
-
the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
1428
|
-
\`/prototype-plan\`, \`/plan-design\`, and \`/visualize-plan\`.
|
|
1429
|
-
|
|
1430
|
-
## When To Use
|
|
1431
|
-
|
|
1432
|
-
- The user asks to be shown options before the agent writes a plan.
|
|
1433
|
-
- UI direction, form factor, layout model, feature set, or visual style is fuzzy
|
|
1434
|
-
enough that 2-6 answers would materially change the plan.
|
|
1435
|
-
- The user would benefit from choosing between visual mockups or diagrams rather
|
|
1436
|
-
than answering text-only prompts.
|
|
1437
|
-
|
|
1438
|
-
Gate hard: skip this for tiny, unambiguous changes. If the agent can reasonably
|
|
1439
|
-
infer the answer, prefer \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`, or
|
|
1440
|
-
\`/visual-plan\` directly and put assumptions in the plan.
|
|
1441
|
-
|
|
1442
|
-
Visual questions are an explicit intake command, not an automatic preflight for
|
|
1443
|
-
\`/visual-plan\`, \`/ui-plan\`, \`/prototype-plan\`, or \`/plan-design\`.
|
|
1444
|
-
|
|
1445
|
-
## Workflow
|
|
1446
|
-
|
|
1447
|
-
1. Call \`create-visual-questions\` with a clear title, brief, source, and repo
|
|
1448
|
-
path when known.
|
|
1449
|
-
2. Omit \`questions\` for the default UI intake. Provide a custom \`questions\` array
|
|
1450
|
-
only when the task has domain-specific choices.
|
|
1451
|
-
3. Surface the returned Plans link and ask the user to answer visually.
|
|
1452
|
-
4. The generated summary drives the next step: \`create-ui-plan\` for static UI
|
|
1453
|
-
review, \`create-prototype-plan\` for click-through UI flows,
|
|
1454
|
-
\`create-plan-design\` for high-fidelity branded UI review,
|
|
1455
|
-
\`create-visual-plan\` for general plans, \`visualize-plan\` when a text plan
|
|
1456
|
-
already exists, or \`update-visual-plan\` with targeted \`contentPatches\` to
|
|
1457
|
-
fold answers into an active plan.
|
|
1458
|
-
5. If the user leaves comments, call \`get-plan-feedback\` before using the answers.
|
|
1459
|
-
|
|
1460
|
-
## Question Types
|
|
1461
|
-
|
|
1462
|
-
Supported \`questions\` entries:
|
|
1463
|
-
|
|
1464
|
-
- \`single\`: chip group where one option wins.
|
|
1465
|
-
- \`multi\`: chip group where multiple options can be selected.
|
|
1466
|
-
- \`freeform\`: textarea for constraints, inspirations, or things to avoid.
|
|
1467
|
-
- \`visual\`: visual options with sketch previews — use for layout direction, flow
|
|
1468
|
-
depth, surface choice, or diagram choices.
|
|
1469
|
-
|
|
1470
|
-
Each option can include \`label\`, \`value\`, \`description\`, \`recommended\`,
|
|
1471
|
-
\`preview\`, and \`bullets\`. Valid \`preview\` values match the wireframe surfaces:
|
|
1472
|
-
\`desktop\`, \`mobile\`, \`popover\`, \`panel\`, \`component\`, \`split\`, \`flow\`, and
|
|
1473
|
-
\`diagram\`. Pick the preview that matches the real footprint — do not offer a
|
|
1474
|
-
desktop/mobile pair for a popover, panel, or component.
|
|
1475
|
-
|
|
1476
|
-
## Quality Bar
|
|
1477
|
-
|
|
1478
|
-
- Ask only decision-changing questions. A beautiful form with low-value questions
|
|
1479
|
-
is still friction.
|
|
1480
|
-
- Prefer visible, answerable options over abstract prose.
|
|
1481
|
-
- Use visual tabs when users need to compare layout or flow shapes.
|
|
1482
|
-
- Keep the output calm and document-like, not a landing page.
|
|
1483
|
-
- The generated answer summary is not the final plan; it is the intake prompt for
|
|
1484
|
-
the next agent step.
|
|
1485
|
-
|
|
1486
|
-
## Tool Guidance
|
|
1487
|
-
|
|
1488
|
-
- \`create-visual-questions\`: create the interactive intake plan.
|
|
1489
|
-
- \`get-visual-plan\`: inspect the current visual question plan.
|
|
1490
|
-
- \`get-plan-feedback\`: read comments before creating or updating the next plan.
|
|
1491
|
-
- \`create-ui-plan\`: create a UI-first plan from the answers.
|
|
1492
|
-
- \`create-prototype-plan\`: create a prototype-first plan from the answers when
|
|
1493
|
-
interaction feel matters.
|
|
1494
|
-
- \`create-plan-design\`: create a high-fidelity branded design plan from the
|
|
1495
|
-
answers when visual polish is the primary review input.
|
|
1496
|
-
- \`create-visual-plan\`: create a general visual plan from the answers.
|
|
1497
|
-
- \`visualize-plan\`: enrich an existing text plan after answers are gathered.
|
|
1498
|
-
- \`export-visual-plan\`: export answer plans as HTML, Markdown fallback,
|
|
1499
|
-
structured JSON, and MDX files when the intake needs to be checked into a repo.
|
|
1500
|
-
- \`read-visual-plan-source\` / \`patch-visual-plan-source\`: inspect or patch the
|
|
1501
|
-
MDX source if another agent is operating from checked-in plan files.
|
|
1502
|
-
|
|
1503
|
-
## Setup & Authentication
|
|
1504
|
-
|
|
1505
|
-
There are two ways into Plans.
|
|
1506
|
-
|
|
1507
|
-
**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
|
|
1508
|
-
installs the Plans skills, registers the hosted Plans MCP connector, and
|
|
1509
|
-
authenticates it in the same step (a one-time browser sign-in at setup — this is
|
|
1510
|
-
intended), so the first tool call does not hit an OAuth wall:
|
|
1511
|
-
|
|
1512
|
-
\`\`\`bash
|
|
1513
|
-
agent-native skills add visual-plan
|
|
1514
|
-
\`\`\`
|
|
1515
|
-
|
|
1516
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1517
|
-
\`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1518
|
-
register the connector without authenticating, then run
|
|
1519
|
-
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1520
|
-
|
|
1521
|
-
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
1522
|
-
with no sign-up — you work as a guest. Sign in only when you want to save or
|
|
1523
|
-
share; signing in claims the plans you made as a guest into your account.
|
|
1524
|
-
|
|
1525
|
-
Sharing and commenting require an account: public/shared plans are viewable by
|
|
1526
|
-
anyone with the link, but commenting on them needs an agent-native account.
|
|
1527
|
-
|
|
1528
|
-
For fully offline, no-account use, run the Plans app locally and sync plans to
|
|
1529
|
-
your repo as MDX. This local mode is a separate advanced path, not the default
|
|
1530
|
-
hosted flow.
|
|
1531
|
-
|
|
1532
|
-
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`,
|
|
1533
|
-
do not keep retrying the tool. Authenticate the connector with
|
|
1534
|
-
\`agent-native connect https://plan.agent-native.com\` (OAuth-capable hosts can
|
|
1535
|
-
instead re-run /mcp and choose Authenticate), then continue once the connector
|
|
1536
|
-
is available.
|
|
1537
|
-
|
|
1538
|
-
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
1539
|
-
not put shared secrets in skill files.
|
|
1540
|
-
`;
|
|
1541
|
-
export const VISUALIZE_PLAN_SKILL_MD = `---
|
|
1542
|
-
name: visualize-plan
|
|
1543
|
-
description: >-
|
|
1544
|
-
Convert an existing Codex, Claude Code, Markdown, or pasted plan into an
|
|
1545
|
-
Agent-Native Plans visual companion with diagrams, wireframes, prototypes,
|
|
1546
|
-
annotations, and feedback.
|
|
1547
|
-
metadata:
|
|
1548
|
-
visibility: exported
|
|
1549
|
-
---
|
|
1550
|
-
|
|
1551
|
-
# Visualize Plan
|
|
1552
|
-
|
|
1553
|
-
Use \`/visualize-plan\` when a plan already exists and the user wants it easier to
|
|
1554
|
-
review. The native Codex or Claude Code plan can stay where it is; Agent-Native
|
|
1555
|
-
Plans creates a structured visual companion beside it — diagrams, wireframes,
|
|
1556
|
-
state sketches, functional prototypes, option cards, and comment prompts instead
|
|
1557
|
-
of a wall of text. It still reads like a plan, not a marketing page.
|
|
1558
|
-
|
|
1559
|
-
Use \`/prototype-plan\` instead when the user wants a functional prototype as the first
|
|
1560
|
-
artifact and there is no text plan to preserve. When a text plan already exists,
|
|
1561
|
-
\`/visualize-plan\` should decide whether it needs no visual surface, canvas only,
|
|
1562
|
-
or canvas + prototype; call \`convert-visual-plan-to-prototype\` after
|
|
1563
|
-
visualization when its HTML wireframes should drive a prototype review.
|
|
1564
|
-
|
|
1565
|
-
## Plan Discipline
|
|
1566
|
-
|
|
1567
|
-
- **Gate hard.** A visual companion is worth it only when the source plan is
|
|
1568
|
-
long, risky, or hard to react to as text. If the source plan is for trivial,
|
|
1569
|
-
unambiguous work, skip the companion and just implement.
|
|
1570
|
-
- **Stay grounded and read-only.** Preserve the source plan's intent, do not
|
|
1571
|
-
invent codebase facts, and label anything inferred as inferred. Make no source
|
|
1572
|
-
edits while building or reviewing the companion.
|
|
1573
|
-
- **The companion is the approval gate.** Ask the user to review and approve the
|
|
1574
|
-
direction before you write code, and name which files/areas the work touches.
|
|
1575
|
-
Carry answerable unresolved assumptions and open questions into a bottom
|
|
1576
|
-
\`question-form\` block instead of guessing silently.
|
|
1577
|
-
|
|
1578
|
-
## Workflow
|
|
1579
|
-
|
|
1580
|
-
1. Gather the existing plan text from the user's paste, a referenced file, or
|
|
1581
|
-
recent visible agent context. Do not invent the source plan. If no plan text
|
|
1582
|
-
exists and the work is UI-heavy, use \`/ui-plan\` or \`/prototype-plan\` instead.
|
|
1583
|
-
2. Call \`visualize-plan\` with \`planText\`, \`title\`, \`brief\`, \`source\`, and
|
|
1584
|
-
\`repoPath\` when available.
|
|
1585
|
-
3. Surface the returned Plans link or inline MCP App.
|
|
1586
|
-
4. Decide the top visual surface with the rules below, then enrich the import
|
|
1587
|
-
with \`update-visual-plan\` (prefer targeted \`contentPatches\`): add canvas
|
|
1588
|
-
wireframes for user-visible UI, add \`content.prototype\` for multi-step flows,
|
|
1589
|
-
add diagrams for architecture or data flow, add option cards for real
|
|
1590
|
-
tradeoffs, and add explicit open questions. Apply the two cores below — the
|
|
1591
|
-
companion must meet the same quality bar as a fresh plan, not be a thinner
|
|
1592
|
-
ruleset. Label inferred visuals as inferred. When the user wants
|
|
1593
|
-
source-control friendly edits, use \`patch-visual-plan-source\` against the MDX
|
|
1594
|
-
files instead of regenerating the plan. If the user asks to make the visual
|
|
1595
|
-
companion functional and the canvas contains HTML wireframes, call
|
|
1596
|
-
\`convert-visual-plan-to-prototype\`.
|
|
1597
|
-
5. Ask the user to react, then call \`get-plan-feedback\` before implementing,
|
|
1598
|
-
after review, and before the final response.
|
|
1599
|
-
6. Treat imported text as source material. The structured visual plan and
|
|
1600
|
-
comments are the review surface; HTML is the export receipt. Do not replace a
|
|
1601
|
-
native plan unless the user asks.
|
|
1602
|
-
|
|
1603
|
-
## Visual Surface Choice
|
|
1604
|
-
|
|
1605
|
-
Choose the surface after reading the source plan and before enriching it. Do not
|
|
1606
|
-
add visual chrome by default:
|
|
1607
|
-
|
|
1608
|
-
- **No visual surface** when the imported plan is architecture-only,
|
|
1609
|
-
backend-only, data migration, copy-only, or otherwise non-visual. Keep the
|
|
1610
|
-
companion as a strong document and add diagrams only when relationships need a
|
|
1611
|
-
visual explanation.
|
|
1612
|
-
- **Canvas only** when the source plan includes one static screen, a before/after
|
|
1613
|
-
comparison, a component state, a small popover, or a visual direction that does
|
|
1614
|
-
not require clicking. Put those wireframes in \`content.canvas\` and omit
|
|
1615
|
-
\`content.prototype\`.
|
|
1616
|
-
- **Canvas + prototype** when the source plan describes a multi-step UI flow,
|
|
1617
|
-
meaningful interactive app behavior, onboarding, wizard, review/approval flow,
|
|
1618
|
-
navigation change, or any sequence the reviewer needs to operate. Keep the
|
|
1619
|
-
static wireframes in
|
|
1620
|
-
\`content.canvas\`, add the aligned functional prototype in
|
|
1621
|
-
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
1622
|
-
- **Prototype-first conversion** when an already-visualized plan's HTML
|
|
1623
|
-
wireframes should become functional. Use \`convert-visual-plan-to-prototype\` for
|
|
1624
|
-
an existing canvas, or \`update-visual-plan\` with \`set-prototype\` when the
|
|
1625
|
-
imported plan needs a hand-authored prototype that does not map cleanly from
|
|
1626
|
-
the canvas. Keep static mocks unless the user explicitly asks to remove them.
|
|
1627
|
-
|
|
1628
|
-
For mixed canvas + prototype companions, reuse the same real labels, states, and
|
|
1629
|
-
screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
1630
|
-
the prototype is the interactive version of that same flow, not a separate
|
|
1631
|
-
design direction. If the imported plan only has text, add HTML wireframes before
|
|
1632
|
-
calling \`convert-visual-plan-to-prototype\`; never convert a diagram-only or
|
|
1633
|
-
empty canvas into a fake prototype.
|
|
1634
|
-
|
|
1635
|
-
<!-- SHARED-CORE:wireframe-canvas START -->
|
|
1636
|
-
|
|
1637
|
-
## Wireframe & Canvas Core
|
|
1638
|
-
|
|
1639
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
1640
|
-
\`/visualize-plan\`. It is the single source of truth for how wireframes and the
|
|
1641
|
-
canvas work. Do not paraphrase it per command.
|
|
1642
|
-
|
|
1643
|
-
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
1644
|
-
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
1645
|
-
screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
|
|
1646
|
-
the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
|
|
1647
|
-
never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags, font-family, hex colors,
|
|
1648
|
-
or any width/height/coordinates. You write real HTML layout and real product
|
|
1649
|
-
content; the renderer styles and roughens it.
|
|
1650
|
-
|
|
1651
|
-
**A wireframe block's data is an HTML screen plus a surface:**
|
|
1652
|
-
|
|
1653
|
-
\`\`\`json
|
|
1654
|
-
{
|
|
1655
|
-
"surface": "browser",
|
|
1656
|
-
"html": "<div style=\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\"><h1>Sign in</h1><p class=\\"wf-muted\\">Use your work email to continue.</p><div class=\\"wf-card\\" style=\\"display:flex;flex-direction:column;gap:10px\\"><label>Email<input value=\\"jane@acme.co\\" /></label><label>Password<input value=\\"••••••••\\" /></label><label style=\\"display:flex;align-items:center;gap:8px\\"><input type=\\"checkbox\\" checked /> Remember me</label><button class=\\"primary\\">Sign in</button></div><a href=\\"#\\">Forgot password?</a></div>"
|
|
1657
|
-
}
|
|
1658
|
-
\`\`\`
|
|
1659
|
-
|
|
1660
|
-
**Write PLAIN semantic HTML and let the renderer style it.** Bare elements
|
|
1661
|
-
(\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
|
|
1662
|
-
are auto-themed — no classes needed. Helper classes carry the rest:
|
|
1663
|
-
|
|
1664
|
-
- \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
|
|
1665
|
-
- \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
|
|
1666
|
-
(\`<span class="wf-pill accent">\`) for the accent-filled variant.
|
|
1667
|
-
- \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
|
|
1668
|
-
- \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
|
|
1669
|
-
primary button.
|
|
1670
|
-
|
|
1671
|
-
**Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
|
|
1672
|
-
these on light/dark, so reading them is what keeps a mockup correct in both
|
|
1673
|
-
themes. For any inline border, background, or text color, reference a token:
|
|
1674
|
-
\`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
|
|
1675
|
-
\`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
|
|
1676
|
-
(page background), \`--wf-card\` (raised surface), \`--wf-accent\` /
|
|
1677
|
-
\`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
|
|
1678
|
-
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
1679
|
-
renderer owns the sketch/clean font.
|
|
1680
|
-
|
|
1681
|
-
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
1682
|
-
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
1683
|
-
renderer never repositions anything. Compose the actual product: reproduce the
|
|
1684
|
-
current screen, then show the modification. Real labels, real counts, real dates,
|
|
1685
|
-
real button text grounded in the screen you read; not lorem or gray bars.
|
|
1236
|
+
Patch source with \`patch-visual-plan-source\` only when the user wants
|
|
1237
|
+
source-control friendly edits. Patch runtime content when the user is simply
|
|
1238
|
+
reviewing and iterating.
|
|
1686
1239
|
|
|
1687
|
-
|
|
1688
|
-
Pick the \`surface\` that matches what the user will actually see:
|
|
1240
|
+
## Related Skills
|
|
1689
1241
|
|
|
1690
|
-
- \`
|
|
1691
|
-
- \`
|
|
1692
|
-
- \`
|
|
1693
|
-
|
|
1694
|
-
|
|
1242
|
+
- \`visual-plan\`
|
|
1243
|
+
- \`ui-plan\`
|
|
1244
|
+
- \`visual-questions\`
|
|
1245
|
+
`;
|
|
1246
|
+
export const PLAN_DESIGN_SKILL_MD = `---
|
|
1247
|
+
name: plan-design
|
|
1248
|
+
description: >-
|
|
1249
|
+
Use Agent-Native Plans for full-fidelity UI design planning with a Design
|
|
1250
|
+
canvas tab and optional interactive Prototype tab before implementation.
|
|
1251
|
+
metadata:
|
|
1252
|
+
visibility: exported
|
|
1253
|
+
---
|
|
1695
1254
|
|
|
1696
|
-
|
|
1697
|
-
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
1698
|
-
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
1699
|
-
actually changes the layout. For a component or widget, show one broader
|
|
1700
|
-
app-context frame only when placement affects understanding, then the focused
|
|
1701
|
-
component states.
|
|
1255
|
+
# Plan Design
|
|
1702
1256
|
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
and
|
|
1706
|
-
|
|
1257
|
+
Use \`/plan-design\` when the user needs a high-fidelity product design before
|
|
1258
|
+
implementation: polished branded screens, realistic content, visual direction,
|
|
1259
|
+
and interaction review. It is the full-fidelity companion to \`/visual-plan\` and
|
|
1260
|
+
\`/prototype-plan\`: the top review surface should show \`Design\` and, when the
|
|
1261
|
+
flow needs interaction, \`Prototype\`.
|
|
1707
1262
|
|
|
1708
|
-
|
|
1709
|
-
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
1710
|
-
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
1711
|
-
the whole page around it, and do not scale a duplicate up. Pick the matching
|
|
1712
|
-
\`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
|
|
1713
|
-
page width.
|
|
1263
|
+
## When To Use
|
|
1714
1264
|
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1265
|
+
Use this for UI-heavy work where brand, visual hierarchy, polished layout, or
|
|
1266
|
+
interaction feel are material to the decision. Skip it for small copy, spacing,
|
|
1267
|
+
or obvious component changes.
|
|
1268
|
+
|
|
1269
|
+
## Research First
|
|
1270
|
+
|
|
1271
|
+
Before creating the plan:
|
|
1272
|
+
|
|
1273
|
+
1. Inspect the real app shell, routes, components, CSS variables, Tailwind
|
|
1274
|
+
tokens, theme files, and any relevant screenshots.
|
|
1275
|
+
2. If \`design.md\` exists, treat it as the primary design brief and pass its
|
|
1276
|
+
important content into \`create-plan-design.designMd\`.
|
|
1277
|
+
3. If a \`.fig\` local-copy file or parsed brand kit is available, use the
|
|
1278
|
+
Design/brand-kit parsing actions from the app or shared tooling first, then
|
|
1279
|
+
pass the extracted token summary into \`brandKit\`.
|
|
1280
|
+
4. Parse existing codebase style info when possible: CSS custom properties,
|
|
1281
|
+
Tailwind config, global CSS, font declarations, spacing/radius tokens, and
|
|
1282
|
+
component conventions. Pass the compact evidence into \`codebaseStyles\`.
|
|
1283
|
+
5. Ground every screen in actual product content. Avoid lorem ipsum, generic
|
|
1284
|
+
marketing filler, and placeholder gray boxes unless designing an explicit
|
|
1285
|
+
loading state.
|
|
1286
|
+
|
|
1287
|
+
## Create The Plan
|
|
1288
|
+
|
|
1289
|
+
Call \`create-plan-design\` with:
|
|
1290
|
+
|
|
1291
|
+
- \`title\`, \`brief\`, \`repoPath\`, and any \`implementationNotes\`.
|
|
1292
|
+
- \`designMd\`, \`brandKit\`, \`codebaseStyles\`, or \`designNotes\` when available.
|
|
1293
|
+
- \`screens\`: one to six full-fidelity HTML/CSS screen fragments. Each screen
|
|
1294
|
+
must include a bounded \`html\` fragment, optional scoped \`css\`, a \`surface\`,
|
|
1295
|
+
and stable \`data-design-id\` attributes on elements a reviewer might edit.
|
|
1296
|
+
- \`transitions\` only when the Prototype tab should support true screen/step
|
|
1297
|
+
navigation. Use \`data-goto="screen-id"\` in the screen HTML for those controls.
|
|
1298
|
+
|
|
1299
|
+
The Design tab is the visual source of truth. The Prototype tab is for behavior
|
|
1300
|
+
and should reuse the same visual styling where practical. Do not create a
|
|
1301
|
+
separate design direction in the prototype.
|
|
1302
|
+
|
|
1303
|
+
## Full-Fidelity HTML Rules
|
|
1304
|
+
|
|
1305
|
+
- Write bounded fragments only: no \`<html>\`, \`<head>\`, \`<body>\`, \`<script>\`,
|
|
1306
|
+
\`<style>\`, external imports, iframes, SVG, or executable URLs.
|
|
1307
|
+
- Put CSS in the screen \`css\` field. The renderer scopes it to the artboard.
|
|
1308
|
+
- Use real CSS and CSS variables. Tailwind-like class names are fine only when
|
|
1309
|
+
the provided \`css\` defines them or the classes are harmless semantic hooks.
|
|
1310
|
+
- Use \`renderMode: "design"\` on design screen data when authoring full
|
|
1311
|
+
structured content directly.
|
|
1312
|
+
- Add \`data-design-id="meaningful-name"\` to editable elements such as hero
|
|
1313
|
+
panels, key buttons, cards, nav items, pricing rows, chart panels, and state
|
|
1314
|
+
chips. Keep ids stable and descriptive.
|
|
1315
|
+
- Keep the design responsive within the selected surface. Text must not clip,
|
|
1316
|
+
overlap, or rely on viewport-sized type.
|
|
1317
|
+
|
|
1318
|
+
## Targeted Style Edits
|
|
1319
|
+
|
|
1320
|
+
When a reviewer selects an element in the Design tab or asks for a specific
|
|
1321
|
+
style change, avoid regenerating the whole plan. Use:
|
|
1722
1322
|
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1323
|
+
\`\`\`json
|
|
1324
|
+
{
|
|
1325
|
+
"op": "update-design-element-style",
|
|
1326
|
+
"frameId": "frame-overview",
|
|
1327
|
+
"elementId": "primary-cta",
|
|
1328
|
+
"styles": {
|
|
1329
|
+
"background-color": "#0f766e",
|
|
1330
|
+
"border-radius": "10px"
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
\`\`\`
|
|
1729
1334
|
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
1734
|
-
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
1735
|
-
point at one specific control or transition; for a broad frame-level note, write
|
|
1736
|
-
text beside the frame with no connector. Connectors are for real sequences only —
|
|
1737
|
-
never fake "Step 1 → Step 2" lines between independent states.
|
|
1335
|
+
Use \`frameId\` for inline canvas designs or \`blockId\` for a referenced wireframe
|
|
1336
|
+
block. Set a style value to \`null\` to remove it. Use \`patch-wireframe-html\` or
|
|
1337
|
+
\`patch-prototype-html\` for text/content changes inside a fragment.
|
|
1738
1338
|
|
|
1739
|
-
|
|
1740
|
-
explains with \`targetId\` + \`placement\` (top/right/bottom/left). The renderer
|
|
1741
|
-
parks notes in a gutter beside the frame and lays them out automatically — never
|
|
1742
|
-
supply x/y or points for anchored notes; hand-placed coordinates fight the
|
|
1743
|
-
auto-layout and cause the overlap you're trying to avoid. Reserve arrows for a
|
|
1744
|
-
note that must point at a specific control inside a frame; a note that simply
|
|
1745
|
-
sits beside its frame needs no arrow.
|
|
1339
|
+
## Document Handoff
|
|
1746
1340
|
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
1751
|
-
edits. If an agent is working from exported source files, use
|
|
1752
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
1753
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
1754
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
1755
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
1756
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
1757
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
1758
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
1759
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
1341
|
+
Below the visual surface, keep the document concise and implementation-oriented:
|
|
1342
|
+
actual files and symbols, state/actions/contracts, open questions, risks, and
|
|
1343
|
+
verification. The document should not repeat the same screens in prose.
|
|
1760
1344
|
|
|
1761
|
-
|
|
1345
|
+
Before implementation, call \`get-plan-feedback\` and treat comments, selected
|
|
1346
|
+
element details, and recent review events as the source of truth.
|
|
1762
1347
|
|
|
1763
|
-
|
|
1348
|
+
## Related Skills
|
|
1764
1349
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1350
|
+
- \`visual-plan\`
|
|
1351
|
+
- \`ui-plan\`
|
|
1352
|
+
- \`prototype-plan\`
|
|
1353
|
+
- \`frontend-design\`
|
|
1354
|
+
`;
|
|
1355
|
+
export const VISUAL_RECAP_SKILL_MD = `---
|
|
1356
|
+
name: visual-recap
|
|
1357
|
+
description: >-
|
|
1358
|
+
Use Agent-Native Plans to turn a code change, PR diff, or git diff into a
|
|
1359
|
+
visual recap plan for high-altitude review — schema, API, file, and
|
|
1360
|
+
before/after changes as grounded structured blocks instead of a wall of diff.
|
|
1361
|
+
metadata:
|
|
1362
|
+
visibility: exported
|
|
1363
|
+
---
|
|
1768
1364
|
|
|
1769
|
-
|
|
1770
|
-
<div style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%">
|
|
1771
|
-
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
1772
|
-
<h1>Contacts</h1>
|
|
1773
|
-
<button class="primary">New contact</button>
|
|
1774
|
-
</div>
|
|
1775
|
-
<div style="display:flex;gap:6px">
|
|
1776
|
-
<span class="wf-pill accent">All 128</span>
|
|
1777
|
-
<span class="wf-pill">Favorites</span>
|
|
1778
|
-
<span class="wf-pill">Archived</span>
|
|
1779
|
-
</div>
|
|
1780
|
-
<div class="wf-card" style="display:flex;flex-direction:column;gap:0;padding:0">
|
|
1781
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)">
|
|
1782
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1783
|
-
<div style="flex:1"><strong>Jane Cooper</strong><br /><small>jane@acme.co</small></div>
|
|
1784
|
-
<span class="wf-pill">Lead</span>
|
|
1785
|
-
</div>
|
|
1786
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
1787
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1788
|
-
<div style="flex:1"><strong>Marcus Lee</strong><br /><small>marcus@globex.io</small></div>
|
|
1789
|
-
<span class="wf-pill">Customer</span>
|
|
1790
|
-
</div>
|
|
1791
|
-
</div>
|
|
1792
|
-
</div>
|
|
1793
|
-
\`\`\`
|
|
1365
|
+
# Visual Recap
|
|
1794
1366
|
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
because \`custom-html\`, screenshots, or prose are easier to produce. If the
|
|
1804
|
-
canvas/prototype surface cannot represent the requested fidelity, still keep the
|
|
1805
|
-
closest top-surface representation and call out or extend the needed renderer
|
|
1806
|
-
capability.
|
|
1367
|
+
\`/visual-recap\` creates a visual plan built **from** a diff, not toward one. It
|
|
1368
|
+
is the reverse of forward planning: instead of describing the change you are
|
|
1369
|
+
about to make, you describe the change that was just made, at a higher altitude
|
|
1370
|
+
than line-by-line review. The same plan data model serves both directions —
|
|
1371
|
+
schema, API, file, and architecture changes become the same \`data-model\`,
|
|
1372
|
+
\`api-endpoint\`, \`file-tree\`, and \`diagram\` blocks a forward plan would use, only
|
|
1373
|
+
now they summarize work that exists. A reviewer scans the shape of the change
|
|
1374
|
+
before spending attention on the literal lines.
|
|
1807
1375
|
|
|
1808
|
-
|
|
1809
|
-
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
1810
|
-
plans emit \`html\`. Do not author fresh kit-tree screens — write the HTML mockup
|
|
1811
|
-
instead. Likewise, old or imported plans may carry coordinate-based regions or
|
|
1812
|
-
free-float x/y on notes or artboards; those are legacy escape hatches the
|
|
1813
|
-
renderer still shows but you must never produce. The \`surface\` drives the aspect
|
|
1814
|
-
and footprint, the canvas auto-places artboards, and the gutter parks notes by
|
|
1815
|
-
\`targetId\` + \`placement\`; never supply width, height, or coordinates for a new
|
|
1816
|
-
plan.
|
|
1376
|
+
## When To Use
|
|
1817
1377
|
|
|
1818
|
-
|
|
1378
|
+
Build a recap when a PR or commit is large, multi-file, or touches schema, API
|
|
1379
|
+
contracts, or architecture, and a reviewer would benefit from seeing the change
|
|
1380
|
+
mapped to structured blocks before reading the raw diff. A GitHub Action can
|
|
1381
|
+
generate one automatically from a PR diff; an agent can generate one on request
|
|
1382
|
+
("recap this PR", "show me what this branch changed"). Skip it for small,
|
|
1383
|
+
single-file, or obvious diffs — a recap is review overhead, and a tiny change
|
|
1384
|
+
reviews faster as plain diff.
|
|
1385
|
+
|
|
1386
|
+
## Recap The Whole Work Unit
|
|
1387
|
+
|
|
1388
|
+
When \`/visual-recap\` is invoked in a chat thread after work has already happened,
|
|
1389
|
+
the default scope is the whole current work unit/thread, not only the most recent
|
|
1390
|
+
user message, tool action, or follow-up fix. Gather the thread-owned changes
|
|
1391
|
+
across the conversation: original implementation work, later bug fixes, UI
|
|
1392
|
+
follow-ups, tests, changesets, skill/instruction updates, generated plan/source
|
|
1393
|
+
artifacts, and any local import/linking fixes needed to make the recap open.
|
|
1394
|
+
|
|
1395
|
+
Use the current diff plus conversation context to separate thread-owned changes
|
|
1396
|
+
from unrelated dirty work that existed before the thread. Exclude unrelated
|
|
1397
|
+
pre-existing edits. If the scope is genuinely ambiguous and cannot be inferred,
|
|
1398
|
+
state the assumption or ask a concise question before publishing.
|
|
1399
|
+
|
|
1400
|
+
When updating an existing recap after feedback, revise the recap so it still
|
|
1401
|
+
covers the whole thread/work unit plus the new correction. Do not replace a broad
|
|
1402
|
+
recap with a narrow recap of only the latest feedback unless the user explicitly
|
|
1403
|
+
asks for that narrower scope.
|
|
1404
|
+
|
|
1405
|
+
## Keep The Recap Body Lean
|
|
1406
|
+
|
|
1407
|
+
Do not add boilerplate intro, disclaimer, provenance, or summary prose blocks to
|
|
1408
|
+
the generated plan body. In particular, do not create a \`rich-text\` block just to
|
|
1409
|
+
say the recap is an aid, that the reviewer should still review the diff, how many
|
|
1410
|
+
files changed, or which ref/working tree generated the recap. The plan title,
|
|
1411
|
+
brief, \`file-tree\`, and optional \`diffstat\` already carry that context.
|
|
1412
|
+
|
|
1413
|
+
Only add prose blocks when they tell the reviewer something specific about the
|
|
1414
|
+
change that the structured blocks do not: the objective, a real compatibility
|
|
1415
|
+
risk, an important decision visible in the diff, or a grounded review note.
|
|
1416
|
+
|
|
1417
|
+
## UI Impact Needs Wireframes
|
|
1418
|
+
|
|
1419
|
+
When the diff changes rendered UI, layout, density, visual state, interaction
|
|
1420
|
+
affordances, navigation, controls, menus, dialogs, or design tokens, the recap
|
|
1421
|
+
MUST include one or more wireframes. Prose and file diffs are not a substitute
|
|
1422
|
+
for showing what changed visually.
|
|
1423
|
+
|
|
1424
|
+
Choose the smallest visual surface that makes the review clear:
|
|
1425
|
+
|
|
1426
|
+
- Use a \`Before\` / \`After\` wireframe pair when the reviewer benefits from direct
|
|
1427
|
+
comparison, such as a removed or added control, a changed state, layout
|
|
1428
|
+
density, ordering, navigation, or a visible component replacement. The
|
|
1429
|
+
Wireframe Quality core below owns how to lay that pair out (columns vs.
|
|
1430
|
+
vertical stack by geometry).
|
|
1431
|
+
- Use an after-only wireframe when the change is purely additive or the "before"
|
|
1432
|
+
state would only show absence without adding review value.
|
|
1433
|
+
- Use more than two wireframes when the UI change is flow-dependent, responsive,
|
|
1434
|
+
or stateful; show the meaningful states in order instead of forcing a single
|
|
1435
|
+
before/after pair.
|
|
1436
|
+
- For tiny surfaces like menus, popovers, dialogs, toasts, or panels, use the
|
|
1437
|
+
matching \`surface\` (\`popover\`, \`panel\`, etc.) and show the focused sub-surface.
|
|
1438
|
+
Do not redraw a full page unless placement in the page is itself part of the
|
|
1439
|
+
change.
|
|
1440
|
+
|
|
1441
|
+
Ground each wireframe in the changed UI behavior, component names, file paths,
|
|
1442
|
+
and diff-visible labels/states. If exact pixels are inferred rather than
|
|
1443
|
+
captured, say so in the wireframe caption or a concise annotation. For
|
|
1444
|
+
local/manual recaps, import or update the plan source that holds the wireframes
|
|
1445
|
+
so the rendered recap opens with the UI visual available.
|
|
1446
|
+
|
|
1447
|
+
## Wireframe Quality
|
|
1448
|
+
|
|
1449
|
+
UI recap wireframes must look like the UI surface that changed, not like generic
|
|
1450
|
+
architecture boxes. The following bar is shared, word for word, with
|
|
1451
|
+
\`/visual-plan\` and \`/ui-plan\`: it is the single source of truth for HTML
|
|
1452
|
+
wireframe quality, and applies to a recap's standalone \`wireframe\` /
|
|
1453
|
+
\`WireframeBlock\` / \`<Screen>\` exactly as it applies to a plan's canvas artboard.
|
|
1454
|
+
|
|
1455
|
+
${WIREFRAME_QUALITY_CORE}
|
|
1456
|
+
|
|
1457
|
+
Use the standard \`WireframeBlock\` / \`<Screen>\` format so the Plan viewer owns the
|
|
1458
|
+
surface frame, theme, and sketchy/clean toggle. HTML wireframes are appropriate
|
|
1459
|
+
when placement precision matters, especially popovers, menus, dialogs, and dense
|
|
1460
|
+
forms; kit-tree wireframes are appropriate for simpler layouts. For HTML
|
|
1461
|
+
wireframes, keep \`renderMode\` unset or \`wireframe\` unless a design-only editable
|
|
1462
|
+
mockup is explicitly required, because \`renderMode="design"\` disables the
|
|
1463
|
+
sketchy rough overlay.
|
|
1464
|
+
|
|
1465
|
+
Before sharing a UI-impact recap, render it in the Plan viewer and inspect it at
|
|
1466
|
+
the current theme. If any label, annotation, toolbar, or wireframe content
|
|
1467
|
+
overlaps another element, fix the MDX and re-import before reporting the link. A
|
|
1468
|
+
text-match screenshot is not enough; visually inspect the captured image.
|
|
1469
|
+
|
|
1470
|
+
## Open And Report The Recap
|
|
1471
|
+
|
|
1472
|
+
After creating the recap, link the reviewer to the rendered plan with an
|
|
1473
|
+
**absolute URL**. Never make the primary link a local \`plan.mdx\` file, a local
|
|
1474
|
+
mirror folder, or a relative path such as \`/plans/<id>\`.
|
|
1475
|
+
|
|
1476
|
+
Resolve the URL in this order:
|
|
1477
|
+
|
|
1478
|
+
1. When creating a recap for local edits and a running local/dev Plan app origin
|
|
1479
|
+
is known, prefer that local origin even if \`plan.mdx\` includes a hosted
|
|
1480
|
+
\`visualUrl\`, e.g. \`http://localhost:8081/plans/<id>\`.
|
|
1481
|
+
2. Use the absolute \`visualUrl\` exported in \`plan.mdx\` frontmatter when present,
|
|
1482
|
+
e.g. \`https://plan.agent-native.com/plans/<id>\`.
|
|
1483
|
+
3. If the action returns only a relative \`url\`/\`path\` and the running app origin
|
|
1484
|
+
is known, construct an absolute URL from that origin, e.g.
|
|
1485
|
+
\`http://localhost:5173/plans/<id>\`.
|
|
1486
|
+
4. If only the plan id is available, build the hosted absolute URL
|
|
1487
|
+
\`https://plan.agent-native.com/plans/<id>\` and say if that URL was inferred.
|
|
1488
|
+
|
|
1489
|
+
When running in Codex and the Browser/in-app side browser tools are available,
|
|
1490
|
+
open the absolute recap URL there automatically after creation. Still include the
|
|
1491
|
+
same absolute URL in the final response. Local mirror files like
|
|
1492
|
+
\`plans/<slug>/plan.mdx\` may be mentioned only as secondary source-control
|
|
1493
|
+
artifacts, not as the main way to open the recap.
|
|
1494
|
+
|
|
1495
|
+
## Diff → Block Mapping
|
|
1496
|
+
|
|
1497
|
+
Map each kind of change to the block that carries it, derived mechanically from
|
|
1498
|
+
the actual diff:
|
|
1499
|
+
|
|
1500
|
+
- **Schema / migration change** → \`data-model\` for the resulting entities,
|
|
1501
|
+
fields, and relations, plus a \`diff\` with \`mode: "split"\` for the literal SQL
|
|
1502
|
+
or schema text that changed. The \`data-model\` shows the new shape; the split
|
|
1503
|
+
\`diff\` shows exactly what moved.
|
|
1504
|
+
- **API / action / route change** → \`api-endpoint\` with the method, path,
|
|
1505
|
+
params, request, and responses as they are after the change. Mark removed
|
|
1506
|
+
endpoints with \`deprecated: true\` and explain in prose.
|
|
1507
|
+
Keep multiple API endpoints in the normal single-column document flow unless
|
|
1508
|
+
they are an explicit before/after contract comparison.
|
|
1509
|
+
- **Compatibility-sensitive change** → short \`rich-text\` notes beside the
|
|
1510
|
+
relevant \`data-model\` / \`api-endpoint\` block. Name the changed field,
|
|
1511
|
+
endpoint, or behavior and mark whether it is breaking, risky, or non-breaking;
|
|
1512
|
+
pair that note with a split \`diff\` for the literal lines.
|
|
1513
|
+
- **Any meaningful code hunk** → \`diff\` with \`mode: "split"\`, carrying the real
|
|
1514
|
+
\`before\` / \`after\` text and the \`filename\` / \`language\`. Split mode is the
|
|
1515
|
+
default for a recap because before/after legibility is the whole point.
|
|
1516
|
+
When several key files each need a substantial diff, group those \`diff\` blocks
|
|
1517
|
+
in a reusable \`tabs\` block with \`orientation: "vertical"\` so file labels form a
|
|
1518
|
+
left rail and the selected file's split diff renders on the right. Keep each
|
|
1519
|
+
tab label to the file path or a short basename plus directory hint.
|
|
1520
|
+
If the recap ends with more than one supporting diff, that trailing diff
|
|
1521
|
+
appendix should be one vertical \`tabs\` block, not a stack of separate \`diff\`
|
|
1522
|
+
blocks.
|
|
1523
|
+
- **Files added / removed / renamed** → \`file-tree\` with each entry's \`change\`
|
|
1524
|
+
flag (\`added\`, \`removed\`, \`modified\`, \`renamed\`) and a short \`note\`; attach a
|
|
1525
|
+
\`snippet\` only when one tells the reviewer something the path does not.
|
|
1526
|
+
- **Rendered UI / interaction change** → one or more wireframes showing the
|
|
1527
|
+
visible UI delta before the reviewer reads code. Use \`Before\` / \`After\`
|
|
1528
|
+
wireframes when the comparison clarifies the change; otherwise use after-only
|
|
1529
|
+
or a short state/flow sequence. Use realistic UI surfaces: for a popover
|
|
1530
|
+
change, show a popover with its title row, top-right actions, options/fields,
|
|
1531
|
+
and any opened prompt/menu anchored to the correct trigger. Keep the body lean:
|
|
1532
|
+
the wireframe carries the UI story, while the file tree and split \`diff\`
|
|
1533
|
+
blocks carry implementation evidence.
|
|
1534
|
+
- **Architecture or data-flow shift** → \`diagram\` with \`data.html\` / \`data.css\`
|
|
1535
|
+
as a two-panel before/after, layered, or swimlane layout, or \`mermaid\` for a
|
|
1536
|
+
quick graph. Use the two-dimensional layouts the Document Quality core
|
|
1537
|
+
prescribes; do not reduce a structural change to a left-to-right chain.
|
|
1538
|
+
Do not use \`diagram\` as a stand-in for rendered UI controls; UI changes need
|
|
1539
|
+
\`wireframe\` blocks.
|
|
1540
|
+
Diagram HTML/CSS should use renderer-owned primitives such as
|
|
1541
|
+
\`.diagram-panel\`, \`.diagram-card\`, \`.diagram-node\`, \`.diagram-box\`,
|
|
1542
|
+
\`.diagram-pill\`, \`.diagram-muted\`, and \`[data-rough]\`; these map to the plan's
|
|
1543
|
+
Tailwind theme variables through \`--wf-ink\`, \`--wf-muted\`, \`--wf-line\`,
|
|
1544
|
+
\`--wf-paper\`, \`--wf-card\`, \`--wf-accent\`, \`--wf-accent-soft\`, \`--wf-warn\`, and
|
|
1545
|
+
\`--wf-ok\`, and switch to Virgil plus rough.js outlines in sketchy mode. Do not
|
|
1546
|
+
set \`font-family\` and do not emit hex, rgb/hsl literals, or one-off dark/light
|
|
1547
|
+
palettes in diagram CSS.
|
|
1548
|
+
- **Outcome-first narrative** → \`rich-text\` for the "what changed and why" prose:
|
|
1549
|
+
the objective the diff served, the key decisions visible in it, and the risks a
|
|
1550
|
+
reviewer should weigh. This is the only place the model writes freely.
|
|
1551
|
+
|
|
1552
|
+
## Before / After Is The Headline
|
|
1553
|
+
|
|
1554
|
+
The recap's center of gravity is the before/after comparison. For document-body
|
|
1555
|
+
comparisons there are two primitives, and they cover the whole need together:
|
|
1556
|
+
|
|
1557
|
+
- **\`columns\`** — the side-by-side container, for **structured** comparisons.
|
|
1558
|
+
Use two columns labeled \`Before\` and \`After\`, each holding a block (commonly a
|
|
1559
|
+
\`data-model\`, \`api-endpoint\`, or \`rich-text\`), so the reviewer reads the old
|
|
1560
|
+
shape against the new shape in one glance. This is the right primitive for
|
|
1561
|
+
"the schema went from X to Y" or "the endpoint contract changed like this."
|
|
1562
|
+
Do not use \`columns\` simply to compact or group a list of API endpoints.
|
|
1563
|
+
- **\`diff\` with \`mode: "split"\`** — for **code**. The split renders the literal
|
|
1564
|
+
removed and added lines side by side. Use it for the actual hunks.
|
|
1565
|
+
|
|
1566
|
+
For UI diffs, wireframes are the visual comparison primitive. Use before/after
|
|
1567
|
+
wireframes when the comparison clarifies the change; use after-only or a state
|
|
1568
|
+
sequence when that better matches the change. The visual headline must show
|
|
1569
|
+
exact placement, realistic chrome, and adequate padding before any abstract
|
|
1570
|
+
explanation. The Wireframe Quality core owns the before/after layout choice
|
|
1571
|
+
(side-by-side \`columns\` vs. vertical stack, picked by geometry); never
|
|
1572
|
+
hand-build a side-by-side wireframe layout in \`custom-html\`. For document-body
|
|
1573
|
+
comparisons, there is no other multi-column primitive — \`columns\` plus split
|
|
1574
|
+
\`diff\` are the whole comparison vocabulary. Do not hand-build side-by-side
|
|
1575
|
+
layouts in \`custom-html\`, and do not stack two \`data-model\` blocks vertically
|
|
1576
|
+
and call it a comparison when \`columns\` exists to put them side by side.
|
|
1577
|
+
|
|
1578
|
+
## Grounding Rule
|
|
1579
|
+
|
|
1580
|
+
Structured blocks are **true by construction** only if they are derived from the
|
|
1581
|
+
actual changed lines. The \`diff\`, \`data-model\`, \`api-endpoint\`, and \`file-tree\`
|
|
1582
|
+
blocks MUST be built mechanically from the real diff — real paths, real fields,
|
|
1583
|
+
real method/path, real before/after text — never inferred, rounded, or invented.
|
|
1584
|
+
The model writes only the prose: the "why", the narrative, the risk read. A
|
|
1585
|
+
confidently wrong recap is dangerous in a review context, because a reviewer who
|
|
1586
|
+
trusts the summary may skip the very line the summary got wrong. When the diff
|
|
1587
|
+
does not contain a fact, leave it out rather than guess; mark anything the model
|
|
1588
|
+
inferred (not extracted) as inferred in prose.
|
|
1589
|
+
|
|
1590
|
+
## Security
|
|
1591
|
+
|
|
1592
|
+
- **Gate visibility.** Recaps of a private repo are org/login-gated — set the
|
|
1593
|
+
plan's visibility to the owning org or login, never auto-public. A recap can
|
|
1594
|
+
expose unreleased schema, internal endpoints, and architecture; treat it like
|
|
1595
|
+
the source it summarizes.
|
|
1596
|
+
- **Never transcribe secrets.** A diff can contain API keys, tokens, webhook
|
|
1597
|
+
URLs, signing secrets, \`.env\` values, or credential-looking literals. Do not
|
|
1598
|
+
copy any of these into a \`diff\`, \`file-tree\` snippet, \`api-endpoint\`, or prose
|
|
1599
|
+
block — redact them (\`sk-•••\`, \`<redacted>\`). This mirrors the repo's
|
|
1600
|
+
hardcoded-secret rule: obviously fake placeholders only, never the real value,
|
|
1601
|
+
in any block, caption, or note.
|
|
1602
|
+
|
|
1603
|
+
## Bidirectional Loop (Fast-Follow)
|
|
1604
|
+
|
|
1605
|
+
Because a recap is a real, editable plan, the same review loop as forward plans
|
|
1606
|
+
applies: a reviewer can annotate any block, and the coding agent reads
|
|
1607
|
+
\`get-plan-feedback\` to drive fixes back into the code — annotation → agent →
|
|
1608
|
+
diff, the same close-the-loop flow forward plans use. In v1, recaps are
|
|
1609
|
+
**read-only**: they summarize a merged or proposed change for review, and the
|
|
1610
|
+
annotate-to-fix loop is a fast-follow, not yet wired. Build the recap so the
|
|
1611
|
+
blocks are anchorable and the loop drops in later without restructuring.
|
|
1819
1612
|
|
|
1820
|
-
|
|
1613
|
+
## Related Skills
|
|
1821
1614
|
|
|
1822
|
-
|
|
1615
|
+
- **visual-plan** — the canonical command and the source of the shared Wireframe
|
|
1616
|
+
& Canvas and Document Quality cores; a recap follows the same block discipline
|
|
1617
|
+
in reverse.
|
|
1618
|
+
- **security** — data scoping, secret handling, and the hardcoded-secret rule the
|
|
1619
|
+
recap's redaction and visibility gating mirror.
|
|
1620
|
+
- **sharing** — org/login-gated visibility for the plan that holds the recap.
|
|
1621
|
+
`;
|
|
1622
|
+
export const VISUAL_QUESTIONS_SKILL_MD = `---
|
|
1623
|
+
name: visual-questions
|
|
1624
|
+
description: >-
|
|
1625
|
+
Use Agent-Native Plans to ask rich visual intake questions when
|
|
1626
|
+
/visual-questions is explicitly requested before creating a UI plan or visual
|
|
1627
|
+
plan.
|
|
1628
|
+
metadata:
|
|
1629
|
+
visibility: both
|
|
1630
|
+
---
|
|
1823
1631
|
|
|
1824
|
-
|
|
1825
|
-
\`/visualize-plan\`. It is the single source of truth for the document below the
|
|
1826
|
-
canvas. Do not paraphrase it per command.
|
|
1632
|
+
# Visual Questions
|
|
1827
1633
|
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
shapes, the risks, and a closing verification step (tests, build, or a checkable
|
|
1834
|
-
behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
1835
|
-
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
1836
|
-
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
1634
|
+
Use \`/visual-questions\` when the next best step is not a plan yet, but a
|
|
1635
|
+
reviewable visual intake: single-choice option rows, multi-select option rows,
|
|
1636
|
+
freeform notes, mockup choices, sketch diagrams, and a generated answer summary
|
|
1637
|
+
that feeds the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
1638
|
+
\`/prototype-plan\`, and \`/plan-design\`.
|
|
1837
1639
|
|
|
1838
|
-
|
|
1839
|
-
the top visual surface: canvas artboards for static inspection, plus prototype
|
|
1840
|
-
tabs when the flow should be functional. The document carries the technical depth
|
|
1841
|
-
the visuals cannot show — concrete file/symbol maps, API and data contracts,
|
|
1842
|
-
code snippets, migration or implementation phases, risks, and validation. Repeat
|
|
1843
|
-
a wireframe in the document only for a genuinely new detail view or comparison.
|
|
1844
|
-
Skip the visual surface entirely for non-visual work and write a clean rich
|
|
1845
|
-
document.
|
|
1640
|
+
## When To Use
|
|
1846
1641
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1642
|
+
- The user asks to be shown options before the agent writes a plan.
|
|
1643
|
+
- UI direction, form factor, layout model, feature set, or visual style is fuzzy
|
|
1644
|
+
enough that 2-6 answers would materially change the plan.
|
|
1645
|
+
- The user would benefit from choosing between visual mockups or diagrams rather
|
|
1646
|
+
than answering text-only prompts.
|
|
1851
1647
|
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
concise syntax-highlighted snippet of the code shape — never the whole file,
|
|
1856
|
-
never a prose-only file list.
|
|
1857
|
-
- \`decision\` for two or three option cards with consequences. These are static
|
|
1858
|
-
records; do not style them like clickable tabs or chips unless the renderer
|
|
1859
|
-
truly supports changing the selection.
|
|
1860
|
-
- \`diagram\` for architecture, sequence, data-flow, dependency, or state
|
|
1861
|
-
relationships, only when it clarifies something real. Labels must not overlap
|
|
1862
|
-
nodes, connectors, or each other.
|
|
1863
|
-
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1864
|
-
only prose usually means the plan is under-specified — include a relevant
|
|
1865
|
-
visual unless the tab is intentionally document-only.
|
|
1866
|
-
- \`table\`, \`checklist\`, \`callout\` for scannable structure.
|
|
1648
|
+
Gate hard: skip this for tiny, unambiguous changes. If the agent can reasonably
|
|
1649
|
+
infer the answer, prefer \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`, or
|
|
1650
|
+
\`/visual-plan\` directly and put assumptions in the plan.
|
|
1867
1651
|
|
|
1868
|
-
|
|
1869
|
-
plan
|
|
1870
|
-
block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
|
|
1871
|
-
\`freeform\` for constraints, \`recommended: true\` for the default you would pick,
|
|
1872
|
-
and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
|
|
1873
|
-
Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
|
|
1874
|
-
relevant section. Never bury a questions/decisions wall inside the plan
|
|
1875
|
-
narrative.
|
|
1652
|
+
Visual questions are an explicit intake command, not an automatic preflight for
|
|
1653
|
+
\`/visual-plan\`, \`/ui-plan\`, \`/prototype-plan\`, or \`/plan-design\`.
|
|
1876
1654
|
|
|
1877
|
-
|
|
1878
|
-
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1879
|
-
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1880
|
-
blocks for normal plans. It may support supplemental demos or references, but it
|
|
1881
|
-
is never the primary home for a requested mockup, UI state, or visual
|
|
1882
|
-
comparison. If fidelity requires HTML/CSS, image capture, or real React/CSS, the
|
|
1883
|
-
product fix is canvas support for that artifact type, not moving the mockup into
|
|
1884
|
-
the document.
|
|
1655
|
+
## Workflow
|
|
1885
1656
|
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1657
|
+
1. Call \`create-visual-questions\` with a clear title, brief, source, and repo
|
|
1658
|
+
path when known.
|
|
1659
|
+
2. Omit \`questions\` for the default UI intake. Provide a custom \`questions\` array
|
|
1660
|
+
only when the task has domain-specific choices.
|
|
1661
|
+
3. Surface the returned Plans link and ask the user to answer visually.
|
|
1662
|
+
4. The generated summary drives the next step: \`create-ui-plan\` for static UI
|
|
1663
|
+
review, \`create-prototype-plan\` for click-through UI flows,
|
|
1664
|
+
\`create-plan-design\` for high-fidelity branded UI review,
|
|
1665
|
+
\`create-visual-plan\` for general plans or when a text plan already exists,
|
|
1666
|
+
or \`update-visual-plan\` with targeted \`contentPatches\` to fold answers into
|
|
1667
|
+
an active plan.
|
|
1668
|
+
5. If the user leaves comments, call \`get-plan-feedback\` before using the answers.
|
|
1889
1669
|
|
|
1890
|
-
|
|
1670
|
+
## Question Types
|
|
1891
1671
|
|
|
1892
|
-
|
|
1672
|
+
Supported \`questions\` entries:
|
|
1893
1673
|
|
|
1894
|
-
|
|
1674
|
+
- \`single\`: chip group where one option wins.
|
|
1675
|
+
- \`multi\`: chip group where multiple options can be selected.
|
|
1676
|
+
- \`freeform\`: textarea for constraints, inspirations, or things to avoid.
|
|
1677
|
+
- \`visual\`: visual options with sketch previews — use for layout direction, flow
|
|
1678
|
+
depth, surface choice, or diagram choices.
|
|
1895
1679
|
|
|
1896
|
-
|
|
1897
|
-
\`
|
|
1898
|
-
\`
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
elements, helper classes, and \`--wf-*\` tokens, so the renderer applies the
|
|
1902
|
-
correct desktop footprint, theme, and one subtle whole-frame wobble. Plain-text
|
|
1903
|
-
designer notes sit spaced off the frame, pointing only at the controls that need
|
|
1904
|
-
explanation. Below it, a Claude/Codex-grade document: objective and
|
|
1905
|
-
done-criteria, an \`implementation-map\` naming the real components and actions
|
|
1906
|
-
with short highlighted snippets, a \`decision\` card weighing two real approaches,
|
|
1907
|
-
and a validation step — none of it repeating the canvas. If the task also
|
|
1908
|
-
changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
1909
|
-
whose screens use the same labels and states as the canvas artboards, with
|
|
1910
|
-
\`data-goto\` controls for the sequence. This is the bar.
|
|
1680
|
+
Each option can include \`label\`, \`value\`, \`description\`, \`recommended\`,
|
|
1681
|
+
\`preview\`, and \`bullets\`. Valid \`preview\` values match the wireframe surfaces:
|
|
1682
|
+
\`desktop\`, \`mobile\`, \`popover\`, \`panel\`, \`component\`, \`split\`, \`flow\`, and
|
|
1683
|
+
\`diagram\`. Pick the preview that matches the real footprint — do not offer a
|
|
1684
|
+
desktop/mobile pair for a popover, panel, or component.
|
|
1911
1685
|
|
|
1912
|
-
|
|
1913
|
-
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1914
|
-
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
1915
|
-
annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
1916
|
-
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1917
|
-
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1918
|
-
document with a hero heading and value props that just restates what the canvas
|
|
1919
|
-
already shows. Never produce this.
|
|
1686
|
+
## Quality Bar
|
|
1920
1687
|
|
|
1921
|
-
|
|
1688
|
+
- Ask only decision-changing questions. A beautiful form with low-value questions
|
|
1689
|
+
is still friction.
|
|
1690
|
+
- Prefer visible, answerable options over abstract prose.
|
|
1691
|
+
- Use visual tabs when users need to compare layout or flow shapes.
|
|
1692
|
+
- Keep the output calm and document-like, not a landing page.
|
|
1693
|
+
- The generated answer summary is not the final plan; it is the intake prompt for
|
|
1694
|
+
the next agent step.
|
|
1922
1695
|
|
|
1923
1696
|
## Tool Guidance
|
|
1924
1697
|
|
|
1925
|
-
- \`
|
|
1926
|
-
- \`
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
- \`get-visual-plan\`: inspect the current structured plan, exported HTML, and
|
|
1941
|
-
annotations; it also returns the MDX folder for source workflows.
|
|
1942
|
-
- \`get-plan-feedback\`: read unconsumed reviewer comments before coding; it
|
|
1943
|
-
returns grouped threads, exact anchor details, expected resolver, and recent
|
|
1944
|
-
review-event payloads so agents can act only on the comments meant for them.
|
|
1945
|
-
- \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
|
|
1946
|
-
files for repo check-in.
|
|
1947
|
-
|
|
1948
|
-
When the user critiques a plan's look or structure, fix the renderer or this
|
|
1949
|
-
skill — never hand-edit one stored plan. Turn feedback into better guidance.
|
|
1698
|
+
- \`create-visual-questions\`: create the interactive intake plan.
|
|
1699
|
+
- \`get-visual-plan\`: inspect the current visual question plan.
|
|
1700
|
+
- \`get-plan-feedback\`: read comments before creating or updating the next plan.
|
|
1701
|
+
- \`create-ui-plan\`: create a UI-first plan from the answers.
|
|
1702
|
+
- \`create-prototype-plan\`: create a prototype-first plan from the answers when
|
|
1703
|
+
interaction feel matters.
|
|
1704
|
+
- \`create-plan-design\`: create a high-fidelity branded design plan from the
|
|
1705
|
+
answers when visual polish is the primary review input.
|
|
1706
|
+
- \`create-visual-plan\`: create a general visual plan from the answers, or pass
|
|
1707
|
+
existing plan text as \`planText\` when the answers should shape an imported
|
|
1708
|
+
plan.
|
|
1709
|
+
- \`export-visual-plan\`: export answer plans as HTML, Markdown fallback,
|
|
1710
|
+
structured JSON, and MDX files when the intake needs to be checked into a repo.
|
|
1711
|
+
- \`read-visual-plan-source\` / \`patch-visual-plan-source\`: inspect or patch the
|
|
1712
|
+
MDX source if another agent is operating from checked-in plan files.
|
|
1950
1713
|
|
|
1951
1714
|
## Setup & Authentication
|
|
1952
1715
|
|
|
@@ -1961,8 +1724,9 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
1961
1724
|
agent-native skills add visual-plan
|
|
1962
1725
|
\`\`\`
|
|
1963
1726
|
|
|
1964
|
-
After that, \`/visual-plan\` (and \`/
|
|
1965
|
-
\`/
|
|
1727
|
+
After that, \`/visual-plan\` (and \`/visual-recap\`, \`/ui-plan\`,
|
|
1728
|
+
\`/prototype-plan\`, \`/plan-design\`, \`/visual-questions\`) generate a plan and open
|
|
1729
|
+
the editor. Pass \`--no-connect\` to
|
|
1966
1730
|
register the connector without authenticating, then run
|
|
1967
1731
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1968
1732
|
|
|
@@ -2076,17 +1840,17 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2076
1840
|
"visual-plans": {
|
|
2077
1841
|
skillName: "visual-plan",
|
|
2078
1842
|
extraSkills: {
|
|
1843
|
+
"visual-recap": VISUAL_RECAP_SKILL_MD,
|
|
2079
1844
|
"visual-questions": VISUAL_QUESTIONS_SKILL_MD,
|
|
2080
1845
|
"ui-plan": UI_PLAN_SKILL_MD,
|
|
2081
1846
|
"prototype-plan": PROTOTYPE_PLAN_SKILL_MD,
|
|
2082
1847
|
"plan-design": PLAN_DESIGN_SKILL_MD,
|
|
2083
|
-
"visualize-plan": VISUALIZE_PLAN_SKILL_MD,
|
|
2084
1848
|
},
|
|
2085
1849
|
manifest: normalizeAppSkillManifest({
|
|
2086
1850
|
schemaVersion: 1,
|
|
2087
1851
|
id: "visual-plans",
|
|
2088
1852
|
displayName: "Agent-Native Plans",
|
|
2089
|
-
description: "Generate and review coding-agent plans as structured
|
|
1853
|
+
description: "Generate and review coding-agent plans as structured documents with inline diagrams, implementation maps, optional UI wireframes/prototypes, annotations, feedback, and HTML export.",
|
|
2090
1854
|
hosted: {
|
|
2091
1855
|
url: "https://plan.agent-native.com",
|
|
2092
1856
|
mcpUrl: "https://plan.agent-native.com/_agent-native/mcp",
|
|
@@ -2094,13 +1858,20 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2094
1858
|
mcp: { serverName: "agent-native-plans" },
|
|
2095
1859
|
auth: {
|
|
2096
1860
|
mode: "oauth",
|
|
2097
|
-
setup: "Install with the Agent-Native CLI to add the /visual-plan, /ui-plan, /prototype-plan, /plan-design, /visual-questions
|
|
1861
|
+
setup: "Install with the Agent-Native CLI to add the /visual-plan, /visual-recap, /ui-plan, /prototype-plan, /plan-design, and /visual-questions skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
|
|
2098
1862
|
},
|
|
2099
1863
|
surfaces: [
|
|
2100
1864
|
{
|
|
2101
1865
|
id: "visual-plan",
|
|
2102
1866
|
action: "create-visual-plan",
|
|
2103
1867
|
path: "/plans",
|
|
1868
|
+
description: "Create a general coding-agent plan. Architecture/code plans default to inline document blocks; top canvas/prototype surfaces are optional for UI/product review.",
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
id: "visual-recap",
|
|
1872
|
+
action: "create-visual-recap",
|
|
1873
|
+
path: "/plans",
|
|
1874
|
+
description: "Create a visual recap plan from a PR, commit, branch, or git diff for high-altitude review.",
|
|
2104
1875
|
},
|
|
2105
1876
|
{
|
|
2106
1877
|
id: "visual-questions",
|
|
@@ -2126,11 +1897,6 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2126
1897
|
path: "/plans",
|
|
2127
1898
|
description: "Create a full-fidelity Agent-Native design plan with a Design canvas tab and optional matching Prototype tab.",
|
|
2128
1899
|
},
|
|
2129
|
-
{
|
|
2130
|
-
id: "visualize-plan",
|
|
2131
|
-
action: "visualize-plan",
|
|
2132
|
-
path: "/plans",
|
|
2133
|
-
},
|
|
2134
1900
|
],
|
|
2135
1901
|
skills: [
|
|
2136
1902
|
{
|
|
@@ -2138,6 +1904,11 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2138
1904
|
visibility: "exported",
|
|
2139
1905
|
exportAs: "visual-plan",
|
|
2140
1906
|
},
|
|
1907
|
+
{
|
|
1908
|
+
path: "skills/visual-recap",
|
|
1909
|
+
visibility: "exported",
|
|
1910
|
+
exportAs: "visual-recap",
|
|
1911
|
+
},
|
|
2141
1912
|
{
|
|
2142
1913
|
path: "skills/visual-questions",
|
|
2143
1914
|
visibility: "exported",
|
|
@@ -2158,11 +1929,6 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2158
1929
|
visibility: "exported",
|
|
2159
1930
|
exportAs: "plan-design",
|
|
2160
1931
|
},
|
|
2161
|
-
{
|
|
2162
|
-
path: "skills/visualize-plan",
|
|
2163
|
-
visibility: "exported",
|
|
2164
|
-
exportAs: "visualize-plan",
|
|
2165
|
-
},
|
|
2166
1932
|
],
|
|
2167
1933
|
hostAdapters: [
|
|
2168
1934
|
"codex-plugin",
|
|
@@ -2226,6 +1992,10 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
2226
1992
|
"agent-native-design-exploration": "design",
|
|
2227
1993
|
"visual-plans": "visual-plans",
|
|
2228
1994
|
"visual-plan": "visual-plans",
|
|
1995
|
+
"visual-recap": "visual-plans",
|
|
1996
|
+
"visual-recaps": "visual-plans",
|
|
1997
|
+
"code-review-recap": "visual-plans",
|
|
1998
|
+
"code-review-recaps": "visual-plans",
|
|
2229
1999
|
"visual-questions": "visual-plans",
|
|
2230
2000
|
"visual-question": "visual-plans",
|
|
2231
2001
|
"ui-plan": "visual-plans",
|
|
@@ -2237,8 +2007,6 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
2237
2007
|
"design-plan": "visual-plans",
|
|
2238
2008
|
"design-plans": "visual-plans",
|
|
2239
2009
|
prototype: "visual-plans",
|
|
2240
|
-
"visualize-plan": "visual-plans",
|
|
2241
|
-
"visualize-plans": "visual-plans",
|
|
2242
2010
|
"html-plan": "visual-plans",
|
|
2243
2011
|
"plan-mode": "visual-plans",
|
|
2244
2012
|
plannotate: "visual-plans",
|
|
@@ -2260,11 +2028,12 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
2260
2028
|
],
|
|
2261
2029
|
"visual-plans": [
|
|
2262
2030
|
"visual-plan",
|
|
2031
|
+
"visual-recap",
|
|
2032
|
+
"code-review-recap",
|
|
2263
2033
|
"visual-questions",
|
|
2264
2034
|
"ui-plan",
|
|
2265
2035
|
"prototype-plan",
|
|
2266
2036
|
"plan-design",
|
|
2267
|
-
"visualize-plan",
|
|
2268
2037
|
"html-plan",
|
|
2269
2038
|
"plannotate",
|
|
2270
2039
|
],
|