Concepts
Instructions and memory
Give LoopCode standing instructions with LOOPCODE.md, AGENTS.md or CLAUDE.md, have it remember your preferences, and let it learn from earlier sessions.
LoopCode starts every conversation knowing three things about your work: the instruction files in your project and home folder, what you have asked it to remember, and what it has learned from earlier sessions.
Instruction files
Instruction files hold what an agent needs to know to work in a project: how to build, test and lint, how to run a single test, the architecture in brief, and the conventions that are not obvious from the code. LoopCode reads the files Claude Code and Codex read, so existing ones work unchanged.
| File | Scope |
|---|---|
~/.loopcode/LOOPCODE.md or ~/.claude/CLAUDE.md | Yours, in every project |
LOOPCODE.md, AGENTS.md or CLAUDE.md | The project — in the repository root and each folder down to where you work. Commit it |
LOOPCODE.local.md or CLAUDE.local.md | Yours, for this project only. Keep it out of git |
src/billing/AGENTS.md … | A folder's own, read when the agent first works in that folder |
In each folder, the first of these that exists is used, so a team keeps one source of truth.
Generate one
/init/init analyses the codebase and writes a concise LOOPCODE.md with the commands, architecture and conventions. If a LOOPCODE.md, AGENTS.md or CLAUDE.md already exists, it improves it rather than replacing it, and folds in rules from .cursorrules, .cursor/rules or .github/copilot-instructions.md.
Import other files
A line that is only @path/to/file.md pulls that file in, up to four levels deep:
# Project notes
@docs/architecture.md
@docs/testing.mdA project file may import only from inside the repository, and your own files only from inside your home folder — never a private file, so a cloned repository cannot import your credentials.
What to write
- The commands, exactly:
pnpm test -- --run src/orders, not "run the tests". - Rules the code does not show: "money is stored in paise as integers", "never edit generated files in
src/gen". - Where things live, briefly.
Keep it short. Everything in it is read on every turn.
Memory
Memory is what you ask LoopCode to remember. It lives in two plain Markdown files you can read and edit:
| File | Scope |
|---|---|
~/.loopcode/memory.md | You, in every project |
.loopcode/memory.md | This project |
Add to memory three ways:
- Start a message with
#in the terminal:# use pnpm, not npm. - Tell LoopCode a lasting preference or correct it — "always run the linter before committing" — and it saves it itself.
/memoryshows what is remembered and lets you edit it. In the desktop app, use Settings → Memory.
Memory is followed as instructions.
Learned memory
As you work, LoopCode notes what it works out for itself — how a project is built and tested, the gotcha that cost an hour, a correction you made — as small notes, distilled from finished conversations. Later conversations start with the notes that are relevant. Notes are merged and pruned as they pile up.
Learned notes are background, not instructions, and you are in control of them: /memory (or Settings → Memory) lists them to read, edit or delete. They are kept on your computer, outside the repository, in ~/.loopcode/projects/<project>/learned and ~/.loopcode/learned.
Learned skills
When LoopCode works out a reusable procedure, it can keep it as a learned skill. /skills lists them; share copies one into the project, so you can review it and commit it for your whole team's agents to use. See Skills and commands.