What Is the .last-branch File? Ralph Branch Tracking Explained
The .last-branch file stores the active Git branch name extracted from your PRD, enabling Ralph to detect when you switch features and automatically archive previous work before starting fresh.
Ralph is an autonomous AI-agent loop that manages feature development through PRD (product-requirement-document) driven workflows. According to the snarktank/ralph source code, the .last-branch file serves as the lightweight state mechanism that tracks which feature branch is currently active, allowing the tool to safely manage multiple features in the same working directory without mixing state.
How
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →