contract-driven-delivery 2.0.3 → 2.0.8
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 +284 -0
- package/assets/agents/backend-engineer.md +51 -13
- package/assets/agents/change-classifier.md +30 -5
- package/assets/agents/ci-cd-gatekeeper.md +31 -11
- package/assets/agents/contract-reviewer.md +31 -11
- package/assets/agents/dependency-security-reviewer.md +40 -4
- package/assets/agents/e2e-resilience-engineer.md +33 -13
- package/assets/agents/frontend-engineer.md +51 -13
- package/assets/agents/monkey-test-engineer.md +29 -10
- package/assets/agents/qa-reviewer.md +29 -7
- package/assets/agents/repo-context-scanner.md +26 -3
- package/assets/agents/spec-architect.md +30 -10
- package/assets/agents/spec-drift-auditor.md +39 -4
- package/assets/agents/stress-soak-engineer.md +31 -11
- package/assets/agents/test-strategist.md +31 -11
- package/assets/agents/ui-ux-reviewer.md +39 -4
- package/assets/agents/visual-reviewer.md +39 -4
- package/assets/cdd/model-policy.json +3 -3
- package/assets/code-map/python_scanner.py +167 -0
- package/assets/skills/contract-driven-delivery/references/code-map-protocol.md +107 -0
- package/assets/skills/contract-driven-delivery/templates/change-classification.md +36 -2
- package/assets/specs-templates/change-classification.md +36 -2
- package/assets/specs-templates/context-manifest.md +22 -4
- package/assets/specs-templates/tasks.yml +1 -1
- package/dist/cli/index.js +4125 -4931
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,289 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.8] - 2026-05-04
|
|
4
|
+
|
|
5
|
+
Adds `cdd-kit refresh` — a one-shot complete upgrade command. The previous
|
|
6
|
+
upgrade flow (`update --yes` + `upgrade --yes`) only touched `~/.claude/`
|
|
7
|
+
and added missing project files; kit-shipped templates that the user already
|
|
8
|
+
had on disk were never refreshed, leaving them stale across releases.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`cdd-kit refresh [--yes]`**: composes `update` + `upgrade` and adds
|
|
13
|
+
force-refresh for kit-owned templates with automatic timestamped backup.
|
|
14
|
+
Six steps, each independently skippable:
|
|
15
|
+
1. `~/.claude/agents` and `~/.claude/skills/contract-driven-delivery`
|
|
16
|
+
(delegates to `cdd-kit update`)
|
|
17
|
+
2. Add missing project files (delegates to `cdd-kit upgrade`)
|
|
18
|
+
3. **Force-refresh kit templates** with backup to
|
|
19
|
+
`.cdd/.refresh-backup/<timestamp>/`. Targets:
|
|
20
|
+
`specs/templates/`, `tests/templates/`, `ci-templates/`,
|
|
21
|
+
`.github/workflows/contract-driven-gates.yml`.
|
|
22
|
+
4. Re-install pre-commit hook if `.cdd/.hooks-installed` marker exists.
|
|
23
|
+
5. Resync `.cdd/model-policy.json` roles map from
|
|
24
|
+
`~/.claude/agents/<name>.md` `model:` frontmatter (drift detector).
|
|
25
|
+
6. Regenerate `.cdd/code-map.yml`.
|
|
26
|
+
|
|
27
|
+
Flags to skip individual steps: `--no-templates`, `--no-hooks`,
|
|
28
|
+
`--no-code-map`, `--no-update`, `--no-upgrade`. Default is dry-run; pass
|
|
29
|
+
`--yes` to apply.
|
|
30
|
+
|
|
31
|
+
- **`.cdd/.hooks-installed` marker**: written by `cdd-kit init --hooks`.
|
|
32
|
+
Travels in the repo. Lets `cdd-kit refresh` know whether to re-install
|
|
33
|
+
the pre-commit hook on every refresh — so the hook stays in sync with
|
|
34
|
+
the latest kit version automatically.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **Pre-commit hook extension list**: `installCodeMapHook` now triggers
|
|
39
|
+
on `.py / .js / .jsx / .mjs / .cjs / .ts / .tsx / .vue` (was: `.py / .js / .vue`).
|
|
40
|
+
Mirrors `BUILTIN_INCLUDE` and the 2.0.7 qa-reviewer fix.
|
|
41
|
+
|
|
42
|
+
### Boundaries (locked)
|
|
43
|
+
|
|
44
|
+
`cdd-kit refresh` will **never** touch:
|
|
45
|
+
- `contracts/`, `specs/changes/`, `specs/archive/`
|
|
46
|
+
- `src/`, `tests/*` (except `tests/templates/`)
|
|
47
|
+
- `.cdd/code-map-config.yml`, `.cdd/context-policy.json`
|
|
48
|
+
- `CLAUDE.md`, `AGENTS.md`, `CODEX.md`
|
|
49
|
+
- `package.json`, `.git/` (except `.git/hooks/pre-commit` when marker exists),
|
|
50
|
+
`node_modules/`, `dist/`, `build/`
|
|
51
|
+
|
|
52
|
+
### Migration
|
|
53
|
+
|
|
54
|
+
Existing 2.0.x projects: `npm install -g contract-driven-delivery@latest`
|
|
55
|
+
then `cdd-kit refresh --yes`. The first refresh will surface any drift
|
|
56
|
+
that accumulated across 2.0.3 → 2.0.7 — backups land in
|
|
57
|
+
`.cdd/.refresh-backup/<timestamp>/` so rolling back any specific change
|
|
58
|
+
is a single `cp` away.
|
|
59
|
+
|
|
60
|
+
To use the auto-refreshing pre-commit hook on every push:
|
|
61
|
+
1. `cdd-kit init --hooks` (writes the marker)
|
|
62
|
+
2. From now on, `cdd-kit refresh --yes` will re-install the hook every time.
|
|
63
|
+
|
|
64
|
+
## [2.0.7] - 2026-05-04
|
|
65
|
+
|
|
66
|
+
Comprehensive cross-consistency audit fixes. Targets the #1 root cause of
|
|
67
|
+
agent ↔ gate friction: prompts that teach a format the gate cannot recognize.
|
|
68
|
+
All 12 drifts surfaced by an opus-model audit are addressed; new gate
|
|
69
|
+
enforcement is added where prompts described policy that was previously
|
|
70
|
+
documented-only.
|
|
71
|
+
|
|
72
|
+
### Fixed (BLOCKING)
|
|
73
|
+
|
|
74
|
+
- **CER pending detection**: gate now correctly recognises Context Expansion
|
|
75
|
+
Requests written by `cdd-kit context request`. Previously the regex
|
|
76
|
+
required `-` immediately before `status:`, but the canonical writer puts
|
|
77
|
+
`status:` on its own indented line — every real-world pending CER was
|
|
78
|
+
silently bypassed. Replaced with a per-block parser mirroring
|
|
79
|
+
`src/commands/context.ts`.
|
|
80
|
+
- **`pointer: "n/a (...)"` false rejection**: gate skips path-existence checks
|
|
81
|
+
for pointers starting with `n/a` (case-insensitive). Previously, a natural
|
|
82
|
+
reason text like `"n/a (no contracts/ files touched)"` was treated as a
|
|
83
|
+
path because of the `/` and produced a spurious "artifact pointer not
|
|
84
|
+
found" error.
|
|
85
|
+
- **Per-agent `model:` policy drift**: synced `.cdd/model-policy.json` with
|
|
86
|
+
the actual `model:` frontmatter on three agent prompts (spec-drift-auditor,
|
|
87
|
+
visual-reviewer, repo-context-scanner). `cdd-kit doctor` no longer emits
|
|
88
|
+
drift warnings for these three. Same fix applied to the doctor `--fix`
|
|
89
|
+
defaults so newly-initialized projects start in sync.
|
|
90
|
+
- **4 review agents had no `## Read scope`**: dependency-security-reviewer,
|
|
91
|
+
spec-drift-auditor, ui-ux-reviewer, visual-reviewer now point at
|
|
92
|
+
`context-manifest.md → ## Allowed Paths`, matching the 10 already-scoped
|
|
93
|
+
agents. Each prompt also lists the agent's typical extra reads (lockfiles,
|
|
94
|
+
screenshots, contracts) so users know what to add to the manifest up
|
|
95
|
+
front.
|
|
96
|
+
- **qa-reviewer code-map discipline check**: now lists the full extension set
|
|
97
|
+
`(.py, .js, .jsx, .mjs, .cjs, .ts, .tsx, .vue)` instead of the 2.0.5
|
|
98
|
+
three-extension subset that effectively disabled the check on TS-heavy
|
|
99
|
+
repos.
|
|
100
|
+
|
|
101
|
+
### Fixed (RISK)
|
|
102
|
+
|
|
103
|
+
- **`.cdd/code-map-config.yml` errors surface in gate / doctor**: a malformed
|
|
104
|
+
config no longer silently degrades to "greenfield". `freshness.ts` returns
|
|
105
|
+
a `config-error` status and gate emits a hard error; doctor reports it as
|
|
106
|
+
a warning.
|
|
107
|
+
- **`next-action` validation tightened**: gate now rejects placeholder values
|
|
108
|
+
the agent-log-protocol already disallowed (`tbd`, `n/a`, `investigate`,
|
|
109
|
+
`unknown`, `todo`) — previously only `none` was rejected.
|
|
110
|
+
- **Allowed-Paths glob grammar upgraded to picomatch**: patterns like
|
|
111
|
+
`src/**/*.ts`, `lib/{a,b}/**`, `?(...)` now match correctly. The previous
|
|
112
|
+
hand-rolled matcher only supported trailing `/**` and `/*`. Special
|
|
113
|
+
`specs/changes/*` exception preserved.
|
|
114
|
+
- **Engineer agent prompts (`backend-engineer`, `frontend-engineer`) now
|
|
115
|
+
list `.mjs` and `.cjs`** in the code-map "READ FIRST" extension list,
|
|
116
|
+
matching `BUILTIN_INCLUDE` and `references/code-map-protocol.md`.
|
|
117
|
+
- **`change-classification.md` template aligned with classifier output**:
|
|
118
|
+
added the `## Inferred Acceptance Criteria` and `## Tasks Not Applicable`
|
|
119
|
+
sections; renamed `## Required Test Families` → `## Required Tests` and
|
|
120
|
+
`## Assumptions / Clarifications` → `## Clarifications or Assumptions`
|
|
121
|
+
to match what `change-classifier` actually produces.
|
|
122
|
+
- **`.claude/worktrees/` added to all agent forbidden lists** to match
|
|
123
|
+
`.cdd/context-policy.json` defaults (documentation drift only — runtime
|
|
124
|
+
behaviour was already correct).
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
|
|
128
|
+
- **Per-agent required-artifact-types enforcement**: gate now reads each
|
|
129
|
+
agent's prompt file (resolution: `<cwd>/.claude/agents/<name>.md` →
|
|
130
|
+
`~/.claude/agents/<name>.md`) and extracts the "Minimum required `type`
|
|
131
|
+
values" bullet list. Every listed type must appear at least once in the
|
|
132
|
+
agent log's `artifacts:` array (a `pointer: "n/a (<reason>)"` item still
|
|
133
|
+
counts as present — only type membership is checked). Missing types
|
|
134
|
+
produce an actionable error naming the agent and the missing types. When
|
|
135
|
+
no prompt file is found, the check is skipped (back-compat).
|
|
136
|
+
|
|
137
|
+
### Migration
|
|
138
|
+
|
|
139
|
+
- Existing 2.0.6 projects: `cdd-kit update --yes` to refresh the agent
|
|
140
|
+
prompts and `references/code-map-protocol.md`. Then re-run `cdd-kit code-map`.
|
|
141
|
+
- Manifests using literal paths continue to work unchanged. Manifests using
|
|
142
|
+
the new picomatch grammar (`src/**/*.ts`) start working correctly.
|
|
143
|
+
- The new per-agent required-types check may surface previously-silent
|
|
144
|
+
gaps. Each error message is actionable and tells you which type to add.
|
|
145
|
+
|
|
146
|
+
## [2.0.6] - 2026-05-04
|
|
147
|
+
|
|
148
|
+
### Added
|
|
149
|
+
|
|
150
|
+
- TypeScript scanner for `cdd-kit code-map`: `.ts` and `.tsx` files are
|
|
151
|
+
now indexed alongside `.py` / `.js` / `.vue`. `.jsx` / `.mjs` / `.cjs`
|
|
152
|
+
also routed through the JS scanner. Real-world scan of a React 19 +
|
|
153
|
+
TS 5.9 frontend (137 files / 20,119 src lines) compresses to 1,675
|
|
154
|
+
map lines (12.0x) in ~140 ms.
|
|
155
|
+
- New code-map schema fields for TS files: `interfaces:`, `types:`,
|
|
156
|
+
`enums:` — each entry carries `name`, `lines`, and an `# local`
|
|
157
|
+
annotation when the symbol is not exported. Enum entries also list
|
|
158
|
+
their members.
|
|
159
|
+
- User-overridable `.cdd/code-map-config.yml`: optional file with
|
|
160
|
+
`include:` / `exclude:` glob lists. When set, each list REPLACES the
|
|
161
|
+
matching built-in default (replacement semantics keep the mental
|
|
162
|
+
model simple — copy the built-in list and edit it for partial
|
|
163
|
+
overrides). CLI `--include` / `--exclude` flags continue to stack on
|
|
164
|
+
top of whichever lists won. Schema errors produce a clear message
|
|
165
|
+
and a non-zero exit.
|
|
166
|
+
- `lint-agents` Rule A is now stricter: parses the YAML inside each
|
|
167
|
+
agent prompt's `artifacts:` fence and rejects stray top-level keys
|
|
168
|
+
(e.g. a stray `pointer:` or `type:` sibling alongside `artifacts:`).
|
|
169
|
+
This catches the residual format drift that the runtime gate
|
|
170
|
+
already rejects but that previously slipped through prompt review.
|
|
171
|
+
|
|
172
|
+
### Changed
|
|
173
|
+
|
|
174
|
+
- `backend-engineer` and `frontend-engineer` agent prompts: the
|
|
175
|
+
`## Code map (READ FIRST)` section now lists `.ts` / `.tsx` /
|
|
176
|
+
`.jsx` as covered extensions and points agents at the new
|
|
177
|
+
`interfaces:` / `types:` / `enums:` sections for TS files.
|
|
178
|
+
- `references/code-map-protocol.md` documents the TS schema additions
|
|
179
|
+
and the `.cdd/code-map-config.yml` override format.
|
|
180
|
+
- Variable-declaration heuristic in the JS/TS scanner now treats an
|
|
181
|
+
uppercase const initialised by a `CallExpression` (e.g.
|
|
182
|
+
`const Button = forwardRef(...)`, `const X = memo(...)`) as a
|
|
183
|
+
function entry, so React HOC-wrapped components show up in the map.
|
|
184
|
+
Single-letter uppercase identifiers (`X`, `T`, `Y`) are no longer
|
|
185
|
+
classified as ALL_CAPS constants — they fall through to the
|
|
186
|
+
function-heuristic branch.
|
|
187
|
+
|
|
188
|
+
### Fixed
|
|
189
|
+
|
|
190
|
+
- `build.js` no longer ships `.cdd/code-map.yml` inside `assets/cdd/`.
|
|
191
|
+
The map is a per-repo runtime artifact; shipping a pre-built copy
|
|
192
|
+
caused fresh `cdd-kit init` repos to inherit a stale snapshot that
|
|
193
|
+
fooled freshness checks.
|
|
194
|
+
|
|
195
|
+
### Migration
|
|
196
|
+
|
|
197
|
+
- Existing 2.0.5 projects: nothing to do. The TS scanner activates
|
|
198
|
+
automatically on the next `cdd-kit code-map` run if `.ts` / `.tsx`
|
|
199
|
+
files are present. Re-run `cdd-kit code-map` to pick them up.
|
|
200
|
+
- To customise scan scope: create `.cdd/code-map-config.yml`. Without
|
|
201
|
+
it, all built-in defaults apply.
|
|
202
|
+
- `cdd-kit update --yes` to refresh agent prompts in `~/.claude/`.
|
|
203
|
+
|
|
204
|
+
## [2.0.5] - 2026-05-04
|
|
205
|
+
|
|
206
|
+
### Added
|
|
207
|
+
|
|
208
|
+
- `cdd-kit code-map` subcommand: scans `.py`, `.js`, `.vue` source files
|
|
209
|
+
via per-language AST parsers and emits a deterministic structural index
|
|
210
|
+
at `.cdd/code-map.yml`. The map is committed to git and refreshed on
|
|
211
|
+
demand.
|
|
212
|
+
- `cdd-kit init --hooks` (opt-in): installs a pre-commit hook that
|
|
213
|
+
regenerates `.cdd/code-map.yml` whenever staged changes touch source
|
|
214
|
+
files, then re-stages the map. Coexists with `cdd-kit install-hooks`.
|
|
215
|
+
- `cdd-kit gate <change-id>` now hard-fails when any source file is
|
|
216
|
+
newer than `.cdd/code-map.yml`, naming up to 5 stale files. Emits a
|
|
217
|
+
warning (not error) when the map is missing but source files exist.
|
|
218
|
+
- `cdd-kit doctor` reports code-map status (missing / stale / compression
|
|
219
|
+
ratio) and `doctor --fix` regenerates a stale map.
|
|
220
|
+
- New skill reference doc:
|
|
221
|
+
`.claude/skills/contract-driven-delivery/references/code-map-protocol.md`
|
|
222
|
+
documenting the map format and the read-first protocol.
|
|
223
|
+
|
|
224
|
+
### Changed
|
|
225
|
+
|
|
226
|
+
- `backend-engineer` and `frontend-engineer` agent prompts now require
|
|
227
|
+
`Read .cdd/code-map.yml` BEFORE reading any source file. The 300-line
|
|
228
|
+
rule directs agents to use `Read offset:N limit:M` for files larger
|
|
229
|
+
than 300 lines, eliminating whole-file Reads of large modules.
|
|
230
|
+
- `qa-reviewer` now flags any agent log whose `files-read` lists a
|
|
231
|
+
source file without listing `.cdd/code-map.yml` first.
|
|
232
|
+
|
|
233
|
+
### Migration
|
|
234
|
+
|
|
235
|
+
After upgrading existing projects:
|
|
236
|
+
|
|
237
|
+
1. Run `cdd-kit code-map` once to create `.cdd/code-map.yml`. Commit it.
|
|
238
|
+
2. (Optional but recommended) Run `cdd-kit init --hooks` to install the
|
|
239
|
+
auto-regenerate pre-commit hook.
|
|
240
|
+
3. Run `cdd-kit update --yes` to refresh agent prompts in `~/.claude/`.
|
|
241
|
+
|
|
242
|
+
Greenfield projects with no `.py`/`.js`/`.vue` files yet are unaffected.
|
|
243
|
+
|
|
244
|
+
### Dependencies
|
|
245
|
+
|
|
246
|
+
Added: `@babel/parser ^7.25.0`, `@vue/compiler-sfc ^3.4.0`,
|
|
247
|
+
`picomatch ^4.0.2`. Python scanning shells out to the system `python3`
|
|
248
|
+
or `python` interpreter (Python 3.9+); if neither is on PATH, `.py`
|
|
249
|
+
files are skipped with a warning.
|
|
250
|
+
|
|
251
|
+
## [2.0.4] - 2026-05-04
|
|
252
|
+
|
|
253
|
+
### Fixed
|
|
254
|
+
|
|
255
|
+
- All 16 agent prompts now describe the `Required artifacts` block as a
|
|
256
|
+
`{type, pointer}` YAML array (matching `src/schemas/agent-log.schema.ts`)
|
|
257
|
+
instead of a flat key list. Previously agents copied the prompt verbatim
|
|
258
|
+
and emitted top-level `files-changed:` / `tests-added:` keys, which
|
|
259
|
+
`cdd-kit gate` correctly rejected as `missing required artifacts`.
|
|
260
|
+
- Removed duplicate `## Read scope` sections from 10 agents
|
|
261
|
+
(backend-engineer, frontend-engineer, qa-reviewer, contract-reviewer,
|
|
262
|
+
ci-cd-gatekeeper, spec-architect, test-strategist, e2e-resilience-engineer,
|
|
263
|
+
monkey-test-engineer, stress-soak-engineer).
|
|
264
|
+
- Read scope in those 10 agents now points to
|
|
265
|
+
`specs/changes/<change-id>/context-manifest.md → ## Allowed Paths` as the
|
|
266
|
+
single source of truth (matching what `cdd-kit gate` already enforces),
|
|
267
|
+
and instructs agents to file a Context Expansion Request rather than
|
|
268
|
+
reading outside the manifest. Eliminates the most common
|
|
269
|
+
`read unauthorized path` gate failure.
|
|
270
|
+
|
|
271
|
+
### Added
|
|
272
|
+
|
|
273
|
+
- `cdd-kit lint-agents` subcommand: validates every `.claude/agents/*.md`
|
|
274
|
+
has the new artifacts shape, at most one `## Read scope`, a
|
|
275
|
+
`context-manifest.md` reference where applicable, and a pointer to
|
|
276
|
+
`references/agent-log-protocol.md`. Wired into `cdd-kit doctor`.
|
|
277
|
+
- Optional `note:` field on tasks in `tasks.yml` (schema and template) for
|
|
278
|
+
recording per-task context without breaking the existing `pending |
|
|
279
|
+
done | skipped` status enum.
|
|
280
|
+
|
|
281
|
+
### Migration
|
|
282
|
+
|
|
283
|
+
No project-side migration required — the fix is to the bundled agent
|
|
284
|
+
prompts. After upgrading run `cdd-kit update --yes` to refresh the agents
|
|
285
|
+
in `~/.claude/`.
|
|
286
|
+
|
|
3
287
|
## [2.0.3] - 2026-04-30
|
|
4
288
|
|
|
5
289
|
### Fixed
|
|
@@ -9,6 +9,24 @@ You are the backend engineer.
|
|
|
9
9
|
|
|
10
10
|
Before editing production code, read the change artifacts, API/env/data/business contracts, and test plan.
|
|
11
11
|
|
|
12
|
+
## Code map (READ FIRST)
|
|
13
|
+
|
|
14
|
+
Before reading ANY source file (`.py`, `.js`, `.jsx`, `.mjs`, `.cjs`, `.ts`, `.tsx`, `.vue`), FIRST `Read .cdd/code-map.yml`.
|
|
15
|
+
|
|
16
|
+
The map is the size oracle. For each file you intend to read:
|
|
17
|
+
|
|
18
|
+
- The header `<path>: # N lines` tells you how big it is.
|
|
19
|
+
- If `N <= 300`: do a full `Read`.
|
|
20
|
+
- If `N > 300`: use the map's `classes:` / `functions:` (and for TS files,
|
|
21
|
+
`interfaces:` / `types:` / `enums:`) `lines: A-B` field and
|
|
22
|
+
`Read <path> offset:A limit:(B-A+1)`.
|
|
23
|
+
|
|
24
|
+
If `.cdd/code-map.yml` is missing or `cdd-kit gate` reports it stale,
|
|
25
|
+
do NOT proceed by reading whole files. Emit an agent-log with
|
|
26
|
+
`status: needs-review` and `next-action: "regenerate code-map (run cdd-kit code-map)"`.
|
|
27
|
+
|
|
28
|
+
See `references/code-map-protocol.md` for the full protocol.
|
|
29
|
+
|
|
12
30
|
## Rules
|
|
13
31
|
|
|
14
32
|
- Do not change API response shape without contract updates.
|
|
@@ -32,9 +50,12 @@ Before editing production code, read the change artifacts, API/env/data/business
|
|
|
32
50
|
|
|
33
51
|
## Read scope
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` → `## Allowed Paths`.
|
|
54
|
+
Read it first (your prompt header has `CURRENT_CHANGE_ID`). Read only paths it lists or paths under `## Approved Expansions`. `cdd-kit gate` validates `files-read:` against this list and rejects unauthorized paths.
|
|
55
|
+
|
|
56
|
+
Need a path not listed? File a `## Context Expansion Requests` entry (see `specs/templates/context-manifest.md`) with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
|
|
57
|
+
|
|
58
|
+
Forbidden by default (enforced by `.cdd/context-policy.json`): `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
38
59
|
|
|
39
60
|
## Handoff
|
|
40
61
|
|
|
@@ -53,14 +74,31 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
53
74
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
54
75
|
|
|
55
76
|
### Required artifacts for this agent
|
|
56
|
-
- `files-changed`: list of `path/to/file.ts:line-range`
|
|
57
|
-
- `tests-added`: list of `test-file.ts::test-name`
|
|
58
|
-
- `test-output`: last 10 lines of `npm test` or equivalent stdout
|
|
59
|
-
- `contracts-touched`: list of contract file paths or "none"
|
|
60
|
-
|
|
61
|
-
## Read scope
|
|
62
|
-
|
|
63
|
-
- Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
|
|
64
|
-
- Forbidden: other `specs/changes/` directories, `specs/archive/`
|
|
65
77
|
|
|
66
|
-
|
|
78
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
79
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
80
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
81
|
+
those are `type` values, not log keys.
|
|
82
|
+
|
|
83
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
84
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
85
|
+
|
|
86
|
+
- `files-changed`: source files modified
|
|
87
|
+
- `tests-added`: new or updated test cases
|
|
88
|
+
- `test-output`: last 10 lines of `npm test` (or equivalent) stdout
|
|
89
|
+
- `contracts-touched`: contract files updated, or "none"
|
|
90
|
+
|
|
91
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
92
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
artifacts:
|
|
96
|
+
- { type: files-changed, pointer: "src/api/users.ts:10-45" }
|
|
97
|
+
- { type: tests-added, pointer: "tests/api/users.test.ts::should reject empty body" }
|
|
98
|
+
- { type: test-output, pointer: "5 passed (last 10 lines: …)" }
|
|
99
|
+
- { type: contracts-touched, pointer: "contracts/api/api-contract.md#endpoints" }
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If a required `type` does not apply to your run, emit one item with
|
|
103
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
104
|
+
counts presence, qa-reviewer audits the reason.
|
|
@@ -232,11 +232,36 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
232
232
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
233
233
|
|
|
234
234
|
### Required artifacts for this agent
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
- `
|
|
239
|
-
|
|
235
|
+
|
|
236
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
237
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
238
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
239
|
+
those are `type` values, not log keys.
|
|
240
|
+
|
|
241
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
242
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
243
|
+
|
|
244
|
+
- `tier`: tier assigned to the change
|
|
245
|
+
- `risk`: risk level
|
|
246
|
+
- `required-artifacts`: artifacts the change must produce
|
|
247
|
+
- `required-reviewers`: reviewers the change requires
|
|
248
|
+
- `context-manifest-draft`: pointer to draft Allowed Paths
|
|
249
|
+
|
|
250
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
251
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
artifacts:
|
|
255
|
+
- { type: tier, pointer: "Tier 2" }
|
|
256
|
+
- { type: risk, pointer: "medium" }
|
|
257
|
+
- { type: required-artifacts, pointer: "change-request, classification, test-plan, ci-gates, tasks" }
|
|
258
|
+
- { type: required-reviewers, pointer: "contract-reviewer, qa-reviewer" }
|
|
259
|
+
- { type: context-manifest-draft, pointer: "specs/changes/<id>/context-manifest.md#allowed-paths" }
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
If a required `type` does not apply to your run, emit one item with
|
|
263
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
264
|
+
counts presence, qa-reviewer audits the reason.
|
|
240
265
|
|
|
241
266
|
## Mixed and edge cases
|
|
242
267
|
|
|
@@ -58,9 +58,12 @@ mergeable / blocked / informational-risk
|
|
|
58
58
|
|
|
59
59
|
## Read scope
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` → `## Allowed Paths`.
|
|
62
|
+
Read it first (your prompt header has `CURRENT_CHANGE_ID`). Read only paths it lists or paths under `## Approved Expansions`. `cdd-kit gate` validates `files-read:` against this list and rejects unauthorized paths.
|
|
63
|
+
|
|
64
|
+
Need a path not listed? File a `## Context Expansion Requests` entry (see `specs/templates/context-manifest.md`) with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
|
|
65
|
+
|
|
66
|
+
Forbidden by default (enforced by `.cdd/context-policy.json`): `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
64
67
|
|
|
65
68
|
## Machine-Verifiable Evidence
|
|
66
69
|
|
|
@@ -70,14 +73,31 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
70
73
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
71
74
|
|
|
72
75
|
### Required artifacts for this agent
|
|
73
|
-
- `tiers-modified`: list of tier numbers
|
|
74
|
-
- `gate-promotions`: list of `<gate>: <from-tier> → <to-tier>` or "none"
|
|
75
|
-
- `workflow-files-changed`: list of paths
|
|
76
|
-
- `required-status-checks`: list of check names
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
78
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
79
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
80
|
+
those are `type` values, not log keys.
|
|
81
|
+
|
|
82
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
83
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
79
84
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
85
|
+
- `tiers-modified`: gate tiers touched
|
|
86
|
+
- `gate-promotions`: gate moves between tiers or "none"
|
|
87
|
+
- `workflow-files-changed`: workflow files edited
|
|
88
|
+
- `required-status-checks`: PR-required gates after change
|
|
89
|
+
|
|
90
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
91
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
artifacts:
|
|
95
|
+
- { type: tiers-modified, pointer: "1, 3" }
|
|
96
|
+
- { type: gate-promotions, pointer: "e2e: 3 → 1" }
|
|
97
|
+
- { type: workflow-files-changed, pointer: ".github/workflows/ci.yml" }
|
|
98
|
+
- { type: required-status-checks, pointer: "lint, unit-tests, contract-tests" }
|
|
99
|
+
```
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
If a required `type` does not apply to your run, emit one item with
|
|
102
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
103
|
+
counts presence, qa-reviewer audits the reason.
|
|
@@ -57,9 +57,12 @@ approved / changes-required
|
|
|
57
57
|
|
|
58
58
|
## Read scope
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` → `## Allowed Paths`.
|
|
61
|
+
Read it first (your prompt header has `CURRENT_CHANGE_ID`). Read only paths it lists or paths under `## Approved Expansions`. `cdd-kit gate` validates `files-read:` against this list and rejects unauthorized paths.
|
|
62
|
+
|
|
63
|
+
Need a path not listed? File a `## Context Expansion Requests` entry (see `specs/templates/context-manifest.md`) with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
|
|
64
|
+
|
|
65
|
+
Forbidden by default (enforced by `.cdd/context-policy.json`): `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
63
66
|
|
|
64
67
|
## Machine-Verifiable Evidence
|
|
65
68
|
|
|
@@ -70,14 +73,31 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
70
73
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
71
74
|
|
|
72
75
|
### Required artifacts for this agent
|
|
73
|
-
- `contracts-reviewed`: list of contract file paths
|
|
74
|
-
- `version-bumps`: list of `<contract>: <old> → <new>` or "none"
|
|
75
|
-
- `breaking-changes`: list or "none"
|
|
76
|
-
- `consumers-impacted`: list or "none"
|
|
77
76
|
|
|
78
|
-
|
|
77
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
78
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
79
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
80
|
+
those are `type` values, not log keys.
|
|
81
|
+
|
|
82
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
83
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
79
84
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
85
|
+
- `contracts-reviewed`: contract files reviewed
|
|
86
|
+
- `version-bumps`: version changes per contract or "none"
|
|
87
|
+
- `breaking-changes`: list of breaking items or "none"
|
|
88
|
+
- `consumers-impacted`: downstream consumers affected or "none"
|
|
89
|
+
|
|
90
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
91
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
artifacts:
|
|
95
|
+
- { type: contracts-reviewed, pointer: "contracts/api/api-contract.md" }
|
|
96
|
+
- { type: version-bumps, pointer: "api-contract: 0.1.0 → 0.2.0" }
|
|
97
|
+
- { type: breaking-changes, pointer: "none" }
|
|
98
|
+
- { type: consumers-impacted, pointer: "frontend/web, mobile-ios" }
|
|
99
|
+
```
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
If a required `type` does not apply to your run, emit one item with
|
|
102
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
103
|
+
counts presence, qa-reviewer audits the reason.
|
|
@@ -38,6 +38,7 @@ For any change that adds or modifies a database migration:
|
|
|
38
38
|
- Post-install scripts — flag any new dependency that runs `postinstall`, `preinstall`, or arbitrary build hooks; require justification.
|
|
39
39
|
- Maintenance signal — last commit > 24 months, single maintainer, no test suite — escalate even when no CVE is known.
|
|
40
40
|
- License families — permissive (MIT, BSD, Apache-2): generally OK; weak copyleft (LGPL, MPL): OK with isolation; strong copyleft (GPL, AGPL): proprietary code conflict — block unless legal-approved.
|
|
41
|
+
- cdd-kit 2.0.5 added three new direct dependencies: `@babel/parser ^7.25.0` (MIT), `@vue/compiler-sfc ^3.4.0` (MIT), `picomatch ^4.0.2` (MIT) — included for the `code-map` subcommand AST scanning feature.
|
|
41
42
|
|
|
42
43
|
## Output
|
|
43
44
|
|
|
@@ -62,6 +63,17 @@ For any change that adds or modifies a database migration:
|
|
|
62
63
|
approved / changes-required / blocked
|
|
63
64
|
```
|
|
64
65
|
|
|
66
|
+
## Read scope
|
|
67
|
+
|
|
68
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` → `## Allowed Paths`.
|
|
69
|
+
Read it first (your prompt header has `CURRENT_CHANGE_ID`). Read only paths it lists or paths under `## Approved Expansions`. `cdd-kit gate` validates `files-read:` against this list and rejects unauthorized paths.
|
|
70
|
+
|
|
71
|
+
This agent typically also needs to read lockfiles (`package-lock.json`, `yarn.lock`, `requirements*.txt`, `go.sum`) and migration directories — make sure the manifest's Allowed Paths includes them, or file a `## Context Expansion Requests` entry.
|
|
72
|
+
|
|
73
|
+
Need a path not listed? File a `## Context Expansion Requests` entry (see `specs/templates/context-manifest.md`) with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
|
|
74
|
+
|
|
75
|
+
Forbidden by default (enforced by `.cdd/context-policy.json`): `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
76
|
+
|
|
65
77
|
## Machine-Verifiable Evidence
|
|
66
78
|
|
|
67
79
|
After completing your task, end your response with an `Agent Log` YAML block
|
|
@@ -71,7 +83,31 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
71
83
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
72
84
|
|
|
73
85
|
### Required artifacts for this agent
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- `
|
|
86
|
+
|
|
87
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
88
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
89
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
90
|
+
those are `type` values, not log keys.
|
|
91
|
+
|
|
92
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
93
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
94
|
+
|
|
95
|
+
- `packages-reviewed`: packages assessed
|
|
96
|
+
- `cve-findings`: CVE findings count by severity
|
|
97
|
+
- `license-issues`: license-compliance findings or "none"
|
|
98
|
+
- `lockfile-changes`: lockfile files changed
|
|
99
|
+
|
|
100
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
101
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
artifacts:
|
|
105
|
+
- { type: packages-reviewed, pointer: "axios@1.7.0, jose@5.2.1" }
|
|
106
|
+
- { type: cve-findings, pointer: "0 high, 1 medium" }
|
|
107
|
+
- { type: license-issues, pointer: "none" }
|
|
108
|
+
- { type: lockfile-changes, pointer: "package-lock.json" }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If a required `type` does not apply to your run, emit one item with
|
|
112
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
113
|
+
counts presence, qa-reviewer audits the reason.
|
|
@@ -35,9 +35,12 @@ Record test files, scenarios, fixtures/mocks, commands, screenshots/videos, and
|
|
|
35
35
|
|
|
36
36
|
## Read scope
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` → `## Allowed Paths`.
|
|
39
|
+
Read it first (your prompt header has `CURRENT_CHANGE_ID`). Read only paths it lists or paths under `## Approved Expansions`. `cdd-kit gate` validates `files-read:` against this list and rejects unauthorized paths.
|
|
40
|
+
|
|
41
|
+
Need a path not listed? File a `## Context Expansion Requests` entry (see `specs/templates/context-manifest.md`) with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
|
|
42
|
+
|
|
43
|
+
Forbidden by default (enforced by `.cdd/context-policy.json`): `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
41
44
|
|
|
42
45
|
## Machine-Verifiable Evidence
|
|
43
46
|
|
|
@@ -47,14 +50,31 @@ field rules, and gate-enforcement behavior are defined once in
|
|
|
47
50
|
`references/agent-log-protocol.md` — do not duplicate them in this prompt.
|
|
48
51
|
|
|
49
52
|
### Required artifacts for this agent
|
|
50
|
-
- `test-files`: list of paths under `tests/e2e/` or `tests/resilience/`
|
|
51
|
-
- `scenarios-covered`: list of scenario names
|
|
52
|
-
- `mutation-checks`: list or "none"
|
|
53
|
-
- `trace-artifacts`: paths or "none"
|
|
54
|
-
|
|
55
|
-
## Read scope
|
|
56
|
-
|
|
57
|
-
- Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
|
|
58
|
-
- Forbidden: other `specs/changes/` directories, `specs/archive/`
|
|
59
53
|
|
|
60
|
-
|
|
54
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log
|
|
55
|
+
(see `references/agent-log-protocol.md` for the full schema and self-validation
|
|
56
|
+
checklist). Do NOT write top-level `files-changed:` / `tests-added:` keys —
|
|
57
|
+
those are `type` values, not log keys.
|
|
58
|
+
|
|
59
|
+
Minimum required `type` values for this agent (each must appear at least once
|
|
60
|
+
in your `artifacts:` array; add more items per type as needed):
|
|
61
|
+
|
|
62
|
+
- `test-files`: E2E/resilience test files written
|
|
63
|
+
- `scenarios-covered`: list of scenarios (happy-path, failure-injection, etc.)
|
|
64
|
+
- `mutation-checks`: mutation test result or "none"
|
|
65
|
+
- `trace-artifacts`: path to traces/recordings
|
|
66
|
+
|
|
67
|
+
Copy this exact shape into your agent log; replace each `<pointer>` with a
|
|
68
|
+
concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
artifacts:
|
|
72
|
+
- { type: test-files, pointer: "tests/e2e/login.spec.ts" }
|
|
73
|
+
- { type: scenarios-covered, pointer: "happy-path, slow-network, 503" }
|
|
74
|
+
- { type: mutation-checks, pointer: "none" }
|
|
75
|
+
- { type: trace-artifacts, pointer: "specs/changes/<id>/traces/login-503.zip" }
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If a required `type` does not apply to your run, emit one item with
|
|
79
|
+
`pointer: "n/a (<one-line reason>)"` rather than omitting the type — the gate
|
|
80
|
+
counts presence, qa-reviewer audits the reason.
|