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

# Configuration

> The drevon.config.json file is the single source of truth for your workspace.

## Overview

All Drevon settings live in `drevon.config.json`. This is the only file you need to edit — run `drevon sync` to propagate changes to all agent configs.

## Full Config Example

```json drevon.config.json theme={null}
{
  "$schema": "https://drevon.dev/schema/v1.json",
  "version": 1,
  "mode": "hub",
  "name": "my-workspace",
  "identity": {
    "role": "founder-agent",
    "description": "High-autonomy AI assistant for a startup founder",
    "posture": "Take initiative. Don't ask for permission on obvious decisions. Move fast, ship things, document what you do.",
    "capabilities": ["product", "engineering", "design", "marketing"]
  },
  "instructions": [
    {
      "id": "memory-protocol",
      "title": "Memory Protocol",
      "content": "Read all files in .drevon/memory/ at the start of every session.",
      "alwaysApply": true
    },
    {
      "id": "typescript-rules",
      "title": "TypeScript Standards",
      "content": "Use strict TypeScript. Prefer interfaces over types. Use zod for runtime validation.",
      "globs": ["**/*.ts", "**/*.tsx"]
    }
  ],
  "agents": {
    "copilot": { "enabled": true },
    "claude": {
      "enabled": true,
      "allowedCommands": ["git", "npm", "npx", "node", "python3"],
      "extraInstructions": ["Always explain your reasoning before making changes."]
    },
    "cursor": { "enabled": true },
    "codex": { "enabled": false },
    "windsurf": { "enabled": false },
    "cline": { "enabled": false },
    "aider": { "enabled": false },
    "continue": { "enabled": false }
  },
  "memory": {
    "enabled": true,
    "directory": ".drevon/memory",
    "layout": "v2",
    "indexFile": ".drevon/memory/INDEX.md",
    "eagerBudgetTokens": 2000,
    "retentionMonths": 3,
    "files": {
      "index": ".drevon/memory/INDEX.md",
      "user": ".drevon/memory/topics/user.md",
      "projects": ".drevon/memory/topics/projects.md",
      "systems": ".drevon/memory/topics/systems.md"
    }
  },
  "skills": {
    "enabled": true,
    "directory": ".drevon/skills",
    "lockFile": "skills-lock.json"
  },
  "prompts": {
    "enabled": true,
    "directory": ".drevon/prompts"
  },
  "workspace": {
    "enabled": true,
    "directory": "workspace",
    "rules": [
      "One folder per project or task",
      "Never create files outside workspace/ unless explicitly told",
      "Register new projects in .drevon/memory/topics/projects.md"
    ]
  }
}
```

## Config Fields

### Top-Level

| Field     | Type                 | Required | Description                               |
| --------- | -------------------- | -------- | ----------------------------------------- |
| `$schema` | `string`             | No       | JSON Schema URL for editor autocompletion |
| `version` | `number`             | Yes      | Config schema version (currently `1`)     |
| `mode`    | `"hub" \| "project"` | Yes      | Workspace mode                            |
| `name`    | `string`             | Yes      | Workspace or project name                 |

### Identity

The `identity` object defines how agents present themselves and behave.

| Field          | Type       | Required | Description                                 |
| -------------- | ---------- | -------- | ------------------------------------------- |
| `role`         | `string`   | Yes      | Agent role label (e.g., `"founder-agent"`)  |
| `description`  | `string`   | Yes      | One-line description of the agent's purpose |
| `posture`      | `string`   | Yes      | Operating behavior instructions             |
| `capabilities` | `string[]` | No       | List of capability domains                  |

### Instructions

The `instructions` array contains custom rules injected into every agent config.

| Field         | Type       | Required | Description                                                          |
| ------------- | ---------- | -------- | -------------------------------------------------------------------- |
| `id`          | `string`   | Yes      | Unique identifier for the instruction                                |
| `title`       | `string`   | Yes      | Human-readable title                                                 |
| `content`     | `string`   | Yes      | The instruction text                                                 |
| `alwaysApply` | `boolean`  | No       | Apply to all files (default: `true`). Used by Cursor's `.mdc` format |
| `globs`       | `string[]` | No       | File glob patterns for conditional application (Cursor only)         |

<Info>
  The `globs` field is primarily used by the Cursor adapter, which generates separate `.mdc` rule files that activate only when matching files are open. Other agents receive all instructions regardless.
</Info>

### Agents

Each key in the `agents` object corresponds to a supported agent ID.

| Field               | Type       | Description                                    |
| ------------------- | ---------- | ---------------------------------------------- |
| `enabled`           | `boolean`  | Whether to generate config for this agent      |
| `extraInstructions` | `string[]` | Additional instructions specific to this agent |
| `allowedCommands`   | `string[]` | Commands the agent can run (Claude only)       |
| `config`            | `object`   | Agent-specific configuration (Aider only)      |

**Valid agent IDs:** `copilot`, `claude`, `cursor`, `codex`, `windsurf`, `cline`, `aider`, `continue`

### Memory

| Field               | Type       | Description                                                         |
| ------------------- | ---------- | ------------------------------------------------------------------- |
| `enabled`           | `boolean`  | Enable persistent memory system                                     |
| `directory`         | `string`   | Memory store directory                                              |
| `layout`            | `string`   | Store layout version (`"v2"` for the index + tiered store)          |
| `indexFile`         | `string`   | Path to the eagerly-loaded `INDEX.md`                               |
| `eagerBudgetTokens` | `number`   | Soft token cap on the index (default `2000`)                        |
| `retentionMonths`   | `number`   | Log months older than this are eligible for `compact` (default `3`) |
| `files`             | `object`   | Map of logical names to topic/index file paths                      |
| `customFiles`       | `string[]` | Additional custom memory files                                      |

### Skills

| Field       | Type      | Description               |
| ----------- | --------- | ------------------------- |
| `enabled`   | `boolean` | Enable skills integration |
| `directory` | `string`  | Skills directory          |
| `lockFile`  | `string`  | Lock file path            |

### Prompts

| Field       | Type      | Description           |
| ----------- | --------- | --------------------- |
| `enabled`   | `boolean` | Enable prompts system |
| `directory` | `string`  | Prompts directory     |

### Workspace (Hub Mode Only)

| Field       | Type       | Description                  |
| ----------- | ---------- | ---------------------------- |
| `enabled`   | `boolean`  | Enable workspace management  |
| `directory` | `string`   | Workspace directory name     |
| `rules`     | `string[]` | Workspace organization rules |

## Editing & Syncing

After editing `drevon.config.json`, always regenerate agent configs:

```bash theme={null}
drevon sync
```

<Warning>
  Never edit the generated agent config files directly (e.g., `CLAUDE.md`, `.github/copilot-instructions.md`). They will be overwritten on the next `drevon sync`. All changes should go through `drevon.config.json`.
</Warning>
