AI - Artificial Intelligence

How To Use AI In Website/App Development

How To Use AI In Website/App Development

Every team is now using AI to build software. Very few are using it well. The difference is not the tool you pick — it is how much of the thinking you hand over with it.

AI has stopped being a novelty in software work. In Google’s 2025 DORA research, 90% of technology professionals said they use AI at work. That is close to everyone. But the same research found something less comfortable: teams were shipping more code and also breaking production more often. AI turned out to be an amplifier. It makes a disciplined team faster, and it makes a messy team messy faster.

This guide is a practical walk through how to actually use AI when you build a website or an app — which parts to hand over, which parts to keep, and how to tell whether it is helping. No jargon that is not explained, and no pretending the risks are not real.

First, the five places AI shows up in a build

People say “we use AI” and mean five completely different things. It helps to separate them, because each one carries different risk.

  1. Writing code — the part everyone thinks of first.
  2. Designing screens — turning a description into layouts, or a layout into working markup.
  3. Testing — writing test cases, and repairing tests when the interface changes.
  4. Reviewing and shipping — checking each change for bugs, leaked keys and security holes.
  5. Features inside your product — a chat assistant, smart search, summaries, classification. This is a different job from the four above, and it comes later in this guide.

Here is how the first four fit into a normal build, and — the important column — where a person still has to make the call.

Where AI fits in website and app development Six stages of a build — plan, design, code, test, review, ship. For each stage, what AI drafts first and what the human decides and signs off. FIG. 01 / BUILD PIPELINE Where AI fits — and where you sign off AI drafts the first pass at every stage. A person still owns the decision at every stage. AI does the first pass You decide and sign off 01 Plan and write the spec AI drafts the spec, user stories and data model from your rough notes YOU set the goal, the edge cases, and what the product must never do 02 Design the screens AI generates layout options, copy and components in your design system YOU pick the direction, test the flow, keep it accessible and on brand 03 Write the code AI scaffolds files, wires up APIs, writes boilerplate, refactors on request YOU own the architecture and read every line before it merges 04 Test it AI writes unit and end-to-end tests, and repairs tests broken by UI changes YOU decide what “working” means and add the cases AI never thinks of 05 Review and secure AI reviews every pull request: logic slips, leaked keys, known vulnerabilities YOU approve the merge — a human name goes on every release 06 Ship and watch AI groups errors, explains incidents, drafts release notes and first fixes YOU watch failure rate and rework, not just how much code shipped KEY BRAINS · KEYBRAINS.IO — AI DRAFTS, PEOPLE DECIDE
FIG. 01 — AI drafts the first pass at every stage of the build. A person still owns the decision at every stage.

Read that figure twice, because it contains the whole method. AI is very good at the first draft of almost anything. It is not accountable for anything. Every stage therefore has two rows: what the machine produces, and what a human signs.

The four kinds of AI tools — and which one you need

The tool market looks chaotic, but it sorts into four groups by how much work you hand over in one go. Most working teams use two or three of these together.

The four kinds of AI development tools Autocomplete assistants, editor agents, terminal coding agents and prompt-to-app builders — what each is best for and what to watch out for. FIG. 02 / TOOL TYPES Four kinds of AI tools, four different jobs Most teams use two or three of these together. Pick by the size of the task, not by the hype. TYPE 01 — IN THE EDITOR Autocomplete assistants Copilot, JetBrains AI, Tabnine, Amazon Q BEST FOR Finishing the lines and functions you already know how to write. WATCH OUT It is very easy to accept code you never actually read. TYPE 02 — IN THE IDE Editor agents Cursor, Copilot agent mode, Windsurf BEST FOR Changes across several files while you watch each step. WATCH OUT Big diffs that look finished but only handle the happy path. TYPE 03 — IN THE TERMINAL Coding agents Claude Code, OpenAI Codex, Aider BEST FOR Long jobs: migrations, wide refactors, test suites, repo-wide cleanups. WATCH OUT Needs a written spec and limited permissions, or it wanders. TYPE 04 — PROMPT TO APP App builders v0, Lovable, Bolt, Replit, Figma Make BEST FOR Prototypes, landing pages, internal tools, proving an idea in a day. WATCH OUT Demo-ready is not production-ready. Audit login and data access first. Rule of thumb: the bigger the task you hand over, the more written detail the tool needs from you. KEY BRAINS · KEYBRAINS.IO
FIG. 02 — Four tool types, four different jobs. The bigger the task you delegate, the more written detail the tool needs from you.

Agent, in plain words: a normal AI assistant answers and stops. An agent keeps going — it reads your files, runs commands, checks the result, and tries again, for minutes or hours, until the task is done or it gets stuck. That is the big change of the last two years, and it is why “write me a function” has turned into “migrate this module”.

A simple way to choose:

If the task is…Use…Because…
A few lines you already understandEditor autocompleteFastest path, lowest risk, easy to eyeball
A change across 3–10 filesAn editor agentYou can watch and stop it mid-way
A migration, refactor or test suiteA terminal coding agentLong-running work with a written spec
Proving an idea to a stakeholderA prompt-to-app builderA clickable thing beats a document
A production feature real customers pay forAny of the above plus full reviewGenerated code is a draft, not a delivery

Sort the work before you prompt

This is the habit that separates teams getting real value from teams generating expensive rework. Before you open a tool, decide which of three buckets the task sits in.

What to hand to AI, what to supervise, what to keep human Three columns sorting development work into tasks you can delegate to AI, tasks that need close supervision, and decisions that must stay with people. FIG. 03 / DELEGATION MAP Sort the work before you prompt The teams that get real value from AI are strict about which column a task belongs in. Hand it over AI drafts, you skim Boilerplate and CRUD Unit tests Design turned into markup Copy and translations Docs and code comments One-off scripts Error log triage Regex and SQL you would have searched for anyway Supervise closely AI drafts, you read every line Data models and migrations Login and permissions Payments and billing Third-party integrations Performance tuning Refactors that touch many files at once Anything handling personal data Keep it human No AI decides this What to build, and why Architecture trade-offs Security decisions Pricing and compliance Final merge approval Incident calls Anything you could not explain to a customer in plain language The test for column three: if you cannot explain the decision without the AI, you do not own it yet — and you will not be able to defend it in an audit, an outage, or a sales call. KEY BRAINS · KEYBRAINS.IO
FIG. 03 — The delegation map. Column one you skim, column two you read line by line, column three never leaves human hands.

The line between column two and column three is worth being strict about. AI can propose a database schema, an authentication flow or a pricing calculation. It cannot be responsible for one. If a regulator, a customer or an on-call engineer asks why the system does what it does, “the model wrote it that way” is not an answer anyone accepts.

How to actually use AI on a real build, step by step

Here is the workflow we would recommend to a team of any size. It works for a marketing site and it works for a multi-tenant SaaS product; only the depth of each step changes.

  1. Write the spec first — with AI, not instead of it

    Dump your rough notes, voice memos and screenshots into a model and ask it to produce a short specification: what the thing does, who uses it, the main screens, the data it stores, and what happens when things go wrong. Then rewrite it yourself. The value is not the document; it is that you now notice the twelve decisions you had not made.

    Human checkpoint — you fix the goal, the edge cases, and the list of things the product must never do. Never delegate this list.
  2. Design the screens with generation, then curate hard

    Describe a screen and you will get several layouts back in seconds; hand over an existing design file and you will get a first pass at markup. Use it to explore more directions than you would have had time to draw. Then throw most of them away. Generated interfaces look plausible and often ignore empty states, error states, loading states, keyboard use and screen readers — the parts that actually decide whether the product feels good.

    Human checkpoint — pick the direction, walk the whole flow yourself, and check colour contrast and keyboard navigation before anyone codes it.
  3. Set up the project so an agent can work in it safely

    This is the step almost everyone skips, and it is the one that decides whether AI helps. Before you generate a single feature: put the repository under version control with small, reviewable commits; write down your conventions in a file the agent reads; add linting, formatting and type checking; make sure the test suite runs with one command; and keep secrets out of the codebase and out of prompts. An agent in a tidy repository is a strong junior engineer. The same agent in an undocumented repository invents its own conventions on every task.

    Human checkpoint — give the tool the narrowest permissions that let it work. It does not need production credentials to write a form.
  4. Build in small, reviewable slices

    Ask for one thin vertical slice at a time — one route, one component, one endpoint, with its tests — instead of “build the dashboard”. Small slices are the whole trick: you can read a 200-line diff properly, and you cannot read a 4,000-line one. If a diff is too big to review, that is not a review problem, it is a prompting problem. Break it up and go again.

    Human checkpoint — you own the architecture and the boundaries between modules. Ask the agent for options and trade-offs; make the choice yourself.
  5. Let AI write the tests, but you define “working”

    Test writing is the best-value AI task in the whole pipeline: it is repetitive, it has a clear right answer, and modern tools also repair tests that break when the interface changes. But AI writes tests for the code that exists, which means it happily confirms the behaviour you did not want. So write the acceptance criteria yourself first, then let the tool fill in the coverage around them.

    Human checkpoint — add the nasty cases nobody generates: the double-click, the expired token, the 3G connection, the hostile input, the empty account.
  6. Put a second AI on review — and a person on approval

    An automated reviewer on every pull request catches a lot of what a tired human misses: logic slips, missing error handling, leaked keys, known vulnerable dependencies. Run static analysis and dependency scanning in the same pipeline. Then a named human approves the merge. This matters more than it used to, because the volume of code has gone up and review capacity has not.

    Human checkpoint — no AI-approved merges. A person’s name goes on every release.
  7. Measure the outcome, not the output

    Lines of code and number of pull requests are the wrong metrics; they always go up with AI. Watch the four that tell you whether you are actually faster: how long a change takes from start to live, how often you release, what share of releases cause a problem, and how long recovery takes. Add one more: rework — how much of last month’s AI-assisted code you have already had to rewrite.

    Human checkpoint — agree these numbers before the AI rollout, not after. Otherwise you will be arguing about vibes in three months.

The honest numbers

You will read a lot of confident claims about AI productivity. The research is more interesting than the marketing, and it points in a specific direction: feeling faster and being faster are not the same thing.

The honest numbers on AI-assisted development A randomized trial found developers felt 20 percent faster with AI but were measured 19 percent slower, and AI-written pull requests carry more logic and security defects. FIG. 04 / THE EVIDENCE Faster feels real. Measure it anyway. Adoption is near-universal. The gains are real but uneven — and they arrive with a quality bill. A / THE PERCEPTION GAP NO CHANGE ← SLOWER FASTER → Speed-up they expected 24% faster Speed-up they felt afterwards 20% faster What the stopwatch showed 19% slower METR randomized trial, 16 experienced developers on 246 real tasks in their own repositories (early 2025). A February 2026 follow-up points to a genuine speed-up with today’s agent tools — but calls its own signal weak. B / THE QUALITY BILL 1.75× more logic and correctness bugs in AI-written pull requests than human ones 2.74× more likely to introduce a cross-site scripting hole into the product 4 in 10 security issues introduced by AI survive review and reach the main branch Sources: METR (July 2025, February 2026); CodeRabbit analysis of AI-authored vs human-authored pull requests; 2026 study of 304,362 AI-authored commits; DORA 2025 (90% of developers now use AI at work). KEY BRAINS · KEYBRAINS.IO
FIG. 04 — What the strongest available evidence says about speed and about defects. Sources listed at the end of this article.

The centrepiece is a randomized trial by the non-profit research group METR. Sixteen experienced developers worked on 246 real tasks in codebases they already knew. They expected AI to make them roughly a quarter faster. Afterwards, they believed it had. The measured result was 19% slower.

Two honest caveats, because that number gets over-quoted. It tested early-2025 tools on senior engineers in codebases they knew intimately — close to the hardest case for AI to help. And METR’s own February 2026 follow-up concluded that developers are probably now genuinely faster with today’s agent tools, while being careful to say their new data is weak evidence for how much. So the takeaway is not “AI does not work”. It is that self-reported speed is unreliable in both directions, which is exactly why step seven above exists.

Developers themselves report the same friction. In Stack Overflow’s 2025 survey of more than 49,000 developers, 84% said they use or plan to use AI tools — while trust in the accuracy of those tools fell to 29%. The single biggest frustration, named by 45%, was answers that are almost right but not quite, because those take longer to debug than writing the code yourself. “Almost right” is the characteristic failure mode of this technology, and it is the one your process has to be built around.

1.75×

More logic and correctness bugs found in AI-authored pull requests than human-authored ones, in CodeRabbit’s review data — along with a markedly higher rate of cross-site scripting flaws. Speed moves the work; it does not remove it.

The security picture is the part to take seriously. As generated code volume rises, so does the number of findings, and the flaws are shifting from trivial syntax mistakes to deeper structural ones — broken permission checks, unsafe data handling, missing validation. These are exactly the defects a quick skim does not catch. One 2026 analysis of more than 300,000 AI-authored commits found that roughly four in ten AI-introduced security issues survived review and made it into the main branch.

The one rule that prevents most of this

Never merge code you cannot explain

Not “code you did not write” — that is normal and fine. Code you could not explain to a colleague, line by line, if they asked why it is there. If you cannot, either read it until you can, or delete it and ask again with a tighter spec. This single rule filters out most AI-caused incidents, and it is free.

Putting AI inside the product

Everything so far was about using AI to build. This section is about shipping AI features — search that understands a question, a support assistant, automatic summaries, tagging, extraction from documents. It is a genuinely different engineering problem, because the output is not deterministic: the same input can produce a different answer tomorrow.

The most common and most expensive mistake here is overbuilding. Teams jump straight to a vector database and a fine-tuned model when a well-written prompt would have shipped in two days. Climb the ladder instead.

How to add AI features to your product without overbuilding Four steps in order of cost: prompt a hosted model, put your data in the prompt, add retrieval, then fine-tune. Climb only when the step below stops working. FIG. 05 / AI FEATURES Start at step one. Climb only when forced. Putting AI inside your product is a ladder, not a leap. Most teams start two rungs too high. MORE COST, MORE LOCK-IN STEP 01 Just prompt a hosted model One clear system prompt and a few examples. No new infrastructure, cheapest to change. START HERE Climb only if the model needs facts it does not have. STEP 02 Put your data in the prompt Paste in the docs, policies or records the answer needs. Modern context windows are large. Climb only if the data is too big, changes too often, or costs too much per call. STEP 03 Add retrieval (RAG) Index your content, fetch the closest matches, answer only from those. Swap models freely. Climb only if you need a fixed output shape, a smaller model, or lower latency. STEP 04 Fine-tune the model Teaches shape and tone, not new facts. Retrain when the base model moves. Most teams skip it. LAST RESORT Do this before you build the second AI feature: write 20–50 real examples with the answer you would accept, and track cost per user per month. KEY BRAINS · KEYBRAINS.IO
FIG. 05 — Four ways to give a model your knowledge, cheapest first. Move up a rung only when the one below actually fails.

RAG, in plain words: “retrieval-augmented generation” just means: search your own content first, then give the model only the few most relevant pieces and tell it to answer from those. It is why an assistant can cite your documentation instead of inventing it.

Three things that decide whether an AI feature survives

1. An eval set, written before the second feature. An “eval” is a plain test set for something that has no single right answer: 20 to 50 real inputs, each with the answer you would accept and the answers you would not. Run it on every prompt change. Without it, prompt tuning is superstition — you fix one case and silently break four.

2. Cost and latency as design constraints. Know your cost per user per month before launch, not after. Cache the stable parts of your prompts, route easy requests to a cheaper model and hard ones to a strong model, and stream responses so the interface feels alive while the model thinks.

3. A visible way to be wrong. Show sources. Let people correct the output and log every correction — that log is your next eval set. Make the feature’s confidence legible, and never let a model take an irreversible action, such as sending money or deleting records, without a human confirming.

Privacy and data — get this right first

Decide what may leave your systems, in writing

Before any AI feature or AI tool touches real data: write down which data may go to which provider, whether it may be retained, and who approved that. Strip or mask personal data you do not need to send. If you operate under GDPR, HIPAA, DPDP or a customer contract, this decision belongs to a person with authority — not to whoever set up the integration.

Six mistakes we see most often

  • Shipping a prototype as a product. Prompt-to-app builders are excellent at demos. The generated app frequently has weak or missing access controls, and public examples of exposed data from AI-built apps are easy to find. Treat every generated app as untrusted until it has passed a real security review.
  • No spec, then blaming the model. An agent given a vague instruction will make its own assumptions and implement them convincingly. Most “the AI got it wrong” incidents are missing-requirement incidents.
  • Reviewing generated code more loosely than human code. It should be the opposite. The code is fluent, confident, and did not come from someone who understood your business.
  • Letting juniors skip the understanding. The tool will happily do the learning task for them. Have them explain the generated code back, and pair on the parts they cannot. A team that cannot debug without AI is one outage away from finding out.
  • Pasting secrets, customer data or client code into whatever tool is open. Pick approved tools, check the data retention terms, and make the rule explicit.
  • Measuring adoption instead of outcomes. “80% of engineers use AI weekly” tells you nothing about whether your product got better, cheaper or more stable.

A 30-day starting plan

If you are introducing AI into an existing team, do it in this order. It is deliberately unglamorous.

WeekDo thisYou should end with
Week 1Measure your current baseline: delivery time, release frequency, failure rate, recovery time. Agree your data rules and approved tools.Numbers to compare against, and a one-page policy
Week 2Make the repository agent-ready: conventions file, lint, types, one-command tests, no secrets in code.A codebase where AI output is verifiable
Week 3Pick two tasks from the “hand it over” column and one from “supervise closely”. Two or three people, one tool, real work.Honest first-hand experience, not opinions
Week 4Turn on automated review on every pull request. Compare your four metrics to week 1. Write down what worked and what did not.A decision based on evidence
What good looks like after 90 days

Boring releases, smaller diffs, fewer surprises

Teams using AI well do not describe it as magic. They describe smaller pull requests, faster reviews, better test coverage, less time on boilerplate, and more time on the parts of the product that need judgment. If your experience after three months is “we ship more and break more”, the problem is the process around the tool, not the tool.

Where this is heading

The clear direction of travel is that writing code becomes a smaller share of the job and specifying, reviewing and verifying become a larger one. That rewards a skill set that has always mattered and is now decisive: knowing exactly what you want to build, being able to describe it precisely, and being able to tell whether what came back is correct.

Which is the quiet good news for anyone worried about being replaced. The bottleneck was never typing. It was understanding the problem well enough to be sure. AI does not remove that work — it makes it the whole job.

Frequently asked questions

Can I build a whole website or app with AI and no developer?

For a prototype, a landing page or a simple internal tool — often yes. For anything holding customer data, taking payments or needing to stay up, you still need someone who can read the code, judge the architecture and own the security. The tools have made the first 70% dramatically faster; the last 30% is where products succeed or fail, and it is still engineering.

Which AI coding tool should we choose?

Match the tool to the task size rather than looking for one winner: autocomplete in the editor for small work, an editor agent for multi-file changes, a terminal agent for long refactors and test suites, and a prompt-to-app builder for prototypes. Most teams end up running two. Trial them on your own codebase for two weeks — general benchmarks tell you very little about your stack.

Is AI-generated code safe to use in production?

It is safe under the same conditions any code is safe: it has been read by someone accountable, it has tests, it has passed security and dependency scanning, and it can be rolled back. What is not safe is treating generated code as pre-reviewed because it looks polished. Review data consistently shows more logic and security defects in AI-authored changes than human-authored ones.

Will AI make our project cheaper?

Usually it changes where the money goes rather than removing it. Less time on boilerplate, tests and first drafts; more time on specification, review and verification — plus a running bill for tools and, if you ship AI features, for model usage. Teams that cut review to bank the savings tend to pay it back later as rework and incidents.

What is the single highest-value place to start?

Tests and code review. Both are repetitive, both have verifiable output, and both make everything else you do with AI safer. Starting with feature generation before you have review and tests in place is how teams get the speed without the quality.

Sources and further reading

Build it, don’t just read it

Want AI in your build without the rework bill?

We use these tools every day on production systems — and we write the specification, review and test discipline that makes them pay off. Book a free 30-minute architecture call and we will tell you exactly what we would build, and where AI genuinely helps.

Book a free architecture call

Key Brains

Leave a Reply

Your email address will not be published. Required fields are marked *