contract-driven-delivery 2.0.15 → 2.0.17
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 +49 -0
- package/README.md +69 -81
- package/assets/CLAUDE.template.md +3 -3
- package/assets/CODEX.template.md +5 -5
- package/assets/agents/backend-engineer.md +29 -31
- package/assets/agents/change-classifier.md +28 -33
- package/assets/agents/ci-cd-gatekeeper.md +21 -25
- package/assets/agents/contract-reviewer.md +21 -26
- package/assets/agents/dependency-security-reviewer.md +21 -26
- package/assets/agents/e2e-resilience-engineer.md +19 -23
- package/assets/agents/frontend-engineer.md +29 -31
- package/assets/agents/monkey-test-engineer.md +19 -23
- package/assets/agents/qa-reviewer.md +20 -25
- package/assets/agents/repo-context-scanner.md +17 -22
- package/assets/agents/spec-architect.md +17 -21
- package/assets/agents/spec-drift-auditor.md +17 -22
- package/assets/agents/stress-soak-engineer.md +17 -21
- package/assets/agents/test-strategist.md +24 -28
- package/assets/agents/ui-ux-reviewer.md +16 -21
- package/assets/agents/visual-reviewer.md +19 -24
- package/assets/skills/cdd-new/SKILL.md +112 -119
- package/assets/skills/contract-driven-delivery/SKILL.md +3 -3
- package/assets/skills/contract-driven-delivery/references/agent-log-protocol.md +68 -157
- package/assets/skills/contract-driven-delivery/references/code-map-protocol.md +57 -35
- package/assets/skills/contract-driven-delivery/templates/agent-log.example.yml +6 -0
- package/assets/skills/contract-driven-delivery/templates/change-classification.md +2 -2
- package/dist/cli/index.js +2387 -2160
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
---
|
|
1
|
+
---
|
|
2
2
|
name: cdd-new
|
|
3
3
|
description: Start a new tracked change. Scaffolds all required artifacts, classifies the change by risk tier, commissions the right agents in order, and runs cdd-kit gate. Args: <change description in natural language>
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# cdd-new
|
|
6
|
+
# cdd-new ??New Change Request
|
|
7
7
|
|
|
8
8
|
## Mental model
|
|
9
9
|
|
|
10
|
-
- `contracts/` = the single source of truth (live
|
|
10
|
+
- `contracts/` = the single source of truth (live ??always reflects current system behaviour)
|
|
11
11
|
- `tests/` = proof the contracts hold (live)
|
|
12
|
-
- `specs/changes/<id>/` = why we decided this back then (passive archive
|
|
12
|
+
- `specs/changes/<id>/` = why we decided this back then (passive archive ??read only when investigating history, never as input to planning)
|
|
13
13
|
- `CLAUDE.md` = what this project is and how to start work
|
|
14
14
|
|
|
15
15
|
## Spec depth rules
|
|
@@ -17,20 +17,20 @@ description: Start a new tracked change. Scaffolds all required artifacts, class
|
|
|
17
17
|
Every artifact under `specs/changes/<id>/` answers **WHAT** and **WHY**, not HOW.
|
|
18
18
|
|
|
19
19
|
Soft caps (guidance, not gate-enforced):
|
|
20
|
-
- `spec.md`
|
|
21
|
-
- `design.md`
|
|
22
|
-
- `test-plan.md`
|
|
23
|
-
- `ci-gates.md`
|
|
20
|
+
- `spec.md` ??200 lines
|
|
21
|
+
- `design.md` ??150 lines
|
|
22
|
+
- `test-plan.md` ??100 lines
|
|
23
|
+
- `ci-gates.md` ??80 lines
|
|
24
24
|
|
|
25
25
|
**Forbidden in spec artifacts** (these belong in code/tests, not specs):
|
|
26
|
-
- SQL DDL or migration code
|
|
27
|
-
- ORM model code (SQLAlchemy, Prisma, etc.)
|
|
28
|
-
- Full test function bodies, mock setup, fixture data, expected JSON payloads
|
|
26
|
+
- SQL DDL or migration code ??put in migrations/, reference the path
|
|
27
|
+
- ORM model code (SQLAlchemy, Prisma, etc.) ??put in source, reference the module
|
|
28
|
+
- Full test function bodies, mock setup, fixture data, expected JSON payloads ??put in tests/
|
|
29
29
|
- Runnable code blocks > 10 lines belong in source files, not specs. Pseudocode and mapping tables are fine at any length.
|
|
30
30
|
- Per-test input/output tables with more than 15 rows (data-boundary tests with up to 15 boundary cases are acceptable)
|
|
31
31
|
|
|
32
32
|
**test-plan.md should contain:**
|
|
33
|
-
- Acceptance criteria
|
|
33
|
+
- Acceptance criteria ??test family mapping (table)
|
|
34
34
|
- Test file paths and test names (one line per test, no implementation detail)
|
|
35
35
|
- Tier assignment per family
|
|
36
36
|
- Out-of-scope list
|
|
@@ -70,43 +70,40 @@ Before I start a tracked change, I need to lock down three things:
|
|
|
70
70
|
|
|
71
71
|
Affected surface: <best guess from request, or empty>
|
|
72
72
|
Desired behavior: <best guess, or empty>
|
|
73
|
-
Success criterion: <empty
|
|
73
|
+
Success criterion: <empty ??please fill>
|
|
74
74
|
|
|
75
75
|
Could you confirm or fill in the missing pieces?
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
Only proceed to Step 1 once all three are answered or the user explicitly says
|
|
79
79
|
"proceed without success criterion". Record the user's clarifications verbatim
|
|
80
|
-
in `change-request.md`
|
|
80
|
+
in `change-request.md` 禮 Original Request.
|
|
81
81
|
|
|
82
82
|
The cost of this step: 1 short message round-trip. The cost of skipping it:
|
|
83
|
-
one full classifier+contract-reviewer cycle, often 5-10
|
|
83
|
+
one full classifier+contract-reviewer cycle, often 5-10? more tokens, plus an
|
|
84
84
|
inevitable re-classification when the agents discover the ambiguity.
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
88
88
|
## Write Responsibilities
|
|
89
89
|
|
|
90
|
-
**This distinction is critical
|
|
90
|
+
**This distinction is critical ??follow it for every step:**
|
|
91
91
|
|
|
92
|
-
| Agent type | Who writes artifact files | Who writes
|
|
93
|
-
|
|
94
|
-
| Read-only agents (no Edit tool): `change-classifier`, `contract-reviewer`, `qa-reviewer`, `visual-reviewer`, `dependency-security-reviewer`, `ui-ux-reviewer` | YOU (main Claude) | YOU
|
|
95
|
-
| Write-capable agents (have Edit): `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, `spec-architect` | The agent itself | The agent itself | YOU (main Claude) |
|
|
92
|
+
| Agent type | Who writes artifact files | Who writes optional handoff notes | Who updates tasks.yml |
|
|
93
|
+
|------------|--------------------------|----------------------------------|----------------------|
|
|
94
|
+
| Read-only agents (no Edit tool): `change-classifier`, `contract-reviewer`, `qa-reviewer`, `visual-reviewer`, `dependency-security-reviewer`, `ui-ux-reviewer` | YOU (main Claude) | YOU, only when useful | YOU (main Claude) |
|
|
95
|
+
| Write-capable agents (have Edit): `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, `spec-architect` | The agent itself | The agent itself, only when useful | YOU (main Claude) |
|
|
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
99
|
**Agent-log pointer rule**: When you or an agent writes `artifacts[].pointer`,
|
|
100
|
-
follow `references/agent-log-protocol.md
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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.
|
|
100
|
+
follow `references/agent-log-protocol.md`. If the text before the first `:` contains `/`, treat it as one repo-relative file path, and one pointer names one file only. File pointers must not
|
|
101
|
+
include parenthetical notes on the path, and slash-containing labels such as
|
|
102
|
+
`I/O:` or `WARNING/OVERDUE:` must not be used as pointer prefixes. Put extra
|
|
103
|
+
explanation in `notes` or a separate non-path artifact pointer instead.
|
|
107
104
|
|
|
108
105
|
**Durable learning rule**: During `/cdd-new`, agents record evidence and
|
|
109
|
-
findings in artifacts and
|
|
106
|
+
findings in artifacts and optional handoff notes only. Do not promote durable lessons
|
|
110
107
|
while the change is still active. Durable learning promotion happens only during
|
|
111
108
|
`/cdd-close` Step 3, where main Claude cross-checks evidence and writes approved
|
|
112
109
|
rules to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`).
|
|
@@ -117,9 +114,9 @@ rules to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`).
|
|
|
117
114
|
|
|
118
115
|
Only create optional artifacts (`current-behavior.md`, `proposal.md`, `spec.md`, `design.md`, `qa-report.md`, `regression-report.md`) when the classifier's `change-classification.md` explicitly marks them as `yes`.
|
|
119
116
|
|
|
120
|
-
Note: `archive.md` is created during `/cdd-close`, not during `/cdd-new`
|
|
117
|
+
Note: `archive.md` is created during `/cdd-close`, not during `/cdd-new` ??it is not part of the classifier's opt-in surface.
|
|
121
118
|
|
|
122
|
-
If the classifier marks an artifact as `no` or leaves it blank, **do not create the file**
|
|
119
|
+
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.
|
|
123
120
|
|
|
124
121
|
The 6 always-required artifacts are: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, and `context-manifest.md`.
|
|
125
122
|
|
|
@@ -153,7 +150,7 @@ cdd-kit context-scan
|
|
|
153
150
|
Do not use broad search or ad hoc reads to classify the change before `context-scan` has completed.
|
|
154
151
|
|
|
155
152
|
The generated scaffold contains the artifacts listed in the table below. **All
|
|
156
|
-
templates are written from disk by `cdd-kit new`
|
|
153
|
+
templates are written from disk by `cdd-kit new` ??do not paste template bodies
|
|
157
154
|
into this prompt.** The on-disk source of truth lives in `specs/templates/` of
|
|
158
155
|
the kit and is bundled into every install.
|
|
159
156
|
|
|
@@ -190,7 +187,7 @@ The classifier must include a `## Context Manifest Draft` section with:
|
|
|
190
187
|
- required tests
|
|
191
188
|
- any context expansion requests that must be approved before implementation
|
|
192
189
|
|
|
193
|
-
**change-classifier is read-only**
|
|
190
|
+
**change-classifier is read-only** ??it will return its output as text.
|
|
194
191
|
|
|
195
192
|
### If the classifier returns `## Atomic Split Proposal`
|
|
196
193
|
|
|
@@ -204,31 +201,31 @@ NOT proceed with the rest of `/cdd-new`. Instead:
|
|
|
204
201
|
- For each row in the proposal table, run `cdd-kit new <change-id>` with
|
|
205
202
|
the listed `--depends-on`.
|
|
206
203
|
- Then say: "I created N change directories. Want me to run `/cdd-new`
|
|
207
|
-
against the first one now?"
|
|
204
|
+
against the first one now?" ??wait for confirmation; do not auto-loop.
|
|
208
205
|
4. If user picks "force monolithic":
|
|
209
206
|
- Re-invoke change-classifier with `force-monolithic` appended to the
|
|
210
207
|
change-request and proceed with whatever Tier the classifier returns.
|
|
211
208
|
5. Delete the partially-scaffolded change directory you created in Step 1
|
|
212
209
|
if the user picked "separate" and the originally-derived change-id is
|
|
213
|
-
not in the proposal
|
|
210
|
+
not in the proposal ??it would otherwise sit empty and confuse `cdd-kit
|
|
214
211
|
list`.
|
|
215
212
|
|
|
216
213
|
### Classifier output lint (B8): refuse stub responses
|
|
217
214
|
|
|
218
215
|
Before writing any files, verify the classifier response contains:
|
|
219
216
|
|
|
220
|
-
- `## Tier` followed by `- N` where N is a single digit 0-5 (NOT `0 / 1 / 2 / 3 / 4 / 5`
|
|
217
|
+
- `## Tier` followed by `- N` where N is a single digit 0-5 (NOT `0 / 1 / 2 / 3 / 4 / 5` ??that is the unfilled placeholder).
|
|
221
218
|
- `## Required Agents` with at least one agent name.
|
|
222
|
-
- `## Inferred Acceptance Criteria` with at least one filled `AC-1:
|
|
219
|
+
- `## Inferred Acceptance Criteria` with at least one filled `AC-1: ?圳 line.
|
|
223
220
|
|
|
224
|
-
If any of these are missing or still hold the literal placeholder text, STOP. Re-prompt the classifier with the missing pieces named explicitly. Do NOT write classification.md
|
|
221
|
+
If any of these are missing or still hold the literal placeholder text, STOP. Re-prompt the classifier with the missing pieces named explicitly. Do NOT write classification.md ??gate will reject it as a stub anyway and you will have wasted the round-trip.
|
|
225
222
|
|
|
226
223
|
### When the classifier output passes lint
|
|
227
224
|
|
|
228
|
-
1. **YOU write** `specs/changes/<change-id>/change-classification.md`
|
|
229
|
-
2.
|
|
225
|
+
1. **YOU write** `specs/changes/<change-id>/change-classification.md` ??replace the blank template with the classifier's classification output.
|
|
226
|
+
2. Optional: write `specs/changes/<change-id>/agent-log/change-classifier.yml` only if the classifier returned useful handoff evidence.
|
|
230
227
|
3. **YOU update** `specs/changes/<change-id>/context-manifest.md` from the classifier's `## Context Manifest Draft`.
|
|
231
|
-
4. **YOU update** `tasks.yml` frontmatter: set `tier: <N>` to the classifier's tier digit. This is now the authoritative source for
|
|
228
|
+
4. **YOU update** `tasks.yml` frontmatter: set `tier: <N>` to the classifier's tier digit. This is now the authoritative source for quality-gate tier checks (the classification.md `## Tier` section is fallback only).
|
|
232
229
|
5. **YOU tick** `tasks.yml` item `1.1`.
|
|
233
230
|
|
|
234
231
|
Wait until these five writes are done before continuing.
|
|
@@ -241,11 +238,11 @@ Wait until these five writes are done before continuing.
|
|
|
241
238
|
|
|
242
239
|
Read `change-classification.md` to determine the tier. Then invoke agents **in the exact order below**.
|
|
243
240
|
|
|
244
|
-
**For each read-only agent**: wait for its text response
|
|
241
|
+
**For each read-only agent**: wait for its text response ??YOU write its artifact file(s) ??YOU write an optional handoff note when useful ??YOU tick relevant tasks.yml item(s).
|
|
245
242
|
|
|
246
|
-
**For each write-capable agent**: wait for it to confirm completion
|
|
243
|
+
**For each write-capable agent**: wait for it to confirm completion ??YOU tick relevant tasks.yml item(s).
|
|
247
244
|
|
|
248
|
-
If any agent
|
|
245
|
+
If any agent reports `blocked`, halt immediately and surface its concrete next action to the user ??do not proceed to subsequent agents.
|
|
249
246
|
|
|
250
247
|
**When invoking any agent, always begin the prompt with:**
|
|
251
248
|
```
|
|
@@ -263,14 +260,13 @@ cdd-kit context check <change-id> --path <repo-relative path> [more paths...]
|
|
|
263
260
|
|
|
264
261
|
If the check fails and the paths are legitimate work scope, update
|
|
265
262
|
`context-manifest.md` `## Allowed Paths` or approve a Context Expansion Request
|
|
266
|
-
before the agent reads them. This
|
|
267
|
-
components/stores/views or CI workflow files
|
|
263
|
+
before the agent reads them. This keeps read scope explicit before broad source
|
|
264
|
+
access, especially for UI components/stores/views or CI workflow files.
|
|
268
265
|
|
|
269
266
|
After every agent returns, complete the closeout before starting the next
|
|
270
267
|
agent:
|
|
271
|
-
- confirm
|
|
272
|
-
-
|
|
273
|
-
halt on `blocked`
|
|
268
|
+
- confirm required artifacts exist; optional handoff notes are not gate inputs
|
|
269
|
+
- if the agent reports `blocked`, halt and surface its concrete next action
|
|
274
270
|
- tick the owned `tasks.yml` items immediately
|
|
275
271
|
- record incidental/pre-existing findings in the appropriate report instead of
|
|
276
272
|
silently fixing unrelated scope
|
|
@@ -285,30 +281,30 @@ the user; do not put them inside the prompt sent to the agent.
|
|
|
285
281
|
|
|
286
282
|
| Stage | Agent | Badge |
|
|
287
283
|
|---|---|---|
|
|
288
|
-
| Decision | `change-classifier` |
|
|
289
|
-
| Decision | `spec-architect` |
|
|
290
|
-
| Implementation | `backend-engineer` |
|
|
291
|
-
| Implementation | `frontend-engineer` |
|
|
292
|
-
| Implementation | `ci-cd-gatekeeper` |
|
|
293
|
-
| Implementation | `test-strategist` |
|
|
294
|
-
| Heavy testing (Tier 0
|
|
295
|
-
| Heavy testing (Tier 0
|
|
296
|
-
| Heavy testing (Tier 0
|
|
297
|
-
| Review | `contract-reviewer` |
|
|
298
|
-
| Review | `qa-reviewer` |
|
|
299
|
-
| Review | `ui-ux-reviewer` |
|
|
300
|
-
| Review | `visual-reviewer` |
|
|
301
|
-
| Review | `dependency-security-reviewer` |
|
|
302
|
-
| Audit | `spec-drift-auditor` |
|
|
303
|
-
| Audit | `repo-context-scanner` |
|
|
284
|
+
| Decision | `change-classifier` | ? `[classifier]` |
|
|
285
|
+
| Decision | `spec-architect` | ? `[architect]` |
|
|
286
|
+
| Implementation | `backend-engineer` | ? `[backend]` |
|
|
287
|
+
| Implementation | `frontend-engineer` | ? `[frontend]` |
|
|
288
|
+
| Implementation | `ci-cd-gatekeeper` | ? `[ci-cd]` |
|
|
289
|
+
| Implementation | `test-strategist` | ? `[test-plan]` |
|
|
290
|
+
| Heavy testing (Tier 0?? only) | `e2e-resilience-engineer` | ?? `[e2e]` |
|
|
291
|
+
| Heavy testing (Tier 0?? only) | `monkey-test-engineer` | ?? `[monkey]` |
|
|
292
|
+
| Heavy testing (Tier 0?? only) | `stress-soak-engineer` | ?? `[stress]` |
|
|
293
|
+
| Review | `contract-reviewer` | ? `[contracts]` |
|
|
294
|
+
| Review | `qa-reviewer` | ? `[qa]` |
|
|
295
|
+
| Review | `ui-ux-reviewer` | ? `[ui-ux]` |
|
|
296
|
+
| Review | `visual-reviewer` | ? `[visual]` |
|
|
297
|
+
| Review | `dependency-security-reviewer` | ? `[deps-sec]` |
|
|
298
|
+
| Audit | `spec-drift-auditor` | ??`[drift]` |
|
|
299
|
+
| Audit | `repo-context-scanner` | ??`[repo-scan]` |
|
|
304
300
|
|
|
305
301
|
Color semantics:
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
302
|
+
- ? purple: deciding what we will do (heavy model, `opus`)
|
|
303
|
+
- ? blue: writing code (`sonnet` implementation)
|
|
304
|
+
- ? yellow: planning tests (`sonnet`)
|
|
305
|
+
- ?? orange: heavy testing ??only appears for Tier 0??, signals high-risk scope
|
|
306
|
+
- ? green: reviewing what was done (no code writes; just verdicts)
|
|
307
|
+
- ??neutral: audits and scans (read-only background work)
|
|
312
308
|
|
|
313
309
|
Format: emoji is followed by a single space, then the bracket-tag, then the
|
|
314
310
|
human-readable narration.
|
|
@@ -316,11 +312,10 @@ human-readable narration.
|
|
|
316
312
|
Examples:
|
|
317
313
|
|
|
318
314
|
```
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
🔵 [backend] Implementing the JWT issuance endpoint and writing failing
|
|
315
|
+
? [classifier] Reading the request and project map??? [contracts] Confirming the API contract is unchanged. (read-only)
|
|
316
|
+
? [backend] Implementing the JWT issuance endpoint and writing failing
|
|
322
317
|
tests first per TDD policy.
|
|
323
|
-
|
|
318
|
+
?? [stress] Tier 1 high-risk change ??running soak test for 30 min.
|
|
324
319
|
```
|
|
325
320
|
|
|
326
321
|
These badges are pure narration. They MUST NOT be sent inside the agent's
|
|
@@ -329,73 +324,73 @@ prompt; the agent's behavior is defined by the agent prompt files in
|
|
|
329
324
|
|
|
330
325
|
---
|
|
331
326
|
|
|
332
|
-
### Tier 4
|
|
327
|
+
### Tier 4?? (low risk: docs, prompts, config-only, no behavior change)
|
|
333
328
|
|
|
334
|
-
1. **`contract-reviewer`** (read-only)
|
|
335
|
-
-
|
|
329
|
+
1. **`contract-reviewer`** (read-only) ??confirm no contracts are touched or all touched ones are already updated.
|
|
330
|
+
- Optional handoff note: `agent-log/contract-reviewer.yml`
|
|
336
331
|
- YOU tick: `1.2`, applicable items in section 2
|
|
337
332
|
|
|
338
|
-
2. **`qa-reviewer`** (read-only)
|
|
339
|
-
-
|
|
333
|
+
2. **`qa-reviewer`** (read-only) ??confirm release readiness.
|
|
334
|
+
- Optional handoff note: `agent-log/qa-reviewer.yml`
|
|
340
335
|
- YOU tick: `5.4`
|
|
341
336
|
|
|
342
337
|
---
|
|
343
338
|
|
|
344
|
-
### Tier 2
|
|
339
|
+
### Tier 2?? (normal: feature, enhancement, bug fix with behavior change)
|
|
345
340
|
|
|
346
|
-
1. **`contract-reviewer`** (read-only)
|
|
347
|
-
-
|
|
341
|
+
1. **`contract-reviewer`** (read-only) ??update or create contracts in `contracts/` before any implementation starts.
|
|
342
|
+
- Optional handoff note: `agent-log/contract-reviewer.yml`
|
|
348
343
|
- YOU tick: `1.2`, applicable items in section 2
|
|
349
344
|
|
|
350
|
-
2. **`test-strategist`** (write-capable)
|
|
345
|
+
2. **`test-strategist`** (write-capable) ??writes `specs/changes/<change-id>/test-plan.md` directly.
|
|
351
346
|
- YOU tick: applicable items in section 3 based on what test families were planned
|
|
352
|
-
- Provide the classifier's `## Inferred Acceptance Criteria` list to test-strategist. These become the `criterion id` column in the Acceptance Criteria
|
|
347
|
+
- Provide the classifier's `## Inferred Acceptance Criteria` list to test-strategist. These become the `criterion id` column in the Acceptance Criteria ??Test Mapping table.
|
|
353
348
|
|
|
354
|
-
3. **`spec-architect`** (write-capable)
|
|
349
|
+
3. **`spec-architect`** (write-capable) ??only if `change-classification.md` contains `Architecture Review Required: yes`.
|
|
355
350
|
- YOU tick: `1.3` (if it produced a gate plan)
|
|
356
351
|
|
|
357
|
-
4. **`backend-engineer`** (write-capable)
|
|
352
|
+
4. **`backend-engineer`** (write-capable) ??if the change touches server, API, data, or business logic. Writes implementation directly; may write an optional handoff note.
|
|
358
353
|
- YOU tick: `4.1` and/or `4.3` based on scope
|
|
359
|
-
- Note: `tasks.yml` items 3.1
|
|
354
|
+
- Note: `tasks.yml` items 3.1??.2 (unit/contract/integration tests) are written by `backend-engineer` and/or `frontend-engineer` in TDD fashion ??failing tests first, implementation second. Items 3.3??.5 are written by dedicated test engineers (Tier 0?? only or when classifier explicitly requires them).
|
|
360
355
|
|
|
361
|
-
5. **`frontend-engineer`** (write-capable)
|
|
356
|
+
5. **`frontend-engineer`** (write-capable) ??if the change touches UI, components, or client-side behavior. Writes implementation directly; may write an optional handoff note.
|
|
362
357
|
- YOU tick: `4.2`
|
|
363
358
|
|
|
364
|
-
6. **`dependency-security-reviewer`** (read-only)
|
|
359
|
+
6. **`dependency-security-reviewer`** (read-only) ??if the change touches lockfiles, package manifests, or DB migrations.
|
|
365
360
|
- **Only invoke if** `change-classification.md` lists lockfiles, package manifests, or DB migrations as affected.
|
|
366
|
-
-
|
|
361
|
+
- Optional handoff note: `agent-log/dependency-security-reviewer.yml`
|
|
367
362
|
- YOU tick: applicable security-related items
|
|
368
363
|
|
|
369
|
-
7. **`ui-ux-reviewer`** (read-only)
|
|
364
|
+
7. **`ui-ux-reviewer`** (read-only) ??if any UI change (run alongside or after frontend-engineer).
|
|
370
365
|
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
371
|
-
-
|
|
366
|
+
- Optional handoff note: `agent-log/ui-ux-reviewer.yml`
|
|
372
367
|
- YOU tick: `5.1`
|
|
373
368
|
|
|
374
|
-
8. **`visual-reviewer`** (read-only)
|
|
369
|
+
8. **`visual-reviewer`** (read-only) ??if any UI change (run after ui-ux-reviewer).
|
|
375
370
|
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
376
|
-
-
|
|
371
|
+
- Optional handoff note: `agent-log/visual-reviewer.yml`
|
|
377
372
|
- YOU tick: `5.2`
|
|
378
373
|
|
|
379
|
-
9. **`ci-cd-gatekeeper`** (write-capable)
|
|
374
|
+
9. **`ci-cd-gatekeeper`** (write-capable) ??writes `specs/changes/<change-id>/ci-gates.md` directly.
|
|
380
375
|
- YOU tick: `1.3`, `4.4`, applicable items in section 6
|
|
381
376
|
|
|
382
|
-
10. **`qa-reviewer`** (read-only)
|
|
383
|
-
-
|
|
377
|
+
10. **`qa-reviewer`** (read-only) ??release readiness decision (always last).
|
|
378
|
+
- Optional handoff note: `agent-log/qa-reviewer.yml`
|
|
384
379
|
- YOU tick: `5.4`
|
|
385
380
|
|
|
386
381
|
---
|
|
387
382
|
|
|
388
|
-
### Tier 0
|
|
383
|
+
### Tier 0?? (high risk: production data, concurrency, queues, large queries, auth, payments, exports)
|
|
389
384
|
|
|
390
|
-
All agents from Tier 2
|
|
385
|
+
All agents from Tier 2??, plus insert these after `frontend-engineer` / `backend-engineer` and before `dependency-security-reviewer`:
|
|
391
386
|
|
|
392
|
-
- **`e2e-resilience-engineer`** (write-capable)
|
|
387
|
+
- **`e2e-resilience-engineer`** (write-capable) ??E2E, failure-injection, data-boundary tests. May write an optional handoff note.
|
|
393
388
|
- YOU tick: `3.3`
|
|
394
389
|
|
|
395
|
-
- **`monkey-test-engineer`** (write-capable)
|
|
390
|
+
- **`monkey-test-engineer`** (write-capable) ??adversarial input, fuzz, rapid-UI-action tests. May write an optional handoff note.
|
|
396
391
|
- YOU tick: `3.4`
|
|
397
392
|
|
|
398
|
-
- **`stress-soak-engineer`** (write-capable)
|
|
393
|
+
- **`stress-soak-engineer`** (write-capable) ??load, soak, and long-running stability tests. May write an optional handoff note.
|
|
399
394
|
- YOU tick: `3.5`
|
|
400
395
|
|
|
401
396
|
---
|
|
@@ -428,20 +423,18 @@ cdd-kit gate <change-id>
|
|
|
428
423
|
- YOU tick: `tasks.yml` item `6.1`
|
|
429
424
|
- Proceed to Step 5.
|
|
430
425
|
|
|
431
|
-
**If gate fails
|
|
426
|
+
**If gate fails ??structured fix-back routing**:
|
|
432
427
|
|
|
433
428
|
Capture gate's full stderr verbatim. Parse error lines and route each to the
|
|
434
|
-
right owner. The patterns below are exhaustive
|
|
429
|
+
right owner. The patterns below are exhaustive ??every gate error message
|
|
435
430
|
matches one of them.
|
|
436
431
|
|
|
437
432
|
| Error pattern | Route to | Re-invocation prompt seed |
|
|
438
433
|
|---|---|---|
|
|
439
|
-
| `
|
|
440
|
-
| `
|
|
441
|
-
| `
|
|
442
|
-
| `
|
|
443
|
-
| `Tier <N> change requires agent-log/<X>.yml` | invoke the missing agent `<X>` | "TIER <N> REQUIRES THIS LOG. Run your full work, not just the log." |
|
|
444
|
-
| `dependency <id>: upstream change is not completed` | n/a — STOP | Tell user: "Upstream change `<id>` must complete before this change can gate. Run `/cdd-new <id>` first or run `cdd-kit archive <id>` if it's already done." |
|
|
434
|
+
| `change-classification.md: ?圳 | `change-classifier` | "PREVIOUS CLASSIFICATION FAILED GATE: <error>. Re-emit only the failing section." |
|
|
435
|
+
| `context-manifest.md: ?圳 | `change-classifier` | "PREVIOUS MANIFEST FAILED GATE: <error>. Re-emit `## Context Manifest Draft`." |
|
|
436
|
+
| `tasks.yml: ?圳 (frontmatter / pending) | YOU (main Claude) ??direct edit | n/a ??fix `tasks.yml` yourself. Don't re-invoke an agent for a file you own. |
|
|
437
|
+
| `dependency <id>: upstream change is not completed` | n/a ??STOP | Tell user: "Upstream change `<id>` must complete before this change can gate. Run `/cdd-new <id>` first or run `cdd-kit archive <id>` if it's already done." |
|
|
445
438
|
| `validators returned non-zero` | `contract-reviewer` | "PREVIOUS CONTRACT VALIDATION FAILED: <last 10 lines of validator stderr>. Reconcile contracts." |
|
|
446
439
|
|
|
447
440
|
**Re-invocation prompt template** (always use this exact prefix when re-invoking an agent for fix-back):
|
|
@@ -457,15 +450,15 @@ FIX TARGET:
|
|
|
457
450
|
<the specific file or section that needs to change>
|
|
458
451
|
|
|
459
452
|
REFERENCES:
|
|
460
|
-
- references/agent-log-protocol.md (
|
|
453
|
+
- references/agent-log-protocol.md (optional handoff note format, only if useful)
|
|
461
454
|
- references/<agent-specific-standard>.md (if applicable)
|
|
462
455
|
|
|
463
456
|
Fix this exact issue without re-doing your prior work. Re-output only the
|
|
464
|
-
section that changed plus
|
|
457
|
+
section that changed plus any updated handoff note, if useful.
|
|
465
458
|
```
|
|
466
459
|
|
|
467
460
|
After re-invoking, re-run `cdd-kit gate <change-id>`. Repeat up to **3 times**. Each
|
|
468
|
-
iteration must be on a strictly smaller error set
|
|
461
|
+
iteration must be on a strictly smaller error set ??if the same error returns
|
|
469
462
|
twice, halt and surface to user (an agent stuck in a loop is more expensive
|
|
470
463
|
than a human read).
|
|
471
464
|
|
|
@@ -501,7 +494,7 @@ Next step:
|
|
|
501
494
|
If gate did not pass after 3 iterations:
|
|
502
495
|
|
|
503
496
|
```
|
|
504
|
-
## /cdd-new
|
|
497
|
+
## /cdd-new ??gate blocked
|
|
505
498
|
|
|
506
499
|
Change ID: <change-id>
|
|
507
500
|
Gate failed after 3 attempts.
|
|
@@ -517,17 +510,17 @@ Please review the above items and re-run: cdd-kit gate <change-id>
|
|
|
517
510
|
|
|
518
511
|
## Rules
|
|
519
512
|
|
|
520
|
-
- Never start implementation (backend/frontend-engineer) before `contract-reviewer` has completed for Tier 0
|
|
521
|
-
- Never skip `test-plan.md` for Tier 0
|
|
513
|
+
- Never start implementation (backend/frontend-engineer) before `contract-reviewer` has completed for Tier 0?? changes
|
|
514
|
+
- Never skip `test-plan.md` for Tier 0?? changes
|
|
522
515
|
- Never skip `ci-gates.md` for any implementation change
|
|
523
|
-
-
|
|
524
|
-
- Tick the relevant `tasks.yml` checkbox immediately after each agent completes
|
|
516
|
+
- Agent logs are optional; do not create them just to satisfy a gate.
|
|
517
|
+
- Tick the relevant `tasks.yml` checkbox immediately after each agent completes ??do not batch
|
|
525
518
|
- `qa-reviewer` always runs last and makes the release-readiness decision
|
|
526
519
|
|
|
527
520
|
---
|
|
528
521
|
|
|
529
522
|
## After Completion
|
|
530
523
|
|
|
531
|
-
The `/cdd-new` workflow is now complete. **Return to normal assistant mode immediately.** Answer any question the user asks
|
|
524
|
+
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.
|
|
532
525
|
|
|
533
526
|
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.
|
|
@@ -44,8 +44,8 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
|
|
|
44
44
|
- Before invoking an agent with known concrete read paths, run
|
|
45
45
|
`cdd-kit context check <change-id> --path <paths...>` and expand the
|
|
46
46
|
manifest before the agent reads legitimate missing paths.
|
|
47
|
-
- After each agent finishes, verify
|
|
48
|
-
related `tasks.yml` items before starting the next agent.
|
|
47
|
+
- After each agent finishes, verify the required artifact files exist and
|
|
48
|
+
tick the related `tasks.yml` items before starting the next agent.
|
|
49
49
|
- UI changes require UI/UX and visual review.
|
|
50
50
|
- Invoke ui-ux-reviewer for interaction, copy, accessibility, and information hierarchy review whenever UI changes.
|
|
51
51
|
- Invoke visual-reviewer for layout, responsive, CSS contract, and screenshot diff review whenever UI changes.
|
|
@@ -128,5 +128,5 @@ Run scripts with Python 3 from the repository root.
|
|
|
128
128
|
## Output discipline (file formats)
|
|
129
129
|
|
|
130
130
|
- `tasks.yml`: structured YAML, validated by `src/schemas/tasks.schema.ts`.
|
|
131
|
-
- `agent-log/<agent>.yml`: structured
|
|
131
|
+
- `agent-log/<agent>.yml`: optional structured handoff note per `references/agent-log-protocol.md`.
|
|
132
132
|
- All other change artifacts remain markdown prose.
|