Skip to main content
Glama
README.md
<p align="center">
  <a href="https://goa.design/highbay/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="docs/img/highbay-banner-dark.png">
      <img alt="Highbay: Ship backend and AI systems with coding agents you trust. Agree on flows, C4 architecture, and Go contracts in your browser. Generate the plumbing and verify with an independent tester." src="docs/img/highbay-banner.png" width="960">
    </picture>
  </a>
</p>

<p align="center">
  <a href="https://github.com/goadesign/highbay/actions/workflows/integration.yml"><img alt="Integration" src="https://github.com/goadesign/highbay/actions/workflows/integration.yml/badge.svg?branch=main"></a>
  <a href="https://github.com/goadesign/highbay/releases/latest"><img alt="Release" src="https://img.shields.io/github/v/release/goadesign/highbay"></a>
  <a href="https://www.npmjs.com/package/@goadesign/highbay"><img alt="npm" src="https://img.shields.io/npm/v/%40goadesign%2Fhighbay"></a>
  <a href="https://pkg.go.dev/github.com/goadesign/highbay"><img alt="Go Reference" src="https://pkg.go.dev/badge/github.com/goadesign/highbay.svg"></a>
  <a href="https://modelcontextprotocol.io"><img alt="MCP" src="https://img.shields.io/badge/MCP-2026--07--28-6E56CF"></a>
  <a href="https://github.com/goadesign/highbay/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
</p>

<p align="center">
  <a href="https://goa.design/highbay/"><b>Website</b></a> ·
  <a href="#get-started"><b>Get Started</b></a> ·
  <a href="#how-it-works"><b>How It Works</b></a> ·
  <a href="#inside-a-system"><b>Inside a System</b></a> ·
  <a href="#built-in-go-playbook"><b>Playbook</b></a> ·
  <a href="#how-highbay-compares"><b>Compare</b></a> ·
  <a href="#install"><b>Install</b></a> ·
  <a href="#dive-deeper"><b>Docs</b></a>
</p>

---

# Highbay: Ship Backend & AI Systems with Coding Agents You Trust

**Highbay guides multi-service Go, MCP, and AI changes from browser design review to verified merge, using the coding agents you already run.**

- **For you:** Describe what to build in your browser Studio. Inspect domain **Flows**, the **System ([C4](https://c4model.com))** architecture diagram, and the **Design Doc**, preview how each open **Decision** changes the diagram alongside an independent **Skeptic** audit, and merge from the scenario test report.
- **For your coding agents:** Shared Go rules wire up auth, OpenTelemetry tracing, Redis streams, and durable AI workflows while Goa and Highbay generate **92%** of the system module's non-blank, non-test Go lines ([Incidents example](examples/incidents/README.md)). **Builders** cannot edit the agreed contract or tests, a separate **Tester** writes scenario tests in its own Git worktree, and Highbay runs them against all services together.

Highbay is an open-source (MIT) local workspace and MCP server for Claude Code, Codex, Gemini CLI, Cursor, Antigravity, Windsurf, GitHub Copilot, and VS Code.

> **Coding agents vs. product agents:** Highbay coordinates **coding agents** that design, build, and test your repository (running their terminals with Herdr Core and carrying their messages with [Chorus](https://github.com/goadesign/chorus)). Your system can also define optional **product agents** built with [Goa-AI](https://github.com/goadesign/goa-ai), such as an incident commander inside your application that proposes canary rollbacks behind human approval.

---

## Get started

### 1. Install & set up once

```bash
# Homebrew (macOS or Linux)
brew install goadesign/tap/highbay
highbay up
```

Or with Node.js 20+: `npx @goadesign/highbay up` · Shell installer: `curl -fsSL https://raw.githubusercontent.com/goadesign/highbay/main/scripts/install.sh | sh` · Go 1.27.3+: `go install github.com/goadesign/highbay/cmd/highbay@latest && highbay up`. See [Install](#install) for prerequisites and optional `-protobuf` / `-temporal` tools.

### 2. Open the Studio or prompt your agent

Run `highbay` in an empty folder (or an existing Highbay repository) to open the Studio in your browser, or invoke `/highbay` (`$highbay` in Codex) inside an open coding agent session:

> Build an incident response platform: ingest paging alerts, correlate them with recent deploys and error spans, and let an AI incident commander roll back a bad canary release only after the on-call engineer approves.

---

## How it works

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/img/highbay-how-it-works-dark.svg">
    <img alt="How Highbay works in three phases: 1. Agree in Studio, where the Architect drafts Flows, System (C4), and the Design Doc, the Skeptic audits without editing and flags gaps as review notes, and you settle Decisions before pressing Agree & Build. 2. Generate and build apart, where highbay gen generates servers and clients with no model in the loop, up to 4 Builders implement service handlers, and a separate Tester writes eval scenarios in its own Git worktree. 3. Verify and merge, where Highbay rejects drifted contracts, runs all services locally against every flow scenario, and unlocks Approve & Merge." src="docs/img/highbay-how-it-works.svg" width="960">
  </picture>
</p>

In the prompt above, one boundary is still open: may the incident commander roll back a brand-new canary on its own during a Sev-1 outage, or must every rollback wait for a person? Instead of letting one agent guess and write matching unit tests, Highbay walks the change through six steps:

1. **Describe.** The **Architect** (the coding agent you talk to) creates or updates the project in its own working copy and drafts domain **Flows**, service contracts, a **System (C4)** model, and a Markdown **Design Doc**.
2. **Review and decide.** Move between **Flows**, **System (C4)**, and **Design Doc**, or compare **Flows** and **System (C4)** side by side with **Split**. Stepping through a flow example highlights the matching containers and calls on the diagram. Each open question is a **Decision** pinned to a step: focus an option to preview what it adds, changes, or removes on the diagram. In parallel, the **Skeptic** reviews the draft without editing it and posts review notes for gaps that need your call.
3. **Agree.** Once open Decisions and blocking review notes are settled, press **Agree & Build** (or **Agree without review** if only the Skeptic is still running, which the change records).
4. **Build.** Highbay commits the agreed design and its generated code as the build's starting commit, then runs up to four **Builders** in parallel across affected services to write only `services/<service>/` handlers. Meanwhile, a separate **Tester** writes one scenario test per finished flow in `eval/` inside its own Git worktree.
5. **Verify.** Highbay refuses any candidate whose design, generated contracts, or service imports drifted from what you agreed. It builds and starts every service locally and runs the accepted `eval/` scenarios against all of them together. If a scenario fails, Highbay reopens the affected service slices with the failure report.
6. **Approve & Merge.** When the status bar reads **✓ Verified**, open **Approve & Merge…**, inspect the per-scenario verification evidence, and merge the verified commits into your local branch.

Only you can agree to a change, approve verification results, or merge. You can revise the design, rebuild, or rewrite tests at any point; [How Highbay works](docs/HOW_IT_WORKS.md) covers each step and [what stays valid when going back](docs/HOW_IT_WORKS.md#going-back).

---

## Without Highbay vs. with Highbay

| Step | Freehand coding agent | With Highbay |
| --- | --- | --- |
| **Service wiring & boundaries** | Each prompt session picks its own router, auth middleware, error shape, and cross-service imports. | Every service follows one layout (`services/<svc>/`) and shared Go playbook, enforced by import and contract checks. |
| **Schema & client updates** | One field change means prompting edits across handlers, validators, OpenAPI, MCP JSON, and callers. | Edit the Go design once; `highbay gen` regenerates servers, specs, tool schemas, and typed `clients/<dep>/` packages with no model in the loop. |
| **Testing & sign-off** | The same session invents edge-case rules and writes unit tests that pass its own guesses. | You settle edge cases as Decisions first, Builders cannot touch `design/` or `eval/`, a separate Tester writes scenario tests in its own Git worktree, and Highbay runs them against all services together. |

---

## Inside a system

What you agree on in the Studio is Go design source plus a Markdown design doc in your repository, checked across flows, C4 topology, service contracts, and `@symbol` references before coding starts. The excerpts below come from the runnable three-service [Incidents example](examples/incidents/README.md) (`intake`, `correlator`, and `commander`), with numbered reader comments and `// ...` omissions marked.

### 1. Flows and open Decisions in `design/stories/`

Domain flows link triggers, events, reactions, concrete examples, and open Decisions directly to the services and operations they exercise:

```go
// examples/incidents/design/stories/incidents.go (comments added)
Reaction("execute_rollback", "Deploy controller rolls back suspect canary after responder confirmation", func() {
	// 1. Link this step to the prior triage reaction, owning area, and Goa-AI agent.
	When("agent_triages")
	InArea("autonomous_mitigation")
	ByAgent("incident-commander")

	// 2. Require human sign-off before calling commander.confirm_mitigation.
	RequiresConfirmation()
	Calls("commander", "confirm_mitigation")
	Publishes("incident_events", "mitigation.completed")
	AsOutcome()

	// 3. Pin an open architectural choice to this step so the Studio can preview each option on the C4 diagram.
	Decision("rollback_gate", "Should canary rollback require human responder confirmation during Sev-1?", func() {
		// ... ArchitectView and AddressesFinding omitted ...
		Option("Always require on-call confirmation before rollback", func() {
			NoStructuralChange()
		})
		Option("Auto-rollback Sev-1 canaries under 5 minutes old", func() {
			ChangesContainer("commander", "Execute Sev-1 canary rollbacks automatically without responder confirmation")
		})
	})
})
```

### 2. C4 topology and service contracts in `diagram/` & `services/<svc>/design/`

Declaring a `Uses` relationship in the C4 model tells `highbay gen` to generate a typed client under `services/commander/clients/` for only the operations `commander` is allowed to call, while the Goa-AI tool contract enforces server-supplied identity and human confirmation in code:

```go
// examples/incidents/diagram/model/model.go (comments added)
_ = Container(commanderdesign.CommanderService, "Incident Commander", func() {
	Key("commander")
	// 1. Declaring this gRPC dependency generates commander's typed correlator client and test mocks.
	Uses(Correlator, "Reads correlation bundles", "gRPC", func() {
		Key("read_correlation")
		Transport("grpc")
		Calls("get_correlation")
	})
	// ... intake MCP, Pulse stream, and DeployController Uses omitted ...
})
```

```go
// examples/incidents/services/commander/design/design.go (comments added)
Tool("execute_canary_rollback", "Roll back a suspect canary release after human responder confirmation.", func() {
	Args(func() {
		Attribute("responder_id", String, "Caller-supplied on-call responder identity.", func() { MinLength(1) })
		Attribute("incident_id", String, "Incident identifier.", func() { MinLength(1) })
		Attribute("suspect_release", String, "Canary release tag to roll back.", func() { MinLength(1) })
		Required("responder_id", "incident_id", "suspect_release")
	})
	Return(MitigationOutcome)
	BindTo("commander", "execute_canary_rollback")

	// 2. Inject hides responder_id from the model's tool schema; the server supplies it from the triage request.
	Inject("responder_id")

	// 3. Confirmation pauses the durable workflow until the on-call responder approves or denies the rollback.
	Confirmation(func() {
		Title("Confirm canary rollback")
		PromptTemplate(`Roll back release {{ .suspect_release }} for incident {{ .incident_id }}?`)
		DeniedResultTemplate(`{"incident_id":{{ json .incident_id }},"status":"no_action_needed"}`)
	})
})
```

### 3. Independent multi-service scenarios in `eval/`

Highbay generates one required scenario entry per finished Story flow in `eval/design/story_tests.go` plus a multi-binary test harness. The Tester implements scenario checks against real compiled `intake`, `correlator`, and `commander` binaries:

```go
// examples/incidents/eval/acceptance/hooks.go (excerpt from AutoTriageAndRollback, comments added)
// 1. Start triage after intake ingests the alert and correlator publishes the suspect canary bundle.
triage, err := c.commander.TriageIncident(ctx, &gencommander.TriageIncidentPayload{
	IncidentID:  opened.IncidentID,
	ResponderID: "responder-oncall-1",
})
if err != nil {
	return eval.Result{}, fmt.Errorf("triage incident: %w", err)
}
beforeConfirm, _ := c.deploy.rollbacks()

// 2. Verify the agent paused at Confirmation and triggered zero rollbacks before human approval.
checks := []eval.Check{
	check("paused_at_confirmation", triage.Status == "awaiting_confirmation", "triage ended %s", triage.Status),
	check("proposed_suspect_release", deref(triage.Release) == "v2.14.0-canary",
		"proposed release %q, want v2.14.0-canary", deref(triage.Release)),
	check("no_rollback_before_confirmation", len(beforeConfirm) == 0,
		"deploy controller received %d rollbacks before confirmation", len(beforeConfirm)),
}
```

**Where those test values come from:** `startScenarioClients` in `eval/acceptance/clients.go` starts each scenario via `eval/gen/topology` with dedicated local ports and Redis/Temporal namespaces, constructs the generated `c.intake` and `c.commander` clients, and attaches `c.deploy`, a loopback Deploy Controller fake (`fakeDeployController`). No cloud account or model API key is required.

### Repository layout

| Path | Owner | Purpose |
| --- | --- | --- |
| `design/` & `design/stories/` | Architect (agreed by you) | Shared API types, Pulse topology, and Story flows with examples and Decisions. |
| `diagram/model/model.go` | Architect (agreed by you) | [Model](https://github.com/goadesign/model) C4 containers, views, and `Uses` relationships. |
| `docs/design/` | Architect (agreed by you) | Modular Markdown system design doc cross-checked against `@symbol` design references. |
| `gen/` & `services/<svc>/clients/` | `highbay gen` | Generated HTTP/gRPC/MCP servers, OpenAPI 3 specs, tool codecs, and per-dependency clients. |
| `services/<svc>/` | Builders (up to 4 in parallel) | Hand-written service implementations (`service.go` and internal packages). |
| `eval/` | Tester | Separate Go module defining multi-service acceptance scenarios that Highbay runs against compiled binaries. |

Any Python, TypeScript, Go, or web client can call the generated HTTP, gRPC, and MCP endpoints.

---

## Built-in Go playbook

Highbay serves its production playbook over MCP at `highbay://golden-path` ([`GOLDEN_PATH.md`](internal/goldenpath/GOLDEN_PATH.md)) and adds Redis or Temporal only when a design declares streams, worker pools, or durable product agents:

- **Auth & tenant isolation:** Validates JWT, OAuth2, and API keys at the gateway boundary and injects caller or tenant IDs server-side so prompts cannot spoof another user or organization.
- **Tracing, metrics & health checks:** Instruments HTTP, gRPC, and model calls with OpenTelemetry ([Clue](https://github.com/goadesign/clue)) and generates dependency readiness probes in each service's `main`.
- **Event streams & worker pools:** Generates typed [Pulse](https://github.com/goadesign/pulse) stream publishers and subscribers plus consistent-hash worker pools backed by Redis or Valkey.
- **Human approvals & durable AI runs:** Enforces tool-call budgets, cursor-paginated responses, human confirmation gates, and crash-resilient Temporal execution through [Goa-AI](https://github.com/goadesign/goa-ai).

---

## How Highbay compares

| Capability | Highbay | Plan Mode & rules files | Code-first agent SDKs | Parallel worktree runners |
| --- | --- | --- | --- | --- |
| **Design & contract** | Browser Flows + C4 Studio backed by compiled Go contracts | Markdown prose | Scattered across app code | Prompt text per branch |
| **HTTP, gRPC, OpenAPI 3 & MCP** | Generated deterministically from Go contracts | Prompted file by file | Hand-wired in code | Prompted per branch |
| **Build & test guardrails** | Locked contracts, service import gate, separate Skeptic & Tester | Same agent grades its own code | Same agent grades its own code | Manual branch diffing |
| **Multi-service architecture** | Shared Go playbook, C4-derived clients & multi-binary `eval/` runner | Hand-maintained Markdown | Left to each developer | Drifts across worktrees |

---

## Install

Highbay runs on **macOS or Linux** and requires:

- **Go 1.27.3+** and **Git 2.45+** (with `user.name` and `user.email` configured; Highbay commits accepted tests under your Git identity).
- **Docker** (Docker Desktop or another local Docker engine) for containerized Builder compile and unit-test checks.
- **An MCP-capable coding agent** (Claude Code, Codex, Gemini CLI, Cursor, Antigravity, Windsurf, Copilot, or VS Code; see [`highbay setup`](docs/REFERENCE.md#highbay-setup--global)).
- **Redis or Valkey 7+** (`redis-server` or `valkey-server` on `PATH`) only when your design declares Pulse streams or worker pools. Verification starts an isolated local instance per run and stops with `"Pulse checks need redis-server or valkey-server 7 or later"` if neither is installed.

```bash
# Homebrew
brew install goadesign/tap/highbay
highbay up

# npm (Node.js 20+)
npx @goadesign/highbay up

# Shell installer (verifies release checksums and runs highbay up)
curl -fsSL https://raw.githubusercontent.com/goadesign/highbay/main/scripts/install.sh | sh

# Go install
go install github.com/goadesign/highbay/cmd/highbay@latest
highbay up
```

`highbay up` verifies Go, Git, and Docker, installs compatible Herdr Core and Chorus binaries with your consent, and registers Highbay with your detected coding agents. Reload already-open coding agents once to pick up `/highbay`, and rerun `highbay up` after installing a new agent. Optional pinned build/test tools install on demand:

- `highbay up -protobuf` installs the pinned `protoc` compiler and Go plugins required by gRPC designs.
- `highbay up -temporal` installs the pinned Temporal dev server used when verifying systems with Goa-AI product agents (otherwise `temporal` on `PATH` is used).

See [Prerequisites and install options](docs/REFERENCE.md#prerequisites) for details.

**No Highbay account or model API key is required.** Coding agents use their existing CLI sign-ins, and the Tester's `eval/` suite runs product agents against deterministic scripted models with no provider keys. A provider key or model gateway is used only when (1) a Builder tests prompt wording on a *live target* (a server-started copy of your system built from a commit) or (2) you register a custom evaluator via `highbay verification set` that calls a live model. To enable live targets, export `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in the environment that launches your coding agent (see [stdio integration](docs/REFERENCE.md#highbay-stdio)). While no model is chosen, live targets use `claude-sonnet-4-6` or `gpt-5.4-mini`, and **Try it live** in the Studio switches models.

### Update Highbay

Run `highbay update` (or click **Update & Restart** in the Studio banner when a new release is available) to update in place while keeping your browser session and agent terminals running; use `highbay update -check` to check without installing, or `npx @goadesign/highbay@latest` for npm installs. See [`highbay update`](docs/REFERENCE.md#highbay-update).

### Existing repositories & server commands

- **New folder vs. existing Goa repository:** In an empty folder, `highbay` prompts for your goal and has the Architect scaffold a starter system and initial commit ([`init_project`](docs/REFERENCE.md#init_project)). In an existing repository, Highbay expects Highbay's Goa layout with at least one commit and either an `eval/` test module or a custom evaluator registered with `highbay verification set` (which skips starting a Tester; see [what a build adds](docs/HOW_IT_WORKS.md#what-a-build-adds)).
- **Managing project servers:** Run `highbay` in a project folder to open or reopen the Studio (`npx @goadesign/highbay` if installed via npm), `highbay --print-link` for a single-use JSON session URL, `highbay status` to inspect current stage and roles, `highbay stop` to stop this folder's project server, and `highbay down` to stop all Highbay project servers plus shared Chorus and Herdr Core. See [Terminal and browser automation](docs/REFERENCE.md#terminal-and-browser-automation).

---

## Use the tools without a team

You can scaffold, regenerate, verify, and approve Highbay systems directly from the CLI with no running server, coding agents, or model keys:

```bash
# 1. Scaffold a new starter system (one initial service) and its eval/ test module.
highbay init -dir incidents -module example.com/incidents

# 2. Regenerate Goa/Goa-AI servers, service mains, C4-derived clients, and diagram JSON.
highbay gen -dir incidents

# 3. Inspect all standalone commands and flags (including verify and approve).
highbay help
```

To try generation and end-to-end verification on the reference platform in this repository, run `highbay gen -dir examples/incidents` and `highbay gen -dir examples/incidents/eval`; see the [Incidents example](examples/incidents/README.md) and [`highbay verify`](docs/REFERENCE.md#highbay-verify).

---

## What Highbay does not do

- **It is not a sandbox.** Agents and the candidate binaries Highbay builds and verifies run as ordinary local OS processes with your user file and network access. Role tokens restrict which Highbay operations each agent can call, not what local programs can reach (Builder compile and unit-test checks run in a local Docker container; see [`check_project`](docs/REFERENCE.md#check_project)).
- **It does not replace your review of test assertions.** Highbay enforces that every finished flow has a scenario test in `eval/` that compiles and passes against the running services, and shows what the Tester says each scenario covers in the Studio, while assertion strength stays your review.
- **It generates Go backends designed with Goa.** Non-Go frontends and services (Python, TypeScript, mobile, web) call Highbay systems over standard HTTP, OpenAPI 3, gRPC, and MCP, while Highbay itself does not generate non-Go servers or patch arbitrary Express, FastAPI, or handwritten `net/http` routers.
- **It does not deploy to production.** Approving and merging lands verified commits on your local Git branch; CI/CD release and deployment pipelines remain yours.

---

## Words you will meet

| Term | Meaning |
| --- | --- |
| **Studio** | Highbay's browser workspace (`/views`) where you inspect **Flows**, **System (C4)**, and **Design Doc**, answer Decisions, and merge verified builds. |
| **System** | One repository holding one or more services under `services/<service>/`, shared Story flows in `design/stories/`, a C4 model in `diagram/`, a design doc in `docs/design/`, and acceptance scenarios in `eval/`. |
| **Flow & Area** | A **Flow** is one end-to-end domain path (**Trigger** → **What happens** → **Reaction** → outcome) written with the Story DSL (`design/stories/`), with each step placed in an **Area** inside an owning service. |
| **Decision & Review note** | A **Decision** is an open choice pinned to a flow or step whose options declare their structural impact; a **Review note** is a Skeptic finding settled by a Decision or dismissed with a reason. |
| **Change Card & Revision** | The saved record of one request, its evaluated design, Decisions, and review notes; edits after agreement become a proposed **Revision** you can **Adopt** or decline. |
| **Architect, Skeptic, Builder, Tester** | The four coding-agent roles (`guide`, `skeptic`, `builder`, and `test_writer` on the wire): Architect drafts the design, Skeptic audits read-only, Builders implement service slices, and Tester writes `eval/` scenarios. |
| **Herdr Core & Chorus** | Local companion services started by `highbay up`: Herdr Core (`hc`) manages interactive agent terminals, and Chorus delivers messages between the Studio and your agents. |

---

## Dive deeper

- **[How Highbay works](docs/HOW_IT_WORKS.md)**: step-by-step walkthrough of a change across the Studio, team roles, and Git worktrees.
- **[CLI & MCP Reference](docs/REFERENCE.md)**: exact contracts for every CLI command, MCP tool, Studio endpoint, and evaluator flag.
- **[Story language](story/README.md)**: Go DSL reference for declaring Areas, Flows, Examples, and Decisions.
- **[Golden Path architecture](docs/ARCHITECTURE_PLAYBOOK.md)**: built-in production Go rules and component ownership.
- **[Story flows & test generation](docs/STORY_TEST_DESIGN.md)**: how finished Story flows map to required `eval/` scenarios.
- **[Incidents example](examples/incidents/README.md)**: complete three-service system (`intake`, `correlator`, `commander`) with HTTP/SSE, gRPC, MCP, Pulse, and Goa-AI.
- **[Product direction](docs/PRODUCT_DIRECTION.md)**: Highbay's goals, boundaries, and design principles.

> **Why "Highbay"?** A high bay is a tall assembly hall where complex systems are integrated and tested end to end before they roll out the door. Highbay gives multi-service software changes the same proving ground before they merge.

## License

Highbay is released under the [MIT License](LICENSE).