@agent-native/core 0.35.2 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/context-xray-local.d.ts +2 -2
- package/dist/cli/context-xray-local.d.ts.map +1 -1
- package/dist/cli/context-xray-local.js +1449 -53
- package/dist/cli/context-xray-local.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +381 -73
- package/dist/cli/skills.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +8 -4
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +5 -11
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +6 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +50 -26
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +81 -8
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +68 -24
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-chat.d.ts +39 -3
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +168 -33
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/application-state.d.ts +13 -0
- package/dist/client/application-state.d.ts.map +1 -0
- package/dist/client/application-state.js +99 -0
- package/dist/client/application-state.js.map +1 -0
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +174 -8
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +2 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +2 -2
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/context-xray/ContextMeter.d.ts +2 -1
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +19 -25
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts +1 -3
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +27 -24
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +2 -1
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/frame-protocol.d.ts +11 -3
- package/dist/client/frame-protocol.d.ts.map +1 -1
- package/dist/client/frame-protocol.js.map +1 -1
- package/dist/client/index.d.ts +4 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +4 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts +1 -0
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +50 -16
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +1 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +62 -15
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/tool-display.d.ts +4 -0
- package/dist/client/tool-display.d.ts.map +1 -0
- package/dist/client/tool-display.js +28 -0
- package/dist/client/tool-display.js.map +1 -0
- package/dist/client/use-action.d.ts +12 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +14 -2
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-agent-chat-context.d.ts +15 -0
- package/dist/client/use-agent-chat-context.d.ts.map +1 -0
- package/dist/client/use-agent-chat-context.js +32 -0
- package/dist/client/use-agent-chat-context.js.map +1 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +40 -31
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-external-value.d.ts.map +1 -1
- package/dist/client/use-external-value.js +14 -7
- package/dist/client/use-external-value.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +1 -2
- package/dist/deploy/build.js.map +1 -1
- package/dist/extensions/html-shell.d.ts +3 -2
- package/dist/extensions/html-shell.d.ts.map +1 -1
- package/dist/extensions/html-shell.js +12 -2
- package/dist/extensions/html-shell.js.map +1 -1
- package/dist/extensions/routes.js +2 -7
- package/dist/extensions/routes.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +4 -2
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +33 -4
- package/dist/mcp/server.js.map +1 -1
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +14 -6
- package/dist/provider-api/index.js.map +1 -1
- package/dist/server/agent-teams.d.ts +4 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +104 -28
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +21 -11
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.js +2 -2
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/request-context.d.ts +3 -4
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/server/security-headers.d.ts +16 -19
- package/dist/server/security-headers.d.ts.map +1 -1
- package/dist/server/security-headers.js +24 -25
- package/dist/server/security-headers.js.map +1 -1
- package/dist/server/self-dispatch.d.ts.map +1 -1
- package/dist/server/self-dispatch.js +17 -1
- package/dist/server/self-dispatch.js.map +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +9 -18
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/templates/default/AGENTS.md +1 -1
- package/dist/templates/default/DEVELOPING.md +7 -13
- package/dist/templates/workspace-core/AGENTS.md +6 -4
- package/dist/templates/workspace-root/AGENTS.md +6 -4
- package/docs/content/actions.md +5 -7
- package/docs/content/client.md +49 -44
- package/docs/content/context-awareness.md +20 -33
- package/docs/content/creating-templates.md +2 -2
- package/docs/content/external-agents.md +1 -1
- package/docs/content/key-concepts.md +3 -3
- package/docs/content/sharing.md +1 -1
- package/docs/content/template-mail.md +1 -1
- package/docs/content/voice-input.md +1 -1
- package/package.json +5 -1
- package/src/templates/default/AGENTS.md +1 -1
- package/src/templates/default/DEVELOPING.md +7 -13
- package/src/templates/workspace-core/AGENTS.md +6 -4
- package/src/templates/workspace-root/AGENTS.md +6 -4
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|visual-
|
|
18
|
+
agent-native skills add assets|design-exploration|plans|visual-plan|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 plans
|
|
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
|
|
@@ -188,21 +188,50 @@ iteration, or a human-in-the-loop choice among design directions.
|
|
|
188
188
|
const VISUAL_PLANS_SKILL_MD = `---
|
|
189
189
|
name: visual-plans
|
|
190
190
|
description: >-
|
|
191
|
-
Use
|
|
192
|
-
diagrams, wireframes,
|
|
193
|
-
|
|
191
|
+
Use Agent-Native Plans when coding-agent work needs an interactive HTML plan
|
|
192
|
+
document with diagrams, wireframes, mockups, prototypes, annotations, and
|
|
193
|
+
comments.
|
|
194
194
|
metadata:
|
|
195
195
|
visibility: exported
|
|
196
196
|
---
|
|
197
197
|
|
|
198
|
-
#
|
|
198
|
+
# Agent-Native Plans
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
Agent-Native Plans is HTML plan mode for coding agents. Generate the kind of
|
|
201
|
+
plan you would normally write in Markdown, but as a scannable HTML plan
|
|
202
|
+
document with visual blocks mixed in: diagrams, wireframes, mockups, prototype
|
|
203
|
+
options, tradeoff cards, file/symbol implementation maps, code previews, and
|
|
204
|
+
annotation prompts. It is a plan document, not a marketing page.
|
|
204
205
|
|
|
205
|
-
|
|
206
|
+
The goal is impatient review. The user should be able to react to visuals first
|
|
207
|
+
and read prose only where it helps.
|
|
208
|
+
|
|
209
|
+
Install with the Agent-Native CLI. It adds the skills and the MCP connector:
|
|
210
|
+
|
|
211
|
+
\`\`\`bash
|
|
212
|
+
npx @agent-native/core@latest skills add plans
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
Then start typing \`/visual-plan\` for a fresh general plan, \`/ui-plan\` for a
|
|
216
|
+
UI-first high-fidelity plan, or \`/visualize-plan\` to turn an existing Codex,
|
|
217
|
+
Claude Code, Markdown, or pasted plan into a visual companion. The hosted MCP
|
|
218
|
+
app opens inline where supported and falls back to a browser link everywhere
|
|
219
|
+
else.
|
|
220
|
+
|
|
221
|
+
## Slash Commands
|
|
222
|
+
|
|
223
|
+
- \`/visual-plan\`: create a fresh rich HTML plan before implementation. Include
|
|
224
|
+
a docs-level plan, visual architecture/flow diagrams, detailed wireframes or
|
|
225
|
+
mockups when UI is involved, an implementation map with files/symbols/snippets,
|
|
226
|
+
tradeoffs, open questions, and clear feedback prompts.
|
|
227
|
+
- \`/ui-plan\`: create a UI-first high-fidelity HTML plan before implementation.
|
|
228
|
+
Use an optional top pan/zoom wireframe or diagram canvas when visuals clarify
|
|
229
|
+
the flow, then continue as a refined Notion-like document with rich tabs,
|
|
230
|
+
comments/drawing prompts, code tabs, and agent handoff notes.
|
|
231
|
+
- \`/visualize-plan\`: import an existing Codex, Claude Code, Markdown, or pasted
|
|
232
|
+
text plan and turn it into a visual companion. Preserve the plan's intent,
|
|
233
|
+
then add diagrams, wireframes, option cards, file/symbol maps, and annotation
|
|
234
|
+
prompts.
|
|
206
235
|
|
|
207
236
|
## When To Use
|
|
208
237
|
|
|
@@ -212,74 +241,317 @@ Create or update a visual plan when:
|
|
|
212
241
|
diagrams, wireframes, mockups, prototype options, comments, or annotations;
|
|
213
242
|
- work is multi-file, ambiguous, long-running, risky, or UI-heavy;
|
|
214
243
|
- the user needs to react quickly to direction rather than read prose;
|
|
215
|
-
-
|
|
216
|
-
|
|
217
|
-
- you
|
|
218
|
-
- you are about to claim the work is complete and need proof gates checked.
|
|
244
|
+
- architecture, data flow, UI direction, options, or open questions would be
|
|
245
|
+
clearer visually;
|
|
246
|
+
- you need the user to react before implementation.
|
|
219
247
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
deployment/configuration, file scope, or the definition of done.
|
|
248
|
+
The companion \`visualize-plan\` skill is installed with this one. Use it when
|
|
249
|
+
the user already has a Codex, Claude Code, Markdown, or pasted text plan and
|
|
250
|
+
wants a visual companion instead of a fresh plan.
|
|
224
251
|
|
|
225
252
|
## Core Workflow
|
|
226
253
|
|
|
227
|
-
1. Call \`create-visual-plan\` with the
|
|
228
|
-
|
|
229
|
-
2.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
254
|
+
1. Call \`create-visual-plan\` with the title, brief, source, repo path, and plan
|
|
255
|
+
sections before implementation.
|
|
256
|
+
2. Put the best possible plan document in \`html\` when you can. It should feel
|
|
257
|
+
like a bespoke HTML version of a strong Markdown implementation plan, not a
|
|
258
|
+
dashboard or landing page.
|
|
259
|
+
3. Surface the returned Plans link or inline MCP App. In CLI hosts, ask the user
|
|
260
|
+
to review the plan visually.
|
|
261
|
+
4. Prefer diagrams, wireframes, UI mockups, option cards, implementation maps,
|
|
262
|
+
and small interactive prototypes over paragraphs.
|
|
263
|
+
5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
|
|
234
264
|
and before the final response.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
deviation with \`update-visual-plan\` instead of drifting silently.
|
|
239
|
-
7. Attach command/test/log/diff/screenshot/design artifacts with
|
|
240
|
-
\`record-plan-evidence\`. Agent claims are not proof.
|
|
241
|
-
8. Export an HTML/JSON/Markdown receipt with \`export-visual-plan\` when the
|
|
265
|
+
6. Incorporate comments/corrections with \`update-visual-plan\`; update the HTML
|
|
266
|
+
document when feedback changes the direction.
|
|
267
|
+
7. Export an HTML/JSON/Markdown receipt with \`export-visual-plan\` when the
|
|
242
268
|
user wants a shareable summary.
|
|
243
269
|
|
|
244
270
|
## Visual Defaults
|
|
245
271
|
|
|
246
|
-
-
|
|
272
|
+
- Use implementation-plan structure first: objective, scope/non-goals, proposed
|
|
273
|
+
approach, phases or steps, files/symbols/snippets, risks, open questions, and
|
|
274
|
+
validation.
|
|
275
|
+
- UI work gets detailed wireframes, mockups, or prototype options before coding.
|
|
276
|
+
- Use \`/ui-plan\` when UI direction is the center of the work. \`/visual-plan\`
|
|
277
|
+
stays the general plan command for architecture, backend, refactors, and
|
|
278
|
+
mixed implementation planning.
|
|
279
|
+
- Wireframes should be concrete enough to critique: layout regions, controls,
|
|
280
|
+
states, empty/loading/error paths, review affordances, and copy placeholders.
|
|
247
281
|
- Backend/refactor work gets architecture and data-flow diagrams.
|
|
248
282
|
- Complex tradeoffs get two or three option cards with consequences.
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
283
|
+
- Open questions are surfaced as visual callouts, not buried in paragraphs.
|
|
284
|
+
- Long prose is split into readable document sections with clear headings.
|
|
285
|
+
- Visuals should be review aids, not decoration. Avoid decorative hero art,
|
|
286
|
+
gradient/hero backgrounds, brand/logo chrome, nav bars, slogans, fluffy value
|
|
287
|
+
props, huge landing-page H1s, or marketing-style cards unless the user
|
|
288
|
+
explicitly asks.
|
|
289
|
+
- Implementation plans include a file map: file path, symbols/components to
|
|
290
|
+
touch, reason for the change, risk/coordination notes when relevant, and short
|
|
291
|
+
syntax-highlighted snippets for the code shape the agent expects to modify.
|
|
292
|
+
- File previews should be concise and reviewable. Do not paste entire large
|
|
293
|
+
files; show the key region, public API, component boundary, schema, action, or
|
|
294
|
+
selector that matters for review.
|
|
295
|
+
- Include README-like detail when helpful: command names, tool behavior,
|
|
296
|
+
install flow, MCP/link fallback, data shape, and what is in or out of scope.
|
|
297
|
+
- Comments, corrections, replacements, and annotations should feel
|
|
298
|
+
plannotator-style: fast to mark up, structured enough for the agent to
|
|
299
|
+
consume, and easy to share when the user chooses.
|
|
252
300
|
|
|
253
301
|
## Tool Guidance
|
|
254
302
|
|
|
255
|
-
- \`create-visual-plan\`: start one
|
|
256
|
-
- \`
|
|
257
|
-
|
|
258
|
-
- \`
|
|
303
|
+
- \`create-visual-plan\`: start one HTML plan per agent task/run.
|
|
304
|
+
- \`create-ui-plan\`: start a UI-first plan with high-fidelity screen/state tabs.
|
|
305
|
+
- \`visualize-plan\`: create a visual companion from an existing text plan.
|
|
306
|
+
- \`update-visual-plan\`: revise the plan document, sections, status, or comments.
|
|
307
|
+
- \`get-visual-plan\`: read the current plan document and annotations.
|
|
259
308
|
- \`get-plan-feedback\`: read unconsumed human feedback. Use it frequently.
|
|
260
|
-
- \`
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
|
|
309
|
+
- \`export-visual-plan\`: export HTML, Markdown fallback, and structured JSON.
|
|
310
|
+
|
|
311
|
+
## HTML Guidance
|
|
312
|
+
|
|
313
|
+
- Prefer semantic HTML with scoped CSS inside the document.
|
|
314
|
+
- Match Agent-Native's dark, restrained theme unless the user asks otherwise.
|
|
315
|
+
- Keep the first viewport legible and plan-like: title, brief, concise scope,
|
|
316
|
+
and a useful diagram/checklist/table when it helps.
|
|
317
|
+
- Use tabs, accordions, or small interactions only when they make review faster.
|
|
318
|
+
- Do not paste huge HTML into chat. Store it in Plans and surface the MCP app or
|
|
319
|
+
link.
|
|
267
320
|
|
|
268
321
|
## Guardrails
|
|
269
322
|
|
|
270
323
|
- Keep it simple. Do not build a ten-tab dashboard unless the user asks.
|
|
271
|
-
- Before high-risk actions, create a blocking review item or ask the user
|
|
272
|
-
directly.
|
|
273
|
-
- Never modify tests merely to make implementation pass unless the visual plan
|
|
274
|
-
explicitly approves test expectation changes.
|
|
275
|
-
- If proof is missing, say so. Do not call the task complete just because code
|
|
276
|
-
was changed.
|
|
277
324
|
- Do not hand-roll MCP HTTP requests with curl. Use host-exposed tools after
|
|
278
325
|
restart/reload, or use the returned browser/deep-link fallback.
|
|
279
326
|
- Hosted default: connect
|
|
280
|
-
\`https://
|
|
327
|
+
\`https://plan.agent-native.com/_agent-native/mcp\`. Do not put shared
|
|
281
328
|
secrets in skill files.
|
|
282
329
|
`;
|
|
330
|
+
const UI_PLAN_SKILL_MD = `---
|
|
331
|
+
name: ui-plan
|
|
332
|
+
description: >-
|
|
333
|
+
Use Agent-Native Plans for UI-first planning with an optional top pan/zoom
|
|
334
|
+
wireframe canvas, a refined Notion-like document, rich tabs, diagrams,
|
|
335
|
+
comments, drawing, and agent handoff.
|
|
336
|
+
metadata:
|
|
337
|
+
visibility: exported
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
# UI Plan
|
|
341
|
+
|
|
342
|
+
Use \`/ui-plan\` when the task is primarily about product UI, user flows,
|
|
343
|
+
interaction states, component layout, responsive behavior, or visual direction.
|
|
344
|
+
This is a specialized Agent-Native Plans workflow: the reviewable UI comes
|
|
345
|
+
first, and implementation details come after the user has something concrete to
|
|
346
|
+
react to.
|
|
347
|
+
|
|
348
|
+
\`/visual-plan\` remains the general rich planning command for architecture,
|
|
349
|
+
backend, refactors, migrations, and mixed work. Use \`/visualize-plan\` when a
|
|
350
|
+
text plan already exists and should become an HTML companion.
|
|
351
|
+
|
|
352
|
+
## UI-First Workflow
|
|
353
|
+
|
|
354
|
+
1. Call \`create-ui-plan\` with a UI-specific title, brief, source, repo path,
|
|
355
|
+
and a complete bespoke \`html\` document whenever possible.
|
|
356
|
+
2. When the plan has meaningful UI flows, screens, or diagrams, make the top
|
|
357
|
+
of the document a bounded pan/zoom sketch canvas with the key artboards,
|
|
358
|
+
connectors, margin notes, and commentable visual anchors.
|
|
359
|
+
3. Continue below the canvas as a restrained, Notion-like interactive document:
|
|
360
|
+
clear prose, horizontal state tabs, inline wireframes, sketchy diagrams,
|
|
361
|
+
tables, vertical code tabs, and concise implementation notes.
|
|
362
|
+
4. Skip the top canvas when wireframes or diagrams would not clarify the work;
|
|
363
|
+
in that case, keep the plan as a clean rich document.
|
|
364
|
+
5. Put files, symbols, data/actions, migrations, risks, and validation lower in
|
|
365
|
+
the document after the visual review area.
|
|
366
|
+
6. Call \`get-plan-feedback\` before implementation, after review, after a long
|
|
367
|
+
pause, and before the final response. Apply changes with
|
|
368
|
+
\`update-visual-plan\`.
|
|
369
|
+
|
|
370
|
+
## Mockup Quality Bar
|
|
371
|
+
|
|
372
|
+
- Build high-fidelity screen sections with realistic spacing, controls,
|
|
373
|
+
hierarchy, text, and state-specific content. Avoid vague gray boxes.
|
|
374
|
+
- Show the actual workflow the user will use: navigation, toolbar actions,
|
|
375
|
+
forms, dialogs, empty states, error recovery, loading affordances, and
|
|
376
|
+
confirmation/success states.
|
|
377
|
+
- Include desktop and mobile/responsive states when layout decisions could
|
|
378
|
+
change. Put them in tabs or adjacent panels rather than burying them in prose.
|
|
379
|
+
- Use concrete labels and copy placeholders that expose content length,
|
|
380
|
+
truncation, disabled states, and destructive actions.
|
|
381
|
+
- Make state tabs span the plan content width. Small cards are fine for repeated
|
|
382
|
+
items, but the primary UI preview should not be trapped in a tiny thumbnail.
|
|
383
|
+
- Keep visuals review-focused, not decorative. Do not make a marketing page,
|
|
384
|
+
hero section, brand deck, or abstract mood board unless the user asks.
|
|
385
|
+
|
|
386
|
+
## State Tabs
|
|
387
|
+
|
|
388
|
+
When showing multiple UI states, use the Plans tab attributes so the iframe
|
|
389
|
+
runtime wires up the interaction:
|
|
390
|
+
|
|
391
|
+
- Put \`data-plan-tabs\` on the tab group.
|
|
392
|
+
- Put \`data-tab-target\` on each tab button.
|
|
393
|
+
- Put matching \`data-tab-panel\` values on panels.
|
|
394
|
+
|
|
395
|
+
Good state tab sets include:
|
|
396
|
+
|
|
397
|
+
- \`Default\`, \`Loading\`, \`Empty\`, \`Error\`
|
|
398
|
+
- \`List\`, \`Detail\`, \`Edit\`, \`Confirm\`
|
|
399
|
+
- \`Desktop\`, \`Tablet\`, \`Mobile\`
|
|
400
|
+
- \`Owner\`, \`Reviewer\`, \`Signed out\`
|
|
401
|
+
|
|
402
|
+
## UI Flow Document
|
|
403
|
+
|
|
404
|
+
Generated \`/ui-plan\` documents use one default shape: an optional Figma-style
|
|
405
|
+
pan/zoom visual preface followed by a refined Notion-like document. There is no
|
|
406
|
+
mode boolean. Provide \`states\` and \`components\` when the top canvas will help
|
|
407
|
+
the reviewer understand the flow; omit them when the plan should be
|
|
408
|
+
document-only. You may pass \`sketchiness\` from \`0\` to \`100\`; omit it for the
|
|
409
|
+
default hand-drawn strength.
|
|
410
|
+
|
|
411
|
+
The document below the canvas should still include the same planning substance:
|
|
412
|
+
screen states, component notes, implementation map, review prompts, comments,
|
|
413
|
+
drawing-friendly space, and agent handoff. Treat it like a designer handed over
|
|
414
|
+
a Figma file plus a crisp product spec: the reviewer should understand the UI
|
|
415
|
+
flow from a bird's-eye view, then keep scrolling into a clean interactive
|
|
416
|
+
document with notes explaining how the screens work together.
|
|
417
|
+
|
|
418
|
+
## Comments, Drawing, And Handoff
|
|
419
|
+
|
|
420
|
+
- Add visible annotation prompts beside the mockups: "Comment on layout",
|
|
421
|
+
"Circle unclear copy", "Mark missing state", or "Pick this option".
|
|
422
|
+
- Leave enough whitespace around key UI regions for drawing and callouts.
|
|
423
|
+
- Label important regions so comments can reference them without ambiguity.
|
|
424
|
+
- Include an "Agent Handoff" section after the mockups that summarizes the
|
|
425
|
+
chosen UI direction, unresolved visual questions, and feedback that must be
|
|
426
|
+
read before code changes.
|
|
427
|
+
- Never claim feedback has been applied until \`get-plan-feedback\` or the user
|
|
428
|
+
has supplied the feedback in chat.
|
|
429
|
+
|
|
430
|
+
## Implementation Details Lower Down
|
|
431
|
+
|
|
432
|
+
After the visual canvas and document review blocks, include a concise
|
|
433
|
+
implementation section:
|
|
434
|
+
|
|
435
|
+
- file paths and symbols/components to touch;
|
|
436
|
+
- data/actions/hooks/routes needed for the UI;
|
|
437
|
+
- state ownership, optimistic updates, and sync expectations;
|
|
438
|
+
- accessibility, responsive, and keyboard considerations;
|
|
439
|
+
- test and verification plan;
|
|
440
|
+
- short code-shape snippets only where they clarify the implementation.
|
|
441
|
+
|
|
442
|
+
Do not paste whole files or let implementation prose crowd out the mockups.
|
|
443
|
+
The purpose of \`/ui-plan\` is to get visual direction approved before the agent
|
|
444
|
+
starts editing.
|
|
445
|
+
|
|
446
|
+
## Tool Guidance
|
|
447
|
+
|
|
448
|
+
- \`create-ui-plan\`: create the UI-first HTML plan.
|
|
449
|
+
- \`update-visual-plan\`: revise mockups, state tabs, comments, or handoff notes.
|
|
450
|
+
- \`get-visual-plan\`: inspect the current plan and annotations.
|
|
451
|
+
- \`get-plan-feedback\`: read unconsumed reviewer comments before coding.
|
|
452
|
+
- \`export-visual-plan\`: export a review receipt when needed.
|
|
453
|
+
|
|
454
|
+
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`.
|
|
455
|
+
`;
|
|
456
|
+
const VISUALIZE_PLAN_SKILL_MD = `---
|
|
457
|
+
name: visualize-plan
|
|
458
|
+
description: >-
|
|
459
|
+
Convert an existing Codex, Claude Code, Markdown, or pasted plan into a
|
|
460
|
+
Agent-Native Plans HTML companion with diagrams, wireframes, annotations, and
|
|
461
|
+
feedback.
|
|
462
|
+
metadata:
|
|
463
|
+
visibility: exported
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
# Visualize Plan
|
|
467
|
+
|
|
468
|
+
Use this as the visual companion for an existing text plan. The native Codex or
|
|
469
|
+
Claude Code plan can stay exactly where it is; Agent-Native Plans turns it into
|
|
470
|
+
an interactive HTML review surface with diagrams, wireframes, prototype options,
|
|
471
|
+
annotations, questions, and feedback.
|
|
472
|
+
|
|
473
|
+
This is for impatient review. Default to things the user can scan and react to.
|
|
474
|
+
It should still read like a plan, not a marketing page.
|
|
475
|
+
|
|
476
|
+
Install with the Agent-Native CLI if Plans is not already available:
|
|
477
|
+
|
|
478
|
+
\`\`\`bash
|
|
479
|
+
npx @agent-native/core@latest skills add plans
|
|
480
|
+
\`\`\`
|
|
481
|
+
|
|
482
|
+
That installs \`/visual-plan\`, \`/ui-plan\`, and \`/visualize-plan\` plus the
|
|
483
|
+
MCP connector.
|
|
484
|
+
|
|
485
|
+
## When To Use
|
|
486
|
+
|
|
487
|
+
Use \`visualize-plan\` when:
|
|
488
|
+
|
|
489
|
+
- the user has an existing Codex, Claude Code, Markdown, or pasted plan;
|
|
490
|
+
- the user asks to visualize, annotate, plannotate, mock up, diagram, or make a
|
|
491
|
+
plan easier to review;
|
|
492
|
+
- the plan is long enough that the user may not read it closely;
|
|
493
|
+
- UI direction, architecture, data flow, risky assumptions, or open questions
|
|
494
|
+
would be clearer visually;
|
|
495
|
+
- the user wants feedback on wireframes, design/prototype options, diagrams, or
|
|
496
|
+
tradeoffs before implementation.
|
|
497
|
+
|
|
498
|
+
If there is no existing plan text available, ask for it, use \`visual-plans\`
|
|
499
|
+
to create a fresh general plan, or use \`ui-plan\` when the work is UI-heavy and
|
|
500
|
+
should start with high-fidelity state mockups.
|
|
501
|
+
|
|
502
|
+
## Workflow
|
|
503
|
+
|
|
504
|
+
1. Gather the existing plan text from the user's paste, a referenced file, or
|
|
505
|
+
the recent agent-visible plan. Do not invent a source plan.
|
|
506
|
+
2. Call \`visualize-plan\` with \`planText\`, \`title\`, \`goal\`, \`source\`,
|
|
507
|
+
and \`repoPath\` when available.
|
|
508
|
+
3. Surface the returned Plans link or inline MCP App.
|
|
509
|
+
4. Enrich the imported plan with \`update-visual-plan\` when helpful:
|
|
510
|
+
- diagrams for architecture, data flow, state machines, or dependencies;
|
|
511
|
+
- detailed wireframes/mockups for user-visible UI changes, including layout,
|
|
512
|
+
controls, states, empty/loading/error paths, and copy placeholders;
|
|
513
|
+
- two or three option cards when there are real tradeoffs;
|
|
514
|
+
- small prototype sketches for interactions, states, or animation choices;
|
|
515
|
+
- reviewable assumptions and open questions;
|
|
516
|
+
5. Ask the user to react in the visual plan. Then call \`get-plan-feedback\`
|
|
517
|
+
before implementing, after review, and before final response.
|
|
518
|
+
6. Treat the imported text as source material. Structured Plans state is
|
|
519
|
+
canonical for feedback, assumptions, and decisions.
|
|
520
|
+
|
|
521
|
+
If there is no existing plan text and the work is UI-heavy, use \`/ui-plan\`
|
|
522
|
+
instead so full-width state mockups, comments/drawing affordances, and agent
|
|
523
|
+
handoff come before file implementation details.
|
|
524
|
+
|
|
525
|
+
## Visual Defaults
|
|
526
|
+
|
|
527
|
+
- Keep the first screen simple and plan-like: title, brief, concise scope, and
|
|
528
|
+
one useful diagram/checklist/table when it helps.
|
|
529
|
+
- Prefer one strong diagram or wireframe over a wall of sections.
|
|
530
|
+
- Preserve the source plan's implementation substance: phases or steps,
|
|
531
|
+
files/symbols/snippets, risks, open questions, and validation.
|
|
532
|
+
- Hide long prose behind disclosure controls or source references when it helps
|
|
533
|
+
review speed.
|
|
534
|
+
- Add README-like detail when the source is too terse: slash commands, tool
|
|
535
|
+
behavior, install flow, MCP/link fallback, data shape, and scope.
|
|
536
|
+
- Avoid decorative hero art, gradient/hero backgrounds, logos, nav bars,
|
|
537
|
+
slogans, fluffy value props, huge landing-page H1s, and marketing-style cards
|
|
538
|
+
unless the user explicitly asks.
|
|
539
|
+
- Visuals should be review aids, not decoration.
|
|
540
|
+
- Label inferred items as possible, not confirmed.
|
|
541
|
+
- Ask for feedback with targeted prompts: "Which option?", "Is this flow
|
|
542
|
+
right?", "What assumption is wrong?", "What should change?"
|
|
543
|
+
- Preserve native-agent momentum: this companion should make the plan easier to
|
|
544
|
+
approve or revise, not force a giant planning ceremony.
|
|
545
|
+
|
|
546
|
+
## Guardrails
|
|
547
|
+
|
|
548
|
+
- Do not replace a native plan unless the user asks. Build beside it.
|
|
549
|
+
- Do not pretend the companion has feedback until \`get-plan-feedback\` returns
|
|
550
|
+
it or the user pastes it back.
|
|
551
|
+
- Do not use visual polish as a substitute for clarity. The point is review.
|
|
552
|
+
- Do not hand-roll MCP HTTP requests with curl. Use host-exposed tools after
|
|
553
|
+
restart/reload, or use the returned browser/deep-link fallback.
|
|
554
|
+
`;
|
|
283
555
|
const BUILT_IN_APP_SKILLS = {
|
|
284
556
|
assets: {
|
|
285
557
|
skillName: "assets",
|
|
@@ -369,19 +641,23 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
369
641
|
},
|
|
370
642
|
"visual-plans": {
|
|
371
643
|
skillName: "visual-plans",
|
|
644
|
+
extraSkills: {
|
|
645
|
+
"ui-plan": UI_PLAN_SKILL_MD,
|
|
646
|
+
"visualize-plan": VISUALIZE_PLAN_SKILL_MD,
|
|
647
|
+
},
|
|
372
648
|
manifest: normalizeAppSkillManifest({
|
|
373
649
|
schemaVersion: 1,
|
|
374
650
|
id: "visual-plans",
|
|
375
|
-
displayName: "
|
|
376
|
-
description: "
|
|
651
|
+
displayName: "Agent-Native Plans",
|
|
652
|
+
description: "Generate and review coding-agent plans as interactive HTML with diagrams, wireframes, prototypes, annotations, and feedback.",
|
|
377
653
|
hosted: {
|
|
378
|
-
url: "https://
|
|
379
|
-
mcpUrl: "https://
|
|
654
|
+
url: "https://plan.agent-native.com",
|
|
655
|
+
mcpUrl: "https://plan.agent-native.com/_agent-native/mcp",
|
|
380
656
|
},
|
|
381
|
-
mcp: { serverName: "agent-native-
|
|
657
|
+
mcp: { serverName: "agent-native-plans" },
|
|
382
658
|
auth: {
|
|
383
659
|
mode: "oauth",
|
|
384
|
-
setup: "
|
|
660
|
+
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.",
|
|
385
661
|
},
|
|
386
662
|
surfaces: [
|
|
387
663
|
{
|
|
@@ -389,6 +665,17 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
389
665
|
action: "create-visual-plan",
|
|
390
666
|
path: "/plans",
|
|
391
667
|
},
|
|
668
|
+
{
|
|
669
|
+
id: "ui-plan",
|
|
670
|
+
action: "create-ui-plan",
|
|
671
|
+
path: "/plans",
|
|
672
|
+
description: "Create a UI-first Agent-Native plan with an optional top pan/zoom wireframe canvas and a refined rich document below.",
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: "visualize-plan",
|
|
676
|
+
action: "visualize-plan",
|
|
677
|
+
path: "/plans",
|
|
678
|
+
},
|
|
392
679
|
],
|
|
393
680
|
skills: [
|
|
394
681
|
{
|
|
@@ -396,6 +683,16 @@ const BUILT_IN_APP_SKILLS = {
|
|
|
396
683
|
visibility: "exported",
|
|
397
684
|
exportAs: "visual-plans",
|
|
398
685
|
},
|
|
686
|
+
{
|
|
687
|
+
path: "skills/ui-plan",
|
|
688
|
+
visibility: "exported",
|
|
689
|
+
exportAs: "ui-plan",
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
path: "skills/visualize-plan",
|
|
693
|
+
visibility: "exported",
|
|
694
|
+
exportAs: "visualize-plan",
|
|
695
|
+
},
|
|
399
696
|
],
|
|
400
697
|
hostAdapters: [
|
|
401
698
|
"codex-plugin",
|
|
@@ -459,18 +756,16 @@ const BUILT_IN_APP_SKILL_ALIASES = {
|
|
|
459
756
|
"agent-native-design-exploration": "design",
|
|
460
757
|
"visual-plans": "visual-plans",
|
|
461
758
|
"visual-plan": "visual-plans",
|
|
759
|
+
"ui-plan": "visual-plans",
|
|
760
|
+
"ui-plans": "visual-plans",
|
|
761
|
+
"visualize-plan": "visual-plans",
|
|
762
|
+
"visualize-plans": "visual-plans",
|
|
462
763
|
plans: "visual-plans",
|
|
463
764
|
plan: "visual-plans",
|
|
464
765
|
"html-plan": "visual-plans",
|
|
465
766
|
"plan-mode": "visual-plans",
|
|
466
767
|
plannotate: "visual-plans",
|
|
467
768
|
plannotator: "visual-plans",
|
|
468
|
-
contracts: "visual-plans",
|
|
469
|
-
contract: "visual-plans",
|
|
470
|
-
proof: "visual-plans",
|
|
471
|
-
"proof-check": "visual-plans",
|
|
472
|
-
"assumption-review": "visual-plans",
|
|
473
|
-
"agent-native-contracts": "visual-plans",
|
|
474
769
|
"agent-native-visual-plans": "visual-plans",
|
|
475
770
|
"context-xray": "context-xray",
|
|
476
771
|
"local-context-xray": "context-xray",
|
|
@@ -488,10 +783,10 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
|
|
|
488
783
|
],
|
|
489
784
|
"visual-plans": [
|
|
490
785
|
"plans",
|
|
786
|
+
"ui-plan",
|
|
787
|
+
"visualize-plan",
|
|
491
788
|
"html-plan",
|
|
492
789
|
"plannotate",
|
|
493
|
-
"contracts",
|
|
494
|
-
"proof-check",
|
|
495
790
|
],
|
|
496
791
|
"context-xray": ["xray", "context-window", "context-usage"],
|
|
497
792
|
};
|
|
@@ -519,6 +814,12 @@ function isKnownSkill(value) {
|
|
|
519
814
|
function isLocalOnlyBuiltInSkill(entry) {
|
|
520
815
|
return Boolean(entry && "localOnly" in entry && entry.localOnly);
|
|
521
816
|
}
|
|
817
|
+
function builtInExtraSkills(entry) {
|
|
818
|
+
return "extraSkills" in entry && entry.extraSkills ? entry.extraSkills : {};
|
|
819
|
+
}
|
|
820
|
+
function builtInSkillNames(entry) {
|
|
821
|
+
return [entry.skillName, ...Object.keys(builtInExtraSkills(entry))];
|
|
822
|
+
}
|
|
522
823
|
function normalizeClientIds(values) {
|
|
523
824
|
if (!Array.isArray(values))
|
|
524
825
|
return [];
|
|
@@ -707,6 +1008,7 @@ function loadSkillTarget(target) {
|
|
|
707
1008
|
const knownTarget = normalizeKnownSkillTarget(target);
|
|
708
1009
|
if (knownTarget) {
|
|
709
1010
|
const builtIn = BUILT_IN_APP_SKILLS[knownTarget];
|
|
1011
|
+
const skillNames = builtInSkillNames(builtIn);
|
|
710
1012
|
return {
|
|
711
1013
|
id: builtIn.manifest.id,
|
|
712
1014
|
displayName: builtIn.manifest.displayName,
|
|
@@ -715,11 +1017,17 @@ function loadSkillTarget(target) {
|
|
|
715
1017
|
file: `<built-in:${builtIn.manifest.id}>`,
|
|
716
1018
|
dir: process.cwd(),
|
|
717
1019
|
},
|
|
718
|
-
skillNames
|
|
1020
|
+
skillNames,
|
|
719
1021
|
materializeInstructions(outDir) {
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
|
|
1022
|
+
const skills = {
|
|
1023
|
+
[builtIn.skillName]: builtIn.skillMarkdown,
|
|
1024
|
+
...builtInExtraSkills(builtIn),
|
|
1025
|
+
};
|
|
1026
|
+
for (const [skillName, skillMarkdown] of Object.entries(skills)) {
|
|
1027
|
+
const skillDir = path.join(outDir, "skills", skillName);
|
|
1028
|
+
fs.mkdirSync(skillDir, { recursive: true });
|
|
1029
|
+
fs.writeFileSync(path.join(skillDir, "SKILL.md"), skillMarkdown, "utf-8");
|
|
1030
|
+
}
|
|
723
1031
|
return outDir;
|
|
724
1032
|
},
|
|
725
1033
|
};
|