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.
@@ -1,7 +1,7 @@
1
1
  - uses: conda-incubator/setup-miniconda@v3
2
2
  with:
3
3
  environment-file: environment.yml
4
- activate-environment: "" # 空字串讓 conda 從 environment.yml 讀 name
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
- # Contract validation steps run as-is; application/test commands MUST be customized for your stack.
3
- # See README.md and ci/gate-policy.md for tier semantics and promotion policy.
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: Detect project profile
25
- run: python .claude/skills/contract-driven-delivery/scripts/detect_project_profile.py . --write project-profile.generated.md || true
26
-
27
- - name: Validate contracts
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: Validate spec traceability
37
- run: python .claude/skills/contract-driven-delivery/scripts/validate_spec_traceability.py
31
+ - name: Install cdd-kit
32
+ run: npm install -g contract-driven-delivery
38
33
 
39
- - name: Validate contract versions
40
- run: python .claude/skills/contract-driven-delivery/scripts/validate_contract_versions.py .
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
- Run the scaffold generator:
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
- python .claude/skills/contract-driven-delivery/scripts/generate_change_scaffold.py <change-id>
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
- If the script is unavailable, manually create `specs/changes/<change-id>/` and copy these template files:
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
- | Source | Destination |
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
- Fill in `change-request.md`:
41
- - `## Original Request` → the user's exact description
42
- - `## Business / User Goal` → infer from context
43
- - `## Requested Delivery Date / Priority` "as soon as possible" if not specified
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
- The classifier must write a complete `specs/changes/<change-id>/change-classification.md` including:
55
- - Risk tier (Tier 0–5, or low / medium / high / critical)
56
- - Affected surfaces (API, UI, env, data, CI)
57
- - List of required agents
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 for `change-classification.md` to be written before continuing.
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**, waiting for each to complete its `specs/changes/<change-id>/agent-log/<agent-name>.md` before proceeding.
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. `contract-reviewer` — confirm no contracts are touched or all touched ones are already updated
70
- 2. `qa-reviewer` — confirm release readiness
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. `contract-reviewer` — update or create contracts in `contracts/` before any implementation starts
75
- 2. `test-strategist` author `specs/changes/<change-id>/test-plan.md`
76
- 3. `spec-architect` only if the classifier flagged an architectural boundary or cross-module impact
77
- 4. `backend-engineer` — if the change touches server, API, data, or business logic
78
- 5. `frontend-engineer`if the change touches UI, components, or client-side behavior
79
- 6. `ui-ux-reviewer` if any UI change (run alongside or after frontend-engineer)
80
- 7. `visual-reviewer` — if any UI change (run after ui-ux-reviewer)
81
- 8. `dependency-security-reviewer` — if the change touches lockfiles, package manifests, or DB migrations
82
- 9. `ci-cd-gatekeeper` update `specs/changes/<change-id>/ci-gates.md`
83
- 10. `qa-reviewer` — release readiness decision
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
- - `e2e-resilience-engineer`E2E, failure-injection, data-boundary tests
90
- - `monkey-test-engineer` — adversarial input, fuzz, rapid-UI-action tests
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
- **Agent commission rules**:
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 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
96
- - If the change is UI-only with no backend, skip `backend-engineer`; if backend-only with no UI, skip `frontend-engineer`, `ui-ux-reviewer`, `visual-reviewer`
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**: proceed to Step 5.
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 write its `agent-log/<name>.md` — the gate will reject changes missing it
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
- | artifact | required | reason |
15
- |---|---:|---|
16
- | current-behavior.md | | |
17
- | proposal.md | | |
18
- | spec.md | | |
19
- | design.md | | |
20
- | contracts.md | | |
21
- | test-plan.md | yes | every implementation change requires test planning |
22
- | ci-gates.md | yes | every implementation change requires CI/CD gate planning |
23
- | qa-report.md | | |
24
- | regression-report.md | | |
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
- # Technical Design
1
+ ---
2
+ change-id: <id>
3
+ schema-version: 0.1.0
4
+ last-changed: <date>
5
+ ---
2
6
 
3
- ## Architecture Summary
7
+ # Design: <change-id>
4
8
 
5
- ## Affected Components
6
-
7
- ## API Design
9
+ ## Summary
8
10
 
9
- ## Data / Schema Design
11
+ (1 paragraph: what changes architecturally and why)
10
12
 
11
- ## UI / UX Design
13
+ ## Affected Components
12
14
 
13
- ## Env / Config Design
15
+ | component | file path(s) | nature of change |
16
+ |---|---|---|
14
17
 
15
- ## Error Handling
18
+ ## Key Decisions
16
19
 
17
- ## Performance Considerations
20
+ - **Decision**: rationale — rejected alternative: reason rejected
18
21
 
19
- ## Security Considerations
22
+ ## Migration / Rollback
20
23
 
21
- ## Deployment / Rollback
24
+ (Prose description. SQL and code go in migration files, not here.)
22
25
 
23
- ## Architecture Decision Notes
26
+ ## Open Risks
@@ -1,31 +1,25 @@
1
- # Test Plan
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
- ## Acceptance Criteria Mapping
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
- ## E2E Tests
11
+ ## Acceptance Criteria → Test Mapping
14
12
 
15
- ## Visual Tests / Review
16
-
17
- ## Data Boundary Tests
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
- ## Stress Tests
17
+ ## Test Families Required
24
18
 
25
- ## Soak Tests
19
+ Mark all that apply: unit / contract / integration / e2e / data-boundary / resilience / monkey / stress / soak
26
20
 
27
- ## Mutation Checks
21
+ ## Out of Scope
28
22
 
29
- ## Commands
23
+ ## Notes
30
24
 
31
- ## CI/CD Gate Mapping
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
- | artifact | required | reason |
15
- |---|---:|---|
16
- | current-behavior.md | | |
17
- | proposal.md | | |
18
- | spec.md | | |
19
- | design.md | | |
20
- | contracts.md | | |
21
- | test-plan.md | yes | every implementation change requires test planning |
22
- | ci-gates.md | yes | every implementation change requires CI/CD gate planning |
23
- | qa-report.md | | |
24
- | regression-report.md | | |
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: