@agent-native/core 0.37.1 → 0.37.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/brand-kit/fig/decode.d.ts +33 -0
- package/dist/brand-kit/fig/decode.d.ts.map +1 -0
- package/dist/brand-kit/fig/decode.js +358 -0
- package/dist/brand-kit/fig/decode.js.map +1 -0
- package/dist/brand-kit/fig/extract-design-system.d.ts +44 -0
- package/dist/brand-kit/fig/extract-design-system.d.ts.map +1 -0
- package/dist/brand-kit/fig/extract-design-system.js +752 -0
- package/dist/brand-kit/fig/extract-design-system.js.map +1 -0
- package/dist/brand-kit/fig/fig-to-html.d.ts +246 -0
- package/dist/brand-kit/fig/fig-to-html.d.ts.map +1 -0
- package/dist/brand-kit/fig/fig-to-html.js +1506 -0
- package/dist/brand-kit/fig/fig-to-html.js.map +1 -0
- package/dist/brand-kit/fig/index.d.ts +30 -0
- package/dist/brand-kit/fig/index.d.ts.map +1 -0
- package/dist/brand-kit/fig/index.js +43 -0
- package/dist/brand-kit/fig/index.js.map +1 -0
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +303 -69
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +6 -104
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +1 -1
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.d.ts.map +1 -1
- package/dist/client/context-xray/ContextSegmentRow.js +4 -4
- package/dist/client/context-xray/ContextSegmentRow.js.map +1 -1
- package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
- package/dist/client/context-xray/ContextTreemap.js +2 -2
- package/dist/client/context-xray/ContextTreemap.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +19 -18
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +4 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +6 -4
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/package.json +6 -1
package/dist/cli/skills.js
CHANGED
|
@@ -15,13 +15,13 @@ const HELP = `agent-native skills
|
|
|
15
15
|
|
|
16
16
|
Usage:
|
|
17
17
|
agent-native skills list
|
|
18
|
-
agent-native skills add assets|design-exploration|
|
|
18
|
+
agent-native skills add assets|design-exploration|visual-plan|visual-questions|ui-plan|visualize-plan|context-xray [--client codex|claude-code|claude-code-cli|cowork|all] [--scope user|project] [--mcp-url <url>] [--yes] [--dry-run] [--json]
|
|
19
19
|
agent-native skills add <manifest-or-app-dir> [--client ...] [--yes]
|
|
20
20
|
|
|
21
21
|
Examples:
|
|
22
22
|
agent-native skills add assets
|
|
23
23
|
agent-native skills add design-exploration
|
|
24
|
-
agent-native skills add
|
|
24
|
+
agent-native skills add visual-plan
|
|
25
25
|
agent-native skills add context-xray --client all
|
|
26
26
|
agent-native skills add assets --client claude-code
|
|
27
27
|
agent-native skills add assets --mcp-url https://my-app.ngrok-free.dev
|
|
@@ -186,22 +186,23 @@ iteration, or a human-in-the-loop choice among design directions.
|
|
|
186
186
|
and token values. Never paste bearer tokens into chat or logs.
|
|
187
187
|
`;
|
|
188
188
|
const VISUAL_PLANS_SKILL_MD = `---
|
|
189
|
-
name: visual-
|
|
189
|
+
name: visual-plan
|
|
190
190
|
description: >-
|
|
191
|
-
Use Agent-Native Plans when coding-agent work needs an interactive
|
|
192
|
-
document with diagrams, wireframes, mockups, prototypes, annotations,
|
|
193
|
-
comments.
|
|
191
|
+
Use Agent-Native Plans when coding-agent work needs an interactive structured
|
|
192
|
+
plan document with diagrams, wireframes, mockups, prototypes, annotations,
|
|
193
|
+
and comments.
|
|
194
194
|
metadata:
|
|
195
195
|
visibility: exported
|
|
196
196
|
---
|
|
197
197
|
|
|
198
198
|
# Agent-Native Plans
|
|
199
199
|
|
|
200
|
-
Agent-Native Plans is
|
|
201
|
-
plan you would normally write in Markdown, but as a
|
|
202
|
-
document with
|
|
203
|
-
options, tradeoff cards, file/symbol implementation maps,
|
|
204
|
-
annotation prompts. It is a
|
|
200
|
+
Agent-Native Plans is structured visual planning mode for coding agents.
|
|
201
|
+
Generate the kind of plan you would normally write in Markdown, but as a
|
|
202
|
+
scannable plan document with editable blocks mixed in: diagrams, wireframes,
|
|
203
|
+
mockups, prototype options, tradeoff cards, file/symbol implementation maps,
|
|
204
|
+
code previews, bounded custom HTML fragments, and annotation prompts. It is a
|
|
205
|
+
plan document, not a marketing page.
|
|
205
206
|
|
|
206
207
|
The goal is impatient review. The user should be able to react to visuals first
|
|
207
208
|
and read prose only where it helps.
|
|
@@ -209,22 +210,26 @@ and read prose only where it helps.
|
|
|
209
210
|
Install with the Agent-Native CLI. It adds the skills and the MCP connector:
|
|
210
211
|
|
|
211
212
|
\`\`\`bash
|
|
212
|
-
npx @agent-native/core@latest skills add
|
|
213
|
+
npx @agent-native/core@latest skills add visual-plan
|
|
213
214
|
\`\`\`
|
|
214
215
|
|
|
215
216
|
Then start typing \`/visual-plan\` for a fresh general plan, \`/ui-plan\` for a
|
|
216
|
-
UI-first high-fidelity plan,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
else.
|
|
217
|
+
UI-first high-fidelity plan, \`/visual-questions\` to force visual intake before
|
|
218
|
+
a plan, or \`/visualize-plan\` to turn an existing Codex, Claude Code, Markdown,
|
|
219
|
+
or pasted plan into a visual companion. The hosted MCP app opens inline where
|
|
220
|
+
supported and falls back to a browser link everywhere else.
|
|
220
221
|
|
|
221
222
|
## Slash Commands
|
|
222
223
|
|
|
223
|
-
- \`/visual-plan\`: create a fresh rich
|
|
224
|
+
- \`/visual-plan\`: create a fresh rich visual plan before implementation. Include
|
|
224
225
|
a docs-level plan, visual architecture/flow diagrams, detailed wireframes or
|
|
225
226
|
mockups when UI is involved, an implementation map with files/symbols/snippets,
|
|
226
227
|
tradeoffs, open questions, and clear feedback prompts.
|
|
227
|
-
- \`/
|
|
228
|
+
- \`/visual-questions\`: manually force the visual intake step before a plan.
|
|
229
|
+
Use it for chip questions, freeform answers, mockup choice tabs, sketch
|
|
230
|
+
diagrams, and a generated answer summary that can feed \`/visual-plan\`,
|
|
231
|
+
\`/ui-plan\`, \`/visualize-plan\`, or an existing plan update.
|
|
232
|
+
- \`/ui-plan\`: create a UI-first high-fidelity visual plan before implementation.
|
|
228
233
|
Use an optional top pan/zoom wireframe or diagram canvas when visuals clarify
|
|
229
234
|
the flow, then continue as a refined Notion-like document with rich tabs,
|
|
230
235
|
comments/drawing prompts, code tabs, and agent handoff notes.
|
|
@@ -245,9 +250,33 @@ Create or update a visual plan when:
|
|
|
245
250
|
clearer visually;
|
|
246
251
|
- you need the user to react before implementation.
|
|
247
252
|
|
|
248
|
-
The companion \`visualize-plan\`
|
|
249
|
-
|
|
250
|
-
wants
|
|
253
|
+
The companion \`visual-questions\` and \`visualize-plan\` skills are installed
|
|
254
|
+
with this one. Use \`visual-questions\` as the manual override when the user or
|
|
255
|
+
agent wants intake first; use \`visualize-plan\` when the user already has a
|
|
256
|
+
Codex, Claude Code, Markdown, or pasted text plan and wants a visual companion
|
|
257
|
+
instead of a fresh plan.
|
|
258
|
+
|
|
259
|
+
## Automatic Visual-Question Preflight
|
|
260
|
+
|
|
261
|
+
\`/visual-plan\` stays the main entry point. Before calling
|
|
262
|
+
\`create-visual-plan\`, decide whether a visual-question preflight would make the
|
|
263
|
+
plan meaningfully better.
|
|
264
|
+
|
|
265
|
+
Run \`create-visual-questions\` first when:
|
|
266
|
+
|
|
267
|
+
- UI direction, form factor, layout model, feature scope, visual style,
|
|
268
|
+
architecture shape, or flow depth is fuzzy enough that 2-6 answers would
|
|
269
|
+
change the plan;
|
|
270
|
+
- there are multiple plausible visual options and the user would benefit from
|
|
271
|
+
comparing mockups, diagrams, or chips before reading a plan;
|
|
272
|
+
- the user asks to see choices, answer questions, pick a direction, or review
|
|
273
|
+
intake before planning.
|
|
274
|
+
|
|
275
|
+
Skip the preflight when the work is trivial, the right answer is clear from the
|
|
276
|
+
codebase, the missing details can be safely stated as assumptions in the plan,
|
|
277
|
+
or asking questions would only slow down an otherwise concrete task. If the user
|
|
278
|
+
types \`/visual-questions\`, honor it as a manual override even if the heuristic
|
|
279
|
+
would normally skip intake.
|
|
251
280
|
|
|
252
281
|
## Plan Discipline
|
|
253
282
|
|
|
@@ -258,7 +287,7 @@ discipline before and around the plan document:
|
|
|
258
287
|
risky, architectural, UI-heavy, has multiple valid approaches, or the code is
|
|
259
288
|
unfamiliar. Skip it for trivial, unambiguous work — typos, one-line fixes, a
|
|
260
289
|
single well-specified function, anything whose diff you could describe in one
|
|
261
|
-
sentence — and just make the change. A polished
|
|
290
|
+
sentence — and just make the change. A polished visual plan is the most
|
|
262
291
|
expensive plan form; only invest when a wrong direction is costly. Never pad a
|
|
263
292
|
plan with filler or ship a single-step plan.
|
|
264
293
|
- **Research before you draft.** Read the real files, actions, schema, and
|
|
@@ -293,19 +322,26 @@ discipline before and around the plan document:
|
|
|
293
322
|
|
|
294
323
|
## Core Workflow
|
|
295
324
|
|
|
296
|
-
1. Call \`create-visual-plan\` with the title, brief, source, repo path, and
|
|
297
|
-
sections before
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
325
|
+
1. Call \`create-visual-plan\` with the title, brief, source, repo path, and
|
|
326
|
+
either structured \`content\` blocks or readable \`sections\` before
|
|
327
|
+
implementation.
|
|
328
|
+
2. Prefer structured \`content\` for every new plan. Use \`rich-text\`,
|
|
329
|
+
\`sketch-diagram\`, \`sketch-wireframe\`, \`tabs\`, \`code-tabs\`,
|
|
330
|
+
\`implementation-map\`, \`decision\`, \`checklist\`, \`table\`,
|
|
331
|
+
\`visual-questions\`, and bounded \`custom-html\` blocks. Do not send a full
|
|
332
|
+
standalone HTML document unless importing a legacy artifact.
|
|
301
333
|
3. Surface the returned Plans link or inline MCP App. In CLI hosts, ask the user
|
|
302
334
|
to review the plan visually.
|
|
303
335
|
4. Prefer diagrams, wireframes, UI mockups, option cards, implementation maps,
|
|
304
336
|
and small interactive prototypes over paragraphs.
|
|
305
337
|
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
306
338
|
and before the final response.
|
|
307
|
-
6. Incorporate comments/corrections with \`update-visual-plan
|
|
308
|
-
|
|
339
|
+
6. Incorporate comments/corrections with \`update-visual-plan\`. Prefer
|
|
340
|
+
\`contentPatches\` for targeted changes: \`update-rich-text\`,
|
|
341
|
+
\`replace-block\`, \`update-wireframe-region\`,
|
|
342
|
+
\`replace-wireframe-regions\`, \`update-canvas-frame\`, \`append-block\`,
|
|
343
|
+
\`remove-block\`, or \`update-custom-html\`. Use full \`content\` only for
|
|
344
|
+
broad restructuring.
|
|
309
345
|
7. Export an HTML/JSON/Markdown receipt with \`export-visual-plan\` when the
|
|
310
346
|
user wants a shareable summary.
|
|
311
347
|
|
|
@@ -320,6 +356,33 @@ discipline before and around the plan document:
|
|
|
320
356
|
mixed implementation planning.
|
|
321
357
|
- Wireframes should be concrete enough to critique: layout regions, controls,
|
|
322
358
|
states, empty/loading/error paths, review affordances, and copy placeholders.
|
|
359
|
+
- Sketch wireframes and diagrams should visibly use the app-owned
|
|
360
|
+
Rough.js/sketch renderer with subtle grids where useful, imperfect strokes,
|
|
361
|
+
and Virgil-style labels. Labels must not overlap rough lines, connectors, or
|
|
362
|
+
nodes. If the result looks like crisp boxes with normal borders, revise the
|
|
363
|
+
block data or renderer before asking for review.
|
|
364
|
+
- For component, popover, or widget plans, show one broader app-context frame
|
|
365
|
+
when placement affects understanding, then focused component states. Avoid
|
|
366
|
+
fake desktop/mobile flows unless real responsive behavior changes layout.
|
|
367
|
+
- Layered surfaces such as popovers and floating panels need an opaque sketch
|
|
368
|
+
surface; do not let background frames show through them.
|
|
369
|
+
- Placeholder text strokes should be sparse, aligned, and separated from labels
|
|
370
|
+
so they read as content rhythm instead of noisy gray bars. In compact cards,
|
|
371
|
+
use one or two thin strokes or omit strokes entirely rather than stacking bars
|
|
372
|
+
into the label area.
|
|
373
|
+
- Keep sketch regions padded. Labels, placeholder strokes, and buttons need
|
|
374
|
+
visible breathing room from rough borders; avoid placing UI marks directly on
|
|
375
|
+
frame edges.
|
|
376
|
+
- Buttons and primary actions in UI mockups must look actionable, not like inert
|
|
377
|
+
labels or decorative chips.
|
|
378
|
+
- When a top canvas is present, include Figma-like annotation text/arrows on the
|
|
379
|
+
canvas itself, not only in prose below. Prefer plain annotation text plus
|
|
380
|
+
arrows over boxed cards with borders, backgrounds, or shadows. Place each note
|
|
381
|
+
close to the frame it explains, aligned with that frame when possible, instead
|
|
382
|
+
of parking notes in unrelated canvas gaps.
|
|
383
|
+
- Tabs for UI states, component notes, or interaction notes should include a
|
|
384
|
+
relevant visual block unless they are intentionally document-only. Do not
|
|
385
|
+
create large tab controls that reveal only prose.
|
|
323
386
|
- Backend/refactor work gets architecture and data-flow diagrams.
|
|
324
387
|
- Complex tradeoffs get two or three option cards with consequences.
|
|
325
388
|
- Open questions are surfaced as visual callouts, not buried in paragraphs.
|
|
@@ -342,23 +405,36 @@ discipline before and around the plan document:
|
|
|
342
405
|
|
|
343
406
|
## Tool Guidance
|
|
344
407
|
|
|
345
|
-
- \`create-visual-plan\`: start one
|
|
408
|
+
- \`create-visual-plan\`: start one structured visual plan per agent task/run.
|
|
346
409
|
- \`create-ui-plan\`: start a UI-first plan with high-fidelity screen/state tabs.
|
|
410
|
+
- \`create-visual-questions\`: ask a visual intake questionnaire before creating
|
|
411
|
+
or updating a plan.
|
|
347
412
|
- \`visualize-plan\`: create a visual companion from an existing text plan.
|
|
348
|
-
- \`update-visual-plan\`: revise
|
|
349
|
-
|
|
413
|
+
- \`update-visual-plan\`: revise content blocks, sections, status, or comments.
|
|
414
|
+
Prefer targeted \`contentPatches\` over regenerating the whole plan.
|
|
415
|
+
\`contentPatches\` are part of the public MCP action schema, so Claude Code,
|
|
416
|
+
Codex, and other MCP hosts can make surgical edits without regenerating a
|
|
417
|
+
whole artifact.
|
|
418
|
+
- \`get-visual-plan\`: read the current structured plan, exported HTML, and annotations.
|
|
350
419
|
- \`get-plan-feedback\`: read unconsumed human feedback. Use it frequently.
|
|
351
420
|
- \`export-visual-plan\`: export HTML, Markdown fallback, and structured JSON.
|
|
352
421
|
|
|
353
|
-
##
|
|
354
|
-
|
|
355
|
-
- Prefer
|
|
356
|
-
-
|
|
422
|
+
## Structured Content Guidance
|
|
423
|
+
|
|
424
|
+
- Prefer structured content blocks over raw HTML. Rich text blocks should carry
|
|
425
|
+
implementation-plan substance, while diagrams, wireframes, code tabs, and
|
|
426
|
+
implementation maps make the work reviewable.
|
|
427
|
+
- Use \`custom-html\` only for bounded fragments inside a block. Never include
|
|
428
|
+
\`html\`, \`head\`, \`body\`, or \`script\` tags in custom fragments.
|
|
429
|
+
- \`sketch-diagram\` blocks must be legible: labels cannot overlap nodes,
|
|
430
|
+
connectors, rough lines, or each other; omit the diagram when it does not
|
|
431
|
+
clarify a real architecture, sequence, dependency, or state relationship.
|
|
432
|
+
- Match Agent-Native's restrained theme unless the user asks otherwise.
|
|
357
433
|
- Keep the first viewport legible and plan-like: title, brief, concise scope,
|
|
358
434
|
and a useful diagram/checklist/table when it helps.
|
|
359
|
-
- Use tabs
|
|
360
|
-
- Do not paste huge
|
|
361
|
-
link.
|
|
435
|
+
- Use tabs or small interactions only when they make review faster.
|
|
436
|
+
- Do not paste huge artifacts into chat. Store the plan in Plans and surface the
|
|
437
|
+
MCP app or link.
|
|
362
438
|
|
|
363
439
|
## Guardrails
|
|
364
440
|
|
|
@@ -389,7 +465,7 @@ react to.
|
|
|
389
465
|
|
|
390
466
|
\`/visual-plan\` remains the general rich planning command for architecture,
|
|
391
467
|
backend, refactors, migrations, and mixed work. Use \`/visualize-plan\` when a
|
|
392
|
-
text plan already exists and should become
|
|
468
|
+
text plan already exists and should become a visual companion.
|
|
393
469
|
|
|
394
470
|
## Plan Discipline
|
|
395
471
|
|
|
@@ -417,10 +493,21 @@ text plan already exists and should become an HTML companion.
|
|
|
417
493
|
## UI-First Workflow
|
|
418
494
|
|
|
419
495
|
1. Call \`create-ui-plan\` with a UI-specific title, brief, source, repo path,
|
|
420
|
-
and
|
|
496
|
+
and structured \`content\` when you need custom blocks. Otherwise provide
|
|
497
|
+
\`states\`, \`components\`, and \`implementationNotes\` so Plans can generate
|
|
498
|
+
the native editable canvas and document.
|
|
421
499
|
2. When the plan has meaningful UI flows, screens, or diagrams, make the top
|
|
422
500
|
of the document a bounded pan/zoom sketch canvas with the key artboards,
|
|
423
501
|
connectors, margin notes, and commentable visual anchors.
|
|
502
|
+
Use the app-owned Rough.js/sketch renderer: subtle grid field, deliberately
|
|
503
|
+
imperfect lines, Virgil-style wireframe labels, and Figma-like annotation
|
|
504
|
+
text/arrows on the top canvas. Labels must sit clear of rough lines,
|
|
505
|
+
connectors, controls, and neighboring notes.
|
|
506
|
+
Treat notes like Figma text layers: sprinkle headings, supporting text,
|
|
507
|
+
bullets, arrows, and labels around the artboards, but do not overlap the
|
|
508
|
+
wireframes or wrap the artboards in explanatory cards.
|
|
509
|
+
In dark mode, keep the canvas field slightly darker than the document, and
|
|
510
|
+
keep wireframe artboards flat rather than shadowed.
|
|
424
511
|
3. Continue below the canvas as a restrained, Notion-like interactive document:
|
|
425
512
|
clear prose, horizontal state tabs, inline wireframes, sketchy diagrams,
|
|
426
513
|
tables, vertical code tabs, and concise implementation notes.
|
|
@@ -430,7 +517,9 @@ text plan already exists and should become an HTML companion.
|
|
|
430
517
|
the document after the visual review area.
|
|
431
518
|
6. Call \`get-plan-feedback\` before implementation, after review, after a long
|
|
432
519
|
pause, and before the final response. Apply changes with
|
|
433
|
-
\`update-visual-plan\`.
|
|
520
|
+
\`update-visual-plan\`. Prefer targeted \`contentPatches\` for small changes
|
|
521
|
+
to one state tab, wireframe region, canvas frame, code tab, or document
|
|
522
|
+
block.
|
|
434
523
|
|
|
435
524
|
## Mockup Quality Bar
|
|
436
525
|
|
|
@@ -443,19 +532,56 @@ text plan already exists and should become an HTML companion.
|
|
|
443
532
|
change. Put them in tabs or adjacent panels rather than burying them in prose.
|
|
444
533
|
- Use concrete labels and copy placeholders that expose content length,
|
|
445
534
|
truncation, disabled states, and destructive actions.
|
|
535
|
+
- Buttons and primary actions must look actionable: visible affordance,
|
|
536
|
+
readable label/icon, and enabled/disabled treatment when relevant.
|
|
446
537
|
- Make state tabs span the plan content width. Small cards are fine for repeated
|
|
447
538
|
items, but the primary UI preview should not be trapped in a tiny thumbnail.
|
|
448
539
|
- Keep visuals review-focused, not decorative. Do not make a marketing page,
|
|
449
540
|
hero section, brand deck, or abstract mood board unless the user asks.
|
|
450
541
|
|
|
451
|
-
##
|
|
542
|
+
## Component And Widget Plans
|
|
543
|
+
|
|
544
|
+
When the work is a component, popover, sidebar widget, toolbar, card, modal, or
|
|
545
|
+
other small surface, do not generate a full app flow. Use compact component
|
|
546
|
+
states instead.
|
|
547
|
+
|
|
548
|
+
- Prefer square or vertical frames that match the component's real footprint. A
|
|
549
|
+
sidebar popover should look like a sidebar popover, not a desktop page or
|
|
550
|
+
phone screen.
|
|
551
|
+
- When placement matters, include one broader app-context frame showing the
|
|
552
|
+
surrounding page, sidebar, or toolbar, then focused component states.
|
|
553
|
+
- Layered surfaces such as popovers, menus, and floating inspectors need an
|
|
554
|
+
opaque sketch surface so they read as overlays instead of transparent boxes.
|
|
555
|
+
- Use state tabs such as \`Default\`, \`Expanded\`, \`Map\`, \`Loading\`, \`Empty\`,
|
|
556
|
+
and \`Error\`. Do not add \`Desktop\`, \`Mobile\`, or responsive states unless the
|
|
557
|
+
component actually changes layout across breakpoints.
|
|
558
|
+
- Draw only connectors for real sequences. Do not connect independent states
|
|
559
|
+
with fake "Step 1" lines.
|
|
560
|
+
- Ground every frame in the real product hierarchy: visible title, controls,
|
|
561
|
+
content groups, state labels, actions, empty/error copy, and realistic
|
|
562
|
+
density. If you have seen a screenshot or component code, reflect it.
|
|
563
|
+
- Keep labels outside collision zones. Text must never overlap wireframes,
|
|
564
|
+
connectors, toolbar controls, or neighboring notes.
|
|
565
|
+
- Placeholder text strokes should be sparse, aligned, and below labels; avoid
|
|
566
|
+
random-looking gray bars that collide with copy or make the sketch messy. In
|
|
567
|
+
compact cards, use one or two thin strokes or omit strokes rather than filling
|
|
568
|
+
the card with bars.
|
|
569
|
+
- Keep every sketch region padded. Labels, placeholder strokes, and buttons need
|
|
570
|
+
visible breathing room from rough borders; avoid edge-hugging component
|
|
571
|
+
layouts.
|
|
572
|
+
- Use the app-owned Rough.js/sketch renderer for wireframes and diagrams. The
|
|
573
|
+
result should look deliberately hand-drawn/scribbly with Virgil-style labels,
|
|
574
|
+
not like crisp bordered boxes on a grid.
|
|
452
575
|
|
|
453
|
-
|
|
454
|
-
runtime wires up the interaction:
|
|
576
|
+
## State Tabs
|
|
455
577
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
578
|
+
When showing multiple UI states, prefer the structured \`tabs\` block. Each tab
|
|
579
|
+
can contain rich text, sketch wireframes, diagrams, code tabs, or bounded custom
|
|
580
|
+
HTML fragments. Raw HTML tab attributes are only for legacy imported artifacts.
|
|
581
|
+
For UI-first plans, tabs named like component notes, interaction notes, screen
|
|
582
|
+
states, or review states should include a relevant visual block unless they are
|
|
583
|
+
intentionally document-only; prose-only tabs are usually a sign the plan is
|
|
584
|
+
under-specified.
|
|
459
585
|
|
|
460
586
|
Good state tab sets include:
|
|
461
587
|
|
|
@@ -470,8 +596,8 @@ Generated \`/ui-plan\` documents use one default shape: an optional Figma-style
|
|
|
470
596
|
pan/zoom visual preface followed by a refined Notion-like document. There is no
|
|
471
597
|
mode boolean. Provide \`states\` and \`components\` when the top canvas will help
|
|
472
598
|
the reviewer understand the flow; omit them when the plan should be
|
|
473
|
-
document-only.
|
|
474
|
-
|
|
599
|
+
document-only. Use structured blocks for custom states, diagrams, and code
|
|
600
|
+
detail instead of full standalone HTML.
|
|
475
601
|
|
|
476
602
|
The document below the canvas should still include the same planning substance:
|
|
477
603
|
screen states, component notes, implementation map, review prompts, comments,
|
|
@@ -483,7 +609,11 @@ document with notes explaining how the screens work together.
|
|
|
483
609
|
## Comments, Drawing, And Handoff
|
|
484
610
|
|
|
485
611
|
- Add visible annotation prompts beside the mockups: "Comment on layout",
|
|
486
|
-
"Circle unclear copy", "Mark missing state", or "Pick this option".
|
|
612
|
+
"Circle unclear copy", "Mark missing state", or "Pick this option". Canvas
|
|
613
|
+
annotations should feel like Figma callouts: plain text plus arrows, without
|
|
614
|
+
card borders, shadows, or background panels unless editing UI is required.
|
|
615
|
+
Place notes close to the frame they explain, aligned with that target frame
|
|
616
|
+
when possible, instead of parking notes in unrelated canvas gaps.
|
|
487
617
|
- Leave enough whitespace around key UI regions for drawing and callouts.
|
|
488
618
|
- Label important regions so comments can reference them without ambiguity.
|
|
489
619
|
- Include an "Agent Handoff" section after the mockups that summarizes the
|
|
@@ -510,19 +640,107 @@ starts editing.
|
|
|
510
640
|
|
|
511
641
|
## Tool Guidance
|
|
512
642
|
|
|
513
|
-
- \`create-ui-plan\`: create the UI-first
|
|
514
|
-
- \`update-visual-plan\`: revise
|
|
515
|
-
|
|
643
|
+
- \`create-ui-plan\`: create the UI-first structured visual plan.
|
|
644
|
+
- \`update-visual-plan\`: revise content blocks, mockups, comments, or handoff notes.
|
|
645
|
+
Prefer targeted \`contentPatches\` over regenerating the whole UI plan.
|
|
646
|
+
- \`get-visual-plan\`: inspect the current structured plan, exported HTML, and annotations.
|
|
516
647
|
- \`get-plan-feedback\`: read unconsumed reviewer comments before coding.
|
|
517
648
|
- \`export-visual-plan\`: export a review receipt when needed.
|
|
518
649
|
|
|
519
650
|
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`.
|
|
520
651
|
`;
|
|
652
|
+
const VISUAL_QUESTIONS_SKILL_MD = `---
|
|
653
|
+
name: visual-questions
|
|
654
|
+
description: >-
|
|
655
|
+
Use Agent-Native Plans to ask rich visual intake questions before creating a
|
|
656
|
+
UI plan or visual plan.
|
|
657
|
+
metadata:
|
|
658
|
+
visibility: exported
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
# Visual Questions
|
|
662
|
+
|
|
663
|
+
Use \`/visual-questions\` when the next best step is not a plan yet, but a
|
|
664
|
+
reviewable visual intake: single-choice chips, multi-select chips, freeform
|
|
665
|
+
notes, sketchy mockup choices, sketch diagrams, and a generated answer summary
|
|
666
|
+
that feeds the next planning prompt.
|
|
667
|
+
|
|
668
|
+
\`/visual-questions\` is the manual override for the automatic preflight that
|
|
669
|
+
\`/visual-plan\` may run. Use it when the user explicitly asks for intake first
|
|
670
|
+
or when the plan would be materially better after 2-6 visual choices.
|
|
671
|
+
|
|
672
|
+
## When To Use
|
|
673
|
+
|
|
674
|
+
- The user asks to be shown options before the agent writes a plan.
|
|
675
|
+
- UI direction, form factor, layout model, feature set, architecture shape,
|
|
676
|
+
flow depth, or visual style is still fuzzy enough that 2-6 answers would
|
|
677
|
+
materially change the plan.
|
|
678
|
+
- The user would benefit from choosing between visual mockups or diagrams rather
|
|
679
|
+
than answering text-only terminal prompts.
|
|
680
|
+
- The next flow should be: answer questions -> create UI plan, answer questions
|
|
681
|
+
-> create visual plan, answer questions -> update/visualize an existing plan.
|
|
682
|
+
|
|
683
|
+
Skip this for tiny, unambiguous changes. If the agent can reasonably infer the
|
|
684
|
+
answer, prefer \`/visual-plan\` or \`/ui-plan\` directly and put assumptions in
|
|
685
|
+
the plan.
|
|
686
|
+
|
|
687
|
+
## Workflow
|
|
688
|
+
|
|
689
|
+
1. Call \`create-visual-questions\` with a clear title, brief, source, and repo
|
|
690
|
+
path when known.
|
|
691
|
+
2. Omit \`questions\` for the default UI intake. Provide a custom \`questions\`
|
|
692
|
+
array only when the task has domain-specific choices.
|
|
693
|
+
3. Surface the returned Plans link and ask the user to answer visually.
|
|
694
|
+
4. The user can click \`Copy prompt\` or \`Send to agent\`; that generated
|
|
695
|
+
summary should drive the next step:
|
|
696
|
+
- call \`create-ui-plan\` for UI flow plans;
|
|
697
|
+
- call \`create-visual-plan\` for general visual plans;
|
|
698
|
+
- call \`visualize-plan\` when the user already has a text plan;
|
|
699
|
+
- call \`update-visual-plan\` with targeted \`contentPatches\` when the active
|
|
700
|
+
plan should absorb answers.
|
|
701
|
+
5. If the user leaves comments on the visual questionnaire, call
|
|
702
|
+
\`get-plan-feedback\` before using the answers.
|
|
703
|
+
|
|
704
|
+
## Question Types
|
|
705
|
+
|
|
706
|
+
Supported \`questions\` entries:
|
|
707
|
+
|
|
708
|
+
- \`single\`: chip group where one option wins.
|
|
709
|
+
- \`multi\`: chip group where multiple options can be selected.
|
|
710
|
+
- \`freeform\`: textarea for constraints, inspirations, or things to avoid.
|
|
711
|
+
- \`visual\`: visual options with sketch previews. Use this
|
|
712
|
+
for layout direction, flow depth, mobile/desktop choices, or diagram choices.
|
|
713
|
+
|
|
714
|
+
Each option can include \`label\`, \`value\`, \`description\`, \`recommended\`,
|
|
715
|
+
\`preview\`, and \`bullets\`. Valid \`preview\` values are \`desktop\`,
|
|
716
|
+
\`mobile\`, \`split\`, \`flow\`, and \`diagram\`.
|
|
717
|
+
|
|
718
|
+
## Quality Bar
|
|
719
|
+
|
|
720
|
+
- Ask only decision-changing questions. A beautiful form with low-value
|
|
721
|
+
questions is still friction.
|
|
722
|
+
- Prefer visible, answerable options over abstract prose.
|
|
723
|
+
- Use visual tabs when users need to compare layout/flow shapes.
|
|
724
|
+
- Keep the output calm and document-like, not a landing page.
|
|
725
|
+
- Use native visual-question content. Do not provide a full standalone HTML form
|
|
726
|
+
unless importing a legacy artifact.
|
|
727
|
+
- The generated answer summary is not the final plan; it is the intake prompt
|
|
728
|
+
for the next agent step.
|
|
729
|
+
|
|
730
|
+
## Tool Guidance
|
|
731
|
+
|
|
732
|
+
- \`create-visual-questions\`: create the interactive intake plan.
|
|
733
|
+
- \`get-visual-plan\`: inspect the current visual question plan.
|
|
734
|
+
- \`get-plan-feedback\`: read comments before creating or updating the next plan.
|
|
735
|
+
- \`create-ui-plan\`: create a UI-first plan from the answers.
|
|
736
|
+
- \`create-visual-plan\`: create a general visual plan from the answers.
|
|
737
|
+
- \`visualize-plan\`: enrich an existing text plan after answers are gathered.
|
|
738
|
+
`;
|
|
521
739
|
const VISUALIZE_PLAN_SKILL_MD = `---
|
|
522
740
|
name: visualize-plan
|
|
523
741
|
description: >-
|
|
524
742
|
Convert an existing Codex, Claude Code, Markdown, or pasted plan into a
|
|
525
|
-
Agent-Native Plans
|
|
743
|
+
Agent-Native Plans visual companion with diagrams, wireframes, annotations, and
|
|
526
744
|
feedback.
|
|
527
745
|
metadata:
|
|
528
746
|
visibility: exported
|
|
@@ -532,8 +750,8 @@ metadata:
|
|
|
532
750
|
|
|
533
751
|
Use this as the visual companion for an existing text plan. The native Codex or
|
|
534
752
|
Claude Code plan can stay exactly where it is; Agent-Native Plans turns it into
|
|
535
|
-
|
|
536
|
-
annotations, questions, and
|
|
753
|
+
a structured visual review surface with diagrams, wireframes, prototype options,
|
|
754
|
+
annotations, questions, feedback, and an HTML export.
|
|
537
755
|
|
|
538
756
|
This is for impatient review. Default to things the user can scan and react to.
|
|
539
757
|
It should still read like a plan, not a marketing page.
|
|
@@ -541,11 +759,11 @@ It should still read like a plan, not a marketing page.
|
|
|
541
759
|
Install with the Agent-Native CLI if Plans is not already available:
|
|
542
760
|
|
|
543
761
|
\`\`\`bash
|
|
544
|
-
npx @agent-native/core@latest skills add
|
|
762
|
+
npx @agent-native/core@latest skills add visual-plan
|
|
545
763
|
\`\`\`
|
|
546
764
|
|
|
547
|
-
That installs \`/visual-plan\`, \`/
|
|
548
|
-
MCP connector.
|
|
765
|
+
That installs \`/visual-plan\`, \`/visual-questions\`, \`/ui-plan\`, and
|
|
766
|
+
\`/visualize-plan\` plus the MCP connector.
|
|
549
767
|
|
|
550
768
|
## When To Use
|
|
551
769
|
|
|
@@ -560,7 +778,7 @@ Use \`visualize-plan\` when:
|
|
|
560
778
|
- the user wants feedback on wireframes, design/prototype options, diagrams, or
|
|
561
779
|
tradeoffs before implementation.
|
|
562
780
|
|
|
563
|
-
If there is no existing plan text available, ask for it, use \`visual-
|
|
781
|
+
If there is no existing plan text available, ask for it, use \`visual-plan\`
|
|
564
782
|
to create a fresh general plan, or use \`ui-plan\` when the work is UI-heavy and
|
|
565
783
|
should start with high-fidelity state mockups.
|
|
566
784
|
|
|
@@ -591,6 +809,9 @@ should start with high-fidelity state mockups.
|
|
|
591
809
|
- two or three option cards when there are real tradeoffs;
|
|
592
810
|
- small prototype sketches for interactions, states, or animation choices;
|
|
593
811
|
- reviewable assumptions and open questions;
|
|
812
|
+
Prefer targeted \`contentPatches\` for small edits to one imported block,
|
|
813
|
+
wireframe region, diagram, or implementation map instead of replacing the
|
|
814
|
+
whole plan content.
|
|
594
815
|
5. Ask the user to react in the visual plan. Then call \`get-plan-feedback\`
|
|
595
816
|
before implementing, after review, and before final response.
|
|
596
817
|
6. Treat the imported text as source material. Structured Plans state is
|
|
@@ -718,8 +939,9 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
718
939
|
skillMarkdown: DESIGN_EXPLORATION_SKILL_MD,
|
|
719
940
|
},
|
|
720
941
|
"visual-plans": {
|
|
721
|
-
skillName: "visual-
|
|
942
|
+
skillName: "visual-plan",
|
|
722
943
|
extraSkills: {
|
|
944
|
+
"visual-questions": VISUAL_QUESTIONS_SKILL_MD,
|
|
723
945
|
"ui-plan": UI_PLAN_SKILL_MD,
|
|
724
946
|
"visualize-plan": VISUALIZE_PLAN_SKILL_MD,
|
|
725
947
|
},
|
|
@@ -727,7 +949,7 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
727
949
|
schemaVersion: 1,
|
|
728
950
|
id: "visual-plans",
|
|
729
951
|
displayName: "Agent-Native Plans",
|
|
730
|
-
description: "Generate and review coding-agent plans as
|
|
952
|
+
description: "Generate and review coding-agent plans as structured visual documents with diagrams, wireframes, prototypes, annotations, feedback, and HTML export.",
|
|
731
953
|
hosted: {
|
|
732
954
|
url: "https://plan.agent-native.com",
|
|
733
955
|
mcpUrl: "https://plan.agent-native.com/_agent-native/mcp",
|
|
@@ -735,7 +957,7 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
735
957
|
mcp: { serverName: "agent-native-plans" },
|
|
736
958
|
auth: {
|
|
737
959
|
mode: "oauth",
|
|
738
|
-
setup: "Install with the Agent-Native CLI to add /visual-plan, /ui-plan, and /visualize-plan skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
|
|
960
|
+
setup: "Install with the Agent-Native CLI to add /visual-plan, /visual-questions, /ui-plan, and /visualize-plan skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
|
|
739
961
|
},
|
|
740
962
|
surfaces: [
|
|
741
963
|
{
|
|
@@ -743,6 +965,12 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
743
965
|
action: "create-visual-plan",
|
|
744
966
|
path: "/plans",
|
|
745
967
|
},
|
|
968
|
+
{
|
|
969
|
+
id: "visual-questions",
|
|
970
|
+
action: "create-visual-questions",
|
|
971
|
+
path: "/plans",
|
|
972
|
+
description: "Create a visual intake questionnaire before generating or updating an Agent-Native plan.",
|
|
973
|
+
},
|
|
746
974
|
{
|
|
747
975
|
id: "ui-plan",
|
|
748
976
|
action: "create-ui-plan",
|
|
@@ -757,9 +985,14 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
757
985
|
],
|
|
758
986
|
skills: [
|
|
759
987
|
{
|
|
760
|
-
path: "skills/visual-
|
|
988
|
+
path: "skills/visual-plan",
|
|
989
|
+
visibility: "exported",
|
|
990
|
+
exportAs: "visual-plan",
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
path: "skills/visual-questions",
|
|
761
994
|
visibility: "exported",
|
|
762
|
-
exportAs: "visual-
|
|
995
|
+
exportAs: "visual-questions",
|
|
763
996
|
},
|
|
764
997
|
{
|
|
765
998
|
path: "skills/ui-plan",
|
|
@@ -834,12 +1067,12 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
834
1067
|
"agent-native-design-exploration": "design",
|
|
835
1068
|
"visual-plans": "visual-plans",
|
|
836
1069
|
"visual-plan": "visual-plans",
|
|
1070
|
+
"visual-questions": "visual-plans",
|
|
1071
|
+
"visual-question": "visual-plans",
|
|
837
1072
|
"ui-plan": "visual-plans",
|
|
838
1073
|
"ui-plans": "visual-plans",
|
|
839
1074
|
"visualize-plan": "visual-plans",
|
|
840
1075
|
"visualize-plans": "visual-plans",
|
|
841
|
-
plans: "visual-plans",
|
|
842
|
-
plan: "visual-plans",
|
|
843
1076
|
"html-plan": "visual-plans",
|
|
844
1077
|
"plan-mode": "visual-plans",
|
|
845
1078
|
plannotate: "visual-plans",
|
|
@@ -860,7 +1093,8 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
860
1093
|
"agent-native-design-exploration",
|
|
861
1094
|
],
|
|
862
1095
|
"visual-plans": [
|
|
863
|
-
"
|
|
1096
|
+
"visual-plan",
|
|
1097
|
+
"visual-questions",
|
|
864
1098
|
"ui-plan",
|
|
865
1099
|
"visualize-plan",
|
|
866
1100
|
"html-plan",
|