Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0

agent-prompt

The prompt a reader pastes into a coding agent, copied in one action.

View as JSON
From Harbor tides › homequaypointOpen the frame

When to use

Use an agent-prompt for the task a reader hands to a coding agent: install this, call that, print the result. It holds a label of 24 characters and one to six lines of 200, copied together in one action.

Write each line as an instruction. For a shell command, use command-row.

Write lines an agent can act on with no docs open: the package, the input and what to print. Keep secrets out; the prompt is copied as written.

Use instead

The record

pages/harbor/home.json, section 11
{
  "kind": "section",
  "shell": { "inset": "contained", "density": "section" },
  "block": {
    "type": "agent-prompt",
    "label": "Paste into your agent",
    "lines": ["Install harbor-tides from npm.", "Fetch the tide window for a 3.2 m draft at pier 4 today.", "Print when it opens and when it closes."]
  }
}

Smallest that parses

{
  "type": "agent-prompt",
  "label": "Paste into your agent",
  "lines": ["Install harbor-tides from npm."]
}

Fields and bounds

From @mdxui/site@7.0.0-alpha.0. A count reads as min–max × item; a string bound is its maximum length in characters, and links its refusal.

PropType and boundRequired
labelstring ≤24yes
lines1–6 × string ≤200yes

Variants and counts

One layout: the label, the lines and the copy control.

agent-promptopen

One record in five Themes

quaypointHarbor tides’s ownopen
certificateopen
vaultlineopen
callboardopen
directoryopen

Shells

paperopen
tintopen
plateopen
glassopen

In three Businesses

Carried by the api-product, article and directory-product Templates. Seen on pages/harbor/home.json, section 11.

Harbor tides › home · quaypointAn API product hands an agent the install, the call and what to print.
Diffkeel › docs/first-diff · certificateA developer tool hands an agent the setup for its CI step.
Vanroster › product/dispatch · callboardA scheduling product hands an agent the import of an existing roster.

Do and do not

Doopen
Three instructions an agent can follow.
Don’topen
A shell command in a prompt: a command-row copies it without the label.
Doopen
At most six lines, one task.
Don’trefused
"lines": [
  "Install harbor-tides from npm.",
  "Read the README.",
  "Create a client.",
  "Fetch the tide window for a 3.2 m draft at pier 4.",
  "Print when it opens.",
  "Print when it closes.",
  "Set an alert an hour before it closes."
]
SectionSchema.safeParse(record)block.lines7 itemsToo big: expected array to have <=6 items
Seven lines are refused: the prompt holds one to six.

Accessibility

Check, on the exemplar renderLimitNowPass
Skipped heading levels00yes
Unnamed nav landmarks00 of 0yes
Scroll regions a keyboard cannot reach00 of 0yes
Copy controls that announce the resultall0 of 1no
Images and icons with no text alternative00yes

Text pairs below AA across the 5 Themes and every scheme they emit: 5. See Render checks.

  • Landmark The prompt sits in main. It adds no landmark.
  • Heading level It carries no heading; the label names it.
  • Focus order The copy control takes focus, named Copy the prompt. It does not announce that it copied in 7.0.0-alpha.0, as counted above.