contract-driven-delivery 2.0.17 → 2.0.19
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 +57 -0
- package/README.md +111 -15
- package/assets/AGENTS.template.md +1 -0
- package/assets/CLAUDE.template.md +4 -0
- package/assets/CODEX.template.md +4 -0
- package/assets/agents/backend-engineer.md +3 -1
- package/assets/agents/change-classifier.md +32 -4
- package/assets/agents/ci-cd-gatekeeper.md +4 -0
- package/assets/agents/e2e-resilience-engineer.md +6 -1
- package/assets/agents/frontend-engineer.md +3 -1
- package/assets/agents/implementation-planner.md +144 -0
- package/assets/agents/monkey-test-engineer.md +7 -0
- package/assets/agents/qa-reviewer.md +8 -0
- package/assets/agents/spec-architect.md +1 -1
- package/assets/agents/spec-drift-auditor.md +8 -0
- package/assets/agents/stress-soak-engineer.md +12 -1
- package/assets/agents/test-strategist.md +1 -0
- package/assets/agents/ui-ux-reviewer.md +7 -0
- package/assets/agents/visual-reviewer.md +9 -0
- package/assets/cdd/model-policy.json +1 -0
- package/assets/skills/cdd-new/SKILL.md +75 -22
- package/assets/skills/cdd-resume/SKILL.md +9 -0
- package/assets/skills/contract-driven-delivery/SKILL.md +31 -6
- package/assets/skills/contract-driven-delivery/references/qa-gates.md +5 -1
- package/assets/skills/contract-driven-delivery/references/spec-drift-policy.md +4 -1
- package/assets/skills/contract-driven-delivery/references/stress-soak-standard.md +4 -0
- package/assets/skills/contract-driven-delivery/references/visual-review-standard.md +4 -1
- package/assets/skills/contract-driven-delivery/references/workflow-router.md +3 -2
- package/assets/skills/contract-driven-delivery/scripts/generate_change_scaffold.py +14 -4
- package/assets/skills/contract-driven-delivery/scripts/validate_spec_traceability.py +1 -1
- package/assets/skills/contract-driven-delivery/templates/change-classification.md +12 -2
- package/assets/skills/contract-driven-delivery/templates/ci-gates.md +4 -0
- package/assets/skills/contract-driven-delivery/templates/implementation-plan.md +65 -0
- package/assets/skills/contract-driven-delivery/templates/tasks.yml +3 -1
- package/assets/skills/contract-driven-delivery/templates/test-plan.md +1 -1
- package/assets/specs-templates/change-classification.md +12 -2
- package/assets/specs-templates/ci-gates.md +4 -0
- package/assets/specs-templates/implementation-plan.md +65 -0
- package/assets/specs-templates/tasks.yml +3 -1
- package/assets/specs-templates/test-plan.md +1 -1
- package/dist/cli/index.js +19 -0
- package/package.json +1 -1
|
@@ -33,6 +33,14 @@ By default, do NOT read `specs/changes/` history. Only read historical change re
|
|
|
33
33
|
|
|
34
34
|
## Output
|
|
35
35
|
|
|
36
|
+
Default output is a concise drift verdict in your response plus an optional
|
|
37
|
+
`Agent Log` YAML block with evidence pointers. Do not create standalone drift
|
|
38
|
+
markdown for a clean audit.
|
|
39
|
+
|
|
40
|
+
Emit a full `# Spec Drift Audit` body only when drift is found, when the user
|
|
41
|
+
asked for standalone audit documentation, or when classification requires
|
|
42
|
+
`regression-report.md`.
|
|
43
|
+
|
|
36
44
|
```md
|
|
37
45
|
# Spec Drift Audit
|
|
38
46
|
|
|
@@ -9,6 +9,8 @@ You are the stress and soak engineer.
|
|
|
9
9
|
|
|
10
10
|
Use realistic load profiles rather than arbitrary request loops.
|
|
11
11
|
|
|
12
|
+
Before editing tests or load profiles, read `specs/changes/<change-id>/implementation-plan.md` and `test-plan.md`. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the workload/threshold scope needed for your work, report `blocked` instead of inferring requirements from chat history.
|
|
13
|
+
|
|
12
14
|
## Design dimensions
|
|
13
15
|
|
|
14
16
|
- user concurrency
|
|
@@ -35,8 +37,17 @@ Use realistic load profiles rather than arbitrary request loops.
|
|
|
35
37
|
|
|
36
38
|
## Output
|
|
37
39
|
|
|
40
|
+
Write or update the actual load/soak test files, profiles, commands, and
|
|
41
|
+
workflow wiring required by `implementation-plan.md` and `test-plan.md`.
|
|
42
|
+
Default reporting should be concise response text plus optional
|
|
43
|
+
`agent-log/*.yml` evidence pointers.
|
|
44
|
+
|
|
45
|
+
Create `stress-soak-report.md` only when `change-classification.md` explicitly
|
|
46
|
+
requires it, when high-risk load/soak results must be retained as durable
|
|
47
|
+
evidence, or when the run is blocked/failed.
|
|
48
|
+
|
|
38
49
|
```md
|
|
39
|
-
# Stress / Soak
|
|
50
|
+
# Stress / Soak Report
|
|
40
51
|
|
|
41
52
|
## Workload Model
|
|
42
53
|
...
|
|
@@ -60,6 +60,7 @@ Your output goes into `specs/changes/<id>/test-plan.md`. It must answer WHAT to
|
|
|
60
60
|
- **DO NOT** write: mock setup details, fixture data, or expected JSON payloads
|
|
61
61
|
- **DO NOT** write: per-test input/output tables with more than 15 rows
|
|
62
62
|
- **DO NOT** write: example assertions or test helper code
|
|
63
|
+
- **DO NOT** duplicate CI gate policy or implementation-plan execution steps; reference the relevant gate names and acceptance criteria instead.
|
|
63
64
|
|
|
64
65
|
Implementation detail belongs in the test files, not in test-plan.md.
|
|
65
66
|
Target: `test-plan.md` ??100 lines.
|
|
@@ -30,6 +30,13 @@ Review the intended interaction, not just whether code compiles.
|
|
|
30
30
|
|
|
31
31
|
## Output
|
|
32
32
|
|
|
33
|
+
Default output is a concise UI/UX verdict in your response plus an optional
|
|
34
|
+
`Agent Log` YAML block with evidence pointers. Do not ask main Claude to create
|
|
35
|
+
a separate markdown report for a routine approved review.
|
|
36
|
+
|
|
37
|
+
Emit a full review body only when blocking UX/accessibility issues require
|
|
38
|
+
durable prose or the classifier explicitly requested a report artifact.
|
|
39
|
+
|
|
33
40
|
```md
|
|
34
41
|
# UI/UX Review
|
|
35
42
|
|
|
@@ -27,6 +27,15 @@ Frontend visual changes require evidence. Use screenshots, videos, or a clear ma
|
|
|
27
27
|
|
|
28
28
|
## Output
|
|
29
29
|
|
|
30
|
+
Default output is a concise visual verdict in your response plus an optional
|
|
31
|
+
`Agent Log` YAML block with evidence pointers. Do not ask main Claude to create
|
|
32
|
+
`visual-review-report.md` for a routine approved UI change.
|
|
33
|
+
|
|
34
|
+
Emit a full `# Visual Review Report` body only when
|
|
35
|
+
`change-classification.md` explicitly requires `visual-review-report.md`, when
|
|
36
|
+
visual evidence must be preserved as a bundle, or when the decision is
|
|
37
|
+
`changes-required`.
|
|
38
|
+
|
|
30
39
|
```md
|
|
31
40
|
# Visual Review Report
|
|
32
41
|
|
|
@@ -12,9 +12,32 @@ description: Start a new tracked change. Scaffolds all required artifacts, class
|
|
|
12
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
|
+
## Artifact ownership and deduplication
|
|
16
16
|
|
|
17
|
-
Every artifact under `specs/changes/<id>/`
|
|
17
|
+
Every artifact under `specs/changes/<id>/` must have one authoritative job.
|
|
18
|
+
Do not duplicate the same fact across multiple markdown files. Later artifacts
|
|
19
|
+
must reference earlier artifacts by path, section, criterion id, or decision id
|
|
20
|
+
instead of restating full content.
|
|
21
|
+
|
|
22
|
+
Core artifacts:
|
|
23
|
+
|
|
24
|
+
| artifact | authority |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `change-classification.md` | risk, tier, required agents, required artifacts, acceptance criteria, context-manifest draft |
|
|
27
|
+
| `context-manifest.md` | read boundary and approved context |
|
|
28
|
+
| `test-plan.md` | acceptance criterion to test family/file mapping |
|
|
29
|
+
| `ci-gates.md` | required/informational/manual gates and promotion policy |
|
|
30
|
+
| `design.md` | architecture/design decisions, only when required |
|
|
31
|
+
| `implementation-plan.md` | concise execution packet that references the above artifacts |
|
|
32
|
+
| `tasks.yml` | centralized task status only |
|
|
33
|
+
|
|
34
|
+
Evidence and review notes default to short optional `agent-log/*.yml` pointers.
|
|
35
|
+
Create report markdown (`qa-report.md`, `visual-review-report.md`,
|
|
36
|
+
`regression-report.md`, `monkey-test-report.md`, `stress-soak-report.md`) only
|
|
37
|
+
when the classifier explicitly requires it, or when a reviewer finds blocking
|
|
38
|
+
findings or approved-with-risk evidence that needs durable review prose.
|
|
39
|
+
|
|
40
|
+
Every spec artifact answers **WHAT** and **WHY**, not HOW.
|
|
18
41
|
|
|
19
42
|
Soft caps (guidance, not gate-enforced):
|
|
20
43
|
- `spec.md` ??200 lines
|
|
@@ -92,7 +115,7 @@ inevitable re-classification when the agents discover the ambiguity.
|
|
|
92
115
|
| Agent type | Who writes artifact files | Who writes optional handoff notes | Who updates tasks.yml |
|
|
93
116
|
|------------|--------------------------|----------------------------------|----------------------|
|
|
94
117
|
| 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) |
|
|
118
|
+
| Write-capable agents (have Edit): `implementation-planner`, `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
119
|
|
|
97
120
|
**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
121
|
|
|
@@ -112,13 +135,25 @@ rules to `contracts/` or project guidance (`CLAUDE.md`/`CODEX.md`).
|
|
|
112
135
|
|
|
113
136
|
## Artifact opt-in policy
|
|
114
137
|
|
|
115
|
-
Only create optional artifacts (`current-behavior.md`, `proposal.md`, `spec.md`,
|
|
138
|
+
Only create optional artifacts (`current-behavior.md`, `proposal.md`, `spec.md`,
|
|
139
|
+
`design.md`, `qa-report.md`, `regression-report.md`, `visual-review-report.md`,
|
|
140
|
+
`monkey-test-report.md`, `stress-soak-report.md`) when the classifier's
|
|
141
|
+
`change-classification.md` explicitly marks them as `yes`, or when a reviewer
|
|
142
|
+
finds blocking findings / approved-with-risk evidence that must be preserved as prose.
|
|
143
|
+
|
|
144
|
+
`design.md` is owned by `spec-architect`, not `implementation-planner`. If the
|
|
145
|
+
classifier marks `design.md` as `yes`, marks `Architecture Review Required:
|
|
146
|
+
yes`, or lists `spec-architect` in `## Required Agents`, invoke
|
|
147
|
+
`spec-architect` before `implementation-planner`. If none of those triggers is
|
|
148
|
+
present, mark task `1.3` as `skipped`.
|
|
116
149
|
|
|
117
150
|
Note: `archive.md` is created during `/cdd-close`, not during `/cdd-new` ??it is not part of the classifier's opt-in surface.
|
|
118
151
|
|
|
119
|
-
If the classifier marks an artifact as `no` or leaves it blank, **do not create
|
|
152
|
+
If the classifier marks an artifact as `no` or leaves it blank, **do not create
|
|
153
|
+
the file** just because an agent could contribute to it. Use an optional
|
|
154
|
+
`agent-log/*.yml` pointer instead.
|
|
120
155
|
|
|
121
|
-
The
|
|
156
|
+
The 7 always-required artifacts are: `change-request.md`, `change-classification.md`, `implementation-plan.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, and `context-manifest.md`.
|
|
122
157
|
|
|
123
158
|
## Step 1: Generate change-id, scaffold, and scan context
|
|
124
159
|
|
|
@@ -158,6 +193,7 @@ the kit and is bundled into every install.
|
|
|
158
193
|
|---|---|---|
|
|
159
194
|
| `change-request.md` | `specs/templates/change-request.md` | Fill the `## Original Request` section with the user's exact description before invoking the classifier; leave the rest blank |
|
|
160
195
|
| `change-classification.md` | `specs/templates/change-classification.md` | Replace blank template with classifier output (Step 2) |
|
|
196
|
+
| `implementation-plan.md` | `specs/templates/implementation-plan.md` | `implementation-planner` writes this directly after contracts, tests, required design, and CI gate plan are known |
|
|
161
197
|
| `test-plan.md` | `specs/templates/test-plan.md` | `test-strategist` writes this directly |
|
|
162
198
|
| `ci-gates.md` | `specs/templates/ci-gates.md` | `ci-cd-gatekeeper` writes this directly |
|
|
163
199
|
| `tasks.yml` | `specs/templates/tasks.yml` | Tick checkboxes as agents complete; backfill `tier:` frontmatter from classifier (Step 2.4) |
|
|
@@ -238,7 +274,11 @@ Wait until these five writes are done before continuing.
|
|
|
238
274
|
|
|
239
275
|
Read `change-classification.md` to determine the tier. Then invoke agents **in the exact order below**.
|
|
240
276
|
|
|
241
|
-
**For each read-only agent**: wait for its text response
|
|
277
|
+
**For each read-only agent**: wait for its text response. YOU write a report
|
|
278
|
+
artifact only if the classifier required that report or the agent found
|
|
279
|
+
blocking findings / approved-with-risk evidence that needs durable prose. Otherwise
|
|
280
|
+
write at most a short optional handoff note, then tick relevant `tasks.yml`
|
|
281
|
+
item(s).
|
|
242
282
|
|
|
243
283
|
**For each write-capable agent**: wait for it to confirm completion ??YOU tick relevant tasks.yml item(s).
|
|
244
284
|
|
|
@@ -268,8 +308,9 @@ agent:
|
|
|
268
308
|
- confirm required artifacts exist; optional handoff notes are not gate inputs
|
|
269
309
|
- if the agent reports `blocked`, halt and surface its concrete next action
|
|
270
310
|
- tick the owned `tasks.yml` items immediately
|
|
271
|
-
- record incidental/pre-existing findings in
|
|
272
|
-
|
|
311
|
+
- record incidental/pre-existing findings in `agent-log/*.yml`; escalate to
|
|
312
|
+
`qa-report.md` or `regression-report.md` only when the finding blocks release,
|
|
313
|
+
changes the QA decision, or needs durable follow-up ownership
|
|
273
314
|
|
|
274
315
|
### Agent stage badges (UI v1)
|
|
275
316
|
|
|
@@ -283,6 +324,7 @@ the user; do not put them inside the prompt sent to the agent.
|
|
|
283
324
|
|---|---|---|
|
|
284
325
|
| Decision | `change-classifier` | ? `[classifier]` |
|
|
285
326
|
| Decision | `spec-architect` | ? `[architect]` |
|
|
327
|
+
| Decision | `implementation-planner` | ? `[plan]` |
|
|
286
328
|
| Implementation | `backend-engineer` | ? `[backend]` |
|
|
287
329
|
| Implementation | `frontend-engineer` | ? `[frontend]` |
|
|
288
330
|
| Implementation | `ci-cd-gatekeeper` | ? `[ci-cd]` |
|
|
@@ -346,35 +388,44 @@ prompt; the agent's behavior is defined by the agent prompt files in
|
|
|
346
388
|
- YOU tick: applicable items in section 3 based on what test families were planned
|
|
347
389
|
- Provide the classifier's `## Inferred Acceptance Criteria` list to test-strategist. These become the `criterion id` column in the Acceptance Criteria ??Test Mapping table.
|
|
348
390
|
|
|
349
|
-
3. **`spec-architect`** (write-capable) ??only if `change-classification.md` contains `Architecture Review Required: yes`.
|
|
350
|
-
-
|
|
391
|
+
3. **`spec-architect`** (write-capable) ??only if `change-classification.md` contains `Architecture Review Required: yes`, marks `design.md` as `yes`, or lists `spec-architect` in `## Required Agents`.
|
|
392
|
+
- Writes `specs/changes/<change-id>/design.md` directly. This is the design/architecture decision record consumed by `implementation-planner`.
|
|
393
|
+
- YOU tick: `1.3`
|
|
394
|
+
- If the classifier did not require design, YOU mark `1.3` as `skipped` before continuing.
|
|
395
|
+
|
|
396
|
+
4. **`ci-cd-gatekeeper`** (write-capable) ??writes `specs/changes/<change-id>/ci-gates.md` directly before implementation planning.
|
|
397
|
+
- YOU tick: `1.4`, `4.4`, applicable items in section 6
|
|
351
398
|
|
|
352
|
-
|
|
399
|
+
5. **`implementation-planner`** (write-capable) ??writes `specs/changes/<change-id>/implementation-plan.md` directly after classification, contracts, test plan, required design, and CI gate plan are available.
|
|
400
|
+
- This is the handoff packet for implementation agents. It should contain execution scope, non-goals, required changes, file-level plan, contract updates, test execution plan, and constraints.
|
|
401
|
+
- It must reference `test-plan.md`, `ci-gates.md`, contracts, and `design.md` by path/section/id instead of copying their full content.
|
|
402
|
+
- It must not create or repair `design.md`. If required design is missing, route back to `spec-architect`.
|
|
403
|
+
- If it reports `blocked`, halt and surface the missing decision/context to the user.
|
|
404
|
+
- YOU tick: `1.5`
|
|
405
|
+
|
|
406
|
+
6. **`backend-engineer`** (write-capable) ??if the change touches server, API, data, or business logic. Writes implementation directly; may write an optional handoff note.
|
|
353
407
|
- YOU tick: `4.1` and/or `4.3` based on scope
|
|
354
408
|
- 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).
|
|
355
409
|
|
|
356
|
-
|
|
410
|
+
7. **`frontend-engineer`** (write-capable) ??if the change touches UI, components, or client-side behavior. Writes implementation directly; may write an optional handoff note.
|
|
357
411
|
- YOU tick: `4.2`
|
|
358
412
|
|
|
359
|
-
|
|
413
|
+
8. **`dependency-security-reviewer`** (read-only) ??if the change touches lockfiles, package manifests, or DB migrations.
|
|
360
414
|
- **Only invoke if** `change-classification.md` lists lockfiles, package manifests, or DB migrations as affected.
|
|
361
415
|
- Optional handoff note: `agent-log/dependency-security-reviewer.yml`
|
|
362
416
|
- YOU tick: applicable security-related items
|
|
363
417
|
|
|
364
|
-
|
|
418
|
+
9. **`ui-ux-reviewer`** (read-only) ??if any UI change (run alongside or after frontend-engineer).
|
|
365
419
|
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
366
420
|
- Optional handoff note: `agent-log/ui-ux-reviewer.yml`
|
|
367
421
|
- YOU tick: `5.1`
|
|
368
422
|
|
|
369
|
-
|
|
423
|
+
10. **`visual-reviewer`** (read-only) ??if any UI change (run after ui-ux-reviewer).
|
|
370
424
|
- **Only invoke if** classifier marks UI/CSS as affected.
|
|
371
425
|
- Optional handoff note: `agent-log/visual-reviewer.yml`
|
|
372
426
|
- YOU tick: `5.2`
|
|
373
427
|
|
|
374
|
-
|
|
375
|
-
- YOU tick: `1.3`, `4.4`, applicable items in section 6
|
|
376
|
-
|
|
377
|
-
10. **`qa-reviewer`** (read-only) ??release readiness decision (always last).
|
|
428
|
+
11. **`qa-reviewer`** (read-only) ??release readiness decision (always last).
|
|
378
429
|
- Optional handoff note: `agent-log/qa-reviewer.yml`
|
|
379
430
|
- YOU tick: `5.4`
|
|
380
431
|
|
|
@@ -402,7 +453,8 @@ All agents from Tier 2??, plus insert these after `frontend-engineer` / `backend
|
|
|
402
453
|
- If a required or informational test has pre-existing failures unrelated to
|
|
403
454
|
this change, do not count them as this change's pass/fail result. Record the
|
|
404
455
|
failing test id, baseline commit or prior evidence, owner, and follow-up in
|
|
405
|
-
`qa-report.md
|
|
456
|
+
optional `agent-log/*.yml`; create `qa-report.md` only when the QA decision is
|
|
457
|
+
`approved-with-risk` or `blocked`.
|
|
406
458
|
- If implementation uncovers unrelated old bugs, fix only those needed to meet
|
|
407
459
|
this change's acceptance criteria or to avoid a new safety/security risk.
|
|
408
460
|
Otherwise record them as follow-up with evidence and owner.
|
|
@@ -483,7 +535,7 @@ Gate: PASSED
|
|
|
483
535
|
Tasks completed:
|
|
484
536
|
- [x] all applicable items have status: done in specs/changes/<change-id>/tasks.yml
|
|
485
537
|
|
|
486
|
-
|
|
538
|
+
Core artifacts written to: specs/changes/<change-id>/
|
|
487
539
|
|
|
488
540
|
Next step:
|
|
489
541
|
git add specs/changes/<change-id>/
|
|
@@ -511,6 +563,7 @@ Please review the above items and re-run: cdd-kit gate <change-id>
|
|
|
511
563
|
## Rules
|
|
512
564
|
|
|
513
565
|
- Never start implementation (backend/frontend-engineer) before `contract-reviewer` has completed for Tier 0?? changes
|
|
566
|
+
- Never start implementation (backend/frontend-engineer or dedicated test engineers) before `implementation-plan.md` exists and `tasks.yml` item `1.5` is done
|
|
514
567
|
- Never skip `test-plan.md` for Tier 0?? changes
|
|
515
568
|
- Never skip `ci-gates.md` for any implementation change
|
|
516
569
|
- Agent logs are optional; do not create them just to satisfy a gate.
|
|
@@ -42,6 +42,8 @@ Read only these state files first:
|
|
|
42
42
|
- `specs/changes/<change-id>/context-manifest.md` if present
|
|
43
43
|
- `specs/changes/<change-id>/agent-log/*.yml`
|
|
44
44
|
- `specs/changes/<change-id>/change-classification.md`
|
|
45
|
+
- `specs/changes/<change-id>/design.md` if present
|
|
46
|
+
- `specs/changes/<change-id>/implementation-plan.md` if present
|
|
45
47
|
|
|
46
48
|
Do not run broad repository search during resume. Do not read `src/`, `tests/`, or `contracts/` unless the current `context-manifest.md` authorizes that path or an approved expansion lists it.
|
|
47
49
|
|
|
@@ -54,6 +56,10 @@ Read `specs/changes/<change-id>/agent-log/` to list which agents have already ru
|
|
|
54
56
|
|
|
55
57
|
Read `specs/changes/<change-id>/change-classification.md` to recall the tier and required agents.
|
|
56
58
|
|
|
59
|
+
If `change-classification.md` requires `design.md` (`Architecture Review Required: yes`, Optional Artifacts `design.md: yes`, or Required Agents includes `spec-architect`) and `design.md` is missing or still a scaffold, resume from `spec-architect` before invoking `implementation-planner`.
|
|
60
|
+
|
|
61
|
+
Read `specs/changes/<change-id>/implementation-plan.md` if it exists. If implementation tasks are still pending and the plan is missing or still a scaffold, resume from `implementation-planner` before invoking backend/frontend/test implementation agents.
|
|
62
|
+
|
|
57
63
|
Read `specs/changes/<change-id>/context-manifest.md`:
|
|
58
64
|
- Identify allowed paths and approved expansions.
|
|
59
65
|
- Identify pending Context Expansion Requests.
|
|
@@ -76,6 +82,7 @@ Completed agents: <list from agent-log/>
|
|
|
76
82
|
Pending tasks: <list of status: pending items>
|
|
77
83
|
Pending context expansions: <none | list request ids and paths>
|
|
78
84
|
Allowed context: <short summary from context-manifest.md>
|
|
85
|
+
Implementation plan: <ready | missing | scaffold | blocked>
|
|
79
86
|
|
|
80
87
|
Next agent to run: <agent-name> (based on tier flow and what's missing)
|
|
81
88
|
```
|
|
@@ -110,5 +117,7 @@ Continue until all required agents are done, then run `cdd-kit gate <change-id>`
|
|
|
110
117
|
- Never start from Step 1 of `/cdd-new` — only resume from the next pending agent
|
|
111
118
|
- Never use broad search to reconstruct state; resume from `tasks.yml`, `context-manifest.md`, and `agent-log/`
|
|
112
119
|
- Never continue past pending Context Expansion Requests
|
|
120
|
+
- Never resume `implementation-planner` before required `design.md` exists
|
|
121
|
+
- Never resume backend/frontend/test implementation agents before `implementation-plan.md` is ready
|
|
113
122
|
- If tasks.yml has `status: abandoned`, report to user and stop
|
|
114
123
|
- If tasks.yml has `status: gate-blocked`, go directly to gate retry (max 3)
|
|
@@ -21,7 +21,14 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
|
|
|
21
21
|
- Invoke repo-context-scanner to capture project profile and standardization gaps.
|
|
22
22
|
3. Select required artifacts.
|
|
23
23
|
- Use templates in `templates/`.
|
|
24
|
-
- Do not force every artifact for tiny changes, but do require `change-classification.md`, `test-plan.md`, and `ci-gates.md` for implementation changes.
|
|
24
|
+
- Do not force every artifact for tiny changes, but do require `change-classification.md`, `implementation-plan.md`, `test-plan.md`, and `ci-gates.md` for implementation changes.
|
|
25
|
+
- Keep each fact in one authoritative artifact. Later artifacts should
|
|
26
|
+
reference earlier artifacts by path, section, criterion id, decision id, or
|
|
27
|
+
gate name instead of duplicating full prose.
|
|
28
|
+
- Use optional `agent-log/*.yml` pointers for routine review evidence.
|
|
29
|
+
Create report markdown only for blocking findings, approved-with-risk,
|
|
30
|
+
excluded pre-existing failures, visual evidence bundles, or high-risk
|
|
31
|
+
load/soak results.
|
|
25
32
|
4. Update contracts before or alongside implementation. Invoke contract-reviewer to validate API/CSS/env/data/business/CI-CD contracts before or alongside implementation.
|
|
26
33
|
- API: `references/api-contract-standard.md`
|
|
27
34
|
- CSS/UI: `references/css-contract-standard.md`
|
|
@@ -39,8 +46,18 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
|
|
|
39
46
|
- `stress-soak-engineer` implements load, soak, and long-running stability tests.
|
|
40
47
|
- Invoke the relevant test engineer(s) before or alongside implementation based on the risk tier.
|
|
41
48
|
- Each engineer must read the matching standard before authoring tests: e2e-resilience-engineer → references/e2e-standard.md, monkey-test-engineer → references/monkey-operation-standard.md, stress-soak-engineer → references/stress-soak-standard.md.
|
|
42
|
-
6.
|
|
49
|
+
6. Confirm design decisions when required.
|
|
50
|
+
- If classification marks `Architecture Review Required: yes`, Optional Artifacts `design.md: yes`, or Required Agents includes `spec-architect`, invoke `spec-architect` before `implementation-planner`.
|
|
51
|
+
- `spec-architect` owns `specs/changes/<id>/design.md`.
|
|
52
|
+
- `implementation-planner` must not create or repair `design.md`; if required design is missing, route back to `spec-architect`.
|
|
53
|
+
7. Produce the implementation plan.
|
|
54
|
+
- Invoke `implementation-planner` after classification, contracts, test-plan, required design, and CI gate plan are known.
|
|
55
|
+
- `implementation-plan.md` is the execution packet for implementation agents: scope, non-goals, file-level plan, contract updates, tests, acceptance criteria, and constraints.
|
|
56
|
+
- Keep the plan concise. It should not duplicate the full investigation history or user discussion.
|
|
57
|
+
- If the planner reports missing decisions or context, stop before implementation and resolve that gap.
|
|
58
|
+
8. Implement through the right role.
|
|
43
59
|
- Backend/frontend work must follow contracts and tests.
|
|
60
|
+
- Backend/frontend/test implementation agents must read `implementation-plan.md` and should report `blocked` instead of inferring missing requirements from chat history.
|
|
44
61
|
- Before invoking an agent with known concrete read paths, run
|
|
45
62
|
`cdd-kit context check <change-id> --path <paths...>` and expand the
|
|
46
63
|
manifest before the agent reads legitimate missing paths.
|
|
@@ -50,12 +67,12 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
|
|
|
50
67
|
- Invoke ui-ux-reviewer for interaction, copy, accessibility, and information hierarchy review whenever UI changes.
|
|
51
68
|
- Invoke visual-reviewer for layout, responsive, CSS contract, and screenshot diff review whenever UI changes.
|
|
52
69
|
- If implementation reveals an unexpected boundary or architectural constraint, halt and re-invoke `spec-architect` before continuing.
|
|
53
|
-
|
|
70
|
+
9. Run quality gates.
|
|
54
71
|
- Use `references/qa-gates.md`.
|
|
55
72
|
- CI/CD gate plan is mandatory.
|
|
56
73
|
- `qa-reviewer` decides release readiness; Tier 1 gates must be green; Tier 3+ gates must be green or explicitly deferred with a recorded promotion policy.
|
|
57
74
|
- Invoke ci-cd-gatekeeper to design and enforce the gate plan.
|
|
58
|
-
|
|
75
|
+
10. Archive and audit drift.
|
|
59
76
|
- Use `references/spec-drift-policy.md`.
|
|
60
77
|
- General agents record evidence and findings only; durable learning
|
|
61
78
|
promotion happens only during `/cdd-close` Step 3.
|
|
@@ -76,11 +93,12 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
|
|
|
76
93
|
- classification
|
|
77
94
|
- current behavior if modifying existing feature
|
|
78
95
|
- proposal/spec/design as needed
|
|
96
|
+
- implementation-plan
|
|
79
97
|
- contracts
|
|
80
98
|
- test-plan
|
|
81
99
|
- ci-gates
|
|
82
100
|
- tasks
|
|
83
|
-
- QA report
|
|
101
|
+
- QA verdict; `qa-report.md` only when blocked, approved-with-risk, or required by classification
|
|
84
102
|
|
|
85
103
|
### UI change
|
|
86
104
|
|
|
@@ -114,6 +132,10 @@ Required when the change involves report generation, large queries, auto-refresh
|
|
|
114
132
|
|
|
115
133
|
When using this skill, produce concrete artifact content instead of vague recommendations. Include exact files to create/update, exact gates to run, exact commands if detectable, and exact acceptance criteria.
|
|
116
134
|
|
|
135
|
+
Avoid artifact sprawl: do not create optional markdown when a concise verdict
|
|
136
|
+
or `agent-log/*.yml` pointer is enough. Do not duplicate full test strategy,
|
|
137
|
+
CI policy, design rationale, or contract prose across artifacts.
|
|
138
|
+
|
|
117
139
|
## Scripts
|
|
118
140
|
|
|
119
141
|
- `scripts/detect_project_profile.py`: inspect a repository and emit a Markdown project profile.
|
|
@@ -129,4 +151,7 @@ Run scripts with Python 3 from the repository root.
|
|
|
129
151
|
|
|
130
152
|
- `tasks.yml`: structured YAML, validated by `src/schemas/tasks.schema.ts`.
|
|
131
153
|
- `agent-log/<agent>.yml`: optional structured handoff note per `references/agent-log-protocol.md`.
|
|
132
|
-
-
|
|
154
|
+
- `implementation-plan.md`: required execution handoff for implementation agents.
|
|
155
|
+
- Report markdown is optional and reserved for durable review evidence. Routine
|
|
156
|
+
pass/fail evidence belongs in short `agent-log/*.yml` pointers or the final
|
|
157
|
+
assistant summary.
|
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
## QA rule
|
|
22
22
|
|
|
23
|
-
QA approval requires evidence. Evidence may be command output, CI links, logs,
|
|
23
|
+
QA approval requires evidence. Evidence may be command output, CI links, logs,
|
|
24
|
+
screenshots, videos, traces, metrics, or artifact files. Routine approvals
|
|
25
|
+
should use concise verdict text plus optional `agent-log/*.yml` pointers.
|
|
26
|
+
Create `qa-report.md` only for blocked, approved-with-risk, or excluded
|
|
27
|
+
pre-existing failure decisions.
|
|
24
28
|
|
|
25
29
|
## Fixback rule
|
|
26
30
|
|
|
@@ -25,4 +25,7 @@ Run a drift audit when:
|
|
|
25
25
|
|
|
26
26
|
## Output
|
|
27
27
|
|
|
28
|
-
Use
|
|
28
|
+
Use concise verdict text plus optional `agent-log/*.yml` evidence pointers for
|
|
29
|
+
clean audits. Use `templates/regression-report.md` or create
|
|
30
|
+
`spec-drift-audit.md` only when drift is found, the user asked for standalone
|
|
31
|
+
audit documentation, or the change needs durable follow-up prose.
|
|
@@ -40,3 +40,7 @@ Define:
|
|
|
40
40
|
- raw logs or metrics
|
|
41
41
|
- pass/fail conclusion
|
|
42
42
|
- follow-up issues for degraded but non-blocking findings
|
|
43
|
+
|
|
44
|
+
Routine results may be captured as concise response text plus optional
|
|
45
|
+
`agent-log/*.yml` pointers. Create `stress-soak-report.md` only for required
|
|
46
|
+
high-risk evidence, failed/blocked runs, or approved-with-risk decisions.
|
|
@@ -24,4 +24,7 @@ Visual review is required when frontend output changes.
|
|
|
24
24
|
|
|
25
25
|
## Review output
|
|
26
26
|
|
|
27
|
-
Use `
|
|
27
|
+
Use concise verdict text plus optional `agent-log/*.yml` evidence pointers for
|
|
28
|
+
routine approvals. Use `templates/visual-review-report.md` only for blocking
|
|
29
|
+
visual findings, approved-with-risk decisions, or evidence bundles that need
|
|
30
|
+
durable review prose.
|
|
@@ -6,8 +6,8 @@ Classify every request before implementation. A request may have more than one t
|
|
|
6
6
|
|
|
7
7
|
| Change type | Required path |
|
|
8
8
|
|---|---|
|
|
9
|
-
| new-feature | proposal, spec, design, contracts, test-plan, ci-gates, tasks |
|
|
10
|
-
| feature-enhancement | current-behavior, diff spec, regression scope, contracts, test-plan, ci-gates |
|
|
9
|
+
| new-feature | proposal, spec, design, contracts, test-plan, ci-gates, implementation-plan, tasks |
|
|
10
|
+
| feature-enhancement | current-behavior, diff spec, regression scope, contracts, test-plan, ci-gates, implementation-plan |
|
|
11
11
|
| business-logic-change | current rule, new rule, decision table, examples, edge cases, regression tests |
|
|
12
12
|
| bug-fix | reproduction, root cause, failing test, fix, regression test, QA evidence |
|
|
13
13
|
| regression-fix | broken prior behavior, regression source, failing test, rollback or forward fix |
|
|
@@ -28,6 +28,7 @@ Do not create heavyweight artifacts when a tiny change does not need them. Howev
|
|
|
28
28
|
- which contracts are affected
|
|
29
29
|
- which tests prove it
|
|
30
30
|
- which CI/CD gates must run
|
|
31
|
+
- what execution packet implementation agents should follow
|
|
31
32
|
|
|
32
33
|
## Iteration rule
|
|
33
34
|
|
|
@@ -9,26 +9,36 @@ def main():
|
|
|
9
9
|
ap.add_argument('change_id')
|
|
10
10
|
ap.add_argument('--root', default='.')
|
|
11
11
|
ap.add_argument('--templates', default=None)
|
|
12
|
+
ap.add_argument('--all', action='store_true', help='also copy optional report/spec templates')
|
|
12
13
|
args=ap.parse_args()
|
|
13
14
|
root=Path(args.root).resolve()
|
|
14
15
|
templates=Path(args.templates).resolve() if args.templates else Path(__file__).resolve().parents[1]/'templates'
|
|
15
16
|
dest=root/'specs'/'changes'/args.change_id
|
|
16
17
|
dest.mkdir(parents=True, exist_ok=False)
|
|
17
|
-
|
|
18
|
+
required={
|
|
18
19
|
'change-request.md':'change-request.md',
|
|
19
20
|
'change-classification.md':'change-classification.md',
|
|
21
|
+
'implementation-plan.md':'implementation-plan.md',
|
|
22
|
+
'test-plan.md':'test-plan.md',
|
|
23
|
+
'ci-gates.md':'ci-gates.md',
|
|
24
|
+
'tasks.yml':'tasks.yml',
|
|
25
|
+
}
|
|
26
|
+
optional={
|
|
20
27
|
'current-behavior.md':'current-behavior.md',
|
|
21
28
|
'proposal.md':'proposal.md',
|
|
22
29
|
'spec.md':'spec.md',
|
|
23
30
|
'design.md':'design.md',
|
|
24
31
|
'contracts.md':'contracts.md',
|
|
25
|
-
'test-plan.md':'test-plan.md',
|
|
26
|
-
'ci-gates.md':'ci-gates.md',
|
|
27
|
-
'tasks.yml':'tasks.yml',
|
|
28
32
|
'qa-report.md':'qa-report.md',
|
|
29
33
|
'regression-report.md':'regression-report.md',
|
|
34
|
+
'visual-review-report.md':'visual-review-report.md',
|
|
35
|
+
'monkey-test-report.md':'monkey-test-report.md',
|
|
36
|
+
'stress-soak-report.md':'stress-soak-report.md',
|
|
30
37
|
'archive.md':'archive.md',
|
|
31
38
|
}
|
|
39
|
+
mapping=dict(required)
|
|
40
|
+
if args.all:
|
|
41
|
+
mapping.update(optional)
|
|
32
42
|
for src,dst in mapping.items():
|
|
33
43
|
s=templates/src
|
|
34
44
|
if s.exists():
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""Coarse traceability check for a change folder."""
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
import argparse, sys
|
|
5
|
-
REQUIRED=['change-classification.md','test-plan.md','ci-gates.md','tasks.yml']
|
|
5
|
+
REQUIRED=['change-classification.md','implementation-plan.md','test-plan.md','ci-gates.md','tasks.yml']
|
|
6
6
|
def check_change_dir(d):
|
|
7
7
|
"""Check one change directory. Returns list of error strings (empty = pass)."""
|
|
8
8
|
errors=[]
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
## Architecture Review Required
|
|
17
17
|
- yes / no
|
|
18
18
|
- reason: (fill only if yes)
|
|
19
|
+
<!-- If yes, Optional Artifacts must set design.md to yes and Required Agents must include spec-architect. -->
|
|
19
20
|
|
|
20
21
|
## Required Artifacts
|
|
21
|
-
Always required: change-request.md, change-classification.md, test-plan.md, ci-gates.md, tasks.yml
|
|
22
|
+
Always required: change-request.md, change-classification.md, implementation-plan.md, test-plan.md, ci-gates.md, tasks.yml, context-manifest.md
|
|
22
23
|
|
|
23
24
|
## Optional Artifacts (default: no — set yes only with explicit reason)
|
|
24
25
|
| artifact | create? | reason |
|
|
@@ -29,6 +30,14 @@ Always required: change-request.md, change-classification.md, test-plan.md, ci-g
|
|
|
29
30
|
| design.md | no | |
|
|
30
31
|
| qa-report.md | no | |
|
|
31
32
|
| regression-report.md | no | |
|
|
33
|
+
| visual-review-report.md | no | |
|
|
34
|
+
| monkey-test-report.md | no | |
|
|
35
|
+
| stress-soak-report.md | no | |
|
|
36
|
+
|
|
37
|
+
Artifact minimization:
|
|
38
|
+
- Prefer optional `agent-log/*.yml` pointers for routine review evidence.
|
|
39
|
+
- Create report markdown only for blocking findings, approved-with-risk, excluded pre-existing failures, visual evidence bundles, or high-risk load/soak results.
|
|
40
|
+
- Later artifacts should reference earlier artifacts by path/section/id instead of duplicating full content.
|
|
32
41
|
|
|
33
42
|
## Required Contracts
|
|
34
43
|
- API:
|
|
@@ -61,7 +70,8 @@ Always required: change-request.md, change-classification.md, test-plan.md, ci-g
|
|
|
61
70
|
|
|
62
71
|
## Tasks Not Applicable
|
|
63
72
|
<!-- Comma-separated task IDs from tasks.yml that do NOT apply to this change.
|
|
64
|
-
/cdd-new SKILL marks these as `status: skipped` in tasks.yml.
|
|
73
|
+
/cdd-new SKILL marks these as `status: skipped` in tasks.yml.
|
|
74
|
+
Include 1.3 when design.md is not required. -->
|
|
65
75
|
- not-applicable:
|
|
66
76
|
|
|
67
77
|
## Clarifications or Assumptions
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
change-id: <id>
|
|
3
|
+
schema-version: 0.1.0
|
|
4
|
+
last-changed: <date>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implementation Plan: <change-id>
|
|
8
|
+
|
|
9
|
+
## Objective
|
|
10
|
+
|
|
11
|
+
(Concrete outcome the implementation agents must deliver.)
|
|
12
|
+
|
|
13
|
+
## Execution Scope
|
|
14
|
+
|
|
15
|
+
### In Scope
|
|
16
|
+
-
|
|
17
|
+
|
|
18
|
+
### Out of Scope
|
|
19
|
+
-
|
|
20
|
+
|
|
21
|
+
## Required Changes
|
|
22
|
+
|
|
23
|
+
| id | area | required action | owner agent |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| IP-1 | | | |
|
|
26
|
+
|
|
27
|
+
## Source Artifact Pointers
|
|
28
|
+
|
|
29
|
+
| source | relevant pointer | used for |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| test-plan.md | AC-1 | tests to run/write |
|
|
32
|
+
| ci-gates.md | required gates table | verification commands |
|
|
33
|
+
| design.md | Decision: | implementation constraint |
|
|
34
|
+
|
|
35
|
+
## File-Level Plan
|
|
36
|
+
|
|
37
|
+
| path or glob | action | notes |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| | | |
|
|
40
|
+
|
|
41
|
+
## Contract Updates
|
|
42
|
+
|
|
43
|
+
- API:
|
|
44
|
+
- CSS/UI:
|
|
45
|
+
- Env:
|
|
46
|
+
- Data shape:
|
|
47
|
+
- Business logic:
|
|
48
|
+
- CI/CD:
|
|
49
|
+
|
|
50
|
+
## Test Execution Plan
|
|
51
|
+
|
|
52
|
+
| acceptance criterion | test file / command | expected signal |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| AC-1 | | |
|
|
55
|
+
|
|
56
|
+
## Handoff Constraints
|
|
57
|
+
|
|
58
|
+
- Implementation agents must not infer missing requirements from chat history.
|
|
59
|
+
- Do not re-copy full design, test strategy, CI policy, or contract prose into this plan; follow the source pointers above.
|
|
60
|
+
- If this plan omits a required file, behavior, contract, or test, stop and report `blocked`.
|
|
61
|
+
- Keep implementation within the file-level plan unless a Context Expansion Request is approved.
|
|
62
|
+
|
|
63
|
+
## Known Risks
|
|
64
|
+
|
|
65
|
+
-
|