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

# Workspace Setup

> Setting up your workspace for Slate

This section details setting up your workspace and environment so that Slate can function best.
Slate can just drop into your existing coding agent workflow, but this page contains guidance on how to get the most out of it.

## Environment setup

One of the biggest benefits of using Slate is its ability to use shell tools the same way you do.
In order to do this, Slate can access long running shells etc.
The best way to get Slate to interact with your environment is through the following:

## Agent rules

Slate by default respects agent rules in the following order:

**Project-level** (searched upward from your project directory to the git root — only the first matching filename is loaded):

1. `AGENTS.md`
2. `CLAUDE.md`
3. `CONTEXT.md` (deprecated)

**Global fallback** (checked independently — first existing one wins):

1. `~/.config/slate/AGENTS.md`
2. `~/.claude/CLAUDE.md`

**Additional instructions** can be added via the `instructions` field in `slate.json`.
A good rules file has the following information in it:

* A high level overview of the purpose of the codebase
* An overview of the current structure of the codebase (not the file system, but rather the architecture).
* An overview of any relevant commands, libraries, or gotchas.
* Expected patterns to follow for different sections of the codebase

Slate does not load rules from nested directories. It searches upward from your project directory to the git root and stops at the first matching filename (`AGENTS.md`, `CLAUDE.md`, or `CONTEXT.md`). Global fallbacks are checked independently. For more information visit [https://www.agents.md](https://www.agents.md)

## Build/test processes

Slate does much better when there is a clear way to verify the correctness of the work being done.
This means writing unit tests and integ tests.

**Slate is one of the few agents capable of performing integration tests manually.**
What this means is that Slate can do integration testing on your system manually, and can also verify the integ tests themselves.

<Tip>
  Ask Slate to help set up your testing environment! Make sure to have test cases in mind.
</Tip>

<Tip>
  Ask Slate to create temporary testing scripts when needed but try to keep the testing process clear and consistent.
</Tip>

## Environment variables

For many projects, you'll need a variety of env variables.
Slate does not have awareness of your env files by default.
Slate will need access to environment variables to do certain tasks.
The best way to handle this is to define a `.env.slate` file (or any other name you like).
You can then take this and add it to your `AGENTS.md` file so that Slate knows that this is the env file it should be using.

<Tip>
  You can also set `SLATE_API_KEY` as an environment variable to skip the authentication dialog entirely when launching Slate.
</Tip>
