Documentation
Browse documentation

Bring memory in and take it out

Import code-review decisions from GitHub

Bring in what your reviewers already decided, so your agent stops repeating mistakes they rejected.

Before you start

  • Sign in to GitHub. If you use the GitHub CLI, run gh auth login once and MemIndex uses that sign-in. Otherwise set the GITHUB_TOKEN environment variable to a token that can read the repository.
  • Know the repository's owner/name, such as yourteam/shop.

Import

npx memindex import reviews --repo yourteam/shop --dry-run   # see what would be written, with a sample note
npx memindex import reviews --repo yourteam/shop

Each settled review thread becomes one decision note: what the reviewer raised, how it was settled, the file and line, and a link to the pull request. A thread counts when it is attached to a file, a person took part, and it was either resolved or answered by a person. Open questions, and threads where only a bot spoke, are left out. Review text is marked as imported and untrusted, so an agent reads it as information, not as instructions.

When your agent opens a file that has a ruling, the ruling appears in that file's context, even if the file has changed since the review.

  • --limit N imports at most N rulings, newest pull requests first, and --since YYYY-MM-DD only pull requests updated since that day.
  • Notes are filed under a project. Run the command inside a checkout of the repository and they go under the name MemIndex gives that checkout, so they show up there. From anywhere else they go under owner/name; --project NAME chooses another.
  • Run it again whenever you like. Threads that have not changed are skipped, and a thread with new replies is updated in place.
  • On this machine, notes are stored as written, with no AI writer involved. On MemIndex hosting, each note counts against your plan's note allowance, and the dry run says so.
  • A run with no --limit that would write more than 200 notes asks before it starts. --yes answers for it.

The token is sent only to GitHub, and it is never printed, logged or saved in a note.

Next steps