codd-dev 0.2.0a1__tar.gz → 0.2.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/.gitignore +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/LICENSE +0 -0
- codd_dev-0.2.0a2/PKG-INFO +250 -0
- codd_dev-0.2.0a2/README.md +223 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/__init__.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/cli.py +2 -2
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/config.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/defaults.yaml +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/generator.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/graph.py +10 -5
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/hooks.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/implementer.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/planner.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/propagate.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/scanner.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/codd.yaml.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/conventions.yaml.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/data_dependencies.yaml.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/doc_links.yaml.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/gitignore.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2/codd}/templates/overrides.yaml.tmpl +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/validator.py +1 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/codd/verifier.py +0 -0
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/pyproject.toml +5 -5
- codd_dev-0.2.0a1/PKG-INFO +0 -241
- codd_dev-0.2.0a1/README.md +0 -214
- {codd_dev-0.2.0a1 → codd_dev-0.2.0a2}/hooks/pre-commit +0 -0
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codd-dev
|
|
3
|
+
Version: 0.2.0a2
|
|
4
|
+
Summary: CoDD: Coherence-Driven Development — cross-artifact change impact analysis
|
|
5
|
+
Project-URL: Homepage, https://github.com/yohey-w/codd-dev
|
|
6
|
+
Project-URL: Repository, https://github.com/yohey-w/codd-dev
|
|
7
|
+
Project-URL: Issues, https://github.com/yohey-w/codd-dev/issues
|
|
8
|
+
Author-email: Yohei Watanabe <yohey-w@users.noreply.github.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: change-impact,claude-code,dependency-graph,plugin,software-engineering
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: click>=8.0
|
|
19
|
+
Requires-Dist: pyyaml>=6.0
|
|
20
|
+
Provides-Extra: mcp
|
|
21
|
+
Provides-Extra: scan
|
|
22
|
+
Requires-Dist: tree-sitter-java>=0.22; extra == 'scan'
|
|
23
|
+
Requires-Dist: tree-sitter-python>=0.22; extra == 'scan'
|
|
24
|
+
Requires-Dist: tree-sitter-typescript>=0.22; extra == 'scan'
|
|
25
|
+
Requires-Dist: tree-sitter>=0.22; extra == 'scan'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<strong>CoDD — Coherence-Driven Development</strong><br>
|
|
30
|
+
<em>Keep AI-built systems coherent when requirements change.</em>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<a href="https://pypi.org/project/codd-dev/"><img src="https://img.shields.io/pypi/v/codd-dev?style=flat-square&color=blue" alt="PyPI"></a>
|
|
35
|
+
<a href="https://pypi.org/project/codd-dev/"><img src="https://img.shields.io/pypi/pyversions/codd-dev?style=flat-square" alt="Python"></a>
|
|
36
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License"></a>
|
|
37
|
+
<a href="https://github.com/yohey-w/codd-dev/stargazers"><img src="https://img.shields.io/github/stars/yohey-w/codd-dev?style=flat-square" alt="Stars"></a>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<a href="README_ja.md">日本語</a> | English
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
> *Harnesses tell agents how to work. CoDD keeps artifacts coherent.*
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pip install codd-dev
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Public Alpha** — `init` / `scan` / `impact` / `validate` are stable today.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Why CoDD?
|
|
57
|
+
|
|
58
|
+
AI can generate code from specs. But what happens when **requirements change mid-project?**
|
|
59
|
+
|
|
60
|
+
- Which design docs are affected?
|
|
61
|
+
- Which tests need updating?
|
|
62
|
+
- Which API contracts broke?
|
|
63
|
+
- Did anyone forget to update the database migration?
|
|
64
|
+
|
|
65
|
+
**Spec Kit** and **OpenSpec** answer *"how do I start?"*
|
|
66
|
+
**CoDD** answers *"how do I keep going when things change?"*
|
|
67
|
+
|
|
68
|
+
## How It Works
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Requirements (human) → Design docs (AI) → Code & tests (AI)
|
|
72
|
+
↑
|
|
73
|
+
codd scan builds the
|
|
74
|
+
dependency graph
|
|
75
|
+
↓
|
|
76
|
+
Something changes? codd impact tells you
|
|
77
|
+
exactly what's affected — automatically.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### The Three Layers
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Harness (CLAUDE.md, Hooks, Skills) ← Rules, guardrails, workflow
|
|
84
|
+
└─ CoDD (methodology) ← Coherence across changes
|
|
85
|
+
└─ Design docs (docs/*.md) ← Artifacts CoDD manages
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
CoDD is **harness-agnostic** — works with Claude Code, Copilot, Cursor, or any agent framework.
|
|
89
|
+
|
|
90
|
+
## Core Principle: Derive, Don't Configure
|
|
91
|
+
|
|
92
|
+
| Architecture | Derived test strategy | Config needed? |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Next.js + Supabase | vitest + Playwright | None |
|
|
95
|
+
| FastAPI + Python | pytest + httpx | None |
|
|
96
|
+
| CLI tool in Go | go test | None |
|
|
97
|
+
|
|
98
|
+
**Upstream determines downstream.** You define requirements and constraints. AI derives everything else.
|
|
99
|
+
|
|
100
|
+
## Quick Start
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Install
|
|
104
|
+
pip install codd-dev
|
|
105
|
+
|
|
106
|
+
# Initialize a new project
|
|
107
|
+
codd init --project-name "my-project" --language "typescript"
|
|
108
|
+
|
|
109
|
+
# Build the dependency graph from frontmatter
|
|
110
|
+
codd scan
|
|
111
|
+
|
|
112
|
+
# What breaks if I change this?
|
|
113
|
+
codd impact --diff HEAD~1
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Impact Analysis Output
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Changed: docs/requirements/requirements.md
|
|
120
|
+
|
|
121
|
+
Green Band (high confidence — auto-propagate)
|
|
122
|
+
design:system-design depth:1 confidence:0.90
|
|
123
|
+
design:api-design depth:1 confidence:0.90
|
|
124
|
+
detail:db-design depth:2 confidence:0.90
|
|
125
|
+
|
|
126
|
+
Amber Band (review needed)
|
|
127
|
+
detail:auth-design depth:2 confidence:0.90
|
|
128
|
+
|
|
129
|
+
Gray Band (informational)
|
|
130
|
+
test:test-strategy depth:2 confidence:0.00
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
One change, every affected artifact identified with confidence levels.
|
|
134
|
+
|
|
135
|
+
## Wave-Based Generation
|
|
136
|
+
|
|
137
|
+
Design docs are generated in dependency order — each Wave depends on the previous:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Wave 1 Acceptance criteria + ADR ← requirements only
|
|
141
|
+
Wave 2 System design ← req + Wave 1
|
|
142
|
+
Wave 3 DB design + API design ← req + Wave 1-2
|
|
143
|
+
Wave 4 UI/UX design ← req + Wave 1-3
|
|
144
|
+
Wave 5 Implementation plan ← all above
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Verification runs bottom-up (V-Model):
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
Unit tests ← verifies detailed design
|
|
151
|
+
Integration ← verifies system design
|
|
152
|
+
E2E / System ← verifies requirements + acceptance criteria
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Frontmatter = Single Source of Truth
|
|
156
|
+
|
|
157
|
+
Dependencies are declared in Markdown frontmatter. No separate config files.
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
---
|
|
161
|
+
codd:
|
|
162
|
+
node_id: "design:api-design"
|
|
163
|
+
depends_on:
|
|
164
|
+
- id: "design:system-design"
|
|
165
|
+
relation: derives_from
|
|
166
|
+
- id: "req:lms-requirements-v2.0"
|
|
167
|
+
relation: implements
|
|
168
|
+
---
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`graph.db` is a cache — regenerated on every `codd scan`.
|
|
172
|
+
|
|
173
|
+
## Commands
|
|
174
|
+
|
|
175
|
+
| Command | Status | Description |
|
|
176
|
+
|---------|--------|-------------|
|
|
177
|
+
| `codd init` | **Stable** | Initialize CoDD in any project |
|
|
178
|
+
| `codd scan` | **Stable** | Build dependency graph from frontmatter |
|
|
179
|
+
| `codd impact` | **Stable** | Change impact analysis (Green / Amber / Gray) |
|
|
180
|
+
| `codd validate` | **Alpha** | Frontmatter integrity & graph consistency check |
|
|
181
|
+
| `codd generate` | Experimental | Generate design docs in Wave order |
|
|
182
|
+
| `codd plan` | Experimental | Wave execution status |
|
|
183
|
+
| `codd verify` | Experimental | V-Model verification |
|
|
184
|
+
| `codd implement` | Experimental | Design-to-code generation |
|
|
185
|
+
|
|
186
|
+
## Claude Code Integration
|
|
187
|
+
|
|
188
|
+
CoDD ships with slash-command Skills for Claude Code. Combine with hooks for automatic coherence:
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"hooks": {
|
|
193
|
+
"PostToolUse": [{
|
|
194
|
+
"matcher": "Edit|Write",
|
|
195
|
+
"hooks": [{
|
|
196
|
+
"type": "command",
|
|
197
|
+
"command": "codd scan --path ."
|
|
198
|
+
}]
|
|
199
|
+
}]
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Every file edit triggers `codd scan` — the dependency graph stays current without thinking about it.
|
|
205
|
+
|
|
206
|
+
See [docs/claude-code-setup.md](docs/claude-code-setup.md) for complete setup.
|
|
207
|
+
|
|
208
|
+
## Comparison
|
|
209
|
+
|
|
210
|
+
| | Spec Kit | OpenSpec | **CoDD** |
|
|
211
|
+
|--|----------|---------|----------|
|
|
212
|
+
| Spec-first generation | Yes | Yes | Yes |
|
|
213
|
+
| **Change propagation** | No | No | **Dependency graph + impact analysis** |
|
|
214
|
+
| **Derive test strategy** | No | No | **Automatic from architecture** |
|
|
215
|
+
| **V-Model verification** | No | No | **Unit → Integration → E2E** |
|
|
216
|
+
| **Impact analysis** | No | No | **`codd impact --diff HEAD~1`** |
|
|
217
|
+
| Harness-agnostic | Copilot focused | Multi-agent | **Any harness** |
|
|
218
|
+
|
|
219
|
+
## Real-World Usage
|
|
220
|
+
|
|
221
|
+
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.
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
docs/
|
|
225
|
+
├── requirements/ # What to build (human input)
|
|
226
|
+
├── design/ # System design, API, DB, UI (6 files)
|
|
227
|
+
├── detailed_design/ # Module-level specs (4 files)
|
|
228
|
+
├── governance/ # ADRs (3 files)
|
|
229
|
+
├── plan/ # Implementation plan
|
|
230
|
+
├── test/ # Acceptance criteria, test strategy
|
|
231
|
+
├── operations/ # Runbooks
|
|
232
|
+
└── infra/ # Infrastructure design
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Roadmap
|
|
236
|
+
|
|
237
|
+
- [ ] Semantic dependency types (`requires`, `affects`, `verifies`, `implements`)
|
|
238
|
+
- [ ] `codd extract` — reverse-generate design docs from existing codebases (brownfield support)
|
|
239
|
+
- [ ] `codd verify` — full docs-code-tests coherence check
|
|
240
|
+
- [ ] Multi-harness integration examples (Claude Code, Copilot, Cursor)
|
|
241
|
+
- [ ] VS Code extension for impact visualization
|
|
242
|
+
|
|
243
|
+
## Articles
|
|
244
|
+
|
|
245
|
+
- [Zenn (Japanese): CoDD deep-dive](https://zenn.dev/shio_shoppaize/articles/shogun-codd-coherence)
|
|
246
|
+
- [dev.to (English): What Happens After "Spec First"](https://dev.to/yohey-w/codd-coherence-driven-development-what-happens-after-spec-first-514f)
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
MIT
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<strong>CoDD — Coherence-Driven Development</strong><br>
|
|
3
|
+
<em>Keep AI-built systems coherent when requirements change.</em>
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://pypi.org/project/codd-dev/"><img src="https://img.shields.io/pypi/v/codd-dev?style=flat-square&color=blue" alt="PyPI"></a>
|
|
8
|
+
<a href="https://pypi.org/project/codd-dev/"><img src="https://img.shields.io/pypi/pyversions/codd-dev?style=flat-square" alt="Python"></a>
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License"></a>
|
|
10
|
+
<a href="https://github.com/yohey-w/codd-dev/stargazers"><img src="https://img.shields.io/github/stars/yohey-w/codd-dev?style=flat-square" alt="Stars"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="README_ja.md">日本語</a> | English
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
> *Harnesses tell agents how to work. CoDD keeps artifacts coherent.*
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
pip install codd-dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Public Alpha** — `init` / `scan` / `impact` / `validate` are stable today.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Why CoDD?
|
|
30
|
+
|
|
31
|
+
AI can generate code from specs. But what happens when **requirements change mid-project?**
|
|
32
|
+
|
|
33
|
+
- Which design docs are affected?
|
|
34
|
+
- Which tests need updating?
|
|
35
|
+
- Which API contracts broke?
|
|
36
|
+
- Did anyone forget to update the database migration?
|
|
37
|
+
|
|
38
|
+
**Spec Kit** and **OpenSpec** answer *"how do I start?"*
|
|
39
|
+
**CoDD** answers *"how do I keep going when things change?"*
|
|
40
|
+
|
|
41
|
+
## How It Works
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Requirements (human) → Design docs (AI) → Code & tests (AI)
|
|
45
|
+
↑
|
|
46
|
+
codd scan builds the
|
|
47
|
+
dependency graph
|
|
48
|
+
↓
|
|
49
|
+
Something changes? codd impact tells you
|
|
50
|
+
exactly what's affected — automatically.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### The Three Layers
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Harness (CLAUDE.md, Hooks, Skills) ← Rules, guardrails, workflow
|
|
57
|
+
└─ CoDD (methodology) ← Coherence across changes
|
|
58
|
+
└─ Design docs (docs/*.md) ← Artifacts CoDD manages
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
CoDD is **harness-agnostic** — works with Claude Code, Copilot, Cursor, or any agent framework.
|
|
62
|
+
|
|
63
|
+
## Core Principle: Derive, Don't Configure
|
|
64
|
+
|
|
65
|
+
| Architecture | Derived test strategy | Config needed? |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| Next.js + Supabase | vitest + Playwright | None |
|
|
68
|
+
| FastAPI + Python | pytest + httpx | None |
|
|
69
|
+
| CLI tool in Go | go test | None |
|
|
70
|
+
|
|
71
|
+
**Upstream determines downstream.** You define requirements and constraints. AI derives everything else.
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Install
|
|
77
|
+
pip install codd-dev
|
|
78
|
+
|
|
79
|
+
# Initialize a new project
|
|
80
|
+
codd init --project-name "my-project" --language "typescript"
|
|
81
|
+
|
|
82
|
+
# Build the dependency graph from frontmatter
|
|
83
|
+
codd scan
|
|
84
|
+
|
|
85
|
+
# What breaks if I change this?
|
|
86
|
+
codd impact --diff HEAD~1
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Impact Analysis Output
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Changed: docs/requirements/requirements.md
|
|
93
|
+
|
|
94
|
+
Green Band (high confidence — auto-propagate)
|
|
95
|
+
design:system-design depth:1 confidence:0.90
|
|
96
|
+
design:api-design depth:1 confidence:0.90
|
|
97
|
+
detail:db-design depth:2 confidence:0.90
|
|
98
|
+
|
|
99
|
+
Amber Band (review needed)
|
|
100
|
+
detail:auth-design depth:2 confidence:0.90
|
|
101
|
+
|
|
102
|
+
Gray Band (informational)
|
|
103
|
+
test:test-strategy depth:2 confidence:0.00
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
One change, every affected artifact identified with confidence levels.
|
|
107
|
+
|
|
108
|
+
## Wave-Based Generation
|
|
109
|
+
|
|
110
|
+
Design docs are generated in dependency order — each Wave depends on the previous:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Wave 1 Acceptance criteria + ADR ← requirements only
|
|
114
|
+
Wave 2 System design ← req + Wave 1
|
|
115
|
+
Wave 3 DB design + API design ← req + Wave 1-2
|
|
116
|
+
Wave 4 UI/UX design ← req + Wave 1-3
|
|
117
|
+
Wave 5 Implementation plan ← all above
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Verification runs bottom-up (V-Model):
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Unit tests ← verifies detailed design
|
|
124
|
+
Integration ← verifies system design
|
|
125
|
+
E2E / System ← verifies requirements + acceptance criteria
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Frontmatter = Single Source of Truth
|
|
129
|
+
|
|
130
|
+
Dependencies are declared in Markdown frontmatter. No separate config files.
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
---
|
|
134
|
+
codd:
|
|
135
|
+
node_id: "design:api-design"
|
|
136
|
+
depends_on:
|
|
137
|
+
- id: "design:system-design"
|
|
138
|
+
relation: derives_from
|
|
139
|
+
- id: "req:lms-requirements-v2.0"
|
|
140
|
+
relation: implements
|
|
141
|
+
---
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`graph.db` is a cache — regenerated on every `codd scan`.
|
|
145
|
+
|
|
146
|
+
## Commands
|
|
147
|
+
|
|
148
|
+
| Command | Status | Description |
|
|
149
|
+
|---------|--------|-------------|
|
|
150
|
+
| `codd init` | **Stable** | Initialize CoDD in any project |
|
|
151
|
+
| `codd scan` | **Stable** | Build dependency graph from frontmatter |
|
|
152
|
+
| `codd impact` | **Stable** | Change impact analysis (Green / Amber / Gray) |
|
|
153
|
+
| `codd validate` | **Alpha** | Frontmatter integrity & graph consistency check |
|
|
154
|
+
| `codd generate` | Experimental | Generate design docs in Wave order |
|
|
155
|
+
| `codd plan` | Experimental | Wave execution status |
|
|
156
|
+
| `codd verify` | Experimental | V-Model verification |
|
|
157
|
+
| `codd implement` | Experimental | Design-to-code generation |
|
|
158
|
+
|
|
159
|
+
## Claude Code Integration
|
|
160
|
+
|
|
161
|
+
CoDD ships with slash-command Skills for Claude Code. Combine with hooks for automatic coherence:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"hooks": {
|
|
166
|
+
"PostToolUse": [{
|
|
167
|
+
"matcher": "Edit|Write",
|
|
168
|
+
"hooks": [{
|
|
169
|
+
"type": "command",
|
|
170
|
+
"command": "codd scan --path ."
|
|
171
|
+
}]
|
|
172
|
+
}]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Every file edit triggers `codd scan` — the dependency graph stays current without thinking about it.
|
|
178
|
+
|
|
179
|
+
See [docs/claude-code-setup.md](docs/claude-code-setup.md) for complete setup.
|
|
180
|
+
|
|
181
|
+
## Comparison
|
|
182
|
+
|
|
183
|
+
| | Spec Kit | OpenSpec | **CoDD** |
|
|
184
|
+
|--|----------|---------|----------|
|
|
185
|
+
| Spec-first generation | Yes | Yes | Yes |
|
|
186
|
+
| **Change propagation** | No | No | **Dependency graph + impact analysis** |
|
|
187
|
+
| **Derive test strategy** | No | No | **Automatic from architecture** |
|
|
188
|
+
| **V-Model verification** | No | No | **Unit → Integration → E2E** |
|
|
189
|
+
| **Impact analysis** | No | No | **`codd impact --diff HEAD~1`** |
|
|
190
|
+
| Harness-agnostic | Copilot focused | Multi-agent | **Any harness** |
|
|
191
|
+
|
|
192
|
+
## Real-World Usage
|
|
193
|
+
|
|
194
|
+
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.
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
docs/
|
|
198
|
+
├── requirements/ # What to build (human input)
|
|
199
|
+
├── design/ # System design, API, DB, UI (6 files)
|
|
200
|
+
├── detailed_design/ # Module-level specs (4 files)
|
|
201
|
+
├── governance/ # ADRs (3 files)
|
|
202
|
+
├── plan/ # Implementation plan
|
|
203
|
+
├── test/ # Acceptance criteria, test strategy
|
|
204
|
+
├── operations/ # Runbooks
|
|
205
|
+
└── infra/ # Infrastructure design
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Roadmap
|
|
209
|
+
|
|
210
|
+
- [ ] Semantic dependency types (`requires`, `affects`, `verifies`, `implements`)
|
|
211
|
+
- [ ] `codd extract` — reverse-generate design docs from existing codebases (brownfield support)
|
|
212
|
+
- [ ] `codd verify` — full docs-code-tests coherence check
|
|
213
|
+
- [ ] Multi-harness integration examples (Claude Code, Copilot, Cursor)
|
|
214
|
+
- [ ] VS Code extension for impact visualization
|
|
215
|
+
|
|
216
|
+
## Articles
|
|
217
|
+
|
|
218
|
+
- [Zenn (Japanese): CoDD deep-dive](https://zenn.dev/shio_shoppaize/articles/shogun-codd-coherence)
|
|
219
|
+
- [dev.to (English): What Happens After "Spec First"](https://dev.to/yohey-w/codd-coherence-driven-development-what-happens-after-spec-first-514f)
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT
|
|
File without changes
|
|
@@ -6,11 +6,11 @@ import os
|
|
|
6
6
|
import shutil
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
-
TEMPLATES_DIR = Path(__file__).parent
|
|
9
|
+
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@click.group()
|
|
13
|
-
@click.version_option(package_name="
|
|
13
|
+
@click.version_option(package_name="codd-dev")
|
|
14
14
|
def main():
|
|
15
15
|
"""CoDD: Coherence-Driven Development."""
|
|
16
16
|
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -189,7 +189,12 @@ class CEG:
|
|
|
189
189
|
|
|
190
190
|
def propagate_impact(self, start_node_id: str, max_depth: int = 10,
|
|
191
191
|
min_confidence: float = 0.0) -> dict:
|
|
192
|
-
"""BFS propagation from a changed node.
|
|
192
|
+
"""BFS propagation from a changed node.
|
|
193
|
+
|
|
194
|
+
Traces REVERSE direction: finds nodes that depend ON the changed node.
|
|
195
|
+
Edge semantics: source depends_on target (source → target).
|
|
196
|
+
When target changes, source is impacted. So follow incoming edges.
|
|
197
|
+
"""
|
|
193
198
|
visited = {}
|
|
194
199
|
queue = [(start_node_id, 0, [start_node_id])]
|
|
195
200
|
|
|
@@ -201,10 +206,10 @@ class CEG:
|
|
|
201
206
|
continue
|
|
202
207
|
visited[current] = {"depth": depth, "path": path}
|
|
203
208
|
|
|
204
|
-
for edge in self.
|
|
205
|
-
|
|
206
|
-
if
|
|
207
|
-
queue.append((
|
|
209
|
+
for edge in self.get_incoming_edges(current, min_confidence):
|
|
210
|
+
dependent = edge["source_id"]
|
|
211
|
+
if dependent not in visited:
|
|
212
|
+
queue.append((dependent, depth + 1, path + [dependent]))
|
|
208
213
|
|
|
209
214
|
if start_node_id in visited:
|
|
210
215
|
del visited[start_node_id]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codd-dev"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.0a2"
|
|
8
8
|
description = "CoDD: Coherence-Driven Development — cross-artifact change impact analysis"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -38,16 +38,16 @@ mcp = []
|
|
|
38
38
|
codd = "codd.cli:main"
|
|
39
39
|
|
|
40
40
|
[project.urls]
|
|
41
|
-
Homepage = "https://github.com/yohey-w/
|
|
42
|
-
Repository = "https://github.com/yohey-w/
|
|
43
|
-
Issues = "https://github.com/yohey-w/
|
|
41
|
+
Homepage = "https://github.com/yohey-w/codd-dev"
|
|
42
|
+
Repository = "https://github.com/yohey-w/codd-dev"
|
|
43
|
+
Issues = "https://github.com/yohey-w/codd-dev/issues"
|
|
44
44
|
|
|
45
45
|
[tool.hatch.build]
|
|
46
46
|
include = [
|
|
47
47
|
"codd/**/*.py",
|
|
48
48
|
"codd/**/*.yaml",
|
|
49
|
+
"codd/templates/**/*.tmpl",
|
|
49
50
|
"hooks/**/*",
|
|
50
|
-
"templates/**/*.tmpl",
|
|
51
51
|
"README.md",
|
|
52
52
|
"LICENSE",
|
|
53
53
|
]
|
codd_dev-0.2.0a1/PKG-INFO
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: codd-dev
|
|
3
|
-
Version: 0.2.0a1
|
|
4
|
-
Summary: CoDD: Coherence-Driven Development — cross-artifact change impact analysis
|
|
5
|
-
Project-URL: Homepage, https://github.com/yohey-w/shogun-codd
|
|
6
|
-
Project-URL: Repository, https://github.com/yohey-w/shogun-codd
|
|
7
|
-
Project-URL: Issues, https://github.com/yohey-w/shogun-codd/issues
|
|
8
|
-
Author-email: Yohei Watanabe <yohey-w@users.noreply.github.com>
|
|
9
|
-
License-Expression: MIT
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Keywords: change-impact,claude-code,dependency-graph,plugin,software-engineering
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
17
|
-
Requires-Python: >=3.10
|
|
18
|
-
Requires-Dist: click>=8.0
|
|
19
|
-
Requires-Dist: pyyaml>=6.0
|
|
20
|
-
Provides-Extra: mcp
|
|
21
|
-
Provides-Extra: scan
|
|
22
|
-
Requires-Dist: tree-sitter-java>=0.22; extra == 'scan'
|
|
23
|
-
Requires-Dist: tree-sitter-python>=0.22; extra == 'scan'
|
|
24
|
-
Requires-Dist: tree-sitter-typescript>=0.22; extra == 'scan'
|
|
25
|
-
Requires-Dist: tree-sitter>=0.22; extra == 'scan'
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
|
|
28
|
-
# CoDD — Coherence-Driven Development
|
|
29
|
-
|
|
30
|
-
**CoDD keeps AI-built systems coherent as requirements change.**
|
|
31
|
-
|
|
32
|
-
Give CoDD your requirements and constraints. AI generates the design top-down, derives implementation and test strategy from those artifacts, and traces change impact across a dependency graph — so nothing falls out of sync.
|
|
33
|
-
|
|
34
|
-
> *Harnesses tell agents how to work. CoDD keeps artifacts coherent.*
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
Harness (CLAUDE.md, AGENTS.md, Hooks, Skills) ← Rules, guardrails, flow
|
|
38
|
-
└─ CoDD (methodology) ← Operates on the harness flow
|
|
39
|
-
└─ Design docs (docs/*.md) ← Artifacts CoDD generates and maintains
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Public Alpha** — `pip install codd-dev` — init / scan / impact / validate are stable today.
|
|
43
|
-
|
|
44
|
-
## The Problem
|
|
45
|
-
|
|
46
|
-
AI can generate code from specs. But what happens when requirements change mid-project?
|
|
47
|
-
|
|
48
|
-
- Which design docs are affected?
|
|
49
|
-
- Which tests need updating?
|
|
50
|
-
- Which API contracts broke?
|
|
51
|
-
- Did anyone forget to update the database migration?
|
|
52
|
-
|
|
53
|
-
Spec-driven tools help you write specs first. They don't track what happens when those specs change. That's where CoDD comes in.
|
|
54
|
-
|
|
55
|
-
### Why not just AGENTS.md or hooks?
|
|
56
|
-
|
|
57
|
-
AGENTS.md, CLAUDE.md, and hooks are **harness infrastructure** — they tell agents how to behave. CoDD is a **coherence layer** that sits on top of any harness and keeps design artifacts, implementation, and tests in sync when requirements change. CoDD is harness-agnostic: it works with Claude Code, GitHub Copilot, Cursor, or any agent framework.
|
|
58
|
-
|
|
59
|
-
## Core Principle: Derive, Don't Configure
|
|
60
|
-
|
|
61
|
-
**Upstream artifacts + best practices = downstream is self-evident.**
|
|
62
|
-
|
|
63
|
-
- `system_design.md` says "Next.js + Supabase" → test strategy is vitest + Playwright. No config needed.
|
|
64
|
-
- `api_design.md` says "FastAPI" → pytest + httpx. No config needed.
|
|
65
|
-
- Requirements change → `codd impact` shows exactly what's affected.
|
|
66
|
-
|
|
67
|
-
You define requirements and constraints. AI derives everything else.
|
|
68
|
-
|
|
69
|
-
## How It Works
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Phase 1: Requirements (human) ─┐
|
|
73
|
-
Phase 2: Design generation (AI) │ V-Model left side
|
|
74
|
-
Phase 3: Scan (auto) │
|
|
75
|
-
Phase 4: Implementation (AI) ─┘
|
|
76
|
-
Phase 5: Verification (AI + human) ─── V-Model right side
|
|
77
|
-
Phase 6: Change impact analysis ─┐
|
|
78
|
-
Phase 7: Change propagation │ Continuous coherence
|
|
79
|
-
Phase 8: Customer review ─┘
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Design docs are generated in **Wave order** — each wave depends on the previous:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
Wave 1: Acceptance criteria + ADR (← requirements only)
|
|
86
|
-
Wave 2: System design (← req + Wave 1)
|
|
87
|
-
Wave 3: Database design + API design (← req + Wave 1-2)
|
|
88
|
-
Wave 4: UI/UX design (← req + Wave 1-3)
|
|
89
|
-
Wave 5: Implementation plan (← all above)
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Verification runs bottom-up (IPA Common Frame):
|
|
93
|
-
```
|
|
94
|
-
Unit tests ← verifies detailed design
|
|
95
|
-
Integration ← verifies system design
|
|
96
|
-
E2E / System ← verifies requirements + acceptance criteria
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Three Layers (Don't Confuse Them)
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
Harness (CLAUDE.md, Hooks, Skills) ← Rules, guardrails, flow
|
|
103
|
-
└─ CoDD (methodology) ← Operates on the harness flow
|
|
104
|
-
└─ Design docs (docs/*.md) ← Artifacts CoDD generates and maintains
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
- **Harness** = how agents work (any harness: Claude Code, Copilot, Cursor, etc.)
|
|
108
|
-
- **CoDD** = how artifacts stay coherent across changes
|
|
109
|
-
- **Docs** = what CoDD produces and maintains
|
|
110
|
-
|
|
111
|
-
CoDD is **harness-agnostic**. It runs on top of whatever agent framework you use.
|
|
112
|
-
|
|
113
|
-
## Quick Start
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
# Install
|
|
117
|
-
pip install codd-dev
|
|
118
|
-
|
|
119
|
-
# Initialize
|
|
120
|
-
codd init --project-name "my-project" --language "typescript"
|
|
121
|
-
|
|
122
|
-
# Scan — build dependency graph from frontmatter
|
|
123
|
-
codd scan
|
|
124
|
-
|
|
125
|
-
# Impact — what breaks if I change this?
|
|
126
|
-
codd impact --diff HEAD~1
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Real Project: Osato LMS
|
|
130
|
-
|
|
131
|
-
CoDD was dogfooded on a production LMS (Learning Management System). All design documents, implementation code, and tests were generated by AI following CoDD's workflow. No manual review by the client.
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
docs/
|
|
135
|
-
├── requirements/ # What to build (client agreement, SSoT)
|
|
136
|
-
├── design/ # How to build it (system design, API, DB, UI)
|
|
137
|
-
├── detailed_design/ # Module-level specs
|
|
138
|
-
├── plan/ # WBS, schedule, RACI
|
|
139
|
-
├── governance/ # ADR, meeting minutes, change requests
|
|
140
|
-
├── test/ # Acceptance criteria, test plans
|
|
141
|
-
├── operations/ # Runbooks, monitoring design
|
|
142
|
-
└── infra/ # Infrastructure specs
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Every doc has CoDD frontmatter declaring its dependencies:
|
|
146
|
-
|
|
147
|
-
```yaml
|
|
148
|
-
---
|
|
149
|
-
codd:
|
|
150
|
-
node_id: "design:api-design"
|
|
151
|
-
depends_on:
|
|
152
|
-
- id: "design:system-design"
|
|
153
|
-
relation: derives_from
|
|
154
|
-
- id: "req:lms-requirements-v2.0"
|
|
155
|
-
relation: implements
|
|
156
|
-
---
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
When the requirements changed mid-project, `codd impact` identified exactly which design docs, API endpoints, and test cases needed updating — and AI fixed them automatically.
|
|
160
|
-
|
|
161
|
-
## How CoDD Differs from Spec Kit / OpenSpec
|
|
162
|
-
|
|
163
|
-
| | Spec Kit | OpenSpec | **CoDD** |
|
|
164
|
-
|--|----------|---------|----------|
|
|
165
|
-
| Write specs first | Yes | Yes | Yes |
|
|
166
|
-
| AI generates code from specs | Yes | Yes | Yes |
|
|
167
|
-
| **Change propagation** | No | No | **Dependency graph + impact analysis** |
|
|
168
|
-
| **Derive test strategy from architecture** | No | No | **Automatic (derive, don't configure)** |
|
|
169
|
-
| **V-Model verification** | No | No | **Unit → Integration → E2E** |
|
|
170
|
-
| **Impact analysis on change** | No | No | **codd impact --diff HEAD~1** |
|
|
171
|
-
| Harness-agnostic | GitHub Copilot focused | Multi-agent | **Any harness** |
|
|
172
|
-
|
|
173
|
-
**Spec Kit and OpenSpec answer "how do I start?" CoDD answers "how do I keep going when things change?"**
|
|
174
|
-
|
|
175
|
-
## What's Available Now (v0.2.0-alpha.1)
|
|
176
|
-
|
|
177
|
-
| Command | Status | What it does |
|
|
178
|
-
|---------|--------|-------------|
|
|
179
|
-
| `codd init` | **Stable** | Initialize CoDD in any project |
|
|
180
|
-
| `codd scan` | **Stable** | Build dependency graph from frontmatter |
|
|
181
|
-
| `codd impact` | **Stable** | Analyze change impact (Green/Amber/Gray bands) |
|
|
182
|
-
| `codd validate` | **Alpha** | Check frontmatter integrity and graph consistency |
|
|
183
|
-
| `codd generate` | Experimental | Generate design docs in Wave order |
|
|
184
|
-
| `codd plan` | Experimental | Wave execution status and auto-initialization |
|
|
185
|
-
| `codd verify` | Experimental | V-Model verification (typecheck + tests → design tracing) |
|
|
186
|
-
| `codd implement` | Experimental | Design-to-code generation |
|
|
187
|
-
|
|
188
|
-
### Alpha Scope: What We Promise / What We Don't
|
|
189
|
-
|
|
190
|
-
| We promise | We don't promise (yet) |
|
|
191
|
-
|------------|----------------------|
|
|
192
|
-
| Frontmatter-based dependency graph works | Full semantic dependency types beyond Wave order |
|
|
193
|
-
| `codd impact` correctly identifies affected nodes | Automatic fix of affected nodes |
|
|
194
|
-
| `codd validate` catches broken references and cycles | Exhaustive validation of all edge cases |
|
|
195
|
-
| Harness-agnostic (no vendor lock-in) | Turnkey integrations for every harness |
|
|
196
|
-
| Derivation principle: architecture → test strategy | Fully automated end-to-end generation pipeline |
|
|
197
|
-
| MIT license, stable CLI interface for core commands | API stability for experimental commands |
|
|
198
|
-
|
|
199
|
-
## Frontmatter is the Single Source of Truth
|
|
200
|
-
|
|
201
|
-
CoDD uses YAML frontmatter in Markdown files to declare dependencies. `graph.db` is a derived cache — regenerated on every `codd scan`. No separate config files to maintain.
|
|
202
|
-
|
|
203
|
-
```yaml
|
|
204
|
-
---
|
|
205
|
-
codd:
|
|
206
|
-
node_id: "design:system-design"
|
|
207
|
-
type: design
|
|
208
|
-
depends_on:
|
|
209
|
-
- id: "req:lms-requirements-v2.0"
|
|
210
|
-
relation: implements
|
|
211
|
-
conventions:
|
|
212
|
-
- targets: ["db:rls_policies"]
|
|
213
|
-
reason: "Tenant isolation is non-negotiable"
|
|
214
|
-
---
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## Real-World Example: Derive, Don't Configure
|
|
218
|
-
|
|
219
|
-
```
|
|
220
|
-
system_design.md says "Next.js + Supabase"
|
|
221
|
-
→ Test strategy: vitest (unit) + Playwright (E2E). No config needed.
|
|
222
|
-
|
|
223
|
-
system_design.md says "FastAPI + Python"
|
|
224
|
-
→ Test strategy: pytest (unit/integration) + httpx (API). No config needed.
|
|
225
|
-
|
|
226
|
-
system_design.md says "CLI tool in Go"
|
|
227
|
-
→ Test strategy: go test (unit/integration). No config needed.
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
The architecture determines the test strategy. CoDD derives it — you don't configure it.
|
|
231
|
-
|
|
232
|
-
## Roadmap
|
|
233
|
-
|
|
234
|
-
- [ ] Semantic dependency types (requires, affects, verifies, implements)
|
|
235
|
-
- [ ] `codd verify` — full docs ↔ code ↔ tests coherence check
|
|
236
|
-
- [ ] Multi-agent integration examples (Claude Code, Copilot, Cursor)
|
|
237
|
-
- [ ] VS Code extension for impact visualization
|
|
238
|
-
|
|
239
|
-
## License
|
|
240
|
-
|
|
241
|
-
MIT
|
codd_dev-0.2.0a1/README.md
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
# CoDD — Coherence-Driven Development
|
|
2
|
-
|
|
3
|
-
**CoDD keeps AI-built systems coherent as requirements change.**
|
|
4
|
-
|
|
5
|
-
Give CoDD your requirements and constraints. AI generates the design top-down, derives implementation and test strategy from those artifacts, and traces change impact across a dependency graph — so nothing falls out of sync.
|
|
6
|
-
|
|
7
|
-
> *Harnesses tell agents how to work. CoDD keeps artifacts coherent.*
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Harness (CLAUDE.md, AGENTS.md, Hooks, Skills) ← Rules, guardrails, flow
|
|
11
|
-
└─ CoDD (methodology) ← Operates on the harness flow
|
|
12
|
-
└─ Design docs (docs/*.md) ← Artifacts CoDD generates and maintains
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**Public Alpha** — `pip install codd-dev` — init / scan / impact / validate are stable today.
|
|
16
|
-
|
|
17
|
-
## The Problem
|
|
18
|
-
|
|
19
|
-
AI can generate code from specs. But what happens when requirements change mid-project?
|
|
20
|
-
|
|
21
|
-
- Which design docs are affected?
|
|
22
|
-
- Which tests need updating?
|
|
23
|
-
- Which API contracts broke?
|
|
24
|
-
- Did anyone forget to update the database migration?
|
|
25
|
-
|
|
26
|
-
Spec-driven tools help you write specs first. They don't track what happens when those specs change. That's where CoDD comes in.
|
|
27
|
-
|
|
28
|
-
### Why not just AGENTS.md or hooks?
|
|
29
|
-
|
|
30
|
-
AGENTS.md, CLAUDE.md, and hooks are **harness infrastructure** — they tell agents how to behave. CoDD is a **coherence layer** that sits on top of any harness and keeps design artifacts, implementation, and tests in sync when requirements change. CoDD is harness-agnostic: it works with Claude Code, GitHub Copilot, Cursor, or any agent framework.
|
|
31
|
-
|
|
32
|
-
## Core Principle: Derive, Don't Configure
|
|
33
|
-
|
|
34
|
-
**Upstream artifacts + best practices = downstream is self-evident.**
|
|
35
|
-
|
|
36
|
-
- `system_design.md` says "Next.js + Supabase" → test strategy is vitest + Playwright. No config needed.
|
|
37
|
-
- `api_design.md` says "FastAPI" → pytest + httpx. No config needed.
|
|
38
|
-
- Requirements change → `codd impact` shows exactly what's affected.
|
|
39
|
-
|
|
40
|
-
You define requirements and constraints. AI derives everything else.
|
|
41
|
-
|
|
42
|
-
## How It Works
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
Phase 1: Requirements (human) ─┐
|
|
46
|
-
Phase 2: Design generation (AI) │ V-Model left side
|
|
47
|
-
Phase 3: Scan (auto) │
|
|
48
|
-
Phase 4: Implementation (AI) ─┘
|
|
49
|
-
Phase 5: Verification (AI + human) ─── V-Model right side
|
|
50
|
-
Phase 6: Change impact analysis ─┐
|
|
51
|
-
Phase 7: Change propagation │ Continuous coherence
|
|
52
|
-
Phase 8: Customer review ─┘
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Design docs are generated in **Wave order** — each wave depends on the previous:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
Wave 1: Acceptance criteria + ADR (← requirements only)
|
|
59
|
-
Wave 2: System design (← req + Wave 1)
|
|
60
|
-
Wave 3: Database design + API design (← req + Wave 1-2)
|
|
61
|
-
Wave 4: UI/UX design (← req + Wave 1-3)
|
|
62
|
-
Wave 5: Implementation plan (← all above)
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Verification runs bottom-up (IPA Common Frame):
|
|
66
|
-
```
|
|
67
|
-
Unit tests ← verifies detailed design
|
|
68
|
-
Integration ← verifies system design
|
|
69
|
-
E2E / System ← verifies requirements + acceptance criteria
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Three Layers (Don't Confuse Them)
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
Harness (CLAUDE.md, Hooks, Skills) ← Rules, guardrails, flow
|
|
76
|
-
└─ CoDD (methodology) ← Operates on the harness flow
|
|
77
|
-
└─ Design docs (docs/*.md) ← Artifacts CoDD generates and maintains
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
- **Harness** = how agents work (any harness: Claude Code, Copilot, Cursor, etc.)
|
|
81
|
-
- **CoDD** = how artifacts stay coherent across changes
|
|
82
|
-
- **Docs** = what CoDD produces and maintains
|
|
83
|
-
|
|
84
|
-
CoDD is **harness-agnostic**. It runs on top of whatever agent framework you use.
|
|
85
|
-
|
|
86
|
-
## Quick Start
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
# Install
|
|
90
|
-
pip install codd-dev
|
|
91
|
-
|
|
92
|
-
# Initialize
|
|
93
|
-
codd init --project-name "my-project" --language "typescript"
|
|
94
|
-
|
|
95
|
-
# Scan — build dependency graph from frontmatter
|
|
96
|
-
codd scan
|
|
97
|
-
|
|
98
|
-
# Impact — what breaks if I change this?
|
|
99
|
-
codd impact --diff HEAD~1
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Real Project: Osato LMS
|
|
103
|
-
|
|
104
|
-
CoDD was dogfooded on a production LMS (Learning Management System). All design documents, implementation code, and tests were generated by AI following CoDD's workflow. No manual review by the client.
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
docs/
|
|
108
|
-
├── requirements/ # What to build (client agreement, SSoT)
|
|
109
|
-
├── design/ # How to build it (system design, API, DB, UI)
|
|
110
|
-
├── detailed_design/ # Module-level specs
|
|
111
|
-
├── plan/ # WBS, schedule, RACI
|
|
112
|
-
├── governance/ # ADR, meeting minutes, change requests
|
|
113
|
-
├── test/ # Acceptance criteria, test plans
|
|
114
|
-
├── operations/ # Runbooks, monitoring design
|
|
115
|
-
└── infra/ # Infrastructure specs
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Every doc has CoDD frontmatter declaring its dependencies:
|
|
119
|
-
|
|
120
|
-
```yaml
|
|
121
|
-
---
|
|
122
|
-
codd:
|
|
123
|
-
node_id: "design:api-design"
|
|
124
|
-
depends_on:
|
|
125
|
-
- id: "design:system-design"
|
|
126
|
-
relation: derives_from
|
|
127
|
-
- id: "req:lms-requirements-v2.0"
|
|
128
|
-
relation: implements
|
|
129
|
-
---
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
When the requirements changed mid-project, `codd impact` identified exactly which design docs, API endpoints, and test cases needed updating — and AI fixed them automatically.
|
|
133
|
-
|
|
134
|
-
## How CoDD Differs from Spec Kit / OpenSpec
|
|
135
|
-
|
|
136
|
-
| | Spec Kit | OpenSpec | **CoDD** |
|
|
137
|
-
|--|----------|---------|----------|
|
|
138
|
-
| Write specs first | Yes | Yes | Yes |
|
|
139
|
-
| AI generates code from specs | Yes | Yes | Yes |
|
|
140
|
-
| **Change propagation** | No | No | **Dependency graph + impact analysis** |
|
|
141
|
-
| **Derive test strategy from architecture** | No | No | **Automatic (derive, don't configure)** |
|
|
142
|
-
| **V-Model verification** | No | No | **Unit → Integration → E2E** |
|
|
143
|
-
| **Impact analysis on change** | No | No | **codd impact --diff HEAD~1** |
|
|
144
|
-
| Harness-agnostic | GitHub Copilot focused | Multi-agent | **Any harness** |
|
|
145
|
-
|
|
146
|
-
**Spec Kit and OpenSpec answer "how do I start?" CoDD answers "how do I keep going when things change?"**
|
|
147
|
-
|
|
148
|
-
## What's Available Now (v0.2.0-alpha.1)
|
|
149
|
-
|
|
150
|
-
| Command | Status | What it does |
|
|
151
|
-
|---------|--------|-------------|
|
|
152
|
-
| `codd init` | **Stable** | Initialize CoDD in any project |
|
|
153
|
-
| `codd scan` | **Stable** | Build dependency graph from frontmatter |
|
|
154
|
-
| `codd impact` | **Stable** | Analyze change impact (Green/Amber/Gray bands) |
|
|
155
|
-
| `codd validate` | **Alpha** | Check frontmatter integrity and graph consistency |
|
|
156
|
-
| `codd generate` | Experimental | Generate design docs in Wave order |
|
|
157
|
-
| `codd plan` | Experimental | Wave execution status and auto-initialization |
|
|
158
|
-
| `codd verify` | Experimental | V-Model verification (typecheck + tests → design tracing) |
|
|
159
|
-
| `codd implement` | Experimental | Design-to-code generation |
|
|
160
|
-
|
|
161
|
-
### Alpha Scope: What We Promise / What We Don't
|
|
162
|
-
|
|
163
|
-
| We promise | We don't promise (yet) |
|
|
164
|
-
|------------|----------------------|
|
|
165
|
-
| Frontmatter-based dependency graph works | Full semantic dependency types beyond Wave order |
|
|
166
|
-
| `codd impact` correctly identifies affected nodes | Automatic fix of affected nodes |
|
|
167
|
-
| `codd validate` catches broken references and cycles | Exhaustive validation of all edge cases |
|
|
168
|
-
| Harness-agnostic (no vendor lock-in) | Turnkey integrations for every harness |
|
|
169
|
-
| Derivation principle: architecture → test strategy | Fully automated end-to-end generation pipeline |
|
|
170
|
-
| MIT license, stable CLI interface for core commands | API stability for experimental commands |
|
|
171
|
-
|
|
172
|
-
## Frontmatter is the Single Source of Truth
|
|
173
|
-
|
|
174
|
-
CoDD uses YAML frontmatter in Markdown files to declare dependencies. `graph.db` is a derived cache — regenerated on every `codd scan`. No separate config files to maintain.
|
|
175
|
-
|
|
176
|
-
```yaml
|
|
177
|
-
---
|
|
178
|
-
codd:
|
|
179
|
-
node_id: "design:system-design"
|
|
180
|
-
type: design
|
|
181
|
-
depends_on:
|
|
182
|
-
- id: "req:lms-requirements-v2.0"
|
|
183
|
-
relation: implements
|
|
184
|
-
conventions:
|
|
185
|
-
- targets: ["db:rls_policies"]
|
|
186
|
-
reason: "Tenant isolation is non-negotiable"
|
|
187
|
-
---
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Real-World Example: Derive, Don't Configure
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
system_design.md says "Next.js + Supabase"
|
|
194
|
-
→ Test strategy: vitest (unit) + Playwright (E2E). No config needed.
|
|
195
|
-
|
|
196
|
-
system_design.md says "FastAPI + Python"
|
|
197
|
-
→ Test strategy: pytest (unit/integration) + httpx (API). No config needed.
|
|
198
|
-
|
|
199
|
-
system_design.md says "CLI tool in Go"
|
|
200
|
-
→ Test strategy: go test (unit/integration). No config needed.
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
The architecture determines the test strategy. CoDD derives it — you don't configure it.
|
|
204
|
-
|
|
205
|
-
## Roadmap
|
|
206
|
-
|
|
207
|
-
- [ ] Semantic dependency types (requires, affects, verifies, implements)
|
|
208
|
-
- [ ] `codd verify` — full docs ↔ code ↔ tests coherence check
|
|
209
|
-
- [ ] Multi-agent integration examples (Claude Code, Copilot, Cursor)
|
|
210
|
-
- [ ] VS Code extension for impact visualization
|
|
211
|
-
|
|
212
|
-
## License
|
|
213
|
-
|
|
214
|
-
MIT
|
|
File without changes
|