Discovery question form
This atom defines the <question-form> protocol. It does not decide whether
clarification is required. Follow the active skill and core prompt's
requirements-clarification policy. When they identify unresolved information
that would materially change the design direction, content structure, or
delivery format, surface the smallest possible set of questions that unblocks
the workflow.
The questions are rendered as a <question-form> artifact inline in the
originating assistant message. This is assistant text parsed by the host, not a
plugin GenUI surface or a native tool call. Submitted answers return as the
next user message, beginning with [form answers — <form-id>].
Activation boundary
- A first turn or new project does not by itself require a form.
- A
discovery pipeline stage only makes this protocol available; declaring
or entering the stage does not trigger a form.
- Missing metadata is not automatically a question. First use the request,
conversation, plugin inputs, memory, active skill, and design system.
- If enough information is available to proceed safely, do not emit a form.
- If a material blocker remains, ask only for that unresolved information.
Emission shape
Emit the form as a question-form block whose body is a JSON object with a
top-level questions array. Do not emit a bare question object by itself; the
renderer only recognizes the wrapped form contract.
<question-form id="discovery" title="Quick brief — 30 seconds">
{
"description": "I'll lock these in before building. Skip what doesn't apply — I'll fill defaults.",
"questions": [
{
"id": "audience",
"label": "Who's the primary audience?",
"type": "checkbox",
"options": ["VC", "Customer", "Internal team"],
"maxSelections": 2,
"required": true
}
]
}
</question-form>
Question object shape
Each entry in the top-level questions array uses:
id: stable answer key, for example audience.
label: user-facing question copy.
type: one of radio, checkbox, select, text, textarea,
number, range, date, time, datetime-local, color, url,
email, tel, file, or switch.
options: required for choice controls; strings are
allowed, or objects with localized label and stable value.
- At most 6-7 options per question; merge near-duplicates instead of listing more.
- Choose
radio vs select by option count, not importance: radio for a short list, select once it runs long (languages, timezones, voices). checkbox is always a plain list.
select options may carry group (first group expands, the rest collapse) and trailingLabel (a short end-of-row code such as ZH-CN). Both optional.
- Label options in the user's words, not jargon: "Magazine-style layout", not "Editorial". Reword only
label; never change a stable value.
- Keep each
label under ~40 characters; put anything longer in description.
allowCustom: leave unset or set to true for finite-choice controls so
users can type their own answer instead of accepting only generated options.
Set allowCustom: false only when the downstream system needs an exact
machine id.
customLabel / customPlaceholder: optional localized copy for that custom
answer input.
maxSelections: include this for checkbox controls with a limited selection
count.
required: set to true only when the answer is needed before work can
continue.
Convergence
The discovery atom completes when the next user message contains an answer
for every required question. Treat those submitted answers as conversation
context and do not ask the same questions again unless later input invalidates
an answer.
1---2name: discovery-question-form3description: Structured clarification form for unresolved material requirements.4---5
6# Discovery question form
7
8This atom defines the `<question-form>` protocol. It does not decide whether
9clarification is required. Follow the active skill and core prompt's
10requirements-clarification policy. When they identify unresolved information
11that would materially change the design direction, content structure, or
12delivery format, surface the smallest possible set of questions that unblocks
13the workflow.
14
15The questions are rendered as a `<question-form>` artifact inline in the
16originating assistant message. This is assistant text parsed by the host, not a
17plugin GenUI surface or a native tool call. Submitted answers return as the
18next user message, beginning with `[form answers — <form-id>]`.
19
20## Activation boundary
21
22- A first turn or new project does not by itself require a form.
23- A `discovery` pipeline stage only makes this protocol available; declaring
24 or entering the stage does not trigger a form.
25- Missing metadata is not automatically a question. First use the request,
26 conversation, plugin inputs, memory, active skill, and design system.
27- If enough information is available to proceed safely, do not emit a form.
28- If a material blocker remains, ask only for that unresolved information.
29
30## Emission shape
31
32Emit the form as a `question-form` block whose body is a JSON object with a
33top-level `questions` array. Do not emit a bare question object by itself; the
34renderer only recognizes the wrapped form contract.
35
36```html
37<question-form id="discovery" title="Quick brief — 30 seconds">
38{
39 "description": "I'll lock these in before building. Skip what doesn't apply — I'll fill defaults.",
40 "questions": [
41 {
42 "id": "audience",
43 "label": "Who's the primary audience?",
44 "type": "checkbox",
45 "options": ["VC", "Customer", "Internal team"],
46 "maxSelections": 2,
47 "required": true
48 }
49 ]
50}
51</question-form>
52```
53
54## Question object shape
55
56Each entry in the top-level `questions` array uses:
57
58- `id`: stable answer key, for example `audience`.
59- `label`: user-facing question copy.
60- `type`: one of `radio`, `checkbox`, `select`, `text`, `textarea`,
61 `number`, `range`, `date`, `time`, `datetime-local`, `color`, `url`,
62 `email`, `tel`, `file`, or `switch`.
63- `options`: required for choice controls; strings are
64 allowed, or objects with localized `label` and stable `value`.
65- At most 6-7 options per question; merge near-duplicates instead of listing more.
66- Choose `radio` vs `select` by option count, not importance: `radio` for a short list, `select` once it runs long (languages, timezones, voices). `checkbox` is always a plain list.
67- `select` options may carry `group` (first group expands, the rest collapse) and `trailingLabel` (a short end-of-row code such as `ZH-CN`). Both optional.
68- Label options in the user's words, not jargon: "Magazine-style layout", not "Editorial". Reword only `label`; never change a stable `value`.
69- Keep each `label` under ~40 characters; put anything longer in `description`.
70- `allowCustom`: leave unset or set to `true` for finite-choice controls so
71 users can type their own answer instead of accepting only generated options.
72 Set `allowCustom: false` only when the downstream system needs an exact
73 machine id.
74- `customLabel` / `customPlaceholder`: optional localized copy for that custom
75 answer input.
76- `maxSelections`: include this for checkbox controls with a limited selection
77 count.
78- `required`: set to `true` only when the answer is needed before work can
79 continue.
80
81## Convergence
82
83The discovery atom completes when the next user message contains an answer
84for every required question. Treat those submitted answers as conversation
85context and do not ask the same questions again unless later input invalidates
86an answer.