contract-driven-delivery 1.9.0 → 1.11.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.
Files changed (32) hide show
  1. package/README.md +383 -143
  2. package/assets/CLAUDE.template.md +31 -204
  3. package/assets/agents/backend-engineer.md +19 -1
  4. package/assets/agents/change-classifier.md +44 -8
  5. package/assets/agents/ci-cd-gatekeeper.md +13 -0
  6. package/assets/agents/contract-reviewer.md +13 -0
  7. package/assets/agents/e2e-resilience-engineer.md +13 -0
  8. package/assets/agents/frontend-engineer.md +19 -1
  9. package/assets/agents/monkey-test-engineer.md +13 -0
  10. package/assets/agents/qa-reviewer.md +13 -0
  11. package/assets/agents/repo-context-scanner.md +3 -0
  12. package/assets/agents/spec-architect.md +41 -31
  13. package/assets/agents/spec-drift-auditor.md +21 -19
  14. package/assets/agents/stress-soak-engineer.md +13 -0
  15. package/assets/agents/test-strategist.md +36 -26
  16. package/assets/ci-templates/conda.yml +1 -1
  17. package/assets/{ci/github-actions → github-workflows}/contract-driven-gates.yml +12 -17
  18. package/assets/hooks/pre-commit +1 -1
  19. package/assets/skills/cdd-close/SKILL.md +123 -0
  20. package/assets/skills/cdd-init/SKILL.md +6 -0
  21. package/assets/skills/cdd-new/SKILL.md +108 -24
  22. package/assets/skills/cdd-resume/SKILL.md +86 -0
  23. package/assets/skills/contract-driven-delivery/templates/change-classification.md +18 -11
  24. package/assets/skills/contract-driven-delivery/templates/design.md +16 -13
  25. package/assets/skills/contract-driven-delivery/templates/tasks.md +7 -0
  26. package/assets/skills/contract-driven-delivery/templates/test-plan.md +17 -23
  27. package/assets/specs-templates/change-classification.md +18 -11
  28. package/assets/specs-templates/design.md +16 -13
  29. package/assets/specs-templates/tasks.md +7 -0
  30. package/assets/specs-templates/test-plan.md +17 -23
  31. package/dist/cli/index.js +508 -41
  32. package/package.json +8 -5
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: cdd-resume
3
+ description: Resume an in-progress change across sessions. Reads tasks.md and agent-log/ to determine where to continue. Args: <change-id>
4
+ ---
5
+
6
+ # cdd-resume — Resume a Change
7
+
8
+ ## Purpose
9
+
10
+ Use when returning to a change after a session break, or when `/cdd-new` was interrupted.
11
+
12
+ ## Input
13
+
14
+ Provide the `change-id`. If unsure, run `cdd-kit list` to see active changes.
15
+
16
+ ---
17
+
18
+ ## Step 0: Detect format version
19
+
20
+ Before reading state, check if `specs/changes/<change-id>/tasks.md` starts with `---` (YAML frontmatter).
21
+
22
+ If it does NOT start with `---`, this change was created with a pre-v1.11 version of cdd-kit. Run:
23
+
24
+ ```
25
+ cdd-kit migrate <change-id>
26
+ ```
27
+
28
+ Then commit the migration:
29
+ ```
30
+ git add specs/changes/<change-id>/tasks.md specs/changes/<change-id>/change-classification.md
31
+ git commit -m "chore: migrate <change-id> to v1.11 format"
32
+ ```
33
+
34
+ If there are many mid-flight changes, suggest `cdd-kit migrate --all` instead.
35
+
36
+ ---
37
+
38
+ ## Step 1: Read current state
39
+
40
+ Read `specs/changes/<change-id>/tasks.md`:
41
+ - Identify all `[x]` (done) items
42
+ - Identify all `[-]` (N/A) items
43
+ - Identify all `[ ]` (pending) items
44
+
45
+ Read `specs/changes/<change-id>/agent-log/` to list which agents have already run.
46
+
47
+ Read `specs/changes/<change-id>/change-classification.md` to recall the tier and required agents.
48
+
49
+ ---
50
+
51
+ ## Step 2: Report state and ask to continue
52
+
53
+ Output a resume summary:
54
+
55
+ ```
56
+ ## Resume: <change-id>
57
+
58
+ Tier: <tier>
59
+ Status: <in-progress | gate-blocked>
60
+
61
+ Completed agents: <list from agent-log/>
62
+ Pending tasks: <list of [ ] items>
63
+
64
+ Next agent to run: <agent-name> (based on tier flow and what's missing)
65
+ ```
66
+
67
+ Ask the user: "Continue from <next-agent>? (yes/no)"
68
+
69
+ ---
70
+
71
+ ## Step 3: Continue the flow
72
+
73
+ If user confirms, resume from the next agent in the Tier sequence (refer to `/cdd-new` Step 3 for the agent order).
74
+
75
+ **Critical**: Inject `CURRENT_CHANGE_ID: <change-id>` at the start of every agent prompt. Do NOT re-run agents that already have a `status: complete` agent-log.
76
+
77
+ Continue until all required agents are done, then run `cdd-kit gate <change-id>`.
78
+
79
+ ---
80
+
81
+ ## Rules
82
+
83
+ - Never re-run an agent that already has `status: complete` in its agent-log
84
+ - Never start from Step 1 of `/cdd-new` — only resume from the next pending agent
85
+ - If tasks.md has `status: abandoned`, report to user and stop
86
+ - If tasks.md has `status: gate-blocked`, go directly to gate retry (max 3)
@@ -10,18 +10,25 @@
10
10
  ## Impact Radius
11
11
  - isolated / module-level / cross-module / system-wide
12
12
 
13
+ ## Tier
14
+ - 0 / 1 / 2 / 3 / 4 / 5
15
+
16
+ ## Architecture Review Required
17
+ - yes / no
18
+ - reason: (fill only if yes)
19
+
13
20
  ## 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 | | |
21
+ Always required: change-request.md, change-classification.md, test-plan.md, ci-gates.md, tasks.md
22
+
23
+ ## Optional Artifacts (default: no — set yes only with explicit reason)
24
+ | artifact | create? | reason |
25
+ |---|---|---|
26
+ | current-behavior.md | no | |
27
+ | proposal.md | no | |
28
+ | spec.md | no | |
29
+ | design.md | no | |
30
+ | qa-report.md | no | |
31
+ | regression-report.md | no | |
25
32
 
26
33
  ## Required Contracts
27
34
  - 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,3 +1,10 @@
1
+ ---
2
+ change-id: <change-id>
3
+ status: in-progress
4
+ ---
5
+
6
+ <!-- [x]=done [-]=N/A [ ]=pending -->
7
+
1
8
  # Tasks
2
9
 
3
10
  ## 1. Preparation
@@ -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.)
@@ -10,18 +10,25 @@
10
10
  ## Impact Radius
11
11
  - isolated / module-level / cross-module / system-wide
12
12
 
13
+ ## Tier
14
+ - 0 / 1 / 2 / 3 / 4 / 5
15
+
16
+ ## Architecture Review Required
17
+ - yes / no
18
+ - reason: (fill only if yes)
19
+
13
20
  ## 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 | | |
21
+ Always required: change-request.md, change-classification.md, test-plan.md, ci-gates.md, tasks.md
22
+
23
+ ## Optional Artifacts (default: no — set yes only with explicit reason)
24
+ | artifact | create? | reason |
25
+ |---|---|---|
26
+ | current-behavior.md | no | |
27
+ | proposal.md | no | |
28
+ | spec.md | no | |
29
+ | design.md | no | |
30
+ | qa-report.md | no | |
31
+ | regression-report.md | no | |
25
32
 
26
33
  ## Required Contracts
27
34
  - 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,3 +1,10 @@
1
+ ---
2
+ change-id: <change-id>
3
+ status: in-progress
4
+ ---
5
+
6
+ <!-- [x]=done [-]=N/A [ ]=pending -->
7
+
1
8
  # Tasks
2
9
 
3
10
  ## 1. Preparation
@@ -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.)