Introduction
What is ContextBridge
Verified, portable, private project memory for AI coding sessions.
When an AI coding session ends (usage limit, new account, new chat), the next session has to guess what happened. ContextBridge writes a checkpoint of the real state of your repository into the repository itself, and checks that checkpoint against the repository before the next session is allowed to edit code.
What it does
- Checkpoints the git state: branch, HEAD, uncommitted files with hashes, and a workspace fingerprint.
- Records test runs you execute with
contextbridge run, instead of trusting a written claim that tests passed. - Gates the resume:
contextbridge resume --checkreturns READY, REVIEW_REQUIRED or BLOCKED and a matching exit code. - Tracks provenance: items are marked *observed* (measured by the tool) or *claimed* (written by a person or agent).
- Keeps a decision graph linking requirements, decisions, code and tests.
- Lists parallel sessions and warns when their claimed files overlap (advisory only).
- Scans for secrets before anything is written or exported.
What it does not do
- It does not copy chat history, account memory or usage allowance.
- A passing test run proves that a command succeeded, not that the software is correct.
- It makes no network calls, so a remote you have not fetched is invisible to it.
- The secret scanner is best-effort pattern matching, not a guarantee.
- It cannot force an AI assistant to obey the gate. The gate reports; the agent or you decide.
Ways to use it
| Form | What you get |
|---|---|
| CLI | pip install contextbridge-cli, then the contextbridge command. |
| Claude Code plugin | Slash commands /contextbridge:init, :checkpoint, :resume, :status. |
| Claude skill | A SKILL.md skill that guides Claude to write and resume context files. |
It is open source under the MIT license. Source: GitHub ↗.