Configuration¶
Project configuration lives in roles.toml.
Example¶
[project]
roles_dir = ".agents/roles"
[targets.claude]
[targets.claude.model_map]
reasoning = "claude-opus-4-6"
coding = "claude-sonnet-4"
Project keys¶
roles_dir: role definitions directory in the source repository (used byfind_roles_dirduringadd)
Install scopes¶
- project scope is the default install target, always
.agents/roles - user scope uses
~/.agents/rolesand is selected with-gor--global - render operates on the installed scope;
addonly renders roles from the scope that was just installed - list and remove operate on one scope at a time: default project,
-gfor user
Local sources¶
- local installs use
role-forge add ./pathorrole-forge add /absolute/path - local sources are copied into the selected install scope; symlink installs are not supported
- if source and destination are the same file, the copy is skipped
Hygiene commands¶
doctorreports unmanaged files in the selected roles directory- unmanaged files are non-
.mdfiles or.mdfiles that fail role parsing cleanremoves unmanaged files and supports--dry-run,-y, and-g
Target keys¶
enabled: target toggle, defaulttruemodel_map: logical model tiers to target-specific identifierscapability_map: project-defined capability expansion for adapters that support it
Source repository discovery¶
When reading a source repository, role-forge resolves role files in this order:
roles.tomlwithproject.roles_dir.agents/roles/directory- fallback
roles/
Output layout¶
Each adapter defines its own output layout:
- Claude and Copilot default to
namespace(e.g.directors__bug-fix.md) - Other adapters default to
preserve(e.g.directors/bug-fix.md)
role-forge validates layout collisions before writing files.