Working with Branches
The config project uses branches to isolate changes — feature development, per-client customization, and AI agent editing sessions all happen on separate branches without affecting production.
Creating a branch
POST /repo/branches
{ "name": "feature/new-rule", "from": "main" }
This creates a new branch from the specified base and sets up a git worktree for it automatically.
Branch-aware execution
Every API endpoint accepts an optional ?branch= parameter. When you run a workflow on a branch, the worker loads the YAML and activity scripts from that branch's worktree — not from the main clone. This means you can test changes in isolation before merging.
Viewing changes
GET /repo/diff?branch=feature/new-rule
Returns both uncommitted and committed changes relative to main. The admin UI uses this to show a diff view.
Pushing
POST /repo/push?branch=feature/new-rule
Pushes the branch to the remote. From there, the standard PR/review workflow applies.
Typical workflow
- Create a branch from the admin UI or API.
- Edit activities — manually, or via the AI Agent.
- Run workflows against the branch to test.
- Review changes in the diff view.
- Push and create a PR when ready.
- Merge to main — the next
POST /repo/syncpicks up the changes.