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.
Files changed (42) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +111 -15
  3. package/assets/AGENTS.template.md +1 -0
  4. package/assets/CLAUDE.template.md +4 -0
  5. package/assets/CODEX.template.md +4 -0
  6. package/assets/agents/backend-engineer.md +3 -1
  7. package/assets/agents/change-classifier.md +32 -4
  8. package/assets/agents/ci-cd-gatekeeper.md +4 -0
  9. package/assets/agents/e2e-resilience-engineer.md +6 -1
  10. package/assets/agents/frontend-engineer.md +3 -1
  11. package/assets/agents/implementation-planner.md +144 -0
  12. package/assets/agents/monkey-test-engineer.md +7 -0
  13. package/assets/agents/qa-reviewer.md +8 -0
  14. package/assets/agents/spec-architect.md +1 -1
  15. package/assets/agents/spec-drift-auditor.md +8 -0
  16. package/assets/agents/stress-soak-engineer.md +12 -1
  17. package/assets/agents/test-strategist.md +1 -0
  18. package/assets/agents/ui-ux-reviewer.md +7 -0
  19. package/assets/agents/visual-reviewer.md +9 -0
  20. package/assets/cdd/model-policy.json +1 -0
  21. package/assets/skills/cdd-new/SKILL.md +75 -22
  22. package/assets/skills/cdd-resume/SKILL.md +9 -0
  23. package/assets/skills/contract-driven-delivery/SKILL.md +31 -6
  24. package/assets/skills/contract-driven-delivery/references/qa-gates.md +5 -1
  25. package/assets/skills/contract-driven-delivery/references/spec-drift-policy.md +4 -1
  26. package/assets/skills/contract-driven-delivery/references/stress-soak-standard.md +4 -0
  27. package/assets/skills/contract-driven-delivery/references/visual-review-standard.md +4 -1
  28. package/assets/skills/contract-driven-delivery/references/workflow-router.md +3 -2
  29. package/assets/skills/contract-driven-delivery/scripts/generate_change_scaffold.py +14 -4
  30. package/assets/skills/contract-driven-delivery/scripts/validate_spec_traceability.py +1 -1
  31. package/assets/skills/contract-driven-delivery/templates/change-classification.md +12 -2
  32. package/assets/skills/contract-driven-delivery/templates/ci-gates.md +4 -0
  33. package/assets/skills/contract-driven-delivery/templates/implementation-plan.md +65 -0
  34. package/assets/skills/contract-driven-delivery/templates/tasks.yml +3 -1
  35. package/assets/skills/contract-driven-delivery/templates/test-plan.md +1 -1
  36. package/assets/specs-templates/change-classification.md +12 -2
  37. package/assets/specs-templates/ci-gates.md +4 -0
  38. package/assets/specs-templates/implementation-plan.md +65 -0
  39. package/assets/specs-templates/tasks.yml +3 -1
  40. package/assets/specs-templates/test-plan.md +1 -1
  41. package/dist/cli/index.js +19 -0
  42. package/package.json +1 -1
@@ -11,7 +11,9 @@ tasks:
11
11
  # status: pending | done | skipped
12
12
  - { id: "1.1", section: Preparation, title: "Confirm classification and required artifacts", status: pending }
13
13
  - { id: "1.2", section: Preparation, title: "Confirm contracts to update", status: pending }
14
- - { id: "1.3", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
14
+ - { id: "1.3", section: Preparation, title: "Confirm design decisions if required", status: pending }
15
+ - { id: "1.4", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
16
+ - { id: "1.5", section: Preparation, title: "Confirm implementation plan", status: pending }
15
17
  - { id: "2.1", section: "Contract Updates", title: "API contract", status: pending }
16
18
  - { id: "2.2", section: "Contract Updates", title: "CSS/UI contract", status: pending }
17
19
  - { id: "2.3", section: "Contract Updates", title: "Env contract", status: pending }
@@ -22,4 +22,4 @@ Mark all that apply: unit / contract / integration / e2e / data-boundary / resil
22
22
 
23
23
  ## Notes
24
24
 
25
- (Keep this section under 10 lines. Implementation detail belongs in the test files themselves.)
25
+ (Keep this section under 10 lines. Implementation detail belongs in the test files themselves. Do not repeat full implementation-plan or CI-gate content here.)
@@ -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
@@ -29,3 +29,7 @@
29
29
  ## Artifact Retention
30
30
 
31
31
  ## Merge Eligibility Decision
32
+
33
+ ## Notes
34
+
35
+ Reference test-plan.md rows or gate names instead of duplicating full test strategy.
@@ -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
+ -
@@ -11,7 +11,9 @@ tasks:
11
11
  # status: pending | done | skipped (optional: note: "reason or context")
12
12
  - { id: "1.1", section: Preparation, title: "Confirm classification and required artifacts", status: pending }
13
13
  - { id: "1.2", section: Preparation, title: "Confirm contracts to update", status: pending }
14
- - { id: "1.3", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
14
+ - { id: "1.3", section: Preparation, title: "Confirm design decisions if required", status: pending }
15
+ - { id: "1.4", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
16
+ - { id: "1.5", section: Preparation, title: "Confirm implementation plan", status: pending }
15
17
  - { id: "2.1", section: "Contract Updates", title: "API contract", status: pending }
16
18
  - { id: "2.2", section: "Contract Updates", title: "CSS/UI contract", status: pending }
17
19
  - { id: "2.3", section: "Contract Updates", title: "Env contract", status: pending }
@@ -22,4 +22,4 @@ Mark all that apply: unit / contract / integration / e2e / data-boundary / resil
22
22
 
23
23
  ## Notes
24
24
 
25
- (Keep this section under 10 lines. Implementation detail belongs in the test files themselves.)
25
+ (Keep this section under 10 lines. Implementation detail belongs in the test files themselves. Do not repeat full implementation-plan or CI-gate content here.)
package/dist/cli/index.js CHANGED
@@ -7756,6 +7756,20 @@ function migrateAgentLogs(changeDir, changed, pendingWrites, pendingDeletes) {
7756
7756
  changed.push(`agent-log/${f} -> agent-log/${yamlName}`);
7757
7757
  }
7758
7758
  }
7759
+ function ensureImplementationPlanScaffold(changeId, changeDir, changed, warnings, pendingWrites) {
7760
+ const planPath = join13(changeDir, "implementation-plan.md");
7761
+ if (existsSync12(planPath))
7762
+ return;
7763
+ const templatePath = join13(ASSET.specsTemplates, "implementation-plan.md");
7764
+ if (!existsSync12(templatePath)) {
7765
+ warnings.push("implementation-plan.md template not found; run cdd-kit upgrade --yes after updating cdd-kit");
7766
+ return;
7767
+ }
7768
+ const template = readFileSync11(templatePath, "utf8").replace(/<change-id>/g, changeId).replace(/<id>/g, changeId);
7769
+ pendingWrites.push({ path: planPath, content: template });
7770
+ changed.push("implementation-plan.md: added scaffold");
7771
+ warnings.push("implementation-plan.md scaffold added; fill it before implementation agents continue");
7772
+ }
7759
7773
  function migrateOne(changeId, changeDir, enableContextGovernance) {
7760
7774
  const changed = [];
7761
7775
  const warnings = [];
@@ -7793,6 +7807,7 @@ function migrateOne(changeId, changeDir, enableContextGovernance) {
7793
7807
  }
7794
7808
  }
7795
7809
  migrateTasksFile(changeId, changeDir, enableContextGovernance, detectedTier, changed, warnings, pending, deletes);
7810
+ ensureImplementationPlanScaffold(changeId, changeDir, changed, warnings, pending);
7796
7811
  migrateAgentLogs(changeDir, changed, pending, deletes);
7797
7812
  const manifestPath = join13(changeDir, "context-manifest.md");
7798
7813
  if (!existsSync12(manifestPath)) {
@@ -7946,6 +7961,7 @@ var init_migrate = __esm({
7946
7961
  "src/commands/migrate.ts"() {
7947
7962
  "use strict";
7948
7963
  init_logger();
7964
+ init_paths();
7949
7965
  }
7950
7966
  });
7951
7967
 
@@ -11668,6 +11684,7 @@ async function ensureFreshContextIndexes(cwd) {
11668
11684
  var REQUIRED_TEMPLATES = [
11669
11685
  "change-request.md",
11670
11686
  "change-classification.md",
11687
+ "implementation-plan.md",
11671
11688
  "test-plan.md",
11672
11689
  "ci-gates.md",
11673
11690
  "tasks.yml",
@@ -11917,6 +11934,7 @@ var TASKS_STATUS_ENUM = /* @__PURE__ */ new Set([
11917
11934
  var REQUIRED_FILES = [
11918
11935
  "change-request.md",
11919
11936
  "change-classification.md",
11937
+ "implementation-plan.md",
11920
11938
  "test-plan.md",
11921
11939
  "ci-gates.md",
11922
11940
  "tasks.yml",
@@ -11925,6 +11943,7 @@ var REQUIRED_FILES = [
11925
11943
  var TIER_PATTERN = /\b(tier\s*[0-5]|low|medium|high|critical)\b/i;
11926
11944
  var MIN_CHARS = {
11927
11945
  "change-classification.md": 200,
11946
+ "implementation-plan.md": 200,
11928
11947
  "test-plan.md": 200,
11929
11948
  "ci-gates.md": 150,
11930
11949
  "change-request.md": 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contract-driven-delivery",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "Contract-driven delivery kit for AI coding agents with deterministic context indexes, manifest-backed read-scope governance, and orchestrated contracts-first delivery.",
5
5
  "keywords": [
6
6
  "contract-driven",