mvp-ai's picture
|
download
raw
19.8 kB
# Getting started
This guide creates a private board, adds and claims one proof-gated work item, and
shows the result through the CLI. A separate synthetic walkthrough is included for
exploration. Neither path requires provider credentials or a hosted COORD service.
## Prerequisites
- Python 3.11 or newer
- Git
- A POSIX shell for the copy-paste examples
Nothing above requires macOS, Xcode, or an agent runtime. Those are only needed for
specific paths below:
- The native macOS/iOS apps require Xcode with its command-line tools selected and
XcodeGen (`brew install xcodegen`). CLI-only setup needs neither.
- The [Connect Claude Code and Codex](#connect-claude-code-and-codex) section needs
whichever of the Claude Code CLI (`claude`) or the Codex CLI (`codex`) you intend to
wire up — nothing before that section needs either installed.
Windows process-liveness support is not currently claimed. See [compatibility](compatibility.md).
## Install from this repository
Clone the repository first:
```bash
git clone https://github.com/0marm0/COORD-Harness.git
cd COORD-Harness
```
Then pick a path. **The CLI is the lower-friction default** — it has no Xcode
dependency and runs on any supported platform:
```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[mcp,dev]'
```
If you only need the core Python API and `coord` CLI, install `-e .`. The MCP server needs `[mcp]`; development checks need `[dev]`.
Prefer one command instead? `scripts/setup.sh` does the same `.venv` and
`.coordharness/coord.db` setup as the manual CLI steps above, and also writes this
clone's `.codex/config.toml` and `.mcp.json` if they are absent. It has no macOS
dependency and runs on any OS with Python 3.11+:
```bash
./scripts/setup.sh
```
It stops there by default: nothing native-side installs, and nothing is registered
with the Codex/Claude MCP clients on your machine (that would write configuration
*outside* the clone — on the Codex side, your global config). Both are opt-in:
```bash
./scripts/setup.sh --register-clients # also register this clone with installed MCP clients
./scripts/setup.sh --native # also install the native macOS/iOS apps (macOS only;
# requires Xcode's command-line tools + XcodeGen,
# `brew install xcodegen`)
```
`scripts/setup.sh` refuses early, naming the interpreter it found, if the `python3`
it would use (`$COORD_PYTHON`, default `python3`) is below the floor in
[Prerequisites](#prerequisites) — stock macOS ships `/usr/bin/python3` at 3.9, which
is too old. If yours is, install a newer Python and point the script at it instead of
your default `python3`:
```bash
COORD_PYTHON=python3.11 ./scripts/setup.sh
```
An existing `.venv` built with a too-old interpreter is rebuilt automatically on the
next run rather than reused, so switching `COORD_PYTHON` and re-running is always
enough — no `rm -rf .venv` needed first.
Use `--dry-run` to see exactly what a given flag combination would do without touching
anything, and `--check` to verify an existing install (`.venv`, `coord.db`, `coord
doctor`) without creating or writing anything:
```bash
./scripts/setup.sh --dry-run --native --register-clients
./scripts/setup.sh --check
```
A real run (without `--dry-run`/`--check`) ends with a receipt: the clone path, the db
path, whether clients were registered, whether native apps were installed, the `coord
doctor` verdict, the next command to run, and the uninstall command. `scripts/setup-macos.sh`
still works as a thin shim to the same script, for anything that links the old name.
Verify entry points (works after either path above — both leave a `.venv` at the repo root):
```bash
.venv/bin/coord --help
.venv/bin/coord-board --help
.venv/bin/coord-jobs --help
```
`coord-mcp` is a stdio server, so do not run it as a help probe: it waits for an MCP client. Client configuration is its smoke test.
## Where state lives
By default:
```text
COORD-Harness/
└── .coordharness/
├── coord.db
└── job_progress/
```
`COORD_PROJECT_ROOT` selects the project against which relative proof paths resolve. `COORD_HOME` moves the state directory. `COORD_DB` overrides the database path directly.
Keep `.coordharness/` out of Git. It can contain work titles, events, actor labels, and local process metadata.
For a complete machine-local layout, client wiring, uninstall instructions, and
verification matrix, continue with [standalone setup](standalone-setup.md).
## Create the first real work item
An empty project does not require the fictional demo or manual SQL. From the clone root:
```bash
export COORD_PROJECT_ROOT="$PWD"
export COORD_ACTOR="codex"
export COORD_SESSION_ID="codex:my-project"
.venv/bin/coord create DEMO-CDX-FIRST-WORK \
--title "Verify the local harness" \
--module harness \
--done-signal reports/first-work.md \
--acceptance "the local lifecycle completes from a fresh database" \
--note "first standalone COORD work item"
.venv/bin/coord claim DEMO-CDX-FIRST-WORK --step "running the local verification"
```
The first command bootstraps `.coordharness/coord.db` when necessary and writes one queued work contract. `--done-signal` is a repository-relative proof path; COORD never invents a completion signal after work starts. Use `--assignee claude` for a Claude-owned row or omit it to use the active actor.
Three things a first run trips over:
- `--note` is **required** by `coord create`. Without it argparse exits 2 with `coord create: error: the following arguments are required: --note`.
- `COORD_ACTOR` and `COORD_SESSION_ID` are the identity that outranks every ambient variable. Set them explicitly. If a Codex session variable and `CLAUDE_CODE_SESSION_ID` are both present — which is exactly what happens when you paste these commands into a Claude Code shell — the CLI refuses with `ambiguous agent identity` rather than guessing who to attribute the work to.
- The `--done-signal` directory does not have to exist yet. A declared proof that has not been produced is a *pending* pointer, not an error; `coord doctor` counts it and does not block on it.
Check the result at any point:
```bash
.venv/bin/coord doctor
```
`coord doctor` is read-only: it creates no state directory, bootstraps no database, and writes nothing. It prints one JSON document and exits 0 only when every finding passes. On the board created above it passes.
The synthetic walkthrough below remains useful for exploring a populated board, but it is not a prerequisite for real work.
## Seed the synthetic board
From the repository root:
```bash
.venv/bin/coord demo
.venv/bin/coord board --group-by module
```
The seed is synthetic and fictional. It uses the current clock so live demo leases remain active; set `SOURCE_DATE_EPOCH` when you need a byte-reproducible capture, and expect a red board when you do. A frozen seed clock backdates every lease and heartbeat, `coord doctor` reads the real one, and so it finds all of them expired and reports `"status": "BLOCKED"` with exit 2 (`expired_claim_count: 10`, `expired_session_count: 8`). Seed without the override for the walkthrough below. It writes 37 rows total: 32 work items nested under five initiatives — UI overhaul, Model development, Platform migration, Search relevance, and Operational hardening — plus the five initiative rows themselves, with Claude, Codex, and service actors and rows in several lifecycle states. It does not copy or paraphrase a private board.
It also writes ten job sidecars into `.coordharness/job_progress/`, each bound to one of those work rows. Seed with the default paths: if you send the database somewhere else with `--db`, the sidecars stay behind in `.coordharness/` and `coord doctor` will report the split.
`scripts/demo.sh` (see the project README's "Everything at once" walkthrough) seeds this
same fictional board a different way: it points `COORD_PROJECT_ROOT` at `var/demo/`
instead of the repository root, so its database lands at `var/demo/.coordharness/coord.db`
by design — that keeps the demo from ever attaching to a real board in this clone. It is
not the `--db` split above (the sidecars and the database stay together), but `coord
doctor` still needs `COORD_PROJECT_ROOT="$PWD/var/demo"` to find that board; run from the
repository root with no override and doctor reports the *default* `.coordharness/` state
(missing, if you have not seeded one there) rather than the demo's.
Confirm the seeded board is healthy before going further:
```bash
.venv/bin/coord doctor
```
Seeded without `SOURCE_DATE_EPOCH`, it prints `"status": "PASS"` and exits 0.
## Claim one Codex-owned row
`OPS-503` is queued for the Codex lane and declares `docs/reports/ops-503.md` as its completion proof.
```bash
export COORD_ACTOR="codex"
export COORD_SESSION_ID="codex:demo"
.venv/bin/coord claim OPS-503 --step "documenting the public API rate limits"
```
Set `COORD_ACTOR` even when a Codex session variable is already in the environment. It is what makes the identity unambiguous, and without it the claim fails outright inside a Claude Code shell, where `CLAUDE_CODE_SESSION_ID` is also set.
The JSON response contains the concrete `claim_id` and its exact
`claim_fence`. Keep the ID for heartbeats and terminal actions. Keep the
fence private and pass it only when a tracked local job needs to prove that the
same live claim still authorizes launch:
```bash
.venv/bin/coord heartbeat-claim CLAIM_ID_FROM_THE_RESPONSE \
--step "proof drafted; checking the result"
```
The heartbeat renews the claim lease. Progress text is contextual metadata, not a second lifecycle status.
## Satisfy proof and complete
The quick demo intentionally requires `mkdir -p` so it also works in a clone without `docs/reports/`.
```bash
mkdir -p docs/reports
printf '%s\n' '# Public API rate limits' '' 'Synthetic demo proof.' \
> docs/reports/ops-503.md
git add docs/reports/ops-503.md
.venv/bin/coord done OPS-503 --artifact docs/reports/ops-503.md
.venv/bin/coord board --group-by module
.venv/bin/coord doctor
```
Completion checks that this session holds the live claim, that the explicit path matches the controller-declared `done_signal`, that the proof is non-empty and allowed by custody rules, and that terminal/review guards permit completion. The proof must be tracked by Git's current index -- every artifact type, apart from the few kinds that cannot live there at all; staging is sufficient, and no commit is required. The transition and receipt are written transactionally.
The `git add` is not decoration. Without it the proof is untracked and `done` refuses; in a directory that is not a Git repository at all it refuses for the same reason.
`coord done` records the proof as the repository-relative path the row declared, not as an absolute host path, so the final `coord doctor` reports the same `PASS` it did before the completion.
## Pause, block, or release instead
Use the `claim_id` returned by `coord claim`:
```bash
.venv/bin/coord release CLAIM_ID --status paused \
--next-step "rerun the synthetic check" \
--resume-when "the fixture is available" \
--resume-manual
```
For a real blocker, use `--status blocked` with a durable next step and resume trigger. Use the default `released` status when you are simply giving up ownership. Paused and blocked are not euphemisms for unfinished work; they preserve why execution stopped.
### `coord session` (start, heartbeat, end)
`coord session {start,heartbeat,end}` registers, renews, and closes this process's
own presence on the board — separate from any work claim above. It resolves the same
actor/session identity as every other command (`COORD_ACTOR` + `COORD_SESSION_ID`, or
whatever an MCP client's profile supplies) and refuses the same way `claim` does —
`ambiguous agent identity` — when both a Codex session variable and
`CLAUDE_CODE_SESSION_ID` are set in the environment:
```bash
export COORD_ACTOR="claude"
export COORD_SESSION_ID="claude:my-project"
.venv/bin/coord session start
.venv/bin/coord session heartbeat
.venv/bin/coord session end
```
`start` accepts `--actor` to register the session under a different actor than the
resolved identity, and `--runner-type` to record what kind of process this is.
`heartbeat` renews the session's lease the same way `heartbeat-claim` renews a claim's
lease; call it periodically for a long-running process. `end` closes the session
outright. Board and menu-bar projections read a session as live only between a
matching `start` and its `end` (or lease expiry) — an unclaimed chat with no `coord
session start` is invisible to them even while the process itself is running.
## Connect Claude Code and Codex
The checked `.codex/config.toml` and `.mcp.json` both select this clone's
`.venv/bin/python` and `.coordharness/coord.db`. Register only missing installed-client
entries and run the live handshake — this matches the invocation
[agent onboarding](agent-onboarding.md) uses, and is safe to re-run even though the
configs are already checked in (`--write-configs` only writes them when absent):
```bash
.venv/bin/coord onboard --write-configs --register-clients
```
This step and everything below it needs at least one of the Claude Code or Codex CLIs
installed; nothing above this point in the guide does.
If Claude reports `approval_pending=true`, run `claude` in this clone and approve the
`coordharness` project server. Then verify all layers again:
```bash
.venv/bin/coord onboard
codex mcp get coordharness # needs the Codex CLI
claude mcp get coordharness # needs the Claude Code CLI
```
Claude Code and Codex authenticate themselves to their providers. COORD does not
capture those credentials or sign you in. Continue with
[agent onboarding](agent-onboarding.md) for the instruction sentinel, first MCP calls,
typed handoff, tracked jobs, and knowledge boundaries.
## Open the preview web board
The macOS wrapper already starts the local read-only service; do not start a second
one. For CLI-only setup:
```bash
.venv/bin/coord-board --db .coordharness/coord.db --host 127.0.0.1 --port 7870
```
Open `http://127.0.0.1:7870/`. The versioned snapshot is `http://127.0.0.1:7870/api/v1/snapshot`; health is `http://127.0.0.1:7870/healthz`. Do not bind it beyond loopback.
The macOS lane is service-primary on `http://127.0.0.1:7870`, the same loopback
endpoint shown above. A transitional direct-SQLite cockpit path exists only when an
operator explicitly configures the exact database path; it is not a fallback authority.
## What setup does not automate
- COORD does not install, authenticate, or manage Claude Code or Codex accounts.
- With no `COORD_USAGE_DASHBOARD_URL`, usage reads only the current user local
Claude and Codex state. Local CLI history is partial, Claude quota stays unavailable,
and Codex quota is canonical only when official `codex app-server` returns current
windows. Local reads share a thread-safe 30-second snapshot. Cold concurrent reads
coalesce; bounded waiters receive an honest warming response, and expired snapshots
are served as stale while one background refresh runs. An explicit URL selects the
validated loopback upstream instead.
- COORD does not implement a local provider login flow. Login-open actions return HTTP
501; authenticate with the official Claude Code or Codex client.
- CPU, GPU, RAM, disk-capacity, and disk-I/O tiles use COORD local collector by
default. The board samples on demand and caches briefly; no daemon is installed. Each
unsupported or failed metric remains unavailable instead of becoming zero. An explicit
`COORD_SYSTEM_TELEMETRY_URL` selects a credential-free loopback upstream instead.
- `coord route` is advisory over a usage ledger you pass with `--usage-db`; it does
not launch or redirect an agent.
- Context and memory modules are bounded, derived recall surfaces. This release has
no one-command knowledge-index or accepted-memory bootstrap, and neither store is
lifecycle authority.
- Typed handoff requires exact row fences. Generic projects can use `coord work-context`
followed by `coord handoff`; the MCP writer remains deferred to promoted profiles.
- `coord-jobs launch` supervises one declared command. COORD does not ship an
autonomous retry loop, scheduler, or always-on multi-agent supervisor.
## Reset a disposable demo
Stop any process using the demo board, then remove only the exact `.coordharness/` directory inside the disposable clone. Do not use an unresolved environment variable, home directory, or broad recursive target.
Re-running `coord demo` against an existing board is idempotent for the synthetic work rows but does not promise to erase lifecycle history. A fresh disposable clone is the cleanest reset.
## Troubleshooting
### `coord: could not prepare the database`
Check that the parent directory is writable and the path is not a zero-byte or foreign SQLite file. The loader fails closed instead of creating coordination tables inside an unrelated database.
### `unknown work_id 'OPS-503'`
Run `coord demo` against the same `COORD_DB` used by `coord`.
### `ValueError: ambiguous agent identity`
Both `CLAUDE_CODE_SESSION_ID` and a Codex session variable are set, so the CLI cannot tell which lane to attribute the work to and refuses rather than guessing. Set `COORD_ACTOR=claude` or `COORD_ACTOR=codex` (with a matching `COORD_SESSION_ID`) and re-run. This is the normal case when you run the Codex examples inside a Claude Code shell.
### `coord create: error: the following arguments are required: --note`
`coord create` requires `--note`. It is the row's origin statement, not an optional comment.
### `claim` says the row belongs to another actor
Use the correct actor/session identity or a typed handoff. Do not overwrite the assignee or reuse another process's session ID.
### `done` says proof is missing or incomplete
Confirm that the artifact path exactly matches the row's declared `done_signal`, resolves beneath `COORD_PROJECT_ROOT`, exists, is non-empty, and is not a telemetry/control marker rejected by custody rules.
The proof must additionally be tracked by Git's current index, whatever type of artifact it is. `git add` the file — staging is enough, no commit is needed. The same refusal appears when the project is not a Git repository, because nothing can be tracked there; initialise one. The exceptions are artifact kinds that structurally cannot be tracked — `.parquet`, `.duckdb`, `.db`, `.joblib`, `.bz2`, `.backup` — which must still exist; `COORD_COMPLETION_CUSTODY_EXEMPT` rebinds that list.
### `coord doctor` reports `database_outside_state_root`
The database you selected exists, but it is not inside the state root doctor was given. This is the layout produced by, for example, seeding with `--db var/demo/coord.db` while the state directory stays at `.coordharness/`. Either pass a matching `--state-root`, or keep the database at the default `.coordharness/coord.db`. Doctor does not open a database it cannot place inside the trusted state root, and it reports the condition by name rather than claiming the file is absent.
### `coord doctor` lists my work under `pending_pointer_fields`
That is not an error. A row that declares a proof it has not produced yet is pending, and pending pointers do not block. A pointer only becomes `invalid` when it escapes the project root, uses traversal or an unknown URI scheme, or when a **terminal** row's proof is missing.
### The board viewer cannot open the database
Create the database first with any `coord` command or the demo seeder. Confirm the viewer and CLI point to the same absolute `COORD_DB`.

Xet Storage Details

Size:
19.8 kB
·
Xet hash:
b872834789d369e04aeebc5d8aff2b6d801676f5a207872ee29669a8753dfcd0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.