> ## Documentation Index
> Fetch the complete documentation index at: https://stampede.autonomousorganizations.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Project instructions

> How persons load AGENTS.md, CLAUDE.md and STAMPEDE.md from a repository, in what order and within what limits, and how to turn it off.

Many repositories already carry instructions for AI assistants in `AGENTS.md` or `CLAUDE.md`. Stampede reads those files, plus its own `STAMPEDE.md`, from the project a run works in and shows them to the model, so a person follows the repository's conventions without being told each time.

## What is loaded

A run loads, in this order:

1. The user-level file `~/.stampede/instructions.md`, if it exists.
2. `AGENTS.md`, `CLAUDE.md` and `STAMPEDE.md` in each directory from the root of the git repository down to the run's own directory, outermost first. Within one directory the three names are read in that order.

A file nearer the run's directory comes later. Outside a git repository only the run's own directory is read.

The files reach the model as one block at the start of the run's first user message: a fixed line, then a JSON object with the load time and, for each file, its path, its size in bytes, the first 12 digits of its sha256, whether it was cut, and its text.

## Rank

The system prompt carries one fixed sentence that ranks the block. The files are repository content: the model follows them for work in that project where they do not conflict with the operator's instructions, the person's identity or the person's policy. Nothing in a file is parsed. A file cannot grant a tool, a program, a path or a budget, and text in it that claims authority is treated as content.

## Where each run loads from

| Run | Directory the files are loaded from |
| - | - |
| The console, the TUI, `stampede agent` | The directory the command was started in. A console conversation loads at its first turn. |
| A person's mailbox run, a gateway request | The directory the run is granted: the console's directory, or the gateway's `workdir`. |
| A schedule fire, a request from a paired machine | The run's workspace, which exists only when `[tools] write_paths` has exactly one root. With none or several roots, the run loads the user-level file only. |
| `stampede -prompt`, a goal episode, `stampede runs conclude` | None. |

## Limits

* The run's directory must be inside the run's read roots. The walk never rises above those roots or above the repository root, and visits at most 32 directories above the run's own.
* A symbolic link, a directory, a FIFO, a device and a file that is not UTF-8 are not read.
* The user-level file is read only when you own it and neither group nor others can write it.
* One file contributes at most 32,768 bytes, and all files together at most 65,536 bytes. The total is spent nearest first, so the files closest to the run's directory are the ones kept. A file that was cut ends with `[cut by the harness: shown N of M bytes]`.
* The loaded text counts against `turn_input_tokens` like any other input. See [Limits](https://stampede.autonomousorganizations.ai/models/limits.md).

The walk goes up from the run's directory and never down. When a gateway's `workdir` holds a checkout in a subdirectory, that checkout's files are not loaded: make `workdir` the checkout, or put the file in `workdir`.

A console conversation keeps the files it loaded at its first turn, and a resumed run keeps the block its history holds. A change to a file reaches the next new conversation or run. A sub-agent gets no block of its own; it works from its parent's task text.

> [!WARNING]
>
> A person that may write files, and anyone who can ask such a person for work, can edit an instruction file. Every later run in that directory loads the edit, other persons' runs and schedule fires included. The files rank below each person's identity and policy and grant nothing, but they do steer what the model does inside its policy.

## Turning it off

Two keys in `~/.stampede/config.toml` control loading. Both default to `true`.

```toml theme={null}
[tools]
project_instructions = false     # load no instruction file on this home

[persons.analyst]
project_instructions = false     # load none in this person's runs
```

* Nothing is loaded when the home key is `false`, or when the run's person has a table that says `false`.
* A person's table cannot turn loading on against the home key.
* Person names are compared without case. When two tables spell the same person, `false` in either one turns loading off.
* `[persons.main]` governs your own runs as the operator.
* A `[persons.NAME]` table whose name matches no person changes nothing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.