LatentCodeCustomize

Rules and memory

Tell LatentCode how your project works once, in files it reads at the start of every session, and let it remember what it learns.

AGENTS.md

An AGENTS.md file holds the instructions you'd give a new teammate: how to build and test, conventions, what not to touch. LatentCode adds it to every session in the project. Commit it so your whole team, and any other coding agent that reads AGENTS.md, gets the same guidance.

AGENTS.md
# Orders service

## Commands
- Install: `pnpm install`
- Test one file: `pnpm vitest run path/to/file.test.ts`
- Lint and typecheck before finishing: `pnpm lint && pnpm typecheck`

## Conventions
- Money is stored as integer cents. Never use floats for amounts.
- New endpoints need an OpenAPI entry in `openapi/orders.yaml`.
- Don't edit files under `src/generated/`; run `pnpm codegen` instead.

Generate one with /init

Run /init in a session. The agent reads your build files, CI config and any existing rule files (including other tools' rules), may ask you a few questions, and writes AGENTS.md at the repository root. If one already exists, it improves it instead. Add a focus if you like: /init focus on the test setup.

Coming from GitHub Copilot? /adopt copilot turns your Copilot instructions into an AGENTS.md.

Which files are read

FileApplies to
~/.config/latentcode/AGENTS.mdEvery project: your personal preferences. If it doesn't exist, ~/.claude/CLAUDE.md is used instead.
AGENTS.md in the projectThis project. Every AGENTS.md from your working directory up to the repository root is included, so a monorepo can have one at the root and more in packages.
CLAUDE.mdUsed instead of AGENTS.md in projects that only have CLAUDE.md.
files in instructionsAnything else you list in config (below).

When the agent reads a file deeper in the project, AGENTS.md files in that file's folders are picked up too, so package-specific rules arrive when they matter.

Turn off CLAUDE.md
Set LATENTCODE_DISABLE_CLAUDE_CODE_PROMPT=1 to ignore CLAUDE.md files, or LATENTCODE_DISABLE_CLAUDE_CODE=1 to also ignore .claude/skills.

More instruction files

Point instructions at other files, glob patterns or URLs:

latentcode.json
{
  "instructions": [
    "CONTRIBUTING.md",
    "docs/guidelines/*.md",
    "~/notes/coding-style.md",
    "https://example.com/engineering/standards.md"
  ]
}
  • Relative paths and globs are searched for from your working directory up to the repository root.
  • Lists from different config files are combined, not replaced.

Keep rule files short and specific. Everything in them is sent with every request.

Memory

LatentCode keeps a memory for each project. The agent saves things worth knowing next time, such as a decision you made, a command that works or a mistake to avoid, and relevant memories are brought into later sessions automatically.

CommandDoes
/remember <note>Save a note yourself, for example /remember staging deploys need the VPN. Prefix a type to file it: user:, feedback:, project: or reference:.
/memoryShow where the memory is stored, its index and your saved notes.
/memory pathShow only the location.
  • Memory lives on your machine, in ~/.local/share/latentcode/memory/, one folder per project. It's plain Markdown: edit or delete the files to change what's remembered.
  • Relevant memories are added automatically; older ones are double-checked.
  • To ignore memory for a task, say so in your message.
  • Agents can also have their own memory; see memory on the Agents page.
Don't save secrets as memories. Memory files are plain text.