Custom prompts
Rivets uses a handful of built-in prompts for its own features, such as naming tasks and writing pull request descriptions. You can replace any of them for your account, your organization, or a single repository. The prompts run on your workers with your own agents, like everything else.
The prompts
Settings › Prompts lists the prompts in two groups.
Agents: what agents are told before they start work.
| Prompt | Used for | Variables |
|---|---|---|
| Workspace instructions | Given to every coding agent when its workspace starts. | {{workspacePath}}, {{baseBranch}} |
| Code review | The guidelines the Review button hands the reviewing agent. | {{branch}}, {{baseBranch}} |
Writing: text Rivets writes for you.
| Prompt | Used for | Variables |
|---|---|---|
| Task naming | Turns a prompt into a task title and branch name. | |
| Commit messages | Writes the commit message when Rivets commits for you. | |
| Pull requests | Writes a pull request’s title and description. |
Variables are replaced with the task’s values when the prompt is used:
| Variable | Value |
|---|---|
{{workspacePath}} |
The workspace’s folder |
{{baseBranch}} |
The branch it merges into |
{{branch}} |
The workspace’s own branch |
{{repoName}} |
The repository’s name |
How layering works
Each prompt is resolved from the most specific level that sets it:
- Repository. Set by owners for one repository.
- Account. Set by you, for yourself.
- Organization. Set by owners for everyone in the organization.
- Rivets default.
A level that has not set a prompt inherits from the next one down. For example, if an owner writes a Pull requests prompt for the organization and you have not written one for your account, your pull requests use the organization’s. A repository prompt takes precedence over both.
Edit prompts in Settings
- Open Settings › Prompts.
- Under Edit for, choose My account, Organization, or Repository. Organization and repository levels require owner access. For Repository, pick the repository.
- Each prompt’s row shows Customized if this level sets it, or the level it currently inherits from, such as Rivets default or Organization. Choose a row to open its editor.
- The editor shows this level’s text, or the text it inherits, and says whose it is, for example Using the organization’s prompt. It also tells you when a narrower level takes precedence, so an edit here would not change what you see.
- Edit the text and choose Save. To add a variable, choose it under the text box. Prompts can be up to 20,000 characters.
If you leave an editor with unsaved changes, Rivets asks before discarding them.
Edit prompts for a repository
Owners can also edit a repository’s prompts from its settings. Open them from the project row in the sidebar: choose the gear that appears on hover, or right-click the row and choose Settings…. On iPhone, use the project’s … menu. The Prompts section lists the same prompts, edited at the repository level. Repository prompts take precedence over account and organization prompts.
The same dialog holds the repository’s merge method and workspace files. See Pull requests and merging and Workspace files.
Go back to the inherited prompt
To remove your override at a level, open the prompt and choose the reset button. It names what you go back to: Reset to default, Reset to organization’s, or Reset to your account’s. The prompt falls back to the next level down. Removing every override returns you to the Rivets default.
Tips
- Put project conventions in Workspace instructions at the repository level: test commands, code style, directories to avoid. Every agent run in that repository starts with them.
- Put team-wide writing rules in Pull requests and Commit messages at the organization level, for example a commit prefix. Rivets already follows the repository’s pull request template when it has one.
- Put review rules in Code review at the repository level, so every review in that repository applies them.
- Keep account prompts for personal preferences. They apply to you and nobody else.