Keep the prompt-composer boundary narrow
This guide follows the path from an empty composer to a request that the application accepts or rejects. It covers drafting, context preparation, clarification, assisted rewriting, submission, and repair. Response streaming, tool execution, approval policy, and completed-result review fall outside this boundary. Those lifecycles begin after the request leaves the composer.
Without that boundary, one animated button can hide several different states. A request may be valid enough to submit without proof that the application received it. A tool can be proposed without being authorized. A response may start streaming after the composer has finished its job. Give each lifecycle its own state and evidence.
Adjacent to Identity Forge
Identity Forge supplies visual systems and implementation artifacts for AI interfaces and coding agents. It doesn't supply a prompt-input component or prompt runtime. Use a design kit to govern the visual treatment, then define composer behavior in the application that owns the task.
Route the task to the right input pattern
Pattern libraries show the available options, but the product still needs a selection rule. Base it on five inputs: how often the task repeats, how well the user understands it, what context the application already holds, how much expressive freedom the request needs, and what happens if the request is wrong.
| Use when | Avoid as the only pattern | Required safeguard | |
|---|---|---|---|
| Open input | Tasks vary widely, users can describe the outcome, and expressive freedom matters. | Required fields or costly omissions are predictable. | Show the target and context, then identify any unresolved required information. |
| Template | The task repeats and a useful starting structure is stable. | Requests differ enough that the template becomes a form-shaped obstacle. | Keep every field editable and show what the template supplied. |
| Guided builder | Users need help expressing several known parameters or constraints. | Experienced users repeat the task and already know the required structure. | Provide a faster route while preserving free-form detail. |
| Inline action | The target is already selected and the action is narrow, such as rewriting one passage. | The user must establish a new target, broad context, or complex outcome. | Name the selected target and preview the proposed action. |
| Rewrite or enhancement | A draft exists, but its clarity, structure, or specificity could improve. | No original intent exists, or the interface can't expose what changed. | Preserve the original and review additions, removals, and unresolved changes. |
| Suggestions | The user needs starting directions or plausible next questions. | A suggestion could be mistaken for a required or authoritative choice. | Keep suggestions optional and visually distinct from the user's draft. |
| Follow-up | A focused question can resolve a material ambiguity. | The system is collecting details that don't affect the stated task. | Explain what remains unclear and retain the draft while asking. |
Separate first-use help from repeat-use efficiency
Examples and suggestions lower the first-use barrier. History, saved configurations, and templates can shorten repeated work. Evaluate both with the same criteria: Does the aid fit the current task? Is its origin visible? Can the user edit or dismiss it? Does accepting it change the target, context, or proposed action? Familiarity alone isn't a reason to turn an example into a permanent default.
Write the prompt-composer contract before styling it
The composer contract gives design, engineering, product, and review teams a shared record of what the interface promises to collect and expose. It also defines the request boundary without pretending that the UI controls model behavior.
Prompt composer contract
Task: [job the user is trying to complete]
Active target: [record, document, selection, conversation, or none]
Scope: [what the request may affect]
Context sources:
- source: [name and provenance]
state: [available | loading | unavailable | stale]
removable: [yes | no, with reason]
Attachments:
- item: [filename and type]
state: [uploading | ready | failed | removed]
Constraints: [format, policy, length, time, or other declared limits]
Expected output: [artifact, answer, proposal, or action request]
Unresolved ambiguity: [open question or none]
Proposed action: [what submission will request]
Submission condition: [facts that must be true before send is enabled]
Preserved on failure: [draft, context references, attachments, settings]
Correction owners: [composer | application | transport | runtime | policy | user]Treat context as a set of inspectable sources, not a single paperclip count. For each source, show its identity, provenance, current availability, preparation state, and whether the user can remove or replace it. If a required source disappears, update the request summary and readiness state. Don't leave the old scope implied in the prompt while the visible context says otherwise.
Give the interface a visual system after its behavior is explicit
Once the composer contract and states are defined, use a complete design system to keep input, focus, status, attachment, and action treatments consistent with the rest of the product.
Review AI-authored prompt mutations
Rewrite and enhancement controls can help users express a request. They can also introduce an audience, tone, format, visual style, constraint, or factual assumption. A generic Improve button that replaces the draft hides that change. Present the result as a mutation proposal the user can inspect.
Prompt mutation review
Original prompt: [exact user-authored text]
Proposed prompt: [complete proposed text]
Additions:
- [new instruction, constraint, example, or assumption]
Removals:
- [deleted intent, caveat, or detail]
Rephrased without intended meaning change:
- [changed passage]
Unresolved changes:
- [difference the interface cannot classify confidently]
User disposition: [accept | revise | reject | open]
Submitted version: [original | proposed | user-edited | none]Assistance is not consent
Generating a rewrite doesn't mean the user accepted its additions or removals. Keep submission separate from generation, and record which version is actually sent.
Map transitions, preservation, and repair ownership
A loose list of loading and error states isn't enough to implement the composer. Every state needs an entry condition, permitted actions, preserved data, visible feedback, a separate repair instruction, and a correction owner. Repair may be not applicable, but never leave the field implicit.
| Entry condition and permitted action | Data to preserve | Feedback, repair, and owner | |
|---|---|---|---|
| Empty | No draft or selected inline action exists. The user may type, choose a template, or select a suggestion. | Known target and eligible ambient context. | Show the available task rather than abstract model capabilities. Repair: not applicable. Owner: composer for unclear affordances. |
| Drafting | User-authored or accepted text exists. Editing and context changes are permitted. | Draft, target, valid sources, attachments, and user-selected settings. | Update readiness without moving focus unexpectedly. Repair: not applicable. Owner: composer for editing behavior. |
| Context loading | At least one selected or required source is preparing. The user may continue drafting and remove eligible sources. | Draft, target, attachments, and every independent ready source. | Show progress for each source. Repair: retry the failed source, replace it, or remove it and recalculate readiness. Owner: the integration or application layer that loads the source. |
| Ambiguous | A material question remains unresolved. The user may answer it, revise the draft, or remove the dependent request. | Original draft, target, context, attachments, and the stated reason clarification is required. | Ask one focused question and show the blocked submission condition. Repair: answer the question, revise the request, or remove the dependency. Owner: product or application logic for the clarification rule. |
| Ready | Every declared submission condition passes. The user may submit or continue editing. | Complete request snapshot, editable draft, target, context, attachments, and settings. | Show the proposed action and destination. Repair: not applicable. Owner: composer for readiness presentation. |
| Submitting | One submission attempt has started. The submitted snapshot is fixed, and another send is blocked while receipt is pending or unknown. | Submitted snapshot, editable draft, target, context, attachments, attempt time, and any known request identity. | Show sending or receipt unknown without claiming acceptance. Repair: retain or obtain a request identity, inspect request or task status, and allow retry only after confirming that the original request was not accepted. Owner: application or transport for acknowledgement and status lookup; composer for keeping duplicate protection visible. |
| Accepted | The application provides a request identity or equivalent evidence that it accepted the request. | Submitted snapshot and the request identity required for downstream display or status lookup. | Move later progress to the chat or task lifecycle. Repair: not applicable. Owner: application for the handoff. |
| Rejected | Validation, policy, transport, or application handling refuses the request with a known reason. | Draft, target, valid context, ready attachments, submitted snapshot, and actionable failure details. | Name the failed condition and correction route. Repair: correct the named condition, then reassess readiness. Owner: the layer that rejected the request owns the reason. |
| Retry-ready | A known rejection has been corrected, or status inspection has confirmed that an uncertain attempt was not accepted. The user may deliberately retry. | Corrected draft, target, usable context, ready attachments, prior attempt reference, and status evidence. | Show what will be sent and why retry is now allowed. Repair: not applicable while the retry condition remains satisfied; return to the relevant state if inputs change. Owner: application for retry eligibility and composer for the deliberate retry control. |
Unknown receipt is different from rejection
If the connection fails after send, the composer may not know whether the application accepted the request. An immediate retry can create a second request. Preserve the submitted snapshot and editable draft, show that receipt is unknown, and use a request identity when one exists. Check the request or task status before enabling another send. If status confirms acceptance, hand off to the downstream lifecycle. If status confirms no acceptance, move to retry-ready. If status remains unknown, keep duplicate submission blocked and show the unresolved condition.
Run two acceptance cases and leave observations open
The following record is a proposed test method, not a completed usability benchmark. Write the expectations before exercising the named implementation. Record observations only from the tested environment, and leave them open until that work occurs.
Prompt composer acceptance record
Composer: [name and revision]
Environment: [browser, viewport, input method, network condition]
Tester and date: [open]
Case A: compare two selected reports with one supporting attachment
Task: Compare "Q3 Retention Report" with "Q4 Retention Report" and use "cohort-notes.pdf" as supporting context.
Initial target: comparison of Q3 Retention Report and Q4 Retention Report.
Initial independent context:
- Q3 Retention Report: internal report, ready, removable
- Q4 Retention Report: internal report, ready, removable
Initial attachment:
- cohort-notes.pdf: PDF, ready, removable
Initial request summary: Compare Q3 Retention Report with Q4 Retention Report using cohort-notes.pdf.
Initial readiness: ready if every other declared submission condition passes.
Preserved draft: "Compare retention changes, identify the largest cohort shift, and cite the supporting report section."
Checkpoint A1: remove Q4 Retention Report
Action: Activate Remove on Q4 Retention Report.
Expected target: comparison target becomes incomplete because only Q3 Retention Report remains.
Expected independent context: Q3 Retention Report remains ready and visible.
Expected attachment state: cohort-notes.pdf remains ready and visible.
Expected request summary: Compare Q3 Retention Report with [second report required] using cohort-notes.pdf.
Expected draft: preserved without silent rewriting.
Expected consequence: submission is blocked because a two-report comparison no longer has two reports; unresolved ambiguity names the missing second report.
Expected next action: select a replacement second report or revise the task to analyze Q3 Retention Report alone.
Observed: [open]
Correction owner: [open]
Disposition: [accept | revise | block | open]
Checkpoint A2: restore Q4 Retention Report, then remove cohort-notes.pdf
Action sequence: Select Q4 Retention Report again, confirm both reports are ready, then activate Remove on cohort-notes.pdf.
Expected target: comparison of Q3 Retention Report and Q4 Retention Report remains intact.
Expected independent context:
- Q3 Retention Report remains ready and visible
- Q4 Retention Report remains ready and visible
Expected attachment state: cohort-notes.pdf is marked removed and is excluded from the request.
Expected request summary: Compare Q3 Retention Report with Q4 Retention Report without a supporting attachment.
Expected draft: preserved without references being invented or deleted.
Expected consequence: if the contract marks the PDF optional, readiness remains ready; if the contract marks it required, submission is blocked and the missing requirement is named. Record the configured rule before testing.
Expected next action: submit without the optional PDF, reattach cohort-notes.pdf if required, or revise the constraint that made it required.
Observed: [open]
Correction owner: [open]
Disposition: [accept | revise | block | open]
Checkpoint A3: review a proposed rewrite
Expected mutation review: original and proposed text are both available; additions, removals, and unresolved changes are visible; disposition remains open until the user acts.
Expected readiness: generating the rewrite does not submit it or replace the accepted draft automatically.
Observed: [open]
Correction owner: [open]
Disposition: [accept | revise | block | open]
Checkpoint A4: test duplicate protection and uncertain acknowledgement
Action: submit once, then make receipt unavailable before acknowledgement is shown.
Expected submitting state: another send is blocked; submitted snapshot and editable draft remain available; receipt is shown as unknown rather than rejected.
Expected status route: the composer retains or obtains a request identity and checks request or task status.
Expected retry rule: retry stays unavailable until status confirms the original request was not accepted.
Observed: [open]
Correction owner: [open]
Disposition: [accept | revise | block | open]
Case B: inline transformation of selected text
Task: Rewrite the selected paragraph for a technical audience.
Expected target: selected document and passage remain visible.
Expected context: the selection is inspectable and can be replaced by a new selection.
Expected mutation: any added tone, audience, length, or format instruction is visible before submission.
Expected keyboard path: focus reaches target, context, rewrite review, send, and repair controls in a logical order.
Expected narrow viewport: draft, target, context status, primary action, and error remain available without obscuring one another.
Expected rejection recovery: a known rejected constraint preserves the edited prompt and explains the correction.
Expected retry: after correction, one deliberate retry becomes available; an unknown receipt follows the status-inspection route instead.
Observed: [open]
Correction owner: [open]
Disposition: [accept | revise | block | open]
Cross-case evidence
Request identities and status results: [open]
Screens or recordings: [open]
Keyboard observations: [open]
Narrow-viewport observations: [open]Expectations are not findings
The cases above define what to inspect and what counts as failure. They don't claim that any composer passed, failed, prevented duplicates, supported a keyboard path, or worked at a narrow viewport.
Implement one complete path before adding more assistance
- 1
Choose one representative composer
Name its task, user, active target, and the consequence of a wrong request. Keep the boundary to one composer.
- 2
Complete the contract
Record context sources, attachments, constraints, ambiguity, proposed action, submission condition, preserved data, and correction owners.
- 3
Select the primary input pattern
Use the router to choose an open input, template, guided builder, or inline action. Add rewrite, suggestions, or follow-up only for a named problem.
- 4
Implement every transition field
For each state, specify entry, permitted action, preserved data, feedback, repair, and owner. Include unknown receipt as a distinct submitting outcome.
- 5
Run both acceptance cases
Record observed behavior without filling gaps from expectations. Correct the first failed transition at its owning layer, then repeat that case before adding another assistance feature.
Sources
- The Shape of AI | UX Patterns for Artificial Intelligence Design: The pattern library catalogs distinct AI interaction patterns, including open input, templates, suggestions, follow-up questions, prompt details, prompt enhancement, controls, and verification.
- Prompt Augmentation: UX Design Patterns for Better AI Prompting: The article distinguishes six prompt-augmentation approaches and explains how rewritten prompts can introduce details the user did not intend.
- 48 SaaS Prompt Input UI Design Examples: The prompt-input guide asks teams to examine scope, recipient, context, attachment readiness, submission, recovery, consequences, and refinement.
- Prompt to Design Interfaces - NN/G: The article explains the problems caused by vague design prompts and recommends precise direction and useful visual references for AI prototyping.
- 14 UI patterns for generative AI: The collection covers interfaces for large inputs, probabilistic workflow steps, broken logic, debugging visibility, provenance, and richer visual prompting.