contract-driven-delivery 2.0.12 → 2.0.13

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.13] - 2026-05-05
4
+
5
+ Documentation and release-prep patch focused on keeping CDD low-friction.
6
+
7
+ ### Changed
8
+
9
+ - **Clarified workflow lanes**: README now distinguishes full tracked CDD
10
+ changes from maintenance / micro-change work, so typo fixes, formatting,
11
+ lint-only changes, and tiny local repairs do not imply proposal-level
12
+ ceremony.
13
+ - **Documented future machine-readable metadata direction**:
14
+ `docs/machine-readable-change-design.md` defines `change.yml` and
15
+ `trace.yml` as generated metadata for reducing markdown parsing and token
16
+ use, not as new manually-authored forms.
17
+ - **Synced skill/protocol docs with implementation**: `/cdd-new` now reflects
18
+ that `context-manifest.md` is required and that `cdd-kit new` auto-runs
19
+ `context-scan` when indexes are missing or stale; the agent-log protocol now
20
+ reflects that gate enforces per-agent artifact types when prompt files are
21
+ installed.
22
+
3
23
  ## [2.0.12] - 2026-05-04
4
24
 
5
25
  Tiny patch — closes the last line-ending hole.
package/README.md CHANGED
@@ -99,6 +99,21 @@ or
99
99
  8. `cdd-kit gate <change-id>` runs automatically to confirm all artifacts are complete
100
100
  9. Claude reports a summary and the suggested git commit
101
101
 
102
+ ### Workflow Lanes: Avoiding Ceremony for Small Fixes
103
+
104
+ CDD is a governance workflow, not a rule that every edit must become a full proposal. Use the tracked `/cdd-new` flow when a change can affect product behavior, contracts, data shape, API behavior, env/deploy rules, CI/CD, security, permissions, cross-module architecture, or release risk.
105
+
106
+ Use a lightweight maintenance lane for small corrections where the intent is already obvious:
107
+
108
+ | Lane | Examples | Required record |
109
+ |---|---|---|
110
+ | maintenance / micro-change | typo fixes, comment updates, README cleanup, formatting, lint-only fixes, tiny local test repair | normal commit message and test output if applicable |
111
+ | tracked CDD change | behavior changes, contract updates, API/data/env/security/CI changes, cross-module refactors, high-risk bug fixes | `specs/changes/<id>/`, `tasks.yml`, `context-manifest.md`, agent logs, and `cdd-kit gate` |
112
+
113
+ Do not add hard pre-commit rules that block every `src/`, `tests/`, or `contracts/` edit unless your team explicitly wants that policy. The default kit favors low-friction traceability: make risky changes reviewable, but let obvious maintenance edits stay small.
114
+
115
+ Machine-readable metadata such as future `change.yml` / `trace.yml` should follow the same rule: generated from existing artifacts to reduce token use and markdown parsing, not introduced as extra forms. See `docs/machine-readable-change-design.md` for the proposed shape.
116
+
102
117
  ### Agent Ownership Model
103
118
 
104
119
  CDD uses two agent classes on purpose:
@@ -106,7 +106,7 @@ Note: `archive.md` is created during `/cdd-close`, not during `/cdd-new` — it
106
106
 
107
107
  If the classifier marks an artifact as `no` or leaves it blank, **do not create the file** — even if a review agent could contribute to it.
108
108
 
109
- The 5 always-required artifacts are: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`.
109
+ The 6 always-required artifacts are: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, and `context-manifest.md`.
110
110
 
111
111
  ## Step 1: Generate change-id, scaffold, and scan context
112
112
 
@@ -122,17 +122,19 @@ Create the scaffold with the CLI so every provider gets the same templates:
122
122
  cdd-kit new <change-id>
123
123
  ```
124
124
 
125
- Then build deterministic context indexes before invoking any classifier:
126
-
127
- ```bash
128
- cdd-kit context-scan
129
- ```
125
+ `cdd-kit new` auto-runs `cdd-kit context-scan` when `specs/context/` indexes are missing or stale. Do not run a second scan unless the command warned that context-scan failed, or you intentionally used `--skip-scan`.
130
126
 
131
127
  Verify these files exist:
132
128
  - `specs/changes/<change-id>/context-manifest.md`
133
129
  - `specs/context/project-map.md`
134
130
  - `specs/context/contracts-index.md`
135
131
 
132
+ If either context index is still missing, run:
133
+
134
+ ```bash
135
+ cdd-kit context-scan
136
+ ```
137
+
136
138
  Do not use broad search or ad hoc reads to classify the change before `context-scan` has completed.
137
139
 
138
140
  The generated scaffold contains the artifacts listed in the table below. **All
@@ -80,9 +80,16 @@ can act on. When `status: complete`, `none` is acceptable.
80
80
  ## Per-agent additional artifact requirements
81
81
 
82
82
  Each agent prompt lists its own `### Required artifacts for this agent`. The
83
- gate does not enforce those today; they are a discipline contract enforced by
84
- `qa-reviewer` and `contract-reviewer`. If you add a required artifact in an
85
- agent prompt, also update the qa-reviewer checklist.
83
+ gate enforces the declared artifact `type` values when the corresponding agent
84
+ prompt file is installed in `.claude/agents/` or `~/.claude/agents/`. This keeps
85
+ agent prompts, evidence logs, and gate behavior aligned without duplicating the
86
+ full protocol in every prompt.
87
+
88
+ If you add a required artifact type in an agent prompt, also update tests that
89
+ exercise `cdd-kit gate` for that agent. Agents may emit
90
+ `pointer: "n/a (<reason>)"` when a declared type is genuinely inapplicable; the
91
+ type must still be present so reviewers can tell that the omission was
92
+ intentional.
86
93
 
87
94
  ## Self-validation before submitting your response
88
95
 
@@ -132,7 +139,8 @@ ship a known-bad log and rely on the gate to catch it.
132
139
  5. `files-read` is missing for a context-governed change, or contains an
133
140
  absolute path / `..` segment / forbidden path.
134
141
  6. Any `artifacts` item is missing `type` or `pointer`, or the array is empty.
135
- 7. With `--strict`: any `artifacts` pointer that looks like a path but does
142
+ 7. A required per-agent artifact `type` declared in the agent prompt is missing.
143
+ 8. With `--strict`: any `artifacts` pointer that looks like a path but does
136
144
  not exist on disk; or any runtime-logged read not declared in `files-read`.
137
145
 
138
146
  ## Why this lives in references/
@@ -0,0 +1,137 @@
1
+ # Machine-Readable Change Metadata Design
2
+
3
+ ## Goal
4
+
5
+ `change.yml` and `trace.yml` should reduce markdown parsing and repeated agent
6
+ reads. They must not become new forms humans must fill out before making small
7
+ fixes.
8
+
9
+ The design principle is:
10
+
11
+ - Humans write normal change artifacts only when a tracked CDD change is useful.
12
+ - Tools derive machine-readable state from existing artifacts whenever possible.
13
+ - Missing machine-readable files should be fixable by regeneration, not by
14
+ forcing a user through extra ceremony.
15
+
16
+ ## Workflow Lanes
17
+
18
+ | lane | when to use | metadata expectation |
19
+ |---|---|---|
20
+ | maintenance / micro-change | typo fixes, docs cleanup, formatting, lint-only fixes, tiny local test repair | no `specs/changes/<id>/` required |
21
+ | tracked CDD change | behavior, contract, API, data, env, security, CI/CD, cross-module, or release-risk work | `change.yml` and `trace.yml` generated under `specs/changes/<id>/` |
22
+
23
+ The kit should not enforce "every hot file edit needs a change id" by default.
24
+ Teams that want that policy can add a repo-local hook or CI wrapper, but it
25
+ should not be the baseline behavior.
26
+
27
+ ## `change.yml`
28
+
29
+ Purpose: a compact state index for one tracked change.
30
+
31
+ Source of truth:
32
+
33
+ - `tasks.yml` for status, tier, dependencies, and task state.
34
+ - `change-classification.md` for change type, agents, and acceptance criteria.
35
+ - `context-manifest.md` for read scope.
36
+ - `agent-log/*.yml` for evidence and agent completion.
37
+
38
+ Generated shape:
39
+
40
+ ```yaml
41
+ change-id: add-jwt-auth
42
+ status: in-progress
43
+ tier: 2
44
+ lane: tracked
45
+ types:
46
+ primary: feature-enhancement
47
+ secondary: [api-only-change]
48
+ required-agents:
49
+ - change-classifier
50
+ - test-strategist
51
+ - backend-engineer
52
+ - contract-reviewer
53
+ - qa-reviewer
54
+ artifacts:
55
+ required:
56
+ - change-request.md
57
+ - change-classification.md
58
+ - test-plan.md
59
+ - ci-gates.md
60
+ - tasks.yml
61
+ - context-manifest.md
62
+ optional: []
63
+ context:
64
+ manifest: specs/changes/add-jwt-auth/context-manifest.md
65
+ allowed-paths-count: 8
66
+ dependencies: []
67
+ generated-from:
68
+ tasks.yml: sha256:<digest>
69
+ change-classification.md: sha256:<digest>
70
+ context-manifest.md: sha256:<digest>
71
+ ```
72
+
73
+ Rules:
74
+
75
+ - `change.yml` is generated by the CLI, not hand-authored.
76
+ - If it is absent, agents may fall back to existing markdown/YAML artifacts.
77
+ - `cdd-kit doctor --fix` is the right place to regenerate stale metadata.
78
+ - `cdd-kit gate` may warn on stale metadata, but should not fail only because
79
+ `change.yml` is missing unless a repo opts into strict metadata mode.
80
+
81
+ ## `trace.yml`
82
+
83
+ Purpose: a compact traceability graph from acceptance criteria to evidence.
84
+
85
+ Source of truth:
86
+
87
+ - Acceptance criteria from `change-classification.md`.
88
+ - Test mapping from `test-plan.md`.
89
+ - CI gates from `ci-gates.md`.
90
+ - Evidence pointers from `agent-log/*.yml`.
91
+
92
+ Generated shape:
93
+
94
+ ```yaml
95
+ change-id: add-jwt-auth
96
+ criteria:
97
+ - id: AC-1
98
+ text: Users can log in with a valid JWT.
99
+ tests:
100
+ - family: integration
101
+ path: tests/auth/login.test.ts
102
+ name: accepts valid token
103
+ gates:
104
+ - unit
105
+ - contract
106
+ evidence:
107
+ - agent: backend-engineer
108
+ type: tests-added
109
+ pointer: tests/auth/login.test.ts::accepts valid token
110
+ - agent: qa-reviewer
111
+ type: qa-verdict
112
+ pointer: specs/changes/add-jwt-auth/agent-log/qa-reviewer.yml
113
+ ```
114
+
115
+ Rules:
116
+
117
+ - `trace.yml` is generated from existing evidence.
118
+ - It should help reviewers and agents avoid rereading long markdown files.
119
+ - Missing evidence should point back to the existing artifact that needs work;
120
+ it should not introduce a new place to manually duplicate the same content.
121
+
122
+ ## CLI Direction
123
+
124
+ Useful future commands:
125
+
126
+ ```bash
127
+ cdd-kit metadata <change-id> # regenerate change.yml and trace.yml
128
+ cdd-kit metadata <change-id> --check
129
+ cdd-kit doctor --fix # regenerate stale metadata for active changes
130
+ ```
131
+
132
+ Default gate behavior should stay low-friction:
133
+
134
+ - Warn when generated metadata is stale or absent.
135
+ - Fail only when source artifacts themselves are invalid.
136
+ - Add a repo opt-in for strict metadata enforcement later if teams ask for it.
137
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contract-driven-delivery",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Contract-driven delivery kit for AI coding agents with deterministic context indexes, manifest-backed read-scope governance, and orchestrated contracts-first delivery.",
5
5
  "keywords": [
6
6
  "contract-driven",