CoBILD
Collaborative Brainstorming and LLM Development: a small MCP server and Python library for running spec-driven development with coding agents.
CoBILD adds two habits to normal spec-driven development:
- Brainstorm before implementation. The user and agent clarify goals, trade-offs, constraints, and edge cases before code changes begin.
- Keep agent-readable state. Each spec scope has a paired state file that records how the current implementation relates to its spec.
The result is a workflow where the spec remains the durable source of intent, and the state file gives agents a fast, explicit place to see what is already implemented, what is missing, and where reality has drifted.
Install
Run the MCP server directly from PyPI with uvx:
uvx --from cobild cobild-mcp
Register With An Agent
CoBILD is exposed as a stdio MCP server. Any MCP-compatible coding agent can run it with this command:
uvx --from cobild cobild-mcp
For Claude Code:
claude mcp add cobild -- uvx --from cobild cobild-mcp
For Codex:
codex mcp add cobild -- uvx --from cobild cobild-mcp
For Hermes Agent:
hermes mcp add cobild --command uvx --args --from cobild cobild-mcp
Or add the server directly to ~/.hermes/config.yaml:
mcp_servers:
cobild:
command: "uvx"
args: ["--from", "cobild", "cobild-mcp"]
Generic MCP JSON configuration:
{
"mcpServers": {
"cobild": {
"command": "uvx",
"args": ["--from", "cobild", "cobild-mcp"]
}
}
}
Agent Workflow
Tell your coding agent to use CoBILD before it starts a feature:
Use the cobild MCP server for this work. Start with cobild_process, brainstorm
the spec with me first, write or update SPEC.md or a focused *.spec.md when
we agree, implement only after that, then reconcile the paired state file
before you finish.
The intended loop is:
- Call
cobild_processto load the workflow. - Brainstorm with the user until the spec is clear.
- Create or update
SPEC.mdor a focused*.spec.md. - Implement against the spec.
- Run
cobild_check_repoorcobild_check_staleness. - For stale scopes, run
cobild_prepare_reconciliation. - Compare the changed files to the spec.
- Finish with
cobild_apply_reconciliation.
Scopes
Any SPEC.md or *.spec.md file is a scope. The scope root is the spec
file's containing directory. A scope owns its subtree except for nested
directories that have their own specs. If SPEC.md and one or more
*.spec.md files exist in the same directory, they are separate scopes.
Legacy SPEC.md scopes use STATE.yaml. Arbitrary *.spec.md scopes use the
same basename with .state.yaml: auth.spec.md pairs with
auth.state.yaml, and cad.intent.spec.md pairs with
cad.intent.state.yaml.
Example:
my-app/
SPEC.md # top-level product/system spec
STATE.yaml # top-level implementation state
auth.spec.md # focused auth spec
auth.state.yaml # focused auth implementation state
api/
SPEC.md # deeper API-specific spec
STATE.yaml # API-specific implementation state
Each state file records:
- the digest of the spec it was reconciled against
- when reconciliation happened
- implementation status for spec components
- concrete drift between the spec and code
This repository is itself a CoBILD scope; see SPEC.md and the
adjacent STATE.yaml for a small self-hosted example.
MCP Tools
| Tool | Purpose |
|---|---|
cobild_process |
Return the full CoBILD workflow for agents. |
cobild_version |
Return the installed package version served by the MCP server. |
cobild_list_scopes |
List spec scopes under a root. |
cobild_check_repo |
Check every scope for stale state. |
cobild_check_staleness |
Check one scope for stale state. |
cobild_prepare_reconciliation |
Return spec text, previous state, staleness info, and changed file contents. |
cobild_apply_reconciliation |
Validate and write an updated paired state file. |
cobild_init_scope |
Create a new scope by writing SPEC.md. |
The server also exposes a brainstorm prompt that puts an agent into
questions-and-trade-offs mode before implementation.
Python API
from cobild import (
Scope,
apply_reconciliation,
check_staleness,
find_scopes,
load_state,
prepare_reconciliation,
)
scopes = find_scopes("path/to/repo")
scope = scopes[0]
if check_staleness(scope).stale:
bundle = prepare_reconciliation(scope)
# The agent compares bundle["spec_text"] with bundle["changed_file_contents"].
apply_reconciliation(
scope,
{
"summary": "Auth is implemented; rate limiting is still missing.",
"components": [
{"name": "auth", "status": "implemented", "files": ["auth.py"]},
{"name": "rate-limiting", "status": "missing"},
],
"drift": [
{
"kind": "missing",
"description": "The spec requires rate limiting.",
}
],
},
)
state = load_state(scope)
assert not state.in_sync
Component statuses:
implemented | partial | missing | drifted | extra
Drift kinds:
missing | incomplete | divergent | undocumented | stale-spec
Development
uv sync
uv run pytest
uv build
To run the MCP server from a local checkout:
uv run cobild-mcp
To register a local checkout with an agent:
claude mcp add cobild -- uv run --directory /path/to/cobild cobild-mcp
codex mcp add cobild -- uv run --directory /path/to/cobild cobild-mcp
hermes mcp add cobild --command uv --args run --directory /path/to/cobild cobild-mcp
License
MIT. See LICENSE.
Metadata
Release files for cobild 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cobild-0.3.0.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cobild-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / cobild-0.3.0.tar.gz
| Download URL | cobild-0.3.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cb03ed88a4675bd42558aa2c396fea86c6bb106834a2202f1bef260cfef9da7
|
|
BLAKE2b-256 checksum How to use checksums |
70446e13ca9cb762e48a35f46522464e8fa22a4aa6e3e1325fdee76ff4640f2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cobild-0.3.0-py3-none-any.whl
| Download URL | cobild-0.3.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8afa7e6cd0aac296e99d639373955278b5131d0e47cf392023e6cbbaba1e8059
|
|
BLAKE2b-256 checksum How to use checksums |
ebf1b84e33156c467390f644a6e144a41b1a9a9f204d49f5518c1a924f1b4e82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|