Reference·Instruction filesIndex

Instruction files

Which files Nodecode reads into the prompt, where the model finds them, and when an edit takes effect.

.mdllms.txt

Files read

FileApplies toBlock
~/.nodecode/SYSTEM.mdEvery session, in place of the shipped base prompt, while the file is there and not blank.The system message
~/.nodecode/AGENTS.mdEvery session, in any folder.operator-rules
Every project file above the sessionSessions in that folder and below it.instructions

Both ride in the conversation's first user message, ahead of your prompt. Each is a <harness> block that starts From <path>:, operator-rules first. The system message holds the base prompt, the session's folder and the manual's topics.

system · 1,555 characters · the base prompt, then <harness key="folder">, <harness key="help">
<harness key="operator-rules">From /home/you/.nodecode/AGENTS.md: Answer in British English.Commit messages are in the imperative mood.</harness> <harness key="instructions">From /home/you/shop/AGENTS.md: # shop Run `pnpm test` before you say a change works.Prices are integer cents, never floats.</harness> add a coupon field to checkout
What the model received~/shop, the turn's first request

A profile has its own home, so it has its own AGENTS.md. A new profile starts with a copy of this home's, unless made with --blank. nodecode import writes another agent's rules into ~/.nodecode/AGENTS.md, one ## heading per file it read. A file that would take it past 64.0 KB is left out, and the import says so.

Chat bots also read ~/.nodecode/SOUL.md, for their voice. A terminal session does not. The channel cells under Cells say how.

The agent's own files

The agent reaches these files through three verbs. Each answers the file's path, like a symlink, so edit and write-file work on it and no copy of the text is kept anywhere else.

VerbFileWhat it is
(system-prompt)~/.nodecode/SYSTEM.mdThe base prompt. While the file is missing or blank, the shipped prompt stands.
(agents-md)~/.nodecode/AGENTS.mdThe operator-rules block.
(soul-md)~/.nodecode/SOUL.mdA chat bot's voice, unless a channel's soul_file names another file.

(edit (agents-md) old new) changes the rules from the next turn. (write-file (system-prompt) *system-prompt*) starts SYSTEM.md from the shipped prompt, ready to edit. Delete SYSTEM.md to go back to the shipped prompt: while it is there, a release's changes to the shipped prompt do not reach this home.

Project files

Nodecode looks in the session's folder for AGENTS.md, then CLAUDE.md, then .cursorrules, and takes the first one there. Then it climbs to the parent folder and looks again, up to / or 64 folders. Every file it finds is read, in one instructions block: the farthest first, the session's own folder last, so the nearest rules have the last word. Each file starts on its own From <path>: line.

LOOKED FOR, IN ORDERON UP TO /~/mono/AGENTS.mdHOLDS .GIT · READ FIRSTpackages/AGENTS.mdCLAUDE.md.cursorrulesapi/AGENTS.mdREAD LASTsrc/AGENTS.mdCLAUDE.md.cursorrulesroutes/AGENTS.mdCLAUDE.md.cursorrulesTHE SESSION
A session in ~/mono/packages/api/src/routes. The search looks in every folder on the way up and reads two files: ~/mono/AGENTS.md first, then packages/api/AGENTS.md, whose rules have the last word. .git does not stop it.
RuleDetail
One file a folderOnly the first name found in a folder is read.
Every folderEach parent folder's file is read too, up to / or 64 folders.
Git rootNot a stop. A file above the repository, such as ~/AGENTS.md, reaches every repository under it.
OrderThe farthest file first, the session's folder last.
Empty fileA blank or unreadable file is passed over. The files above it are still read. A blank AGENTS.md still counts as its folder's file, so that folder's CLAUDE.md and .cursorrules are not read.
A folder by that nameA folder named AGENTS.md, CLAUDE.md or .cursorrules is passed over. Only a file counts.
Session in the home~/.nodecode/AGENTS.md is read once, as operator-rules.

AGENTS.md and CLAUDE.md side by side, for both to apply

Only AGENTS.md is read. The model gets From /home/you/shop/AGENTS.md: and not a line of CLAUDE.md.

Instead: One file. Link the other to it: ln -s AGENTS.md CLAUDE.md.

Rules in packages/api/AGENTS.md, the session opened at the repository root

The search climbs from the session's folder. It never looks down. The model gets no instructions block.

Instead: Open the session in packages/api, or put the rules at the root.

The root's rules copied into a package's AGENTS.md

In packages/api both files are read, so the copied rules ride twice and count twice against the 64.0 KB.

Instead: Keep in the package's file only what the package does differently. The root's file already reaches it.

A forgotten AGENTS.md in a parent folder, such as ~/AGENTS.md

It is read by every session in every folder below it, repositories included.

Instead: Keep a parent folder's file to rules meant for everything under it, or remove it.

.cursor/rules/, GEMINI.md or .github/copilot-instructions.md

None of them is a name Nodecode looks for. The model gets no instructions block.

Instead: Keep the rules in AGENTS.md. Link the other tools' files to it.

Size limit

The limit is 64.0 KB for a session's project files together: 65,536 characters. The nearest file is served first.

CaseResult
Within the limitRead whole.
Over the limit on its ownRefused whole. Nothing is trimmed. No session reads it.
Over the limit beside the nearer filesLeft out whole. A file farther up that still fits is read.
Blank or unreadablePassed over.

The warning names the file, its size and the limit: ~/big/AGENTS.md is not read: 71.2 KB — trim to 64.0 KB A file left out beside nearer ones says what they take: ~/AGENTS.md is not read: 20.0 KB, and the instructions files nearer the session already take 50.0 KB of 64.0 KB

File over the limitWho is told
A project fileThe shells attached when a turn reads it, once per file while the organism runs. A shell that attaches later is not told.
~/.nodecode/AGENTS.mdEvery shell as it attaches, and the model in its notices block, until the file fits.
The shell in ~/big, one turn in

Pasting a reference into the file: an OpenAPI dump, a style guide

Past 64.0 KB the whole file is refused, the rules with it. The model gets no instructions block.

Instead: Keep the rules in the file, and name where the reference lives: The API reference is docs/openapi.yaml.

When edits apply

FileReadEdit takes effect
~/.nodecode/SYSTEM.md, ~/.nodecode/AGENTS.md, project fileAt the first request of each turn.At the next turn.

No restart is needed.

A conversation keeps the prompt of its first request. A later edit reaches the model at the next turn, as a <system-reminder> after your message. It lists the lines added (+) and removed (-), or the whole file when that is shorter. A deleted file reads (withdrawn). A file that appears mid-conversation arrives whole. After an eviction the prompt is built again from the current files. See Context.

now the admin form
<system-reminder>Your standing context changed. Each block below replaces the one of its key you were shown before; one marked changed="lines" lists only the lines added (+) and removed (-). <harness key="instructions" changed="lines">+ Never edit files under migrations/ without asking first.</harness></system-reminder>
What the model received~/shop, turn 2, after a line was added
and the receipt
<system-reminder>Your standing context changed. Each block below replaces the one of its key you were shown before; one marked changed="lines" lists only the lines added (+) and removed (-). <harness key="instructions">(withdrawn)</harness></system-reminder>
What the model received~/shop, turn 3, after the file was deleted

Restarting, or /new, to pick up an edit

The next turn already carries it. A new session starts without the conversation.

Instead: Send the next message.

Editing the file during a turn, for that turn

The file is read at the turn's first request. The edit lands at the next turn.

Instead: Steer the running turn with the change, or wait for the next one.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close