keli-wen/cospan
Local MCP and CLI orchestration for background jobs across coding agents
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Tracked from daily D1 telemetry snapshots. Hover any data point for exact daily star counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Cospan is a local, zero-dependency JavaScript orchestration layer built on Node.js and native ESM. It exposes the cospan CLI, a stdio MCP server, and native host plugins. Its driver layer delegates to an installed coding-agent CLI and treats the selected model and its harness as a single execution target. That preserves the use of each harness's own tools and authentication rather than replacing them with a shared model API.
send starts a detached worker; the host can keep working and return through wait or batch WaitAll. Workers write raw event streams outside the repository under ~/.cospan/trajectories/. The host can fetch a progress snapshot of at most 8 KiB via observe, inspect the full trajectory when needed, or use continue to resume a session. The snapshot cap limits what a single observation pulls into context, not what the worker stores on disk.
Key Capabilities & Differentiators
The adapters cover Antigravity (agy), Codex, Claude Code, DeepSeek Harness (dsh), and Grok Build. Ad hoc dispatch can specify a model, reasoning effort, and timeout; model shortcuts are harness-specific. Antigravity and DeepSeek Harness also have a live sidebar that can aggregate jobs across sibling Git worktrees.
With v0.2.0, recurring workflows can be written as plain .mjs files under .cospan/flows/ or ~/.cospan/flows/ and invoked from different hosts. agent provides resumable sessions with options such as readonly, cwd, and a JSON schema with self-repair. synthesize runs independent read-only passes in parallel and merges their findings. orchestrate lets a lead assign work at runtime, while refine uses compact Git change manifests to feed evaluator feedback into the original session until it passes or reports a P0 block.
Trade-offs & Limitations
For a one-off second opinion, calling a CLI directly is simpler. For a fixed sequence in one harness, a shell script or native workflow may be enough. Cospan earns its place when the same job lifecycle, session continuation, and workflow logic need to span multiple harnesses. Plain JavaScript gives teams familiar control flow, but it also makes flow files executable code that should be reviewed before use.
The zero-dependency runtime does not remove the need to install, authenticate, and maintain the downstream CLIs. Flag compatibility, quotas, and provider data handling still depend on the selected harness. Parallel jobs can increase quota use and machine load; keep concurrent writers in separate worktrees or use read-only review passes where appropriate. Local orchestration does not make inference offline or guarantee that repository context stays local. Set access and retention rules for raw trajectories.
Hardware & Deployment Guide
Install Node.js 20.6 or later and the target agent CLIs you intend to use, then authenticate each through its own tooling. Claude Code, Codex, and Grok Build have marketplace installation paths and need a restart after installation. Antigravity uses a checkout and node ~/.cospan/repo/bin/cospan.mjs install --host agy; DeepSeek Harness supports plugin installation through its desktop profile or UI. Use doctor --check to verify local binaries and flag contracts without spending model tokens.
Cospan itself runs locally without a separate inference service. Size the machine for the selected workers, their subprocesses, and trajectory storage rather than for model weights; resource use depends on the harness and job concurrency. v0.1.3 added batch waiting and cross-worktree lookup; v0.1.4 added Grok Build and inline --wait; v0.2.0 added the programmable flow layer.
cospan CLI, native host plugins, and a stdio MCP server.agy, codex, claude, dsh, and grok.observe snapshots are capped at 8 KiB; raw trajectories live under ~/.cospan/trajectories/.send, individual or batch waiting, and continue cover dispatch through follow-up.agent, synthesize, orchestrate, and refine via cospan/flow.Teams already using two or more supported coding-agent CLIs that want independent reviews, resumable handoffs, or reusable JavaScript workflows without blocking the host session.
One harness is enough, direct CLI calls cover occasional handoffs, or you need a fully offline inference stack or centralized controls over provider data and quotas.
Quick Start & Installation
git clone https://github.com/keli-wen/cospan.git ~/.cospan/repo node ~/.cospan/repo/bin/cospan.mjs install --host agy
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| cospan ★ | 166 | +86 | JavaScript | MIT | Local MCP and CLI orchestration for background jobs across coding agents |
| agent-skills | 122.5k | +1.7k | JavaScript | MIT | A modular skill pack for consistent coding-agent workflows, from spec to release |
| archify | 103.1k | +2k | JavaScript | Apache-2.0 | Agent skill and Node CLI for source-backed, interactive architecture diagrams. |
| graphify | 156.8k | +2.4k | Python | Apache-2.0 | Local AST graphs for dependency tracing, with CLI and MCP access. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/keli-wen/cospan.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about cospan
How does Cospan connect a host agent to another harness?
Does Cospan need a GPU, and what determines its local resource usage?
Can a company use Cospan commercially and keep it on its own machines?
When is Cospan a better fit than direct CLI calls or shell scripts?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy