Skip to main content

Collaborative Brainstorming and LLM Development — spec-driven development with a brainstorming phase and agent-managed state documents

Project description

CoBILD — Collaborative Brainstorming and LLM Development

CoBILD is a form of spec-driven development with two additions:

  1. Brainstorming mode. Before any implementation, the user and the agent collaborate on the spec — clarifying questions, alternatives, trade-offs — and capture the converged result in SPEC.md.
  2. An agent-managed state document. Each spec scope has a .state.yaml recording how the actual implementation relates to the spec: which components are implemented, partial, missing, or drifted. It is analogous to React's virtual DOM: just as the virtual DOM makes a declarative UI interface efficient, the state document makes a declarative interface to agentic coding efficient — the agent reads the state document instead of re-deriving the codebase's relationship to the spec, and reconciles only when files have actually changed.

Scopes

Any directory containing a SPEC.md is a scope. A repo typically has a top-level SPEC.md; subdirectories may add their own for more detail. A scope owns its subtree minus nested scopes, and each scope has its own .state.yaml next to its spec.

How reconciliation works

A scope is stale when its .state.yaml is missing, older than the most recent file change in the scope, or its recorded spec digest no longer matches SPEC.md. Reconciliation takes the changed files, the spec, and the previous state, and produces an updated state document. The mechanical parts (staleness detection, context bundling, validation, writing) live in this library; the judgment (comparing code to spec) is done by the agent.

Python API

from cobild import (
    Scope, find_scopes, check_repo, check_staleness,
    prepare_reconciliation, apply_reconciliation, load_state,
)

scopes = find_scopes("path/to/repo")        # every dir with a SPEC.md
reports = check_repo("path/to/repo")        # staleness report per scope

scope = scopes[0]
if check_staleness(scope).stale:
    bundle = prepare_reconciliation(scope)  # spec text, prior state, changed files
    # ... agent compares bundle["spec_text"] against the changed files ...
    apply_reconciliation(scope, {
        "summary": "Auth and routing implemented; rate limiting pending.",
        "components": [
            {"name": "auth", "status": "implemented", "files": ["auth.py"]},
            {"name": "rate-limiting", "status": "missing"},
        ],
        "drift": [
            {"kind": "missing", "description": "spec requires rate limiting"},
        ],
    })

state = load_state(scope)
state.in_sync  # False — drift recorded

apply_reconciliation validates the document (component statuses: implemented | partial | missing | drifted | extra; drift kinds: missing | incomplete | divergent | undocumented | stale-spec) and stamps the spec digest and timestamp automatically.

MCP server

The cobild-mcp stdio server helps agents follow the process:

Tool Purpose
cobild_process The full process guide: brainstorm → SPEC.md → implement → reconcile
cobild_list_scopes All scopes under a root, with state-file presence
cobild_check_repo / cobild_check_staleness Is .state.yaml older than the latest changes?
cobild_prepare_reconciliation Spec text + previous state + changed files for a stale scope
cobild_apply_reconciliation Validate and write the updated state document
cobild_init_scope Capture a brainstormed spec as a new SPEC.md

It also exposes a brainstorm prompt that puts the agent into brainstorming mode (questions and trade-offs only, no code) until the user signs off on the spec.

Register with Claude Code:

claude mcp add cobild -- uv run --directory /path/to/cobild cobild-mcp

Development

uv sync          # install dependencies
uv run pytest    # run the test suite

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cobild-0.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cobild-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file cobild-0.1.0.tar.gz.

File metadata

  • Download URL: cobild-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for cobild-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eacb3c866080e4b28ed84ebd5e5f38481784fdb5ae69c7264e74f62d4de654db
MD5 0d9f63e6b1fb0056e38a1c75374fccad
BLAKE2b-256 f07c3a98b6464dea16dcea89002111bab8a7ed0cee533dca2ebecceccfcbbd0e

See more details on using hashes here.

File details

Details for the file cobild-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cobild-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for cobild-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c99fffc8f289cab063d8c32205a70341efd57157790991b93e9ec40b9a966aa
MD5 1e4bb65ac3ca92ed4c29387eeb40cfde
BLAKE2b-256 510ee7b08e8b487d68d5859919082a7ab78d35a0cb31942b2cdff31dc6b94929

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page