contract-driven-delivery 1.8.1 → 1.10.0
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/assets/CLAUDE.template.md +14 -203
- package/assets/agents/backend-engineer.md +6 -1
- package/assets/agents/change-classifier.md +36 -10
- package/assets/agents/contract-reviewer.md +2 -2
- package/assets/agents/dependency-security-reviewer.md +2 -2
- package/assets/agents/frontend-engineer.md +6 -1
- package/assets/agents/qa-reviewer.md +2 -2
- package/assets/agents/repo-context-scanner.md +5 -2
- package/assets/agents/spec-architect.md +28 -31
- package/assets/agents/spec-drift-auditor.md +22 -20
- package/assets/agents/test-strategist.md +25 -28
- package/assets/agents/ui-ux-reviewer.md +2 -2
- package/assets/agents/visual-reviewer.md +2 -2
- package/assets/ci-templates/conda.yml +1 -1
- package/assets/{ci/github-actions → github-workflows}/contract-driven-gates.yml +12 -17
- package/assets/skills/cdd-init/SKILL.md +6 -0
- package/assets/skills/cdd-new/SKILL.md +304 -42
- package/assets/skills/contract-driven-delivery/templates/change-classification.md +17 -11
- package/assets/skills/contract-driven-delivery/templates/design.md +16 -13
- package/assets/skills/contract-driven-delivery/templates/test-plan.md +17 -23
- package/assets/specs-templates/change-classification.md +17 -11
- package/assets/specs-templates/design.md +16 -13
- package/assets/specs-templates/test-plan.md +17 -23
- package/dist/cli/index.js +27 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
- uses: conda-incubator/setup-miniconda@v3
|
|
2
2
|
with:
|
|
3
3
|
environment-file: environment.yml
|
|
4
|
-
activate-environment: "
|
|
4
|
+
activate-environment: "{{conda-env-name}}"
|
|
5
5
|
auto-activate-base: false
|
|
6
6
|
- name: Lint + Type + Test
|
|
7
7
|
shell: bash -el {0}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Contract-driven gates baseline (provided by cdd-kit).
|
|
2
|
-
#
|
|
3
|
-
# See
|
|
2
|
+
# Application/test commands MUST be customized for your stack.
|
|
3
|
+
# See ci/gate-policy.md for tier semantics and promotion policy.
|
|
4
4
|
|
|
5
5
|
name: contract-driven-gates
|
|
6
6
|
|
|
7
7
|
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main, master]
|
|
8
10
|
pull_request:
|
|
9
11
|
workflow_dispatch:
|
|
10
12
|
schedule:
|
|
@@ -21,23 +23,16 @@ jobs:
|
|
|
21
23
|
with:
|
|
22
24
|
python-version: '3.10'
|
|
23
25
|
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
run: python .claude/skills/contract-driven-delivery/scripts/validate_contracts.py .
|
|
29
|
-
|
|
30
|
-
- name: Validate env contract
|
|
31
|
-
run: python .claude/skills/contract-driven-delivery/scripts/validate_env_contract.py contracts/env/env-contract.md
|
|
32
|
-
|
|
33
|
-
- name: Validate ci gates
|
|
34
|
-
run: python .claude/skills/contract-driven-delivery/scripts/validate_ci_gates.py
|
|
26
|
+
- name: Set up Node.js
|
|
27
|
+
uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: '20'
|
|
35
30
|
|
|
36
|
-
- name:
|
|
37
|
-
run:
|
|
31
|
+
- name: Install cdd-kit
|
|
32
|
+
run: npm install -g contract-driven-delivery
|
|
38
33
|
|
|
39
|
-
- name: Validate
|
|
40
|
-
run:
|
|
34
|
+
- name: Validate contracts and gates
|
|
35
|
+
run: cdd-kit validate
|
|
41
36
|
|
|
42
37
|
- name: Repository-specific fast gate
|
|
43
38
|
run: |
|
|
@@ -186,3 +186,9 @@ Next step: /cdd-new <describe the gap or feature to address first>
|
|
|
186
186
|
- Gate enforcement starts only after contracts reach 1.0.0
|
|
187
187
|
- Scanning agents only report — YOU (main Claude) write all files
|
|
188
188
|
- If `cdd-kit init` fails: `npm install -g contract-driven-delivery@latest`
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## After Completion
|
|
193
|
+
|
|
194
|
+
The `/cdd-init` workflow is now complete. **Return to normal assistant mode immediately.** Answer any question the user asks — including questions unrelated to this project, new feature discussions, or general conversation — without requiring them to use a specific command. Do not wait for a commit or any other action before resuming normal behavior.
|
|
@@ -5,6 +5,42 @@ description: Start a new tracked change. Scaffolds all required artifacts, class
|
|
|
5
5
|
|
|
6
6
|
# cdd-new — New Change Request
|
|
7
7
|
|
|
8
|
+
## Mental model
|
|
9
|
+
|
|
10
|
+
- `contracts/` = the single source of truth (live — always reflects current system behaviour)
|
|
11
|
+
- `tests/` = proof the contracts hold (live)
|
|
12
|
+
- `specs/changes/<id>/` = why we decided this back then (passive archive — read only when investigating history, never as input to planning)
|
|
13
|
+
- `CLAUDE.md` = what this project is and how to start work
|
|
14
|
+
|
|
15
|
+
## Spec depth rules
|
|
16
|
+
|
|
17
|
+
Every artifact under `specs/changes/<id>/` answers **WHAT** and **WHY**, not HOW.
|
|
18
|
+
|
|
19
|
+
Soft caps (guidance, not gate-enforced):
|
|
20
|
+
- `spec.md` ≤ 200 lines
|
|
21
|
+
- `design.md` ≤ 150 lines
|
|
22
|
+
- `test-plan.md` ≤ 100 lines
|
|
23
|
+
- `ci-gates.md` ≤ 80 lines
|
|
24
|
+
|
|
25
|
+
**Forbidden in spec artifacts** (these belong in code/tests, not specs):
|
|
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
|
+
- Runnable code blocks > 10 lines belong in source files, not specs. Pseudocode and mapping tables are fine at any length.
|
|
30
|
+
- Per-test input/output tables with more than 15 rows (data-boundary tests with up to 15 boundary cases are acceptable)
|
|
31
|
+
|
|
32
|
+
**test-plan.md should contain:**
|
|
33
|
+
- Acceptance criteria → test family mapping (table)
|
|
34
|
+
- Test file paths and test names (one line per test, no implementation detail)
|
|
35
|
+
- Tier assignment per family
|
|
36
|
+
- Out-of-scope list
|
|
37
|
+
|
|
38
|
+
**design.md should contain:**
|
|
39
|
+
- Architecture summary (1 paragraph)
|
|
40
|
+
- Affected components (table: component | file path | nature of change)
|
|
41
|
+
- Key decisions and rejected alternatives (prose)
|
|
42
|
+
- Migration/rollback strategy (prose, not SQL)
|
|
43
|
+
|
|
8
44
|
## Input
|
|
9
45
|
|
|
10
46
|
The skill argument is the user's change description in natural language (e.g., "add JWT authentication to the API" or "redesign the dashboard homepage").
|
|
@@ -13,6 +49,27 @@ If no description is provided, ask the user: "Please describe the change you wan
|
|
|
13
49
|
|
|
14
50
|
---
|
|
15
51
|
|
|
52
|
+
## Write Responsibilities
|
|
53
|
+
|
|
54
|
+
**This distinction is critical — follow it for every step:**
|
|
55
|
+
|
|
56
|
+
| Agent type | Who writes artifact files | Who writes agent-log | Who ticks tasks.md |
|
|
57
|
+
|------------|--------------------------|----------------------|--------------------|
|
|
58
|
+
| Read-only agents (no Edit tool): `change-classifier`, `contract-reviewer`, `qa-reviewer`, `visual-reviewer`, `dependency-security-reviewer`, `ui-ux-reviewer` | YOU (main Claude) | YOU (main Claude) | YOU (main Claude) |
|
|
59
|
+
| 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) |
|
|
60
|
+
|
|
61
|
+
**Rule**: After EVERY agent completes (whether it writes itself or you write for it), YOU must update the relevant `tasks.md` checkbox(es) from `[ ]` to `[x]`.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Artifact opt-in policy
|
|
66
|
+
|
|
67
|
+
Only create optional artifacts (`current-behavior.md`, `proposal.md`, `spec.md`, `design.md`, `qa-report.md`, `regression-report.md`, `archive.md`) when the classifier's `change-classification.md` explicitly marks them as `yes`.
|
|
68
|
+
|
|
69
|
+
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.
|
|
70
|
+
|
|
71
|
+
The 5 always-required artifacts are: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.md`.
|
|
72
|
+
|
|
16
73
|
## Step 1: Generate change-id and scaffold
|
|
17
74
|
|
|
18
75
|
Derive a `change-id` from the description:
|
|
@@ -21,26 +78,162 @@ Derive a `change-id` from the description:
|
|
|
21
78
|
|
|
22
79
|
Check that `specs/changes/<change-id>/` does not already exist. If it does, append `-2` (or next available suffix).
|
|
23
80
|
|
|
24
|
-
|
|
81
|
+
**Create all scaffold files using Write (do NOT run a Python script; do NOT use Edit on pre-existing files):**
|
|
25
82
|
|
|
83
|
+
Create `specs/changes/<change-id>/change-request.md` with the user's description filled in:
|
|
26
84
|
```
|
|
27
|
-
|
|
85
|
+
# Change Request: <change-id>
|
|
86
|
+
|
|
87
|
+
## Original Request
|
|
88
|
+
<user's exact description, verbatim>
|
|
89
|
+
|
|
90
|
+
## Business / User Goal
|
|
91
|
+
<infer from the description>
|
|
92
|
+
|
|
93
|
+
## Non-goals
|
|
94
|
+
|
|
95
|
+
## Constraints
|
|
96
|
+
|
|
97
|
+
## Known Context
|
|
98
|
+
|
|
99
|
+
## Open Questions
|
|
100
|
+
|
|
101
|
+
## Requested Delivery Date / Priority
|
|
102
|
+
as soon as possible
|
|
28
103
|
```
|
|
29
104
|
|
|
30
|
-
|
|
105
|
+
Create `specs/changes/<change-id>/change-classification.md` with blank template:
|
|
106
|
+
```
|
|
107
|
+
# Change Classification
|
|
108
|
+
|
|
109
|
+
## Change Types
|
|
110
|
+
- primary:
|
|
111
|
+
- secondary:
|
|
112
|
+
|
|
113
|
+
## Risk Level
|
|
114
|
+
- low / medium / high / critical
|
|
115
|
+
|
|
116
|
+
## Impact Radius
|
|
117
|
+
- isolated / module-level / cross-module / system-wide
|
|
118
|
+
|
|
119
|
+
## Required Artifacts
|
|
120
|
+
| artifact | required | reason |
|
|
121
|
+
|---|---:|---|
|
|
122
|
+
| current-behavior.md | | |
|
|
123
|
+
| proposal.md | | |
|
|
124
|
+
| spec.md | | |
|
|
125
|
+
| design.md | | |
|
|
126
|
+
| contracts.md | | |
|
|
127
|
+
| test-plan.md | yes | every implementation change requires test planning |
|
|
128
|
+
| ci-gates.md | yes | every implementation change requires CI/CD gate planning |
|
|
129
|
+
| qa-report.md | | |
|
|
130
|
+
| regression-report.md | | |
|
|
131
|
+
|
|
132
|
+
## Required Contracts
|
|
133
|
+
- API:
|
|
134
|
+
- CSS/UI:
|
|
135
|
+
- Env:
|
|
136
|
+
- Data shape:
|
|
137
|
+
- Business logic:
|
|
138
|
+
- CI/CD:
|
|
139
|
+
|
|
140
|
+
## Required Test Families
|
|
141
|
+
- unit:
|
|
142
|
+
- contract:
|
|
143
|
+
- integration:
|
|
144
|
+
- E2E:
|
|
145
|
+
- visual:
|
|
146
|
+
- data-boundary:
|
|
147
|
+
- resilience:
|
|
148
|
+
- fuzz/monkey:
|
|
149
|
+
- stress:
|
|
150
|
+
- soak:
|
|
151
|
+
|
|
152
|
+
## Required Agents
|
|
153
|
+
|
|
154
|
+
## Assumptions / Clarifications
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Create `specs/changes/<change-id>/test-plan.md` with blank template:
|
|
158
|
+
```
|
|
159
|
+
# Test Plan: <change-id>
|
|
160
|
+
|
|
161
|
+
## Scope
|
|
162
|
+
|
|
163
|
+
## Unit Tests
|
|
164
|
+
|
|
165
|
+
## Contract Tests
|
|
166
|
+
|
|
167
|
+
## Integration Tests
|
|
168
|
+
|
|
169
|
+
## E2E Tests
|
|
170
|
+
|
|
171
|
+
## Resilience / Data-Boundary Tests
|
|
172
|
+
|
|
173
|
+
## Stress / Soak Tests
|
|
174
|
+
|
|
175
|
+
## Out of Scope
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Create `specs/changes/<change-id>/ci-gates.md` with blank template:
|
|
179
|
+
```
|
|
180
|
+
# CI Gates: <change-id>
|
|
181
|
+
|
|
182
|
+
## Required Gates (block merge if failing)
|
|
183
|
+
|
|
184
|
+
## Informational Gates (report only)
|
|
31
185
|
|
|
32
|
-
|
|
33
|
-
|--------|-------------|
|
|
34
|
-
| `.claude/skills/contract-driven-delivery/templates/change-request.md` | `specs/changes/<change-id>/change-request.md` |
|
|
35
|
-
| `.claude/skills/contract-driven-delivery/templates/change-classification.md` | `specs/changes/<change-id>/change-classification.md` |
|
|
36
|
-
| `.claude/skills/contract-driven-delivery/templates/test-plan.md` | `specs/changes/<change-id>/test-plan.md` |
|
|
37
|
-
| `.claude/skills/contract-driven-delivery/templates/ci-gates.md` | `specs/changes/<change-id>/ci-gates.md` |
|
|
38
|
-
| `.claude/skills/contract-driven-delivery/templates/tasks.md` | `specs/changes/<change-id>/tasks.md` |
|
|
186
|
+
## Nightly / Weekly / Manual Gates
|
|
39
187
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
188
|
+
## Promotion Policy
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Create `specs/changes/<change-id>/tasks.md` with ALL checkboxes unchecked:
|
|
192
|
+
```
|
|
193
|
+
# Tasks: <change-id>
|
|
194
|
+
|
|
195
|
+
## 1. Preparation
|
|
196
|
+
- [ ] 1.1 Confirm classification and required artifacts
|
|
197
|
+
- [ ] 1.2 Confirm contracts to update
|
|
198
|
+
- [ ] 1.3 Confirm CI/CD gate plan
|
|
199
|
+
|
|
200
|
+
## 2. Contract Updates
|
|
201
|
+
- [ ] 2.1 API contract
|
|
202
|
+
- [ ] 2.2 CSS/UI contract
|
|
203
|
+
- [ ] 2.3 Env contract
|
|
204
|
+
- [ ] 2.4 Data shape contract
|
|
205
|
+
- [ ] 2.5 Business logic contract
|
|
206
|
+
- [ ] 2.6 CI/CD contract
|
|
207
|
+
|
|
208
|
+
## 3. Tests First
|
|
209
|
+
- [ ] 3.1 Unit/contract tests
|
|
210
|
+
- [ ] 3.2 Integration tests
|
|
211
|
+
- [ ] 3.3 E2E/resilience tests
|
|
212
|
+
- [ ] 3.4 Data-boundary/monkey tests
|
|
213
|
+
- [ ] 3.5 Stress/soak tests if required
|
|
214
|
+
|
|
215
|
+
## 4. Implementation
|
|
216
|
+
- [ ] 4.1 Backend
|
|
217
|
+
- [ ] 4.2 Frontend
|
|
218
|
+
- [ ] 4.3 Env/deploy
|
|
219
|
+
- [ ] 4.4 CI/CD workflows
|
|
220
|
+
|
|
221
|
+
## 5. Review
|
|
222
|
+
- [ ] 5.1 UI/UX review
|
|
223
|
+
- [ ] 5.2 Visual review
|
|
224
|
+
- [ ] 5.3 Contract review
|
|
225
|
+
- [ ] 5.4 QA review
|
|
226
|
+
|
|
227
|
+
## 6. Verification
|
|
228
|
+
- [ ] 6.1 Local gates
|
|
229
|
+
- [ ] 6.2 PR required gates
|
|
230
|
+
- [ ] 6.3 Informational gates
|
|
231
|
+
- [ ] 6.4 Nightly/weekly/manual gates if required
|
|
232
|
+
|
|
233
|
+
## 7. Archive
|
|
234
|
+
- [ ] 7.1 Archive change
|
|
235
|
+
- [ ] 7.2 Promote durable learnings to contracts or CLAUDE.md
|
|
236
|
+
```
|
|
44
237
|
|
|
45
238
|
---
|
|
46
239
|
|
|
@@ -51,61 +244,118 @@ Invoke `change-classifier` agent with:
|
|
|
51
244
|
- The project profile at `specs/project-profile.md` (if it exists)
|
|
52
245
|
- The existing contracts in `contracts/` (if any)
|
|
53
246
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
247
|
+
**change-classifier is read-only** — it will return its output as text. After it responds:
|
|
248
|
+
|
|
249
|
+
1. **YOU write** `specs/changes/<change-id>/change-classification.md` — replace the blank template with the classifier's classification output.
|
|
250
|
+
2. **YOU write** `specs/changes/<change-id>/agent-log/change-classifier.md` — copy the Agent Log block from the classifier's response.
|
|
251
|
+
3. **YOU tick** `tasks.md` item `1.1`.
|
|
58
252
|
|
|
59
|
-
Wait
|
|
253
|
+
Wait until these three writes are done before continuing.
|
|
60
254
|
|
|
61
255
|
---
|
|
62
256
|
|
|
63
257
|
## Step 3: Read the tier and commission agents
|
|
64
258
|
|
|
65
|
-
Read `change-classification.md` to determine the tier. Then invoke agents **in the exact order below
|
|
259
|
+
Read `change-classification.md` to determine the tier. Then invoke agents **in the exact order below**.
|
|
260
|
+
|
|
261
|
+
**For each read-only agent**: wait for its text response → YOU write its artifact file(s) → YOU write its agent-log → YOU tick relevant tasks.md item(s).
|
|
262
|
+
|
|
263
|
+
**For each write-capable agent**: wait for it to confirm completion → YOU tick relevant tasks.md item(s).
|
|
264
|
+
|
|
265
|
+
If any agent sets `status: blocked` in its log, halt immediately and report the agent's `next-action` to the user — do not proceed to subsequent agents.
|
|
266
|
+
|
|
267
|
+
---
|
|
66
268
|
|
|
67
269
|
### Tier 4–5 (low risk: docs, prompts, config-only, no behavior change)
|
|
68
270
|
|
|
69
|
-
1.
|
|
70
|
-
|
|
271
|
+
1. **`contract-reviewer`** (read-only) — confirm no contracts are touched or all touched ones are already updated.
|
|
272
|
+
- YOU write: `agent-log/contract-reviewer.md`
|
|
273
|
+
- YOU tick: `1.2`, applicable items in section 2
|
|
274
|
+
|
|
275
|
+
2. **`qa-reviewer`** (read-only) — confirm release readiness.
|
|
276
|
+
- YOU write: `agent-log/qa-reviewer.md`
|
|
277
|
+
- YOU tick: `5.4`
|
|
278
|
+
|
|
279
|
+
---
|
|
71
280
|
|
|
72
281
|
### Tier 2–3 (normal: feature, enhancement, bug fix with behavior change)
|
|
73
282
|
|
|
74
|
-
1.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
283
|
+
1. **`contract-reviewer`** (read-only) — update or create contracts in `contracts/` before any implementation starts.
|
|
284
|
+
- YOU write: `agent-log/contract-reviewer.md`
|
|
285
|
+
- YOU tick: `1.2`, applicable items in section 2
|
|
286
|
+
|
|
287
|
+
2. **`test-strategist`** (write-capable) — writes `specs/changes/<change-id>/test-plan.md` directly.
|
|
288
|
+
- YOU tick: applicable items in section 3 based on what test families were planned
|
|
289
|
+
|
|
290
|
+
3. **`spec-architect`** (write-capable) — only if `change-classification.md` contains `Architecture Review Required: yes`.
|
|
291
|
+
- YOU tick: `1.3` (if it produced a gate plan)
|
|
292
|
+
|
|
293
|
+
4. **`backend-engineer`** (write-capable) — if the change touches server, API, data, or business logic. Writes implementation and its own agent-log.
|
|
294
|
+
- YOU tick: `4.1` and/or `4.3` based on scope
|
|
295
|
+
- Note: `tasks.md` items 3.1–3.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–3.5 are written by dedicated test engineers (Tier 0–1 only or when classifier explicitly requires them).
|
|
296
|
+
|
|
297
|
+
5. **`frontend-engineer`** (write-capable) — if the change touches UI, components, or client-side behavior. Writes implementation and its own agent-log.
|
|
298
|
+
- YOU tick: `4.2`
|
|
299
|
+
|
|
300
|
+
6. **`dependency-security-reviewer`** (read-only) — if the change touches lockfiles, package manifests, or DB migrations.
|
|
301
|
+
- **Only invoke if** `change-classification.md` lists lockfiles, package manifests, or DB migrations as affected.
|
|
302
|
+
- YOU write: `agent-log/dependency-security-reviewer.md`
|
|
303
|
+
- YOU tick: applicable security-related items
|
|
304
|
+
|
|
305
|
+
7. **`ui-ux-reviewer`** (read-only) — if any UI change (run alongside or after frontend-engineer).
|
|
306
|
+
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
307
|
+
- YOU write: `agent-log/ui-ux-reviewer.md`
|
|
308
|
+
- YOU tick: `5.1`
|
|
309
|
+
|
|
310
|
+
8. **`visual-reviewer`** (read-only) — if any UI change (run after ui-ux-reviewer).
|
|
311
|
+
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
312
|
+
- YOU write: `agent-log/visual-reviewer.md`
|
|
313
|
+
- YOU tick: `5.2`
|
|
314
|
+
|
|
315
|
+
9. **`ci-cd-gatekeeper`** (write-capable) — writes `specs/changes/<change-id>/ci-gates.md` directly.
|
|
316
|
+
- YOU tick: `1.3`, `4.4`, applicable items in section 6
|
|
317
|
+
|
|
318
|
+
10. **`qa-reviewer`** (read-only) — release readiness decision (always last).
|
|
319
|
+
- YOU write: `agent-log/qa-reviewer.md`
|
|
320
|
+
- YOU tick: `5.4`
|
|
321
|
+
|
|
322
|
+
---
|
|
84
323
|
|
|
85
324
|
### Tier 0–1 (high risk: production data, concurrency, queues, large queries, auth, payments, exports)
|
|
86
325
|
|
|
87
|
-
All agents from Tier 2–3, plus insert these after `frontend-engineer` / `backend-engineer`:
|
|
326
|
+
All agents from Tier 2–3, plus insert these after `frontend-engineer` / `backend-engineer` and before `dependency-security-reviewer`:
|
|
327
|
+
|
|
328
|
+
- **`e2e-resilience-engineer`** (write-capable) — E2E, failure-injection, data-boundary tests. Writes its own agent-log.
|
|
329
|
+
- YOU tick: `3.3`
|
|
88
330
|
|
|
89
|
-
-
|
|
90
|
-
- `
|
|
91
|
-
- `stress-soak-engineer` — load, soak, and long-running stability tests
|
|
331
|
+
- **`monkey-test-engineer`** (write-capable) — adversarial input, fuzz, rapid-UI-action tests. Writes its own agent-log.
|
|
332
|
+
- YOU tick: `3.4`
|
|
92
333
|
|
|
93
|
-
|
|
334
|
+
- **`stress-soak-engineer`** (write-capable) — load, soak, and long-running stability tests. Writes its own agent-log.
|
|
335
|
+
- YOU tick: `3.5`
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
**Agent commission rules:**
|
|
94
340
|
- Skip an agent only if the classifier explicitly marks its surface as "not affected"
|
|
95
|
-
- If
|
|
96
|
-
- If
|
|
341
|
+
- If backend-only with no UI: skip `frontend-engineer`, `ui-ux-reviewer`, `visual-reviewer`
|
|
342
|
+
- If UI-only with no backend: skip `backend-engineer`
|
|
343
|
+
|
|
344
|
+
**Resuming from blocked**: After the user resolves the blocking issue, re-invoke the blocked agent (do not restart from Step 1). Continue with the remaining agents in their original order.
|
|
97
345
|
|
|
98
346
|
---
|
|
99
347
|
|
|
100
348
|
## Step 4: Run the gate
|
|
101
349
|
|
|
102
|
-
After all required agents have completed:
|
|
350
|
+
After all required agents have completed and all tasks.md items for their sections are ticked:
|
|
103
351
|
|
|
104
352
|
```
|
|
105
353
|
cdd-kit gate <change-id>
|
|
106
354
|
```
|
|
107
355
|
|
|
108
|
-
**If gate passes**:
|
|
356
|
+
**If gate passes**:
|
|
357
|
+
- YOU tick: `tasks.md` item `6.1`
|
|
358
|
+
- Proceed to Step 5.
|
|
109
359
|
|
|
110
360
|
**If gate fails**:
|
|
111
361
|
1. Read the gate error output carefully
|
|
@@ -114,6 +364,8 @@ cdd-kit gate <change-id>
|
|
|
114
364
|
4. Re-run `cdd-kit gate <change-id>`
|
|
115
365
|
5. Repeat until gate passes (max 3 iterations; if still failing after 3, report to user)
|
|
116
366
|
|
|
367
|
+
**Terminal state after 3 failures**: Add a line at the top of `tasks.md` reading `status: gate-blocked` and report all blocking items to the user. The change is paused — do not proceed to Step 5.
|
|
368
|
+
|
|
117
369
|
---
|
|
118
370
|
|
|
119
371
|
## Step 5: Report to user
|
|
@@ -128,6 +380,9 @@ Risk tier: <tier>
|
|
|
128
380
|
Agents invoked: <list in order>
|
|
129
381
|
Gate: PASSED
|
|
130
382
|
|
|
383
|
+
Tasks completed:
|
|
384
|
+
- [x] all applicable items checked in specs/changes/<change-id>/tasks.md
|
|
385
|
+
|
|
131
386
|
All artifacts written to: specs/changes/<change-id>/
|
|
132
387
|
|
|
133
388
|
Next step:
|
|
@@ -158,5 +413,12 @@ Please review the above items and re-run: cdd-kit gate <change-id>
|
|
|
158
413
|
- Never start implementation (backend/frontend-engineer) before `contract-reviewer` has completed for Tier 0–3 changes
|
|
159
414
|
- Never skip `test-plan.md` for Tier 0–3 changes
|
|
160
415
|
- Never skip `ci-gates.md` for any implementation change
|
|
161
|
-
- Every agent must
|
|
416
|
+
- Every agent must have its `agent-log/<name>.md` written — YOU write it for read-only agents after receiving their response; write-capable agents write their own
|
|
417
|
+
- Tick the relevant `tasks.md` checkbox immediately after each agent completes — do not batch
|
|
162
418
|
- `qa-reviewer` always runs last and makes the release-readiness decision
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## After Completion
|
|
423
|
+
|
|
424
|
+
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.
|
|
@@ -11,17 +11,23 @@
|
|
|
11
11
|
- isolated / module-level / cross-module / system-wide
|
|
12
12
|
|
|
13
13
|
## Required Artifacts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
14
|
+
|
|
15
|
+
The following 5 artifacts are always required for implementation changes:
|
|
16
|
+
`change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.md`
|
|
17
|
+
|
|
18
|
+
Optional artifacts — only create when explicitly needed:
|
|
19
|
+
|
|
20
|
+
| artifact | create? (yes / no) | reason |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| current-behavior.md | no | |
|
|
23
|
+
| proposal.md | no | |
|
|
24
|
+
| spec.md | no | |
|
|
25
|
+
| design.md | no | |
|
|
26
|
+
| qa-report.md | no | |
|
|
27
|
+
| regression-report.md | no | |
|
|
28
|
+
| archive.md | no | |
|
|
29
|
+
|
|
30
|
+
Default is **no**. Change classifier must explicitly set `yes` with a reason.
|
|
25
31
|
|
|
26
32
|
## Required Contracts
|
|
27
33
|
- API:
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
change-id: <id>
|
|
3
|
+
schema-version: 0.1.0
|
|
4
|
+
last-changed: <date>
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Design: <change-id>
|
|
4
8
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
## API Design
|
|
9
|
+
## Summary
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
(1 paragraph: what changes architecturally and why)
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Affected Components
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
| component | file path(s) | nature of change |
|
|
16
|
+
|---|---|---|
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## Key Decisions
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
- **Decision**: rationale — rejected alternative: reason rejected
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## Migration / Rollback
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
(Prose description. SQL and code go in migration files, not here.)
|
|
22
25
|
|
|
23
|
-
##
|
|
26
|
+
## Open Risks
|
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
change-id: <id>
|
|
3
|
+
schema-version: 0.1.0
|
|
4
|
+
last-changed: <date>
|
|
5
|
+
risk: low | medium | high
|
|
6
|
+
tier: 0 | 1 | 2 | 3 | 4 | 5
|
|
7
|
+
---
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
| requirement | test family | planned file/spec | expected evidence |
|
|
5
|
-
|---|---|---|---|
|
|
6
|
-
|
|
7
|
-
## Unit Tests
|
|
8
|
-
|
|
9
|
-
## Contract Tests
|
|
10
|
-
|
|
11
|
-
## Integration Tests
|
|
9
|
+
# Test Plan: <change-id>
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Acceptance Criteria → Test Mapping
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Resilience Tests
|
|
20
|
-
|
|
21
|
-
## Fuzz / Monkey Operation Tests
|
|
13
|
+
| criterion id | test family | test file path | tier |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| AC-1 | unit | tests/unit/test_xxx.py | 0 |
|
|
22
16
|
|
|
23
|
-
##
|
|
17
|
+
## Test Families Required
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
Mark all that apply: unit / contract / integration / e2e / data-boundary / resilience / monkey / stress / soak
|
|
26
20
|
|
|
27
|
-
##
|
|
21
|
+
## Out of Scope
|
|
28
22
|
|
|
29
|
-
##
|
|
23
|
+
## Notes
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
(Keep this section under 10 lines. Implementation detail belongs in the test files themselves.)
|
|
@@ -11,17 +11,23 @@
|
|
|
11
11
|
- isolated / module-level / cross-module / system-wide
|
|
12
12
|
|
|
13
13
|
## Required Artifacts
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
14
|
+
|
|
15
|
+
The following 5 artifacts are always required for implementation changes:
|
|
16
|
+
`change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.md`
|
|
17
|
+
|
|
18
|
+
Optional artifacts — only create when explicitly needed:
|
|
19
|
+
|
|
20
|
+
| artifact | create? (yes / no) | reason |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| current-behavior.md | no | |
|
|
23
|
+
| proposal.md | no | |
|
|
24
|
+
| spec.md | no | |
|
|
25
|
+
| design.md | no | |
|
|
26
|
+
| qa-report.md | no | |
|
|
27
|
+
| regression-report.md | no | |
|
|
28
|
+
| archive.md | no | |
|
|
29
|
+
|
|
30
|
+
Default is **no**. Change classifier must explicitly set `yes` with a reason.
|
|
25
31
|
|
|
26
32
|
## Required Contracts
|
|
27
33
|
- API:
|