# roles-config.json

Operator role definitions for the fvCMS DAO (per constitution §6).

This file is the single source of truth for which operators can vote on what
in the package governance. It lives in `app-pact/` because that's where the
fvCMS governance documents live (`app-pact.md`, `anti-drift.md`, `invariants.md`,
`dna/`, `rules/`, `shadow/`).

## Schema

```ts
type RolesConfig = {
  version: string;             // semver, bump on role add/remove
  schema_note: string;         // human-readable description
  roles: Array<{
    id: string;                // unique id (assistant, coder, ...)
    display_name: string;
    description: string;
    vote_weight: number;       // 1.0 for active, 0.5 for observer
    scope: string[];           // which proposal types this role can vote on
    can_propose_breaking_change: boolean;
    can_vote_on_deprecation: boolean;
  }>;
  observer: {
    vote_weight: number;       // always 0.5 per constitution §6
    description: string;
  };
};
```

## The 5 roles

| Role | Vote weight | Can propose breaking | Can vote on deprecation |
|------|-------------|----------------------|--------------------------|
| assistant | 1.0 | ❌ | ❌ |
| coder | 1.0 | ✅ | ❌ |
| editor | 1.0 | ❌ | ✅ |
| reviewer | 1.0 | ✅ | ✅ |
| tester | 1.0 | ❌ | ❌ |
| observer | 0.5 | ❌ | ❌ |

## Versioning

- **Patch** (1.0.0 → 1.0.1): typo fix, description clarification, no role changes
- **Minor** (1.0.0 → 1.1.0): new role added, existing roles unchanged
- **Major** (1.0.0 → 2.0.0): role removed, scope reduced, or breaking flag changes

Major bumps require a DAO vote (2/3 majority + 1 week notice) per the constitution.

## How it's used

DAO proposals reference roles by `id`. A proposal is "passed" when the
weighted vote count (sum of vote_weight per role × number of voters per role)
meets the threshold in the proposal type. See constitution §6 for the
proposal types and thresholds.

## Test

```bash
node app-pact/tests/test-roles-config.js
```

42/42 tests pass. The test suite is the canonical source for what the file
MUST contain.
