Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ SUPABASE_SERVICE_ROLE_KEY=
SUPABASE_JWT_SECRET=

# Optional daemon polling interval for autonomous Supabase sync.
TEAMBRIDGE_RELAY_SYNC_INTERVAL_MS=5000
TEAMBRIDGE_RELAY_PRESENCE_INTERVAL_MS=15000
TEAMBRIDGE_CHECKPOINT_INTERVAL_EVENTS=50
TEAMBRIDGE_CHECKPOINT_LEASE_MS=60000
COORD_RELAY_SYNC_INTERVAL_MS=5000
COORD_RELAY_PRESENCE_INTERVAL_MS=15000
COORD_CHECKPOINT_INTERVAL_EVENTS=50
COORD_CHECKPOINT_LEASE_MS=60000

# Optional local CLI convenience only; prefer passing login flags in shared shells.
TEAMBRIDGE_EMAIL=
TEAMBRIDGE_PASSWORD=
COORD_EMAIL=
COORD_PASSWORD=
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ self/
node_modules/
dist/
*.tsbuildinfo
.teambridge/
.coord/
.env
.env.*
!.env.example
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ first — this file covers how to build, test, and navigate the code.

## What this is

**Condominium** (npm name `teambridge`) — a shared workspace for teams building
**Coord** (npm name `coord`) — a shared workspace for teams building
with AI coding agents. Multiple developers work on the same task in separate git
branches while sharing context through a vault, a local daemon, a dashboard, and
(eventually) MCP tools. Current status lives in [`PROGRESS.md`](./PROGRESS.md).
Expand All @@ -17,7 +17,7 @@ branches while sharing context through a vault, a local daemon, a dashboard, and
packages/core Shared types + contracts (src/contracts/) — start here
packages/daemon Local HTTP API on :9473 (state, vault, relay)
packages/vault Vault materialization from events.jsonl
packages/cli `teambridge` CLI (commander)
packages/cli `coord` CLI (commander)
packages/mcp MCP resource/tool stubs (server not yet wired)
apps/dashboard React + Vite + TanStack Query UI on :5173
supabase/ Phase 2 relay migration (tc_ tables)
Expand All @@ -26,8 +26,8 @@ docs/ Concepts, daemon API, worktrees, design choices, plans
report/ Team build plan + Phase 2 relay plan
```

Local runtime state lives in `.teambridge/` at the git root (SQLite at
`.teambridge/state.sqlite`, worktrees, vault, avatars).
Local runtime state lives in `.coord/` at the git root (SQLite at
`.coord/state.sqlite`, worktrees, vault, avatars).

## Commands

Expand All @@ -40,7 +40,7 @@ pnpm daemon # HTTP API on http://127.0.0.1:9473
pnpm seed # optional demo projects (Beacon, Silo, Forge)
pnpm dashboard # dev UI on http://127.0.0.1:5173
pnpm dashboard:preview # production build + preview
pnpm teambridge <args> # run the built CLI (node packages/cli/dist/index.js)
pnpm coord <args> # run the built CLI (node packages/cli/dist/index.js)
pnpm test # per-package unit tests (node --test)
pnpm test:integration # builds, then runs tests/integration/*.test.mjs
```
Expand All @@ -60,7 +60,7 @@ daemon code before exercising a flow.
integration tests are `tests/integration/*.test.mjs`, run serially.
- **Naming hybrid:** UI and docs say **track**; several APIs and types still
say **workspace** (`/workspaces/*` mutations vs. `/projects` + `/tracks`
reads, `.teambridge/workspaces/{sessionName}/` on disk). This is intentional
reads, `.coord/workspaces/{sessionName}/` on disk). This is intentional
until a future `/tracks/*` rename — see [`docs/CONCEPTS.md`](./docs/CONCEPTS.md).
- **Vault is a projection, not the truth.** `events.jsonl` is canonical
(ordered by per-workspace `seq`, not timestamps); markdown vault files are
Expand Down
28 changes: 14 additions & 14 deletions PROGRESS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Condominium — Progress
# Coord — Progress

Snapshot of what has been built so far and what remains. This is a status
digest; the authoritative checklist stays in [`todo.md`](./todo.md), and the
Expand Down Expand Up @@ -32,7 +32,7 @@ pnpm test:integration # full CLI + daemon flow, incl. vault-flow.test.mjs
SQLite state, projects/tracks, participants, worktrees, publish events,
vault materialization + rebuild, `vault context`, FTS5 vault search, avatars,
repo context, and Supabase relay mirroring/sync.
- **CLI** (`packages/cli`, `pnpm teambridge`) — `init` (with `--relay
- **CLI** (`packages/cli`, `pnpm coord`) — `init` (with `--relay
local|supabase`), `status`, `project create|list`, `start`, `join`, `enter`,
`publish`, `vault read|context|search`, `context` (compact vault context +
teammate deltas), `hook install|uninstall|status` (Claude Code
Expand All @@ -56,7 +56,7 @@ pnpm test:integration # full CLI + daemon flow, incl. vault-flow.test.mjs
(`team_publish`, `vault_search`, `vault_read`, `workspace_status`,
`team_ask`, `team_reply`) — all calling the daemon. Workspace resolution
from explicit params, local `state.sqlite` worktree mapping, or
`.teambridge/.active` fallback. Start with `teambridge mcp`. Integration tests
`.coord/.active` fallback. Start with `coord mcp`. Integration tests
spawn the server over stdio and verify JSON-RPC handshake, resource/tool
lists, live resource reads, and full ask/reply/conflict flows.

Expand All @@ -82,7 +82,7 @@ All Phase 1 steps and the pass example in `todo.md` are checked off:
`dedupeKey`.
- Daemon relay identity/device registration; mirrors projects/sessions/
participants after login; queues failed publishes in `pending_remote_events`.
- Push/pull sync (autonomous polling + manual `teambridge sync`); remote
- Push/pull sync (autonomous polling + manual `coord sync`); remote
events rebuild the local vault.
- CLI: `login`, `sessions`, `list`, `sync`, `status relay`; `join` can import a
remote session before creating the worktree.
Expand Down Expand Up @@ -113,14 +113,14 @@ All Phase 1 steps and the pass example in `todo.md` are checked off:

- MCP server over stdio transport using `@modelcontextprotocol/sdk` with
`StdioServerTransport` (Claude Code compatible). Start with
`teambridge mcp`.
- Five MCP resources registered: `teambridge://workspace` (with relay status),
`teambridge://participants`, `teambridge://vault/context`,
`teambridge://inbox`, `teambridge://conflicts` — all backed by daemon calls.
`coord mcp`.
- Five MCP resources registered: `coord://workspace` (with relay status),
`coord://participants`, `coord://vault/context`,
`coord://inbox`, `coord://conflicts` — all backed by daemon calls.
- Six MCP tools registered: `team_publish`, `vault_search`, `vault_read`,
`workspace_status`, `team_ask`, `team_reply` — all calling the daemon.
- Workspace resolution from explicit params, local `state.sqlite` worktree
mapping, or `.teambridge/.active` fallback.
mapping, or `.coord/.active` fallback.
- Integration tests spawning the server over stdio, verifying initialize
handshake, resources/list, tools/list, and workspace-resolution errors.
- MCP resource contracts include relay-backed workspace state with graceful
Expand All @@ -139,20 +139,20 @@ All Phase 1 steps and the pass example in `todo.md` are checked off:
conflict endpoints (`GET /workspaces/:id/conflicts`,
`POST /workspaces/:id/conflicts/:id/resolve`) with participant-level actor
validation.
- `teambridge ask|inbox|reply` CLI commands, live MCP ask/reply, and end-to-end
- `coord ask|inbox|reply` CLI commands, live MCP ask/reply, and end-to-end
local verification in `tests/integration/inbox-conflicts-flow.test.mjs`.
- Conflict-marker parser, `conflicts.md` materialization, and `teambridge
- Conflict-marker parser, `conflicts.md` materialization, and `coord
conflicts` CLI command.
- Daemon hook/delta context endpoints (`/context/hook`, `/context/deltas`) for
IDE hooks and dashboard callers, covered by
`tests/integration/context-hook-flow.test.mjs`.
- Mock-relay end-to-end verification for offline/reconnect retry and late
joiner checkpoint bootstrap in
`tests/integration/relay-reconnect-bootstrap.test.mjs`.
- Claude Code hook auto-injection: `teambridge hook install` writes a
SessionStart hook into `.claude/settings.json` that runs `teambridge
- Claude Code hook auto-injection: `coord hook install` writes a
SessionStart hook into `.claude/settings.json` that runs `coord
context`, so an agent opening a worktree gets shared context with no
per-session flags. `teambridge context` emits smarter compact vault context
per-session flags. `coord context` emits smarter compact vault context
(empty files dropped, per-file titles stripped, bullets deduped) plus a
delta of what changed since a per-participant last-seen `seq`
(`--peek`/`--deltas-only`/`--json`). Covered by
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Condominium
# Coord

Shared workspace for teams building with AI agents — projects, tracks, a shared vault, and a dashboard to stay aligned.

Expand All @@ -17,9 +17,9 @@ pnpm dashboard # UI on http://127.0.0.1:5173
**Your own data (no seed):**

```bash
pnpm teambridge init
pnpm teambridge project create --name "My App"
pnpm teambridge start my-track
pnpm coord init
pnpm coord project create --name "My App"
pnpm coord start my-track
```

Optional: add `PEXELS_API_KEY` to `.env` for flower profile photos.
Expand All @@ -33,9 +33,9 @@ Optional: add `PEXELS_API_KEY` to `.env` for flower profile photos.
| `packages/vault` | Vault materialization |
| `packages/mcp` | MCP server (in progress) |
| `apps/dashboard` | Web UI (`pnpm dashboard`) |
| `packages/cli` | CLI (`pnpm teambridge`) |
| `packages/cli` | CLI (`pnpm coord`) |

Local state lives in `.teambridge/` at the git root.
Local state lives in `.coord/` at the git root.

## Docs

Expand Down
68 changes: 34 additions & 34 deletions agent.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Condominium Agent Guide
# Coord Agent Guide

This repository is **Condominium** — a shared workspace for teams building with AI coding agents.
This repository is **Coord** — a shared workspace for teams building with AI coding agents.

Condominium lets multiple developers work on the same task with separate branches while sharing context through a vault, dashboard, and (eventually) agent tools.
Coord lets multiple developers work on the same task with separate branches while sharing context through a vault, dashboard, and (eventually) agent tools.

For team execution details, keep and use `report/team-implementation-plan.md`. This file is the product vision; the report file is the build plan for Nihal, Kushagra, and Ronish.

## Product Vision

Condominium is for teams where each developer has their own AI agent, but everyone needs the same picture of what's going on.
Coord is for teams where each developer has their own AI agent, but everyone needs the same picture of what's going on.

Example (target CLI — **not shipped yet**; today use `pnpm daemon`, `pnpm seed`, and `pnpm dashboard`):

```bash
teambridge start billing-v2 main
teambridge join billing-v2
cd "$(teambridge enter billing-v2)" && claude
coord start billing-v2 main
coord join billing-v2
cd "$(coord enter billing-v2)" && claude
```

Each teammate gets:

- A separate git worktree and branch from the same recorded `base_commit`
- A local materialized **track vault** at `.teambridge/workspaces/{session_name}/vault/`
- A local materialized **track vault** at `.coord/workspaces/{session_name}/vault/`
- Shared context updates from teammate events
- MCP tools for agents to read, publish, ask, and inspect workspace state (planned)
- Daemon HTTP API + **dashboard** for humans; CLI visibility (planned)
Expand Down Expand Up @@ -71,22 +71,22 @@ Events notify everyone, then materialize locally, then all agents can use the up
Primary user-facing commands (north-star UX):

```bash
teambridge init
teambridge start <session_name> [base_ref]
teambridge join <session_name>
teambridge enter <session_name>
teambridge status
teambridge ws show <session_name>
teambridge ws who <session_name>
teambridge ws branches <session_name>
teambridge publish <target_file> <text>
teambridge ask <person> "question"
teambridge inbox
teambridge reply <message_id> "answer"
teambridge vault search <query>
teambridge vault read <path>
teambridge vault debug-snapshot
teambridge dashboard
coord init
coord start <session_name> [base_ref]
coord join <session_name>
coord enter <session_name>
coord status
coord ws show <session_name>
coord ws who <session_name>
coord ws branches <session_name>
coord publish <target_file> <text>
coord ask <person> "question"
coord inbox
coord reply <message_id> "answer"
coord vault search <query>
coord vault read <path>
coord vault debug-snapshot
coord dashboard
```

### Available today (local dogfood)
Expand All @@ -107,12 +107,12 @@ For local simulation and dogfooding, `start` and `join` may accept a display-nam

```text
Developer machine
-> teambridge daemon (:9473)
-> coord daemon (:9473)
-> local HTTP API (projects, tracks/workspaces, vault, avatars)
-> HTTP MCP server :9474 (planned)
-> workspace vault materializer
-> checkpoint builder / relay client (Phase 2)
-> local SQLite state (.teambridge/state.sqlite)
-> local SQLite state (.coord/state.sqlite)
-> CLI (planned)
-> dashboard (React + Vite — shipped)
-> agent hooks (planned)
Expand All @@ -132,12 +132,12 @@ Supabase

## Track vault

There is only one Teambridge vault type in the first product: the **track vault** (still stored under `workspaces/` on disk).
There is only one Coord vault type in the first product: the **track vault** (still stored under `workspaces/` on disk).

Phase 1 keeps the vault flat and easy to change:

```text
.teambridge/workspaces/{session_name}/vault/
.coord/workspaces/{session_name}/vault/
├── README.md
├── decisions.md
├── observations.md
Expand All @@ -163,7 +163,7 @@ Persisted via `POST /workspaces/:trackId/vault/annotate`. Not stored in `events.
## Event Flow

```text
agent/team_publish or teambridge publish
agent/team_publish or coord publish
-> local daemon
-> local events.jsonl
-> local vault materialization
Expand All @@ -177,10 +177,10 @@ agent/team_publish or teambridge publish
User-published context uses one event type, `publish`. The vault-relative `targetFile` decides where the markdown projection goes. Examples:

```bash
teambridge publish decisions.md "Backend is the source of truth for invoice state."
teambridge publish observations.md "Frontend reads derived totals from the invoice API."
teambridge publish blockers.md "Need refresh-token behavior decided before UI retry logic."
teambridge publish test-results.md "pnpm test passed for billing package."
coord publish decisions.md "Backend is the source of truth for invoice state."
coord publish observations.md "Frontend reads derived totals from the invoice API."
coord publish blockers.md "Need refresh-token behavior decided before UI retry logic."
coord publish test-results.md "pnpm test passed for billing package."
```

Phase 1 uses these simple target files:
Expand Down Expand Up @@ -213,7 +213,7 @@ Supabase stores latest vault checkpoints for fast bootstrap.
New joiner flow:

```text
teambridge join billing-v2
coord join billing-v2
-> fetch workspace manifest
-> fetch latest checkpoint
-> fetch events after checkpoint `seq`
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="data:," />
<title>Condominium</title>
<title>Coord</title>
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@teambridge/dashboard",
"name": "@coord/dashboard",
"version": "0.0.0",
"private": true,
"type": "module",
Expand All @@ -15,7 +15,7 @@
"@hugeicons/core-free-icons": "^4.2.2",
"@hugeicons/react": "^1.1.9",
"@tabler/icons-react": "^3.44.0",
"@teambridge/core": "workspace:*",
"@coord/core": "workspace:*",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"motion": "^12.42.0",
Expand Down
12 changes: 6 additions & 6 deletions apps/dashboard/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const api = vi.hoisted(() => ({
resolveConflict: vi.fn()
}));

vi.mock('./api/teambridgeClient', () => api);
vi.mock('./api/coordClient', () => api);

function renderAtRoute(path: string, element: React.ReactElement, withSidebar = false) {
const routes = (
Expand Down Expand Up @@ -72,11 +72,11 @@ describe('ProjectSelectionPage', () => {
});

it('shows an error message when the API is unreachable', async () => {
api.listProjects.mockRejectedValue(new Error('Unable to reach local Condominium daemon.'));
api.listProjects.mockRejectedValue(new Error('Unable to reach local Coord daemon.'));

renderAtRoute('/projects', <ProjectSelectionPage />);

expect(await screen.findByText('Unable to reach local Condominium daemon.')).toBeTruthy();
expect(await screen.findByText('Unable to reach local Coord daemon.')).toBeTruthy();
});

it('shows empty state when no projects exist', async () => {
Expand All @@ -92,7 +92,7 @@ describe('ProjectSelectionPage', () => {
api.listKnownRepos.mockResolvedValue({
repos: [
{
repoRoot: '/tmp/teambridge-dummy-repo',
repoRoot: '/tmp/coord-dummy-repo',
lastSeenAt: '2026-01-01T00:00:00.000Z',
projects: [
{ id: 'proj_dummy', name: 'Dummy Repo', description: 'Local test repo', status: 'active', createdAt: '2026-01-01T00:00:00.000Z' }
Expand All @@ -116,7 +116,7 @@ describe('ProjectSelectionPage', () => {
api.listKnownRepos.mockResolvedValue({
repos: [
{
repoRoot: '/tmp/teambridge-dummy-repo',
repoRoot: '/tmp/coord-dummy-repo',
lastSeenAt: '2026-01-01T00:00:00.000Z',
projects: [
{ id: 'proj_dummy', name: 'Dummy Repo', description: 'Local test repo', status: 'active', createdAt: '2026-01-01T00:00:00.000Z' }
Expand All @@ -129,7 +129,7 @@ describe('ProjectSelectionPage', () => {

expect(await screen.findByText('Current Repo')).toBeTruthy();
expect(screen.getByText('Dummy Repo')).toBeTruthy();
expect(screen.getByText('/tmp/teambridge-dummy-repo')).toBeTruthy();
expect(screen.getByText('/tmp/coord-dummy-repo')).toBeTruthy();
});
});

Expand Down
Loading