<✦>aicodedesign.Start building

PROCESS

From sketch to a reviewable browser prototype: one task, five states

Turn a rough sketch into an appointment-request prototype with a worked specification, five-state checklist, AI build prompt and free review worksheet.

AI Code Design editorial · September 2026 archive · Updated December 1, 2026 · 8 min read

Hands annotating a paper wireframe beside a laptop with abstract interface shapes
Original AI-created illustration; not a screenshot of a finished product.

Start with one task and specify what happens before, during and after it. A useful first prototype is not every screen in your sketch: it is one interaction a reviewer can try, question and explain. For this exercise, build a fictional appointment-request form that runs locally and clearly says that it does not book or send anything.

The deliverable is a reviewable behavior, a short specification and a record of actual checks. The example below is a teaching scenario—not client work, user research or evidence that a business wants this product.

1. Give the sketch a job

Imagine a visitor asking a small repair studio about an appointment. The visitor needs to state a preferred day and a way to be contacted. The studio has not connected a calendar or a message service. A prototype can explore whether that request is understandable, but it must not pretend a time has been reserved.

Write one task above the drawing: “A visitor can prepare an appointment request and understand that it is a demo.” Cross out the dashboard, account area, payment screen and calendar integration. Those are separate decisions, not missing decorations.

On paper, label the page heading, demo notice, fields, primary button and result area. Draw a second small panel for an error and a third for the result. Arrows should explain a state change, not just connect attractive rectangles. For the broader foundations, see our functional prototype guide.

2. Translate the drawing into an explicit specification

Audience and task
A visitor prepares one appointment request. The prototype tests whether the form and its limits are understandable.
Inputs
First name, email and preferred weekday. Use visible labels; mark required fields in words. For this exercise, do not collect a phone number, address, payment details or personal repair notes.
Data
Use invented values such as Alex and alex@example.com. Keep them only in memory. No network request, analytics event containing field values, local storage or account.
Result
“Demo request prepared. Nothing was sent and no appointment is booked.” Show the chosen weekday, not a fabricated available time.
Reset
A clearly labeled “Start again” button clears the demo and returns focus to the first field. Reloading also clears the data.
Outside scope
No real availability, email delivery, server validation, booking, payment or production-readiness claim.

These constraints make the prototype easier to inspect. They are not a production architecture. If your real task needs durable records or messages, document that as unfinished work rather than adding a reassuring “Saved” label.

3. Define five states before asking for code

Use this state list as the contract for implementation. A brief simulated processing state is optional; if included, label it as simulated. Do not invent a network delay to imply that a service was contacted.

  1. Empty: the demo notice is visible, fields have labels, and the button says “Prepare demo request.” There is no preselected weekday that could be mistaken for a confirmed choice.
  2. Invalid: submitting without required values explains what to fix. “Choose a preferred weekday” is more useful than “Invalid.” Preserve the values already entered and connect each message to its field.
  3. Processing: if simulated, say so. Prevent repeated activation while this state is active, then return control predictably. Nothing leaves the browser.
  4. Prepared: show the explicit no-booking message and a summary of the chosen weekday. Make the result perceivable without relying only on a green border or an animation.
  5. Failure and recovery: provide a developer/demo control to simulate a failed attempt. Keep the entered values, explain that nothing was sent, and offer a retry. Label this control so it is not confused with a customer feature.

W3C’s form notification guidance recommends clear feedback on success or failure and useful correction instructions. For a dynamic form, plan how errors and results are announced to assistive technology; do not assume that displaying text makes it perceivable to everyone.

Try a functional prototype with one input

This small demo lets you test the choice of a weekday before adding a contact form. Use the sample options and see whether the result explains what happened.

Choose a weekday to start. This example runs in your browser.

Try it twice. Submit with no weekday, then select Wednesday and turn on the simulated failure. Retry once. Your review note should record whether Wednesday survived the failure and whether you could tell that you had only prepared a demo.

4. Ask AI to read back the behavior first

Give the tool your sketch and specification, then ask for an interpretation before implementation. If it interprets a preferred day as a live appointment slot, correct that now. A useful first answer should identify the main task, the five states and the deliberate absence of a backend.

Read this sketch and specification back to me before writing code.
Identify the task, field labels, state transitions and unresolved questions.
Do not add accounts, payments, tracking, a database or real integrations.

After we agree, implement one responsive semantic HTML form with CSS and
small, understandable JavaScript. Use fictional input only. Keep data in
memory, never transmit it, and clearly label all simulated behavior.
Implement empty, invalid, processing (if needed), prepared and failure states.
Preserve input after errors. Explain focus behavior and result announcements.
Never show “booked” or “sent.” Explain how to run and inspect each state.
List files changed, checks actually run and remaining limitations.

Do not give the tool customer information or credentials. Ask it to explain unfamiliar code and compare its output against your specification. A confident answer is not evidence that the interaction works.

5. Build and review one complete slice

Start with the empty form, one invalid submission and the prepared result. Review that slice before adding the simulated failure. Keep a recoverable source checkpoint before each change. If the AI adds features outside the brief, remove or defer them instead of expanding the test burden by accident.

Now run the checks below and record what actually happened. Leave a result as “not checked” when you did not perform it. A list of planned tests is not a passing report.

The 320-CSS-pixel review follows the vertical-content condition described in W3C’s Reflow guidance, which also explains exceptions and zoom equivalence. Do not label the whole prototype WCAG-conformant on the basis of this one check.

6. Hand over evidence, not a completion slogan

A useful review note says: what the task is, how to open the prototype, which input is fictional, where data lives, what was checked and what remains untested. Include a reproduction path for each issue. “Tab skips the retry control after the simulated failure” is actionable; “accessibility needs work” is not specific enough.

Ask a willing reviewer to prepare a demo request without coaching, then ask what they believe happened. Record their actual response with permission; do not write a hypothetical response as a finding. If they believe an appointment was booked, revise the wording and flow before adding more polish.

Before any real launch, separately address server-side validation, delivery/booking reliability, access controls, privacy, monitoring and ownership. MDN’s form-validation guidance explains why browser-side checks alone are not a security boundary. This guide does not supply those production systems.

Take the free brief into your next build

Download the worked specification and review sheet

For a blank starting point, use the existing AI-ready project brief. Capture your decisions in the free Project Passport (browser-local; export a backup), or practice with the working reading-list reference project. No paid workshop or account is required.

Sources and update note

By AI Code Design editorial. W3C WAI User Notifications, W3C WCAG 2.2 Understanding Reflow, and MDN Client-side form validation were checked October 29, 2026. These are maintained documentation pages; we do not assign a new publication date to them. This refresh adds the original appointment-request specification, state contract and review sheet to the existing sketch article. Its earlier September 2026 archive label is retained; an exact original publication day has not been verified.