Polyrepo Configuration
Panopticon supports projects with multiple git repositories (like separate frontend/backend repos). Configure workspace settings directly inprojects.yaml to manage polyrepo workspaces.
Overview
Polyrepo workspaces create git worktrees in each repository, allowing agents to work across multiple codebases simultaneously while maintaining proper git isolation.Recommended: Separate Infra Repository
For polyrepo projects, we strongly recommend maintaining a dedicated infrastructure repository alongside your code repos:- Version-controlled templates - Dev script changes are tracked and shared
- Centralized configuration - DNS, ports, Traefik rules in one place
- Workspace consistency - All workspaces use the same templates
- Team collaboration - Infra changes go through normal PR review
- Easy updates - Fix a template once, regenerate affected workspaces
| File | Purpose |
|---|---|
dev.template | Template for ./dev script (container management) |
new-feature | Creates workspace with git worktrees + devcontainer |
remove-feature | Cleans up workspace and worktrees |
.devcontainer-template/ | Docker Compose and devcontainer templates |
Configuration in projects.yaml
Template Placeholders
| Placeholder | Example | Description |
|---|---|---|
{{FEATURE_NAME}} | min-123 | Normalized issue ID |
{{FEATURE_FOLDER}} | feature-min-123 | Workspace folder name |
{{BRANCH_NAME}} | feature/min-123 | Git branch name |
{{COMPOSE_PROJECT}} | myapp-feature-min-123 | Docker Compose project |
{{DOMAIN}} | myapp.test | DNS domain |
Service Templates
Panopticon provides built-in templates for common frameworks. Use these to avoid boilerplate:| Template | Start Command | Port |
|---|---|---|
react | npm start | 3000 |
react-vite | npm run dev | 5173 |
react-pnpm | pnpm start | 3000 |
nextjs | npm run dev | 3000 |
spring-boot-maven | ./mvnw spring-boot:run | 8080 |
spring-boot-gradle | ./gradlew bootRun | 8080 |
express | npm start | 3000 |
fastapi | uvicorn main:app --reload | 8000 |
django | python manage.py runserver | 8000 |
/pan-workspace-config skill for complete documentation.
What Your Project Needs to Provide
Panopticon is an orchestration layer - it manages workspaces, agents, and workflows, but your project repository provides the actual templates and configuration. Projects can be as simple as just a git repo (for worktree-only workspaces) or as complex as a full polyrepo with Docker, Traefik, and database seeding.Required: Workspace Templates
Your project needs a.devcontainer/ or template directory with:
⚠️ Important: File Permissions Always run containers as a non-root user (e.g.,user: vscode) to avoid permission issues. Files created by root-owned containers cannot be removed bypan workspace destroywithout sudo. The Microsoft devcontainers base image includes avscodeuser (UID 1000) that matches most host users.
Required for HTTPS: Traefik Configuration
If you want local HTTPS (recommended), provide a Traefik compose file:Required for Database Seeding: Seed Directory
For projects with databases:Optional: Agent Templates
For customizing how agents work in your project:Quick Checklist
| Component | Required? | Location | Purpose |
|---|---|---|---|
| Docker Compose template | Yes (for Docker workspaces) | infra/.devcontainer-template/ | Container configuration |
| Traefik config | Only for HTTPS | infra/docker-compose.traefik.yml | Reverse proxy |
| Seed file | Only if database needed | infra/seed/seed.sql | Pre-populate database |
| Agent template | Recommended | infra/.agent-template/ | AI instructions |
| Project skills | Optional | .claude/skills/ | Project-specific workflows |
Example: Minimal Setup
For a simple monorepo with no Docker:Container Configuration Tips
When setting up Docker containers for workspaces, avoid these common pitfalls: Maven projects:- DO NOT set
MAVEN_CONFIG=/some/pathas an environment variable - Maven interprets
MAVEN_CONFIGas additional CLI arguments, not a directory path - This causes “Unknown lifecycle phase” errors (e.g., “Unknown lifecycle phase /maven-cache”)
- Instead, use
-Dmaven.repo.local=/path/to/cachein the Maven command
- Set
PNPM_HOME=/pathto configure the pnpm store location - Mount a named volume for the store to share across containers
Polyrepo Merge Considerations
⚠️ Important: Polyrepo merging requires special handling. The current merge-agent is optimized for monorepos.For polyrepo projects:
| Feature | Status | Notes |
|---|---|---|
| Workspace creation | ✅ Supported | Creates worktrees in each repo |
| Branch management | ✅ Supported | Each repo gets its own feature branch |
| Agent work | ✅ Supported | Agents can work across repos |
| Merge | ⚠️ Manual | Push each repo’s branch, merge via GitLab/GitHub |
- Agent completes work and pushes branches to each repo
- Create merge requests for each repo manually (or via
gh pr create) - Review and merge each MR separately
- The “Approve & Merge” button is not yet polyrepo-aware
Quality Gates in Polyrepo Projects
Quality gates support polyrepo projects through path-based filtering: each gate runs only when the repo being merged matches the gate’spath field.
How it works
When a polyrepo merge runs, Panopticon computes the relative path from the project root to the sub-repo being merged (e.g.,frontend or backend). It then filters the configured quality gates
to only those whose path field matches that relative path.
| Gate config | Repo being merged | Result |
|---|---|---|
path: frontend | frontend | ✅ Runs |
path: backend | frontend | ⏭️ Skipped |
no path field | frontend | ⏭️ Skipped (not applicable to any specific repo) |
no path field | project root (monorepo) | ✅ Runs |
Configuration example
Important: Thepathvalue in a quality gate must exactly match thepathvalue of the corresponding repo in theworkspace.reposlist (both relative to the project root).
Related Guides
- Project Registry - Project configuration
- Workspaces - Workspace management
- Docker & HTTPS Setup - Docker and networking