Magnus Attefall

Open to a permanent role

Bygga med AI

What AI can really do when you build a website

The most dangerous bug in AI code looks perfectly right.

Building a website with AI is fast. A working site takes hours instead of weeks. What AI builds is still never better than what you can describe and judge. Security, data model and maintenance only come out right when someone has set the requirements and checks the result.

Short answer

AI builds the visible parts quickly and well. The invisible parts only come out right when someone has specified them and can review them.

  • AI builds what you can describe. Whatever you haven’t decided, it fills in on its own.
  • In a large test, nearly half of the code AI wrote had security flaws. The code still worked exactly as it should.
  • Experienced developers thought AI made them 20% faster. Measurements showed they were 19% slower.
  • I built the HjulMatch site in about five days with AI. I made the product decisions and did the reviewing myself.
  • You don’t need to know how to code. You need to set requirements and make sure someone reviews the result.

How fast AI builds today

Ask an AI assistant for a home page and you’ll have a working page in minutes. AI agents such as Claude Code go further. The agent reads the project, writes the code, runs it and fixes its own mistakes.

In 2025 Anthropic analysed 500,000 coding conversations with Claude. JavaScript, TypeScript, HTML and CSS together accounted for 59% of the requests. Web interfaces are what AI builds most often. In the agent tool Claude Code, 79% of conversations were classed as automation, where the AI did the work itself instead of giving advice.

The scale is clearest among AI website builders. Stockholm-based Lovable had more than 200,000 new projects a day in March 2026, according to TechCrunch. The month before, the company had passed $400 million in annual revenue with 146 employees. On GitHub, almost 80% of new developers use the AI assistant Copilot in their first week.

My own experience matches the numbers. HjulMatch, a search engine that gathered motorhomes and caravans from more than 15 Swedish dealers every night, went from first idea to a live site in about five days. I didn’t write any code myself. Claude Code did the programming and I made the decisions on design, structure, content and tone.

I worked at the same pace when this site, attefall.se, was rebuilt in autumn 2026. The theme, the page templates and my own plugins for booking and quotes were built with AI. The site launched on 23 November 2026.

It takes a few minutes to get a page that looks finished. The question is who can tell whether it is.

What AI does well

AI is strongest where the result is visible and the task has clear limits. That’s also where you can judge the result without reading the code.

  • Headers, cards, forms and menus that follow a design you already have.
  • Prototypes that make an idea testable in a day.
  • Connections to well-known services for payments, newsletters, analytics and maps.
  • Data that needs cleaning and making comparable, as when HjulMatch took listings from more than 15 dealers and put them in the same format.
  • Troubleshooting when you can describe what happens and what should happen.
  • Drafts of copy, metadata and image captions that someone then reviews.

With HjulMatch, AI did more than code. I wrote more than 15 guides based on how buyers actually search. Canva produced an explainer video for each guide automatically. GA4 through Google Tag Manager showed how visitors moved around and what led to clicks. That used to take an agency or several specialists. Now it was me and two AI assistants in Claude Code, one for the technology and one for the design, writing the code to my instructions.

WordPress is heading the same way. Since version 6.9 in December 2025, the core has an interface that lets AI agents discover and use a site’s functions. I built the new attefall.se that way, with AI working directly in WordPress and me as the client.

Everything on the list has one thing in common. You can see for yourself whether it came out right. A button in the wrong place shows up straight away.

AI is at its best when you can see with your own eyes whether the result is right.

Where AI falls short

The problems gather where you can’t see them: permissions, data model, dependencies and operations.

Security company Veracode had more than 100 language models solve 80 programming tasks in 2025. In 45% of cases the models introduced vulnerabilities from the OWASP Top 10, the list of the most common security holes on the web. Newer, larger models wrote code that worked better. It wasn’t any more secure. Against cross-site scripting, where an attacker smuggles a script onto a page, the models failed in 86% of cases.

Researchers presenting at USENIX Security 2025 found a different problem. Of all the software packages suggested by 16 language models, 19.7% didn’t exist. An attacker can register the invented names and wait for someone to install them.

Maintenance suffers too. GitClear analysed 211 million changed lines of code between 2020 and 2024. The share of code that was reworked and tidied fell from 25% to under 10%. The share of copied code rose. GitClear sells measurement tools, and the link to AI is a correlation. The pattern is still familiar: AI would rather add new code than tidy the old.

  • Security doesn’t come along by default. It has to be ordered and tested.
  • Accessibility lands at the web’s average. WebAIM found WCAG failures on 94.8% of the world’s million most visited home pages. That’s the web AI learned from.
  • Findability depends on technical choices such as rendering, metadata and your own domain. Lovable itself says its default metadata is generic.
  • Operations and backups require development and production to be kept apart.

Findability is a good example of a requirement nobody sees. Google reads a site in three stages: crawling, rendering and indexing. Pages whose text only appears after the browser has run JavaScript are harder to index, which is why Google recommends rendering pages on the server. An AI-built site can look perfect in the browser and still be almost empty to a search engine.

AI writes code that works. Whether it’s secure is for someone else to decide.

The most dangerous bug looks right

The hard thing about AI code is that the errors rarely show. In Stack Overflow’s 2025 survey, 66% of developers said AI answers are often almost right, but not quite. That kind of error costs more than an obvious one, because nobody goes looking for it.

The research organisation METR had 16 experienced developers solve 246 real tasks with and without AI in 2025. Before the study they expected AI to make them 24% faster. Afterwards they believed they had been 20% faster. In reality the work took 19% longer with AI.

The tools have improved since then. METR’s 2026 follow-up points the other way, but the data is too uncertain to draw conclusions from. What holds is that the developers themselves didn’t notice the difference.

Two incidents from 2025 show what it can cost. Security researcher Matt Palmer reviewed 1,645 apps built with Lovable. In 170 of them anyone could read or change the database, because the access rules were missing. The same summer, an AI agent at Replit deleted the production database of SaaStr founder Jason Lemkin in the middle of a code freeze. The data could be restored. The root cause was that development and production shared the same database.

None of the errors showed in the interface. The apps worked as they should until someone looked behind them.

As the client, you don’t need to read the code to catch errors like these. You need to know which questions to ask and to ask for evidence. Ask who can read which data. Ask for a test where someone who isn’t logged in tries to reach the database. Insist on a separate test environment before anything reaches real visitors.

A bug that looks right is only found by someone who knows what should be there.

AI builds what you can describe

Google’s 2025 DORA report is based on responses from nearly 5,000 people who work in software. Nine in ten use AI at work. The report’s main conclusion is that AI amplifies what is already there. Teams with clear goals, small releases and automated tests get better. Teams without them get more errors, just faster.

Andrej Karpathy coined the term vibe coding in February 2025. He described it as accepting everything AI suggests without reading the changes. A year later he proposed a new name for how professionals work: agentic engineering. The agents write the code and the human provides the oversight.

That’s how I worked on HjulMatch. The hardest decision was the data model. Each dealer described their vehicles in their own way, with different fields and levels of detail. AI could write the code that fetched and sorted the listings. Which features buyers could filter on was my call. I knew what a motorhome buyer looks for: bed layout, chassis, fridge and heating system.

I also split the work between two AI assistants. One handled the database and data collection, the other the interface and design. That kept the decisions apart and made each part easier to review. HjulMatch ran on Supabase, the same database service as the Lovable apps. Access rules in the database are exactly the kind of requirement AI doesn’t raise on its own.

I owned the product decisions, documentation and quality control all the way. Every new feature started with a description of what it should do and for whom. I tested the result myself before the next step. That sounds slow. In practice it’s why five days were enough, because AI rarely had to guess.

AI fills in whatever you haven’t decided. Sometimes it guesses right.

What’s missing is rarely the tool

Swedish data points the same way. According to Statistics Sweden (SCB), 35% of Swedish companies with at least ten employees used AI in 2025, up from 25% the year before. The most common use was marketing and sales. Among Swedish internet users, 39% had used AI tools in early 2025, according to the Swedish Internet Foundation.

Among companies considering AI that hadn’t started yet, 74.7% cited a lack of relevant expertise as the obstacle. No other obstacle was as common. The tools exist and cost little. What’s missing is someone who can direct them.

Developers draw the same line. In Stack Overflow’s 2026 survey, 74% found AI useful for writing code. Only 20% used AI to deploy and run systems in production. Just under half, 48%, trusted AI answers when they could easily check them. People keep what is hard to undo for themselves.

For a marketing director or CEO, this means the question has moved. A web project used to be about finding developers and budget. Now it’s about finding someone who can say what should be built, why, and how you’ll know it came out right. That’s the client’s competence, and AI has made it more important.

The same pattern shows up in strategy work. The plan is rarely the problem. Projects stall when nobody owns the goal and follows up on the result. AI makes that difference faster and more visible.

The tools are cheap. The expensive part is not knowing what to ask for.

Five questions before you let AI build your website

You don’t need to code to lead an AI build. You need to be able to answer these questions before the first line of code is written.

  1. What should the website achieve, and how will you measure it? Without a goal, neither you nor the AI knows when the site is done.
  2. Who reviews what you can’t judge yourself? Security and access rights need someone who can read the code or test it.
  3. Which requirements for security, accessibility and findability belong in the specification from the start? Requirements added afterwards are often expensive and hard to build in.
  4. Are development and production kept apart? I built the new attefall.se on a separate test site. Only when everything worked did I move it to the real address.
  5. Who will maintain the site in a year? AI happily writes its own solutions that nobody else recognises, so documentation is part of the order.

If you can answer all five, you have a development team that works around the clock. If you can’t, AI will build anyway, with your gaps built in.

The questions apply whether you build in WordPress, in an AI website builder like Lovable or with an agent like Claude Code. The tools will be replaced several times during the site’s lifetime. The responsibility stays with you.

I cover how to write the specification in the next part of the series.

Frequently asked questions

Can AI build a whole website?

Yes, for simpler sites and prototypes. AI website builders create hundreds of thousands of new projects a day. Security, access rights and maintenance still only come out right if you have set requirements for them.

Do I need to know how to code to build a website with AI?

No. You still need to describe what you want and judge the result. Anything you can’t judge yourself needs someone else to review it, above all security.

Is a website built with AI secure?

Not automatically. In Veracode’s test, 45% of the AI-written code had known security flaws. Set security requirements from the start and have someone test them before the site goes live.

Is an AI-built website good for SEO?

It depends on the technical choices. Search engines need to read the text directly in the page’s code. The site also needs its own domain, a sitemap and proper metadata, because the tools’ default settings are often generic.

Who is responsible if something goes wrong?

You, as the client. AI tools don’t always follow instructions, and a platform’s default settings don’t replace your requirements.

Back to top

Calendar

Book 30 minutes

Pick a day and a time. We meet on Teams and you get a calendar invite with the link by email.