contract-driven-delivery 2.0.14 → 2.0.15

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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.15] - 2026-05-06
4
+
5
+ Prompt guidance patch for agent-log evidence and closeout learning ownership.
6
+
7
+ ### Changed
8
+
9
+ - **Agent-log pointer guidance matches gate behavior**: `/cdd-new` and
10
+ `agent-log-protocol.md` now spell out that a pointer whose text before the
11
+ first `:` contains `/` is validated as a single repo-relative file path, so
12
+ agents avoid parenthetical path notes and slash-containing labels such as
13
+ `I/O:` or `WARNING/OVERDUE:`.
14
+ - **Durable learning ownership is explicit**: prompts now consistently say
15
+ general agents record evidence and findings only, while durable learning
16
+ promotion happens during `/cdd-close` Step 3 and targets `contracts/` or
17
+ project guidance (`CLAUDE.md`/`CODEX.md`).
18
+
3
19
  ## [2.0.14] - 2026-05-06
4
20
 
5
21
  Operational hardening for real multi-agent CDD runs.
package/README.md CHANGED
@@ -190,7 +190,7 @@ After the PR is merged:
190
190
  **What happens:**
191
191
  1. Runs `cdd-kit gate` to confirm the change still passes
192
192
  2. Synthesizes `archive.md` — a permanent record of what changed, what tests were added, and what lessons were found
193
- 3. Invokes `contract-reviewer` to propose any durable learnings back into `contracts/`
193
+ 3. Promotes only evidence-backed durable learnings to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`). General agents record evidence and findings only; durable learning promotion happens during `/cdd-close` Step 3.
194
194
  4. Runs `cdd-kit archive add-jwt-auth` — moves the change from `specs/changes/` to `specs/archive/2026/`
195
195
  5. Reduces the active context that future Claude sessions need to load
196
196
 
@@ -10,7 +10,7 @@ description: Close and archive a completed change. Confirms all tasks are done,
10
10
  A change is "done" when:
11
11
  1. Gate has passed (`cdd-kit gate <change-id>` exits 0)
12
12
  2. PR is merged (or change is abandoned)
13
- 3. Durable learnings have been promoted to hot sources: `contracts/`, `CLAUDE.md`, or `CODEX.md`
13
+ 3. Durable learnings have been promoted to hot sources: `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`)
14
14
 
15
15
  This skill drives steps 2–3 and physically moves the change to `specs/archive/`.
16
16
 
@@ -58,7 +58,7 @@ Read `specs/changes/<change-id>/tasks.yml`.
58
58
 
59
59
  Check section 7:
60
60
  - `7.1 Archive change` — will be ticked after Step 4
61
- - `7.2 Promote durable learnings to contracts or CLAUDE.md` — must be done NOW
61
+ - `7.2 Promote durable learnings to contracts or project guidance` — must be done NOW
62
62
 
63
63
  If `7.2` is `[ ]`, proceed to Step 2.5. If already `[x]` or `[-]`, skip Steps 2.5 and 3.
64
64
 
@@ -92,6 +92,11 @@ This file records the close-out evidence, but Step 3 promotion must still be evi
92
92
 
93
93
  ## Step 3: Promote learnings (task 7.2)
94
94
 
95
+ General agents do not perform durable learning promotion during `/cdd-new`; they
96
+ only record evidence and findings in artifacts and `agent-log/*.yml`. Durable
97
+ learning promotion happens here, during `/cdd-close` Step 3, and main Claude
98
+ owns the final writes.
99
+
95
100
  Read `specs/changes/<change-id>/archive.md` section `## Lessons Promoted to Standards` and cross-check every proposed lesson against agent-log, QA report, contract/test changes, or gate evidence from this change.
96
101
 
97
102
  Classify each candidate:
@@ -132,7 +137,7 @@ If successful, set task `7.1` to `status: done` in tasks.yml (the file is now in
132
137
 
133
138
  Change ID: <change-id>
134
139
  Archived to: specs/archive/<year>/<change-id>/
135
- Learnings promoted: <list what was added to contracts/CLAUDE.md/CODEX.md, or "none">
140
+ Learnings promoted: <list what was added to contracts/ or project guidance (CLAUDE.md/CODEX.md), or "none">
136
141
 
137
142
  specs/changes/<change-id>/ has been removed from the active surface.
138
143
  Token cost of future sessions reduced by ~<N> files.
@@ -96,6 +96,21 @@ inevitable re-classification when the agents discover the ambiguity.
96
96
 
97
97
  **Rule**: After EVERY agent completes (whether it writes itself or you write for it), YOU must update the relevant `tasks.yml` task `status:` from `pending` to `done`.
98
98
 
99
+ **Agent-log pointer rule**: When you or an agent writes `artifacts[].pointer`,
100
+ follow `references/agent-log-protocol.md` exactly. If the text before the first
101
+ `:` contains `/`, `cdd-kit gate` treats that text as a repo-relative file path
102
+ and verifies that the file exists. Therefore each pointer may name only one
103
+ file, file pointers must not include parenthetical notes on the path, and
104
+ slash-containing labels such as `I/O:` or `WARNING/OVERDUE:` must not be used as
105
+ pointer prefixes. Put extra explanation in `notes` or a separate non-path
106
+ artifact pointer instead.
107
+
108
+ **Durable learning rule**: During `/cdd-new`, agents record evidence and
109
+ findings in artifacts and `agent-log/*.yml` only. Do not promote durable lessons
110
+ while the change is still active. Durable learning promotion happens only during
111
+ `/cdd-close` Step 3, where main Claude cross-checks evidence and writes approved
112
+ rules to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`).
113
+
99
114
  ---
100
115
 
101
116
  ## Artifact opt-in policy
@@ -515,4 +530,4 @@ Please review the above items and re-run: cdd-kit gate <change-id>
515
530
 
516
531
  The `/cdd-new` workflow is now complete. **Return to normal assistant mode immediately.** Answer any question the user asks — including questions unrelated to this change, new feature discussions, debugging help, or general conversation — without requiring them to use a specific command. The git commit shown in the report is a suggestion, not a required next step; do not wait for it before resuming normal behavior.
517
532
 
518
- When the change is merged and ready to close, run `/cdd-close <change-id>` to promote learnings and archive the change directory.
533
+ When the change is merged and ready to close, run `/cdd-close <change-id>` to promote durable learnings to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`) and archive the change directory.
@@ -57,7 +57,10 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
57
57
  - Invoke ci-cd-gatekeeper to design and enforce the gate plan.
58
58
  8. Archive and audit drift.
59
59
  - Use `references/spec-drift-policy.md`.
60
- - Durable learnings must be promoted back to contracts or CLAUDE.md.
60
+ - General agents record evidence and findings only; durable learning
61
+ promotion happens only during `/cdd-close` Step 3.
62
+ - Durable learnings must be promoted back to `contracts/` or project
63
+ guidance (`CLAUDE.md`/`CODEX.md`).
61
64
  - `spec-drift-auditor` must run before every release to main and weekly during active multi-iteration development.
62
65
 
63
66
  ## Required gates by risk
@@ -75,6 +75,22 @@ Concrete pointers only. Allowed forms:
75
75
  - `cdd-kit gate <id>: 0 errors`
76
76
  - `contracts/api/api-contract.md#endpoints`
77
77
 
78
+ Gate path-existence rule: unless gate is run with `--lax`, any pointer whose
79
+ text before the first `:` contains `/` is treated as a repo-relative file path
80
+ and that file must exist. This makes path-like pointers useful, but it also
81
+ means:
82
+
83
+ - One pointer names one file only. Use separate `artifacts` items for multiple
84
+ files.
85
+ - Do not attach parenthetical notes to a file path, e.g. use
86
+ `src/api/users.ts:45-67`, not `src/api/users.ts (updated):45-67`.
87
+ - Do not start a pointer with slash-containing prose labels such as `I/O:` or
88
+ `WARNING/OVERDUE:`; gate will try to validate `I/O` or `WARNING/OVERDUE` as a
89
+ path. Write those labels in `notes` or after a non-path command/result
90
+ pointer.
91
+ - `n/a (<reason>)` is exempt from path validation and is allowed for genuinely
92
+ inapplicable required artifact types.
93
+
78
94
  Never `verified`, `OK`, `done`, or unscoped prose.
79
95
 
80
96
  #### `next-action`
@@ -133,7 +149,12 @@ verify each item:
133
149
  - BAD: `{ type: tests-added, pointer: verified }`
134
150
  - BAD: `{ type: files-changed, pointer: yes }`
135
151
  - BAD: `{ type: contract, pointer: OK }`
152
+ - BAD: `{ type: files-changed, pointer: "src/api/users.ts (updated):45-67" }`
153
+ - BAD: `{ type: test-output, pointer: "I/O: warning reproduced" }`
154
+ - BAD: `{ type: test-output, pointer: "WARNING/OVERDUE: manual follow-up" }`
136
155
  Reject any line whose pointer would not let a reviewer click through.
156
+ If the text before the first `:` contains `/`, confirm it is exactly one
157
+ existing repo-relative file path with no parenthetical note.
137
158
  - [ ] **If `status: blocked`**, `next-action` is ≥ 10 chars, is NOT `none`,
138
159
  `investigate further`, `tbd`, or `n/a`, and names the actual next step
139
160
  a human can act on.
@@ -160,8 +181,9 @@ ship a known-bad log and rely on the gate to catch it.
160
181
  `Allowed Paths` and `Approved Expansions`.
161
182
  6. Any `artifacts` item is missing `type` or `pointer`, or the array is empty.
162
183
  7. A required per-agent artifact `type` declared in the agent prompt is missing.
163
- 8. With `--strict`: any `artifacts` pointer that looks like a path but does
164
- not exist on disk; or any runtime-logged read not declared in `files-read`.
184
+ 8. Unless gate is run with `--lax`: any `artifacts` pointer whose text before
185
+ the first `:` contains `/` but does not exist on disk; or any
186
+ runtime-logged read not declared in `files-read`.
165
187
 
166
188
  ## Why this lives in references/
167
189
 
@@ -36,4 +36,4 @@ tasks:
36
36
  - { id: "6.3", section: Verification, title: "Informational gates", status: pending }
37
37
  - { id: "6.4", section: Verification, title: "Nightly/weekly/manual gates if required", status: pending }
38
38
  - { id: "7.1", section: Archive, title: "Archive change", status: pending }
39
- - { id: "7.2", section: Archive, title: "Promote durable learnings to contracts or CLAUDE.md", status: pending }
39
+ - { id: "7.2", section: Archive, title: "Promote durable learnings to contracts or project guidance", status: pending }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contract-driven-delivery",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
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",