> ## 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.

# Team Workflows

> Set up Drevon for teams where members use different AI agents.

## The Problem

Your team uses different AI coding agents. Alice prefers Cursor, Bob uses Claude Code, and Charlie swears by Copilot. Each agent has its own config format, so you end up with fragmented, inconsistent instructions — or no shared instructions at all.

## The Solution

Drevon gives every team member the **same context** regardless of which agent they use. One config, every agent in sync.

## Setting Up for a Team

### 1. Initialize in Project Mode

```bash theme={null}
cd your-team-repo
npx drevon init --project --template team
```

The **team** preset configures agents with a collaborative posture:

```json theme={null}
{
  "identity": {
    "role": "team-lead",
    "description": "Collaborative development assistant for engineering teams",
    "posture": "Document decisions. Maintain consistency. Follow team standards. Suggest improvements through proper channels.",
    "capabilities": ["engineering", "architecture", "documentation", "mentoring"]
  }
}
```

### 2. Enable All Agents Your Team Uses

```bash theme={null}
drevon add-agent copilot
drevon add-agent claude
drevon add-agent cursor
drevon add-agent codex
```

Or enable them all at init:

```bash theme={null}
npx drevon init --project --template team --agents copilot,claude,cursor,codex -y
```

### 3. Add Team-Specific Instructions

Edit `drevon.config.json`:

```json theme={null}
{
  "instructions": [
    {
      "id": "code-style",
      "title": "Code Style",
      "content": "Follow the style guide in docs/CODE_STYLE.md. Use ESLint and Prettier configs without override. Variable names in camelCase, components in PascalCase.",
      "alwaysApply": true
    },
    {
      "id": "pr-workflow",
      "title": "PR Workflow",
      "content": "All changes go through PRs. Branch naming: feature/*, fix/*, chore/*. Require at least one review. Squash merge to main.",
      "alwaysApply": true
    },
    {
      "id": "testing-rules",
      "title": "Testing Standards",
      "content": "All new features require tests. Minimum 80% coverage for new code. Use vitest for unit tests, playwright for e2e.",
      "globs": ["**/*.test.ts", "**/*.spec.ts", "tests/**"],
      "alwaysApply": false
    }
  ]
}
```

### 4. Commit Everything

```bash theme={null}
git add drevon.config.json .drevon/ skills-lock.json
git add .github/copilot-instructions.md CLAUDE.md AGENTS.md .cursor/
git commit -m "chore: add Drevon AI workspace configuration"
```

<Tip>
  Commit **both** the config file and the generated agent files. This way, team members get instructions immediately without needing to run `drevon sync` first.
</Tip>

## Team Workflow

### When Updating Instructions

```bash theme={null}
# 1. Edit the config
vim drevon.config.json

# 2. Regenerate all agent files
drevon sync

# 3. Commit everything
git add -A && git commit -m "chore: update AI instructions"
```

### When a New Member Joins

The new team member gets everything automatically when they clone the repo — all agent configs are already generated and committed.

If they want to add their personal agent:

```bash theme={null}
drevon add-agent windsurf
# Don't commit this — it's personal
```

### Memory in Teams

The v2 project-mode topic files under `.drevon/memory/topics/` work well as shared team context.
Commit `topics/` — the `log/` segments are episodic and can get noisy:

| Path                     | Team Use                                                                   |
| ------------------------ | -------------------------------------------------------------------------- |
| `INDEX.md`               | Generated pointer file — commit it; it's small and keeps everyone oriented |
| `topics/architecture.md` | Shared project overview — update during onboarding                         |
| `topics/decisions/`      | ADR records, **one file per decision** — commit these for transparency     |
| `topics/patterns.md`     | Team code conventions — evolve collaboratively                             |
| `log/`                   | Consider `.gitignore`-ing these segments for noisy workspaces              |

<Tip>
  Because each decision is its own file under `topics/decisions/<date>-<slug>.md`, PR review and
  merges stay clean — teammates rarely touch the same file, so there are no merge conflicts on a
  single monolithic `decisions.md`.
</Tip>

<Warning>
  Memory is designed for single-agent use. In team settings, be intentional about what you commit:
  the `topics/` tree works well as shared docs, while the episodic `log/` segments can get noisy.
</Warning>

## Recommended .gitignore

```gitignore theme={null}
# Drevon — commit these
# drevon.config.json
# .drevon/memory/INDEX.md
# .drevon/memory/topics/
# skills-lock.json

# Drevon — personal / noisy
.drevon/memory/log/
```
