codd-dev 1.6.0__tar.gz → 1.7.1__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.
Files changed (54) hide show
  1. {codd_dev-1.6.0 → codd_dev-1.7.1}/.gitignore +1 -1
  2. {codd_dev-1.6.0 → codd_dev-1.7.1}/PKG-INFO +120 -20
  3. {codd_dev-1.6.0 → codd_dev-1.7.1}/README.md +119 -19
  4. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/assembler.py +41 -9
  5. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/cli.py +290 -56
  6. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/defaults.yaml +11 -0
  7. codd_dev-1.7.1/codd/e2e_runner.py +78 -0
  8. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/extractor.py +20 -1
  9. codd_dev-1.7.1/codd/fixer.py +1014 -0
  10. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/generator.py +193 -2
  11. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/hooks/__init__.py +1 -1
  12. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/implementer.py +48 -0
  13. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/parsing.py +6 -6
  14. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/planner.py +17 -6
  15. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/propagate.py +1 -1
  16. codd_dev-1.7.1/codd/propagator.py +886 -0
  17. codd_dev-1.7.1/codd/repair_slice.py +547 -0
  18. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/validator.py +23 -4
  19. codd_dev-1.7.1/docs/requirements/README.md +17 -0
  20. {codd_dev-1.6.0 → codd_dev-1.7.1}/pyproject.toml +10 -10
  21. codd_dev-1.6.0/codd/propagator.py +0 -323
  22. {codd_dev-1.6.0 → codd_dev-1.7.1}/LICENSE +0 -0
  23. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/__init__.py +0 -0
  24. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/bridge.py +0 -0
  25. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/clustering.py +0 -0
  26. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/config.py +0 -0
  27. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/contracts.py +0 -0
  28. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/env_refs.py +0 -0
  29. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/extract_ai.py +0 -0
  30. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/graph.py +0 -0
  31. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/hooks/pre-commit +0 -0
  32. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/inheritance.py +0 -0
  33. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/mcp_server.py +0 -0
  34. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/measure.py +0 -0
  35. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/policy.py +0 -0
  36. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/require.py +0 -0
  37. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/require_plugins.py +0 -0
  38. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/restore.py +0 -0
  39. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/scanner.py +0 -0
  40. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/schema_refs.py +0 -0
  41. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/synth.py +0 -0
  42. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/codd.yaml.tmpl +0 -0
  43. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/conventions.yaml.tmpl +0 -0
  44. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/data_dependencies.yaml.tmpl +0 -0
  45. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/doc_links.yaml.tmpl +0 -0
  46. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/extracted/api-contract.md.j2 +0 -0
  47. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/extracted/architecture-overview.md.j2 +0 -0
  48. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/extracted/module-detail.md.j2 +0 -0
  49. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/extracted/schema-design.md.j2 +0 -0
  50. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/extracted/system-context.md.j2 +0 -0
  51. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/gitignore.tmpl +0 -0
  52. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/templates/overrides.yaml.tmpl +0 -0
  53. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/traceability.py +0 -0
  54. {codd_dev-1.6.0 → codd_dev-1.7.1}/codd/wiring.py +0 -0
@@ -8,7 +8,7 @@ build/
8
8
  *.egg
9
9
 
10
10
  # Virtual environments
11
- .venv/
11
+ .venv*/
12
12
  venv/
13
13
 
14
14
  # IDE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codd-dev
3
- Version: 1.6.0
3
+ Version: 1.7.1
4
4
  Summary: CoDD: Coherence-Driven Development — cross-artifact change impact analysis
5
5
  Project-URL: Homepage, https://github.com/yohey-w/codd-dev
6
6
  Project-URL: Repository, https://github.com/yohey-w/codd-dev
@@ -49,7 +49,7 @@ Description-Content-Type: text/markdown
49
49
  </p>
50
50
 
51
51
  <p align="center">
52
- <a href="README_ja.md">日本語</a> | English
52
+ <a href="README_ja.md">日本語</a> | English | <a href="README_zh.md">中文</a>
53
53
  </p>
54
54
 
55
55
  ---
@@ -60,31 +60,31 @@ Description-Content-Type: text/markdown
60
60
  pip install codd-dev
61
61
  ```
62
62
 
63
- **v1.5.0** — `init` / `scan` / `impact` are stable. `extract --ai` with baseline preset. `audit` / `policy` / `require` / `validate` are alpha. GitHub Action for CI integration.
63
+ **v1.7.0** — `init` / `scan` / `impact` are stable. `propagate` traces code changes to downstream design docs and doc-to-doc changes via CEG graph. `extract --ai` with baseline preset. Custom `node_id` prefixes via `codd.yaml`. GitHub Action for CI integration.
64
64
 
65
65
  ---
66
66
 
67
67
  ## Why CoDD?
68
68
 
69
- AI can generate code. Humans can review PRs. But who tracks the **evidence trail** when requirements change?
69
+ AI can generate specs. But **what happens when upstream changes?**
70
70
 
71
- - Which design docs are now stale?
72
- - Which policy rules did the change violate?
73
- - What's the blast radius across the dependency graph?
74
- - Can the PM sign off on this merge with confidence?
71
+ Every spec-first tool stops at creation. CoDD starts there. When a requirement changes, code is updated, or a design assumption shifts, CoDD **automatically propagates the change downstream** — updating affected design docs, flagging stale artifacts, and producing an evidence trail.
75
72
 
76
- **CoDD is the evidence engine.** It builds the dependency graph, traces change impact, enforces enterprise policies, and produces a reviewer-ready audit pack — so your merge decision is based on evidence, not gut feeling.
73
+ ```
74
+ Requirement changes → codd impact identifies 6 affected docs
75
+ Code changes → codd propagate updates downstream designs
76
+ Design changes → CEG graph traces all dependent artifacts
77
+ ```
78
+
79
+ No other tool does this. spec-kit, Kiro, and cc-sdd create docs. **CoDD keeps them coherent.**
77
80
 
78
81
  ## How It Works
79
82
 
80
83
  ```
81
84
  Requirements (human) → Design docs (AI) → Code & tests (AI)
82
-
83
- codd scan builds the
84
- dependency graph
85
-
86
- Something changes? codd impact tells you
87
- exactly what's affected — automatically.
85
+ ↕ ↕ ↕
86
+ codd impact codd propagate codd extract
87
+ (what changed?) (update downstream) (reverse-engineer)
88
88
  ```
89
89
 
90
90
  ### The Three Layers
@@ -155,6 +155,54 @@ codd measure # Project health score (0-100)
155
155
 
156
156
  ## Demos
157
157
 
158
+ ### Reproducible E2E Demo — 3 Propagation Patterns
159
+
160
+ The following demo is pinned to commit [`d7d9f45`](https://github.com/yohey-w/codd-dev/commit/d7d9f45). You can reproduce the full cycle locally.
161
+
162
+ **Setup:**
163
+ ```bash
164
+ pip install codd-dev>=1.6.0
165
+ mkdir demo && cd demo && git init
166
+ cat > spec.txt << 'EOF'
167
+ TaskFlow — Requirements
168
+ - User authentication (email + Google OAuth)
169
+ - Workspace management (teams, roles, invites)
170
+ - Task CRUD with assignees, labels, due dates
171
+ - Real-time updates (WebSocket)
172
+ - File attachments (S3)
173
+ - Notification system (in-app + email)
174
+ EOF
175
+ codd init --project-name "taskflow" --language "typescript" --requirements spec.txt
176
+ ```
177
+
178
+ **Pattern 1 — Source → Doc** (spec → design docs):
179
+ ```bash
180
+ codd plan --init
181
+ for wave in $(seq 1 $(codd plan --waves)); do codd generate --wave $wave; done
182
+ codd validate # Expected: PASS, 0 errors
183
+ codd scan # Expected: 17 nodes, 30+ edges
184
+ ```
185
+
186
+ **Pattern 2 — Doc → Doc** (requirement change → downstream update):
187
+ ```bash
188
+ # Edit requirements: add "SSO (SAML 2.0)" to auth
189
+ codd impact # Expected: 6/7 design docs in Green/Amber band
190
+
191
+ # Regenerate affected waves (propagate is for code→doc only)
192
+ codd generate --wave 1 --force # Re-derive acceptance criteria from updated requirements
193
+ codd generate --wave 2 --force # Re-derive system design from updated Wave 1
194
+ # Repeat for each affected wave in dependency order
195
+ ```
196
+
197
+ **Pattern 3 — Doc → Doc via CEG** (code change → design update):
198
+ ```bash
199
+ # Modify source code in auth module
200
+ codd propagate # Expected: identifies auth-design, system-design as affected
201
+ codd propagate --update # AI updates affected design docs from code diff
202
+ ```
203
+
204
+ **Expected output**: 20-line spec → 17 design artifacts (5,100+ lines) → downstream propagation keeps all docs coherent after changes. Pattern 3 (CEG-based propagation) is novel — no other tool traces code changes back through the dependency graph to update design documents.
205
+
158
206
  ### Greenfield — Spec to Working App
159
207
 
160
208
  37 lines of spec → 6 design docs (1,353 lines) → 102 code files (6,445 lines) → TypeScript strict build passes. No interactive AI chat — the entire workflow is a shell script.
@@ -208,6 +256,27 @@ The `modules` field enables reverse traceability: when source code changes, `cod
208
256
 
209
257
  `codd/scan/` is a cache — regenerated on every `codd scan`.
210
258
 
259
+ ## Custom Node Prefixes
260
+
261
+ By default, `node_id` values must use one of the built-in prefixes (`design:`, `req:`, `doc:`, `module:`, etc.). To use CoDD for non-software domains (knowledge bases, review documents, prompt management), add custom prefixes in `codd.yaml`:
262
+
263
+ ```yaml
264
+ # codd.yaml
265
+ prefixes:
266
+ - knowledge
267
+ - schema
268
+ - review
269
+ - prompt
270
+ ```
271
+
272
+ Custom prefixes are **merged with** built-in defaults — you don't need to re-list `design`, `req`, etc. Prefix names must be lowercase letters and underscores only (`[a-z_]+`).
273
+
274
+ ```yaml
275
+ # Now valid in frontmatter:
276
+ codd:
277
+ node_id: "knowledge:domain-model"
278
+ ```
279
+
211
280
  ## AI Model Configuration
212
281
 
213
282
  CoDD calls an external AI CLI for document generation. The default is Claude Opus:
@@ -342,17 +411,39 @@ codd impact
342
411
  | `codd generate` | Experimental | Generate design docs in Wave order (greenfield) |
343
412
  | `codd restore` | Experimental | Reconstruct design docs from extracted facts (brownfield) |
344
413
  | `codd plan` | Experimental | Wave execution status (`--init` supports brownfield fallback) |
345
- | `codd verify` | Experimental | V-Model verification |
414
+ | `codd verify` | Experimental (Pro) | V-Model verification |
346
415
  | `codd implement` | Experimental | Design-to-code generation |
347
- | `codd propagate` | Experimental | Reverse-propagate source code changes to design docs |
348
- | `codd review` | Experimental | AI-powered artifact quality evaluation (LLM-as-Judge) |
416
+ | `codd propagate` | **Alpha** | Propagate code/doc changes downstream to affected design docs |
417
+ | `codd review` | Experimental (Pro) | AI-powered artifact quality evaluation (LLM-as-Judge) |
349
418
  | `codd extract` | **Alpha** | Reverse-engineer design docs from existing code |
350
419
  | `codd require` | **Alpha** | Infer requirements from existing codebase (brownfield) |
351
- | `codd audit` | **Alpha** | Consolidated change review pack (validate + impact + policy + review) |
420
+ | `codd audit` | **Alpha** (Pro) | Consolidated change review pack (validate + impact + policy + review) |
352
421
  | `codd policy` | **Alpha** | Enterprise policy checker (forbidden/required patterns in source code) |
353
422
  | `codd measure` | **Alpha** | Project health metrics (graph, coverage, quality, health score 0-100) |
354
423
  | `codd mcp-server` | **Alpha** | MCP server for AI tool integration (stdio, zero dependencies) |
355
424
 
425
+ ## OSS / Pro Split
426
+
427
+ CoDD v1.6.0 introduced a clean OSS/Pro boundary via a bridge pattern.
428
+
429
+ **OSS (MIT, free)** — everything you need to keep docs coherent:
430
+
431
+ `init` · `scan` · `impact` · `generate` · `restore` · `propagate` · `extract` · `require` · `plan` · `validate` · `measure` · `policy` · `mcp-server`
432
+
433
+ **Pro (private, paid)** — enterprise review and verification:
434
+
435
+ `review` · `verify` · `audit` · `risk`
436
+
437
+ ```bash
438
+ # OSS only
439
+ pip install codd-dev
440
+
441
+ # Add Pro extensions
442
+ pip install "codd-pro @ git+ssh://git@github.com/yohey-w/codd-pro.git"
443
+ ```
444
+
445
+ When `codd-pro` is installed, Pro implementations automatically override OSS fallbacks via entry-points plugin discovery. When it's not installed, Pro commands show a migration message and exit gracefully. No configuration needed.
446
+
356
447
  ## CI Integration (GitHub Action)
357
448
 
358
449
  Run CoDD audit on every pull request. The action posts a comment with verdict (APPROVE / CONDITIONAL / REJECT), validation results, policy violations, and impact analysis.
@@ -586,7 +677,7 @@ All major spec-driven tools focus on **creating** design documents. None address
586
677
  | Spec notation | Markdown + 40 extensions | EARS notation | Quality gates + git worktree | Frontmatter `depends_on` |
587
678
  | Harness lock-in | GitHub Copilot | Kiro IDE | Claude Code | **Any agent / IDE** |
588
679
 
589
- In short: spec-kit, Kiro, and cc-sdd answer *"how do I create specs?"* CoDD answers *"how do I keep specs, code, and tests coherent when requirements change?"*
680
+ In short: spec-kit, Kiro, and cc-sdd answer *"how do I create specs?"* CoDD answers *"when something changes upstream, how do I automatically update everything downstream?"*
590
681
 
591
682
  ## Comparison
592
683
 
@@ -656,8 +747,17 @@ If CoDD can't manage itself, it shouldn't manage your project.
656
747
  - [dev.to: What Happens After "Spec First"](https://dev.to/yohey-w/codd-coherence-driven-development-what-happens-after-spec-first-514f)
657
748
  - [Zenn: Harness as Code — A Guide to CoDD #1 spec → design → code](https://zenn.dev/shio_shoppaize/articles/codd-greenfield-guide?locale=en)
658
749
  - [Zenn: Harness as Code — A Guide to CoDD #2 Brownfield](https://zenn.dev/shio_shoppaize/articles/shogun-codd-brownfield?locale=en)
750
+ - [Zenn: Harness as Code — A Guide to CoDD #3 Bug Fixing with CoDD extract (SWE-bench)](https://zenn.dev/shio_shoppaize/articles/codd-swebench-pilot?locale=en)
659
751
  - [Zenn: CoDD deep-dive](https://zenn.dev/shio_shoppaize/articles/shogun-codd-coherence?locale=en)
660
752
 
753
+ ## Sponsors
754
+
755
+ <a href="https://github.com/sponsors/yohey-w">
756
+ <img src="https://img.shields.io/badge/Sponsor-%E2%9D%A4-ea4aaa?style=for-the-badge&logo=github-sponsors" alt="Sponsor">
757
+ </a>
758
+
759
+ Your sponsorship keeps CoDD free and funds continued development. See [sponsor tiers](https://github.com/sponsors/yohey-w).
760
+
661
761
  ## License
662
762
 
663
763
  MIT
@@ -11,7 +11,7 @@
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
- <a href="README_ja.md">日本語</a> | English
14
+ <a href="README_ja.md">日本語</a> | English | <a href="README_zh.md">中文</a>
15
15
  </p>
16
16
 
17
17
  ---
@@ -22,31 +22,31 @@
22
22
  pip install codd-dev
23
23
  ```
24
24
 
25
- **v1.5.0** — `init` / `scan` / `impact` are stable. `extract --ai` with baseline preset. `audit` / `policy` / `require` / `validate` are alpha. GitHub Action for CI integration.
25
+ **v1.7.0** — `init` / `scan` / `impact` are stable. `propagate` traces code changes to downstream design docs and doc-to-doc changes via CEG graph. `extract --ai` with baseline preset. Custom `node_id` prefixes via `codd.yaml`. GitHub Action for CI integration.
26
26
 
27
27
  ---
28
28
 
29
29
  ## Why CoDD?
30
30
 
31
- AI can generate code. Humans can review PRs. But who tracks the **evidence trail** when requirements change?
31
+ AI can generate specs. But **what happens when upstream changes?**
32
32
 
33
- - Which design docs are now stale?
34
- - Which policy rules did the change violate?
35
- - What's the blast radius across the dependency graph?
36
- - Can the PM sign off on this merge with confidence?
33
+ Every spec-first tool stops at creation. CoDD starts there. When a requirement changes, code is updated, or a design assumption shifts, CoDD **automatically propagates the change downstream** — updating affected design docs, flagging stale artifacts, and producing an evidence trail.
37
34
 
38
- **CoDD is the evidence engine.** It builds the dependency graph, traces change impact, enforces enterprise policies, and produces a reviewer-ready audit pack — so your merge decision is based on evidence, not gut feeling.
35
+ ```
36
+ Requirement changes → codd impact identifies 6 affected docs
37
+ Code changes → codd propagate updates downstream designs
38
+ Design changes → CEG graph traces all dependent artifacts
39
+ ```
40
+
41
+ No other tool does this. spec-kit, Kiro, and cc-sdd create docs. **CoDD keeps them coherent.**
39
42
 
40
43
  ## How It Works
41
44
 
42
45
  ```
43
46
  Requirements (human) → Design docs (AI) → Code & tests (AI)
44
-
45
- codd scan builds the
46
- dependency graph
47
-
48
- Something changes? codd impact tells you
49
- exactly what's affected — automatically.
47
+ ↕ ↕ ↕
48
+ codd impact codd propagate codd extract
49
+ (what changed?) (update downstream) (reverse-engineer)
50
50
  ```
51
51
 
52
52
  ### The Three Layers
@@ -117,6 +117,54 @@ codd measure # Project health score (0-100)
117
117
 
118
118
  ## Demos
119
119
 
120
+ ### Reproducible E2E Demo — 3 Propagation Patterns
121
+
122
+ The following demo is pinned to commit [`d7d9f45`](https://github.com/yohey-w/codd-dev/commit/d7d9f45). You can reproduce the full cycle locally.
123
+
124
+ **Setup:**
125
+ ```bash
126
+ pip install codd-dev>=1.6.0
127
+ mkdir demo && cd demo && git init
128
+ cat > spec.txt << 'EOF'
129
+ TaskFlow — Requirements
130
+ - User authentication (email + Google OAuth)
131
+ - Workspace management (teams, roles, invites)
132
+ - Task CRUD with assignees, labels, due dates
133
+ - Real-time updates (WebSocket)
134
+ - File attachments (S3)
135
+ - Notification system (in-app + email)
136
+ EOF
137
+ codd init --project-name "taskflow" --language "typescript" --requirements spec.txt
138
+ ```
139
+
140
+ **Pattern 1 — Source → Doc** (spec → design docs):
141
+ ```bash
142
+ codd plan --init
143
+ for wave in $(seq 1 $(codd plan --waves)); do codd generate --wave $wave; done
144
+ codd validate # Expected: PASS, 0 errors
145
+ codd scan # Expected: 17 nodes, 30+ edges
146
+ ```
147
+
148
+ **Pattern 2 — Doc → Doc** (requirement change → downstream update):
149
+ ```bash
150
+ # Edit requirements: add "SSO (SAML 2.0)" to auth
151
+ codd impact # Expected: 6/7 design docs in Green/Amber band
152
+
153
+ # Regenerate affected waves (propagate is for code→doc only)
154
+ codd generate --wave 1 --force # Re-derive acceptance criteria from updated requirements
155
+ codd generate --wave 2 --force # Re-derive system design from updated Wave 1
156
+ # Repeat for each affected wave in dependency order
157
+ ```
158
+
159
+ **Pattern 3 — Doc → Doc via CEG** (code change → design update):
160
+ ```bash
161
+ # Modify source code in auth module
162
+ codd propagate # Expected: identifies auth-design, system-design as affected
163
+ codd propagate --update # AI updates affected design docs from code diff
164
+ ```
165
+
166
+ **Expected output**: 20-line spec → 17 design artifacts (5,100+ lines) → downstream propagation keeps all docs coherent after changes. Pattern 3 (CEG-based propagation) is novel — no other tool traces code changes back through the dependency graph to update design documents.
167
+
120
168
  ### Greenfield — Spec to Working App
121
169
 
122
170
  37 lines of spec → 6 design docs (1,353 lines) → 102 code files (6,445 lines) → TypeScript strict build passes. No interactive AI chat — the entire workflow is a shell script.
@@ -170,6 +218,27 @@ The `modules` field enables reverse traceability: when source code changes, `cod
170
218
 
171
219
  `codd/scan/` is a cache — regenerated on every `codd scan`.
172
220
 
221
+ ## Custom Node Prefixes
222
+
223
+ By default, `node_id` values must use one of the built-in prefixes (`design:`, `req:`, `doc:`, `module:`, etc.). To use CoDD for non-software domains (knowledge bases, review documents, prompt management), add custom prefixes in `codd.yaml`:
224
+
225
+ ```yaml
226
+ # codd.yaml
227
+ prefixes:
228
+ - knowledge
229
+ - schema
230
+ - review
231
+ - prompt
232
+ ```
233
+
234
+ Custom prefixes are **merged with** built-in defaults — you don't need to re-list `design`, `req`, etc. Prefix names must be lowercase letters and underscores only (`[a-z_]+`).
235
+
236
+ ```yaml
237
+ # Now valid in frontmatter:
238
+ codd:
239
+ node_id: "knowledge:domain-model"
240
+ ```
241
+
173
242
  ## AI Model Configuration
174
243
 
175
244
  CoDD calls an external AI CLI for document generation. The default is Claude Opus:
@@ -304,17 +373,39 @@ codd impact
304
373
  | `codd generate` | Experimental | Generate design docs in Wave order (greenfield) |
305
374
  | `codd restore` | Experimental | Reconstruct design docs from extracted facts (brownfield) |
306
375
  | `codd plan` | Experimental | Wave execution status (`--init` supports brownfield fallback) |
307
- | `codd verify` | Experimental | V-Model verification |
376
+ | `codd verify` | Experimental (Pro) | V-Model verification |
308
377
  | `codd implement` | Experimental | Design-to-code generation |
309
- | `codd propagate` | Experimental | Reverse-propagate source code changes to design docs |
310
- | `codd review` | Experimental | AI-powered artifact quality evaluation (LLM-as-Judge) |
378
+ | `codd propagate` | **Alpha** | Propagate code/doc changes downstream to affected design docs |
379
+ | `codd review` | Experimental (Pro) | AI-powered artifact quality evaluation (LLM-as-Judge) |
311
380
  | `codd extract` | **Alpha** | Reverse-engineer design docs from existing code |
312
381
  | `codd require` | **Alpha** | Infer requirements from existing codebase (brownfield) |
313
- | `codd audit` | **Alpha** | Consolidated change review pack (validate + impact + policy + review) |
382
+ | `codd audit` | **Alpha** (Pro) | Consolidated change review pack (validate + impact + policy + review) |
314
383
  | `codd policy` | **Alpha** | Enterprise policy checker (forbidden/required patterns in source code) |
315
384
  | `codd measure` | **Alpha** | Project health metrics (graph, coverage, quality, health score 0-100) |
316
385
  | `codd mcp-server` | **Alpha** | MCP server for AI tool integration (stdio, zero dependencies) |
317
386
 
387
+ ## OSS / Pro Split
388
+
389
+ CoDD v1.6.0 introduced a clean OSS/Pro boundary via a bridge pattern.
390
+
391
+ **OSS (MIT, free)** — everything you need to keep docs coherent:
392
+
393
+ `init` · `scan` · `impact` · `generate` · `restore` · `propagate` · `extract` · `require` · `plan` · `validate` · `measure` · `policy` · `mcp-server`
394
+
395
+ **Pro (private, paid)** — enterprise review and verification:
396
+
397
+ `review` · `verify` · `audit` · `risk`
398
+
399
+ ```bash
400
+ # OSS only
401
+ pip install codd-dev
402
+
403
+ # Add Pro extensions
404
+ pip install "codd-pro @ git+ssh://git@github.com/yohey-w/codd-pro.git"
405
+ ```
406
+
407
+ When `codd-pro` is installed, Pro implementations automatically override OSS fallbacks via entry-points plugin discovery. When it's not installed, Pro commands show a migration message and exit gracefully. No configuration needed.
408
+
318
409
  ## CI Integration (GitHub Action)
319
410
 
320
411
  Run CoDD audit on every pull request. The action posts a comment with verdict (APPROVE / CONDITIONAL / REJECT), validation results, policy violations, and impact analysis.
@@ -548,7 +639,7 @@ All major spec-driven tools focus on **creating** design documents. None address
548
639
  | Spec notation | Markdown + 40 extensions | EARS notation | Quality gates + git worktree | Frontmatter `depends_on` |
549
640
  | Harness lock-in | GitHub Copilot | Kiro IDE | Claude Code | **Any agent / IDE** |
550
641
 
551
- In short: spec-kit, Kiro, and cc-sdd answer *"how do I create specs?"* CoDD answers *"how do I keep specs, code, and tests coherent when requirements change?"*
642
+ In short: spec-kit, Kiro, and cc-sdd answer *"how do I create specs?"* CoDD answers *"when something changes upstream, how do I automatically update everything downstream?"*
552
643
 
553
644
  ## Comparison
554
645
 
@@ -618,8 +709,17 @@ If CoDD can't manage itself, it shouldn't manage your project.
618
709
  - [dev.to: What Happens After "Spec First"](https://dev.to/yohey-w/codd-coherence-driven-development-what-happens-after-spec-first-514f)
619
710
  - [Zenn: Harness as Code — A Guide to CoDD #1 spec → design → code](https://zenn.dev/shio_shoppaize/articles/codd-greenfield-guide?locale=en)
620
711
  - [Zenn: Harness as Code — A Guide to CoDD #2 Brownfield](https://zenn.dev/shio_shoppaize/articles/shogun-codd-brownfield?locale=en)
712
+ - [Zenn: Harness as Code — A Guide to CoDD #3 Bug Fixing with CoDD extract (SWE-bench)](https://zenn.dev/shio_shoppaize/articles/codd-swebench-pilot?locale=en)
621
713
  - [Zenn: CoDD deep-dive](https://zenn.dev/shio_shoppaize/articles/shogun-codd-coherence?locale=en)
622
714
 
715
+ ## Sponsors
716
+
717
+ <a href="https://github.com/sponsors/yohey-w">
718
+ <img src="https://img.shields.io/badge/Sponsor-%E2%9D%A4-ea4aaa?style=for-the-badge&logo=github-sponsors" alt="Sponsor">
719
+ </a>
720
+
721
+ Your sponsorship keeps CoDD free and funds continued development. See [sponsor tiers](https://github.com/sponsors/yohey-w).
722
+
623
723
  ## License
624
724
 
625
725
  MIT
@@ -6,8 +6,11 @@ from dataclasses import dataclass
6
6
  from pathlib import Path
7
7
  from typing import Any
8
8
 
9
+ import warnings
10
+
9
11
  import codd.generator as generator_module
10
12
  from codd.generator import _load_project_config, _normalize_conventions
13
+ from codd.implementer import get_task_slugs_by_sprint
11
14
  from codd.scanner import _extract_frontmatter, build_document_node_path_map
12
15
 
13
16
 
@@ -79,7 +82,11 @@ def _collect_design_documents(project_root: Path, config: dict[str, Any]) -> lis
79
82
 
80
83
 
81
84
  def _collect_generated_fragments(project_root: Path, config: dict[str, Any]) -> list[dict[str, str]]:
82
- """Collect all generated code fragments from src/generated/sprint_N/."""
85
+ """Collect all generated code fragments from src/generated/sprint_N/.
86
+
87
+ Cross-references against the implementation plan to detect orphan fragments
88
+ from renamed or deleted tasks. Orphans are excluded with a warning.
89
+ """
83
90
  source_dirs = config.get("scan", {}).get("source_dirs", ["src/"])
84
91
  generated_base = None
85
92
  for src_dir in source_dirs:
@@ -94,19 +101,44 @@ def _collect_generated_fragments(project_root: Path, config: dict[str, Any]) ->
94
101
  if not generated_base.is_dir():
95
102
  return []
96
103
 
104
+ # Load valid task slugs from implementation plan for orphan detection
105
+ valid_slugs = get_task_slugs_by_sprint(project_root)
106
+
107
+ code_extensions = (".ts", ".tsx", ".js", ".jsx", ".py", ".go", ".java", ".css")
97
108
  fragments = []
98
109
  for sprint_dir in sorted(generated_base.iterdir()):
99
110
  if not sprint_dir.is_dir() or not sprint_dir.name.startswith("sprint_"):
100
111
  continue
112
+
113
+ # Identify orphan task directories
114
+ orphan_dirs: set[str] = set()
115
+ if valid_slugs and sprint_dir.name in valid_slugs:
116
+ expected = valid_slugs[sprint_dir.name]
117
+ for child in sprint_dir.iterdir():
118
+ if child.is_dir() and child.name not in expected:
119
+ orphan_dirs.add(child.name)
120
+ warnings.warn(
121
+ f"Orphan fragment directory '{sprint_dir.name}/{child.name}' "
122
+ f"does not match any task in the implementation plan. Skipping.",
123
+ stacklevel=2,
124
+ )
125
+
101
126
  for code_file in sorted(sprint_dir.rglob("*")):
102
- if code_file.is_file() and code_file.suffix in (".ts", ".tsx", ".js", ".jsx", ".py", ".go", ".java", ".css"):
103
- rel_path = code_file.relative_to(project_root)
104
- content = code_file.read_text(encoding="utf-8")
105
- fragments.append({
106
- "sprint_dir": sprint_dir.name,
107
- "path": str(rel_path),
108
- "content": content,
109
- })
127
+ if not code_file.is_file() or code_file.suffix not in code_extensions:
128
+ continue
129
+
130
+ # Skip files under orphan task directories
131
+ rel_to_sprint = code_file.relative_to(sprint_dir)
132
+ if rel_to_sprint.parts and rel_to_sprint.parts[0] in orphan_dirs:
133
+ continue
134
+
135
+ rel_path = code_file.relative_to(project_root)
136
+ content = code_file.read_text(encoding="utf-8")
137
+ fragments.append({
138
+ "sprint_dir": sprint_dir.name,
139
+ "path": str(rel_path),
140
+ "content": content,
141
+ })
110
142
 
111
143
  return fragments
112
144