Annotations
Field Comments
confiqure reads the comment adjacent to each field and uses it as the AI's prompt for that value. Good comments produce good conversations. Bad comments produce confused users.
The convention
Whatever your language treats as the field's documentation block becomes its prompt — single-line comments, Javadoc, KDoc, docstrings, doc comments. The CLI doesn't parse syntax; it captures the lines immediately preceding the field.
@Confiqure.User.Setting
public class UserPreferences {
// What's your preferred display name?
private String displayName;
// Which timezone should we use for scheduled emails?
private ZoneId timezone;
/**
* Multi-line comments work too. The full block becomes
* the prompt — including any constraints you mention.
* Keep it under three sentences for best results.
*/
private Locale locale;
}How types shape the question
The field's static type drives the conversational modality. The AI generates a different question style for an enum than for a free-text string.
| Field type | Question style | Notes |
|---|---|---|
| String | Free-text input | Mention format hints in the comment ("e.g. an email address"). |
| boolean | Yes/no toggle | Phrase the comment as a yes/no question. |
| int / long / double | Number input | State units and bounds in the comment ("between 1 and 100"). |
| enum | Single-choice picker | The enum values become the options. Add a comment on each value to refine its label. |
| List<Enum> | Multi-select | User can choose zero, one, or many. |
| List<String> | Repeating input | AI keeps asking "anything else?" until the user is done. |
| Nested class | Sub-dialog | Each field of the nested class becomes its own turn. |
Controls and reply views
The chat picks one control for each question and one view for each reply, by name, from the lists below. An answer is saved to the field the question is about and appears in the chat as its label (the option's text, not its value). Secrets keep their masked field, and consent and delete questions keep their own confirm cards.
| Control | What the user sees |
|---|---|
| yes_no · ok_cancel · start_stop | Two buttons with the labels the question needs; a click answers. |
| single_choice · selector | One choice from the options; two or fewer answer on click, more pick then Confirm. |
| multiple_choice | Several choices from the options, then Done. |
| list_selector | A scrolling list of the options (10 by default, more when the class allows), with a search box past 10; one pick, or several then Done. |
| date_time | A date picker. |
| file | A "Choose a file" button that opens the chat's file picker, when the embed token allows attachments; Skip answers without a file. |
| Reply view | What the user sees |
|---|---|
| message | A plain reply. |
| greeting | The opening reply. |
| info · warning · error | A reply with a small mark for a note, a warning or an error. |
| result | The outcome of an operation: the text first, then the rows it returned. |
Write comments for users, not compilers
Avoid
// digestFrequency
private Frequency digestFrequency;Restating the field name tells the AI nothing.
Prefer
// How often should digest emails be sent? Pick less often if you
// already get individual alerts.
private Frequency digestFrequency;A question, plus context that helps the user choose.