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

# Config Schema

> Full field reference for .reikon/config.json.

# `.reikon/config.json` Reference

Project-level config, committed to git, shared automatically with your team. Lives at
`<repo-root>/.reikon/config.json`. Reikon reads it on every project open and merges it
over your personal (per-machine) defaults — if the file doesn't exist, your personal
defaults apply silently, and nothing breaks. When a project config is active, a subtle
badge appears in the app header.

Reikon never adds this file to `.gitignore` — commit it so your team shares the same
teams, aliases, and thresholds. (Your local AI cache and the analysis cache *are*
gitignored automatically; this file is not.)

You can edit it by hand, or through **Settings → Project** in the app, which writes the
same shape.

***

## Full shape

```ts theme={null}
interface ProjectConfig {
    teams: string[];
    teamColors: Record<string, string>;        // team name → hex color
    aliases: Record<string, string>;            // raw git identity → canonical display name
    assignments: Record<string, string>;        // canonical author name → team name
    fileTypeGroups: Record<string, string[]>;   // group name → file extensions
    teamLeads: Record<string, string>;          // team name → author name
    inactiveAuthors: string[];                  // author names excluded from bus factor / active stats
    hiddenExtensions?: string[];
    ignorePaths?: string[];                     // glob patterns excluded from analysis
    healthWeights?: HealthWeights;
    rules?: Rule[];                             // Goals — plain-language goals tracked deterministically (see Goals tab)
    layers?: LayerRule[];                       // Architecture — named layers + allowed imports (see Architecture tab)
    archAcknowledged?: { from: string; to: string }[]; // Architecture ratchet — crossings kept as tracked violations
    aiTool?: string;                            // per-repo AI-tool override (e.g. "claude-code"); falls back to your global pick
}

interface HealthWeights {
    bus?: number;      // bus factor signal weight, 0–2, default 1
    quality?: number;  // commit quality signal
    todos?: number;    // TODO density signal
    dupes?: number;    // duplicate code signal
    churn?: number;    // churn stability signal
    dep?: number;       // dependency health signal
}
```

If you're hand-editing the file, you can omit any field — missing fields fall back to
an empty object or array. The app itself always writes the full shape.

***

## Field by field

| Field              | Shape                                 | What it does                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `teams`            | `string[]`                            | The list of team **names** that exist. Membership isn't stored here — it's derived from `assignments`. A team with no entries in `assignments` still shows up with zero members.                                                                                                                                                                                                                                                           |
| `teamColors`       | `{ [teamName]: hexColor }`            | The color swatch shown in Team Members settings and the Activity → Teams view. Teams without an entry get an automatically assigned color.                                                                                                                                                                                                                                                                                                 |
| `aliases`          | `{ [rawGitIdentity]: canonicalName }` | Maps a raw git author string (name or email, exactly as it appears in `git log`) to the display name you want everyone resolved to. Matched case-insensitively. This is how you merge "John Smith" and `jsmith@personal.com` into one contributor.                                                                                                                                                                                         |
| `assignments`      | `{ [authorName]: teamName }`          | Key is the canonical name (after alias resolution), value is one of the names in `teams`. Authors with no entry show up under "Others".                                                                                                                                                                                                                                                                                                    |
| `fileTypeGroups`   | `{ [groupName]: extension[] }`        | Merges file extensions into a custom group for Code Quality stats — e.g. group `.tsx` and `.jsx` under one "React" bucket.                                                                                                                                                                                                                                                                                                                 |
| `teamLeads`        | `{ [teamName]: authorName }`          | Shown as a crown icon next to the lead's name in Team Members and Activity → Teams.                                                                                                                                                                                                                                                                                                                                                        |
| `inactiveAuthors`  | `string[]`                            | Canonical author names excluded from bus factor and "active contributor" counts — for departed contributors whose history you still want to keep around.                                                                                                                                                                                                                                                                                   |
| `hiddenExtensions` | `string[]`                            | Extensions hidden from Code Quality's line-count breakdown.                                                                                                                                                                                                                                                                                                                                                                                |
| `ignorePaths`      | `string[]`                            | Glob patterns matched against each file or directory's path, relative to the repo root. `*` matches within one path segment, `**` matches across segments, and matching a directory excludes its entire subtree. Edit it from Settings → Project → Config.                                                                                                                                                                                 |
| `healthWeights`    | `Partial<HealthWeights>`              | A per-signal multiplier, 0–2, default 1 if omitted. Only include the signals you want to override — `{"bus": 0}` zeroes out just the bus-factor signal; every other signal stays at its default weight.                                                                                                                                                                                                                                    |
| `layers`           | `LayerRule[]`                         | Architectural layers for the Architecture tab. Each `LayerRule` is `{ name, paths: string[], mayImport?: string[] }`: `paths` are globs assigning files to the layer; `mayImport` is the allow-list of other layer names it may import (omit = unconstrained, `[]` = foundational/no internal imports). Reikon flags every internal import that crosses a boundary. Author it from Settings/the Architecture tab's **Define layers** form. |
| `archAcknowledged` | `{ from, to }[]`                      | The Architecture **ratchet**: layer-boundary `from → to` crossings you've acknowledged as *tracked* violations (vs undecided "fresh" ones the tab prompts you to Allow or Keep). Written by the Architecture tab's per-crossing **Keep as violation** button; **Allow** instead adds the edge to the layer's `mayImport`. Committed so the team shares the same tracked debt.                                                              |
| `aiTool`           | `string`                              | Per-repo override for which coding-agent CLI Reikon drives (e.g. `"claude-code"`, `"codex"`, `"gemini"`, or `"none"`). A tool *preference* is shareable, so it's committed here; it falls back to your global pick when unset. Set it from Settings → Project → This repo. *(Code-send **consents** are **not** committed — they're stored locally per machine, never in this file. See below.)*                                           |

### Local settings (never committed)

A **consent** is deliberately *not* in `.reikon/config.json` — it lives per machine in `local-settings.json` (under your user-data dir, keyed by repo path), so a data-sharing permission never travels with the repo:

| Field                | Type      | Meaning                                                                                         |
| -------------------- | --------- | ----------------------------------------------------------------------------------------------- |
| `shareReviewHistory` | `boolean` | Lets an agent read this repo's review history over MCP (`get_annotation_history`). Default off. |

Set it from **Settings → Project → This repo**.

***

## Examples

A real, minimal config:

```json theme={null}
{
  "teams": ["Main"],
  "teamColors": {},
  "teamLeads": {},
  "inactiveAuthors": [],
  "assignments": { "Jane Doe": "Main" },
  "aliases": {},
  "fileTypeGroups": {},
  "hiddenExtensions": [],
  "healthWeights": { "bus": 0 }
}
```

A fuller example with multiple teams and alias merging:

```json theme={null}
{
  "teams": ["Backend", "Frontend"],
  "teamColors": { "Backend": "#38bdf8", "Frontend": "#a78bfa" },
  "teamLeads": { "Backend": "Alice Chen" },
  "inactiveAuthors": ["Former Contributor"],
  "assignments": {
    "Alice Chen": "Backend",
    "Bob Lee": "Backend",
    "Carol Diaz": "Frontend"
  },
  "aliases": {
    "jsmith@personal-email.com": "Bob Lee",
    "bob.lee.work": "Bob Lee"
  },
  "fileTypeGroups": { "React": [".tsx", ".jsx"] },
  "hiddenExtensions": [".lock"],
  "healthWeights": { "quality": 1.5, "bus": 0.8 }
}
```

***

## Things to know before hand-editing

* **There's no schema version or migration step.** Every field added so far has been
  additive and optional, so older config files keep working unchanged when you upgrade
  Reikon. There's no built-in safety net if a future version ever needs to rename or
  restructure a field, though — back up the file before a major version bump if you're
  cautious.
* **The CLI reads the same file.** Running `rei analyze` picks up everything in this
  file exactly as the desktop app does, plus one CLI-only addition — see the
  [CLI reference](./cli) for `cli.warnBelow`/`cli.failBelow`.
