Project instructions

Create an AGENTS.md in your project root with the commands and conventions fx should follow:

# Project instructions

- Run `npm test` after changing application code.
- Reuse components from `src/components`.
- Regenerate API clients from the schema instead of editing them.

Instruction sources

fx reads AGENTS.md from the directory where you start it. For projects under your home directory, it also reads parent directories' AGENTS.md files up to, but excluding, your home directory.

Use ~/.fx/AGENTS.md for personal instructions across projects. Your prompts take priority over instructions in these files.

Instructions for a subdirectory

A nested AGENTS.md adds instructions for that part of the project:

project/
├── AGENTS.md
├── apps/
│   └── web/
│       ├── AGENTS.md
│       └── src/
└── packages/

When fx works on a file in apps/web/src/, it loads apps/web/AGENTS.md alongside the root instructions. If they conflict, the instructions closest to the file take precedence.

Missing instructions

Large instruction files can be truncated or omitted. See context limits to adjust their size limits.

Additional directories give fx access to files, but do not load those directories' AGENTS.md files or configuration.

Disable project instructions

To stop loading AGENTS.md files automatically, including your personal instructions, set context to false in the project's .fx.json:

{
  "context": false
}

You can also set it in ~/.fx/settings.json. See Configuration for how the files combine.