RoPhons Opens soon
Menu
Opens soon
Guide

How to give AI coding tools persistent context for a Roblox game

AI coding tools forget everything between sessions. How to give them a lasting picture of a Roblox game with project guide files and saved notes, and what to put in each.

Short answer

AI coding tools start every session without memory of the last one. Give them persistent context in two layers. First, a short guide file at the root of the project, CLAUDE.md for Claude Code and AGENTS.md for many other tools, with the layout, conventions and rules; the tool reads it at the start of every session. Second, a place for longer-lived knowledge, such as a brief of what the game is, plans and notes, which the AI reads when a task needs it and adds to when it finishes. RoPhons provides both for each game.

Why the AI forgets

Each session with an AI coding tool starts from the same blank state: the model knows the language and Roblox's APIs, but not your game. Without help it rediscovers the folder layout, guesses conventions, and repeats decisions you already made, or reverses them. That costs tokens and produces code that does not fit.

Layer one: a project guide file

Most AI coding tools read a guide file from the project folder when a session starts. Claude Code reads CLAUDE.md; Cursor, Codex and many other tools read AGENTS.md. Whatever is in it becomes part of every request.

Put in it what every session needs:

  • where things live: server scripts, client scripts, shared modules, config;
  • conventions: naming, module patterns, how remotes are organised;
  • how to check work: how to run tests or what to look at in Studio;
  • what not to touch: generated files, vendored packages, anything owned by Studio.

Keep it short. It is sent with every request, so every line is paid for on every turn. A few dozen lines are usually enough. An example for a place synced to files:

# Lobby place

Scripts are synced with Roblox Studio. Studio is the source of truth.

- ServerScriptService/: server code. Services are ModuleScripts in Services/.
- ReplicatedStorage/Shared/: modules used by server and client.
- StarterPlayer/StarterPlayerScripts/: client controllers.
- Config lives in ReplicatedStorage/Shared/Config; change values there, not inline.
- Remotes are created in ServerScriptService/Remotes.server.luau only.
- Do not edit Packages/: it is vendored.

Layer two: knowledge that outlives a session

A guide file is the wrong place for what changes: what you are building this month, why a system works the way it does, what the last session found. Keep that as separate documents the AI reads when a task needs them:

KindWhat it holdsWhen the AI uses it
BriefWhat the game is, its core loop, its systemsAt the start of a session
PlanWhat is being built and in what orderWhen it picks up a task
NoteA decision, a finding, a gotchaWhen it searches for the topic, and when it leaves notes for the next session

You can keep these as Markdown files in the project, or in a tool built for it. The point is that they are written down where the next session will find them, and that the AI is told to read them first and to add to them at the end.

How RoPhons does it

  • Guides for every place. RoPhons writes an AGENTS.md and a CLAUDE.md into each synced place folder, describing the layout to any AI tool, whether or not it uses MCP.
  • A brief, plans and notes per game, in Markdown, with the history of every change. You write them in the app or the web dashboard.
  • Access through MCP. RoPhons's MCP server gives AI tools game_brief_get to read the brief, notes_search to find notes, and note_save to leave one. The brief is read before work starts, so every session begins from the same facts.
  • On every PC. Notes follow your account, so a session on another machine starts from the same context.

On the Free plan AI tools can read the memory and you can keep up to 20 notes; paid plans let AI tools write notes too, without a limit. See pricing.

Questions

Does persistent context cost tokens?

Yes. Whatever an AI reads is part of its context. That is why the guide file should be short and the longer material should be read only when needed, by searching notes rather than loading them all. A good guide usually saves more than it costs, because the AI explores less. See how to reduce AI token usage.

Should I use CLAUDE.md or AGENTS.md?

Use the one your tool reads, or both if you use several tools. They can hold the same text.

Does Claude Code have its own memory?

Claude Code reads CLAUDE.md files and can keep its own memory between sessions, depending on your settings. Project guides and notes in the project or in RoPhons work for every tool, and for every person on the team.

Read next