A production-grade, self-hostable AI development control plane. Takes tasks from prompts, GitHub issues, Linear tickets, Slack/Discord commands, or voice and turns them into isolated branches, code changes, tests, reviews, pull requests, and deployment-gated releases.
+-------------------+ +-------------------+ +-------------------+
| Next.js 16 |<----->| Go API Server |<----->| NATS JetStream |
| (Port 3000) | HTTP | (Port 8080) | NATS | (Port 4222) |
| | | | | |
| - CodeMirror 6 | | - Chi Router | | - Event Bus |
| - shadcn/ui | | - SQLC + Goose | | - Task Streams |
| - Zustand | | - JWT + OAuth | | - Pub/Sub |
| - TanStack Query | | - SSE Stream | | - Persistence |
+-------------------+ +--------+----------+ +-------------------+
|
| gRPC / HTTP
v
+-------------------+ +-------------------+ +-------------------+
| Go Worker |<----->| Go Runner | | Temporal |
| (Background) | NATS | (Port 8082) | | (Port 7233) |
| | | | | |
| - Task Processor | | - Docker Sandbox | | - Workflows |
| - Agent Orchestr. | | - Git Operations | | - Durability |
| - Event Consumer | | - Code Execution | | - (Optional) |
+-------------------+ +-------------------+ +-------------------+
+-------------------+ +-------------------+
| GitHub App | | AI Providers |
| (Webhooks) | | (Bifrost/Direct)|
| | | |
| - Issue Sync | | - OpenAI |
| - PR Management | | - Anthropic |
| - Webhook Events | | - Bifrost Gateway |
+-------------------+ +-------------------+
- Next.js 16 with App Router
- React 19 + TypeScript 5
- Tailwind CSS 4 + shadcn/ui components
- CodeMirror 6 for code editing
- Zustand for state management
- TanStack Query for API fetching
- Server-Sent Events for live updates
- Go 1.23+ with Chi router
- SQLC for type-safe database queries
- Goose for database migrations
- log/slog for structured logging
- JWT + OAuth2 for authentication
- NATS JetStream for event streaming
- Temporal (optional) for durable workflows
- SQLite (local) / PostgreSQL (cloud)
- Docker + Docker Compose for local dev
- Go 1.23+
- Node.js 20+
- Docker & Docker Compose
- Git
# Clone the repository
git clone <repo-url> ai-dev-control-plane
cd ai-dev-control-plane
# Copy environment template
cp .env.example .env
# (Optional) Edit .env with your GitHub App credentials
# nano .env# Start everything (Docker services + all apps)
make dev
# Or start services individually:
make docker-up # Start NATS, Temporal (optional)
make migrate # Run database migrations
make dev-api # Start API server (port 8080)
make dev-web # Start Next.js (port 3000)
make dev-worker # Start worker service| Service | URL | Description |
|---|---|---|
| Web UI | http://localhost:3000 | Next.js frontend |
| API | http://localhost:8080 | Go API server |
| NATS | nats://localhost:4222 | Message bus |
| NATS Monitor | http://localhost:8222 | NATS dashboard |
| Temporal UI | http://localhost:8233 | Workflow UI (if enabled) |
Dev Plane can capture task lifecycle events into a local AgentVault inbox:
AGENTVAULT_URL=http://127.0.0.1:47321
AGENTVAULT_TOKEN=<token printed by agentvault serve>
AGENTVAULT_PROJECT=dev-planeWhen configured, task creation events are posted to AgentVault's /capture endpoint. Logging is best-effort; Dev Plane continues working if AgentVault is offline.
Dev Plan Builder's Brief bundles can create implementation tasks through:
POST /api/v1/projects/{projectID}/brief-handoffsThe endpoint accepts repository_id plus a brief_url, brief_zip_url, or inline documents array, then creates a normal task with source=dev_plan_brief and stores the brief pointers in spec/metadata.
| Command | Description |
|---|---|
make dev |
Start all services (docker-up, migrate, web/api/worker) |
make dev-web |
Start Next.js dev server |
make dev-api |
Start Go API (with Air hot reload if available) |
make dev-worker |
Start Go worker |
make dev-runner |
Start Go runner service |
| Command | Description |
|---|---|
make docker-up |
Start Docker services (NATS, etc.) |
make docker-down |
Stop Docker services |
make docker-logs |
Follow all service logs |
make docker-status |
Show service status |
make docker-down-volumes |
Stop and remove volumes (DESTRUCTIVE) |
| Command | Description |
|---|---|
make migrate |
Run Goose migrations |
make db-reset |
Delete DB and recreate (DESTRUCTIVE) |
make db-status |
Show migration status |
make gen-db |
Generate SQLC typed code |
| Command | Description |
|---|---|
make test |
Run all Go tests |
make test-api |
Run API tests (verbose) |
make test-worker |
Run worker tests |
make test-race |
Run tests with race detector |
make test-coverage |
Generate coverage report |
| Command | Description |
|---|---|
make lint |
Run all linters (Go + frontend) |
make lint-go |
Run Go vet across all modules |
make lint-web |
Run npm lint |
make build |
Build all binaries + frontend |
make clean |
Remove build artifacts |
make fmt |
Format all Go code |
| Command | Description |
|---|---|
make install-tools |
Install dev tools (Air, Goose, SQLC) |
make deps |
Download Go dependencies |
make help |
Show this help |
ai-dev-control-plane/
|_ Makefile # Root build orchestration
|_ docker-compose.yml # Local services (NATS, Temporal)
|_ .env.example # Environment template
|_ go.work # Go workspace
|_ go.work.sum
|
|_ apps/
| |_ web/ # Next.js 16 frontend
| | |_ app/ # App Router
| | |_ components/ # React components
| | |_ lib/ # Client utilities
| | |_ package.json
| | |_ next.config.js
| | |_ tailwind.config.ts
| | |_ tsconfig.json
| |
| |_ api/ # Go control plane API
| | |_ cmd/api/main.go
| | |_ internal/
| | | |_ server/server.go
| | | |_ handlers/
| | | |_ middleware/
| | | |_ config/config.go
| | | |_ auth/
| | |_ go.mod
| | |_ go.sum
| |
| |_ worker/ # Go background workers
| | |_ cmd/worker/main.go
| | |_ internal/
| | |_ go.mod
| | |_ go.sum
| |
| |_ runner/ # Go sandbox/runtime service
| |_ cmd/runner/main.go
| |_ internal/
| |_ go.mod
| |_ go.sum
|
|_ packages/
| |_ db/ # Database: schema, migrations, SQLC
| | |_ schema.sql
| | |_ migrations/ # Goose migrations
| | |_ queries/ # SQLC query files
| | |_ sqlc.yaml
| | |_ gen/ # Generated SQLC code
| | |_ adapters/ # DB adapters (SQLite/Postgres)
| | |_ db.go # Unified DB interface
| |
| |_ agents/ # Agent interfaces, tool definitions
| |_ runtimes/ # Runtime provider interface
| |_ repo-intel/ # Repo indexing basics
| |_ events/ # NATS event schemas + bus
| |_ models/ # Shared domain models
| |_ policies/ # Permission + policy engine
| |_ gateway/ # GitHub, webhook handlers
|
|_ infra/
|_ docker/
|_ api.Dockerfile # API multi-stage build
|_ worker.Dockerfile # Worker multi-stage build
|_ runner.Dockerfile # Runner with Docker-in-Docker
|_ web.Dockerfile # Next.js standalone build
This project uses Go 1.23 workspaces. The root go.work file includes all
modules. To work on a specific module:
# Sync workspace dependencies
go work sync
# Run a specific module's tests
cd apps/api && go test ./...
# Build a specific binary
cd apps/api && go build -o ../../bin/api cmd/api/main.go# Create a new migration
cd packages/db && goose -dir migrations create add_users_table sql
# Edit the generated .sql file, then:
make migrate # Apply migrations
make db-status # Check statusAfter modifying schema.sql or query files in packages/db/queries/:
make gen-dbInstall Air for automatic Go server restart on file changes:
make install-tools # Installs Air, Goose, SQLC
make dev-api # Auto-uses Air if availableAll variables are defined in .env.example. Key categories:
| Category | Variables | Description |
|---|---|---|
| Database | DATABASE_URL |
SQLite (local) or Postgres (cloud) |
| Auth | JWT_SECRET, GITHUB_* |
JWT signing + GitHub OAuth/App |
| Services | NATS_URL, TEMPORAL_HOST |
Message bus + workflow engine |
| Ports | PORT, WEB_PORT |
Service port bindings |
| AI | BIFROST_URL, OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, FIREWORKS_API_KEY |
AI provider configuration |
| Runtime | RUNNER_BASE_DIR, DOCKER_HOST |
Sandbox settings |
| Frontend | NEXT_PUBLIC_* |
Public frontend config |
| Features | ENABLE_TEMPORAL, REQUIRE_RISK_APPROVAL |
Feature toggles |
See .env.example for full documentation and default values.
# Migrations run automatically with `make dev`
# DB file is created at: ./data/dev.db
# Reset database (DESTRUCTIVE):
make db-reset# 1. Uncomment postgres service in docker-compose.yml
# 2. Update DATABASE_URL in .env:
DATABASE_URL=postgres://user:pass@localhost:5432/aicp?sslmode=disable
# 3. Start services:
docker-compose up -d postgres
make migrateMigration files must be compatible with both SQLite and PostgreSQL:
- Use standard SQL types (
TEXT,INTEGER,BOOLEAN) - Use
JSONBin schema (adapters handle SQLite translation) - Avoid database-specific features in migrations
NATS starts automatically with make docker-up. JetStream is enabled for
persistent event streaming.
# Start NATS
make docker-up
# Check NATS health
curl http://localhost:8222/healthz
# View NATS dashboard
open http://localhost:8222
# Stream logs
make docker-logs-natsStreams are created automatically by the application on startup:
AICP_TASKS-- Task lifecycle eventsAICP_AGENT_RUNS-- Agent execution eventsAICP_AUDIT-- Audit log events
-
Go to Settings > Developer settings > GitHub Apps > New GitHub App
-
Fill in the required fields:
- GitHub App name: Your app name
- Homepage URL:
http://localhost:3000 - Webhook URL:
https://your-ngrok.ngrok.io/webhooks/github - Webhook secret: Generate a secure random string
-
Set permissions:
- Repository: Read & Write (code, issues, pull requests)
- Commit statuses: Read & Write
- Webhooks: Read
-
Subscribe to events:
- Pull request
- Push
- Issues
- Create (branches/tags)
-
Generate a private key and download the
.pemfile
# .env
GITHUB_APP_ID=your-app-id
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----"
GITHUB_APP_WEBHOOK_SECRET=your-webhook-secret
GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_TOKEN=your-github-app-installation-or-fine-scoped-tokenInstall the GitHub App on your repositories to start receiving webhooks.
| Service | Image | Port | Purpose |
|---|---|---|---|
| NATS | nats:2.10-alpine |
4222, 8222 | Event bus + JetStream |
| Temporal | temporalio/auto-setup:1.25 |
7233, 8233 | Workflow engine (optional) |
# Start all core services
make docker-up
# Start with Temporal
make docker-up
# In another terminal:
docker-compose --profile temporal up -d
# View logs
make docker-logs
# Stop everything
make docker-down
# Full reset (removes volumes!)
make clean-all- Monorepo structure with Go workspace
- Next.js frontend shell with CodeMirror 6
- Go API with Chi router + JWT auth
- Database abstraction (SQLite/Postgres)
- Goose migrations + SQLC code generation
- NATS JetStream event bus
- Docker Compose local services
- Multi-stage Dockerfiles
- GitHub integration (OAuth + App webhooks)
- Makefile orchestration
- Docker sandboxed code execution
- Agent tool system (read, edit, test, git)
- Multi-model provider support
- Spec generation + approval flow
- Branch isolation + workspace management
- Team management + RBAC
- Review workflows (human-in-the-loop)
- PR auto-creation
- Merge/deployment gating
- Audit logging
- Linear ticket sync
- Slack/Discord bot commands
- Voice input (whisper)
- Webhook extensibility
- Public API + SDK
- Fork the repository
- Create a branch:
git checkout -b feat/my-feature - Make your changes with tests
- Run checks:
make lint && make test - Commit:
git commit -m "feat: add my feature" - Push:
git push origin feat/my-feature - Open a Pull Request
We follow conventional commits:
feat:-- New featurefix:-- Bug fixdocs:-- Documentationrefactor:-- Code refactoringtest:-- Adding testschore:-- Maintenance tasks
MIT License. See LICENSE for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See
/docsdirectory
Built with Go + Next.js + NATS