Agents
The five REI Harness roles, their responsibility, their limit and when they step in.
Five roles · explicit contracts
Five roles, five limits
REI separates coordinating, planning, implementing, reviewing and customizing. Each role has its own contract with a responsibility, a limit and a moment of intervention; none steps into another's work.
Leader
On every request and while coordinating the workflow.
Understands the request, picks the workflow and coordinates the other roles.
Does not implement, except in the authorized direct mode.
Spec Author
When the Work Item is in pending and it is time to plan it.
Turns a pending Work Item into a technical plan that can be reviewed.
Never implements.
A human sign-off releases the sheet. Silence is not approval.
Implementer
When the Work Item is in in_progress with an approved plan.
Implements only the approved plan and leaves verification evidence.
Does not change the scope or the plan.
Reviewer
When the Work Item is in review.
Validates the work against the plan and the project checkpoints.
Does not implement: approves or requests changes.
Initializer
Guides the customization of the project documentation after rei init.
After rei init, while customization placeholders remain.
Does not implement code or write outside the customization documents.
Prepares the repository; does not approve or implement Work Items.
The CLIs with a native adapter, OpenCode and Claude Code, recognize /personalize as a project command: it starts the Initializer interview, which guides the customization of the documentation. The Initializer does not implement code or approve Work Items. The capture shows Claude Code as an example, and the command runs in the agent's runtime, not on this site.
The four roles in the cycle
Leader, Spec Author, Implementer and Reviewer take the Work Item from start to finish. The Initializer stays outside the cycle: it guides the customization of the project documentation after rei init, when placeholders remain.
Contracts and adapters
The canonical contract lives in .rei/agents/. If the runtime has a native adapter, rei init opencode or rei init claude generate one subagent per role from the ## Contrato section. Cursor and Codex work through a fallback: the Leader passes only that contract, with no extra configuration.
Generated files carry the GENERATED marker and installation is idempotent: if they are already up to date they are not modified, and a file they did not generate is never overwritten. rei init opencode --check or rei init claude --check detect drift without writing anything.
What does not change with the runtime
- The contract is the source; the adapter is an optional layer.
- Invoking a subagent directly does not remove the workflow: the Work Item still needs a plan and approval.
- The Leader passes the subagent only the role contract, never the whole file.
- Adapter installation is idempotent and does not overwrite files that are not its own.
