use caseKeep each package's history clean with per-package atomic commits
Monorepos present a unique challenge: a single git diff may span multiple packages, services, and shared libraries. git-agent reads your workspace structure, splits changes by package scope, and commits each independently — so every package's changelog and version history stays accurate.
The challenge
When you work across packages in a monorepo, a single git commit mixes changes from different packages into one commit. This breaks per-package changelogs, confuses version-bump tools like semantic-release, and makes it hard to cherry-pick fixes across release branches. Manually splitting with git add -p every time you commit is tedious and error-prone.
The solution
git-agent analyses the full working-tree diff and automatically groups changes by package scope — using your workspace tooling (pnpm workspaces, Nx, Turborepo, Cargo workspace, go.work) to determine boundaries. Give it the work intent; it discovers, stages, and commits each group independently with a conventional message scoped to its package, keeping your monorepo history clean and tooling-friendly.
Implementation steps
- Run `git-agent init` in your monorepo root. git-agent scans your workspace configuration and generates per-package scopes automatically.
- Finish the work across packages and pass its intent to `git-agent --intent`. Cross-package changes are okay — git-agent discovers the working tree and handles the splitting.
- Run `git-agent --intent "..."`. The tool analyses the full diff, plans atomic commit groups by package scope, then stages and commits each group independently.
- Review the result: each package has its own commit with a conventional message, ready for changelog generation, version bumping, and cherry-picking.
FAQ
Does git-agent support pnpm workspaces, Nx, and Turborepo?What happens when a change touches a shared library and its consumers?Can git-agent handle a monorepo with mixed languages (Go, TypeScript, Rust)?