Team policy

Rules a team commits to a repository, applied on every copy of Ensemble.

On this page

A team policy is a file your team commits to a repository. Every copy of Ensemble that syncs the repository reads it and applies its rules to that repository’s pull requests. Ten people no longer need ten matching sets of settings, and a change to the rules is a pull request your team reviews like any other.

#Needs a licence key

Team policy is the one Ensemble feature that needs a licence key. A copy of Ensemble applies policies while it holds a licence key or during its 30-day evaluation. Without either, it applies no policy, and Settings → Team policy says so. Rules your team relies on need the key on every person’s copy.

Team size does not matter: a team of three or fewer can ask for a free key. See the licence page.

#Add a policy

  1. Create .ensemble/policy.json on the repository’s default branch, for example:
    {
      "version": 1,
      "automation": {
        "auto_push": false,
        "dependencies": false
      },
      "ai": { "approve": false },
      "note": "Agreed by the platform team, March 2027."
    }
  2. Merge it. Ensemble reads it the next time it syncs the repository, within a few minutes.
  3. Open Settings → Team policy to check what each copy reads: the rules in plain English, or the problems in the file.

#The rules

A policy only switches things off. A rule you leave out keeps each person’s own setting, and true changes nothing.

  • automation.auto_review: false: Ensemble never starts a review of this repository’s pull requests by itself, including Run auto reviews now. A person can still press Review.
  • automation.auto_post: false: AI reviews are never posted automatically. Review and post still posts, because the press is the person’s choice.
  • automation.auto_fix: false: no automatic AI Fix.
  • automation.auto_push: false: nothing is pushed without a press of Push. This covers Push automatically, Push when done, dependency fixes and Implement story’s automatic push.
  • automation.auto_resolve: false: Ensemble never resolves review threads by itself.
  • automation.dependencies: false: no dependency automation at all. A merge it armed earlier is disarmed.
  • ai.approve: false: an AI review never approves. It posts a comment instead and says why.
  • dependencies.trusted_bots: a list of GitHub logins, such as "dependabot[bot]". Dependency automation acts only on these bots’ pull requests.
  • note: text shown in Settings, for the reason behind the rules.

A file with a mistake, such as a misspelt rule, is not applied at all, so a typo never quietly drops a rule. Settings → Team policy lists each problem. Rules for allowed AI providers and a spending limit per run are not available yet.

#When repositories have different rules

Rules never clash. Each repository’s file governs only that repository’s pull requests, and every pull request belongs to one repository. Two repositories in one workspace can have different rules, or one can have none.

  • Work that spans repositories obeys each one: a story check posts to each pull request under that pull request’s own rules.
  • Implement story pushes to several repositories at once, so one set of rules has to decide. When the repositories agree, theirs applies. When they differ, the strictest rule from each applies. Under When repositories’ rules differ in Settings → Team policy, your workspace can add one repository’s rules on top, for example a repository that holds your team’s rules. That choice can only add rules, never remove one.
  • There is no rule for a whole GitHub organisation yet. To apply the same rules everywhere, commit the same file to each repository.
  • After a change to the file, each copy of Ensemble picks it up at its next sync, usually within a few minutes.

#Where you see it

  • Settings → Team policy lists every repository in the workspace with a policy, its rules and the commit it was read at.
  • Under Settings → AI Review → Auto review and Settings → Dependencies, a line names the repositories whose policy switches some of those settings off.