When I kick off a Cursor agent, it automatically creates a branch with a name like cursor/<something-relevant-but-often-quite-long>. But what I need is for it to follow our repo’s branch-naming convention and rules - as we rely on that for various reasons. For example we normally can derive the Vercel dev deployment URL of the branch from the branch name. But, as the Cursor agent doesn’t restrict the length of the branch names, it can result in a Vercel dev deployment that cannot be derived. For example:
Branch name: cursor/<something-relevant-but-often-quite-long>
Dev deployment URL: https://myproject-git-something-relevant-but-oft5136231235-myproject-app.vercel.app
I would like to be able to define, in some rules file, how the Cursor agent should name branches.
Would be great to be able to configure the agents to follow a specific pattern.
In our case, we always structure the branch name like `(company-prefix)-(ticket-number)/(name)`. This ensures that Linear as the project management tool can link the PRs to issues, which is a part of our ISO 27001 certification for auditing reasons of changes.
As a first step to comply, we created a bucket ticket such that each Cursor Agent would always follow `(company-prefix)-(fixed-ticket-number)/(name)`. I tried to create an agent rule to urge the agent to create branches this way, however, it seems that the agent is already started on a specific generated branch.
Our content management system requires that branches start with a specific convention in order to be merged into the relevant versions, so branches created by Cursor are effectively useless which prevents us from using cloud agents at all.