Review Notes Like Code With Pull Requests

Let AI write to your notes only through a pull request. Set up the repo, the folder rule, the marked block and branch protection, then review each diff.

By Updated 8 min read

The Short Version

  • Put the notes folder under git and push it to a private GitHub repo.
  • Turn on Require a pull request before merging, so nothing skips your review.
  • Give the AI one folder, and allow edits to your files only inside a marked block.
  • Give every AI note a source, link, dates and a relation field in its frontmatter.
  • Review each pull request in three passes: file list, edits to your files, then new notes.
On this page
  1. An AI That Edits in Place Can Rewrite Months of Notes in One Run
  2. Step 1 Puts the Notes Under Git
  3. Step 2 Protects the Main Branch
  4. Step 3 Gives the AI One Folder of Its Own
  5. Step 4 Makes Every AI Note Carry Its Source
  6. Pull Requests for a Knowledge Base Need a Rule for Each Kind of Change
  7. Step 5 Reviews the Pull Request in Three Passes
  8. Rubber-Stamp Merges Defeat the Whole Setup
  9. The Same Rule Fits Claude Code and Codex
  10. The Rule Has Two Costs
  11. Get a Pull Request of Notes You Chose
  12. Questions and Answers

An agent quotes a note back to you, and the claim is one you never wrote. Use pull requests for a knowledge base the way developers use them for code. A pull request lists every change an AI wants to make, line by line, before anything lands. You merge it or close it.

You let an AI tool tidy your notes a month ago, and nothing told you the note had changed. Closing a pull request leaves your notes as they were. Protect your main notes, give the AI one folder, and read each change before it lands.

The setup works for Claude Code, Codex, a scheduled job or any tool that can propose changes on GitHub.

An AI That Edits in Place Can Rewrite Months of Notes in One Run#

Your notes hold claims you checked. An AI tool that edits them in place can change those claims without asking.

The damage is quiet. You do not reread old notes every day. You find the change weeks later, when an agent quotes the edited note back to you as if you wrote it.

Builders who run agents over their vaults reach the same rule. Greg Isenberg's list of Obsidian and Claude Code habits includes this one: "human writes the vault. agents read it, suggest, execute." Another X account describes a vault loop where Claude never writes straight to the live vault and a review step checks every change first.

A pull request is that review step. Developers already use it for the same reason: code that runs your business deserves a second look before it merges.

Step 1 Puts the Notes Under Git#

Git records every version of every file. That alone makes an AI edit reversible.

  1. Install GitHub Desktop, a free app with buttons instead of commands.
  2. Add your notes folder as a repository and save a first version, called a commit.
  3. Publish it to GitHub as a private repo.

An Obsidian vault is a folder of Markdown files, so this works without any plugin. Obsidian keeps reading the same files. The guide to keeping a second brain in a GitHub repo covers the setup in more detail.

The Brainfeed notes list with accepted ideas labeled New to your notes or Builds on a note, each with its source newsletter and pull request
Example data in the Brainfeed app. Accepted ideas wait here with their labels until they go out in one pull request.

Step 2 Protects the Main Branch#

A pull request only protects you if nothing can skip it. GitHub's branch protection rules enforce that on the server.

  1. Open the repo on GitHub, then Settings, then Branches.
  2. Add a rule for the main branch, which holds your live notes.
  3. Turn on "Require a pull request before merging".

The rule holds even when an agent holds a token with write access. It can save to its own side copy, called a branch. It cannot change your main notes. Only you merge.

Step 3 Gives the AI One Folder of Its Own#

Split the repo into two zones. You own every file you wrote. The AI owns one folder.

ZoneWho writes thereHow you review it
Your notesYou, by handYou already trust them
The AI folder, such as one named brainfeed or aiThe AI, through pull requestsSkim the titles, open the ones that matter
A marked block at the end of your noteThe AI, through pull requestsRead every line

The folder rule keeps most AI output away from your writing. A new idea becomes a new file in the AI folder. It links to your note, and your note stays untouched.

Edits to Your Own Files Go Inside a Marked Block

Sometimes an idea belongs in a note you wrote. Then the AI may add to it, but only inside a block it marks.

  • A hidden start marker and end marker sit at the very end of your note.
  • Between them sits one line per idea, with its source and date.
  • Nothing above the start marker changes.

So a review of that file means reading the few lines between two markers.

Brainfeed follows exactly this rule. New notes go only under its own folder. A file you wrote changes only inside a marked block at its end, and the pull request lists every such change.

Step 4 Makes Every AI Note Carry Its Source#

A note you cannot trace is a note you cannot check. Give every AI-written note the same short label block at the top, called frontmatter. It holds six facts:

  • the newsletter it came from
  • the issue title
  • a link to the issue
  • the date the issue went out
  • the date you accepted the idea
  • the relation: new, builds on a note, or conflicts with one

Under the label block sit a title, the idea in one sentence, a line on why it matters, and a link to the related note. That link opens your note in Obsidian. The frontmatter guide explains each field.

Example. This is demo content, not a logged run. The input was one idea from an issue: test agents against a fake Slack. Your repo held a note called "agent-testing", so the card read "builds on agent-testing". You accepted it. The pull request then added one new note, "Test agents against a fake Slack", and left your note unchanged.

Pull Requests for a Knowledge Base Need a Rule for Each Kind of Change#

Decide your move from the file list before you read a single note. Five kinds of change cover almost every notes pull request, and three of them end the review on sight.

What the file list showsWhat it meansYour move
A new file in the AI folderA new idea noteSkim the title and source, then keep it
An edit inside the marked blockNew lines added to your noteRead every line
An edit above the marked blockThe AI changed your writingClose the pull request
A deleted or renamed fileThe AI removed or moved your noteClose the pull request
An edit to the rules fileThe AI changed its own rulesClose it and edit the file by hand

Call it the close-on-sight rule. The last three rows break the folder rule, so no single note in the pull request can make up for them. Close it, write the reason in the closing comment, and fix the agent's instructions before the next run.

The rule also keeps reviews short. Most weeks, the file list shows only new files and a few marked blocks. You know in 10 seconds which ones need a careful read.

Step 5 Reviews the Pull Request in Three Passes#

A notes pull request reads faster than a code review, because most of it is new files. Read it in three passes.

  1. Read the file list. Count the new files in the AI folder and the edited files outside it. Edited files deserve the most attention.
  2. Read every edit to a file you wrote. Check that the change sits inside the marked block. Check the source link on each line.
  3. Skim the new notes. Open any note whose title surprises you. Delete a file in the branch if you do not want it, or close the whole pull request.

GitHub's review screen has two features that fit notes well, per its guide to reviewing proposed changes.

  • Viewed. Tick it on each file you finish, and the file folds away. If the agent changes that file later, GitHub clears the tick. So a second pass shows only what changed since your first.
  • Suggestion. Fix one wrong word in a comment, instead of closing the whole pull request over it.

Keep pull requests small enough for one sitting. Brainfeed caps one pull request at 20 accepted notes, and it waits 30 seconds after your last accept so an undo still works.

Merging is the accept. Closing is the reject. Git keeps the history either way, so you can see later which day you kept each idea.

Example. This is demo content. Your note Agent testing ends with a marked block that held one line from October. The pull request adds a second line inside the block: "Test agents against a fake copy of the service. Source: AI Weekly 212, 20 Nov." The diff shows that one green line between the two markers. Every line above the start marker stays white, so the review takes one read.

Rubber-Stamp Merges Defeat the Whole Setup#

The common mistake comes after a few calm weeks. The titles look fine, so you merge without opening a single note. A pull request you never read gives you the same risk as an agent that edits in place. It only adds a button.

Fix it with a spot check that takes two minutes.

  1. Open three new notes at random in each pull request.
  2. Click the source link in each one.
  3. Find the claim in the source. If one claim is missing or one link fails, close the pull request.

Three notes out of 20 will not catch every fault. They do catch a run where the source step broke, because that fault hits every note in the batch. If the spot check fails twice in a month, cut the batch size in half.

Write a reason when you close one. "Already in my notes" and "wrong topic" are the two most useful. A no with no reason teaches the agent nothing, so it brings back the same idea next week. Ask the agent, in its rules file, to read your closing comments before each run. The guide to finding contradictions in your notes covers the conflicts worth keeping when you do merge.

The Same Rule Fits Claude Code and Codex#

You can apply the rule to any agent that runs in your notes repo.

  • Tell the agent in its rules file, CLAUDE.md or AGENTS.md, to work on a branch and open a pull request. The free AGENTS.md generator writes that rule for you.
  • Keep branch protection on, so the instruction is backed by a rule the agent cannot skip.
  • Give scheduled jobs access to this one repo only, limited to files and pull requests.

The instruction file shapes what the agent tries. Branch protection decides what it can do. Use both.

The Rule Has Two Costs#

Teams use the same setup on a shared repo. The team notes repo use case and the developer notes repo use case show the folder rule with more than one writer.

Pull requests need a git host. A local Obsidian vault with no remote cannot take one. Obsidian Sync alone does not give you a pull request either. Pushing the vault to a private GitHub repo fixes that, and it also gives you a full history of every note.

The second cost is review time. If you will not read a pull request each week, merged notes pile up unread, the same way saved links do. Write by hand instead, or keep the AI read-only.

Get a Pull Request of Notes You Chose#

Brainfeed reads newsletters, compares each idea with your notes, and shows you a card. Only the ideas you accept go into one pull request on your repo, inside its own folder.

Run the free scan of your repo at brainfeed.atharvashah.com/#try.

From there, Brainfeed turns those newsletters into a short weekly queue. You accept or reject each card, and accepted ideas arrive as one pull request you merge. The first pull request is free. Paid plans cost $9 for your first month, then $19, at brainfeed.atharvashah.com/#join.

Questions and Answers#

Why should AI write to my notes through a pull request?
A pull request shows every changed line before it lands, and closing it leaves your notes untouched. An AI tool that edits in place can change a year of notes in one run. You find out weeks later, when an agent quotes the changed note back to you.
Can I use pull requests with an Obsidian vault?
Yes, if the vault folder is a git repo pushed to GitHub. Obsidian reads plain Markdown files, so it does not care whether git manages them. A local vault with no remote cannot take a pull request until you push it to a host.
How do I stop an agent from pushing straight to main?
Turn on branch protection for the main branch in GitHub and require a pull request before merging. The rule runs on GitHub's side, so it holds even when an agent has write access. Give the agent its own branch and nothing else.
What should an AI-written note change look like?
New notes go into one folder the AI owns. Edits to your own files go inside a marked block at the end, between start and end comments. Every new note carries its source, its date and a link to the note it builds on, so you can check it.
How long does a notes pull request review take?
Keep each pull request small enough to read in one sitting. Brainfeed caps one pull request at 20 accepted notes. Read the list of changed files first, then open any edit to a file you wrote. New files in the AI folder need less care.
Can I review a notes pull request on my phone?
Yes. GitHub Mobile runs on Android and iOS, and it lets you read and review pull requests. A phone suits the skim of new notes in the AI folder. Leave edits to files you wrote for a laptop, where the wider view shows each changed line in full.

Keep the Best Ideas From Every Newsletter

Paste a GitHub repo of Markdown notes. The free scan shows which of 41 newsletters fit what you already know.

No account needed. Your first pull request is free.

ExampleFrom a newsletter issue

Small teams now ship with one agent per repo.

Builds on agents.md