This document shows you how to open a pull request, read its reasoning, steer the agent, and merge. In refs, you review the decisions first and the code second.
Before you begin
- Have write access to the repository.
- Push a branch that is different from the base branch.
Open a pull request
An agent opens a pull request with the refs_open_pull tool. To open one yourself:
- Open the repository, and click Pull requests.
- Click New pull request.
- Select the base branch and the branch to merge.
- Read the commits and the diff.
- Enter a title and a description, and click Create pull request.
The tabs of a pull request
| Tab | What it shows |
|---|---|
| Reasoning | The decisions that still hold, then the commits. It opens first. |
| Conversation | The description, comments, review threads and the timeline. |
| Map | The code map of the head commit, with each changed file and declaration marked. |
| Files | The diff, in split or unified view, with syntax highlighting and word-level changes. |
Read the reasoning
The Reasoning tab lets you follow the work without the code.
- The first card lists the decisions that a person must judge. Click a decision to read its reasons and what a later change costs. One decision is open at a time.
- A decision row shows the short hash of its commit, and the number of assumptions that the agent made.
- refs removes a decision from the card when a later commit supersedes it.
- The second card lists the commits, oldest first. The mark of a commit is a hollow ring for an agent and a filled blue dot for a person. The number in the mark is the number of decisions in the commit.
- Click a commit to read the commit body and the files that it changed. Click its hash to open the commit.
- refs marks a commit that changed code without a reason with No reason given.
Steer a decision
When you do not agree with a decision, steer it.
- On the decision, click Steer. To question one assumption, click Challenge.
- Write what you want. Mention the agents that must answer.
- Post the comment.
refs starts a review thread on the decision and sends it to the mentioned agents. The agent answers in the thread. If it changes course, it pushes a commit with a new decision that supersedes the old one. refs then marks the thread as addressed by that commit. Only a person can resolve the thread.
Try a different path on a new branch
To try a different path and keep the current one, start a new branch from a commit:
- Open a commit and click Branch from here…. On a decision, click Try on a new branch.
- Write the instruction, and mention the agents that must do the work.
- Submit the form.
refs does these things:
- It creates a new branch at that commit. The name comes from the title.
- It opens a pull request for the branch into the same base.
- It sends the instruction to the mentioned agents, and gives them the new branch if you ask.
The commit on the first pull request lists each branch that starts from it, with its status. Decisions on the first branch after that commit do not apply to the new branch.
Use the code map
The Map tab shows the head commit as nested blocks. Changed files and declarations show their added and removed lines.
- The Changes list names each changed declaration. Click one to go to it.
- Press
]for the next change and[for the previous change. - Diff only hides the unchanged lines in each code card. All code shows them.
Comment on lines
- On Files or Map, select the lines. Drag, shift-click, or highlight the code.
- Write a comment. You can mention people and agents.
- Post the comment.
The thread shows next to its lines and in the conversation. When a later push changes those lines, refs marks the thread as outdated. People with write access resolve or reopen a thread. An agent can mark a thread as addressed by a commit, but only a person can resolve it.
Give a verdict
- At the top of the pull request, click Review.
- Optional: write a summary. Markdown works.
- Select Comment, Approve or Request changes.
- Click Submit review, or press
⌘ Enter(Ctrl Enteron Windows and Linux).
The verdict applies to the current revision. If someone pushes while you review, refs refuses the review. Review the new revision.
Merge a pull request
refs has no merge button. Merge with Git:
git checkout main
git merge --no-ff feature-branch
git push origin main
When a push brings the branch into the base, refs marks the pull request as merged. The method of the merge does not matter. A merged or closed pull request keeps its diff when its branch moves or is deleted.
A merge does not close a task. Closes #12 in a commit message does nothing.
What's next
- Decision records: the format that agents write.
- Run CI: check each pull request with a pipeline.