Toby Aurelius
04/20/2026, 11:05 AMmain and read policies from a given directory. e.g.
project_a/
├─ permit/
│ ├─ root.rego
├─ custom/
│ ├─ root.rego
project_b/
├─ permit/
│ ├─ root.rego
├─ custom/
│ ├─ root.regoAsk Inkeep
04/20/2026, 11:05 AMAsk Inkeep
04/20/2026, 11:05 AMpermit/generated/<env_id> where <env_id> is the unique identifier for each environment (2) . The repository structure for each environment branch looks like this:
repo/
├── main (initial branch)
└── permit/generated/{env-id}/ (environment branch)
├── root.rego
├── rbac.rego
├── abac.rego
├── permit/
│ └── root.rego
└── custom/
└── root.rego
(3)
The documentation indicates that *by default, each repository is mapped to a specific Permit project* (2) . However, the policy code can be nested in different folders within the repository (4) .
For your use case of having multiple projects in a single repository with different directories, the documentation doesn't explicitly describe this configuration. Your suggested approach of using *different main branches for each project* aligns with how the system works - you can specify a main_branch_name when configuring the repository (2) .
You can also customize the branch name by setting the custom_branch_name of your environment .
To explore whether directory-based separation is possible for your specific setup, I'd recommend reaching out over Email to discuss your multi-project, single-repository requirements in detail.
**Ask Inkeep
04/20/2026, 11:05 AMdavid
04/20/2026, 12:12 PMpermit/generated/<env_id>). The directory-based layout you sketched out — where a single main holds project_a/, project_b/, etc., and each project reads from its own folder — isn't something the integration supports today. There's no path/subdirectory selector in the project's GitOps config, so projects can't be scoped to a folder within a shared branch.
The branch-per-project approach you already identified is the right workaround and is fully supported. You'd configure each project with its own main_branch_name (e.g. project-a-main, project-b-main) all pointing at the same repo. That gets you most of what you're after.
@Thomas, can you shed any light?Thomas
04/20/2026, 1:16 PMToby Aurelius
04/20/2026, 1:24 PM