@agent-native/core 0.39.0 → 0.39.2
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/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +5 -5
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +458 -615
- 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/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/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/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 +1 -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|
|
|
18
|
+
agent-native skills add assets|design-exploration|visual-plan|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:
|
|
@@ -196,7 +196,7 @@ iteration, or a human-in-the-loop choice among design directions.
|
|
|
196
196
|
`;
|
|
197
197
|
/**
|
|
198
198
|
* Shared setup/auth block for every Plans skill (`/visual-plan`, `/ui-plan`,
|
|
199
|
-
* `/prototype-plan`, `/
|
|
199
|
+
* `/prototype-plan`, `/plan-design`, `/visual-questions`). Interpolated into each skill markdown
|
|
200
200
|
* so the install + one-step authenticate instructions never drift between them.
|
|
201
201
|
* Keep this in sync with the copies under `templates/plan/.agents/skills/*` and
|
|
202
202
|
* top-level `skills/*` (this skill's SKILL.md is triplicated with no sync test).
|
|
@@ -214,8 +214,8 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
214
214
|
agent-native skills add visual-plan
|
|
215
215
|
\`\`\`
|
|
216
216
|
|
|
217
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
|
|
218
|
-
\`/visual-questions
|
|
217
|
+
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
218
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
219
219
|
register the connector without authenticating, then run
|
|
220
220
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
221
221
|
|
|
@@ -242,8 +242,8 @@ export const VISUAL_PLANS_SKILL_MD = `---
|
|
|
242
242
|
name: visual-plan
|
|
243
243
|
description: >-
|
|
244
244
|
Use Agent-Native Plans when coding-agent work needs an interactive structured
|
|
245
|
-
plan document with diagrams,
|
|
246
|
-
and comments.
|
|
245
|
+
plan document with inline diagrams, implementation maps, optional UI/product
|
|
246
|
+
wireframes or prototypes, annotations, and comments.
|
|
247
247
|
metadata:
|
|
248
248
|
visibility: exported
|
|
249
249
|
---
|
|
@@ -252,23 +252,29 @@ metadata:
|
|
|
252
252
|
|
|
253
253
|
Agent-Native Plans is structured visual planning mode for coding agents. Build
|
|
254
254
|
the plan you would normally write in Markdown, but as a scannable document with
|
|
255
|
-
editable blocks mixed in:
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
editable blocks mixed in: inline diagrams, implementation maps, code previews,
|
|
256
|
+
open questions, and an optional top visual review area (wireframe canvas, live
|
|
257
|
+
prototype, or both in tabs). Architecture, backend, data, and refactor plans
|
|
258
|
+
usually start in the document with local diagrams near each claim. UI and product
|
|
259
|
+
plans should still start with the top canvas/prototype when screens or behavior
|
|
260
|
+
are what the user needs to review.
|
|
258
261
|
|
|
259
262
|
\`/visual-plan\` is the canonical command and the main entry point. Use \`/ui-plan\`
|
|
260
263
|
when the work is primarily product UI and review should start with the screens.
|
|
261
264
|
Use \`/prototype-plan\` when review should start with a functional live prototype.
|
|
265
|
+
Use \`/plan-design\` when review should start with full-fidelity branded design.
|
|
262
266
|
Use \`/visual-questions\` only when the user explicitly wants a visual intake form
|
|
263
|
-
before planning.
|
|
264
|
-
|
|
267
|
+
before planning. When a Codex, Claude Code, Markdown, or pasted plan already
|
|
268
|
+
exists, \`/visual-plan\` uses that source plan as the starting point and builds
|
|
269
|
+
the review surface from it instead of starting over.
|
|
265
270
|
|
|
266
271
|
## When To Use
|
|
267
272
|
|
|
268
|
-
Create a visual plan when work is multi-file, ambiguous, long-running,
|
|
269
|
-
UI-heavy, when architecture / data flow / UI direction / options /
|
|
270
|
-
questions would
|
|
271
|
-
direction before you implement
|
|
273
|
+
Create or adapt a visual plan when work is multi-file, ambiguous, long-running,
|
|
274
|
+
risky, or UI-heavy, when architecture / data flow / UI direction / options /
|
|
275
|
+
open questions would benefit from inline diagrams or structured blocks, when the
|
|
276
|
+
user needs to react to a direction before you implement, or when an existing text
|
|
277
|
+
plan needs a richer review surface.
|
|
272
278
|
|
|
273
279
|
## Plan Discipline
|
|
274
280
|
|
|
@@ -281,6 +287,10 @@ direction before you implement.
|
|
|
281
287
|
patterns first; name actual files, symbols, and data shapes instead of
|
|
282
288
|
inventing them. Check existing \`actions/\` before proposing endpoints and prefer
|
|
283
289
|
named client helpers over raw fetch. Delegate wide exploration to a sub-agent.
|
|
290
|
+
- **Preserve existing plans.** If the user pasted, referenced, or already has a
|
|
291
|
+
Codex / Claude Code / Markdown plan, treat it as source material. Preserve its
|
|
292
|
+
intent, do not invent codebase facts, label inferred visuals as inferred, and
|
|
293
|
+
build the visual review structure around the plan the user already has.
|
|
284
294
|
- **Planning is read-only.** Make no source edits while building or reviewing the
|
|
285
295
|
plan. Start editing only after the user approves the direction.
|
|
286
296
|
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
|
|
@@ -303,19 +313,32 @@ direction before you implement.
|
|
|
303
313
|
|
|
304
314
|
1. Follow the host agent's normal planning flow: inspect the codebase, delegate
|
|
305
315
|
wide exploration when useful, gather the info needed, and ask native
|
|
306
|
-
clarifying questions as needed before generating the plan.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
and
|
|
313
|
-
|
|
316
|
+
clarifying questions as needed before generating the plan. If a source plan
|
|
317
|
+
already exists, gather its exact text from the user's paste, a referenced
|
|
318
|
+
file, or recent visible agent context; do not invent source text.
|
|
319
|
+
2. Decide whether the plan needs a top visual surface with the rules below, then call
|
|
320
|
+
\`create-visual-plan\` with the title, brief, source, repo path, and structured
|
|
321
|
+
\`content\` blocks. When a source plan already exists, pass it as \`planText\`
|
|
322
|
+
and preserve the original plan's intent while adding structured review
|
|
323
|
+
content.
|
|
324
|
+
3. Compose or enrich any top UI/product visual surface from the kit and write the
|
|
325
|
+
document with native blocks (see the cores below). Keep the document close to
|
|
326
|
+
the Markdown plan the agent would normally output, or to the existing plan
|
|
327
|
+
when one was provided. For architecture, backend, refactor, API, data-model,
|
|
328
|
+
migration, or code plans, usually omit \`content.canvas\` and
|
|
329
|
+
\`content.prototype\`; put \`diagram\`, \`mermaid\`, \`data-model\`, \`file-tree\`,
|
|
330
|
+
\`implementation-map\`, \`code-tabs\`, and \`annotated-code\` blocks directly next
|
|
331
|
+
to the relevant prose. Skip the top visual surface for non-visual work.
|
|
314
332
|
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|
|
315
333
|
Always include the actual URL in chat so the next step is a click in CLI or
|
|
316
334
|
other text-only hosts. When the host exposes an embedded browser/preview panel
|
|
317
335
|
and a tool can open arbitrary URLs there, open the returned plan URL
|
|
318
336
|
automatically for convenient review; do not rely on this as the only handoff.
|
|
337
|
+
Treat that browser open as a convenience and smoke test, not as the access
|
|
338
|
+
model. Plans should load out of the box for the local agent and local browser
|
|
339
|
+
session; if a signed-in embedded browser cannot read a local plan that an
|
|
340
|
+
anonymous/tool check can read, fix the app/action ownership or access path
|
|
341
|
+
rather than patching one plan by hand.
|
|
319
342
|
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
320
343
|
and before the final response. Treat \`anchorDetails\`, resolver intent, recent
|
|
321
344
|
review events, and any focused screenshots from browser handoff as the source
|
|
@@ -329,12 +352,17 @@ direction before you implement.
|
|
|
329
352
|
|
|
330
353
|
## Visual Surface Choice
|
|
331
354
|
|
|
332
|
-
Choose the surface before creating the plan
|
|
333
|
-
default:
|
|
355
|
+
Choose the surface before creating the plan or after reading the source plan. Do
|
|
356
|
+
not add visual chrome by default:
|
|
334
357
|
|
|
335
358
|
- **No visual surface** for architecture-only, backend-only, data migration,
|
|
336
|
-
copy-only, or otherwise non-visual plans.
|
|
337
|
-
|
|
359
|
+
copy-only, or otherwise non-visual plans. Do not use the top canvas for
|
|
360
|
+
architecture diagrams, dependency maps, file plans, API contracts, or
|
|
361
|
+
data-flow-only reviews. Use a strong document with local inline diagrams
|
|
362
|
+
only when relationships need a visual explanation, usually one spatial diagram
|
|
363
|
+
per recommendation or decision. Prefer grouped regions, layers, quadrants,
|
|
364
|
+
matrices, or before/after panels over a single-axis chain unless the
|
|
365
|
+
relationship is truly sequential.
|
|
338
366
|
- **Canvas only** for one static screen, a before/after comparison, a component
|
|
339
367
|
state, a small popover, or a visual direction that does not require clicking.
|
|
340
368
|
Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
|
|
@@ -356,9 +384,9 @@ design direction.
|
|
|
356
384
|
|
|
357
385
|
## Wireframe & Canvas Core
|
|
358
386
|
|
|
359
|
-
This section is shared, word for word, by \`/visual-plan
|
|
360
|
-
|
|
361
|
-
|
|
387
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
388
|
+
the single source of truth for how wireframes and the canvas work. Do not
|
|
389
|
+
paraphrase it per command.
|
|
362
390
|
|
|
363
391
|
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
364
392
|
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
@@ -425,6 +453,15 @@ the current screen's real layout and footprint FIRST, then change only the delta
|
|
|
425
453
|
and call it out with a single annotation. Do not restack the page into a new
|
|
426
454
|
layout. For net-new surfaces, compose from the real app shell.
|
|
427
455
|
|
|
456
|
+
**Classify mockup scope before implementation.** Before turning a plan mockup
|
|
457
|
+
into source code, decide whether each artboard represents the whole page/app
|
|
458
|
+
shell, a route body inside an existing shell, or a component/sub-surface. If an
|
|
459
|
+
artboard includes navigation, sidebars, auth banners, or a signup/login form,
|
|
460
|
+
map those pieces to the real shared shell/auth components instead of nesting the
|
|
461
|
+
entire mockup inside the current page. When a mockup references the product's
|
|
462
|
+
standard signup/login page, find and reuse that existing implementation; do not
|
|
463
|
+
approximate it from the wireframe.
|
|
464
|
+
|
|
428
465
|
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
429
466
|
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
430
467
|
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
@@ -478,7 +515,15 @@ In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
|
478
515
|
\`update-rich-text\` content patches or source patches for prose, and use
|
|
479
516
|
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
480
517
|
|
|
481
|
-
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
518
|
+
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
519
|
+
you place on the canvas must carry an \`html\` wireframe or reference a wireframe
|
|
520
|
+
block via \`blockId\`; when using \`blockId\`, the referenced \`wireframe\` /
|
|
521
|
+
\`legacy-wireframe\` block must remain in the plan. If you remove a duplicate
|
|
522
|
+
wireframe from the document body, first move its \`data\` inline onto the
|
|
523
|
+
corresponding \`content.canvas.frames[*].wireframe\` / \`legacyWireframe\`. A
|
|
524
|
+
label-only frame or a frame pointing at a deleted block renders empty and is
|
|
525
|
+
rejected at parse time. If you only have a title, write it as a section header or
|
|
526
|
+
annotation, not an empty artboard.
|
|
482
527
|
|
|
483
528
|
**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).
|
|
484
529
|
|
|
@@ -487,7 +532,9 @@ composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
|
487
532
|
hex colors:
|
|
488
533
|
|
|
489
534
|
\`\`\`html
|
|
490
|
-
<div
|
|
535
|
+
<div
|
|
536
|
+
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
537
|
+
>
|
|
491
538
|
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
492
539
|
<h1>Contacts</h1>
|
|
493
540
|
<button class="primary">New contact</button>
|
|
@@ -497,33 +544,48 @@ hex colors:
|
|
|
497
544
|
<span class="wf-pill">Favorites</span>
|
|
498
545
|
<span class="wf-pill">Archived</span>
|
|
499
546
|
</div>
|
|
500
|
-
<div
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
547
|
+
<div
|
|
548
|
+
class="wf-card"
|
|
549
|
+
style="display:flex;flex-direction:column;gap:0;padding:0"
|
|
550
|
+
>
|
|
551
|
+
<div
|
|
552
|
+
style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)"
|
|
553
|
+
>
|
|
554
|
+
<div
|
|
555
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
556
|
+
></div>
|
|
557
|
+
<div style="flex:1">
|
|
558
|
+
<strong>Jane Cooper</strong><br /><small>jane@acme.co</small>
|
|
559
|
+
</div>
|
|
504
560
|
<span class="wf-pill">Lead</span>
|
|
505
561
|
</div>
|
|
506
562
|
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
507
|
-
<div
|
|
508
|
-
|
|
563
|
+
<div
|
|
564
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
565
|
+
></div>
|
|
566
|
+
<div style="flex:1">
|
|
567
|
+
<strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>
|
|
568
|
+
</div>
|
|
509
569
|
<span class="wf-pill">Customer</span>
|
|
510
570
|
</div>
|
|
511
571
|
</div>
|
|
512
572
|
</div>
|
|
513
573
|
\`\`\`
|
|
514
574
|
|
|
515
|
-
**
|
|
516
|
-
canvas; multi-step flows get both canvas wireframes and a
|
|
517
|
-
user asks for a mockup, UI state, loading state, layout,
|
|
518
|
-
comparison, make the canvas the primary home for that static
|
|
519
|
-
user asks for a prototype or the plan contains a sequence the
|
|
520
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
521
|
-
shows Wireframes / Prototype tabs.
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
575
|
+
**UI mockups belong in the top visual review area.** Static UI/product visuals
|
|
576
|
+
live on the canvas; multi-step UI flows get both canvas wireframes and a
|
|
577
|
+
prototype. When the user asks for a mockup, UI state, loading state, layout,
|
|
578
|
+
screen, or visual comparison, make the canvas the primary home for that static
|
|
579
|
+
visual. When the user asks for a prototype or the plan contains a sequence the
|
|
580
|
+
reviewer must feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
581
|
+
top surface shows Wireframes / Prototype tabs. Architecture/code diagrams are
|
|
582
|
+
different: keep them inline in the document, close to the recommendation they
|
|
583
|
+
support, unless the user explicitly asks for a spatial board. Document blocks
|
|
584
|
+
can explain, compare, or map implementation, but they should not host the
|
|
585
|
+
primary UI mockup or prototype just because \`custom-html\`, screenshots, or prose
|
|
586
|
+
are easier to produce. If the canvas/prototype surface cannot represent the
|
|
587
|
+
requested UI fidelity, still keep the closest top-surface representation and
|
|
588
|
+
call out or extend the needed renderer capability.
|
|
527
589
|
|
|
528
590
|
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
529
591
|
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
@@ -541,9 +603,9 @@ plan.
|
|
|
541
603
|
|
|
542
604
|
## Document Quality Core
|
|
543
605
|
|
|
544
|
-
This section is shared, word for word, by \`/visual-plan
|
|
545
|
-
|
|
546
|
-
|
|
606
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
607
|
+
the single source of truth for the document below the canvas. Do not paraphrase
|
|
608
|
+
it per command.
|
|
547
609
|
|
|
548
610
|
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
549
611
|
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
@@ -555,14 +617,27 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
|
555
617
|
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
556
618
|
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
557
619
|
|
|
558
|
-
**
|
|
559
|
-
the top visual surface: canvas artboards for
|
|
560
|
-
tabs when the flow should be functional. The
|
|
561
|
-
the visuals cannot show — concrete
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
620
|
+
**When top visuals exist, they and the document never duplicate each other.**
|
|
621
|
+
For UI work, the UI story lives in the top visual surface: canvas artboards for
|
|
622
|
+
static inspection, plus prototype tabs when the flow should be functional. The
|
|
623
|
+
document carries the technical depth the visuals cannot show — concrete
|
|
624
|
+
file/symbol maps, API and data contracts, code snippets, migration or
|
|
625
|
+
implementation phases, risks, and validation. For architecture/code reviews,
|
|
626
|
+
invert that: the document is the visual surface, and each recommendation should
|
|
627
|
+
carry its own nearby inline \`diagram\` / \`data-model\` block plus file evidence
|
|
628
|
+
and terse Problem/Solution/Why text. For architecture/code diagrams, prefer
|
|
629
|
+
standard two-dimensional layouts: paired before/after panels, layered diagrams,
|
|
630
|
+
swimlanes, dependency maps, matrices, or grouped regions. Do not default to
|
|
631
|
+
left-to-right chains; use a line only when the relationship is truly a sequence.
|
|
632
|
+
Use native \`diagram\` blocks with \`data.html\` / \`data.css\` for these richer
|
|
633
|
+
layouts; the fragment may use semantic HTML and inline SVG, and the renderer
|
|
634
|
+
applies the viewer's sketch/clean style. Legacy \`nodes\` / \`edges\` are only for
|
|
635
|
+
tiny previews or genuinely linear step flows. Repeat a wireframe in the document
|
|
636
|
+
only for a genuinely new detail view or comparison. Skip the visual surface
|
|
637
|
+
entirely for non-visual work and write a clean rich document. For a simple
|
|
638
|
+
binary UI visual choice, show the two directions in the canvas only; do not
|
|
639
|
+
repeat the same options as body wireframes, a \`decision\` block, or prose. Put
|
|
640
|
+
the actual choice in the bottom "Open Questions" form.
|
|
566
641
|
|
|
567
642
|
**Use the right block, and make it carry substance.** For the authoritative,
|
|
568
643
|
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
@@ -572,14 +647,23 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
572
647
|
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
573
648
|
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
574
649
|
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
575
|
-
concise syntax-highlighted snippet of the code shape
|
|
576
|
-
never a prose-only file list.
|
|
650
|
+
concise syntax-highlighted snippet of the code shape in every file tab —
|
|
651
|
+
never the whole file, never a prose-only file list. If the exact code is not
|
|
652
|
+
known yet, include the smallest plausible planned shape or a short comment
|
|
653
|
+
stub that names what needs to be filled in.
|
|
577
654
|
- \`decision\` for two or three option cards with consequences. These are static
|
|
578
655
|
records; do not style them like clickable tabs or chips unless the renderer
|
|
579
656
|
truly supports changing the selection.
|
|
580
|
-
- \`diagram\` for architecture,
|
|
581
|
-
relationships, only when it clarifies something real.
|
|
582
|
-
|
|
657
|
+
- \`diagram\` for two-dimensional architecture, dependency, data-flow, or state
|
|
658
|
+
relationships, only when it clarifies something real. For architecture/code
|
|
659
|
+
diagrams, prefer \`data.html\` / \`data.css\` with semantic HTML and inline SVG so
|
|
660
|
+
the diagram can use panels, layers, matrices, arrows, annotations, and
|
|
661
|
+
responsive layout directly. Use legacy \`nodes\` / \`edges\` only for small
|
|
662
|
+
previews or truly sequential flows. In architecture/code plans, prefer a
|
|
663
|
+
repeated section rhythm: recommendation title, confidence and category badges,
|
|
664
|
+
code-path evidence, a local before/after or current/target spatial diagram,
|
|
665
|
+
then concise Problem/Solution/Why text. Labels must not overlap nodes,
|
|
666
|
+
connectors, or each other.
|
|
583
667
|
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
584
668
|
only prose usually means the plan is under-specified — include a relevant
|
|
585
669
|
visual unless the tab is intentionally document-only.
|
|
@@ -587,21 +671,24 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
587
671
|
|
|
588
672
|
**Open questions live at the bottom as a form when answers would change the
|
|
589
673
|
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
590
|
-
block titled "Open Questions"
|
|
591
|
-
\`
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
674
|
+
block titled "Open Questions" so the renderer presents it as a distinct section.
|
|
675
|
+
Use \`single\` or \`multi\` for clear choices, \`freeform\` for constraints,
|
|
676
|
+
\`recommended: true\` for the default you would pick, and option \`wireframe\` /
|
|
677
|
+
\`diagram\` previews only when the options are not already visible in the top
|
|
678
|
+
canvas. Keep non-answerable assumptions or risks as concise \`callout\` blocks in
|
|
679
|
+
the relevant section. Never bury a questions/decisions wall inside the plan
|
|
680
|
+
narrative, and never ask the same question in both a \`decision\` block and a
|
|
681
|
+
\`question-form\`.
|
|
596
682
|
|
|
597
683
|
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
598
684
|
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
599
685
|
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
600
|
-
blocks for normal plans.
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
the
|
|
686
|
+
blocks for normal plans. For architecture/code reviews, use \`diagram\`
|
|
687
|
+
\`data.html\` / \`data.css\` for rich local HTML/SVG diagrams instead of
|
|
688
|
+
\`custom-html\`. For UI/product work, \`custom-html\` is never the primary home for a
|
|
689
|
+
requested mockup, UI state, or visual comparison. If UI fidelity requires
|
|
690
|
+
HTML/CSS, image capture, or real React/CSS, the product fix is canvas support
|
|
691
|
+
for that artifact type, not moving the mockup into the document.
|
|
605
692
|
|
|
606
693
|
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
607
694
|
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
@@ -629,6 +716,16 @@ changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
|
629
716
|
whose screens use the same labels and states as the canvas artboards, with
|
|
630
717
|
\`data-goto\` controls for the sequence. This is the bar.
|
|
631
718
|
|
|
719
|
+
**GOOD.** A \`/visual-plan\` for a backend architecture review: no top canvas.
|
|
720
|
+
The document opens with context and a legend, then repeats recommendation cards:
|
|
721
|
+
title, confidence/category badges, a monospace grid of real file paths, one
|
|
722
|
+
inline two-dimensional before/after or layered architecture diagram, and terse
|
|
723
|
+
Problem/Solution/Why bullets using the codebase's vocabulary. The diagram uses
|
|
724
|
+
space to show boundaries, layers, and ownership; it is not a default
|
|
725
|
+
left-to-right chain. The plan ends with a top recommendation and a bottom
|
|
726
|
+
question-form only if the next architecture direction is genuinely open. This is
|
|
727
|
+
better than a top canvas because each diagram is local to the claim it supports.
|
|
728
|
+
|
|
632
729
|
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
633
730
|
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
634
731
|
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
@@ -636,22 +733,26 @@ annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
|
636
733
|
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
637
734
|
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
638
735
|
document with a hero heading and value props that just restates what the canvas
|
|
639
|
-
already shows.
|
|
736
|
+
already shows. Also bad: an architecture-only plan forced into a top canvas of
|
|
737
|
+
labeled boxes with overlapping text, where the actual code evidence and
|
|
738
|
+
recommendations live elsewhere. Never produce this.
|
|
640
739
|
|
|
641
740
|
<!-- SHARED-CORE:exemplar END -->
|
|
642
741
|
|
|
643
742
|
## Tool Guidance
|
|
644
743
|
|
|
645
|
-
- \`create-visual-plan\`: start one structured visual plan per agent task/run
|
|
646
|
-
|
|
744
|
+
- \`create-visual-plan\`: start one structured visual plan per agent task/run, or
|
|
745
|
+
import an existing text plan by passing \`planText\`; \`content\` may include no
|
|
746
|
+
visual surface, canvas only, or canvas + prototype.
|
|
647
747
|
- \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
|
|
648
748
|
- \`create-prototype-plan\`: start a prototype-first plan with a functional top
|
|
649
749
|
review surface.
|
|
750
|
+
- \`create-plan-design\`: start a full-fidelity branded Design-tab plan with an
|
|
751
|
+
optional matching Prototype tab.
|
|
650
752
|
- \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
|
|
651
753
|
into a prototype plan.
|
|
652
754
|
- \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
|
|
653
755
|
command, not as \`/visual-plan\` preflight.
|
|
654
|
-
- \`visualize-plan\`: build a visual companion from an existing text plan.
|
|
655
756
|
- \`update-visual-plan\`: revise content, status, or comments; prefer
|
|
656
757
|
\`contentPatches\` over regenerating the whole plan.
|
|
657
758
|
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
@@ -683,8 +784,8 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
683
784
|
agent-native skills add visual-plan
|
|
684
785
|
\`\`\`
|
|
685
786
|
|
|
686
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
|
|
687
|
-
\`/visual-questions
|
|
787
|
+
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
788
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
688
789
|
register the connector without authenticating, then run
|
|
689
790
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
690
791
|
|
|
@@ -727,9 +828,10 @@ react to.
|
|
|
727
828
|
|
|
728
829
|
\`/visual-plan\` remains the general command for architecture, backend, refactors,
|
|
729
830
|
and mixed work. Use \`/prototype-plan\` when the UI review needs a functional live
|
|
730
|
-
prototype instead of static screens. Use \`/
|
|
731
|
-
|
|
732
|
-
|
|
831
|
+
prototype instead of static screens. Use \`/plan-design\` when polish, brand, or
|
|
832
|
+
visual fidelity are material to the decision. Use \`/visual-questions\` only when
|
|
833
|
+
the user explicitly wants visual intake before planning. Use \`/visual-plan\` when
|
|
834
|
+
a text plan already exists and should become the source material for the review.
|
|
733
835
|
|
|
734
836
|
## Plan Discipline
|
|
735
837
|
|
|
@@ -785,9 +887,9 @@ the user has supplied it.
|
|
|
785
887
|
|
|
786
888
|
## Wireframe & Canvas Core
|
|
787
889
|
|
|
788
|
-
This section is shared, word for word, by \`/visual-plan
|
|
789
|
-
|
|
790
|
-
|
|
890
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
891
|
+
the single source of truth for how wireframes and the canvas work. Do not
|
|
892
|
+
paraphrase it per command.
|
|
791
893
|
|
|
792
894
|
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
793
895
|
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
@@ -854,6 +956,15 @@ the current screen's real layout and footprint FIRST, then change only the delta
|
|
|
854
956
|
and call it out with a single annotation. Do not restack the page into a new
|
|
855
957
|
layout. For net-new surfaces, compose from the real app shell.
|
|
856
958
|
|
|
959
|
+
**Classify mockup scope before implementation.** Before turning a plan mockup
|
|
960
|
+
into source code, decide whether each artboard represents the whole page/app
|
|
961
|
+
shell, a route body inside an existing shell, or a component/sub-surface. If an
|
|
962
|
+
artboard includes navigation, sidebars, auth banners, or a signup/login form,
|
|
963
|
+
map those pieces to the real shared shell/auth components instead of nesting the
|
|
964
|
+
entire mockup inside the current page. When a mockup references the product's
|
|
965
|
+
standard signup/login page, find and reuse that existing implementation; do not
|
|
966
|
+
approximate it from the wireframe.
|
|
967
|
+
|
|
857
968
|
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
858
969
|
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
859
970
|
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
@@ -907,7 +1018,15 @@ In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
|
907
1018
|
\`update-rich-text\` content patches or source patches for prose, and use
|
|
908
1019
|
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
909
1020
|
|
|
910
|
-
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
1021
|
+
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
1022
|
+
you place on the canvas must carry an \`html\` wireframe or reference a wireframe
|
|
1023
|
+
block via \`blockId\`; when using \`blockId\`, the referenced \`wireframe\` /
|
|
1024
|
+
\`legacy-wireframe\` block must remain in the plan. If you remove a duplicate
|
|
1025
|
+
wireframe from the document body, first move its \`data\` inline onto the
|
|
1026
|
+
corresponding \`content.canvas.frames[*].wireframe\` / \`legacyWireframe\`. A
|
|
1027
|
+
label-only frame or a frame pointing at a deleted block renders empty and is
|
|
1028
|
+
rejected at parse time. If you only have a title, write it as a section header or
|
|
1029
|
+
annotation, not an empty artboard.
|
|
911
1030
|
|
|
912
1031
|
**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).
|
|
913
1032
|
|
|
@@ -916,7 +1035,9 @@ composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
|
916
1035
|
hex colors:
|
|
917
1036
|
|
|
918
1037
|
\`\`\`html
|
|
919
|
-
<div
|
|
1038
|
+
<div
|
|
1039
|
+
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
1040
|
+
>
|
|
920
1041
|
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
921
1042
|
<h1>Contacts</h1>
|
|
922
1043
|
<button class="primary">New contact</button>
|
|
@@ -926,33 +1047,48 @@ hex colors:
|
|
|
926
1047
|
<span class="wf-pill">Favorites</span>
|
|
927
1048
|
<span class="wf-pill">Archived</span>
|
|
928
1049
|
</div>
|
|
929
|
-
<div
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
1050
|
+
<div
|
|
1051
|
+
class="wf-card"
|
|
1052
|
+
style="display:flex;flex-direction:column;gap:0;padding:0"
|
|
1053
|
+
>
|
|
1054
|
+
<div
|
|
1055
|
+
style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)"
|
|
1056
|
+
>
|
|
1057
|
+
<div
|
|
1058
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
1059
|
+
></div>
|
|
1060
|
+
<div style="flex:1">
|
|
1061
|
+
<strong>Jane Cooper</strong><br /><small>jane@acme.co</small>
|
|
1062
|
+
</div>
|
|
933
1063
|
<span class="wf-pill">Lead</span>
|
|
934
1064
|
</div>
|
|
935
1065
|
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
936
|
-
<div
|
|
937
|
-
|
|
1066
|
+
<div
|
|
1067
|
+
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
1068
|
+
></div>
|
|
1069
|
+
<div style="flex:1">
|
|
1070
|
+
<strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>
|
|
1071
|
+
</div>
|
|
938
1072
|
<span class="wf-pill">Customer</span>
|
|
939
1073
|
</div>
|
|
940
1074
|
</div>
|
|
941
1075
|
</div>
|
|
942
1076
|
\`\`\`
|
|
943
1077
|
|
|
944
|
-
**
|
|
945
|
-
canvas; multi-step flows get both canvas wireframes and a
|
|
946
|
-
user asks for a mockup, UI state, loading state, layout,
|
|
947
|
-
comparison, make the canvas the primary home for that static
|
|
948
|
-
user asks for a prototype or the plan contains a sequence the
|
|
949
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
950
|
-
shows Wireframes / Prototype tabs.
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1078
|
+
**UI mockups belong in the top visual review area.** Static UI/product visuals
|
|
1079
|
+
live on the canvas; multi-step UI flows get both canvas wireframes and a
|
|
1080
|
+
prototype. When the user asks for a mockup, UI state, loading state, layout,
|
|
1081
|
+
screen, or visual comparison, make the canvas the primary home for that static
|
|
1082
|
+
visual. When the user asks for a prototype or the plan contains a sequence the
|
|
1083
|
+
reviewer must feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
1084
|
+
top surface shows Wireframes / Prototype tabs. Architecture/code diagrams are
|
|
1085
|
+
different: keep them inline in the document, close to the recommendation they
|
|
1086
|
+
support, unless the user explicitly asks for a spatial board. Document blocks
|
|
1087
|
+
can explain, compare, or map implementation, but they should not host the
|
|
1088
|
+
primary UI mockup or prototype just because \`custom-html\`, screenshots, or prose
|
|
1089
|
+
are easier to produce. If the canvas/prototype surface cannot represent the
|
|
1090
|
+
requested UI fidelity, still keep the closest top-surface representation and
|
|
1091
|
+
call out or extend the needed renderer capability.
|
|
956
1092
|
|
|
957
1093
|
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
958
1094
|
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
@@ -970,9 +1106,9 @@ plan.
|
|
|
970
1106
|
|
|
971
1107
|
## Document Quality Core
|
|
972
1108
|
|
|
973
|
-
This section is shared, word for word, by \`/visual-plan
|
|
974
|
-
|
|
975
|
-
|
|
1109
|
+
This section is shared, word for word, by \`/visual-plan\` and \`/ui-plan\`. It is
|
|
1110
|
+
the single source of truth for the document below the canvas. Do not paraphrase
|
|
1111
|
+
it per command.
|
|
976
1112
|
|
|
977
1113
|
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
978
1114
|
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
@@ -984,14 +1120,27 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
|
984
1120
|
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
985
1121
|
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
986
1122
|
|
|
987
|
-
**
|
|
988
|
-
the top visual surface: canvas artboards for
|
|
989
|
-
tabs when the flow should be functional. The
|
|
990
|
-
the visuals cannot show — concrete
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1123
|
+
**When top visuals exist, they and the document never duplicate each other.**
|
|
1124
|
+
For UI work, the UI story lives in the top visual surface: canvas artboards for
|
|
1125
|
+
static inspection, plus prototype tabs when the flow should be functional. The
|
|
1126
|
+
document carries the technical depth the visuals cannot show — concrete
|
|
1127
|
+
file/symbol maps, API and data contracts, code snippets, migration or
|
|
1128
|
+
implementation phases, risks, and validation. For architecture/code reviews,
|
|
1129
|
+
invert that: the document is the visual surface, and each recommendation should
|
|
1130
|
+
carry its own nearby inline \`diagram\` / \`data-model\` block plus file evidence
|
|
1131
|
+
and terse Problem/Solution/Why text. For architecture/code diagrams, prefer
|
|
1132
|
+
standard two-dimensional layouts: paired before/after panels, layered diagrams,
|
|
1133
|
+
swimlanes, dependency maps, matrices, or grouped regions. Do not default to
|
|
1134
|
+
left-to-right chains; use a line only when the relationship is truly a sequence.
|
|
1135
|
+
Use native \`diagram\` blocks with \`data.html\` / \`data.css\` for these richer
|
|
1136
|
+
layouts; the fragment may use semantic HTML and inline SVG, and the renderer
|
|
1137
|
+
applies the viewer's sketch/clean style. Legacy \`nodes\` / \`edges\` are only for
|
|
1138
|
+
tiny previews or genuinely linear step flows. Repeat a wireframe in the document
|
|
1139
|
+
only for a genuinely new detail view or comparison. Skip the visual surface
|
|
1140
|
+
entirely for non-visual work and write a clean rich document. For a simple
|
|
1141
|
+
binary UI visual choice, show the two directions in the canvas only; do not
|
|
1142
|
+
repeat the same options as body wireframes, a \`decision\` block, or prose. Put
|
|
1143
|
+
the actual choice in the bottom "Open Questions" form.
|
|
995
1144
|
|
|
996
1145
|
**Use the right block, and make it carry substance.** For the authoritative,
|
|
997
1146
|
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
@@ -1001,14 +1150,23 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
1001
1150
|
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
1002
1151
|
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
1003
1152
|
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
1004
|
-
concise syntax-highlighted snippet of the code shape
|
|
1005
|
-
never a prose-only file list.
|
|
1153
|
+
concise syntax-highlighted snippet of the code shape in every file tab —
|
|
1154
|
+
never the whole file, never a prose-only file list. If the exact code is not
|
|
1155
|
+
known yet, include the smallest plausible planned shape or a short comment
|
|
1156
|
+
stub that names what needs to be filled in.
|
|
1006
1157
|
- \`decision\` for two or three option cards with consequences. These are static
|
|
1007
1158
|
records; do not style them like clickable tabs or chips unless the renderer
|
|
1008
1159
|
truly supports changing the selection.
|
|
1009
|
-
- \`diagram\` for architecture,
|
|
1010
|
-
relationships, only when it clarifies something real.
|
|
1011
|
-
|
|
1160
|
+
- \`diagram\` for two-dimensional architecture, dependency, data-flow, or state
|
|
1161
|
+
relationships, only when it clarifies something real. For architecture/code
|
|
1162
|
+
diagrams, prefer \`data.html\` / \`data.css\` with semantic HTML and inline SVG so
|
|
1163
|
+
the diagram can use panels, layers, matrices, arrows, annotations, and
|
|
1164
|
+
responsive layout directly. Use legacy \`nodes\` / \`edges\` only for small
|
|
1165
|
+
previews or truly sequential flows. In architecture/code plans, prefer a
|
|
1166
|
+
repeated section rhythm: recommendation title, confidence and category badges,
|
|
1167
|
+
code-path evidence, a local before/after or current/target spatial diagram,
|
|
1168
|
+
then concise Problem/Solution/Why text. Labels must not overlap nodes,
|
|
1169
|
+
connectors, or each other.
|
|
1012
1170
|
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1013
1171
|
only prose usually means the plan is under-specified — include a relevant
|
|
1014
1172
|
visual unless the tab is intentionally document-only.
|
|
@@ -1016,21 +1174,24 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
1016
1174
|
|
|
1017
1175
|
**Open questions live at the bottom as a form when answers would change the
|
|
1018
1176
|
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1019
|
-
block titled "Open Questions"
|
|
1020
|
-
\`
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1177
|
+
block titled "Open Questions" so the renderer presents it as a distinct section.
|
|
1178
|
+
Use \`single\` or \`multi\` for clear choices, \`freeform\` for constraints,
|
|
1179
|
+
\`recommended: true\` for the default you would pick, and option \`wireframe\` /
|
|
1180
|
+
\`diagram\` previews only when the options are not already visible in the top
|
|
1181
|
+
canvas. Keep non-answerable assumptions or risks as concise \`callout\` blocks in
|
|
1182
|
+
the relevant section. Never bury a questions/decisions wall inside the plan
|
|
1183
|
+
narrative, and never ask the same question in both a \`decision\` block and a
|
|
1184
|
+
\`question-form\`.
|
|
1025
1185
|
|
|
1026
1186
|
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
1027
1187
|
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1028
1188
|
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1029
|
-
blocks for normal plans.
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
the
|
|
1189
|
+
blocks for normal plans. For architecture/code reviews, use \`diagram\`
|
|
1190
|
+
\`data.html\` / \`data.css\` for rich local HTML/SVG diagrams instead of
|
|
1191
|
+
\`custom-html\`. For UI/product work, \`custom-html\` is never the primary home for a
|
|
1192
|
+
requested mockup, UI state, or visual comparison. If UI fidelity requires
|
|
1193
|
+
HTML/CSS, image capture, or real React/CSS, the product fix is canvas support
|
|
1194
|
+
for that artifact type, not moving the mockup into the document.
|
|
1034
1195
|
|
|
1035
1196
|
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
1036
1197
|
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
@@ -1058,6 +1219,16 @@ changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
|
1058
1219
|
whose screens use the same labels and states as the canvas artboards, with
|
|
1059
1220
|
\`data-goto\` controls for the sequence. This is the bar.
|
|
1060
1221
|
|
|
1222
|
+
**GOOD.** A \`/visual-plan\` for a backend architecture review: no top canvas.
|
|
1223
|
+
The document opens with context and a legend, then repeats recommendation cards:
|
|
1224
|
+
title, confidence/category badges, a monospace grid of real file paths, one
|
|
1225
|
+
inline two-dimensional before/after or layered architecture diagram, and terse
|
|
1226
|
+
Problem/Solution/Why bullets using the codebase's vocabulary. The diagram uses
|
|
1227
|
+
space to show boundaries, layers, and ownership; it is not a default
|
|
1228
|
+
left-to-right chain. The plan ends with a top recommendation and a bottom
|
|
1229
|
+
question-form only if the next architecture direction is genuinely open. This is
|
|
1230
|
+
better than a top canvas because each diagram is local to the claim it supports.
|
|
1231
|
+
|
|
1061
1232
|
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1062
1233
|
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1063
1234
|
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
@@ -1065,7 +1236,9 @@ annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
|
1065
1236
|
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1066
1237
|
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1067
1238
|
document with a hero heading and value props that just restates what the canvas
|
|
1068
|
-
already shows.
|
|
1239
|
+
already shows. Also bad: an architecture-only plan forced into a top canvas of
|
|
1240
|
+
labeled boxes with overlapping text, where the actual code evidence and
|
|
1241
|
+
recommendations live elsewhere. Never produce this.
|
|
1069
1242
|
|
|
1070
1243
|
<!-- SHARED-CORE:exemplar END -->
|
|
1071
1244
|
|
|
@@ -1074,6 +1247,8 @@ already shows. Never produce this.
|
|
|
1074
1247
|
- \`create-ui-plan\`: create the UI-first structured visual plan.
|
|
1075
1248
|
- \`create-prototype-plan\`: create a prototype-first plan when UI review needs a
|
|
1076
1249
|
functional live prototype.
|
|
1250
|
+
- \`create-plan-design\`: create a full-fidelity branded design plan when polish,
|
|
1251
|
+
brand, and detailed visual direction are primary review inputs.
|
|
1077
1252
|
- \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
|
|
1078
1253
|
into a prototype plan.
|
|
1079
1254
|
- \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
|
|
@@ -1109,8 +1284,8 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
1109
1284
|
agent-native skills add visual-plan
|
|
1110
1285
|
\`\`\`
|
|
1111
1286
|
|
|
1112
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
|
|
1113
|
-
\`/visual-questions
|
|
1287
|
+
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1288
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1114
1289
|
register the connector without authenticating, then run
|
|
1115
1290
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1116
1291
|
|
|
@@ -1164,9 +1339,9 @@ and operate UI states, needs design review before code, wants comments pinned to
|
|
|
1164
1339
|
live screens, or asks to move a visual plan into a prototype.
|
|
1165
1340
|
|
|
1166
1341
|
Prefer \`/visual-plan\` for architecture, data flow, or non-interactive planning.
|
|
1167
|
-
Prefer \`/ui-plan\` when static screen review is enough. Use \`/
|
|
1168
|
-
|
|
1169
|
-
|
|
1342
|
+
Prefer \`/ui-plan\` when static screen review is enough. Use \`/visual-plan\` first
|
|
1343
|
+
when the user hands you an existing Markdown/Codex/Claude plan that needs a
|
|
1344
|
+
visual companion before becoming interactive.
|
|
1170
1345
|
|
|
1171
1346
|
## Core Workflow
|
|
1172
1347
|
|
|
@@ -1290,9 +1465,117 @@ reviewing and iterating.
|
|
|
1290
1465
|
|
|
1291
1466
|
- \`visual-plan\`
|
|
1292
1467
|
- \`ui-plan\`
|
|
1293
|
-
- \`visualize-plan\`
|
|
1294
1468
|
- \`visual-questions\`
|
|
1295
1469
|
`;
|
|
1470
|
+
export const PLAN_DESIGN_SKILL_MD = `---
|
|
1471
|
+
name: plan-design
|
|
1472
|
+
description: >-
|
|
1473
|
+
Use Agent-Native Plans for full-fidelity UI design planning with a Design
|
|
1474
|
+
canvas tab and optional interactive Prototype tab before implementation.
|
|
1475
|
+
metadata:
|
|
1476
|
+
visibility: exported
|
|
1477
|
+
---
|
|
1478
|
+
|
|
1479
|
+
# Plan Design
|
|
1480
|
+
|
|
1481
|
+
Use \`/plan-design\` when the user needs a high-fidelity product design before
|
|
1482
|
+
implementation: polished branded screens, realistic content, visual direction,
|
|
1483
|
+
and interaction review. It is the full-fidelity companion to \`/visual-plan\` and
|
|
1484
|
+
\`/prototype-plan\`: the top review surface should show \`Design\` and, when the
|
|
1485
|
+
flow needs interaction, \`Prototype\`.
|
|
1486
|
+
|
|
1487
|
+
## When To Use
|
|
1488
|
+
|
|
1489
|
+
Use this for UI-heavy work where brand, visual hierarchy, polished layout, or
|
|
1490
|
+
interaction feel are material to the decision. Skip it for small copy, spacing,
|
|
1491
|
+
or obvious component changes.
|
|
1492
|
+
|
|
1493
|
+
## Research First
|
|
1494
|
+
|
|
1495
|
+
Before creating the plan:
|
|
1496
|
+
|
|
1497
|
+
1. Inspect the real app shell, routes, components, CSS variables, Tailwind
|
|
1498
|
+
tokens, theme files, and any relevant screenshots.
|
|
1499
|
+
2. If \`design.md\` exists, treat it as the primary design brief and pass its
|
|
1500
|
+
important content into \`create-plan-design.designMd\`.
|
|
1501
|
+
3. If a \`.fig\` local-copy file or parsed brand kit is available, use the
|
|
1502
|
+
Design/brand-kit parsing actions from the app or shared tooling first, then
|
|
1503
|
+
pass the extracted token summary into \`brandKit\`.
|
|
1504
|
+
4. Parse existing codebase style info when possible: CSS custom properties,
|
|
1505
|
+
Tailwind config, global CSS, font declarations, spacing/radius tokens, and
|
|
1506
|
+
component conventions. Pass the compact evidence into \`codebaseStyles\`.
|
|
1507
|
+
5. Ground every screen in actual product content. Avoid lorem ipsum, generic
|
|
1508
|
+
marketing filler, and placeholder gray boxes unless designing an explicit
|
|
1509
|
+
loading state.
|
|
1510
|
+
|
|
1511
|
+
## Create The Plan
|
|
1512
|
+
|
|
1513
|
+
Call \`create-plan-design\` with:
|
|
1514
|
+
|
|
1515
|
+
- \`title\`, \`brief\`, \`repoPath\`, and any \`implementationNotes\`.
|
|
1516
|
+
- \`designMd\`, \`brandKit\`, \`codebaseStyles\`, or \`designNotes\` when available.
|
|
1517
|
+
- \`screens\`: one to six full-fidelity HTML/CSS screen fragments. Each screen
|
|
1518
|
+
must include a bounded \`html\` fragment, optional scoped \`css\`, a \`surface\`,
|
|
1519
|
+
and stable \`data-design-id\` attributes on elements a reviewer might edit.
|
|
1520
|
+
- \`transitions\` only when the Prototype tab should support true screen/step
|
|
1521
|
+
navigation. Use \`data-goto="screen-id"\` in the screen HTML for those controls.
|
|
1522
|
+
|
|
1523
|
+
The Design tab is the visual source of truth. The Prototype tab is for behavior
|
|
1524
|
+
and should reuse the same visual styling where practical. Do not create a
|
|
1525
|
+
separate design direction in the prototype.
|
|
1526
|
+
|
|
1527
|
+
## Full-Fidelity HTML Rules
|
|
1528
|
+
|
|
1529
|
+
- Write bounded fragments only: no \`<html>\`, \`<head>\`, \`<body>\`, \`<script>\`,
|
|
1530
|
+
\`<style>\`, external imports, iframes, SVG, or executable URLs.
|
|
1531
|
+
- Put CSS in the screen \`css\` field. The renderer scopes it to the artboard.
|
|
1532
|
+
- Use real CSS and CSS variables. Tailwind-like class names are fine only when
|
|
1533
|
+
the provided \`css\` defines them or the classes are harmless semantic hooks.
|
|
1534
|
+
- Use \`renderMode: "design"\` on design screen data when authoring full
|
|
1535
|
+
structured content directly.
|
|
1536
|
+
- Add \`data-design-id="meaningful-name"\` to editable elements such as hero
|
|
1537
|
+
panels, key buttons, cards, nav items, pricing rows, chart panels, and state
|
|
1538
|
+
chips. Keep ids stable and descriptive.
|
|
1539
|
+
- Keep the design responsive within the selected surface. Text must not clip,
|
|
1540
|
+
overlap, or rely on viewport-sized type.
|
|
1541
|
+
|
|
1542
|
+
## Targeted Style Edits
|
|
1543
|
+
|
|
1544
|
+
When a reviewer selects an element in the Design tab or asks for a specific
|
|
1545
|
+
style change, avoid regenerating the whole plan. Use:
|
|
1546
|
+
|
|
1547
|
+
\`\`\`json
|
|
1548
|
+
{
|
|
1549
|
+
"op": "update-design-element-style",
|
|
1550
|
+
"frameId": "frame-overview",
|
|
1551
|
+
"elementId": "primary-cta",
|
|
1552
|
+
"styles": {
|
|
1553
|
+
"background-color": "#0f766e",
|
|
1554
|
+
"border-radius": "10px"
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
\`\`\`
|
|
1558
|
+
|
|
1559
|
+
Use \`frameId\` for inline canvas designs or \`blockId\` for a referenced wireframe
|
|
1560
|
+
block. Set a style value to \`null\` to remove it. Use \`patch-wireframe-html\` or
|
|
1561
|
+
\`patch-prototype-html\` for text/content changes inside a fragment.
|
|
1562
|
+
|
|
1563
|
+
## Document Handoff
|
|
1564
|
+
|
|
1565
|
+
Below the visual surface, keep the document concise and implementation-oriented:
|
|
1566
|
+
actual files and symbols, state/actions/contracts, open questions, risks, and
|
|
1567
|
+
verification. The document should not repeat the same screens in prose.
|
|
1568
|
+
|
|
1569
|
+
Before implementation, call \`get-plan-feedback\` and treat comments, selected
|
|
1570
|
+
element details, and recent review events as the source of truth.
|
|
1571
|
+
|
|
1572
|
+
## Related Skills
|
|
1573
|
+
|
|
1574
|
+
- \`visual-plan\`
|
|
1575
|
+
- \`ui-plan\`
|
|
1576
|
+
- \`prototype-plan\`
|
|
1577
|
+
- \`frontend-design\`
|
|
1578
|
+
`;
|
|
1296
1579
|
export const VISUAL_QUESTIONS_SKILL_MD = `---
|
|
1297
1580
|
name: visual-questions
|
|
1298
1581
|
description: >-
|
|
@@ -1306,10 +1589,10 @@ metadata:
|
|
|
1306
1589
|
# Visual Questions
|
|
1307
1590
|
|
|
1308
1591
|
Use \`/visual-questions\` when the next best step is not a plan yet, but a
|
|
1309
|
-
reviewable visual intake: single-choice
|
|
1310
|
-
notes, mockup choices, sketch diagrams, and a generated answer summary
|
|
1311
|
-
the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
1312
|
-
\`/prototype-plan\`, and \`/
|
|
1592
|
+
reviewable visual intake: single-choice option rows, multi-select option rows,
|
|
1593
|
+
freeform notes, mockup choices, sketch diagrams, and a generated answer summary
|
|
1594
|
+
that feeds the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
1595
|
+
\`/prototype-plan\`, and \`/plan-design\`.
|
|
1313
1596
|
|
|
1314
1597
|
## When To Use
|
|
1315
1598
|
|
|
@@ -1320,11 +1603,11 @@ the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
|
1320
1603
|
than answering text-only prompts.
|
|
1321
1604
|
|
|
1322
1605
|
Gate hard: skip this for tiny, unambiguous changes. If the agent can reasonably
|
|
1323
|
-
infer the answer, prefer \`/ui-plan\`, \`/prototype-plan\`,
|
|
1324
|
-
assumptions in the plan.
|
|
1606
|
+
infer the answer, prefer \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`, or
|
|
1607
|
+
\`/visual-plan\` directly and put assumptions in the plan.
|
|
1325
1608
|
|
|
1326
1609
|
Visual questions are an explicit intake command, not an automatic preflight for
|
|
1327
|
-
\`/visual-plan\`, \`/ui-plan\`, or \`/
|
|
1610
|
+
\`/visual-plan\`, \`/ui-plan\`, \`/prototype-plan\`, or \`/plan-design\`.
|
|
1328
1611
|
|
|
1329
1612
|
## Workflow
|
|
1330
1613
|
|
|
@@ -1335,9 +1618,10 @@ Visual questions are an explicit intake command, not an automatic preflight for
|
|
|
1335
1618
|
3. Surface the returned Plans link and ask the user to answer visually.
|
|
1336
1619
|
4. The generated summary drives the next step: \`create-ui-plan\` for static UI
|
|
1337
1620
|
review, \`create-prototype-plan\` for click-through UI flows,
|
|
1338
|
-
\`create-
|
|
1339
|
-
|
|
1340
|
-
fold answers into
|
|
1621
|
+
\`create-plan-design\` for high-fidelity branded UI review,
|
|
1622
|
+
\`create-visual-plan\` for general plans or when a text plan already exists,
|
|
1623
|
+
or \`update-visual-plan\` with targeted \`contentPatches\` to fold answers into
|
|
1624
|
+
an active plan.
|
|
1341
1625
|
5. If the user leaves comments, call \`get-plan-feedback\` before using the answers.
|
|
1342
1626
|
|
|
1343
1627
|
## Question Types
|
|
@@ -1374,8 +1658,11 @@ desktop/mobile pair for a popover, panel, or component.
|
|
|
1374
1658
|
- \`create-ui-plan\`: create a UI-first plan from the answers.
|
|
1375
1659
|
- \`create-prototype-plan\`: create a prototype-first plan from the answers when
|
|
1376
1660
|
interaction feel matters.
|
|
1377
|
-
- \`create-
|
|
1378
|
-
|
|
1661
|
+
- \`create-plan-design\`: create a high-fidelity branded design plan from the
|
|
1662
|
+
answers when visual polish is the primary review input.
|
|
1663
|
+
- \`create-visual-plan\`: create a general visual plan from the answers, or pass
|
|
1664
|
+
existing plan text as \`planText\` when the answers should shape an imported
|
|
1665
|
+
plan.
|
|
1379
1666
|
- \`export-visual-plan\`: export answer plans as HTML, Markdown fallback,
|
|
1380
1667
|
structured JSON, and MDX files when the intake needs to be checked into a repo.
|
|
1381
1668
|
- \`read-visual-plan-source\` / \`patch-visual-plan-source\`: inspect or patch the
|
|
@@ -1394,456 +1681,8 @@ intended), so the first tool call does not hit an OAuth wall:
|
|
|
1394
1681
|
agent-native skills add visual-plan
|
|
1395
1682
|
\`\`\`
|
|
1396
1683
|
|
|
1397
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
|
|
1398
|
-
\`/visual-questions
|
|
1399
|
-
register the connector without authenticating, then run
|
|
1400
|
-
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1401
|
-
|
|
1402
|
-
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
1403
|
-
with no sign-up — you work as a guest. Sign in only when you want to save or
|
|
1404
|
-
share; signing in claims the plans you made as a guest into your account.
|
|
1405
|
-
|
|
1406
|
-
Sharing and commenting require an account: public/shared plans are viewable by
|
|
1407
|
-
anyone with the link, but commenting on them needs an agent-native account.
|
|
1408
|
-
|
|
1409
|
-
For fully offline, no-account use, run the Plans app locally and sync plans to
|
|
1410
|
-
your repo as MDX. This local mode is a separate advanced path, not the default
|
|
1411
|
-
hosted flow.
|
|
1412
|
-
|
|
1413
|
-
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`,
|
|
1414
|
-
do not keep retrying the tool. Authenticate the connector with
|
|
1415
|
-
\`agent-native connect https://plan.agent-native.com\` (OAuth-capable hosts can
|
|
1416
|
-
instead re-run /mcp and choose Authenticate), then continue once the connector
|
|
1417
|
-
is available.
|
|
1418
|
-
|
|
1419
|
-
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
1420
|
-
not put shared secrets in skill files.
|
|
1421
|
-
`;
|
|
1422
|
-
export const VISUALIZE_PLAN_SKILL_MD = `---
|
|
1423
|
-
name: visualize-plan
|
|
1424
|
-
description: >-
|
|
1425
|
-
Convert an existing Codex, Claude Code, Markdown, or pasted plan into an
|
|
1426
|
-
Agent-Native Plans visual companion with diagrams, wireframes, prototypes,
|
|
1427
|
-
annotations, and feedback.
|
|
1428
|
-
metadata:
|
|
1429
|
-
visibility: exported
|
|
1430
|
-
---
|
|
1431
|
-
|
|
1432
|
-
# Visualize Plan
|
|
1433
|
-
|
|
1434
|
-
Use \`/visualize-plan\` when a plan already exists and the user wants it easier to
|
|
1435
|
-
review. The native Codex or Claude Code plan can stay where it is; Agent-Native
|
|
1436
|
-
Plans creates a structured visual companion beside it — diagrams, wireframes,
|
|
1437
|
-
state sketches, functional prototypes, option cards, and comment prompts instead
|
|
1438
|
-
of a wall of text. It still reads like a plan, not a marketing page.
|
|
1439
|
-
|
|
1440
|
-
Use \`/prototype-plan\` instead when the user wants a functional prototype as the first
|
|
1441
|
-
artifact and there is no text plan to preserve. When a text plan already exists,
|
|
1442
|
-
\`/visualize-plan\` should decide whether it needs no visual surface, canvas only,
|
|
1443
|
-
or canvas + prototype; call \`convert-visual-plan-to-prototype\` after
|
|
1444
|
-
visualization when its HTML wireframes should drive a prototype review.
|
|
1445
|
-
|
|
1446
|
-
## Plan Discipline
|
|
1447
|
-
|
|
1448
|
-
- **Gate hard.** A visual companion is worth it only when the source plan is
|
|
1449
|
-
long, risky, or hard to react to as text. If the source plan is for trivial,
|
|
1450
|
-
unambiguous work, skip the companion and just implement.
|
|
1451
|
-
- **Stay grounded and read-only.** Preserve the source plan's intent, do not
|
|
1452
|
-
invent codebase facts, and label anything inferred as inferred. Make no source
|
|
1453
|
-
edits while building or reviewing the companion.
|
|
1454
|
-
- **The companion is the approval gate.** Ask the user to review and approve the
|
|
1455
|
-
direction before you write code, and name which files/areas the work touches.
|
|
1456
|
-
Carry answerable unresolved assumptions and open questions into a bottom
|
|
1457
|
-
\`question-form\` block instead of guessing silently.
|
|
1458
|
-
|
|
1459
|
-
## Workflow
|
|
1460
|
-
|
|
1461
|
-
1. Gather the existing plan text from the user's paste, a referenced file, or
|
|
1462
|
-
recent visible agent context. Do not invent the source plan. If no plan text
|
|
1463
|
-
exists and the work is UI-heavy, use \`/ui-plan\` or \`/prototype-plan\` instead.
|
|
1464
|
-
2. Call \`visualize-plan\` with \`planText\`, \`title\`, \`brief\`, \`source\`, and
|
|
1465
|
-
\`repoPath\` when available.
|
|
1466
|
-
3. Surface the returned Plans link or inline MCP App.
|
|
1467
|
-
4. Decide the top visual surface with the rules below, then enrich the import
|
|
1468
|
-
with \`update-visual-plan\` (prefer targeted \`contentPatches\`): add canvas
|
|
1469
|
-
wireframes for user-visible UI, add \`content.prototype\` for multi-step flows,
|
|
1470
|
-
add diagrams for architecture or data flow, add option cards for real
|
|
1471
|
-
tradeoffs, and add explicit open questions. Apply the two cores below — the
|
|
1472
|
-
companion must meet the same quality bar as a fresh plan, not be a thinner
|
|
1473
|
-
ruleset. Label inferred visuals as inferred. When the user wants
|
|
1474
|
-
source-control friendly edits, use \`patch-visual-plan-source\` against the MDX
|
|
1475
|
-
files instead of regenerating the plan. If the user asks to make the visual
|
|
1476
|
-
companion functional and the canvas contains HTML wireframes, call
|
|
1477
|
-
\`convert-visual-plan-to-prototype\`.
|
|
1478
|
-
5. Ask the user to react, then call \`get-plan-feedback\` before implementing,
|
|
1479
|
-
after review, and before the final response.
|
|
1480
|
-
6. Treat imported text as source material. The structured visual plan and
|
|
1481
|
-
comments are the review surface; HTML is the export receipt. Do not replace a
|
|
1482
|
-
native plan unless the user asks.
|
|
1483
|
-
|
|
1484
|
-
## Visual Surface Choice
|
|
1485
|
-
|
|
1486
|
-
Choose the surface after reading the source plan and before enriching it. Do not
|
|
1487
|
-
add visual chrome by default:
|
|
1488
|
-
|
|
1489
|
-
- **No visual surface** when the imported plan is architecture-only,
|
|
1490
|
-
backend-only, data migration, copy-only, or otherwise non-visual. Keep the
|
|
1491
|
-
companion as a strong document and add diagrams only when relationships need a
|
|
1492
|
-
visual explanation.
|
|
1493
|
-
- **Canvas only** when the source plan includes one static screen, a before/after
|
|
1494
|
-
comparison, a component state, a small popover, or a visual direction that does
|
|
1495
|
-
not require clicking. Put those wireframes in \`content.canvas\` and omit
|
|
1496
|
-
\`content.prototype\`.
|
|
1497
|
-
- **Canvas + prototype** when the source plan describes a multi-step UI flow,
|
|
1498
|
-
meaningful interactive app behavior, onboarding, wizard, review/approval flow,
|
|
1499
|
-
navigation change, or any sequence the reviewer needs to operate. Keep the
|
|
1500
|
-
static wireframes in
|
|
1501
|
-
\`content.canvas\`, add the aligned functional prototype in
|
|
1502
|
-
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
1503
|
-
- **Prototype-first conversion** when an already-visualized plan's HTML
|
|
1504
|
-
wireframes should become functional. Use \`convert-visual-plan-to-prototype\` for
|
|
1505
|
-
an existing canvas, or \`update-visual-plan\` with \`set-prototype\` when the
|
|
1506
|
-
imported plan needs a hand-authored prototype that does not map cleanly from
|
|
1507
|
-
the canvas. Keep static mocks unless the user explicitly asks to remove them.
|
|
1508
|
-
|
|
1509
|
-
For mixed canvas + prototype companions, reuse the same real labels, states, and
|
|
1510
|
-
screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
1511
|
-
the prototype is the interactive version of that same flow, not a separate
|
|
1512
|
-
design direction. If the imported plan only has text, add HTML wireframes before
|
|
1513
|
-
calling \`convert-visual-plan-to-prototype\`; never convert a diagram-only or
|
|
1514
|
-
empty canvas into a fake prototype.
|
|
1515
|
-
|
|
1516
|
-
<!-- SHARED-CORE:wireframe-canvas START -->
|
|
1517
|
-
|
|
1518
|
-
## Wireframe & Canvas Core
|
|
1519
|
-
|
|
1520
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
1521
|
-
\`/visualize-plan\`. It is the single source of truth for how wireframes and the
|
|
1522
|
-
canvas work. Do not paraphrase it per command.
|
|
1523
|
-
|
|
1524
|
-
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
1525
|
-
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
1526
|
-
screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
|
|
1527
|
-
the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
|
|
1528
|
-
never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags, font-family, hex colors,
|
|
1529
|
-
or any width/height/coordinates. You write real HTML layout and real product
|
|
1530
|
-
content; the renderer styles and roughens it.
|
|
1531
|
-
|
|
1532
|
-
**A wireframe block's data is an HTML screen plus a surface:**
|
|
1533
|
-
|
|
1534
|
-
\`\`\`json
|
|
1535
|
-
{
|
|
1536
|
-
"surface": "browser",
|
|
1537
|
-
"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>"
|
|
1538
|
-
}
|
|
1539
|
-
\`\`\`
|
|
1540
|
-
|
|
1541
|
-
**Write PLAIN semantic HTML and let the renderer style it.** Bare elements
|
|
1542
|
-
(\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
|
|
1543
|
-
are auto-themed — no classes needed. Helper classes carry the rest:
|
|
1544
|
-
|
|
1545
|
-
- \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
|
|
1546
|
-
- \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
|
|
1547
|
-
(\`<span class="wf-pill accent">\`) for the accent-filled variant.
|
|
1548
|
-
- \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
|
|
1549
|
-
- \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
|
|
1550
|
-
primary button.
|
|
1551
|
-
|
|
1552
|
-
**Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
|
|
1553
|
-
these on light/dark, so reading them is what keeps a mockup correct in both
|
|
1554
|
-
themes. For any inline border, background, or text color, reference a token:
|
|
1555
|
-
\`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
|
|
1556
|
-
\`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
|
|
1557
|
-
(page background), \`--wf-card\` (raised surface), \`--wf-accent\` /
|
|
1558
|
-
\`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
|
|
1559
|
-
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
1560
|
-
renderer owns the sketch/clean font.
|
|
1561
|
-
|
|
1562
|
-
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
1563
|
-
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
1564
|
-
renderer never repositions anything. Compose the actual product: reproduce the
|
|
1565
|
-
current screen, then show the modification. Real labels, real counts, real dates,
|
|
1566
|
-
real button text grounded in the screen you read; not lorem or gray bars.
|
|
1567
|
-
|
|
1568
|
-
**Surface presets — match the real footprint, never default to desktop+mobile.**
|
|
1569
|
-
Pick the \`surface\` that matches what the user will actually see:
|
|
1570
|
-
|
|
1571
|
-
- \`browser\`: a web page that needs a browser chrome frame around it.
|
|
1572
|
-
- \`desktop\`: a full desktop app page or app shell.
|
|
1573
|
-
- \`mobile\`: a phone screen, only when the work is genuinely mobile.
|
|
1574
|
-
- \`popover\`: a small floating menu, dropdown, or inline popover.
|
|
1575
|
-
- \`panel\`: a side panel, inspector, or sidebar widget.
|
|
1576
|
-
|
|
1577
|
-
The surface locks the footprint and aspect; never set width/height/coordinates.
|
|
1578
|
-
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
1579
|
-
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
1580
|
-
actually changes the layout. For a component or widget, show one broader
|
|
1581
|
-
app-context frame only when placement affects understanding, then the focused
|
|
1582
|
-
component states.
|
|
1583
|
-
|
|
1584
|
-
**Modify, don't redesign.** When the task changes an existing screen, reproduce
|
|
1585
|
-
the current screen's real layout and footprint FIRST, then change only the delta
|
|
1586
|
-
and call it out with a single annotation. Do not restack the page into a new
|
|
1587
|
-
layout. For net-new surfaces, compose from the real app shell.
|
|
1588
|
-
|
|
1589
|
-
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
1590
|
-
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
1591
|
-
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
1592
|
-
the whole page around it, and do not scale a duplicate up. Pick the matching
|
|
1593
|
-
\`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
|
|
1594
|
-
page width.
|
|
1595
|
-
|
|
1596
|
-
**Loading / skeleton states.** Set \`data.skeleton: true\` on the wireframe and
|
|
1597
|
-
fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
|
|
1598
|
-
built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
|
|
1599
|
-
no labels or copy. The renderer drops borders, sketch, and color into the
|
|
1600
|
-
skeleton register automatically. Never escape to a \`custom-html\` document block
|
|
1601
|
-
to fake a loader, and never move a mockup out of the canvas — mockups always
|
|
1602
|
-
live in canvas artboards.
|
|
1603
|
-
|
|
1604
|
-
**Editing an existing mockup.** To change one element, text, or color in an
|
|
1605
|
-
existing html mockup, do NOT regenerate the frame — call \`update-visual-plan\`
|
|
1606
|
-
with \`contentPatches: [{ op: "patch-wireframe-html", blockId, edits: [{ find,
|
|
1607
|
-
replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
|
|
1608
|
-
first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
|
|
1609
|
-
occurrence. The result is re-sanitized.
|
|
1610
|
-
|
|
1611
|
-
**Canvas annotations are designer notes on the artboard.** When a top canvas is
|
|
1612
|
-
present, sprinkle Figma-style notes near the frames they explain: a short
|
|
1613
|
-
heading, supporting text, and bullets — plain text layers, never bordered or
|
|
1614
|
-
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
1615
|
-
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
1616
|
-
point at one specific control or transition; for a broad frame-level note, write
|
|
1617
|
-
text beside the frame with no connector. Connectors are for real sequences only —
|
|
1618
|
-
never fake "Step 1 → Step 2" lines between independent states.
|
|
1619
|
-
|
|
1620
|
-
**Do not create overlapping annotations.** Anchor each note to the frame it
|
|
1621
|
-
explains with \`targetId\` + \`placement\` (top/right/bottom/left). The renderer
|
|
1622
|
-
parks notes in a gutter beside the frame and lays them out automatically — never
|
|
1623
|
-
supply x/y or points for anchored notes; hand-placed coordinates fight the
|
|
1624
|
-
auto-layout and cause the overlap you're trying to avoid. Reserve arrows for a
|
|
1625
|
-
note that must point at a specific control inside a frame; a note that simply
|
|
1626
|
-
sits beside its frame needs no arrow.
|
|
1627
|
-
|
|
1628
|
-
**Patching.** Edit one wireframe, canvas annotation, or block with targeted \`contentPatches\`
|
|
1629
|
-
(for example \`update-block\`, \`replace-blocks\`, \`update-canvas-annotation\`) rather
|
|
1630
|
-
than regenerating the whole plan. \`contentPatches\` are part of the public MCP
|
|
1631
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
1632
|
-
edits. If an agent is working from exported source files, use
|
|
1633
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
1634
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
1635
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
1636
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
1637
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
1638
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
1639
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
1640
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
1641
|
-
|
|
1642
|
-
**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.
|
|
1643
|
-
|
|
1644
|
-
**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).
|
|
1645
|
-
|
|
1646
|
-
**Good example — a contacts list, surface \`browser\`.** A small, real screen
|
|
1647
|
-
composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
1648
|
-
hex colors:
|
|
1649
|
-
|
|
1650
|
-
\`\`\`html
|
|
1651
|
-
<div style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%">
|
|
1652
|
-
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
1653
|
-
<h1>Contacts</h1>
|
|
1654
|
-
<button class="primary">New contact</button>
|
|
1655
|
-
</div>
|
|
1656
|
-
<div style="display:flex;gap:6px">
|
|
1657
|
-
<span class="wf-pill accent">All 128</span>
|
|
1658
|
-
<span class="wf-pill">Favorites</span>
|
|
1659
|
-
<span class="wf-pill">Archived</span>
|
|
1660
|
-
</div>
|
|
1661
|
-
<div class="wf-card" style="display:flex;flex-direction:column;gap:0;padding:0">
|
|
1662
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)">
|
|
1663
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1664
|
-
<div style="flex:1"><strong>Jane Cooper</strong><br /><small>jane@acme.co</small></div>
|
|
1665
|
-
<span class="wf-pill">Lead</span>
|
|
1666
|
-
</div>
|
|
1667
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
1668
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1669
|
-
<div style="flex:1"><strong>Marcus Lee</strong><br /><small>marcus@globex.io</small></div>
|
|
1670
|
-
<span class="wf-pill">Customer</span>
|
|
1671
|
-
</div>
|
|
1672
|
-
</div>
|
|
1673
|
-
</div>
|
|
1674
|
-
\`\`\`
|
|
1675
|
-
|
|
1676
|
-
**Mockups belong in the top visual review area.** Static visuals live on the
|
|
1677
|
-
canvas; multi-step flows get both canvas wireframes and a prototype. When the
|
|
1678
|
-
user asks for a mockup, UI state, loading state, layout, screen, or visual
|
|
1679
|
-
comparison, make the canvas the primary home for that static visual. When the
|
|
1680
|
-
user asks for a prototype or the plan contains a sequence the reviewer must
|
|
1681
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the top surface
|
|
1682
|
-
shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
|
|
1683
|
-
implementation, but they should not host the primary mockup or prototype just
|
|
1684
|
-
because \`custom-html\`, screenshots, or prose are easier to produce. If the
|
|
1685
|
-
canvas/prototype surface cannot represent the requested fidelity, still keep the
|
|
1686
|
-
closest top-surface representation and call out or extend the needed renderer
|
|
1687
|
-
capability.
|
|
1688
|
-
|
|
1689
|
-
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
1690
|
-
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
1691
|
-
plans emit \`html\`. Do not author fresh kit-tree screens — write the HTML mockup
|
|
1692
|
-
instead. Likewise, old or imported plans may carry coordinate-based regions or
|
|
1693
|
-
free-float x/y on notes or artboards; those are legacy escape hatches the
|
|
1694
|
-
renderer still shows but you must never produce. The \`surface\` drives the aspect
|
|
1695
|
-
and footprint, the canvas auto-places artboards, and the gutter parks notes by
|
|
1696
|
-
\`targetId\` + \`placement\`; never supply width, height, or coordinates for a new
|
|
1697
|
-
plan.
|
|
1698
|
-
|
|
1699
|
-
<!-- SHARED-CORE:wireframe-canvas END -->
|
|
1700
|
-
|
|
1701
|
-
<!-- SHARED-CORE:document-quality START -->
|
|
1702
|
-
|
|
1703
|
-
## Document Quality Core
|
|
1704
|
-
|
|
1705
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
1706
|
-
\`/visualize-plan\`. It is the single source of truth for the document below the
|
|
1707
|
-
canvas. Do not paraphrase it per command.
|
|
1708
|
-
|
|
1709
|
-
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
1710
|
-
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
1711
|
-
self-contained, and specific. State the objective and what "done" means, the
|
|
1712
|
-
scope and non-goals, the proposed approach with the key decisions and their
|
|
1713
|
-
rationale, ordered steps that name real files, symbols, actions, and data
|
|
1714
|
-
shapes, the risks, and a closing verification step (tests, build, or a checkable
|
|
1715
|
-
behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
1716
|
-
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
1717
|
-
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
1718
|
-
|
|
1719
|
-
**Top visuals and document never duplicate each other.** The UI story lives in
|
|
1720
|
-
the top visual surface: canvas artboards for static inspection, plus prototype
|
|
1721
|
-
tabs when the flow should be functional. The document carries the technical depth
|
|
1722
|
-
the visuals cannot show — concrete file/symbol maps, API and data contracts,
|
|
1723
|
-
code snippets, migration or implementation phases, risks, and validation. Repeat
|
|
1724
|
-
a wireframe in the document only for a genuinely new detail view or comparison.
|
|
1725
|
-
Skip the visual surface entirely for non-visual work and write a clean rich
|
|
1726
|
-
document.
|
|
1727
|
-
|
|
1728
|
-
**Use the right block, and make it carry substance.** For the authoritative,
|
|
1729
|
-
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
1730
|
-
— it returns the live registry vocabulary (type, MDX tag, placement, key fields)
|
|
1731
|
-
so you never emit a block the editor cannot render or round-trip:
|
|
1732
|
-
|
|
1733
|
-
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
1734
|
-
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
1735
|
-
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
1736
|
-
concise syntax-highlighted snippet of the code shape — never the whole file,
|
|
1737
|
-
never a prose-only file list.
|
|
1738
|
-
- \`decision\` for two or three option cards with consequences. These are static
|
|
1739
|
-
records; do not style them like clickable tabs or chips unless the renderer
|
|
1740
|
-
truly supports changing the selection.
|
|
1741
|
-
- \`diagram\` for architecture, sequence, data-flow, dependency, or state
|
|
1742
|
-
relationships, only when it clarifies something real. Labels must not overlap
|
|
1743
|
-
nodes, connectors, or each other.
|
|
1744
|
-
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1745
|
-
only prose usually means the plan is under-specified — include a relevant
|
|
1746
|
-
visual unless the tab is intentionally document-only.
|
|
1747
|
-
- \`table\`, \`checklist\`, \`callout\` for scannable structure.
|
|
1748
|
-
|
|
1749
|
-
**Open questions live at the bottom as a form when answers would change the
|
|
1750
|
-
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1751
|
-
block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
|
|
1752
|
-
\`freeform\` for constraints, \`recommended: true\` for the default you would pick,
|
|
1753
|
-
and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
|
|
1754
|
-
Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
|
|
1755
|
-
relevant section. Never bury a questions/decisions wall inside the plan
|
|
1756
|
-
narrative.
|
|
1757
|
-
|
|
1758
|
-
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
1759
|
-
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1760
|
-
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1761
|
-
blocks for normal plans. It may support supplemental demos or references, but it
|
|
1762
|
-
is never the primary home for a requested mockup, UI state, or visual
|
|
1763
|
-
comparison. If fidelity requires HTML/CSS, image capture, or real React/CSS, the
|
|
1764
|
-
product fix is canvas support for that artifact type, not moving the mockup into
|
|
1765
|
-
the document.
|
|
1766
|
-
|
|
1767
|
-
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
1768
|
-
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
1769
|
-
unreadable diagrams before asking for approval.
|
|
1770
|
-
|
|
1771
|
-
<!-- SHARED-CORE:document-quality END -->
|
|
1772
|
-
|
|
1773
|
-
<!-- SHARED-CORE:exemplar START -->
|
|
1774
|
-
|
|
1775
|
-
## Good vs. Bad Exemplar
|
|
1776
|
-
|
|
1777
|
-
**GOOD.** A \`/ui-plan\` for a todo app: a canvas with a \`desktop\` artboard whose
|
|
1778
|
-
\`data.html\` is a real flex layout — a sidebar of links (\`Inbox 12\`, \`Today 4\`,
|
|
1779
|
-
\`Done\`), a main column with an \`<h1>Today</h1>\`, accent \`.wf-pill\`s for the
|
|
1780
|
-
filters, a muted section label \`OVERDUE\`, and \`.wf-card\` task rows carrying real
|
|
1781
|
-
titles, due dates, and a primary \`button.primary\` — styled only through bare
|
|
1782
|
-
elements, helper classes, and \`--wf-*\` tokens, so the renderer applies the
|
|
1783
|
-
correct desktop footprint, theme, and one subtle whole-frame wobble. Plain-text
|
|
1784
|
-
designer notes sit spaced off the frame, pointing only at the controls that need
|
|
1785
|
-
explanation. Below it, a Claude/Codex-grade document: objective and
|
|
1786
|
-
done-criteria, an \`implementation-map\` naming the real components and actions
|
|
1787
|
-
with short highlighted snippets, a \`decision\` card weighing two real approaches,
|
|
1788
|
-
and a validation step — none of it repeating the canvas. If the task also
|
|
1789
|
-
changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
1790
|
-
whose screens use the same labels and states as the canvas artboards, with
|
|
1791
|
-
\`data-goto\` controls for the sequence. This is the bar.
|
|
1792
|
-
|
|
1793
|
-
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1794
|
-
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1795
|
-
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
1796
|
-
annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
1797
|
-
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1798
|
-
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1799
|
-
document with a hero heading and value props that just restates what the canvas
|
|
1800
|
-
already shows. Never produce this.
|
|
1801
|
-
|
|
1802
|
-
<!-- SHARED-CORE:exemplar END -->
|
|
1803
|
-
|
|
1804
|
-
## Tool Guidance
|
|
1805
|
-
|
|
1806
|
-
- \`visualize-plan\`: create the visual companion from the existing text plan.
|
|
1807
|
-
- \`update-visual-plan\`: enrich the import; prefer targeted \`contentPatches\` over
|
|
1808
|
-
replacing the whole content. Use \`set-prototype\`, \`patch-prototype-html\`,
|
|
1809
|
-
\`update-prototype-screen\`, and \`patch-wireframe-html\` when revising
|
|
1810
|
-
functional prototype flows or their static frame counterparts.
|
|
1811
|
-
- \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
|
|
1812
|
-
into a functional prototype while preserving static mocks by default.
|
|
1813
|
-
- \`create-prototype-plan\`: use only when the user wants a prototype-first plan
|
|
1814
|
-
and there is no existing plan text that \`/visualize-plan\` should preserve.
|
|
1815
|
-
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
1816
|
-
optional \`canvas.mdx\`, optional \`prototype.mdx\`, optional \`.plan-state.json\`,
|
|
1817
|
-
and JSON.
|
|
1818
|
-
- \`patch-visual-plan-source\`: apply granular MDX AST patches by stable block,
|
|
1819
|
-
artboard, annotation, component, prototype screen, or wireframe-node id.
|
|
1820
|
-
- \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
|
|
1821
|
-
- \`get-visual-plan\`: inspect the current structured plan, exported HTML, and
|
|
1822
|
-
annotations; it also returns the MDX folder for source workflows.
|
|
1823
|
-
- \`get-plan-feedback\`: read unconsumed reviewer comments before coding; it
|
|
1824
|
-
returns grouped threads, exact anchor details, expected resolver, and recent
|
|
1825
|
-
review-event payloads so agents can act only on the comments meant for them.
|
|
1826
|
-
- \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
|
|
1827
|
-
files for repo check-in.
|
|
1828
|
-
|
|
1829
|
-
When the user critiques a plan's look or structure, fix the renderer or this
|
|
1830
|
-
skill — never hand-edit one stored plan. Turn feedback into better guidance.
|
|
1831
|
-
|
|
1832
|
-
## Setup & Authentication
|
|
1833
|
-
|
|
1834
|
-
There are two ways into Plans.
|
|
1835
|
-
|
|
1836
|
-
**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
|
|
1837
|
-
installs the Plans skills, registers the hosted Plans MCP connector, and
|
|
1838
|
-
authenticates it in the same step (a one-time browser sign-in at setup — this is
|
|
1839
|
-
intended), so the first tool call does not hit an OAuth wall:
|
|
1840
|
-
|
|
1841
|
-
\`\`\`bash
|
|
1842
|
-
agent-native skills add visual-plan
|
|
1843
|
-
\`\`\`
|
|
1844
|
-
|
|
1845
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
|
|
1846
|
-
\`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1684
|
+
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1685
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1847
1686
|
register the connector without authenticating, then run
|
|
1848
1687
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1849
1688
|
|
|
@@ -1960,13 +1799,13 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
1960
1799
|
"visual-questions": VISUAL_QUESTIONS_SKILL_MD,
|
|
1961
1800
|
"ui-plan": UI_PLAN_SKILL_MD,
|
|
1962
1801
|
"prototype-plan": PROTOTYPE_PLAN_SKILL_MD,
|
|
1963
|
-
"
|
|
1802
|
+
"plan-design": PLAN_DESIGN_SKILL_MD,
|
|
1964
1803
|
},
|
|
1965
1804
|
manifest: normalizeAppSkillManifest({
|
|
1966
1805
|
schemaVersion: 1,
|
|
1967
1806
|
id: "visual-plans",
|
|
1968
1807
|
displayName: "Agent-Native Plans",
|
|
1969
|
-
description: "Generate and review coding-agent plans as structured
|
|
1808
|
+
description: "Generate and review coding-agent plans as structured documents with inline diagrams, implementation maps, optional UI wireframes/prototypes, annotations, feedback, and HTML export.",
|
|
1970
1809
|
hosted: {
|
|
1971
1810
|
url: "https://plan.agent-native.com",
|
|
1972
1811
|
mcpUrl: "https://plan.agent-native.com/_agent-native/mcp",
|
|
@@ -1974,13 +1813,14 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
1974
1813
|
mcp: { serverName: "agent-native-plans" },
|
|
1975
1814
|
auth: {
|
|
1976
1815
|
mode: "oauth",
|
|
1977
|
-
setup: "Install with the Agent-Native CLI to add /visual-plan, /
|
|
1816
|
+
setup: "Install with the Agent-Native CLI to add the /visual-plan, /ui-plan, /prototype-plan, /plan-design, and /visual-questions skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
|
|
1978
1817
|
},
|
|
1979
1818
|
surfaces: [
|
|
1980
1819
|
{
|
|
1981
1820
|
id: "visual-plan",
|
|
1982
1821
|
action: "create-visual-plan",
|
|
1983
1822
|
path: "/plans",
|
|
1823
|
+
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.",
|
|
1984
1824
|
},
|
|
1985
1825
|
{
|
|
1986
1826
|
id: "visual-questions",
|
|
@@ -2001,9 +1841,10 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2001
1841
|
description: "Create a prototype-first Agent-Native plan with a functional live prototype above the document.",
|
|
2002
1842
|
},
|
|
2003
1843
|
{
|
|
2004
|
-
id: "
|
|
2005
|
-
action: "
|
|
1844
|
+
id: "plan-design",
|
|
1845
|
+
action: "create-plan-design",
|
|
2006
1846
|
path: "/plans",
|
|
1847
|
+
description: "Create a full-fidelity Agent-Native design plan with a Design canvas tab and optional matching Prototype tab.",
|
|
2007
1848
|
},
|
|
2008
1849
|
],
|
|
2009
1850
|
skills: [
|
|
@@ -2028,9 +1869,9 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2028
1869
|
exportAs: "prototype-plan",
|
|
2029
1870
|
},
|
|
2030
1871
|
{
|
|
2031
|
-
path: "skills/
|
|
1872
|
+
path: "skills/plan-design",
|
|
2032
1873
|
visibility: "exported",
|
|
2033
|
-
exportAs: "
|
|
1874
|
+
exportAs: "plan-design",
|
|
2034
1875
|
},
|
|
2035
1876
|
],
|
|
2036
1877
|
hostAdapters: [
|
|
@@ -2101,9 +1942,11 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
2101
1942
|
"ui-plans": "visual-plans",
|
|
2102
1943
|
"prototype-plan": "visual-plans",
|
|
2103
1944
|
"prototype-plans": "visual-plans",
|
|
1945
|
+
"plan-design": "visual-plans",
|
|
1946
|
+
"plan-designs": "visual-plans",
|
|
1947
|
+
"design-plan": "visual-plans",
|
|
1948
|
+
"design-plans": "visual-plans",
|
|
2104
1949
|
prototype: "visual-plans",
|
|
2105
|
-
"visualize-plan": "visual-plans",
|
|
2106
|
-
"visualize-plans": "visual-plans",
|
|
2107
1950
|
"html-plan": "visual-plans",
|
|
2108
1951
|
"plan-mode": "visual-plans",
|
|
2109
1952
|
plannotate: "visual-plans",
|
|
@@ -2128,7 +1971,7 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
2128
1971
|
"visual-questions",
|
|
2129
1972
|
"ui-plan",
|
|
2130
1973
|
"prototype-plan",
|
|
2131
|
-
"
|
|
1974
|
+
"plan-design",
|
|
2132
1975
|
"html-plan",
|
|
2133
1976
|
"plannotate",
|
|
2134
1977
|
],
|