Skip to content
githubnextPublic

About

Let's compose rich plans together

Resources

Code of conduct

Security policy

Stars

708 stars

Watchers

4 watching

Forks

Latest commit

 

History

3,280 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chopin

Chopin is a GitHub Next research prototype where people and a repository-aware AI agent write technical documents together. You can use it for implementation plans, technical specs, RFCs, proposals, or decision records.

People guide the document and own every decision. The built-in agent, called the Planner, reads your GitHub repository, proposes edits to the document, and asks the team when the codebase does not settle a choice. Read the GitHub Next project post for the background behind the project.

Important

Chopin is experimental research software, not a supported GitHub product or a production service. Expect incomplete workflows, operational limits, and breaking changes.

Tip

There is no public Chopin server for general use. Run Chopin on your own machine with the steps below, or host your own server by following Self-hosting.

chopin-tour.mp4

What Chopin does

Each document connects to one GitHub repository and brings three views together.

  • Document. People and the Planner edit one shared rich-text document saved as Markdown. You see live cursors, who is in the document, and temporary highlights on recent agent edits.
  • Chat. The team shares a conversation alongside the document. Messages are saved into the Planner's context and help keep untitled documents named. When you are alone in a document, every message goes straight to @chopin. In a group conversation, automatic participation waits for a natural opening, while mentioning @chopin calls the Planner immediately.
  • Decisions. Answers to open questions and accepted comments are stored as attributed records separate from the document text. Later edits cannot quietly overwrite what the team agreed on.
chopin-comments.mp4

Research. Type /research in a document to start a background research task from your brief. Chopin places a live progress card inline in the document. When the research finishes, Chopin publishes it as a child document under the current document, with its own Document and Decisions views. Child documents do not have their own Chat; the parent document's Chat and Planner read them directly. Pending, failed, and cancelled research tasks stay out of the sidebar navigation.

chopin-research.mp4

Planner and coding agents. By default (HARNESS=copilot-sdk), the Planner uses GitHub Copilot with read-only repository tools and can edit only the Chopin document. It cannot push to GitHub, edit local files, or run commands. You have two other options:

  • Set HARNESS=atomic to run each Planner session as a full Atomic session with shell and file access as the server user. See Self-hosting before enabling this.
  • Set HARNESS=remote to run Planner turns in an external client connected to /api/v1/agent. See Agent connection.

External coding agents can also connect over MCP (/mcp) to create or update documents and implement an approved task plan.

The document format supports any repository-connected technical writing, while the built-in Planner prompts focus on planning.

Run locally

Install these prerequisites first:

  • Bun 1.4.5 (mise.toml selects it automatically if you use mise)
  • Docker Engine with Docker Compose (for the local PostgreSQL database)
  • A GitHub App you register for your local instance
  • A GitHub account with push or admin access to a test repository, plus a GitHub Copilot seat for the default Planner
  • An OPENAI_API_KEY or JEV_API_KEY for the helper model that decides when to reply in Chat (required when AGENT=on)

1. Register a GitHub App

Create a GitHub App with these local URLs:

Homepage:  http://127.0.0.1:8787
Callback:  http://127.0.0.1:8787/auth/github/callback
Setup URL: http://127.0.0.1:8787/auth/github/setup

Configure these settings on the App:

  1. Enable expiring user authorization tokens.
  2. Disable OAuth during installation.
  3. Disable webhooks.
  4. Grant these repository permissions, explained in Authentication:
Contents:        Read and write
Pull requests:   Read and write
Workflows:       Read and write
Checks:          Read-only
Commit statuses: Read-only
Issues:          Read-only
Metadata:        Read-only (automatic)

2. Install dependencies and configure .env

bun install
cp .env.example .env
openssl rand -hex 32

Open .env and fill in GITHUB_APP_SLUG, GITHUB_APP_CLIENT_ID, GITHUB_APP_CLIENT_SECRET, SESSION_ENCRYPTION_KEY (paste the random hex string from openssl), and either OPENAI_API_KEY or JEV_API_KEY.

To run Chopin without the Planner, background jobs, or a helper-model key, set AGENT=off. External coding agents can still use /mcp.

3. Start PostgreSQL and Chopin

bun run db:up
bun run migrate
bun run dev

compose.local.yaml exposes PostgreSQL on port 5432 of your machine, so use it only on a trusted development computer. For a network-facing deployment, follow Self-hosting.

Press Ctrl-C to stop the local server. Run bun run db:down to stop and remove the Docker containers.

4. Sign in and create a document

  1. Open http://127.0.0.1:8787 and sign in with GitHub.
  2. Install or update the GitHub App on a test repository when prompted.
  3. Pick that repository, create a document, and start writing.

Open the same document in a second browser profile to test real-time collaboration. To try collaboration inside a single browser, enable local collaborators to open demo accounts (Lily or Felix) in another tab using your own sign-in.

Public web search for /research calls GitHub's Copilot MCP endpoint with your GitHub App token. Self-registered Apps may not be accepted by that endpoint. If a web search fails, the research card and server log explain why, and Self-hosting troubleshooting lists what to check.

Collaborate with the Planner

Write in Chat as a team, or mention @chopin directly when you want the Planner to respond right away.

Message What happens
should we cover the export format? Chopin saves the message in Chat and includes it in the Planner's context. Alone in a document, @chopin replies right away; in a group, it waits its turn.
@chopin Calls the Planner immediately to respond to recent Chat messages.
@chopin draft the export section Calls the Planner immediately with that specific request.
@chopin compare #Release plan The Planner reads the referenced document at its latest revision, then replies in the current document.

Type # in Chat to link other documents in the same repository, published research child documents, headings, Decisions, or repository files. Document links stay intact if you rename a document, and they never change which document the Planner edits. To start research, type /research inside the document rather than in Chat.

Chat messages also keep blank or auto-generated document titles up to date without overwriting a title a person set. Under copilot-sdk, the first eligible writer to trigger a title update, Planner turn, or research task supplies the document's GitHub App token and Copilot quota until their session ends or the server restarts. There is no manual transfer button. See Hosted agent for ownership and title details.

Use your own machine

The chopin CLI connects a computer or VM you control to your Chopin server. Builds, local investigations, and remote Planner sessions then run on your machine for any repository you can push to.

Your machine needs Linux on x86_64 with KVM, or Windows on x86_64 with the Windows Hypervisor Platform enabled. chopin runs every agent inside its own lightweight virtual machine (an NVX microVM) with the agent pre-installed inside that image, so you do not need to install or sign in to the agent on the host machine. Install chopin and connect from any folder, pointing CHOPIN_URL at your server:

curl -fsSL https://github.com/githubnext/chopin/releases/latest/download/install.sh | sh
CHOPIN_URL=https://your-chopin-instance.example chopin connect --agent copilot

On the first run, chopin connect pairs your machine, remembers the server URL, and clones repositories on demand when work arrives. Pass --checkout <path> if you want it to use an existing local folder instead. By default it runs in your terminal and stops when you close it. On a server or VM, add --install-service so it keeps running in the background after you log out.

Pick a built-in coding agent with --agent:

Agent In its microVMs Connect with Tested with Chopin
GitHub Copilot CLI @github/copilot@1.0.114 --agent copilot Yes
Atomic atomic@0.10.23, @bastani/atomic-acp@0.0.21 --agent atomic Yes

For any other agent that supports the Agent Client Protocol (ACP), pass its command after --, such as chopin connect -- my-agent --acp. If you also use Atomic directly on your own machine, install it with Atomic's standalone installer (curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh, or install.ps1 on Windows) and keep it up to date with atomic update.

The Machines page (/machines) on your Chopin server generates a ready-to-run install-and-connect command with your server URL filled in. Local computers pair through a browser approval link, and remote servers pair over SSH with a single-use key. See Add a machine and Use your own machine with Chopin for Windows setup, background services, and the full CLI guide.

Current boundaries

  • GitHub.com only. GitHub Enterprise Server is not supported.
  • Repository reads. Under copilot-sdk, the Planner reads the repository's default branch as it stood when the session started, unless a local investigation supplies a specific commit. Code search stays inside that one repository. The Planner never sees local files or uncommitted edits unless you use HARNESS=atomic or a remote Planner on a paired machine.
  • Authentication and access. Every browser user signs in with GitHub, must pass any server allowlist, and needs repository access through the GitHub App installation. Public repositories do not make their Chopin documents public. Read access lets you view documents; push or admin access lets you create documents, edit them, and call the Planner. External MCP callers must pass the server allowlist and authorize repositories with their own bearer token without needing an App installation. See Authentication and Repository channels.
  • Data sent to model providers. Document text, Chat messages, and repository excerpts selected by the Planner are sent to the configured model provider. That provider is GitHub Copilot under copilot-sdk, the configured HARNESS_AUTH provider under HARNESS=atomic, or the connected client under HARNESS=remote. Background jobs send only the data needed for that job. Public web research sends only your submitted brief, though the worker may refine search queries.
  • Credentials and storage. Hosted GitHub tokens are stored encrypted in PostgreSQL using SESSION_ENCRYPTION_KEY, which stays outside the database. Local device mode stores credentials in your OS keychain or a local file you approve. Documents, Chat history, Decisions, research data, background jobs, and sessions live in PostgreSQL. See Storage and Hosted agent.
  • Helper model and optional features. When AGENT=on, Chopin needs a helper model (OPENAI_API_KEY, JEV_API_KEY, or DECISIONS_MODEL) for Chat turn-taking and Planner reply checks. Automatic decision cards from Chat and research offers are off by default; set CONVERSATION_PLAN=on to enable them (even if AGENT=off). See Self-hosting.
  • Single active writer. Only one Chopin server process can write to a database at a time, so horizontal scaling is not supported. During a deployment, you can overlap an incoming process with the current one using HANDOVER=wait. See Deploys nobody can see.

Documentation

Topic Document
Deploy and operate an instance Self-hosting
Deploy without anyone noticing Deploys nobody can see
Configure identity and access Authentication
Let machines push as Chopin's GitHub App GitHub App identity
Run Chopin's work on your own machine chopin CLI
Run local investigations and prototypes Local investigations
Connect an external coding agent Local agent MCP
Run a document's Planner in your own agent Agent connection
Understand the system Architecture
Understand channel identity and access Repository channels
Understand persistence Storage
Capture and record open decisions Decisions
Review the hosted agent boundary Hosted agent
Understand automatic participation in Chat Automatic participation
Understand research offers from Chat Research offers from Chat
Register durable background jobs Background jobs
Review experimental implementation handoff Implementation lifecycle
Run local implementation builds Local implementation
Develop on exe.dev exe.dev development
Test an authenticated pull request preview PR preview testing
Work on the repository Maintainer guide

Development

bun test              # unit and in-memory adapter tests
bun run test:postgres # PostgreSQL storage contract and lifecycle tests
bun run e2e           # browser and system integration suite
bun run types         # TypeScript checks across the workspace
bun run ci            # formatting, lint, and token checks

Run bun run e2e:browsers once to install Chromium. The browser suite builds the web app and starts temporary PostgreSQL databases and Chopin servers automatically. See AGENTS.md for repository layout, test selection, and engineering rules.

Report security issues through SECURITY.md. Participation follows the Code of Conduct, and the source is under the MIT License.

About

Let's compose rich plans together

Resources

Code of conduct

Security policy

Stars

708 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages