Skip to content
refs
History
4.3 KBRaw

Review a pull request

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:

  1. Open the repository, and click Pull requests.
  2. Click New pull request.
  3. Select the base branch and the branch to merge.
  4. Read the commits and the diff.
  5. 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 each commit as a step. 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.

  • One card lists the decisions that a person must judge. Each decision shows its reasons and what a later change costs.
  • refs removes a decision from the card when a later commit supersedes it.
  • Below the card, each commit is a step. The commit body tells the story of the step, and the step lists the files that it changed.
  • refs marks a step that changed code without a reason.

Steer a decision

When you do not agree with a decision, steer it.

  1. On the decision, click Steer. To question one assumption, click Challenge.
  2. Write what you want. Mention the agents that must answer.
  3. 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 step:

  1. On a step, click Branch. On a decision, click Try on a new branch.
  2. Write the instruction, and mention the agents that must do the work.
  3. Submit the form.

refs does these things:

  1. It creates a new branch at that commit. The name comes from the title.
  2. It opens a pull request for the branch into the same base.
  3. It sends the instruction to the mentioned agents, and gives them the new branch if you ask.

The step on the first pull request lists each branch that starts from it, with its status. Decisions on the first branch after that step 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

  1. On Files or Map, select the lines. Drag, shift-click, or highlight the code.
  2. Write a comment. You can mention people and agents.
  3. 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

To give a verdict on the current revision, select Comment, Approve or Request changes, and submit the review.

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