explaingit

tshore2004/branchcontext

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A tool that gives AI coding assistants persistent memory tied to a Git branch, storing what happened, why, and what's left to do directly inside the repository.

Mindmap

mindmap
  root((repo))
    What it does
      Branch scoped AI memory
      Logs decisions and risks
      No external database
    Tech stack
      TypeScript
      Node.js
      MCP protocol
    Use cases
      Hand off context between AI sessions
      Track decisions per branch
      Resume work with full history
    Audience
      Developers
      AI coding tool users
    Setup
      npm install and build
      Register with Claude Code
      Early v0.1 scaffold

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Let an AI coding assistant pick up context from a previous session on the same Git branch.

USE CASE 2

Keep a record of decisions, risks, and remaining to-dos tied to each branch, stored inside the repo.

USE CASE 3

Hand off work between different AI tools, such as from Claude Code to Cursor, on the same branch.

USE CASE 4

Read back a branch's handoff history from the command line to review what an AI session did.

What is it built with?

TypeScriptNode.jsMCP

How does it compare?

tshore2004/branchcontext0xkinno/astraea0xkinno/halcyon
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardhard
Complexity2/54/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Early v0.1 scaffold, only reading and logging a handoff work end to end so far, other features are still planned.

The README does not state a license, so usage terms are unclear.

In plain English

Branchcontext is a tool that gives AI coding assistants a memory that is tied to a specific Git branch rather than to a single chat session. Every time an AI coding session works on a branch, it can log what it did, why it made those choices, what risks it noticed, and what work is still left to do. The next time any compatible AI assistant, such as Claude Code or Cursor, starts working on that same branch, it can read back this history and pick up with proper context instead of starting from scratch. A key design choice is that there is no separate database or outside service involved. The history, called a ledger, lives directly inside the code repository itself, in a folder named .branchcontext. This means the memory travels with the code whenever it is committed, cloned, or shared, just like any other file in the project. The README is upfront that this is an early, version 0.1 scaffold. Right now only two actions work end to end: reading back a handoff, meaning the saved history for a branch, and logging a new handoff entry. These work over a communication method called MCP, which lets AI coding tools plug into external tools. Other planned features are described in separate planning documents included in the project but are not yet built. Setup involves installing the project's dependencies and building it with standard Node.js commands, then running a setup command that registers the tool with Claude Code by writing an entry into a configuration file. Each logged entry in the ledger is stored as a single line of JSON and includes details like the branch name, a base commit reference, a timestamp, which AI agent and model were used, a short summary, any decisions made, risks flagged, remaining to-dos, and which files were touched.

Copy-paste prompts

Prompt 1
Walk me through installing and building this branchcontext project with npm.
Prompt 2
Explain how the get_handoff and log_handoff actions work over MCP in this project.
Prompt 3
Show me the data model for a logged handoff entry and what each field means.
Prompt 4
Help me register branchcontext with Claude Code using the init command.
Prompt 5
Explain why this project stores its history inside the repo instead of using a separate database.

Frequently asked questions

What is branchcontext?

A tool that gives AI coding assistants persistent memory tied to a Git branch, storing what happened, why, and what's left to do directly inside the repository.

What language is branchcontext written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, MCP.

What license does branchcontext use?

The README does not state a license, so usage terms are unclear.

How hard is branchcontext to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is branchcontext for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.