
gitchain
This update replaces hardcoded references to 'master' with a new DEFAULT_BRANCH configuration constant, which now defaults to 'main'. The change brings consistency to repository initialization, the Git pre-receive hooks that block direct pushes, and the bridge that merges pull requests. It's a satisfying cleanup that paves the way for custom default branches.
The AI code reviewers have been completely refactored to use the new Anthropic Claude Agent SDK and a local MCP (Model Context Protocol) server, replacing the Vercel AI SDK implementation. Instead of interacting with the codebase via risky custom git grep and git ls-tree shell commands, agents now operate on a temporary clone of the proposal branch and leverage Claude's built-in Read, Grep, and Glob tools natively. This delegates file exploration entirely to standard SDK tools while domain-specific operations (like casting votes onchain) are exposed cleanly through the MCP server.
Review agents are no longer limited to just reading proposal diffs. We've equipped them with a suite of new exploration tools, including readFile, grepInRepo, listFiles, listBranches, and inspectBranch. This added context-gathering capability enables the AI to better understand the broader impact of a change, leading to more accurate and reliable code reviews.
The agent's main polling loop has been refactored to check for unvoted proposals directly via the chain, rather than relying on the agent to invoke an AI tool. Unvoted proposals are now gathered upfront and passed directly into the AI's prompt context. This completely eliminates an unnecessary LLM round-trip, speeding up the review process and reducing overall token usage.
The application relies on a pre-receive hook to block direct Git pushes to the master branch, ensuring all changes go through proper review channels. Previously, the system bypassed this restriction for authorized bridge merges by temporarily creating a file marker on the disk. This prone-to-failure file mechanism has been replaced with a cleaner GITCHAIN_BRIDGE_MERGE=1 environment variable passed during the git push invocation, resulting in faster and more reliable merges moving forward. 
This update introduces a pre-receive hook that strictly blocks direct pushes to the master branch. The bridging system now creates a temporary marker file to authorize approved merges, ensuring no one can bypass the AI code review pipeline. Now we can rest easy knowing all code has been properly reviewed before hitting production!

The local development setup script previously skipped repository initialization if the directory merely contained a HEAD file. This caused issues if a previous setup run failed midway, leaving behind an empty bare repository. By explicitly checking for the master branch ref instead, the script now ensures the initial commit actually exists before skipping initialization. This makes the local development environment significantly more resilient to setup interruptions.
When programmatically creating commits, passing the --author flag updates the commit author but leaves the committer identity to fall back on the system's global Git configuration. We updated the git commit functions to explicitly inject GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL into the process environment. This ensures that the generated commits accurately reflect the intended actor for both author and committer fields.
The project's README now includes comprehensive "Getting started" instructions for launching the full application stack locally using Docker Compose. This makes it trivial to spin up the Hardhat node, Git daemon, bridge, and AI review agents with a single command. Additionally, the previously committed gasReporterOutput.json log was removed from the repository and added to .gitignore. Running and testing the local zero-trust code review environment is now a much smoother experience for contributors. 🐳
We've entirely ripped out isomorphic-git in favor of native child_process git executions. This architectural shift leverages true bare repos and git-daemon to make local repository interactions significantly more robust and reliable. As part of this transition, we've fallen back to master as the default branch to match git init --bare defaults, and our diff features are now powered by the native shell. Overall, you should expect faster, snag-free merges and branch diffs across the board.

This commit lays the foundational architecture for GitChain, a platform designed for agent-to-agent code reviews governed by smart contracts. The scaffold introduces Solidity contracts for branch proposal management and reviewer registries, alongside a foundational TypeScript CLI and bridging logic. This initial setup establishes the core infrastructure needed for a decentralized workflow where AI agents can autonomously review, vote on, and execute merges across repositories. Developers can now begin iterating on these on-chain Git workflows and expanding the AI reviewer integrations.
