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

# Context files with adr-bot

> Write architecture guidance tailored to your codebase into the file your coding agent reads at the start of every session.

`actual adr-bot` analyzes your repository, fetches the ADRs that apply to its languages and frameworks from Actual's ADR bank, tailors them to your codebase with an AI runner, and writes the result into the file your agent reads: `CLAUDE.md`, `AGENTS.md` or a Cursor rules file. Your agent then starts every session with that guidance in its context.

adr-bot is separate from the checks. It changes no rule file, nothing runs it on its own, and the [`actual` skill](https://docs.actual.ai/plugin/skills/actual) runs it only when you ask, for example "Run adr-bot to write our ADRs into CLAUDE.md". It needs no Actual AI account or API key of its own; tailoring uses your configured runner.

## Run it

From inside a git repository, preview first, then write:

```bash theme={null}
actual adr-bot --dry-run         # show what would change, write nothing
actual adr-bot --dry-run --full  # also print the whole rendered file
actual adr-bot                   # write CLAUDE.md
```

The first run analyzes the repository, fetches the matching ADRs, tailors them and writes the file. The content goes between managed markers, so later runs update that block and leave everything you wrote yourself alone. When adr-bot can't match ADRs to your repository's languages or frameworks yet, it says so.

## Output formats

| Format | Flag | File written |
| - | - | - |
| Claude Code (default) | `--output-format claude-md` | `CLAUDE.md` |
| Codex and other tools that read `AGENTS.md` | `--output-format agents-md` | `AGENTS.md` |
| Cursor | `--output-format cursor-rules` | `.cursor/rules/actual-policies.mdc` |

To make a format the default, set it in the config:

```bash theme={null}
actual config set output_format agents-md
```

## Flags

| Flag | What it does |
| - | - |
| `--dry-run` | Shows a summary of what would change without writing files |
| `--full` | With `--dry-run`, prints the full rendered file |
| `--output-format <FORMAT>` | `claude-md`, `agents-md` or `cursor-rules` |
| `--project <PATH>` | Targets one sub-project in a monorepo. Repeatable |
| `--runner <RUNNER>` | The AI backend for tailoring: `claude-cli`, `anthropic-api`, `openai-api`, `codex-cli` or `cursor-cli` |
| `--model <MODEL>` | Overrides the model used for tailoring |
| `--no-tailor` | Skips tailoring and uses the ADRs as they come from the bank |
| `--max-budget-usd <MAX_BUDGET_USD>` | Most to spend on each tailoring call, in US dollars |
| `--force` | Skips confirmation and bypasses every cache for a fresh analysis and tailoring |
| `--reset-rejections` | Forgets the ADRs you rejected before and shows them all again |
| `--no-tui` | Prints plain lines instead of the full-screen view, for CI or a small terminal |
| `--verbose` | Shows detailed progress |
| `--show-errors` | Streams the runner subprocess's error output as it arrives, which helps diagnose a hang |
| `--api-url <API_URL>` | Overrides the ADR bank's endpoint |

## Runners and models

Tailoring runs on one of five runners. Claude Code CLI is the default.

| Runner | What it needs |
| - | - |
| `claude-cli` | Claude Code installed and signed in (`claude auth login`) |
| `anthropic-api` | `ANTHROPIC_API_KEY` |
| `openai-api` | `OPENAI_API_KEY` |
| `codex-cli` | The `codex` binary on your `PATH` |
| `cursor-cli` | `cursor-agent` on your `PATH` (the CLI falls back to `agent`) |

`actual runners` lists the runners, and `actual models` lists the known model names for each one (`--no-fetch` skips the live lookup). Choose a runner for one run with `--runner`, or for every run with `actual config set runner anthropic-api`. [Configuration keys](https://docs.actual.ai/cli/configuration-keys.md) lists the runner and model settings.

## Check the file and clear the cache

`actual status` checks the state of the output file: its managed markers and whether the content is stale. `--verbose` adds the full cached analysis and ADR counts.

adr-bot caches its analysis and tailoring results between runs. `actual cache clear` removes them, and `--force` bypasses them for a single run.

```bash theme={null}
actual status --verbose
actual cache clear
```

[actual adr-bot](https://docs.actual.ai/cli/adr-bot.md), [actual status](https://docs.actual.ai/cli/status.md) and [actual cache](https://docs.actual.ai/cli/cache.md) list every flag.


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