Skip to main content

Iterate with AI

Most projects improve through short feedback loops. Use the assistant to request changes, then verify them in code and preview.

Cocoding AI preview tab for checking generated UI
Preview the user flow before asking for another change.
Cocoding AI code view for reviewing generated files
Use the code view when you need to confirm where a change landed.

A reliable iteration loop

  1. Review the preview.
  2. Identify one issue or improvement.
  3. Ask for a focused change.
  4. Wait for the assistant to apply it.
  5. Check terminal output for errors.
  6. Test the preview again.

What to inspect before asking

AreaWhat to check
PreviewDoes the user flow work from start to finish? Are empty and error states visible?
CodeDid the assistant edit the expected files? Are routes, components, and API calls named clearly?
TerminalAre installs, migrations, or builds failing? Is the server listening on the expected port?
DatabaseDo tables and records match the product workflow?
MobileDoes the layout remain readable when the viewport is narrow?

Example iteration prompts

On the booking checkout screen, add validation for check-in and check-out dates.
Show a clear inline error if check-out is before check-in.
Add an admin page for managing rooms.
Each room needs a name, price per night, capacity, availability flag, and image URL.
The preview navbar is too tall on mobile.
Reduce the mobile header height and keep the menu button easy to tap.
The admin table needs bulk actions.
Add checkboxes, a bulk status update menu, and a confirmation step before applying changes.
The generated dashboard numbers are static.
Connect the cards to the bookings and payments tables and add loading and empty states.

When a change gets too large

Split it into smaller prompts:

  • Database model changes first.
  • Admin screens second.
  • Public customer flow third.
  • Styling and responsive polish last.

Ask for explanations when needed

Use explanation prompts when you need confidence before continuing:

Explain what files changed, which database tables are affected, and what I should test next.

This is especially useful before asking for integrations, authentication changes, migrations, or billing logic.

Recovery prompts

If a change breaks the app, keep the request specific:

The preview is blank after the last change.
Use the terminal error below to fix the root cause.
Do not redesign unrelated screens.
[paste only the relevant error]

If the assistant misunderstood the product requirement, restate the rule and the exact screen:

On the host bookings page, hosts should only see bookings for their own listings.
Update the query and access logic for that page only.