Prompt Flow

A structured workflow for working with AI that emphasizes planning, review, and understanding before implementation.

~4 min read updated Jul 17, 2026 AI Prompts
  • #ai
  • #prompt engineering
  • #workflow

This is the workflow used throughout my classes whenever working with AI. The goal is not to get code as quickly as possible. The goal is to produce software that you understand and can confidently explain.

Most beginners ask AI to:

"Build my app."

Then they receive hundreds of lines of code they don't understand.

Instead, we build software one step at a time.

The Prompt Flow

1. Define the Goal

Start by explaining the problem, not the code.

Describe:

  • Who the users are.
  • What problem you're solving.
  • What success looks like.

Avoid asking for implementation details immediately.

Example

I want to create a simple inventory system for a school canteen where students can browse products and staff can manage inventory.


2. Improve the Prompt

Before asking AI to solve the problem, ask it to improve your prompt.

Example:

Act as a prompt engineer. Review and improve my prompt without changing my original goal.

A better prompt almost always produces a better answer.


3. Review the Improved Prompt

Read the improved prompt carefully.

Ask yourself:

  • Is anything missing?
  • Did the AI misunderstand my idea?
  • Is there unnecessary complexity?
  • Does it still match my original goal?

Remember:

You review the prompt. AI doesn't know your project better than you do.


4. Create a Development Plan

Before requesting code, ask for a plan.

Example:

Create a step-by-step implementation plan. Do not write any code yet.

The plan should include:

  • Features
  • Folder structure
  • Architecture
  • Components
  • Database design
  • Development milestones

A good plan prevents messy code later.


5. Review the Plan

Never execute a plan you haven't read.

Check:

  • Is the architecture reasonable?
  • Can anything be simplified?
  • Are important features missing?
  • Is the order logical?

Revise the plan before moving forward.


6. Implement One Feature at a Time

Now begin writing code.

Instead of asking:

Build the entire application.

Break the project into small tasks.

Examples:

  • Build authentication.
  • Create the navigation bar.
  • Implement product listing.
  • Build the shopping cart.
  • Add validation.

Small prompts produce cleaner code and are much easier to debug.


7. Review the Code

Do not immediately copy and paste.

Read the code.

Ask AI questions such as:

  • Explain this line.
  • Why did you use this approach?
  • Is there a cleaner solution?
  • Can this be more reusable?

If you can't explain the code, don't use it yet.


8. Test the Feature

Run the application.

Check:

  • Does it work?
  • Are there bugs?
  • Does it match the plan?
  • Can edge cases break it?

Testing is part of development, not something you do at the end.


9. Iterate

Software is never finished in one prompt.

Repeat the cycle:

  • Improve
  • Review
  • Build
  • Test
  • Refine

Each iteration should leave the project in a better state than before.

Visual Workflow

Idea
 │
 ▼
Define the Goal
 │
 ▼
Improve the Prompt
 │
 ▼
Review the Prompt
 │
 ▼
Create a Development Plan
 │
 ▼
Review the Plan
 │
 ▼
Build One Feature
 │
 ▼
Review the Code
 │
 ▼
Test
 │
 ▼
Improve
 │
 └──────────────┐
                ▼
            Repeat

Why This Workflow?

This workflow keeps you in control.AI is excellent at writing code.Humans are responsible for deciding:
  • what to build,
  • why to build it,
  • whether the solution is correct,
  • and whether the code is maintainable.
Never let AI skip those decisions for you.

Common Mistakes

Avoid these habits:
  • Asking AI to build the whole application in one prompt.
  • Copying code without understanding it.
  • Skipping the planning stage.
  • Never reviewing AI output.
  • Never testing the generated code.
  • Assuming AI is always correct.

Improve a Prompt

Act as a prompt engineer.

Review my prompt and improve it.

Requirements:

- Preserve my original goal.
- Remove ambiguity.
- Add missing technical details.
- Improve clarity.
- Do not change the project's purpose.

My Prompt:

[paste prompt]

Generate a Plan

Act as a senior software engineer.

Before writing any code, create a complete implementation plan.

Include:

- Architecture
- Folder structure
- Components
- Services
- Database
- Development phases
- Best practices

Do not generate code yet.

Implement a Feature

Act as a senior software engineer.

Implement only this feature.

Requirements:

- Follow clean code principles.
- Reuse existing components.
- Explain important decisions.
- Do not modify unrelated files.

The Golden Rule

Never ask AI to replace your thinking.Ask AI to accelerate your thinking.The best developers are not the ones who write the most code.They're the ones who make the best decisions before the first line of code is ever written.

Related notes