agent-prompt
The prompt a reader pastes into a coding agent, copied in one action.
{
"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."
]
}
}
{
"title": "agent-prompt",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "agent-prompt"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 24
},
"lines": {
"minItems": 1,
"maxItems": 6,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
}
},
"required": [
"type",
"label",
"lines"
],
"additionalProperties": false
}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.
command-row: a shell command, not a prompt
The record
{
"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.
| Prop | Type and bound | Required |
|---|---|---|
label | string ≤24 | yes |
lines | 1–6 × string ≤200 | yes |
Variants and counts
One layout: the label, the lines and the copy control.
One record in five Themes
Shells
In three Businesses
Carried by the api-product, article and directory-product Templates. Seen on pages/harbor/home.json, section 11.
Do and do not
command-row copies it without the label."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."
]Accessibility
| Check, on the exemplar render | Limit | Now | Pass |
|---|---|---|---|
| Skipped heading levels | 0 | 0 | yes |
| Unnamed nav landmarks | 0 | 0 of 0 | yes |
| Scroll regions a keyboard cannot reach | 0 | 0 of 0 | yes |
| Copy controls that announce the result | all | 0 of 1 | no |
| Images and icons with no text alternative | 0 | 0 | yes |
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.