---
title: "Website artifact workflow"
description: "Turn a conversation into a small static website. The AI interviews you, plans the pages, writes the HTML, CSS and JavaScript, and stores the result as an artifact you can preview."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.myspec.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Website artifact workflow

> **Pre-Release**
>
> This feature is still rolling out, so it may not be available in your
> organization yet. It can change before general release.

The **Website artifact** workflow builds a working static website instead of
spec files. The AI interviews you, proposes a site plan, writes the pages and
stores them as an [artifact](https://docs.myspec.dev/mcp/tools/#how-artifacts-work): a versioned set of
files you can preview in MySpec. In the picker it is **Website artifact (v1)**.

## At a glance

- **Best for:** A clickable prototype, a landing page or a small static site
- **Project type:** Any (Greenfield, Brownfield or Auto)
- **Stages:** Interview → Site plan → Build
- **Writes:** One artifact per session, with one `index.html`, other `.html`
  pages if you need them, and the `.css` and `.js` files the pages use. It
  writes no spec files.

If you do not see **Website artifact (v1)** in the picker, it is not available
in your workspace yet.

## Stages

### Interview

The AI asks about the site in short rounds of multiple-choice questions: its
purpose and audience, the pages and their content, the style, what should be
interactive, and any third-party libraries you want. Answer them as in any
Generate session. You can base the site on the project's spec files,
attachments or other artifacts: reference them in your message with `@`.

### Site plan

The AI shows a **site plan** card before it writes any code. The plan names the
artifact and lists every file with its purpose, and every library with its
address. Approve it, or ask for changes and say what to change.

### Build

The AI writes the files and stores them as a new revision of the artifact. The
first revision creates the artifact. While it writes, the chat shows a line for
each file, such as **Writing css/site.css · ~12.0 KB**, that turns into **Wrote
css/site.css** when the file is done, and the AI says in one sentence what each
file is for. See [Watch the AI write the files](https://docs.myspec.dev/guides/artifacts/#watch-the-ai-write-the-files). Each revision shows a card with the file
count, the total size, the outside hosts the pages load from, and a preview you
can expand.

Approve the revision to finish, or ask for changes. Each round of changes adds
one revision; earlier revisions stay in the artifact's history.

When you approve, the session ends with a card that links to the artifact. From
there you can open it in the viewer, or start an
[Edit website artifact](https://docs.myspec.dev/workflows/edit-website-artifact/) session to change it
later. The artifact also appears in the **ARTIFACTS** section of the sidebar and
on the project's **Artifacts** tab. See [Artifacts](https://docs.myspec.dev/guides/artifacts/).

## What a site can contain

- **File types:** `.html`, `.htm`, `.css`, `.js`, `.mjs`, `.json`, `.svg`,
  `.txt`, `.md`, `.xml` and `.webmanifest`. The AI does not create images or
  fonts; load them from a CDN or use inline SVG.
- **Size:** At most 50 files, 2 MiB per file and 10 MiB in all.
- **Relative paths:** Pages link to each other and to their files with relative
  paths, such as `css/site.css` or `about.html`. A path that starts with `/`
  breaks in the preview, so the AI does not use one. Link pages by file name,
  not by folder.
- **Third-party libraries:** Pages can load scripts, styles and fonts from any
  CDN over `https`. Libraries you did not plan show up on the revision card. An
  `http` address is blocked by the browser.

Before it stores a revision, the AI checks that every local file a page or
style sheet refers to is in the site, and fixes what is missing.

## What the preview cannot do

The preview runs the site in an isolated frame with no origin of its own. In it:

- `localStorage`, `sessionStorage`, cookies and IndexedDB do not work. A site
  that needs to keep data should keep it in memory for the visit.
- A script loaded as a module, or with `crossorigin`, from another host loads
  only when that host allows it.

## Example

A small site might have three files:

```text
index.html
css/site.css
js/app.js
```

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Coffee corner</title>
    <link rel="stylesheet" href="css/site.css" />
  </head>
  <body>
    <h1>Coffee corner</h1>
    <button id="menu-toggle">Show the menu</button>
    <ul id="menu" hidden>
      <li>Espresso</li>
      <li>Flat white</li>
    </ul>
    <script src="js/app.js"></script>
  </body>
</html>
```

```css
body {
  font-family: system-ui, sans-serif;
  margin: 2rem;
}
```

```js
document.getElementById('menu-toggle').addEventListener('click', () => {
  const menu = document.getElementById('menu');
  menu.hidden = !menu.hidden;
});
```

## Tips

- **Name the pages you want.** A short list of pages and what each one shows
  gives a better plan than a general description.
- **Keep it small.** A session writes a site in a limited number of steps. Ask
  for more pages in the next round instead of all at once.
- **Use `/goback`** to return to the interview or the site plan. The next
  revision still goes to the same artifact.

## When to pick another workflow

To write specs for a product before you build it, use
[MySpec](https://docs.myspec.dev/workflows/myspec/), or
[MySpec brownfield](https://docs.myspec.dev/workflows/myspec-brownfield/) for an existing codebase.

Source: https://docs.myspec.dev/workflows/website-artifact/index.mdx
