@agent-native/core 0.39.1 → 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 -6
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +430 -723
- 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|plan-design|
|
|
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`, `/plan-design`, `/visual-questions
|
|
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).
|
|
@@ -215,7 +215,7 @@ agent-native skills add visual-plan
|
|
|
215
215
|
\`\`\`
|
|
216
216
|
|
|
217
217
|
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
218
|
-
\`/visual-questions
|
|
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,24 +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.
|
|
262
265
|
Use \`/plan-design\` when review should start with full-fidelity branded design.
|
|
263
266
|
Use \`/visual-questions\` only when the user explicitly wants a visual intake form
|
|
264
|
-
before planning.
|
|
265
|
-
|
|
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.
|
|
266
270
|
|
|
267
271
|
## When To Use
|
|
268
272
|
|
|
269
|
-
Create a visual plan when work is multi-file, ambiguous, long-running,
|
|
270
|
-
UI-heavy, when architecture / data flow / UI direction / options /
|
|
271
|
-
questions would
|
|
272
|
-
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.
|
|
273
278
|
|
|
274
279
|
## Plan Discipline
|
|
275
280
|
|
|
@@ -282,6 +287,10 @@ direction before you implement.
|
|
|
282
287
|
patterns first; name actual files, symbols, and data shapes instead of
|
|
283
288
|
inventing them. Check existing \`actions/\` before proposing endpoints and prefer
|
|
284
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.
|
|
285
294
|
- **Planning is read-only.** Make no source edits while building or reviewing the
|
|
286
295
|
plan. Start editing only after the user approves the direction.
|
|
287
296
|
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
|
|
@@ -304,19 +313,32 @@ direction before you implement.
|
|
|
304
313
|
|
|
305
314
|
1. Follow the host agent's normal planning flow: inspect the codebase, delegate
|
|
306
315
|
wide exploration when useful, gather the info needed, and ask native
|
|
307
|
-
clarifying questions as needed before generating the plan.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
and
|
|
314
|
-
|
|
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.
|
|
315
332
|
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|
|
316
333
|
Always include the actual URL in chat so the next step is a click in CLI or
|
|
317
334
|
other text-only hosts. When the host exposes an embedded browser/preview panel
|
|
318
335
|
and a tool can open arbitrary URLs there, open the returned plan URL
|
|
319
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.
|
|
320
342
|
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
321
343
|
and before the final response. Treat \`anchorDetails\`, resolver intent, recent
|
|
322
344
|
review events, and any focused screenshots from browser handoff as the source
|
|
@@ -330,12 +352,17 @@ direction before you implement.
|
|
|
330
352
|
|
|
331
353
|
## Visual Surface Choice
|
|
332
354
|
|
|
333
|
-
Choose the surface before creating the plan
|
|
334
|
-
default:
|
|
355
|
+
Choose the surface before creating the plan or after reading the source plan. Do
|
|
356
|
+
not add visual chrome by default:
|
|
335
357
|
|
|
336
358
|
- **No visual surface** for architecture-only, backend-only, data migration,
|
|
337
|
-
copy-only, or otherwise non-visual plans.
|
|
338
|
-
|
|
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.
|
|
339
366
|
- **Canvas only** for one static screen, a before/after comparison, a component
|
|
340
367
|
state, a small popover, or a visual direction that does not require clicking.
|
|
341
368
|
Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
|
|
@@ -357,9 +384,9 @@ design direction.
|
|
|
357
384
|
|
|
358
385
|
## Wireframe & Canvas Core
|
|
359
386
|
|
|
360
|
-
This section is shared, word for word, by \`/visual-plan
|
|
361
|
-
|
|
362
|
-
|
|
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.
|
|
363
390
|
|
|
364
391
|
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
365
392
|
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
@@ -426,6 +453,15 @@ the current screen's real layout and footprint FIRST, then change only the delta
|
|
|
426
453
|
and call it out with a single annotation. Do not restack the page into a new
|
|
427
454
|
layout. For net-new surfaces, compose from the real app shell.
|
|
428
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
|
+
|
|
429
465
|
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
430
466
|
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
431
467
|
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
@@ -479,7 +515,15 @@ In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
|
479
515
|
\`update-rich-text\` content patches or source patches for prose, and use
|
|
480
516
|
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
481
517
|
|
|
482
|
-
**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.
|
|
483
527
|
|
|
484
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).
|
|
485
529
|
|
|
@@ -488,7 +532,9 @@ composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
|
488
532
|
hex colors:
|
|
489
533
|
|
|
490
534
|
\`\`\`html
|
|
491
|
-
<div
|
|
535
|
+
<div
|
|
536
|
+
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
537
|
+
>
|
|
492
538
|
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
493
539
|
<h1>Contacts</h1>
|
|
494
540
|
<button class="primary">New contact</button>
|
|
@@ -498,33 +544,48 @@ hex colors:
|
|
|
498
544
|
<span class="wf-pill">Favorites</span>
|
|
499
545
|
<span class="wf-pill">Archived</span>
|
|
500
546
|
</div>
|
|
501
|
-
<div
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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>
|
|
505
560
|
<span class="wf-pill">Lead</span>
|
|
506
561
|
</div>
|
|
507
562
|
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
508
|
-
<div
|
|
509
|
-
|
|
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>
|
|
510
569
|
<span class="wf-pill">Customer</span>
|
|
511
570
|
</div>
|
|
512
571
|
</div>
|
|
513
572
|
</div>
|
|
514
573
|
\`\`\`
|
|
515
574
|
|
|
516
|
-
**
|
|
517
|
-
canvas; multi-step flows get both canvas wireframes and a
|
|
518
|
-
user asks for a mockup, UI state, loading state, layout,
|
|
519
|
-
comparison, make the canvas the primary home for that static
|
|
520
|
-
user asks for a prototype or the plan contains a sequence the
|
|
521
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
522
|
-
shows Wireframes / Prototype tabs.
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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.
|
|
528
589
|
|
|
529
590
|
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
530
591
|
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
@@ -542,9 +603,9 @@ plan.
|
|
|
542
603
|
|
|
543
604
|
## Document Quality Core
|
|
544
605
|
|
|
545
|
-
This section is shared, word for word, by \`/visual-plan
|
|
546
|
-
|
|
547
|
-
|
|
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.
|
|
548
609
|
|
|
549
610
|
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
550
611
|
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
@@ -556,14 +617,27 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
|
556
617
|
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
557
618
|
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
558
619
|
|
|
559
|
-
**
|
|
560
|
-
the top visual surface: canvas artboards for
|
|
561
|
-
tabs when the flow should be functional. The
|
|
562
|
-
the visuals cannot show — concrete
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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.
|
|
567
641
|
|
|
568
642
|
**Use the right block, and make it carry substance.** For the authoritative,
|
|
569
643
|
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
@@ -573,14 +647,23 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
573
647
|
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
574
648
|
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
575
649
|
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
576
|
-
concise syntax-highlighted snippet of the code shape
|
|
577
|
-
never a prose-only file list.
|
|
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.
|
|
578
654
|
- \`decision\` for two or three option cards with consequences. These are static
|
|
579
655
|
records; do not style them like clickable tabs or chips unless the renderer
|
|
580
656
|
truly supports changing the selection.
|
|
581
|
-
- \`diagram\` for architecture,
|
|
582
|
-
relationships, only when it clarifies something real.
|
|
583
|
-
|
|
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.
|
|
584
667
|
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
585
668
|
only prose usually means the plan is under-specified — include a relevant
|
|
586
669
|
visual unless the tab is intentionally document-only.
|
|
@@ -588,21 +671,24 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
588
671
|
|
|
589
672
|
**Open questions live at the bottom as a form when answers would change the
|
|
590
673
|
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
591
|
-
block titled "Open Questions"
|
|
592
|
-
\`
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
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\`.
|
|
597
682
|
|
|
598
683
|
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
599
684
|
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
600
685
|
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
601
|
-
blocks for normal plans.
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
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.
|
|
606
692
|
|
|
607
693
|
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
608
694
|
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
@@ -630,6 +716,16 @@ changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
|
630
716
|
whose screens use the same labels and states as the canvas artboards, with
|
|
631
717
|
\`data-goto\` controls for the sequence. This is the bar.
|
|
632
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
|
+
|
|
633
729
|
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
634
730
|
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
635
731
|
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
@@ -637,14 +733,17 @@ annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
|
637
733
|
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
638
734
|
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
639
735
|
document with a hero heading and value props that just restates what the canvas
|
|
640
|
-
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.
|
|
641
739
|
|
|
642
740
|
<!-- SHARED-CORE:exemplar END -->
|
|
643
741
|
|
|
644
742
|
## Tool Guidance
|
|
645
743
|
|
|
646
|
-
- \`create-visual-plan\`: start one structured visual plan per agent task/run
|
|
647
|
-
|
|
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.
|
|
648
747
|
- \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
|
|
649
748
|
- \`create-prototype-plan\`: start a prototype-first plan with a functional top
|
|
650
749
|
review surface.
|
|
@@ -654,7 +753,6 @@ already shows. Never produce this.
|
|
|
654
753
|
into a prototype plan.
|
|
655
754
|
- \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
|
|
656
755
|
command, not as \`/visual-plan\` preflight.
|
|
657
|
-
- \`visualize-plan\`: build a visual companion from an existing text plan.
|
|
658
756
|
- \`update-visual-plan\`: revise content, status, or comments; prefer
|
|
659
757
|
\`contentPatches\` over regenerating the whole plan.
|
|
660
758
|
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
@@ -687,7 +785,7 @@ agent-native skills add visual-plan
|
|
|
687
785
|
\`\`\`
|
|
688
786
|
|
|
689
787
|
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
690
|
-
\`/visual-questions
|
|
788
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
691
789
|
register the connector without authenticating, then run
|
|
692
790
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
693
791
|
|
|
@@ -732,8 +830,8 @@ react to.
|
|
|
732
830
|
and mixed work. Use \`/prototype-plan\` when the UI review needs a functional live
|
|
733
831
|
prototype instead of static screens. Use \`/plan-design\` when polish, brand, or
|
|
734
832
|
visual fidelity are material to the decision. Use \`/visual-questions\` only when
|
|
735
|
-
the user explicitly wants visual intake before planning
|
|
736
|
-
|
|
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.
|
|
737
835
|
|
|
738
836
|
## Plan Discipline
|
|
739
837
|
|
|
@@ -789,9 +887,9 @@ the user has supplied it.
|
|
|
789
887
|
|
|
790
888
|
## Wireframe & Canvas Core
|
|
791
889
|
|
|
792
|
-
This section is shared, word for word, by \`/visual-plan
|
|
793
|
-
|
|
794
|
-
|
|
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.
|
|
795
893
|
|
|
796
894
|
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
797
895
|
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
@@ -858,6 +956,15 @@ the current screen's real layout and footprint FIRST, then change only the delta
|
|
|
858
956
|
and call it out with a single annotation. Do not restack the page into a new
|
|
859
957
|
layout. For net-new surfaces, compose from the real app shell.
|
|
860
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
|
+
|
|
861
968
|
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
862
969
|
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
863
970
|
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
@@ -911,7 +1018,15 @@ In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
|
911
1018
|
\`update-rich-text\` content patches or source patches for prose, and use
|
|
912
1019
|
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
913
1020
|
|
|
914
|
-
**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.
|
|
915
1030
|
|
|
916
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).
|
|
917
1032
|
|
|
@@ -920,7 +1035,9 @@ composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
|
920
1035
|
hex colors:
|
|
921
1036
|
|
|
922
1037
|
\`\`\`html
|
|
923
|
-
<div
|
|
1038
|
+
<div
|
|
1039
|
+
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
1040
|
+
>
|
|
924
1041
|
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
925
1042
|
<h1>Contacts</h1>
|
|
926
1043
|
<button class="primary">New contact</button>
|
|
@@ -930,33 +1047,48 @@ hex colors:
|
|
|
930
1047
|
<span class="wf-pill">Favorites</span>
|
|
931
1048
|
<span class="wf-pill">Archived</span>
|
|
932
1049
|
</div>
|
|
933
|
-
<div
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
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>
|
|
937
1063
|
<span class="wf-pill">Lead</span>
|
|
938
1064
|
</div>
|
|
939
1065
|
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
940
|
-
<div
|
|
941
|
-
|
|
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>
|
|
942
1072
|
<span class="wf-pill">Customer</span>
|
|
943
1073
|
</div>
|
|
944
1074
|
</div>
|
|
945
1075
|
</div>
|
|
946
1076
|
\`\`\`
|
|
947
1077
|
|
|
948
|
-
**
|
|
949
|
-
canvas; multi-step flows get both canvas wireframes and a
|
|
950
|
-
user asks for a mockup, UI state, loading state, layout,
|
|
951
|
-
comparison, make the canvas the primary home for that static
|
|
952
|
-
user asks for a prototype or the plan contains a sequence the
|
|
953
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
954
|
-
shows Wireframes / Prototype tabs.
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
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.
|
|
960
1092
|
|
|
961
1093
|
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
962
1094
|
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
@@ -974,9 +1106,9 @@ plan.
|
|
|
974
1106
|
|
|
975
1107
|
## Document Quality Core
|
|
976
1108
|
|
|
977
|
-
This section is shared, word for word, by \`/visual-plan
|
|
978
|
-
|
|
979
|
-
|
|
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.
|
|
980
1112
|
|
|
981
1113
|
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
982
1114
|
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
@@ -988,14 +1120,27 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
|
988
1120
|
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
989
1121
|
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
990
1122
|
|
|
991
|
-
**
|
|
992
|
-
the top visual surface: canvas artboards for
|
|
993
|
-
tabs when the flow should be functional. The
|
|
994
|
-
the visuals cannot show — concrete
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
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.
|
|
999
1144
|
|
|
1000
1145
|
**Use the right block, and make it carry substance.** For the authoritative,
|
|
1001
1146
|
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
@@ -1005,14 +1150,23 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
1005
1150
|
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
1006
1151
|
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
1007
1152
|
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
1008
|
-
concise syntax-highlighted snippet of the code shape
|
|
1009
|
-
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.
|
|
1010
1157
|
- \`decision\` for two or three option cards with consequences. These are static
|
|
1011
1158
|
records; do not style them like clickable tabs or chips unless the renderer
|
|
1012
1159
|
truly supports changing the selection.
|
|
1013
|
-
- \`diagram\` for architecture,
|
|
1014
|
-
relationships, only when it clarifies something real.
|
|
1015
|
-
|
|
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.
|
|
1016
1170
|
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1017
1171
|
only prose usually means the plan is under-specified — include a relevant
|
|
1018
1172
|
visual unless the tab is intentionally document-only.
|
|
@@ -1020,21 +1174,24 @@ so you never emit a block the editor cannot render or round-trip:
|
|
|
1020
1174
|
|
|
1021
1175
|
**Open questions live at the bottom as a form when answers would change the
|
|
1022
1176
|
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1023
|
-
block titled "Open Questions"
|
|
1024
|
-
\`
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
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\`.
|
|
1029
1185
|
|
|
1030
1186
|
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
1031
1187
|
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1032
1188
|
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1033
|
-
blocks for normal plans.
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
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.
|
|
1038
1195
|
|
|
1039
1196
|
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
1040
1197
|
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
@@ -1062,6 +1219,16 @@ changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
|
1062
1219
|
whose screens use the same labels and states as the canvas artboards, with
|
|
1063
1220
|
\`data-goto\` controls for the sequence. This is the bar.
|
|
1064
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
|
+
|
|
1065
1232
|
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1066
1233
|
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1067
1234
|
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
@@ -1069,7 +1236,9 @@ annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
|
1069
1236
|
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1070
1237
|
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1071
1238
|
document with a hero heading and value props that just restates what the canvas
|
|
1072
|
-
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.
|
|
1073
1242
|
|
|
1074
1243
|
<!-- SHARED-CORE:exemplar END -->
|
|
1075
1244
|
|
|
@@ -1116,7 +1285,7 @@ agent-native skills add visual-plan
|
|
|
1116
1285
|
\`\`\`
|
|
1117
1286
|
|
|
1118
1287
|
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1119
|
-
\`/visual-questions
|
|
1288
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1120
1289
|
register the connector without authenticating, then run
|
|
1121
1290
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1122
1291
|
|
|
@@ -1170,9 +1339,9 @@ and operate UI states, needs design review before code, wants comments pinned to
|
|
|
1170
1339
|
live screens, or asks to move a visual plan into a prototype.
|
|
1171
1340
|
|
|
1172
1341
|
Prefer \`/visual-plan\` for architecture, data flow, or non-interactive planning.
|
|
1173
|
-
Prefer \`/ui-plan\` when static screen review is enough. Use \`/
|
|
1174
|
-
|
|
1175
|
-
|
|
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.
|
|
1176
1345
|
|
|
1177
1346
|
## Core Workflow
|
|
1178
1347
|
|
|
@@ -1296,119 +1465,117 @@ reviewing and iterating.
|
|
|
1296
1465
|
|
|
1297
1466
|
- \`visual-plan\`
|
|
1298
1467
|
- \`ui-plan\`
|
|
1299
|
-
- \`visualize-plan\`
|
|
1300
1468
|
- \`visual-questions\`
|
|
1301
1469
|
`;
|
|
1302
|
-
export const PLAN_DESIGN_SKILL_MD =
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
].join("\n") + "\n";
|
|
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
|
+
`;
|
|
1412
1579
|
export const VISUAL_QUESTIONS_SKILL_MD = `---
|
|
1413
1580
|
name: visual-questions
|
|
1414
1581
|
description: >-
|
|
@@ -1422,10 +1589,10 @@ metadata:
|
|
|
1422
1589
|
# Visual Questions
|
|
1423
1590
|
|
|
1424
1591
|
Use \`/visual-questions\` when the next best step is not a plan yet, but a
|
|
1425
|
-
reviewable visual intake: single-choice
|
|
1426
|
-
notes, mockup choices, sketch diagrams, and a generated answer summary
|
|
1427
|
-
the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
|
|
1428
|
-
\`/prototype-plan\`, \`/plan-design
|
|
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\`.
|
|
1429
1596
|
|
|
1430
1597
|
## When To Use
|
|
1431
1598
|
|
|
@@ -1452,9 +1619,9 @@ Visual questions are an explicit intake command, not an automatic preflight for
|
|
|
1452
1619
|
4. The generated summary drives the next step: \`create-ui-plan\` for static UI
|
|
1453
1620
|
review, \`create-prototype-plan\` for click-through UI flows,
|
|
1454
1621
|
\`create-plan-design\` for high-fidelity branded UI review,
|
|
1455
|
-
\`create-visual-plan\` for general plans
|
|
1456
|
-
|
|
1457
|
-
|
|
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.
|
|
1458
1625
|
5. If the user leaves comments, call \`get-plan-feedback\` before using the answers.
|
|
1459
1626
|
|
|
1460
1627
|
## Question Types
|
|
@@ -1493,8 +1660,9 @@ desktop/mobile pair for a popover, panel, or component.
|
|
|
1493
1660
|
interaction feel matters.
|
|
1494
1661
|
- \`create-plan-design\`: create a high-fidelity branded design plan from the
|
|
1495
1662
|
answers when visual polish is the primary review input.
|
|
1496
|
-
- \`create-visual-plan\`: create a general visual plan from the answers
|
|
1497
|
-
|
|
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.
|
|
1498
1666
|
- \`export-visual-plan\`: export answer plans as HTML, Markdown fallback,
|
|
1499
1667
|
structured JSON, and MDX files when the intake needs to be checked into a repo.
|
|
1500
1668
|
- \`read-visual-plan-source\` / \`patch-visual-plan-source\`: inspect or patch the
|
|
@@ -1514,455 +1682,7 @@ agent-native skills add visual-plan
|
|
|
1514
1682
|
\`\`\`
|
|
1515
1683
|
|
|
1516
1684
|
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1517
|
-
\`/visual-questions
|
|
1518
|
-
register the connector without authenticating, then run
|
|
1519
|
-
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1520
|
-
|
|
1521
|
-
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
1522
|
-
with no sign-up — you work as a guest. Sign in only when you want to save or
|
|
1523
|
-
share; signing in claims the plans you made as a guest into your account.
|
|
1524
|
-
|
|
1525
|
-
Sharing and commenting require an account: public/shared plans are viewable by
|
|
1526
|
-
anyone with the link, but commenting on them needs an agent-native account.
|
|
1527
|
-
|
|
1528
|
-
For fully offline, no-account use, run the Plans app locally and sync plans to
|
|
1529
|
-
your repo as MDX. This local mode is a separate advanced path, not the default
|
|
1530
|
-
hosted flow.
|
|
1531
|
-
|
|
1532
|
-
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`,
|
|
1533
|
-
do not keep retrying the tool. Authenticate the connector with
|
|
1534
|
-
\`agent-native connect https://plan.agent-native.com\` (OAuth-capable hosts can
|
|
1535
|
-
instead re-run /mcp and choose Authenticate), then continue once the connector
|
|
1536
|
-
is available.
|
|
1537
|
-
|
|
1538
|
-
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
1539
|
-
not put shared secrets in skill files.
|
|
1540
|
-
`;
|
|
1541
|
-
export const VISUALIZE_PLAN_SKILL_MD = `---
|
|
1542
|
-
name: visualize-plan
|
|
1543
|
-
description: >-
|
|
1544
|
-
Convert an existing Codex, Claude Code, Markdown, or pasted plan into an
|
|
1545
|
-
Agent-Native Plans visual companion with diagrams, wireframes, prototypes,
|
|
1546
|
-
annotations, and feedback.
|
|
1547
|
-
metadata:
|
|
1548
|
-
visibility: exported
|
|
1549
|
-
---
|
|
1550
|
-
|
|
1551
|
-
# Visualize Plan
|
|
1552
|
-
|
|
1553
|
-
Use \`/visualize-plan\` when a plan already exists and the user wants it easier to
|
|
1554
|
-
review. The native Codex or Claude Code plan can stay where it is; Agent-Native
|
|
1555
|
-
Plans creates a structured visual companion beside it — diagrams, wireframes,
|
|
1556
|
-
state sketches, functional prototypes, option cards, and comment prompts instead
|
|
1557
|
-
of a wall of text. It still reads like a plan, not a marketing page.
|
|
1558
|
-
|
|
1559
|
-
Use \`/prototype-plan\` instead when the user wants a functional prototype as the first
|
|
1560
|
-
artifact and there is no text plan to preserve. When a text plan already exists,
|
|
1561
|
-
\`/visualize-plan\` should decide whether it needs no visual surface, canvas only,
|
|
1562
|
-
or canvas + prototype; call \`convert-visual-plan-to-prototype\` after
|
|
1563
|
-
visualization when its HTML wireframes should drive a prototype review.
|
|
1564
|
-
|
|
1565
|
-
## Plan Discipline
|
|
1566
|
-
|
|
1567
|
-
- **Gate hard.** A visual companion is worth it only when the source plan is
|
|
1568
|
-
long, risky, or hard to react to as text. If the source plan is for trivial,
|
|
1569
|
-
unambiguous work, skip the companion and just implement.
|
|
1570
|
-
- **Stay grounded and read-only.** Preserve the source plan's intent, do not
|
|
1571
|
-
invent codebase facts, and label anything inferred as inferred. Make no source
|
|
1572
|
-
edits while building or reviewing the companion.
|
|
1573
|
-
- **The companion is the approval gate.** Ask the user to review and approve the
|
|
1574
|
-
direction before you write code, and name which files/areas the work touches.
|
|
1575
|
-
Carry answerable unresolved assumptions and open questions into a bottom
|
|
1576
|
-
\`question-form\` block instead of guessing silently.
|
|
1577
|
-
|
|
1578
|
-
## Workflow
|
|
1579
|
-
|
|
1580
|
-
1. Gather the existing plan text from the user's paste, a referenced file, or
|
|
1581
|
-
recent visible agent context. Do not invent the source plan. If no plan text
|
|
1582
|
-
exists and the work is UI-heavy, use \`/ui-plan\` or \`/prototype-plan\` instead.
|
|
1583
|
-
2. Call \`visualize-plan\` with \`planText\`, \`title\`, \`brief\`, \`source\`, and
|
|
1584
|
-
\`repoPath\` when available.
|
|
1585
|
-
3. Surface the returned Plans link or inline MCP App.
|
|
1586
|
-
4. Decide the top visual surface with the rules below, then enrich the import
|
|
1587
|
-
with \`update-visual-plan\` (prefer targeted \`contentPatches\`): add canvas
|
|
1588
|
-
wireframes for user-visible UI, add \`content.prototype\` for multi-step flows,
|
|
1589
|
-
add diagrams for architecture or data flow, add option cards for real
|
|
1590
|
-
tradeoffs, and add explicit open questions. Apply the two cores below — the
|
|
1591
|
-
companion must meet the same quality bar as a fresh plan, not be a thinner
|
|
1592
|
-
ruleset. Label inferred visuals as inferred. When the user wants
|
|
1593
|
-
source-control friendly edits, use \`patch-visual-plan-source\` against the MDX
|
|
1594
|
-
files instead of regenerating the plan. If the user asks to make the visual
|
|
1595
|
-
companion functional and the canvas contains HTML wireframes, call
|
|
1596
|
-
\`convert-visual-plan-to-prototype\`.
|
|
1597
|
-
5. Ask the user to react, then call \`get-plan-feedback\` before implementing,
|
|
1598
|
-
after review, and before the final response.
|
|
1599
|
-
6. Treat imported text as source material. The structured visual plan and
|
|
1600
|
-
comments are the review surface; HTML is the export receipt. Do not replace a
|
|
1601
|
-
native plan unless the user asks.
|
|
1602
|
-
|
|
1603
|
-
## Visual Surface Choice
|
|
1604
|
-
|
|
1605
|
-
Choose the surface after reading the source plan and before enriching it. Do not
|
|
1606
|
-
add visual chrome by default:
|
|
1607
|
-
|
|
1608
|
-
- **No visual surface** when the imported plan is architecture-only,
|
|
1609
|
-
backend-only, data migration, copy-only, or otherwise non-visual. Keep the
|
|
1610
|
-
companion as a strong document and add diagrams only when relationships need a
|
|
1611
|
-
visual explanation.
|
|
1612
|
-
- **Canvas only** when the source plan includes one static screen, a before/after
|
|
1613
|
-
comparison, a component state, a small popover, or a visual direction that does
|
|
1614
|
-
not require clicking. Put those wireframes in \`content.canvas\` and omit
|
|
1615
|
-
\`content.prototype\`.
|
|
1616
|
-
- **Canvas + prototype** when the source plan describes a multi-step UI flow,
|
|
1617
|
-
meaningful interactive app behavior, onboarding, wizard, review/approval flow,
|
|
1618
|
-
navigation change, or any sequence the reviewer needs to operate. Keep the
|
|
1619
|
-
static wireframes in
|
|
1620
|
-
\`content.canvas\`, add the aligned functional prototype in
|
|
1621
|
-
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
1622
|
-
- **Prototype-first conversion** when an already-visualized plan's HTML
|
|
1623
|
-
wireframes should become functional. Use \`convert-visual-plan-to-prototype\` for
|
|
1624
|
-
an existing canvas, or \`update-visual-plan\` with \`set-prototype\` when the
|
|
1625
|
-
imported plan needs a hand-authored prototype that does not map cleanly from
|
|
1626
|
-
the canvas. Keep static mocks unless the user explicitly asks to remove them.
|
|
1627
|
-
|
|
1628
|
-
For mixed canvas + prototype companions, reuse the same real labels, states, and
|
|
1629
|
-
screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
1630
|
-
the prototype is the interactive version of that same flow, not a separate
|
|
1631
|
-
design direction. If the imported plan only has text, add HTML wireframes before
|
|
1632
|
-
calling \`convert-visual-plan-to-prototype\`; never convert a diagram-only or
|
|
1633
|
-
empty canvas into a fake prototype.
|
|
1634
|
-
|
|
1635
|
-
<!-- SHARED-CORE:wireframe-canvas START -->
|
|
1636
|
-
|
|
1637
|
-
## Wireframe & Canvas Core
|
|
1638
|
-
|
|
1639
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
1640
|
-
\`/visualize-plan\`. It is the single source of truth for how wireframes and the
|
|
1641
|
-
canvas work. Do not paraphrase it per command.
|
|
1642
|
-
|
|
1643
|
-
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
1644
|
-
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
1645
|
-
screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
|
|
1646
|
-
the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
|
|
1647
|
-
never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags, font-family, hex colors,
|
|
1648
|
-
or any width/height/coordinates. You write real HTML layout and real product
|
|
1649
|
-
content; the renderer styles and roughens it.
|
|
1650
|
-
|
|
1651
|
-
**A wireframe block's data is an HTML screen plus a surface:**
|
|
1652
|
-
|
|
1653
|
-
\`\`\`json
|
|
1654
|
-
{
|
|
1655
|
-
"surface": "browser",
|
|
1656
|
-
"html": "<div style=\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\"><h1>Sign in</h1><p class=\\"wf-muted\\">Use your work email to continue.</p><div class=\\"wf-card\\" style=\\"display:flex;flex-direction:column;gap:10px\\"><label>Email<input value=\\"jane@acme.co\\" /></label><label>Password<input value=\\"••••••••\\" /></label><label style=\\"display:flex;align-items:center;gap:8px\\"><input type=\\"checkbox\\" checked /> Remember me</label><button class=\\"primary\\">Sign in</button></div><a href=\\"#\\">Forgot password?</a></div>"
|
|
1657
|
-
}
|
|
1658
|
-
\`\`\`
|
|
1659
|
-
|
|
1660
|
-
**Write PLAIN semantic HTML and let the renderer style it.** Bare elements
|
|
1661
|
-
(\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
|
|
1662
|
-
are auto-themed — no classes needed. Helper classes carry the rest:
|
|
1663
|
-
|
|
1664
|
-
- \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
|
|
1665
|
-
- \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
|
|
1666
|
-
(\`<span class="wf-pill accent">\`) for the accent-filled variant.
|
|
1667
|
-
- \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
|
|
1668
|
-
- \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
|
|
1669
|
-
primary button.
|
|
1670
|
-
|
|
1671
|
-
**Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
|
|
1672
|
-
these on light/dark, so reading them is what keeps a mockup correct in both
|
|
1673
|
-
themes. For any inline border, background, or text color, reference a token:
|
|
1674
|
-
\`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
|
|
1675
|
-
\`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
|
|
1676
|
-
(page background), \`--wf-card\` (raised surface), \`--wf-accent\` /
|
|
1677
|
-
\`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
|
|
1678
|
-
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
1679
|
-
renderer owns the sketch/clean font.
|
|
1680
|
-
|
|
1681
|
-
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
1682
|
-
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
1683
|
-
renderer never repositions anything. Compose the actual product: reproduce the
|
|
1684
|
-
current screen, then show the modification. Real labels, real counts, real dates,
|
|
1685
|
-
real button text grounded in the screen you read; not lorem or gray bars.
|
|
1686
|
-
|
|
1687
|
-
**Surface presets — match the real footprint, never default to desktop+mobile.**
|
|
1688
|
-
Pick the \`surface\` that matches what the user will actually see:
|
|
1689
|
-
|
|
1690
|
-
- \`browser\`: a web page that needs a browser chrome frame around it.
|
|
1691
|
-
- \`desktop\`: a full desktop app page or app shell.
|
|
1692
|
-
- \`mobile\`: a phone screen, only when the work is genuinely mobile.
|
|
1693
|
-
- \`popover\`: a small floating menu, dropdown, or inline popover.
|
|
1694
|
-
- \`panel\`: a side panel, inspector, or sidebar widget.
|
|
1695
|
-
|
|
1696
|
-
The surface locks the footprint and aspect; never set width/height/coordinates.
|
|
1697
|
-
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
1698
|
-
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
1699
|
-
actually changes the layout. For a component or widget, show one broader
|
|
1700
|
-
app-context frame only when placement affects understanding, then the focused
|
|
1701
|
-
component states.
|
|
1702
|
-
|
|
1703
|
-
**Modify, don't redesign.** When the task changes an existing screen, reproduce
|
|
1704
|
-
the current screen's real layout and footprint FIRST, then change only the delta
|
|
1705
|
-
and call it out with a single annotation. Do not restack the page into a new
|
|
1706
|
-
layout. For net-new surfaces, compose from the real app shell.
|
|
1707
|
-
|
|
1708
|
-
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
1709
|
-
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
1710
|
-
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
1711
|
-
the whole page around it, and do not scale a duplicate up. Pick the matching
|
|
1712
|
-
\`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
|
|
1713
|
-
page width.
|
|
1714
|
-
|
|
1715
|
-
**Loading / skeleton states.** Set \`data.skeleton: true\` on the wireframe and
|
|
1716
|
-
fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
|
|
1717
|
-
built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
|
|
1718
|
-
no labels or copy. The renderer drops borders, sketch, and color into the
|
|
1719
|
-
skeleton register automatically. Never escape to a \`custom-html\` document block
|
|
1720
|
-
to fake a loader, and never move a mockup out of the canvas — mockups always
|
|
1721
|
-
live in canvas artboards.
|
|
1722
|
-
|
|
1723
|
-
**Editing an existing mockup.** To change one element, text, or color in an
|
|
1724
|
-
existing html mockup, do NOT regenerate the frame — call \`update-visual-plan\`
|
|
1725
|
-
with \`contentPatches: [{ op: "patch-wireframe-html", blockId, edits: [{ find,
|
|
1726
|
-
replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
|
|
1727
|
-
first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
|
|
1728
|
-
occurrence. The result is re-sanitized.
|
|
1729
|
-
|
|
1730
|
-
**Canvas annotations are designer notes on the artboard.** When a top canvas is
|
|
1731
|
-
present, sprinkle Figma-style notes near the frames they explain: a short
|
|
1732
|
-
heading, supporting text, and bullets — plain text layers, never bordered or
|
|
1733
|
-
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
1734
|
-
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
1735
|
-
point at one specific control or transition; for a broad frame-level note, write
|
|
1736
|
-
text beside the frame with no connector. Connectors are for real sequences only —
|
|
1737
|
-
never fake "Step 1 → Step 2" lines between independent states.
|
|
1738
|
-
|
|
1739
|
-
**Do not create overlapping annotations.** Anchor each note to the frame it
|
|
1740
|
-
explains with \`targetId\` + \`placement\` (top/right/bottom/left). The renderer
|
|
1741
|
-
parks notes in a gutter beside the frame and lays them out automatically — never
|
|
1742
|
-
supply x/y or points for anchored notes; hand-placed coordinates fight the
|
|
1743
|
-
auto-layout and cause the overlap you're trying to avoid. Reserve arrows for a
|
|
1744
|
-
note that must point at a specific control inside a frame; a note that simply
|
|
1745
|
-
sits beside its frame needs no arrow.
|
|
1746
|
-
|
|
1747
|
-
**Patching.** Edit one wireframe, canvas annotation, or block with targeted \`contentPatches\`
|
|
1748
|
-
(for example \`update-block\`, \`replace-blocks\`, \`update-canvas-annotation\`) rather
|
|
1749
|
-
than regenerating the whole plan. \`contentPatches\` are part of the public MCP
|
|
1750
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
1751
|
-
edits. If an agent is working from exported source files, use
|
|
1752
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
1753
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
1754
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
1755
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
1756
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
1757
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
1758
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
1759
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
1760
|
-
|
|
1761
|
-
**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.
|
|
1762
|
-
|
|
1763
|
-
**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).
|
|
1764
|
-
|
|
1765
|
-
**Good example — a contacts list, surface \`browser\`.** A small, real screen
|
|
1766
|
-
composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
1767
|
-
hex colors:
|
|
1768
|
-
|
|
1769
|
-
\`\`\`html
|
|
1770
|
-
<div style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%">
|
|
1771
|
-
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
1772
|
-
<h1>Contacts</h1>
|
|
1773
|
-
<button class="primary">New contact</button>
|
|
1774
|
-
</div>
|
|
1775
|
-
<div style="display:flex;gap:6px">
|
|
1776
|
-
<span class="wf-pill accent">All 128</span>
|
|
1777
|
-
<span class="wf-pill">Favorites</span>
|
|
1778
|
-
<span class="wf-pill">Archived</span>
|
|
1779
|
-
</div>
|
|
1780
|
-
<div class="wf-card" style="display:flex;flex-direction:column;gap:0;padding:0">
|
|
1781
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)">
|
|
1782
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1783
|
-
<div style="flex:1"><strong>Jane Cooper</strong><br /><small>jane@acme.co</small></div>
|
|
1784
|
-
<span class="wf-pill">Lead</span>
|
|
1785
|
-
</div>
|
|
1786
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
1787
|
-
<div style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"></div>
|
|
1788
|
-
<div style="flex:1"><strong>Marcus Lee</strong><br /><small>marcus@globex.io</small></div>
|
|
1789
|
-
<span class="wf-pill">Customer</span>
|
|
1790
|
-
</div>
|
|
1791
|
-
</div>
|
|
1792
|
-
</div>
|
|
1793
|
-
\`\`\`
|
|
1794
|
-
|
|
1795
|
-
**Mockups belong in the top visual review area.** Static visuals live on the
|
|
1796
|
-
canvas; multi-step flows get both canvas wireframes and a prototype. When the
|
|
1797
|
-
user asks for a mockup, UI state, loading state, layout, screen, or visual
|
|
1798
|
-
comparison, make the canvas the primary home for that static visual. When the
|
|
1799
|
-
user asks for a prototype or the plan contains a sequence the reviewer must
|
|
1800
|
-
feel, keep the canvas artboards and add \`content.prototype\` so the top surface
|
|
1801
|
-
shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
|
|
1802
|
-
implementation, but they should not host the primary mockup or prototype just
|
|
1803
|
-
because \`custom-html\`, screenshots, or prose are easier to produce. If the
|
|
1804
|
-
canvas/prototype surface cannot represent the requested fidelity, still keep the
|
|
1805
|
-
closest top-surface representation and call out or extend the needed renderer
|
|
1806
|
-
capability.
|
|
1807
|
-
|
|
1808
|
-
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
1809
|
-
nodes instead of \`html\`; the renderer still accepts and displays it, but new
|
|
1810
|
-
plans emit \`html\`. Do not author fresh kit-tree screens — write the HTML mockup
|
|
1811
|
-
instead. Likewise, old or imported plans may carry coordinate-based regions or
|
|
1812
|
-
free-float x/y on notes or artboards; those are legacy escape hatches the
|
|
1813
|
-
renderer still shows but you must never produce. The \`surface\` drives the aspect
|
|
1814
|
-
and footprint, the canvas auto-places artboards, and the gutter parks notes by
|
|
1815
|
-
\`targetId\` + \`placement\`; never supply width, height, or coordinates for a new
|
|
1816
|
-
plan.
|
|
1817
|
-
|
|
1818
|
-
<!-- SHARED-CORE:wireframe-canvas END -->
|
|
1819
|
-
|
|
1820
|
-
<!-- SHARED-CORE:document-quality START -->
|
|
1821
|
-
|
|
1822
|
-
## Document Quality Core
|
|
1823
|
-
|
|
1824
|
-
This section is shared, word for word, by \`/visual-plan\`, \`/ui-plan\`, and
|
|
1825
|
-
\`/visualize-plan\`. It is the single source of truth for the document below the
|
|
1826
|
-
canvas. Do not paraphrase it per command.
|
|
1827
|
-
|
|
1828
|
-
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
1829
|
-
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
1830
|
-
self-contained, and specific. State the objective and what "done" means, the
|
|
1831
|
-
scope and non-goals, the proposed approach with the key decisions and their
|
|
1832
|
-
rationale, ordered steps that name real files, symbols, actions, and data
|
|
1833
|
-
shapes, the risks, and a closing verification step (tests, build, or a checkable
|
|
1834
|
-
behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
1835
|
-
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
1836
|
-
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
1837
|
-
|
|
1838
|
-
**Top visuals and document never duplicate each other.** The UI story lives in
|
|
1839
|
-
the top visual surface: canvas artboards for static inspection, plus prototype
|
|
1840
|
-
tabs when the flow should be functional. The document carries the technical depth
|
|
1841
|
-
the visuals cannot show — concrete file/symbol maps, API and data contracts,
|
|
1842
|
-
code snippets, migration or implementation phases, risks, and validation. Repeat
|
|
1843
|
-
a wireframe in the document only for a genuinely new detail view or comparison.
|
|
1844
|
-
Skip the visual surface entirely for non-visual work and write a clean rich
|
|
1845
|
-
document.
|
|
1846
|
-
|
|
1847
|
-
**Use the right block, and make it carry substance.** For the authoritative,
|
|
1848
|
-
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
1849
|
-
— it returns the live registry vocabulary (type, MDX tag, placement, key fields)
|
|
1850
|
-
so you never emit a block the editor cannot render or round-trip:
|
|
1851
|
-
|
|
1852
|
-
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
1853
|
-
- \`implementation-map\` / \`code-tabs\` for the file map: file path, the
|
|
1854
|
-
symbols/components to touch, the reason, risk/coordination notes, and a
|
|
1855
|
-
concise syntax-highlighted snippet of the code shape — never the whole file,
|
|
1856
|
-
never a prose-only file list.
|
|
1857
|
-
- \`decision\` for two or three option cards with consequences. These are static
|
|
1858
|
-
records; do not style them like clickable tabs or chips unless the renderer
|
|
1859
|
-
truly supports changing the selection.
|
|
1860
|
-
- \`diagram\` for architecture, sequence, data-flow, dependency, or state
|
|
1861
|
-
relationships, only when it clarifies something real. Labels must not overlap
|
|
1862
|
-
nodes, connectors, or each other.
|
|
1863
|
-
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1864
|
-
only prose usually means the plan is under-specified — include a relevant
|
|
1865
|
-
visual unless the tab is intentionally document-only.
|
|
1866
|
-
- \`table\`, \`checklist\`, \`callout\` for scannable structure.
|
|
1867
|
-
|
|
1868
|
-
**Open questions live at the bottom as a form when answers would change the
|
|
1869
|
-
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1870
|
-
block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
|
|
1871
|
-
\`freeform\` for constraints, \`recommended: true\` for the default you would pick,
|
|
1872
|
-
and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
|
|
1873
|
-
Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
|
|
1874
|
-
relevant section. Never bury a questions/decisions wall inside the plan
|
|
1875
|
-
narrative.
|
|
1876
|
-
|
|
1877
|
-
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
1878
|
-
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1879
|
-
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1880
|
-
blocks for normal plans. It may support supplemental demos or references, but it
|
|
1881
|
-
is never the primary home for a requested mockup, UI state, or visual
|
|
1882
|
-
comparison. If fidelity requires HTML/CSS, image capture, or real React/CSS, the
|
|
1883
|
-
product fix is canvas support for that artifact type, not moving the mockup into
|
|
1884
|
-
the document.
|
|
1885
|
-
|
|
1886
|
-
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
1887
|
-
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
1888
|
-
unreadable diagrams before asking for approval.
|
|
1889
|
-
|
|
1890
|
-
<!-- SHARED-CORE:document-quality END -->
|
|
1891
|
-
|
|
1892
|
-
<!-- SHARED-CORE:exemplar START -->
|
|
1893
|
-
|
|
1894
|
-
## Good vs. Bad Exemplar
|
|
1895
|
-
|
|
1896
|
-
**GOOD.** A \`/ui-plan\` for a todo app: a canvas with a \`desktop\` artboard whose
|
|
1897
|
-
\`data.html\` is a real flex layout — a sidebar of links (\`Inbox 12\`, \`Today 4\`,
|
|
1898
|
-
\`Done\`), a main column with an \`<h1>Today</h1>\`, accent \`.wf-pill\`s for the
|
|
1899
|
-
filters, a muted section label \`OVERDUE\`, and \`.wf-card\` task rows carrying real
|
|
1900
|
-
titles, due dates, and a primary \`button.primary\` — styled only through bare
|
|
1901
|
-
elements, helper classes, and \`--wf-*\` tokens, so the renderer applies the
|
|
1902
|
-
correct desktop footprint, theme, and one subtle whole-frame wobble. Plain-text
|
|
1903
|
-
designer notes sit spaced off the frame, pointing only at the controls that need
|
|
1904
|
-
explanation. Below it, a Claude/Codex-grade document: objective and
|
|
1905
|
-
done-criteria, an \`implementation-map\` naming the real components and actions
|
|
1906
|
-
with short highlighted snippets, a \`decision\` card weighing two real approaches,
|
|
1907
|
-
and a validation step — none of it repeating the canvas. If the task also
|
|
1908
|
-
changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
1909
|
-
whose screens use the same labels and states as the canvas artboards, with
|
|
1910
|
-
\`data-goto\` controls for the sequence. This is the bar.
|
|
1911
|
-
|
|
1912
|
-
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1913
|
-
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1914
|
-
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
1915
|
-
annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
1916
|
-
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1917
|
-
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1918
|
-
document with a hero heading and value props that just restates what the canvas
|
|
1919
|
-
already shows. Never produce this.
|
|
1920
|
-
|
|
1921
|
-
<!-- SHARED-CORE:exemplar END -->
|
|
1922
|
-
|
|
1923
|
-
## Tool Guidance
|
|
1924
|
-
|
|
1925
|
-
- \`visualize-plan\`: create the visual companion from the existing text plan.
|
|
1926
|
-
- \`update-visual-plan\`: enrich the import; prefer targeted \`contentPatches\` over
|
|
1927
|
-
replacing the whole content. Use \`set-prototype\`, \`patch-prototype-html\`,
|
|
1928
|
-
\`update-prototype-screen\`, and \`patch-wireframe-html\` when revising
|
|
1929
|
-
functional prototype flows or their static frame counterparts.
|
|
1930
|
-
- \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
|
|
1931
|
-
into a functional prototype while preserving static mocks by default.
|
|
1932
|
-
- \`create-prototype-plan\`: use only when the user wants a prototype-first plan
|
|
1933
|
-
and there is no existing plan text that \`/visualize-plan\` should preserve.
|
|
1934
|
-
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
1935
|
-
optional \`canvas.mdx\`, optional \`prototype.mdx\`, optional \`.plan-state.json\`,
|
|
1936
|
-
and JSON.
|
|
1937
|
-
- \`patch-visual-plan-source\`: apply granular MDX AST patches by stable block,
|
|
1938
|
-
artboard, annotation, component, prototype screen, or wireframe-node id.
|
|
1939
|
-
- \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
|
|
1940
|
-
- \`get-visual-plan\`: inspect the current structured plan, exported HTML, and
|
|
1941
|
-
annotations; it also returns the MDX folder for source workflows.
|
|
1942
|
-
- \`get-plan-feedback\`: read unconsumed reviewer comments before coding; it
|
|
1943
|
-
returns grouped threads, exact anchor details, expected resolver, and recent
|
|
1944
|
-
review-event payloads so agents can act only on the comments meant for them.
|
|
1945
|
-
- \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
|
|
1946
|
-
files for repo check-in.
|
|
1947
|
-
|
|
1948
|
-
When the user critiques a plan's look or structure, fix the renderer or this
|
|
1949
|
-
skill — never hand-edit one stored plan. Turn feedback into better guidance.
|
|
1950
|
-
|
|
1951
|
-
## Setup & Authentication
|
|
1952
|
-
|
|
1953
|
-
There are two ways into Plans.
|
|
1954
|
-
|
|
1955
|
-
**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
|
|
1956
|
-
installs the Plans skills, registers the hosted Plans MCP connector, and
|
|
1957
|
-
authenticates it in the same step (a one-time browser sign-in at setup — this is
|
|
1958
|
-
intended), so the first tool call does not hit an OAuth wall:
|
|
1959
|
-
|
|
1960
|
-
\`\`\`bash
|
|
1961
|
-
agent-native skills add visual-plan
|
|
1962
|
-
\`\`\`
|
|
1963
|
-
|
|
1964
|
-
After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`, \`/plan-design\`,
|
|
1965
|
-
\`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1685
|
+
\`/visual-questions\`) generate a plan and open the editor. Pass \`--no-connect\` to
|
|
1966
1686
|
register the connector without authenticating, then run
|
|
1967
1687
|
\`agent-native connect https://plan.agent-native.com\` whenever you are ready.
|
|
1968
1688
|
|
|
@@ -2080,13 +1800,12 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2080
1800
|
"ui-plan": UI_PLAN_SKILL_MD,
|
|
2081
1801
|
"prototype-plan": PROTOTYPE_PLAN_SKILL_MD,
|
|
2082
1802
|
"plan-design": PLAN_DESIGN_SKILL_MD,
|
|
2083
|
-
"visualize-plan": VISUALIZE_PLAN_SKILL_MD,
|
|
2084
1803
|
},
|
|
2085
1804
|
manifest: normalizeAppSkillManifest({
|
|
2086
1805
|
schemaVersion: 1,
|
|
2087
1806
|
id: "visual-plans",
|
|
2088
1807
|
displayName: "Agent-Native Plans",
|
|
2089
|
-
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.",
|
|
2090
1809
|
hosted: {
|
|
2091
1810
|
url: "https://plan.agent-native.com",
|
|
2092
1811
|
mcpUrl: "https://plan.agent-native.com/_agent-native/mcp",
|
|
@@ -2094,13 +1813,14 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2094
1813
|
mcp: { serverName: "agent-native-plans" },
|
|
2095
1814
|
auth: {
|
|
2096
1815
|
mode: "oauth",
|
|
2097
|
-
setup: "Install with the Agent-Native CLI to add the /visual-plan, /ui-plan, /prototype-plan, /plan-design, /visual-questions
|
|
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.",
|
|
2098
1817
|
},
|
|
2099
1818
|
surfaces: [
|
|
2100
1819
|
{
|
|
2101
1820
|
id: "visual-plan",
|
|
2102
1821
|
action: "create-visual-plan",
|
|
2103
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.",
|
|
2104
1824
|
},
|
|
2105
1825
|
{
|
|
2106
1826
|
id: "visual-questions",
|
|
@@ -2126,11 +1846,6 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2126
1846
|
path: "/plans",
|
|
2127
1847
|
description: "Create a full-fidelity Agent-Native design plan with a Design canvas tab and optional matching Prototype tab.",
|
|
2128
1848
|
},
|
|
2129
|
-
{
|
|
2130
|
-
id: "visualize-plan",
|
|
2131
|
-
action: "visualize-plan",
|
|
2132
|
-
path: "/plans",
|
|
2133
|
-
},
|
|
2134
1849
|
],
|
|
2135
1850
|
skills: [
|
|
2136
1851
|
{
|
|
@@ -2158,11 +1873,6 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
2158
1873
|
visibility: "exported",
|
|
2159
1874
|
exportAs: "plan-design",
|
|
2160
1875
|
},
|
|
2161
|
-
{
|
|
2162
|
-
path: "skills/visualize-plan",
|
|
2163
|
-
visibility: "exported",
|
|
2164
|
-
exportAs: "visualize-plan",
|
|
2165
|
-
},
|
|
2166
1876
|
],
|
|
2167
1877
|
hostAdapters: [
|
|
2168
1878
|
"codex-plugin",
|
|
@@ -2237,8 +1947,6 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
2237
1947
|
"design-plan": "visual-plans",
|
|
2238
1948
|
"design-plans": "visual-plans",
|
|
2239
1949
|
prototype: "visual-plans",
|
|
2240
|
-
"visualize-plan": "visual-plans",
|
|
2241
|
-
"visualize-plans": "visual-plans",
|
|
2242
1950
|
"html-plan": "visual-plans",
|
|
2243
1951
|
"plan-mode": "visual-plans",
|
|
2244
1952
|
plannotate: "visual-plans",
|
|
@@ -2264,7 +1972,6 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
2264
1972
|
"ui-plan",
|
|
2265
1973
|
"prototype-plan",
|
|
2266
1974
|
"plan-design",
|
|
2267
|
-
"visualize-plan",
|
|
2268
1975
|
"html-plan",
|
|
2269
1976
|
"plannotate",
|
|
2270
1977
|
],
|