data/roles/
A role: a named job inside a squad, such as a charger or a watcher. A brain’s RequestRole task asks for one; the squad grants it within its style’s counts and the role’s max_per_group, while the member meets requirements. A held role scales the utility of matching activities and grants its tags. Loaded by the server only.
| Registry | manifold-ai:role |
| Files | data/roles/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | nothing |
| Contract | Population, data stage |
Entry
A record, written Role(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The role’s key, <mod-id>:<name>. | |
max_per_group | number or None | no | unlimited | How many members may hold it: a number over v.group_size, the squad’s member count ("math.max(1, math.floor(v.group_size * 0.34))"). |
bias | list of Bias | no | none | Utility multipliers for activities while the role is held. |
requirements | condition or None | no | always | A condition in the squad context over the member (This) that must hold to get and keep the role. |
grant_tags | list of string | no | none | Tags (manifold:tag keys) granted while it is held. An unknown key fails the data stage (DATA010). |
release_after_idle_secs | f32 | no | 10.0 | A requested role not asked for again within this many seconds is released. |
Example
No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/roles/guard.ron, which the data stage loads in its tests:
RoleDef(id: "dataref-fixture:role/guard")
Types
Bias
A role’s utility multiplier for one activity.
A record: Bias(..) or (..).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
activity | string | yes | The activity’s id in the member’s brain. | |
multiplier | f32 | yes | The multiplier, 0 to 16. |