Skip to main content

CoDD: Coherence-Driven Development — cross-artifact change impact analysis

Project description

CoDD — Coherence-Driven Development
Keep AI-built systems coherent when requirements change.

PyPI Python License Stars

日本語 | English


Harnesses tell agents how to work. CoDD keeps artifacts coherent.

pip install codd-dev

Public Alphainit / scan / impact / validate are stable today.


Why CoDD?

AI can generate code from specs. But what happens when requirements change mid-project?

  • Which design docs are affected?
  • Which tests need updating?
  • Which API contracts broke?
  • Did anyone forget to update the database migration?

Spec Kit and OpenSpec answer "how do I start?" CoDD answers "how do I keep going when things change?"

How It Works

Requirements (human)  →  Design docs (AI)  →  Code & tests (AI)
                              ↑
                    codd scan builds the
                     dependency graph
                              ↓
            Something changes? codd impact tells you
             exactly what's affected — automatically.

The Three Layers

Harness (CLAUDE.md, Hooks, Skills)   ← Rules, guardrails, workflow
  └─ CoDD (methodology)              ← Coherence across changes
       └─ Design docs (docs/*.md)    ← Artifacts CoDD manages

CoDD is harness-agnostic — works with Claude Code, Copilot, Cursor, or any agent framework.

Core Principle: Derive, Don't Configure

Architecture Derived test strategy Config needed?
Next.js + Supabase vitest + Playwright None
FastAPI + Python pytest + httpx None
CLI tool in Go go test None

Upstream determines downstream. You define requirements and constraints. AI derives everything else.

Quick Start

# Install
pip install codd-dev

# Initialize a new project
codd init --project-name "my-project" --language "typescript"

# Build the dependency graph from frontmatter
codd scan

# What breaks if I change this?
codd impact --diff HEAD~1

Impact Analysis Output

Changed: docs/requirements/requirements.md

Green Band (high confidence — auto-propagate)
  design:system-design    depth:1  confidence:0.90
  design:api-design       depth:1  confidence:0.90
  detail:db-design        depth:2  confidence:0.90

Amber Band (review needed)
  detail:auth-design      depth:2  confidence:0.90

Gray Band (informational)
  test:test-strategy      depth:2  confidence:0.00

One change, every affected artifact identified with confidence levels.

Wave-Based Generation

Design docs are generated in dependency order — each Wave depends on the previous:

Wave 1  Acceptance criteria + ADR       ← requirements only
Wave 2  System design                   ← req + Wave 1
Wave 3  DB design + API design          ← req + Wave 1-2
Wave 4  UI/UX design                    ← req + Wave 1-3
Wave 5  Implementation plan             ← all above

Verification runs bottom-up (V-Model):

Unit tests        ← verifies detailed design
Integration       ← verifies system design
E2E / System      ← verifies requirements + acceptance criteria

Frontmatter = Single Source of Truth

Dependencies are declared in Markdown frontmatter. No separate config files.

---
codd:
  node_id: "design:api-design"
  depends_on:
    - id: "design:system-design"
      relation: derives_from
    - id: "req:lms-requirements-v2.0"
      relation: implements
---

graph.db is a cache — regenerated on every codd scan.

Commands

Command Status Description
codd init Stable Initialize CoDD in any project
codd scan Stable Build dependency graph from frontmatter
codd impact Stable Change impact analysis (Green / Amber / Gray)
codd validate Alpha Frontmatter integrity & graph consistency check
codd generate Experimental Generate design docs in Wave order
codd plan Experimental Wave execution status
codd verify Experimental V-Model verification
codd implement Experimental Design-to-code generation

Claude Code Integration

CoDD ships with slash-command Skills for Claude Code. Combine with hooks for automatic coherence:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{
        "type": "command",
        "command": "codd scan --path ."
      }]
    }]
  }
}

Every file edit triggers codd scan — the dependency graph stays current without thinking about it.

See docs/claude-code-setup.md for complete setup.

Comparison

Spec Kit OpenSpec CoDD
Spec-first generation Yes Yes Yes
Change propagation No No Dependency graph + impact analysis
Derive test strategy No No Automatic from architecture
V-Model verification No No Unit → Integration → E2E
Impact analysis No No codd impact --diff HEAD~1
Harness-agnostic Copilot focused Multi-agent Any harness

Real-World Usage

Dogfooded on a production LMS — 18 design docs connected by a dependency graph. All docs, code, and tests generated by AI following CoDD. When requirements changed mid-project, codd impact identified affected artifacts and AI fixed them automatically.

docs/
├── requirements/       # What to build (human input)
├── design/             # System design, API, DB, UI (6 files)
├── detailed_design/    # Module-level specs (4 files)
├── governance/         # ADRs (3 files)
├── plan/               # Implementation plan
├── test/               # Acceptance criteria, test strategy
├── operations/         # Runbooks
└── infra/              # Infrastructure design

Roadmap

  • Semantic dependency types (requires, affects, verifies, implements)
  • codd extract — reverse-generate design docs from existing codebases (brownfield support)
  • codd verify — full docs-code-tests coherence check
  • Multi-harness integration examples (Claude Code, Copilot, Cursor)
  • VS Code extension for impact visualization

Articles

License

MIT

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

codd_dev-0.2.0a4.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

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

codd_dev-0.2.0a4-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file codd_dev-0.2.0a4.tar.gz.

File metadata

  • Download URL: codd_dev-0.2.0a4.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codd_dev-0.2.0a4.tar.gz
Algorithm Hash digest
SHA256 186f640b6d09dda2ed4442dbd89684f77e799bc7d68d9f245dd554110b84dc07
MD5 7cc51c20c9d329adf3ff3add39c37bf6
BLAKE2b-256 8d1c3bd76779a565ac3fdeb8c234f7bc4f1485999b568341d4b8f84fc5f9bff3

See more details on using hashes here.

File details

Details for the file codd_dev-0.2.0a4-py3-none-any.whl.

File metadata

  • Download URL: codd_dev-0.2.0a4-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codd_dev-0.2.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 6013fb8afb691b46c7aff62451e968e59e481c26f0d00e6b9ac585801934c8d8
MD5 2dadacaadd487304b90b19d61af5552e
BLAKE2b-256 5c5d73f3c8ccd40546643545cc4ff48c50945d986b1ce41aeea097843aec867d

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