---
title: Memory
description: Keep site structure, design decisions, and a short journal in vibe21.md.
order: 4
---

# vibe21-system-memory

Keeps a durable memory of the site so the agent does not rediscover the project on every turn.

Needs a valid `vibe21.json` and an `app/` folder. If those are missing, run [vibe21-web-new](/docs/vibe21-web-new) first.

## When to use it

- After a change that should constrain later work (a route, a design rule, a naming decision).
- When `vibe21.md` is missing or out of date with the repo.
- When you want the agent to rebuild or refresh memory instead of guessing.
- When you confirm a 1000-line optimization offer.

You do not have to invoke it by name on every edit. Other VIBE21 skills write to the same file as they work.

## How to run it

```
/vibe21-system-memory
```

The skill picks one mode from the repo and your request:

- **init** — `vibe21.md` is missing. The file is written from the current app.
- **refresh** — the file exists. Site, Design, and Structure are reconciled. The journal is not rewritten.
- **optimize** — only when you ask, or when you confirm the 1000-line offer. Old journal lines whose outcome already lives in the other sections are dropped.

Optimize is the only mode that removes history. The agent does not start it on its own.

## What happens

Memory stays in `vibe21.md` at the project root, in this order: Site, Design, Structure, Decisions, Journal.

- Structure describes routes and sections, not code.
- Decisions record only choices that constrain future work, with the reason.
- The journal is append-only except during optimize. Newest entry first.
- 1000 lines is a notification threshold. After refresh, the agent asks once whether to optimize. If you decline, it does not ask again in that conversation.

Config stays in `vibe21.json`. The agent follows that file when talking to you and when changing the site. Memory content stays English even when `agentLanguage` is not.
